diff --git a/.env b/.env index e807f8b..6a6ce7d 100644 --- a/.env +++ b/.env @@ -19,13 +19,12 @@ APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef ###< symfony/framework-bundle ### # string pour la requête sql qui va récupérer le mot de passe -queryHashPassword="SELECT password from USER WHERE email =" -# l'url de connexion à la bdd avec PDO +queryHashPassword="SELECT password from USER WHERE email = :email;" +queryFetchDatas="SELECT email,lastname,firstname,random, password from USER WHERE email = :email;" urlDatabase="mysql:host=db;port=3306;dbname=remote;" dbUser="remote" dbPassword="remote" -# liste des urls pour communiquer avec hydra url_login_challenge_accept="http://sso.mse.local:4445/oauth2/auth/requests/login/accept?login_challenge=" url_login_challenge="http://sso.mse.local:4445/oauth2/auth/requests/login?login_challenge=" url_login_challenge_reject="http://sso.mse.local:4445/oauth2/auth/requests/login/reject?login_challenge=" diff --git a/composer.phar b/composer.phar new file mode 100755 index 0000000..6d812d6 Binary files /dev/null and b/composer.phar differ diff --git a/containers/loginappsql/first-run.sh b/containers/loginappsql/first-run.sh index 95c05f1..0c1c9b4 100644 --- a/containers/loginappsql/first-run.sh +++ b/containers/loginappsql/first-run.sh @@ -10,7 +10,6 @@ set -xeo pipefail sudo chown -R www-data: /loginappsql - -cp /composer.phar /loginapp/composer.phar -cd /loginapp +cp /composer.phar /loginappsql/composer.phar +cd /loginappsql php composer.phar install \ No newline at end of file diff --git a/containers/loginappsql/install-composer.sh b/containers/loginappsql/install-composer.sh index 1e7965f..47d1899 100644 --- a/containers/loginappsql/install-composer.sh +++ b/containers/loginappsql/install-composer.sh @@ -13,7 +13,7 @@ then exit 1 fi -php composer-setup.php --install-dir=bin +php composer-setup.php RESULT=$? rm composer-setup.php exit $RESULT \ No newline at end of file diff --git a/supervisord.log b/supervisord.log index c916816..0a45159 100644 --- a/supervisord.log +++ b/supervisord.log @@ -4310,3 +4310,13 @@ 2022-05-03 16:04:30,374 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-05-03 16:04:30,374 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-05-03 16:04:30,374 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) +2022-05-04 12:07:39,577 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. +2022-05-04 12:07:39,580 INFO RPC interface 'supervisor' initialized +2022-05-04 12:07:39,580 CRIT Server 'unix_http_server' running without any HTTP authentication checking +2022-05-04 12:07:39,580 INFO supervisord started with pid 67 +2022-05-04 12:07:40,583 INFO spawned: 'apache2' with pid 68 +2022-05-04 12:07:40,586 INFO spawned: 'php-fpm' with pid 69 +2022-05-04 12:07:40,589 INFO spawned: 'rsyslog' with pid 70 +2022-05-04 12:07:41,624 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) +2022-05-04 12:07:41,624 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) +2022-05-04 12:07:41,625 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) diff --git a/supervisord.pid b/supervisord.pid index 6f4247a..3fdcd7c 100644 --- a/supervisord.pid +++ b/supervisord.pid @@ -1 +1 @@ -26 +67 diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index befe5f6..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - dirname(__DIR__, 1), -]); - -[$app, $args] = $runtime - ->getResolver($app) - ->resolve(); - -$app = $app(...$args); - -exit( - $runtime - ->getRunner($app) - ->run() -); diff --git a/vendor/bin/patch-type-declarations b/vendor/bin/patch-type-declarations deleted file mode 100755 index 36cc892..0000000 --- a/vendor/bin/patch-type-declarations +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'); - exit(0); - } -} - -include __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'; diff --git a/vendor/bin/var-dump-server b/vendor/bin/var-dump-server deleted file mode 100755 index 527f3ed..0000000 --- a/vendor/bin/var-dump-server +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); - exit(0); - } -} - -include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; diff --git a/vendor/bin/yaml-lint b/vendor/bin/yaml-lint deleted file mode 100755 index 9e7a09c..0000000 --- a/vendor/bin/yaml-lint +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'); - exit(0); - } -} - -include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'; diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php deleted file mode 100644 index afef3fa..0000000 --- a/vendor/composer/ClassLoader.php +++ /dev/null @@ -1,572 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var ?string */ - private $vendorDir; - - // PSR-4 - /** - * @var array[] - * @psalm-var array> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array[] - * @psalm-var array> - */ - private $prefixDirsPsr4 = array(); - /** - * @var array[] - * @psalm-var array - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * @var array[] - * @psalm-var array> - */ - private $prefixesPsr0 = array(); - /** - * @var array[] - * @psalm-var array - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var string[] - * @psalm-var array - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var bool[] - * @psalm-var array - */ - private $missingClasses = array(); - - /** @var ?string */ - private $apcuPrefix; - - /** - * @var self[] - */ - private static $registeredLoaders = array(); - - /** - * @param ?string $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - /** - * @return string[] - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array[] - * @psalm-return array> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return array[] - * @psalm-return array - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return array[] - * @psalm-return array - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return string[] Array of classname => path - * @psalm-return array - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param string[]|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param string[]|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; -} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php deleted file mode 100644 index 41bc143..0000000 --- a/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,352 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints($constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - $installed[] = self::$installed; - - return $installed; - } -} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE deleted file mode 100644 index f27399a..0000000 --- a/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php deleted file mode 100644 index 41bd9bc..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,2335 +0,0 @@ - $baseDir . '/src/Controller/MainController.php', - 'App\\Entity\\User' => $baseDir . '/src/Entity/User.php', - 'App\\Form\\UserType' => $baseDir . '/src/Form/UserType.php', - 'App\\Kernel' => $baseDir . '/src/Kernel.php', - 'App\\Services\\PdoServices' => $baseDir . '/src/Services/PdoServices.php', - 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', - 'Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'Doctrine\\Common\\Annotations\\Annotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', - 'Doctrine\\Common\\Annotations\\AnnotationException' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', - 'Doctrine\\Common\\Annotations\\AnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', - 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', - 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', - 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Required' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Target' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', - 'Doctrine\\Common\\Annotations\\CachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php', - 'Doctrine\\Common\\Annotations\\DocLexer' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', - 'Doctrine\\Common\\Annotations\\DocParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', - 'Doctrine\\Common\\Annotations\\FileCacheReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php', - 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', - 'Doctrine\\Common\\Annotations\\IndexedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', - 'Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php', - 'Doctrine\\Common\\Annotations\\PhpParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', - 'Doctrine\\Common\\Annotations\\PsrCachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', - 'Doctrine\\Common\\Annotations\\Reader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', - 'Doctrine\\Common\\Annotations\\SimpleAnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php', - 'Doctrine\\Common\\Annotations\\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php', - 'IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php', - 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', - 'Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php', - 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php', - 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php', - 'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php', - 'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php', - 'Psr\\Cache\\InvalidArgumentException' => $vendorDir . '/psr/cache/src/InvalidArgumentException.php', - 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', - 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', - 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', - 'Psr\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/psr/event-dispatcher/src/EventDispatcherInterface.php', - 'Psr\\EventDispatcher\\ListenerProviderInterface' => $vendorDir . '/psr/event-dispatcher/src/ListenerProviderInterface.php', - 'Psr\\EventDispatcher\\StoppableEventInterface' => $vendorDir . '/psr/event-dispatcher/src/StoppableEventInterface.php', - 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', - 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', - 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php', - 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php', - 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php', - 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', - 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', - 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', - 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'Symfony\\Bridge\\Twig\\AppVariable' => $vendorDir . '/symfony/twig-bridge/AppVariable.php', - 'Symfony\\Bridge\\Twig\\Command\\DebugCommand' => $vendorDir . '/symfony/twig-bridge/Command/DebugCommand.php', - 'Symfony\\Bridge\\Twig\\Command\\LintCommand' => $vendorDir . '/symfony/twig-bridge/Command/LintCommand.php', - 'Symfony\\Bridge\\Twig\\DataCollector\\TwigDataCollector' => $vendorDir . '/symfony/twig-bridge/DataCollector/TwigDataCollector.php', - 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer' => $vendorDir . '/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php', - 'Symfony\\Bridge\\Twig\\Extension\\AssetExtension' => $vendorDir . '/symfony/twig-bridge/Extension/AssetExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CodeExtension' => $vendorDir . '/symfony/twig-bridge/Extension/CodeExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfExtension' => $vendorDir . '/symfony/twig-bridge/Extension/CsrfExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/CsrfRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\DumpExtension' => $vendorDir . '/symfony/twig-bridge/Extension/DumpExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension' => $vendorDir . '/symfony/twig-bridge/Extension/ExpressionExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\FormExtension' => $vendorDir . '/symfony/twig-bridge/Extension/FormExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension' => $vendorDir . '/symfony/twig-bridge/Extension/HttpFoundationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension' => $vendorDir . '/symfony/twig-bridge/Extension/HttpKernelExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/HttpKernelRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension' => $vendorDir . '/symfony/twig-bridge/Extension/LogoutUrlExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension' => $vendorDir . '/symfony/twig-bridge/Extension/ProfilerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\RoutingExtension' => $vendorDir . '/symfony/twig-bridge/Extension/RoutingExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SecurityExtension' => $vendorDir . '/symfony/twig-bridge/Extension/SecurityExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerExtension' => $vendorDir . '/symfony/twig-bridge/Extension/SerializerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerRuntime' => $vendorDir . '/symfony/twig-bridge/Extension/SerializerRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension' => $vendorDir . '/symfony/twig-bridge/Extension/StopwatchExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\TranslationExtension' => $vendorDir . '/symfony/twig-bridge/Extension/TranslationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WebLinkExtension' => $vendorDir . '/symfony/twig-bridge/Extension/WebLinkExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WorkflowExtension' => $vendorDir . '/symfony/twig-bridge/Extension/WorkflowExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\YamlExtension' => $vendorDir . '/symfony/twig-bridge/Extension/YamlExtension.php', - 'Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine' => $vendorDir . '/symfony/twig-bridge/Form/TwigRendererEngine.php', - 'Symfony\\Bridge\\Twig\\Mime\\BodyRenderer' => $vendorDir . '/symfony/twig-bridge/Mime/BodyRenderer.php', - 'Symfony\\Bridge\\Twig\\Mime\\NotificationEmail' => $vendorDir . '/symfony/twig-bridge/Mime/NotificationEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail' => $vendorDir . '/symfony/twig-bridge/Mime/TemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\WrappedTemplatedEmail' => $vendorDir . '/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\Scope' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/Scope.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationDefaultDomainNodeVisitor' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationNodeVisitor' => $vendorDir . '/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\Node\\DumpNode' => $vendorDir . '/symfony/twig-bridge/Node/DumpNode.php', - 'Symfony\\Bridge\\Twig\\Node\\FormThemeNode' => $vendorDir . '/symfony/twig-bridge/Node/FormThemeNode.php', - 'Symfony\\Bridge\\Twig\\Node\\RenderBlockNode' => $vendorDir . '/symfony/twig-bridge/Node/RenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\SearchAndRenderBlockNode' => $vendorDir . '/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\StopwatchNode' => $vendorDir . '/symfony/twig-bridge/Node/StopwatchNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransDefaultDomainNode' => $vendorDir . '/symfony/twig-bridge/Node/TransDefaultDomainNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransNode' => $vendorDir . '/symfony/twig-bridge/Node/TransNode.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\DumpTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/DumpTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\FormThemeTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\StopwatchTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransDefaultDomainTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransTokenParser' => $vendorDir . '/symfony/twig-bridge/TokenParser/TransTokenParser.php', - 'Symfony\\Bridge\\Twig\\Translation\\TwigExtractor' => $vendorDir . '/symfony/twig-bridge/Translation/TwigExtractor.php', - 'Symfony\\Bridge\\Twig\\UndefinedCallableHandler' => $vendorDir . '/symfony/twig-bridge/UndefinedCallableHandler.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AbstractPhpFileCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AnnotationsCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\CachePoolClearerCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ConfigBuilderCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\SerializerCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TranslationsCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ValidatorCacheWarmer' => $vendorDir . '/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand' => $vendorDir . '/symfony/framework-bundle/Command/AboutCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AbstractConfigCommand' => $vendorDir . '/symfony/framework-bundle/Command/AbstractConfigCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand' => $vendorDir . '/symfony/framework-bundle/Command/AssetsInstallCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\BuildDebugContainerTrait' => $vendorDir . '/symfony/framework-bundle/Command/BuildDebugContainerTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand' => $vendorDir . '/symfony/framework-bundle/Command/CacheClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolDeleteCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand' => $vendorDir . '/symfony/framework-bundle/Command/CachePoolPruneCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand' => $vendorDir . '/symfony/framework-bundle/Command/CacheWarmupCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/ConfigDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand' => $vendorDir . '/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/ContainerDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/ContainerLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand' => $vendorDir . '/symfony/framework-bundle/Command/DebugAutowiringCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/RouterDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand' => $vendorDir . '/symfony/framework-bundle/Command/RouterMatchCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsRemoveCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand' => $vendorDir . '/symfony/framework-bundle/Command/SecretsSetCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationDebugCommand' => $vendorDir . '/symfony/framework-bundle/Command/TranslationDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationUpdateCommand' => $vendorDir . '/symfony/framework-bundle/Command/TranslationUpdateCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\WorkflowDumpCommand' => $vendorDir . '/symfony/framework-bundle/Command/WorkflowDumpCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\XliffLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/XliffLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand' => $vendorDir . '/symfony/framework-bundle/Command/YamlLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Application' => $vendorDir . '/symfony/framework-bundle/Console/Application.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/Descriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/framework-bundle/Console/Helper/DescriptorHelper.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController' => $vendorDir . '/symfony/framework-bundle/Controller/AbstractController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver' => $vendorDir . '/symfony/framework-bundle/Controller/ControllerResolver.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => $vendorDir . '/symfony/framework-bundle/Controller/RedirectController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => $vendorDir . '/symfony/framework-bundle/Controller/TemplateController.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\AbstractDataCollector' => $vendorDir . '/symfony/framework-bundle/DataCollector/AbstractDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/framework-bundle/DataCollector/RouterDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\TemplateAwareDataCollectorInterface' => $vendorDir . '/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddAnnotationsCachedReaderPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddDebugLogProcessorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AssetsContextPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ContainerBuilderDebugDumpPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\DataCollectorTranslatorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\LoggingTranslatorPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ProfilerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\RemoveUnusedSessionMarshallingHandlerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\SessionPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerRealRefPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerWeakRefPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\UnusedTagsPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\WorkflowGuardListenerPass' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension' => $vendorDir . '/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php', - 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber' => $vendorDir . '/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php', - 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => $vendorDir . '/symfony/framework-bundle/FrameworkBundle.php', - 'Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache' => $vendorDir . '/symfony/framework-bundle/HttpCache/HttpCache.php', - 'Symfony\\Bundle\\FrameworkBundle\\KernelBrowser' => $vendorDir . '/symfony/framework-bundle/KernelBrowser.php', - 'Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait' => $vendorDir . '/symfony/framework-bundle/Kernel/MicroKernelTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\AnnotatedRouteControllerLoader' => $vendorDir . '/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader' => $vendorDir . '/symfony/framework-bundle/Routing/DelegatingLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher' => $vendorDir . '/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RouteLoaderInterface' => $vendorDir . '/symfony/framework-bundle/Routing/RouteLoaderInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router' => $vendorDir . '/symfony/framework-bundle/Routing/Router.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\AbstractVault' => $vendorDir . '/symfony/framework-bundle/Secrets/AbstractVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\DotenvVault' => $vendorDir . '/symfony/framework-bundle/Secrets/DotenvVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => $vendorDir . '/symfony/framework-bundle/Secrets/SodiumVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => $vendorDir . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\DomCrawlerAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase' => $vendorDir . '/symfony/framework-bundle/Test/KernelTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/MailerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestBrowserToken' => $vendorDir . '/symfony/framework-bundle/Test/TestBrowserToken.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestContainer' => $vendorDir . '/symfony/framework-bundle/Test/TestContainer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestAssertionsTrait' => $vendorDir . '/symfony/framework-bundle/Test/WebTestAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase' => $vendorDir . '/symfony/framework-bundle/Test/WebTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => $vendorDir . '/symfony/framework-bundle/Translation/Translator.php', - 'Symfony\\Bundle\\SecurityBundle\\CacheWarmer\\ExpressionCacheWarmer' => $vendorDir . '/symfony/security-bundle/CacheWarmer/ExpressionCacheWarmer.php', - 'Symfony\\Bundle\\SecurityBundle\\Command\\DebugFirewallCommand' => $vendorDir . '/symfony/security-bundle/Command/DebugFirewallCommand.php', - 'Symfony\\Bundle\\SecurityBundle\\Command\\UserPasswordEncoderCommand' => $vendorDir . '/symfony/security-bundle/Command/UserPasswordEncoderCommand.php', - 'Symfony\\Bundle\\SecurityBundle\\DataCollector\\SecurityDataCollector' => $vendorDir . '/symfony/security-bundle/DataCollector/SecurityDataCollector.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener' => $vendorDir . '/symfony/security-bundle/Debug/TraceableFirewallListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableListenerTrait' => $vendorDir . '/symfony/security-bundle/Debug/TraceableListenerTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\WrappedLazyListener' => $vendorDir . '/symfony/security-bundle/Debug/WrappedLazyListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\WrappedListener' => $vendorDir . '/symfony/security-bundle/Debug/WrappedListener.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddSecurityVotersPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/AddSecurityVotersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddSessionDomainConstraintPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\CleanRememberMeVerifierPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterCsrfFeaturesPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterCsrfTokenClearingLogoutHandlerPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterEntryPointPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterEntryPointPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterGlobalSecurityEventListenersPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterLdapLocatorPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterTokenUsageTrackingPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\ReplaceDecoratedRememberMeHandlerPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\SortFirewallListenersPass' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Compiler/SortFirewallListenersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\MainConfiguration' => $vendorDir . '/symfony/security-bundle/DependencyInjection/MainConfiguration.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\SecurityExtension' => $vendorDir . '/symfony/security-bundle/DependencyInjection/SecurityExtension.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AbstractFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AnonymousFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/AnonymousFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AuthenticatorFactoryInterface' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\CustomAuthenticatorFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FirewallListenerFactoryInterface' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FormLoginFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FormLoginLdapFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\GuardAuthenticationFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\HttpBasicFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\HttpBasicLdapFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\JsonLoginFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\JsonLoginLdapFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LdapFactoryTrait' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/LdapFactoryTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LoginLinkFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/LoginLinkFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LoginThrottlingFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\RememberMeFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/RememberMeFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\RemoteUserFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/RemoteUserFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\SecurityFactoryInterface' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\X509Factory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/Factory/X509Factory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\InMemoryFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\LdapFactory' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/LdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\UserProviderFactoryInterface' => $vendorDir . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\EventListener\\FirewallListener' => $vendorDir . '/symfony/security-bundle/EventListener/FirewallListener.php', - 'Symfony\\Bundle\\SecurityBundle\\EventListener\\VoteListener' => $vendorDir . '/symfony/security-bundle/EventListener/VoteListener.php', - 'Symfony\\Bundle\\SecurityBundle\\LoginLink\\FirewallAwareLoginLinkHandler' => $vendorDir . '/symfony/security-bundle/LoginLink/FirewallAwareLoginLinkHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\RememberMe\\DecoratedRememberMeHandler' => $vendorDir . '/symfony/security-bundle/RememberMe/DecoratedRememberMeHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\RememberMe\\FirewallAwareRememberMeHandler' => $vendorDir . '/symfony/security-bundle/RememberMe/FirewallAwareRememberMeHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\SecurityBundle' => $vendorDir . '/symfony/security-bundle/SecurityBundle.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallAwareTrait' => $vendorDir . '/symfony/security-bundle/Security/FirewallAwareTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallConfig' => $vendorDir . '/symfony/security-bundle/Security/FirewallConfig.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext' => $vendorDir . '/symfony/security-bundle/Security/FirewallContext.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap' => $vendorDir . '/symfony/security-bundle/Security/FirewallMap.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\LazyFirewallContext' => $vendorDir . '/symfony/security-bundle/Security/LazyFirewallContext.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\LegacyLogoutHandlerListener' => $vendorDir . '/symfony/security-bundle/Security/LegacyLogoutHandlerListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\UserAuthenticator' => $vendorDir . '/symfony/security-bundle/Security/UserAuthenticator.php', - 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => $vendorDir . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', - 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => $vendorDir . '/symfony/twig-bundle/Command/LintCommand.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\ExtensionPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\RuntimeLoaderPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigEnvironmentPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigLoaderPass' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\TwigExtension' => $vendorDir . '/symfony/twig-bundle/DependencyInjection/TwigExtension.php', - 'Symfony\\Bundle\\TwigBundle\\TemplateIterator' => $vendorDir . '/symfony/twig-bundle/TemplateIterator.php', - 'Symfony\\Bundle\\TwigBundle\\TwigBundle' => $vendorDir . '/symfony/twig-bundle/TwigBundle.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ExceptionPanelController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/ProfilerController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\RouterController' => $vendorDir . '/symfony/web-profiler-bundle/Controller/RouterController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\ContentSecurityPolicyHandler' => $vendorDir . '/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\NonceGenerator' => $vendorDir . '/symfony/web-profiler-bundle/Csp/NonceGenerator.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\Configuration' => $vendorDir . '/symfony/web-profiler-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\WebProfilerExtension' => $vendorDir . '/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener' => $vendorDir . '/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Profiler\\TemplateManager' => $vendorDir . '/symfony/web-profiler-bundle/Profiler/TemplateManager.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension' => $vendorDir . '/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle' => $vendorDir . '/symfony/web-profiler-bundle/WebProfilerBundle.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' => $vendorDir . '/symfony/cache/Adapter/AbstractAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/AbstractTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AdapterInterface' => $vendorDir . '/symfony/cache/Adapter/AdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\ApcuAdapter' => $vendorDir . '/symfony/cache/Adapter/ApcuAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ArrayAdapter' => $vendorDir . '/symfony/cache/Adapter/ArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ChainAdapter' => $vendorDir . '/symfony/cache/Adapter/ChainAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter' => $vendorDir . '/symfony/cache/Adapter/CouchbaseBucketAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseCollectionAdapter' => $vendorDir . '/symfony/cache/Adapter/CouchbaseCollectionAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineAdapter' => $vendorDir . '/symfony/cache/Adapter/DoctrineAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineDbalAdapter' => $vendorDir . '/symfony/cache/Adapter/DoctrineDbalAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter' => $vendorDir . '/symfony/cache/Adapter/FilesystemAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/FilesystemTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\MemcachedAdapter' => $vendorDir . '/symfony/cache/Adapter/MemcachedAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\NullAdapter' => $vendorDir . '/symfony/cache/Adapter/NullAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ParameterNormalizer' => $vendorDir . '/symfony/cache/Adapter/ParameterNormalizer.php', - 'Symfony\\Component\\Cache\\Adapter\\PdoAdapter' => $vendorDir . '/symfony/cache/Adapter/PdoAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter' => $vendorDir . '/symfony/cache/Adapter/PhpArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter' => $vendorDir . '/symfony/cache/Adapter/PhpFilesAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ProxyAdapter' => $vendorDir . '/symfony/cache/Adapter/ProxyAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\Psr16Adapter' => $vendorDir . '/symfony/cache/Adapter/Psr16Adapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisAdapter' => $vendorDir . '/symfony/cache/Adapter/RedisAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/RedisTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => $vendorDir . '/symfony/cache/Adapter/TagAwareAdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => $vendorDir . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\CacheItem' => $vendorDir . '/symfony/cache/CacheItem.php', - 'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => $vendorDir . '/symfony/cache/DataCollector/CacheDataCollector.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CacheCollectorPass' => $vendorDir . '/symfony/cache/DependencyInjection/CacheCollectorPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolClearerPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolClearerPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPrunerPass' => $vendorDir . '/symfony/cache/DependencyInjection/CachePoolPrunerPass.php', - 'Symfony\\Component\\Cache\\DoctrineProvider' => $vendorDir . '/symfony/cache/DoctrineProvider.php', - 'Symfony\\Component\\Cache\\Exception\\CacheException' => $vendorDir . '/symfony/cache/Exception/CacheException.php', - 'Symfony\\Component\\Cache\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/cache/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Cache\\Exception\\LogicException' => $vendorDir . '/symfony/cache/Exception/LogicException.php', - 'Symfony\\Component\\Cache\\LockRegistry' => $vendorDir . '/symfony/cache/LockRegistry.php', - 'Symfony\\Component\\Cache\\Marshaller\\DefaultMarshaller' => $vendorDir . '/symfony/cache/Marshaller/DefaultMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\DeflateMarshaller' => $vendorDir . '/symfony/cache/Marshaller/DeflateMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface' => $vendorDir . '/symfony/cache/Marshaller/MarshallerInterface.php', - 'Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller' => $vendorDir . '/symfony/cache/Marshaller/SodiumMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\TagAwareMarshaller' => $vendorDir . '/symfony/cache/Marshaller/TagAwareMarshaller.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationDispatcher' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationDispatcher.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationHandler' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationHandler.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationMessage' => $vendorDir . '/symfony/cache/Messenger/EarlyExpirationMessage.php', - 'Symfony\\Component\\Cache\\PruneableInterface' => $vendorDir . '/symfony/cache/PruneableInterface.php', - 'Symfony\\Component\\Cache\\Psr16Cache' => $vendorDir . '/symfony/cache/Psr16Cache.php', - 'Symfony\\Component\\Cache\\ResettableInterface' => $vendorDir . '/symfony/cache/ResettableInterface.php', - 'Symfony\\Component\\Cache\\Traits\\AbstractAdapterTrait' => $vendorDir . '/symfony/cache/Traits/AbstractAdapterTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ContractsTrait' => $vendorDir . '/symfony/cache/Traits/ContractsTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemCommonTrait' => $vendorDir . '/symfony/cache/Traits/FilesystemCommonTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemTrait' => $vendorDir . '/symfony/cache/Traits/FilesystemTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ProxyTrait' => $vendorDir . '/symfony/cache/Traits/ProxyTrait.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterNodeProxy' => $vendorDir . '/symfony/cache/Traits/RedisClusterNodeProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterProxy' => $vendorDir . '/symfony/cache/Traits/RedisClusterProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisProxy' => $vendorDir . '/symfony/cache/Traits/RedisProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisTrait' => $vendorDir . '/symfony/cache/Traits/RedisTrait.php', - 'Symfony\\Component\\Config\\Builder\\ClassBuilder' => $vendorDir . '/symfony/config/Builder/ClassBuilder.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGenerator' => $vendorDir . '/symfony/config/Builder/ConfigBuilderGenerator.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGeneratorInterface' => $vendorDir . '/symfony/config/Builder/ConfigBuilderGeneratorInterface.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderInterface' => $vendorDir . '/symfony/config/Builder/ConfigBuilderInterface.php', - 'Symfony\\Component\\Config\\Builder\\Method' => $vendorDir . '/symfony/config/Builder/Method.php', - 'Symfony\\Component\\Config\\Builder\\Property' => $vendorDir . '/symfony/config/Builder/Property.php', - 'Symfony\\Component\\Config\\ConfigCache' => $vendorDir . '/symfony/config/ConfigCache.php', - 'Symfony\\Component\\Config\\ConfigCacheFactory' => $vendorDir . '/symfony/config/ConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ConfigCacheFactoryInterface' => $vendorDir . '/symfony/config/ConfigCacheFactoryInterface.php', - 'Symfony\\Component\\Config\\ConfigCacheInterface' => $vendorDir . '/symfony/config/ConfigCacheInterface.php', - 'Symfony\\Component\\Config\\Definition\\ArrayNode' => $vendorDir . '/symfony/config/Definition/ArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\BaseNode' => $vendorDir . '/symfony/config/Definition/BaseNode.php', - 'Symfony\\Component\\Config\\Definition\\BooleanNode' => $vendorDir . '/symfony/config/Definition/BooleanNode.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/ArrayNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BooleanNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/BooleanNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BuilderAwareInterface' => $vendorDir . '/symfony/config/Definition/Builder/BuilderAwareInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\EnumNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/EnumNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ExprBuilder' => $vendorDir . '/symfony/config/Definition/Builder/ExprBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\FloatNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/FloatNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/IntegerNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\MergeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/MergeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/NodeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/NodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface' => $vendorDir . '/symfony/config/Definition/Builder/NodeParentInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NormalizationBuilder' => $vendorDir . '/symfony/config/Definition/Builder/NormalizationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NumericNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/NumericNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ParentNodeDefinitionInterface' => $vendorDir . '/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ScalarNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/ScalarNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder' => $vendorDir . '/symfony/config/Definition/Builder/TreeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ValidationBuilder' => $vendorDir . '/symfony/config/Definition/Builder/ValidationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\VariableNodeDefinition' => $vendorDir . '/symfony/config/Definition/Builder/VariableNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\ConfigurationInterface' => $vendorDir . '/symfony/config/Definition/ConfigurationInterface.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\XmlReferenceDumper' => $vendorDir . '/symfony/config/Definition/Dumper/XmlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\YamlReferenceDumper' => $vendorDir . '/symfony/config/Definition/Dumper/YamlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\EnumNode' => $vendorDir . '/symfony/config/Definition/EnumNode.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\DuplicateKeyException' => $vendorDir . '/symfony/config/Definition/Exception/DuplicateKeyException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\Exception' => $vendorDir . '/symfony/config/Definition/Exception/Exception.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\ForbiddenOverwriteException' => $vendorDir . '/symfony/config/Definition/Exception/ForbiddenOverwriteException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidDefinitionException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidDefinitionException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException' => $vendorDir . '/symfony/config/Definition/Exception/InvalidTypeException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\UnsetKeyException' => $vendorDir . '/symfony/config/Definition/Exception/UnsetKeyException.php', - 'Symfony\\Component\\Config\\Definition\\FloatNode' => $vendorDir . '/symfony/config/Definition/FloatNode.php', - 'Symfony\\Component\\Config\\Definition\\IntegerNode' => $vendorDir . '/symfony/config/Definition/IntegerNode.php', - 'Symfony\\Component\\Config\\Definition\\NodeInterface' => $vendorDir . '/symfony/config/Definition/NodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\NumericNode' => $vendorDir . '/symfony/config/Definition/NumericNode.php', - 'Symfony\\Component\\Config\\Definition\\Processor' => $vendorDir . '/symfony/config/Definition/Processor.php', - 'Symfony\\Component\\Config\\Definition\\PrototypeNodeInterface' => $vendorDir . '/symfony/config/Definition/PrototypeNodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\PrototypedArrayNode' => $vendorDir . '/symfony/config/Definition/PrototypedArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\ScalarNode' => $vendorDir . '/symfony/config/Definition/ScalarNode.php', - 'Symfony\\Component\\Config\\Definition\\VariableNode' => $vendorDir . '/symfony/config/Definition/VariableNode.php', - 'Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException' => $vendorDir . '/symfony/config/Exception/FileLoaderImportCircularReferenceException.php', - 'Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException' => $vendorDir . '/symfony/config/Exception/FileLocatorFileNotFoundException.php', - 'Symfony\\Component\\Config\\Exception\\LoaderLoadException' => $vendorDir . '/symfony/config/Exception/LoaderLoadException.php', - 'Symfony\\Component\\Config\\FileLocator' => $vendorDir . '/symfony/config/FileLocator.php', - 'Symfony\\Component\\Config\\FileLocatorInterface' => $vendorDir . '/symfony/config/FileLocatorInterface.php', - 'Symfony\\Component\\Config\\Loader\\DelegatingLoader' => $vendorDir . '/symfony/config/Loader/DelegatingLoader.php', - 'Symfony\\Component\\Config\\Loader\\FileLoader' => $vendorDir . '/symfony/config/Loader/FileLoader.php', - 'Symfony\\Component\\Config\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/config/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Config\\Loader\\Loader' => $vendorDir . '/symfony/config/Loader/Loader.php', - 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => $vendorDir . '/symfony/config/Loader/LoaderInterface.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolver' => $vendorDir . '/symfony/config/Loader/LoaderResolver.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolverInterface' => $vendorDir . '/symfony/config/Loader/LoaderResolverInterface.php', - 'Symfony\\Component\\Config\\Loader\\ParamConfigurator' => $vendorDir . '/symfony/config/Loader/ParamConfigurator.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCache' => $vendorDir . '/symfony/config/ResourceCheckerConfigCache.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory' => $vendorDir . '/symfony/config/ResourceCheckerConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ResourceCheckerInterface' => $vendorDir . '/symfony/config/ResourceCheckerInterface.php', - 'Symfony\\Component\\Config\\Resource\\ClassExistenceResource' => $vendorDir . '/symfony/config/Resource/ClassExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\ComposerResource' => $vendorDir . '/symfony/config/Resource/ComposerResource.php', - 'Symfony\\Component\\Config\\Resource\\DirectoryResource' => $vendorDir . '/symfony/config/Resource/DirectoryResource.php', - 'Symfony\\Component\\Config\\Resource\\FileExistenceResource' => $vendorDir . '/symfony/config/Resource/FileExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\FileResource' => $vendorDir . '/symfony/config/Resource/FileResource.php', - 'Symfony\\Component\\Config\\Resource\\GlobResource' => $vendorDir . '/symfony/config/Resource/GlobResource.php', - 'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => $vendorDir . '/symfony/config/Resource/ReflectionClassResource.php', - 'Symfony\\Component\\Config\\Resource\\ResourceInterface' => $vendorDir . '/symfony/config/Resource/ResourceInterface.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceChecker.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => $vendorDir . '/symfony/config/Resource/SelfCheckingResourceInterface.php', - 'Symfony\\Component\\Config\\Util\\Exception\\InvalidXmlException' => $vendorDir . '/symfony/config/Util/Exception/InvalidXmlException.php', - 'Symfony\\Component\\Config\\Util\\Exception\\XmlParsingException' => $vendorDir . '/symfony/config/Util/Exception/XmlParsingException.php', - 'Symfony\\Component\\Config\\Util\\XmlUtils' => $vendorDir . '/symfony/config/Util/XmlUtils.php', - 'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php', - 'Symfony\\Component\\Console\\Attribute\\AsCommand' => $vendorDir . '/symfony/console/Attribute/AsCommand.php', - 'Symfony\\Component\\Console\\CI\\GithubActionReporter' => $vendorDir . '/symfony/console/CI/GithubActionReporter.php', - 'Symfony\\Component\\Console\\Color' => $vendorDir . '/symfony/console/Color.php', - 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php', - 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php', - 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php', - 'Symfony\\Component\\Console\\Command\\CompleteCommand' => $vendorDir . '/symfony/console/Command/CompleteCommand.php', - 'Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => $vendorDir . '/symfony/console/Command/DumpCompletionCommand.php', - 'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php', - 'Symfony\\Component\\Console\\Command\\LazyCommand' => $vendorDir . '/symfony/console/Command/LazyCommand.php', - 'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php', - 'Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php', - 'Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => $vendorDir . '/symfony/console/Command/SignalableCommandInterface.php', - 'Symfony\\Component\\Console\\Completion\\CompletionInput' => $vendorDir . '/symfony/console/Completion/CompletionInput.php', - 'Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => $vendorDir . '/symfony/console/Completion/CompletionSuggestions.php', - 'Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => $vendorDir . '/symfony/console/Completion/Output/BashCompletionOutput.php', - 'Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => $vendorDir . '/symfony/console/Completion/Output/CompletionOutputInterface.php', - 'Symfony\\Component\\Console\\Completion\\Suggestion' => $vendorDir . '/symfony/console/Completion/Suggestion.php', - 'Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/ConsoleEvents.php', - 'Symfony\\Component\\Console\\Cursor' => $vendorDir . '/symfony/console/Cursor.php', - 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => $vendorDir . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php', - 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Descriptor/ApplicationDescription.php', - 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php', - 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php', - 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => $vendorDir . '/symfony/console/EventListener/ErrorListener.php', - 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => $vendorDir . '/symfony/console/Event/ConsoleErrorEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Event/ConsoleEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => $vendorDir . '/symfony/console/Event/ConsoleSignalEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Event/ConsoleTerminateEvent.php', - 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => $vendorDir . '/symfony/console/Exception/CommandNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/console/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/console/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => $vendorDir . '/symfony/console/Exception/InvalidOptionException.php', - 'Symfony\\Component\\Console\\Exception\\LogicException' => $vendorDir . '/symfony/console/Exception/LogicException.php', - 'Symfony\\Component\\Console\\Exception\\MissingInputException' => $vendorDir . '/symfony/console/Exception/MissingInputException.php', - 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => $vendorDir . '/symfony/console/Exception/NamespaceNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\RuntimeException' => $vendorDir . '/symfony/console/Exception/RuntimeException.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/NullOutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Formatter/OutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleStack.php', - 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Console\\Helper\\Dumper' => $vendorDir . '/symfony/console/Helper/Dumper.php', - 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php', - 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Helper/HelperSet.php', - 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php', - 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => $vendorDir . '/symfony/console/Helper/ProgressIndicator.php', - 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Helper/QuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => $vendorDir . '/symfony/console/Helper/SymfonyQuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Helper/Table.php', - 'Symfony\\Component\\Console\\Helper\\TableCell' => $vendorDir . '/symfony/console/Helper/TableCell.php', - 'Symfony\\Component\\Console\\Helper\\TableCellStyle' => $vendorDir . '/symfony/console/Helper/TableCellStyle.php', - 'Symfony\\Component\\Console\\Helper\\TableRows' => $vendorDir . '/symfony/console/Helper/TableRows.php', - 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php', - 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php', - 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Input/Input.php', - 'Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Input/InputArgument.php', - 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => $vendorDir . '/symfony/console/Input/InputAwareInterface.php', - 'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php', - 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Input/InputInterface.php', - 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Input/InputOption.php', - 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => $vendorDir . '/symfony/console/Input/StreamableInputInterface.php', - 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Logger/ConsoleLogger.php', - 'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Output/BufferedOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Output/ConsoleOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Output/ConsoleOutputInterface.php', - 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => $vendorDir . '/symfony/console/Output/ConsoleSectionOutput.php', - 'Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Output/NullOutput.php', - 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Output/Output.php', - 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Output/OutputInterface.php', - 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => $vendorDir . '/symfony/console/Output/TrimmedBufferOutput.php', - 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Question/ChoiceQuestion.php', - 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Question/ConfirmationQuestion.php', - 'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Question/Question.php', - 'Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => $vendorDir . '/symfony/console/SignalRegistry/SignalRegistry.php', - 'Symfony\\Component\\Console\\SingleCommandApplication' => $vendorDir . '/symfony/console/SingleCommandApplication.php', - 'Symfony\\Component\\Console\\Style\\OutputStyle' => $vendorDir . '/symfony/console/Style/OutputStyle.php', - 'Symfony\\Component\\Console\\Style\\StyleInterface' => $vendorDir . '/symfony/console/Style/StyleInterface.php', - 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => $vendorDir . '/symfony/console/Style/SymfonyStyle.php', - 'Symfony\\Component\\Console\\Terminal' => $vendorDir . '/symfony/console/Terminal.php', - 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Tester/ApplicationTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => $vendorDir . '/symfony/console/Tester/CommandCompletionTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Tester/CommandTester.php', - 'Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => $vendorDir . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php', - 'Symfony\\Component\\Console\\Tester\\TesterTrait' => $vendorDir . '/symfony/console/Tester/TesterTrait.php', - 'Symfony\\Component\\DependencyInjection\\Alias' => $vendorDir . '/symfony/dependency-injection/Alias.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\AbstractArgument' => $vendorDir . '/symfony/dependency-injection/Argument/AbstractArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ArgumentInterface' => $vendorDir . '/symfony/dependency-injection/Argument/ArgumentInterface.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\BoundArgument' => $vendorDir . '/symfony/dependency-injection/Argument/BoundArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\IteratorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/IteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ReferenceSetArgumentTrait' => $vendorDir . '/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\RewindableGenerator' => $vendorDir . '/symfony/dependency-injection/Argument/RewindableGenerator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceClosureArgument' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceClosureArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocatorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/ServiceLocatorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\TaggedIteratorArgument' => $vendorDir . '/symfony/dependency-injection/Argument/TaggedIteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AsTaggedItem' => $vendorDir . '/symfony/dependency-injection/Attribute/AsTaggedItem.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure' => $vendorDir . '/symfony/dependency-injection/Attribute/Autoconfigure.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AutoconfigureTag' => $vendorDir . '/symfony/dependency-injection/Attribute/AutoconfigureTag.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator' => $vendorDir . '/symfony/dependency-injection/Attribute/TaggedIterator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator' => $vendorDir . '/symfony/dependency-injection/Attribute/TaggedLocator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Target' => $vendorDir . '/symfony/dependency-injection/Attribute/Target.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\When' => $vendorDir . '/symfony/dependency-injection/Attribute/When.php', - 'Symfony\\Component\\DependencyInjection\\ChildDefinition' => $vendorDir . '/symfony/dependency-injection/ChildDefinition.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AbstractRecursivePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AliasDeprecatedPublicServicesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AnalyzeServiceReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AttributeAutoconfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutoAliasServicePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutoAliasServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowirePass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowirePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredMethodsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredPropertiesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckArgumentsValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckCircularReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckDefinitionValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckReferenceValidityPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckTypeDeclarationsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\Compiler' => $vendorDir . '/symfony/dependency-injection/Compiler/Compiler.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' => $vendorDir . '/symfony/dependency-injection/Compiler/CompilerPassInterface.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DecoratorServicePass' => $vendorDir . '/symfony/dependency-injection/Compiler/DecoratorServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DefinitionErrorExceptionPass' => $vendorDir . '/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ExtensionCompilerPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => $vendorDir . '/symfony/dependency-injection/Compiler/PassConfig.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => $vendorDir . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterAutoconfigureAttributesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterEnvVarProcessorsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterReverseContainerPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterServiceSubscribersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveAbstractDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemovePrivateAliasesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveUnusedDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ReplaceAliasByActualDefinitionPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveBindingsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveBindingsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveChildDefinitionsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveClassPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveDecoratorStackPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveEnvPlaceholdersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveFactoryClassPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveHotPathPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveHotPathPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInstanceofConditionalsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInvalidReferencesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNamedArgumentsPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNoPreloadPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveParameterPlaceHoldersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolvePrivatesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveReferencesToAliasesPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveServiceSubscribersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveTaggedIteratorArgumentPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceLocatorTagPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraph' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphEdge' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphNode' => $vendorDir . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ValidateEnvPlaceholdersPass' => $vendorDir . '/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource' => $vendorDir . '/symfony/dependency-injection/Config/ContainerParametersResource.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResourceChecker' => $vendorDir . '/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php', - 'Symfony\\Component\\DependencyInjection\\Container' => $vendorDir . '/symfony/dependency-injection/Container.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface' => $vendorDir . '/symfony/dependency-injection/ContainerAwareInterface.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareTrait' => $vendorDir . '/symfony/dependency-injection/ContainerAwareTrait.php', - 'Symfony\\Component\\DependencyInjection\\ContainerBuilder' => $vendorDir . '/symfony/dependency-injection/ContainerBuilder.php', - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => $vendorDir . '/symfony/dependency-injection/ContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\Definition' => $vendorDir . '/symfony/dependency-injection/Definition.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Dumper' => $vendorDir . '/symfony/dependency-injection/Dumper/Dumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\DumperInterface' => $vendorDir . '/symfony/dependency-injection/Dumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\GraphvizDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/GraphvizDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\PhpDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/PhpDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Preloader' => $vendorDir . '/symfony/dependency-injection/Dumper/Preloader.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\XmlDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/XmlDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\YamlDumper' => $vendorDir . '/symfony/dependency-injection/Dumper/YamlDumper.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarLoaderInterface' => $vendorDir . '/symfony/dependency-injection/EnvVarLoaderInterface.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessor' => $vendorDir . '/symfony/dependency-injection/EnvVarProcessor.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface' => $vendorDir . '/symfony/dependency-injection/EnvVarProcessorInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException' => $vendorDir . '/symfony/dependency-injection/Exception/AutowiringFailedException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/dependency-injection/Exception/BadMethodCallException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/EnvNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException' => $vendorDir . '/symfony/dependency-injection/Exception/EnvParameterException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/dependency-injection/Exception/ExceptionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/dependency-injection/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidParameterTypeException' => $vendorDir . '/symfony/dependency-injection/Exception/InvalidParameterTypeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\LogicException' => $vendorDir . '/symfony/dependency-injection/Exception/LogicException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/dependency-injection/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException' => $vendorDir . '/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/ParameterNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException' => $vendorDir . '/symfony/dependency-injection/Exception/RuntimeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException' => $vendorDir . '/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException' => $vendorDir . '/symfony/dependency-injection/Exception/ServiceNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguage' => $vendorDir . '/symfony/dependency-injection/ExpressionLanguage.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguageProvider' => $vendorDir . '/symfony/dependency-injection/ExpressionLanguageProvider.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ConfigurationExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\Extension' => $vendorDir . '/symfony/dependency-injection/Extension/Extension.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/ExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface' => $vendorDir . '/symfony/dependency-injection/Extension/PrependExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\InstantiatorInterface' => $vendorDir . '/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\RealServiceInstantiator' => $vendorDir . '/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface' => $vendorDir . '/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\NullDumper' => $vendorDir . '/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\ProxyHelper' => $vendorDir . '/symfony/dependency-injection/LazyProxy/ProxyHelper.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\ClosureLoader' => $vendorDir . '/symfony/dependency-injection/Loader/ClosureLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AliasConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ClosureReferenceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\DefaultsConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\EnvConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InlineServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InstanceofConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ParametersConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\PrototypeConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ReferenceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServiceConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServicesConfigurator' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AbstractTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ArgumentTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutoconfigureTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutowireTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\BindTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\CallTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ClassTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ConfiguratorTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DecorateTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DeprecateTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FactoryTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FileTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\LazyTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ParentTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PropertyTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PublicTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ShareTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\SyntheticTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\TagTrait' => $vendorDir . '/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\DirectoryLoader' => $vendorDir . '/symfony/dependency-injection/Loader/DirectoryLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\FileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/FileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/GlobFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/IniFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/PhpFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/XmlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/dependency-injection/Loader/YamlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Parameter' => $vendorDir . '/symfony/dependency-injection/Parameter.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ContainerBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\EnvPlaceholderParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => $vendorDir . '/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\Reference' => $vendorDir . '/symfony/dependency-injection/Reference.php', - 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => $vendorDir . '/symfony/dependency-injection/ReverseContainer.php', - 'Symfony\\Component\\DependencyInjection\\ServiceLocator' => $vendorDir . '/symfony/dependency-injection/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\TaggedContainerInterface' => $vendorDir . '/symfony/dependency-injection/TaggedContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\TypedReference' => $vendorDir . '/symfony/dependency-injection/TypedReference.php', - 'Symfony\\Component\\DependencyInjection\\Variable' => $vendorDir . '/symfony/dependency-injection/Variable.php', - 'Symfony\\Component\\Dotenv\\Command\\DebugCommand' => $vendorDir . '/symfony/dotenv/Command/DebugCommand.php', - 'Symfony\\Component\\Dotenv\\Command\\DotenvDumpCommand' => $vendorDir . '/symfony/dotenv/Command/DotenvDumpCommand.php', - 'Symfony\\Component\\Dotenv\\Dotenv' => $vendorDir . '/symfony/dotenv/Dotenv.php', - 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/dotenv/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatException' => $vendorDir . '/symfony/dotenv/Exception/FormatException.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatExceptionContext' => $vendorDir . '/symfony/dotenv/Exception/FormatExceptionContext.php', - 'Symfony\\Component\\Dotenv\\Exception\\PathException' => $vendorDir . '/symfony/dotenv/Exception/PathException.php', - 'Symfony\\Component\\ErrorHandler\\BufferingLogger' => $vendorDir . '/symfony/error-handler/BufferingLogger.php', - 'Symfony\\Component\\ErrorHandler\\Debug' => $vendorDir . '/symfony/error-handler/Debug.php', - 'Symfony\\Component\\ErrorHandler\\DebugClassLoader' => $vendorDir . '/symfony/error-handler/DebugClassLoader.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ClassNotFoundErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ErrorEnhancerInterface' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedFunctionErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedMethodErrorEnhancer' => $vendorDir . '/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorHandler' => $vendorDir . '/symfony/error-handler/ErrorHandler.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface' => $vendorDir . '/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\SerializerErrorRenderer' => $vendorDir . '/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\Error\\ClassNotFoundError' => $vendorDir . '/symfony/error-handler/Error/ClassNotFoundError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\FatalError' => $vendorDir . '/symfony/error-handler/Error/FatalError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\OutOfMemoryError' => $vendorDir . '/symfony/error-handler/Error/OutOfMemoryError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedFunctionError' => $vendorDir . '/symfony/error-handler/Error/UndefinedFunctionError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError' => $vendorDir . '/symfony/error-handler/Error/UndefinedMethodError.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\FlattenException' => $vendorDir . '/symfony/error-handler/Exception/FlattenException.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext' => $vendorDir . '/symfony/error-handler/Exception/SilencedErrorContext.php', - 'Symfony\\Component\\ErrorHandler\\Internal\\TentativeTypes' => $vendorDir . '/symfony/error-handler/Internal/TentativeTypes.php', - 'Symfony\\Component\\ErrorHandler\\ThrowableUtils' => $vendorDir . '/symfony/error-handler/ThrowableUtils.php', - 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => $vendorDir . '/symfony/event-dispatcher/Attribute/AsEventListener.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/EventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/EventSubscriberInterface.php', - 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/GenericEvent.php', - 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', - 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/filesystem/Exception/FileNotFoundException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOException' => $vendorDir . '/symfony/filesystem/Exception/IOException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/IOExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/filesystem/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Filesystem\\Exception\\RuntimeException' => $vendorDir . '/symfony/filesystem/Exception/RuntimeException.php', - 'Symfony\\Component\\Filesystem\\Filesystem' => $vendorDir . '/symfony/filesystem/Filesystem.php', - 'Symfony\\Component\\Filesystem\\Path' => $vendorDir . '/symfony/filesystem/Path.php', - 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php', - 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php', - 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php', - 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $vendorDir . '/symfony/finder/Exception/DirectoryNotFoundException.php', - 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php', - 'Symfony\\Component\\Finder\\Gitignore' => $vendorDir . '/symfony/finder/Gitignore.php', - 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php', - 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilenameFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => $vendorDir . '/symfony/finder/Iterator/LazyIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Iterator/PathFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $vendorDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', - 'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php', - 'Symfony\\Component\\Form\\AbstractExtension' => $vendorDir . '/symfony/form/AbstractExtension.php', - 'Symfony\\Component\\Form\\AbstractRendererEngine' => $vendorDir . '/symfony/form/AbstractRendererEngine.php', - 'Symfony\\Component\\Form\\AbstractType' => $vendorDir . '/symfony/form/AbstractType.php', - 'Symfony\\Component\\Form\\AbstractTypeExtension' => $vendorDir . '/symfony/form/AbstractTypeExtension.php', - 'Symfony\\Component\\Form\\Button' => $vendorDir . '/symfony/form/Button.php', - 'Symfony\\Component\\Form\\ButtonBuilder' => $vendorDir . '/symfony/form/ButtonBuilder.php', - 'Symfony\\Component\\Form\\ButtonTypeInterface' => $vendorDir . '/symfony/form/ButtonTypeInterface.php', - 'Symfony\\Component\\Form\\CallbackTransformer' => $vendorDir . '/symfony/form/CallbackTransformer.php', - 'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ArrayChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => $vendorDir . '/symfony/form/ChoiceList/ChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => $vendorDir . '/symfony/form/ChoiceList/ChoiceListInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => $vendorDir . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => $vendorDir . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => $vendorDir . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => $vendorDir . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => $vendorDir . '/symfony/form/ChoiceList/LazyChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => $vendorDir . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => $vendorDir . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => $vendorDir . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceGroupView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceListView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => $vendorDir . '/symfony/form/ChoiceList/View/ChoiceView.php', - 'Symfony\\Component\\Form\\ClearableErrorsInterface' => $vendorDir . '/symfony/form/ClearableErrorsInterface.php', - 'Symfony\\Component\\Form\\ClickableInterface' => $vendorDir . '/symfony/form/ClickableInterface.php', - 'Symfony\\Component\\Form\\Command\\DebugCommand' => $vendorDir . '/symfony/form/Command/DebugCommand.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/form/Console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/form/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/form/Console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Form\\DataAccessorInterface' => $vendorDir . '/symfony/form/DataAccessorInterface.php', - 'Symfony\\Component\\Form\\DataMapperInterface' => $vendorDir . '/symfony/form/DataMapperInterface.php', - 'Symfony\\Component\\Form\\DataTransformerInterface' => $vendorDir . '/symfony/form/DataTransformerInterface.php', - 'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => $vendorDir . '/symfony/form/DependencyInjection/FormPass.php', - 'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => $vendorDir . '/symfony/form/Event/PostSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => $vendorDir . '/symfony/form/Event/PostSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => $vendorDir . '/symfony/form/Event/PreSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => $vendorDir . '/symfony/form/Event/PreSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\SubmitEvent' => $vendorDir . '/symfony/form/Event/SubmitEvent.php', - 'Symfony\\Component\\Form\\Exception\\AccessException' => $vendorDir . '/symfony/form/Exception/AccessException.php', - 'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => $vendorDir . '/symfony/form/Exception/AlreadySubmittedException.php', - 'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/form/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => $vendorDir . '/symfony/form/Exception/ErrorMappingException.php', - 'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/form/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/form/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => $vendorDir . '/symfony/form/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Form\\Exception\\LogicException' => $vendorDir . '/symfony/form/Exception/LogicException.php', - 'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/form/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Form\\Exception\\RuntimeException' => $vendorDir . '/symfony/form/Exception/RuntimeException.php', - 'Symfony\\Component\\Form\\Exception\\StringCastException' => $vendorDir . '/symfony/form/Exception/StringCastException.php', - 'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => $vendorDir . '/symfony/form/Exception/TransformationFailedException.php', - 'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/form/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => $vendorDir . '/symfony/form/Extension/Core/CoreExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => $vendorDir . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/DataMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\PropertyPathMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => $vendorDir . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => $vendorDir . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => $vendorDir . '/symfony/form/Extension/Core/EventListener/TrimListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => $vendorDir . '/symfony/form/Extension/Core/Type/BaseType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => $vendorDir . '/symfony/form/Extension/Core/Type/BirthdayType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => $vendorDir . '/symfony/form/Extension/Core/Type/ButtonType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => $vendorDir . '/symfony/form/Extension/Core/Type/CheckboxType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => $vendorDir . '/symfony/form/Extension/Core/Type/ChoiceType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => $vendorDir . '/symfony/form/Extension/Core/Type/CollectionType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => $vendorDir . '/symfony/form/Extension/Core/Type/ColorType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => $vendorDir . '/symfony/form/Extension/Core/Type/CountryType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => $vendorDir . '/symfony/form/Extension/Core/Type/CurrencyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateIntervalType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateTimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => $vendorDir . '/symfony/form/Extension/Core/Type/DateType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => $vendorDir . '/symfony/form/Extension/Core/Type/EmailType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => $vendorDir . '/symfony/form/Extension/Core/Type/EnumType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => $vendorDir . '/symfony/form/Extension/Core/Type/FileType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => $vendorDir . '/symfony/form/Extension/Core/Type/FormType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => $vendorDir . '/symfony/form/Extension/Core/Type/HiddenType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => $vendorDir . '/symfony/form/Extension/Core/Type/IntegerType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => $vendorDir . '/symfony/form/Extension/Core/Type/LanguageType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => $vendorDir . '/symfony/form/Extension/Core/Type/LocaleType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => $vendorDir . '/symfony/form/Extension/Core/Type/MoneyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => $vendorDir . '/symfony/form/Extension/Core/Type/NumberType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => $vendorDir . '/symfony/form/Extension/Core/Type/PasswordType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => $vendorDir . '/symfony/form/Extension/Core/Type/PercentType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => $vendorDir . '/symfony/form/Extension/Core/Type/RadioType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => $vendorDir . '/symfony/form/Extension/Core/Type/RangeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => $vendorDir . '/symfony/form/Extension/Core/Type/RepeatedType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => $vendorDir . '/symfony/form/Extension/Core/Type/ResetType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => $vendorDir . '/symfony/form/Extension/Core/Type/SearchType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => $vendorDir . '/symfony/form/Extension/Core/Type/SubmitType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => $vendorDir . '/symfony/form/Extension/Core/Type/TelType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => $vendorDir . '/symfony/form/Extension/Core/Type/TextareaType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => $vendorDir . '/symfony/form/Extension/Core/Type/TimezoneType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => $vendorDir . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UlidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => $vendorDir . '/symfony/form/Extension/Core/Type/UrlType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => $vendorDir . '/symfony/form/Extension/Core/Type/UuidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => $vendorDir . '/symfony/form/Extension/Core/Type/WeekType.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/CsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => $vendorDir . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => $vendorDir . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => $vendorDir . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollector.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractor.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => $vendorDir . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => $vendorDir . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => $vendorDir . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php', - 'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => $vendorDir . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => $vendorDir . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => $vendorDir . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/Form.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => $vendorDir . '/symfony/form/Extension/Validator/Constraints/FormValidator.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => $vendorDir . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Util\\ServerParams' => $vendorDir . '/symfony/form/Extension/Validator/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => $vendorDir . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => $vendorDir . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php', - 'Symfony\\Component\\Form\\FileUploadError' => $vendorDir . '/symfony/form/FileUploadError.php', - 'Symfony\\Component\\Form\\Form' => $vendorDir . '/symfony/form/Form.php', - 'Symfony\\Component\\Form\\FormBuilder' => $vendorDir . '/symfony/form/FormBuilder.php', - 'Symfony\\Component\\Form\\FormBuilderInterface' => $vendorDir . '/symfony/form/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigBuilder' => $vendorDir . '/symfony/form/FormConfigBuilder.php', - 'Symfony\\Component\\Form\\FormConfigBuilderInterface' => $vendorDir . '/symfony/form/FormConfigBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigInterface' => $vendorDir . '/symfony/form/FormConfigInterface.php', - 'Symfony\\Component\\Form\\FormError' => $vendorDir . '/symfony/form/FormError.php', - 'Symfony\\Component\\Form\\FormErrorIterator' => $vendorDir . '/symfony/form/FormErrorIterator.php', - 'Symfony\\Component\\Form\\FormEvent' => $vendorDir . '/symfony/form/FormEvent.php', - 'Symfony\\Component\\Form\\FormEvents' => $vendorDir . '/symfony/form/FormEvents.php', - 'Symfony\\Component\\Form\\FormExtensionInterface' => $vendorDir . '/symfony/form/FormExtensionInterface.php', - 'Symfony\\Component\\Form\\FormFactory' => $vendorDir . '/symfony/form/FormFactory.php', - 'Symfony\\Component\\Form\\FormFactoryBuilder' => $vendorDir . '/symfony/form/FormFactoryBuilder.php', - 'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => $vendorDir . '/symfony/form/FormFactoryBuilderInterface.php', - 'Symfony\\Component\\Form\\FormFactoryInterface' => $vendorDir . '/symfony/form/FormFactoryInterface.php', - 'Symfony\\Component\\Form\\FormInterface' => $vendorDir . '/symfony/form/FormInterface.php', - 'Symfony\\Component\\Form\\FormRegistry' => $vendorDir . '/symfony/form/FormRegistry.php', - 'Symfony\\Component\\Form\\FormRegistryInterface' => $vendorDir . '/symfony/form/FormRegistryInterface.php', - 'Symfony\\Component\\Form\\FormRenderer' => $vendorDir . '/symfony/form/FormRenderer.php', - 'Symfony\\Component\\Form\\FormRendererEngineInterface' => $vendorDir . '/symfony/form/FormRendererEngineInterface.php', - 'Symfony\\Component\\Form\\FormRendererInterface' => $vendorDir . '/symfony/form/FormRendererInterface.php', - 'Symfony\\Component\\Form\\FormTypeExtensionInterface' => $vendorDir . '/symfony/form/FormTypeExtensionInterface.php', - 'Symfony\\Component\\Form\\FormTypeGuesserChain' => $vendorDir . '/symfony/form/FormTypeGuesserChain.php', - 'Symfony\\Component\\Form\\FormTypeGuesserInterface' => $vendorDir . '/symfony/form/FormTypeGuesserInterface.php', - 'Symfony\\Component\\Form\\FormTypeInterface' => $vendorDir . '/symfony/form/FormTypeInterface.php', - 'Symfony\\Component\\Form\\FormView' => $vendorDir . '/symfony/form/FormView.php', - 'Symfony\\Component\\Form\\Forms' => $vendorDir . '/symfony/form/Forms.php', - 'Symfony\\Component\\Form\\Guess\\Guess' => $vendorDir . '/symfony/form/Guess/Guess.php', - 'Symfony\\Component\\Form\\Guess\\TypeGuess' => $vendorDir . '/symfony/form/Guess/TypeGuess.php', - 'Symfony\\Component\\Form\\Guess\\ValueGuess' => $vendorDir . '/symfony/form/Guess/ValueGuess.php', - 'Symfony\\Component\\Form\\NativeRequestHandler' => $vendorDir . '/symfony/form/NativeRequestHandler.php', - 'Symfony\\Component\\Form\\PreloadedExtension' => $vendorDir . '/symfony/form/PreloadedExtension.php', - 'Symfony\\Component\\Form\\RequestHandlerInterface' => $vendorDir . '/symfony/form/RequestHandlerInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormType' => $vendorDir . '/symfony/form/ResolvedFormType.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => $vendorDir . '/symfony/form/ResolvedFormTypeFactory.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeFactoryInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => $vendorDir . '/symfony/form/ResolvedFormTypeInterface.php', - 'Symfony\\Component\\Form\\ReversedTransformer' => $vendorDir . '/symfony/form/ReversedTransformer.php', - 'Symfony\\Component\\Form\\SubmitButton' => $vendorDir . '/symfony/form/SubmitButton.php', - 'Symfony\\Component\\Form\\SubmitButtonBuilder' => $vendorDir . '/symfony/form/SubmitButtonBuilder.php', - 'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => $vendorDir . '/symfony/form/SubmitButtonTypeInterface.php', - 'Symfony\\Component\\Form\\Test\\FormBuilderInterface' => $vendorDir . '/symfony/form/Test/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\Test\\FormIntegrationTestCase' => $vendorDir . '/symfony/form/Test/FormIntegrationTestCase.php', - 'Symfony\\Component\\Form\\Test\\FormInterface' => $vendorDir . '/symfony/form/Test/FormInterface.php', - 'Symfony\\Component\\Form\\Test\\FormPerformanceTestCase' => $vendorDir . '/symfony/form/Test/FormPerformanceTestCase.php', - 'Symfony\\Component\\Form\\Test\\Traits\\ValidatorExtensionTrait' => $vendorDir . '/symfony/form/Test/Traits/ValidatorExtensionTrait.php', - 'Symfony\\Component\\Form\\Test\\TypeTestCase' => $vendorDir . '/symfony/form/Test/TypeTestCase.php', - 'Symfony\\Component\\Form\\Util\\FormUtil' => $vendorDir . '/symfony/form/Util/FormUtil.php', - 'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => $vendorDir . '/symfony/form/Util/InheritDataAwareIterator.php', - 'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => $vendorDir . '/symfony/form/Util/OptionsResolverWrapper.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMap' => $vendorDir . '/symfony/form/Util/OrderedHashMap.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => $vendorDir . '/symfony/form/Util/OrderedHashMapIterator.php', - 'Symfony\\Component\\Form\\Util\\ServerParams' => $vendorDir . '/symfony/form/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Util\\StringUtil' => $vendorDir . '/symfony/form/Util/StringUtil.php', - 'Symfony\\Component\\HttpClient\\AmpHttpClient' => $vendorDir . '/symfony/http-client/AmpHttpClient.php', - 'Symfony\\Component\\HttpClient\\AsyncDecoratorTrait' => $vendorDir . '/symfony/http-client/AsyncDecoratorTrait.php', - 'Symfony\\Component\\HttpClient\\CachingHttpClient' => $vendorDir . '/symfony/http-client/CachingHttpClient.php', - 'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' => $vendorDir . '/symfony/http-client/Chunk/DataChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\ErrorChunk' => $vendorDir . '/symfony/http-client/Chunk/ErrorChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\FirstChunk' => $vendorDir . '/symfony/http-client/Chunk/FirstChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\InformationalChunk' => $vendorDir . '/symfony/http-client/Chunk/InformationalChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\LastChunk' => $vendorDir . '/symfony/http-client/Chunk/LastChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\ServerSentEvent' => $vendorDir . '/symfony/http-client/Chunk/ServerSentEvent.php', - 'Symfony\\Component\\HttpClient\\CurlHttpClient' => $vendorDir . '/symfony/http-client/CurlHttpClient.php', - 'Symfony\\Component\\HttpClient\\DataCollector\\HttpClientDataCollector' => $vendorDir . '/symfony/http-client/DataCollector/HttpClientDataCollector.php', - 'Symfony\\Component\\HttpClient\\DecoratorTrait' => $vendorDir . '/symfony/http-client/DecoratorTrait.php', - 'Symfony\\Component\\HttpClient\\DependencyInjection\\HttpClientPass' => $vendorDir . '/symfony/http-client/DependencyInjection/HttpClientPass.php', - 'Symfony\\Component\\HttpClient\\EventSourceHttpClient' => $vendorDir . '/symfony/http-client/EventSourceHttpClient.php', - 'Symfony\\Component\\HttpClient\\Exception\\ClientException' => $vendorDir . '/symfony/http-client/Exception/ClientException.php', - 'Symfony\\Component\\HttpClient\\Exception\\EventSourceException' => $vendorDir . '/symfony/http-client/Exception/EventSourceException.php', - 'Symfony\\Component\\HttpClient\\Exception\\HttpExceptionTrait' => $vendorDir . '/symfony/http-client/Exception/HttpExceptionTrait.php', - 'Symfony\\Component\\HttpClient\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/http-client/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\HttpClient\\Exception\\JsonException' => $vendorDir . '/symfony/http-client/Exception/JsonException.php', - 'Symfony\\Component\\HttpClient\\Exception\\RedirectionException' => $vendorDir . '/symfony/http-client/Exception/RedirectionException.php', - 'Symfony\\Component\\HttpClient\\Exception\\ServerException' => $vendorDir . '/symfony/http-client/Exception/ServerException.php', - 'Symfony\\Component\\HttpClient\\Exception\\TimeoutException' => $vendorDir . '/symfony/http-client/Exception/TimeoutException.php', - 'Symfony\\Component\\HttpClient\\Exception\\TransportException' => $vendorDir . '/symfony/http-client/Exception/TransportException.php', - 'Symfony\\Component\\HttpClient\\HttpClient' => $vendorDir . '/symfony/http-client/HttpClient.php', - 'Symfony\\Component\\HttpClient\\HttpClientTrait' => $vendorDir . '/symfony/http-client/HttpClientTrait.php', - 'Symfony\\Component\\HttpClient\\HttpOptions' => $vendorDir . '/symfony/http-client/HttpOptions.php', - 'Symfony\\Component\\HttpClient\\HttplugClient' => $vendorDir . '/symfony/http-client/HttplugClient.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpBody' => $vendorDir . '/symfony/http-client/Internal/AmpBody.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpClientState' => $vendorDir . '/symfony/http-client/Internal/AmpClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpListener' => $vendorDir . '/symfony/http-client/Internal/AmpListener.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpResolver' => $vendorDir . '/symfony/http-client/Internal/AmpResolver.php', - 'Symfony\\Component\\HttpClient\\Internal\\Canary' => $vendorDir . '/symfony/http-client/Internal/Canary.php', - 'Symfony\\Component\\HttpClient\\Internal\\ClientState' => $vendorDir . '/symfony/http-client/Internal/ClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\CurlClientState' => $vendorDir . '/symfony/http-client/Internal/CurlClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\DnsCache' => $vendorDir . '/symfony/http-client/Internal/DnsCache.php', - 'Symfony\\Component\\HttpClient\\Internal\\HttplugWaitLoop' => $vendorDir . '/symfony/http-client/Internal/HttplugWaitLoop.php', - 'Symfony\\Component\\HttpClient\\Internal\\NativeClientState' => $vendorDir . '/symfony/http-client/Internal/NativeClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\PushedResponse' => $vendorDir . '/symfony/http-client/Internal/PushedResponse.php', - 'Symfony\\Component\\HttpClient\\MockHttpClient' => $vendorDir . '/symfony/http-client/MockHttpClient.php', - 'Symfony\\Component\\HttpClient\\NativeHttpClient' => $vendorDir . '/symfony/http-client/NativeHttpClient.php', - 'Symfony\\Component\\HttpClient\\NoPrivateNetworkHttpClient' => $vendorDir . '/symfony/http-client/NoPrivateNetworkHttpClient.php', - 'Symfony\\Component\\HttpClient\\Psr18Client' => $vendorDir . '/symfony/http-client/Psr18Client.php', - 'Symfony\\Component\\HttpClient\\Response\\AmpResponse' => $vendorDir . '/symfony/http-client/Response/AmpResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\AsyncContext' => $vendorDir . '/symfony/http-client/Response/AsyncContext.php', - 'Symfony\\Component\\HttpClient\\Response\\AsyncResponse' => $vendorDir . '/symfony/http-client/Response/AsyncResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\CommonResponseTrait' => $vendorDir . '/symfony/http-client/Response/CommonResponseTrait.php', - 'Symfony\\Component\\HttpClient\\Response\\CurlResponse' => $vendorDir . '/symfony/http-client/Response/CurlResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\HttplugPromise' => $vendorDir . '/symfony/http-client/Response/HttplugPromise.php', - 'Symfony\\Component\\HttpClient\\Response\\MockResponse' => $vendorDir . '/symfony/http-client/Response/MockResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\NativeResponse' => $vendorDir . '/symfony/http-client/Response/NativeResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\ResponseStream' => $vendorDir . '/symfony/http-client/Response/ResponseStream.php', - 'Symfony\\Component\\HttpClient\\Response\\StreamWrapper' => $vendorDir . '/symfony/http-client/Response/StreamWrapper.php', - 'Symfony\\Component\\HttpClient\\Response\\StreamableInterface' => $vendorDir . '/symfony/http-client/Response/StreamableInterface.php', - 'Symfony\\Component\\HttpClient\\Response\\TraceableResponse' => $vendorDir . '/symfony/http-client/Response/TraceableResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\TransportResponseTrait' => $vendorDir . '/symfony/http-client/Response/TransportResponseTrait.php', - 'Symfony\\Component\\HttpClient\\Retry\\GenericRetryStrategy' => $vendorDir . '/symfony/http-client/Retry/GenericRetryStrategy.php', - 'Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface' => $vendorDir . '/symfony/http-client/Retry/RetryStrategyInterface.php', - 'Symfony\\Component\\HttpClient\\RetryableHttpClient' => $vendorDir . '/symfony/http-client/RetryableHttpClient.php', - 'Symfony\\Component\\HttpClient\\ScopingHttpClient' => $vendorDir . '/symfony/http-client/ScopingHttpClient.php', - 'Symfony\\Component\\HttpClient\\TraceableHttpClient' => $vendorDir . '/symfony/http-client/TraceableHttpClient.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/AcceptHeader.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php', - 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php', - 'Symfony\\Component\\HttpFoundation\\Cookie' => $vendorDir . '/symfony/http-foundation/Cookie.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\BadRequestException' => $vendorDir . '/symfony/http-foundation/Exception/BadRequestException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => $vendorDir . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\JsonException' => $vendorDir . '/symfony/http-foundation/Exception/JsonException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => $vendorDir . '/symfony/http-foundation/Exception/RequestExceptionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SessionNotFoundException' => $vendorDir . '/symfony/http-foundation/Exception/SessionNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => $vendorDir . '/symfony/http-foundation/Exception/SuspiciousOperationException.php', - 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => $vendorDir . '/symfony/http-foundation/ExpressionRequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/FileBag.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\CannotWriteFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/CannotWriteFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\ExtensionFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/ExtensionFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FormSizeFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FormSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\IniSizeFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/IniSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/NoFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoTmpDirFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/NoTmpDirFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\PartialFileException' => $vendorDir . '/symfony/http-foundation/File/Exception/PartialFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => $vendorDir . '/symfony/http-foundation/File/Exception/UploadException.php', - 'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/File/File.php', - 'Symfony\\Component\\HttpFoundation\\File\\Stream' => $vendorDir . '/symfony/http-foundation/File/Stream.php', - 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/File/UploadedFile.php', - 'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/HeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\HeaderUtils' => $vendorDir . '/symfony/http-foundation/HeaderUtils.php', - 'Symfony\\Component\\HttpFoundation\\InputBag' => $vendorDir . '/symfony/http-foundation/InputBag.php', - 'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/IpUtils.php', - 'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/JsonResponse.php', - 'Symfony\\Component\\HttpFoundation\\ParameterBag' => $vendorDir . '/symfony/http-foundation/ParameterBag.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\AbstractRequestRateLimiter' => $vendorDir . '/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\RequestRateLimiterInterface' => $vendorDir . '/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php', - 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/RedirectResponse.php', - 'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Request.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/RequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/RequestMatcherInterface.php', - 'Symfony\\Component\\HttpFoundation\\RequestStack' => $vendorDir . '/symfony/http-foundation/RequestStack.php', - 'Symfony\\Component\\HttpFoundation\\Response' => $vendorDir . '/symfony/http-foundation/Response.php', - 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $vendorDir . '/symfony/http-foundation/ResponseHeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/ServerBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Session' => $vendorDir . '/symfony/http-foundation/Session/Session.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => $vendorDir . '/symfony/http-foundation/Session/SessionBagProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactory' => $vendorDir . '/symfony/http-foundation/Session/SessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactoryInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => $vendorDir . '/symfony/http-foundation/Session/SessionUtils.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\IdentityMarshaller' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MarshallingSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MigratingSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\RedisSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\SessionHandlerFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => $vendorDir . '/symfony/http-foundation/Session/Storage/MetadataBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorageFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\ServiceSessionFactory' => $vendorDir . '/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', - 'Symfony\\Component\\HttpFoundation\\UrlHelper' => $vendorDir . '/symfony/http-foundation/UrlHelper.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => $vendorDir . '/symfony/http-kernel/Attribute/ArgumentInterface.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => $vendorDir . '/symfony/http-kernel/Attribute/AsController.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Bundle/Bundle.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Bundle/BundleInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', - 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => $vendorDir . '/symfony/http-kernel/Config/FileLocator.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\TraceableValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ContainerControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/ContainerControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => $vendorDir . '/symfony/http-kernel/Controller/ControllerReference.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ErrorController' => $vendorDir . '/symfony/http-kernel/Controller/ErrorController.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/EventDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', - 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => $vendorDir . '/symfony/http-kernel/Debug/FileLinkFormatter.php', - 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddAnnotatedClassesToCachePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ControllerArgumentValueResolverPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/Extension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/AbstractSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => $vendorDir . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => $vendorDir . '/symfony/http-kernel/EventListener/DumpListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener' => $vendorDir . '/symfony/http-kernel/EventListener/ErrorListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => $vendorDir . '/symfony/http-kernel/EventListener/FragmentListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => $vendorDir . '/symfony/http-kernel/EventListener/ProfilerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/ResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => $vendorDir . '/symfony/http-kernel/EventListener/RouterListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/SessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => $vendorDir . '/symfony/http-kernel/EventListener/SurrogateListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/TestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => $vendorDir . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/ExceptionEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => $vendorDir . '/symfony/http-kernel/Event/FinishRequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Event/KernelEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => $vendorDir . '/symfony/http-kernel/Event/RequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/ResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => $vendorDir . '/symfony/http-kernel/Event/TerminateEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => $vendorDir . '/symfony/http-kernel/Event/ViewEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ControllerDoesNotReturnResponseException' => $vendorDir . '/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Exception/GoneHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $vendorDir . '/symfony/http-kernel/Exception/HttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', - 'Symfony\\Component\\HttpKernel\\Exception\\InvalidMetadataException' => $vendorDir . '/symfony/http-kernel/Exception/InvalidMetadataException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotFoundHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException' => $vendorDir . '/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGenerator' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentUriGenerator.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => $vendorDir . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => $vendorDir . '/symfony/http-kernel/HttpCache/Esi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => $vendorDir . '/symfony/http-kernel/HttpCache/HttpCache.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => $vendorDir . '/symfony/http-kernel/HttpCache/Ssi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/HttpCache/Store.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/StoreInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => $vendorDir . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => $vendorDir . '/symfony/http-kernel/HttpClientKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => $vendorDir . '/symfony/http-kernel/HttpKernelBrowser.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Kernel' => $vendorDir . '/symfony/http-kernel/Kernel.php', - 'Symfony\\Component\\HttpKernel\\KernelEvents' => $vendorDir . '/symfony/http-kernel/KernelEvents.php', - 'Symfony\\Component\\HttpKernel\\KernelInterface' => $vendorDir . '/symfony/http-kernel/KernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => $vendorDir . '/symfony/http-kernel/Log/DebugLoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\Logger' => $vendorDir . '/symfony/http-kernel/Log/Logger.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => $vendorDir . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => $vendorDir . '/symfony/http-kernel/Profiler/Profile.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => $vendorDir . '/symfony/http-kernel/Profiler/Profiler.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => $vendorDir . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', - 'Symfony\\Component\\HttpKernel\\RebootableInterface' => $vendorDir . '/symfony/http-kernel/RebootableInterface.php', - 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php', - 'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/UriSigner.php', - 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => $vendorDir . '/symfony/options-resolver/OptionConfigurator.php', - 'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php', - 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php', - 'Symfony\\Component\\PasswordHasher\\Command\\UserPasswordHashCommand' => $vendorDir . '/symfony/password-hasher/Command/UserPasswordHashCommand.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/password-hasher/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\InvalidPasswordException' => $vendorDir . '/symfony/password-hasher/Exception/InvalidPasswordException.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\LogicException' => $vendorDir . '/symfony/password-hasher/Exception/LogicException.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\CheckPasswordLengthTrait' => $vendorDir . '/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\MessageDigestPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\MigratingPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/MigratingPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\NativePasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/NativePasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherAwareInterface' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactory' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherFactory.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactoryInterface' => $vendorDir . '/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\Pbkdf2PasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PlaintextPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\SodiumPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/SodiumPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasher' => $vendorDir . '/symfony/password-hasher/Hasher/UserPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php', - 'Symfony\\Component\\PasswordHasher\\LegacyPasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/LegacyPasswordHasherInterface.php', - 'Symfony\\Component\\PasswordHasher\\PasswordHasherInterface' => $vendorDir . '/symfony/password-hasher/PasswordHasherInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => $vendorDir . '/symfony/property-access/Exception/AccessException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/property-access/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/property-access/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => $vendorDir . '/symfony/property-access/Exception/InvalidPropertyPathException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => $vendorDir . '/symfony/property-access/Exception/NoSuchIndexException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => $vendorDir . '/symfony/property-access/Exception/NoSuchPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/property-access/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => $vendorDir . '/symfony/property-access/Exception/RuntimeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/property-access/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => $vendorDir . '/symfony/property-access/Exception/UninitializedPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccess' => $vendorDir . '/symfony/property-access/PropertyAccess.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => $vendorDir . '/symfony/property-access/PropertyAccessor.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => $vendorDir . '/symfony/property-access/PropertyAccessorBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => $vendorDir . '/symfony/property-access/PropertyAccessorInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPath' => $vendorDir . '/symfony/property-access/PropertyPath.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => $vendorDir . '/symfony/property-access/PropertyPathBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => $vendorDir . '/symfony/property-access/PropertyPathInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => $vendorDir . '/symfony/property-access/PropertyPathIterator.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => $vendorDir . '/symfony/property-access/PropertyPathIteratorInterface.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => $vendorDir . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => $vendorDir . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => $vendorDir . '/symfony/property-info/Extractor/ConstructorExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpDocExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => $vendorDir . '/symfony/property-info/Extractor/PhpStanExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => $vendorDir . '/symfony/property-info/Extractor/ReflectionExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => $vendorDir . '/symfony/property-info/Extractor/SerializerExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => $vendorDir . '/symfony/property-info/PhpStan/NameScope.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => $vendorDir . '/symfony/property-info/PhpStan/NameScopeFactory.php', - 'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyAccessExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyDescriptionExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoCacheExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => $vendorDir . '/symfony/property-info/PropertyInfoExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyInitializableExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyListExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => $vendorDir . '/symfony/property-info/PropertyReadInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyReadInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => $vendorDir . '/symfony/property-info/PropertyWriteInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => $vendorDir . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Type' => $vendorDir . '/symfony/property-info/Type.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpDocTypeHelper.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => $vendorDir . '/symfony/property-info/Util/PhpStanTypeHelper.php', - 'Symfony\\Component\\Routing\\Alias' => $vendorDir . '/symfony/routing/Alias.php', - 'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Annotation/Route.php', - 'Symfony\\Component\\Routing\\CompiledRoute' => $vendorDir . '/symfony/routing/CompiledRoute.php', - 'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => $vendorDir . '/symfony/routing/DependencyInjection/RoutingResolverPass.php', - 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/routing/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/routing/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => $vendorDir . '/symfony/routing/Exception/InvalidParameterException.php', - 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => $vendorDir . '/symfony/routing/Exception/MethodNotAllowedException.php', - 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => $vendorDir . '/symfony/routing/Exception/MissingMandatoryParametersException.php', - 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/routing/Exception/NoConfigurationException.php', - 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => $vendorDir . '/symfony/routing/Exception/ResourceNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteCircularReferenceException' => $vendorDir . '/symfony/routing/Exception/RouteCircularReferenceException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => $vendorDir . '/symfony/routing/Exception/RouteNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RuntimeException' => $vendorDir . '/symfony/routing/Exception/RuntimeException.php', - 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => $vendorDir . '/symfony/routing/Generator/CompiledUrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => $vendorDir . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => $vendorDir . '/symfony/routing/Generator/UrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => $vendorDir . '/symfony/routing/Generator/UrlGeneratorInterface.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationClassLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => $vendorDir . '/symfony/routing/Loader/ClosureLoader.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\AliasConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\CollectionConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/CollectionConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\ImportConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/ImportConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RouteConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/RouteConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator' => $vendorDir . '/symfony/routing/Loader/Configurator/RoutingConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\AddTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/AddTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\HostTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/HostTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\LocalizedRouteTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\PrefixTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\RouteTrait' => $vendorDir . '/symfony/routing/Loader/Configurator/Traits/RouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\ContainerLoader' => $vendorDir . '/symfony/routing/Loader/ContainerLoader.php', - 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => $vendorDir . '/symfony/routing/Loader/DirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => $vendorDir . '/symfony/routing/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ObjectLoader' => $vendorDir . '/symfony/routing/Loader/ObjectLoader.php', - 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/CompiledUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\ExpressionLanguageProvider' => $vendorDir . '/symfony/routing/Matcher/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RequestMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/TraceableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => $vendorDir . '/symfony/routing/Matcher/UrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/UrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\RequestContext' => $vendorDir . '/symfony/routing/RequestContext.php', - 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => $vendorDir . '/symfony/routing/RequestContextAwareInterface.php', - 'Symfony\\Component\\Routing\\Route' => $vendorDir . '/symfony/routing/Route.php', - 'Symfony\\Component\\Routing\\RouteCollection' => $vendorDir . '/symfony/routing/RouteCollection.php', - 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => $vendorDir . '/symfony/routing/RouteCollectionBuilder.php', - 'Symfony\\Component\\Routing\\RouteCompiler' => $vendorDir . '/symfony/routing/RouteCompiler.php', - 'Symfony\\Component\\Routing\\RouteCompilerInterface' => $vendorDir . '/symfony/routing/RouteCompilerInterface.php', - 'Symfony\\Component\\Routing\\Router' => $vendorDir . '/symfony/routing/Router.php', - 'Symfony\\Component\\Routing\\RouterInterface' => $vendorDir . '/symfony/routing/RouterInterface.php', - 'Symfony\\Component\\Runtime\\GenericRuntime' => $vendorDir . '/symfony/runtime/GenericRuntime.php', - 'Symfony\\Component\\Runtime\\Internal\\BasicErrorHandler' => $vendorDir . '/symfony/runtime/Internal/BasicErrorHandler.php', - 'Symfony\\Component\\Runtime\\Internal\\ComposerPlugin' => $vendorDir . '/symfony/runtime/Internal/ComposerPlugin.php', - 'Symfony\\Component\\Runtime\\Internal\\MissingDotenv' => $vendorDir . '/symfony/runtime/Internal/MissingDotenv.php', - 'Symfony\\Component\\Runtime\\Internal\\SymfonyErrorHandler' => $vendorDir . '/symfony/runtime/Internal/SymfonyErrorHandler.php', - 'Symfony\\Component\\Runtime\\ResolverInterface' => $vendorDir . '/symfony/runtime/ResolverInterface.php', - 'Symfony\\Component\\Runtime\\Resolver\\ClosureResolver' => $vendorDir . '/symfony/runtime/Resolver/ClosureResolver.php', - 'Symfony\\Component\\Runtime\\Resolver\\DebugClosureResolver' => $vendorDir . '/symfony/runtime/Resolver/DebugClosureResolver.php', - 'Symfony\\Component\\Runtime\\RunnerInterface' => $vendorDir . '/symfony/runtime/RunnerInterface.php', - 'Symfony\\Component\\Runtime\\Runner\\ClosureRunner' => $vendorDir . '/symfony/runtime/Runner/ClosureRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\ConsoleApplicationRunner' => $vendorDir . '/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner' => $vendorDir . '/symfony/runtime/Runner/Symfony/HttpKernelRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\ResponseRunner' => $vendorDir . '/symfony/runtime/Runner/Symfony/ResponseRunner.php', - 'Symfony\\Component\\Runtime\\RuntimeInterface' => $vendorDir . '/symfony/runtime/RuntimeInterface.php', - 'Symfony\\Component\\Runtime\\SymfonyRuntime' => $vendorDir . '/symfony/runtime/SymfonyRuntime.php', - 'Symfony\\Component\\Security\\Core\\AuthenticationEvents' => $vendorDir . '/symfony/security-core/AuthenticationEvents.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationManagerInterface' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationManagerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationProviderManager.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationTrustResolver.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface' => $vendorDir . '/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/AnonymousAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AuthenticationProviderInterface' => $vendorDir . '/symfony/security-core/Authentication/Provider/AuthenticationProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/DaoAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\LdapBindAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/LdapBindAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\PreAuthenticatedAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\RememberMeAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/RememberMeAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\UserAuthenticationProvider' => $vendorDir . '/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\CacheTokenVerifier' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\InMemoryTokenProvider' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentToken' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/PersistentToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentTokenInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenProviderInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenVerifierInterface' => $vendorDir . '/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken' => $vendorDir . '/symfony/security-core/Authentication/Token/AbstractToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken' => $vendorDir . '/symfony/security-core/Authentication/Token/AnonymousToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\NullToken' => $vendorDir . '/symfony/security-core/Authentication/Token/NullToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\PreAuthenticatedToken' => $vendorDir . '/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' => $vendorDir . '/symfony/security-core/Authentication/Token/RememberMeToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/TokenStorage.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\UsageTrackingTokenStorage' => $vendorDir . '/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken' => $vendorDir . '/symfony/security-core/Authentication/Token/SwitchUserToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface' => $vendorDir . '/symfony/security-core/Authentication/Token/TokenInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken' => $vendorDir . '/symfony/security-core/Authentication/Token/UsernamePasswordToken.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager' => $vendorDir . '/symfony/security-core/Authorization/AccessDecisionManager.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManagerInterface' => $vendorDir . '/symfony/security-core/Authorization/AccessDecisionManagerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker' => $vendorDir . '/symfony/security-core/Authorization/AuthorizationChecker.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface' => $vendorDir . '/symfony/security-core/Authorization/AuthorizationCheckerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguage' => $vendorDir . '/symfony/security-core/Authorization/ExpressionLanguage.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguageProvider' => $vendorDir . '/symfony/security-core/Authorization/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AccessDecisionStrategyInterface' => $vendorDir . '/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AffirmativeStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\ConsensusStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\PriorityStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/PriorityStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\UnanimousStrategy' => $vendorDir . '/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\TraceableAccessDecisionManager' => $vendorDir . '/symfony/security-core/Authorization/TraceableAccessDecisionManager.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AuthenticatedVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface' => $vendorDir . '/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\ExpressionVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/ExpressionVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleHierarchyVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/RoleVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\TraceableVoter' => $vendorDir . '/symfony/security-core/Authorization/Voter/TraceableVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\Voter' => $vendorDir . '/symfony/security-core/Authorization/Voter/Voter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => $vendorDir . '/symfony/security-core/Authorization/Voter/VoterInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\BasePasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/BasePasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderAwareInterface' => $vendorDir . '/symfony/security-core/Encoder/EncoderAwareInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactory' => $vendorDir . '/symfony/security-core/Encoder/EncoderFactory.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface' => $vendorDir . '/symfony/security-core/Encoder/EncoderFactoryInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\LegacyEncoderTrait' => $vendorDir . '/symfony/security-core/Encoder/LegacyEncoderTrait.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\LegacyPasswordHasherEncoder' => $vendorDir . '/symfony/security-core/Encoder/LegacyPasswordHasherEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/MessageDigestPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\MigratingPasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/MigratingPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\NativePasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/NativePasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface' => $vendorDir . '/symfony/security-core/Encoder/PasswordEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordHasherAdapter' => $vendorDir . '/symfony/security-core/Encoder/PasswordHasherAdapter.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordHasherEncoder' => $vendorDir . '/symfony/security-core/Encoder/PasswordHasherEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\Pbkdf2PasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/Pbkdf2PasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PlaintextPasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/PlaintextPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\SelfSaltingEncoderInterface' => $vendorDir . '/symfony/security-core/Encoder/SelfSaltingEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\SodiumPasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/SodiumPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoder' => $vendorDir . '/symfony/security-core/Encoder/UserPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface' => $vendorDir . '/symfony/security-core/Encoder/UserPasswordEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationEvent' => $vendorDir . '/symfony/security-core/Event/AuthenticationEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationFailureEvent' => $vendorDir . '/symfony/security-core/Event/AuthenticationFailureEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationSuccessEvent' => $vendorDir . '/symfony/security-core/Event/AuthenticationSuccessEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\VoteEvent' => $vendorDir . '/symfony/security-core/Event/VoteEvent.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/security-core/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccountExpiredException' => $vendorDir . '/symfony/security-core/Exception/AccountExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException' => $vendorDir . '/symfony/security-core/Exception/AccountStatusException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationExpiredException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException' => $vendorDir . '/symfony/security-core/Exception/AuthenticationServiceException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException' => $vendorDir . '/symfony/security-core/Exception/BadCredentialsException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CookieTheftException' => $vendorDir . '/symfony/security-core/Exception/CookieTheftException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CredentialsExpiredException' => $vendorDir . '/symfony/security-core/Exception/CredentialsExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAccountStatusException' => $vendorDir . '/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\DisabledException' => $vendorDir . '/symfony/security-core/Exception/DisabledException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/security-core/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InsufficientAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/InsufficientAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/security-core/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException' => $vendorDir . '/symfony/security-core/Exception/InvalidCsrfTokenException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LazyResponseException' => $vendorDir . '/symfony/security-core/Exception/LazyResponseException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LockedException' => $vendorDir . '/symfony/security-core/Exception/LockedException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LogicException' => $vendorDir . '/symfony/security-core/Exception/LogicException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LogoutException' => $vendorDir . '/symfony/security-core/Exception/LogoutException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\ProviderNotFoundException' => $vendorDir . '/symfony/security-core/Exception/ProviderNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\RuntimeException' => $vendorDir . '/symfony/security-core/Exception/RuntimeException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\SessionUnavailableException' => $vendorDir . '/symfony/security-core/Exception/SessionUnavailableException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\TokenNotFoundException' => $vendorDir . '/symfony/security-core/Exception/TokenNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\TooManyLoginAttemptsAuthenticationException' => $vendorDir . '/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UnsupportedUserException' => $vendorDir . '/symfony/security-core/Exception/UnsupportedUserException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException' => $vendorDir . '/symfony/security-core/Exception/UserNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException' => $vendorDir . '/symfony/security-core/Exception/UsernameNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Role\\Role' => $vendorDir . '/symfony/security-core/Role/Role.php', - 'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchy' => $vendorDir . '/symfony/security-core/Role/RoleHierarchy.php', - 'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchyInterface' => $vendorDir . '/symfony/security-core/Role/RoleHierarchyInterface.php', - 'Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole' => $vendorDir . '/symfony/security-core/Role/SwitchUserRole.php', - 'Symfony\\Component\\Security\\Core\\Security' => $vendorDir . '/symfony/security-core/Security.php', - 'Symfony\\Component\\Security\\Core\\Signature\\Exception\\ExpiredSignatureException' => $vendorDir . '/symfony/security-core/Signature/Exception/ExpiredSignatureException.php', - 'Symfony\\Component\\Security\\Core\\Signature\\Exception\\InvalidSignatureException' => $vendorDir . '/symfony/security-core/Signature/Exception/InvalidSignatureException.php', - 'Symfony\\Component\\Security\\Core\\Signature\\ExpiredSignatureStorage' => $vendorDir . '/symfony/security-core/Signature/ExpiredSignatureStorage.php', - 'Symfony\\Component\\Security\\Core\\Signature\\SignatureHasher' => $vendorDir . '/symfony/security-core/Signature/SignatureHasher.php', - 'Symfony\\Component\\Security\\Core\\Test\\AccessDecisionStrategyTestCase' => $vendorDir . '/symfony/security-core/Test/AccessDecisionStrategyTestCase.php', - 'Symfony\\Component\\Security\\Core\\User\\ChainUserProvider' => $vendorDir . '/symfony/security-core/User/ChainUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\EquatableInterface' => $vendorDir . '/symfony/security-core/User/EquatableInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUser' => $vendorDir . '/symfony/security-core/User/InMemoryUser.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUserChecker' => $vendorDir . '/symfony/security-core/User/InMemoryUserChecker.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider' => $vendorDir . '/symfony/security-core/User/InMemoryUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\LegacyPasswordAuthenticatedUserInterface' => $vendorDir . '/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\MissingUserProvider' => $vendorDir . '/symfony/security-core/User/MissingUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\PasswordAuthenticatedUserInterface' => $vendorDir . '/symfony/security-core/User/PasswordAuthenticatedUserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\PasswordUpgraderInterface' => $vendorDir . '/symfony/security-core/User/PasswordUpgraderInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\User' => $vendorDir . '/symfony/security-core/User/User.php', - 'Symfony\\Component\\Security\\Core\\User\\UserChecker' => $vendorDir . '/symfony/security-core/User/UserChecker.php', - 'Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface' => $vendorDir . '/symfony/security-core/User/UserCheckerInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\UserInterface' => $vendorDir . '/symfony/security-core/User/UserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\UserProviderInterface' => $vendorDir . '/symfony/security-core/User/UserProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword' => $vendorDir . '/symfony/security-core/Validator/Constraints/UserPassword.php', - 'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator' => $vendorDir . '/symfony/security-core/Validator/Constraints/UserPasswordValidator.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfToken' => $vendorDir . '/symfony/security-csrf/CsrfToken.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfTokenManager' => $vendorDir . '/symfony/security-csrf/CsrfTokenManager.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface' => $vendorDir . '/symfony/security-csrf/CsrfTokenManagerInterface.php', - 'Symfony\\Component\\Security\\Csrf\\Exception\\TokenNotFoundException' => $vendorDir . '/symfony/security-csrf/Exception/TokenNotFoundException.php', - 'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\TokenGeneratorInterface' => $vendorDir . '/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php', - 'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\UriSafeTokenGenerator' => $vendorDir . '/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\ClearableTokenStorageInterface' => $vendorDir . '/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\NativeSessionTokenStorage' => $vendorDir . '/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\SessionTokenStorage' => $vendorDir . '/symfony/security-csrf/TokenStorage/SessionTokenStorage.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\TokenStorageInterface' => $vendorDir . '/symfony/security-csrf/TokenStorage/TokenStorageInterface.php', - 'Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator' => $vendorDir . '/symfony/security-guard/AbstractGuardAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\AuthenticatorInterface' => $vendorDir . '/symfony/security-guard/AuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Guard\\Authenticator\\AbstractFormLoginAuthenticator' => $vendorDir . '/symfony/security-guard/Authenticator/AbstractFormLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator' => $vendorDir . '/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\Firewall\\GuardAuthenticationListener' => $vendorDir . '/symfony/security-guard/Firewall/GuardAuthenticationListener.php', - 'Symfony\\Component\\Security\\Guard\\GuardAuthenticatorHandler' => $vendorDir . '/symfony/security-guard/GuardAuthenticatorHandler.php', - 'Symfony\\Component\\Security\\Guard\\PasswordAuthenticatedInterface' => $vendorDir . '/symfony/security-guard/PasswordAuthenticatedInterface.php', - 'Symfony\\Component\\Security\\Guard\\Provider\\GuardAuthenticationProvider' => $vendorDir . '/symfony/security-guard/Provider/GuardAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Guard\\Token\\GuardTokenInterface' => $vendorDir . '/symfony/security-guard/Token/GuardTokenInterface.php', - 'Symfony\\Component\\Security\\Guard\\Token\\PostAuthenticationGuardToken' => $vendorDir . '/symfony/security-guard/Token/PostAuthenticationGuardToken.php', - 'Symfony\\Component\\Security\\Guard\\Token\\PreAuthenticationGuardToken' => $vendorDir . '/symfony/security-guard/Token/PreAuthenticationGuardToken.php', - 'Symfony\\Component\\Security\\Http\\AccessMap' => $vendorDir . '/symfony/security-http/AccessMap.php', - 'Symfony\\Component\\Security\\Http\\AccessMapInterface' => $vendorDir . '/symfony/security-http/AccessMapInterface.php', - 'Symfony\\Component\\Security\\Http\\Attribute\\CurrentUser' => $vendorDir . '/symfony/security-http/Attribute/CurrentUser.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationFailureHandlerInterface' => $vendorDir . '/symfony/security-http/Authentication/AuthenticationFailureHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationSuccessHandlerInterface' => $vendorDir . '/symfony/security-http/Authentication/AuthenticationSuccessHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils' => $vendorDir . '/symfony/security-http/Authentication/AuthenticationUtils.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticatorManager' => $vendorDir . '/symfony/security-http/Authentication/AuthenticatorManager.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticatorManagerInterface' => $vendorDir . '/symfony/security-http/Authentication/AuthenticatorManagerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\CustomAuthenticationFailureHandler' => $vendorDir . '/symfony/security-http/Authentication/CustomAuthenticationFailureHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\CustomAuthenticationSuccessHandler' => $vendorDir . '/symfony/security-http/Authentication/CustomAuthenticationSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationFailureHandler' => $vendorDir . '/symfony/security-http/Authentication/DefaultAuthenticationFailureHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationSuccessHandler' => $vendorDir . '/symfony/security-http/Authentication/DefaultAuthenticationSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\NoopAuthenticationManager' => $vendorDir . '/symfony/security-http/Authentication/NoopAuthenticationManager.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\UserAuthenticatorInterface' => $vendorDir . '/symfony/security-http/Authentication/UserAuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/AbstractAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractLoginFormAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/AbstractLoginFormAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractPreAuthenticatedAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/AbstractPreAuthenticatedAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AuthenticatorInterface' => $vendorDir . '/symfony/security-http/Authenticator/AuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticatorManagerListener' => $vendorDir . '/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/FormLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\HttpBasicAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/HttpBasicAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\InteractiveAuthenticatorInterface' => $vendorDir . '/symfony/security-http/Authenticator/InteractiveAuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\JsonLoginAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/JsonLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\LoginLinkAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/LoginLinkAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\BadgeInterface' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/BadgeInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\CsrfTokenBadge' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/CsrfTokenBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\PasswordUpgradeBadge' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/PasswordUpgradeBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\PreAuthenticatedUserBadge' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/PreAuthenticatedUserBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\RememberMeBadge' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/RememberMeBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\UserBadge' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Badge/UserBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\CredentialsInterface' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Credentials/CredentialsInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\CustomCredentials' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Credentials/CustomCredentials.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\PasswordCredentials' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Credentials/PasswordCredentials.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Passport' => $vendorDir . '/symfony/security-http/Authenticator/Passport/Passport.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\PassportInterface' => $vendorDir . '/symfony/security-http/Authenticator/Passport/PassportInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\PassportTrait' => $vendorDir . '/symfony/security-http/Authenticator/Passport/PassportTrait.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\SelfValidatingPassport' => $vendorDir . '/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\UserPassportInterface' => $vendorDir . '/symfony/security-http/Authenticator/Passport/UserPassportInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/RememberMeAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\RemoteUserAuthenticator' => $vendorDir . '/symfony/security-http/Authenticator/RemoteUserAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Token\\PostAuthenticationToken' => $vendorDir . '/symfony/security-http/Authenticator/Token/PostAuthenticationToken.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\X509Authenticator' => $vendorDir . '/symfony/security-http/Authenticator/X509Authenticator.php', - 'Symfony\\Component\\Security\\Http\\Authorization\\AccessDeniedHandlerInterface' => $vendorDir . '/symfony/security-http/Authorization/AccessDeniedHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver' => $vendorDir . '/symfony/security-http/Controller/UserValueResolver.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\AuthenticationEntryPointInterface' => $vendorDir . '/symfony/security-http/EntryPoint/AuthenticationEntryPointInterface.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\BasicAuthenticationEntryPoint' => $vendorDir . '/symfony/security-http/EntryPoint/BasicAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\Exception\\NotAnEntryPointException' => $vendorDir . '/symfony/security-http/EntryPoint/Exception/NotAnEntryPointException.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\FormAuthenticationEntryPoint' => $vendorDir . '/symfony/security-http/EntryPoint/FormAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\RetryAuthenticationEntryPoint' => $vendorDir . '/symfony/security-http/EntryPoint/RetryAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CheckCredentialsListener' => $vendorDir . '/symfony/security-http/EventListener/CheckCredentialsListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CheckRememberMeConditionsListener' => $vendorDir . '/symfony/security-http/EventListener/CheckRememberMeConditionsListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CookieClearingLogoutListener' => $vendorDir . '/symfony/security-http/EventListener/CookieClearingLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CsrfProtectionListener' => $vendorDir . '/symfony/security-http/EventListener/CsrfProtectionListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CsrfTokenClearingLogoutListener' => $vendorDir . '/symfony/security-http/EventListener/CsrfTokenClearingLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\DefaultLogoutListener' => $vendorDir . '/symfony/security-http/EventListener/DefaultLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\LoginThrottlingListener' => $vendorDir . '/symfony/security-http/EventListener/LoginThrottlingListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\PasswordMigratingListener' => $vendorDir . '/symfony/security-http/EventListener/PasswordMigratingListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\RememberMeListener' => $vendorDir . '/symfony/security-http/EventListener/RememberMeListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\RememberMeLogoutListener' => $vendorDir . '/symfony/security-http/EventListener/RememberMeLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\SessionLogoutListener' => $vendorDir . '/symfony/security-http/EventListener/SessionLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\SessionStrategyListener' => $vendorDir . '/symfony/security-http/EventListener/SessionStrategyListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\UserCheckerListener' => $vendorDir . '/symfony/security-http/EventListener/UserCheckerListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\UserProviderListener' => $vendorDir . '/symfony/security-http/EventListener/UserProviderListener.php', - 'Symfony\\Component\\Security\\Http\\Event\\AuthenticationTokenCreatedEvent' => $vendorDir . '/symfony/security-http/Event/AuthenticationTokenCreatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\CheckPassportEvent' => $vendorDir . '/symfony/security-http/Event/CheckPassportEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\DeauthenticatedEvent' => $vendorDir . '/symfony/security-http/Event/DeauthenticatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\InteractiveLoginEvent' => $vendorDir . '/symfony/security-http/Event/InteractiveLoginEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LazyResponseEvent' => $vendorDir . '/symfony/security-http/Event/LazyResponseEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LoginFailureEvent' => $vendorDir . '/symfony/security-http/Event/LoginFailureEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LoginSuccessEvent' => $vendorDir . '/symfony/security-http/Event/LoginSuccessEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LogoutEvent' => $vendorDir . '/symfony/security-http/Event/LogoutEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\SwitchUserEvent' => $vendorDir . '/symfony/security-http/Event/SwitchUserEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\TokenDeauthenticatedEvent' => $vendorDir . '/symfony/security-http/Event/TokenDeauthenticatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Firewall' => $vendorDir . '/symfony/security-http/Firewall.php', - 'Symfony\\Component\\Security\\Http\\FirewallMap' => $vendorDir . '/symfony/security-http/FirewallMap.php', - 'Symfony\\Component\\Security\\Http\\FirewallMapInterface' => $vendorDir . '/symfony/security-http/FirewallMapInterface.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/AbstractAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractListener' => $vendorDir . '/symfony/security-http/Firewall/AbstractListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractPreAuthenticatedListener' => $vendorDir . '/symfony/security-http/Firewall/AbstractPreAuthenticatedListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AccessListener' => $vendorDir . '/symfony/security-http/Firewall/AccessListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AnonymousAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/AnonymousAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AuthenticatorManagerListener' => $vendorDir . '/symfony/security-http/Firewall/AuthenticatorManagerListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\BasicAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/BasicAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ChannelListener' => $vendorDir . '/symfony/security-http/Firewall/ChannelListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ContextListener' => $vendorDir . '/symfony/security-http/Firewall/ContextListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener' => $vendorDir . '/symfony/security-http/Firewall/ExceptionListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\FirewallListenerInterface' => $vendorDir . '/symfony/security-http/Firewall/FirewallListenerInterface.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\LogoutListener' => $vendorDir . '/symfony/security-http/Firewall/LogoutListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\RememberMeListener' => $vendorDir . '/symfony/security-http/Firewall/RememberMeListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\RemoteUserAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/RemoteUserAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\SwitchUserListener' => $vendorDir . '/symfony/security-http/Firewall/SwitchUserListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordFormAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordJsonAuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/UsernamePasswordJsonAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\X509AuthenticationListener' => $vendorDir . '/symfony/security-http/Firewall/X509AuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\HttpUtils' => $vendorDir . '/symfony/security-http/HttpUtils.php', - 'Symfony\\Component\\Security\\Http\\Impersonate\\ImpersonateUrlGenerator' => $vendorDir . '/symfony/security-http/Impersonate/ImpersonateUrlGenerator.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\ExpiredLoginLinkException' => $vendorDir . '/symfony/security-http/LoginLink/Exception/ExpiredLoginLinkException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkAuthenticationException' => $vendorDir . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkException' => $vendorDir . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkExceptionInterface' => $vendorDir . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkExceptionInterface.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkDetails' => $vendorDir . '/symfony/security-http/LoginLink/LoginLinkDetails.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandler' => $vendorDir . '/symfony/security-http/LoginLink/LoginLinkHandler.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandlerInterface' => $vendorDir . '/symfony/security-http/LoginLink/LoginLinkHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkNotification' => $vendorDir . '/symfony/security-http/LoginLink/LoginLinkNotification.php', - 'Symfony\\Component\\Security\\Http\\Logout\\CookieClearingLogoutHandler' => $vendorDir . '/symfony/security-http/Logout/CookieClearingLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\CsrfTokenClearingLogoutHandler' => $vendorDir . '/symfony/security-http/Logout/CsrfTokenClearingLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\DefaultLogoutSuccessHandler' => $vendorDir . '/symfony/security-http/Logout/DefaultLogoutSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutHandlerInterface' => $vendorDir . '/symfony/security-http/Logout/LogoutHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutSuccessHandlerInterface' => $vendorDir . '/symfony/security-http/Logout/LogoutSuccessHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutUrlGenerator' => $vendorDir . '/symfony/security-http/Logout/LogoutUrlGenerator.php', - 'Symfony\\Component\\Security\\Http\\Logout\\SessionLogoutHandler' => $vendorDir . '/symfony/security-http/Logout/SessionLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\ParameterBagUtils' => $vendorDir . '/symfony/security-http/ParameterBagUtils.php', - 'Symfony\\Component\\Security\\Http\\RateLimiter\\DefaultLoginRateLimiter' => $vendorDir . '/symfony/security-http/RateLimiter/DefaultLoginRateLimiter.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\AbstractRememberMeHandler' => $vendorDir . '/symfony/security-http/RememberMe/AbstractRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\AbstractRememberMeServices' => $vendorDir . '/symfony/security-http/RememberMe/AbstractRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\PersistentRememberMeHandler' => $vendorDir . '/symfony/security-http/RememberMe/PersistentRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\PersistentTokenBasedRememberMeServices' => $vendorDir . '/symfony/security-http/RememberMe/PersistentTokenBasedRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeDetails' => $vendorDir . '/symfony/security-http/RememberMe/RememberMeDetails.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeHandlerInterface' => $vendorDir . '/symfony/security-http/RememberMe/RememberMeHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeServicesInterface' => $vendorDir . '/symfony/security-http/RememberMe/RememberMeServicesInterface.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener' => $vendorDir . '/symfony/security-http/RememberMe/ResponseListener.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\SignatureRememberMeHandler' => $vendorDir . '/symfony/security-http/RememberMe/SignatureRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\TokenBasedRememberMeServices' => $vendorDir . '/symfony/security-http/RememberMe/TokenBasedRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\SecurityEvents' => $vendorDir . '/symfony/security-http/SecurityEvents.php', - 'Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategy' => $vendorDir . '/symfony/security-http/Session/SessionAuthenticationStrategy.php', - 'Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategyInterface' => $vendorDir . '/symfony/security-http/Session/SessionAuthenticationStrategyInterface.php', - 'Symfony\\Component\\Security\\Http\\Util\\TargetPathTrait' => $vendorDir . '/symfony/security-http/Util/TargetPathTrait.php', - 'Symfony\\Component\\String\\AbstractString' => $vendorDir . '/symfony/string/AbstractString.php', - 'Symfony\\Component\\String\\AbstractUnicodeString' => $vendorDir . '/symfony/string/AbstractUnicodeString.php', - 'Symfony\\Component\\String\\ByteString' => $vendorDir . '/symfony/string/ByteString.php', - 'Symfony\\Component\\String\\CodePointString' => $vendorDir . '/symfony/string/CodePointString.php', - 'Symfony\\Component\\String\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/string/Exception/ExceptionInterface.php', - 'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/string/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\String\\Exception\\RuntimeException' => $vendorDir . '/symfony/string/Exception/RuntimeException.php', - 'Symfony\\Component\\String\\Inflector\\EnglishInflector' => $vendorDir . '/symfony/string/Inflector/EnglishInflector.php', - 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => $vendorDir . '/symfony/string/Inflector/FrenchInflector.php', - 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => $vendorDir . '/symfony/string/Inflector/InflectorInterface.php', - 'Symfony\\Component\\String\\LazyString' => $vendorDir . '/symfony/string/LazyString.php', - 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php', - 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php', - 'Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\Validator\\Command\\DebugCommand' => $vendorDir . '/symfony/validator/Command/DebugCommand.php', - 'Symfony\\Component\\Validator\\Constraint' => $vendorDir . '/symfony/validator/Constraint.php', - 'Symfony\\Component\\Validator\\ConstraintValidator' => $vendorDir . '/symfony/validator/ConstraintValidator.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactory' => $vendorDir . '/symfony/validator/ConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactoryInterface' => $vendorDir . '/symfony/validator/ConstraintValidatorFactoryInterface.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorInterface' => $vendorDir . '/symfony/validator/ConstraintValidatorInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolation' => $vendorDir . '/symfony/validator/ConstraintViolation.php', - 'Symfony\\Component\\Validator\\ConstraintViolationInterface' => $vendorDir . '/symfony/validator/ConstraintViolationInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolationList' => $vendorDir . '/symfony/validator/ConstraintViolationList.php', - 'Symfony\\Component\\Validator\\ConstraintViolationListInterface' => $vendorDir . '/symfony/validator/ConstraintViolationListInterface.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparison' => $vendorDir . '/symfony/validator/Constraints/AbstractComparison.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparisonValidator' => $vendorDir . '/symfony/validator/Constraints/AbstractComparisonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\All' => $vendorDir . '/symfony/validator/Constraints/All.php', - 'Symfony\\Component\\Validator\\Constraints\\AllValidator' => $vendorDir . '/symfony/validator/Constraints/AllValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOf' => $vendorDir . '/symfony/validator/Constraints/AtLeastOneOf.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOfValidator' => $vendorDir . '/symfony/validator/Constraints/AtLeastOneOfValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Bic' => $vendorDir . '/symfony/validator/Constraints/Bic.php', - 'Symfony\\Component\\Validator\\Constraints\\BicValidator' => $vendorDir . '/symfony/validator/Constraints/BicValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Blank' => $vendorDir . '/symfony/validator/Constraints/Blank.php', - 'Symfony\\Component\\Validator\\Constraints\\BlankValidator' => $vendorDir . '/symfony/validator/Constraints/BlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Callback' => $vendorDir . '/symfony/validator/Constraints/Callback.php', - 'Symfony\\Component\\Validator\\Constraints\\CallbackValidator' => $vendorDir . '/symfony/validator/Constraints/CallbackValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CardScheme' => $vendorDir . '/symfony/validator/Constraints/CardScheme.php', - 'Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator' => $vendorDir . '/symfony/validator/Constraints/CardSchemeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cascade' => $vendorDir . '/symfony/validator/Constraints/Cascade.php', - 'Symfony\\Component\\Validator\\Constraints\\Choice' => $vendorDir . '/symfony/validator/Constraints/Choice.php', - 'Symfony\\Component\\Validator\\Constraints\\ChoiceValidator' => $vendorDir . '/symfony/validator/Constraints/ChoiceValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cidr' => $vendorDir . '/symfony/validator/Constraints/Cidr.php', - 'Symfony\\Component\\Validator\\Constraints\\CidrValidator' => $vendorDir . '/symfony/validator/Constraints/CidrValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Collection' => $vendorDir . '/symfony/validator/Constraints/Collection.php', - 'Symfony\\Component\\Validator\\Constraints\\CollectionValidator' => $vendorDir . '/symfony/validator/Constraints/CollectionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Composite' => $vendorDir . '/symfony/validator/Constraints/Composite.php', - 'Symfony\\Component\\Validator\\Constraints\\Compound' => $vendorDir . '/symfony/validator/Constraints/Compound.php', - 'Symfony\\Component\\Validator\\Constraints\\CompoundValidator' => $vendorDir . '/symfony/validator/Constraints/CompoundValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Count' => $vendorDir . '/symfony/validator/Constraints/Count.php', - 'Symfony\\Component\\Validator\\Constraints\\CountValidator' => $vendorDir . '/symfony/validator/Constraints/CountValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Country' => $vendorDir . '/symfony/validator/Constraints/Country.php', - 'Symfony\\Component\\Validator\\Constraints\\CountryValidator' => $vendorDir . '/symfony/validator/Constraints/CountryValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColor' => $vendorDir . '/symfony/validator/Constraints/CssColor.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColorValidator' => $vendorDir . '/symfony/validator/Constraints/CssColorValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Currency' => $vendorDir . '/symfony/validator/Constraints/Currency.php', - 'Symfony\\Component\\Validator\\Constraints\\CurrencyValidator' => $vendorDir . '/symfony/validator/Constraints/CurrencyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Date' => $vendorDir . '/symfony/validator/Constraints/Date.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTime' => $vendorDir . '/symfony/validator/Constraints/DateTime.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTimeValidator' => $vendorDir . '/symfony/validator/Constraints/DateTimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DateValidator' => $vendorDir . '/symfony/validator/Constraints/DateValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DisableAutoMapping' => $vendorDir . '/symfony/validator/Constraints/DisableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleBy' => $vendorDir . '/symfony/validator/Constraints/DivisibleBy.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator' => $vendorDir . '/symfony/validator/Constraints/DivisibleByValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Email' => $vendorDir . '/symfony/validator/Constraints/Email.php', - 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => $vendorDir . '/symfony/validator/Constraints/EmailValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\EnableAutoMapping' => $vendorDir . '/symfony/validator/Constraints/EnableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualTo' => $vendorDir . '/symfony/validator/Constraints/EqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualToValidator' => $vendorDir . '/symfony/validator/Constraints/EqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Existence' => $vendorDir . '/symfony/validator/Constraints/Existence.php', - 'Symfony\\Component\\Validator\\Constraints\\Expression' => $vendorDir . '/symfony/validator/Constraints/Expression.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntax' => $vendorDir . '/symfony/validator/Constraints/ExpressionLanguageSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntaxValidator' => $vendorDir . '/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => $vendorDir . '/symfony/validator/Constraints/ExpressionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\File' => $vendorDir . '/symfony/validator/Constraints/File.php', - 'Symfony\\Component\\Validator\\Constraints\\FileValidator' => $vendorDir . '/symfony/validator/Constraints/FileValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThan' => $vendorDir . '/symfony/validator/Constraints/GreaterThan.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual' => $vendorDir . '/symfony/validator/Constraints/GreaterThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator' => $vendorDir . '/symfony/validator/Constraints/GreaterThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator' => $vendorDir . '/symfony/validator/Constraints/GreaterThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequence' => $vendorDir . '/symfony/validator/Constraints/GroupSequence.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequenceProvider' => $vendorDir . '/symfony/validator/Constraints/GroupSequenceProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\Hostname' => $vendorDir . '/symfony/validator/Constraints/Hostname.php', - 'Symfony\\Component\\Validator\\Constraints\\HostnameValidator' => $vendorDir . '/symfony/validator/Constraints/HostnameValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Iban' => $vendorDir . '/symfony/validator/Constraints/Iban.php', - 'Symfony\\Component\\Validator\\Constraints\\IbanValidator' => $vendorDir . '/symfony/validator/Constraints/IbanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalTo' => $vendorDir . '/symfony/validator/Constraints/IdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator' => $vendorDir . '/symfony/validator/Constraints/IdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Image' => $vendorDir . '/symfony/validator/Constraints/Image.php', - 'Symfony\\Component\\Validator\\Constraints\\ImageValidator' => $vendorDir . '/symfony/validator/Constraints/ImageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ip' => $vendorDir . '/symfony/validator/Constraints/Ip.php', - 'Symfony\\Component\\Validator\\Constraints\\IpValidator' => $vendorDir . '/symfony/validator/Constraints/IpValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalse' => $vendorDir . '/symfony/validator/Constraints/IsFalse.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalseValidator' => $vendorDir . '/symfony/validator/Constraints/IsFalseValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNull' => $vendorDir . '/symfony/validator/Constraints/IsNull.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNullValidator' => $vendorDir . '/symfony/validator/Constraints/IsNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrue' => $vendorDir . '/symfony/validator/Constraints/IsTrue.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrueValidator' => $vendorDir . '/symfony/validator/Constraints/IsTrueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isbn' => $vendorDir . '/symfony/validator/Constraints/Isbn.php', - 'Symfony\\Component\\Validator\\Constraints\\IsbnValidator' => $vendorDir . '/symfony/validator/Constraints/IsbnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isin' => $vendorDir . '/symfony/validator/Constraints/Isin.php', - 'Symfony\\Component\\Validator\\Constraints\\IsinValidator' => $vendorDir . '/symfony/validator/Constraints/IsinValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Issn' => $vendorDir . '/symfony/validator/Constraints/Issn.php', - 'Symfony\\Component\\Validator\\Constraints\\IssnValidator' => $vendorDir . '/symfony/validator/Constraints/IssnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Json' => $vendorDir . '/symfony/validator/Constraints/Json.php', - 'Symfony\\Component\\Validator\\Constraints\\JsonValidator' => $vendorDir . '/symfony/validator/Constraints/JsonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Language' => $vendorDir . '/symfony/validator/Constraints/Language.php', - 'Symfony\\Component\\Validator\\Constraints\\LanguageValidator' => $vendorDir . '/symfony/validator/Constraints/LanguageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Length' => $vendorDir . '/symfony/validator/Constraints/Length.php', - 'Symfony\\Component\\Validator\\Constraints\\LengthValidator' => $vendorDir . '/symfony/validator/Constraints/LengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThan' => $vendorDir . '/symfony/validator/Constraints/LessThan.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual' => $vendorDir . '/symfony/validator/Constraints/LessThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator' => $vendorDir . '/symfony/validator/Constraints/LessThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanValidator' => $vendorDir . '/symfony/validator/Constraints/LessThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Locale' => $vendorDir . '/symfony/validator/Constraints/Locale.php', - 'Symfony\\Component\\Validator\\Constraints\\LocaleValidator' => $vendorDir . '/symfony/validator/Constraints/LocaleValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Luhn' => $vendorDir . '/symfony/validator/Constraints/Luhn.php', - 'Symfony\\Component\\Validator\\Constraints\\LuhnValidator' => $vendorDir . '/symfony/validator/Constraints/LuhnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Negative' => $vendorDir . '/symfony/validator/Constraints/Negative.php', - 'Symfony\\Component\\Validator\\Constraints\\NegativeOrZero' => $vendorDir . '/symfony/validator/Constraints/NegativeOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlank' => $vendorDir . '/symfony/validator/Constraints/NotBlank.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlankValidator' => $vendorDir . '/symfony/validator/Constraints/NotBlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPassword' => $vendorDir . '/symfony/validator/Constraints/NotCompromisedPassword.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => $vendorDir . '/symfony/validator/Constraints/NotCompromisedPasswordValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualTo' => $vendorDir . '/symfony/validator/Constraints/NotEqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator' => $vendorDir . '/symfony/validator/Constraints/NotEqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo' => $vendorDir . '/symfony/validator/Constraints/NotIdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator' => $vendorDir . '/symfony/validator/Constraints/NotIdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNull' => $vendorDir . '/symfony/validator/Constraints/NotNull.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNullValidator' => $vendorDir . '/symfony/validator/Constraints/NotNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NumberConstraintTrait' => $vendorDir . '/symfony/validator/Constraints/NumberConstraintTrait.php', - 'Symfony\\Component\\Validator\\Constraints\\Optional' => $vendorDir . '/symfony/validator/Constraints/Optional.php', - 'Symfony\\Component\\Validator\\Constraints\\Positive' => $vendorDir . '/symfony/validator/Constraints/Positive.php', - 'Symfony\\Component\\Validator\\Constraints\\PositiveOrZero' => $vendorDir . '/symfony/validator/Constraints/PositiveOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\Range' => $vendorDir . '/symfony/validator/Constraints/Range.php', - 'Symfony\\Component\\Validator\\Constraints\\RangeValidator' => $vendorDir . '/symfony/validator/Constraints/RangeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Regex' => $vendorDir . '/symfony/validator/Constraints/Regex.php', - 'Symfony\\Component\\Validator\\Constraints\\RegexValidator' => $vendorDir . '/symfony/validator/Constraints/RegexValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Required' => $vendorDir . '/symfony/validator/Constraints/Required.php', - 'Symfony\\Component\\Validator\\Constraints\\Sequentially' => $vendorDir . '/symfony/validator/Constraints/Sequentially.php', - 'Symfony\\Component\\Validator\\Constraints\\SequentiallyValidator' => $vendorDir . '/symfony/validator/Constraints/SequentiallyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Time' => $vendorDir . '/symfony/validator/Constraints/Time.php', - 'Symfony\\Component\\Validator\\Constraints\\TimeValidator' => $vendorDir . '/symfony/validator/Constraints/TimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Timezone' => $vendorDir . '/symfony/validator/Constraints/Timezone.php', - 'Symfony\\Component\\Validator\\Constraints\\TimezoneValidator' => $vendorDir . '/symfony/validator/Constraints/TimezoneValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Traverse' => $vendorDir . '/symfony/validator/Constraints/Traverse.php', - 'Symfony\\Component\\Validator\\Constraints\\Type' => $vendorDir . '/symfony/validator/Constraints/Type.php', - 'Symfony\\Component\\Validator\\Constraints\\TypeValidator' => $vendorDir . '/symfony/validator/Constraints/TypeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ulid' => $vendorDir . '/symfony/validator/Constraints/Ulid.php', - 'Symfony\\Component\\Validator\\Constraints\\UlidValidator' => $vendorDir . '/symfony/validator/Constraints/UlidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Unique' => $vendorDir . '/symfony/validator/Constraints/Unique.php', - 'Symfony\\Component\\Validator\\Constraints\\UniqueValidator' => $vendorDir . '/symfony/validator/Constraints/UniqueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Url' => $vendorDir . '/symfony/validator/Constraints/Url.php', - 'Symfony\\Component\\Validator\\Constraints\\UrlValidator' => $vendorDir . '/symfony/validator/Constraints/UrlValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Uuid' => $vendorDir . '/symfony/validator/Constraints/Uuid.php', - 'Symfony\\Component\\Validator\\Constraints\\UuidValidator' => $vendorDir . '/symfony/validator/Constraints/UuidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Valid' => $vendorDir . '/symfony/validator/Constraints/Valid.php', - 'Symfony\\Component\\Validator\\Constraints\\ValidValidator' => $vendorDir . '/symfony/validator/Constraints/ValidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ZeroComparisonConstraintTrait' => $vendorDir . '/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php', - 'Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory' => $vendorDir . '/symfony/validator/ContainerConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContext' => $vendorDir . '/symfony/validator/Context/ExecutionContext.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactory' => $vendorDir . '/symfony/validator/Context/ExecutionContextFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactoryInterface' => $vendorDir . '/symfony/validator/Context/ExecutionContextFactoryInterface.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextInterface' => $vendorDir . '/symfony/validator/Context/ExecutionContextInterface.php', - 'Symfony\\Component\\Validator\\DataCollector\\ValidatorDataCollector' => $vendorDir . '/symfony/validator/DataCollector/ValidatorDataCollector.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddAutoMappingConfigurationPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddConstraintValidatorsPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddValidatorInitializersPass' => $vendorDir . '/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php', - 'Symfony\\Component\\Validator\\Exception\\BadMethodCallException' => $vendorDir . '/symfony/validator/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Validator\\Exception\\ConstraintDefinitionException' => $vendorDir . '/symfony/validator/Exception/ConstraintDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/validator/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Validator\\Exception\\GroupDefinitionException' => $vendorDir . '/symfony/validator/Exception/GroupDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/validator/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/validator/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\LogicException' => $vendorDir . '/symfony/validator/Exception/LogicException.php', - 'Symfony\\Component\\Validator\\Exception\\MappingException' => $vendorDir . '/symfony/validator/Exception/MappingException.php', - 'Symfony\\Component\\Validator\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/validator/Exception/MissingOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\NoSuchMetadataException' => $vendorDir . '/symfony/validator/Exception/NoSuchMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\OutOfBoundsException' => $vendorDir . '/symfony/validator/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Validator\\Exception\\RuntimeException' => $vendorDir . '/symfony/validator/Exception/RuntimeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/validator/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedValueException' => $vendorDir . '/symfony/validator/Exception/UnexpectedValueException.php', - 'Symfony\\Component\\Validator\\Exception\\UnsupportedMetadataException' => $vendorDir . '/symfony/validator/Exception/UnsupportedMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidationFailedException' => $vendorDir . '/symfony/validator/Exception/ValidationFailedException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidatorException' => $vendorDir . '/symfony/validator/Exception/ValidatorException.php', - 'Symfony\\Component\\Validator\\GroupSequenceProviderInterface' => $vendorDir . '/symfony/validator/GroupSequenceProviderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\AutoMappingStrategy' => $vendorDir . '/symfony/validator/Mapping/AutoMappingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\CascadingStrategy' => $vendorDir . '/symfony/validator/Mapping/CascadingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata' => $vendorDir . '/symfony/validator/Mapping/ClassMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadataInterface' => $vendorDir . '/symfony/validator/Mapping/ClassMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\BlackHoleMetadataFactory' => $vendorDir . '/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory' => $vendorDir . '/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface' => $vendorDir . '/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\GenericMetadata' => $vendorDir . '/symfony/validator/Mapping/GenericMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\GetterMetadata' => $vendorDir . '/symfony/validator/Mapping/GetterMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AbstractLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/AbstractLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AnnotationLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/AnnotationLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AutoMappingTrait' => $vendorDir . '/symfony/validator/Mapping/Loader/AutoMappingTrait.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/FileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/FilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderChain' => $vendorDir . '/symfony/validator/Mapping/Loader/LoaderChain.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderInterface' => $vendorDir . '/symfony/validator/Mapping/Loader/LoaderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\PropertyInfoLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/PropertyInfoLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\StaticMethodLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/StaticMethodLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/XmlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFilesLoader' => $vendorDir . '/symfony/validator/Mapping/Loader/YamlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\MemberMetadata' => $vendorDir . '/symfony/validator/Mapping/MemberMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\MetadataInterface' => $vendorDir . '/symfony/validator/Mapping/MetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadata' => $vendorDir . '/symfony/validator/Mapping/PropertyMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadataInterface' => $vendorDir . '/symfony/validator/Mapping/PropertyMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => $vendorDir . '/symfony/validator/Mapping/TraversalStrategy.php', - 'Symfony\\Component\\Validator\\ObjectInitializerInterface' => $vendorDir . '/symfony/validator/ObjectInitializerInterface.php', - 'Symfony\\Component\\Validator\\Test\\ConstraintValidatorTestCase' => $vendorDir . '/symfony/validator/Test/ConstraintValidatorTestCase.php', - 'Symfony\\Component\\Validator\\Util\\PropertyPath' => $vendorDir . '/symfony/validator/Util/PropertyPath.php', - 'Symfony\\Component\\Validator\\Validation' => $vendorDir . '/symfony/validator/Validation.php', - 'Symfony\\Component\\Validator\\ValidatorBuilder' => $vendorDir . '/symfony/validator/ValidatorBuilder.php', - 'Symfony\\Component\\Validator\\Validator\\ContextualValidatorInterface' => $vendorDir . '/symfony/validator/Validator/ContextualValidatorInterface.php', - 'Symfony\\Component\\Validator\\Validator\\LazyProperty' => $vendorDir . '/symfony/validator/Validator/LazyProperty.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveContextualValidator' => $vendorDir . '/symfony/validator/Validator/RecursiveContextualValidator.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveValidator' => $vendorDir . '/symfony/validator/Validator/RecursiveValidator.php', - 'Symfony\\Component\\Validator\\Validator\\TraceableValidator' => $vendorDir . '/symfony/validator/Validator/TraceableValidator.php', - 'Symfony\\Component\\Validator\\Validator\\ValidatorInterface' => $vendorDir . '/symfony/validator/Validator/ValidatorInterface.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilder' => $vendorDir . '/symfony/validator/Violation/ConstraintViolationBuilder.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface' => $vendorDir . '/symfony/validator/Violation/ConstraintViolationBuilderInterface.php', - 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => $vendorDir . '/symfony/var-dumper/Caster/ClassStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => $vendorDir . '/symfony/var-dumper/Caster/ConstStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => $vendorDir . '/symfony/var-dumper/Caster/CutArrayStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => $vendorDir . '/symfony/var-dumper/Caster/CutStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => $vendorDir . '/symfony/var-dumper/Caster/DateCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => $vendorDir . '/symfony/var-dumper/Caster/DsCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => $vendorDir . '/symfony/var-dumper/Caster/DsPairStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => $vendorDir . '/symfony/var-dumper/Caster/FiberCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => $vendorDir . '/symfony/var-dumper/Caster/GmpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => $vendorDir . '/symfony/var-dumper/Caster/ImagineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => $vendorDir . '/symfony/var-dumper/Caster/ImgStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => $vendorDir . '/symfony/var-dumper/Caster/IntlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => $vendorDir . '/symfony/var-dumper/Caster/LinkStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => $vendorDir . '/symfony/var-dumper/Caster/MemcachedCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => $vendorDir . '/symfony/var-dumper/Caster/MysqliCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => $vendorDir . '/symfony/var-dumper/Caster/PdoCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => $vendorDir . '/symfony/var-dumper/Caster/PgSqlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => $vendorDir . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => $vendorDir . '/symfony/var-dumper/Caster/RdKafkaCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => $vendorDir . '/symfony/var-dumper/Caster/RedisCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ReflectionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/ResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => $vendorDir . '/symfony/var-dumper/Caster/SplCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => $vendorDir . '/symfony/var-dumper/Caster/StubCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => $vendorDir . '/symfony/var-dumper/Caster/SymfonyCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => $vendorDir . '/symfony/var-dumper/Caster/TraceStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => $vendorDir . '/symfony/var-dumper/Caster/UuidCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlReaderCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php', - 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Data' => $vendorDir . '/symfony/var-dumper/Cloner/Data.php', - 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $vendorDir . '/symfony/var-dumper/Cloner/Stub.php', - 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => $vendorDir . '/symfony/var-dumper/Command/ServerDumpCommand.php', - 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => $vendorDir . '/symfony/var-dumper/Dumper/DataDumperInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => $vendorDir . '/symfony/var-dumper/Dumper/HtmlDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ServerDumper.php', - 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', - 'Symfony\\Component\\VarDumper\\Server\\Connection' => $vendorDir . '/symfony/var-dumper/Server/Connection.php', - 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', - 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/var-exporter/Exception/ClassNotFoundException.php', - 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/var-exporter/Exception/ExceptionInterface.php', - 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => $vendorDir . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', - 'Symfony\\Component\\VarExporter\\Instantiator' => $vendorDir . '/symfony/var-exporter/Instantiator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Exporter' => $vendorDir . '/symfony/var-exporter/Internal/Exporter.php', - 'Symfony\\Component\\VarExporter\\Internal\\Hydrator' => $vendorDir . '/symfony/var-exporter/Internal/Hydrator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Reference' => $vendorDir . '/symfony/var-exporter/Internal/Reference.php', - 'Symfony\\Component\\VarExporter\\Internal\\Registry' => $vendorDir . '/symfony/var-exporter/Internal/Registry.php', - 'Symfony\\Component\\VarExporter\\Internal\\Values' => $vendorDir . '/symfony/var-exporter/Internal/Values.php', - 'Symfony\\Component\\VarExporter\\VarExporter' => $vendorDir . '/symfony/var-exporter/VarExporter.php', - 'Symfony\\Component\\Yaml\\Command\\LintCommand' => $vendorDir . '/symfony/yaml/Command/LintCommand.php', - 'Symfony\\Component\\Yaml\\Dumper' => $vendorDir . '/symfony/yaml/Dumper.php', - 'Symfony\\Component\\Yaml\\Escaper' => $vendorDir . '/symfony/yaml/Escaper.php', - 'Symfony\\Component\\Yaml\\Exception\\DumpException' => $vendorDir . '/symfony/yaml/Exception/DumpException.php', - 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/yaml/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Yaml\\Exception\\ParseException' => $vendorDir . '/symfony/yaml/Exception/ParseException.php', - 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $vendorDir . '/symfony/yaml/Exception/RuntimeException.php', - 'Symfony\\Component\\Yaml\\Inline' => $vendorDir . '/symfony/yaml/Inline.php', - 'Symfony\\Component\\Yaml\\Parser' => $vendorDir . '/symfony/yaml/Parser.php', - 'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => $vendorDir . '/symfony/yaml/Tag/TaggedValue.php', - 'Symfony\\Component\\Yaml\\Unescaper' => $vendorDir . '/symfony/yaml/Unescaper.php', - 'Symfony\\Component\\Yaml\\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => $vendorDir . '/symfony/cache-contracts/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => $vendorDir . '/symfony/cache-contracts/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => $vendorDir . '/symfony/cache-contracts/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => $vendorDir . '/symfony/cache-contracts/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => $vendorDir . '/symfony/cache-contracts/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher-contracts/Event.php', - 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', - 'Symfony\\Contracts\\HttpClient\\ChunkInterface' => $vendorDir . '/symfony/http-client-contracts/ChunkInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ClientExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/HttpExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ServerExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ServerExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\TimeoutExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\TransportExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/TransportExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\HttpClientInterface' => $vendorDir . '/symfony/http-client-contracts/HttpClientInterface.php', - 'Symfony\\Contracts\\HttpClient\\ResponseInterface' => $vendorDir . '/symfony/http-client-contracts/ResponseInterface.php', - 'Symfony\\Contracts\\HttpClient\\ResponseStreamInterface' => $vendorDir . '/symfony/http-client-contracts/ResponseStreamInterface.php', - 'Symfony\\Contracts\\HttpClient\\Test\\HttpClientTestCase' => $vendorDir . '/symfony/http-client-contracts/Test/HttpClientTestCase.php', - 'Symfony\\Contracts\\HttpClient\\Test\\TestHttpServer' => $vendorDir . '/symfony/http-client-contracts/Test/TestHttpServer.php', - 'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php', - 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/translation-contracts/Test/TranslatorTest.php', - 'Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/translation-contracts/TranslatableInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php', - 'Symfony\\Flex\\Cache' => $vendorDir . '/symfony/flex/src/Cache.php', - 'Symfony\\Flex\\Command\\DumpEnvCommand' => $vendorDir . '/symfony/flex/src/Command/DumpEnvCommand.php', - 'Symfony\\Flex\\Command\\GenerateIdCommand' => $vendorDir . '/symfony/flex/src/Command/GenerateIdCommand.php', - 'Symfony\\Flex\\Command\\InstallRecipesCommand' => $vendorDir . '/symfony/flex/src/Command/InstallRecipesCommand.php', - 'Symfony\\Flex\\Command\\RecipesCommand' => $vendorDir . '/symfony/flex/src/Command/RecipesCommand.php', - 'Symfony\\Flex\\Command\\RemoveCommand' => $vendorDir . '/symfony/flex/src/Command/RemoveCommand.php', - 'Symfony\\Flex\\Command\\RequireCommand' => $vendorDir . '/symfony/flex/src/Command/RequireCommand.php', - 'Symfony\\Flex\\Command\\UnpackCommand' => $vendorDir . '/symfony/flex/src/Command/UnpackCommand.php', - 'Symfony\\Flex\\Command\\UpdateCommand' => $vendorDir . '/symfony/flex/src/Command/UpdateCommand.php', - 'Symfony\\Flex\\Command\\UpdateRecipesCommand' => $vendorDir . '/symfony/flex/src/Command/UpdateRecipesCommand.php', - 'Symfony\\Flex\\ComposerRepository' => $vendorDir . '/symfony/flex/src/ComposerRepository.php', - 'Symfony\\Flex\\Configurator' => $vendorDir . '/symfony/flex/src/Configurator.php', - 'Symfony\\Flex\\Configurator\\AbstractConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/AbstractConfigurator.php', - 'Symfony\\Flex\\Configurator\\BundlesConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/BundlesConfigurator.php', - 'Symfony\\Flex\\Configurator\\ComposerScriptsConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/ComposerScriptsConfigurator.php', - 'Symfony\\Flex\\Configurator\\ContainerConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/ContainerConfigurator.php', - 'Symfony\\Flex\\Configurator\\CopyFromPackageConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/CopyFromPackageConfigurator.php', - 'Symfony\\Flex\\Configurator\\CopyFromRecipeConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/CopyFromRecipeConfigurator.php', - 'Symfony\\Flex\\Configurator\\DockerComposeConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/DockerComposeConfigurator.php', - 'Symfony\\Flex\\Configurator\\DockerfileConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/DockerfileConfigurator.php', - 'Symfony\\Flex\\Configurator\\EnvConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/EnvConfigurator.php', - 'Symfony\\Flex\\Configurator\\GitignoreConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/GitignoreConfigurator.php', - 'Symfony\\Flex\\Configurator\\MakefileConfigurator' => $vendorDir . '/symfony/flex/src/Configurator/MakefileConfigurator.php', - 'Symfony\\Flex\\CurlDownloader' => $vendorDir . '/symfony/flex/src/CurlDownloader.php', - 'Symfony\\Flex\\Downloader' => $vendorDir . '/symfony/flex/src/Downloader.php', - 'Symfony\\Flex\\Event\\UpdateEvent' => $vendorDir . '/symfony/flex/src/Event/UpdateEvent.php', - 'Symfony\\Flex\\Flex' => $vendorDir . '/symfony/flex/src/Flex.php', - 'Symfony\\Flex\\GithubApi' => $vendorDir . '/symfony/flex/src/GithubApi.php', - 'Symfony\\Flex\\InformationOperation' => $vendorDir . '/symfony/flex/src/InformationOperation.php', - 'Symfony\\Flex\\Lock' => $vendorDir . '/symfony/flex/src/Lock.php', - 'Symfony\\Flex\\Options' => $vendorDir . '/symfony/flex/src/Options.php', - 'Symfony\\Flex\\PackageFilter' => $vendorDir . '/symfony/flex/src/PackageFilter.php', - 'Symfony\\Flex\\PackageJsonSynchronizer' => $vendorDir . '/symfony/flex/src/PackageJsonSynchronizer.php', - 'Symfony\\Flex\\PackageResolver' => $vendorDir . '/symfony/flex/src/PackageResolver.php', - 'Symfony\\Flex\\ParallelDownloader' => $vendorDir . '/symfony/flex/src/ParallelDownloader.php', - 'Symfony\\Flex\\Path' => $vendorDir . '/symfony/flex/src/Path.php', - 'Symfony\\Flex\\Recipe' => $vendorDir . '/symfony/flex/src/Recipe.php', - 'Symfony\\Flex\\Response' => $vendorDir . '/symfony/flex/src/Response.php', - 'Symfony\\Flex\\ScriptExecutor' => $vendorDir . '/symfony/flex/src/ScriptExecutor.php', - 'Symfony\\Flex\\SymfonyBundle' => $vendorDir . '/symfony/flex/src/SymfonyBundle.php', - 'Symfony\\Flex\\TruncatedComposerRepository' => $vendorDir . '/symfony/flex/src/TruncatedComposerRepository.php', - 'Symfony\\Flex\\Unpack\\Operation' => $vendorDir . '/symfony/flex/src/Unpack/Operation.php', - 'Symfony\\Flex\\Unpack\\Result' => $vendorDir . '/symfony/flex/src/Unpack/Result.php', - 'Symfony\\Flex\\Unpacker' => $vendorDir . '/symfony/flex/src/Unpacker.php', - 'Symfony\\Flex\\Update\\DiffHelper' => $vendorDir . '/symfony/flex/src/Update/DiffHelper.php', - 'Symfony\\Flex\\Update\\RecipePatch' => $vendorDir . '/symfony/flex/src/Update/RecipePatch.php', - 'Symfony\\Flex\\Update\\RecipePatcher' => $vendorDir . '/symfony/flex/src/Update/RecipePatcher.php', - 'Symfony\\Flex\\Update\\RecipeUpdate' => $vendorDir . '/symfony/flex/src/Update/RecipeUpdate.php', - 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Collator.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => $vendorDir . '/symfony/polyfill-intl-icu/Currencies.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => $vendorDir . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => $vendorDir . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Icu' => $vendorDir . '/symfony/polyfill-intl-icu/Icu.php', - 'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/IntlDateFormatter.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Locale' => $vendorDir . '/symfony/polyfill-intl-icu/Locale.php', - 'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => $vendorDir . '/symfony/polyfill-intl-icu/NumberFormatter.php', - 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php', - 'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php', - 'Symfony\\Polyfill\\Php73\\Php73' => $vendorDir . '/symfony/polyfill-php73/Php73.php', - 'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php', - 'Symfony\\Polyfill\\Php80\\PhpToken' => $vendorDir . '/symfony/polyfill-php80/PhpToken.php', - 'Symfony\\Polyfill\\Php81\\Php81' => $vendorDir . '/symfony/polyfill-php81/Php81.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\ApplicationRuntime' => $vendorDir . '/symfony/runtime/Internal/Console/ApplicationRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Command\\CommandRuntime' => $vendorDir . '/symfony/runtime/Internal/Console/Command/CommandRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Input\\InputInterfaceRuntime' => $vendorDir . '/symfony/runtime/Internal/Console/Input/InputInterfaceRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Output\\OutputInterfaceRuntime' => $vendorDir . '/symfony/runtime/Internal/Console/Output/OutputInterfaceRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpFoundation\\RequestRuntime' => $vendorDir . '/symfony/runtime/Internal/HttpFoundation/RequestRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpFoundation\\ResponseRuntime' => $vendorDir . '/symfony/runtime/Internal/HttpFoundation/ResponseRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpKernel\\HttpKernelInterfaceRuntime' => $vendorDir . '/symfony/runtime/Internal/HttpKernel/HttpKernelInterfaceRuntime.php', - 'Twig\\Cache\\CacheInterface' => $vendorDir . '/twig/twig/src/Cache/CacheInterface.php', - 'Twig\\Cache\\FilesystemCache' => $vendorDir . '/twig/twig/src/Cache/FilesystemCache.php', - 'Twig\\Cache\\NullCache' => $vendorDir . '/twig/twig/src/Cache/NullCache.php', - 'Twig\\Compiler' => $vendorDir . '/twig/twig/src/Compiler.php', - 'Twig\\Environment' => $vendorDir . '/twig/twig/src/Environment.php', - 'Twig\\Error\\Error' => $vendorDir . '/twig/twig/src/Error/Error.php', - 'Twig\\Error\\LoaderError' => $vendorDir . '/twig/twig/src/Error/LoaderError.php', - 'Twig\\Error\\RuntimeError' => $vendorDir . '/twig/twig/src/Error/RuntimeError.php', - 'Twig\\Error\\SyntaxError' => $vendorDir . '/twig/twig/src/Error/SyntaxError.php', - 'Twig\\ExpressionParser' => $vendorDir . '/twig/twig/src/ExpressionParser.php', - 'Twig\\ExtensionSet' => $vendorDir . '/twig/twig/src/ExtensionSet.php', - 'Twig\\Extension\\AbstractExtension' => $vendorDir . '/twig/twig/src/Extension/AbstractExtension.php', - 'Twig\\Extension\\CoreExtension' => $vendorDir . '/twig/twig/src/Extension/CoreExtension.php', - 'Twig\\Extension\\DebugExtension' => $vendorDir . '/twig/twig/src/Extension/DebugExtension.php', - 'Twig\\Extension\\EscaperExtension' => $vendorDir . '/twig/twig/src/Extension/EscaperExtension.php', - 'Twig\\Extension\\ExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/ExtensionInterface.php', - 'Twig\\Extension\\GlobalsInterface' => $vendorDir . '/twig/twig/src/Extension/GlobalsInterface.php', - 'Twig\\Extension\\OptimizerExtension' => $vendorDir . '/twig/twig/src/Extension/OptimizerExtension.php', - 'Twig\\Extension\\ProfilerExtension' => $vendorDir . '/twig/twig/src/Extension/ProfilerExtension.php', - 'Twig\\Extension\\RuntimeExtensionInterface' => $vendorDir . '/twig/twig/src/Extension/RuntimeExtensionInterface.php', - 'Twig\\Extension\\SandboxExtension' => $vendorDir . '/twig/twig/src/Extension/SandboxExtension.php', - 'Twig\\Extension\\StagingExtension' => $vendorDir . '/twig/twig/src/Extension/StagingExtension.php', - 'Twig\\Extension\\StringLoaderExtension' => $vendorDir . '/twig/twig/src/Extension/StringLoaderExtension.php', - 'Twig\\FileExtensionEscapingStrategy' => $vendorDir . '/twig/twig/src/FileExtensionEscapingStrategy.php', - 'Twig\\Lexer' => $vendorDir . '/twig/twig/src/Lexer.php', - 'Twig\\Loader\\ArrayLoader' => $vendorDir . '/twig/twig/src/Loader/ArrayLoader.php', - 'Twig\\Loader\\ChainLoader' => $vendorDir . '/twig/twig/src/Loader/ChainLoader.php', - 'Twig\\Loader\\FilesystemLoader' => $vendorDir . '/twig/twig/src/Loader/FilesystemLoader.php', - 'Twig\\Loader\\LoaderInterface' => $vendorDir . '/twig/twig/src/Loader/LoaderInterface.php', - 'Twig\\Markup' => $vendorDir . '/twig/twig/src/Markup.php', - 'Twig\\NodeTraverser' => $vendorDir . '/twig/twig/src/NodeTraverser.php', - 'Twig\\NodeVisitor\\AbstractNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php', - 'Twig\\NodeVisitor\\EscaperNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php', - 'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php', - 'Twig\\NodeVisitor\\NodeVisitorInterface' => $vendorDir . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php', - 'Twig\\NodeVisitor\\OptimizerNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php', - 'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php', - 'Twig\\NodeVisitor\\SandboxNodeVisitor' => $vendorDir . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php', - 'Twig\\Node\\AutoEscapeNode' => $vendorDir . '/twig/twig/src/Node/AutoEscapeNode.php', - 'Twig\\Node\\BlockNode' => $vendorDir . '/twig/twig/src/Node/BlockNode.php', - 'Twig\\Node\\BlockReferenceNode' => $vendorDir . '/twig/twig/src/Node/BlockReferenceNode.php', - 'Twig\\Node\\BodyNode' => $vendorDir . '/twig/twig/src/Node/BodyNode.php', - 'Twig\\Node\\CheckSecurityCallNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityCallNode.php', - 'Twig\\Node\\CheckSecurityNode' => $vendorDir . '/twig/twig/src/Node/CheckSecurityNode.php', - 'Twig\\Node\\CheckToStringNode' => $vendorDir . '/twig/twig/src/Node/CheckToStringNode.php', - 'Twig\\Node\\DeprecatedNode' => $vendorDir . '/twig/twig/src/Node/DeprecatedNode.php', - 'Twig\\Node\\DoNode' => $vendorDir . '/twig/twig/src/Node/DoNode.php', - 'Twig\\Node\\EmbedNode' => $vendorDir . '/twig/twig/src/Node/EmbedNode.php', - 'Twig\\Node\\Expression\\AbstractExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AbstractExpression.php', - 'Twig\\Node\\Expression\\ArrayExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrayExpression.php', - 'Twig\\Node\\Expression\\ArrowFunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php', - 'Twig\\Node\\Expression\\AssignNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/AssignNameExpression.php', - 'Twig\\Node\\Expression\\Binary\\AbstractBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php', - 'Twig\\Node\\Expression\\Binary\\AddBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AddBinary.php', - 'Twig\\Node\\Expression\\Binary\\AndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/AndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php', - 'Twig\\Node\\Expression\\Binary\\ConcatBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php', - 'Twig\\Node\\Expression\\Binary\\DivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/DivBinary.php', - 'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\EqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\InBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/InBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\MatchesBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php', - 'Twig\\Node\\Expression\\Binary\\ModBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/ModBinary.php', - 'Twig\\Node\\Expression\\Binary\\MulBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/MulBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotInBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php', - 'Twig\\Node\\Expression\\Binary\\OrBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/OrBinary.php', - 'Twig\\Node\\Expression\\Binary\\PowerBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php', - 'Twig\\Node\\Expression\\Binary\\RangeBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php', - 'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php', - 'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\SubBinary' => $vendorDir . '/twig/twig/src/Node/Expression/Binary/SubBinary.php', - 'Twig\\Node\\Expression\\BlockReferenceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php', - 'Twig\\Node\\Expression\\CallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/CallExpression.php', - 'Twig\\Node\\Expression\\ConditionalExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConditionalExpression.php', - 'Twig\\Node\\Expression\\ConstantExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ConstantExpression.php', - 'Twig\\Node\\Expression\\FilterExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FilterExpression.php', - 'Twig\\Node\\Expression\\Filter\\DefaultFilter' => $vendorDir . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php', - 'Twig\\Node\\Expression\\FunctionExpression' => $vendorDir . '/twig/twig/src/Node/Expression/FunctionExpression.php', - 'Twig\\Node\\Expression\\GetAttrExpression' => $vendorDir . '/twig/twig/src/Node/Expression/GetAttrExpression.php', - 'Twig\\Node\\Expression\\InlinePrint' => $vendorDir . '/twig/twig/src/Node/Expression/InlinePrint.php', - 'Twig\\Node\\Expression\\MethodCallExpression' => $vendorDir . '/twig/twig/src/Node/Expression/MethodCallExpression.php', - 'Twig\\Node\\Expression\\NameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NameExpression.php', - 'Twig\\Node\\Expression\\NullCoalesceExpression' => $vendorDir . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php', - 'Twig\\Node\\Expression\\ParentExpression' => $vendorDir . '/twig/twig/src/Node/Expression/ParentExpression.php', - 'Twig\\Node\\Expression\\TempNameExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TempNameExpression.php', - 'Twig\\Node\\Expression\\TestExpression' => $vendorDir . '/twig/twig/src/Node/Expression/TestExpression.php', - 'Twig\\Node\\Expression\\Test\\ConstantTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/ConstantTest.php', - 'Twig\\Node\\Expression\\Test\\DefinedTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DefinedTest.php', - 'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php', - 'Twig\\Node\\Expression\\Test\\EvenTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/EvenTest.php', - 'Twig\\Node\\Expression\\Test\\NullTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/NullTest.php', - 'Twig\\Node\\Expression\\Test\\OddTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/OddTest.php', - 'Twig\\Node\\Expression\\Test\\SameasTest' => $vendorDir . '/twig/twig/src/Node/Expression/Test/SameasTest.php', - 'Twig\\Node\\Expression\\Unary\\AbstractUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php', - 'Twig\\Node\\Expression\\Unary\\NegUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NegUnary.php', - 'Twig\\Node\\Expression\\Unary\\NotUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/NotUnary.php', - 'Twig\\Node\\Expression\\Unary\\PosUnary' => $vendorDir . '/twig/twig/src/Node/Expression/Unary/PosUnary.php', - 'Twig\\Node\\Expression\\VariadicExpression' => $vendorDir . '/twig/twig/src/Node/Expression/VariadicExpression.php', - 'Twig\\Node\\FlushNode' => $vendorDir . '/twig/twig/src/Node/FlushNode.php', - 'Twig\\Node\\ForLoopNode' => $vendorDir . '/twig/twig/src/Node/ForLoopNode.php', - 'Twig\\Node\\ForNode' => $vendorDir . '/twig/twig/src/Node/ForNode.php', - 'Twig\\Node\\IfNode' => $vendorDir . '/twig/twig/src/Node/IfNode.php', - 'Twig\\Node\\ImportNode' => $vendorDir . '/twig/twig/src/Node/ImportNode.php', - 'Twig\\Node\\IncludeNode' => $vendorDir . '/twig/twig/src/Node/IncludeNode.php', - 'Twig\\Node\\MacroNode' => $vendorDir . '/twig/twig/src/Node/MacroNode.php', - 'Twig\\Node\\ModuleNode' => $vendorDir . '/twig/twig/src/Node/ModuleNode.php', - 'Twig\\Node\\Node' => $vendorDir . '/twig/twig/src/Node/Node.php', - 'Twig\\Node\\NodeCaptureInterface' => $vendorDir . '/twig/twig/src/Node/NodeCaptureInterface.php', - 'Twig\\Node\\NodeOutputInterface' => $vendorDir . '/twig/twig/src/Node/NodeOutputInterface.php', - 'Twig\\Node\\PrintNode' => $vendorDir . '/twig/twig/src/Node/PrintNode.php', - 'Twig\\Node\\SandboxNode' => $vendorDir . '/twig/twig/src/Node/SandboxNode.php', - 'Twig\\Node\\SetNode' => $vendorDir . '/twig/twig/src/Node/SetNode.php', - 'Twig\\Node\\TextNode' => $vendorDir . '/twig/twig/src/Node/TextNode.php', - 'Twig\\Node\\WithNode' => $vendorDir . '/twig/twig/src/Node/WithNode.php', - 'Twig\\Parser' => $vendorDir . '/twig/twig/src/Parser.php', - 'Twig\\Profiler\\Dumper\\BaseDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BaseDumper.php', - 'Twig\\Profiler\\Dumper\\BlackfireDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php', - 'Twig\\Profiler\\Dumper\\HtmlDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php', - 'Twig\\Profiler\\Dumper\\TextDumper' => $vendorDir . '/twig/twig/src/Profiler/Dumper/TextDumper.php', - 'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => $vendorDir . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php', - 'Twig\\Profiler\\Node\\EnterProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/EnterProfileNode.php', - 'Twig\\Profiler\\Node\\LeaveProfileNode' => $vendorDir . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php', - 'Twig\\Profiler\\Profile' => $vendorDir . '/twig/twig/src/Profiler/Profile.php', - 'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php', - 'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => $vendorDir . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php', - 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => $vendorDir . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php', - 'Twig\\Sandbox\\SecurityError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFilterError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php', - 'Twig\\Sandbox\\SecurityNotAllowedMethodError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php', - 'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php', - 'Twig\\Sandbox\\SecurityNotAllowedTagError' => $vendorDir . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php', - 'Twig\\Sandbox\\SecurityPolicy' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicy.php', - 'Twig\\Sandbox\\SecurityPolicyInterface' => $vendorDir . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php', - 'Twig\\Source' => $vendorDir . '/twig/twig/src/Source.php', - 'Twig\\Template' => $vendorDir . '/twig/twig/src/Template.php', - 'Twig\\TemplateWrapper' => $vendorDir . '/twig/twig/src/TemplateWrapper.php', - 'Twig\\Test\\IntegrationTestCase' => $vendorDir . '/twig/twig/src/Test/IntegrationTestCase.php', - 'Twig\\Test\\NodeTestCase' => $vendorDir . '/twig/twig/src/Test/NodeTestCase.php', - 'Twig\\Token' => $vendorDir . '/twig/twig/src/Token.php', - 'Twig\\TokenParser\\AbstractTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AbstractTokenParser.php', - 'Twig\\TokenParser\\ApplyTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ApplyTokenParser.php', - 'Twig\\TokenParser\\AutoEscapeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php', - 'Twig\\TokenParser\\BlockTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/BlockTokenParser.php', - 'Twig\\TokenParser\\DeprecatedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php', - 'Twig\\TokenParser\\DoTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/DoTokenParser.php', - 'Twig\\TokenParser\\EmbedTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/EmbedTokenParser.php', - 'Twig\\TokenParser\\ExtendsTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ExtendsTokenParser.php', - 'Twig\\TokenParser\\FlushTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FlushTokenParser.php', - 'Twig\\TokenParser\\ForTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ForTokenParser.php', - 'Twig\\TokenParser\\FromTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/FromTokenParser.php', - 'Twig\\TokenParser\\IfTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IfTokenParser.php', - 'Twig\\TokenParser\\ImportTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/ImportTokenParser.php', - 'Twig\\TokenParser\\IncludeTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/IncludeTokenParser.php', - 'Twig\\TokenParser\\MacroTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/MacroTokenParser.php', - 'Twig\\TokenParser\\SandboxTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SandboxTokenParser.php', - 'Twig\\TokenParser\\SetTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/SetTokenParser.php', - 'Twig\\TokenParser\\TokenParserInterface' => $vendorDir . '/twig/twig/src/TokenParser/TokenParserInterface.php', - 'Twig\\TokenParser\\UseTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/UseTokenParser.php', - 'Twig\\TokenParser\\WithTokenParser' => $vendorDir . '/twig/twig/src/TokenParser/WithTokenParser.php', - 'Twig\\TokenStream' => $vendorDir . '/twig/twig/src/TokenStream.php', - 'Twig\\TwigFilter' => $vendorDir . '/twig/twig/src/TwigFilter.php', - 'Twig\\TwigFunction' => $vendorDir . '/twig/twig/src/TwigFunction.php', - 'Twig\\TwigTest' => $vendorDir . '/twig/twig/src/TwigTest.php', - 'Twig\\Util\\DeprecationCollector' => $vendorDir . '/twig/twig/src/Util/DeprecationCollector.php', - 'Twig\\Util\\TemplateDirIterator' => $vendorDir . '/twig/twig/src/Util/TemplateDirIterator.php', - 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', -); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php deleted file mode 100644 index fe04e27..0000000 --- a/vendor/composer/autoload_files.php +++ /dev/null @@ -1,19 +0,0 @@ - $vendorDir . '/symfony/polyfill-php80/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', - '6a47392539ca2329373e0d33e1dba053' => $vendorDir . '/symfony/polyfill-intl-icu/bootstrap.php', -); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 15a2ff3..0000000 --- a/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/twig/twig/src'), - 'Symfony\\Runtime\\Symfony\\Component\\' => array($vendorDir . '/symfony/runtime/Internal'), - 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'), - 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), - 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), - 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), - 'Symfony\\Polyfill\\Intl\\Icu\\' => array($vendorDir . '/symfony/polyfill-intl-icu'), - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'), - 'Symfony\\Flex\\' => array($vendorDir . '/symfony/flex/src'), - 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), - 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), - 'Symfony\\Contracts\\HttpClient\\' => array($vendorDir . '/symfony/http-client-contracts'), - 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), - 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), - 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), - 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), - 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), - 'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'), - 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'), - 'Symfony\\Component\\Security\\Http\\' => array($vendorDir . '/symfony/security-http'), - 'Symfony\\Component\\Security\\Guard\\' => array($vendorDir . '/symfony/security-guard'), - 'Symfony\\Component\\Security\\Csrf\\' => array($vendorDir . '/symfony/security-csrf'), - 'Symfony\\Component\\Security\\Core\\' => array($vendorDir . '/symfony/security-core'), - 'Symfony\\Component\\Runtime\\' => array($vendorDir . '/symfony/runtime'), - 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), - 'Symfony\\Component\\PropertyInfo\\' => array($vendorDir . '/symfony/property-info'), - 'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'), - 'Symfony\\Component\\PasswordHasher\\' => array($vendorDir . '/symfony/password-hasher'), - 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), - 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), - 'Symfony\\Component\\HttpClient\\' => array($vendorDir . '/symfony/http-client'), - 'Symfony\\Component\\Form\\' => array($vendorDir . '/symfony/form'), - 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'), - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'), - 'Symfony\\Component\\Dotenv\\' => array($vendorDir . '/symfony/dotenv'), - 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), - 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), - 'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'), - 'Symfony\\Component\\Cache\\' => array($vendorDir . '/symfony/cache'), - 'Symfony\\Bundle\\WebProfilerBundle\\' => array($vendorDir . '/symfony/web-profiler-bundle'), - 'Symfony\\Bundle\\TwigBundle\\' => array($vendorDir . '/symfony/twig-bundle'), - 'Symfony\\Bundle\\SecurityBundle\\' => array($vendorDir . '/symfony/security-bundle'), - 'Symfony\\Bundle\\FrameworkBundle\\' => array($vendorDir . '/symfony/framework-bundle'), - 'Symfony\\Bridge\\Twig\\' => array($vendorDir . '/symfony/twig-bridge'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), - 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), - 'App\\Tests\\' => array($baseDir . '/tests'), - 'App\\' => array($baseDir . '/src'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 993c6a7..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,57 +0,0 @@ -register(true); - - $includeFiles = \Composer\Autoload\ComposerStaticInitb2423aa65ed6776e221b68b36212a5a3::$files; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireb2423aa65ed6776e221b68b36212a5a3($fileIdentifier, $file); - } - - return $loader; - } -} - -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ -function composerRequireb2423aa65ed6776e221b68b36212a5a3($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php deleted file mode 100644 index 024e371..0000000 --- a/vendor/composer/autoload_static.php +++ /dev/null @@ -1,2661 +0,0 @@ - __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', - '6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'T' => - array ( - 'Twig\\' => 5, - ), - 'S' => - array ( - 'Symfony\\Runtime\\Symfony\\Component\\' => 34, - 'Symfony\\Polyfill\\Php81\\' => 23, - 'Symfony\\Polyfill\\Php80\\' => 23, - 'Symfony\\Polyfill\\Php73\\' => 23, - 'Symfony\\Polyfill\\Mbstring\\' => 26, - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, - 'Symfony\\Polyfill\\Intl\\Icu\\' => 26, - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31, - 'Symfony\\Flex\\' => 13, - 'Symfony\\Contracts\\Translation\\' => 30, - 'Symfony\\Contracts\\Service\\' => 26, - 'Symfony\\Contracts\\HttpClient\\' => 29, - 'Symfony\\Contracts\\EventDispatcher\\' => 34, - 'Symfony\\Contracts\\Cache\\' => 24, - 'Symfony\\Component\\Yaml\\' => 23, - 'Symfony\\Component\\VarExporter\\' => 30, - 'Symfony\\Component\\VarDumper\\' => 28, - 'Symfony\\Component\\Validator\\' => 28, - 'Symfony\\Component\\String\\' => 25, - 'Symfony\\Component\\Security\\Http\\' => 32, - 'Symfony\\Component\\Security\\Guard\\' => 33, - 'Symfony\\Component\\Security\\Csrf\\' => 32, - 'Symfony\\Component\\Security\\Core\\' => 32, - 'Symfony\\Component\\Runtime\\' => 26, - 'Symfony\\Component\\Routing\\' => 26, - 'Symfony\\Component\\PropertyInfo\\' => 31, - 'Symfony\\Component\\PropertyAccess\\' => 33, - 'Symfony\\Component\\PasswordHasher\\' => 33, - 'Symfony\\Component\\OptionsResolver\\' => 34, - 'Symfony\\Component\\HttpKernel\\' => 29, - 'Symfony\\Component\\HttpFoundation\\' => 33, - 'Symfony\\Component\\HttpClient\\' => 29, - 'Symfony\\Component\\Form\\' => 23, - 'Symfony\\Component\\Finder\\' => 25, - 'Symfony\\Component\\Filesystem\\' => 29, - 'Symfony\\Component\\EventDispatcher\\' => 34, - 'Symfony\\Component\\ErrorHandler\\' => 31, - 'Symfony\\Component\\Dotenv\\' => 25, - 'Symfony\\Component\\DependencyInjection\\' => 38, - 'Symfony\\Component\\Console\\' => 26, - 'Symfony\\Component\\Config\\' => 25, - 'Symfony\\Component\\Cache\\' => 24, - 'Symfony\\Bundle\\WebProfilerBundle\\' => 33, - 'Symfony\\Bundle\\TwigBundle\\' => 26, - 'Symfony\\Bundle\\SecurityBundle\\' => 30, - 'Symfony\\Bundle\\FrameworkBundle\\' => 31, - 'Symfony\\Bridge\\Twig\\' => 20, - ), - 'P' => - array ( - 'Psr\\Log\\' => 8, - 'Psr\\EventDispatcher\\' => 20, - 'Psr\\Container\\' => 14, - 'Psr\\Cache\\' => 10, - ), - 'D' => - array ( - 'Doctrine\\Common\\Lexer\\' => 22, - 'Doctrine\\Common\\Annotations\\' => 28, - ), - 'A' => - array ( - 'App\\Tests\\' => 10, - 'App\\' => 4, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Twig\\' => - array ( - 0 => __DIR__ . '/..' . '/twig/twig/src', - ), - 'Symfony\\Runtime\\Symfony\\Component\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/runtime/Internal', - ), - 'Symfony\\Polyfill\\Php81\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php81', - ), - 'Symfony\\Polyfill\\Php80\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', - ), - 'Symfony\\Polyfill\\Php73\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php73', - ), - 'Symfony\\Polyfill\\Mbstring\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', - ), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', - ), - 'Symfony\\Polyfill\\Intl\\Icu\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-icu', - ), - 'Symfony\\Polyfill\\Intl\\Grapheme\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', - ), - 'Symfony\\Flex\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/flex/src', - ), - 'Symfony\\Contracts\\Translation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/translation-contracts', - ), - 'Symfony\\Contracts\\Service\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/service-contracts', - ), - 'Symfony\\Contracts\\HttpClient\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-client-contracts', - ), - 'Symfony\\Contracts\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', - ), - 'Symfony\\Contracts\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache-contracts', - ), - 'Symfony\\Component\\Yaml\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/yaml', - ), - 'Symfony\\Component\\VarExporter\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-exporter', - ), - 'Symfony\\Component\\VarDumper\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-dumper', - ), - 'Symfony\\Component\\Validator\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/validator', - ), - 'Symfony\\Component\\String\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/string', - ), - 'Symfony\\Component\\Security\\Http\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/security-http', - ), - 'Symfony\\Component\\Security\\Guard\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/security-guard', - ), - 'Symfony\\Component\\Security\\Csrf\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/security-csrf', - ), - 'Symfony\\Component\\Security\\Core\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/security-core', - ), - 'Symfony\\Component\\Runtime\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/runtime', - ), - 'Symfony\\Component\\Routing\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/routing', - ), - 'Symfony\\Component\\PropertyInfo\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/property-info', - ), - 'Symfony\\Component\\PropertyAccess\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/property-access', - ), - 'Symfony\\Component\\PasswordHasher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/password-hasher', - ), - 'Symfony\\Component\\OptionsResolver\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/options-resolver', - ), - 'Symfony\\Component\\HttpKernel\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-kernel', - ), - 'Symfony\\Component\\HttpFoundation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-foundation', - ), - 'Symfony\\Component\\HttpClient\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-client', - ), - 'Symfony\\Component\\Form\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/form', - ), - 'Symfony\\Component\\Finder\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/finder', - ), - 'Symfony\\Component\\Filesystem\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/filesystem', - ), - 'Symfony\\Component\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', - ), - 'Symfony\\Component\\ErrorHandler\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/error-handler', - ), - 'Symfony\\Component\\Dotenv\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dotenv', - ), - 'Symfony\\Component\\DependencyInjection\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dependency-injection', - ), - 'Symfony\\Component\\Console\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/console', - ), - 'Symfony\\Component\\Config\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/config', - ), - 'Symfony\\Component\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache', - ), - 'Symfony\\Bundle\\WebProfilerBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/web-profiler-bundle', - ), - 'Symfony\\Bundle\\TwigBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/twig-bundle', - ), - 'Symfony\\Bundle\\SecurityBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/security-bundle', - ), - 'Symfony\\Bundle\\FrameworkBundle\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/framework-bundle', - ), - 'Symfony\\Bridge\\Twig\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/twig-bridge', - ), - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', - ), - 'Psr\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', - ), - 'Psr\\Container\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/container/src', - ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', - ), - 'Doctrine\\Common\\Annotations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', - ), - 'App\\Tests\\' => - array ( - 0 => __DIR__ . '/../..' . '/tests', - ), - 'App\\' => - array ( - 0 => __DIR__ . '/../..' . '/src', - ), - ); - - public static $classMap = array ( - 'App\\Controller\\MainController' => __DIR__ . '/../..' . '/src/Controller/MainController.php', - 'App\\Entity\\User' => __DIR__ . '/../..' . '/src/Entity/User.php', - 'App\\Form\\UserType' => __DIR__ . '/../..' . '/src/Form/UserType.php', - 'App\\Kernel' => __DIR__ . '/../..' . '/src/Kernel.php', - 'App\\Services\\PdoServices' => __DIR__ . '/../..' . '/src/Services/PdoServices.php', - 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', - 'Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Doctrine\\Common\\Annotations\\Annotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', - 'Doctrine\\Common\\Annotations\\AnnotationException' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', - 'Doctrine\\Common\\Annotations\\AnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', - 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', - 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', - 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Required' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Target' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', - 'Doctrine\\Common\\Annotations\\CachedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php', - 'Doctrine\\Common\\Annotations\\DocLexer' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', - 'Doctrine\\Common\\Annotations\\DocParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', - 'Doctrine\\Common\\Annotations\\FileCacheReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php', - 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php', - 'Doctrine\\Common\\Annotations\\IndexedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', - 'Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php', - 'Doctrine\\Common\\Annotations\\PhpParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', - 'Doctrine\\Common\\Annotations\\PsrCachedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php', - 'Doctrine\\Common\\Annotations\\Reader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', - 'Doctrine\\Common\\Annotations\\SimpleAnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php', - 'Doctrine\\Common\\Annotations\\TokenParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php', - 'IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php', - 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', - 'Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Locale.php', - 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php', - 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php', - 'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php', - 'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php', - 'Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/cache/src/InvalidArgumentException.php', - 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', - 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', - 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', - 'Psr\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/EventDispatcherInterface.php', - 'Psr\\EventDispatcher\\ListenerProviderInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/ListenerProviderInterface.php', - 'Psr\\EventDispatcher\\StoppableEventInterface' => __DIR__ . '/..' . '/psr/event-dispatcher/src/StoppableEventInterface.php', - 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php', - 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php', - 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php', - 'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php', - 'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php', - 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', - 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', - 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', - 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', - 'Symfony\\Bridge\\Twig\\AppVariable' => __DIR__ . '/..' . '/symfony/twig-bridge/AppVariable.php', - 'Symfony\\Bridge\\Twig\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/twig-bridge/Command/DebugCommand.php', - 'Symfony\\Bridge\\Twig\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/twig-bridge/Command/LintCommand.php', - 'Symfony\\Bridge\\Twig\\DataCollector\\TwigDataCollector' => __DIR__ . '/..' . '/symfony/twig-bridge/DataCollector/TwigDataCollector.php', - 'Symfony\\Bridge\\Twig\\ErrorRenderer\\TwigErrorRenderer' => __DIR__ . '/..' . '/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php', - 'Symfony\\Bridge\\Twig\\Extension\\AssetExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/AssetExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CodeExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CodeExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CsrfExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\CsrfRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/CsrfRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\DumpExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/DumpExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/ExpressionExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\FormExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/FormExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpFoundationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpKernelExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/HttpKernelRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/LogoutUrlExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/ProfilerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\RoutingExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/RoutingExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SecurityExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SecurityExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SerializerExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\SerializerRuntime' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/SerializerRuntime.php', - 'Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/StopwatchExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\TranslationExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/TranslationExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WebLinkExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/WebLinkExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\WorkflowExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/WorkflowExtension.php', - 'Symfony\\Bridge\\Twig\\Extension\\YamlExtension' => __DIR__ . '/..' . '/symfony/twig-bridge/Extension/YamlExtension.php', - 'Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine' => __DIR__ . '/..' . '/symfony/twig-bridge/Form/TwigRendererEngine.php', - 'Symfony\\Bridge\\Twig\\Mime\\BodyRenderer' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/BodyRenderer.php', - 'Symfony\\Bridge\\Twig\\Mime\\NotificationEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/NotificationEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/TemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\Mime\\WrappedTemplatedEmail' => __DIR__ . '/..' . '/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\Scope' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/Scope.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationDefaultDomainNodeVisitor' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\NodeVisitor\\TranslationNodeVisitor' => __DIR__ . '/..' . '/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php', - 'Symfony\\Bridge\\Twig\\Node\\DumpNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/DumpNode.php', - 'Symfony\\Bridge\\Twig\\Node\\FormThemeNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/FormThemeNode.php', - 'Symfony\\Bridge\\Twig\\Node\\RenderBlockNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/RenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\SearchAndRenderBlockNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php', - 'Symfony\\Bridge\\Twig\\Node\\StopwatchNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/StopwatchNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransDefaultDomainNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/TransDefaultDomainNode.php', - 'Symfony\\Bridge\\Twig\\Node\\TransNode' => __DIR__ . '/..' . '/symfony/twig-bridge/Node/TransNode.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\DumpTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/DumpTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\FormThemeTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\StopwatchTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransDefaultDomainTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php', - 'Symfony\\Bridge\\Twig\\TokenParser\\TransTokenParser' => __DIR__ . '/..' . '/symfony/twig-bridge/TokenParser/TransTokenParser.php', - 'Symfony\\Bridge\\Twig\\Translation\\TwigExtractor' => __DIR__ . '/..' . '/symfony/twig-bridge/Translation/TwigExtractor.php', - 'Symfony\\Bridge\\Twig\\UndefinedCallableHandler' => __DIR__ . '/..' . '/symfony/twig-bridge/UndefinedCallableHandler.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AbstractPhpFileCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\AnnotationsCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\CachePoolClearerCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ConfigBuilderCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\SerializerCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TranslationsCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\ValidatorCacheWarmer' => __DIR__ . '/..' . '/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AboutCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AboutCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AbstractConfigCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AbstractConfigCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\AssetsInstallCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/AssetsInstallCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\BuildDebugContainerTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/BuildDebugContainerTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CacheClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolClearCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolClearCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolDeleteCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolDeleteCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolListCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CachePoolPruneCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CachePoolPruneCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\CacheWarmupCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/CacheWarmupCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ConfigDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ConfigDumpReferenceCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ContainerDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/ContainerLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\DebugAutowiringCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/DebugAutowiringCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\EventDispatcherDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/RouterDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\RouterMatchCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/RouterMatchCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsDecryptToLocalCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsEncryptFromLocalCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsGenerateKeysCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsListCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsListCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsRemoveCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsRemoveCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\SecretsSetCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/SecretsSetCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationDebugCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/TranslationDebugCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\TranslationUpdateCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/TranslationUpdateCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\WorkflowDumpCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/WorkflowDumpCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\XliffLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/XliffLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Command\\YamlLintCommand' => __DIR__ . '/..' . '/symfony/framework-bundle/Command/YamlLintCommand.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Application' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Application.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/Descriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php', - 'Symfony\\Bundle\\FrameworkBundle\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/framework-bundle/Console/Helper/DescriptorHelper.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/AbstractController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/ControllerResolver.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/RedirectController.php', - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController' => __DIR__ . '/..' . '/symfony/framework-bundle/Controller/TemplateController.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\AbstractDataCollector' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/AbstractDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/RouterDataCollector.php', - 'Symfony\\Bundle\\FrameworkBundle\\DataCollector\\TemplateAwareDataCollectorInterface' => __DIR__ . '/..' . '/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddAnnotationsCachedReaderPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddDebugLogProcessorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\AssetsContextPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ContainerBuilderDebugDumpPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\DataCollectorTranslatorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\LoggingTranslatorPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\ProfilerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\RemoveUnusedSessionMarshallingHandlerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\SessionPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerRealRefPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\TestServiceContainerWeakRefPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\UnusedTagsPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Compiler\\WorkflowGuardListenerPass' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension' => __DIR__ . '/..' . '/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php', - 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber' => __DIR__ . '/..' . '/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php', - 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => __DIR__ . '/..' . '/symfony/framework-bundle/FrameworkBundle.php', - 'Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache' => __DIR__ . '/..' . '/symfony/framework-bundle/HttpCache/HttpCache.php', - 'Symfony\\Bundle\\FrameworkBundle\\KernelBrowser' => __DIR__ . '/..' . '/symfony/framework-bundle/KernelBrowser.php', - 'Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Kernel/MicroKernelTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\AnnotatedRouteControllerLoader' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/DelegatingLoader.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableCompiledUrlMatcher' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RouteLoaderInterface' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/RouteLoaderInterface.php', - 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router' => __DIR__ . '/..' . '/symfony/framework-bundle/Routing/Router.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\AbstractVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/AbstractVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\DotenvVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/DotenvVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Secrets\\SodiumVault' => __DIR__ . '/..' . '/symfony/framework-bundle/Secrets/SodiumVault.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\DeprecatedSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/DeprecatedSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Session\\ServiceSessionFactory' => __DIR__ . '/..' . '/symfony/framework-bundle/Session/ServiceSessionFactory.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\BrowserKitAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\DomCrawlerAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/KernelTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\MailerAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/MailerAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestBrowserToken' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/TestBrowserToken.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\TestContainer' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/TestContainer.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestAssertionsTrait' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/WebTestAssertionsTrait.php', - 'Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase' => __DIR__ . '/..' . '/symfony/framework-bundle/Test/WebTestCase.php', - 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/framework-bundle/Translation/Translator.php', - 'Symfony\\Bundle\\SecurityBundle\\CacheWarmer\\ExpressionCacheWarmer' => __DIR__ . '/..' . '/symfony/security-bundle/CacheWarmer/ExpressionCacheWarmer.php', - 'Symfony\\Bundle\\SecurityBundle\\Command\\DebugFirewallCommand' => __DIR__ . '/..' . '/symfony/security-bundle/Command/DebugFirewallCommand.php', - 'Symfony\\Bundle\\SecurityBundle\\Command\\UserPasswordEncoderCommand' => __DIR__ . '/..' . '/symfony/security-bundle/Command/UserPasswordEncoderCommand.php', - 'Symfony\\Bundle\\SecurityBundle\\DataCollector\\SecurityDataCollector' => __DIR__ . '/..' . '/symfony/security-bundle/DataCollector/SecurityDataCollector.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener' => __DIR__ . '/..' . '/symfony/security-bundle/Debug/TraceableFirewallListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableListenerTrait' => __DIR__ . '/..' . '/symfony/security-bundle/Debug/TraceableListenerTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\WrappedLazyListener' => __DIR__ . '/..' . '/symfony/security-bundle/Debug/WrappedLazyListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/security-bundle/Debug/WrappedListener.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddExpressionLanguageProvidersPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddSecurityVotersPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/AddSecurityVotersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\AddSessionDomainConstraintPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\CleanRememberMeVerifierPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterCsrfFeaturesPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterCsrfTokenClearingLogoutHandlerPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterEntryPointPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterEntryPointPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterGlobalSecurityEventListenersPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterLdapLocatorPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\RegisterTokenUsageTrackingPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\ReplaceDecoratedRememberMeHandlerPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Compiler\\SortFirewallListenersPass' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Compiler/SortFirewallListenersPass.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\MainConfiguration' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/MainConfiguration.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\SecurityExtension' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/SecurityExtension.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AbstractFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AnonymousFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/AnonymousFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\AuthenticatorFactoryInterface' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\CustomAuthenticatorFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FirewallListenerFactoryInterface' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FormLoginFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\FormLoginLdapFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\GuardAuthenticationFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\HttpBasicFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\HttpBasicLdapFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\JsonLoginFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\JsonLoginLdapFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LdapFactoryTrait' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/LdapFactoryTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LoginLinkFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/LoginLinkFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\LoginThrottlingFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\RememberMeFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/RememberMeFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\RemoteUserFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/RemoteUserFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\SecurityFactoryInterface' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\Factory\\X509Factory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/Factory/X509Factory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\InMemoryFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\LdapFactory' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/LdapFactory.php', - 'Symfony\\Bundle\\SecurityBundle\\DependencyInjection\\Security\\UserProvider\\UserProviderFactoryInterface' => __DIR__ . '/..' . '/symfony/security-bundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php', - 'Symfony\\Bundle\\SecurityBundle\\EventListener\\FirewallListener' => __DIR__ . '/..' . '/symfony/security-bundle/EventListener/FirewallListener.php', - 'Symfony\\Bundle\\SecurityBundle\\EventListener\\VoteListener' => __DIR__ . '/..' . '/symfony/security-bundle/EventListener/VoteListener.php', - 'Symfony\\Bundle\\SecurityBundle\\LoginLink\\FirewallAwareLoginLinkHandler' => __DIR__ . '/..' . '/symfony/security-bundle/LoginLink/FirewallAwareLoginLinkHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\RememberMe\\DecoratedRememberMeHandler' => __DIR__ . '/..' . '/symfony/security-bundle/RememberMe/DecoratedRememberMeHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\RememberMe\\FirewallAwareRememberMeHandler' => __DIR__ . '/..' . '/symfony/security-bundle/RememberMe/FirewallAwareRememberMeHandler.php', - 'Symfony\\Bundle\\SecurityBundle\\SecurityBundle' => __DIR__ . '/..' . '/symfony/security-bundle/SecurityBundle.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallAwareTrait' => __DIR__ . '/..' . '/symfony/security-bundle/Security/FirewallAwareTrait.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallConfig' => __DIR__ . '/..' . '/symfony/security-bundle/Security/FirewallConfig.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext' => __DIR__ . '/..' . '/symfony/security-bundle/Security/FirewallContext.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap' => __DIR__ . '/..' . '/symfony/security-bundle/Security/FirewallMap.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\LazyFirewallContext' => __DIR__ . '/..' . '/symfony/security-bundle/Security/LazyFirewallContext.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\LegacyLogoutHandlerListener' => __DIR__ . '/..' . '/symfony/security-bundle/Security/LegacyLogoutHandlerListener.php', - 'Symfony\\Bundle\\SecurityBundle\\Security\\UserAuthenticator' => __DIR__ . '/..' . '/symfony/security-bundle/Security/UserAuthenticator.php', - 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer' => __DIR__ . '/..' . '/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php', - 'Symfony\\Bundle\\TwigBundle\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/twig-bundle/Command/LintCommand.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\ExtensionPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\RuntimeLoaderPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigEnvironmentPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Compiler\\TwigLoaderPass' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php', - 'Symfony\\Bundle\\TwigBundle\\DependencyInjection\\TwigExtension' => __DIR__ . '/..' . '/symfony/twig-bundle/DependencyInjection/TwigExtension.php', - 'Symfony\\Bundle\\TwigBundle\\TemplateIterator' => __DIR__ . '/..' . '/symfony/twig-bundle/TemplateIterator.php', - 'Symfony\\Bundle\\TwigBundle\\TwigBundle' => __DIR__ . '/..' . '/symfony/twig-bundle/TwigBundle.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ExceptionPanelController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/ProfilerController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\RouterController' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Controller/RouterController.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\ContentSecurityPolicyHandler' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Csp\\NonceGenerator' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Csp/NonceGenerator.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/DependencyInjection/Configuration.php', - 'Symfony\\Bundle\\WebProfilerBundle\\DependencyInjection\\WebProfilerExtension' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Profiler\\TemplateManager' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Profiler/TemplateManager.php', - 'Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php', - 'Symfony\\Bundle\\WebProfilerBundle\\WebProfilerBundle' => __DIR__ . '/..' . '/symfony/web-profiler-bundle/WebProfilerBundle.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/AbstractAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AbstractTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/AbstractTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\AdapterInterface' => __DIR__ . '/..' . '/symfony/cache/Adapter/AdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\ApcuAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ApcuAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ArrayAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ChainAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ChainAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseBucketAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/CouchbaseBucketAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\CouchbaseCollectionAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/CouchbaseCollectionAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/DoctrineAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\DoctrineDbalAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/DoctrineDbalAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/FilesystemAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\FilesystemTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/FilesystemTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\MemcachedAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/MemcachedAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\NullAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/NullAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ParameterNormalizer' => __DIR__ . '/..' . '/symfony/cache/Adapter/ParameterNormalizer.php', - 'Symfony\\Component\\Cache\\Adapter\\PdoAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PdoAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PhpArrayAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\PhpFilesAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/PhpFilesAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\ProxyAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/ProxyAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\Psr16Adapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/Psr16Adapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/RedisAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/RedisTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TagAwareAdapterInterface' => __DIR__ . '/..' . '/symfony/cache/Adapter/TagAwareAdapterInterface.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableAdapter.php', - 'Symfony\\Component\\Cache\\Adapter\\TraceableTagAwareAdapter' => __DIR__ . '/..' . '/symfony/cache/Adapter/TraceableTagAwareAdapter.php', - 'Symfony\\Component\\Cache\\CacheItem' => __DIR__ . '/..' . '/symfony/cache/CacheItem.php', - 'Symfony\\Component\\Cache\\DataCollector\\CacheDataCollector' => __DIR__ . '/..' . '/symfony/cache/DataCollector/CacheDataCollector.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CacheCollectorPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CacheCollectorPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolClearerPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolClearerPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolPass.php', - 'Symfony\\Component\\Cache\\DependencyInjection\\CachePoolPrunerPass' => __DIR__ . '/..' . '/symfony/cache/DependencyInjection/CachePoolPrunerPass.php', - 'Symfony\\Component\\Cache\\DoctrineProvider' => __DIR__ . '/..' . '/symfony/cache/DoctrineProvider.php', - 'Symfony\\Component\\Cache\\Exception\\CacheException' => __DIR__ . '/..' . '/symfony/cache/Exception/CacheException.php', - 'Symfony\\Component\\Cache\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/cache/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Cache\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/cache/Exception/LogicException.php', - 'Symfony\\Component\\Cache\\LockRegistry' => __DIR__ . '/..' . '/symfony/cache/LockRegistry.php', - 'Symfony\\Component\\Cache\\Marshaller\\DefaultMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/DefaultMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\DeflateMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/DeflateMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface' => __DIR__ . '/..' . '/symfony/cache/Marshaller/MarshallerInterface.php', - 'Symfony\\Component\\Cache\\Marshaller\\SodiumMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/SodiumMarshaller.php', - 'Symfony\\Component\\Cache\\Marshaller\\TagAwareMarshaller' => __DIR__ . '/..' . '/symfony/cache/Marshaller/TagAwareMarshaller.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationDispatcher' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationDispatcher.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationHandler' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationHandler.php', - 'Symfony\\Component\\Cache\\Messenger\\EarlyExpirationMessage' => __DIR__ . '/..' . '/symfony/cache/Messenger/EarlyExpirationMessage.php', - 'Symfony\\Component\\Cache\\PruneableInterface' => __DIR__ . '/..' . '/symfony/cache/PruneableInterface.php', - 'Symfony\\Component\\Cache\\Psr16Cache' => __DIR__ . '/..' . '/symfony/cache/Psr16Cache.php', - 'Symfony\\Component\\Cache\\ResettableInterface' => __DIR__ . '/..' . '/symfony/cache/ResettableInterface.php', - 'Symfony\\Component\\Cache\\Traits\\AbstractAdapterTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/AbstractAdapterTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ContractsTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ContractsTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemCommonTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/FilesystemCommonTrait.php', - 'Symfony\\Component\\Cache\\Traits\\FilesystemTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/FilesystemTrait.php', - 'Symfony\\Component\\Cache\\Traits\\ProxyTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/ProxyTrait.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterNodeProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisClusterNodeProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisClusterProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisClusterProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisProxy' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisProxy.php', - 'Symfony\\Component\\Cache\\Traits\\RedisTrait' => __DIR__ . '/..' . '/symfony/cache/Traits/RedisTrait.php', - 'Symfony\\Component\\Config\\Builder\\ClassBuilder' => __DIR__ . '/..' . '/symfony/config/Builder/ClassBuilder.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGenerator' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderGenerator.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderGeneratorInterface' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderGeneratorInterface.php', - 'Symfony\\Component\\Config\\Builder\\ConfigBuilderInterface' => __DIR__ . '/..' . '/symfony/config/Builder/ConfigBuilderInterface.php', - 'Symfony\\Component\\Config\\Builder\\Method' => __DIR__ . '/..' . '/symfony/config/Builder/Method.php', - 'Symfony\\Component\\Config\\Builder\\Property' => __DIR__ . '/..' . '/symfony/config/Builder/Property.php', - 'Symfony\\Component\\Config\\ConfigCache' => __DIR__ . '/..' . '/symfony/config/ConfigCache.php', - 'Symfony\\Component\\Config\\ConfigCacheFactory' => __DIR__ . '/..' . '/symfony/config/ConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ConfigCacheFactoryInterface' => __DIR__ . '/..' . '/symfony/config/ConfigCacheFactoryInterface.php', - 'Symfony\\Component\\Config\\ConfigCacheInterface' => __DIR__ . '/..' . '/symfony/config/ConfigCacheInterface.php', - 'Symfony\\Component\\Config\\Definition\\ArrayNode' => __DIR__ . '/..' . '/symfony/config/Definition/ArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\BaseNode' => __DIR__ . '/..' . '/symfony/config/Definition/BaseNode.php', - 'Symfony\\Component\\Config\\Definition\\BooleanNode' => __DIR__ . '/..' . '/symfony/config/Definition/BooleanNode.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ArrayNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BooleanNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/BooleanNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\BuilderAwareInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/BuilderAwareInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\EnumNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/EnumNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ExprBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ExprBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\FloatNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/FloatNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/IntegerNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\MergeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/MergeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NodeParentInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NormalizationBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NormalizationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\NumericNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/NumericNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ParentNodeDefinitionInterface' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ScalarNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ScalarNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/TreeBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\ValidationBuilder' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/ValidationBuilder.php', - 'Symfony\\Component\\Config\\Definition\\Builder\\VariableNodeDefinition' => __DIR__ . '/..' . '/symfony/config/Definition/Builder/VariableNodeDefinition.php', - 'Symfony\\Component\\Config\\Definition\\ConfigurationInterface' => __DIR__ . '/..' . '/symfony/config/Definition/ConfigurationInterface.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\XmlReferenceDumper' => __DIR__ . '/..' . '/symfony/config/Definition/Dumper/XmlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\Dumper\\YamlReferenceDumper' => __DIR__ . '/..' . '/symfony/config/Definition/Dumper/YamlReferenceDumper.php', - 'Symfony\\Component\\Config\\Definition\\EnumNode' => __DIR__ . '/..' . '/symfony/config/Definition/EnumNode.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\DuplicateKeyException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/DuplicateKeyException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\Exception' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/Exception.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\ForbiddenOverwriteException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/ForbiddenOverwriteException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidDefinitionException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidDefinitionException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/InvalidTypeException.php', - 'Symfony\\Component\\Config\\Definition\\Exception\\UnsetKeyException' => __DIR__ . '/..' . '/symfony/config/Definition/Exception/UnsetKeyException.php', - 'Symfony\\Component\\Config\\Definition\\FloatNode' => __DIR__ . '/..' . '/symfony/config/Definition/FloatNode.php', - 'Symfony\\Component\\Config\\Definition\\IntegerNode' => __DIR__ . '/..' . '/symfony/config/Definition/IntegerNode.php', - 'Symfony\\Component\\Config\\Definition\\NodeInterface' => __DIR__ . '/..' . '/symfony/config/Definition/NodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\NumericNode' => __DIR__ . '/..' . '/symfony/config/Definition/NumericNode.php', - 'Symfony\\Component\\Config\\Definition\\Processor' => __DIR__ . '/..' . '/symfony/config/Definition/Processor.php', - 'Symfony\\Component\\Config\\Definition\\PrototypeNodeInterface' => __DIR__ . '/..' . '/symfony/config/Definition/PrototypeNodeInterface.php', - 'Symfony\\Component\\Config\\Definition\\PrototypedArrayNode' => __DIR__ . '/..' . '/symfony/config/Definition/PrototypedArrayNode.php', - 'Symfony\\Component\\Config\\Definition\\ScalarNode' => __DIR__ . '/..' . '/symfony/config/Definition/ScalarNode.php', - 'Symfony\\Component\\Config\\Definition\\VariableNode' => __DIR__ . '/..' . '/symfony/config/Definition/VariableNode.php', - 'Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException' => __DIR__ . '/..' . '/symfony/config/Exception/FileLoaderImportCircularReferenceException.php', - 'Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException' => __DIR__ . '/..' . '/symfony/config/Exception/FileLocatorFileNotFoundException.php', - 'Symfony\\Component\\Config\\Exception\\LoaderLoadException' => __DIR__ . '/..' . '/symfony/config/Exception/LoaderLoadException.php', - 'Symfony\\Component\\Config\\FileLocator' => __DIR__ . '/..' . '/symfony/config/FileLocator.php', - 'Symfony\\Component\\Config\\FileLocatorInterface' => __DIR__ . '/..' . '/symfony/config/FileLocatorInterface.php', - 'Symfony\\Component\\Config\\Loader\\DelegatingLoader' => __DIR__ . '/..' . '/symfony/config/Loader/DelegatingLoader.php', - 'Symfony\\Component\\Config\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/config/Loader/FileLoader.php', - 'Symfony\\Component\\Config\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/config/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Config\\Loader\\Loader' => __DIR__ . '/..' . '/symfony/config/Loader/Loader.php', - 'Symfony\\Component\\Config\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderInterface.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolver' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderResolver.php', - 'Symfony\\Component\\Config\\Loader\\LoaderResolverInterface' => __DIR__ . '/..' . '/symfony/config/Loader/LoaderResolverInterface.php', - 'Symfony\\Component\\Config\\Loader\\ParamConfigurator' => __DIR__ . '/..' . '/symfony/config/Loader/ParamConfigurator.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCache' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerConfigCache.php', - 'Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerConfigCacheFactory.php', - 'Symfony\\Component\\Config\\ResourceCheckerInterface' => __DIR__ . '/..' . '/symfony/config/ResourceCheckerInterface.php', - 'Symfony\\Component\\Config\\Resource\\ClassExistenceResource' => __DIR__ . '/..' . '/symfony/config/Resource/ClassExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\ComposerResource' => __DIR__ . '/..' . '/symfony/config/Resource/ComposerResource.php', - 'Symfony\\Component\\Config\\Resource\\DirectoryResource' => __DIR__ . '/..' . '/symfony/config/Resource/DirectoryResource.php', - 'Symfony\\Component\\Config\\Resource\\FileExistenceResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileExistenceResource.php', - 'Symfony\\Component\\Config\\Resource\\FileResource' => __DIR__ . '/..' . '/symfony/config/Resource/FileResource.php', - 'Symfony\\Component\\Config\\Resource\\GlobResource' => __DIR__ . '/..' . '/symfony/config/Resource/GlobResource.php', - 'Symfony\\Component\\Config\\Resource\\ReflectionClassResource' => __DIR__ . '/..' . '/symfony/config/Resource/ReflectionClassResource.php', - 'Symfony\\Component\\Config\\Resource\\ResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/ResourceInterface.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceChecker' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceChecker.php', - 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' => __DIR__ . '/..' . '/symfony/config/Resource/SelfCheckingResourceInterface.php', - 'Symfony\\Component\\Config\\Util\\Exception\\InvalidXmlException' => __DIR__ . '/..' . '/symfony/config/Util/Exception/InvalidXmlException.php', - 'Symfony\\Component\\Config\\Util\\Exception\\XmlParsingException' => __DIR__ . '/..' . '/symfony/config/Util/Exception/XmlParsingException.php', - 'Symfony\\Component\\Config\\Util\\XmlUtils' => __DIR__ . '/..' . '/symfony/config/Util/XmlUtils.php', - 'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php', - 'Symfony\\Component\\Console\\Attribute\\AsCommand' => __DIR__ . '/..' . '/symfony/console/Attribute/AsCommand.php', - 'Symfony\\Component\\Console\\CI\\GithubActionReporter' => __DIR__ . '/..' . '/symfony/console/CI/GithubActionReporter.php', - 'Symfony\\Component\\Console\\Color' => __DIR__ . '/..' . '/symfony/console/Color.php', - 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php', - 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php', - 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php', - 'Symfony\\Component\\Console\\Command\\CompleteCommand' => __DIR__ . '/..' . '/symfony/console/Command/CompleteCommand.php', - 'Symfony\\Component\\Console\\Command\\DumpCompletionCommand' => __DIR__ . '/..' . '/symfony/console/Command/DumpCompletionCommand.php', - 'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php', - 'Symfony\\Component\\Console\\Command\\LazyCommand' => __DIR__ . '/..' . '/symfony/console/Command/LazyCommand.php', - 'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php', - 'Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php', - 'Symfony\\Component\\Console\\Command\\SignalableCommandInterface' => __DIR__ . '/..' . '/symfony/console/Command/SignalableCommandInterface.php', - 'Symfony\\Component\\Console\\Completion\\CompletionInput' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionInput.php', - 'Symfony\\Component\\Console\\Completion\\CompletionSuggestions' => __DIR__ . '/..' . '/symfony/console/Completion/CompletionSuggestions.php', - 'Symfony\\Component\\Console\\Completion\\Output\\BashCompletionOutput' => __DIR__ . '/..' . '/symfony/console/Completion/Output/BashCompletionOutput.php', - 'Symfony\\Component\\Console\\Completion\\Output\\CompletionOutputInterface' => __DIR__ . '/..' . '/symfony/console/Completion/Output/CompletionOutputInterface.php', - 'Symfony\\Component\\Console\\Completion\\Suggestion' => __DIR__ . '/..' . '/symfony/console/Completion/Suggestion.php', - 'Symfony\\Component\\Console\\ConsoleEvents' => __DIR__ . '/..' . '/symfony/console/ConsoleEvents.php', - 'Symfony\\Component\\Console\\Cursor' => __DIR__ . '/..' . '/symfony/console/Cursor.php', - 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => __DIR__ . '/..' . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php', - 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => __DIR__ . '/..' . '/symfony/console/Descriptor/ApplicationDescription.php', - 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php', - 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php', - 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/console/EventListener/ErrorListener.php', - 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleErrorEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleSignalEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleSignalEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleTerminateEvent.php', - 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/CommandNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/console/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidOptionException.php', - 'Symfony\\Component\\Console\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/console/Exception/LogicException.php', - 'Symfony\\Component\\Console\\Exception\\MissingInputException' => __DIR__ . '/..' . '/symfony/console/Exception/MissingInputException.php', - 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/NamespaceNotFoundException.php', - 'Symfony\\Component\\Console\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/console/Exception/RuntimeException.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\NullOutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/NullOutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleStack.php', - 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Console\\Helper\\Dumper' => __DIR__ . '/..' . '/symfony/console/Helper/Dumper.php', - 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php', - 'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/..' . '/symfony/console/Helper/HelperSet.php', - 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php', - 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressIndicator.php', - 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/QuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/SymfonyQuestionHelper.php', - 'Symfony\\Component\\Console\\Helper\\Table' => __DIR__ . '/..' . '/symfony/console/Helper/Table.php', - 'Symfony\\Component\\Console\\Helper\\TableCell' => __DIR__ . '/..' . '/symfony/console/Helper/TableCell.php', - 'Symfony\\Component\\Console\\Helper\\TableCellStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableCellStyle.php', - 'Symfony\\Component\\Console\\Helper\\TableRows' => __DIR__ . '/..' . '/symfony/console/Helper/TableRows.php', - 'Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php', - 'Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php', - 'Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/..' . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/..' . '/symfony/console/Input/Input.php', - 'Symfony\\Component\\Console\\Input\\InputArgument' => __DIR__ . '/..' . '/symfony/console/Input/InputArgument.php', - 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputAwareInterface.php', - 'Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php', - 'Symfony\\Component\\Console\\Input\\InputInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputInterface.php', - 'Symfony\\Component\\Console\\Input\\InputOption' => __DIR__ . '/..' . '/symfony/console/Input/InputOption.php', - 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => __DIR__ . '/..' . '/symfony/console/Input/StreamableInputInterface.php', - 'Symfony\\Component\\Console\\Input\\StringInput' => __DIR__ . '/..' . '/symfony/console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => __DIR__ . '/..' . '/symfony/console/Logger/ConsoleLogger.php', - 'Symfony\\Component\\Console\\Output\\BufferedOutput' => __DIR__ . '/..' . '/symfony/console/Output/BufferedOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutputInterface.php', - 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleSectionOutput.php', - 'Symfony\\Component\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/symfony/console/Output/NullOutput.php', - 'Symfony\\Component\\Console\\Output\\Output' => __DIR__ . '/..' . '/symfony/console/Output/Output.php', - 'Symfony\\Component\\Console\\Output\\OutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/OutputInterface.php', - 'Symfony\\Component\\Console\\Output\\StreamOutput' => __DIR__ . '/..' . '/symfony/console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => __DIR__ . '/..' . '/symfony/console/Output/TrimmedBufferOutput.php', - 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ChoiceQuestion.php', - 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ConfirmationQuestion.php', - 'Symfony\\Component\\Console\\Question\\Question' => __DIR__ . '/..' . '/symfony/console/Question/Question.php', - 'Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry' => __DIR__ . '/..' . '/symfony/console/SignalRegistry/SignalRegistry.php', - 'Symfony\\Component\\Console\\SingleCommandApplication' => __DIR__ . '/..' . '/symfony/console/SingleCommandApplication.php', - 'Symfony\\Component\\Console\\Style\\OutputStyle' => __DIR__ . '/..' . '/symfony/console/Style/OutputStyle.php', - 'Symfony\\Component\\Console\\Style\\StyleInterface' => __DIR__ . '/..' . '/symfony/console/Style/StyleInterface.php', - 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => __DIR__ . '/..' . '/symfony/console/Style/SymfonyStyle.php', - 'Symfony\\Component\\Console\\Terminal' => __DIR__ . '/..' . '/symfony/console/Terminal.php', - 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => __DIR__ . '/..' . '/symfony/console/Tester/ApplicationTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandCompletionTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandCompletionTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandTester.php', - 'Symfony\\Component\\Console\\Tester\\Constraint\\CommandIsSuccessful' => __DIR__ . '/..' . '/symfony/console/Tester/Constraint/CommandIsSuccessful.php', - 'Symfony\\Component\\Console\\Tester\\TesterTrait' => __DIR__ . '/..' . '/symfony/console/Tester/TesterTrait.php', - 'Symfony\\Component\\DependencyInjection\\Alias' => __DIR__ . '/..' . '/symfony/dependency-injection/Alias.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\AbstractArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/AbstractArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ArgumentInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ArgumentInterface.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\BoundArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/BoundArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\IteratorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/IteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ReferenceSetArgumentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\RewindableGenerator' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/RewindableGenerator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceClosureArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceClosureArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocatorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/ServiceLocatorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Argument\\TaggedIteratorArgument' => __DIR__ . '/..' . '/symfony/dependency-injection/Argument/TaggedIteratorArgument.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AsTaggedItem' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/AsTaggedItem.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/Autoconfigure.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\AutoconfigureTag' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/AutoconfigureTag.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/TaggedIterator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/TaggedLocator.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\Target' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/Target.php', - 'Symfony\\Component\\DependencyInjection\\Attribute\\When' => __DIR__ . '/..' . '/symfony/dependency-injection/Attribute/When.php', - 'Symfony\\Component\\DependencyInjection\\ChildDefinition' => __DIR__ . '/..' . '/symfony/dependency-injection/ChildDefinition.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AbstractRecursivePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AliasDeprecatedPublicServicesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AnalyzeServiceReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AttributeAutoconfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutoAliasServicePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutoAliasServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowirePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowirePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredMethodsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\AutowireRequiredPropertiesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckArgumentsValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckCircularReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckDefinitionValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckReferenceValidityPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CheckTypeDeclarationsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\Compiler' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/Compiler.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/CompilerPassInterface.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DecoratorServicePass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/DecoratorServicePass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\DefinitionErrorExceptionPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ExtensionCompilerPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\InlineServiceDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PassConfig' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PassConfig.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\PriorityTaggedServiceTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterAutoconfigureAttributesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterEnvVarProcessorsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterReverseContainerPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RegisterServiceSubscribersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveAbstractDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemovePrivateAliasesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\RemoveUnusedDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ReplaceAliasByActualDefinitionPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveBindingsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveBindingsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveChildDefinitionsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveClassPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveDecoratorStackPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveEnvPlaceholdersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveFactoryClassPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveHotPathPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveHotPathPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInstanceofConditionalsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveInvalidReferencesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNamedArgumentsPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveNoPreloadPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveParameterPlaceHoldersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolvePrivatesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveReferencesToAliasesPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveServiceSubscribersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ResolveTaggedIteratorArgumentPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceLocatorTagPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraph' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphEdge' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ServiceReferenceGraphNode' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php', - 'Symfony\\Component\\DependencyInjection\\Compiler\\ValidateEnvPlaceholdersPass' => __DIR__ . '/..' . '/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResource' => __DIR__ . '/..' . '/symfony/dependency-injection/Config/ContainerParametersResource.php', - 'Symfony\\Component\\DependencyInjection\\Config\\ContainerParametersResourceChecker' => __DIR__ . '/..' . '/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php', - 'Symfony\\Component\\DependencyInjection\\Container' => __DIR__ . '/..' . '/symfony/dependency-injection/Container.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerAwareInterface.php', - 'Symfony\\Component\\DependencyInjection\\ContainerAwareTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerAwareTrait.php', - 'Symfony\\Component\\DependencyInjection\\ContainerBuilder' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerBuilder.php', - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\Definition' => __DIR__ . '/..' . '/symfony/dependency-injection/Definition.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Dumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/Dumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\GraphvizDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/GraphvizDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\PhpDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/PhpDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\Preloader' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/Preloader.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\XmlDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/XmlDumper.php', - 'Symfony\\Component\\DependencyInjection\\Dumper\\YamlDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/Dumper/YamlDumper.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarLoaderInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarLoaderInterface.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessor' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarProcessor.php', - 'Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/EnvVarProcessorInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/AutowiringFailedException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/BadMethodCallException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/EnvNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/EnvParameterException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ExceptionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidParameterTypeException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/InvalidParameterTypeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/LogicException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ParameterNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/RuntimeException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php', - 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException' => __DIR__ . '/..' . '/symfony/dependency-injection/Exception/ServiceNotFoundException.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguage' => __DIR__ . '/..' . '/symfony/dependency-injection/ExpressionLanguage.php', - 'Symfony\\Component\\DependencyInjection\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/dependency-injection/ExpressionLanguageProvider.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ConfigurationExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\Extension' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/Extension.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/ExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/Extension/PrependExtensionInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\InstantiatorInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\Instantiator\\RealServiceInstantiator' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\NullDumper' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php', - 'Symfony\\Component\\DependencyInjection\\LazyProxy\\ProxyHelper' => __DIR__ . '/..' . '/symfony/dependency-injection/LazyProxy/ProxyHelper.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\ClosureLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/ClosureLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AbstractServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\AliasConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ClosureReferenceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\DefaultsConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\EnvConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InlineServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\InstanceofConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ParametersConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\PrototypeConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ReferenceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServiceConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ServicesConfigurator' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AbstractTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ArgumentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutoconfigureTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\AutowireTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\BindTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\CallTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ClassTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ConfiguratorTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DecorateTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\DeprecateTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FactoryTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\FileTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\LazyTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ParentTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PropertyTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\PublicTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\ShareTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\SyntheticTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\Traits\\TagTrait' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\DirectoryLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/DirectoryLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/FileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/GlobFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/IniFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/PhpFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/XmlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/dependency-injection/Loader/YamlFileLoader.php', - 'Symfony\\Component\\DependencyInjection\\Parameter' => __DIR__ . '/..' . '/symfony/dependency-injection/Parameter.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ContainerBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\EnvPlaceholderParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ParameterBag.php', - 'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php', - 'Symfony\\Component\\DependencyInjection\\Reference' => __DIR__ . '/..' . '/symfony/dependency-injection/Reference.php', - 'Symfony\\Component\\DependencyInjection\\ReverseContainer' => __DIR__ . '/..' . '/symfony/dependency-injection/ReverseContainer.php', - 'Symfony\\Component\\DependencyInjection\\ServiceLocator' => __DIR__ . '/..' . '/symfony/dependency-injection/ServiceLocator.php', - 'Symfony\\Component\\DependencyInjection\\TaggedContainerInterface' => __DIR__ . '/..' . '/symfony/dependency-injection/TaggedContainerInterface.php', - 'Symfony\\Component\\DependencyInjection\\TypedReference' => __DIR__ . '/..' . '/symfony/dependency-injection/TypedReference.php', - 'Symfony\\Component\\DependencyInjection\\Variable' => __DIR__ . '/..' . '/symfony/dependency-injection/Variable.php', - 'Symfony\\Component\\Dotenv\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/dotenv/Command/DebugCommand.php', - 'Symfony\\Component\\Dotenv\\Command\\DotenvDumpCommand' => __DIR__ . '/..' . '/symfony/dotenv/Command/DotenvDumpCommand.php', - 'Symfony\\Component\\Dotenv\\Dotenv' => __DIR__ . '/..' . '/symfony/dotenv/Dotenv.php', - 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/dotenv/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatException' => __DIR__ . '/..' . '/symfony/dotenv/Exception/FormatException.php', - 'Symfony\\Component\\Dotenv\\Exception\\FormatExceptionContext' => __DIR__ . '/..' . '/symfony/dotenv/Exception/FormatExceptionContext.php', - 'Symfony\\Component\\Dotenv\\Exception\\PathException' => __DIR__ . '/..' . '/symfony/dotenv/Exception/PathException.php', - 'Symfony\\Component\\ErrorHandler\\BufferingLogger' => __DIR__ . '/..' . '/symfony/error-handler/BufferingLogger.php', - 'Symfony\\Component\\ErrorHandler\\Debug' => __DIR__ . '/..' . '/symfony/error-handler/Debug.php', - 'Symfony\\Component\\ErrorHandler\\DebugClassLoader' => __DIR__ . '/..' . '/symfony/error-handler/DebugClassLoader.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ClassNotFoundErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\ErrorEnhancerInterface' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedFunctionErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorEnhancer\\UndefinedMethodErrorEnhancer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorHandler' => __DIR__ . '/..' . '/symfony/error-handler/ErrorHandler.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\CliErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\ErrorRendererInterface' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\ErrorRenderer\\SerializerErrorRenderer' => __DIR__ . '/..' . '/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php', - 'Symfony\\Component\\ErrorHandler\\Error\\ClassNotFoundError' => __DIR__ . '/..' . '/symfony/error-handler/Error/ClassNotFoundError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\FatalError' => __DIR__ . '/..' . '/symfony/error-handler/Error/FatalError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\OutOfMemoryError' => __DIR__ . '/..' . '/symfony/error-handler/Error/OutOfMemoryError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedFunctionError' => __DIR__ . '/..' . '/symfony/error-handler/Error/UndefinedFunctionError.php', - 'Symfony\\Component\\ErrorHandler\\Error\\UndefinedMethodError' => __DIR__ . '/..' . '/symfony/error-handler/Error/UndefinedMethodError.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\FlattenException' => __DIR__ . '/..' . '/symfony/error-handler/Exception/FlattenException.php', - 'Symfony\\Component\\ErrorHandler\\Exception\\SilencedErrorContext' => __DIR__ . '/..' . '/symfony/error-handler/Exception/SilencedErrorContext.php', - 'Symfony\\Component\\ErrorHandler\\Internal\\TentativeTypes' => __DIR__ . '/..' . '/symfony/error-handler/Internal/TentativeTypes.php', - 'Symfony\\Component\\ErrorHandler\\ThrowableUtils' => __DIR__ . '/..' . '/symfony/error-handler/ThrowableUtils.php', - 'Symfony\\Component\\EventDispatcher\\Attribute\\AsEventListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Attribute/AsEventListener.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php', - 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventSubscriberInterface.php', - 'Symfony\\Component\\EventDispatcher\\GenericEvent' => __DIR__ . '/..' . '/symfony/event-dispatcher/GenericEvent.php', - 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', - 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/FileNotFoundException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOException.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Filesystem\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/RuntimeException.php', - 'Symfony\\Component\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/symfony/filesystem/Filesystem.php', - 'Symfony\\Component\\Filesystem\\Path' => __DIR__ . '/..' . '/symfony/filesystem/Path.php', - 'Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php', - 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php', - 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php', - 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/..' . '/symfony/finder/Exception/DirectoryNotFoundException.php', - 'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php', - 'Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/..' . '/symfony/finder/Gitignore.php', - 'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php', - 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilenameFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/LazyIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/PathFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php', - 'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php', - 'Symfony\\Component\\Form\\AbstractExtension' => __DIR__ . '/..' . '/symfony/form/AbstractExtension.php', - 'Symfony\\Component\\Form\\AbstractRendererEngine' => __DIR__ . '/..' . '/symfony/form/AbstractRendererEngine.php', - 'Symfony\\Component\\Form\\AbstractType' => __DIR__ . '/..' . '/symfony/form/AbstractType.php', - 'Symfony\\Component\\Form\\AbstractTypeExtension' => __DIR__ . '/..' . '/symfony/form/AbstractTypeExtension.php', - 'Symfony\\Component\\Form\\Button' => __DIR__ . '/..' . '/symfony/form/Button.php', - 'Symfony\\Component\\Form\\ButtonBuilder' => __DIR__ . '/..' . '/symfony/form/ButtonBuilder.php', - 'Symfony\\Component\\Form\\ButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/ButtonTypeInterface.php', - 'Symfony\\Component\\Form\\CallbackTransformer' => __DIR__ . '/..' . '/symfony/form/CallbackTransformer.php', - 'Symfony\\Component\\Form\\ChoiceList\\ArrayChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ArrayChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\ChoiceListInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/ChoiceListInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\AbstractStaticOption' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceAttr' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFieldName' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceFilter' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLabel' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceTranslationParameters' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\ChoiceValue' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\GroupBy' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/GroupBy.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\Cache\\PreferredChoice' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\CachingFactoryDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\ChoiceListFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php', - 'Symfony\\Component\\Form\\ChoiceList\\Factory\\PropertyAccessDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\LazyChoiceList' => __DIR__ . '/..' . '/symfony/form/ChoiceList/LazyChoiceList.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\AbstractChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\CallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\FilterChoiceLoaderDecorator' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php', - 'Symfony\\Component\\Form\\ChoiceList\\Loader\\IntlCallbackChoiceLoader' => __DIR__ . '/..' . '/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceGroupView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceGroupView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceListView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceListView.php', - 'Symfony\\Component\\Form\\ChoiceList\\View\\ChoiceView' => __DIR__ . '/..' . '/symfony/form/ChoiceList/View/ChoiceView.php', - 'Symfony\\Component\\Form\\ClearableErrorsInterface' => __DIR__ . '/..' . '/symfony/form/ClearableErrorsInterface.php', - 'Symfony\\Component\\Form\\ClickableInterface' => __DIR__ . '/..' . '/symfony/form/ClickableInterface.php', - 'Symfony\\Component\\Form\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/form/Command/DebugCommand.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/form/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Form\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/form/Console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Form\\DataAccessorInterface' => __DIR__ . '/..' . '/symfony/form/DataAccessorInterface.php', - 'Symfony\\Component\\Form\\DataMapperInterface' => __DIR__ . '/..' . '/symfony/form/DataMapperInterface.php', - 'Symfony\\Component\\Form\\DataTransformerInterface' => __DIR__ . '/..' . '/symfony/form/DataTransformerInterface.php', - 'Symfony\\Component\\Form\\DependencyInjection\\FormPass' => __DIR__ . '/..' . '/symfony/form/DependencyInjection/FormPass.php', - 'Symfony\\Component\\Form\\Event\\PostSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PostSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PostSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSetDataEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSetDataEvent.php', - 'Symfony\\Component\\Form\\Event\\PreSubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/PreSubmitEvent.php', - 'Symfony\\Component\\Form\\Event\\SubmitEvent' => __DIR__ . '/..' . '/symfony/form/Event/SubmitEvent.php', - 'Symfony\\Component\\Form\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/form/Exception/AccessException.php', - 'Symfony\\Component\\Form\\Exception\\AlreadySubmittedException' => __DIR__ . '/..' . '/symfony/form/Exception/AlreadySubmittedException.php', - 'Symfony\\Component\\Form\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/form/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Form\\Exception\\ErrorMappingException' => __DIR__ . '/..' . '/symfony/form/Exception/ErrorMappingException.php', - 'Symfony\\Component\\Form\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/form/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Form\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Form\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/symfony/form/Exception/InvalidConfigurationException.php', - 'Symfony\\Component\\Form\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/form/Exception/LogicException.php', - 'Symfony\\Component\\Form\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/form/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Form\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/form/Exception/RuntimeException.php', - 'Symfony\\Component\\Form\\Exception\\StringCastException' => __DIR__ . '/..' . '/symfony/form/Exception/StringCastException.php', - 'Symfony\\Component\\Form\\Exception\\TransformationFailedException' => __DIR__ . '/..' . '/symfony/form/Exception/TransformationFailedException.php', - 'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/form/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Form\\Extension\\Core\\CoreExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/CoreExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\CallbackAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\ChainAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataAccessor\\PropertyPathAccessor' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\CheckboxListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\DataMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/DataMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\PropertyPathMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataMapper\\RadioListMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataMapper/RadioListMapper.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ArrayToPartsTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BaseDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\BooleanToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoiceToValueTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ChoicesToValuesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DataTransformerChain' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateIntervalToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeImmutableToDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToHtml5LocalDateTimeTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToRfc3339Transformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeToTimestampTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\DateTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntlTimeZoneToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\MoneyToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\PercentToLocalizedStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\StringToFloatTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UlidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\UuidToStringTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\ValueToDuplicatesTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\WeekToArrayTransformer' => __DIR__ . '/..' . '/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\FixUrlProtocolListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\MergeCollectionListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\ResizeFormListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/ResizeFormListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TransformationFailureListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\EventListener\\TrimListener' => __DIR__ . '/..' . '/symfony/form/Extension/Core/EventListener/TrimListener.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BaseType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/BirthdayType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ButtonType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CheckboxType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ChoiceType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CollectionType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ColorType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CountryType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/CurrencyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateIntervalType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateTimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/DateType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EmailType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\EnumType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/EnumType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FileType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/FormType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/HiddenType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/IntegerType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LanguageType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/LocaleType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/MoneyType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/NumberType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PasswordType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/PercentType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RadioType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RangeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RangeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\RepeatedType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/RepeatedType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\ResetType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/ResetType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SearchType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SearchType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/SubmitType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TelType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TelType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TextareaType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimeType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TimezoneType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\TransformationFailureExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/TransformationFailureExtension.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UlidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UrlType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UrlType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\UuidType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/UuidType.php', - 'Symfony\\Component\\Form\\Extension\\Core\\Type\\WeekType' => __DIR__ . '/..' . '/symfony/form/Extension/Core/Type/WeekType.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/CsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\EventListener\\CsrfValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Csrf\\Type\\FormTypeCsrfExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\DataCollectorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/DataCollectorExtension.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollector' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollector.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataCollectorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractor' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractor.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\FormDataExtractorInterface' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Proxy\\ResolvedTypeFactoryDataCollectorProxy' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php', - 'Symfony\\Component\\Form\\Extension\\DataCollector\\Type\\DataCollectorTypeExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php', - 'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension' => __DIR__ . '/..' . '/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\HttpFoundationRequestHandler' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php', - 'Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension' => __DIR__ . '/..' . '/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/Form.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\FormValidator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Constraints/FormValidator.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/EventListener/ValidationListener.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\BaseValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\RepeatedTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\SubmitTypeValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Type\\UploadValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\Util\\ServerParams' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorExtension.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ValidatorTypeGuesser.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\MappingRule' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\RelativePath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapper' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPath' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php', - 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationPathIterator' => __DIR__ . '/..' . '/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php', - 'Symfony\\Component\\Form\\FileUploadError' => __DIR__ . '/..' . '/symfony/form/FileUploadError.php', - 'Symfony\\Component\\Form\\Form' => __DIR__ . '/..' . '/symfony/form/Form.php', - 'Symfony\\Component\\Form\\FormBuilder' => __DIR__ . '/..' . '/symfony/form/FormBuilder.php', - 'Symfony\\Component\\Form\\FormBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigBuilder' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilder.php', - 'Symfony\\Component\\Form\\FormConfigBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigBuilderInterface.php', - 'Symfony\\Component\\Form\\FormConfigInterface' => __DIR__ . '/..' . '/symfony/form/FormConfigInterface.php', - 'Symfony\\Component\\Form\\FormError' => __DIR__ . '/..' . '/symfony/form/FormError.php', - 'Symfony\\Component\\Form\\FormErrorIterator' => __DIR__ . '/..' . '/symfony/form/FormErrorIterator.php', - 'Symfony\\Component\\Form\\FormEvent' => __DIR__ . '/..' . '/symfony/form/FormEvent.php', - 'Symfony\\Component\\Form\\FormEvents' => __DIR__ . '/..' . '/symfony/form/FormEvents.php', - 'Symfony\\Component\\Form\\FormExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormExtensionInterface.php', - 'Symfony\\Component\\Form\\FormFactory' => __DIR__ . '/..' . '/symfony/form/FormFactory.php', - 'Symfony\\Component\\Form\\FormFactoryBuilder' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilder.php', - 'Symfony\\Component\\Form\\FormFactoryBuilderInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryBuilderInterface.php', - 'Symfony\\Component\\Form\\FormFactoryInterface' => __DIR__ . '/..' . '/symfony/form/FormFactoryInterface.php', - 'Symfony\\Component\\Form\\FormInterface' => __DIR__ . '/..' . '/symfony/form/FormInterface.php', - 'Symfony\\Component\\Form\\FormRegistry' => __DIR__ . '/..' . '/symfony/form/FormRegistry.php', - 'Symfony\\Component\\Form\\FormRegistryInterface' => __DIR__ . '/..' . '/symfony/form/FormRegistryInterface.php', - 'Symfony\\Component\\Form\\FormRenderer' => __DIR__ . '/..' . '/symfony/form/FormRenderer.php', - 'Symfony\\Component\\Form\\FormRendererEngineInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererEngineInterface.php', - 'Symfony\\Component\\Form\\FormRendererInterface' => __DIR__ . '/..' . '/symfony/form/FormRendererInterface.php', - 'Symfony\\Component\\Form\\FormTypeExtensionInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeExtensionInterface.php', - 'Symfony\\Component\\Form\\FormTypeGuesserChain' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserChain.php', - 'Symfony\\Component\\Form\\FormTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeGuesserInterface.php', - 'Symfony\\Component\\Form\\FormTypeInterface' => __DIR__ . '/..' . '/symfony/form/FormTypeInterface.php', - 'Symfony\\Component\\Form\\FormView' => __DIR__ . '/..' . '/symfony/form/FormView.php', - 'Symfony\\Component\\Form\\Forms' => __DIR__ . '/..' . '/symfony/form/Forms.php', - 'Symfony\\Component\\Form\\Guess\\Guess' => __DIR__ . '/..' . '/symfony/form/Guess/Guess.php', - 'Symfony\\Component\\Form\\Guess\\TypeGuess' => __DIR__ . '/..' . '/symfony/form/Guess/TypeGuess.php', - 'Symfony\\Component\\Form\\Guess\\ValueGuess' => __DIR__ . '/..' . '/symfony/form/Guess/ValueGuess.php', - 'Symfony\\Component\\Form\\NativeRequestHandler' => __DIR__ . '/..' . '/symfony/form/NativeRequestHandler.php', - 'Symfony\\Component\\Form\\PreloadedExtension' => __DIR__ . '/..' . '/symfony/form/PreloadedExtension.php', - 'Symfony\\Component\\Form\\RequestHandlerInterface' => __DIR__ . '/..' . '/symfony/form/RequestHandlerInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormType' => __DIR__ . '/..' . '/symfony/form/ResolvedFormType.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactory' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactory.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeFactoryInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeFactoryInterface.php', - 'Symfony\\Component\\Form\\ResolvedFormTypeInterface' => __DIR__ . '/..' . '/symfony/form/ResolvedFormTypeInterface.php', - 'Symfony\\Component\\Form\\ReversedTransformer' => __DIR__ . '/..' . '/symfony/form/ReversedTransformer.php', - 'Symfony\\Component\\Form\\SubmitButton' => __DIR__ . '/..' . '/symfony/form/SubmitButton.php', - 'Symfony\\Component\\Form\\SubmitButtonBuilder' => __DIR__ . '/..' . '/symfony/form/SubmitButtonBuilder.php', - 'Symfony\\Component\\Form\\SubmitButtonTypeInterface' => __DIR__ . '/..' . '/symfony/form/SubmitButtonTypeInterface.php', - 'Symfony\\Component\\Form\\Test\\FormBuilderInterface' => __DIR__ . '/..' . '/symfony/form/Test/FormBuilderInterface.php', - 'Symfony\\Component\\Form\\Test\\FormIntegrationTestCase' => __DIR__ . '/..' . '/symfony/form/Test/FormIntegrationTestCase.php', - 'Symfony\\Component\\Form\\Test\\FormInterface' => __DIR__ . '/..' . '/symfony/form/Test/FormInterface.php', - 'Symfony\\Component\\Form\\Test\\FormPerformanceTestCase' => __DIR__ . '/..' . '/symfony/form/Test/FormPerformanceTestCase.php', - 'Symfony\\Component\\Form\\Test\\Traits\\ValidatorExtensionTrait' => __DIR__ . '/..' . '/symfony/form/Test/Traits/ValidatorExtensionTrait.php', - 'Symfony\\Component\\Form\\Test\\TypeTestCase' => __DIR__ . '/..' . '/symfony/form/Test/TypeTestCase.php', - 'Symfony\\Component\\Form\\Util\\FormUtil' => __DIR__ . '/..' . '/symfony/form/Util/FormUtil.php', - 'Symfony\\Component\\Form\\Util\\InheritDataAwareIterator' => __DIR__ . '/..' . '/symfony/form/Util/InheritDataAwareIterator.php', - 'Symfony\\Component\\Form\\Util\\OptionsResolverWrapper' => __DIR__ . '/..' . '/symfony/form/Util/OptionsResolverWrapper.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMap' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMap.php', - 'Symfony\\Component\\Form\\Util\\OrderedHashMapIterator' => __DIR__ . '/..' . '/symfony/form/Util/OrderedHashMapIterator.php', - 'Symfony\\Component\\Form\\Util\\ServerParams' => __DIR__ . '/..' . '/symfony/form/Util/ServerParams.php', - 'Symfony\\Component\\Form\\Util\\StringUtil' => __DIR__ . '/..' . '/symfony/form/Util/StringUtil.php', - 'Symfony\\Component\\HttpClient\\AmpHttpClient' => __DIR__ . '/..' . '/symfony/http-client/AmpHttpClient.php', - 'Symfony\\Component\\HttpClient\\AsyncDecoratorTrait' => __DIR__ . '/..' . '/symfony/http-client/AsyncDecoratorTrait.php', - 'Symfony\\Component\\HttpClient\\CachingHttpClient' => __DIR__ . '/..' . '/symfony/http-client/CachingHttpClient.php', - 'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/DataChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\ErrorChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/ErrorChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\FirstChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/FirstChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\InformationalChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/InformationalChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\LastChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/LastChunk.php', - 'Symfony\\Component\\HttpClient\\Chunk\\ServerSentEvent' => __DIR__ . '/..' . '/symfony/http-client/Chunk/ServerSentEvent.php', - 'Symfony\\Component\\HttpClient\\CurlHttpClient' => __DIR__ . '/..' . '/symfony/http-client/CurlHttpClient.php', - 'Symfony\\Component\\HttpClient\\DataCollector\\HttpClientDataCollector' => __DIR__ . '/..' . '/symfony/http-client/DataCollector/HttpClientDataCollector.php', - 'Symfony\\Component\\HttpClient\\DecoratorTrait' => __DIR__ . '/..' . '/symfony/http-client/DecoratorTrait.php', - 'Symfony\\Component\\HttpClient\\DependencyInjection\\HttpClientPass' => __DIR__ . '/..' . '/symfony/http-client/DependencyInjection/HttpClientPass.php', - 'Symfony\\Component\\HttpClient\\EventSourceHttpClient' => __DIR__ . '/..' . '/symfony/http-client/EventSourceHttpClient.php', - 'Symfony\\Component\\HttpClient\\Exception\\ClientException' => __DIR__ . '/..' . '/symfony/http-client/Exception/ClientException.php', - 'Symfony\\Component\\HttpClient\\Exception\\EventSourceException' => __DIR__ . '/..' . '/symfony/http-client/Exception/EventSourceException.php', - 'Symfony\\Component\\HttpClient\\Exception\\HttpExceptionTrait' => __DIR__ . '/..' . '/symfony/http-client/Exception/HttpExceptionTrait.php', - 'Symfony\\Component\\HttpClient\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/http-client/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\HttpClient\\Exception\\JsonException' => __DIR__ . '/..' . '/symfony/http-client/Exception/JsonException.php', - 'Symfony\\Component\\HttpClient\\Exception\\RedirectionException' => __DIR__ . '/..' . '/symfony/http-client/Exception/RedirectionException.php', - 'Symfony\\Component\\HttpClient\\Exception\\ServerException' => __DIR__ . '/..' . '/symfony/http-client/Exception/ServerException.php', - 'Symfony\\Component\\HttpClient\\Exception\\TimeoutException' => __DIR__ . '/..' . '/symfony/http-client/Exception/TimeoutException.php', - 'Symfony\\Component\\HttpClient\\Exception\\TransportException' => __DIR__ . '/..' . '/symfony/http-client/Exception/TransportException.php', - 'Symfony\\Component\\HttpClient\\HttpClient' => __DIR__ . '/..' . '/symfony/http-client/HttpClient.php', - 'Symfony\\Component\\HttpClient\\HttpClientTrait' => __DIR__ . '/..' . '/symfony/http-client/HttpClientTrait.php', - 'Symfony\\Component\\HttpClient\\HttpOptions' => __DIR__ . '/..' . '/symfony/http-client/HttpOptions.php', - 'Symfony\\Component\\HttpClient\\HttplugClient' => __DIR__ . '/..' . '/symfony/http-client/HttplugClient.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpBody' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpBody.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpListener' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpListener.php', - 'Symfony\\Component\\HttpClient\\Internal\\AmpResolver' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpResolver.php', - 'Symfony\\Component\\HttpClient\\Internal\\Canary' => __DIR__ . '/..' . '/symfony/http-client/Internal/Canary.php', - 'Symfony\\Component\\HttpClient\\Internal\\ClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/ClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\CurlClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/CurlClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\DnsCache' => __DIR__ . '/..' . '/symfony/http-client/Internal/DnsCache.php', - 'Symfony\\Component\\HttpClient\\Internal\\HttplugWaitLoop' => __DIR__ . '/..' . '/symfony/http-client/Internal/HttplugWaitLoop.php', - 'Symfony\\Component\\HttpClient\\Internal\\NativeClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/NativeClientState.php', - 'Symfony\\Component\\HttpClient\\Internal\\PushedResponse' => __DIR__ . '/..' . '/symfony/http-client/Internal/PushedResponse.php', - 'Symfony\\Component\\HttpClient\\MockHttpClient' => __DIR__ . '/..' . '/symfony/http-client/MockHttpClient.php', - 'Symfony\\Component\\HttpClient\\NativeHttpClient' => __DIR__ . '/..' . '/symfony/http-client/NativeHttpClient.php', - 'Symfony\\Component\\HttpClient\\NoPrivateNetworkHttpClient' => __DIR__ . '/..' . '/symfony/http-client/NoPrivateNetworkHttpClient.php', - 'Symfony\\Component\\HttpClient\\Psr18Client' => __DIR__ . '/..' . '/symfony/http-client/Psr18Client.php', - 'Symfony\\Component\\HttpClient\\Response\\AmpResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/AmpResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\AsyncContext' => __DIR__ . '/..' . '/symfony/http-client/Response/AsyncContext.php', - 'Symfony\\Component\\HttpClient\\Response\\AsyncResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/AsyncResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\CommonResponseTrait' => __DIR__ . '/..' . '/symfony/http-client/Response/CommonResponseTrait.php', - 'Symfony\\Component\\HttpClient\\Response\\CurlResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/CurlResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\HttplugPromise' => __DIR__ . '/..' . '/symfony/http-client/Response/HttplugPromise.php', - 'Symfony\\Component\\HttpClient\\Response\\MockResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/MockResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\NativeResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/NativeResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\ResponseStream' => __DIR__ . '/..' . '/symfony/http-client/Response/ResponseStream.php', - 'Symfony\\Component\\HttpClient\\Response\\StreamWrapper' => __DIR__ . '/..' . '/symfony/http-client/Response/StreamWrapper.php', - 'Symfony\\Component\\HttpClient\\Response\\StreamableInterface' => __DIR__ . '/..' . '/symfony/http-client/Response/StreamableInterface.php', - 'Symfony\\Component\\HttpClient\\Response\\TraceableResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/TraceableResponse.php', - 'Symfony\\Component\\HttpClient\\Response\\TransportResponseTrait' => __DIR__ . '/..' . '/symfony/http-client/Response/TransportResponseTrait.php', - 'Symfony\\Component\\HttpClient\\Retry\\GenericRetryStrategy' => __DIR__ . '/..' . '/symfony/http-client/Retry/GenericRetryStrategy.php', - 'Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface' => __DIR__ . '/..' . '/symfony/http-client/Retry/RetryStrategyInterface.php', - 'Symfony\\Component\\HttpClient\\RetryableHttpClient' => __DIR__ . '/..' . '/symfony/http-client/RetryableHttpClient.php', - 'Symfony\\Component\\HttpClient\\ScopingHttpClient' => __DIR__ . '/..' . '/symfony/http-client/ScopingHttpClient.php', - 'Symfony\\Component\\HttpClient\\TraceableHttpClient' => __DIR__ . '/..' . '/symfony/http-client/TraceableHttpClient.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeader.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php', - 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php', - 'Symfony\\Component\\HttpFoundation\\Cookie' => __DIR__ . '/..' . '/symfony/http-foundation/Cookie.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\BadRequestException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/BadRequestException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\JsonException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/JsonException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/RequestExceptionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SessionNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SessionNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SuspiciousOperationException.php', - 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/ExpressionRequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/..' . '/symfony/http-foundation/FileBag.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\CannotWriteFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/CannotWriteFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\ExtensionFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/ExtensionFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FormSizeFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FormSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\IniSizeFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/IniSizeFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/NoFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\NoTmpDirFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/NoTmpDirFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\PartialFileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/PartialFileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UploadException.php', - 'Symfony\\Component\\HttpFoundation\\File\\File' => __DIR__ . '/..' . '/symfony/http-foundation/File/File.php', - 'Symfony\\Component\\HttpFoundation\\File\\Stream' => __DIR__ . '/..' . '/symfony/http-foundation/File/Stream.php', - 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => __DIR__ . '/..' . '/symfony/http-foundation/File/UploadedFile.php', - 'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\HeaderUtils' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderUtils.php', - 'Symfony\\Component\\HttpFoundation\\InputBag' => __DIR__ . '/..' . '/symfony/http-foundation/InputBag.php', - 'Symfony\\Component\\HttpFoundation\\IpUtils' => __DIR__ . '/..' . '/symfony/http-foundation/IpUtils.php', - 'Symfony\\Component\\HttpFoundation\\JsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/JsonResponse.php', - 'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/..' . '/symfony/http-foundation/ParameterBag.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\AbstractRequestRateLimiter' => __DIR__ . '/..' . '/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php', - 'Symfony\\Component\\HttpFoundation\\RateLimiter\\RequestRateLimiterInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php', - 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => __DIR__ . '/..' . '/symfony/http-foundation/RedirectResponse.php', - 'Symfony\\Component\\HttpFoundation\\Request' => __DIR__ . '/..' . '/symfony/http-foundation/Request.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcherInterface.php', - 'Symfony\\Component\\HttpFoundation\\RequestStack' => __DIR__ . '/..' . '/symfony/http-foundation/RequestStack.php', - 'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/..' . '/symfony/http-foundation/Response.php', - 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/ResponseHeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\ServerBag' => __DIR__ . '/..' . '/symfony/http-foundation/ServerBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Session' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Session.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionFactoryInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionUtils.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\IdentityMarshaller' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MarshallingSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MigratingSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\RedisSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\SessionHandlerFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MetadataBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorageFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\ServiceSessionFactory' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageFactoryInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseFormatSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsUnprocessable' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php', - 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', - 'Symfony\\Component\\HttpFoundation\\UrlHelper' => __DIR__ . '/..' . '/symfony/http-foundation/UrlHelper.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\ArgumentInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/ArgumentInterface.php', - 'Symfony\\Component\\HttpKernel\\Attribute\\AsController' => __DIR__ . '/..' . '/symfony/http-kernel/Attribute/AsController.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/Bundle.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/BundleInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', - 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => __DIR__ . '/..' . '/symfony/http-kernel/Config/FileLocator.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', - 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SessionValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\TraceableValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ContainerControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ContainerControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerReference.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ErrorController' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ErrorController.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/EventDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', - 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/FileLinkFormatter.php', - 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddAnnotatedClassesToCachePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ControllerArgumentValueResolverPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/Extension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AbstractSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DumpListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ErrorListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/FragmentListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ProfilerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/RouterListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SurrogateListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TestSessionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ExceptionEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FinishRequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/KernelEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/RequestEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/TerminateEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ViewEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ControllerDoesNotReturnResponseException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/GoneHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', - 'Symfony\\Component\\HttpKernel\\Exception\\InvalidMetadataException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/InvalidMetadataException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotFoundHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnexpectedSessionUsageException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGenerator' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentUriGenerator.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentUriGeneratorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Esi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/HttpCache.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Ssi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Store.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/StoreInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpClientKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelBrowser.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Kernel' => __DIR__ . '/..' . '/symfony/http-kernel/Kernel.php', - 'Symfony\\Component\\HttpKernel\\KernelEvents' => __DIR__ . '/..' . '/symfony/http-kernel/KernelEvents.php', - 'Symfony\\Component\\HttpKernel\\KernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/KernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Log/DebugLoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\Logger' => __DIR__ . '/..' . '/symfony/http-kernel/Log/Logger.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profile.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profiler.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', - 'Symfony\\Component\\HttpKernel\\RebootableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/RebootableInterface.php', - 'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php', - 'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/..' . '/symfony/http-kernel/UriSigner.php', - 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php', - 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php', - 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => __DIR__ . '/..' . '/symfony/options-resolver/OptionConfigurator.php', - 'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php', - 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php', - 'Symfony\\Component\\PasswordHasher\\Command\\UserPasswordHashCommand' => __DIR__ . '/..' . '/symfony/password-hasher/Command/UserPasswordHashCommand.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\InvalidPasswordException' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/InvalidPasswordException.php', - 'Symfony\\Component\\PasswordHasher\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/password-hasher/Exception/LogicException.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\CheckPasswordLengthTrait' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\MessageDigestPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\MigratingPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/MigratingPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\NativePasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/NativePasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherAwareInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactory' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherFactory.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactoryInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\Pbkdf2PasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\PlaintextPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\SodiumPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/SodiumPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasher' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/UserPasswordHasher.php', - 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php', - 'Symfony\\Component\\PasswordHasher\\LegacyPasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/LegacyPasswordHasherInterface.php', - 'Symfony\\Component\\PasswordHasher\\PasswordHasherInterface' => __DIR__ . '/..' . '/symfony/password-hasher/PasswordHasherInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/property-access/Exception/AccessException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/property-access/Exception/ExceptionInterface.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\InvalidPropertyPathException' => __DIR__ . '/..' . '/symfony/property-access/Exception/InvalidPropertyPathException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchIndexException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchIndexException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/NoSuchPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/property-access/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/RuntimeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\PropertyAccess\\Exception\\UninitializedPropertyException' => __DIR__ . '/..' . '/symfony/property-access/Exception/UninitializedPropertyException.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccess' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccess.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessor' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessor.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyAccessorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyAccessorInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPath' => __DIR__ . '/..' . '/symfony/property-access/PropertyPath.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathBuilder' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathBuilder.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathInterface.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIterator' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIterator.php', - 'Symfony\\Component\\PropertyAccess\\PropertyPathIteratorInterface' => __DIR__ . '/..' . '/symfony/property-access/PropertyPathIteratorInterface.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoConstructorPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php', - 'Symfony\\Component\\PropertyInfo\\DependencyInjection\\PropertyInfoPass' => __DIR__ . '/..' . '/symfony/property-info/DependencyInjection/PropertyInfoPass.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorArgumentTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ConstructorExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ConstructorExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpDocExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\PhpStanExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/PhpStanExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/ReflectionExtractor.php', - 'Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor' => __DIR__ . '/..' . '/symfony/property-info/Extractor/SerializerExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScope' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScope.php', - 'Symfony\\Component\\PropertyInfo\\PhpStan\\NameScopeFactory' => __DIR__ . '/..' . '/symfony/property-info/PhpStan/NameScopeFactory.php', - 'Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyAccessExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyDescriptionExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoCacheExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoCacheExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractor.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyInitializableExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyListExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyReadInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyReadInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyTypeExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfo' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfo.php', - 'Symfony\\Component\\PropertyInfo\\PropertyWriteInfoExtractorInterface' => __DIR__ . '/..' . '/symfony/property-info/PropertyWriteInfoExtractorInterface.php', - 'Symfony\\Component\\PropertyInfo\\Type' => __DIR__ . '/..' . '/symfony/property-info/Type.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpDocTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpDocTypeHelper.php', - 'Symfony\\Component\\PropertyInfo\\Util\\PhpStanTypeHelper' => __DIR__ . '/..' . '/symfony/property-info/Util/PhpStanTypeHelper.php', - 'Symfony\\Component\\Routing\\Alias' => __DIR__ . '/..' . '/symfony/routing/Alias.php', - 'Symfony\\Component\\Routing\\Annotation\\Route' => __DIR__ . '/..' . '/symfony/routing/Annotation/Route.php', - 'Symfony\\Component\\Routing\\CompiledRoute' => __DIR__ . '/..' . '/symfony/routing/CompiledRoute.php', - 'Symfony\\Component\\Routing\\DependencyInjection\\RoutingResolverPass' => __DIR__ . '/..' . '/symfony/routing/DependencyInjection/RoutingResolverPass.php', - 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/routing/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidParameterException.php', - 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => __DIR__ . '/..' . '/symfony/routing/Exception/MethodNotAllowedException.php', - 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => __DIR__ . '/..' . '/symfony/routing/Exception/MissingMandatoryParametersException.php', - 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/routing/Exception/NoConfigurationException.php', - 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/ResourceNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteCircularReferenceException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteCircularReferenceException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/routing/Exception/RuntimeException.php', - 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/CompiledUrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGeneratorInterface.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationClassLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ClosureLoader.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\AliasConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/AliasConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\CollectionConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/CollectionConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\ImportConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/ImportConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RouteConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/RouteConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/RoutingConfigurator.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\AddTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/AddTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\HostTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/HostTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\LocalizedRouteTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\PrefixTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php', - 'Symfony\\Component\\Routing\\Loader\\Configurator\\Traits\\RouteTrait' => __DIR__ . '/..' . '/symfony/routing/Loader/Configurator/Traits/RouteTrait.php', - 'Symfony\\Component\\Routing\\Loader\\ContainerLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ContainerLoader.php', - 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/DirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\GlobFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/GlobFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ObjectLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ObjectLoader.php', - 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/CompiledUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/routing/Matcher/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RequestMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/TraceableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\RequestContext' => __DIR__ . '/..' . '/symfony/routing/RequestContext.php', - 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => __DIR__ . '/..' . '/symfony/routing/RequestContextAwareInterface.php', - 'Symfony\\Component\\Routing\\Route' => __DIR__ . '/..' . '/symfony/routing/Route.php', - 'Symfony\\Component\\Routing\\RouteCollection' => __DIR__ . '/..' . '/symfony/routing/RouteCollection.php', - 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => __DIR__ . '/..' . '/symfony/routing/RouteCollectionBuilder.php', - 'Symfony\\Component\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/symfony/routing/RouteCompiler.php', - 'Symfony\\Component\\Routing\\RouteCompilerInterface' => __DIR__ . '/..' . '/symfony/routing/RouteCompilerInterface.php', - 'Symfony\\Component\\Routing\\Router' => __DIR__ . '/..' . '/symfony/routing/Router.php', - 'Symfony\\Component\\Routing\\RouterInterface' => __DIR__ . '/..' . '/symfony/routing/RouterInterface.php', - 'Symfony\\Component\\Runtime\\GenericRuntime' => __DIR__ . '/..' . '/symfony/runtime/GenericRuntime.php', - 'Symfony\\Component\\Runtime\\Internal\\BasicErrorHandler' => __DIR__ . '/..' . '/symfony/runtime/Internal/BasicErrorHandler.php', - 'Symfony\\Component\\Runtime\\Internal\\ComposerPlugin' => __DIR__ . '/..' . '/symfony/runtime/Internal/ComposerPlugin.php', - 'Symfony\\Component\\Runtime\\Internal\\MissingDotenv' => __DIR__ . '/..' . '/symfony/runtime/Internal/MissingDotenv.php', - 'Symfony\\Component\\Runtime\\Internal\\SymfonyErrorHandler' => __DIR__ . '/..' . '/symfony/runtime/Internal/SymfonyErrorHandler.php', - 'Symfony\\Component\\Runtime\\ResolverInterface' => __DIR__ . '/..' . '/symfony/runtime/ResolverInterface.php', - 'Symfony\\Component\\Runtime\\Resolver\\ClosureResolver' => __DIR__ . '/..' . '/symfony/runtime/Resolver/ClosureResolver.php', - 'Symfony\\Component\\Runtime\\Resolver\\DebugClosureResolver' => __DIR__ . '/..' . '/symfony/runtime/Resolver/DebugClosureResolver.php', - 'Symfony\\Component\\Runtime\\RunnerInterface' => __DIR__ . '/..' . '/symfony/runtime/RunnerInterface.php', - 'Symfony\\Component\\Runtime\\Runner\\ClosureRunner' => __DIR__ . '/..' . '/symfony/runtime/Runner/ClosureRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\ConsoleApplicationRunner' => __DIR__ . '/..' . '/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner' => __DIR__ . '/..' . '/symfony/runtime/Runner/Symfony/HttpKernelRunner.php', - 'Symfony\\Component\\Runtime\\Runner\\Symfony\\ResponseRunner' => __DIR__ . '/..' . '/symfony/runtime/Runner/Symfony/ResponseRunner.php', - 'Symfony\\Component\\Runtime\\RuntimeInterface' => __DIR__ . '/..' . '/symfony/runtime/RuntimeInterface.php', - 'Symfony\\Component\\Runtime\\SymfonyRuntime' => __DIR__ . '/..' . '/symfony/runtime/SymfonyRuntime.php', - 'Symfony\\Component\\Security\\Core\\AuthenticationEvents' => __DIR__ . '/..' . '/symfony/security-core/AuthenticationEvents.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationManagerInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationManagerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationProviderManager.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationTrustResolver.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/AnonymousAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AuthenticationProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/AuthenticationProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/DaoAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\LdapBindAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/LdapBindAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\PreAuthenticatedAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\RememberMeAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/RememberMeAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\UserAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\CacheTokenVerifier' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\InMemoryTokenProvider' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/PersistentToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentTokenInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\TokenVerifierInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AbstractToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/AbstractToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/AnonymousToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\NullToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/NullToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\PreAuthenticatedToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/RememberMeToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/TokenStorage.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\UsageTrackingTokenStorage' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\SwitchUserToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/SwitchUserToken.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/TokenInterface.php', - 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken' => __DIR__ . '/..' . '/symfony/security-core/Authentication/Token/UsernamePasswordToken.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AccessDecisionManager.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManagerInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AccessDecisionManagerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AuthorizationChecker.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/AuthorizationCheckerInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguage' => __DIR__ . '/..' . '/symfony/security-core/Authorization/ExpressionLanguage.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguageProvider' => __DIR__ . '/..' . '/symfony/security-core/Authorization/ExpressionLanguageProvider.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AccessDecisionStrategyInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\AffirmativeStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\ConsensusStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\PriorityStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/PriorityStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Strategy\\UnanimousStrategy' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\TraceableAccessDecisionManager' => __DIR__ . '/..' . '/symfony/security-core/Authorization/TraceableAccessDecisionManager.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AuthenticatedVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\ExpressionVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/ExpressionVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleHierarchyVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/RoleVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\TraceableVoter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/TraceableVoter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\Voter' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/Voter.php', - 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => __DIR__ . '/..' . '/symfony/security-core/Authorization/Voter/VoterInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\BasePasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/BasePasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderAwareInterface' => __DIR__ . '/..' . '/symfony/security-core/Encoder/EncoderAwareInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactory' => __DIR__ . '/..' . '/symfony/security-core/Encoder/EncoderFactory.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface' => __DIR__ . '/..' . '/symfony/security-core/Encoder/EncoderFactoryInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\LegacyEncoderTrait' => __DIR__ . '/..' . '/symfony/security-core/Encoder/LegacyEncoderTrait.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\LegacyPasswordHasherEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/LegacyPasswordHasherEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/MessageDigestPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\MigratingPasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/MigratingPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\NativePasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/NativePasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface' => __DIR__ . '/..' . '/symfony/security-core/Encoder/PasswordEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordHasherAdapter' => __DIR__ . '/..' . '/symfony/security-core/Encoder/PasswordHasherAdapter.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PasswordHasherEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/PasswordHasherEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\Pbkdf2PasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/Pbkdf2PasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\PlaintextPasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/PlaintextPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\SelfSaltingEncoderInterface' => __DIR__ . '/..' . '/symfony/security-core/Encoder/SelfSaltingEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\SodiumPasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/SodiumPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoder' => __DIR__ . '/..' . '/symfony/security-core/Encoder/UserPasswordEncoder.php', - 'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface' => __DIR__ . '/..' . '/symfony/security-core/Encoder/UserPasswordEncoderInterface.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/AuthenticationEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationFailureEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/AuthenticationFailureEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\AuthenticationSuccessEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/AuthenticationSuccessEvent.php', - 'Symfony\\Component\\Security\\Core\\Event\\VoteEvent' => __DIR__ . '/..' . '/symfony/security-core/Event/VoteEvent.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccountExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccountExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AccountStatusException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AccountStatusException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException' => __DIR__ . '/..' . '/symfony/security-core/Exception/AuthenticationServiceException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\BadCredentialsException' => __DIR__ . '/..' . '/symfony/security-core/Exception/BadCredentialsException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CookieTheftException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CookieTheftException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CredentialsExpiredException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CredentialsExpiredException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAccountStatusException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\CustomUserMessageAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\DisabledException' => __DIR__ . '/..' . '/symfony/security-core/Exception/DisabledException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/security-core/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InsufficientAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InsufficientAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\InvalidCsrfTokenException' => __DIR__ . '/..' . '/symfony/security-core/Exception/InvalidCsrfTokenException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LazyResponseException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LazyResponseException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LockedException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LockedException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LogicException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\LogoutException' => __DIR__ . '/..' . '/symfony/security-core/Exception/LogoutException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\ProviderNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/ProviderNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/security-core/Exception/RuntimeException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\SessionUnavailableException' => __DIR__ . '/..' . '/symfony/security-core/Exception/SessionUnavailableException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\TokenNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/TokenNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\TooManyLoginAttemptsAuthenticationException' => __DIR__ . '/..' . '/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UnsupportedUserException' => __DIR__ . '/..' . '/symfony/security-core/Exception/UnsupportedUserException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/UserNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException' => __DIR__ . '/..' . '/symfony/security-core/Exception/UsernameNotFoundException.php', - 'Symfony\\Component\\Security\\Core\\Role\\Role' => __DIR__ . '/..' . '/symfony/security-core/Role/Role.php', - 'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchy' => __DIR__ . '/..' . '/symfony/security-core/Role/RoleHierarchy.php', - 'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchyInterface' => __DIR__ . '/..' . '/symfony/security-core/Role/RoleHierarchyInterface.php', - 'Symfony\\Component\\Security\\Core\\Role\\SwitchUserRole' => __DIR__ . '/..' . '/symfony/security-core/Role/SwitchUserRole.php', - 'Symfony\\Component\\Security\\Core\\Security' => __DIR__ . '/..' . '/symfony/security-core/Security.php', - 'Symfony\\Component\\Security\\Core\\Signature\\Exception\\ExpiredSignatureException' => __DIR__ . '/..' . '/symfony/security-core/Signature/Exception/ExpiredSignatureException.php', - 'Symfony\\Component\\Security\\Core\\Signature\\Exception\\InvalidSignatureException' => __DIR__ . '/..' . '/symfony/security-core/Signature/Exception/InvalidSignatureException.php', - 'Symfony\\Component\\Security\\Core\\Signature\\ExpiredSignatureStorage' => __DIR__ . '/..' . '/symfony/security-core/Signature/ExpiredSignatureStorage.php', - 'Symfony\\Component\\Security\\Core\\Signature\\SignatureHasher' => __DIR__ . '/..' . '/symfony/security-core/Signature/SignatureHasher.php', - 'Symfony\\Component\\Security\\Core\\Test\\AccessDecisionStrategyTestCase' => __DIR__ . '/..' . '/symfony/security-core/Test/AccessDecisionStrategyTestCase.php', - 'Symfony\\Component\\Security\\Core\\User\\ChainUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/ChainUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\EquatableInterface' => __DIR__ . '/..' . '/symfony/security-core/User/EquatableInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUser' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUser.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUserChecker' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUserChecker.php', - 'Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/InMemoryUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\LegacyPasswordAuthenticatedUserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\MissingUserProvider' => __DIR__ . '/..' . '/symfony/security-core/User/MissingUserProvider.php', - 'Symfony\\Component\\Security\\Core\\User\\PasswordAuthenticatedUserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/PasswordAuthenticatedUserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\PasswordUpgraderInterface' => __DIR__ . '/..' . '/symfony/security-core/User/PasswordUpgraderInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\User' => __DIR__ . '/..' . '/symfony/security-core/User/User.php', - 'Symfony\\Component\\Security\\Core\\User\\UserChecker' => __DIR__ . '/..' . '/symfony/security-core/User/UserChecker.php', - 'Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserCheckerInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\UserInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserInterface.php', - 'Symfony\\Component\\Security\\Core\\User\\UserProviderInterface' => __DIR__ . '/..' . '/symfony/security-core/User/UserProviderInterface.php', - 'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword' => __DIR__ . '/..' . '/symfony/security-core/Validator/Constraints/UserPassword.php', - 'Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPasswordValidator' => __DIR__ . '/..' . '/symfony/security-core/Validator/Constraints/UserPasswordValidator.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfToken' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfToken.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfTokenManager' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfTokenManager.php', - 'Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface' => __DIR__ . '/..' . '/symfony/security-csrf/CsrfTokenManagerInterface.php', - 'Symfony\\Component\\Security\\Csrf\\Exception\\TokenNotFoundException' => __DIR__ . '/..' . '/symfony/security-csrf/Exception/TokenNotFoundException.php', - 'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\TokenGeneratorInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php', - 'Symfony\\Component\\Security\\Csrf\\TokenGenerator\\UriSafeTokenGenerator' => __DIR__ . '/..' . '/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\ClearableTokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\NativeSessionTokenStorage' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\SessionTokenStorage' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/SessionTokenStorage.php', - 'Symfony\\Component\\Security\\Csrf\\TokenStorage\\TokenStorageInterface' => __DIR__ . '/..' . '/symfony/security-csrf/TokenStorage/TokenStorageInterface.php', - 'Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator' => __DIR__ . '/..' . '/symfony/security-guard/AbstractGuardAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\AuthenticatorInterface' => __DIR__ . '/..' . '/symfony/security-guard/AuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Guard\\Authenticator\\AbstractFormLoginAuthenticator' => __DIR__ . '/..' . '/symfony/security-guard/Authenticator/AbstractFormLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator' => __DIR__ . '/..' . '/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php', - 'Symfony\\Component\\Security\\Guard\\Firewall\\GuardAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-guard/Firewall/GuardAuthenticationListener.php', - 'Symfony\\Component\\Security\\Guard\\GuardAuthenticatorHandler' => __DIR__ . '/..' . '/symfony/security-guard/GuardAuthenticatorHandler.php', - 'Symfony\\Component\\Security\\Guard\\PasswordAuthenticatedInterface' => __DIR__ . '/..' . '/symfony/security-guard/PasswordAuthenticatedInterface.php', - 'Symfony\\Component\\Security\\Guard\\Provider\\GuardAuthenticationProvider' => __DIR__ . '/..' . '/symfony/security-guard/Provider/GuardAuthenticationProvider.php', - 'Symfony\\Component\\Security\\Guard\\Token\\GuardTokenInterface' => __DIR__ . '/..' . '/symfony/security-guard/Token/GuardTokenInterface.php', - 'Symfony\\Component\\Security\\Guard\\Token\\PostAuthenticationGuardToken' => __DIR__ . '/..' . '/symfony/security-guard/Token/PostAuthenticationGuardToken.php', - 'Symfony\\Component\\Security\\Guard\\Token\\PreAuthenticationGuardToken' => __DIR__ . '/..' . '/symfony/security-guard/Token/PreAuthenticationGuardToken.php', - 'Symfony\\Component\\Security\\Http\\AccessMap' => __DIR__ . '/..' . '/symfony/security-http/AccessMap.php', - 'Symfony\\Component\\Security\\Http\\AccessMapInterface' => __DIR__ . '/..' . '/symfony/security-http/AccessMapInterface.php', - 'Symfony\\Component\\Security\\Http\\Attribute\\CurrentUser' => __DIR__ . '/..' . '/symfony/security-http/Attribute/CurrentUser.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationFailureHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/Authentication/AuthenticationFailureHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationSuccessHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/Authentication/AuthenticationSuccessHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils' => __DIR__ . '/..' . '/symfony/security-http/Authentication/AuthenticationUtils.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticatorManager' => __DIR__ . '/..' . '/symfony/security-http/Authentication/AuthenticatorManager.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\AuthenticatorManagerInterface' => __DIR__ . '/..' . '/symfony/security-http/Authentication/AuthenticatorManagerInterface.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\CustomAuthenticationFailureHandler' => __DIR__ . '/..' . '/symfony/security-http/Authentication/CustomAuthenticationFailureHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\CustomAuthenticationSuccessHandler' => __DIR__ . '/..' . '/symfony/security-http/Authentication/CustomAuthenticationSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationFailureHandler' => __DIR__ . '/..' . '/symfony/security-http/Authentication/DefaultAuthenticationFailureHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationSuccessHandler' => __DIR__ . '/..' . '/symfony/security-http/Authentication/DefaultAuthenticationSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\NoopAuthenticationManager' => __DIR__ . '/..' . '/symfony/security-http/Authentication/NoopAuthenticationManager.php', - 'Symfony\\Component\\Security\\Http\\Authentication\\UserAuthenticatorInterface' => __DIR__ . '/..' . '/symfony/security-http/Authentication/UserAuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/AbstractAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractLoginFormAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/AbstractLoginFormAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AbstractPreAuthenticatedAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/AbstractPreAuthenticatedAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\AuthenticatorInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/AuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticatorManagerListener' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/FormLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\HttpBasicAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/HttpBasicAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\InteractiveAuthenticatorInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/InteractiveAuthenticatorInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\JsonLoginAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/JsonLoginAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\LoginLinkAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/LoginLinkAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\BadgeInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/BadgeInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\CsrfTokenBadge' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/CsrfTokenBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\PasswordUpgradeBadge' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/PasswordUpgradeBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\PreAuthenticatedUserBadge' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/PreAuthenticatedUserBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\RememberMeBadge' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/RememberMeBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\UserBadge' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Badge/UserBadge.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\CredentialsInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Credentials/CredentialsInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\CustomCredentials' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Credentials/CustomCredentials.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\PasswordCredentials' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Credentials/PasswordCredentials.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Passport' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/Passport.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\PassportInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/PassportInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\PassportTrait' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/PassportTrait.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\SelfValidatingPassport' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\UserPassportInterface' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Passport/UserPassportInterface.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/RememberMeAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\RemoteUserAuthenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/RemoteUserAuthenticator.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\Token\\PostAuthenticationToken' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/Token/PostAuthenticationToken.php', - 'Symfony\\Component\\Security\\Http\\Authenticator\\X509Authenticator' => __DIR__ . '/..' . '/symfony/security-http/Authenticator/X509Authenticator.php', - 'Symfony\\Component\\Security\\Http\\Authorization\\AccessDeniedHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/Authorization/AccessDeniedHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver' => __DIR__ . '/..' . '/symfony/security-http/Controller/UserValueResolver.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\AuthenticationEntryPointInterface' => __DIR__ . '/..' . '/symfony/security-http/EntryPoint/AuthenticationEntryPointInterface.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\BasicAuthenticationEntryPoint' => __DIR__ . '/..' . '/symfony/security-http/EntryPoint/BasicAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\Exception\\NotAnEntryPointException' => __DIR__ . '/..' . '/symfony/security-http/EntryPoint/Exception/NotAnEntryPointException.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\FormAuthenticationEntryPoint' => __DIR__ . '/..' . '/symfony/security-http/EntryPoint/FormAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EntryPoint\\RetryAuthenticationEntryPoint' => __DIR__ . '/..' . '/symfony/security-http/EntryPoint/RetryAuthenticationEntryPoint.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CheckCredentialsListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/CheckCredentialsListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CheckRememberMeConditionsListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/CheckRememberMeConditionsListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CookieClearingLogoutListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/CookieClearingLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CsrfProtectionListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/CsrfProtectionListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\CsrfTokenClearingLogoutListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/CsrfTokenClearingLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\DefaultLogoutListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/DefaultLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\LoginThrottlingListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/LoginThrottlingListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\PasswordMigratingListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/PasswordMigratingListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\RememberMeListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/RememberMeListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\RememberMeLogoutListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/RememberMeLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\SessionLogoutListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/SessionLogoutListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\SessionStrategyListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/SessionStrategyListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\UserCheckerListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/UserCheckerListener.php', - 'Symfony\\Component\\Security\\Http\\EventListener\\UserProviderListener' => __DIR__ . '/..' . '/symfony/security-http/EventListener/UserProviderListener.php', - 'Symfony\\Component\\Security\\Http\\Event\\AuthenticationTokenCreatedEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/AuthenticationTokenCreatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\CheckPassportEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/CheckPassportEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\DeauthenticatedEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/DeauthenticatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\InteractiveLoginEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/InteractiveLoginEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LazyResponseEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/LazyResponseEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LoginFailureEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/LoginFailureEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LoginSuccessEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/LoginSuccessEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\LogoutEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/LogoutEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\SwitchUserEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/SwitchUserEvent.php', - 'Symfony\\Component\\Security\\Http\\Event\\TokenDeauthenticatedEvent' => __DIR__ . '/..' . '/symfony/security-http/Event/TokenDeauthenticatedEvent.php', - 'Symfony\\Component\\Security\\Http\\Firewall' => __DIR__ . '/..' . '/symfony/security-http/Firewall.php', - 'Symfony\\Component\\Security\\Http\\FirewallMap' => __DIR__ . '/..' . '/symfony/security-http/FirewallMap.php', - 'Symfony\\Component\\Security\\Http\\FirewallMapInterface' => __DIR__ . '/..' . '/symfony/security-http/FirewallMapInterface.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AbstractAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AbstractListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AbstractPreAuthenticatedListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AbstractPreAuthenticatedListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AccessListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AccessListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AnonymousAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AnonymousAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\AuthenticatorManagerListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/AuthenticatorManagerListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\BasicAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/BasicAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ChannelListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/ChannelListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ContextListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/ContextListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/ExceptionListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\FirewallListenerInterface' => __DIR__ . '/..' . '/symfony/security-http/Firewall/FirewallListenerInterface.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\LogoutListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/LogoutListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\RememberMeListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/RememberMeListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\RemoteUserAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/RemoteUserAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\SwitchUserListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/SwitchUserListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordFormAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordJsonAuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/UsernamePasswordJsonAuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\Firewall\\X509AuthenticationListener' => __DIR__ . '/..' . '/symfony/security-http/Firewall/X509AuthenticationListener.php', - 'Symfony\\Component\\Security\\Http\\HttpUtils' => __DIR__ . '/..' . '/symfony/security-http/HttpUtils.php', - 'Symfony\\Component\\Security\\Http\\Impersonate\\ImpersonateUrlGenerator' => __DIR__ . '/..' . '/symfony/security-http/Impersonate/ImpersonateUrlGenerator.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\ExpiredLoginLinkException' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/Exception/ExpiredLoginLinkException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkAuthenticationException' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkException' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkException.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\Exception\\InvalidLoginLinkExceptionInterface' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/Exception/InvalidLoginLinkExceptionInterface.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkDetails' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/LoginLinkDetails.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandler' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/LoginLinkHandler.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/LoginLinkHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\LoginLink\\LoginLinkNotification' => __DIR__ . '/..' . '/symfony/security-http/LoginLink/LoginLinkNotification.php', - 'Symfony\\Component\\Security\\Http\\Logout\\CookieClearingLogoutHandler' => __DIR__ . '/..' . '/symfony/security-http/Logout/CookieClearingLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\CsrfTokenClearingLogoutHandler' => __DIR__ . '/..' . '/symfony/security-http/Logout/CsrfTokenClearingLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\DefaultLogoutSuccessHandler' => __DIR__ . '/..' . '/symfony/security-http/Logout/DefaultLogoutSuccessHandler.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/Logout/LogoutHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutSuccessHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/Logout/LogoutSuccessHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\Logout\\LogoutUrlGenerator' => __DIR__ . '/..' . '/symfony/security-http/Logout/LogoutUrlGenerator.php', - 'Symfony\\Component\\Security\\Http\\Logout\\SessionLogoutHandler' => __DIR__ . '/..' . '/symfony/security-http/Logout/SessionLogoutHandler.php', - 'Symfony\\Component\\Security\\Http\\ParameterBagUtils' => __DIR__ . '/..' . '/symfony/security-http/ParameterBagUtils.php', - 'Symfony\\Component\\Security\\Http\\RateLimiter\\DefaultLoginRateLimiter' => __DIR__ . '/..' . '/symfony/security-http/RateLimiter/DefaultLoginRateLimiter.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\AbstractRememberMeHandler' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/AbstractRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\AbstractRememberMeServices' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/AbstractRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\PersistentRememberMeHandler' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/PersistentRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\PersistentTokenBasedRememberMeServices' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/PersistentTokenBasedRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeDetails' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/RememberMeDetails.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeHandlerInterface' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/RememberMeHandlerInterface.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\RememberMeServicesInterface' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/RememberMeServicesInterface.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/ResponseListener.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\SignatureRememberMeHandler' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/SignatureRememberMeHandler.php', - 'Symfony\\Component\\Security\\Http\\RememberMe\\TokenBasedRememberMeServices' => __DIR__ . '/..' . '/symfony/security-http/RememberMe/TokenBasedRememberMeServices.php', - 'Symfony\\Component\\Security\\Http\\SecurityEvents' => __DIR__ . '/..' . '/symfony/security-http/SecurityEvents.php', - 'Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategy' => __DIR__ . '/..' . '/symfony/security-http/Session/SessionAuthenticationStrategy.php', - 'Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategyInterface' => __DIR__ . '/..' . '/symfony/security-http/Session/SessionAuthenticationStrategyInterface.php', - 'Symfony\\Component\\Security\\Http\\Util\\TargetPathTrait' => __DIR__ . '/..' . '/symfony/security-http/Util/TargetPathTrait.php', - 'Symfony\\Component\\String\\AbstractString' => __DIR__ . '/..' . '/symfony/string/AbstractString.php', - 'Symfony\\Component\\String\\AbstractUnicodeString' => __DIR__ . '/..' . '/symfony/string/AbstractUnicodeString.php', - 'Symfony\\Component\\String\\ByteString' => __DIR__ . '/..' . '/symfony/string/ByteString.php', - 'Symfony\\Component\\String\\CodePointString' => __DIR__ . '/..' . '/symfony/string/CodePointString.php', - 'Symfony\\Component\\String\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/string/Exception/ExceptionInterface.php', - 'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/string/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\String\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/string/Exception/RuntimeException.php', - 'Symfony\\Component\\String\\Inflector\\EnglishInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/EnglishInflector.php', - 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/FrenchInflector.php', - 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => __DIR__ . '/..' . '/symfony/string/Inflector/InflectorInterface.php', - 'Symfony\\Component\\String\\LazyString' => __DIR__ . '/..' . '/symfony/string/LazyString.php', - 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php', - 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php', - 'Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php', - 'Symfony\\Component\\Validator\\Command\\DebugCommand' => __DIR__ . '/..' . '/symfony/validator/Command/DebugCommand.php', - 'Symfony\\Component\\Validator\\Constraint' => __DIR__ . '/..' . '/symfony/validator/Constraint.php', - 'Symfony\\Component\\Validator\\ConstraintValidator' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidator.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactory' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorFactoryInterface.php', - 'Symfony\\Component\\Validator\\ConstraintValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintValidatorInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolation' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolation.php', - 'Symfony\\Component\\Validator\\ConstraintViolationInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationInterface.php', - 'Symfony\\Component\\Validator\\ConstraintViolationList' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationList.php', - 'Symfony\\Component\\Validator\\ConstraintViolationListInterface' => __DIR__ . '/..' . '/symfony/validator/ConstraintViolationListInterface.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparison' => __DIR__ . '/..' . '/symfony/validator/Constraints/AbstractComparison.php', - 'Symfony\\Component\\Validator\\Constraints\\AbstractComparisonValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AbstractComparisonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\All' => __DIR__ . '/..' . '/symfony/validator/Constraints/All.php', - 'Symfony\\Component\\Validator\\Constraints\\AllValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AllValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOf' => __DIR__ . '/..' . '/symfony/validator/Constraints/AtLeastOneOf.php', - 'Symfony\\Component\\Validator\\Constraints\\AtLeastOneOfValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/AtLeastOneOfValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Bic' => __DIR__ . '/..' . '/symfony/validator/Constraints/Bic.php', - 'Symfony\\Component\\Validator\\Constraints\\BicValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/BicValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Blank' => __DIR__ . '/..' . '/symfony/validator/Constraints/Blank.php', - 'Symfony\\Component\\Validator\\Constraints\\BlankValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/BlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Callback' => __DIR__ . '/..' . '/symfony/validator/Constraints/Callback.php', - 'Symfony\\Component\\Validator\\Constraints\\CallbackValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CallbackValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CardScheme' => __DIR__ . '/..' . '/symfony/validator/Constraints/CardScheme.php', - 'Symfony\\Component\\Validator\\Constraints\\CardSchemeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CardSchemeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cascade' => __DIR__ . '/..' . '/symfony/validator/Constraints/Cascade.php', - 'Symfony\\Component\\Validator\\Constraints\\Choice' => __DIR__ . '/..' . '/symfony/validator/Constraints/Choice.php', - 'Symfony\\Component\\Validator\\Constraints\\ChoiceValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ChoiceValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Cidr' => __DIR__ . '/..' . '/symfony/validator/Constraints/Cidr.php', - 'Symfony\\Component\\Validator\\Constraints\\CidrValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CidrValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Collection' => __DIR__ . '/..' . '/symfony/validator/Constraints/Collection.php', - 'Symfony\\Component\\Validator\\Constraints\\CollectionValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CollectionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Composite' => __DIR__ . '/..' . '/symfony/validator/Constraints/Composite.php', - 'Symfony\\Component\\Validator\\Constraints\\Compound' => __DIR__ . '/..' . '/symfony/validator/Constraints/Compound.php', - 'Symfony\\Component\\Validator\\Constraints\\CompoundValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CompoundValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Count' => __DIR__ . '/..' . '/symfony/validator/Constraints/Count.php', - 'Symfony\\Component\\Validator\\Constraints\\CountValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CountValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Country' => __DIR__ . '/..' . '/symfony/validator/Constraints/Country.php', - 'Symfony\\Component\\Validator\\Constraints\\CountryValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CountryValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColor' => __DIR__ . '/..' . '/symfony/validator/Constraints/CssColor.php', - 'Symfony\\Component\\Validator\\Constraints\\CssColorValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CssColorValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Currency' => __DIR__ . '/..' . '/symfony/validator/Constraints/Currency.php', - 'Symfony\\Component\\Validator\\Constraints\\CurrencyValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/CurrencyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Date' => __DIR__ . '/..' . '/symfony/validator/Constraints/Date.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTime' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateTime.php', - 'Symfony\\Component\\Validator\\Constraints\\DateTimeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateTimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DateValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DateValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\DisableAutoMapping' => __DIR__ . '/..' . '/symfony/validator/Constraints/DisableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleBy' => __DIR__ . '/..' . '/symfony/validator/Constraints/DivisibleBy.php', - 'Symfony\\Component\\Validator\\Constraints\\DivisibleByValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/DivisibleByValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Email' => __DIR__ . '/..' . '/symfony/validator/Constraints/Email.php', - 'Symfony\\Component\\Validator\\Constraints\\EmailValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/EmailValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\EnableAutoMapping' => __DIR__ . '/..' . '/symfony/validator/Constraints/EnableAutoMapping.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/EqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\EqualToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/EqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Existence' => __DIR__ . '/..' . '/symfony/validator/Constraints/Existence.php', - 'Symfony\\Component\\Validator\\Constraints\\Expression' => __DIR__ . '/..' . '/symfony/validator/Constraints/Expression.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntax' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionLanguageSyntax.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionLanguageSyntaxValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ExpressionValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ExpressionValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\File' => __DIR__ . '/..' . '/symfony/validator/Constraints/File.php', - 'Symfony\\Component\\Validator\\Constraints\\FileValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/FileValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThan' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThan.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqual' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/GreaterThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequence' => __DIR__ . '/..' . '/symfony/validator/Constraints/GroupSequence.php', - 'Symfony\\Component\\Validator\\Constraints\\GroupSequenceProvider' => __DIR__ . '/..' . '/symfony/validator/Constraints/GroupSequenceProvider.php', - 'Symfony\\Component\\Validator\\Constraints\\Hostname' => __DIR__ . '/..' . '/symfony/validator/Constraints/Hostname.php', - 'Symfony\\Component\\Validator\\Constraints\\HostnameValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/HostnameValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Iban' => __DIR__ . '/..' . '/symfony/validator/Constraints/Iban.php', - 'Symfony\\Component\\Validator\\Constraints\\IbanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IbanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/IdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\IdenticalToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Image' => __DIR__ . '/..' . '/symfony/validator/Constraints/Image.php', - 'Symfony\\Component\\Validator\\Constraints\\ImageValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ImageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ip' => __DIR__ . '/..' . '/symfony/validator/Constraints/Ip.php', - 'Symfony\\Component\\Validator\\Constraints\\IpValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IpValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalse' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsFalse.php', - 'Symfony\\Component\\Validator\\Constraints\\IsFalseValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsFalseValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNull' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsNull.php', - 'Symfony\\Component\\Validator\\Constraints\\IsNullValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrue' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsTrue.php', - 'Symfony\\Component\\Validator\\Constraints\\IsTrueValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsTrueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isbn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Isbn.php', - 'Symfony\\Component\\Validator\\Constraints\\IsbnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsbnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Isin' => __DIR__ . '/..' . '/symfony/validator/Constraints/Isin.php', - 'Symfony\\Component\\Validator\\Constraints\\IsinValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IsinValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Issn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Issn.php', - 'Symfony\\Component\\Validator\\Constraints\\IssnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/IssnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Json' => __DIR__ . '/..' . '/symfony/validator/Constraints/Json.php', - 'Symfony\\Component\\Validator\\Constraints\\JsonValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/JsonValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Language' => __DIR__ . '/..' . '/symfony/validator/Constraints/Language.php', - 'Symfony\\Component\\Validator\\Constraints\\LanguageValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LanguageValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Length' => __DIR__ . '/..' . '/symfony/validator/Constraints/Length.php', - 'Symfony\\Component\\Validator\\Constraints\\LengthValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LengthValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThan' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThan.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanOrEqual.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanOrEqualValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\LessThanValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LessThanValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Locale' => __DIR__ . '/..' . '/symfony/validator/Constraints/Locale.php', - 'Symfony\\Component\\Validator\\Constraints\\LocaleValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LocaleValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Luhn' => __DIR__ . '/..' . '/symfony/validator/Constraints/Luhn.php', - 'Symfony\\Component\\Validator\\Constraints\\LuhnValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/LuhnValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Negative' => __DIR__ . '/..' . '/symfony/validator/Constraints/Negative.php', - 'Symfony\\Component\\Validator\\Constraints\\NegativeOrZero' => __DIR__ . '/..' . '/symfony/validator/Constraints/NegativeOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlank' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotBlank.php', - 'Symfony\\Component\\Validator\\Constraints\\NotBlankValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotBlankValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPassword' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotCompromisedPassword.php', - 'Symfony\\Component\\Validator\\Constraints\\NotCompromisedPasswordValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotCompromisedPasswordValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotEqualTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotEqualToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotEqualToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalTo' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotIdenticalTo.php', - 'Symfony\\Component\\Validator\\Constraints\\NotIdenticalToValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotIdenticalToValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNull' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotNull.php', - 'Symfony\\Component\\Validator\\Constraints\\NotNullValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/NotNullValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\NumberConstraintTrait' => __DIR__ . '/..' . '/symfony/validator/Constraints/NumberConstraintTrait.php', - 'Symfony\\Component\\Validator\\Constraints\\Optional' => __DIR__ . '/..' . '/symfony/validator/Constraints/Optional.php', - 'Symfony\\Component\\Validator\\Constraints\\Positive' => __DIR__ . '/..' . '/symfony/validator/Constraints/Positive.php', - 'Symfony\\Component\\Validator\\Constraints\\PositiveOrZero' => __DIR__ . '/..' . '/symfony/validator/Constraints/PositiveOrZero.php', - 'Symfony\\Component\\Validator\\Constraints\\Range' => __DIR__ . '/..' . '/symfony/validator/Constraints/Range.php', - 'Symfony\\Component\\Validator\\Constraints\\RangeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/RangeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Regex' => __DIR__ . '/..' . '/symfony/validator/Constraints/Regex.php', - 'Symfony\\Component\\Validator\\Constraints\\RegexValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/RegexValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Required' => __DIR__ . '/..' . '/symfony/validator/Constraints/Required.php', - 'Symfony\\Component\\Validator\\Constraints\\Sequentially' => __DIR__ . '/..' . '/symfony/validator/Constraints/Sequentially.php', - 'Symfony\\Component\\Validator\\Constraints\\SequentiallyValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/SequentiallyValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Time' => __DIR__ . '/..' . '/symfony/validator/Constraints/Time.php', - 'Symfony\\Component\\Validator\\Constraints\\TimeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TimeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Timezone' => __DIR__ . '/..' . '/symfony/validator/Constraints/Timezone.php', - 'Symfony\\Component\\Validator\\Constraints\\TimezoneValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TimezoneValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Traverse' => __DIR__ . '/..' . '/symfony/validator/Constraints/Traverse.php', - 'Symfony\\Component\\Validator\\Constraints\\Type' => __DIR__ . '/..' . '/symfony/validator/Constraints/Type.php', - 'Symfony\\Component\\Validator\\Constraints\\TypeValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/TypeValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Ulid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Ulid.php', - 'Symfony\\Component\\Validator\\Constraints\\UlidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UlidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Unique' => __DIR__ . '/..' . '/symfony/validator/Constraints/Unique.php', - 'Symfony\\Component\\Validator\\Constraints\\UniqueValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UniqueValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Url' => __DIR__ . '/..' . '/symfony/validator/Constraints/Url.php', - 'Symfony\\Component\\Validator\\Constraints\\UrlValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UrlValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Uuid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Uuid.php', - 'Symfony\\Component\\Validator\\Constraints\\UuidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/UuidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\Valid' => __DIR__ . '/..' . '/symfony/validator/Constraints/Valid.php', - 'Symfony\\Component\\Validator\\Constraints\\ValidValidator' => __DIR__ . '/..' . '/symfony/validator/Constraints/ValidValidator.php', - 'Symfony\\Component\\Validator\\Constraints\\ZeroComparisonConstraintTrait' => __DIR__ . '/..' . '/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php', - 'Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory' => __DIR__ . '/..' . '/symfony/validator/ContainerConstraintValidatorFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContext' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContext.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactory' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextFactory.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextFactoryInterface.php', - 'Symfony\\Component\\Validator\\Context\\ExecutionContextInterface' => __DIR__ . '/..' . '/symfony/validator/Context/ExecutionContextInterface.php', - 'Symfony\\Component\\Validator\\DataCollector\\ValidatorDataCollector' => __DIR__ . '/..' . '/symfony/validator/DataCollector/ValidatorDataCollector.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddAutoMappingConfigurationPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddConstraintValidatorsPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php', - 'Symfony\\Component\\Validator\\DependencyInjection\\AddValidatorInitializersPass' => __DIR__ . '/..' . '/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php', - 'Symfony\\Component\\Validator\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/symfony/validator/Exception/BadMethodCallException.php', - 'Symfony\\Component\\Validator\\Exception\\ConstraintDefinitionException' => __DIR__ . '/..' . '/symfony/validator/Exception/ConstraintDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/validator/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Validator\\Exception\\GroupDefinitionException' => __DIR__ . '/..' . '/symfony/validator/Exception/GroupDefinitionException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/validator/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Validator\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/validator/Exception/InvalidOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/validator/Exception/LogicException.php', - 'Symfony\\Component\\Validator\\Exception\\MappingException' => __DIR__ . '/..' . '/symfony/validator/Exception/MappingException.php', - 'Symfony\\Component\\Validator\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/validator/Exception/MissingOptionsException.php', - 'Symfony\\Component\\Validator\\Exception\\NoSuchMetadataException' => __DIR__ . '/..' . '/symfony/validator/Exception/NoSuchMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\OutOfBoundsException' => __DIR__ . '/..' . '/symfony/validator/Exception/OutOfBoundsException.php', - 'Symfony\\Component\\Validator\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/validator/Exception/RuntimeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\Validator\\Exception\\UnexpectedValueException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnexpectedValueException.php', - 'Symfony\\Component\\Validator\\Exception\\UnsupportedMetadataException' => __DIR__ . '/..' . '/symfony/validator/Exception/UnsupportedMetadataException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidationFailedException' => __DIR__ . '/..' . '/symfony/validator/Exception/ValidationFailedException.php', - 'Symfony\\Component\\Validator\\Exception\\ValidatorException' => __DIR__ . '/..' . '/symfony/validator/Exception/ValidatorException.php', - 'Symfony\\Component\\Validator\\GroupSequenceProviderInterface' => __DIR__ . '/..' . '/symfony/validator/GroupSequenceProviderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\AutoMappingStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/AutoMappingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\CascadingStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/CascadingStrategy.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/ClassMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\ClassMetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/ClassMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\BlackHoleMetadataFactory' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php', - 'Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\GenericMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/GenericMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\GetterMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/GetterMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AbstractLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AbstractLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AnnotationLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AnnotationLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\AutoMappingTrait' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/AutoMappingTrait.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/FileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\FilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/FilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderChain' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/LoaderChain.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/LoaderInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\PropertyInfoLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/PropertyInfoLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\StaticMethodLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/StaticMethodLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/XmlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFilesLoader' => __DIR__ . '/..' . '/symfony/validator/Mapping/Loader/YamlFilesLoader.php', - 'Symfony\\Component\\Validator\\Mapping\\MemberMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/MemberMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\MetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/MetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadata' => __DIR__ . '/..' . '/symfony/validator/Mapping/PropertyMetadata.php', - 'Symfony\\Component\\Validator\\Mapping\\PropertyMetadataInterface' => __DIR__ . '/..' . '/symfony/validator/Mapping/PropertyMetadataInterface.php', - 'Symfony\\Component\\Validator\\Mapping\\TraversalStrategy' => __DIR__ . '/..' . '/symfony/validator/Mapping/TraversalStrategy.php', - 'Symfony\\Component\\Validator\\ObjectInitializerInterface' => __DIR__ . '/..' . '/symfony/validator/ObjectInitializerInterface.php', - 'Symfony\\Component\\Validator\\Test\\ConstraintValidatorTestCase' => __DIR__ . '/..' . '/symfony/validator/Test/ConstraintValidatorTestCase.php', - 'Symfony\\Component\\Validator\\Util\\PropertyPath' => __DIR__ . '/..' . '/symfony/validator/Util/PropertyPath.php', - 'Symfony\\Component\\Validator\\Validation' => __DIR__ . '/..' . '/symfony/validator/Validation.php', - 'Symfony\\Component\\Validator\\ValidatorBuilder' => __DIR__ . '/..' . '/symfony/validator/ValidatorBuilder.php', - 'Symfony\\Component\\Validator\\Validator\\ContextualValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/Validator/ContextualValidatorInterface.php', - 'Symfony\\Component\\Validator\\Validator\\LazyProperty' => __DIR__ . '/..' . '/symfony/validator/Validator/LazyProperty.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveContextualValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/RecursiveContextualValidator.php', - 'Symfony\\Component\\Validator\\Validator\\RecursiveValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/RecursiveValidator.php', - 'Symfony\\Component\\Validator\\Validator\\TraceableValidator' => __DIR__ . '/..' . '/symfony/validator/Validator/TraceableValidator.php', - 'Symfony\\Component\\Validator\\Validator\\ValidatorInterface' => __DIR__ . '/..' . '/symfony/validator/Validator/ValidatorInterface.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilder' => __DIR__ . '/..' . '/symfony/validator/Violation/ConstraintViolationBuilder.php', - 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface' => __DIR__ . '/..' . '/symfony/validator/Violation/ConstraintViolationBuilderInterface.php', - 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ClassStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ConstStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutArrayStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DateCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsPairStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FiberCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/GmpCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImagineCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImgStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/IntlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/LinkStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MemcachedCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MysqliCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PdoCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PgSqlCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RdKafkaCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RedisCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ReflectionCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SplCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/StubCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SymfonyCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/TraceStub.php', - 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/UuidCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlReaderCaster.php', - 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlResourceCaster.php', - 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php', - 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Data.php', - 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php', - 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Stub.php', - 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', - 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', - 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => __DIR__ . '/..' . '/symfony/var-dumper/Command/ServerDumpCommand.php', - 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/DataDumperInterface.php', - 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/HtmlDumper.php', - 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ServerDumper.php', - 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', - 'Symfony\\Component\\VarDumper\\Server\\Connection' => __DIR__ . '/..' . '/symfony/var-dumper/Server/Connection.php', - 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', - 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', - 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ClassNotFoundException.php', - 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ExceptionInterface.php', - 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', - 'Symfony\\Component\\VarExporter\\Instantiator' => __DIR__ . '/..' . '/symfony/var-exporter/Instantiator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Exporter' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Exporter.php', - 'Symfony\\Component\\VarExporter\\Internal\\Hydrator' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Hydrator.php', - 'Symfony\\Component\\VarExporter\\Internal\\Reference' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Reference.php', - 'Symfony\\Component\\VarExporter\\Internal\\Registry' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Registry.php', - 'Symfony\\Component\\VarExporter\\Internal\\Values' => __DIR__ . '/..' . '/symfony/var-exporter/Internal/Values.php', - 'Symfony\\Component\\VarExporter\\VarExporter' => __DIR__ . '/..' . '/symfony/var-exporter/VarExporter.php', - 'Symfony\\Component\\Yaml\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/yaml/Command/LintCommand.php', - 'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php', - 'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php', - 'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php', - 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php', - 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php', - 'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php', - 'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php', - 'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => __DIR__ . '/..' . '/symfony/yaml/Tag/TaggedValue.php', - 'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php', - 'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => __DIR__ . '/..' . '/symfony/cache-contracts/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => __DIR__ . '/..' . '/symfony/cache-contracts/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/Event.php', - 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', - 'Symfony\\Contracts\\HttpClient\\ChunkInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ChunkInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ClientExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/HttpExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\ServerExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ServerExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\TimeoutExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\Exception\\TransportExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/TransportExceptionInterface.php', - 'Symfony\\Contracts\\HttpClient\\HttpClientInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/HttpClientInterface.php', - 'Symfony\\Contracts\\HttpClient\\ResponseInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ResponseInterface.php', - 'Symfony\\Contracts\\HttpClient\\ResponseStreamInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ResponseStreamInterface.php', - 'Symfony\\Contracts\\HttpClient\\Test\\HttpClientTestCase' => __DIR__ . '/..' . '/symfony/http-client-contracts/Test/HttpClientTestCase.php', - 'Symfony\\Contracts\\HttpClient\\Test\\TestHttpServer' => __DIR__ . '/..' . '/symfony/http-client-contracts/Test/TestHttpServer.php', - 'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php', - 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/translation-contracts/Test/TranslatorTest.php', - 'Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatableInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php', - 'Symfony\\Flex\\Cache' => __DIR__ . '/..' . '/symfony/flex/src/Cache.php', - 'Symfony\\Flex\\Command\\DumpEnvCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/DumpEnvCommand.php', - 'Symfony\\Flex\\Command\\GenerateIdCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/GenerateIdCommand.php', - 'Symfony\\Flex\\Command\\InstallRecipesCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/InstallRecipesCommand.php', - 'Symfony\\Flex\\Command\\RecipesCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/RecipesCommand.php', - 'Symfony\\Flex\\Command\\RemoveCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/RemoveCommand.php', - 'Symfony\\Flex\\Command\\RequireCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/RequireCommand.php', - 'Symfony\\Flex\\Command\\UnpackCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/UnpackCommand.php', - 'Symfony\\Flex\\Command\\UpdateCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/UpdateCommand.php', - 'Symfony\\Flex\\Command\\UpdateRecipesCommand' => __DIR__ . '/..' . '/symfony/flex/src/Command/UpdateRecipesCommand.php', - 'Symfony\\Flex\\ComposerRepository' => __DIR__ . '/..' . '/symfony/flex/src/ComposerRepository.php', - 'Symfony\\Flex\\Configurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator.php', - 'Symfony\\Flex\\Configurator\\AbstractConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/AbstractConfigurator.php', - 'Symfony\\Flex\\Configurator\\BundlesConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/BundlesConfigurator.php', - 'Symfony\\Flex\\Configurator\\ComposerScriptsConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/ComposerScriptsConfigurator.php', - 'Symfony\\Flex\\Configurator\\ContainerConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/ContainerConfigurator.php', - 'Symfony\\Flex\\Configurator\\CopyFromPackageConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/CopyFromPackageConfigurator.php', - 'Symfony\\Flex\\Configurator\\CopyFromRecipeConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/CopyFromRecipeConfigurator.php', - 'Symfony\\Flex\\Configurator\\DockerComposeConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/DockerComposeConfigurator.php', - 'Symfony\\Flex\\Configurator\\DockerfileConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/DockerfileConfigurator.php', - 'Symfony\\Flex\\Configurator\\EnvConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/EnvConfigurator.php', - 'Symfony\\Flex\\Configurator\\GitignoreConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/GitignoreConfigurator.php', - 'Symfony\\Flex\\Configurator\\MakefileConfigurator' => __DIR__ . '/..' . '/symfony/flex/src/Configurator/MakefileConfigurator.php', - 'Symfony\\Flex\\CurlDownloader' => __DIR__ . '/..' . '/symfony/flex/src/CurlDownloader.php', - 'Symfony\\Flex\\Downloader' => __DIR__ . '/..' . '/symfony/flex/src/Downloader.php', - 'Symfony\\Flex\\Event\\UpdateEvent' => __DIR__ . '/..' . '/symfony/flex/src/Event/UpdateEvent.php', - 'Symfony\\Flex\\Flex' => __DIR__ . '/..' . '/symfony/flex/src/Flex.php', - 'Symfony\\Flex\\GithubApi' => __DIR__ . '/..' . '/symfony/flex/src/GithubApi.php', - 'Symfony\\Flex\\InformationOperation' => __DIR__ . '/..' . '/symfony/flex/src/InformationOperation.php', - 'Symfony\\Flex\\Lock' => __DIR__ . '/..' . '/symfony/flex/src/Lock.php', - 'Symfony\\Flex\\Options' => __DIR__ . '/..' . '/symfony/flex/src/Options.php', - 'Symfony\\Flex\\PackageFilter' => __DIR__ . '/..' . '/symfony/flex/src/PackageFilter.php', - 'Symfony\\Flex\\PackageJsonSynchronizer' => __DIR__ . '/..' . '/symfony/flex/src/PackageJsonSynchronizer.php', - 'Symfony\\Flex\\PackageResolver' => __DIR__ . '/..' . '/symfony/flex/src/PackageResolver.php', - 'Symfony\\Flex\\ParallelDownloader' => __DIR__ . '/..' . '/symfony/flex/src/ParallelDownloader.php', - 'Symfony\\Flex\\Path' => __DIR__ . '/..' . '/symfony/flex/src/Path.php', - 'Symfony\\Flex\\Recipe' => __DIR__ . '/..' . '/symfony/flex/src/Recipe.php', - 'Symfony\\Flex\\Response' => __DIR__ . '/..' . '/symfony/flex/src/Response.php', - 'Symfony\\Flex\\ScriptExecutor' => __DIR__ . '/..' . '/symfony/flex/src/ScriptExecutor.php', - 'Symfony\\Flex\\SymfonyBundle' => __DIR__ . '/..' . '/symfony/flex/src/SymfonyBundle.php', - 'Symfony\\Flex\\TruncatedComposerRepository' => __DIR__ . '/..' . '/symfony/flex/src/TruncatedComposerRepository.php', - 'Symfony\\Flex\\Unpack\\Operation' => __DIR__ . '/..' . '/symfony/flex/src/Unpack/Operation.php', - 'Symfony\\Flex\\Unpack\\Result' => __DIR__ . '/..' . '/symfony/flex/src/Unpack/Result.php', - 'Symfony\\Flex\\Unpacker' => __DIR__ . '/..' . '/symfony/flex/src/Unpacker.php', - 'Symfony\\Flex\\Update\\DiffHelper' => __DIR__ . '/..' . '/symfony/flex/src/Update/DiffHelper.php', - 'Symfony\\Flex\\Update\\RecipePatch' => __DIR__ . '/..' . '/symfony/flex/src/Update/RecipePatch.php', - 'Symfony\\Flex\\Update\\RecipePatcher' => __DIR__ . '/..' . '/symfony/flex/src/Update/RecipePatcher.php', - 'Symfony\\Flex\\Update\\RecipeUpdate' => __DIR__ . '/..' . '/symfony/flex/src/Update/RecipeUpdate.php', - 'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Collator.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Currencies' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Currencies.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\AmPmTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfWeekTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayOfYearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\DayTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\FullTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1200Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour1201Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2400Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Hour2401Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\HourTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MinuteTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\MonthTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\QuarterTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\SecondTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\TimezoneTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\Transformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/Transformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\DateFormat\\YearTransformer' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodNotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\NotImplementedException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/NotImplementedException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Exception/RuntimeException.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Icu' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Icu.php', - 'Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/IntlDateFormatter.php', - 'Symfony\\Polyfill\\Intl\\Icu\\Locale' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Locale.php', - 'Symfony\\Polyfill\\Intl\\Icu\\NumberFormatter' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/NumberFormatter.php', - 'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php', - 'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php', - 'Symfony\\Polyfill\\Php73\\Php73' => __DIR__ . '/..' . '/symfony/polyfill-php73/Php73.php', - 'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php', - 'Symfony\\Polyfill\\Php80\\PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/PhpToken.php', - 'Symfony\\Polyfill\\Php81\\Php81' => __DIR__ . '/..' . '/symfony/polyfill-php81/Php81.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\ApplicationRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/Console/ApplicationRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Command\\CommandRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/Console/Command/CommandRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Input\\InputInterfaceRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/Console/Input/InputInterfaceRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\Console\\Output\\OutputInterfaceRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/Console/Output/OutputInterfaceRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpFoundation\\RequestRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/HttpFoundation/RequestRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpFoundation\\ResponseRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/HttpFoundation/ResponseRuntime.php', - 'Symfony\\Runtime\\Symfony\\Component\\HttpKernel\\HttpKernelInterfaceRuntime' => __DIR__ . '/..' . '/symfony/runtime/Internal/HttpKernel/HttpKernelInterfaceRuntime.php', - 'Twig\\Cache\\CacheInterface' => __DIR__ . '/..' . '/twig/twig/src/Cache/CacheInterface.php', - 'Twig\\Cache\\FilesystemCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/FilesystemCache.php', - 'Twig\\Cache\\NullCache' => __DIR__ . '/..' . '/twig/twig/src/Cache/NullCache.php', - 'Twig\\Compiler' => __DIR__ . '/..' . '/twig/twig/src/Compiler.php', - 'Twig\\Environment' => __DIR__ . '/..' . '/twig/twig/src/Environment.php', - 'Twig\\Error\\Error' => __DIR__ . '/..' . '/twig/twig/src/Error/Error.php', - 'Twig\\Error\\LoaderError' => __DIR__ . '/..' . '/twig/twig/src/Error/LoaderError.php', - 'Twig\\Error\\RuntimeError' => __DIR__ . '/..' . '/twig/twig/src/Error/RuntimeError.php', - 'Twig\\Error\\SyntaxError' => __DIR__ . '/..' . '/twig/twig/src/Error/SyntaxError.php', - 'Twig\\ExpressionParser' => __DIR__ . '/..' . '/twig/twig/src/ExpressionParser.php', - 'Twig\\ExtensionSet' => __DIR__ . '/..' . '/twig/twig/src/ExtensionSet.php', - 'Twig\\Extension\\AbstractExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/AbstractExtension.php', - 'Twig\\Extension\\CoreExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/CoreExtension.php', - 'Twig\\Extension\\DebugExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/DebugExtension.php', - 'Twig\\Extension\\EscaperExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/EscaperExtension.php', - 'Twig\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/ExtensionInterface.php', - 'Twig\\Extension\\GlobalsInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/GlobalsInterface.php', - 'Twig\\Extension\\OptimizerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/OptimizerExtension.php', - 'Twig\\Extension\\ProfilerExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/ProfilerExtension.php', - 'Twig\\Extension\\RuntimeExtensionInterface' => __DIR__ . '/..' . '/twig/twig/src/Extension/RuntimeExtensionInterface.php', - 'Twig\\Extension\\SandboxExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/SandboxExtension.php', - 'Twig\\Extension\\StagingExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StagingExtension.php', - 'Twig\\Extension\\StringLoaderExtension' => __DIR__ . '/..' . '/twig/twig/src/Extension/StringLoaderExtension.php', - 'Twig\\FileExtensionEscapingStrategy' => __DIR__ . '/..' . '/twig/twig/src/FileExtensionEscapingStrategy.php', - 'Twig\\Lexer' => __DIR__ . '/..' . '/twig/twig/src/Lexer.php', - 'Twig\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ArrayLoader.php', - 'Twig\\Loader\\ChainLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/ChainLoader.php', - 'Twig\\Loader\\FilesystemLoader' => __DIR__ . '/..' . '/twig/twig/src/Loader/FilesystemLoader.php', - 'Twig\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/Loader/LoaderInterface.php', - 'Twig\\Markup' => __DIR__ . '/..' . '/twig/twig/src/Markup.php', - 'Twig\\NodeTraverser' => __DIR__ . '/..' . '/twig/twig/src/NodeTraverser.php', - 'Twig\\NodeVisitor\\AbstractNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php', - 'Twig\\NodeVisitor\\EscaperNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php', - 'Twig\\NodeVisitor\\MacroAutoImportNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php', - 'Twig\\NodeVisitor\\NodeVisitorInterface' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/NodeVisitorInterface.php', - 'Twig\\NodeVisitor\\OptimizerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php', - 'Twig\\NodeVisitor\\SafeAnalysisNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php', - 'Twig\\NodeVisitor\\SandboxNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php', - 'Twig\\Node\\AutoEscapeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/AutoEscapeNode.php', - 'Twig\\Node\\BlockNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockNode.php', - 'Twig\\Node\\BlockReferenceNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BlockReferenceNode.php', - 'Twig\\Node\\BodyNode' => __DIR__ . '/..' . '/twig/twig/src/Node/BodyNode.php', - 'Twig\\Node\\CheckSecurityCallNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityCallNode.php', - 'Twig\\Node\\CheckSecurityNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckSecurityNode.php', - 'Twig\\Node\\CheckToStringNode' => __DIR__ . '/..' . '/twig/twig/src/Node/CheckToStringNode.php', - 'Twig\\Node\\DeprecatedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DeprecatedNode.php', - 'Twig\\Node\\DoNode' => __DIR__ . '/..' . '/twig/twig/src/Node/DoNode.php', - 'Twig\\Node\\EmbedNode' => __DIR__ . '/..' . '/twig/twig/src/Node/EmbedNode.php', - 'Twig\\Node\\Expression\\AbstractExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AbstractExpression.php', - 'Twig\\Node\\Expression\\ArrayExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrayExpression.php', - 'Twig\\Node\\Expression\\ArrowFunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ArrowFunctionExpression.php', - 'Twig\\Node\\Expression\\AssignNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/AssignNameExpression.php', - 'Twig\\Node\\Expression\\Binary\\AbstractBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AbstractBinary.php', - 'Twig\\Node\\Expression\\Binary\\AddBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AddBinary.php', - 'Twig\\Node\\Expression\\Binary\\AndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/AndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseAndBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseOrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php', - 'Twig\\Node\\Expression\\Binary\\BitwiseXorBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php', - 'Twig\\Node\\Expression\\Binary\\ConcatBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ConcatBinary.php', - 'Twig\\Node\\Expression\\Binary\\DivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/DivBinary.php', - 'Twig\\Node\\Expression\\Binary\\EndsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\EqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/EqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\FloorDivBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterBinary.php', - 'Twig\\Node\\Expression\\Binary\\GreaterEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\InBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/InBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessBinary.php', - 'Twig\\Node\\Expression\\Binary\\LessEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\MatchesBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MatchesBinary.php', - 'Twig\\Node\\Expression\\Binary\\ModBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/ModBinary.php', - 'Twig\\Node\\Expression\\Binary\\MulBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/MulBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotEqualBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php', - 'Twig\\Node\\Expression\\Binary\\NotInBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/NotInBinary.php', - 'Twig\\Node\\Expression\\Binary\\OrBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/OrBinary.php', - 'Twig\\Node\\Expression\\Binary\\PowerBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/PowerBinary.php', - 'Twig\\Node\\Expression\\Binary\\RangeBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/RangeBinary.php', - 'Twig\\Node\\Expression\\Binary\\SpaceshipBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php', - 'Twig\\Node\\Expression\\Binary\\StartsWithBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php', - 'Twig\\Node\\Expression\\Binary\\SubBinary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Binary/SubBinary.php', - 'Twig\\Node\\Expression\\BlockReferenceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/BlockReferenceExpression.php', - 'Twig\\Node\\Expression\\CallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/CallExpression.php', - 'Twig\\Node\\Expression\\ConditionalExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConditionalExpression.php', - 'Twig\\Node\\Expression\\ConstantExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ConstantExpression.php', - 'Twig\\Node\\Expression\\FilterExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FilterExpression.php', - 'Twig\\Node\\Expression\\Filter\\DefaultFilter' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Filter/DefaultFilter.php', - 'Twig\\Node\\Expression\\FunctionExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/FunctionExpression.php', - 'Twig\\Node\\Expression\\GetAttrExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/GetAttrExpression.php', - 'Twig\\Node\\Expression\\InlinePrint' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/InlinePrint.php', - 'Twig\\Node\\Expression\\MethodCallExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/MethodCallExpression.php', - 'Twig\\Node\\Expression\\NameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NameExpression.php', - 'Twig\\Node\\Expression\\NullCoalesceExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/NullCoalesceExpression.php', - 'Twig\\Node\\Expression\\ParentExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/ParentExpression.php', - 'Twig\\Node\\Expression\\TempNameExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TempNameExpression.php', - 'Twig\\Node\\Expression\\TestExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/TestExpression.php', - 'Twig\\Node\\Expression\\Test\\ConstantTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/ConstantTest.php', - 'Twig\\Node\\Expression\\Test\\DefinedTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DefinedTest.php', - 'Twig\\Node\\Expression\\Test\\DivisiblebyTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php', - 'Twig\\Node\\Expression\\Test\\EvenTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/EvenTest.php', - 'Twig\\Node\\Expression\\Test\\NullTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/NullTest.php', - 'Twig\\Node\\Expression\\Test\\OddTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/OddTest.php', - 'Twig\\Node\\Expression\\Test\\SameasTest' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Test/SameasTest.php', - 'Twig\\Node\\Expression\\Unary\\AbstractUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/AbstractUnary.php', - 'Twig\\Node\\Expression\\Unary\\NegUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NegUnary.php', - 'Twig\\Node\\Expression\\Unary\\NotUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/NotUnary.php', - 'Twig\\Node\\Expression\\Unary\\PosUnary' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/Unary/PosUnary.php', - 'Twig\\Node\\Expression\\VariadicExpression' => __DIR__ . '/..' . '/twig/twig/src/Node/Expression/VariadicExpression.php', - 'Twig\\Node\\FlushNode' => __DIR__ . '/..' . '/twig/twig/src/Node/FlushNode.php', - 'Twig\\Node\\ForLoopNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForLoopNode.php', - 'Twig\\Node\\ForNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ForNode.php', - 'Twig\\Node\\IfNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IfNode.php', - 'Twig\\Node\\ImportNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ImportNode.php', - 'Twig\\Node\\IncludeNode' => __DIR__ . '/..' . '/twig/twig/src/Node/IncludeNode.php', - 'Twig\\Node\\MacroNode' => __DIR__ . '/..' . '/twig/twig/src/Node/MacroNode.php', - 'Twig\\Node\\ModuleNode' => __DIR__ . '/..' . '/twig/twig/src/Node/ModuleNode.php', - 'Twig\\Node\\Node' => __DIR__ . '/..' . '/twig/twig/src/Node/Node.php', - 'Twig\\Node\\NodeCaptureInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeCaptureInterface.php', - 'Twig\\Node\\NodeOutputInterface' => __DIR__ . '/..' . '/twig/twig/src/Node/NodeOutputInterface.php', - 'Twig\\Node\\PrintNode' => __DIR__ . '/..' . '/twig/twig/src/Node/PrintNode.php', - 'Twig\\Node\\SandboxNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SandboxNode.php', - 'Twig\\Node\\SetNode' => __DIR__ . '/..' . '/twig/twig/src/Node/SetNode.php', - 'Twig\\Node\\TextNode' => __DIR__ . '/..' . '/twig/twig/src/Node/TextNode.php', - 'Twig\\Node\\WithNode' => __DIR__ . '/..' . '/twig/twig/src/Node/WithNode.php', - 'Twig\\Parser' => __DIR__ . '/..' . '/twig/twig/src/Parser.php', - 'Twig\\Profiler\\Dumper\\BaseDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BaseDumper.php', - 'Twig\\Profiler\\Dumper\\BlackfireDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/BlackfireDumper.php', - 'Twig\\Profiler\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/HtmlDumper.php', - 'Twig\\Profiler\\Dumper\\TextDumper' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Dumper/TextDumper.php', - 'Twig\\Profiler\\NodeVisitor\\ProfilerNodeVisitor' => __DIR__ . '/..' . '/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php', - 'Twig\\Profiler\\Node\\EnterProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/EnterProfileNode.php', - 'Twig\\Profiler\\Node\\LeaveProfileNode' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Node/LeaveProfileNode.php', - 'Twig\\Profiler\\Profile' => __DIR__ . '/..' . '/twig/twig/src/Profiler/Profile.php', - 'Twig\\RuntimeLoader\\ContainerRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php', - 'Twig\\RuntimeLoader\\FactoryRuntimeLoader' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php', - 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' => __DIR__ . '/..' . '/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php', - 'Twig\\Sandbox\\SecurityError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFilterError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php', - 'Twig\\Sandbox\\SecurityNotAllowedFunctionError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php', - 'Twig\\Sandbox\\SecurityNotAllowedMethodError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php', - 'Twig\\Sandbox\\SecurityNotAllowedPropertyError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php', - 'Twig\\Sandbox\\SecurityNotAllowedTagError' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php', - 'Twig\\Sandbox\\SecurityPolicy' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicy.php', - 'Twig\\Sandbox\\SecurityPolicyInterface' => __DIR__ . '/..' . '/twig/twig/src/Sandbox/SecurityPolicyInterface.php', - 'Twig\\Source' => __DIR__ . '/..' . '/twig/twig/src/Source.php', - 'Twig\\Template' => __DIR__ . '/..' . '/twig/twig/src/Template.php', - 'Twig\\TemplateWrapper' => __DIR__ . '/..' . '/twig/twig/src/TemplateWrapper.php', - 'Twig\\Test\\IntegrationTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/IntegrationTestCase.php', - 'Twig\\Test\\NodeTestCase' => __DIR__ . '/..' . '/twig/twig/src/Test/NodeTestCase.php', - 'Twig\\Token' => __DIR__ . '/..' . '/twig/twig/src/Token.php', - 'Twig\\TokenParser\\AbstractTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AbstractTokenParser.php', - 'Twig\\TokenParser\\ApplyTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ApplyTokenParser.php', - 'Twig\\TokenParser\\AutoEscapeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/AutoEscapeTokenParser.php', - 'Twig\\TokenParser\\BlockTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/BlockTokenParser.php', - 'Twig\\TokenParser\\DeprecatedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DeprecatedTokenParser.php', - 'Twig\\TokenParser\\DoTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/DoTokenParser.php', - 'Twig\\TokenParser\\EmbedTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/EmbedTokenParser.php', - 'Twig\\TokenParser\\ExtendsTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ExtendsTokenParser.php', - 'Twig\\TokenParser\\FlushTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FlushTokenParser.php', - 'Twig\\TokenParser\\ForTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ForTokenParser.php', - 'Twig\\TokenParser\\FromTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/FromTokenParser.php', - 'Twig\\TokenParser\\IfTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IfTokenParser.php', - 'Twig\\TokenParser\\ImportTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/ImportTokenParser.php', - 'Twig\\TokenParser\\IncludeTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/IncludeTokenParser.php', - 'Twig\\TokenParser\\MacroTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/MacroTokenParser.php', - 'Twig\\TokenParser\\SandboxTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SandboxTokenParser.php', - 'Twig\\TokenParser\\SetTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/SetTokenParser.php', - 'Twig\\TokenParser\\TokenParserInterface' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/TokenParserInterface.php', - 'Twig\\TokenParser\\UseTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/UseTokenParser.php', - 'Twig\\TokenParser\\WithTokenParser' => __DIR__ . '/..' . '/twig/twig/src/TokenParser/WithTokenParser.php', - 'Twig\\TokenStream' => __DIR__ . '/..' . '/twig/twig/src/TokenStream.php', - 'Twig\\TwigFilter' => __DIR__ . '/..' . '/twig/twig/src/TwigFilter.php', - 'Twig\\TwigFunction' => __DIR__ . '/..' . '/twig/twig/src/TwigFunction.php', - 'Twig\\TwigTest' => __DIR__ . '/..' . '/twig/twig/src/TwigTest.php', - 'Twig\\Util\\DeprecationCollector' => __DIR__ . '/..' . '/twig/twig/src/Util/DeprecationCollector.php', - 'Twig\\Util\\TemplateDirIterator' => __DIR__ . '/..' . '/twig/twig/src/Util/TemplateDirIterator.php', - 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', - 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitb2423aa65ed6776e221b68b36212a5a3::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitb2423aa65ed6776e221b68b36212a5a3::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitb2423aa65ed6776e221b68b36212a5a3::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index 1a83b3d..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,4593 +0,0 @@ -{ - "packages": [ - { - "name": "doctrine/annotations", - "version": "1.13.2", - "version_normalized": "1.13.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "time": "2021-08-05T19:00:23+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" - }, - "install-path": "../doctrine/annotations" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "version_normalized": "1.2.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "time": "2022-02-28T11:07:21+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "install-path": "../doctrine/lexer" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T20:24:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "install-path": "../psr/cache" - }, - { - "name": "psr/container", - "version": "1.1.2", - "version_normalized": "1.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "time": "2021-11-05T16:50:12+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "install-path": "../psr/container" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "time": "2019-01-08T18:20:26+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "install-path": "../psr/event-dispatcher" - }, - { - "name": "psr/log", - "version": "1.1.4", - "version_normalized": "1.1.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2021-05-03T11:20:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "install-path": "../psr/log" - }, - { - "name": "symfony/apache-pack", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/apache-pack.git", - "reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/apache-pack/zipball/3aa5818d73ad2551281fc58a75afd9ca82622e6c", - "reference": "3aa5818d73ad2551281fc58a75afd9ca82622e6c", - "shasum": "" - }, - "time": "2017-12-12T01:46:35+00:00", - "type": "symfony-pack", - "installation-source": "dist", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A pack for Apache support in Symfony", - "support": { - "issues": "https://github.com/symfony/apache-pack/issues", - "source": "https://github.com/symfony/apache-pack/tree/master" - }, - "install-path": "../symfony/apache-pack" - }, - { - "name": "symfony/cache", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "ba06841ed293fcaf79a592f59fdaba471f7c756c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/ba06841ed293fcaf79a592f59fdaba471f7c756c", - "reference": "ba06841ed293fcaf79a592f59fdaba471f7c756c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.13.1|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "time": "2022-03-22T15:31:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache" - }, - { - "name": "symfony/cache-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache-contracts" - }, - { - "name": "symfony/config", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "05624c386afa1b4ccc1357463d830fade8d9d404" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/05624c386afa1b4ccc1357463d830fade8d9d404", - "reference": "05624c386afa1b4ccc1357463d830fade8d9d404", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22" - }, - "conflict": { - "symfony/finder": "<4.4" - }, - "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "time": "2022-03-21T13:42:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/config" - }, - { - "name": "symfony/console", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "time": "2022-03-31T17:09:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/console" - }, - { - "name": "symfony/dependency-injection", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "35588b2afb08ea3a142d62fefdcad4cb09be06ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/35588b2afb08ea3a142d62fefdcad4cb09be06ed", - "reference": "35588b2afb08ea3a142d62fefdcad4cb09be06ed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/service-contracts": "^1.1.6|^2" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<5.3", - "symfony/finder": "<4.4", - "symfony/proxy-manager-bridge": "<4.4", - "symfony/yaml": "<4.4.26" - }, - "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0|2.0" - }, - "require-dev": { - "symfony/config": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4.26|^5.0|^6.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "time": "2022-03-08T15:43:06+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dependency-injection" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/deprecation-contracts" - }, - { - "name": "symfony/dotenv", - "version": "v5.4.5", - "version_normalized": "5.4.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "83a2310904a4f5d4f42526227b5a578ac82232a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/83a2310904a4f5d4f42526227b5a578ac82232a9", - "reference": "83a2310904a4f5d4f42526227b5a578ac82232a9", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0" - }, - "time": "2022-02-15T17:04:12+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "source": "https://github.com/symfony/dotenv/tree/v5.4.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dotenv" - }, - { - "name": "symfony/error-handler", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/060bc01856a1846e3e4385261bc9ed11a1dd7b6a", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" - }, - "time": "2022-03-18T16:21:29+00:00", - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/error-handler" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher-contracts" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3a4442138d80c9f7b600fb297534ac718b61d37f", - "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-04-01T12:33:59+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/filesystem" - }, - { - "name": "symfony/finder", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-01-26T16:34:36+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/finder" - }, - { - "name": "symfony/flex", - "version": "v1.18.5", - "version_normalized": "1.18.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/flex.git", - "reference": "10e438f53a972439675dc720706f0cd5c0ed94f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/10e438f53a972439675dc720706f0cd5c0ed94f1", - "reference": "10e438f53a972439675dc720706f0cd5c0ed94f1", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": ">=7.1" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "symfony/dotenv": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/phpunit-bridge": "^4.4.12|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0" - }, - "time": "2022-02-16T17:26:46+00:00", - "type": "composer-plugin", - "extra": { - "class": "Symfony\\Flex\\Flex" - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Flex\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "description": "Composer plugin for Symfony", - "support": { - "issues": "https://github.com/symfony/flex/issues", - "source": "https://github.com/symfony/flex/tree/v1.18.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/flex" - }, - { - "name": "symfony/form", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/form.git", - "reference": "7d1bd919be530e8071314a54bd5ae786452a81bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/7d1bd919be530e8071314a54bd5ae786452a81bf", - "reference": "7d1bd919be530e8071314a54bd5ae786452a81bf", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/options-resolver": "^5.1|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.23", - "symfony/property-access": "^5.0.8|^6.0", - "symfony/service-contracts": "^1.1|^2|^3" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<4.4", - "symfony/doctrine-bridge": "<4.4", - "symfony/error-handler": "<4.4.5", - "symfony/framework-bundle": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<4.4", - "symfony/translation-contracts": "<1.1.7", - "symfony/twig-bridge": "<4.4" - }, - "require-dev": { - "doctrine/collections": "~1.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "symfony/validator": "^4.4.17|^5.1.9|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/security-csrf": "For protecting forms against CSRF attacks.", - "symfony/twig-bridge": "For templating with Twig.", - "symfony/validator": "For form validation." - }, - "time": "2022-04-23T15:25:10+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Form\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows to easily create, process and reuse HTML forms", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/form/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/form" - }, - { - "name": "symfony/framework-bundle", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/framework-bundle.git", - "reference": "7520f553c7a7721652c1b7ac95c09dae62a1676e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/7520f553c7a7721652c1b7ac95c09dae62a1676e", - "reference": "7520f553c7a7721652c1b7ac95c09dae62a1676e", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "php": ">=7.2.5", - "symfony/cache": "^5.2|^6.0", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^5.4.5|^6.0.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4.1|^5.0.1|^6.0", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/routing": "^5.3|^6.0" - }, - "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/cache": "<1.11", - "doctrine/persistence": "<1.3", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "phpunit/phpunit": "<5.4.3", - "symfony/asset": "<5.3", - "symfony/console": "<5.2.5", - "symfony/dom-crawler": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/form": "<5.2", - "symfony/http-client": "<4.4", - "symfony/lock": "<4.4", - "symfony/mailer": "<5.2", - "symfony/messenger": "<5.4", - "symfony/mime": "<4.4", - "symfony/property-access": "<5.3", - "symfony/property-info": "<4.4", - "symfony/security-csrf": "<5.3", - "symfony/serializer": "<5.2", - "symfony/service-contracts": ">=3.0", - "symfony/stopwatch": "<4.4", - "symfony/translation": "<5.3", - "symfony/twig-bridge": "<4.4", - "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", - "symfony/web-profiler-bundle": "<4.4", - "symfony/workflow": "<5.2" - }, - "require-dev": { - "doctrine/annotations": "^1.13.1", - "doctrine/cache": "^1.11|^2.0", - "doctrine/persistence": "^1.3|^2.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^5.3|^6.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/form": "^5.2|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/mailer": "^5.2|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/notifier": "^5.4|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/property-info": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/security-bundle": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/string": "^5.0|^6.0", - "symfony/translation": "^5.3|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/twig": "^2.10|^3.0" - }, - "suggest": { - "ext-apcu": "For best performance of the system caches", - "symfony/console": "For using the console commands", - "symfony/form": "For using forms", - "symfony/property-info": "For using the property_info service", - "symfony/serializer": "For using the serializer service", - "symfony/validator": "For using validation", - "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", - "symfony/yaml": "For using the debug:config and lint:yaml commands" - }, - "time": "2022-04-01T06:09:41+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\FrameworkBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/framework-bundle" - }, - { - "name": "symfony/http-client", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "0dabec4e3898d3e00451dd47b5ef839168f9bbf5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/0dabec4e3898d3e00451dd47b5ef839168f9bbf5", - "reference": "0dabec4e3898d3e00451dd47b5ef839168f9bbf5", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-client-contracts": "^2.4", - "symfony/polyfill-php73": "^1.11", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.0|^2|^3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "2.4" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4.13|^5.1.5|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "time": "2022-04-12T16:02:29+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-client" - }, - { - "name": "symfony/http-client-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/1a4f708e4e87f335d1b1be6148060739152f0bd5", - "reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "time": "2022-03-13T20:07:29+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-client-contracts" - }, - { - "name": "symfony/http-foundation", - "version": "v5.4.6", - "version_normalized": "5.4.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/34e89bc147633c0f9dd6caaaf56da3b806a21465", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "time": "2022-03-05T21:03:43+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-foundation" - }, - { - "name": "symfony/http-kernel", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/509243b9b3656db966284c45dffce9316c1ecc5c", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, - "time": "2022-04-02T06:04:20+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-kernel" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/options-resolver" - }, - { - "name": "symfony/password-hasher", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/password-hasher.git", - "reference": "bc9c982b25c0292aa4e009b3e9cc9835e4d1e94f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/password-hasher/zipball/bc9c982b25c0292aa4e009b3e9cc9835e4d1e94f", - "reference": "bc9c982b25c0292aa4e009b3e9cc9835e4d1e94f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/security-core": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0", - "symfony/security-core": "^5.3|^6.0" - }, - "time": "2022-04-15T13:57:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\PasswordHasher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Robin Chalas", - "email": "robin.chalas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides password hashing utilities", - "homepage": "https://symfony.com", - "keywords": [ - "hashing", - "password" - ], - "support": { - "source": "https://github.com/symfony/password-hasher/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/password-hasher" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2021-11-23T21:10:46+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-grapheme" - }, - { - "name": "symfony/polyfill-intl-icu", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "c023a439b8551e320cc3c8433b198e408a623af1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/c023a439b8551e320cc3c8433b198e408a623af1", - "reference": "c023a439b8551e320cc3c8433b198e408a623af1", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "time": "2021-10-26T17:16:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Icu\\": "" - }, - "classmap": [ - "Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's ICU-related data and classes", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "icu", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-icu" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2021-02-19T12:13:01+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-normalizer" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2021-11-30T18:21:41+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-mbstring" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2021-06-05T21:20:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php73" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2022-03-04T08:16:47+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php80" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2021-09-13T13:58:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php81" - }, - { - "name": "symfony/property-access", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-access.git", - "reference": "fe501d498d6ec7e9efe928c90fabedf629116495" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/fe501d498d6ec7e9efe928c90fabedf629116495", - "reference": "fe501d498d6ec7e9efe928c90fabedf629116495", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/property-info": "^5.2|^6.0" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/cache-implementation": "To cache access methods." - }, - "time": "2022-04-12T15:48:08+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyAccess\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides functions to read and write from/to an object or array using a simple string notation", - "homepage": "https://symfony.com", - "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property path", - "reflection" - ], - "support": { - "source": "https://github.com/symfony/property-access/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/property-access" - }, - { - "name": "symfony/property-info", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/property-info.git", - "reference": "0fc07795712972b9792f203d0fe0e77c26c3281d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/0fc07795712972b9792f203d0fe0e77c26c3281d", - "reference": "0fc07795712972b9792f203d0fe0e77c26c3281d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "phpstan/phpdoc-parser": "^1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" - }, - "suggest": { - "phpdocumentor/reflection-docblock": "To use the PHPDoc", - "psr/cache-implementation": "To cache results", - "symfony/doctrine-bridge": "To use Doctrine metadata", - "symfony/serializer": "To use Serializer metadata" - }, - "time": "2022-03-30T13:40:48+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\PropertyInfo\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Extracts information about PHP class' properties using metadata of popular sources", - "homepage": "https://symfony.com", - "keywords": [ - "doctrine", - "phpdoc", - "property", - "symfony", - "type", - "validator" - ], - "support": { - "source": "https://github.com/symfony/property-info/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/property-info" - }, - { - "name": "symfony/routing", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "44b29c7a94e867ccde1da604792f11a469958981" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/44b29c7a94e867ccde1da604792f11a469958981", - "reference": "44b29c7a94e867ccde1da604792f11a469958981", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "psr/log": "^1|^2|^3", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Maps an HTTP request to a set of configuration variables", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/routing" - }, - { - "name": "symfony/runtime", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/runtime.git", - "reference": "dc22a2876de3a3dc26b686570d9e638d443b575e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/dc22a2876de3a3dc26b686570d9e638d443b575e", - "reference": "dc22a2876de3a3dc26b686570d9e638d443b575e", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/dotenv": "<5.1" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "symfony/console": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/http-foundation": "^4.4.30|^5.3.7|^6.0", - "symfony/http-kernel": "^4.4.30|^5.3.7|^6.0" - }, - "time": "2022-03-08T15:36:36+00:00", - "type": "composer-plugin", - "extra": { - "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Runtime\\": "", - "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Enables decoupling PHP applications from global state", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/runtime/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/runtime" - }, - { - "name": "symfony/security-bundle", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-bundle.git", - "reference": "9806c9d491584e14a4444ea861a15428ab4b00be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-bundle/zipball/9806c9d491584e14a4444ea861a15428ab4b00be", - "reference": "9806c9d491584e14a4444ea861a15428ab4b00be", - "shasum": "" - }, - "require": { - "ext-xml": "*", - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/password-hasher": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/security-core": "^5.4|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-guard": "^5.3", - "symfony/security-http": "^5.4|^6.0" - }, - "conflict": { - "symfony/browser-kit": "<4.4", - "symfony/console": "<4.4", - "symfony/framework-bundle": "<4.4", - "symfony/ldap": "<5.1", - "symfony/twig-bundle": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/ldap": "^5.3|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/twig-bridge": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "time": "2022-04-15T11:48:31+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\SecurityBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration of the Security component into the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/security-bundle/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/security-bundle" - }, - { - "name": "symfony/security-core", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-core.git", - "reference": "4540ecb8ae82cc46d9580672888597f481ff0440" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/4540ecb8ae82cc46d9580672888597f481ff0440", - "reference": "4540ecb8ae82cc46d9580672888597f481ff0440", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^1.1|^2|^3", - "symfony/password-hasher": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1.6|^2|^3" - }, - "conflict": { - "symfony/event-dispatcher": "<4.4", - "symfony/http-foundation": "<5.3", - "symfony/ldap": "<4.4", - "symfony/security-guard": "<4.4", - "symfony/validator": "<5.2" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "psr/container": "^1.0|^2.0", - "psr/log": "^1|^2|^3", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/ldap": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0" - }, - "suggest": { - "psr/container-implementation": "To instantiate the Security class", - "symfony/event-dispatcher": "", - "symfony/expression-language": "For using the expression voter", - "symfony/http-foundation": "", - "symfony/ldap": "For using LDAP integration", - "symfony/validator": "For using the user password constraint" - }, - "time": "2022-04-15T08:07:45+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Security\\Core\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - Core Library", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/security-core/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/security-core" - }, - { - "name": "symfony/security-csrf", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-csrf.git", - "reference": "57c1c252ca756289c2b61327e08fb10be3936956" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-csrf/zipball/57c1c252ca756289c2b61327e08fb10be3936956", - "reference": "57c1c252ca756289c2b61327e08fb10be3936956", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/security-core": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/http-foundation": "<5.3" - }, - "require-dev": { - "symfony/http-foundation": "^5.3|^6.0" - }, - "suggest": { - "symfony/http-foundation": "For using the class SessionTokenStorage." - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Security\\Csrf\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - CSRF Library", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/security-csrf/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/security-csrf" - }, - { - "name": "symfony/security-guard", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-guard.git", - "reference": "3d68d9f8e162f6655eb0a0237b9f333a82a19da9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-guard/zipball/3d68d9f8e162f6655eb0a0237b9f333a82a19da9", - "reference": "3d68d9f8e162f6655eb0a0237b9f333a82a19da9", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15", - "symfony/security-core": "^5.0", - "symfony/security-http": "^5.3" - }, - "require-dev": { - "psr/log": "^1|^2|^3" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Security\\Guard\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - Guard", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/security-guard/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/security-guard" - }, - { - "name": "symfony/security-http", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-http.git", - "reference": "3d4b612da3a278285e6fd16fc2e5233820eeba0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/3d4b612da3a278285e6fd16fc2e5233820eeba0d", - "reference": "3d4b612da3a278285e6fd16fc2e5233820eeba0d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/security-core": "^5.4|^6.0" - }, - "conflict": { - "symfony/event-dispatcher": "<4.3", - "symfony/security-bundle": "<5.3", - "symfony/security-csrf": "<4.4" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs", - "symfony/security-csrf": "For using tokens to protect authentication/logout attempts" - }, - "time": "2022-04-16T13:32:04+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Security\\Http\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - HTTP Integration", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/security-http/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/security-http" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "time": "2022-03-13T20:07:29+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/service-contracts" - }, - { - "name": "symfony/string", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/string" - }, - { - "name": "symfony/translation-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1211df0afa701e45a04253110e959d4af4ef0f07", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "time": "2022-01-02T09:53:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/translation-contracts" - }, - { - "name": "symfony/twig-bridge", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bridge.git", - "reference": "f68dbdb80c9ce425f503512dfa8c8c01cf789e43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/f68dbdb80c9ce425f503512dfa8c8c01cf789e43", - "reference": "f68dbdb80c9ce425f503512dfa8c8c01cf789e43", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/console": "<5.3", - "symfony/form": "<5.3", - "symfony/http-foundation": "<5.3", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<5.2", - "symfony/workflow": "<5.2" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "egulias/email-validator": "^2.1.10|^3", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/console": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^5.3|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/security-acl": "^2.8|^3.0", - "symfony/security-core": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-http": "^4.4|^5.0|^6.0", - "symfony/serializer": "^5.2|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.2|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/cssinliner-extra": "^2.12|^3", - "twig/inky-extra": "^2.12|^3", - "twig/markdown-extra": "^2.12|^3" - }, - "suggest": { - "symfony/asset": "For using the AssetExtension", - "symfony/expression-language": "For using the ExpressionExtension", - "symfony/finder": "", - "symfony/form": "For using the FormExtension", - "symfony/http-kernel": "For using the HttpKernelExtension", - "symfony/routing": "For using the RoutingExtension", - "symfony/security-core": "For using the SecurityExtension", - "symfony/security-csrf": "For using the CsrfExtension", - "symfony/security-http": "For using the LogoutUrlExtension", - "symfony/stopwatch": "For using the StopwatchExtension", - "symfony/translation": "For using the TranslationExtension", - "symfony/var-dumper": "For using the DumpExtension", - "symfony/web-link": "For using the WebLinkExtension", - "symfony/yaml": "For using the YamlExtension" - }, - "time": "2022-04-12T15:48:08+00:00", - "type": "symfony-bridge", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Twig\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides integration for Twig with various Symfony components", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/twig-bridge" - }, - { - "name": "symfony/twig-bundle", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/twig-bundle.git", - "reference": "c992b4474c3a31f3c40a1ca593d213833f91b818" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/c992b4474c3a31f3c40a1ca593d213833f91b818", - "reference": "c992b4474c3a31f3c40a1ca593d213833f91b818", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/twig-bridge": "^5.3|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "symfony/dependency-injection": "<5.3", - "symfony/framework-bundle": "<5.0", - "symfony/service-contracts": ">=3.0", - "symfony/translation": "<5.0" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4", - "doctrine/cache": "^1.0|^2.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "time": "2022-04-03T13:03:10+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\TwigBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration of Twig into the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/twig-bundle/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/twig-bundle" - }, - { - "name": "symfony/validator", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/validator.git", - "reference": "bdc6d04ba95c73ccbf906b4ad9b8775c738d83ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/bdc6d04ba95c73ccbf906b4ad9b8775c738d83ad", - "reference": "bdc6d04ba95c73ccbf906b4ad9b8775c738d83ad", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/translation-contracts": "^1.1|^2|^3" - }, - "conflict": { - "doctrine/annotations": "<1.13", - "doctrine/cache": "<1.11", - "doctrine/lexer": "<1.1", - "phpunit/phpunit": "<5.4.3", - "symfony/dependency-injection": "<4.4", - "symfony/expression-language": "<5.1", - "symfony/http-kernel": "<4.4", - "symfony/intl": "<4.4", - "symfony/property-info": "<5.3", - "symfony/translation": "<4.4", - "symfony/yaml": "<4.4" - }, - "require-dev": { - "doctrine/annotations": "^1.13", - "doctrine/cache": "^1.11|^2.0", - "egulias/email-validator": "^2.1.10|^3", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^5.1|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/property-info": "^5.3|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "egulias/email-validator": "Strict (RFC compliant) email validation", - "psr/cache-implementation": "For using the mapping cache.", - "symfony/config": "", - "symfony/expression-language": "For using the Expression validator and the ExpressionLanguageSyntax constraints", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For accessing properties within comparison constraints", - "symfony/property-info": "To automatically add NotNull and Type constraints", - "symfony/translation": "For translating validation errors.", - "symfony/yaml": "" - }, - "time": "2022-04-15T08:07:45+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Validator\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to validate values", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/validator/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/validator" - }, - { - "name": "symfony/var-dumper", - "version": "v5.4.6", - "version_normalized": "5.4.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/294e9da6e2e0dd404e983daa5aa74253d92c05d0", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "time": "2022-03-02T12:42:23+00:00", - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/var-dumper" - }, - { - "name": "symfony/var-exporter", - "version": "v5.4.7", - "version_normalized": "5.4.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "7eacaa588c9b27f2738575adb4a8457a80d9c807" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/7eacaa588c9b27f2738575adb4a8457a80d9c807", - "reference": "7eacaa588c9b27f2738575adb4a8457a80d9c807", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "time": "2022-03-31T17:09:19+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.4.7" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/var-exporter" - }, - { - "name": "symfony/web-profiler-bundle", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/web-profiler-bundle.git", - "reference": "909c6eea7815066a80d0a362ed41abd7924e376a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/909c6eea7815066a80d0a362ed41abd7924e376a", - "reference": "909c6eea7815066a80d0a362ed41abd7924e376a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "symfony/dependency-injection": "<5.2", - "symfony/form": "<4.4", - "symfony/mailer": "<5.4", - "symfony/messenger": "<4.4" - }, - "require-dev": { - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "time": "2022-04-22T08:14:12+00:00", - "type": "symfony-bundle", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\WebProfilerBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a development tool that gives detailed information about the execution of any request", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/web-profiler-bundle/tree/v5.4.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/web-profiler-bundle" - }, - { - "name": "symfony/yaml", - "version": "v5.4.3", - "version_normalized": "5.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "time": "2022-01-26T16:32:32+00:00", - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/yaml" - }, - { - "name": "twig/twig", - "version": "v3.3.10", - "version_normalized": "3.3.10.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "8442df056c51b706793adf80a9fd363406dd3674" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674", - "reference": "8442df056c51b706793adf80a9fd363406dd3674", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "time": "2022-04-06T06:47:41+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.10" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "install-path": "../twig/twig" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php deleted file mode 100644 index 24ad46a..0000000 --- a/vendor/composer/installed.php +++ /dev/null @@ -1,608 +0,0 @@ - array( - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => 'e7253acfd862de465b6091306075e4b15ce83acd', - 'name' => '__root__', - 'dev' => true, - ), - 'versions' => array( - '__root__' => array( - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => 'e7253acfd862de465b6091306075e4b15ce83acd', - 'dev_requirement' => false, - ), - 'doctrine/annotations' => array( - 'pretty_version' => '1.13.2', - 'version' => '1.13.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/annotations', - 'aliases' => array(), - 'reference' => '5b668aef16090008790395c02c893b1ba13f7e08', - 'dev_requirement' => false, - ), - 'doctrine/lexer' => array( - 'pretty_version' => '1.2.3', - 'version' => '1.2.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/lexer', - 'aliases' => array(), - 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229', - 'dev_requirement' => false, - ), - 'php-http/async-client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '*', - ), - ), - 'php-http/client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '*', - ), - ), - 'psr/cache' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/cache', - 'aliases' => array(), - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', - 'dev_requirement' => false, - ), - 'psr/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'psr/container' => array( - 'pretty_version' => '1.1.2', - 'version' => '1.1.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/container', - 'aliases' => array(), - 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', - 'dev_requirement' => false, - ), - 'psr/container-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/event-dispatcher' => array( - 'pretty_version' => '1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/event-dispatcher', - 'aliases' => array(), - 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', - 'dev_requirement' => false, - ), - 'psr/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/log' => array( - 'pretty_version' => '1.1.4', - 'version' => '1.1.4.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/log', - 'aliases' => array(), - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', - 'dev_requirement' => false, - ), - 'psr/log-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'psr/simple-cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'symfony/apache-pack' => array( - 'pretty_version' => 'v1.0.1', - 'version' => '1.0.1.0', - 'type' => 'symfony-pack', - 'install_path' => __DIR__ . '/../symfony/apache-pack', - 'aliases' => array(), - 'reference' => '3aa5818d73ad2551281fc58a75afd9ca82622e6c', - 'dev_requirement' => false, - ), - 'symfony/cache' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache', - 'aliases' => array(), - 'reference' => 'ba06841ed293fcaf79a592f59fdaba471f7c756c', - 'dev_requirement' => false, - ), - 'symfony/cache-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache-contracts', - 'aliases' => array(), - 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', - 'dev_requirement' => false, - ), - 'symfony/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'symfony/config' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/config', - 'aliases' => array(), - 'reference' => '05624c386afa1b4ccc1357463d830fade8d9d404', - 'dev_requirement' => false, - ), - 'symfony/console' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/console', - 'aliases' => array(), - 'reference' => '900275254f0a1a2afff1ab0e11abd5587a10e1d6', - 'dev_requirement' => false, - ), - 'symfony/dependency-injection' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dependency-injection', - 'aliases' => array(), - 'reference' => '35588b2afb08ea3a142d62fefdcad4cb09be06ed', - 'dev_requirement' => false, - ), - 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', - 'aliases' => array(), - 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', - 'dev_requirement' => false, - ), - 'symfony/dotenv' => array( - 'pretty_version' => 'v5.4.5', - 'version' => '5.4.5.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dotenv', - 'aliases' => array(), - 'reference' => '83a2310904a4f5d4f42526227b5a578ac82232a9', - 'dev_requirement' => false, - ), - 'symfony/error-handler' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/error-handler', - 'aliases' => array(), - 'reference' => '060bc01856a1846e3e4385261bc9ed11a1dd7b6a', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher', - 'aliases' => array(), - 'reference' => 'dec8a9f58d20df252b9cd89f1c6c1530f747685d', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', - 'aliases' => array(), - 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.0', - ), - ), - 'symfony/filesystem' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/filesystem', - 'aliases' => array(), - 'reference' => '3a4442138d80c9f7b600fb297534ac718b61d37f', - 'dev_requirement' => false, - ), - 'symfony/finder' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/finder', - 'aliases' => array(), - 'reference' => '231313534dded84c7ecaa79d14bc5da4ccb69b7d', - 'dev_requirement' => false, - ), - 'symfony/flex' => array( - 'pretty_version' => 'v1.18.5', - 'version' => '1.18.5.0', - 'type' => 'composer-plugin', - 'install_path' => __DIR__ . '/../symfony/flex', - 'aliases' => array(), - 'reference' => '10e438f53a972439675dc720706f0cd5c0ed94f1', - 'dev_requirement' => false, - ), - 'symfony/form' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/form', - 'aliases' => array(), - 'reference' => '7d1bd919be530e8071314a54bd5ae786452a81bf', - 'dev_requirement' => false, - ), - 'symfony/framework-bundle' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/framework-bundle', - 'aliases' => array(), - 'reference' => '7520f553c7a7721652c1b7ac95c09dae62a1676e', - 'dev_requirement' => false, - ), - 'symfony/http-client' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-client', - 'aliases' => array(), - 'reference' => '0dabec4e3898d3e00451dd47b5ef839168f9bbf5', - 'dev_requirement' => false, - ), - 'symfony/http-client-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-client-contracts', - 'aliases' => array(), - 'reference' => '1a4f708e4e87f335d1b1be6148060739152f0bd5', - 'dev_requirement' => false, - ), - 'symfony/http-client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.4', - ), - ), - 'symfony/http-foundation' => array( - 'pretty_version' => 'v5.4.6', - 'version' => '5.4.6.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-foundation', - 'aliases' => array(), - 'reference' => '34e89bc147633c0f9dd6caaaf56da3b806a21465', - 'dev_requirement' => false, - ), - 'symfony/http-kernel' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-kernel', - 'aliases' => array(), - 'reference' => '509243b9b3656db966284c45dffce9316c1ecc5c', - 'dev_requirement' => false, - ), - 'symfony/options-resolver' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/options-resolver', - 'aliases' => array(), - 'reference' => 'cc1147cb11af1b43f503ac18f31aa3bec213aba8', - 'dev_requirement' => false, - ), - 'symfony/password-hasher' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/password-hasher', - 'aliases' => array(), - 'reference' => 'bc9c982b25c0292aa4e009b3e9cc9835e4d1e94f', - 'dev_requirement' => false, - ), - 'symfony/polyfill-ctype' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '*', - ), - ), - 'symfony/polyfill-iconv' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '*', - ), - ), - 'symfony/polyfill-intl-grapheme' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', - 'aliases' => array(), - 'reference' => '81b86b50cf841a64252b439e738e97f4a34e2783', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-icu' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-icu', - 'aliases' => array(), - 'reference' => 'c023a439b8551e320cc3c8433b198e408a623af1', - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', - 'aliases' => array(), - 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', - 'dev_requirement' => false, - ), - 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', - 'aliases' => array(), - 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php72' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '*', - ), - ), - 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php73', - 'aliases' => array(), - 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php80', - 'aliases' => array(), - 'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php81' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php81', - 'aliases' => array(), - 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f', - 'dev_requirement' => false, - ), - 'symfony/property-access' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/property-access', - 'aliases' => array(), - 'reference' => 'fe501d498d6ec7e9efe928c90fabedf629116495', - 'dev_requirement' => false, - ), - 'symfony/property-info' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/property-info', - 'aliases' => array(), - 'reference' => '0fc07795712972b9792f203d0fe0e77c26c3281d', - 'dev_requirement' => false, - ), - 'symfony/routing' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/routing', - 'aliases' => array(), - 'reference' => '44b29c7a94e867ccde1da604792f11a469958981', - 'dev_requirement' => false, - ), - 'symfony/runtime' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'composer-plugin', - 'install_path' => __DIR__ . '/../symfony/runtime', - 'aliases' => array(), - 'reference' => 'dc22a2876de3a3dc26b686570d9e638d443b575e', - 'dev_requirement' => false, - ), - 'symfony/security-bundle' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/security-bundle', - 'aliases' => array(), - 'reference' => '9806c9d491584e14a4444ea861a15428ab4b00be', - 'dev_requirement' => false, - ), - 'symfony/security-core' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/security-core', - 'aliases' => array(), - 'reference' => '4540ecb8ae82cc46d9580672888597f481ff0440', - 'dev_requirement' => false, - ), - 'symfony/security-csrf' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/security-csrf', - 'aliases' => array(), - 'reference' => '57c1c252ca756289c2b61327e08fb10be3936956', - 'dev_requirement' => false, - ), - 'symfony/security-guard' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/security-guard', - 'aliases' => array(), - 'reference' => '3d68d9f8e162f6655eb0a0237b9f333a82a19da9', - 'dev_requirement' => false, - ), - 'symfony/security-http' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/security-http', - 'aliases' => array(), - 'reference' => '3d4b612da3a278285e6fd16fc2e5233820eeba0d', - 'dev_requirement' => false, - ), - 'symfony/service-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/service-contracts', - 'aliases' => array(), - 'reference' => '24d9dc654b83e91aa59f9d167b131bc3b5bea24c', - 'dev_requirement' => false, - ), - 'symfony/service-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0', - ), - ), - 'symfony/string' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/string', - 'aliases' => array(), - 'reference' => '92043b7d8383e48104e411bc9434b260dbeb5a10', - 'dev_requirement' => false, - ), - 'symfony/translation-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/translation-contracts', - 'aliases' => array(), - 'reference' => '1211df0afa701e45a04253110e959d4af4ef0f07', - 'dev_requirement' => false, - ), - 'symfony/twig-bridge' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'symfony-bridge', - 'install_path' => __DIR__ . '/../symfony/twig-bridge', - 'aliases' => array(), - 'reference' => 'f68dbdb80c9ce425f503512dfa8c8c01cf789e43', - 'dev_requirement' => false, - ), - 'symfony/twig-bundle' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/twig-bundle', - 'aliases' => array(), - 'reference' => 'c992b4474c3a31f3c40a1ca593d213833f91b818', - 'dev_requirement' => false, - ), - 'symfony/validator' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/validator', - 'aliases' => array(), - 'reference' => 'bdc6d04ba95c73ccbf906b4ad9b8775c738d83ad', - 'dev_requirement' => false, - ), - 'symfony/var-dumper' => array( - 'pretty_version' => 'v5.4.6', - 'version' => '5.4.6.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-dumper', - 'aliases' => array(), - 'reference' => '294e9da6e2e0dd404e983daa5aa74253d92c05d0', - 'dev_requirement' => false, - ), - 'symfony/var-exporter' => array( - 'pretty_version' => 'v5.4.7', - 'version' => '5.4.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-exporter', - 'aliases' => array(), - 'reference' => '7eacaa588c9b27f2738575adb4a8457a80d9c807', - 'dev_requirement' => false, - ), - 'symfony/web-profiler-bundle' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', - 'type' => 'symfony-bundle', - 'install_path' => __DIR__ . '/../symfony/web-profiler-bundle', - 'aliases' => array(), - 'reference' => '909c6eea7815066a80d0a362ed41abd7924e376a', - 'dev_requirement' => false, - ), - 'symfony/yaml' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/yaml', - 'aliases' => array(), - 'reference' => 'e80f87d2c9495966768310fc531b487ce64237a2', - 'dev_requirement' => false, - ), - 'twig/twig' => array( - 'pretty_version' => 'v3.3.10', - 'version' => '3.3.10.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../twig/twig', - 'aliases' => array(), - 'reference' => '8442df056c51b706793adf80a9fd363406dd3674', - 'dev_requirement' => false, - ), - ), -); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php deleted file mode 100644 index 580fa96..0000000 --- a/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 70400)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fc..0000000 --- a/vendor/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md deleted file mode 100644 index c2c7eb7..0000000 --- a/vendor/doctrine/annotations/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Doctrine Annotations - -[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations) -[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references) -[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations) -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations) - -Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). - -## Documentation - -See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html). - -## Contributing - -When making a pull request, make sure your changes follow the -[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json deleted file mode 100644 index 00d0231..0000000 --- a/vendor/doctrine/annotations/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "doctrine/annotations", - "type": "library", - "description": "Docblock Annotations Parser", - "keywords": ["annotations", "docblock", "parser"], - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0", - "ext-tokenizer": "*", - "doctrine/lexer": "1.*", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "config": { - "sort-packages": true - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations", - "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations" - }, - "files": [ - "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php", - "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php" - ] - } -} diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst deleted file mode 100644 index 2c3c428..0000000 --- a/vendor/doctrine/annotations/docs/en/annotations.rst +++ /dev/null @@ -1,252 +0,0 @@ -Handling Annotations -==================== - -There are several different approaches to handling annotations in PHP. -Doctrine Annotations maps docblock annotations to PHP classes. Because -not all docblock annotations are used for metadata purposes a filter is -applied to ignore or skip classes that are not Doctrine annotations. - -Take a look at the following code snippet: - -.. code-block:: php - - namespace MyProject\Entities; - - use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validator\Constraints AS Assert; - - /** - * @author Benjamin Eberlei - * @ORM\Entity - * @MyProject\Annotations\Foobarable - */ - class User - { - /** - * @ORM\Id @ORM\Column @ORM\GeneratedValue - * @dummy - * @var int - */ - private $id; - - /** - * @ORM\Column(type="string") - * @Assert\NotEmpty - * @Assert\Email - * @var string - */ - private $email; - } - -In this snippet you can see a variety of different docblock annotations: - -- Documentation annotations such as ``@var`` and ``@author``. These - annotations are ignored and never considered for throwing an - exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use - Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace - available as ``@ORM\ClassName``. Same goes for the import of - ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and - not ignored. For Doctrine Annotations it is not entirely clear how - to handle this annotation. Depending on the configuration an exception - (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. - This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could -guess that the ORM Mapping, Assert Validation and the fully qualified -annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error -handling reasons every check for class existence inside the -``AnnotationReader`` sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the -``AnnotationReader`` requires silent autoloaders which many autoloaders are -not. Silent autoloading is NOT part of the `PSR-0 specification -`_ -for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism -through a global registry. If you are wondering about the annotation -registry being global, there is no other way to solve the architectural -problems of autoloading annotation classes in a straightforward fashion. -Additionally if you think about PHP autoloading then you recognize it is -a global as well. - -To anticipate the configuration section, making the above PHP class work -with Doctrine Annotations requires this setup: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\AnnotationRegistry; - - AnnotationRegistry::registerFile("/path/to/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php"); - AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", "/path/to/symfony/src"); - AnnotationRegistry::registerAutoloadNamespace("MyProject\Annotations", "/path/to/myproject/src"); - - $reader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('dummy'); - -The second block with the annotation registry calls registers all the -three different annotation namespaces that are used. -Doctrine Annotations saves all its annotations in a single file, that is -why ``AnnotationRegistry#registerFile`` is used in contrast to -``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0 -compatible loading mechanism for class to file names. - -In the third block, we create the actual ``AnnotationReader`` instance. -Note that we also add ``dummy`` to the global list of ignored -annotations for which we do not throw exceptions. Setting this is -necessary in our example case, otherwise ``@dummy`` would trigger an -exception to be thrown during the parsing of the docblock of -``MyProject\Entities\User#id``. - -Setup and Configuration ------------------------ - -To use the annotations library is simple, you just need to create a new -``AnnotationReader`` instance: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - -This creates a simple annotation reader with no caching other than in -memory (in php arrays). Since parsing docblocks can be expensive you -should cache this process by using a caching reader. - -To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. -This reader decorates the original reader and stores all annotations in a PSR-6 -cache: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\PsrCachedReader; - - $cache = ... // instantiate a PSR-6 Cache pool - - $reader = new PsrCachedReader( - new AnnotationReader(), - $cache, - $debug = true - ); - -The ``debug`` flag is used here as well to invalidate the cache files -when the PHP class with annotations changed and should be used during -development. - -.. warning :: - - The ``AnnotationReader`` works and caches under the - assumption that all annotations of a doc-block are processed at - once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the - AnnotationRegistry) would never be visible and not accessible if a - cache is used unless the cache is cleared and the annotations - requested again, this time with all annotations defined. - -By default the annotation reader returns a list of annotations with -numeric indexes. If you want your annotations to be indexed by their -class name you can wrap the reader in an ``IndexedReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\IndexedReader; - - $reader = new IndexedReader(new AnnotationReader()); - -.. warning:: - - You should never wrap the indexed reader inside a cached reader, - only the other way around. This way you can re-use the cache with - indexed or numeric keys, otherwise your code may experience failures - due to caching in a numerical or indexed format. - -Registering Annotations -~~~~~~~~~~~~~~~~~~~~~~~ - -As explained in the introduction, Doctrine Annotations uses its own -autoloading mechanism to determine if a given annotation has a -corresponding PHP class that can be autoloaded. For annotation -autoloading you have to configure the -``Doctrine\Common\Annotations\AnnotationRegistry``. There are three -different mechanisms to configure annotation autoloading: - -- Calling ``AnnotationRegistry#registerFile($file)`` to register a file - that contains one or more annotation classes. -- Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs = - null)`` to register that the given namespace contains annotations and - that their base directory is located at the given $dirs or in the - include path if ``NULL`` is passed. The given directories should *NOT* - be the directory where classes of the namespace are in, but the base - directory of the root namespace. The AnnotationRegistry uses a - namespace to directory separator approach to resolve the correct path. -- Calling ``AnnotationRegistry#registerLoader($callable)`` to register - an autoloader callback. The callback accepts the class as first and - only parameter and has to return ``true`` if the corresponding file - was found and included. - -.. note:: - - Loaders have to fail silently, if a class is not found even if it - matches for example the namespace prefix of that loader. Never is a - loader to throw a warning or exception if the loading failed - otherwise parsing doc block annotations will become a huge pain. - -A sample loader callback could look like: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationRegistry; - use Symfony\Component\ClassLoader\UniversalClassLoader; - - AnnotationRegistry::registerLoader(function($class) { - $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; - - if (file_exists("/my/base/path/" . $file)) { - // file_exists() makes sure that the loader fails silently - require "/my/base/path/" . $file; - } - }); - - $loader = new UniversalClassLoader(); - AnnotationRegistry::registerLoader(array($loader, "loadClass")); - - -Ignoring missing exceptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default an exception is thrown from the ``AnnotationReader`` if an -annotation was found that: - -- is not part of the list of ignored "documentation annotations"; -- was not imported through a use statement; -- is not a fully qualified class that exists. - -You can disable this behavior for specific names if your docblocks do -not follow strict requirements: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('foo'); - -PHP Imports -~~~~~~~~~~~ - -By default the annotation reader parses the use-statement of a php file -to gain access to the import rules and register them for the annotation -processing. Only if you are using PHP Imports can you validate the -correct usage of annotations and throw exceptions if you misspelled an -annotation. This mechanism is enabled by default. - -To ease the upgrade path, we still allow you to disable this mechanism. -Note however that we will remove this in future versions: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setEnabledPhpImports(false); diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst deleted file mode 100644 index 11fbe1a..0000000 --- a/vendor/doctrine/annotations/docs/en/custom.rst +++ /dev/null @@ -1,443 +0,0 @@ -Custom Annotation Classes -========================= - -If you want to define your own annotations, you just have to group them -in a namespace and register this namespace in the ``AnnotationRegistry``. -Annotation classes have to contain a class-level docblock with the text -``@Annotation``: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** @Annotation */ - class Bar - { - // some code - } - -Inject annotation values ------------------------- - -The annotation parser checks if the annotation constructor has arguments, -if so then it will pass the value array, otherwise it will try to inject -values into public properties directly: - - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * - * Some Annotation using a constructor - */ - class Bar - { - private $foo; - - public function __construct(array $values) - { - $this->foo = $values['foo']; - } - } - - /** - * @Annotation - * - * Some Annotation without a constructor - */ - class Foo - { - public $bar; - } - -Optional: Constructors with Named Parameters --------------------------------------------- - -Starting with Annotations v1.11 a new annotation instantiation strategy -is available that aims at compatibility of Annotation classes with the PHP 8 -attribute feature. You need to declare a constructor with regular parameter -names that match the named arguments in the annotation syntax. - -To enable this feature, you can tag your annotation class with -``@NamedArgumentConstructor`` (available from v1.12) or implement the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface -(available from v1.11 and deprecated as of v1.12). -When using the ``@NamedArgumentConstructor`` tag, the first argument of the -constructor is considered as the default one. - - -Usage with the ``@NamedArgumentContrustor`` tag - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(string $foo) - { - $this->foo = $foo; - } - } - - /** Usable with @Bar(foo="baz") */ - /** Usable with @Bar("baz") */ - -In combination with PHP 8's constructor property promotion feature -you can simplify this to: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - public function __construct(private string $foo) {} - } - - -Usage with the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` -interface (v1.11, deprecated as of v1.12): -.. code-block:: php - - namespace MyCompany\Annotations; - - use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; - - /** @Annotation */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(private string $foo) {} - } - - /** Usable with @Bar(foo="baz") */ - -Annotation Target ------------------ - -``@Target`` indicates the kinds of class elements to which an annotation -type is applicable. Then you could define one or more targets: - -- ``CLASS`` Allowed in class docblocks -- ``PROPERTY`` Allowed in property docblocks -- ``METHOD`` Allowed in the method docblocks -- ``FUNCTION`` Allowed in function dockblocks -- ``ALL`` Allowed in class, property, method and function docblocks -- ``ANNOTATION`` Allowed inside other annotations - -If the annotations is not allowed in the current context, an -``AnnotationException`` is thrown. - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - // some code - } - - /** - * @Annotation - * @Target("CLASS") - */ - class Foo - { - // some code - } - -Attribute types ---------------- - -The annotation parser checks the given parameters using the phpdoc -annotation ``@var``, The data type could be validated using the ``@var`` -annotation on the annotation properties or using the ``@Attributes`` and -``@Attribute`` annotations. - -If the data type does not match you get an ``AnnotationException`` - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - /** @var mixed */ - public $mixed; - - /** @var boolean */ - public $boolean; - - /** @var bool */ - public $bool; - - /** @var float */ - public $float; - - /** @var string */ - public $string; - - /** @var integer */ - public $integer; - - /** @var array */ - public $array; - - /** @var SomeAnnotationClass */ - public $annotation; - - /** @var array */ - public $arrayOfIntegers; - - /** @var array */ - public $arrayOfAnnotations; - } - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - * @Attributes({ - * @Attribute("stringProperty", type = "string"), - * @Attribute("annotProperty", type = "SomeAnnotationClass"), - * }) - */ - class Foo - { - public function __construct(array $values) - { - $this->stringProperty = $values['stringProperty']; - $this->annotProperty = $values['annotProperty']; - } - - // some code - } - -Annotation Required -------------------- - -``@Required`` indicates that the field must be specified when the -annotation is used. If it is not used you get an ``AnnotationException`` -stating that this value can not be null. - -Declaring a required field: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Foo - { - /** @Required */ - public $requiredField; - } - -Usage: - -.. code-block:: php - - /** @Foo(requiredField="value") */ - public $direction; // Valid - - /** @Foo */ - public $direction; // Required field missing, throws an AnnotationException - - -Enumerated values ------------------ - -- An annotation property marked with ``@Enum`` is a field that accepts a - fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed - values. -- The annotation parser checks the given value and throws an - ``AnnotationException`` if the value does not match. - - -Declaring an enumerated property: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Direction - { - /** - * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) - */ - public $value; - } - -Annotation usage: - -.. code-block:: php - - /** @Direction("NORTH") */ - public $direction; // Valid value - - /** @Direction("NORTHEAST") */ - public $direction; // Invalid value, throws an AnnotationException - - -Constants ---------- - -The use of constants and class constants is available on the annotations -parser. - -The following usages are allowed: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - use MyCompany\Entity\SomeClass; - - /** - * @Foo(PHP_EOL) - * @Bar(Bar::FOO) - * @Foo({SomeClass::FOO, SomeClass::BAR}) - * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) - */ - class User - { - } - - -Be careful with constants and the cache ! - -.. note:: - - The cached reader will not re-evaluate each time an annotation is - loaded from cache. When a constant is changed the cache must be - cleaned. - - -Usage ------ - -Using the library API is simple. Using the annotations described in the -previous section, you can now annotate other classes with your -annotations: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - - /** - * @Foo(bar="foo") - * @Bar(foo="bar") - */ - class User - { - } - -Now we can write a script to get the annotations above: - -.. code-block:: php - - $reflClass = new ReflectionClass('MyCompany\Entity\User'); - $classAnnotations = $reader->getClassAnnotations($reflClass); - - foreach ($classAnnotations AS $annot) { - if ($annot instanceof \MyCompany\Annotations\Foo) { - echo $annot->bar; // prints "foo"; - } else if ($annot instanceof \MyCompany\Annotations\Bar) { - echo $annot->foo; // prints "bar"; - } - } - -You have a complete API for retrieving annotation class instances from a -class, property or method docblock: - - -Reader API -~~~~~~~~~~ - -Access all annotations of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotations(\ReflectionClass $class); - -Access one annotation of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotation(\ReflectionClass $class, $annotationName); - -Access all annotations of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotations(\ReflectionMethod $method); - -Access one annotation of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - -Access all annotations of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotations(\ReflectionProperty $property); - -Access one annotation of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); - -Access all annotations of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotations(\ReflectionFunction $property); - -Access one annotation of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst deleted file mode 100644 index 95476c3..0000000 --- a/vendor/doctrine/annotations/docs/en/index.rst +++ /dev/null @@ -1,101 +0,0 @@ -Introduction -============ - -Doctrine Annotations allows to implement custom annotation -functionality for PHP classes and functions. - -.. code-block:: php - - class Foo - { - /** - * @MyAnnotation(myProperty="value") - */ - private $bar; - } - -Annotations aren't implemented in PHP itself which is why this component -offers a way to use the PHP doc-blocks as a place for the well known -annotation syntax using the ``@`` char. - -Annotations in Doctrine are used for the ORM configuration to build the -class mapping, but it can be used in other projects for other purposes -too. - -Installation -============ - -You can install the Annotation component with composer: - -.. code-block:: - -   $ composer require doctrine/annotations - -Create an annotation class -========================== - -An annotation class is a representation of the later used annotation -configuration in classes. The annotation class of the previous example -looks like this: - -.. code-block:: php - - /** - * @Annotation - */ - final class MyAnnotation - { - public $myProperty; - } - -The annotation class is declared as an annotation by ``@Annotation``. - -:ref:`Read more about custom annotations. ` - -Reading annotations -=================== - -The access to the annotations happens by reflection of the class or function -containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can access the -annotations of a class. A common one is -``Doctrine\Common\Annotations\AnnotationReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\AnnotationRegistry; - - // Deprecated and will be removed in 2.0 but currently needed - AnnotationRegistry::registerLoader('class_exists'); - - $reflectionClass = new ReflectionClass(Foo::class); - $property = $reflectionClass->getProperty('bar'); - - $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation( - $property, - MyAnnotation::class - ); - - echo $myAnnotation->myProperty; // result: "value" - -Note that ``AnnotationRegistry::registerLoader('class_exists')`` only works -if you already have an autoloader configured (i.e. composer autoloader). -Otherwise, :ref:`please take a look to the other annotation autoload mechanisms `. - -A reader has multiple methods to access the annotations of a class or -function. - -:ref:`Read more about handling annotations. ` - -IDE Support ------------ - -Some IDEs already provide support for annotations: - -- Eclipse via the `Symfony2 Plugin `_ -- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ - -.. _Read more about handling annotations.: annotations -.. _Read more about custom annotations.: custom diff --git a/vendor/doctrine/annotations/docs/en/sidebar.rst b/vendor/doctrine/annotations/docs/en/sidebar.rst deleted file mode 100644 index 6f5d13c..0000000 --- a/vendor/doctrine/annotations/docs/en/sidebar.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. toctree:: - :depth: 3 - - index - annotations - custom diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index 750270e..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,59 +0,0 @@ - $data Key-value for properties to be defined in this class. - */ - final public function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @param string $name Unknown property name. - * - * @throws BadMethodCallException - */ - public function __get($name) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param string $name Unknown property name. - * @param mixed $value Property value. - * - * @throws BadMethodCallException - */ - public function __set($name, $value) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index b1f8514..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,21 +0,0 @@ - */ - public $value; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 35d6410..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,69 +0,0 @@ - */ - public $value; - - /** - * Literal target declaration. - * - * @var mixed[] - */ - public $literal; - - /** - * @throws InvalidArgumentException - * - * @phpstan-param array{literal?: mixed[], value: list} $values - */ - public function __construct(array $values) - { - if (! isset($values['literal'])) { - $values['literal'] = []; - } - - foreach ($values['value'] as $var) { - if (! is_scalar($var)) { - throw new InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if (! in_array($key, $values['value'])) { - throw new InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key, - $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index ae60f7d..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,43 +0,0 @@ - */ - public $names; - - /** - * @throws RuntimeException - * - * @phpstan-param array{value: string|list} $values - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new RuntimeException(sprintf( - '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', - json_encode($values['value']) - )); - } - - $this->names = $values['value']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php deleted file mode 100644 index 1690601..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php +++ /dev/null @@ -1,13 +0,0 @@ - */ - private static $map = [ - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'FUNCTION' => self::TARGET_FUNCTION, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ]; - - /** @phpstan-var list */ - public $value; - - /** - * Targets as bitmask. - * - * @var int - */ - public $targets; - - /** - * Literal target declaration. - * - * @var string - */ - public $literal; - - /** - * @throws InvalidArgumentException - * - * @phpstan-param array{value?: string|list} $values - */ - public function __construct(array $values) - { - if (! isset($values['value'])) { - $values['value'] = null; - } - - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new InvalidArgumentException( - sprintf( - '@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if (! isset(self::$map[$literal])) { - throw new InvalidArgumentException( - sprintf( - 'Invalid Target "%s". Available targets: [%s]', - $literal, - implode(', ', array_keys(self::$map)) - ) - ); - } - - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index b1ea64e..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,171 +0,0 @@ - $available - */ - public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) - { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusSaveComments() - { - return new self( - 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' - ); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusLoadComments() - { - return new self( - 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index 1f538ee..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,389 +0,0 @@ - - */ - private static $globalImports = [ - 'ignoreannotation' => Annotation\IgnoreAnnotation::class, - ]; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNamespaces = []; - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - * - * @param string $name - */ - public static function addGlobalIgnoredName($name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. - * - * @param string $namespace - */ - public static function addGlobalIgnoredNamespace($namespace) - { - self::$globalIgnoredNamespaces[$namespace] = true; - } - - /** - * Annotations parser. - * - * @var DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $imports = []; - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $ignoredAnnotationNames = []; - - /** - * Initializes a new AnnotationReader. - * - * @throws AnnotationException - */ - public function __construct(?DocParser $parser = null) - { - if ( - extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' || - ini_get('opcache.save_comments') === '0') - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - // Make sure that the IgnoreAnnotation annotation is loaded - class_exists(IgnoreAnnotation::class); - - $this->parser = $parser ?: new DocParser(); - - $this->preParser = new DocParser(); - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - - $this->phpParser = new PhpParser(); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . '::$' . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a function. - * - * @phpstan-return list An array of Annotations. - */ - public function getFunctionAnnotations(ReflectionFunction $function): array - { - $context = 'function ' . $function->getName(); - - $this->parser->setTarget(Target::TARGET_FUNCTION); - $this->parser->setImports($this->getImports($function)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($function->getDocComment(), $context); - } - - /** - * Gets a function annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) - { - $annotations = $this->getFunctionAnnotations($function); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getIgnoredAnnotationNames($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->ignoredAnnotationNames[$type][$name])) { - return $this->ignoredAnnotationNames[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->ignoredAnnotationNames[$type][$name]; - } - - /** - * Retrieves imports for a class or a function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getImports($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->imports[$type][$name])) { - return $this->imports[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->imports[$type][$name]; - } - - /** - * Retrieves imports for methods. - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if ( - ! $trait->hasMethod($method->getName()) - || $trait->getFileName() !== $method->getFileName() - ) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if (! $trait->hasProperty($property->getName())) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - */ - private function collectParsingMetadata($reflection): void - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); - - foreach ($annotations as $annotation) { - if (! ($annotation instanceof IgnoreAnnotation)) { - continue; - } - - foreach ($annotation->names as $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - - $this->imports[$type][$name] = array_merge( - self::$globalImports, - $this->phpParser->parseUseStatements($reflection), - [ - '__NAMESPACE__' => $reflection->getNamespaceName(), - 'self' => $name, - ] - ); - - $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 259d497..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,190 +0,0 @@ -|null $dirs - */ - public static function registerAutoloadNamespace(string $namespace, $dirs = null): void - { - self::$autoloadNamespaces[$namespace] = $dirs; - } - - /** - * Registers multiple namespaces. - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - * - * @param string[][]|string[]|null[] $namespaces indexed by namespace name - */ - public static function registerAutoloadNamespaces(array $namespaces): void - { - self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); - } - - /** - * Registers an autoloading callable for annotations, much like spl_autoload_register(). - * - * NOTE: These class loaders HAVE to be silent when a class was not found! - * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - */ - public static function registerLoader(callable $callable): void - { - // Reset our static cache now that we have a new loader to work with - self::$failedToAutoload = []; - self::$loaders[] = $callable; - } - - /** - * Registers an autoloading callable for annotations, if it is not already registered - * - * @deprecated This method is deprecated and will be removed in - * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. - */ - public static function registerUniqueLoader(callable $callable): void - { - if (in_array($callable, self::$loaders, true)) { - return; - } - - self::registerLoader($callable); - } - - /** - * Autoloads an annotation class silently. - */ - public static function loadAnnotationClass(string $class): bool - { - if (class_exists($class, false)) { - return true; - } - - if (array_key_exists($class, self::$failedToAutoload)) { - return false; - } - - foreach (self::$autoloadNamespaces as $namespace => $dirs) { - if (strpos($class, $namespace) !== 0) { - continue; - } - - $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; - - if ($dirs === null) { - $path = stream_resolve_include_path($file); - if ($path) { - require $path; - - return true; - } - } else { - foreach ((array) $dirs as $dir) { - if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { - require $dir . DIRECTORY_SEPARATOR . $file; - - return true; - } - } - } - } - - foreach (self::$loaders as $loader) { - if ($loader($class) === true) { - return true; - } - } - - if ( - self::$loaders === [] && - self::$autoloadNamespaces === [] && - self::$registerFileUsed === false && - class_exists($class) - ) { - return true; - } - - self::$failedToAutoload[$class] = null; - - return false; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php deleted file mode 100644 index c036b2d..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php +++ /dev/null @@ -1,268 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - /** - * @param bool $debug - */ - public function __construct(Reader $reader, Cache $cache, $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getClassAnnotations($class); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getPropertyAnnotations($property); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class); - if ($annots === false) { - $annots = $this->delegate->getMethodAnnotations($method); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** - * Fetches a value from the cache. - * - * @param string $cacheKey The cache key. - * - * @return mixed The cached value or false when the value is not in cache. - */ - private function fetchFromCache($cacheKey, ReflectionClass $class) - { - $data = $this->cache->fetch($cacheKey); - if ($data !== false) { - if (! $this->debug || $this->isCacheFresh($cacheKey, $class)) { - return $data; - } - } - - return false; - } - - /** - * Saves a value to the cache. - * - * @param string $cacheKey The cache key. - * @param mixed $value The value. - * - * @return void - */ - private function saveToCache($cacheKey, $value) - { - $this->cache->save($cacheKey, $value); - if (! $this->debug) { - return; - } - - $this->cache->save('[C]' . $cacheKey, time()); - } - - /** - * Checks if the cache is fresh. - * - * @param string $cacheKey - * - * @return bool - */ - private function isCacheFresh($cacheKey, ReflectionClass $class) - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - return $this->cache->fetch('[C]' . $cacheKey) >= $lastModification; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php deleted file mode 100644 index f6567c5..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php +++ /dev/null @@ -1,129 +0,0 @@ -= 100 - public const T_IDENTIFIER = 100; - public const T_AT = 101; - public const T_CLOSE_CURLY_BRACES = 102; - public const T_CLOSE_PARENTHESIS = 103; - public const T_COMMA = 104; - public const T_EQUALS = 105; - public const T_FALSE = 106; - public const T_NAMESPACE_SEPARATOR = 107; - public const T_OPEN_CURLY_BRACES = 108; - public const T_OPEN_PARENTHESIS = 109; - public const T_TRUE = 110; - public const T_NULL = 111; - public const T_COLON = 112; - public const T_MINUS = 113; - - /** @var array */ - protected $noCase = [ - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR, - ]; - - /** @var array */ - protected $withCase = [ - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL, - ]; - - /** - * Whether the next token starts immediately, or if there were - * non-captured symbols before that - */ - public function nextTokenIsAdjacent(): bool - { - return $this->token === null - || ($this->lookahead !== null - && ($this->lookahead['position'] - $this->token['position']) === strlen($this->token['value'])); - } - - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() - { - return [ - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:""|[^"])*+"', - ]; - } - - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() - { - return ['\s+', '\*+', '(.)']; - } - - /** - * {@inheritdoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return strpos($value, '.') !== false || stripos($value, 'e') !== false - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index ae530c5..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1459 +0,0 @@ - - */ - private static $classIdentifiers = [ - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL, - ]; - - /** - * The lexer. - * - * @var DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var int - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var bool - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = []; - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = []; - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var bool - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var string[] - */ - private $namespaces = []; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * - * @var bool[] indexed by annotation name - */ - private $ignoredAnnotationNames = []; - - /** - * A list with annotations in namespaced format - * that are not causing exceptions when not resolved to an annotation class. - * - * @var bool[] indexed by namespace name - */ - private $ignoredAnnotationNamespaces = []; - - /** @var string */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = [ - Annotation\Target::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ - 'value' => [ - 'required' => false, - 'type' => 'array', - 'array_type' => 'string', - 'value' => 'array', - ], - ], - ], - Annotation\Attribute::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ - 'name' => 'name', - 'type' => 'type', - 'required' => 'required', - ], - 'attribute_types' => [ - 'value' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'type' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'required' => [ - 'required' => false, - 'type' => 'boolean', - 'value' => 'boolean', - ], - ], - ], - Annotation\Attributes::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - 'array_type' => Annotation\Attribute::class, - 'value' => 'array<' . Annotation\Attribute::class . '>', - ], - ], - ], - Annotation\Enum::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - ], - 'literal' => [ - 'type' => 'array', - 'required' => false, - ], - ], - ], - Annotation\NamedArgumentConstructor::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => null, - 'properties' => [], - 'attribute_types' => [], - ], - ]; - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = [ - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ]; - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer(); - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param bool[] $names indexed by annotation name - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets the annotation namespaces that are ignored during the parsing process. - * - * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name - * - * @return void - */ - public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces) - { - $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; - } - - /** - * Sets ignore on not-imported annotations. - * - * @param bool $bool - * - * @return void - */ - public function setIgnoreNotImportedAnnotations($bool) - { - $this->ignoreNotImportedAnnotations = (bool) $bool; - } - - /** - * Sets the default namespaces. - * - * @param string $namespace - * - * @return void - * - * @throws RuntimeException - */ - public function addNamespace($namespace) - { - if ($this->imports) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @param int $target - * - * @return void - */ - public function setTarget($target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @param string $input The docblock string to parse. - * @param string $context The parsing context. - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. - */ - public function parse($input, $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return []; - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - * - * @param string $input The docblock string to parse - */ - private function findInitialTokenPosition($input): ?int - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - $preceding = substr($input, $pos - 1, 1); - - // if the @ is preceded by a space, a tab or * it is valid - if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token Type of token. - * - * @return bool True if tokens match; false otherwise. - * - * @throws AnnotationException - */ - private function match(int $token): bool - { - if (! $this->lexer->isNextToken($token)) { - throw $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @throws AnnotationException - * - * @phpstan-param list $tokens - */ - private function matchAny(array $tokens): bool - { - if (! $this->lexer->isNextTokenAny($tokens)) { - throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param mixed[]|null $token Optional token. - */ - private function syntaxError(string $expected, ?array $token = null): AnnotationException - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= $this->lexer->lookahead === null - ? 'end of string' - : sprintf("'%s' at position %s", $token['value'], $token['position']); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - return AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param class-string $fqcn - */ - private function classExists(string $fqcn): bool - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param class-string $name The annotation name - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function collectAnnotationMetadata(string $name): void - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports([ - 'enum' => Enum::class, - 'target' => Target::class, - 'attribute' => Attribute::class, - 'attributes' => Attributes::class, - 'namedargumentconstructor' => NamedArgumentConstructor::class, - ]); - - // Make sure that annotations from metadata are loaded - class_exists(Enum::class); - class_exists(Target::class); - class_exists(Attribute::class); - class_exists(Attributes::class); - class_exists(NamedArgumentConstructor::class); - } - - $class = new ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $constructor = $class->getConstructor(); - $metadata = [ - 'default_property' => null, - 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, - 'constructor_args' => [], - 'properties' => [], - 'property_types' => [], - 'attribute_types' => [], - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => strpos($docComment, '@Annotation') !== false, - ]; - - $metadata['has_named_argument_constructor'] = $metadata['has_constructor'] - && $class->implementsInterface(NamedArgumentConstructorAnnotation::class); - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof NamedArgumentConstructor) { - $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; - if ($metadata['has_named_argument_constructor']) { - // choose the first argument as the default property - $metadata['default_property'] = $constructor->getParameters()[0]->getName(); - } - } - - if (! ($annotation instanceof Attributes)) { - continue; - } - - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - - // if not has a constructor will inject values into public properties - if ($metadata['has_constructor'] === false) { - // collect all public properties - foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - $propertyComment = $property->getDocComment(); - if ($propertyComment === false) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (strpos($propertyComment, '@Required') !== false); - $attribute->name = $property->name; - $attribute->type = (strpos($propertyComment, '@var') !== false && - preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (strpos($propertyComment, '@Enum') === false) { - continue; - } - - $context = 'property ' . $class->name . '::$' . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if (! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } elseif ($metadata['has_named_argument_constructor']) { - foreach ($constructor->getParameters() as $parameter) { - $metadata['constructor_args'][$parameter->getName()] = [ - 'position' => $parameter->getPosition(), - 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, - ]; - } - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param mixed[] $metadata - */ - private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void - { - // handle internal type declaration - $type = self::$typeMap[$attribute->type] ?? $attribute->type; - - // handle the case if the property type is mixed - if ($type === 'mixed') { - return; - } - - // Evaluate type - $pos = strpos($type, '<'); - if ($pos !== false) { - // Checks if the property has array - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } else { - // Checks if the property has type[] - $pos = strrpos($type, '['); - if ($pos !== false) { - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return list - */ - private function Annotations(): array - { - $annotations = []; - - while ($this->lexer->lookahead !== null) { - if ($this->lexer->lookahead['type'] !== DocLexer::T_AT) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if ( - $this->lexer->token !== null && - $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen( - $this->lexer->token['value'] - ) - ) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - $peek = $this->lexer->glimpse(); - if ( - ($peek === null) - || ($peek['type'] !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( - $peek['type'], - self::$classIdentifiers, - true - )) - || $peek['position'] !== $this->lexer->lookahead['position'] + 1 - ) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - $annot = $this->Annotation(); - if ($annot === false) { - continue; - } - - $annotations[] = $annot; - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return object|false False if it is not a valid annotation. - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - if ( - $this->lexer->isNextToken(DocLexer::T_MINUS) - && $this->lexer->nextTokenIsAdjacent() - ) { - // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded - return false; - } - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ($name[0] !== '\\') { - $pos = strpos($name, '\\'); - $alias = ($pos === false) ? $name : substr($name, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace . '\\' . $name)) { - $name = $namespace . '\\' . $name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias])) { - $namespace = ltrim($this->imports[$loweredAlias], '\\'); - $name = ($pos !== false) - ? $namespace . substr($name, $pos) - : $namespace; - $found = $this->classExists($name); - } elseif ( - ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'] . '\\' . $name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if (! $found) { - if ($this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? -EXCEPTION - , - $name, - $this->context - )); - } - } - - $name = ltrim($name, '\\'); - - if (! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf( - 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', - $name, - $this->context - )); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - // collects the metadata annotation only if there is not yet - if (! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The class "%s" is not annotated with @Annotation. -Are you sure this class can be used as annotation? -If so, then you need to add @Annotation to the _class_ doc comment of "%s". -If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. -EXCEPTION - , - $name, - $name, - $originalName, - $this->context - )); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { - throw AnnotationException::semanticalError( - sprintf( - <<<'EXCEPTION' -Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. -EXCEPTION - , - $originalName, - $this->context, - self::$annotationMetadata[$name]['targets_literal'] - ) - ); - } - - $arguments = $this->MethodCall(); - $values = $this->resolvePositionalValues($arguments, $name); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError( - $property, - $name, - $this->context, - $enum['literal'], - $values[$property] - ); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ( - $property === self::$annotationMetadata[$name]['default_property'] - && ! isset($values[$property]) && isset($values['value']) - ) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (! isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'] - ); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if (! is_array($values[$property])) { - $values[$property] = [$values[$property]]; - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', - $item - ); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'], - $values[$property] - ); - } - } - - if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { - if (PHP_VERSION_ID >= 80000) { - return new $name(...$values); - } - - $positionalValues = []; - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $positionalValues[$parameter['position']] = $parameter['default']; - } - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - - $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; - } - - return new $name(...$positionalValues); - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return new $name($values); - } - - $instance = new $name(); - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ($property !== 'value') { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s". -Available properties: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', self::$annotationMetadata[$name]['properties']) - )); - } - - // handle the case if the property has no annotations - $property = self::$annotationMetadata[$name]['default_property']; - if (! $property) { - throw AnnotationException::creationError(sprintf( - 'The annotation @%s declared on %s does not accept any values, but got %s.', - $originalName, - $this->context, - json_encode($values) - )); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function MethodCall(): array - { - $values = []; - - if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Values(): array - { - $values = [$this->Value()]; - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - $values[] = $value; - } - - $namedArguments = []; - $positionalArguments = []; - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof stdClass) { - $namedArguments[$value->name] = $value->value; - } else { - $positionalArguments[$k] = $value; - } - } - - return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { - [$className, $const] = explode('::', $identifier); - - $pos = strpos($className, '\\'); - $alias = ($pos === false) ? $className : substr($className, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - switch (true) { - case ! empty($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - break; - } - } - - break; - - case isset($this->imports[$loweredAlias]): - $found = true; - $className = ($pos !== false) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if (isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - } - } - - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - /** - * Checks if identifier ends with ::class and remove the leading backslash if it exists. - */ - if ( - $this->identifierEndsWithClassConstant($identifier) && - ! $this->identifierStartsWithBackslash($identifier) - ) { - return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); - } - - if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { - return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); - } - - if (! defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - private function identifierStartsWithBackslash(string $identifier): bool - { - return $identifier[0] === '\\'; - } - - private function identifierEndsWithClassConstant(string $identifier): bool - { - return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); - } - - /** - * @return int|false - */ - private function getClassConstantPositionInIdentifier(string $identifier) - { - return stripos($identifier, '::class'); - } - - /** - * Identifier ::= string - * - * @throws AnnotationException - */ - private function Identifier(): string - { - // check if we have an annotation - if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - throw $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token['value']; - - while ( - $this->lexer->lookahead !== null && - $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + - strlen($this->lexer->token['value'])) && - $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) - ) { - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token['value']; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if ($peek['type'] === DocLexer::T_EQUALS) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead['type']) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - - return $this->lexer->token['value']; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - - return (int) $this->lexer->token['value']; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - - return (float) $this->lexer->token['value']; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - - return null; - - default: - throw $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function FieldAssignment(): stdClass - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token['value']; - - $this->match(DocLexer::T_EQUALS); - - $item = new stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Arrayx(): array - { - $array = $values = []; - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - [$key, $val] = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @throws AnnotationException - * @throws ReflectionException - * - * @phpstan-return array{mixed, mixed} - */ - private function ArrayEntry(): array - { - $peek = $this->lexer->glimpse(); - - if ( - $peek['type'] === DocLexer::T_EQUALS - || $peek['type'] === DocLexer::T_COLON - ) { - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); - $key = $this->lexer->token['value']; - } - - $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); - - return [$key, $this->PlainValue()]; - } - - return [null, $this->Value()]; - } - - /** - * Checks whether the given $name matches any ignored annotation name or namespace - */ - private function isIgnoredAnnotation(string $name): bool - { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return true; - } - - foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { - $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - - if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { - return true; - } - } - - return false; - } - - /** - * Resolve positional arguments (without name) to named ones - * - * @param array $arguments - * - * @return array - */ - private function resolvePositionalValues(array $arguments, string $name): array - { - $positionalArguments = $arguments['positional_arguments'] ?? []; - $values = $arguments['named_arguments'] ?? []; - - if ( - self::$annotationMetadata[$name]['has_named_argument_constructor'] - && self::$annotationMetadata[$name]['default_property'] !== null - ) { - // We must ensure that we don't have positional arguments after named ones - $positions = array_keys($positionalArguments); - $lastPosition = null; - foreach ($positions as $position) { - if ( - ($lastPosition === null && $position !== 0) || - ($lastPosition !== null && $position !== $lastPosition + 1) - ) { - throw $this->syntaxError('Positional arguments after named arguments is not allowed'); - } - - $lastPosition = $position; - } - - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $position = $parameter['position']; - if (isset($values[$property]) || ! isset($positionalArguments[$position])) { - continue; - } - - $values[$property] = $positionalArguments[$position]; - } - } else { - if (count($positionalArguments) > 0 && ! isset($values['value'])) { - if (count($positionalArguments) === 1) { - $value = array_pop($positionalArguments); - } else { - $value = array_values($positionalArguments); - } - - $values['value'] = $value; - } - } - - return $values; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php deleted file mode 100644 index 6c6c22c..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ /dev/null @@ -1,315 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var array */ - private $classNameHashes = []; - - /** @var int */ - private $umask; - - /** - * @param string $cacheDir - * @param bool $debug - * @param int $umask - * - * @throws InvalidArgumentException - */ - public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002) - { - if (! is_int($umask)) { - throw new InvalidArgumentException(sprintf( - 'The parameter umask must be an integer, was: %s', - gettype($umask) - )); - } - - $this->reader = $reader; - $this->umask = $umask; - - if (! is_dir($cacheDir) && ! @mkdir($cacheDir, 0777 & (~$this->umask), true)) { - throw new InvalidArgumentException(sprintf( - 'The directory "%s" does not exist and could not be created.', - $cacheDir - )); - } - - $this->dir = rtrim($cacheDir, '\\/'); - $this->debug = $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name]; - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name] . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - if (! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - - $key = $this->classNameHashes[$class->name] . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; - if (! is_file($path)) { - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - $filename = $class->getFilename(); - if ( - $this->debug - && $filename !== false - && filemtime($path) < filemtime($filename) - ) { - @unlink($path); - - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Saves the cache file. - * - * @param string $path - * @param mixed $data - * - * @return void - */ - private function saveCacheFile($path, $data) - { - if (! is_writable($this->dir)) { - throw new InvalidArgumentException(sprintf( - <<<'EXCEPTION' -The directory "%s" is not writable. Both the webserver and the console user need access. -You can manage access rights for multiple users with "chmod +a". -If your system does not support this, check out the acl package., -EXCEPTION - , - $this->dir - )); - } - - $tempfile = tempnam($this->dir, uniqid('', true)); - - if ($tempfile === false) { - throw new RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir)); - } - - @chmod($tempfile, 0666 & (~$this->umask)); - - $written = file_put_contents( - $tempfile, - 'umask)); - - if (rename($tempfile, $path) === false) { - @unlink($tempfile); - - throw new RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path)); - } - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Clears loaded annotations. - * - * @return void - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = []; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php deleted file mode 100644 index 2efeb1d..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php +++ /dev/null @@ -1,177 +0,0 @@ - true, - 'Attribute' => true, - 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - 'NamedArgumentConstructor' => true, - ]; - - private const WidelyUsedNonStandard = [ - 'fix' => true, - 'fixme' => true, - 'override' => true, - ]; - - private const PhpDocumentor1 = [ - 'abstract' => true, - 'access' => true, - 'code' => true, - 'deprec' => true, - 'endcode' => true, - 'exception' => true, - 'final' => true, - 'ingroup' => true, - 'inheritdoc' => true, - 'inheritDoc' => true, - 'magic' => true, - 'name' => true, - 'private' => true, - 'static' => true, - 'staticvar' => true, - 'staticVar' => true, - 'toc' => true, - 'tutorial' => true, - 'throw' => true, - ]; - - private const PhpDocumentor2 = [ - 'api' => true, - 'author' => true, - 'category' => true, - 'copyright' => true, - 'deprecated' => true, - 'example' => true, - 'filesource' => true, - 'global' => true, - 'ignore' => true, - /* Can we enable this? 'index' => true, */ - 'internal' => true, - 'license' => true, - 'link' => true, - 'method' => true, - 'package' => true, - 'param' => true, - 'property' => true, - 'property-read' => true, - 'property-write' => true, - 'return' => true, - 'see' => true, - 'since' => true, - 'source' => true, - 'subpackage' => true, - 'throws' => true, - 'todo' => true, - 'TODO' => true, - 'usedby' => true, - 'uses' => true, - 'var' => true, - 'version' => true, - ]; - - private const PHPUnit = [ - 'author' => true, - 'after' => true, - 'afterClass' => true, - 'backupGlobals' => true, - 'backupStaticAttributes' => true, - 'before' => true, - 'beforeClass' => true, - 'codeCoverageIgnore' => true, - 'codeCoverageIgnoreStart' => true, - 'codeCoverageIgnoreEnd' => true, - 'covers' => true, - 'coversDefaultClass' => true, - 'coversNothing' => true, - 'dataProvider' => true, - 'depends' => true, - 'doesNotPerformAssertions' => true, - 'expectedException' => true, - 'expectedExceptionCode' => true, - 'expectedExceptionMessage' => true, - 'expectedExceptionMessageRegExp' => true, - 'group' => true, - 'large' => true, - 'medium' => true, - 'preserveGlobalState' => true, - 'requires' => true, - 'runTestsInSeparateProcesses' => true, - 'runInSeparateProcess' => true, - 'small' => true, - 'test' => true, - 'testdox' => true, - 'testWith' => true, - 'ticket' => true, - 'uses' => true, - ]; - - private const PhpCheckStyle = ['SuppressWarnings' => true]; - - private const PhpStorm = ['noinspection' => true]; - - private const PEAR = ['package_version' => true]; - - private const PlainUML = [ - 'startuml' => true, - 'enduml' => true, - ]; - - private const Symfony = ['experimental' => true]; - - private const PhpCodeSniffer = [ - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; - - private const SlevomatCodingStandard = ['phpcsSuppress' => true]; - - private const Phan = ['suppress' => true]; - - private const Rector = ['noRector' => true]; - - private const StaticAnalysis = [ - // PHPStan, Psalm - 'extends' => true, - 'implements' => true, - 'template' => true, - 'use' => true, - - // Psalm - 'pure' => true, - 'immutable' => true, - ]; - - public const LIST = self::Reserved - + self::WidelyUsedNonStandard - + self::PhpDocumentor1 - + self::PhpDocumentor2 - + self::PHPUnit - + self::PhpCheckStyle - + self::PhpStorm - + self::PEAR - + self::PlainUML - + self::Symfony - + self::SlevomatCodingStandard - + self::PhpCodeSniffer - + self::Phan - + self::Rector - + self::StaticAnalysis; - - private function __construct() - { - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 42e7076..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,100 +0,0 @@ -delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $annotations = []; - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotation) - { - return $this->delegate->getClassAnnotation($class, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $annotations = []; - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotation) - { - return $this->delegate->getMethodAnnotation($method, $annotation); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $annotations = []; - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotation) - { - return $this->delegate->getPropertyAnnotation($property, $annotation); - } - - /** - * Proxies all methods to the delegate. - * - * @param string $method - * @param mixed[] $args - * - * @return mixed - */ - public function __call($method, $args) - { - return call_user_func_array([$this->delegate, $method], $args); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php deleted file mode 100644 index 8af224c..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php +++ /dev/null @@ -1,14 +0,0 @@ -ReflectionClass object. - * - * @return array A list with use statements in the form (Alias => FQN). - */ - public function parseClass(ReflectionClass $class) - { - return $this->parseUseStatements($class); - } - - /** - * Parse a class or function for use statements. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @psalm-return array a list with use statements in the form (Alias => FQN). - */ - public function parseUseStatements($reflection): array - { - if (method_exists($reflection, 'getUseStatements')) { - return $reflection->getUseStatements(); - } - - $filename = $reflection->getFileName(); - - if ($filename === false) { - return []; - } - - $content = $this->getFileContent($filename, $reflection->getStartLine()); - - if ($content === null) { - return []; - } - - $namespace = preg_quote($reflection->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * - * @return string|null The content of the file or null if the file does not exist. - */ - private function getFileContent($filename, $lineNumber) - { - if (! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (! $file->eof()) { - if ($lineCnt++ === $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php deleted file mode 100644 index a7099d5..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php +++ /dev/null @@ -1,232 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - public function clearLoadedAnnotations(): void - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** @return mixed[] */ - private function fetchFromCache( - string $cacheKey, - ReflectionClass $class, - string $method, - Reflector $reflector - ): array { - $cacheKey = rawurlencode($cacheKey); - - $item = $this->cache->getItem($cacheKey); - if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) { - $this->cache->save($item->set($this->delegate->{$method}($reflector))); - } - - return $item->get(); - } - - /** - * Used in debug mode to check if the cache is fresh. - * - * @return bool Returns true if the cache was fresh, or false if the class - * being read was modified since writing to the cache. - */ - private function refresh(string $cacheKey, ReflectionClass $class): bool - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - $item = $this->cache->getItem('[C]' . $cacheKey); - if ($item->isHit() && $item->get() >= $lastModification) { - return true; - } - - $this->cache->save($item->set(time())); - - return false; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 0663ffd..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,80 +0,0 @@ - An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php deleted file mode 100644 index 8a78c11..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php +++ /dev/null @@ -1,114 +0,0 @@ -parser = new DocParser(); - $this->parser->setIgnoreNotImportedAnnotations(true); - } - - /** - * Adds a namespace in which we will look for annotations. - * - * @param string $namespace - * - * @return void - */ - public function addNamespace($namespace) - { - $this->parser->addNamespace($namespace); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - return $this->parser->parse( - $method->getDocComment(), - 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()' - ); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - return $this->parser->parse( - $property->getDocComment(), - 'property ' . $property->getDeclaringClass()->name . '::$' . $property->getName() - ); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 9605fb8..0000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,208 +0,0 @@ - - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - /** - * @param string $contents - */ - public function __construct($contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return mixed[]|string|null The token if exists, null otherwise. - */ - public function next($docCommentIsComment = true) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ( - $this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) - ) { - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; - $explicitAlias = false; - while (($token = $this->next())) { - if (! $explicitAlias && $token[0] === T_STRING) { - $class .= $token[1]; - $alias = $token[1]; - } elseif ($explicitAlias && $token[0] === T_STRING) { - $alias = $token[1]; - } elseif ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - ) { - $class .= $token[1]; - - $classSplit = explode('\\', $token[1]); - $alias = $classSplit[count($classSplit) - 1]; - } elseif ($token[0] === T_NS_SEPARATOR) { - $class .= '\\'; - $alias = ''; - } elseif ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } elseif ($token === ',') { - $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } elseif ($token === ';') { - $statements[strtolower($alias)] = $groupRoot . $class; - break; - } elseif ($token === '{') { - $groupRoot = $class; - $class = ''; - } elseif ($token === '}') { - continue; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements($namespaceName) - { - $statements = []; - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = []; - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while ( - ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - )) - ) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE deleted file mode 100644 index e8fdec4..0000000 --- a/vendor/doctrine/lexer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md deleted file mode 100644 index 784f2a2..0000000 --- a/vendor/doctrine/lexer/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Lexer - -[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions) - -Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. - -This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). - -https://www.doctrine-project.org/projects/lexer.html diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json deleted file mode 100644 index c435647..0000000 --- a/vendor/doctrine/lexer/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "doctrine/lexer", - "type": "library", - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "keywords": [ - "php", - "parser", - "lexer", - "annotations", - "docblock" - ], - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "autoload": { - "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } - }, - "autoload-dev": { - "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" } - }, - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php deleted file mode 100644 index 7e8a11d..0000000 --- a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ /dev/null @@ -1,337 +0,0 @@ - - */ - private $tokens = []; - - /** - * Current lexer position in input string. - * - * @var int - */ - private $position = 0; - - /** - * Current peek of current lexer position. - * - * @var int - */ - private $peek = 0; - - /** - * The next token in the input. - * - * @var mixed[]|null - * @psalm-var Token|null - */ - public $lookahead; - - /** - * The last matched/seen token. - * - * @var mixed[]|null - * @psalm-var Token|null - */ - public $token; - - /** - * Composed regex for input parsing. - * - * @var string|null - */ - private $regex; - - /** - * Sets the input data to be tokenized. - * - * The Lexer is immediately reset and the new input tokenized. - * Any unprocessed tokens from any previous input are lost. - * - * @param string $input The input to be tokenized. - * - * @return void - */ - public function setInput($input) - { - $this->input = $input; - $this->tokens = []; - - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - * - * @return void - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - * - * @return void - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param int $position Position to place the lexical scanner. - * - * @return void - */ - public function resetPosition($position = 0) - { - $this->position = $position; - } - - /** - * Retrieve the original lexer's input until a given position. - * - * @param int $position - * - * @return string - */ - public function getInputUntilPosition($position) - { - return substr($this->input, 0, $position); - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param int|string $type - * - * @return bool - */ - public function isNextToken($type) - { - return $this->lookahead !== null && $this->lookahead['type'] === $type; - } - - /** - * Checks whether any of the given tokens matches the current lookahead. - * - * @param list $types - * - * @return bool - */ - public function isNextTokenAny(array $types) - { - return $this->lookahead !== null && in_array($this->lookahead['type'], $types, true); - } - - /** - * Moves to the next token in the input string. - * - * @return bool - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = isset($this->tokens[$this->position]) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param string $type The token type to skip until. - * - * @return void - */ - public function skipUntil($type) - { - while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token. - * - * @param mixed $value - * @param int|string $token - * - * @return bool - */ - public function isA($value, $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } - - return null; - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return mixed[]|null The next token or NULL if there are no more tokens ahead. - * @psalm-return Token|null - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input A query string. - * - * @return void - */ - protected function scan($input) - { - if (! isset($this->regex)) { - $this->regex = sprintf( - '/(%s)|%s/%s', - implode(')|(', $this->getCatchablePatterns()), - implode('|', $this->getNonCatchablePatterns()), - $this->getModifiers() - ); - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($this->regex, $input, -1, $flags); - - if ($matches === false) { - // Work around https://bugs.php.net/78122 - $matches = [[$input, 0]]; - } - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $type = $this->getType($match[0]); - - $this->tokens[] = [ - 'value' => $match[0], - 'type' => $type, - 'position' => $match[1], - ]; - } - } - - /** - * Gets the literal for a given token. - * - * @param int|string $token - * - * @return int|string - */ - public function getLiteral($token) - { - $className = static::class; - $reflClass = new ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Regex modifiers - * - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * - * @return int|string|null - */ - abstract protected function getType(&$value); -} diff --git a/vendor/doctrine/lexer/psalm.xml b/vendor/doctrine/lexer/psalm.xml deleted file mode 100644 index f331e50..0000000 --- a/vendor/doctrine/lexer/psalm.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md deleted file mode 100644 index 58ddab0..0000000 --- a/vendor/psr/cache/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Fixed - -- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr -- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr -- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell -- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell - -## 1.0.0 - 2015-12-11 - -Initial stable release; reflects accepted PSR-6 specification diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt deleted file mode 100644 index b1c2c97..0000000 --- a/vendor/psr/cache/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md deleted file mode 100644 index c8706ce..0000000 --- a/vendor/psr/cache/README.md +++ /dev/null @@ -1,9 +0,0 @@ -PSR Cache -========= - -This repository holds all interfaces defined by -[PSR-6](http://www.php-fig.org/psr/psr-6/). - -Note that this is not a Cache implementation of its own. It is merely an -interface that describes a Cache implementation. See the specification for more -details. diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json deleted file mode 100644 index e828fec..0000000 --- a/vendor/psr/cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/cache", - "description": "Common interface for caching libraries", - "keywords": ["psr", "psr-6", "cache"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index e27f22f..0000000 --- a/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -=7.4.0" - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - } -} diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php deleted file mode 100644 index 0f213f2..0000000 --- a/vendor/psr/container/src/ContainerExceptionInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -=7.2.0" - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php b/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php deleted file mode 100644 index 4306fa9..0000000 --- a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d..0000000 --- a/vendor/psr/log/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -logger = $logger; - } -} diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php deleted file mode 100644 index 2206cfd..0000000 --- a/vendor/psr/log/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,125 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php deleted file mode 100644 index c8f7293..0000000 --- a/vendor/psr/log/Psr/Log/NullLogger.php +++ /dev/null @@ -1,30 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/vendor/psr/log/Psr/Log/Test/DummyTest.php b/vendor/psr/log/Psr/Log/Test/DummyTest.php deleted file mode 100644 index 9638c11..0000000 --- a/vendor/psr/log/Psr/Log/Test/DummyTest.php +++ /dev/null @@ -1,18 +0,0 @@ - ". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $closed = fopen('php://memory', 'r'); - fclose($closed); - - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - 'closed' => $closed, - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} diff --git a/vendor/psr/log/Psr/Log/Test/TestLogger.php b/vendor/psr/log/Psr/Log/Test/TestLogger.php deleted file mode 100644 index 1be3230..0000000 --- a/vendor/psr/log/Psr/Log/Test/TestLogger.php +++ /dev/null @@ -1,147 +0,0 @@ - $level, - 'message' => $message, - 'context' => $context, - ]; - - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - public function hasRecords($level) - { - return isset($this->recordsByLevel[$level]); - } - - public function hasRecord($record, $level) - { - if (is_string($record)) { - $record = ['message' => $record]; - } - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - return true; - }, $level); - } - - public function hasRecordThatContains($message, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - public function hasRecordThatMatches($regex, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($regex) { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - public function hasRecordThatPasses(callable $predicate, $level) - { - if (!isset($this->recordsByLevel[$level])) { - return false; - } - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (call_user_func($predicate, $rec, $i)) { - return true; - } - } - return false; - } - - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = strtolower($matches[2]); - if (method_exists($this, $genericMethod)) { - $args[] = $level; - return call_user_func_array([$this, $genericMethod], $args); - } - } - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } - - public function reset() - { - $this->records = []; - $this->recordsByLevel = []; - } -} diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md deleted file mode 100644 index a9f20c4..0000000 --- a/vendor/psr/log/README.md +++ /dev/null @@ -1,58 +0,0 @@ -PSR Log -======= - -This repository holds all interfaces/classes/traits related to -[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). - -Note that this is not a logger of its own. It is merely an interface that -describes a logger. See the specification for more details. - -Installation ------------- - -```bash -composer require psr/log -``` - -Usage ------ - -If you need a logger, you can use the interface like this: - -```php -logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - try { - $this->doSomethingElse(); - } catch (Exception $exception) { - $this->logger->error('Oh no!', array('exception' => $exception)); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json deleted file mode 100644 index ca05695..0000000 --- a/vendor/psr/log/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "homepage": "https://github.com/php-fig/log", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - } -} diff --git a/vendor/psr/log/src/AbstractLogger.php b/vendor/psr/log/src/AbstractLogger.php deleted file mode 100644 index d60a091..0000000 --- a/vendor/psr/log/src/AbstractLogger.php +++ /dev/null @@ -1,15 +0,0 @@ -logger = $logger; - } -} diff --git a/vendor/psr/log/src/LoggerInterface.php b/vendor/psr/log/src/LoggerInterface.php deleted file mode 100644 index b4d062b..0000000 --- a/vendor/psr/log/src/LoggerInterface.php +++ /dev/null @@ -1,125 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function alert(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function critical(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function error(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function warning(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function notice(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function info(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void - */ - public function debug(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - abstract public function log($level, string|\Stringable $message, array $context = []); -} diff --git a/vendor/psr/log/src/NullLogger.php b/vendor/psr/log/src/NullLogger.php deleted file mode 100644 index 5607705..0000000 --- a/vendor/psr/log/src/NullLogger.php +++ /dev/null @@ -1,30 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, string|\Stringable $message, array $context = []) - { - // noop - } -} diff --git a/vendor/symfony/apache-pack/composer.json b/vendor/symfony/apache-pack/composer.json deleted file mode 100644 index 5b4125a..0000000 --- a/vendor/symfony/apache-pack/composer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "symfony/apache-pack", - "type": "symfony-pack", - "license": "MIT", - "description": "A pack for Apache support in Symfony" -} diff --git a/vendor/symfony/cache-contracts/.gitignore b/vendor/symfony/cache-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/cache-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/cache-contracts/CHANGELOG.md b/vendor/symfony/cache-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/cache-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/cache-contracts/CacheInterface.php b/vendor/symfony/cache-contracts/CacheInterface.php deleted file mode 100644 index 67e4dfd..0000000 --- a/vendor/symfony/cache-contracts/CacheInterface.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Covers most simple to advanced caching needs. - * - * @author Nicolas Grekas - */ -interface CacheInterface -{ - /** - * Fetches a value from the pool or computes it if not found. - * - * On cache misses, a callback is called that should return the missing value. - * This callback is given a PSR-6 CacheItemInterface instance corresponding to the - * requested key, that could be used e.g. for expiration control. It could also - * be an ItemInterface instance when its additional features are needed. - * - * @param string $key The key of the item to retrieve from the cache - * @param callable|CallbackInterface $callback Should return the computed value for the given key/item - * @param float|null $beta A float that, as it grows, controls the likeliness of triggering - * early expiration. 0 disables it, INF forces immediate expiration. - * The default (or providing null) is implementation dependent but should - * typically be 1.0, which should provide optimal stampede protection. - * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration - * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()} - * - * @return mixed - * - * @throws InvalidArgumentException When $key is not valid or when $beta is negative - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null); - - /** - * Removes an item from the pool. - * - * @param string $key The key to delete - * - * @throws InvalidArgumentException When $key is not valid - * - * @return bool True if the item was successfully removed, false if there was any error - */ - public function delete(string $key): bool; -} diff --git a/vendor/symfony/cache-contracts/CacheTrait.php b/vendor/symfony/cache-contracts/CacheTrait.php deleted file mode 100644 index d340e06..0000000 --- a/vendor/symfony/cache-contracts/CacheTrait.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(InvalidArgumentException::class); - -/** - * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes. - * - * @author Nicolas Grekas - */ -trait CacheTrait -{ - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { }; - } - - $item = $pool->getItem($key); - $recompute = !$item->isHit() || \INF === $beta; - $metadata = $item instanceof ItemInterface ? $item->getMetadata() : []; - - if (!$recompute && $metadata) { - $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false; - $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false; - - if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) { - // force applying defaultLifetime to expiry - $item->expiresAt(null); - $logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [ - 'key' => $key, - 'delta' => sprintf('%.1f', $expiry - $now), - ]); - } - } - - if ($recompute) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $pool->save($item); - } - } - - return $item->get(); - } -} diff --git a/vendor/symfony/cache-contracts/CallbackInterface.php b/vendor/symfony/cache-contracts/CallbackInterface.php deleted file mode 100644 index 7dae2aa..0000000 --- a/vendor/symfony/cache-contracts/CallbackInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; - -/** - * Computes and returns the cached value of an item. - * - * @author Nicolas Grekas - */ -interface CallbackInterface -{ - /** - * @param CacheItemInterface|ItemInterface $item The item to compute the value for - * @param bool &$save Should be set to false when the value should not be saved in the pool - * - * @return mixed The computed value for the passed item - */ - public function __invoke(CacheItemInterface $item, bool &$save); -} diff --git a/vendor/symfony/cache-contracts/ItemInterface.php b/vendor/symfony/cache-contracts/ItemInterface.php deleted file mode 100644 index 10c0488..0000000 --- a/vendor/symfony/cache-contracts/ItemInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheException; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Augments PSR-6's CacheItemInterface with support for tags and metadata. - * - * @author Nicolas Grekas - */ -interface ItemInterface extends CacheItemInterface -{ - /** - * References the Unix timestamp stating when the item will expire. - */ - public const METADATA_EXPIRY = 'expiry'; - - /** - * References the time the item took to be created, in milliseconds. - */ - public const METADATA_CTIME = 'ctime'; - - /** - * References the list of tags that were assigned to the item, as string[]. - */ - public const METADATA_TAGS = 'tags'; - - /** - * Reserved characters that cannot be used in a key or tag. - */ - public const RESERVED_CHARACTERS = '{}()/\@:'; - - /** - * Adds a tag to a cache item. - * - * Tags are strings that follow the same validation rules as keys. - * - * @param string|string[] $tags A tag or array of tags - * - * @return $this - * - * @throws InvalidArgumentException When $tag is not valid - * @throws CacheException When the item comes from a pool that is not tag-aware - */ - public function tag($tags): self; - - /** - * Returns a list of metadata info that were saved alongside with the cached value. - * - * See ItemInterface::METADATA_* consts for keys potentially found in the returned array. - */ - public function getMetadata(): array; -} diff --git a/vendor/symfony/cache-contracts/LICENSE b/vendor/symfony/cache-contracts/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/cache-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache-contracts/README.md b/vendor/symfony/cache-contracts/README.md deleted file mode 100644 index 7085a69..0000000 --- a/vendor/symfony/cache-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Cache Contracts -======================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php b/vendor/symfony/cache-contracts/TagAwareCacheInterface.php deleted file mode 100644 index 7c4cf11..0000000 --- a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Allows invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareCacheInterface extends CacheInterface -{ - /** - * Invalidates cached items using tags. - * - * When implemented on a PSR-6 pool, invalidation should not apply - * to deferred items. Instead, they should be committed as usual. - * This allows replacing old tagged values by new ones without - * race conditions. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool True on success - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/vendor/symfony/cache-contracts/composer.json b/vendor/symfony/cache-contracts/composer.json deleted file mode 100644 index 9f45e17..0000000 --- a/vendor/symfony/cache-contracts/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/cache-contracts", - "type": "library", - "description": "Generic abstractions related to caching", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Cache\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractAdapter.php b/vendor/symfony/cache/Adapter/AbstractAdapter.php deleted file mode 100644 index 0d1c671..0000000 --- a/vendor/symfony/cache/Adapter/AbstractAdapter.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Nicolas Grekas - */ -abstract class AbstractAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = ':'; - - private static $apcuSupported; - private static $phpFilesSupported; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).static::NS_SEPARATOR; - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $v = $value; - $item->isHit = $isHit; - // Detect wrapped values that encode for their expiry and creation duration - // For compactness, these values are packed in the key of an array using - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = (string) array_key_first($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) { - $item->value = $v[$k]; - $v = unpack('Ve/Nc', substr($k, 1, -1)); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ?? self::$mergeByLifetime = \Closure::bind( - static function ($deferred, $namespace, &$expiredIds, $getId, $defaultLifetime) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) { - unset($metadata[CacheItem::METADATA_TAGS]); - } - // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators - $byLifetime[$ttl][$getId($key)] = $metadata ? ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item->value] : $item->value; - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Returns the best possible adapter that your runtime supports. - * - * Using ApcuAdapter makes system caches compatible with read-only filesystems. - * - * @return AdapterInterface - */ - public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null) - { - $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); - if (null !== $logger) { - $opcache->setLogger($logger); - } - - if (!self::$apcuSupported = self::$apcuSupported ?? ApcuAdapter::isSupported()) { - return $opcache; - } - - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - return $opcache; - } - - $apcu = new ApcuAdapter($namespace, intdiv($defaultLifetime, 5), $version); - if (null !== $logger) { - $apcu->setLogger($logger); - } - - return new ChainAdapter([$apcu, $opcache]); - } - - public static function createConnection(string $dsn, array $options = []) - { - if (str_starts_with($dsn, 'redis:') || str_starts_with($dsn, 'rediss:')) { - return RedisAdapter::createConnection($dsn, $options); - } - if (str_starts_with($dsn, 'memcached:')) { - return MemcachedAdapter::createConnection($dsn, $options); - } - if (0 === strpos($dsn, 'couchbase:')) { - if (CouchbaseBucketAdapter::isSupported()) { - return CouchbaseBucketAdapter::createConnection($dsn, $options); - } - - return CouchbaseCollectionAdapter::createConnection($dsn, $options); - } - - throw new InvalidArgumentException(sprintf('Unsupported DSN: "%s".', $dsn)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $this->namespace, $expiredIds, \Closure::fromCallable([$this, 'getId']), $this->defaultLifetime); - $retry = $this->deferred = []; - - if ($expiredIds) { - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $e = $this->doSave($values, $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $e = $this->doSave([$id => $v], $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php deleted file mode 100644 index a384b16..0000000 --- a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php +++ /dev/null @@ -1,330 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * Abstract for native TagAware adapters. - * - * To keep info on tags, the tags are both serialized as part of cache value and provided as tag ids - * to Adapters on operations when needed for storage to doSave(), doDelete() & doInvalidate(). - * - * @author Nicolas Grekas - * @author André Rømcke - * - * @internal - */ -abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - private const TAGS_PREFIX = "\0tags\0"; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':'; - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->isTaggable = true; - // If structure does not match what we expect return item as is (no value and not a hit) - if (!\is_array($value) || !\array_key_exists('value', $value)) { - return $item; - } - $item->isHit = $isHit; - // Extract value, tags and meta data from the cache value - $item->value = $value['value']; - $item->metadata[CacheItem::METADATA_TAGS] = $value['tags'] ?? []; - if (isset($value['meta'])) { - // For compactness these values are packed, & expiry is offset to reduce size - $v = unpack('Ve/Nc', $value['meta']); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ?? self::$mergeByLifetime = \Closure::bind( - static function ($deferred, &$expiredIds, $getId, $tagPrefix, $defaultLifetime) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - // Store Value and Tags on the cache value - if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) { - $value = ['value' => $item->value, 'tags' => $metadata[CacheItem::METADATA_TAGS]]; - unset($metadata[CacheItem::METADATA_TAGS]); - } else { - $value = ['value' => $item->value, 'tags' => []]; - } - - if ($metadata) { - // For compactness, expiry and creation duration are packed, using magic numbers as separators - $value['meta'] = pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME]); - } - - // Extract tag changes, these should be removed from values in doSave() - $value['tag-operations'] = ['add' => [], 'remove' => []]; - $oldTags = $item->metadata[CacheItem::METADATA_TAGS] ?? []; - foreach (array_diff($value['tags'], $oldTags) as $addedTag) { - $value['tag-operations']['add'][] = $getId($tagPrefix.$addedTag); - } - foreach (array_diff($oldTags, $value['tags']) as $removedTag) { - $value['tag-operations']['remove'][] = $getId($tagPrefix.$removedTag); - } - - $byLifetime[$ttl][$getId($key)] = $value; - $item->metadata = $item->newMetadata; - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * @param array[] $addTagData Hash where key is tag id, and array value is list of cache id's to add to tag - * @param array[] $removeTagData Hash where key is tag id, and array value is list of cache id's to remove to tag - * - * @return array The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array; - - /** - * Removes multiple items from the pool and their corresponding tags. - * - * @param array $ids An array of identifiers that should be removed from the pool - * - * @return bool - */ - abstract protected function doDelete(array $ids); - - /** - * Removes relations between tags and deleted items. - * - * @param array $tagData Array of tag => key identifiers that should be removed from the pool - */ - abstract protected function doDeleteTagRelations(array $tagData): bool; - - /** - * Invalidates cached items using tags. - * - * @param string[] $tagIds An array of tags to invalidate, key is tag and value is tag id - */ - abstract protected function doInvalidate(array $tagIds): bool; - - /** - * Delete items and yields the tags they were bound to. - */ - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($this->doFetch($ids) as $id => $value) { - yield $id => \is_array($value) && \is_array($value['tags'] ?? null) ? $value['tags'] : []; - } - - $this->doDelete($ids); - } - - /** - * {@inheritdoc} - */ - public function commit(): bool - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $expiredIds, \Closure::fromCallable([$this, 'getId']), self::TAGS_PREFIX, $this->defaultLifetime); - $retry = $this->deferred = []; - - if ($expiredIds) { - // Tags are not cleaned up in this case, however that is done on invalidateTags(). - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $values = $this->extractTagData($values, $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $values = $this->extractTagData([$id => $v], $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function deleteItems(array $keys): bool - { - if (!$keys) { - return true; - } - - $ok = true; - $ids = []; - $tagData = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - foreach ($this->doDeleteYieldTags(array_values($ids)) as $id => $tags) { - foreach ($tags as $tag) { - $tagData[$this->getId(self::TAGS_PREFIX.$tag)][] = $id; - } - } - } catch (\Exception $e) { - $ok = false; - } - - try { - if ((!$tagData || $this->doDeleteTagRelations($tagData)) && $ok) { - return true; - } - } catch (\Exception $e) { - } - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - if (empty($tags)) { - return false; - } - - $tagIds = []; - foreach (array_unique($tags) as $tag) { - $tagIds[] = $this->getId(self::TAGS_PREFIX.$tag); - } - - try { - if ($this->doInvalidate($tagIds)) { - return true; - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to invalidate tags: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return false; - } - - /** - * Extracts tags operation data from $values set in mergeByLifetime, and returns values without it. - */ - private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array - { - $addTagData = $removeTagData = []; - foreach ($values as $id => $value) { - foreach ($value['tag-operations']['add'] as $tag => $tagId) { - $addTagData[$tagId][] = $id; - } - - foreach ($value['tag-operations']['remove'] as $tag => $tagId) { - $removeTagData[$tagId][] = $id; - } - - unset($values[$id]['tag-operations']); - } - - return $values; - } -} diff --git a/vendor/symfony/cache/Adapter/AdapterInterface.php b/vendor/symfony/cache/Adapter/AdapterInterface.php deleted file mode 100644 index f8dce86..0000000 --- a/vendor/symfony/cache/Adapter/AdapterInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; - -// Help opcache.preload discover always-needed symbols -class_exists(CacheItem::class); - -/** - * Interface for adapters managing instances of Symfony's CacheItem. - * - * @author Kévin Dunglas - */ -interface AdapterInterface extends CacheItemPoolInterface -{ - /** - * {@inheritdoc} - * - * @return CacheItem - */ - public function getItem($key); - - /** - * {@inheritdoc} - * - * @return \Traversable - */ - public function getItems(array $keys = []); - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = ''); -} diff --git a/vendor/symfony/cache/Adapter/ApcuAdapter.php b/vendor/symfony/cache/Adapter/ApcuAdapter.php deleted file mode 100644 index 5fc8f62..0000000 --- a/vendor/symfony/cache/Adapter/ApcuAdapter.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Nicolas Grekas - */ -class ApcuAdapter extends AbstractAdapter -{ - private $marshaller; - - /** - * @throws CacheException if APCu is not enabled - */ - public function __construct(string $namespace = '', int $defaultLifetime = 0, string $version = null, MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('APCu is not enabled.'); - } - if ('cli' === \PHP_SAPI) { - ini_set('apc.use_request_time', 0); - } - parent::__construct($namespace, $defaultLifetime); - - if (null !== $version) { - CacheItem::validateKey($version); - - if (!apcu_exists($version.'@'.$namespace)) { - $this->doClear($namespace); - apcu_add($version.'@'.$namespace, null); - } - } - - $this->marshaller = $marshaller; - } - - public static function isSupported() - { - return \function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - $values = []; - $ids = array_flip($ids); - foreach (apcu_fetch(array_keys($ids), $ok) ?: [] as $k => $v) { - if (!isset($ids[$k])) { - // work around https://github.com/krakjoe/apcu/issues/247 - $k = key($ids); - } - unset($ids[$k]); - - if (null !== $v || $ok) { - $values[$k] = null !== $this->marshaller ? $this->marshaller->unmarshall($v) : $v; - } - } - - return $values; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return apcu_exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return isset($namespace[0]) && class_exists(\APCuIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) - ? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) - : apcu_clear_cache(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - foreach ($ids as $id) { - apcu_delete($id); - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (null !== $this->marshaller && (!$values = $this->marshaller->marshall($values, $failed))) { - return $failed; - } - - try { - if (false === $failures = apcu_store($values, null, $lifetime)) { - $failures = $values; - } - - return array_keys($failures); - } catch (\Throwable $e) { - if (1 === \count($values)) { - // Workaround https://github.com/krakjoe/apcu/issues/170 - apcu_delete(array_key_first($values)); - } - - throw $e; - } - } -} diff --git a/vendor/symfony/cache/Adapter/ArrayAdapter.php b/vendor/symfony/cache/Adapter/ArrayAdapter.php deleted file mode 100644 index bd5ec9e..0000000 --- a/vendor/symfony/cache/Adapter/ArrayAdapter.php +++ /dev/null @@ -1,404 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * An in-memory cache storage. - * - * Acts as a least-recently-used (LRU) storage when configured with a maximum number of items. - * - * @author Nicolas Grekas - */ -class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface -{ - use LoggerAwareTrait; - - private $storeSerialized; - private $values = []; - private $expiries = []; - private $defaultLifetime; - private $maxLifetime; - private $maxItems; - - private static $createCacheItem; - - /** - * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise - */ - public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true, float $maxLifetime = 0, int $maxItems = 0) - { - if (0 > $maxLifetime) { - throw new InvalidArgumentException(sprintf('Argument $maxLifetime must be positive, %F passed.', $maxLifetime)); - } - - if (0 > $maxItems) { - throw new InvalidArgumentException(sprintf('Argument $maxItems must be a positive integer, %d passed.', $maxItems)); - } - - $this->defaultLifetime = $defaultLifetime; - $this->storeSerialized = $storeSerialized; - $this->maxLifetime = $maxLifetime; - $this->maxItems = $maxItems; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - $item = $this->getItem($key); - $metadata = $item->getMetadata(); - - // ArrayAdapter works in memory, we don't care about stampede protection - if (\INF === $beta || !$item->isHit()) { - $save = true; - $this->save($item->set($callback($item, $save))); - } - - return $item->get(); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - return true; - } - \assert('' !== CacheItem::validateKey($key)); - - return isset($this->expiries[$key]) && !$this->deleteItem($key); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - if (!$isHit = $this->hasItem($key)) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - - return (self::$createCacheItem)($key, $value, $isHit); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - \assert(self::validateKeys($keys)); - - return $this->generateItems($keys, microtime(true), self::$createCacheItem); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - \assert('' !== CacheItem::validateKey($key)); - unset($this->values[$key], $this->expiries[$key]); - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - foreach ($keys as $key) { - $this->deleteItem($key); - } - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $item = (array) $item; - $key = $item["\0*\0key"]; - $value = $item["\0*\0value"]; - $expiry = $item["\0*\0expiry"]; - - $now = microtime(true); - - if (null !== $expiry) { - if (!$expiry) { - $expiry = \PHP_INT_MAX; - } elseif ($expiry <= $now) { - $this->deleteItem($key); - - return true; - } - } - if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) { - return false; - } - if (null === $expiry && 0 < $this->defaultLifetime) { - $expiry = $this->defaultLifetime; - $expiry = $now + ($expiry > ($this->maxLifetime ?: $expiry) ? $this->maxLifetime : $expiry); - } elseif ($this->maxLifetime && (null === $expiry || $expiry > $now + $this->maxLifetime)) { - $expiry = $now + $this->maxLifetime; - } - - if ($this->maxItems) { - unset($this->values[$key]); - - // Iterate items and vacuum expired ones while we are at it - foreach ($this->values as $k => $v) { - if ($this->expiries[$k] > $now && \count($this->values) < $this->maxItems) { - break; - } - - unset($this->values[$k], $this->expiries[$k]); - } - } - - $this->values[$key] = $value; - $this->expiries[$key] = $expiry ?? \PHP_INT_MAX; - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return $this->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ('' !== $prefix) { - $now = microtime(true); - - foreach ($this->values as $key => $value) { - if (!isset($this->expiries[$key]) || $this->expiries[$key] <= $now || 0 === strpos($key, $prefix)) { - unset($this->values[$key], $this->expiries[$key]); - } - } - - if ($this->values) { - return true; - } - } - - $this->values = $this->expiries = []; - - return true; - } - - /** - * Returns all cached values, with cache miss as null. - * - * @return array - */ - public function getValues() - { - if (!$this->storeSerialized) { - return $this->values; - } - - $values = $this->values; - foreach ($values as $k => $v) { - if (null === $v || 'N;' === $v) { - continue; - } - if (!\is_string($v) || !isset($v[2]) || ':' !== $v[1]) { - $values[$k] = serialize($v); - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->clear(); - } - - private function generateItems(array $keys, float $now, \Closure $f): \Generator - { - foreach ($keys as $i => $key) { - if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > $now || !$this->deleteItem($key))) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - unset($keys[$i]); - - yield $key => $f($key, $value, $isHit); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - private function freeze($value, string $key) - { - if (null === $value) { - return 'N;'; - } - if (\is_string($value)) { - // Serialize strings if they could be confused with serialized objects or arrays - if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) { - return serialize($value); - } - } elseif (!is_scalar($value)) { - try { - $serialized = serialize($value); - } catch (\Exception $e) { - unset($this->values[$key]); - $type = get_debug_type($value); - $message = sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage()); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return; - } - // Keep value serialized if it contains any objects or any internal references - if ('C' === $serialized[0] || 'O' === $serialized[0] || preg_match('/;[OCRr]:[1-9]/', $serialized)) { - return $serialized; - } - } - - return $value; - } - - private function unfreeze(string $key, bool &$isHit) - { - if ('N;' === $value = $this->values[$key]) { - return null; - } - if (\is_string($value) && isset($value[2]) && ':' === $value[1]) { - try { - $value = unserialize($value); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to unserialize key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $value = false; - } - if (false === $value) { - $value = null; - $isHit = false; - - if (!$this->maxItems) { - $this->values[$key] = null; - } - } - } - - return $value; - } - - private function validateKeys(array $keys): bool - { - foreach ($keys as $key) { - if (!\is_string($key) || !isset($this->expiries[$key])) { - CacheItem::validateKey($key); - } - } - - return true; - } -} diff --git a/vendor/symfony/cache/Adapter/ChainAdapter.php b/vendor/symfony/cache/Adapter/ChainAdapter.php deleted file mode 100644 index 5680697..0000000 --- a/vendor/symfony/cache/Adapter/ChainAdapter.php +++ /dev/null @@ -1,333 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Chains several adapters together. - * - * Cached items are fetched from the first adapter having them in its data store. - * They are saved and deleted in all adapters at once. - * - * @author Kévin Dunglas - */ -class ChainAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - - private $adapters = []; - private $adapterCount; - private $defaultLifetime; - - private static $syncItem; - - /** - * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items - * @param int $defaultLifetime The default lifetime of items propagated from lower adapters to upper ones - */ - public function __construct(array $adapters, int $defaultLifetime = 0) - { - if (!$adapters) { - throw new InvalidArgumentException('At least one adapter must be specified.'); - } - - foreach ($adapters as $adapter) { - if (!$adapter instanceof CacheItemPoolInterface) { - throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); - } - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - continue; // skip putting APCu in the chain when the backend is disabled - } - - if ($adapter instanceof AdapterInterface) { - $this->adapters[] = $adapter; - } else { - $this->adapters[] = new ProxyAdapter($adapter); - } - } - $this->adapterCount = \count($this->adapters); - $this->defaultLifetime = $defaultLifetime; - - self::$syncItem ?? self::$syncItem = \Closure::bind( - static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) { - $sourceItem->isTaggable = false; - $sourceMetadata = $sourceMetadata ?? $sourceItem->metadata; - unset($sourceMetadata[CacheItem::METADATA_TAGS]); - - $item->value = $sourceItem->value; - $item->isHit = $sourceItem->isHit; - $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata; - - if (isset($item->metadata[CacheItem::METADATA_EXPIRY])) { - $item->expiresAt(\DateTime::createFromFormat('U.u', sprintf('%.6F', $item->metadata[CacheItem::METADATA_EXPIRY]))); - } elseif (0 < $defaultLifetime) { - $item->expiresAfter($defaultLifetime); - } - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - $lastItem = null; - $i = 0; - $wrap = function (CacheItem $item = null) use ($key, $callback, $beta, &$wrap, &$i, &$lastItem, &$metadata) { - $adapter = $this->adapters[$i]; - if (isset($this->adapters[++$i])) { - $callback = $wrap; - $beta = \INF === $beta ? \INF : 0; - } - if ($adapter instanceof CacheInterface) { - $value = $adapter->get($key, $callback, $beta, $metadata); - } else { - $value = $this->doGet($adapter, $key, $callback, $beta, $metadata); - } - if (null !== $item) { - (self::$syncItem)($lastItem = $lastItem ?? $item, $item, $this->defaultLifetime, $metadata); - } - - return $value; - }; - - return $wrap(); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $syncItem = self::$syncItem; - $misses = []; - - foreach ($this->adapters as $i => $adapter) { - $item = $adapter->getItem($key); - - if ($item->isHit()) { - while (0 <= --$i) { - $this->adapters[$i]->save($syncItem($item, $misses[$i], $this->defaultLifetime)); - } - - return $item; - } - - $misses[$i] = $item; - } - - return $item; - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - return $this->generateItems($this->adapters[0]->getItems($keys), 0); - } - - private function generateItems(iterable $items, int $adapterIndex): \Generator - { - $missing = []; - $misses = []; - $nextAdapterIndex = $adapterIndex + 1; - $nextAdapter = $this->adapters[$nextAdapterIndex] ?? null; - - foreach ($items as $k => $item) { - if (!$nextAdapter || $item->isHit()) { - yield $k => $item; - } else { - $missing[] = $k; - $misses[$k] = $item; - } - } - - if ($missing) { - $syncItem = self::$syncItem; - $adapter = $this->adapters[$adapterIndex]; - $items = $this->generateItems($nextAdapter->getItems($missing), $nextAdapterIndex); - - foreach ($items as $k => $item) { - if ($item->isHit()) { - $adapter->save($syncItem($item, $misses[$k], $this->defaultLifetime)); - } - - yield $k => $item; - } - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - foreach ($this->adapters as $adapter) { - if ($adapter->hasItem($key)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $cleared = true; - $i = $this->adapterCount; - - while ($i--) { - if ($this->adapters[$i] instanceof AdapterInterface) { - $cleared = $this->adapters[$i]->clear($prefix) && $cleared; - } else { - $cleared = $this->adapters[$i]->clear() && $cleared; - } - } - - return $cleared; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItem($key) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItems($keys) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->save($item) && $saved; - } - - return $saved; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->saveDeferred($item) && $saved; - } - - return $saved; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $committed = true; - $i = $this->adapterCount; - - while ($i--) { - $committed = $this->adapters[$i]->commit() && $committed; - } - - return $committed; - } - - /** - * {@inheritdoc} - */ - public function prune() - { - $pruned = true; - - foreach ($this->adapters as $adapter) { - if ($adapter instanceof PruneableInterface) { - $pruned = $adapter->prune() && $pruned; - } - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - foreach ($this->adapters as $adapter) { - if ($adapter instanceof ResetInterface) { - $adapter->reset(); - } - } - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php deleted file mode 100644 index 36d5249..0000000 --- a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Antonio Jose Cerezo Aranda - */ -class CouchbaseBucketAdapter extends AbstractAdapter -{ - private const THIRTY_DAYS_IN_SECONDS = 2592000; - private const MAX_KEY_LENGTH = 250; - private const KEY_NOT_FOUND = 13; - private const VALID_DSN_OPTIONS = [ - 'operationTimeout', - 'configTimeout', - 'configNodeTimeout', - 'n1qlTimeout', - 'httpTimeout', - 'configDelay', - 'htconfigIdleTimeout', - 'durabilityInterval', - 'durabilityTimeout', - ]; - - private $bucket; - private $marshaller; - - public function __construct(\CouchbaseBucket $bucket, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - $this->bucket = $bucket; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * @param array|string $servers - */ - public static function createConnection($servers, array $options = []): \CouchbaseBucket - { - if (\is_string($servers)) { - $servers = [$servers]; - } elseif (!\is_array($servers)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($servers))); - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); }); - - $dsnPattern = '/^(?couchbase(?:s)?)\:\/\/(?:(?[^\:]+)\:(?[^\@]{6,})@)?' - .'(?[^\:]+(?:\:\d+)?)(?:\/(?[^\?]+))(?:\?(?.*))?$/i'; - - $newServers = []; - $protocol = 'couchbase'; - try { - $options = self::initOptions($options); - $username = $options['username']; - $password = $options['password']; - - foreach ($servers as $dsn) { - if (0 !== strpos($dsn, 'couchbase:')) { - throw new InvalidArgumentException(sprintf('Invalid Couchbase DSN: "%s" does not start with "couchbase:".', $dsn)); - } - - preg_match($dsnPattern, $dsn, $matches); - - $username = $matches['username'] ?: $username; - $password = $matches['password'] ?: $password; - $protocol = $matches['protocol'] ?: $protocol; - - if (isset($matches['options'])) { - $optionsInDsn = self::getOptions($matches['options']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $matches['host']; - } - - $connectionString = $protocol.'://'.implode(',', $newServers); - - $client = new \CouchbaseCluster($connectionString); - $client->authenticateAs($username, $password); - - $bucket = $client->openBucket($matches['bucketName']); - - unset($options['username'], $options['password']); - foreach ($options as $option => $value) { - if (!empty($value)) { - $bucket->$option = $value; - } - } - - return $bucket; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '2.6.0', '>=') && version_compare(phpversion('couchbase'), '3.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - if (\in_array($key, static::VALID_DSN_OPTIONS, true)) { - $results[$key] = $value; - } - } - - return $results; - } - - private static function initOptions(array $options): array - { - $options['username'] = $options['username'] ?? ''; - $options['password'] = $options['password'] ?? ''; - $options['operationTimeout'] = $options['operationTimeout'] ?? 0; - $options['configTimeout'] = $options['configTimeout'] ?? 0; - $options['configNodeTimeout'] = $options['configNodeTimeout'] ?? 0; - $options['n1qlTimeout'] = $options['n1qlTimeout'] ?? 0; - $options['httpTimeout'] = $options['httpTimeout'] ?? 0; - $options['configDelay'] = $options['configDelay'] ?? 0; - $options['htconfigIdleTimeout'] = $options['htconfigIdleTimeout'] ?? 0; - $options['durabilityInterval'] = $options['durabilityInterval'] ?? 0; - $options['durabilityTimeout'] = $options['durabilityTimeout'] ?? 0; - - return $options; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $resultsCouchbase = $this->bucket->get($ids); - - $results = []; - foreach ($resultsCouchbase as $key => $value) { - if (null !== $value->error) { - continue; - } - $results[$key] = $this->marshaller->unmarshall($value->value); - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id): bool - { - return false !== $this->bucket->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - $this->bucket->manager()->flush(); - - return true; - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $results = $this->bucket->remove(array_values($ids)); - - foreach ($results as $key => $result) { - if (null !== $result->error && static::KEY_NOT_FOUND !== $result->error->getCode()) { - continue; - } - unset($results[$key]); - } - - return 0 === \count($results); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $lifetime = $this->normalizeExpiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - $result = $this->bucket->upsert($key, $value, ['expiry' => $lifetime]); - - if (null !== $result->error) { - $ko[$key] = $result; - } - } - - return [] === $ko ? true : $ko; - } - - private function normalizeExpiry(int $expiry): int - { - if ($expiry && $expiry > static::THIRTY_DAYS_IN_SECONDS) { - $expiry += time(); - } - - return $expiry; - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php deleted file mode 100644 index 79f6485..0000000 --- a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Couchbase\Bucket; -use Couchbase\Cluster; -use Couchbase\ClusterOptions; -use Couchbase\Collection; -use Couchbase\DocumentNotFoundException; -use Couchbase\UpsertOptions; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Antonio Jose Cerezo Aranda - */ -class CouchbaseCollectionAdapter extends AbstractAdapter -{ - private const MAX_KEY_LENGTH = 250; - - /** @var Collection */ - private $connection; - private $marshaller; - - public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - $this->connection = $connection; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * @param array|string $dsn - * - * @return Bucket|Collection - */ - public static function createConnection($dsn, array $options = []) - { - if (\is_string($dsn)) { - $dsn = [$dsn]; - } elseif (!\is_array($dsn)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($dsn))); - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); - } - - set_error_handler(function ($type, $msg, $file, $line): bool { throw new \ErrorException($msg, 0, $type, $file, $line); }); - - $dsnPattern = '/^(?couchbase(?:s)?)\:\/\/(?:(?[^\:]+)\:(?[^\@]{6,})@)?' - .'(?[^\:]+(?:\:\d+)?)(?:\/(?[^\/\?]+))(?:(?:\/(?[^\/]+))' - .'(?:\/(?[^\/\?]+)))?(?:\/)?(?:\?(?.*))?$/i'; - - $newServers = []; - $protocol = 'couchbase'; - try { - $username = $options['username'] ?? ''; - $password = $options['password'] ?? ''; - - foreach ($dsn as $server) { - if (0 !== strpos($server, 'couchbase:')) { - throw new InvalidArgumentException(sprintf('Invalid Couchbase DSN: "%s" does not start with "couchbase:".', $server)); - } - - preg_match($dsnPattern, $server, $matches); - - $username = $matches['username'] ?: $username; - $password = $matches['password'] ?: $password; - $protocol = $matches['protocol'] ?: $protocol; - - if (isset($matches['options'])) { - $optionsInDsn = self::getOptions($matches['options']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $matches['host']; - } - - $option = isset($matches['options']) ? '?'.$matches['options'] : ''; - $connectionString = $protocol.'://'.implode(',', $newServers).$option; - - $clusterOptions = new ClusterOptions(); - $clusterOptions->credentials($username, $password); - - $client = new Cluster($connectionString, $clusterOptions); - - $bucket = $client->bucket($matches['bucketName']); - $collection = $bucket->defaultCollection(); - if (!empty($matches['scopeName'])) { - $scope = $bucket->scope($matches['scopeName']); - $collection = $scope->collection($matches['collectionName']); - } - - return $collection; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '3.0.5', '>=') && version_compare(phpversion('couchbase'), '4.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - $results[$key] = $value; - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids): array - { - $results = []; - foreach ($ids as $id) { - try { - $resultCouchbase = $this->connection->get($id); - } catch (DocumentNotFoundException $exception) { - continue; - } - - $content = $resultCouchbase->value ?? $resultCouchbase->content(); - - $results[$id] = $this->marshaller->unmarshall($content); - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doHave($id): bool - { - return $this->connection->exists($id)->exists(); - } - - /** - * {@inheritdoc} - */ - protected function doClear($namespace): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $idsErrors = []; - foreach ($ids as $id) { - try { - $result = $this->connection->remove($id); - - if (null === $result->mutationToken()) { - $idsErrors[] = $id; - } - } catch (DocumentNotFoundException $exception) { - } - } - - return 0 === \count($idsErrors); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $upsertOptions = new UpsertOptions(); - $upsertOptions->expiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - try { - $this->connection->upsert($key, $value, $upsertOptions); - } catch (\Exception $exception) { - $ko[$key] = ''; - } - } - - return [] === $ko ? true : $ko; - } -} diff --git a/vendor/symfony/cache/Adapter/DoctrineAdapter.php b/vendor/symfony/cache/Adapter/DoctrineAdapter.php deleted file mode 100644 index efa30c8..0000000 --- a/vendor/symfony/cache/Adapter/DoctrineAdapter.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\Common\Cache\CacheProvider; -use Doctrine\Common\Cache\Psr6\CacheAdapter; - -/** - * @author Nicolas Grekas - * - * @deprecated Since Symfony 5.4, use Doctrine\Common\Cache\Psr6\CacheAdapter instead - */ -class DoctrineAdapter extends AbstractAdapter -{ - private $provider; - - public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0) - { - trigger_deprecation('symfony/cache', '5.4', '"%s" is deprecated, use "%s" instead.', __CLASS__, CacheAdapter::class); - - parent::__construct('', $defaultLifetime); - $this->provider = $provider; - $provider->setNamespace($namespace); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - parent::reset(); - $this->provider->setNamespace($this->provider->getNamespace()); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $unserializeCallbackHandler = ini_set('unserialize_callback_func', parent::class.'::handleUnserializeCallback'); - try { - return $this->provider->fetchMultiple($ids); - } catch (\Error $e) { - $trace = $e->getTrace(); - - if (isset($trace[0]['function']) && !isset($trace[0]['class'])) { - switch ($trace[0]['function']) { - case 'unserialize': - case 'apcu_fetch': - case 'apc_fetch': - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - } - - throw $e; - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return $this->provider->contains($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $namespace = $this->provider->getNamespace(); - - return isset($namespace[0]) - ? $this->provider->deleteAll() - : $this->provider->flushAll(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - foreach ($ids as $id) { - $ok = $this->provider->delete($id) && $ok; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - return $this->provider->saveMultiple($values, $lifetime); - } -} diff --git a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php b/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php deleted file mode 100644 index 73f0ea6..0000000 --- a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php +++ /dev/null @@ -1,397 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\ServerInfoAwareConnection; -use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\Exception\TableNotFoundException; -use Doctrine\DBAL\ParameterType; -use Doctrine\DBAL\Schema\Schema; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface -{ - protected $maxIdLength = 255; - - private $marshaller; - private $conn; - private $platformName; - private $serverVersion; - private $table = 'cache_items'; - private $idCol = 'item_id'; - private $dataCol = 'item_data'; - private $lifetimeCol = 'item_lifetime'; - private $timeCol = 'item_time'; - private $namespace; - - /** - * You can either pass an existing database Doctrine DBAL Connection or - * a DSN string that will be used to connect to the database. - * - * The cache table is created automatically when possible. - * Otherwise, use the createTable() method. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * - * @param Connection|string $connOrDsn - * - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], MarshallerInterface $marshaller = null) - { - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof Connection) { - $this->conn = $connOrDsn; - } elseif (\is_string($connOrDsn)) { - if (!class_exists(DriverManager::class)) { - throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $connOrDsn)); - } - $this->conn = DriverManager::getConnection(['url' => $connOrDsn]); - } else { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', __METHOD__, Connection::class, get_debug_type($connOrDsn))); - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->namespace = $namespace; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws DBALException When the table already exists - */ - public function createTable() - { - $schema = new Schema(); - $this->addTableToSchema($schema); - - foreach ($schema->toSql($this->conn->getDatabasePlatform()) as $sql) { - $this->conn->executeStatement($sql); - } - } - - /** - * {@inheritdoc} - */ - public function configureSchema(Schema $schema, Connection $forConnection): void - { - // only update the schema for this connection - if ($forConnection !== $this->conn) { - return; - } - - if ($schema->hasTable($this->table)) { - return; - } - - $this->addTableToSchema($schema); - } - - /** - * {@inheritdoc} - */ - public function prune(): bool - { - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ?"; - $params = [time()]; - $paramTypes = [ParameterType::INTEGER]; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE ?"; - $params[] = sprintf('%s%%', $this->namespace); - $paramTypes[] = ParameterType::STRING; - } - - try { - $this->conn->executeStatement($deleteSql, $params, $paramTypes); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids): iterable - { - $now = time(); - $expired = []; - - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN (?)"; - $result = $this->conn->executeQuery($sql, [ - $now, - $ids, - ], [ - ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, - ])->iterateNumeric(); - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN (?)"; - $this->conn->executeStatement($sql, [ - $now, - $expired, - ], [ - ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, - ]); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id): bool - { - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = ? AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ?)"; - $result = $this->conn->executeQuery($sql, [ - $id, - time(), - ], [ - ParameterType::STRING, - ParameterType::INTEGER, - ]); - - return (bool) $result->fetchOne(); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - if ('sqlite' === $this->getPlatformName()) { - $sql = "DELETE FROM $this->table"; - } else { - $sql = "TRUNCATE TABLE $this->table"; - } - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $this->conn->executeStatement($sql); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; - try { - $this->conn->executeStatement($sql, [array_values($ids)], [Connection::PARAM_STR_ARRAY]); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $platformName = $this->getPlatformName(); - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?)"; - - switch (true) { - case 'mysql' === $platformName: - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci' === $platformName: - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv' === $platformName && version_compare($this->getServerVersion(), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $platformName: - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql' === $platformName && version_compare($this->getServerVersion(), '9.5', '>='): - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $platformName = null; - $sql = "UPDATE $this->table SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ? WHERE $this->idCol = ?"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $this->conn->prepare($sql); - } catch (TableNotFoundException $e) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $stmt = $this->conn->prepare($sql); - } - - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. - if ('sqlsrv' === $platformName || 'oci' === $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(4, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(5, $now, ParameterType::INTEGER); - $stmt->bindParam(6, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(7, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(8, $now, ParameterType::INTEGER); - } elseif (null !== $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(4, $now, ParameterType::INTEGER); - } else { - $stmt->bindParam(1, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(2, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(3, $now, ParameterType::INTEGER); - $stmt->bindParam(4, $id); - - $insertStmt = $this->conn->prepare($insertSql); - $insertStmt->bindParam(1, $id); - $insertStmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); - $insertStmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $insertStmt->bindValue(4, $now, ParameterType::INTEGER); - } - - foreach ($values as $id => $data) { - try { - $rowCount = $stmt->executeStatement(); - } catch (TableNotFoundException $e) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $rowCount = $stmt->executeStatement(); - } - if (null === $platformName && 0 === $rowCount) { - try { - $insertStmt->executeStatement(); - } catch (DBALException $e) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - private function getPlatformName(): string - { - if (isset($this->platformName)) { - return $this->platformName; - } - - $platform = $this->conn->getDatabasePlatform(); - - switch (true) { - case $platform instanceof \Doctrine\DBAL\Platforms\MySQLPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\MySQL57Platform: - return $this->platformName = 'mysql'; - - case $platform instanceof \Doctrine\DBAL\Platforms\SqlitePlatform: - return $this->platformName = 'sqlite'; - - case $platform instanceof \Doctrine\DBAL\Platforms\PostgreSQLPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\PostgreSQL94Platform: - return $this->platformName = 'pgsql'; - - case $platform instanceof \Doctrine\DBAL\Platforms\OraclePlatform: - return $this->platformName = 'oci'; - - case $platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\SQLServer2012Platform: - return $this->platformName = 'sqlsrv'; - - default: - return $this->platformName = \get_class($platform); - } - } - - private function getServerVersion(): string - { - if (isset($this->serverVersion)) { - return $this->serverVersion; - } - - $conn = $this->conn->getWrappedConnection(); - if ($conn instanceof ServerInfoAwareConnection) { - return $this->serverVersion = $conn->getServerVersion(); - } - - return $this->serverVersion = '0'; - } - - private function addTableToSchema(Schema $schema): void - { - $types = [ - 'mysql' => 'binary', - 'sqlite' => 'text', - ]; - - $table = $schema->createTable($this->table); - $table->addColumn($this->idCol, $types[$this->getPlatformName()] ?? 'string', ['length' => 255]); - $table->addColumn($this->dataCol, 'blob', ['length' => 16777215]); - $table->addColumn($this->lifetimeCol, 'integer', ['unsigned' => true, 'notnull' => false]); - $table->addColumn($this->timeCol, 'integer', ['unsigned' => true]); - $table->setPrimaryKey([$this->idCol]); - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemAdapter.php b/vendor/symfony/cache/Adapter/FilesystemAdapter.php deleted file mode 100644 index 7185dd4..0000000 --- a/vendor/symfony/cache/Adapter/FilesystemAdapter.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -class FilesystemAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemTrait; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php b/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php deleted file mode 100644 index afde843..0000000 --- a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -/** - * Stores tag id <> cache id relationship as a symlink, and lookup on invalidation calls. - * - * @author Nicolas Grekas - * @author André Rømcke - */ -class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements PruneableInterface -{ - use FilesystemTrait { - doClear as private doClearCache; - doSave as private doSaveCache; - } - - /** - * Folder used for tag symlinks. - */ - private const TAG_FOLDER = 'tags'; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, MarshallerInterface $marshaller = null) - { - $this->marshaller = new TagAwareMarshaller($marshaller); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $ok = $this->doClearCache($namespace); - - if ('' !== $namespace) { - return $ok; - } - - set_error_handler(static function () {}); - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - try { - foreach ($this->scanHashDir($this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR) as $dir) { - if (rename($dir, $renamed = substr_replace($dir, bin2hex(random_bytes(4)), -8))) { - $dir = $renamed.\DIRECTORY_SEPARATOR; - } else { - $dir .= \DIRECTORY_SEPARATOR; - $renamed = null; - } - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($dir.$chars[$i])) { - continue; - } - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($d = $dir.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - foreach (scandir($d, \SCANDIR_SORT_NONE) ?: [] as $link) { - if ('.' !== $link && '..' !== $link && (null !== $renamed || !realpath($d.\DIRECTORY_SEPARATOR.$link))) { - unlink($d.\DIRECTORY_SEPARATOR.$link); - } - } - null === $renamed ?: rmdir($d); - } - null === $renamed ?: rmdir($dir.$chars[$i]); - } - null === $renamed ?: rmdir($renamed); - } - } finally { - restore_error_handler(); - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array - { - $failed = $this->doSaveCache($values, $lifetime); - - // Add Tags as symlinks - foreach ($addTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - $file = $this->getFile($id); - - if (!@symlink($file, $tagLink = $this->getFile($id, true, $tagFolder)) && !is_link($tagLink)) { - @unlink($file); - $failed[] = $id; - } - } - } - - // Unlink removed Tags - foreach ($removeTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return $failed; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - - if ((\PHP_VERSION_ID >= 70300 || '\\' !== \DIRECTORY_SEPARATOR) && !@unlink($file)) { - fclose($h); - continue; - } - - $meta = explode("\n", fread($h, 4096), 3)[2] ?? ''; - - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 < \strlen($meta) && "\x9D" === $meta[0] && "\0" === $meta[5] && "\x5F" === $meta[9]) { - $meta[9] = "\0"; - $tagLen = unpack('Nlen', $meta, 9)['len']; - $meta = substr($meta, 13, $tagLen); - - if (0 < $tagLen -= \strlen($meta)) { - $meta .= fread($h, $tagLen); - } - - try { - yield $id => '' === $meta ? [] : $this->marshaller->unmarshall($meta); - } catch (\Exception $e) { - yield $id => []; - } - } - - fclose($h); - - if (\PHP_VERSION_ID < 70300 && '\\' === \DIRECTORY_SEPARATOR) { - @unlink($file); - } - } - } - - /** - * {@inheritdoc} - */ - protected function doDeleteTagRelations(array $tagData): bool - { - foreach ($tagData as $tagId => $idList) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($idList as $id) { - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doInvalidate(array $tagIds): bool - { - foreach ($tagIds as $tagId) { - if (!is_dir($tagFolder = $this->getTagFolder($tagId))) { - continue; - } - - set_error_handler(static function () {}); - - try { - if (rename($tagFolder, $renamed = substr_replace($tagFolder, bin2hex(random_bytes(4)), -9))) { - $tagFolder = $renamed.\DIRECTORY_SEPARATOR; - } else { - $renamed = null; - } - - foreach ($this->scanHashDir($tagFolder) as $itemLink) { - unlink(realpath($itemLink) ?: $itemLink); - unlink($itemLink); - } - - if (null === $renamed) { - continue; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - for ($j = 0; $j < 38; ++$j) { - rmdir($tagFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]); - } - rmdir($tagFolder.$chars[$i]); - } - rmdir($renamed); - } finally { - restore_error_handler(); - } - } - - return true; - } - - private function getTagFolder(string $tagId): string - { - return $this->getFile($tagId, false, $this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR; - } -} diff --git a/vendor/symfony/cache/Adapter/MemcachedAdapter.php b/vendor/symfony/cache/Adapter/MemcachedAdapter.php deleted file mode 100644 index 5c2933f..0000000 --- a/vendor/symfony/cache/Adapter/MemcachedAdapter.php +++ /dev/null @@ -1,353 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Rob Frawley 2nd - * @author Nicolas Grekas - */ -class MemcachedAdapter extends AbstractAdapter -{ - /** - * We are replacing characters that are illegal in Memcached keys with reserved characters from - * {@see \Symfony\Contracts\Cache\ItemInterface::RESERVED_CHARACTERS} that are legal in Memcached. - * Note: don’t use {@see \Symfony\Component\Cache\Adapter\AbstractAdapter::NS_SEPARATOR}. - */ - private const RESERVED_MEMCACHED = " \n\r\t\v\f\0"; - private const RESERVED_PSR6 = '@()\{}/'; - - protected $maxIdLength = 250; - - private const DEFAULT_CLIENT_OPTIONS = [ - 'persistent_id' => null, - 'username' => null, - 'password' => null, - \Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP, - ]; - - private $marshaller; - private $client; - private $lazyClient; - - /** - * Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged. - * Using a RedisAdapter is recommended instead. If you cannot do otherwise, be aware that: - * - the Memcached::OPT_BINARY_PROTOCOL must be enabled - * (that's the default when using MemcachedAdapter::createConnection()); - * - tags eviction by Memcached's LRU algorithm will break by-tags invalidation; - * your Memcached memory should be large enough to never trigger LRU. - * - * Using a MemcachedAdapter as a pure items store is fine. - */ - public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Memcached '.(\PHP_VERSION_ID >= 80100 ? '> 3.1.5' : '>= 2.2.0').' is required.'); - } - if ('Memcached' === \get_class($client)) { - $opt = $client->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - $this->maxIdLength -= \strlen($client->getOption(\Memcached::OPT_PREFIX_KEY)); - $this->client = $client; - } else { - $this->lazyClient = $client; - } - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function isSupported() - { - return \extension_loaded('memcached') && version_compare(phpversion('memcached'), \PHP_VERSION_ID >= 80100 ? '3.1.6' : '2.2.0', '>='); - } - - /** - * Creates a Memcached instance. - * - * By default, the binary protocol, no block, and libketama compatible options are enabled. - * - * Examples for servers: - * - 'memcached://user:pass@localhost?weight=33' - * - [['localhost', 11211, 33]] - * - * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs - * - * @return \Memcached - * - * @throws \ErrorException When invalid options or servers are provided - */ - public static function createConnection($servers, array $options = []) - { - if (\is_string($servers)) { - $servers = [$servers]; - } elseif (!\is_array($servers)) { - throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, "%s" given.', get_debug_type($servers))); - } - if (!static::isSupported()) { - throw new CacheException('Memcached '.(\PHP_VERSION_ID >= 80100 ? '> 3.1.5' : '>= 2.2.0').' is required.'); - } - set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); }); - try { - $options += static::DEFAULT_CLIENT_OPTIONS; - $client = new \Memcached($options['persistent_id']); - $username = $options['username']; - $password = $options['password']; - - // parse any DSN in $servers - foreach ($servers as $i => $dsn) { - if (\is_array($dsn)) { - continue; - } - if (!str_starts_with($dsn, 'memcached:')) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: "%s" does not start with "memcached:".', $dsn)); - } - $params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) { - if (!empty($m[2])) { - [$username, $password] = explode(':', $m[2], 2) + [1 => null]; - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: "%s".', $dsn)); - } - $query = $hosts = []; - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: "%s".', $dsn)); - } - foreach ($hosts as $host => $weight) { - if (false === $port = strrpos($host, ':')) { - $hosts[$host] = [$host, 11211, (int) $weight]; - } else { - $hosts[$host] = [substr($host, 0, $port), (int) substr($host, 1 + $port), (int) $weight]; - } - } - $hosts = array_values($hosts); - unset($query['host']); - } - if ($hosts && !isset($params['host']) && !isset($params['path'])) { - unset($servers[$i]); - $servers = array_merge($servers, $hosts); - continue; - } - } - if (!isset($params['host']) && !isset($params['path'])) { - throw new InvalidArgumentException(sprintf('Invalid Memcached DSN: "%s".', $dsn)); - } - if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) { - $params['weight'] = $m[1]; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } - $params += [ - 'host' => $params['host'] ?? $params['path'], - 'port' => isset($params['host']) ? 11211 : null, - 'weight' => 0, - ]; - if ($query) { - $params += $query; - $options = $query + $options; - } - - $servers[$i] = [$params['host'], $params['port'], $params['weight']]; - - if ($hosts) { - $servers = array_merge($servers, $hosts); - } - } - - // set client's options - unset($options['persistent_id'], $options['username'], $options['password'], $options['weight'], $options['lazy']); - $options = array_change_key_case($options, \CASE_UPPER); - $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); - $client->setOption(\Memcached::OPT_NO_BLOCK, true); - $client->setOption(\Memcached::OPT_TCP_NODELAY, true); - if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) { - $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true); - } - foreach ($options as $name => $value) { - if (\is_int($name)) { - continue; - } - if ('HASH' === $name || 'SERIALIZER' === $name || 'DISTRIBUTION' === $name) { - $value = \constant('Memcached::'.$name.'_'.strtoupper($value)); - } - unset($options[$name]); - - if (\defined('Memcached::OPT_'.$name)) { - $options[\constant('Memcached::OPT_'.$name)] = $value; - } - } - $client->setOptions($options); - - // set client's servers, taking care of persistent connections - if (!$client->isPristine()) { - $oldServers = []; - foreach ($client->getServerList() as $server) { - $oldServers[] = [$server['host'], $server['port']]; - } - - $newServers = []; - foreach ($servers as $server) { - if (1 < \count($server)) { - $server = array_values($server); - unset($server[2]); - $server[1] = (int) $server[1]; - } - $newServers[] = $server; - } - - if ($oldServers !== $newServers) { - $client->resetServerList(); - $client->addServers($servers); - } - } else { - $client->addServers($servers); - } - - if (null !== $username || null !== $password) { - if (!method_exists($client, 'setSaslAuthData')) { - trigger_error('Missing SASL support: the memcached extension must be compiled with --enable-memcached-sasl.'); - } - $client->setSaslAuthData($username, $password); - } - - return $client; - } finally { - restore_error_handler(); - } - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - if ($lifetime && $lifetime > 30 * 86400) { - $lifetime += time(); - } - - $encodedValues = []; - foreach ($values as $key => $value) { - $encodedValues[self::encodeKey($key)] = $value; - } - - return $this->checkResultCode($this->getClient()->setMulti($encodedValues, $lifetime)) ? $failed : false; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - try { - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - - $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds)); - - $result = []; - foreach ($encodedResult as $key => $value) { - $result[self::decodeKey($key)] = $this->marshaller->unmarshall($value); - } - - return $result; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return false !== $this->getClient()->get(self::encodeKey($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) { - if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) { - $ok = false; - } - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return '' === $namespace && $this->getClient()->flush(); - } - - private function checkResultCode($result) - { - $code = $this->client->getResultCode(); - - if (\Memcached::RES_SUCCESS === $code || \Memcached::RES_NOTFOUND === $code) { - return $result; - } - - throw new CacheException('MemcachedAdapter client error: '.strtolower($this->client->getResultMessage())); - } - - private function getClient(): \Memcached - { - if ($this->client) { - return $this->client; - } - - $opt = $this->lazyClient->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - if ('' !== $prefix = (string) $this->lazyClient->getOption(\Memcached::OPT_PREFIX_KEY)) { - throw new CacheException(sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix)); - } - - return $this->client = $this->lazyClient; - } - - private static function encodeKey(string $key): string - { - return strtr($key, self::RESERVED_MEMCACHED, self::RESERVED_PSR6); - } - - private static function decodeKey(string $key): string - { - return strtr($key, self::RESERVED_PSR6, self::RESERVED_MEMCACHED); - } -} diff --git a/vendor/symfony/cache/Adapter/NullAdapter.php b/vendor/symfony/cache/Adapter/NullAdapter.php deleted file mode 100644 index 15f7f8c..0000000 --- a/vendor/symfony/cache/Adapter/NullAdapter.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Titouan Galopin - */ -class NullAdapter implements AdapterInterface, CacheInterface -{ - private static $createCacheItem; - - public function __construct() - { - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key) { - $item = new CacheItem(); - $item->key = $key; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - $save = true; - - return $callback((self::$createCacheItem)($key), $save); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - return (self::$createCacheItem)($key); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - return $this->generateItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - return false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - - foreach ($keys as $key) { - yield $key => $f($key); - } - } -} diff --git a/vendor/symfony/cache/Adapter/ParameterNormalizer.php b/vendor/symfony/cache/Adapter/ParameterNormalizer.php deleted file mode 100644 index e33ae9f..0000000 --- a/vendor/symfony/cache/Adapter/ParameterNormalizer.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -/** - * @author Lars Strojny - */ -final class ParameterNormalizer -{ - public static function normalizeDuration(string $duration): int - { - if (is_numeric($duration)) { - return $duration; - } - - if (false !== $time = strtotime($duration, 0)) { - return $time; - } - - try { - return \DateTime::createFromFormat('U', 0)->add(new \DateInterval($duration))->getTimestamp(); - } catch (\Exception $e) { - throw new \InvalidArgumentException(sprintf('Cannot parse date interval "%s".', $duration), 0, $e); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PdoAdapter.php b/vendor/symfony/cache/Adapter/PdoAdapter.php deleted file mode 100644 index 5d10724..0000000 --- a/vendor/symfony/cache/Adapter/PdoAdapter.php +++ /dev/null @@ -1,583 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Schema\Schema; -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class PdoAdapter extends AbstractAdapter implements PruneableInterface -{ - protected $maxIdLength = 255; - - private $marshaller; - private $conn; - private $dsn; - private $driver; - private $serverVersion; - private $table = 'cache_items'; - private $idCol = 'item_id'; - private $dataCol = 'item_data'; - private $lifetimeCol = 'item_lifetime'; - private $timeCol = 'item_time'; - private $username = ''; - private $password = ''; - private $connectionOptions = []; - private $namespace; - - private $dbalAdapter; - - /** - * You can either pass an existing database connection as PDO instance or - * a DSN string that will be used to lazy-connect to the database when the - * cache is actually used. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * - * @param \PDO|string $connOrDsn - * - * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string - * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], MarshallerInterface $marshaller = null) - { - if ($connOrDsn instanceof Connection || (\is_string($connOrDsn) && str_contains($connOrDsn, '://'))) { - trigger_deprecation('symfony/cache', '5.4', 'Usage of a DBAL Connection with "%s" is deprecated and will be removed in symfony 6.0. Use "%s" instead.', __CLASS__, DoctrineDbalAdapter::class); - $this->dbalAdapter = new DoctrineDbalAdapter($connOrDsn, $namespace, $defaultLifetime, $options, $marshaller); - - return; - } - - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->conn = $connOrDsn; - } elseif (\is_string($connOrDsn)) { - $this->dsn = $connOrDsn; - } else { - throw new InvalidArgumentException(sprintf('"%s" requires PDO or Doctrine\DBAL\Connection instance or DSN string as first argument, "%s" given.', __CLASS__, get_debug_type($connOrDsn))); - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->namespace = $namespace; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - /** - * {@inheritDoc} - */ - public function getItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->getItem($key); - } - - return parent::getItem($key); - } - - /** - * {@inheritDoc} - */ - public function getItems(array $keys = []) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->getItems($keys); - } - - return parent::getItems($keys); - } - - /** - * {@inheritDoc} - */ - public function hasItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->hasItem($key); - } - - return parent::hasItem($key); - } - - /** - * {@inheritDoc} - */ - public function deleteItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->deleteItem($key); - } - - return parent::deleteItem($key); - } - - /** - * {@inheritDoc} - */ - public function deleteItems(array $keys) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->deleteItems($keys); - } - - return parent::deleteItems($keys); - } - - /** - * {@inheritDoc} - */ - public function clear(string $prefix = '') - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->clear($prefix); - } - - return parent::clear($prefix); - } - - /** - * {@inheritDoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->get($key, $callback, $beta, $metadata); - } - - return parent::get($key, $callback, $beta, $metadata); - } - - /** - * {@inheritDoc} - */ - public function delete(string $key): bool - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->delete($key); - } - - return parent::delete($key); - } - - /** - * {@inheritDoc} - */ - public function save(CacheItemInterface $item) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->save($item); - } - - return parent::save($item); - } - - /** - * {@inheritDoc} - */ - public function saveDeferred(CacheItemInterface $item) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->saveDeferred($item); - } - - return parent::saveDeferred($item); - } - - /** - * {@inheritDoc} - */ - public function setLogger(LoggerInterface $logger): void - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->setLogger($logger); - - return; - } - - parent::setLogger($logger); - } - - /** - * {@inheritDoc} - */ - public function commit() - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->commit(); - } - - return parent::commit(); - } - - /** - * {@inheritDoc} - */ - public function reset() - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->reset(); - - return; - } - - parent::reset(); - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable() - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->createTable(); - - return; - } - - // connect if we are not yet - $conn = $this->getConnection(); - - switch ($this->driver) { - case 'mysql': - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(255) NOT NULL PRIMARY KEY, $this->dataCol MEDIUMBLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB"; - break; - case 'sqlite': - $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'pgsql': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'oci': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'sqlsrv': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - default: - throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver)); - } - - $conn->exec($sql); - } - - /** - * Adds the Table to the Schema if the adapter uses this Connection. - * - * @deprecated since symfony/cache 5.4 use DoctrineDbalAdapter instead - */ - public function configureSchema(Schema $schema, Connection $forConnection): void - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->configureSchema($schema, $forConnection); - } - } - - /** - * {@inheritdoc} - */ - public function prune() - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->prune(); - } - - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= :time"; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE :namespace"; - } - - $connection = $this->getConnection(); - - try { - $delete = $connection->prepare($deleteSql); - } catch (\PDOException $e) { - return true; - } - $delete->bindValue(':time', time(), \PDO::PARAM_INT); - - if ('' !== $this->namespace) { - $delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); - } - try { - return $delete->execute(); - } catch (\PDOException $e) { - return true; - } - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $connection = $this->getConnection(); - - $now = time(); - $expired = []; - - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($ids as $id) { - $stmt->bindValue(++$i, $id); - } - $result = $stmt->execute(); - - if (\is_object($result)) { - $result = $result->iterateNumeric(); - } else { - $stmt->setFetchMode(\PDO::FETCH_NUM); - $result = $stmt; - } - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = str_pad('', (\count($expired) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($expired as $id) { - $stmt->bindValue(++$i, $id); - } - $stmt->execute(); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - $connection = $this->getConnection(); - - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)"; - $stmt = $connection->prepare($sql); - - $stmt->bindValue(':id', $id); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->execute(); - - return (bool) $stmt->fetchColumn(); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $conn = $this->getConnection(); - - if ('' === $namespace) { - if ('sqlite' === $this->driver) { - $sql = "DELETE FROM $this->table"; - } else { - $sql = "TRUNCATE TABLE $this->table"; - } - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $conn->exec($sql); - } catch (\PDOException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->idCol IN ($sql)"; - try { - $stmt = $this->getConnection()->prepare($sql); - $stmt->execute(array_values($ids)); - } catch (\PDOException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $conn = $this->getConnection(); - - $driver = $this->driver; - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; - - switch (true) { - case 'mysql' === $driver: - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci' === $driver: - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv' === $driver && version_compare($this->getServerVersion(), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $driver: - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql' === $driver && version_compare($this->getServerVersion(), '9.5', '>='): - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $driver = null; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $conn->prepare($sql); - } catch (\PDOException $e) { - if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $stmt = $conn->prepare($sql); - } - - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. - if ('sqlsrv' === $driver || 'oci' === $driver) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, \PDO::PARAM_LOB); - $stmt->bindValue(4, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(5, $now, \PDO::PARAM_INT); - $stmt->bindParam(6, $data, \PDO::PARAM_LOB); - $stmt->bindValue(7, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(8, $now, \PDO::PARAM_INT); - } else { - $stmt->bindParam(':id', $id); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - if (null === $driver) { - $insertStmt = $conn->prepare($insertSql); - - $insertStmt->bindParam(':id', $id); - $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $insertStmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $insertStmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - - foreach ($values as $id => $data) { - try { - $stmt->execute(); - } catch (\PDOException $e) { - if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $stmt->execute(); - } - if (null === $driver && !$stmt->rowCount()) { - try { - $insertStmt->execute(); - } catch (\PDOException $e) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - private function getConnection(): \PDO - { - if (null === $this->conn) { - $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions); - $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - } - if (null === $this->driver) { - $this->driver = $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - return $this->conn; - } - - private function getServerVersion(): string - { - if (null === $this->serverVersion) { - $this->serverVersion = $this->conn->getAttribute(\PDO::ATTR_SERVER_VERSION); - } - - return $this->serverVersion; - } -} diff --git a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/vendor/symfony/cache/Adapter/PhpArrayAdapter.php deleted file mode 100644 index 7e9b6b3..0000000 --- a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php +++ /dev/null @@ -1,435 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Component\VarExporter\VarExporter; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0. - * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter. - * - * @author Titouan Galopin - * @author Nicolas Grekas - */ -class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private $file; - private $keys; - private $values; - - private static $createCacheItem; - private static $valuesCache = []; - - /** - * @param string $file The PHP file were values are cached - * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit - */ - public function __construct(string $file, AdapterInterface $fallbackPool) - { - $this->file = $file; - $this->pool = $fallbackPool; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * This adapter takes advantage of how PHP stores arrays in its latest versions. - * - * @param string $file The PHP file were values are cached - * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hit - * - * @return CacheItemPoolInterface - */ - public static function create(string $file, CacheItemPoolInterface $fallbackPool) - { - if (!$fallbackPool instanceof AdapterInterface) { - $fallbackPool = new ProxyAdapter($fallbackPool); - } - - return new static($file, $fallbackPool); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - if (null === $this->values) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - get_from_pool: - if ($this->pool instanceof CacheInterface) { - return $this->pool->get($key, $callback, $beta, $metadata); - } - - return $this->doGet($this->pool, $key, $callback, $beta, $metadata); - } - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - return null; - } - try { - if ($value instanceof \Closure) { - return $value(); - } - } catch (\Throwable $e) { - unset($this->keys[$key]); - goto get_from_pool; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - return $this->pool->getItem($key); - } - - $value = $this->values[$this->keys[$key]]; - $isHit = true; - - if ('N;' === $value) { - $value = null; - } elseif ($value instanceof \Closure) { - try { - $value = $value(); - } catch (\Throwable $e) { - $value = null; - $isHit = false; - } - } - - return (self::$createCacheItem)($key, $value, $isHit); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - } - if (null === $this->values) { - $this->initialize(); - } - - return $this->generateItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - - return isset($this->keys[$key]) || $this->pool->hasItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$key]) && $this->pool->deleteItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $deleted = true; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - - if (isset($this->keys[$key])) { - $deleted = false; - } else { - $fallbackKeys[] = $key; - } - } - if (null === $this->values) { - $this->initialize(); - } - - if ($fallbackKeys) { - $deleted = $this->pool->deleteItems($fallbackKeys) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->saveDeferred($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return $this->pool->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $this->keys = $this->values = []; - - $cleared = @unlink($this->file) || !file_exists($this->file); - unset(self::$valuesCache[$this->file]); - - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($prefix) && $cleared; - } - - return $this->pool->clear() && $cleared; - } - - /** - * Store an array of cached values. - * - * @param array $values The cached values - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(array $values) - { - if (file_exists($this->file)) { - if (!is_file($this->file)) { - throw new InvalidArgumentException(sprintf('Cache path exists and is not a file: "%s".', $this->file)); - } - - if (!is_writable($this->file)) { - throw new InvalidArgumentException(sprintf('Cache file is not writable: "%s".', $this->file)); - } - } else { - $directory = \dirname($this->file); - - if (!is_dir($directory) && !@mkdir($directory, 0777, true)) { - throw new InvalidArgumentException(sprintf('Cache directory does not exist and cannot be created: "%s".', $directory)); - } - - if (!is_writable($directory)) { - throw new InvalidArgumentException(sprintf('Cache directory is not writable: "%s".', $directory)); - } - } - - $preload = []; - $dumpedValues = ''; - $dumpedMap = []; - $dump = <<<'EOF' - $value) { - CacheItem::validateKey(\is_int($key) ? (string) $key : $key); - $isStaticValue = true; - - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue, $preload); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - if (!$isStaticValue) { - $value = str_replace("\n", "\n ", $value); - $value = "static function () {\n return {$value};\n}"; - } - $hash = hash('md5', $value); - - if (null === $id = $dumpedMap[$hash] ?? null) { - $id = $dumpedMap[$hash] = \count($dumpedMap); - $dumpedValues .= "{$id} => {$value},\n"; - } - - $dump .= var_export($key, true)." => {$id},\n"; - } - - $dump .= "\n], [\n\n{$dumpedValues}\n]];\n"; - - $tmpFile = uniqid($this->file, true); - - file_put_contents($tmpFile, $dump); - @chmod($tmpFile, 0666 & ~umask()); - unset($serialized, $value, $dump); - - @rename($tmpFile, $this->file); - unset(self::$valuesCache[$this->file]); - - $this->initialize(); - - return $preload; - } - - /** - * Load the cache file. - */ - private function initialize() - { - if (isset(self::$valuesCache[$this->file])) { - $values = self::$valuesCache[$this->file]; - } elseif (!is_file($this->file)) { - $this->keys = $this->values = []; - - return; - } else { - $values = self::$valuesCache[$this->file] = (include $this->file) ?: [[], []]; - } - - if (2 !== \count($values) || !isset($values[0], $values[1])) { - $this->keys = $this->values = []; - } else { - [$this->keys, $this->values] = $values; - } - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (isset($this->keys[$key])) { - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - yield $key => $f($key, null, true); - } elseif ($value instanceof \Closure) { - try { - yield $key => $f($key, $value(), true); - } catch (\Throwable $e) { - yield $key => $f($key, null, false); - } - } else { - yield $key => $f($key, $value, true); - } - } else { - $fallbackKeys[] = $key; - } - } - - if ($fallbackKeys) { - yield from $this->pool->getItems($fallbackKeys); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php b/vendor/symfony/cache/Adapter/PhpFilesAdapter.php deleted file mode 100644 index f5766c3..0000000 --- a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php +++ /dev/null @@ -1,330 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemCommonTrait; -use Symfony\Component\VarExporter\VarExporter; - -/** - * @author Piotr Stankowski - * @author Nicolas Grekas - * @author Rob Frawley 2nd - */ -class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemCommonTrait { - doClear as private doCommonClear; - doDelete as private doCommonDelete; - } - - private $includeHandler; - private $appendOnly; - private $values = []; - private $files = []; - - private static $startTime; - private static $valuesCache = []; - - /** - * @param $appendOnly Set to `true` to gain extra performance when the items stored in this pool never expire. - * Doing so is encouraged because it fits perfectly OPcache's memory model. - * - * @throws CacheException if OPcache is not enabled - */ - public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, bool $appendOnly = false) - { - $this->appendOnly = $appendOnly; - self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - $this->includeHandler = static function ($type, $msg, $file, $line) { - throw new \ErrorException($msg, 0, $type, $file, $line); - }; - } - - public static function isSupported() - { - self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time(); - - return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN)); - } - - /** - * @return bool - */ - public function prune() - { - $time = time(); - $pruned = true; - $getExpiry = true; - - set_error_handler($this->includeHandler); - try { - foreach ($this->scanHashDir($this->directory) as $file) { - try { - if (\is_array($expiresAt = include $file)) { - $expiresAt = $expiresAt[0]; - } - } catch (\ErrorException $e) { - $expiresAt = $time; - } - - if ($time >= $expiresAt) { - $pruned = $this->doUnlink($file) && !file_exists($file) && $pruned; - } - } - } finally { - restore_error_handler(); - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - if ($this->appendOnly) { - $now = 0; - $missingIds = []; - } else { - $now = time(); - $missingIds = $ids; - $ids = []; - } - $values = []; - - begin: - $getExpiry = false; - - foreach ($ids as $id) { - if (null === $value = $this->values[$id] ?? null) { - $missingIds[] = $id; - } elseif ('N;' === $value) { - $values[$id] = null; - } elseif (!\is_object($value)) { - $values[$id] = $value; - } elseif (!$value instanceof LazyValue) { - $values[$id] = $value(); - } elseif (false === $values[$id] = include $value->file) { - unset($values[$id], $this->values[$id]); - $missingIds[] = $id; - } - if (!$this->appendOnly) { - unset($this->values[$id]); - } - } - - if (!$missingIds) { - return $values; - } - - set_error_handler($this->includeHandler); - try { - $getExpiry = true; - - foreach ($missingIds as $k => $id) { - try { - $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id); - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $this->values[$id]] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $this->values[$id]] = $expiresAt; - } elseif ($now < $expiresAt) { - $this->values[$id] = new LazyValue($file); - } - - if ($now >= $expiresAt) { - unset($this->values[$id], $missingIds[$k], self::$valuesCache[$file]); - } - } catch (\ErrorException $e) { - unset($missingIds[$k]); - } - } - } finally { - restore_error_handler(); - } - - $ids = $missingIds; - $missingIds = []; - goto begin; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - if ($this->appendOnly && isset($this->values[$id])) { - return true; - } - - set_error_handler($this->includeHandler); - try { - $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id); - $getExpiry = true; - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $value] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $value] = $expiresAt; - } elseif ($this->appendOnly) { - $value = new LazyValue($file); - } - } catch (\ErrorException $e) { - return false; - } finally { - restore_error_handler(); - } - if ($this->appendOnly) { - $now = 0; - $this->values[$id] = $value; - } else { - $now = time(); - } - - return $now < $expiresAt; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - $ok = true; - $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; - $allowCompile = self::isSupported(); - - foreach ($values as $key => $value) { - unset($this->values[$key]); - $isStaticValue = true; - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - $encodedKey = rawurlencode($key); - - if ($isStaticValue) { - $value = "return [{$expiry}, {$value}];"; - } elseif ($this->appendOnly) { - $value = "return [{$expiry}, static function () { return {$value}; }];"; - } else { - // We cannot use a closure here because of https://bugs.php.net/76982 - $value = str_replace('\Symfony\Component\VarExporter\Internal\\', '', $value); - $value = "namespace Symfony\Component\VarExporter\Internal;\n\nreturn \$getExpiry ? {$expiry} : {$value};"; - } - - $file = $this->files[$key] = $this->getFile($key, true); - // Since OPcache only compiles files older than the script execution start, set the file's mtime in the past - $ok = $this->write($file, "directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $this->values = []; - - return $this->doCommonClear($namespace); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - foreach ($ids as $id) { - unset($this->values[$id]); - } - - return $this->doCommonDelete($ids); - } - - protected function doUnlink(string $file) - { - unset(self::$valuesCache[$file]); - - if (self::isSupported()) { - @opcache_invalidate($file, true); - } - - return @unlink($file); - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - $encodedKey = substr(fgets($h), 8); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} - -/** - * @internal - */ -class LazyValue -{ - public $file; - - public function __construct(string $file) - { - $this->file = $file; - } -} diff --git a/vendor/symfony/cache/Adapter/ProxyAdapter.php b/vendor/symfony/cache/Adapter/ProxyAdapter.php deleted file mode 100644 index c715cad..0000000 --- a/vendor/symfony/cache/Adapter/ProxyAdapter.php +++ /dev/null @@ -1,268 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Nicolas Grekas - */ -class ProxyAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private $namespace = ''; - private $namespaceLen; - private $poolHash; - private $defaultLifetime; - - private static $createCacheItem; - private static $setInnerItem; - - public function __construct(CacheItemPoolInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - $this->pool = $pool; - $this->poolHash = $poolHash = spl_object_hash($pool); - if ('' !== $namespace) { - \assert('' !== CacheItem::validateKey($namespace)); - $this->namespace = $namespace; - } - $this->namespaceLen = \strlen($namespace); - $this->defaultLifetime = $defaultLifetime; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $innerItem, $poolHash) { - $item = new CacheItem(); - $item->key = $key; - - if (null === $innerItem) { - return $item; - } - - $item->value = $v = $innerItem->get(); - $item->isHit = $innerItem->isHit(); - $item->innerItem = $innerItem; - $item->poolHash = $poolHash; - - // Detect wrapped values that encode for their expiry and creation duration - // For compactness, these values are packed in the key of an array using - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = (string) array_key_first($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) { - $item->value = $v[$k]; - $v = unpack('Ve/Nc', substr($k, 1, -1)); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } elseif ($innerItem instanceof CacheItem) { - $item->metadata = $innerItem->metadata; - } - $innerItem->set(null); - - return $item; - }, - null, - CacheItem::class - ); - self::$setInnerItem ?? self::$setInnerItem = \Closure::bind( - /** - * @param array $item A CacheItem cast to (array); accessing protected properties requires adding the "\0*\0" PHP prefix - */ - static function (CacheItemInterface $innerItem, array $item) { - // Tags are stored separately, no need to account for them when considering this item's newly set metadata - if (isset(($metadata = $item["\0*\0newMetadata"])[CacheItem::METADATA_TAGS])) { - unset($metadata[CacheItem::METADATA_TAGS]); - } - if ($metadata) { - // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators - $item["\0*\0value"] = ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item["\0*\0value"]]; - } - $innerItem->set($item["\0*\0value"]); - $innerItem->expiresAt(null !== $item["\0*\0expiry"] ? \DateTime::createFromFormat('U.u', sprintf('%.6F', $item["\0*\0expiry"])) : null); - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - if (!$this->pool instanceof CacheInterface) { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - return $this->pool->get($this->getId($key), function ($innerItem, bool &$save) use ($key, $callback) { - $item = (self::$createCacheItem)($key, $innerItem, $this->poolHash); - $item->set($value = $callback($item, $save)); - (self::$setInnerItem)($innerItem, (array) $item); - - return $value; - }, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $item = $this->pool->getItem($this->getId($key)); - - return (self::$createCacheItem)($key, $item, $this->poolHash); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->generateItems($this->pool->getItems($keys)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - return $this->pool->hasItem($this->getId($key)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($this->namespace.$prefix); - } - - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->pool->deleteItem($this->getId($key)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->pool->deleteItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - return $this->doSave($item, __FUNCTION__); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return $this->doSave($item, __FUNCTION__); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return $this->pool->commit(); - } - - private function doSave(CacheItemInterface $item, string $method) - { - if (!$item instanceof CacheItem) { - return false; - } - $item = (array) $item; - if (null === $item["\0*\0expiry"] && 0 < $this->defaultLifetime) { - $item["\0*\0expiry"] = microtime(true) + $this->defaultLifetime; - } - - if ($item["\0*\0poolHash"] === $this->poolHash && $item["\0*\0innerItem"]) { - $innerItem = $item["\0*\0innerItem"]; - } elseif ($this->pool instanceof AdapterInterface) { - // this is an optimization specific for AdapterInterface implementations - // so we can save a round-trip to the backend by just creating a new item - $innerItem = (self::$createCacheItem)($this->namespace.$item["\0*\0key"], null, $this->poolHash); - } else { - $innerItem = $this->pool->getItem($this->namespace.$item["\0*\0key"]); - } - - (self::$setInnerItem)($innerItem, $item); - - return $this->pool->$method($innerItem); - } - - private function generateItems(iterable $items): \Generator - { - $f = self::$createCacheItem; - - foreach ($items as $key => $item) { - if ($this->namespaceLen) { - $key = substr($key, $this->namespaceLen); - } - - yield $key => $f($key, $item, $this->poolHash); - } - } - - private function getId($key): string - { - \assert('' !== CacheItem::validateKey($key)); - - return $this->namespace.$key; - } -} diff --git a/vendor/symfony/cache/Adapter/Psr16Adapter.php b/vendor/symfony/cache/Adapter/Psr16Adapter.php deleted file mode 100644 index a56aa39..0000000 --- a/vendor/symfony/cache/Adapter/Psr16Adapter.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ProxyTrait; - -/** - * Turns a PSR-16 cache into a PSR-6 one. - * - * @author Nicolas Grekas - */ -class Psr16Adapter extends AbstractAdapter implements PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = '_'; - - private $miss; - - public function __construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - parent::__construct($namespace, $defaultLifetime); - - $this->pool = $pool; - $this->miss = new \stdClass(); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { - if ($this->miss !== $value) { - yield $key => $value; - } - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return $this->pool->has($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - return $this->pool->deleteMultiple($ids); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisAdapter.php b/vendor/symfony/cache/Adapter/RedisAdapter.php deleted file mode 100644 index eb5950e..0000000 --- a/vendor/symfony/cache/Adapter/RedisAdapter.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; -use Symfony\Component\Cache\Traits\RedisTrait; - -class RedisAdapter extends AbstractAdapter -{ - use RedisTrait; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis The redis client - * @param string $namespace The default namespace - * @param int $defaultLifetime The default lifetime - */ - public function __construct($redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) - { - $this->init($redis, $namespace, $defaultLifetime, $marshaller); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php deleted file mode 100644 index 865491e..0000000 --- a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php +++ /dev/null @@ -1,325 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\PredisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Component\Cache\Marshaller\DeflateMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; -use Symfony\Component\Cache\Traits\RedisTrait; - -/** - * Stores tag id <> cache id relationship as a Redis Set. - * - * Set (tag relation info) is stored without expiry (non-volatile), while cache always gets an expiry (volatile) even - * if not set by caller. Thus if you configure redis with the right eviction policy you can be safe this tag <> cache - * relationship survives eviction (cache cleanup when Redis runs out of memory). - * - * Redis server 2.8+ with any `volatile-*` eviction policy, OR `noeviction` if you're sure memory will NEVER fill up - * - * Design limitations: - * - Max 4 billion cache keys per cache tag as limited by Redis Set datatype. - * E.g. If you use a "all" items tag for expiry instead of clear(), that limits you to 4 billion cache items also. - * - * @see https://redis.io/topics/lru-cache#eviction-policies Documentation for Redis eviction policies. - * @see https://redis.io/topics/data-types#sets Documentation for Redis Set datatype. - * - * @author Nicolas Grekas - * @author André Rømcke - */ -class RedisTagAwareAdapter extends AbstractTagAwareAdapter -{ - use RedisTrait; - - /** - * On cache items without a lifetime set, we set it to 100 days. This is to make sure cache items are - * preferred to be evicted over tag Sets, if eviction policy is configured according to requirements. - */ - private const DEFAULT_CACHE_TTL = 8640000; - - /** - * @var string|null detected eviction policy used on Redis server - */ - private $redisEvictionPolicy; - private $namespace; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis The redis client - * @param string $namespace The default namespace - * @param int $defaultLifetime The default lifetime - */ - public function __construct($redis, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null) - { - if ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof ClusterInterface && !$redis->getConnection() instanceof PredisCluster) { - throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); - } - - if (\defined('Redis::OPT_COMPRESSION') && ($redis instanceof \Redis || $redis instanceof \RedisArray || $redis instanceof \RedisCluster)) { - $compression = $redis->getOption(\Redis::OPT_COMPRESSION); - - foreach (\is_array($compression) ? $compression : [$compression] as $c) { - if (\Redis::COMPRESSION_NONE !== $c) { - throw new InvalidArgumentException(sprintf('phpredis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class)); - } - } - } - - $this->init($redis, $namespace, $defaultLifetime, new TagAwareMarshaller($marshaller)); - $this->namespace = $namespace; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $delTagData = []): array - { - $eviction = $this->getRedisEvictionPolicy(); - if ('noeviction' !== $eviction && !str_starts_with($eviction, 'volatile-')) { - throw new LogicException(sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction)); - } - - // serialize values - if (!$serialized = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - // While pipeline isn't supported on RedisCluster, other setups will at least benefit from doing this in one op - $results = $this->pipeline(static function () use ($serialized, $lifetime, $addTagData, $delTagData, $failed) { - // Store cache items, force a ttl if none is set, as there is no MSETEX we need to set each one - foreach ($serialized as $id => $value) { - yield 'setEx' => [ - $id, - 0 >= $lifetime ? self::DEFAULT_CACHE_TTL : $lifetime, - $value, - ]; - } - - // Add and Remove Tags - foreach ($addTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sAdd' => array_merge([$tagId], $ids); - } - } - - foreach ($delTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sRem' => array_merge([$tagId], $ids); - } - } - }); - - foreach ($results as $id => $result) { - // Skip results of SADD/SREM operations, they'll be 1 or 0 depending on if set value already existed or not - if (is_numeric($result)) { - continue; - } - // setEx results - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteYieldTags(array $ids): iterable - { - $lua = <<<'EOLUA' - local v = redis.call('GET', KEYS[1]) - local e = redis.pcall('UNLINK', KEYS[1]) - - if type(e) ~= 'number' then - redis.call('DEL', KEYS[1]) - end - - if not v or v:len() <= 13 or v:byte(1) ~= 0x9D or v:byte(6) ~= 0 or v:byte(10) ~= 0x5F then - return '' - end - - return v:sub(14, 13 + v:byte(13) + v:byte(12) * 256 + v:byte(11) * 65536) -EOLUA; - - $results = $this->pipeline(function () use ($ids, $lua) { - foreach ($ids as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id] : [$lua, [$id], 1]; - } - }); - - foreach ($results as $id => $result) { - if ($result instanceof \RedisException || $result instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to delete key "{key}": '.$result->getMessage(), ['key' => substr($id, \strlen($this->namespace)), 'exception' => $result]); - - continue; - } - - try { - yield $id => !\is_string($result) || '' === $result ? [] : $this->marshaller->unmarshall($result); - } catch (\Exception $e) { - yield $id => []; - } - } - } - - /** - * {@inheritdoc} - */ - protected function doDeleteTagRelations(array $tagData): bool - { - $results = $this->pipeline(static function () use ($tagData) { - foreach ($tagData as $tagId => $idList) { - array_unshift($idList, $tagId); - yield 'sRem' => $idList; - } - }); - foreach ($results as $result) { - // no-op - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doInvalidate(array $tagIds): bool - { - // This script scans the set of items linked to tag: it empties the set - // and removes the linked items. When the set is still not empty after - // the scan, it means we're in cluster mode and that the linked items - // are on other nodes: we move the links to a temporary set and we - // gargage collect that set from the client side. - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local cursor = '0' - local id = KEYS[1] - repeat - local result = redis.call('SSCAN', id, cursor, 'COUNT', 5000); - cursor = result[1]; - local rems = {} - - for _, v in ipairs(result[2]) do - local ok, _ = pcall(redis.call, 'DEL', ARGV[1]..v) - if ok then - table.insert(rems, v) - end - end - if 0 < #rems then - redis.call('SREM', id, unpack(rems)) - end - until '0' == cursor; - - redis.call('SUNIONSTORE', '{'..id..'}'..id, id) - redis.call('DEL', id) - - return redis.call('SSCAN', '{'..id..'}'..id, '0', 'COUNT', 5000) -EOLUA; - - $results = $this->pipeline(function () use ($tagIds, $lua) { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - } elseif (\is_array($prefix = $this->redis->getOption(\Redis::OPT_PREFIX) ?? '')) { - $prefix = current($prefix); - } - - foreach ($tagIds as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id, $prefix] : [$lua, [$id, $prefix], 1]; - } - }); - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local id = KEYS[1] - local cursor = table.remove(ARGV) - redis.call('SREM', '{'..id..'}'..id, unpack(ARGV)) - - return redis.call('SSCAN', '{'..id..'}'..id, cursor, 'COUNT', 5000) -EOLUA; - - $success = true; - foreach ($results as $id => $values) { - if ($values instanceof \RedisException || $values instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to invalidate key "{key}": '.$values->getMessage(), ['key' => substr($id, \strlen($this->namespace)), 'exception' => $values]); - $success = false; - - continue; - } - - [$cursor, $ids] = $values; - - while ($ids || '0' !== $cursor) { - $this->doDelete($ids); - - $evalArgs = [$id, $cursor]; - array_splice($evalArgs, 1, 0, $ids); - - if ($this->redis instanceof \Predis\ClientInterface) { - array_unshift($evalArgs, $lua, 1); - } else { - $evalArgs = [$lua, $evalArgs, 1]; - } - - $results = $this->pipeline(function () use ($evalArgs) { - yield 'eval' => $evalArgs; - }); - - foreach ($results as [$cursor, $ids]) { - // no-op - } - } - } - - return $success; - } - - private function getRedisEvictionPolicy(): string - { - if (null !== $this->redisEvictionPolicy) { - return $this->redisEvictionPolicy; - } - - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { - // Predis supports info command only on the master in replication environments - $hosts = [$host->getClientFor('master')]; - } - - foreach ($hosts as $host) { - $info = $host->info('Memory'); - - if ($info instanceof ErrorInterface) { - continue; - } - - $info = $info['Memory'] ?? $info; - - return $this->redisEvictionPolicy = $info['maxmemory_policy']; - } - - return $this->redisEvictionPolicy = ''; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapter.php b/vendor/symfony/cache/Adapter/TagAwareAdapter.php deleted file mode 100644 index ff22e5a..0000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapter.php +++ /dev/null @@ -1,428 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * @author Nicolas Grekas - */ -class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface, LoggerAwareInterface -{ - use ContractsTrait; - use LoggerAwareTrait; - use ProxyTrait; - - public const TAGS_PREFIX = "\0tags\0"; - - private $deferred = []; - private $tags; - private $knownTagVersions = []; - private $knownTagVersionsTtl; - - private static $createCacheItem; - private static $setCacheItemTags; - private static $getTagsByKey; - private static $saveTags; - - public function __construct(AdapterInterface $itemsPool, AdapterInterface $tagsPool = null, float $knownTagVersionsTtl = 0.15) - { - $this->pool = $itemsPool; - $this->tags = $tagsPool ?: $itemsPool; - $this->knownTagVersionsTtl = $knownTagVersionsTtl; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, CacheItem $protoItem) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->expiry = $protoItem->expiry; - $item->poolHash = $protoItem->poolHash; - - return $item; - }, - null, - CacheItem::class - ); - self::$setCacheItemTags ?? self::$setCacheItemTags = \Closure::bind( - static function (CacheItem $item, $key, array &$itemTags) { - $item->isTaggable = true; - if (!$item->isHit) { - return $item; - } - if (isset($itemTags[$key])) { - foreach ($itemTags[$key] as $tag => $version) { - $item->metadata[CacheItem::METADATA_TAGS][$tag] = $tag; - } - unset($itemTags[$key]); - } else { - $item->value = null; - $item->isHit = false; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$getTagsByKey ?? self::$getTagsByKey = \Closure::bind( - static function ($deferred) { - $tagsByKey = []; - foreach ($deferred as $key => $item) { - $tagsByKey[$key] = $item->newMetadata[CacheItem::METADATA_TAGS] ?? []; - $item->metadata = $item->newMetadata; - } - - return $tagsByKey; - }, - null, - CacheItem::class - ); - self::$saveTags ?? self::$saveTags = \Closure::bind( - static function (AdapterInterface $tagsAdapter, array $tags) { - ksort($tags); - - foreach ($tags as $v) { - $v->expiry = 0; - $tagsAdapter->saveDeferred($v); - } - - return $tagsAdapter->commit(); - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - $ids = []; - foreach ($tags as $tag) { - \assert('' !== CacheItem::validateKey($tag)); - unset($this->knownTagVersions[$tag]); - $ids[] = $tag.static::TAGS_PREFIX; - } - - return !$tags || $this->tags->deleteItems($ids); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (\is_string($key) && isset($this->deferred[$key])) { - $this->commit(); - } - - if (!$this->pool->hasItem($key)) { - return false; - } - - $itemTags = $this->pool->getItem(static::TAGS_PREFIX.$key); - - if (!$itemTags->isHit()) { - return false; - } - - if (!$itemTags = $itemTags->get()) { - return true; - } - - foreach ($this->getTagVersions([$itemTags]) as $tag => $version) { - if ($itemTags[$tag] !== $version) { - return false; - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - foreach ($this->getItems([$key]) as $item) { - return $item; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $tagKeys = []; - $commit = false; - - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $commit = $commit || isset($this->deferred[$key]); - $key = static::TAGS_PREFIX.$key; - $tagKeys[$key] = $key; - } - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->pool->getItems($tagKeys + $keys); - } catch (InvalidArgumentException $e) { - $this->pool->getItems($keys); // Should throw an exception - - throw $e; - } - - return $this->generateItems($items, $tagKeys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ('' !== $prefix) { - foreach ($this->deferred as $key => $item) { - if (str_starts_with($key, $prefix)) { - unset($this->deferred[$key]); - } - } - } else { - $this->deferred = []; - } - - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($prefix); - } - - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->deleteItems([$key]); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $keys[] = static::TAGS_PREFIX.$key; - } - } - - return $this->pool->deleteItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - if (!$this->deferred) { - return true; - } - - $ok = true; - foreach ($this->deferred as $key => $item) { - if (!$this->pool->saveDeferred($item)) { - unset($this->deferred[$key]); - $ok = false; - } - } - - $items = $this->deferred; - $tagsByKey = (self::$getTagsByKey)($items); - $this->deferred = []; - - $tagVersions = $this->getTagVersions($tagsByKey); - $f = self::$createCacheItem; - - foreach ($tagsByKey as $key => $tags) { - $this->pool->saveDeferred($f(static::TAGS_PREFIX.$key, array_intersect_key($tagVersions, $tags), $items[$key])); - } - - return $this->pool->commit() && $ok; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->commit(); - } - - private function generateItems(iterable $items, array $tagKeys): \Generator - { - $bufferedItems = $itemTags = []; - $f = self::$setCacheItemTags; - - foreach ($items as $key => $item) { - if (!$tagKeys) { - yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags); - continue; - } - if (!isset($tagKeys[$key])) { - $bufferedItems[$key] = $item; - continue; - } - - unset($tagKeys[$key]); - - if ($item->isHit()) { - $itemTags[$key] = $item->get() ?: []; - } - - if (!$tagKeys) { - $tagVersions = $this->getTagVersions($itemTags); - - foreach ($itemTags as $key => $tags) { - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - unset($itemTags[$key]); - continue 2; - } - } - } - $tagVersions = $tagKeys = null; - - foreach ($bufferedItems as $key => $item) { - yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags); - } - $bufferedItems = null; - } - } - } - - private function getTagVersions(array $tagsByKey) - { - $tagVersions = []; - $fetchTagVersions = false; - - foreach ($tagsByKey as $tags) { - $tagVersions += $tags; - - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - unset($this->knownTagVersions[$tag]); - } - } - } - - if (!$tagVersions) { - return []; - } - - $now = microtime(true); - $tags = []; - foreach ($tagVersions as $tag => $version) { - $tags[$tag.static::TAGS_PREFIX] = $tag; - if ($fetchTagVersions || ($this->knownTagVersions[$tag][1] ?? null) !== $version || $now - $this->knownTagVersions[$tag][0] >= $this->knownTagVersionsTtl) { - // reuse previously fetched tag versions up to the ttl - $fetchTagVersions = true; - } - } - - if (!$fetchTagVersions) { - return $tagVersions; - } - - $newTags = []; - $newVersion = null; - foreach ($this->tags->getItems(array_keys($tags)) as $tag => $version) { - if (!$version->isHit()) { - $newTags[$tag] = $version->set($newVersion ?? $newVersion = random_int(\PHP_INT_MIN, \PHP_INT_MAX)); - } - $tagVersions[$tag = $tags[$tag]] = $version->get(); - $this->knownTagVersions[$tag] = [$now, $tagVersions[$tag]]; - } - - if ($newTags) { - (self::$saveTags)($this->tags, $newTags); - } - - return $tagVersions; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php b/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php deleted file mode 100644 index afa18d3..0000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\InvalidArgumentException; - -/** - * Interface for invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareAdapterInterface extends AdapterInterface -{ - /** - * Invalidates cached items using tags. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/vendor/symfony/cache/Adapter/TraceableAdapter.php b/vendor/symfony/cache/Adapter/TraceableAdapter.php deleted file mode 100644 index 4b06557..0000000 --- a/vendor/symfony/cache/Adapter/TraceableAdapter.php +++ /dev/null @@ -1,295 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * An adapter that collects data about all cache calls. - * - * @author Aaron Scherer - * @author Tobias Nyholm - * @author Nicolas Grekas - */ -class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - protected $pool; - private $calls = []; - - public function __construct(AdapterInterface $pool) - { - $this->pool = $pool; - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - if (!$this->pool instanceof CacheInterface) { - throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); - } - - $isHit = true; - $callback = function (CacheItem $item, bool &$save) use ($callback, &$isHit) { - $isHit = $item->isHit(); - - return $callback($item, $save); - }; - - $event = $this->start(__FUNCTION__); - try { - $value = $this->pool->get($key, $callback, $beta, $metadata); - $event->result[$key] = get_debug_type($value); - } finally { - $event->end = microtime(true); - } - if ($isHit) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $event = $this->start(__FUNCTION__); - try { - $item = $this->pool->getItem($key); - } finally { - $event->end = microtime(true); - } - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $item; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->hasItem($key); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->save($item); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->saveDeferred($item); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $event = $this->start(__FUNCTION__); - try { - $result = $this->pool->getItems($keys); - } finally { - $event->end = microtime(true); - } - $f = function () use ($result, $event) { - $event->result = []; - foreach ($result as $key => $item) { - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - yield $key => $item; - } - }; - - return $f(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $event = $this->start(__FUNCTION__); - try { - if ($this->pool instanceof AdapterInterface) { - return $event->result = $this->pool->clear($prefix); - } - - return $event->result = $this->pool->clear(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $event = $this->start(__FUNCTION__); - $event->result['keys'] = $keys; - try { - return $event->result['result'] = $this->pool->deleteItems($keys); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->commit(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function prune() - { - if (!$this->pool instanceof PruneableInterface) { - return false; - } - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->prune(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - - $this->clearCalls(); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - public function getCalls() - { - return $this->calls; - } - - public function clearCalls() - { - $this->calls = []; - } - - protected function start(string $name) - { - $this->calls[] = $event = new TraceableAdapterEvent(); - $event->name = $name; - $event->start = microtime(true); - - return $event; - } -} - -class TraceableAdapterEvent -{ - public $name; - public $start; - public $end; - public $result; - public $hits = 0; - public $misses = 0; -} diff --git a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php b/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php deleted file mode 100644 index 69461b8..0000000 --- a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * @author Robin Chalas - */ -class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface -{ - public function __construct(TagAwareAdapterInterface $pool) - { - parent::__construct($pool); - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->invalidateTags($tags); - } finally { - $event->end = microtime(true); - } - } -} diff --git a/vendor/symfony/cache/CHANGELOG.md b/vendor/symfony/cache/CHANGELOG.md deleted file mode 100644 index 60a8627..0000000 --- a/vendor/symfony/cache/CHANGELOG.md +++ /dev/null @@ -1,108 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate `DoctrineProvider` and `DoctrineAdapter` because these classes have been added to the `doctrine/cache` package - * Add `DoctrineDbalAdapter` identical to `PdoAdapter` for `Doctrine\DBAL\Connection` or DBAL URL - * Deprecate usage of `PdoAdapter` with `Doctrine\DBAL\Connection` or DBAL URL - -5.3 ---- - - * added support for connecting to Redis Sentinel clusters when using the Redis PHP extension - * add support for a custom serializer to the `ApcuAdapter` class - -5.2.0 ------ - - * added integration with Messenger to allow computing cached values in a worker - * allow ISO 8601 time intervals to specify default lifetime - -5.1.0 ------ - - * added max-items + LRU + max-lifetime capabilities to `ArrayCache` - * added `CouchbaseBucketAdapter` - * added context `cache-adapter` to log messages - -5.0.0 ------ - - * removed all PSR-16 implementations in the `Simple` namespace - * removed `SimpleCacheAdapter` - * removed `AbstractAdapter::unserialize()` - * removed `CacheItem::getPreviousTags()` - -4.4.0 ------ - - * added support for connecting to Redis Sentinel clusters - * added argument `$prefix` to `AdapterInterface::clear()` - * improved `RedisTagAwareAdapter` to support Redis server >= 2.8 and up to 4B items per tag - * added `TagAwareMarshaller` for optimized data storage when using `AbstractTagAwareAdapter` - * added `DeflateMarshaller` to compress serialized values - * removed support for phpredis 4 `compression` - * [BC BREAK] `RedisTagAwareAdapter` is not compatible with `RedisCluster` from `Predis` anymore, use `phpredis` instead - * Marked the `CacheDataCollector` class as `@final`. - * added `SodiumMarshaller` to encrypt/decrypt values using libsodium - -4.3.0 ------ - - * removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it - * deprecated all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead - * deprecated `SimpleCacheAdapter`, use `Psr16Adapter` instead - -4.2.0 ------ - - * added support for connecting to Redis clusters via DSN - * added support for configuring multiple Memcached servers via DSN - * added `MarshallerInterface` and `DefaultMarshaller` to allow changing the serializer and provide one that automatically uses igbinary when available - * implemented `CacheInterface`, which provides stampede protection via probabilistic early expiration and should become the preferred way to use a cache - * added sub-second expiry accuracy for backends that support it - * added support for phpredis 4 `compression` and `tcp_keepalive` options - * added automatic table creation when using Doctrine DBAL with PDO-based backends - * throw `LogicException` when `CacheItem::tag()` is called on an item coming from a non tag-aware pool - * deprecated `CacheItem::getPreviousTags()`, use `CacheItem::getMetadata()` instead - * deprecated the `AbstractAdapter::unserialize()` and `AbstractCache::unserialize()` methods - * added `CacheCollectorPass` (originally in `FrameworkBundle`) - * added `CachePoolClearerPass` (originally in `FrameworkBundle`) - * added `CachePoolPass` (originally in `FrameworkBundle`) - * added `CachePoolPrunerPass` (originally in `FrameworkBundle`) - -3.4.0 ------ - - * added using options from Memcached DSN - * added PruneableInterface so PSR-6 or PSR-16 cache implementations can declare support for manual stale cache pruning - * added prune logic to FilesystemTrait, PhpFilesTrait, PdoTrait, TagAwareAdapter and ChainTrait - * now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, PhpFilesCache, PdoAdapter, PdoCache, ChainAdapter, and - ChainCache implement PruneableInterface and support manual stale cache pruning - -3.3.0 ------ - - * added CacheItem::getPreviousTags() to get bound tags coming from the pool storage if any - * added PSR-16 "Simple Cache" implementations for all existing PSR-6 adapters - * added Psr6Cache and SimpleCacheAdapter for bidirectional interoperability between PSR-6 and PSR-16 - * added MemcachedAdapter (PSR-6) and MemcachedCache (PSR-16) - * added TraceableAdapter (PSR-6) and TraceableCache (PSR-16) - -3.2.0 ------ - - * added TagAwareAdapter for tags-based invalidation - * added PdoAdapter with PDO and Doctrine DBAL support - * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only) - * added NullAdapter - -3.1.0 ------ - - * added the component with strict PSR-6 implementations - * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter - * added AbstractAdapter, ChainAdapter and ProxyAdapter - * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache diff --git a/vendor/symfony/cache/CacheItem.php b/vendor/symfony/cache/CacheItem.php deleted file mode 100644 index cf39b4c..0000000 --- a/vendor/symfony/cache/CacheItem.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas - */ -final class CacheItem implements ItemInterface -{ - private const METADATA_EXPIRY_OFFSET = 1527506807; - - protected $key; - protected $value; - protected $isHit = false; - protected $expiry; - protected $metadata = []; - protected $newMetadata = []; - protected $innerItem; - protected $poolHash; - protected $isTaggable = false; - - /** - * {@inheritdoc} - */ - public function getKey(): string - { - return $this->key; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get() - { - return $this->value; - } - - /** - * {@inheritdoc} - */ - public function isHit(): bool - { - return $this->isHit; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function set($value): self - { - $this->value = $value; - - return $this; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function expiresAt($expiration): self - { - if (null === $expiration) { - $this->expiry = null; - } elseif ($expiration instanceof \DateTimeInterface) { - $this->expiry = (float) $expiration->format('U.u'); - } else { - throw new InvalidArgumentException(sprintf('Expiration date must implement DateTimeInterface or be null, "%s" given.', get_debug_type($expiration))); - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function expiresAfter($time): self - { - if (null === $time) { - $this->expiry = null; - } elseif ($time instanceof \DateInterval) { - $this->expiry = microtime(true) + \DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); - } elseif (\is_int($time)) { - $this->expiry = $time + microtime(true); - } else { - throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time))); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function tag($tags): ItemInterface - { - if (!$this->isTaggable) { - throw new LogicException(sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); - } - if (!is_iterable($tags)) { - $tags = [$tags]; - } - foreach ($tags as $tag) { - if (!\is_string($tag) && !(\is_object($tag) && method_exists($tag, '__toString'))) { - throw new InvalidArgumentException(sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', \is_object($tag) ? \get_class($tag) : \gettype($tag))); - } - $tag = (string) $tag; - if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) { - continue; - } - if ('' === $tag) { - throw new InvalidArgumentException('Cache tag length must be greater than zero.'); - } - if (false !== strpbrk($tag, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters "%s".', $tag, self::RESERVED_CHARACTERS)); - } - $this->newMetadata[self::METADATA_TAGS][$tag] = $tag; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getMetadata(): array - { - return $this->metadata; - } - - /** - * Validates a cache key according to PSR-6. - * - * @param mixed $key The key to validate - * - * @throws InvalidArgumentException When $key is not valid - */ - public static function validateKey($key): string - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if ('' === $key) { - throw new InvalidArgumentException('Cache key length must be greater than zero.'); - } - if (false !== strpbrk($key, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); - } - - return $key; - } - - /** - * Internal logging helper. - * - * @internal - */ - public static function log(?LoggerInterface $logger, string $message, array $context = []) - { - if ($logger) { - $logger->warning($message, $context); - } else { - $replace = []; - foreach ($context as $k => $v) { - if (is_scalar($v)) { - $replace['{'.$k.'}'] = $v; - } - } - @trigger_error(strtr($message, $replace), \E_USER_WARNING); - } - } -} diff --git a/vendor/symfony/cache/DataCollector/CacheDataCollector.php b/vendor/symfony/cache/DataCollector/CacheDataCollector.php deleted file mode 100644 index 9590436..0000000 --- a/vendor/symfony/cache/DataCollector/CacheDataCollector.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DataCollector; - -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableAdapterEvent; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; - -/** - * @author Aaron Scherer - * @author Tobias Nyholm - * - * @final - */ -class CacheDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var TraceableAdapter[] - */ - private $instances = []; - - public function addInstance(string $name, TraceableAdapter $instance) - { - $this->instances[$name] = $instance; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []]; - $this->data = ['instances' => $empty, 'total' => $empty]; - foreach ($this->instances as $name => $instance) { - $this->data['instances']['calls'][$name] = $instance->getCalls(); - } - - $this->data['instances']['statistics'] = $this->calculateStatistics(); - $this->data['total']['statistics'] = $this->calculateTotalStatistics(); - } - - public function reset() - { - $this->data = []; - foreach ($this->instances as $instance) { - $instance->clearCalls(); - } - } - - public function lateCollect() - { - $this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'cache'; - } - - /** - * Method returns amount of logged Cache reads: "get" calls. - */ - public function getStatistics(): array - { - return $this->data['instances']['statistics']; - } - - /** - * Method returns the statistic totals. - */ - public function getTotals(): array - { - return $this->data['total']['statistics']; - } - - /** - * Method returns all logged Cache call objects. - * - * @return mixed - */ - public function getCalls() - { - return $this->data['instances']['calls']; - } - - private function calculateStatistics(): array - { - $statistics = []; - foreach ($this->data['instances']['calls'] as $name => $calls) { - $statistics[$name] = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - /** @var TraceableAdapterEvent $call */ - foreach ($calls as $call) { - ++$statistics[$name]['calls']; - $statistics[$name]['time'] += $call->end - $call->start; - if ('get' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - ++$statistics[$name]['writes']; - } - } elseif ('getItem' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - } - } elseif ('getItems' === $call->name) { - $statistics[$name]['reads'] += $call->hits + $call->misses; - $statistics[$name]['hits'] += $call->hits; - $statistics[$name]['misses'] += $call->misses; - } elseif ('hasItem' === $call->name) { - ++$statistics[$name]['reads']; - if (false === $call->result) { - ++$statistics[$name]['misses']; - } else { - ++$statistics[$name]['hits']; - } - } elseif ('save' === $call->name) { - ++$statistics[$name]['writes']; - } elseif ('deleteItem' === $call->name) { - ++$statistics[$name]['deletes']; - } - } - if ($statistics[$name]['reads']) { - $statistics[$name]['hit_read_ratio'] = round(100 * $statistics[$name]['hits'] / $statistics[$name]['reads'], 2); - } else { - $statistics[$name]['hit_read_ratio'] = null; - } - } - - return $statistics; - } - - private function calculateTotalStatistics(): array - { - $statistics = $this->getStatistics(); - $totals = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - foreach ($statistics as $name => $values) { - foreach ($totals as $key => $value) { - $totals[$key] += $statistics[$name][$key]; - } - } - if ($totals['reads']) { - $totals['hit_read_ratio'] = round(100 * $totals['hits'] / $totals['reads'], 2); - } else { - $totals['hit_read_ratio'] = null; - } - - return $totals; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php b/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php deleted file mode 100644 index 843232e..0000000 --- a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface; -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Inject a data collector to all the cache services to be able to get detailed statistics. - * - * @author Tobias Nyholm - */ -class CacheCollectorPass implements CompilerPassInterface -{ - private $dataCollectorCacheId; - private $cachePoolTag; - private $cachePoolRecorderInnerSuffix; - - public function __construct(string $dataCollectorCacheId = 'data_collector.cache', string $cachePoolTag = 'cache.pool', string $cachePoolRecorderInnerSuffix = '.recorder_inner') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->dataCollectorCacheId = $dataCollectorCacheId; - $this->cachePoolTag = $cachePoolTag; - $this->cachePoolRecorderInnerSuffix = $cachePoolRecorderInnerSuffix; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dataCollectorCacheId)) { - return; - } - - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $attributes) { - $poolName = $attributes[0]['name'] ?? $id; - - $this->addToCollector($id, $poolName, $container); - } - } - - private function addToCollector(string $id, string $name, ContainerBuilder $container) - { - $definition = $container->getDefinition($id); - if ($definition->isAbstract()) { - return; - } - - $collectorDefinition = $container->getDefinition($this->dataCollectorCacheId); - $recorder = new Definition(is_subclass_of($definition->getClass(), TagAwareAdapterInterface::class) ? TraceableTagAwareAdapter::class : TraceableAdapter::class); - $recorder->setTags($definition->getTags()); - if (!$definition->isPublic() || !$definition->isPrivate()) { - $recorder->setPublic($definition->isPublic()); - } - $recorder->setArguments([new Reference($innerId = $id.$this->cachePoolRecorderInnerSuffix)]); - - foreach ($definition->getMethodCalls() as [$method, $args]) { - if ('setCallbackWrapper' !== $method || !$args[0] instanceof Definition || !($args[0]->getArguments()[2] ?? null) instanceof Definition) { - continue; - } - if ([new Reference($id), 'setCallbackWrapper'] == $args[0]->getArguments()[2]->getFactory()) { - $args[0]->getArguments()[2]->setFactory([new Reference($innerId), 'setCallbackWrapper']); - } - } - - $definition->setTags([]); - $definition->setPublic(false); - - $container->setDefinition($innerId, $definition); - $container->setDefinition($id, $recorder); - - // Tell the collector to add the new instance - $collectorDefinition->addMethodCall('addInstance', [$name, new Reference($id)]); - $collectorDefinition->setPublic(false); - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php deleted file mode 100644 index c9b04ad..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class CachePoolClearerPass implements CompilerPassInterface -{ - private $cachePoolClearerTag; - - public function __construct(string $cachePoolClearerTag = 'cache.pool.clearer') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cachePoolClearerTag = $cachePoolClearerTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $container->getParameterBag()->remove('cache.prefix.seed'); - - foreach ($container->findTaggedServiceIds($this->cachePoolClearerTag) as $id => $attr) { - $clearer = $container->getDefinition($id); - $pools = []; - foreach ($clearer->getArgument(0) as $name => $ref) { - if ($container->hasDefinition($ref)) { - $pools[$name] = new Reference($ref); - } - } - $clearer->replaceArgument(0, $pools); - } - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPass.php deleted file mode 100644 index 14ac2bd..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\ParameterNormalizer; -use Symfony\Component\Cache\Messenger\EarlyExpirationDispatcher; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class CachePoolPass implements CompilerPassInterface -{ - private $cachePoolTag; - private $kernelResetTag; - private $cacheClearerId; - private $cachePoolClearerTag; - private $cacheSystemClearerId; - private $cacheSystemClearerTag; - private $reverseContainerId; - private $reversibleTag; - private $messageHandlerId; - - public function __construct(string $cachePoolTag = 'cache.pool', string $kernelResetTag = 'kernel.reset', string $cacheClearerId = 'cache.global_clearer', string $cachePoolClearerTag = 'cache.pool.clearer', string $cacheSystemClearerId = 'cache.system_clearer', string $cacheSystemClearerTag = 'kernel.cache_clearer', string $reverseContainerId = 'reverse_container', string $reversibleTag = 'container.reversible', string $messageHandlerId = 'cache.early_expiration_handler') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cachePoolTag = $cachePoolTag; - $this->kernelResetTag = $kernelResetTag; - $this->cacheClearerId = $cacheClearerId; - $this->cachePoolClearerTag = $cachePoolClearerTag; - $this->cacheSystemClearerId = $cacheSystemClearerId; - $this->cacheSystemClearerTag = $cacheSystemClearerTag; - $this->reverseContainerId = $reverseContainerId; - $this->reversibleTag = $reversibleTag; - $this->messageHandlerId = $messageHandlerId; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if ($container->hasParameter('cache.prefix.seed')) { - $seed = $container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed')); - } else { - $seed = '_'.$container->getParameter('kernel.project_dir'); - $seed .= '.'.$container->getParameter('kernel.container_class'); - } - - $needsMessageHandler = false; - $allPools = []; - $clearers = []; - $attributes = [ - 'provider', - 'name', - 'namespace', - 'default_lifetime', - 'early_expiration_message_bus', - 'reset', - ]; - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) { - $adapter = $pool = $container->getDefinition($id); - if ($pool->isAbstract()) { - continue; - } - $class = $adapter->getClass(); - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $class = $class ?: $adapter->getClass(); - if ($t = $adapter->getTag($this->cachePoolTag)) { - $tags[0] += $t[0]; - } - } - $name = $tags[0]['name'] ?? $id; - if (!isset($tags[0]['namespace'])) { - $namespaceSeed = $seed; - if (null !== $class) { - $namespaceSeed .= '.'.$class; - } - - $tags[0]['namespace'] = $this->getNamespace($namespaceSeed, $name); - } - if (isset($tags[0]['clearer'])) { - $clearer = $tags[0]['clearer']; - while ($container->hasAlias($clearer)) { - $clearer = (string) $container->getAlias($clearer); - } - } else { - $clearer = null; - } - unset($tags[0]['clearer'], $tags[0]['name']); - - if (isset($tags[0]['provider'])) { - $tags[0]['provider'] = new Reference(static::getServiceProvider($container, $tags[0]['provider'])); - } - - if (ChainAdapter::class === $class) { - $adapters = []; - foreach ($adapter->getArgument(0) as $provider => $adapter) { - if ($adapter instanceof ChildDefinition) { - $chainedPool = $adapter; - } else { - $chainedPool = $adapter = new ChildDefinition($adapter); - } - - $chainedTags = [\is_int($provider) ? [] : ['provider' => $provider]]; - $chainedClass = ''; - - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $chainedClass = $chainedClass ?: $adapter->getClass(); - if ($t = $adapter->getTag($this->cachePoolTag)) { - $chainedTags[0] += $t[0]; - } - } - - if (ChainAdapter::class === $chainedClass) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent())); - } - - $i = 0; - - if (isset($chainedTags[0]['provider'])) { - $chainedPool->replaceArgument($i++, new Reference(static::getServiceProvider($container, $chainedTags[0]['provider']))); - } - - if (isset($tags[0]['namespace']) && !\in_array($adapter->getClass(), [ArrayAdapter::class, NullAdapter::class], true)) { - $chainedPool->replaceArgument($i++, $tags[0]['namespace']); - } - - if (isset($tags[0]['default_lifetime'])) { - $chainedPool->replaceArgument($i++, $tags[0]['default_lifetime']); - } - - $adapters[] = $chainedPool; - } - - $pool->replaceArgument(0, $adapters); - unset($tags[0]['provider'], $tags[0]['namespace']); - $i = 1; - } else { - $i = 0; - } - - foreach ($attributes as $attr) { - if (!isset($tags[0][$attr])) { - // no-op - } elseif ('reset' === $attr) { - if ($tags[0][$attr]) { - $pool->addTag($this->kernelResetTag, ['method' => $tags[0][$attr]]); - } - } elseif ('early_expiration_message_bus' === $attr) { - $needsMessageHandler = true; - $pool->addMethodCall('setCallbackWrapper', [(new Definition(EarlyExpirationDispatcher::class)) - ->addArgument(new Reference($tags[0]['early_expiration_message_bus'])) - ->addArgument(new Reference($this->reverseContainerId)) - ->addArgument((new Definition('callable')) - ->setFactory([new Reference($id), 'setCallbackWrapper']) - ->addArgument(null) - ), - ]); - $pool->addTag($this->reversibleTag); - } elseif ('namespace' !== $attr || !\in_array($class, [ArrayAdapter::class, NullAdapter::class], true)) { - $argument = $tags[0][$attr]; - - if ('default_lifetime' === $attr && !is_numeric($argument)) { - $argument = (new Definition('int', [$argument])) - ->setFactory([ParameterNormalizer::class, 'normalizeDuration']); - } - - $pool->replaceArgument($i++, $argument); - } - unset($tags[0][$attr]); - } - if (!empty($tags[0])) { - throw new InvalidArgumentException(sprintf('Invalid "%s" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $this->cachePoolTag, $id, implode('", "', array_keys($tags[0])))); - } - - if (null !== $clearer) { - $clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - $allPools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - if (!$needsMessageHandler) { - $container->removeDefinition($this->messageHandlerId); - } - - $notAliasedCacheClearerId = $this->cacheClearerId; - while ($container->hasAlias($this->cacheClearerId)) { - $this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId); - } - if ($container->hasDefinition($this->cacheClearerId)) { - $clearers[$notAliasedCacheClearerId] = $allPools; - } - - foreach ($clearers as $id => $pools) { - $clearer = $container->getDefinition($id); - if ($clearer instanceof ChildDefinition) { - $clearer->replaceArgument(0, $pools); - } else { - $clearer->setArgument(0, $pools); - } - $clearer->addTag($this->cachePoolClearerTag); - - if ($this->cacheSystemClearerId === $id) { - $clearer->addTag($this->cacheSystemClearerTag); - } - } - - $allPoolsKeys = array_keys($allPools); - - if ($container->hasDefinition('console.command.cache_pool_list')) { - $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, $allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_clear')) { - $container->getDefinition('console.command.cache_pool_clear')->addArgument($allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_delete')) { - $container->getDefinition('console.command.cache_pool_delete')->addArgument($allPoolsKeys); - } - } - - private function getNamespace(string $seed, string $id) - { - return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10); - } - - /** - * @internal - */ - public static function getServiceProvider(ContainerBuilder $container, string $name) - { - $container->resolveEnvPlaceholders($name, null, $usedEnvs); - - if ($usedEnvs || preg_match('#^[a-z]++:#', $name)) { - $dsn = $name; - - if (!$container->hasDefinition($name = '.cache_connection.'.ContainerBuilder::hash($dsn))) { - $definition = new Definition(AbstractAdapter::class); - $definition->setPublic(false); - $definition->setFactory([AbstractAdapter::class, 'createConnection']); - $definition->setArguments([$dsn, ['lazy' => true]]); - $container->setDefinition($name, $definition); - } - } - - return $name; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php deleted file mode 100644 index 86a1906..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Rob Frawley 2nd - */ -class CachePoolPrunerPass implements CompilerPassInterface -{ - private $cacheCommandServiceId; - private $cachePoolTag; - - public function __construct(string $cacheCommandServiceId = 'console.command.cache_pool_prune', string $cachePoolTag = 'cache.pool') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cacheCommandServiceId = $cacheCommandServiceId; - $this->cachePoolTag = $cachePoolTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->cacheCommandServiceId)) { - return; - } - - $services = []; - - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) { - $class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass()); - - if (!$reflection = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - - if ($reflection->implementsInterface(PruneableInterface::class)) { - $services[$id] = new Reference($id); - } - } - - $container->getDefinition($this->cacheCommandServiceId)->replaceArgument(0, new IteratorArgument($services)); - } -} diff --git a/vendor/symfony/cache/DoctrineProvider.php b/vendor/symfony/cache/DoctrineProvider.php deleted file mode 100644 index 7b55aae..0000000 --- a/vendor/symfony/cache/DoctrineProvider.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Doctrine\Common\Cache\CacheProvider; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Contracts\Service\ResetInterface; - -if (!class_exists(CacheProvider::class)) { - return; -} - -/** - * @author Nicolas Grekas - * - * @deprecated Use Doctrine\Common\Cache\Psr6\DoctrineProvider instead - */ -class DoctrineProvider extends CacheProvider implements PruneableInterface, ResettableInterface -{ - private $pool; - - public function __construct(CacheItemPoolInterface $pool) - { - trigger_deprecation('symfony/cache', '5.4', '"%s" is deprecated, use "Doctrine\Common\Cache\Psr6\DoctrineProvider" instead.', __CLASS__); - - $this->pool = $pool; - } - - /** - * {@inheritdoc} - */ - public function prune() - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - $this->setNamespace($this->getNamespace()); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - protected function doFetch($id) - { - $item = $this->pool->getItem(rawurlencode($id)); - - return $item->isHit() ? $item->get() : false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doContains($id) - { - return $this->pool->hasItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $item = $this->pool->getItem(rawurlencode($id)); - - if (0 < $lifeTime) { - $item->expiresAfter($lifeTime); - } - - return $this->pool->save($item->set($data)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doDelete($id) - { - return $this->pool->deleteItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doFlush() - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return array|null - */ - protected function doGetStats() - { - return null; - } -} diff --git a/vendor/symfony/cache/Exception/CacheException.php b/vendor/symfony/cache/Exception/CacheException.php deleted file mode 100644 index d2e975b..0000000 --- a/vendor/symfony/cache/Exception/CacheException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class CacheException extends \Exception implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/InvalidArgumentException.php b/vendor/symfony/cache/Exception/InvalidArgumentException.php deleted file mode 100644 index 7f9584a..0000000 --- a/vendor/symfony/cache/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\InvalidArgumentException as Psr6CacheInterface; -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/LogicException.php b/vendor/symfony/cache/Exception/LogicException.php deleted file mode 100644 index 9ffa7ed..0000000 --- a/vendor/symfony/cache/Exception/LogicException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class LogicException extends \LogicException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/LICENSE b/vendor/symfony/cache/LICENSE deleted file mode 100644 index 7fa9539..0000000 --- a/vendor/symfony/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache/LockRegistry.php b/vendor/symfony/cache/LockRegistry.php deleted file mode 100644 index 23e5b4e..0000000 --- a/vendor/symfony/cache/LockRegistry.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Log\LoggerInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * LockRegistry is used internally by existing adapters to protect against cache stampede. - * - * It does so by wrapping the computation of items in a pool of locks. - * Foreach each apps, there can be at most 20 concurrent processes that - * compute items at the same time and only one per cache-key. - * - * @author Nicolas Grekas - */ -final class LockRegistry -{ - private static $openedFiles = []; - private static $lockedFiles; - - /** - * The number of items in this list controls the max number of concurrent processes. - */ - private static $files = [ - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ApcuAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ChainAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseBucketAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseCollectionAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineDbalAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'MemcachedAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'NullAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ParameterNormalizer.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PdoAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpFilesAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ProxyAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'Psr16Adapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableTagAwareAdapter.php', - ]; - - /** - * Defines a set of existing files that will be used as keys to acquire locks. - * - * @return array The previously defined set of files - */ - public static function setFiles(array $files): array - { - $previousFiles = self::$files; - self::$files = $files; - - foreach (self::$openedFiles as $file) { - if ($file) { - flock($file, \LOCK_UN); - fclose($file); - } - } - self::$openedFiles = self::$lockedFiles = []; - - return $previousFiles; - } - - public static function compute(callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata = null, LoggerInterface $logger = null) - { - if ('\\' === \DIRECTORY_SEPARATOR && null === self::$lockedFiles) { - // disable locking on Windows by default - self::$files = self::$lockedFiles = []; - } - - $key = self::$files ? abs(crc32($item->getKey())) % \count(self::$files) : -1; - - if ($key < 0 || self::$lockedFiles || !$lock = self::open($key)) { - return $callback($item, $save); - } - - while (true) { - try { - $locked = false; - // race to get the lock in non-blocking mode - $locked = flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); - - if ($locked || !$wouldBlock) { - $logger && $logger->info(sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]); - self::$lockedFiles[$key] = true; - - $value = $callback($item, $save); - - if ($save) { - if ($setMetadata) { - $setMetadata($item); - } - - $pool->save($item->set($value)); - $save = false; - } - - return $value; - } - // if we failed the race, retry locking in blocking mode to wait for the winner - $logger && $logger->info('Item "{key}" is locked, waiting for it to be released', ['key' => $item->getKey()]); - flock($lock, \LOCK_SH); - } finally { - flock($lock, \LOCK_UN); - unset(self::$lockedFiles[$key]); - } - static $signalingException, $signalingCallback; - $signalingException = $signalingException ?? unserialize("O:9:\"Exception\":1:{s:16:\"\0Exception\0trace\";a:0:{}}"); - $signalingCallback = $signalingCallback ?? function () use ($signalingException) { throw $signalingException; }; - - try { - $value = $pool->get($item->getKey(), $signalingCallback, 0); - $logger && $logger->info('Item "{key}" retrieved after lock was released', ['key' => $item->getKey()]); - $save = false; - - return $value; - } catch (\Exception $e) { - if ($signalingException !== $e) { - throw $e; - } - $logger && $logger->info('Item "{key}" not found while lock was released, now retrying', ['key' => $item->getKey()]); - } - } - - return null; - } - - private static function open(int $key) - { - if (null !== $h = self::$openedFiles[$key] ?? null) { - return $h; - } - set_error_handler(function () {}); - try { - $h = fopen(self::$files[$key], 'r+'); - } finally { - restore_error_handler(); - } - - return self::$openedFiles[$key] = $h ?: @fopen(self::$files[$key], 'r'); - } -} diff --git a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php b/vendor/symfony/cache/Marshaller/DefaultMarshaller.php deleted file mode 100644 index 3202dd6..0000000 --- a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Serializes/unserializes values using igbinary_serialize() if available, serialize() otherwise. - * - * @author Nicolas Grekas - */ -class DefaultMarshaller implements MarshallerInterface -{ - private $useIgbinarySerialize = true; - private $throwOnSerializationFailure; - - public function __construct(bool $useIgbinarySerialize = null, bool $throwOnSerializationFailure = false) - { - if (null === $useIgbinarySerialize) { - $useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<=')); - } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')))) { - throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.'); - } - $this->useIgbinarySerialize = $useIgbinarySerialize; - $this->throwOnSerializationFailure = $throwOnSerializationFailure; - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $serialized = $failed = []; - - foreach ($values as $id => $value) { - try { - if ($this->useIgbinarySerialize) { - $serialized[$id] = igbinary_serialize($value); - } else { - $serialized[$id] = serialize($value); - } - } catch (\Exception $e) { - if ($this->throwOnSerializationFailure) { - throw new \ValueError($e->getMessage(), 0, $e); - } - $failed[] = $id; - } - } - - return $serialized; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - if ('b:0;' === $value) { - return false; - } - if ('N;' === $value) { - return null; - } - static $igbinaryNull; - if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') ? igbinary_serialize(null) : false)) { - return null; - } - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - if (':' === ($value[1] ?? ':')) { - if (false !== $value = unserialize($value)) { - return $value; - } - } elseif (false === $igbinaryNull) { - throw new \RuntimeException('Failed to unserialize values, did you forget to install the "igbinary" extension?'); - } elseif (null !== $value = igbinary_unserialize($value)) { - return $value; - } - - throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize values.'); - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - throw new \DomainException('Class not found: '.$class); - } -} diff --git a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php b/vendor/symfony/cache/Marshaller/DeflateMarshaller.php deleted file mode 100644 index 5544806..0000000 --- a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Compresses values using gzdeflate(). - * - * @author Nicolas Grekas - */ -class DeflateMarshaller implements MarshallerInterface -{ - private $marshaller; - - public function __construct(MarshallerInterface $marshaller) - { - if (!\function_exists('gzdeflate')) { - throw new CacheException('The "zlib" PHP extension is not loaded.'); - } - - $this->marshaller = $marshaller; - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - return array_map('gzdeflate', $this->marshaller->marshall($values, $failed)); - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - if (false !== $inflatedValue = @gzinflate($value)) { - $value = $inflatedValue; - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/MarshallerInterface.php b/vendor/symfony/cache/Marshaller/MarshallerInterface.php deleted file mode 100644 index cdd6c40..0000000 --- a/vendor/symfony/cache/Marshaller/MarshallerInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * Serializes/unserializes PHP values. - * - * Implementations of this interface MUST deal with errors carefully. They MUST - * also deal with forward and backward compatibility at the storage format level. - * - * @author Nicolas Grekas - */ -interface MarshallerInterface -{ - /** - * Serializes a list of values. - * - * When serialization fails for a specific value, no exception should be - * thrown. Instead, its key should be listed in $failed. - */ - public function marshall(array $values, ?array &$failed): array; - - /** - * Unserializes a single value and throws an exception if anything goes wrong. - * - * @return mixed - * - * @throws \Exception Whenever unserialization fails - */ - public function unmarshall(string $value); -} diff --git a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php b/vendor/symfony/cache/Marshaller/SodiumMarshaller.php deleted file mode 100644 index dbf486a..0000000 --- a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * Encrypt/decrypt values using Libsodium. - * - * @author Ahmed TAILOULOUTE - */ -class SodiumMarshaller implements MarshallerInterface -{ - private $marshaller; - private $decryptionKeys; - - /** - * @param string[] $decryptionKeys The key at index "0" is required and is used to decrypt and encrypt values; - * more rotating keys can be provided to decrypt values; - * each key must be generated using sodium_crypto_box_keypair() - */ - public function __construct(array $decryptionKeys, MarshallerInterface $marshaller = null) - { - if (!self::isSupported()) { - throw new CacheException('The "sodium" PHP extension is not loaded.'); - } - - if (!isset($decryptionKeys[0])) { - throw new InvalidArgumentException('At least one decryption key must be provided at index "0".'); - } - - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - $this->decryptionKeys = $decryptionKeys; - } - - public static function isSupported(): bool - { - return \function_exists('sodium_crypto_box_seal'); - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $encryptionKey = sodium_crypto_box_publickey($this->decryptionKeys[0]); - - $encryptedValues = []; - foreach ($this->marshaller->marshall($values, $failed) as $k => $v) { - $encryptedValues[$k] = sodium_crypto_box_seal($v, $encryptionKey); - } - - return $encryptedValues; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - foreach ($this->decryptionKeys as $k) { - if (false !== $decryptedValue = @sodium_crypto_box_seal_open($value, $k)) { - $value = $decryptedValue; - break; - } - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php b/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php deleted file mode 100644 index 5d1e303..0000000 --- a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * A marshaller optimized for data structures generated by AbstractTagAwareAdapter. - * - * @author Nicolas Grekas - */ -class TagAwareMarshaller implements MarshallerInterface -{ - private $marshaller; - - public function __construct(MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $failed = $notSerialized = $serialized = []; - - foreach ($values as $id => $value) { - if (\is_array($value) && \is_array($value['tags'] ?? null) && \array_key_exists('value', $value) && \count($value) === 2 + (\is_string($value['meta'] ?? null) && 8 === \strlen($value['meta']))) { - // if the value is an array with keys "tags", "value" and "meta", use a compact serialization format - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F allow detecting this format quickly in unmarshall() - - $v = $this->marshaller->marshall($value, $f); - - if ($f) { - $f = []; - $failed[] = $id; - } else { - if ([] === $value['tags']) { - $v['tags'] = ''; - } - - $serialized[$id] = "\x9D".($value['meta'] ?? "\0\0\0\0\0\0\0\0").pack('N', \strlen($v['tags'])).$v['tags'].$v['value']; - $serialized[$id][9] = "\x5F"; - } - } else { - // other arbitratry values are serialized using the decorated marshaller below - $notSerialized[$id] = $value; - } - } - - if ($notSerialized) { - $serialized += $this->marshaller->marshall($notSerialized, $f); - $failed = array_merge($failed, $f); - } - - return $serialized; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 >= \strlen($value) || "\x9D" !== $value[0] || "\0" !== $value[5] || "\x5F" !== $value[9]) { - return $this->marshaller->unmarshall($value); - } - - // data consists of value, tags and metadata which we need to unpack - $meta = substr($value, 1, 12); - $meta[8] = "\0"; - $tagLen = unpack('Nlen', $meta, 8)['len']; - $meta = substr($meta, 0, 8); - - return [ - 'value' => $this->marshaller->unmarshall(substr($value, 13 + $tagLen)), - 'tags' => $tagLen ? $this->marshaller->unmarshall(substr($value, 13, $tagLen)) : [], - 'meta' => "\0\0\0\0\0\0\0\0" === $meta ? null : $meta, - ]; - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php b/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php deleted file mode 100644 index 6f11b8b..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Stamp\HandledStamp; - -/** - * Sends the computation of cached values to a message bus. - */ -class EarlyExpirationDispatcher -{ - private $bus; - private $reverseContainer; - private $callbackWrapper; - - public function __construct(MessageBusInterface $bus, ReverseContainer $reverseContainer, callable $callbackWrapper = null) - { - $this->bus = $bus; - $this->reverseContainer = $reverseContainer; - $this->callbackWrapper = $callbackWrapper; - } - - public function __invoke(callable $callback, CacheItem $item, bool &$save, AdapterInterface $pool, \Closure $setMetadata, LoggerInterface $logger = null) - { - if (!$item->isHit() || null === $message = EarlyExpirationMessage::create($this->reverseContainer, $callback, $item, $pool)) { - // The item is stale or the callback cannot be reversed: we must compute the value now - $logger && $logger->info('Computing item "{key}" online: '.($item->isHit() ? 'callback cannot be reversed' : 'item is stale'), ['key' => $item->getKey()]); - - return null !== $this->callbackWrapper ? ($this->callbackWrapper)($callback, $item, $save, $pool, $setMetadata, $logger) : $callback($item, $save); - } - - $envelope = $this->bus->dispatch($message); - - if ($logger) { - if ($envelope->last(HandledStamp::class)) { - $logger->info('Item "{key}" was computed online', ['key' => $item->getKey()]); - } else { - $logger->info('Item "{key}" sent for recomputation', ['key' => $item->getKey()]); - } - } - - // The item's value is not stale, no need to write it to the backend - $save = false; - - return $message->getItem()->get() ?? $item->get(); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php b/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php deleted file mode 100644 index 1f0bd56..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; - -/** - * Computes cached values sent to a message bus. - */ -class EarlyExpirationHandler implements MessageHandlerInterface -{ - private $reverseContainer; - private $processedNonces = []; - - public function __construct(ReverseContainer $reverseContainer) - { - $this->reverseContainer = $reverseContainer; - } - - public function __invoke(EarlyExpirationMessage $message) - { - $item = $message->getItem(); - $metadata = $item->getMetadata(); - $expiry = $metadata[CacheItem::METADATA_EXPIRY] ?? 0; - $ctime = $metadata[CacheItem::METADATA_CTIME] ?? 0; - - if ($expiry && $ctime) { - // skip duplicate or expired messages - - $processingNonce = [$expiry, $ctime]; - $pool = $message->getPool(); - $key = $item->getKey(); - - if (($this->processedNonces[$pool][$key] ?? null) === $processingNonce) { - return; - } - - if (microtime(true) >= $expiry) { - return; - } - - $this->processedNonces[$pool] = [$key => $processingNonce] + ($this->processedNonces[$pool] ?? []); - - if (\count($this->processedNonces[$pool]) > 100) { - array_pop($this->processedNonces[$pool]); - } - } - - static $setMetadata; - - $setMetadata ?? $setMetadata = \Closure::bind( - function (CacheItem $item, float $startTime) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } - }, - null, - CacheItem::class - ); - - $startTime = microtime(true); - $pool = $message->findPool($this->reverseContainer); - $callback = $message->findCallback($this->reverseContainer); - $value = $callback($item); - $setMetadata($item, $startTime); - $pool->save($item->set($value)); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php b/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php deleted file mode 100644 index e25c07e..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; - -/** - * Conveys a cached value that needs to be computed. - */ -final class EarlyExpirationMessage -{ - private $item; - private $pool; - private $callback; - - public static function create(ReverseContainer $reverseContainer, callable $callback, CacheItem $item, AdapterInterface $pool): ?self - { - try { - $item = clone $item; - $item->set(null); - } catch (\Exception $e) { - return null; - } - - $pool = $reverseContainer->getId($pool); - - if (\is_object($callback)) { - if (null === $id = $reverseContainer->getId($callback)) { - return null; - } - - $callback = '@'.$id; - } elseif (!\is_array($callback)) { - $callback = (string) $callback; - } elseif (!\is_object($callback[0])) { - $callback = [(string) $callback[0], (string) $callback[1]]; - } else { - if (null === $id = $reverseContainer->getId($callback[0])) { - return null; - } - - $callback = ['@'.$id, (string) $callback[1]]; - } - - return new self($item, $pool, $callback); - } - - public function getItem(): CacheItem - { - return $this->item; - } - - public function getPool(): string - { - return $this->pool; - } - - public function getCallback() - { - return $this->callback; - } - - public function findPool(ReverseContainer $reverseContainer): AdapterInterface - { - return $reverseContainer->getService($this->pool); - } - - public function findCallback(ReverseContainer $reverseContainer): callable - { - if (\is_string($callback = $this->callback)) { - return '@' === $callback[0] ? $reverseContainer->getService(substr($callback, 1)) : $callback; - } - if ('@' === $callback[0][0]) { - $callback[0] = $reverseContainer->getService(substr($callback[0], 1)); - } - - return $callback; - } - - private function __construct(CacheItem $item, string $pool, $callback) - { - $this->item = $item; - $this->pool = $pool; - $this->callback = $callback; - } -} diff --git a/vendor/symfony/cache/PruneableInterface.php b/vendor/symfony/cache/PruneableInterface.php deleted file mode 100644 index 4261525..0000000 --- a/vendor/symfony/cache/PruneableInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -/** - * Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items. - */ -interface PruneableInterface -{ - /** - * @return bool - */ - public function prune(); -} diff --git a/vendor/symfony/cache/Psr16Cache.php b/vendor/symfony/cache/Psr16Cache.php deleted file mode 100644 index 28c7de6..0000000 --- a/vendor/symfony/cache/Psr16Cache.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Cache\CacheException as Psr6CacheException; -use Psr\Cache\CacheItemPoolInterface; -use Psr\SimpleCache\CacheException as SimpleCacheException; -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Traits\ProxyTrait; - -if (null !== (new \ReflectionMethod(CacheInterface::class, 'get'))->getReturnType()) { - throw new \LogicException('psr/simple-cache 3.0+ is not compatible with this version of symfony/cache. Please upgrade symfony/cache to 6.0+ or downgrade psr/simple-cache to 1.x or 2.x.'); -} - -/** - * Turns a PSR-6 cache into a PSR-16 one. - * - * @author Nicolas Grekas - */ -class Psr16Cache implements CacheInterface, PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - private const METADATA_EXPIRY_OFFSET = 1527506807; - - private $createCacheItem; - private $cacheItemPrototype; - - public function __construct(CacheItemPoolInterface $pool) - { - $this->pool = $pool; - - if (!$pool instanceof AdapterInterface) { - return; - } - $cacheItemPrototype = &$this->cacheItemPrototype; - $createCacheItem = \Closure::bind( - static function ($key, $value, $allowInt = false) use (&$cacheItemPrototype) { - $item = clone $cacheItemPrototype; - $item->poolHash = $item->innerItem = null; - if ($allowInt && \is_int($key)) { - $item->key = (string) $key; - } else { - \assert('' !== CacheItem::validateKey($key)); - $item->key = $key; - } - $item->value = $value; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - $this->createCacheItem = function ($key, $value, $allowInt = false) use ($createCacheItem) { - if (null === $this->cacheItemPrototype) { - $this->get($allowInt && \is_int($key) ? (string) $key : $key); - } - $this->createCacheItem = $createCacheItem; - - return $createCacheItem($key, null, $allowInt)->set($value); - }; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get($key, $default = null) - { - try { - $item = $this->pool->getItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null === $this->cacheItemPrototype) { - $this->cacheItemPrototype = clone $item; - $this->cacheItemPrototype->set(null); - } - - return $item->isHit() ? $item->get() : $default; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function set($key, $value, $ttl = null) - { - try { - if (null !== $f = $this->createCacheItem) { - $item = $f($key, $value); - } else { - $item = $this->pool->getItem($key)->set($value); - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - - return $this->pool->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function delete($key) - { - try { - return $this->pool->deleteItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear() - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return iterable - */ - public function getMultiple($keys, $default = null) - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - $items = $this->pool->getItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $values = []; - - if (!$this->pool instanceof AdapterInterface) { - foreach ($items as $key => $item) { - $values[$key] = $item->isHit() ? $item->get() : $default; - } - - return $values; - } - - foreach ($items as $key => $item) { - if (!$item->isHit()) { - $values[$key] = $default; - continue; - } - $values[$key] = $item->get(); - - if (!$metadata = $item->getMetadata()) { - continue; - } - unset($metadata[CacheItem::METADATA_TAGS]); - - if ($metadata) { - $values[$key] = ["\x9D".pack('VN', (int) (0.1 + $metadata[CacheItem::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[CacheItem::METADATA_CTIME])."\x5F" => $values[$key]]; - } - } - - return $values; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function setMultiple($values, $ttl = null) - { - $valuesIsArray = \is_array($values); - if (!$valuesIsArray && !$values instanceof \Traversable) { - throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', get_debug_type($values))); - } - $items = []; - - try { - if (null !== $f = $this->createCacheItem) { - $valuesIsArray = false; - foreach ($values as $key => $value) { - $items[$key] = $f($key, $value, true); - } - } elseif ($valuesIsArray) { - $items = []; - foreach ($values as $key => $value) { - $items[] = (string) $key; - } - $items = $this->pool->getItems($items); - } else { - foreach ($values as $key => $value) { - if (\is_int($key)) { - $key = (string) $key; - } - $items[$key] = $this->pool->getItem($key)->set($value); - } - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $ok = true; - - foreach ($items as $key => $item) { - if ($valuesIsArray) { - $item->set($values[$key]); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - $ok = $this->pool->saveDeferred($item) && $ok; - } - - return $this->pool->commit() && $ok; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteMultiple($keys) - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - return $this->pool->deleteItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has($key) - { - try { - return $this->pool->hasItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/vendor/symfony/cache/README.md b/vendor/symfony/cache/README.md deleted file mode 100644 index 7405205..0000000 --- a/vendor/symfony/cache/README.md +++ /dev/null @@ -1,19 +0,0 @@ -Symfony PSR-6 implementation for caching -======================================== - -The Cache component provides an extended -[PSR-6](http://www.php-fig.org/psr/psr-6/) implementation for adding cache to -your applications. It is designed to have a low overhead so that caching is -fastest. It ships with a few caching adapters for the most widespread and -suited to caching backends. It also provides a `doctrine/cache` proxy adapter -to cover more advanced caching needs and a proxy adapter for greater -interoperability between PSR-6 implementations. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/cache.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/cache/ResettableInterface.php b/vendor/symfony/cache/ResettableInterface.php deleted file mode 100644 index 7b0a853..0000000 --- a/vendor/symfony/cache/ResettableInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Resets a pool's local state. - */ -interface ResettableInterface extends ResetInterface -{ -} diff --git a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/vendor/symfony/cache/Traits/AbstractAdapterTrait.php deleted file mode 100644 index f0173c4..0000000 --- a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php +++ /dev/null @@ -1,424 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait AbstractAdapterTrait -{ - use LoggerAwareTrait; - - /** - * @var \Closure needs to be set by class, signature is function(string , mixed , bool ) - */ - private static $createCacheItem; - - /** - * @var \Closure needs to be set by class, signature is function(array , string , array <&expiredIds>) - */ - private static $mergeByLifetime; - - private $namespace = ''; - private $defaultLifetime; - private $namespaceVersion = ''; - private $versioningIsEnabled = false; - private $deferred = []; - private $ids = []; - - /** - * @var int|null The maximum length to enforce for identifiers or null when no limit applies - */ - protected $maxIdLength; - - /** - * Fetches several cache items. - * - * @param array $ids The cache identifiers to fetch - * - * @return array|\Traversable - */ - abstract protected function doFetch(array $ids); - - /** - * Confirms if the cache contains specified cache item. - * - * @param string $id The identifier for which to check existence - * - * @return bool - */ - abstract protected function doHave(string $id); - - /** - * Deletes all items in the pool. - * - * @param string $namespace The prefix used for all identifiers managed by this pool - * - * @return bool - */ - abstract protected function doClear(string $namespace); - - /** - * Removes multiple items from the pool. - * - * @param array $ids An array of identifiers that should be removed from the pool - * - * @return bool - */ - abstract protected function doDelete(array $ids); - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * - * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime); - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - try { - return $this->doHave($id); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached: '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $this->deferred = []; - if ($cleared = $this->versioningIsEnabled) { - if ('' === $namespaceVersionToClear = $this->namespaceVersion) { - foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { - $namespaceVersionToClear = $v; - } - } - $namespaceToClear = $this->namespace.$namespaceVersionToClear; - $namespaceVersion = self::formatNamespaceVersion(mt_rand()); - try { - $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0); - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $cleared = false; - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } else { - $this->namespaceVersion = $namespaceVersion; - $this->ids = []; - } - } else { - $namespaceToClear = $this->namespace.$prefix; - } - - try { - return $this->doClear($namespaceToClear) || $cleared; - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->deleteItems([$key]); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $ids = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - if ($this->doDelete($ids)) { - return true; - } - } catch (\Exception $e) { - } - - $ok = true; - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - $isHit = false; - $value = null; - - try { - foreach ($this->doFetch([$id]) as $value) { - $isHit = true; - } - - return (self::$createCacheItem)($key, $value, $isHit); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return (self::$createCacheItem)($key, null, false); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $ids = []; - $commit = false; - - foreach ($keys as $key) { - $ids[] = $this->getId($key); - $commit = $commit || isset($this->deferred[$key]); - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->doFetch($ids); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $items = []; - } - $ids = array_combine($ids, $keys); - - return $this->generateItems($items, $ids); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - /** - * Enables/disables versioning of items. - * - * When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed, - * but old keys may need garbage collection and extra round-trips to the back-end are required. - * - * Calling this method also clears the memoized namespace version and thus forces a resynchonization of it. - * - * @return bool the previous state of versioning - */ - public function enableVersioning(bool $enable = true) - { - $wasEnabled = $this->versioningIsEnabled; - $this->versioningIsEnabled = $enable; - $this->namespaceVersion = ''; - $this->ids = []; - - return $wasEnabled; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->deferred) { - $this->commit(); - } - $this->namespaceVersion = ''; - $this->ids = []; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if ($this->deferred) { - $this->commit(); - } - } - - private function generateItems(iterable $items, array &$keys): \Generator - { - $f = self::$createCacheItem; - - try { - foreach ($items as $id => $value) { - if (!isset($keys[$id])) { - throw new InvalidArgumentException(sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); - } - $key = $keys[$id]; - unset($keys[$id]); - yield $key => $f($key, $value, true); - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - private function getId($key) - { - if ($this->versioningIsEnabled && '' === $this->namespaceVersion) { - $this->ids = []; - $this->namespaceVersion = '1'.static::NS_SEPARATOR; - try { - foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { - $this->namespaceVersion = $v; - } - $e = true; - if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) { - $this->namespaceVersion = self::formatNamespaceVersion(time()); - $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $this->namespaceVersion], 0); - } - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - if (\is_string($key) && isset($this->ids[$key])) { - return $this->namespace.$this->namespaceVersion.$this->ids[$key]; - } - \assert('' !== CacheItem::validateKey($key)); - $this->ids[$key] = $key; - - if (\count($this->ids) > 1000) { - array_splice($this->ids, 0, 500); // stop memory leak if there are many keys - } - - if (null === $this->maxIdLength) { - return $this->namespace.$this->namespaceVersion.$key; - } - if (\strlen($id = $this->namespace.$this->namespaceVersion.$key) > $this->maxIdLength) { - // Use MD5 to favor speed over security, which is not an issue here - $this->ids[$key] = $id = substr_replace(base64_encode(hash('md5', $key, true)), static::NS_SEPARATOR, -(\strlen($this->namespaceVersion) + 2)); - $id = $this->namespace.$this->namespaceVersion.$id; - } - - return $id; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - throw new \DomainException('Class not found: '.$class); - } - - private static function formatNamespaceVersion(int $value): string - { - return strtr(substr_replace(base64_encode(pack('V', $value)), static::NS_SEPARATOR, 5), '/', '_'); - } -} diff --git a/vendor/symfony/cache/Traits/ContractsTrait.php b/vendor/symfony/cache/Traits/ContractsTrait.php deleted file mode 100644 index 9fdb931..0000000 --- a/vendor/symfony/cache/Traits/ContractsTrait.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\LockRegistry; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\CacheTrait; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait ContractsTrait -{ - use CacheTrait { - doGet as private contractsGet; - } - - private $callbackWrapper; - private $computing = []; - - /** - * Wraps the callback passed to ->get() in a callable. - * - * @return callable the previous callback wrapper - */ - public function setCallbackWrapper(?callable $callbackWrapper): callable - { - if (!isset($this->callbackWrapper)) { - $this->callbackWrapper = [LockRegistry::class, 'compute']; - - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - $this->setCallbackWrapper(null); - } - } - - $previousWrapper = $this->callbackWrapper; - $this->callbackWrapper = $callbackWrapper ?? static function (callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger) { - return $callback($item, $save); - }; - - return $previousWrapper; - } - - private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); - } - - static $setMetadata; - - $setMetadata ?? $setMetadata = \Closure::bind( - static function (CacheItem $item, float $startTime, ?array &$metadata) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $metadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = $metadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } else { - unset($metadata[CacheItem::METADATA_EXPIRY], $metadata[CacheItem::METADATA_CTIME]); - } - }, - null, - CacheItem::class - ); - - return $this->contractsGet($pool, $key, function (CacheItem $item, bool &$save) use ($pool, $callback, $setMetadata, &$metadata, $key) { - // don't wrap nor save recursive calls - if (isset($this->computing[$key])) { - $value = $callback($item, $save); - $save = false; - - return $value; - } - - $this->computing[$key] = $key; - $startTime = microtime(true); - - if (!isset($this->callbackWrapper)) { - $this->setCallbackWrapper($this->setCallbackWrapper(null)); - } - - try { - $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (CacheItem $item) use ($setMetadata, $startTime, &$metadata) { - $setMetadata($item, $startTime, $metadata); - }, $this->logger ?? null); - $setMetadata($item, $startTime, $metadata); - - return $value; - } finally { - unset($this->computing[$key]); - } - }, $beta, $metadata, $this->logger ?? null); - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/vendor/symfony/cache/Traits/FilesystemCommonTrait.php deleted file mode 100644 index c06cc30..0000000 --- a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait FilesystemCommonTrait -{ - private $directory; - private $tmp; - - private function init(string $namespace, ?string $directory) - { - if (!isset($directory[0])) { - $directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfony-cache'; - } else { - $directory = realpath($directory) ?: $directory; - } - if (isset($namespace[0])) { - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - $directory .= \DIRECTORY_SEPARATOR.$namespace; - } else { - $directory .= \DIRECTORY_SEPARATOR.'@'; - } - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - $directory .= \DIRECTORY_SEPARATOR; - // On Windows the whole path is limited to 258 chars - if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) { - throw new InvalidArgumentException(sprintf('Cache directory too long (%s).', $directory)); - } - - $this->directory = $directory; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $ok = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if ('' !== $namespace && !str_starts_with($this->getFileKey($file), $namespace)) { - continue; - } - - $ok = ($this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - - foreach ($ids as $id) { - $file = $this->getFile($id); - $ok = (!is_file($file) || $this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - protected function doUnlink(string $file) - { - return @unlink($file); - } - - private function write(string $file, string $data, int $expiresAt = null) - { - set_error_handler(__CLASS__.'::throwError'); - try { - if (null === $this->tmp) { - $this->tmp = $this->directory.bin2hex(random_bytes(6)); - } - try { - $h = fopen($this->tmp, 'x'); - } catch (\ErrorException $e) { - if (!str_contains($e->getMessage(), 'File exists')) { - throw $e; - } - - $this->tmp = $this->directory.bin2hex(random_bytes(6)); - $h = fopen($this->tmp, 'x'); - } - fwrite($h, $data); - fclose($h); - - if (null !== $expiresAt) { - touch($this->tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds - } - - return rename($this->tmp, $file); - } finally { - restore_error_handler(); - } - } - - private function getFile(string $id, bool $mkdir = false, string $directory = null) - { - // Use MD5 to favor speed over security, which is not an issue here - $hash = str_replace('/', '-', base64_encode(hash('md5', static::class.$id, true))); - $dir = ($directory ?? $this->directory).strtoupper($hash[0].\DIRECTORY_SEPARATOR.$hash[1].\DIRECTORY_SEPARATOR); - - if ($mkdir && !is_dir($dir)) { - @mkdir($dir, 0777, true); - } - - return $dir.substr($hash, 2, 20); - } - - private function getFileKey(string $file): string - { - return ''; - } - - private function scanHashDir(string $directory): \Generator - { - if (!is_dir($directory)) { - return; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($directory.$chars[$i])) { - continue; - } - - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($dir = $directory.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - - foreach (@scandir($dir, \SCANDIR_SORT_NONE) ?: [] as $file) { - if ('.' !== $file && '..' !== $file) { - yield $dir.\DIRECTORY_SEPARATOR.$file; - } - } - } - } - } - - /** - * @internal - */ - public static function throwError(int $type, string $message, string $file, int $line) - { - throw new \ErrorException($message, 0, $type, $file, $line); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (method_exists(parent::class, '__destruct')) { - parent::__destruct(); - } - if (null !== $this->tmp && is_file($this->tmp)) { - unlink($this->tmp); - } - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemTrait.php b/vendor/symfony/cache/Traits/FilesystemTrait.php deleted file mode 100644 index 38b741f..0000000 --- a/vendor/symfony/cache/Traits/FilesystemTrait.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * @author Nicolas Grekas - * @author Rob Frawley 2nd - * - * @internal - */ -trait FilesystemTrait -{ - use FilesystemCommonTrait; - - private $marshaller; - - /** - * @return bool - */ - public function prune() - { - $time = time(); - $pruned = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if (!$h = @fopen($file, 'r')) { - continue; - } - - if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) { - fclose($h); - $pruned = @unlink($file) && !file_exists($file) && $pruned; - } else { - fclose($h); - } - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $values = []; - $now = time(); - - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - if (($expiresAt = (int) fgets($h)) && $now >= $expiresAt) { - fclose($h); - @unlink($file); - } else { - $i = rawurldecode(rtrim(fgets($h))); - $value = stream_get_contents($h); - fclose($h); - if ($i === $id) { - $values[$id] = $this->marshaller->unmarshall($value); - } - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - $file = $this->getFile($id); - - return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id])); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - $expiresAt = $lifetime ? (time() + $lifetime) : 0; - $values = $this->marshaller->marshall($values, $failed); - - foreach ($values as $id => $value) { - if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) { - $failed[] = $id; - } - } - - if ($failed && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $failed; - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - fgets($h); // expiry - $encodedKey = fgets($h); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} diff --git a/vendor/symfony/cache/Traits/ProxyTrait.php b/vendor/symfony/cache/Traits/ProxyTrait.php deleted file mode 100644 index c86f360..0000000 --- a/vendor/symfony/cache/Traits/ProxyTrait.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait ProxyTrait -{ - private $pool; - - /** - * {@inheritdoc} - */ - public function prune() - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php b/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php deleted file mode 100644 index deba74f..0000000 --- a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * This file acts as a wrapper to the \RedisCluster implementation so it can accept the same type of calls as - * individual \Redis objects. - * - * Calls are made to individual nodes via: RedisCluster->{method}($host, ...args)' - * according to https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#directed-node-commands - * - * @author Jack Thomas - * - * @internal - */ -class RedisClusterNodeProxy -{ - private $host; - private $redis; - - /** - * @param \RedisCluster|RedisClusterProxy $redis - */ - public function __construct(array $host, $redis) - { - $this->host = $host; - $this->redis = $redis; - } - - public function __call(string $method, array $args) - { - return $this->redis->{$method}($this->host, ...$args); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - return $this->redis->scan($iIterator, $this->host, $strPattern, $iCount); - } - - public function getOption($name) - { - return $this->redis->getOption($name); - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterProxy.php b/vendor/symfony/cache/Traits/RedisClusterProxy.php deleted file mode 100644 index 73c6a4f..0000000 --- a/vendor/symfony/cache/Traits/RedisClusterProxy.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @author Alessandro Chitolina - * - * @internal - */ -class RedisClusterProxy -{ - private $redis; - private $initializer; - - public function __construct(\Closure $initializer) - { - $this->initializer = $initializer; - } - - public function __call(string $method, array $args) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); - } -} diff --git a/vendor/symfony/cache/Traits/RedisProxy.php b/vendor/symfony/cache/Traits/RedisProxy.php deleted file mode 100644 index ec5cfab..0000000 --- a/vendor/symfony/cache/Traits/RedisProxy.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class RedisProxy -{ - private $redis; - private $initializer; - private $ready = false; - - public function __construct(\Redis $redis, \Closure $initializer) - { - $this->redis = $redis; - $this->initializer = $initializer; - } - - public function __call(string $method, array $args) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); - } -} diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php deleted file mode 100644 index 149c9d4..0000000 --- a/vendor/symfony/cache/Traits/RedisTrait.php +++ /dev/null @@ -1,591 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Predis\Command\Redis\UNLINK; -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\RedisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Aurimas Niekis - * @author Nicolas Grekas - * - * @internal - */ -trait RedisTrait -{ - private static $defaultConnectionOptions = [ - 'class' => null, - 'persistent' => 0, - 'persistent_id' => null, - 'timeout' => 30, - 'read_timeout' => 0, - 'retry_interval' => 0, - 'tcp_keepalive' => 0, - 'lazy' => null, - 'redis_cluster' => false, - 'redis_sentinel' => null, - 'dbindex' => 0, - 'failover' => 'none', - 'ssl' => null, // see https://php.net/context.ssl - ]; - private $redis; - private $marshaller; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis - */ - private function init($redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller) - { - parent::__construct($namespace, $defaultLifetime); - - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - - if (!$redis instanceof \Redis && !$redis instanceof \RedisArray && !$redis instanceof \RedisCluster && !$redis instanceof \Predis\ClientInterface && !$redis instanceof RedisProxy && !$redis instanceof RedisClusterProxy) { - throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis))); - } - - if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) { - $options = clone $redis->getOptions(); - \Closure::bind(function () { $this->options['exceptions'] = false; }, $options, $options)(); - $redis = new $redis($redis->getConnection(), $options); - } - - $this->redis = $redis; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * Creates a Redis connection using a DSN configuration. - * - * Example DSN: - * - redis://localhost - * - redis://example.com:1234 - * - redis://secret@example.com/13 - * - redis:///var/run/redis.sock - * - redis://secret@/var/run/redis.sock/13 - * - * @param array $options See self::$defaultConnectionOptions - * - * @return \Redis|\RedisArray|\RedisCluster|RedisClusterProxy|RedisProxy|\Predis\ClientInterface According to the "class" option - * - * @throws InvalidArgumentException when the DSN is invalid - */ - public static function createConnection(string $dsn, array $options = []) - { - if (str_starts_with($dsn, 'redis:')) { - $scheme = 'redis'; - } elseif (str_starts_with($dsn, 'rediss:')) { - $scheme = 'rediss'; - } else { - throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s" does not start with "redis:" or "rediss".', $dsn)); - } - - if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) { - throw new CacheException(sprintf('Cannot find the "redis" extension nor the "predis/predis" package: "%s".', $dsn)); - } - - $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { - if (isset($m[2])) { - $auth = $m[2]; - - if ('' === $auth) { - $auth = null; - } - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn)); - } - - $query = $hosts = []; - - $tls = 'rediss' === $scheme; - $tcpScheme = $tls ? 'tls' : 'tcp'; - - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn)); - } - foreach ($hosts as $host => $parameters) { - if (\is_string($parameters)) { - parse_str($parameters, $parameters); - } - if (false === $i = strrpos($host, ':')) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => $host, 'port' => 6379] + $parameters; - } elseif ($port = (int) substr($host, 1 + $i)) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => substr($host, 0, $i), 'port' => $port] + $parameters; - } else { - $hosts[$host] = ['scheme' => 'unix', 'path' => substr($host, 0, $i)] + $parameters; - } - } - $hosts = array_values($hosts); - } - } - - if (isset($params['host']) || isset($params['path'])) { - if (!isset($params['dbindex']) && isset($params['path'])) { - if (preg_match('#/(\d+)$#', $params['path'], $m)) { - $params['dbindex'] = $m[1]; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } elseif (isset($params['host'])) { - throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s", the "dbindex" parameter must be a number.', $dsn)); - } - } - - if (isset($params['host'])) { - array_unshift($hosts, ['scheme' => $tcpScheme, 'host' => $params['host'], 'port' => $params['port'] ?? 6379]); - } else { - array_unshift($hosts, ['scheme' => 'unix', 'path' => $params['path']]); - } - } - - if (!$hosts) { - throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn)); - } - - $params += $query + $options + self::$defaultConnectionOptions; - - if (isset($params['redis_sentinel']) && !class_exists(\Predis\Client::class) && !class_exists(\RedisSentinel::class)) { - throw new CacheException(sprintf('Redis Sentinel support requires the "predis/predis" package or the "redis" extension v5.2 or higher: "%s".', $dsn)); - } - - if ($params['redis_cluster'] && isset($params['redis_sentinel'])) { - throw new InvalidArgumentException(sprintf('Cannot use both "redis_cluster" and "redis_sentinel" at the same time: "%s".', $dsn)); - } - - if (null === $params['class'] && \extension_loaded('redis')) { - $class = $params['redis_cluster'] ? \RedisCluster::class : (1 < \count($hosts) ? \RedisArray::class : \Redis::class); - } else { - $class = $params['class'] ?? \Predis\Client::class; - } - - if (is_a($class, \Redis::class, true)) { - $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; - $redis = new $class(); - - $initializer = static function ($redis) use ($connect, $params, $dsn, $auth, $hosts, $tls) { - $host = $hosts[0]['host'] ?? $hosts[0]['path']; - $port = $hosts[0]['port'] ?? 0; - - if (isset($hosts[0]['host']) && $tls) { - $host = 'tls://'.$host; - } - - if (isset($params['redis_sentinel'])) { - $sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout']); - - if (!$address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) { - throw new InvalidArgumentException(sprintf('Failed to retrieve master information from master name "%s" and address "%s:%d".', $params['redis_sentinel'], $host, $port)); - } - - [$host, $port] = $address; - } - - try { - @$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') ? [['stream' => $params['ssl'] ?? null]] : []); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $isConnected = $redis->isConnected(); - } finally { - restore_error_handler(); - } - if (!$isConnected) { - $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : ''; - throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$error.'.'); - } - - if ((null !== $auth && !$redis->auth($auth)) - || ($params['dbindex'] && !$redis->select($params['dbindex'])) - ) { - $e = preg_replace('/^ERR /', '', $redis->getLastError()); - throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e.'.'); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } catch (\RedisException $e) { - throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage()); - } - - return true; - }; - - if ($params['lazy']) { - $redis = new RedisProxy($redis, $initializer); - } else { - $initializer($redis); - } - } elseif (is_a($class, \RedisArray::class, true)) { - foreach ($hosts as $i => $host) { - switch ($host['scheme']) { - case 'tcp': $hosts[$i] = $host['host'].':'.$host['port']; break; - case 'tls': $hosts[$i] = 'tls://'.$host['host'].':'.$host['port']; break; - default: $hosts[$i] = $host['path']; - } - } - $params['lazy_connect'] = $params['lazy'] ?? true; - $params['connect_timeout'] = $params['timeout']; - - try { - $redis = new $class($hosts, $params); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } elseif (is_a($class, \RedisCluster::class, true)) { - $initializer = static function () use ($class, $params, $dsn, $hosts) { - foreach ($hosts as $i => $host) { - switch ($host['scheme']) { - case 'tcp': $hosts[$i] = $host['host'].':'.$host['port']; break; - case 'tls': $hosts[$i] = 'tls://'.$host['host'].':'.$host['port']; break; - default: $hosts[$i] = $host['path']; - } - } - - try { - $redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent'], $params['auth'] ?? '', ...\defined('Redis::SCAN_PREFIX') ? [$params['ssl'] ?? null] : []); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - switch ($params['failover']) { - case 'error': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_ERROR); break; - case 'distribute': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE); break; - case 'slaves': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES); break; - } - - return $redis; - }; - - $redis = $params['lazy'] ? new RedisClusterProxy($initializer) : $initializer(); - } elseif (is_a($class, \Predis\ClientInterface::class, true)) { - if ($params['redis_cluster']) { - $params['cluster'] = 'redis'; - } elseif (isset($params['redis_sentinel'])) { - $params['replication'] = 'sentinel'; - $params['service'] = $params['redis_sentinel']; - } - $params += ['parameters' => []]; - $params['parameters'] += [ - 'persistent' => $params['persistent'], - 'timeout' => $params['timeout'], - 'read_write_timeout' => $params['read_timeout'], - 'tcp_nodelay' => true, - ]; - if ($params['dbindex']) { - $params['parameters']['database'] = $params['dbindex']; - } - if (null !== $auth) { - $params['parameters']['password'] = $auth; - } - if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) { - $hosts = $hosts[0]; - } elseif (\in_array($params['failover'], ['slaves', 'distribute'], true) && !isset($params['replication'])) { - $params['replication'] = true; - $hosts[0] += ['alias' => 'master']; - } - $params['exceptions'] = false; - - $redis = new $class($hosts, array_diff_key($params, array_diff_key(self::$defaultConnectionOptions, ['ssl' => null]))); - if (isset($params['redis_sentinel'])) { - $redis->getConnection()->setSentinelTimeout($params['timeout']); - } - } elseif (class_exists($class, false)) { - throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster" nor "Predis\ClientInterface".', $class)); - } else { - throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); - } - - return $redis; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - if (!$ids) { - return []; - } - - $result = []; - - if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) { - $values = $this->pipeline(function () use ($ids) { - foreach ($ids as $id) { - yield 'get' => [$id]; - } - }); - } else { - $values = $this->redis->mget($ids); - - if (!\is_array($values) || \count($values) !== \count($ids)) { - return []; - } - - $values = array_combine($ids, $values); - } - - foreach ($values as $id => $v) { - if ($v) { - $result[$id] = $this->marshaller->unmarshall($v); - } - } - - return $result; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return (bool) $this->redis->exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - $prefixLen = \strlen($prefix); - } - - $cleared = true; - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { - // Predis supports info command only on the master in replication environments - $hosts = [$host->getClientFor('master')]; - } - - foreach ($hosts as $host) { - if (!isset($namespace[0])) { - $cleared = $host->flushDb() && $cleared; - continue; - } - - $info = $host->info('Server'); - $info = !$info instanceof ErrorInterface ? $info['Server'] ?? $info : ['redis_version' => '2.0']; - - if (!$host instanceof \Predis\ClientInterface) { - $prefix = \defined('Redis::SCAN_PREFIX') && (\Redis::SCAN_PREFIX & $host->getOption(\Redis::OPT_SCAN)) ? '' : $host->getOption(\Redis::OPT_PREFIX); - $prefixLen = \strlen($host->getOption(\Redis::OPT_PREFIX) ?? ''); - } - $pattern = $prefix.$namespace.'*'; - - if (!version_compare($info['redis_version'], '2.8', '>=')) { - // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS - // can hang your server when it is executed against large databases (millions of items). - // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above. - $unlink = version_compare($info['redis_version'], '4.0', '>=') ? 'UNLINK' : 'DEL'; - $args = $this->redis instanceof \Predis\ClientInterface ? [0, $pattern] : [[$pattern], 0]; - $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]) for i=1,#keys,5000 do redis.call('$unlink',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $args[0], $args[1]) && $cleared; - continue; - } - - $cursor = null; - do { - $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000); - if (isset($keys[1]) && \is_array($keys[1])) { - $cursor = $keys[0]; - $keys = $keys[1]; - } - if ($keys) { - if ($prefixLen) { - foreach ($keys as $i => $key) { - $keys[$i] = substr($key, $prefixLen); - } - } - $this->doDelete($keys); - } - } while ($cursor = (int) $cursor); - } - - return $cleared; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - if (!$ids) { - return true; - } - - if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) { - static $del; - $del = $del ?? (class_exists(UNLINK::class) ? 'unlink' : 'del'); - - $this->pipeline(function () use ($ids, $del) { - foreach ($ids as $id) { - yield $del => [$id]; - } - })->rewind(); - } else { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($ids); - } catch (\Throwable $e) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($ids); - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $results = $this->pipeline(function () use ($values, $lifetime) { - foreach ($values as $id => $value) { - if (0 >= $lifetime) { - yield 'set' => [$id, $value]; - } else { - yield 'setEx' => [$id, $lifetime, $value]; - } - } - }); - - foreach ($results as $id => $result) { - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - private function pipeline(\Closure $generator, object $redis = null): \Generator - { - $ids = []; - $redis = $redis ?? $this->redis; - - if ($redis instanceof RedisClusterProxy || $redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof RedisCluster)) { - // phpredis & predis don't support pipelining with RedisCluster - // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining - // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 - $results = []; - foreach ($generator() as $command => $args) { - $results[] = $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? ($redis instanceof \Predis\ClientInterface ? $args[2] : $args[1][0]) : $args[0]; - } - } elseif ($redis instanceof \Predis\ClientInterface) { - $results = $redis->pipeline(static function ($redis) use ($generator, &$ids) { - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[2] : $args[0]; - } - }); - } elseif ($redis instanceof \RedisArray) { - $connections = $results = $ids = []; - foreach ($generator() as $command => $args) { - $id = 'eval' === $command ? $args[1][0] : $args[0]; - if (!isset($connections[$h = $redis->_target($id)])) { - $connections[$h] = [$redis->_instance($h), -1]; - $connections[$h][0]->multi(\Redis::PIPELINE); - } - $connections[$h][0]->{$command}(...$args); - $results[] = [$h, ++$connections[$h][1]]; - $ids[] = $id; - } - foreach ($connections as $h => $c) { - $connections[$h] = $c[0]->exec(); - } - foreach ($results as $k => [$h, $c]) { - $results[$k] = $connections[$h][$c]; - } - } else { - $redis->multi(\Redis::PIPELINE); - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[1][0] : $args[0]; - } - $results = $redis->exec(); - } - - if (!$redis instanceof \Predis\ClientInterface && 'eval' === $command && $redis->getLastError()) { - $e = new \RedisException($redis->getLastError()); - $results = array_map(function ($v) use ($e) { return false === $v ? $e : $v; }, $results); - } - - foreach ($ids as $k => $id) { - yield $id => $results[$k]; - } - } - - private function getHosts(): array - { - $hosts = [$this->redis]; - if ($this->redis instanceof \Predis\ClientInterface) { - $connection = $this->redis->getConnection(); - if ($connection instanceof ClusterInterface && $connection instanceof \Traversable) { - $hosts = []; - foreach ($connection as $c) { - $hosts[] = new \Predis\Client($c); - } - } - } elseif ($this->redis instanceof \RedisArray) { - $hosts = []; - foreach ($this->redis->_hosts() as $host) { - $hosts[] = $this->redis->_instance($host); - } - } elseif ($this->redis instanceof RedisClusterProxy || $this->redis instanceof \RedisCluster) { - $hosts = []; - foreach ($this->redis->_masters() as $host) { - $hosts[] = new RedisClusterNodeProxy($host, $this->redis); - } - } - - return $hosts; - } -} diff --git a/vendor/symfony/cache/composer.json b/vendor/symfony/cache/composer.json deleted file mode 100644 index 1ebcfc9..0000000 --- a/vendor/symfony/cache/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "symfony/cache", - "type": "library", - "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", - "keywords": ["caching", "psr6"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.13.1|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Cache\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/config/Builder/ClassBuilder.php b/vendor/symfony/config/Builder/ClassBuilder.php deleted file mode 100644 index 82fadf6..0000000 --- a/vendor/symfony/config/Builder/ClassBuilder.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Build PHP classes to generate config. - * - * @internal - * - * @author Tobias Nyholm - */ -class ClassBuilder -{ - /** @var string */ - private $namespace; - - /** @var string */ - private $name; - - /** @var Property[] */ - private $properties = []; - - /** @var Method[] */ - private $methods = []; - private $require = []; - private $use = []; - private $implements = []; - private $allowExtraKeys = false; - - public function __construct(string $namespace, string $name) - { - $this->namespace = $namespace; - $this->name = ucfirst($this->camelCase($name)).'Config'; - } - - public function getDirectory(): string - { - return str_replace('\\', \DIRECTORY_SEPARATOR, $this->namespace); - } - - public function getFilename(): string - { - return $this->name.'.php'; - } - - public function build(): string - { - $rootPath = explode(\DIRECTORY_SEPARATOR, $this->getDirectory()); - $require = ''; - foreach ($this->require as $class) { - // figure out relative path. - $path = explode(\DIRECTORY_SEPARATOR, $class->getDirectory()); - $path[] = $class->getFilename(); - foreach ($rootPath as $key => $value) { - if ($path[$key] !== $value) { - break; - } - unset($path[$key]); - } - $require .= sprintf('require_once __DIR__.\DIRECTORY_SEPARATOR.\'%s\';', implode('\'.\DIRECTORY_SEPARATOR.\'', $path))."\n"; - } - $use = ''; - foreach (array_keys($this->use) as $statement) { - $use .= sprintf('use %s;', $statement)."\n"; - } - - $implements = [] === $this->implements ? '' : 'implements '.implode(', ', $this->implements); - $body = ''; - foreach ($this->properties as $property) { - $body .= ' '.$property->getContent()."\n"; - } - foreach ($this->methods as $method) { - $lines = explode("\n", $method->getContent()); - foreach ($lines as $line) { - $body .= ' '.$line."\n"; - } - } - - $content = strtr(' $this->namespace, 'REQUIRE' => $require, 'USE' => $use, 'CLASS' => $this->getName(), 'IMPLEMENTS' => $implements, 'BODY' => $body]); - - return $content; - } - - public function addRequire(self $class): void - { - $this->require[] = $class; - } - - public function addUse(string $class): void - { - $this->use[$class] = true; - } - - public function addImplements(string $interface): void - { - $this->implements[] = '\\'.ltrim($interface, '\\'); - } - - public function addMethod(string $name, string $body, array $params = []): void - { - $this->methods[] = new Method(strtr($body, ['NAME' => $this->camelCase($name)] + $params)); - } - - public function addProperty(string $name, string $classType = null, string $defaultValue = null): Property - { - $property = new Property($name, '_' !== $name[0] ? $this->camelCase($name) : $name); - if (null !== $classType) { - $property->setType($classType); - } - $this->properties[] = $property; - $defaultValue = null !== $defaultValue ? sprintf(' = %s', $defaultValue) : ''; - $property->setContent(sprintf('private $%s%s;', $property->getName(), $defaultValue)); - - return $property; - } - - public function getProperties(): array - { - return $this->properties; - } - - private function camelCase(string $input): string - { - $output = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input)))); - - return preg_replace('#\W#', '', $output); - } - - public function getName(): string - { - return $this->name; - } - - public function getNamespace(): string - { - return $this->namespace; - } - - public function getFqcn(): string - { - return '\\'.$this->namespace.'\\'.$this->name; - } - - public function setAllowExtraKeys(bool $allowExtraKeys): void - { - $this->allowExtraKeys = $allowExtraKeys; - } - - public function shouldAllowExtraKeys(): bool - { - return $this->allowExtraKeys; - } -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderGenerator.php b/vendor/symfony/config/Builder/ConfigBuilderGenerator.php deleted file mode 100644 index 920f121..0000000 --- a/vendor/symfony/config/Builder/ConfigBuilderGenerator.php +++ /dev/null @@ -1,470 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BooleanNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\FloatNode; -use Symfony\Component\Config\Definition\IntegerNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; -use Symfony\Component\Config\Definition\VariableNode; -use Symfony\Component\Config\Loader\ParamConfigurator; - -/** - * Generate ConfigBuilders to help create valid config. - * - * @author Tobias Nyholm - */ -class ConfigBuilderGenerator implements ConfigBuilderGeneratorInterface -{ - /** - * @var ClassBuilder[] - */ - private $classes; - private $outputDir; - - public function __construct(string $outputDir) - { - $this->outputDir = $outputDir; - } - - /** - * @return \Closure that will return the root config class - */ - public function build(ConfigurationInterface $configuration): \Closure - { - $this->classes = []; - - $rootNode = $configuration->getConfigTreeBuilder()->buildTree(); - $rootClass = new ClassBuilder('Symfony\\Config', $rootNode->getName()); - - $path = $this->getFullPath($rootClass); - if (!is_file($path)) { - // Generate the class if the file not exists - $this->classes[] = $rootClass; - $this->buildNode($rootNode, $rootClass, $this->getSubNamespace($rootClass)); - $rootClass->addImplements(ConfigBuilderInterface::class); - $rootClass->addMethod('getExtensionAlias', ' -public function NAME(): string -{ - return \'ALIAS\'; -}', ['ALIAS' => $rootNode->getPath()]); - - $this->writeClasses(); - } - - $loader = \Closure::fromCallable(function () use ($path, $rootClass) { - require_once $path; - $className = $rootClass->getFqcn(); - - return new $className(); - }); - - return $loader; - } - - private function getFullPath(ClassBuilder $class): string - { - $directory = $this->outputDir.\DIRECTORY_SEPARATOR.$class->getDirectory(); - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - - return $directory.\DIRECTORY_SEPARATOR.$class->getFilename(); - } - - private function writeClasses(): void - { - foreach ($this->classes as $class) { - $this->buildConstructor($class); - $this->buildToArray($class); - if ($class->getProperties()) { - $class->addProperty('_usedProperties', null, '[]'); - } - $this->buildSetExtraKey($class); - - file_put_contents($this->getFullPath($class), $class->build()); - } - - $this->classes = []; - } - - private function buildNode(NodeInterface $node, ClassBuilder $class, string $namespace): void - { - if (!$node instanceof ArrayNode) { - throw new \LogicException('The node was expected to be an ArrayNode. This Configuration includes an edge case not supported yet.'); - } - - foreach ($node->getChildren() as $child) { - switch (true) { - case $child instanceof ScalarNode: - $this->handleScalarNode($child, $class); - break; - case $child instanceof PrototypedArrayNode: - $this->handlePrototypedArrayNode($child, $class, $namespace); - break; - case $child instanceof VariableNode: - $this->handleVariableNode($child, $class); - break; - case $child instanceof ArrayNode: - $this->handleArrayNode($child, $class, $namespace); - break; - default: - throw new \RuntimeException(sprintf('Unknown node "%s".', \get_class($child))); - } - } - } - - private function handleArrayNode(ArrayNode $node, ClassBuilder $class, string $namespace): void - { - $childClass = new ClassBuilder($namespace, $node->getName()); - $childClass->setAllowExtraKeys($node->shouldIgnoreExtraKeys()); - $class->addRequire($childClass); - $this->classes[] = $childClass; - - $property = $class->addProperty($node->getName(), $childClass->getFqcn()); - $body = ' -public function NAME(array $value = []): CLASS -{ - if (null === $this->PROPERTY) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = new CLASS($value); - } elseif ([] !== $value) { - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); - } - - return $this->PROPERTY; -}'; - $class->addUse(InvalidConfigurationException::class); - $class->addMethod($node->getName(), $body, ['PROPERTY' => $property->getName(), 'CLASS' => $childClass->getFqcn()]); - - $this->buildNode($node, $childClass, $this->getSubNamespace($childClass)); - } - - private function handleVariableNode(VariableNode $node, ClassBuilder $class): void - { - $comment = $this->getComment($node); - $property = $class->addProperty($node->getName()); - $class->addUse(ParamConfigurator::class); - - $body = ' -/** -COMMENT * @return $this - */ -public function NAME($valueDEFAULT): self -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - $class->addMethod($node->getName(), $body, ['PROPERTY' => $property->getName(), 'COMMENT' => $comment, 'DEFAULT' => $node->hasDefaultValue() ? ' = '.var_export($node->getDefaultValue(), true) : '']); - } - - private function handlePrototypedArrayNode(PrototypedArrayNode $node, ClassBuilder $class, string $namespace): void - { - $name = $this->getSingularName($node); - $prototype = $node->getPrototype(); - $methodName = $name; - - $parameterType = $this->getParameterType($prototype); - if (null !== $parameterType || $prototype instanceof ScalarNode) { - $class->addUse(ParamConfigurator::class); - $property = $class->addProperty($node->getName()); - if (null === $key = $node->getKeyAttribute()) { - // This is an array of values; don't use singular name - $body = ' -/** - * @param ParamConfigurator|list $value - * @return $this - */ -public function NAME($value): self -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - - $class->addMethod($node->getName(), $body, ['PROPERTY' => $property->getName(), 'TYPE' => '' === $parameterType ? 'mixed' : $parameterType]); - } else { - $body = ' -/** - * @param ParamConfigurator|TYPE $value - * @return $this - */ -public function NAME(string $VAR, $VALUE): self -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY[$VAR] = $VALUE; - - return $this; -}'; - - $class->addMethod($methodName, $body, ['PROPERTY' => $property->getName(), 'TYPE' => '' === $parameterType ? 'mixed' : $parameterType, 'VAR' => '' === $key ? 'key' : $key, 'VALUE' => 'value' === $key ? 'data' : 'value']); - } - - return; - } - - $childClass = new ClassBuilder($namespace, $name); - if ($prototype instanceof ArrayNode) { - $childClass->setAllowExtraKeys($prototype->shouldIgnoreExtraKeys()); - } - $class->addRequire($childClass); - $this->classes[] = $childClass; - $property = $class->addProperty($node->getName(), $childClass->getFqcn().'[]'); - - if (null === $key = $node->getKeyAttribute()) { - $body = ' -public function NAME(array $value = []): CLASS -{ - $this->_usedProperties[\'PROPERTY\'] = true; - - return $this->PROPERTY[] = new CLASS($value); -}'; - $class->addMethod($methodName, $body, ['PROPERTY' => $property->getName(), 'CLASS' => $childClass->getFqcn()]); - } else { - $body = ' -public function NAME(string $VAR, array $VALUE = []): CLASS -{ - if (!isset($this->PROPERTY[$VAR])) { - $this->_usedProperties[\'PROPERTY\'] = true; - - return $this->PROPERTY[$VAR] = new CLASS($VALUE); - } - if ([] === $VALUE) { - return $this->PROPERTY[$VAR]; - } - - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); -}'; - $class->addUse(InvalidConfigurationException::class); - $class->addMethod($methodName, $body, ['PROPERTY' => $property->getName(), 'CLASS' => $childClass->getFqcn(), 'VAR' => '' === $key ? 'key' : $key, 'VALUE' => 'value' === $key ? 'data' : 'value']); - } - - $this->buildNode($prototype, $childClass, $namespace.'\\'.$childClass->getName()); - } - - private function handleScalarNode(ScalarNode $node, ClassBuilder $class): void - { - $comment = $this->getComment($node); - $property = $class->addProperty($node->getName()); - $class->addUse(ParamConfigurator::class); - - $body = ' -/** -COMMENT * @return $this - */ -public function NAME($value): self -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - - $class->addMethod($node->getName(), $body, ['PROPERTY' => $property->getName(), 'COMMENT' => $comment]); - } - - private function getParameterType(NodeInterface $node): ?string - { - if ($node instanceof BooleanNode) { - return 'bool'; - } - - if ($node instanceof IntegerNode) { - return 'int'; - } - - if ($node instanceof FloatNode) { - return 'float'; - } - - if ($node instanceof EnumNode) { - return ''; - } - - if ($node instanceof PrototypedArrayNode && $node->getPrototype() instanceof ScalarNode) { - // This is just an array of variables - return 'array'; - } - - if ($node instanceof VariableNode) { - // mixed - return ''; - } - - return null; - } - - private function getComment(VariableNode $node): string - { - $comment = ''; - if ('' !== $info = (string) $node->getInfo()) { - $comment .= ' * '.$info."\n"; - } - - foreach ((array) ($node->getExample() ?? []) as $example) { - $comment .= ' * @example '.$example."\n"; - } - - if ('' !== $default = $node->getDefaultValue()) { - $comment .= ' * @default '.(null === $default ? 'null' : var_export($default, true))."\n"; - } - - if ($node instanceof EnumNode) { - $comment .= sprintf(' * @param ParamConfigurator|%s $value', implode('|', array_map(function ($a) { - return var_export($a, true); - }, $node->getValues())))."\n"; - } else { - $parameterType = $this->getParameterType($node); - if (null === $parameterType || '' === $parameterType) { - $parameterType = 'mixed'; - } - $comment .= ' * @param ParamConfigurator|'.$parameterType.' $value'."\n"; - } - - if ($node->isDeprecated()) { - $comment .= ' * @deprecated '.$node->getDeprecation($node->getName(), $node->getParent()->getName())['message']."\n"; - } - - return $comment; - } - - /** - * Pick a good singular name. - */ - private function getSingularName(PrototypedArrayNode $node): string - { - $name = $node->getName(); - if ('s' !== substr($name, -1)) { - return $name; - } - - $parent = $node->getParent(); - $mappings = $parent instanceof ArrayNode ? $parent->getXmlRemappings() : []; - foreach ($mappings as $map) { - if ($map[1] === $name) { - $name = $map[0]; - break; - } - } - - return $name; - } - - private function buildToArray(ClassBuilder $class): void - { - $body = '$output = [];'; - foreach ($class->getProperties() as $p) { - $code = '$this->PROPERTY'; - if (null !== $p->getType()) { - if ($p->isArray()) { - $code = 'array_map(function ($v) { return $v->toArray(); }, $this->PROPERTY)'; - } else { - $code = '$this->PROPERTY->toArray()'; - } - } - - $body .= strtr(' - if (isset($this->_usedProperties[\'PROPERTY\'])) { - $output[\'ORG_NAME\'] = '.$code.'; - }', ['PROPERTY' => $p->getName(), 'ORG_NAME' => $p->getOriginalName()]); - } - - $extraKeys = $class->shouldAllowExtraKeys() ? ' + $this->_extraKeys' : ''; - - $class->addMethod('toArray', ' -public function NAME(): array -{ - '.$body.' - - return $output'.$extraKeys.'; -}'); - } - - private function buildConstructor(ClassBuilder $class): void - { - $body = ''; - foreach ($class->getProperties() as $p) { - $code = '$value[\'ORG_NAME\']'; - if (null !== $p->getType()) { - if ($p->isArray()) { - $code = 'array_map(function ($v) { return new '.$p->getType().'($v); }, $value[\'ORG_NAME\'])'; - } else { - $code = 'new '.$p->getType().'($value[\'ORG_NAME\'])'; - } - } - - $body .= strtr(' - if (array_key_exists(\'ORG_NAME\', $value)) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = '.$code.'; - unset($value[\'ORG_NAME\']); - } -', ['PROPERTY' => $p->getName(), 'ORG_NAME' => $p->getOriginalName()]); - } - - if ($class->shouldAllowExtraKeys()) { - $body .= ' - $this->_extraKeys = $value; -'; - } else { - $body .= ' - if ([] !== $value) { - throw new InvalidConfigurationException(sprintf(\'The following keys are not supported by "%s": \', __CLASS__).implode(\', \', array_keys($value))); - }'; - - $class->addUse(InvalidConfigurationException::class); - } - - $class->addMethod('__construct', ' -public function __construct(array $value = []) -{ -'.$body.' -}'); - } - - private function buildSetExtraKey(ClassBuilder $class): void - { - if (!$class->shouldAllowExtraKeys()) { - return; - } - - $class->addUse(ParamConfigurator::class); - - $class->addProperty('_extraKeys'); - - $class->addMethod('set', ' -/** - * @param ParamConfigurator|mixed $value - * @return $this - */ -public function NAME(string $key, $value): self -{ - $this->_extraKeys[$key] = $value; - - return $this; -}'); - } - - private function getSubNamespace(ClassBuilder $rootClass): string - { - return sprintf('%s\\%s', $rootClass->getNamespace(), substr($rootClass->getName(), 0, -6)); - } -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php b/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php deleted file mode 100644 index c52c9e5..0000000 --- a/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -use Symfony\Component\Config\Definition\ConfigurationInterface; - -/** - * Generates ConfigBuilders to help create valid config. - * - * @author Tobias Nyholm - */ -interface ConfigBuilderGeneratorInterface -{ - /** - * @return \Closure that will return the root config class - */ - public function build(ConfigurationInterface $configuration): \Closure; -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderInterface.php b/vendor/symfony/config/Builder/ConfigBuilderInterface.php deleted file mode 100644 index fd3129c..0000000 --- a/vendor/symfony/config/Builder/ConfigBuilderInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * A ConfigBuilder provides helper methods to build a large complex array. - * - * @author Tobias Nyholm - */ -interface ConfigBuilderInterface -{ - /** - * Gets all configuration represented as an array. - */ - public function toArray(): array; - - /** - * Gets the alias for the extension which config we are building. - */ - public function getExtensionAlias(): string; -} diff --git a/vendor/symfony/config/Builder/Method.php b/vendor/symfony/config/Builder/Method.php deleted file mode 100644 index 3577e3d..0000000 --- a/vendor/symfony/config/Builder/Method.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Represents a method when building classes. - * - * @internal - * - * @author Tobias Nyholm - */ -class Method -{ - private $content; - - public function __construct(string $content) - { - $this->content = $content; - } - - public function getContent(): string - { - return $this->content; - } -} diff --git a/vendor/symfony/config/Builder/Property.php b/vendor/symfony/config/Builder/Property.php deleted file mode 100644 index 1b24c47..0000000 --- a/vendor/symfony/config/Builder/Property.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Represents a property when building classes. - * - * @internal - * - * @author Tobias Nyholm - */ -class Property -{ - private $name; - private $originalName; - private $array = false; - private $type = null; - private $content; - - public function __construct(string $originalName, string $name) - { - $this->name = $name; - $this->originalName = $originalName; - } - - public function getName(): string - { - return $this->name; - } - - public function getOriginalName(): string - { - return $this->originalName; - } - - public function setType(string $type): void - { - $this->array = false; - $this->type = $type; - - if ('[]' === substr($type, -2)) { - $this->array = true; - $this->type = substr($type, 0, -2); - } - } - - public function getType(): ?string - { - return $this->type; - } - - public function getContent(): ?string - { - return $this->content; - } - - public function setContent(string $content): void - { - $this->content = $content; - } - - public function isArray(): bool - { - return $this->array; - } -} diff --git a/vendor/symfony/config/CHANGELOG.md b/vendor/symfony/config/CHANGELOG.md deleted file mode 100644 index 75ef8bc..0000000 --- a/vendor/symfony/config/CHANGELOG.md +++ /dev/null @@ -1,129 +0,0 @@ -CHANGELOG -========= - -5.3.0 ------ - - * Add support for generating `ConfigBuilder` for extensions - -5.1.0 ------ - - * updated the signature of method `NodeDefinition::setDeprecated()` to `NodeDefinition::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `BaseNode::setDeprecated()` to `BaseNode::setDeprecation(string $package, string $version, string $message)` - * deprecated passing a null message to `BaseNode::setDeprecated()` to un-deprecate a node - * deprecated `BaseNode::getDeprecationMessage()`, use `BaseNode::getDeprecation()` instead - -5.0.0 ------ - - * Dropped support for constructing a `TreeBuilder` without passing root node information. - * Removed the `root()` method in `TreeBuilder`, pass the root node information to the constructor instead - * Added method `getChildNodeDefinitions()` to ParentNodeDefinitionInterface - * Removed `FileLoaderLoadException`, use `LoaderLoadException` instead - -4.4.0 ------ - - * added a way to exclude patterns of resources from being imported by the `import()` method - -4.3.0 ------ - - * deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` - * made `Resource\*` classes final and not implement `Serializable` anymore - * deprecated the `root()` method in `TreeBuilder`, pass the root node information to the constructor instead - -4.2.0 ------ - - * deprecated constructing a `TreeBuilder` without passing root node information - * renamed `FileLoaderLoadException` to `LoaderLoadException` - -4.1.0 ------ - - * added `setPathSeparator` method to `NodeBuilder` class - * added third `$pathSeparator` constructor argument to `BaseNode` - * the `Processor` class has been made final - -4.0.0 ------ - - * removed `ConfigCachePass` - -3.4.0 ------ - - * added `setDeprecated()` method to indicate a deprecated node - * added `XmlUtils::parse()` method to parse an XML string - * deprecated `ConfigCachePass` - -3.3.0 ------ - - * added `ReflectionClassResource` class - * added second `$exists` constructor argument to `ClassExistenceResource` - * made `ClassExistenceResource` work with interfaces and traits - * added `ConfigCachePass` (originally in FrameworkBundle) - * added `castToArray()` helper to turn any config value into an array - -3.0.0 ------ - - * removed `ReferenceDumper` class - * removed the `ResourceInterface::isFresh()` method - * removed `BCResourceInterfaceChecker` class - * removed `ResourceInterface::getResource()` method - -2.8.0 ------ - -The edge case of defining just one value for nodes of type Enum is now allowed: - -```php -$rootNode - ->children() - ->enumNode('variable') - ->values(['value']) - ->end() - ->end() -; -``` - -Before: `InvalidArgumentException` (variable must contain at least two -distinct elements). -After: the code will work as expected and it will restrict the values of the -`variable` option to just `value`. - - * deprecated the `ResourceInterface::isFresh()` method. If you implement custom resource types and they - can be validated that way, make them implement the new `SelfCheckingResourceInterface`. - * deprecated the getResource() method in ResourceInterface. You can still call this method - on concrete classes implementing the interface, but it does not make sense at the interface - level as you need to know about the particular type of resource at hand to understand the - semantics of the returned value. - -2.7.0 ------ - - * added `ConfigCacheInterface`, `ConfigCacheFactoryInterface` and a basic `ConfigCacheFactory` - implementation to delegate creation of ConfigCache instances - -2.2.0 ------ - - * added `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()` - to ease configuration when some sections are respectively disabled / enabled - by default. - * added a `normalizeKeys()` method for array nodes (to avoid key normalization) - * added numerical type handling for config definitions - * added convenience methods for optional configuration sections to `ArrayNodeDefinition` - * added a utils class for XML manipulations - -2.1.0 ------ - - * added a way to add documentation on configuration - * implemented `Serializable` on resources - * `LoaderResolverInterface` is now used instead of `LoaderResolver` for type - hinting diff --git a/vendor/symfony/config/ConfigCache.php b/vendor/symfony/config/ConfigCache.php deleted file mode 100644 index 3b09052..0000000 --- a/vendor/symfony/config/ConfigCache.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; - -/** - * ConfigCache caches arbitrary content in files on disk. - * - * When in debug mode, those metadata resources that implement - * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will - * be used to check cache freshness. - * - * @author Fabien Potencier - * @author Matthias Pigulla - */ -class ConfigCache extends ResourceCheckerConfigCache -{ - private $debug; - - /** - * @param string $file The absolute cache path - * @param bool $debug Whether debugging is enabled or not - */ - public function __construct(string $file, bool $debug) - { - $this->debug = $debug; - - $checkers = []; - if (true === $this->debug) { - $checkers = [new SelfCheckingResourceChecker()]; - } - - parent::__construct($file, $checkers); - } - - /** - * Checks if the cache is still fresh. - * - * This implementation always returns true when debug is off and the - * cache file exists. - * - * @return bool - */ - public function isFresh() - { - if (!$this->debug && is_file($this->getPath())) { - return true; - } - - return parent::isFresh(); - } -} diff --git a/vendor/symfony/config/ConfigCacheFactory.php b/vendor/symfony/config/ConfigCacheFactory.php deleted file mode 100644 index 11fd3cb..0000000 --- a/vendor/symfony/config/ConfigCacheFactory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * Basic implementation of ConfigCacheFactoryInterface that - * creates an instance of the default ConfigCache. - * - * This factory and/or cache do not support cache validation - * by means of ResourceChecker instances (that is, service-based). - * - * @author Matthias Pigulla - */ -class ConfigCacheFactory implements ConfigCacheFactoryInterface -{ - private $debug; - - /** - * @param bool $debug The debug flag to pass to ConfigCache - */ - public function __construct(bool $debug) - { - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - public function cache(string $file, callable $callback) - { - $cache = new ConfigCache($file, $this->debug); - if (!$cache->isFresh()) { - $callback($cache); - } - - return $cache; - } -} diff --git a/vendor/symfony/config/ConfigCacheFactoryInterface.php b/vendor/symfony/config/ConfigCacheFactoryInterface.php deleted file mode 100644 index 146ee9b..0000000 --- a/vendor/symfony/config/ConfigCacheFactoryInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * Interface for a ConfigCache factory. This factory creates - * an instance of ConfigCacheInterface and initializes the - * cache if necessary. - * - * @author Matthias Pigulla - */ -interface ConfigCacheFactoryInterface -{ - /** - * Creates a cache instance and (re-)initializes it if necessary. - * - * @param string $file The absolute cache file path - * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback - * - * @return ConfigCacheInterface - */ - public function cache(string $file, callable $callable); -} diff --git a/vendor/symfony/config/ConfigCacheInterface.php b/vendor/symfony/config/ConfigCacheInterface.php deleted file mode 100644 index 3cd7a5c..0000000 --- a/vendor/symfony/config/ConfigCacheInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Interface for ConfigCache. - * - * @author Matthias Pigulla - */ -interface ConfigCacheInterface -{ - /** - * Gets the cache file path. - * - * @return string - */ - public function getPath(); - - /** - * Checks if the cache is still fresh. - * - * This check should take the metadata passed to the write() method into consideration. - * - * @return bool - */ - public function isFresh(); - - /** - * Writes the given content into the cache file. Metadata will be stored - * independently and can be used to check cache freshness at a later time. - * - * @param string $content The content to write into the cache - * @param ResourceInterface[]|null $metadata An array of ResourceInterface instances - * - * @throws \RuntimeException When the cache file cannot be written - */ - public function write(string $content, array $metadata = null); -} diff --git a/vendor/symfony/config/Definition/ArrayNode.php b/vendor/symfony/config/Definition/ArrayNode.php deleted file mode 100644 index bd0eae9..0000000 --- a/vendor/symfony/config/Definition/ArrayNode.php +++ /dev/null @@ -1,404 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * Represents an Array node in the config tree. - * - * @author Johannes M. Schmitt - */ -class ArrayNode extends BaseNode implements PrototypeNodeInterface -{ - protected $xmlRemappings = []; - protected $children = []; - protected $allowFalse = false; - protected $allowNewKeys = true; - protected $addIfNotSet = false; - protected $performDeepMerging = true; - protected $ignoreExtraKeys = false; - protected $removeExtraKeys = true; - protected $normalizeKeys = true; - - public function setNormalizeKeys(bool $normalizeKeys) - { - $this->normalizeKeys = $normalizeKeys; - } - - /** - * {@inheritdoc} - * - * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. - * After running this method, all keys are normalized to foo_bar. - * - * If you have a mixed key like foo-bar_moo, it will not be altered. - * The key will also not be altered if the target key already exists. - */ - protected function preNormalize($value) - { - if (!$this->normalizeKeys || !\is_array($value)) { - return $value; - } - - $normalized = []; - - foreach ($value as $k => $v) { - if (str_contains($k, '-') && !str_contains($k, '_') && !\array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { - $normalized[$normalizedKey] = $v; - } else { - $normalized[$k] = $v; - } - } - - return $normalized; - } - - /** - * Retrieves the children of this node. - * - * @return array - */ - public function getChildren() - { - return $this->children; - } - - /** - * Sets the xml remappings that should be performed. - * - * @param array $remappings An array of the form [[string, string]] - */ - public function setXmlRemappings(array $remappings) - { - $this->xmlRemappings = $remappings; - } - - /** - * Gets the xml remappings that should be performed. - * - * @return array an array of the form [[string, string]] - */ - public function getXmlRemappings() - { - return $this->xmlRemappings; - } - - /** - * Sets whether to add default values for this array if it has not been - * defined in any of the configuration files. - */ - public function setAddIfNotSet(bool $boolean) - { - $this->addIfNotSet = $boolean; - } - - /** - * Sets whether false is allowed as value indicating that the array should be unset. - */ - public function setAllowFalse(bool $allow) - { - $this->allowFalse = $allow; - } - - /** - * Sets whether new keys can be defined in subsequent configurations. - */ - public function setAllowNewKeys(bool $allow) - { - $this->allowNewKeys = $allow; - } - - /** - * Sets if deep merging should occur. - */ - public function setPerformDeepMerging(bool $boolean) - { - $this->performDeepMerging = $boolean; - } - - /** - * Whether extra keys should just be ignored without an exception. - * - * @param bool $boolean To allow extra keys - * @param bool $remove To remove extra keys - */ - public function setIgnoreExtraKeys(bool $boolean, bool $remove = true) - { - $this->ignoreExtraKeys = $boolean; - $this->removeExtraKeys = $this->ignoreExtraKeys && $remove; - } - - /** - * Returns true when extra keys should be ignored without an exception. - */ - public function shouldIgnoreExtraKeys(): bool - { - return $this->ignoreExtraKeys; - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function hasDefaultValue() - { - return $this->addIfNotSet; - } - - /** - * {@inheritdoc} - */ - public function getDefaultValue() - { - if (!$this->hasDefaultValue()) { - throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath())); - } - - $defaults = []; - foreach ($this->children as $name => $child) { - if ($child->hasDefaultValue()) { - $defaults[$name] = $child->getDefaultValue(); - } - } - - return $defaults; - } - - /** - * Adds a child node. - * - * @throws \InvalidArgumentException when the child node has no name - * @throws \InvalidArgumentException when the child node's name is not unique - */ - public function addChild(NodeInterface $node) - { - $name = $node->getName(); - if ('' === $name) { - throw new \InvalidArgumentException('Child nodes must be named.'); - } - if (isset($this->children[$name])) { - throw new \InvalidArgumentException(sprintf('A child node named "%s" already exists.', $name)); - } - - $this->children[$name] = $node; - } - - /** - * {@inheritdoc} - * - * @throws UnsetKeyException - * @throws InvalidConfigurationException if the node doesn't have enough children - */ - protected function finalizeValue($value) - { - if (false === $value) { - throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s.', $this->getPath(), json_encode($value))); - } - - foreach ($this->children as $name => $child) { - if (!\array_key_exists($name, $value)) { - if ($child->isRequired()) { - $message = sprintf('The child config "%s" under "%s" must be configured', $name, $this->getPath()); - if ($child->getInfo()) { - $message .= sprintf(': %s', $child->getInfo()); - } else { - $message .= '.'; - } - $ex = new InvalidConfigurationException($message); - $ex->setPath($this->getPath()); - - throw $ex; - } - - if ($child->hasDefaultValue()) { - $value[$name] = $child->getDefaultValue(); - } - - continue; - } - - if ($child->isDeprecated()) { - $deprecation = $child->getDeprecation($name, $this->getPath()); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - try { - $value[$name] = $child->finalize($value[$name]); - } catch (UnsetKeyException $e) { - unset($value[$name]); - } - } - - return $value; - } - - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "array", but got "%s"', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * {@inheritdoc} - * - * @throws InvalidConfigurationException - */ - protected function normalizeValue($value) - { - if (false === $value) { - return $value; - } - - $value = $this->remapXml($value); - - $normalized = []; - foreach ($value as $name => $val) { - if (isset($this->children[$name])) { - try { - $normalized[$name] = $this->children[$name]->normalize($val); - } catch (UnsetKeyException $e) { - } - unset($value[$name]); - } elseif (!$this->removeExtraKeys) { - $normalized[$name] = $val; - } - } - - // if extra fields are present, throw exception - if (\count($value) && !$this->ignoreExtraKeys) { - $proposals = array_keys($this->children); - sort($proposals); - $guesses = []; - - foreach (array_keys($value) as $subject) { - $minScore = \INF; - foreach ($proposals as $proposal) { - $distance = levenshtein($subject, $proposal); - if ($distance <= $minScore && $distance < 3) { - $guesses[$proposal] = $distance; - $minScore = $distance; - } - } - } - - $msg = sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); - - if (\count($guesses)) { - asort($guesses); - $msg .= sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses))); - } else { - $msg .= sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals)); - } - - $ex = new InvalidConfigurationException($msg); - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $normalized; - } - - /** - * Remaps multiple singular values to a single plural value. - * - * @return array - */ - protected function remapXml(array $value) - { - foreach ($this->xmlRemappings as [$singular, $plural]) { - if (!isset($value[$singular])) { - continue; - } - - $value[$plural] = Processor::normalizeConfig($value, $singular, $plural); - unset($value[$singular]); - } - - return $value; - } - - /** - * {@inheritdoc} - * - * @throws InvalidConfigurationException - * @throws \RuntimeException - */ - protected function mergeValues($leftSide, $rightSide) - { - if (false === $rightSide) { - // if this is still false after the last config has been merged the - // finalization pass will take care of removing this key entirely - return false; - } - - if (false === $leftSide || !$this->performDeepMerging) { - return $rightSide; - } - - foreach ($rightSide as $k => $v) { - // no conflict - if (!\array_key_exists($k, $leftSide)) { - if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - - $leftSide[$k] = $v; - continue; - } - - if (!isset($this->children[$k])) { - if (!$this->ignoreExtraKeys || $this->removeExtraKeys) { - throw new \RuntimeException('merge() expects a normalized config array.'); - } - - $leftSide[$k] = $v; - continue; - } - - $leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v); - } - - return $leftSide; - } - - /** - * {@inheritdoc} - */ - protected function allowPlaceholders(): bool - { - return false; - } -} diff --git a/vendor/symfony/config/Definition/BaseNode.php b/vendor/symfony/config/Definition/BaseNode.php deleted file mode 100644 index 5ca1239..0000000 --- a/vendor/symfony/config/Definition/BaseNode.php +++ /dev/null @@ -1,589 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\Exception; -use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * The base node class. - * - * @author Johannes M. Schmitt - */ -abstract class BaseNode implements NodeInterface -{ - public const DEFAULT_PATH_SEPARATOR = '.'; - - private static $placeholderUniquePrefixes = []; - private static $placeholders = []; - - protected $name; - protected $parent; - protected $normalizationClosures = []; - protected $finalValidationClosures = []; - protected $allowOverwrite = true; - protected $required = false; - protected $deprecation = []; - protected $equivalentValues = []; - protected $attributes = []; - protected $pathSeparator; - - private $handlingPlaceholder; - - /** - * @throws \InvalidArgumentException if the name contains a period - */ - public function __construct(?string $name, NodeInterface $parent = null, string $pathSeparator = self::DEFAULT_PATH_SEPARATOR) - { - if (str_contains($name = (string) $name, $pathSeparator)) { - throw new \InvalidArgumentException('The name must not contain ".'.$pathSeparator.'".'); - } - - $this->name = $name; - $this->parent = $parent; - $this->pathSeparator = $pathSeparator; - } - - /** - * Register possible (dummy) values for a dynamic placeholder value. - * - * Matching configuration values will be processed with a provided value, one by one. After a provided value is - * successfully processed the configuration value is returned as is, thus preserving the placeholder. - * - * @internal - */ - public static function setPlaceholder(string $placeholder, array $values): void - { - if (!$values) { - throw new \InvalidArgumentException('At least one value must be provided.'); - } - - self::$placeholders[$placeholder] = $values; - } - - /** - * Adds a common prefix for dynamic placeholder values. - * - * Matching configuration values will be skipped from being processed and are returned as is, thus preserving the - * placeholder. An exact match provided by {@see setPlaceholder()} might take precedence. - * - * @internal - */ - public static function setPlaceholderUniquePrefix(string $prefix): void - { - self::$placeholderUniquePrefixes[] = $prefix; - } - - /** - * Resets all current placeholders available. - * - * @internal - */ - public static function resetPlaceholders(): void - { - self::$placeholderUniquePrefixes = []; - self::$placeholders = []; - } - - public function setAttribute(string $key, $value) - { - $this->attributes[$key] = $value; - } - - /** - * @return mixed - */ - public function getAttribute(string $key, $default = null) - { - return $this->attributes[$key] ?? $default; - } - - /** - * @return bool - */ - public function hasAttribute(string $key) - { - return isset($this->attributes[$key]); - } - - /** - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - public function setAttributes(array $attributes) - { - $this->attributes = $attributes; - } - - public function removeAttribute(string $key) - { - unset($this->attributes[$key]); - } - - /** - * Sets an info message. - */ - public function setInfo(string $info) - { - $this->setAttribute('info', $info); - } - - /** - * Returns info message. - * - * @return string|null - */ - public function getInfo() - { - return $this->getAttribute('info'); - } - - /** - * Sets the example configuration for this node. - * - * @param string|array $example - */ - public function setExample($example) - { - $this->setAttribute('example', $example); - } - - /** - * Retrieves the example configuration for this node. - * - * @return string|array|null - */ - public function getExample() - { - return $this->getAttribute('example'); - } - - /** - * Adds an equivalent value. - * - * @param mixed $originalValue - * @param mixed $equivalentValue - */ - public function addEquivalentValue($originalValue, $equivalentValue) - { - $this->equivalentValues[] = [$originalValue, $equivalentValue]; - } - - /** - * Set this node as required. - */ - public function setRequired(bool $boolean) - { - $this->required = $boolean; - } - - /** - * Sets this node as deprecated. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message the deprecation message to use - * - * You can use %node% and %path% placeholders in your message to display, - * respectively, the node name and its complete path - */ - public function setDeprecated(?string $package/*, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.' */) - { - $args = \func_get_args(); - - if (\func_num_args() < 2) { - trigger_deprecation('symfony/config', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__); - - if (!isset($args[0])) { - trigger_deprecation('symfony/config', '5.1', 'Passing a null message to un-deprecate a node is deprecated.'); - - $this->deprecation = []; - - return; - } - - $message = (string) $args[0]; - $package = $version = ''; - } else { - $package = (string) $args[0]; - $version = (string) $args[1]; - $message = (string) ($args[2] ?? 'The child node "%node%" at path "%path%" is deprecated.'); - } - - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - } - - /** - * Sets if this node can be overridden. - */ - public function setAllowOverwrite(bool $allow) - { - $this->allowOverwrite = $allow; - } - - /** - * Sets the closures used for normalization. - * - * @param \Closure[] $closures An array of Closures used for normalization - */ - public function setNormalizationClosures(array $closures) - { - $this->normalizationClosures = $closures; - } - - /** - * Sets the closures used for final validation. - * - * @param \Closure[] $closures An array of Closures used for final validation - */ - public function setFinalValidationClosures(array $closures) - { - $this->finalValidationClosures = $closures; - } - - /** - * {@inheritdoc} - */ - public function isRequired() - { - return $this->required; - } - - /** - * Checks if this node is deprecated. - * - * @return bool - */ - public function isDeprecated() - { - return (bool) $this->deprecation; - } - - /** - * Returns the deprecated message. - * - * @param string $node the configuration node name - * @param string $path the path of the node - * - * @return string - * - * @deprecated since Symfony 5.1, use "getDeprecation()" instead. - */ - public function getDeprecationMessage(string $node, string $path) - { - trigger_deprecation('symfony/config', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__); - - return $this->getDeprecation($node, $path)['message']; - } - - /** - * @param string $node The configuration node name - * @param string $path The path of the node - */ - public function getDeprecation(string $node, string $path): array - { - return [ - 'package' => $this->deprecation['package'] ?? '', - 'version' => $this->deprecation['version'] ?? '', - 'message' => strtr($this->deprecation['message'] ?? '', ['%node%' => $node, '%path%' => $path]), - ]; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - if (null !== $this->parent) { - return $this->parent->getPath().$this->pathSeparator.$this->name; - } - - return $this->name; - } - - /** - * {@inheritdoc} - */ - final public function merge($leftSide, $rightSide) - { - if (!$this->allowOverwrite) { - throw new ForbiddenOverwriteException(sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath())); - } - - if ($leftSide !== $leftPlaceholders = self::resolvePlaceholderValue($leftSide)) { - foreach ($leftPlaceholders as $leftPlaceholder) { - $this->handlingPlaceholder = $leftSide; - try { - $this->merge($leftPlaceholder, $rightSide); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $rightSide; - } - - if ($rightSide !== $rightPlaceholders = self::resolvePlaceholderValue($rightSide)) { - foreach ($rightPlaceholders as $rightPlaceholder) { - $this->handlingPlaceholder = $rightSide; - try { - $this->merge($leftSide, $rightPlaceholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $rightSide; - } - - $this->doValidateType($leftSide); - $this->doValidateType($rightSide); - - return $this->mergeValues($leftSide, $rightSide); - } - - /** - * {@inheritdoc} - */ - final public function normalize($value) - { - $value = $this->preNormalize($value); - - // run custom normalization closures - foreach ($this->normalizationClosures as $closure) { - $value = $closure($value); - } - - // resolve placeholder value - if ($value !== $placeholders = self::resolvePlaceholderValue($value)) { - foreach ($placeholders as $placeholder) { - $this->handlingPlaceholder = $value; - try { - $this->normalize($placeholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $value; - } - - // replace value with their equivalent - foreach ($this->equivalentValues as $data) { - if ($data[0] === $value) { - $value = $data[1]; - } - } - - // validate type - $this->doValidateType($value); - - // normalize value - return $this->normalizeValue($value); - } - - /** - * Normalizes the value before any other normalization is applied. - * - * @param mixed $value - * - * @return mixed - */ - protected function preNormalize($value) - { - return $value; - } - - /** - * Returns parent node for this node. - * - * @return NodeInterface|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * {@inheritdoc} - */ - final public function finalize($value) - { - if ($value !== $placeholders = self::resolvePlaceholderValue($value)) { - foreach ($placeholders as $placeholder) { - $this->handlingPlaceholder = $value; - try { - $this->finalize($placeholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $value; - } - - $this->doValidateType($value); - - $value = $this->finalizeValue($value); - - // Perform validation on the final value if a closure has been set. - // The closure is also allowed to return another value. - foreach ($this->finalValidationClosures as $closure) { - try { - $value = $closure($value); - } catch (Exception $e) { - if ($e instanceof UnsetKeyException && null !== $this->handlingPlaceholder) { - continue; - } - - throw $e; - } catch (\Exception $e) { - throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": ', $this->getPath()).$e->getMessage(), $e->getCode(), $e); - } - } - - return $value; - } - - /** - * Validates the type of a Node. - * - * @param mixed $value The value to validate - * - * @throws InvalidTypeException when the value is invalid - */ - abstract protected function validateType($value); - - /** - * Normalizes the value. - * - * @param mixed $value The value to normalize - * - * @return mixed - */ - abstract protected function normalizeValue($value); - - /** - * Merges two values together. - * - * @param mixed $leftSide - * @param mixed $rightSide - * - * @return mixed - */ - abstract protected function mergeValues($leftSide, $rightSide); - - /** - * Finalizes a value. - * - * @param mixed $value The value to finalize - * - * @return mixed - */ - abstract protected function finalizeValue($value); - - /** - * Tests if placeholder values are allowed for this node. - */ - protected function allowPlaceholders(): bool - { - return true; - } - - /** - * Tests if a placeholder is being handled currently. - */ - protected function isHandlingPlaceholder(): bool - { - return null !== $this->handlingPlaceholder; - } - - /** - * Gets allowed dynamic types for this node. - */ - protected function getValidPlaceholderTypes(): array - { - return []; - } - - private static function resolvePlaceholderValue($value) - { - if (\is_string($value)) { - if (isset(self::$placeholders[$value])) { - return self::$placeholders[$value]; - } - - foreach (self::$placeholderUniquePrefixes as $placeholderUniquePrefix) { - if (str_starts_with($value, $placeholderUniquePrefix)) { - return []; - } - } - } - - return $value; - } - - private function doValidateType($value): void - { - if (null !== $this->handlingPlaceholder && !$this->allowPlaceholders()) { - $e = new InvalidTypeException(sprintf('A dynamic value is not compatible with a "%s" node type at path "%s".', static::class, $this->getPath())); - $e->setPath($this->getPath()); - - throw $e; - } - - if (null === $this->handlingPlaceholder || null === $value) { - $this->validateType($value); - - return; - } - - $knownTypes = array_keys(self::$placeholders[$this->handlingPlaceholder]); - $validTypes = $this->getValidPlaceholderTypes(); - - if ($validTypes && array_diff($knownTypes, $validTypes)) { - $e = new InvalidTypeException(sprintf( - 'Invalid type for path "%s". Expected %s, but got %s.', - $this->getPath(), - 1 === \count($validTypes) ? '"'.reset($validTypes).'"' : 'one of "'.implode('", "', $validTypes).'"', - 1 === \count($knownTypes) ? '"'.reset($knownTypes).'"' : 'one of "'.implode('", "', $knownTypes).'"' - )); - if ($hint = $this->getInfo()) { - $e->addHint($hint); - } - $e->setPath($this->getPath()); - - throw $e; - } - - $this->validateType($value); - } -} diff --git a/vendor/symfony/config/Definition/BooleanNode.php b/vendor/symfony/config/Definition/BooleanNode.php deleted file mode 100644 index c64ecb8..0000000 --- a/vendor/symfony/config/Definition/BooleanNode.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a Boolean value in the config tree. - * - * @author Johannes M. Schmitt - */ -class BooleanNode extends ScalarNode -{ - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - if (!\is_bool($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "bool", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * {@inheritdoc} - */ - protected function isValueEmpty($value) - { - // a boolean value cannot be empty - return false; - } - - /** - * {@inheritdoc} - */ - protected function getValidPlaceholderTypes(): array - { - return ['bool']; - } -} diff --git a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php deleted file mode 100644 index eb5b040..0000000 --- a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php +++ /dev/null @@ -1,549 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; -use Symfony\Component\Config\Definition\PrototypedArrayNode; - -/** - * This class provides a fluent interface for defining an array node. - * - * @author Johannes M. Schmitt - */ -class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface -{ - protected $performDeepMerging = true; - protected $ignoreExtraKeys = false; - protected $removeExtraKeys = true; - protected $children = []; - protected $prototype; - protected $atLeastOne = false; - protected $allowNewKeys = true; - protected $key; - protected $removeKeyItem; - protected $addDefaults = false; - protected $addDefaultChildren = false; - protected $nodeBuilder; - protected $normalizeKeys = true; - - /** - * {@inheritdoc} - */ - public function __construct(?string $name, NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = []; - $this->trueEquivalent = []; - } - - /** - * {@inheritdoc} - */ - public function setBuilder(NodeBuilder $builder) - { - $this->nodeBuilder = $builder; - } - - /** - * {@inheritdoc} - */ - public function children() - { - return $this->getNodeBuilder(); - } - - /** - * Sets a prototype for child nodes. - * - * @return NodeDefinition - */ - public function prototype(string $type) - { - return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); - } - - /** - * @return VariableNodeDefinition - */ - public function variablePrototype() - { - return $this->prototype('variable'); - } - - /** - * @return ScalarNodeDefinition - */ - public function scalarPrototype() - { - return $this->prototype('scalar'); - } - - /** - * @return BooleanNodeDefinition - */ - public function booleanPrototype() - { - return $this->prototype('boolean'); - } - - /** - * @return IntegerNodeDefinition - */ - public function integerPrototype() - { - return $this->prototype('integer'); - } - - /** - * @return FloatNodeDefinition - */ - public function floatPrototype() - { - return $this->prototype('float'); - } - - /** - * @return ArrayNodeDefinition - */ - public function arrayPrototype() - { - return $this->prototype('array'); - } - - /** - * @return EnumNodeDefinition - */ - public function enumPrototype() - { - return $this->prototype('enum'); - } - - /** - * Adds the default value if the node is not set in the configuration. - * - * This method is applicable to concrete nodes only (not to prototype nodes). - * If this function has been called and the node is not set during the finalization - * phase, it's default value will be derived from its children default values. - * - * @return $this - */ - public function addDefaultsIfNotSet() - { - $this->addDefaults = true; - - return $this; - } - - /** - * Adds children with a default value when none are defined. - * - * This method is applicable to prototype nodes only. - * - * @param int|string|array|null $children The number of children|The child name|The children names to be added - * - * @return $this - */ - public function addDefaultChildrenIfNoneSet($children = null) - { - $this->addDefaultChildren = $children; - - return $this; - } - - /** - * Requires the node to have at least one element. - * - * This method is applicable to prototype nodes only. - * - * @return $this - */ - public function requiresAtLeastOneElement() - { - $this->atLeastOne = true; - - return $this; - } - - /** - * Disallows adding news keys in a subsequent configuration. - * - * If used all keys have to be defined in the same configuration file. - * - * @return $this - */ - public function disallowNewKeysInSubsequentConfigs() - { - $this->allowNewKeys = false; - - return $this; - } - - /** - * Sets a normalization rule for XML configurations. - * - * @param string $singular The key to remap - * @param string|null $plural The plural of the key for irregular plurals - * - * @return $this - */ - public function fixXmlConfig(string $singular, string $plural = null) - { - $this->normalization()->remap($singular, $plural); - - return $this; - } - - /** - * Sets the attribute which value is to be used as key. - * - * This is useful when you have an indexed array that should be an - * associative array. You can select an item from within the array - * to be the key of the particular item. For example, if "id" is the - * "key", then: - * - * [ - * ['id' => 'my_name', 'foo' => 'bar'], - * ]; - * - * becomes - * - * [ - * 'my_name' => ['foo' => 'bar'], - * ]; - * - * If you'd like "'id' => 'my_name'" to still be present in the resulting - * array, then you can set the second argument of this method to false. - * - * This method is applicable to prototype nodes only. - * - * @param string $name The name of the key - * @param bool $removeKeyItem Whether or not the key item should be removed - * - * @return $this - */ - public function useAttributeAsKey(string $name, bool $removeKeyItem = true) - { - $this->key = $name; - $this->removeKeyItem = $removeKeyItem; - - return $this; - } - - /** - * Sets whether the node can be unset. - * - * @return $this - */ - public function canBeUnset(bool $allow = true) - { - $this->merge()->allowUnset($allow); - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is disabled. If any configuration is specified then - * the node will be automatically enabled: - * - * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden - * enableableArrayNode: ~ # The config is enabled & use the default values - * enableableArrayNode: true # The config is enabled & use the default values - * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden - * enableableArrayNode: {enabled: false, ...} # The config is disabled - * enableableArrayNode: false # The config is disabled - * - * @return $this - */ - public function canBeEnabled() - { - $this - ->addDefaultsIfNotSet() - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->beforeNormalization() - ->ifArray() - ->then(function (array $v) { - $v['enabled'] = $v['enabled'] ?? true; - - return $v; - }) - ->end() - ->children() - ->booleanNode('enabled') - ->defaultFalse() - ; - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is enabled. - * - * @return $this - */ - public function canBeDisabled() - { - $this - ->addDefaultsIfNotSet() - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->children() - ->booleanNode('enabled') - ->defaultTrue() - ; - - return $this; - } - - /** - * Disables the deep merging of the node. - * - * @return $this - */ - public function performNoDeepMerging() - { - $this->performDeepMerging = false; - - return $this; - } - - /** - * Allows extra config keys to be specified under an array without - * throwing an exception. - * - * Those config values are ignored and removed from the resulting - * array. This should be used only in special cases where you want - * to send an entire configuration array through a special tree that - * processes only part of the array. - * - * @param bool $remove Whether to remove the extra keys - * - * @return $this - */ - public function ignoreExtraKeys(bool $remove = true) - { - $this->ignoreExtraKeys = true; - $this->removeExtraKeys = $remove; - - return $this; - } - - /** - * Sets whether to enable key normalization. - * - * @return $this - */ - public function normalizeKeys(bool $bool) - { - $this->normalizeKeys = $bool; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function append(NodeDefinition $node) - { - $this->children[$node->name] = $node->setParent($this); - - return $this; - } - - /** - * Returns a node builder to be used to add children and prototype. - * - * @return NodeBuilder - */ - protected function getNodeBuilder() - { - if (null === $this->nodeBuilder) { - $this->nodeBuilder = new NodeBuilder(); - } - - return $this->nodeBuilder->setParent($this); - } - - /** - * {@inheritdoc} - */ - protected function createNode() - { - if (null === $this->prototype) { - $node = new ArrayNode($this->name, $this->parent, $this->pathSeparator); - - $this->validateConcreteNode($node); - - $node->setAddIfNotSet($this->addDefaults); - - foreach ($this->children as $child) { - $child->parent = $node; - $node->addChild($child->getNode()); - } - } else { - $node = new PrototypedArrayNode($this->name, $this->parent, $this->pathSeparator); - - $this->validatePrototypeNode($node); - - if (null !== $this->key) { - $node->setKeyAttribute($this->key, $this->removeKeyItem); - } - - if (true === $this->atLeastOne || false === $this->allowEmptyValue) { - $node->setMinNumberOfElements(1); - } - - if ($this->default) { - if (!\is_array($this->defaultValue)) { - throw new \InvalidArgumentException(sprintf('%s: the default value of an array node has to be an array.', $node->getPath())); - } - - $node->setDefaultValue($this->defaultValue); - } - - if (false !== $this->addDefaultChildren) { - $node->setAddChildrenIfNoneSet($this->addDefaultChildren); - if ($this->prototype instanceof static && null === $this->prototype->prototype) { - $this->prototype->addDefaultsIfNotSet(); - } - } - - $this->prototype->parent = $node; - $node->setPrototype($this->prototype->getNode()); - } - - $node->setAllowNewKeys($this->allowNewKeys); - $node->addEquivalentValue(null, $this->nullEquivalent); - $node->addEquivalentValue(true, $this->trueEquivalent); - $node->addEquivalentValue(false, $this->falseEquivalent); - $node->setPerformDeepMerging($this->performDeepMerging); - $node->setRequired($this->required); - $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys); - $node->setNormalizeKeys($this->normalizeKeys); - - if ($this->deprecation) { - $node->setDeprecated($this->deprecation['package'], $this->deprecation['version'], $this->deprecation['message']); - } - - if (null !== $this->normalization) { - $node->setNormalizationClosures($this->normalization->before); - $node->setXmlRemappings($this->normalization->remappings); - } - - if (null !== $this->merge) { - $node->setAllowOverwrite($this->merge->allowOverwrite); - $node->setAllowFalse($this->merge->allowFalse); - } - - if (null !== $this->validation) { - $node->setFinalValidationClosures($this->validation->rules); - } - - return $node; - } - - /** - * Validate the configuration of a concrete node. - * - * @throws InvalidDefinitionException - */ - protected function validateConcreteNode(ArrayNode $node) - { - $path = $node->getPath(); - - if (null !== $this->key) { - throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (false === $this->allowEmptyValue) { - throw new InvalidDefinitionException(sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (true === $this->atLeastOne) { - throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path)); - } - - if ($this->default) { - throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (false !== $this->addDefaultChildren) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path)); - } - } - - /** - * Validate the configuration of a prototype node. - * - * @throws InvalidDefinitionException - */ - protected function validatePrototypeNode(PrototypedArrayNode $node) - { - $path = $node->getPath(); - - if ($this->addDefaults) { - throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path)); - } - - if (false !== $this->addDefaultChildren) { - if ($this->default) { - throw new InvalidDefinitionException(sprintf('A default value and default children might not be used together at path "%s".', $path)); - } - - if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path)); - } - - if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) { - throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path)); - } - } - } - - /** - * @return NodeDefinition[] - */ - public function getChildNodeDefinitions() - { - return $this->children; - } - - /** - * Finds a node defined by the given $nodePath. - * - * @param string $nodePath The path of the node to find. e.g "doctrine.orm.mappings" - */ - public function find(string $nodePath): NodeDefinition - { - $firstPathSegment = (false === $pathSeparatorPos = strpos($nodePath, $this->pathSeparator)) - ? $nodePath - : substr($nodePath, 0, $pathSeparatorPos); - - if (null === $node = ($this->children[$firstPathSegment] ?? null)) { - throw new \RuntimeException(sprintf('Node with name "%s" does not exist in the current node "%s".', $firstPathSegment, $this->name)); - } - - if (false === $pathSeparatorPos) { - return $node; - } - - return $node->find(substr($nodePath, $pathSeparatorPos + \strlen($this->pathSeparator))); - } -} diff --git a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php deleted file mode 100644 index ace0b34..0000000 --- a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\BooleanNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class BooleanNodeDefinition extends ScalarNodeDefinition -{ - /** - * {@inheritdoc} - */ - public function __construct(?string $name, NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = true; - } - - /** - * Instantiate a Node. - * - * @return BooleanNode - */ - protected function instantiateNode() - { - return new BooleanNode($this->name, $this->parent, $this->pathSeparator); - } - - /** - * {@inheritdoc} - * - * @throws InvalidDefinitionException - */ - public function cannotBeEmpty() - { - throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.'); - } -} diff --git a/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php b/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php deleted file mode 100644 index f30b873..0000000 --- a/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that can be implemented by nodes which build other nodes. - * - * @author Roland Franssen - */ -interface BuilderAwareInterface -{ - /** - * Sets a custom children builder. - */ - public function setBuilder(NodeBuilder $builder); -} diff --git a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php b/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php deleted file mode 100644 index 52e2fd1..0000000 --- a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\EnumNode; - -/** - * Enum Node Definition. - * - * @author Johannes M. Schmitt - */ -class EnumNodeDefinition extends ScalarNodeDefinition -{ - private $values; - - /** - * @return $this - */ - public function values(array $values) - { - $values = array_unique($values); - - if (empty($values)) { - throw new \InvalidArgumentException('->values() must be called with at least one value.'); - } - - $this->values = $values; - - return $this; - } - - /** - * Instantiate a Node. - * - * @return EnumNode - * - * @throws \RuntimeException - */ - protected function instantiateNode() - { - if (null === $this->values) { - throw new \RuntimeException('You must call ->values() on enum nodes.'); - } - - return new EnumNode($this->name, $this->parent, $this->values, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/vendor/symfony/config/Definition/Builder/ExprBuilder.php deleted file mode 100644 index 14387b5..0000000 --- a/vendor/symfony/config/Definition/Builder/ExprBuilder.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * This class builds an if expression. - * - * @author Johannes M. Schmitt - * @author Christophe Coevoet - */ -class ExprBuilder -{ - protected $node; - public $ifPart; - public $thenPart; - - public function __construct(NodeDefinition $node) - { - $this->node = $node; - } - - /** - * Marks the expression as being always used. - * - * @return $this - */ - public function always(\Closure $then = null) - { - $this->ifPart = function () { return true; }; - - if (null !== $then) { - $this->thenPart = $then; - } - - return $this; - } - - /** - * Sets a closure to use as tests. - * - * The default one tests if the value is true. - * - * @return $this - */ - public function ifTrue(\Closure $closure = null) - { - if (null === $closure) { - $closure = function ($v) { return true === $v; }; - } - - $this->ifPart = $closure; - - return $this; - } - - /** - * Tests if the value is a string. - * - * @return $this - */ - public function ifString() - { - $this->ifPart = function ($v) { return \is_string($v); }; - - return $this; - } - - /** - * Tests if the value is null. - * - * @return $this - */ - public function ifNull() - { - $this->ifPart = function ($v) { return null === $v; }; - - return $this; - } - - /** - * Tests if the value is empty. - * - * @return $this - */ - public function ifEmpty() - { - $this->ifPart = function ($v) { return empty($v); }; - - return $this; - } - - /** - * Tests if the value is an array. - * - * @return $this - */ - public function ifArray() - { - $this->ifPart = function ($v) { return \is_array($v); }; - - return $this; - } - - /** - * Tests if the value is in an array. - * - * @return $this - */ - public function ifInArray(array $array) - { - $this->ifPart = function ($v) use ($array) { return \in_array($v, $array, true); }; - - return $this; - } - - /** - * Tests if the value is not in an array. - * - * @return $this - */ - public function ifNotInArray(array $array) - { - $this->ifPart = function ($v) use ($array) { return !\in_array($v, $array, true); }; - - return $this; - } - - /** - * Transforms variables of any type into an array. - * - * @return $this - */ - public function castToArray() - { - $this->ifPart = function ($v) { return !\is_array($v); }; - $this->thenPart = function ($v) { return [$v]; }; - - return $this; - } - - /** - * Sets the closure to run if the test pass. - * - * @return $this - */ - public function then(\Closure $closure) - { - $this->thenPart = $closure; - - return $this; - } - - /** - * Sets a closure returning an empty array. - * - * @return $this - */ - public function thenEmptyArray() - { - $this->thenPart = function () { return []; }; - - return $this; - } - - /** - * Sets a closure marking the value as invalid at processing time. - * - * if you want to add the value of the node in your message just use a %s placeholder. - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function thenInvalid(string $message) - { - $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); }; - - return $this; - } - - /** - * Sets a closure unsetting this key of the array at processing time. - * - * @return $this - * - * @throws UnsetKeyException - */ - public function thenUnset() - { - $this->thenPart = function () { throw new UnsetKeyException('Unsetting key.'); }; - - return $this; - } - - /** - * Returns the related node. - * - * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition - * - * @throws \RuntimeException - */ - public function end() - { - if (null === $this->ifPart) { - throw new \RuntimeException('You must specify an if part.'); - } - if (null === $this->thenPart) { - throw new \RuntimeException('You must specify a then part.'); - } - - return $this->node; - } - - /** - * Builds the expressions. - * - * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build - * - * @return array - */ - public static function buildExpressions(array $expressions) - { - foreach ($expressions as $k => $expr) { - if ($expr instanceof self) { - $if = $expr->ifPart; - $then = $expr->thenPart; - $expressions[$k] = function ($v) use ($if, $then) { - return $if($v) ? $then($v) : $v; - }; - } - } - - return $expressions; - } -} diff --git a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php b/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php deleted file mode 100644 index f50f190..0000000 --- a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\FloatNode; - -/** - * This class provides a fluent interface for defining a float node. - * - * @author Jeanmonod David - */ -class FloatNodeDefinition extends NumericNodeDefinition -{ - /** - * Instantiates a Node. - * - * @return FloatNode - */ - protected function instantiateNode() - { - return new FloatNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php b/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php deleted file mode 100644 index d28e5ae..0000000 --- a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\IntegerNode; - -/** - * This class provides a fluent interface for defining an integer node. - * - * @author Jeanmonod David - */ -class IntegerNodeDefinition extends NumericNodeDefinition -{ - /** - * Instantiates a Node. - * - * @return IntegerNode - */ - protected function instantiateNode() - { - return new IntegerNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/MergeBuilder.php b/vendor/symfony/config/Definition/Builder/MergeBuilder.php deleted file mode 100644 index a88d49b..0000000 --- a/vendor/symfony/config/Definition/Builder/MergeBuilder.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds merge conditions. - * - * @author Johannes M. Schmitt - */ -class MergeBuilder -{ - protected $node; - public $allowFalse = false; - public $allowOverwrite = true; - - public function __construct(NodeDefinition $node) - { - $this->node = $node; - } - - /** - * Sets whether the node can be unset. - * - * @return $this - */ - public function allowUnset(bool $allow = true) - { - $this->allowFalse = $allow; - - return $this; - } - - /** - * Sets whether the node can be overwritten. - * - * @return $this - */ - public function denyOverwrite(bool $deny = true) - { - $this->allowOverwrite = !$deny; - - return $this; - } - - /** - * Returns the related node. - * - * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition - */ - public function end() - { - return $this->node; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/vendor/symfony/config/Definition/Builder/NodeBuilder.php deleted file mode 100644 index 245e972..0000000 --- a/vendor/symfony/config/Definition/Builder/NodeBuilder.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class provides a fluent interface for building a node. - * - * @author Johannes M. Schmitt - */ -class NodeBuilder implements NodeParentInterface -{ - protected $parent; - protected $nodeMapping; - - public function __construct() - { - $this->nodeMapping = [ - 'variable' => VariableNodeDefinition::class, - 'scalar' => ScalarNodeDefinition::class, - 'boolean' => BooleanNodeDefinition::class, - 'integer' => IntegerNodeDefinition::class, - 'float' => FloatNodeDefinition::class, - 'array' => ArrayNodeDefinition::class, - 'enum' => EnumNodeDefinition::class, - ]; - } - - /** - * Set the parent node. - * - * @return $this - */ - public function setParent(ParentNodeDefinitionInterface $parent = null) - { - $this->parent = $parent; - - return $this; - } - - /** - * Creates a child array node. - * - * @return ArrayNodeDefinition - */ - public function arrayNode(string $name) - { - return $this->node($name, 'array'); - } - - /** - * Creates a child scalar node. - * - * @return ScalarNodeDefinition - */ - public function scalarNode(string $name) - { - return $this->node($name, 'scalar'); - } - - /** - * Creates a child Boolean node. - * - * @return BooleanNodeDefinition - */ - public function booleanNode(string $name) - { - return $this->node($name, 'boolean'); - } - - /** - * Creates a child integer node. - * - * @return IntegerNodeDefinition - */ - public function integerNode(string $name) - { - return $this->node($name, 'integer'); - } - - /** - * Creates a child float node. - * - * @return FloatNodeDefinition - */ - public function floatNode(string $name) - { - return $this->node($name, 'float'); - } - - /** - * Creates a child EnumNode. - * - * @return EnumNodeDefinition - */ - public function enumNode(string $name) - { - return $this->node($name, 'enum'); - } - - /** - * Creates a child variable node. - * - * @return VariableNodeDefinition - */ - public function variableNode(string $name) - { - return $this->node($name, 'variable'); - } - - /** - * Returns the parent node. - * - * @return NodeDefinition&ParentNodeDefinitionInterface - */ - public function end() - { - return $this->parent; - } - - /** - * Creates a child node. - * - * @return NodeDefinition - * - * @throws \RuntimeException When the node type is not registered - * @throws \RuntimeException When the node class is not found - */ - public function node(?string $name, string $type) - { - $class = $this->getNodeClass($type); - - $node = new $class($name); - - $this->append($node); - - return $node; - } - - /** - * Appends a node definition. - * - * Usage: - * - * $node = new ArrayNodeDefinition('name') - * ->children() - * ->scalarNode('foo')->end() - * ->scalarNode('baz')->end() - * ->append($this->getBarNodeDefinition()) - * ->end() - * ; - * - * @return $this - */ - public function append(NodeDefinition $node) - { - if ($node instanceof BuilderAwareInterface) { - $builder = clone $this; - $builder->setParent(null); - $node->setBuilder($builder); - } - - if (null !== $this->parent) { - $this->parent->append($node); - // Make this builder the node parent to allow for a fluid interface - $node->setParent($this); - } - - return $this; - } - - /** - * Adds or overrides a node Type. - * - * @param string $type The name of the type - * @param string $class The fully qualified name the node definition class - * - * @return $this - */ - public function setNodeClass(string $type, string $class) - { - $this->nodeMapping[strtolower($type)] = $class; - - return $this; - } - - /** - * Returns the class name of the node definition. - * - * @return string - * - * @throws \RuntimeException When the node type is not registered - * @throws \RuntimeException When the node class is not found - */ - protected function getNodeClass(string $type) - { - $type = strtolower($type); - - if (!isset($this->nodeMapping[$type])) { - throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type)); - } - - $class = $this->nodeMapping[$type]; - - if (!class_exists($class)) { - throw new \RuntimeException(sprintf('The node class "%s" does not exist.', $class)); - } - - return $class; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/vendor/symfony/config/Definition/Builder/NodeDefinition.php deleted file mode 100644 index cf153f0..0000000 --- a/vendor/symfony/config/Definition/Builder/NodeDefinition.php +++ /dev/null @@ -1,383 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; -use Symfony\Component\Config\Definition\NodeInterface; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -abstract class NodeDefinition implements NodeParentInterface -{ - protected $name; - protected $normalization; - protected $validation; - protected $defaultValue; - protected $default = false; - protected $required = false; - protected $deprecation = []; - protected $merge; - protected $allowEmptyValue = true; - protected $nullEquivalent; - protected $trueEquivalent = true; - protected $falseEquivalent = false; - protected $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR; - protected $parent; - protected $attributes = []; - - public function __construct(?string $name, NodeParentInterface $parent = null) - { - $this->parent = $parent; - $this->name = $name; - } - - /** - * Sets the parent node. - * - * @return $this - */ - public function setParent(NodeParentInterface $parent) - { - $this->parent = $parent; - - return $this; - } - - /** - * Sets info message. - * - * @return $this - */ - public function info(string $info) - { - return $this->attribute('info', $info); - } - - /** - * Sets example configuration. - * - * @param string|array $example - * - * @return $this - */ - public function example($example) - { - return $this->attribute('example', $example); - } - - /** - * Sets an attribute on the node. - * - * @param mixed $value - * - * @return $this - */ - public function attribute(string $key, $value) - { - $this->attributes[$key] = $value; - - return $this; - } - - /** - * Returns the parent node. - * - * @return NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null - */ - public function end() - { - return $this->parent; - } - - /** - * Creates the node. - * - * @return NodeInterface - */ - public function getNode(bool $forceRootNode = false) - { - if ($forceRootNode) { - $this->parent = null; - } - - if (null !== $this->normalization) { - $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before); - } - - if (null !== $this->validation) { - $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules); - } - - $node = $this->createNode(); - if ($node instanceof BaseNode) { - $node->setAttributes($this->attributes); - } - - return $node; - } - - /** - * Sets the default value. - * - * @param mixed $value The default value - * - * @return $this - */ - public function defaultValue($value) - { - $this->default = true; - $this->defaultValue = $value; - - return $this; - } - - /** - * Sets the node as required. - * - * @return $this - */ - public function isRequired() - { - $this->required = true; - - return $this; - } - - /** - * Sets the node as deprecated. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message the deprecation message to use - * - * You can use %node% and %path% placeholders in your message to display, - * respectively, the node name and its complete path - * - * @return $this - */ - public function setDeprecated(/* string $package, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.' */) - { - $args = \func_get_args(); - - if (\func_num_args() < 2) { - trigger_deprecation('symfony/config', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__); - - $message = $args[0] ?? 'The child node "%node%" at path "%path%" is deprecated.'; - $package = $version = ''; - } else { - $package = (string) $args[0]; - $version = (string) $args[1]; - $message = (string) ($args[2] ?? 'The child node "%node%" at path "%path%" is deprecated.'); - } - - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains null. - * - * @param mixed $value - * - * @return $this - */ - public function treatNullLike($value) - { - $this->nullEquivalent = $value; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains true. - * - * @param mixed $value - * - * @return $this - */ - public function treatTrueLike($value) - { - $this->trueEquivalent = $value; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains false. - * - * @param mixed $value - * - * @return $this - */ - public function treatFalseLike($value) - { - $this->falseEquivalent = $value; - - return $this; - } - - /** - * Sets null as the default value. - * - * @return $this - */ - public function defaultNull() - { - return $this->defaultValue(null); - } - - /** - * Sets true as the default value. - * - * @return $this - */ - public function defaultTrue() - { - return $this->defaultValue(true); - } - - /** - * Sets false as the default value. - * - * @return $this - */ - public function defaultFalse() - { - return $this->defaultValue(false); - } - - /** - * Sets an expression to run before the normalization. - * - * @return ExprBuilder - */ - public function beforeNormalization() - { - return $this->normalization()->before(); - } - - /** - * Denies the node value being empty. - * - * @return $this - */ - public function cannotBeEmpty() - { - $this->allowEmptyValue = false; - - return $this; - } - - /** - * Sets an expression to run for the validation. - * - * The expression receives the value of the node and must return it. It can - * modify it. - * An exception should be thrown when the node is not valid. - * - * @return ExprBuilder - */ - public function validate() - { - return $this->validation()->rule(); - } - - /** - * Sets whether the node can be overwritten. - * - * @return $this - */ - public function cannotBeOverwritten(bool $deny = true) - { - $this->merge()->denyOverwrite($deny); - - return $this; - } - - /** - * Gets the builder for validation rules. - * - * @return ValidationBuilder - */ - protected function validation() - { - if (null === $this->validation) { - $this->validation = new ValidationBuilder($this); - } - - return $this->validation; - } - - /** - * Gets the builder for merging rules. - * - * @return MergeBuilder - */ - protected function merge() - { - if (null === $this->merge) { - $this->merge = new MergeBuilder($this); - } - - return $this->merge; - } - - /** - * Gets the builder for normalization rules. - * - * @return NormalizationBuilder - */ - protected function normalization() - { - if (null === $this->normalization) { - $this->normalization = new NormalizationBuilder($this); - } - - return $this->normalization; - } - - /** - * Instantiate and configure the node according to this definition. - * - * @return NodeInterface - * - * @throws InvalidDefinitionException When the definition is invalid - */ - abstract protected function createNode(); - - /** - * Set PathSeparator to use. - * - * @return $this - */ - public function setPathSeparator(string $separator) - { - if ($this instanceof ParentNodeDefinitionInterface) { - foreach ($this->getChildNodeDefinitions() as $child) { - $child->setPathSeparator($separator); - } - } - - $this->pathSeparator = $separator; - - return $this; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeParentInterface.php b/vendor/symfony/config/Definition/Builder/NodeParentInterface.php deleted file mode 100644 index 305e993..0000000 --- a/vendor/symfony/config/Definition/Builder/NodeParentInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that must be implemented by all node parents. - * - * @author Victor Berchet - */ -interface NodeParentInterface -{ -} diff --git a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php b/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php deleted file mode 100644 index 06cbbd4..0000000 --- a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds normalization conditions. - * - * @author Johannes M. Schmitt - */ -class NormalizationBuilder -{ - protected $node; - public $before = []; - public $remappings = []; - - public function __construct(NodeDefinition $node) - { - $this->node = $node; - } - - /** - * Registers a key to remap to its plural form. - * - * @param string $key The key to remap - * @param string|null $plural The plural of the key in case of irregular plural - * - * @return $this - */ - public function remap(string $key, string $plural = null) - { - $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural]; - - return $this; - } - - /** - * Registers a closure to run before the normalization or an expression builder to build it if null is provided. - * - * @return ExprBuilder|$this - */ - public function before(\Closure $closure = null) - { - if (null !== $closure) { - $this->before[] = $closure; - - return $this; - } - - return $this->before[] = new ExprBuilder($this->node); - } -} diff --git a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php deleted file mode 100644 index c4bff17..0000000 --- a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; - -/** - * Abstract class that contains common code of integer and float node definitions. - * - * @author David Jeanmonod - */ -abstract class NumericNodeDefinition extends ScalarNodeDefinition -{ - protected $min; - protected $max; - - /** - * Ensures that the value is smaller than the given reference. - * - * @param int|float $max - * - * @return $this - * - * @throws \InvalidArgumentException when the constraint is inconsistent - */ - public function max($max) - { - if (isset($this->min) && $this->min > $max) { - throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min)); - } - $this->max = $max; - - return $this; - } - - /** - * Ensures that the value is bigger than the given reference. - * - * @param int|float $min - * - * @return $this - * - * @throws \InvalidArgumentException when the constraint is inconsistent - */ - public function min($min) - { - if (isset($this->max) && $this->max < $min) { - throw new \InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max)); - } - $this->min = $min; - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws InvalidDefinitionException - */ - public function cannotBeEmpty() - { - throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.'); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php b/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php deleted file mode 100644 index 449b91a..0000000 --- a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that must be implemented by nodes which can have children. - * - * @author Victor Berchet - */ -interface ParentNodeDefinitionInterface extends BuilderAwareInterface -{ - /** - * Returns a builder to add children nodes. - * - * @return NodeBuilder - */ - public function children(); - - /** - * Appends a node definition. - * - * Usage: - * - * $node = $parentNode - * ->children() - * ->scalarNode('foo')->end() - * ->scalarNode('baz')->end() - * ->append($this->getBarNodeDefinition()) - * ->end() - * ; - * - * @return $this - */ - public function append(NodeDefinition $node); - - /** - * Gets the child node definitions. - * - * @return NodeDefinition[] - */ - public function getChildNodeDefinitions(); -} diff --git a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php deleted file mode 100644 index 076f74b..0000000 --- a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\ScalarNode; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class ScalarNodeDefinition extends VariableNodeDefinition -{ - /** - * Instantiate a Node. - * - * @return ScalarNode - */ - protected function instantiateNode() - { - return new ScalarNode($this->name, $this->parent, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/TreeBuilder.php b/vendor/symfony/config/Definition/Builder/TreeBuilder.php deleted file mode 100644 index f3c3c21..0000000 --- a/vendor/symfony/config/Definition/Builder/TreeBuilder.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\NodeInterface; - -/** - * This is the entry class for building a config tree. - * - * @author Johannes M. Schmitt - */ -class TreeBuilder implements NodeParentInterface -{ - protected $tree; - protected $root; - - public function __construct(string $name, string $type = 'array', NodeBuilder $builder = null) - { - $builder = $builder ?? new NodeBuilder(); - $this->root = $builder->node($name, $type)->setParent($this); - } - - /** - * @return NodeDefinition|ArrayNodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array') - */ - public function getRootNode(): NodeDefinition - { - return $this->root; - } - - /** - * Builds the tree. - * - * @return NodeInterface - * - * @throws \RuntimeException - */ - public function buildTree() - { - if (null !== $this->tree) { - return $this->tree; - } - - return $this->tree = $this->root->getNode(true); - } - - public function setPathSeparator(string $separator) - { - // unset last built as changing path separator changes all nodes - $this->tree = null; - - $this->root->setPathSeparator($separator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php b/vendor/symfony/config/Definition/Builder/ValidationBuilder.php deleted file mode 100644 index 4efc726..0000000 --- a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds validation conditions. - * - * @author Christophe Coevoet - */ -class ValidationBuilder -{ - protected $node; - public $rules = []; - - public function __construct(NodeDefinition $node) - { - $this->node = $node; - } - - /** - * Registers a closure to run as normalization or an expression builder to build it if null is provided. - * - * @return ExprBuilder|$this - */ - public function rule(\Closure $closure = null) - { - if (null !== $closure) { - $this->rules[] = $closure; - - return $this; - } - - return $this->rules[] = new ExprBuilder($this->node); - } -} diff --git a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php b/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php deleted file mode 100644 index eea16cc..0000000 --- a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\VariableNode; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class VariableNodeDefinition extends NodeDefinition -{ - /** - * Instantiate a Node. - * - * @return VariableNode - */ - protected function instantiateNode() - { - return new VariableNode($this->name, $this->parent, $this->pathSeparator); - } - - /** - * {@inheritdoc} - */ - protected function createNode() - { - $node = $this->instantiateNode(); - - if (null !== $this->normalization) { - $node->setNormalizationClosures($this->normalization->before); - } - - if (null !== $this->merge) { - $node->setAllowOverwrite($this->merge->allowOverwrite); - } - - if (true === $this->default) { - $node->setDefaultValue($this->defaultValue); - } - - $node->setAllowEmptyValue($this->allowEmptyValue); - $node->addEquivalentValue(null, $this->nullEquivalent); - $node->addEquivalentValue(true, $this->trueEquivalent); - $node->addEquivalentValue(false, $this->falseEquivalent); - $node->setRequired($this->required); - - if ($this->deprecation) { - $node->setDeprecated($this->deprecation['package'], $this->deprecation['version'], $this->deprecation['message']); - } - - if (null !== $this->validation) { - $node->setFinalValidationClosures($this->validation->rules); - } - - return $node; - } -} diff --git a/vendor/symfony/config/Definition/ConfigurationInterface.php b/vendor/symfony/config/Definition/ConfigurationInterface.php deleted file mode 100644 index 7b5d443..0000000 --- a/vendor/symfony/config/Definition/ConfigurationInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; - -/** - * Configuration interface. - * - * @author Victor Berchet - */ -interface ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder(); -} diff --git a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php deleted file mode 100644 index a8b18a0..0000000 --- a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php +++ /dev/null @@ -1,306 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Dumper; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; - -/** - * Dumps an XML reference configuration for the given configuration/node instance. - * - * @author Wouter J - */ -class XmlReferenceDumper -{ - private $reference; - - public function dump(ConfigurationInterface $configuration, string $namespace = null) - { - return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace); - } - - public function dumpNode(NodeInterface $node, string $namespace = null) - { - $this->reference = ''; - $this->writeNode($node, 0, true, $namespace); - $ref = $this->reference; - $this->reference = null; - - return $ref; - } - - private function writeNode(NodeInterface $node, int $depth = 0, bool $root = false, string $namespace = null) - { - $rootName = ($root ? 'config' : $node->getName()); - $rootNamespace = ($namespace ?: ($root ? 'http://example.org/schema/dic/'.$node->getName() : null)); - - // xml remapping - if ($node->getParent()) { - $remapping = array_filter($node->getParent()->getXmlRemappings(), function (array $mapping) use ($rootName) { - return $rootName === $mapping[1]; - }); - - if (\count($remapping)) { - [$singular] = current($remapping); - $rootName = $singular; - } - } - $rootName = str_replace('_', '-', $rootName); - - $rootAttributes = []; - $rootAttributeComments = []; - $rootChildren = []; - $rootComments = []; - - if ($node instanceof ArrayNode) { - $children = $node->getChildren(); - - // comments about the root node - if ($rootInfo = $node->getInfo()) { - $rootComments[] = $rootInfo; - } - - if ($rootNamespace) { - $rootComments[] = 'Namespace: '.$rootNamespace; - } - - // render prototyped nodes - if ($node instanceof PrototypedArrayNode) { - $prototype = $node->getPrototype(); - - $info = 'prototype'; - if (null !== $prototype->getInfo()) { - $info .= ': '.$prototype->getInfo(); - } - array_unshift($rootComments, $info); - - if ($key = $node->getKeyAttribute()) { - $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key; - } - - if ($prototype instanceof PrototypedArrayNode) { - $prototype->setName($key ?? ''); - $children = [$key => $prototype]; - } elseif ($prototype instanceof ArrayNode) { - $children = $prototype->getChildren(); - } else { - if ($prototype->hasDefaultValue()) { - $prototypeValue = $prototype->getDefaultValue(); - } else { - switch (\get_class($prototype)) { - case 'Symfony\Component\Config\Definition\ScalarNode': - $prototypeValue = 'scalar value'; - break; - - case 'Symfony\Component\Config\Definition\FloatNode': - case 'Symfony\Component\Config\Definition\IntegerNode': - $prototypeValue = 'numeric value'; - break; - - case 'Symfony\Component\Config\Definition\BooleanNode': - $prototypeValue = 'true|false'; - break; - - case 'Symfony\Component\Config\Definition\EnumNode': - $prototypeValue = implode('|', array_map('json_encode', $prototype->getValues())); - break; - - default: - $prototypeValue = 'value'; - } - } - } - } - - // get attributes and elements - foreach ($children as $child) { - if ($child instanceof ArrayNode) { - // get elements - $rootChildren[] = $child; - - continue; - } - - // get attributes - - // metadata - $name = str_replace('_', '-', $child->getName()); - $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world - - // comments - $comments = []; - if ($child instanceof BaseNode && $info = $child->getInfo()) { - $comments[] = $info; - } - - if ($child instanceof BaseNode && $example = $child->getExample()) { - $comments[] = 'Example: '.$example; - } - - if ($child->isRequired()) { - $comments[] = 'Required'; - } - - if ($child instanceof BaseNode && $child->isDeprecated()) { - $deprecation = $child->getDeprecation($child->getName(), $node->getPath()); - $comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - if ($child instanceof EnumNode) { - $comments[] = 'One of '.implode('; ', array_map('json_encode', $child->getValues())); - } - - if (\count($comments)) { - $rootAttributeComments[$name] = implode(";\n", $comments); - } - - // default values - if ($child->hasDefaultValue()) { - $value = $child->getDefaultValue(); - } - - // append attribute - $rootAttributes[$name] = $value; - } - } - - // render comments - - // root node comment - if (\count($rootComments)) { - foreach ($rootComments as $comment) { - $this->writeLine('', $depth); - } - } - - // attribute comments - if (\count($rootAttributeComments)) { - foreach ($rootAttributeComments as $attrName => $comment) { - $commentDepth = $depth + 4 + \strlen($attrName) + 2; - $commentLines = explode("\n", $comment); - $multiline = (\count($commentLines) > 1); - $comment = implode(\PHP_EOL.str_repeat(' ', $commentDepth), $commentLines); - - if ($multiline) { - $this->writeLine('', $depth); - } else { - $this->writeLine('', $depth); - } - } - } - - // render start tag + attributes - $rootIsVariablePrototype = isset($prototypeValue); - $rootIsEmptyTag = (0 === \count($rootChildren) && !$rootIsVariablePrototype); - $rootOpenTag = '<'.$rootName; - if (1 >= ($attributesCount = \count($rootAttributes))) { - if (1 === $attributesCount) { - $rootOpenTag .= sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes))); - } - - $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>'; - - if ($rootIsVariablePrototype) { - $rootOpenTag .= $prototypeValue.''; - } - - $this->writeLine($rootOpenTag, $depth); - } else { - $this->writeLine($rootOpenTag, $depth); - - $i = 1; - - foreach ($rootAttributes as $attrName => $attrValue) { - $attr = sprintf('%s="%s"', $attrName, $this->writeValue($attrValue)); - - $this->writeLine($attr, $depth + 4); - - if ($attributesCount === $i++) { - $this->writeLine($rootIsEmptyTag ? '/>' : '>', $depth); - - if ($rootIsVariablePrototype) { - $rootOpenTag .= $prototypeValue.''; - } - } - } - } - - // render children tags - foreach ($rootChildren as $child) { - $this->writeLine(''); - $this->writeNode($child, $depth + 4); - } - - // render end tag - if (!$rootIsEmptyTag && !$rootIsVariablePrototype) { - $this->writeLine(''); - - $rootEndTag = ''; - $this->writeLine($rootEndTag, $depth); - } - } - - /** - * Outputs a single config reference line. - */ - private function writeLine(string $text, int $indent = 0) - { - $indent = \strlen($text) + $indent; - $format = '%'.$indent.'s'; - - $this->reference .= sprintf($format, $text).\PHP_EOL; - } - - /** - * Renders the string conversion of the value. - * - * @param mixed $value - */ - private function writeValue($value): string - { - if ('%%%%not_defined%%%%' === $value) { - return ''; - } - - if (\is_string($value) || is_numeric($value)) { - return $value; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - if (null === $value) { - return 'null'; - } - - if (empty($value)) { - return ''; - } - - if (\is_array($value)) { - return implode(',', $value); - } - - return ''; - } -} diff --git a/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php b/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php deleted file mode 100644 index 6fcfb71..0000000 --- a/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php +++ /dev/null @@ -1,251 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Dumper; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; -use Symfony\Component\Config\Definition\VariableNode; -use Symfony\Component\Yaml\Inline; - -/** - * Dumps a Yaml reference configuration for the given configuration/node instance. - * - * @author Kevin Bond - */ -class YamlReferenceDumper -{ - private $reference; - - public function dump(ConfigurationInterface $configuration) - { - return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()); - } - - public function dumpAtPath(ConfigurationInterface $configuration, string $path) - { - $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree(); - - foreach (explode('.', $path) as $step) { - if (!$node instanceof ArrayNode) { - throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); - } - - /** @var NodeInterface[] $children */ - $children = $node instanceof PrototypedArrayNode ? $this->getPrototypeChildren($node) : $node->getChildren(); - - foreach ($children as $child) { - if ($child->getName() === $step) { - $node = $child; - - continue 2; - } - } - - throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); - } - - return $this->dumpNode($node); - } - - public function dumpNode(NodeInterface $node) - { - $this->reference = ''; - $this->writeNode($node); - $ref = $this->reference; - $this->reference = null; - - return $ref; - } - - private function writeNode(NodeInterface $node, NodeInterface $parentNode = null, int $depth = 0, bool $prototypedArray = false) - { - $comments = []; - $default = ''; - $defaultArray = null; - $children = null; - $example = null; - if ($node instanceof BaseNode) { - $example = $node->getExample(); - } - - // defaults - if ($node instanceof ArrayNode) { - $children = $node->getChildren(); - - if ($node instanceof PrototypedArrayNode) { - $children = $this->getPrototypeChildren($node); - } - - if (!$children) { - if ($node->hasDefaultValue() && \count($defaultArray = $node->getDefaultValue())) { - $default = ''; - } elseif (!\is_array($example)) { - $default = '[]'; - } - } - } elseif ($node instanceof EnumNode) { - $comments[] = 'One of '.implode('; ', array_map('json_encode', $node->getValues())); - $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~'; - } elseif (VariableNode::class === \get_class($node) && \is_array($example)) { - // If there is an array example, we are sure we dont need to print a default value - $default = ''; - } else { - $default = '~'; - - if ($node->hasDefaultValue()) { - $default = $node->getDefaultValue(); - - if (\is_array($default)) { - if (\count($defaultArray = $node->getDefaultValue())) { - $default = ''; - } elseif (!\is_array($example)) { - $default = '[]'; - } - } else { - $default = Inline::dump($default); - } - } - } - - // required? - if ($node->isRequired()) { - $comments[] = 'Required'; - } - - // deprecated? - if ($node instanceof BaseNode && $node->isDeprecated()) { - $deprecation = $node->getDeprecation($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath()); - $comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - // example - if ($example && !\is_array($example)) { - $comments[] = 'Example: '.Inline::dump($example); - } - - $default = '' != (string) $default ? ' '.$default : ''; - $comments = \count($comments) ? '# '.implode(', ', $comments) : ''; - - $key = $prototypedArray ? '-' : $node->getName().':'; - $text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' '); - - if ($node instanceof BaseNode && $info = $node->getInfo()) { - $this->writeLine(''); - // indenting multi-line info - $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info); - $this->writeLine('# '.$info, $depth * 4); - } - - $this->writeLine($text, $depth * 4); - - // output defaults - if ($defaultArray) { - $this->writeLine(''); - - $message = \count($defaultArray) > 1 ? 'Defaults' : 'Default'; - - $this->writeLine('# '.$message.':', $depth * 4 + 4); - - $this->writeArray($defaultArray, $depth + 1); - } - - if (\is_array($example)) { - $this->writeLine(''); - - $message = \count($example) > 1 ? 'Examples' : 'Example'; - - $this->writeLine('# '.$message.':', $depth * 4 + 4); - - $this->writeArray(array_map([Inline::class, 'dump'], $example), $depth + 1); - } - - if ($children) { - foreach ($children as $childNode) { - $this->writeNode($childNode, $node, $depth + 1, $node instanceof PrototypedArrayNode && !$node->getKeyAttribute()); - } - } - } - - /** - * Outputs a single config reference line. - */ - private function writeLine(string $text, int $indent = 0) - { - $indent = \strlen($text) + $indent; - $format = '%'.$indent.'s'; - - $this->reference .= sprintf($format, $text)."\n"; - } - - private function writeArray(array $array, int $depth) - { - $isIndexed = array_values($array) === $array; - - foreach ($array as $key => $value) { - if (\is_array($value)) { - $val = ''; - } else { - $val = $value; - } - - if ($isIndexed) { - $this->writeLine('- '.$val, $depth * 4); - } else { - $this->writeLine(sprintf('%-20s %s', $key.':', $val), $depth * 4); - } - - if (\is_array($value)) { - $this->writeArray($value, $depth + 1); - } - } - } - - private function getPrototypeChildren(PrototypedArrayNode $node): array - { - $prototype = $node->getPrototype(); - $key = $node->getKeyAttribute(); - - // Do not expand prototype if it isn't an array node nor uses attribute as key - if (!$key && !$prototype instanceof ArrayNode) { - return $node->getChildren(); - } - - if ($prototype instanceof ArrayNode) { - $keyNode = new ArrayNode($key, $node); - $children = $prototype->getChildren(); - - if ($prototype instanceof PrototypedArrayNode && $prototype->getKeyAttribute()) { - $children = $this->getPrototypeChildren($prototype); - } - - // add children - foreach ($children as $childNode) { - $keyNode->addChild($childNode); - } - } else { - $keyNode = new ScalarNode($key, $node); - } - - $info = 'Prototype'; - if (null !== $prototype->getInfo()) { - $info .= ': '.$prototype->getInfo(); - } - $keyNode->setInfo($info); - - return [$key => $keyNode]; - } -} diff --git a/vendor/symfony/config/Definition/EnumNode.php b/vendor/symfony/config/Definition/EnumNode.php deleted file mode 100644 index 822e6b5..0000000 --- a/vendor/symfony/config/Definition/EnumNode.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * Node which only allows a finite set of values. - * - * @author Johannes M. Schmitt - */ -class EnumNode extends ScalarNode -{ - private $values; - - public function __construct(?string $name, NodeInterface $parent = null, array $values = [], string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR) - { - $values = array_unique($values); - if (empty($values)) { - throw new \InvalidArgumentException('$values must contain at least one element.'); - } - - parent::__construct($name, $parent, $pathSeparator); - $this->values = $values; - } - - public function getValues() - { - return $this->values; - } - - /** - * {@inheritdoc} - */ - protected function finalizeValue($value) - { - $value = parent::finalizeValue($value); - - if (!\in_array($value, $this->values, true)) { - $ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values)))); - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - protected function allowPlaceholders(): bool - { - return false; - } -} diff --git a/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php b/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php deleted file mode 100644 index 48dd932..0000000 --- a/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown whenever the key of an array is not unique. This can - * only be the case if the configuration is coming from an XML file. - * - * @author Johannes M. Schmitt - */ -class DuplicateKeyException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/Exception.php b/vendor/symfony/config/Definition/Exception/Exception.php deleted file mode 100644 index 8933a49..0000000 --- a/vendor/symfony/config/Definition/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * Base exception for all configuration exceptions. - * - * @author Johannes M. Schmitt - */ -class Exception extends \RuntimeException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php b/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php deleted file mode 100644 index 726c07f..0000000 --- a/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown when a configuration path is overwritten from a - * subsequent configuration file, but the entry node specifically forbids this. - * - * @author Johannes M. Schmitt - */ -class ForbiddenOverwriteException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php b/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php deleted file mode 100644 index ceb5e23..0000000 --- a/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * A very general exception which can be thrown whenever non of the more specific - * exceptions is suitable. - * - * @author Johannes M. Schmitt - */ -class InvalidConfigurationException extends Exception -{ - private $path; - private $containsHints = false; - - public function setPath(string $path) - { - $this->path = $path; - } - - public function getPath() - { - return $this->path; - } - - /** - * Adds extra information that is suffixed to the original exception message. - */ - public function addHint(string $hint) - { - if (!$this->containsHints) { - $this->message .= "\nHint: ".$hint; - $this->containsHints = true; - } else { - $this->message .= ', '.$hint; - } - } -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php b/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php deleted file mode 100644 index 98310da..0000000 --- a/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * Thrown when an error is detected in a node Definition. - * - * @author Victor Berchet - */ -class InvalidDefinitionException extends Exception -{ -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidTypeException.php b/vendor/symfony/config/Definition/Exception/InvalidTypeException.php deleted file mode 100644 index d7ca8c9..0000000 --- a/vendor/symfony/config/Definition/Exception/InvalidTypeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown if an invalid type is encountered. - * - * @author Johannes M. Schmitt - */ -class InvalidTypeException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/UnsetKeyException.php b/vendor/symfony/config/Definition/Exception/UnsetKeyException.php deleted file mode 100644 index 863181a..0000000 --- a/vendor/symfony/config/Definition/Exception/UnsetKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is usually not encountered by the end-user, but only used - * internally to signal the parent scope to unset a key. - * - * @author Johannes M. Schmitt - */ -class UnsetKeyException extends Exception -{ -} diff --git a/vendor/symfony/config/Definition/FloatNode.php b/vendor/symfony/config/Definition/FloatNode.php deleted file mode 100644 index 527f996..0000000 --- a/vendor/symfony/config/Definition/FloatNode.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a float value in the config tree. - * - * @author Jeanmonod David - */ -class FloatNode extends NumericNode -{ - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - // Integers are also accepted, we just cast them - if (\is_int($value)) { - $value = (float) $value; - } - - if (!\is_float($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "float", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * {@inheritdoc} - */ - protected function getValidPlaceholderTypes(): array - { - return ['float']; - } -} diff --git a/vendor/symfony/config/Definition/IntegerNode.php b/vendor/symfony/config/Definition/IntegerNode.php deleted file mode 100644 index dfb4cc6..0000000 --- a/vendor/symfony/config/Definition/IntegerNode.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents an integer value in the config tree. - * - * @author Jeanmonod David - */ -class IntegerNode extends NumericNode -{ - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - if (!\is_int($value)) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "int", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * {@inheritdoc} - */ - protected function getValidPlaceholderTypes(): array - { - return ['int']; - } -} diff --git a/vendor/symfony/config/Definition/NodeInterface.php b/vendor/symfony/config/Definition/NodeInterface.php deleted file mode 100644 index 9c279ae..0000000 --- a/vendor/symfony/config/Definition/NodeInterface.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * Common Interface among all nodes. - * - * In most cases, it is better to inherit from BaseNode instead of implementing - * this interface yourself. - * - * @author Johannes M. Schmitt - */ -interface NodeInterface -{ - /** - * Returns the name of the node. - * - * @return string - */ - public function getName(); - - /** - * Returns the path of the node. - * - * @return string - */ - public function getPath(); - - /** - * Returns true when the node is required. - * - * @return bool - */ - public function isRequired(); - - /** - * Returns true when the node has a default value. - * - * @return bool - */ - public function hasDefaultValue(); - - /** - * Returns the default value of the node. - * - * @return mixed - * - * @throws \RuntimeException if the node has no default value - */ - public function getDefaultValue(); - - /** - * Normalizes a value. - * - * @param mixed $value The value to normalize - * - * @return mixed - * - * @throws InvalidTypeException if the value type is invalid - */ - public function normalize($value); - - /** - * Merges two values together. - * - * @param mixed $leftSide - * @param mixed $rightSide - * - * @return mixed - * - * @throws ForbiddenOverwriteException if the configuration path cannot be overwritten - * @throws InvalidTypeException if the value type is invalid - */ - public function merge($leftSide, $rightSide); - - /** - * Finalizes a value. - * - * @param mixed $value The value to finalize - * - * @return mixed - * - * @throws InvalidTypeException if the value type is invalid - * @throws InvalidConfigurationException if the value is invalid configuration - */ - public function finalize($value); -} diff --git a/vendor/symfony/config/Definition/NumericNode.php b/vendor/symfony/config/Definition/NumericNode.php deleted file mode 100644 index 50d137c..0000000 --- a/vendor/symfony/config/Definition/NumericNode.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * This node represents a numeric value in the config tree. - * - * @author David Jeanmonod - */ -class NumericNode extends ScalarNode -{ - protected $min; - protected $max; - - /** - * @param int|float|null $min - * @param int|float|null $max - */ - public function __construct(?string $name, NodeInterface $parent = null, $min = null, $max = null, string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR) - { - parent::__construct($name, $parent, $pathSeparator); - $this->min = $min; - $this->max = $max; - } - - /** - * {@inheritdoc} - */ - protected function finalizeValue($value) - { - $value = parent::finalizeValue($value); - - $errorMsg = null; - if (isset($this->min) && $value < $this->min) { - $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); - } - if (isset($this->max) && $value > $this->max) { - $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); - } - if (isset($errorMsg)) { - $ex = new InvalidConfigurationException($errorMsg); - $ex->setPath($this->getPath()); - throw $ex; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - protected function isValueEmpty($value) - { - // a numeric value cannot be empty - return false; - } -} diff --git a/vendor/symfony/config/Definition/Processor.php b/vendor/symfony/config/Definition/Processor.php deleted file mode 100644 index c431408..0000000 --- a/vendor/symfony/config/Definition/Processor.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -/** - * This class is the entry point for config normalization/merging/finalization. - * - * @author Johannes M. Schmitt - * - * @final - */ -class Processor -{ - /** - * Processes an array of configurations. - * - * @param array $configs An array of configuration items to process - */ - public function process(NodeInterface $configTree, array $configs): array - { - $currentConfig = []; - foreach ($configs as $config) { - $config = $configTree->normalize($config); - $currentConfig = $configTree->merge($currentConfig, $config); - } - - return $configTree->finalize($currentConfig); - } - - /** - * Processes an array of configurations. - * - * @param array $configs An array of configuration items to process - */ - public function processConfiguration(ConfigurationInterface $configuration, array $configs): array - { - return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs); - } - - /** - * Normalizes a configuration entry. - * - * This method returns a normalize configuration array for a given key - * to remove the differences due to the original format (YAML and XML mainly). - * - * Here is an example. - * - * The configuration in XML: - * - * twig.extension.foo - * twig.extension.bar - * - * And the same configuration in YAML: - * - * extensions: ['twig.extension.foo', 'twig.extension.bar'] - * - * @param array $config A config array - * @param string $key The key to normalize - * @param string $plural The plural form of the key if it is irregular - */ - public static function normalizeConfig(array $config, string $key, string $plural = null): array - { - if (null === $plural) { - $plural = $key.'s'; - } - - if (isset($config[$plural])) { - return $config[$plural]; - } - - if (isset($config[$key])) { - if (\is_string($config[$key]) || !\is_int(key($config[$key]))) { - // only one - return [$config[$key]]; - } - - return $config[$key]; - } - - return []; - } -} diff --git a/vendor/symfony/config/Definition/PrototypeNodeInterface.php b/vendor/symfony/config/Definition/PrototypeNodeInterface.php deleted file mode 100644 index b160aa9..0000000 --- a/vendor/symfony/config/Definition/PrototypeNodeInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -/** - * This interface must be implemented by nodes which can be used as prototypes. - * - * @author Johannes M. Schmitt - */ -interface PrototypeNodeInterface extends NodeInterface -{ - /** - * Sets the name of the node. - */ - public function setName(string $name); -} diff --git a/vendor/symfony/config/Definition/PrototypedArrayNode.php b/vendor/symfony/config/Definition/PrototypedArrayNode.php deleted file mode 100644 index e78159c..0000000 --- a/vendor/symfony/config/Definition/PrototypedArrayNode.php +++ /dev/null @@ -1,350 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\DuplicateKeyException; -use Symfony\Component\Config\Definition\Exception\Exception; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * Represents a prototyped Array node in the config tree. - * - * @author Johannes M. Schmitt - */ -class PrototypedArrayNode extends ArrayNode -{ - protected $prototype; - protected $keyAttribute; - protected $removeKeyAttribute = false; - protected $minNumberOfElements = 0; - protected $defaultValue = []; - protected $defaultChildren; - /** - * @var NodeInterface[] An array of the prototypes of the simplified value children - */ - private $valuePrototypes = []; - - /** - * Sets the minimum number of elements that a prototype based node must - * contain. By default this is zero, meaning no elements. - */ - public function setMinNumberOfElements(int $number) - { - $this->minNumberOfElements = $number; - } - - /** - * Sets the attribute which value is to be used as key. - * - * This is useful when you have an indexed array that should be an - * associative array. You can select an item from within the array - * to be the key of the particular item. For example, if "id" is the - * "key", then: - * - * [ - * ['id' => 'my_name', 'foo' => 'bar'], - * ]; - * - * becomes - * - * [ - * 'my_name' => ['foo' => 'bar'], - * ]; - * - * If you'd like "'id' => 'my_name'" to still be present in the resulting - * array, then you can set the second argument of this method to false. - * - * @param string $attribute The name of the attribute which value is to be used as a key - * @param bool $remove Whether or not to remove the key - */ - public function setKeyAttribute(string $attribute, bool $remove = true) - { - $this->keyAttribute = $attribute; - $this->removeKeyAttribute = $remove; - } - - /** - * Retrieves the name of the attribute which value should be used as key. - * - * @return string|null - */ - public function getKeyAttribute() - { - return $this->keyAttribute; - } - - /** - * Sets the default value of this node. - */ - public function setDefaultValue(array $value) - { - $this->defaultValue = $value; - } - - /** - * {@inheritdoc} - */ - public function hasDefaultValue() - { - return true; - } - - /** - * Adds default children when none are set. - * - * @param int|string|array|null $children The number of children|The child name|The children names to be added - */ - public function setAddChildrenIfNoneSet($children = ['defaults']) - { - if (null === $children) { - $this->defaultChildren = ['defaults']; - } else { - $this->defaultChildren = \is_int($children) && $children > 0 ? range(1, $children) : (array) $children; - } - } - - /** - * {@inheritdoc} - * - * The default value could be either explicited or derived from the prototype - * default value. - */ - public function getDefaultValue() - { - if (null !== $this->defaultChildren) { - $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : []; - $defaults = []; - foreach (array_values($this->defaultChildren) as $i => $name) { - $defaults[null === $this->keyAttribute ? $i : $name] = $default; - } - - return $defaults; - } - - return $this->defaultValue; - } - - /** - * Sets the node prototype. - */ - public function setPrototype(PrototypeNodeInterface $node) - { - $this->prototype = $node; - } - - /** - * Retrieves the prototype. - * - * @return PrototypeNodeInterface - */ - public function getPrototype() - { - return $this->prototype; - } - - /** - * Disable adding concrete children for prototyped nodes. - * - * @throws Exception - */ - public function addChild(NodeInterface $node) - { - throw new Exception('A prototyped array node cannot have concrete children.'); - } - - /** - * {@inheritdoc} - */ - protected function finalizeValue($value) - { - if (false === $value) { - throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s.', $this->getPath(), json_encode($value))); - } - - foreach ($value as $k => $v) { - $prototype = $this->getPrototypeForChild($k); - try { - $value[$k] = $prototype->finalize($v); - } catch (UnsetKeyException $e) { - unset($value[$k]); - } - } - - if (\count($value) < $this->minNumberOfElements) { - $ex = new InvalidConfigurationException(sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements)); - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $value; - } - - /** - * {@inheritdoc} - * - * @throws DuplicateKeyException - */ - protected function normalizeValue($value) - { - if (false === $value) { - return $value; - } - - $value = $this->remapXml($value); - - $isList = array_is_list($value); - $normalized = []; - foreach ($value as $k => $v) { - if (null !== $this->keyAttribute && \is_array($v)) { - if (!isset($v[$this->keyAttribute]) && \is_int($k) && $isList) { - $ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } elseif (isset($v[$this->keyAttribute])) { - $k = $v[$this->keyAttribute]; - - if (\is_float($k)) { - $k = var_export($k, true); - } - - // remove the key attribute when required - if ($this->removeKeyAttribute) { - unset($v[$this->keyAttribute]); - } - - // if only "value" is left - if (array_keys($v) === ['value']) { - $v = $v['value']; - if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && \array_key_exists('value', $children)) { - $valuePrototype = current($this->valuePrototypes) ?: clone $children['value']; - $valuePrototype->parent = $this; - $originalClosures = $this->prototype->normalizationClosures; - if (\is_array($originalClosures)) { - $valuePrototypeClosures = $valuePrototype->normalizationClosures; - $valuePrototype->normalizationClosures = \is_array($valuePrototypeClosures) ? array_merge($originalClosures, $valuePrototypeClosures) : $originalClosures; - } - $this->valuePrototypes[$k] = $valuePrototype; - } - } - } - - if (\array_key_exists($k, $normalized)) { - $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - $prototype = $this->getPrototypeForChild($k); - if (null !== $this->keyAttribute || !$isList) { - $normalized[$k] = $prototype->normalize($v); - } else { - $normalized[] = $prototype->normalize($v); - } - } - - return $normalized; - } - - /** - * {@inheritdoc} - */ - protected function mergeValues($leftSide, $rightSide) - { - if (false === $rightSide) { - // if this is still false after the last config has been merged the - // finalization pass will take care of removing this key entirely - return false; - } - - if (false === $leftSide || !$this->performDeepMerging) { - return $rightSide; - } - - $isList = array_is_list($rightSide); - foreach ($rightSide as $k => $v) { - // prototype, and key is irrelevant there are no named keys, append the element - if (null === $this->keyAttribute && $isList) { - $leftSide[] = $v; - continue; - } - - // no conflict - if (!\array_key_exists($k, $leftSide)) { - if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - - $leftSide[$k] = $v; - continue; - } - - $prototype = $this->getPrototypeForChild($k); - $leftSide[$k] = $prototype->merge($leftSide[$k], $v); - } - - return $leftSide; - } - - /** - * Returns a prototype for the child node that is associated to $key in the value array. - * For general child nodes, this will be $this->prototype. - * But if $this->removeKeyAttribute is true and there are only two keys in the child node: - * one is same as this->keyAttribute and the other is 'value', then the prototype will be different. - * - * For example, assume $this->keyAttribute is 'name' and the value array is as follows: - * - * [ - * [ - * 'name' => 'name001', - * 'value' => 'value001' - * ] - * ] - * - * Now, the key is 0 and the child node is: - * - * [ - * 'name' => 'name001', - * 'value' => 'value001' - * ] - * - * When normalizing the value array, the 'name' element will removed from the child node - * and its value becomes the new key of the child node: - * - * [ - * 'name001' => ['value' => 'value001'] - * ] - * - * Now only 'value' element is left in the child node which can be further simplified into a string: - * - * ['name001' => 'value001'] - * - * Now, the key becomes 'name001' and the child node becomes 'value001' and - * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. - * - * @return mixed - */ - private function getPrototypeForChild(string $key) - { - $prototype = $this->valuePrototypes[$key] ?? $this->prototype; - $prototype->setName($key); - - return $prototype; - } -} diff --git a/vendor/symfony/config/Definition/ScalarNode.php b/vendor/symfony/config/Definition/ScalarNode.php deleted file mode 100644 index 5296c27..0000000 --- a/vendor/symfony/config/Definition/ScalarNode.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a scalar value in the config tree. - * - * The following values are considered scalars: - * * booleans - * * strings - * * null - * * integers - * * floats - * - * @author Johannes M. Schmitt - */ -class ScalarNode extends VariableNode -{ - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - if (!is_scalar($value) && null !== $value) { - $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected "scalar", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * {@inheritdoc} - */ - protected function isValueEmpty($value) - { - // assume environment variables are never empty (which in practice is likely to be true during runtime) - // not doing so breaks many configs that are valid today - if ($this->isHandlingPlaceholder()) { - return false; - } - - return null === $value || '' === $value; - } - - /** - * {@inheritdoc} - */ - protected function getValidPlaceholderTypes(): array - { - return ['bool', 'int', 'float', 'string']; - } -} diff --git a/vendor/symfony/config/Definition/VariableNode.php b/vendor/symfony/config/Definition/VariableNode.php deleted file mode 100644 index e868ece..0000000 --- a/vendor/symfony/config/Definition/VariableNode.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * This node represents a value of variable type in the config tree. - * - * This node is intended for values of arbitrary type. - * Any PHP type is accepted as a value. - * - * @author Jeremy Mikola - */ -class VariableNode extends BaseNode implements PrototypeNodeInterface -{ - protected $defaultValueSet = false; - protected $defaultValue; - protected $allowEmptyValue = true; - - public function setDefaultValue($value) - { - $this->defaultValueSet = true; - $this->defaultValue = $value; - } - - /** - * {@inheritdoc} - */ - public function hasDefaultValue() - { - return $this->defaultValueSet; - } - - /** - * {@inheritdoc} - */ - public function getDefaultValue() - { - $v = $this->defaultValue; - - return $v instanceof \Closure ? $v() : $v; - } - - /** - * Sets if this node is allowed to have an empty value. - * - * @param bool $boolean True if this entity will accept empty values - */ - public function setAllowEmptyValue(bool $boolean) - { - $this->allowEmptyValue = $boolean; - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - protected function validateType($value) - { - } - - /** - * {@inheritdoc} - */ - protected function finalizeValue($value) - { - // deny environment variables only when using custom validators - // this avoids ever passing an empty value to final validation closures - if (!$this->allowEmptyValue && $this->isHandlingPlaceholder() && $this->finalValidationClosures) { - $e = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath())); - if ($hint = $this->getInfo()) { - $e->addHint($hint); - } - $e->setPath($this->getPath()); - - throw $e; - } - - if (!$this->allowEmptyValue && $this->isValueEmpty($value)) { - $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - protected function normalizeValue($value) - { - return $value; - } - - /** - * {@inheritdoc} - */ - protected function mergeValues($leftSide, $rightSide) - { - return $rightSide; - } - - /** - * Evaluates if the given value is to be treated as empty. - * - * By default, PHP's empty() function is used to test for emptiness. This - * method may be overridden by subtypes to better match their understanding - * of empty data. - * - * @param mixed $value - * - * @return bool - * - * @see finalizeValue() - */ - protected function isValueEmpty($value) - { - return empty($value); - } -} diff --git a/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php b/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php deleted file mode 100644 index e235ea0..0000000 --- a/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * Exception class for when a circular reference is detected when importing resources. - * - * @author Fabien Potencier - */ -class FileLoaderImportCircularReferenceException extends LoaderLoadException -{ - public function __construct(array $resources, ?int $code = 0, \Throwable $previous = null) - { - if (null === $code) { - trigger_deprecation('symfony/config', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]); - - \Exception::__construct($message, $code, $previous); - } -} diff --git a/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php b/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php deleted file mode 100644 index 3ee4b93..0000000 --- a/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * File locator exception if a file does not exist. - * - * @author Leo Feyer - */ -class FileLocatorFileNotFoundException extends \InvalidArgumentException -{ - private $paths; - - public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, array $paths = []) - { - parent::__construct($message, $code, $previous); - - $this->paths = $paths; - } - - public function getPaths() - { - return $this->paths; - } -} diff --git a/vendor/symfony/config/Exception/LoaderLoadException.php b/vendor/symfony/config/Exception/LoaderLoadException.php deleted file mode 100644 index b20e74d..0000000 --- a/vendor/symfony/config/Exception/LoaderLoadException.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * Exception class for when a resource cannot be loaded or imported. - * - * @author Ryan Weaver - */ -class LoaderLoadException extends \Exception -{ - /** - * @param string $resource The resource that could not be imported - * @param string|null $sourceResource The original resource importing the new resource - * @param int|null $code The error code - * @param \Throwable|null $previous A previous exception - * @param string|null $type The type of resource - */ - public function __construct(string $resource, string $sourceResource = null, ?int $code = 0, \Throwable $previous = null, string $type = null) - { - if (null === $code) { - trigger_deprecation('symfony/config', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $message = ''; - if ($previous) { - // Include the previous exception, to help the user see what might be the underlying cause - - // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim... - if ('.' === substr($previous->getMessage(), -1)) { - $trimmedMessage = substr($previous->getMessage(), 0, -1); - $message .= sprintf('%s', $trimmedMessage).' in '; - } else { - $message .= sprintf('%s', $previous->getMessage()).' in '; - } - $message .= $resource.' '; - - // show tweaked trace to complete the human readable sentence - if (null === $sourceResource) { - $message .= sprintf('(which is loaded in resource "%s")', $resource); - } else { - $message .= sprintf('(which is being imported from "%s")', $sourceResource); - } - $message .= '.'; - - // if there's no previous message, present it the default way - } elseif (null === $sourceResource) { - $message .= sprintf('Cannot load resource "%s".', $resource); - } else { - $message .= sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource); - } - - // Is the resource located inside a bundle? - if ('@' === $resource[0]) { - $parts = explode(\DIRECTORY_SEPARATOR, $resource); - $bundle = substr($parts[0], 1); - $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); - $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); - } elseif (null !== $type) { - // maybe there is no loader for this specific type - if ('annotation' === $type) { - $message .= ' Make sure to use PHP 8+ or that annotations are installed and enabled.'; - } else { - $message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type); - } - } - - parent::__construct($message, $code, $previous); - } - - protected function varToString($var) - { - if (\is_object($var)) { - return sprintf('Object(%s)', \get_class($var)); - } - - if (\is_array($var)) { - $a = []; - foreach ($var as $k => $v) { - $a[] = sprintf('%s => %s', $k, $this->varToString($v)); - } - - return sprintf('Array(%s)', implode(', ', $a)); - } - - if (\is_resource($var)) { - return sprintf('Resource(%s)', get_resource_type($var)); - } - - if (null === $var) { - return 'null'; - } - - if (false === $var) { - return 'false'; - } - - if (true === $var) { - return 'true'; - } - - return (string) $var; - } -} diff --git a/vendor/symfony/config/FileLocator.php b/vendor/symfony/config/FileLocator.php deleted file mode 100644 index da35090..0000000 --- a/vendor/symfony/config/FileLocator.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; - -/** - * FileLocator uses an array of pre-defined paths to find files. - * - * @author Fabien Potencier - */ -class FileLocator implements FileLocatorInterface -{ - protected $paths; - - /** - * @param string|string[] $paths A path or an array of paths where to look for resources - */ - public function __construct($paths = []) - { - $this->paths = (array) $paths; - } - - /** - * {@inheritdoc} - */ - public function locate(string $name, string $currentPath = null, bool $first = true) - { - if ('' === $name) { - throw new \InvalidArgumentException('An empty file name is not valid to be located.'); - } - - if ($this->isAbsolutePath($name)) { - if (!file_exists($name)) { - throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); - } - - return $name; - } - - $paths = $this->paths; - - if (null !== $currentPath) { - array_unshift($paths, $currentPath); - } - - $paths = array_unique($paths); - $filepaths = $notfound = []; - - foreach ($paths as $path) { - if (@file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) { - if (true === $first) { - return $file; - } - $filepaths[] = $file; - } else { - $notfound[] = $file; - } - } - - if (!$filepaths) { - throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist (in: "%s").', $name, implode('", "', $paths)), 0, null, $notfound); - } - - return $filepaths; - } - - /** - * Returns whether the file path is an absolute path. - */ - private function isAbsolutePath(string $file): bool - { - if ('/' === $file[0] || '\\' === $file[0] - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && ('\\' === $file[2] || '/' === $file[2]) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ) { - return true; - } - - return false; - } -} diff --git a/vendor/symfony/config/FileLocatorInterface.php b/vendor/symfony/config/FileLocatorInterface.php deleted file mode 100644 index e3ca1d4..0000000 --- a/vendor/symfony/config/FileLocatorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; - -/** - * @author Fabien Potencier - */ -interface FileLocatorInterface -{ - /** - * Returns a full path for a given file name. - * - * @param string $name The file name to locate - * @param string|null $currentPath The current path - * @param bool $first Whether to return the first occurrence or an array of filenames - * - * @return string|array The full path to the file or an array of file paths - * - * @throws \InvalidArgumentException If $name is empty - * @throws FileLocatorFileNotFoundException If a file is not found - */ - public function locate(string $name, string $currentPath = null, bool $first = true); -} diff --git a/vendor/symfony/config/LICENSE b/vendor/symfony/config/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/config/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/config/Loader/DelegatingLoader.php b/vendor/symfony/config/Loader/DelegatingLoader.php deleted file mode 100644 index e5a74ee..0000000 --- a/vendor/symfony/config/Loader/DelegatingLoader.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\LoaderLoadException; - -/** - * DelegatingLoader delegates loading to other loaders using a loader resolver. - * - * This loader acts as an array of LoaderInterface objects - each having - * a chance to load a given resource (handled by the resolver) - * - * @author Fabien Potencier - */ -class DelegatingLoader extends Loader -{ - public function __construct(LoaderResolverInterface $resolver) - { - $this->resolver = $resolver; - } - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - if (false === $loader = $this->resolver->resolve($resource, $type)) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - return $loader->load($resource, $type); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return false !== $this->resolver->resolve($resource, $type); - } -} diff --git a/vendor/symfony/config/Loader/FileLoader.php b/vendor/symfony/config/Loader/FileLoader.php deleted file mode 100644 index 4e1b46c..0000000 --- a/vendor/symfony/config/Loader/FileLoader.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException; -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\GlobResource; - -/** - * FileLoader is the abstract class used by all built-in loaders that are file based. - * - * @author Fabien Potencier - */ -abstract class FileLoader extends Loader -{ - protected static $loading = []; - - protected $locator; - - private $currentDir; - - public function __construct(FileLocatorInterface $locator, string $env = null) - { - $this->locator = $locator; - parent::__construct($env); - } - - /** - * Sets the current directory. - */ - public function setCurrentDir(string $dir) - { - $this->currentDir = $dir; - } - - /** - * Returns the file locator used by this loader. - * - * @return FileLocatorInterface - */ - public function getLocator() - { - return $this->locator; - } - - /** - * Imports a resource. - * - * @param mixed $resource A Resource - * @param string|null $type The resource type or null if unknown - * @param bool $ignoreErrors Whether to ignore import errors or not - * @param string|null $sourceResource The original resource importing the new resource - * @param string|string[]|null $exclude Glob patterns to exclude from the import - * - * @return mixed - * - * @throws LoaderLoadException - * @throws FileLoaderImportCircularReferenceException - * @throws FileLocatorFileNotFoundException - */ - public function import($resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null, $exclude = null) - { - if (\is_string($resource) && \strlen($resource) !== ($i = strcspn($resource, '*?{[')) && !str_contains($resource, "\n")) { - $excluded = []; - foreach ((array) $exclude as $pattern) { - foreach ($this->glob($pattern, true, $_, false, true) as $path => $info) { - // normalize Windows slashes and remove trailing slashes - $excluded[rtrim(str_replace('\\', '/', $path), '/')] = true; - } - } - - $ret = []; - $isSubpath = 0 !== $i && str_contains(substr($resource, 0, $i), '/'); - foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath, false, $excluded) as $path => $info) { - if (null !== $res = $this->doImport($path, 'glob' === $type ? null : $type, $ignoreErrors, $sourceResource)) { - $ret[] = $res; - } - $isSubpath = true; - } - - if ($isSubpath) { - return isset($ret[1]) ? $ret : ($ret[0] ?? null); - } - } - - return $this->doImport($resource, $type, $ignoreErrors, $sourceResource); - } - - /** - * @internal - */ - protected function glob(string $pattern, bool $recursive, &$resource = null, bool $ignoreErrors = false, bool $forExclusion = false, array $excluded = []) - { - if (\strlen($pattern) === $i = strcspn($pattern, '*?{[')) { - $prefix = $pattern; - $pattern = ''; - } elseif (0 === $i || !str_contains(substr($pattern, 0, $i), '/')) { - $prefix = '.'; - $pattern = '/'.$pattern; - } else { - $prefix = \dirname(substr($pattern, 0, 1 + $i)); - $pattern = substr($pattern, \strlen($prefix)); - } - - try { - $prefix = $this->locator->locate($prefix, $this->currentDir, true); - } catch (FileLocatorFileNotFoundException $e) { - if (!$ignoreErrors) { - throw $e; - } - - $resource = []; - foreach ($e->getPaths() as $path) { - $resource[] = new FileExistenceResource($path); - } - - return; - } - $resource = new GlobResource($prefix, $pattern, $recursive, $forExclusion, $excluded); - - yield from $resource; - } - - private function doImport($resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null) - { - try { - $loader = $this->resolve($resource, $type); - - if ($loader instanceof self && null !== $this->currentDir) { - $resource = $loader->getLocator()->locate($resource, $this->currentDir, false); - } - - $resources = \is_array($resource) ? $resource : [$resource]; - for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) { - if (isset(self::$loading[$resources[$i]])) { - if ($i == $resourcesCount - 1) { - throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading)); - } - } else { - $resource = $resources[$i]; - break; - } - } - self::$loading[$resource] = true; - - try { - $ret = $loader->load($resource, $type); - } finally { - unset(self::$loading[$resource]); - } - - return $ret; - } catch (FileLoaderImportCircularReferenceException $e) { - throw $e; - } catch (\Exception $e) { - if (!$ignoreErrors) { - // prevent embedded imports from nesting multiple exceptions - if ($e instanceof LoaderLoadException) { - throw $e; - } - - throw new LoaderLoadException($resource, $sourceResource, 0, $e, $type); - } - } - - return null; - } -} diff --git a/vendor/symfony/config/Loader/GlobFileLoader.php b/vendor/symfony/config/Loader/GlobFileLoader.php deleted file mode 100644 index fecb1c5..0000000 --- a/vendor/symfony/config/Loader/GlobFileLoader.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Fabien Potencier - */ -class GlobFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - return $this->import($resource); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'glob' === $type; - } -} diff --git a/vendor/symfony/config/Loader/Loader.php b/vendor/symfony/config/Loader/Loader.php deleted file mode 100644 index e7d74b5..0000000 --- a/vendor/symfony/config/Loader/Loader.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\LoaderLoadException; - -/** - * Loader is the abstract class used by all built-in loaders. - * - * @author Fabien Potencier - */ -abstract class Loader implements LoaderInterface -{ - protected $resolver; - protected $env; - - public function __construct(string $env = null) - { - $this->env = $env; - } - - /** - * {@inheritdoc} - */ - public function getResolver() - { - return $this->resolver; - } - - /** - * {@inheritdoc} - */ - public function setResolver(LoaderResolverInterface $resolver) - { - $this->resolver = $resolver; - } - - /** - * Imports a resource. - * - * @param mixed $resource A resource - * @param string|null $type The resource type or null if unknown - * - * @return mixed - */ - public function import($resource, string $type = null) - { - return $this->resolve($resource, $type)->load($resource, $type); - } - - /** - * Finds a loader able to load an imported resource. - * - * @param mixed $resource A resource - * @param string|null $type The resource type or null if unknown - * - * @return LoaderInterface - * - * @throws LoaderLoadException If no loader is found - */ - public function resolve($resource, string $type = null) - { - if ($this->supports($resource, $type)) { - return $this; - } - - $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type); - - if (false === $loader) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - return $loader; - } -} diff --git a/vendor/symfony/config/Loader/LoaderInterface.php b/vendor/symfony/config/Loader/LoaderInterface.php deleted file mode 100644 index 93a160b..0000000 --- a/vendor/symfony/config/Loader/LoaderInterface.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderInterface is the interface implemented by all loader classes. - * - * @author Fabien Potencier - */ -interface LoaderInterface -{ - /** - * Loads a resource. - * - * @param mixed $resource The resource - * - * @return mixed - * - * @throws \Exception If something went wrong - */ - public function load($resource, string $type = null); - - /** - * Returns whether this class supports the given resource. - * - * @param mixed $resource A resource - * - * @return bool - */ - public function supports($resource, string $type = null); - - /** - * Gets the loader resolver. - * - * @return LoaderResolverInterface - */ - public function getResolver(); - - /** - * Sets the loader resolver. - */ - public function setResolver(LoaderResolverInterface $resolver); -} diff --git a/vendor/symfony/config/Loader/LoaderResolver.php b/vendor/symfony/config/Loader/LoaderResolver.php deleted file mode 100644 index cce0702..0000000 --- a/vendor/symfony/config/Loader/LoaderResolver.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderResolver selects a loader for a given resource. - * - * A resource can be anything (e.g. a full path to a config file or a Closure). - * Each loader determines whether it can load a resource and how. - * - * @author Fabien Potencier - */ -class LoaderResolver implements LoaderResolverInterface -{ - /** - * @var LoaderInterface[] An array of LoaderInterface objects - */ - private $loaders = []; - - /** - * @param LoaderInterface[] $loaders An array of loaders - */ - public function __construct(array $loaders = []) - { - foreach ($loaders as $loader) { - $this->addLoader($loader); - } - } - - /** - * {@inheritdoc} - */ - public function resolve($resource, string $type = null) - { - foreach ($this->loaders as $loader) { - if ($loader->supports($resource, $type)) { - return $loader; - } - } - - return false; - } - - public function addLoader(LoaderInterface $loader) - { - $this->loaders[] = $loader; - $loader->setResolver($this); - } - - /** - * Returns the registered loaders. - * - * @return LoaderInterface[] - */ - public function getLoaders() - { - return $this->loaders; - } -} diff --git a/vendor/symfony/config/Loader/LoaderResolverInterface.php b/vendor/symfony/config/Loader/LoaderResolverInterface.php deleted file mode 100644 index 8a48419..0000000 --- a/vendor/symfony/config/Loader/LoaderResolverInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderResolverInterface selects a loader for a given resource. - * - * @author Fabien Potencier - */ -interface LoaderResolverInterface -{ - /** - * Returns a loader able to load the resource. - * - * @param mixed $resource A resource - * @param string|null $type The resource type or null if unknown - * - * @return LoaderInterface|false - */ - public function resolve($resource, string $type = null); -} diff --git a/vendor/symfony/config/Loader/ParamConfigurator.php b/vendor/symfony/config/Loader/ParamConfigurator.php deleted file mode 100644 index 70c3f79..0000000 --- a/vendor/symfony/config/Loader/ParamConfigurator.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * Placeholder for a parameter. - * - * @author Tobias Nyholm - */ -class ParamConfigurator -{ - private $name; - - public function __construct(string $name) - { - $this->name = $name; - } - - public function __toString(): string - { - return '%'.$this->name.'%'; - } -} diff --git a/vendor/symfony/config/README.md b/vendor/symfony/config/README.md deleted file mode 100644 index 10c2ddd..0000000 --- a/vendor/symfony/config/README.md +++ /dev/null @@ -1,15 +0,0 @@ -Config Component -================ - -The Config component helps find, load, combine, autofill and validate -configuration values of any kind, whatever their source may be (YAML, XML, INI -files, or for instance a database). - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/config.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/config/Resource/ClassExistenceResource.php b/vendor/symfony/config/Resource/ClassExistenceResource.php deleted file mode 100644 index 6aff151..0000000 --- a/vendor/symfony/config/Resource/ClassExistenceResource.php +++ /dev/null @@ -1,232 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ClassExistenceResource represents a class existence. - * Freshness is only evaluated against resource existence. - * - * The resource must be a fully-qualified class name. - * - * @author Fabien Potencier - * - * @final - */ -class ClassExistenceResource implements SelfCheckingResourceInterface -{ - private $resource; - private $exists; - - private static $autoloadLevel = 0; - private static $autoloadedClass; - private static $existsCache = []; - - /** - * @param string $resource The fully-qualified class name - * @param bool|null $exists Boolean when the existency check has already been done - */ - public function __construct(string $resource, bool $exists = null) - { - $this->resource = $resource; - if (null !== $exists) { - $this->exists = [$exists, null]; - } - } - - public function __toString(): string - { - return $this->resource; - } - - public function getResource(): string - { - return $this->resource; - } - - /** - * {@inheritdoc} - * - * @throws \ReflectionException when a parent class/interface/trait is not found - */ - public function isFresh(int $timestamp): bool - { - $loaded = class_exists($this->resource, false) || interface_exists($this->resource, false) || trait_exists($this->resource, false); - - if (null !== $exists = &self::$existsCache[$this->resource]) { - if ($loaded) { - $exists = [true, null]; - } elseif (0 >= $timestamp && !$exists[0] && null !== $exists[1]) { - throw new \ReflectionException($exists[1]); - } - } elseif ([false, null] === $exists = [$loaded, null]) { - if (!self::$autoloadLevel++) { - spl_autoload_register(__CLASS__.'::throwOnRequiredClass'); - } - $autoloadedClass = self::$autoloadedClass; - self::$autoloadedClass = ltrim($this->resource, '\\'); - - try { - $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false); - } catch (\Exception $e) { - $exists[1] = $e->getMessage(); - - try { - self::throwOnRequiredClass($this->resource, $e); - } catch (\ReflectionException $e) { - if (0 >= $timestamp) { - throw $e; - } - } - } catch (\Throwable $e) { - $exists[1] = $e->getMessage(); - - throw $e; - } finally { - self::$autoloadedClass = $autoloadedClass; - if (!--self::$autoloadLevel) { - spl_autoload_unregister(__CLASS__.'::throwOnRequiredClass'); - } - } - } - - if (null === $this->exists) { - $this->exists = $exists; - } - - return $this->exists[0] xor !$exists[0]; - } - - /** - * @internal - */ - public function __sleep(): array - { - if (null === $this->exists) { - $this->isFresh(0); - } - - return ['resource', 'exists']; - } - - /** - * @internal - */ - public function __wakeup() - { - if (\is_bool($this->exists)) { - $this->exists = [$this->exists, null]; - } - } - - /** - * Throws a reflection exception when the passed class does not exist but is required. - * - * A class is considered "not required" when it's loaded as part of a "class_exists" or similar check. - * - * This function can be used as an autoload function to throw a reflection - * exception if the class was not found by previous autoload functions. - * - * A previous exception can be passed. In this case, the class is considered as being - * required totally, so if it doesn't exist, a reflection exception is always thrown. - * If it exists, the previous exception is rethrown. - * - * @throws \ReflectionException - * - * @internal - */ - public static function throwOnRequiredClass(string $class, \Exception $previous = null) - { - // If the passed class is the resource being checked, we shouldn't throw. - if (null === $previous && self::$autoloadedClass === $class) { - return; - } - - if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) { - if (null !== $previous) { - throw $previous; - } - - return; - } - - if ($previous instanceof \ReflectionException) { - throw $previous; - } - - $message = sprintf('Class "%s" not found.', $class); - - if (self::$autoloadedClass !== $class) { - $message = substr_replace($message, sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0); - } - - if (null !== $previous) { - $message = $previous->getMessage(); - } - - $e = new \ReflectionException($message, 0, $previous); - - if (null !== $previous) { - throw $e; - } - - $trace = debug_backtrace(); - $autoloadFrame = [ - 'function' => 'spl_autoload_call', - 'args' => [$class], - ]; - - if (\PHP_VERSION_ID >= 80000 && isset($trace[1])) { - $callerFrame = $trace[1]; - $i = 2; - } elseif (false !== $i = array_search($autoloadFrame, $trace, true)) { - $callerFrame = $trace[++$i]; - } else { - throw $e; - } - - if (isset($callerFrame['function']) && !isset($callerFrame['class'])) { - switch ($callerFrame['function']) { - case 'get_class_methods': - case 'get_class_vars': - case 'get_parent_class': - case 'is_a': - case 'is_subclass_of': - case 'class_exists': - case 'class_implements': - case 'class_parents': - case 'trait_exists': - case 'defined': - case 'interface_exists': - case 'method_exists': - case 'property_exists': - case 'is_callable': - return; - } - - $props = [ - 'file' => $callerFrame['file'] ?? null, - 'line' => $callerFrame['line'] ?? null, - 'trace' => \array_slice($trace, 1 + $i), - ]; - - foreach ($props as $p => $v) { - if (null !== $v) { - $r = new \ReflectionProperty(\Exception::class, $p); - $r->setAccessible(true); - $r->setValue($e, $v); - } - } - } - - throw $e; - } -} diff --git a/vendor/symfony/config/Resource/ComposerResource.php b/vendor/symfony/config/Resource/ComposerResource.php deleted file mode 100644 index f552f80..0000000 --- a/vendor/symfony/config/Resource/ComposerResource.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ComposerResource tracks the PHP version and Composer dependencies. - * - * @author Nicolas Grekas - * - * @final - */ -class ComposerResource implements SelfCheckingResourceInterface -{ - private $vendors; - - private static $runtimeVendors; - - public function __construct() - { - self::refresh(); - $this->vendors = self::$runtimeVendors; - } - - public function getVendors(): array - { - return array_keys($this->vendors); - } - - public function __toString(): string - { - return __CLASS__; - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - self::refresh(); - - return array_values(self::$runtimeVendors) === array_values($this->vendors); - } - - private static function refresh() - { - self::$runtimeVendors = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (is_file($v.'/composer/installed.json')) { - self::$runtimeVendors[$v] = @filemtime($v.'/composer/installed.json'); - } - } - } - } -} diff --git a/vendor/symfony/config/Resource/DirectoryResource.php b/vendor/symfony/config/Resource/DirectoryResource.php deleted file mode 100644 index 035814a..0000000 --- a/vendor/symfony/config/Resource/DirectoryResource.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * DirectoryResource represents a resources stored in a subdirectory tree. - * - * @author Fabien Potencier - * - * @final - */ -class DirectoryResource implements SelfCheckingResourceInterface -{ - private $resource; - private $pattern; - - /** - * @param string $resource The file path to the resource - * @param string|null $pattern A pattern to restrict monitored files - * - * @throws \InvalidArgumentException - */ - public function __construct(string $resource, string $pattern = null) - { - $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); - $this->pattern = $pattern; - - if (false === $this->resource || !is_dir($this->resource)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource)); - } - } - - public function __toString(): string - { - return md5(serialize([$this->resource, $this->pattern])); - } - - public function getResource(): string - { - return $this->resource; - } - - public function getPattern(): ?string - { - return $this->pattern; - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - if (!is_dir($this->resource)) { - return false; - } - - if ($timestamp < filemtime($this->resource)) { - return false; - } - - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) { - // if regex filtering is enabled only check matching files - if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) { - continue; - } - - // always monitor directories for changes, except the .. entries - // (otherwise deleted files wouldn't get detected) - if ($file->isDir() && str_ends_with($file, '/..')) { - continue; - } - - // for broken links - try { - $fileMTime = $file->getMTime(); - } catch (\RuntimeException $e) { - continue; - } - - // early return if a file's mtime exceeds the passed timestamp - if ($timestamp < $fileMTime) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/config/Resource/FileExistenceResource.php b/vendor/symfony/config/Resource/FileExistenceResource.php deleted file mode 100644 index 6d79d6d..0000000 --- a/vendor/symfony/config/Resource/FileExistenceResource.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * FileExistenceResource represents a resource stored on the filesystem. - * Freshness is only evaluated against resource creation or deletion. - * - * The resource can be a file or a directory. - * - * @author Charles-Henri Bruyand - * - * @final - */ -class FileExistenceResource implements SelfCheckingResourceInterface -{ - private $resource; - - private $exists; - - /** - * @param string $resource The file path to the resource - */ - public function __construct(string $resource) - { - $this->resource = $resource; - $this->exists = file_exists($resource); - } - - public function __toString(): string - { - return $this->resource; - } - - public function getResource(): string - { - return $this->resource; - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - return file_exists($this->resource) === $this->exists; - } -} diff --git a/vendor/symfony/config/Resource/FileResource.php b/vendor/symfony/config/Resource/FileResource.php deleted file mode 100644 index ee6684c..0000000 --- a/vendor/symfony/config/Resource/FileResource.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * FileResource represents a resource stored on the filesystem. - * - * The resource can be a file or a directory. - * - * @author Fabien Potencier - * - * @final - */ -class FileResource implements SelfCheckingResourceInterface -{ - /** - * @var string|false - */ - private $resource; - - /** - * @param string $resource The file path to the resource - * - * @throws \InvalidArgumentException - */ - public function __construct(string $resource) - { - $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false); - - if (false === $this->resource) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource)); - } - } - - public function __toString(): string - { - return $this->resource; - } - - /** - * Returns the canonicalized, absolute path to the resource. - */ - public function getResource(): string - { - return $this->resource; - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; - } -} diff --git a/vendor/symfony/config/Resource/GlobResource.php b/vendor/symfony/config/Resource/GlobResource.php deleted file mode 100644 index 093f559..0000000 --- a/vendor/symfony/config/Resource/GlobResource.php +++ /dev/null @@ -1,237 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Finder\Glob; - -/** - * GlobResource represents a set of resources stored on the filesystem. - * - * Only existence/removal is tracked (not mtimes.) - * - * @author Nicolas Grekas - * - * @final - * - * @implements \IteratorAggregate - */ -class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface -{ - private $prefix; - private $pattern; - private $recursive; - private $hash; - private $forExclusion; - private $excludedPrefixes; - private $globBrace; - - /** - * @param string $prefix A directory prefix - * @param string $pattern A glob pattern - * @param bool $recursive Whether directories should be scanned recursively or not - * - * @throws \InvalidArgumentException - */ - public function __construct(string $prefix, string $pattern, bool $recursive, bool $forExclusion = false, array $excludedPrefixes = []) - { - ksort($excludedPrefixes); - $this->prefix = realpath($prefix) ?: (file_exists($prefix) ? $prefix : false); - $this->pattern = $pattern; - $this->recursive = $recursive; - $this->forExclusion = $forExclusion; - $this->excludedPrefixes = $excludedPrefixes; - $this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0; - - if (false === $this->prefix) { - throw new \InvalidArgumentException(sprintf('The path "%s" does not exist.', $prefix)); - } - } - - public function getPrefix(): string - { - return $this->prefix; - } - - public function __toString(): string - { - return 'glob.'.$this->prefix.(int) $this->recursive.$this->pattern.(int) $this->forExclusion.implode("\0", $this->excludedPrefixes); - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - $hash = $this->computeHash(); - - if (null === $this->hash) { - $this->hash = $hash; - } - - return $this->hash === $hash; - } - - /** - * @internal - */ - public function __sleep(): array - { - if (null === $this->hash) { - $this->hash = $this->computeHash(); - } - - return ['prefix', 'pattern', 'recursive', 'hash', 'forExclusion', 'excludedPrefixes']; - } - - /** - * @internal - */ - public function __wakeup(): void - { - $this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0; - } - - public function getIterator(): \Traversable - { - if (!file_exists($this->prefix) || (!$this->recursive && '' === $this->pattern)) { - return; - } - $prefix = str_replace('\\', '/', $this->prefix); - $paths = null; - - if (!str_starts_with($this->prefix, 'phar://') && !str_contains($this->pattern, '/**/')) { - if ($this->globBrace || !str_contains($this->pattern, '{')) { - $paths = glob($this->prefix.$this->pattern, \GLOB_NOSORT | $this->globBrace); - } elseif (!str_contains($this->pattern, '\\') || !preg_match('/\\\\[,{}]/', $this->pattern)) { - foreach ($this->expandGlob($this->pattern) as $p) { - $paths[] = glob($this->prefix.$p, \GLOB_NOSORT); - } - $paths = array_merge(...$paths); - } - } - - if (null !== $paths) { - natsort($paths); - foreach ($paths as $path) { - if ($this->excludedPrefixes) { - $normalizedPath = str_replace('\\', '/', $path); - do { - if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) { - continue 2; - } - } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath)); - } - - if (is_file($path)) { - yield $path => new \SplFileInfo($path); - } - if (!is_dir($path)) { - continue; - } - if ($this->forExclusion) { - yield $path => new \SplFileInfo($path); - continue; - } - if (!$this->recursive || isset($this->excludedPrefixes[str_replace('\\', '/', $path)])) { - continue; - } - $files = iterator_to_array(new \RecursiveIteratorIterator( - new \RecursiveCallbackFilterIterator( - new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - function (\SplFileInfo $file, $path) { - return !isset($this->excludedPrefixes[str_replace('\\', '/', $path)]) && '.' !== $file->getBasename()[0]; - } - ), - \RecursiveIteratorIterator::LEAVES_ONLY - )); - uksort($files, 'strnatcmp'); - - foreach ($files as $path => $info) { - if ($info->isFile()) { - yield $path => $info; - } - } - } - - return; - } - - if (!class_exists(Finder::class)) { - throw new \LogicException(sprintf('Extended glob pattern "%s" cannot be used as the Finder component is not installed.', $this->pattern)); - } - - $finder = new Finder(); - $regex = Glob::toRegex($this->pattern); - if ($this->recursive) { - $regex = substr_replace($regex, '(/|$)', -2, 1); - } - - $prefixLen = \strlen($this->prefix); - foreach ($finder->followLinks()->sortByName()->in($this->prefix) as $path => $info) { - $normalizedPath = str_replace('\\', '/', $path); - if (!preg_match($regex, substr($normalizedPath, $prefixLen)) || !$info->isFile()) { - continue; - } - if ($this->excludedPrefixes) { - do { - if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) { - continue 2; - } - } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath)); - } - - yield $path => $info; - } - } - - private function computeHash(): string - { - $hash = hash_init('md5'); - - foreach ($this->getIterator() as $path => $info) { - hash_update($hash, $path."\n"); - } - - return hash_final($hash); - } - - private function expandGlob(string $pattern): array - { - $segments = preg_split('/\{([^{}]*+)\}/', $pattern, -1, \PREG_SPLIT_DELIM_CAPTURE); - $paths = [$segments[0]]; - $patterns = []; - - for ($i = 1; $i < \count($segments); $i += 2) { - $patterns = []; - - foreach (explode(',', $segments[$i]) as $s) { - foreach ($paths as $p) { - $patterns[] = $p.$s.$segments[1 + $i]; - } - } - - $paths = $patterns; - } - - $j = 0; - foreach ($patterns as $i => $p) { - if (str_contains($p, '{')) { - $p = $this->expandGlob($p); - array_splice($paths, $i + $j, 1, $p); - $j += \count($p) - 1; - } - } - - return $paths; - } -} diff --git a/vendor/symfony/config/Resource/ReflectionClassResource.php b/vendor/symfony/config/Resource/ReflectionClassResource.php deleted file mode 100644 index 06f1d76..0000000 --- a/vendor/symfony/config/Resource/ReflectionClassResource.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Messenger\Handler\MessageSubscriberInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * @author Nicolas Grekas - * - * @final - */ -class ReflectionClassResource implements SelfCheckingResourceInterface -{ - private $files = []; - private $className; - private $classReflector; - private $excludedVendors = []; - private $hash; - - public function __construct(\ReflectionClass $classReflector, array $excludedVendors = []) - { - $this->className = $classReflector->name; - $this->classReflector = $classReflector; - $this->excludedVendors = $excludedVendors; - } - - /** - * {@inheritdoc} - */ - public function isFresh(int $timestamp): bool - { - if (null === $this->hash) { - $this->hash = $this->computeHash(); - $this->loadFiles($this->classReflector); - } - - foreach ($this->files as $file => $v) { - if (false === $filemtime = @filemtime($file)) { - return false; - } - - if ($filemtime > $timestamp) { - return $this->hash === $this->computeHash(); - } - } - - return true; - } - - public function __toString(): string - { - return 'reflection.'.$this->className; - } - - /** - * @internal - */ - public function __sleep(): array - { - if (null === $this->hash) { - $this->hash = $this->computeHash(); - $this->loadFiles($this->classReflector); - } - - return ['files', 'className', 'hash']; - } - - private function loadFiles(\ReflectionClass $class) - { - foreach ($class->getInterfaces() as $v) { - $this->loadFiles($v); - } - do { - $file = $class->getFileName(); - if (false !== $file && is_file($file)) { - foreach ($this->excludedVendors as $vendor) { - if (str_starts_with($file, $vendor) && false !== strpbrk(substr($file, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) { - $file = false; - break; - } - } - if ($file) { - $this->files[$file] = null; - } - } - foreach ($class->getTraits() as $v) { - $this->loadFiles($v); - } - } while ($class = $class->getParentClass()); - } - - private function computeHash(): string - { - if (null === $this->classReflector) { - try { - $this->classReflector = new \ReflectionClass($this->className); - } catch (\ReflectionException $e) { - // the class does not exist anymore - return false; - } - } - $hash = hash_init('md5'); - - foreach ($this->generateSignature($this->classReflector) as $info) { - hash_update($hash, $info); - } - - return hash_final($hash); - } - - private function generateSignature(\ReflectionClass $class): iterable - { - if (\PHP_VERSION_ID >= 80000) { - $attributes = []; - foreach ($class->getAttributes() as $a) { - $attributes[] = [$a->getName(), \PHP_VERSION_ID >= 80100 ? (string) $a : $a->getArguments()]; - } - yield print_r($attributes, true); - $attributes = []; - } - - yield $class->getDocComment(); - yield (int) $class->isFinal(); - yield (int) $class->isAbstract(); - - if ($class->isTrait()) { - yield print_r(class_uses($class->name), true); - } else { - yield print_r(class_parents($class->name), true); - yield print_r(class_implements($class->name), true); - yield print_r($class->getConstants(), true); - } - - if (!$class->isInterface()) { - $defaults = $class->getDefaultProperties(); - - foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) { - if (\PHP_VERSION_ID >= 80000) { - foreach ($p->getAttributes() as $a) { - $attributes[] = [$a->getName(), \PHP_VERSION_ID >= 80100 ? (string) $a : $a->getArguments()]; - } - yield print_r($attributes, true); - $attributes = []; - } - - yield $p->getDocComment(); - yield $p->isDefault() ? '' : ''; - yield $p->isPublic() ? 'public' : 'protected'; - yield $p->isStatic() ? 'static' : ''; - yield '$'.$p->name; - yield print_r(isset($defaults[$p->name]) && !\is_object($defaults[$p->name]) ? $defaults[$p->name] : null, true); - } - } - - $defined = \Closure::bind(static function ($c) { return \defined($c); }, null, $class->name); - - foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) { - if (\PHP_VERSION_ID >= 80000) { - foreach ($m->getAttributes() as $a) { - $attributes[] = [$a->getName(), \PHP_VERSION_ID >= 80100 ? (string) $a : $a->getArguments()]; - } - yield print_r($attributes, true); - $attributes = []; - } - - $defaults = []; - $parametersWithUndefinedConstants = []; - foreach ($m->getParameters() as $p) { - if (\PHP_VERSION_ID >= 80000) { - foreach ($p->getAttributes() as $a) { - $attributes[] = [$a->getName(), \PHP_VERSION_ID >= 80100 ? (string) $a : $a->getArguments()]; - } - yield print_r($attributes, true); - $attributes = []; - } - - if (!$p->isDefaultValueAvailable()) { - $defaults[$p->name] = null; - - continue; - } - - if (\PHP_VERSION_ID >= 80100) { - $defaults[$p->name] = (string) $p; - - continue; - } - - if (!$p->isDefaultValueConstant() || $defined($p->getDefaultValueConstantName())) { - $defaults[$p->name] = $p->getDefaultValue(); - - continue; - } - - $defaults[$p->name] = $p->getDefaultValueConstantName(); - $parametersWithUndefinedConstants[$p->name] = true; - } - - if (!$parametersWithUndefinedConstants) { - yield preg_replace('/^ @@.*/m', '', $m); - } else { - $t = $m->getReturnType(); - $stack = [ - $m->getDocComment(), - $m->getName(), - $m->isAbstract(), - $m->isFinal(), - $m->isStatic(), - $m->isPublic(), - $m->isPrivate(), - $m->isProtected(), - $m->returnsReference(), - $t instanceof \ReflectionNamedType ? ((string) $t->allowsNull()).$t->getName() : (string) $t, - ]; - - foreach ($m->getParameters() as $p) { - if (!isset($parametersWithUndefinedConstants[$p->name])) { - $stack[] = (string) $p; - } else { - $t = $p->getType(); - $stack[] = $p->isOptional(); - $stack[] = $t instanceof \ReflectionNamedType ? ((string) $t->allowsNull()).$t->getName() : (string) $t; - $stack[] = $p->isPassedByReference(); - $stack[] = $p->isVariadic(); - $stack[] = $p->getName(); - } - } - - yield implode(',', $stack); - } - - yield print_r($defaults, true); - } - - if ($class->isAbstract() || $class->isInterface() || $class->isTrait()) { - return; - } - - if (interface_exists(EventSubscriberInterface::class, false) && $class->isSubclassOf(EventSubscriberInterface::class)) { - yield EventSubscriberInterface::class; - yield print_r($class->name::getSubscribedEvents(), true); - } - - if (interface_exists(MessageSubscriberInterface::class, false) && $class->isSubclassOf(MessageSubscriberInterface::class)) { - yield MessageSubscriberInterface::class; - foreach ($class->name::getHandledMessages() as $key => $value) { - yield $key.print_r($value, true); - } - } - - if (interface_exists(ServiceSubscriberInterface::class, false) && $class->isSubclassOf(ServiceSubscriberInterface::class)) { - yield ServiceSubscriberInterface::class; - yield print_r($class->name::getSubscribedServices(), true); - } - } -} diff --git a/vendor/symfony/config/Resource/ResourceInterface.php b/vendor/symfony/config/Resource/ResourceInterface.php deleted file mode 100644 index 9a0cd9a..0000000 --- a/vendor/symfony/config/Resource/ResourceInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ResourceInterface is the interface that must be implemented by all Resource classes. - * - * @author Fabien Potencier - */ -interface ResourceInterface -{ - /** - * Returns a string representation of the Resource. - * - * This method is necessary to allow for resource de-duplication, for example by means - * of array_unique(). The string returned need not have a particular meaning, but has - * to be identical for different ResourceInterface instances referring to the same - * resource; and it should be unlikely to collide with that of other, unrelated - * resource instances. - */ - public function __toString(); -} diff --git a/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php b/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php deleted file mode 100644 index e1727b9..0000000 --- a/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\Config\ResourceCheckerInterface; - -/** - * Resource checker for instances of SelfCheckingResourceInterface. - * - * As these resources perform the actual check themselves, we can provide - * this class as a standard way of validating them. - * - * @author Matthias Pigulla - */ -class SelfCheckingResourceChecker implements ResourceCheckerInterface -{ - // Common shared cache, because this checker can be used in different - // situations. For example, when using the full stack framework, the router - // and the container have their own cache. But they may check the very same - // resources - private static $cache = []; - - public function supports(ResourceInterface $metadata) - { - return $metadata instanceof SelfCheckingResourceInterface; - } - - /** - * @param SelfCheckingResourceInterface $resource - */ - public function isFresh(ResourceInterface $resource, int $timestamp) - { - $key = "$resource:$timestamp"; - - return self::$cache[$key] ?? self::$cache[$key] = $resource->isFresh($timestamp); - } -} diff --git a/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php b/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php deleted file mode 100644 index 2c1a378..0000000 --- a/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * Interface for Resources that can check for freshness autonomously, - * without special support from external services. - * - * @author Matthias Pigulla - */ -interface SelfCheckingResourceInterface extends ResourceInterface -{ - /** - * Returns true if the resource has not been updated since the given timestamp. - * - * @param int $timestamp The last time the resource was loaded - * - * @return bool - */ - public function isFresh(int $timestamp); -} diff --git a/vendor/symfony/config/ResourceCheckerConfigCache.php b/vendor/symfony/config/ResourceCheckerConfigCache.php deleted file mode 100644 index a0d301c..0000000 --- a/vendor/symfony/config/ResourceCheckerConfigCache.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; - -/** - * ResourceCheckerConfigCache uses instances of ResourceCheckerInterface - * to check whether cached data is still fresh. - * - * @author Matthias Pigulla - */ -class ResourceCheckerConfigCache implements ConfigCacheInterface -{ - /** - * @var string - */ - private $file; - - /** - * @var iterable - */ - private $resourceCheckers; - - /** - * @param string $file The absolute cache path - * @param iterable $resourceCheckers The ResourceCheckers to use for the freshness check - */ - public function __construct(string $file, iterable $resourceCheckers = []) - { - $this->file = $file; - $this->resourceCheckers = $resourceCheckers; - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - return $this->file; - } - - /** - * Checks if the cache is still fresh. - * - * This implementation will make a decision solely based on the ResourceCheckers - * passed in the constructor. - * - * The first ResourceChecker that supports a given resource is considered authoritative. - * Resources with no matching ResourceChecker will silently be ignored and considered fresh. - * - * @return bool - */ - public function isFresh() - { - if (!is_file($this->file)) { - return false; - } - - if ($this->resourceCheckers instanceof \Traversable && !$this->resourceCheckers instanceof \Countable) { - $this->resourceCheckers = iterator_to_array($this->resourceCheckers); - } - - if (!\count($this->resourceCheckers)) { - return true; // shortcut - if we don't have any checkers we don't need to bother with the meta file at all - } - - $metadata = $this->getMetaFile(); - - if (!is_file($metadata)) { - return false; - } - - $meta = $this->safelyUnserialize($metadata); - - if (false === $meta) { - return false; - } - - $time = filemtime($this->file); - - foreach ($meta as $resource) { - foreach ($this->resourceCheckers as $checker) { - if (!$checker->supports($resource)) { - continue; // next checker - } - if ($checker->isFresh($resource, $time)) { - break; // no need to further check this resource - } - - return false; // cache is stale - } - // no suitable checker found, ignore this resource - } - - return true; - } - - /** - * Writes cache. - * - * @param string $content The content to write in the cache - * @param ResourceInterface[] $metadata An array of metadata - * - * @throws \RuntimeException When cache file can't be written - */ - public function write(string $content, array $metadata = null) - { - $mode = 0666; - $umask = umask(); - $filesystem = new Filesystem(); - $filesystem->dumpFile($this->file, $content); - try { - $filesystem->chmod($this->file, $mode, $umask); - } catch (IOException $e) { - // discard chmod failure (some filesystem may not support it) - } - - if (null !== $metadata) { - $filesystem->dumpFile($this->getMetaFile(), serialize($metadata)); - try { - $filesystem->chmod($this->getMetaFile(), $mode, $umask); - } catch (IOException $e) { - // discard chmod failure (some filesystem may not support it) - } - } - - if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { - @opcache_invalidate($this->file, true); - } - } - - /** - * Gets the meta file path. - */ - private function getMetaFile(): string - { - return $this->file.'.meta'; - } - - private function safelyUnserialize(string $file) - { - $meta = false; - $content = file_get_contents($file); - $signalingException = new \UnexpectedValueException(); - $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); - $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) { - if (__FILE__ === $file) { - throw $signalingException; - } - - return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false; - }); - - try { - $meta = unserialize($content); - } catch (\Throwable $e) { - if ($e !== $signalingException) { - throw $e; - } - } finally { - restore_error_handler(); - ini_set('unserialize_callback_func', $prevUnserializeHandler); - } - - return $meta; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - trigger_error('Class not found: '.$class); - } -} diff --git a/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php b/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php deleted file mode 100644 index 21b7433..0000000 --- a/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * A ConfigCacheFactory implementation that validates the - * cache with an arbitrary set of ResourceCheckers. - * - * @author Matthias Pigulla - */ -class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface -{ - private $resourceCheckers = []; - - /** - * @param iterable $resourceCheckers - */ - public function __construct(iterable $resourceCheckers = []) - { - $this->resourceCheckers = $resourceCheckers; - } - - /** - * {@inheritdoc} - */ - public function cache(string $file, callable $callable) - { - $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers); - if (!$cache->isFresh()) { - $callable($cache); - } - - return $cache; - } -} diff --git a/vendor/symfony/config/ResourceCheckerInterface.php b/vendor/symfony/config/ResourceCheckerInterface.php deleted file mode 100644 index 6b1c6c5..0000000 --- a/vendor/symfony/config/ResourceCheckerInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Interface for ResourceCheckers. - * - * When a ResourceCheckerConfigCache instance is checked for freshness, all its associated - * metadata resources are passed to ResourceCheckers. The ResourceCheckers - * can then inspect the resources and decide whether the cache can be considered - * fresh or not. - * - * @author Matthias Pigulla - * @author Benjamin Klotz - */ -interface ResourceCheckerInterface -{ - /** - * Queries the ResourceChecker whether it can validate a given - * resource or not. - * - * @return bool - */ - public function supports(ResourceInterface $metadata); - - /** - * Validates the resource. - * - * @param int $timestamp The timestamp at which the cache associated with this resource was created - * - * @return bool - */ - public function isFresh(ResourceInterface $resource, int $timestamp); -} diff --git a/vendor/symfony/config/Util/Exception/InvalidXmlException.php b/vendor/symfony/config/Util/Exception/InvalidXmlException.php deleted file mode 100644 index a335bbd..0000000 --- a/vendor/symfony/config/Util/Exception/InvalidXmlException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util\Exception; - -/** - * Exception class for when XML parsing with an XSD schema file path or a callable validator produces errors unrelated - * to the actual XML parsing. - * - * @author Ole Rößner - */ -class InvalidXmlException extends XmlParsingException -{ -} diff --git a/vendor/symfony/config/Util/Exception/XmlParsingException.php b/vendor/symfony/config/Util/Exception/XmlParsingException.php deleted file mode 100644 index 9bceed6..0000000 --- a/vendor/symfony/config/Util/Exception/XmlParsingException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util\Exception; - -/** - * Exception class for when XML cannot be parsed properly. - * - * @author Ole Rößner - */ -class XmlParsingException extends \InvalidArgumentException -{ -} diff --git a/vendor/symfony/config/Util/XmlUtils.php b/vendor/symfony/config/Util/XmlUtils.php deleted file mode 100644 index 8258a06..0000000 --- a/vendor/symfony/config/Util/XmlUtils.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util; - -use Symfony\Component\Config\Util\Exception\InvalidXmlException; -use Symfony\Component\Config\Util\Exception\XmlParsingException; - -/** - * XMLUtils is a bunch of utility methods to XML operations. - * - * This class contains static methods only and is not meant to be instantiated. - * - * @author Fabien Potencier - * @author Martin Hasoň - * @author Ole Rößner - */ -class XmlUtils -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Parses an XML string. - * - * @param string $content An XML string - * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation - * - * @return \DOMDocument - * - * @throws XmlParsingException When parsing of XML file returns error - * @throws InvalidXmlException When parsing of XML with schema or callable produces any errors unrelated to the XML parsing itself - * @throws \RuntimeException When DOM extension is missing - */ - public static function parse(string $content, $schemaOrCallable = null) - { - if (!\extension_loaded('dom')) { - throw new \LogicException('Extension DOM is required.'); - } - - $internalErrors = libxml_use_internal_errors(true); - if (\LIBXML_VERSION < 20900) { - $disableEntities = libxml_disable_entity_loader(true); - } - libxml_clear_errors(); - - $dom = new \DOMDocument(); - $dom->validateOnParse = true; - if (!$dom->loadXML($content, \LIBXML_NONET | (\defined('LIBXML_COMPACT') ? \LIBXML_COMPACT : 0))) { - if (\LIBXML_VERSION < 20900) { - libxml_disable_entity_loader($disableEntities); - } - - throw new XmlParsingException(implode("\n", static::getXmlErrors($internalErrors))); - } - - $dom->normalizeDocument(); - - libxml_use_internal_errors($internalErrors); - if (\LIBXML_VERSION < 20900) { - libxml_disable_entity_loader($disableEntities); - } - - foreach ($dom->childNodes as $child) { - if (\XML_DOCUMENT_TYPE_NODE === $child->nodeType) { - throw new XmlParsingException('Document types are not allowed.'); - } - } - - if (null !== $schemaOrCallable) { - $internalErrors = libxml_use_internal_errors(true); - libxml_clear_errors(); - - $e = null; - if (\is_callable($schemaOrCallable)) { - try { - $valid = $schemaOrCallable($dom, $internalErrors); - } catch (\Exception $e) { - $valid = false; - } - } elseif (!\is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) { - $schemaSource = file_get_contents((string) $schemaOrCallable); - $valid = @$dom->schemaValidateSource($schemaSource); - } else { - libxml_use_internal_errors($internalErrors); - - throw new XmlParsingException('The schemaOrCallable argument has to be a valid path to XSD file or callable.'); - } - - if (!$valid) { - $messages = static::getXmlErrors($internalErrors); - if (empty($messages)) { - throw new InvalidXmlException('The XML is not valid.', 0, $e); - } - throw new XmlParsingException(implode("\n", $messages), 0, $e); - } - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $dom; - } - - /** - * Loads an XML file. - * - * @param string $file An XML file path - * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation - * - * @return \DOMDocument - * - * @throws \InvalidArgumentException When loading of XML file returns error - * @throws XmlParsingException When XML parsing returns any errors - * @throws \RuntimeException When DOM extension is missing - */ - public static function loadFile(string $file, $schemaOrCallable = null) - { - if (!is_file($file)) { - throw new \InvalidArgumentException(sprintf('Resource "%s" is not a file.', $file)); - } - - if (!is_readable($file)) { - throw new \InvalidArgumentException(sprintf('File "%s" is not readable.', $file)); - } - - $content = @file_get_contents($file); - - if ('' === trim($content)) { - throw new \InvalidArgumentException(sprintf('File "%s" does not contain valid XML, it is empty.', $file)); - } - - try { - return static::parse($content, $schemaOrCallable); - } catch (InvalidXmlException $e) { - throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious()); - } - } - - /** - * Converts a \DOMElement object to a PHP array. - * - * The following rules applies during the conversion: - * - * * Each tag is converted to a key value or an array - * if there is more than one "value" - * - * * The content of a tag is set under a "value" key (bar) - * if the tag also has some nested tags - * - * * The attributes are converted to keys () - * - * * The nested-tags are converted to keys (bar) - * - * @param \DOMElement $element A \DOMElement instance - * @param bool $checkPrefix Check prefix in an element or an attribute name - * - * @return mixed - */ - public static function convertDomElementToArray(\DOMElement $element, bool $checkPrefix = true) - { - $prefix = (string) $element->prefix; - $empty = true; - $config = []; - foreach ($element->attributes as $name => $node) { - if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], true)) { - continue; - } - $config[$name] = static::phpize($node->value); - $empty = false; - } - - $nodeValue = false; - foreach ($element->childNodes as $node) { - if ($node instanceof \DOMText) { - if ('' !== trim($node->nodeValue)) { - $nodeValue = trim($node->nodeValue); - $empty = false; - } - } elseif ($checkPrefix && $prefix != (string) $node->prefix) { - continue; - } elseif (!$node instanceof \DOMComment) { - $value = static::convertDomElementToArray($node, $checkPrefix); - - $key = $node->localName; - if (isset($config[$key])) { - if (!\is_array($config[$key]) || !\is_int(key($config[$key]))) { - $config[$key] = [$config[$key]]; - } - $config[$key][] = $value; - } else { - $config[$key] = $value; - } - - $empty = false; - } - } - - if (false !== $nodeValue) { - $value = static::phpize($nodeValue); - if (\count($config)) { - $config['value'] = $value; - } else { - $config = $value; - } - } - - return !$empty ? $config : null; - } - - /** - * Converts an xml value to a PHP type. - * - * @param mixed $value - * - * @return mixed - */ - public static function phpize($value) - { - $value = (string) $value; - $lowercaseValue = strtolower($value); - - switch (true) { - case 'null' === $lowercaseValue: - return null; - case ctype_digit($value): - case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)): - $raw = $value; - $cast = (int) $value; - - return self::isOctal($value) ? \intval($value, 8) : (($raw === (string) $cast) ? $cast : $raw); - case 'true' === $lowercaseValue: - return true; - case 'false' === $lowercaseValue: - return false; - case isset($value[1]) && '0b' == $value[0].$value[1] && preg_match('/^0b[01]*$/', $value): - return bindec($value); - case is_numeric($value): - return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value; - case preg_match('/^0x[0-9a-f]++$/i', $value): - return hexdec($value); - case preg_match('/^[+-]?[0-9]+(\.[0-9]+)?$/', $value): - return (float) $value; - default: - return $value; - } - } - - protected static function getXmlErrors(bool $internalErrors) - { - $errors = []; - foreach (libxml_get_errors() as $error) { - $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', - \LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', - $error->code, - trim($error->message), - $error->file ?: 'n/a', - $error->line, - $error->column - ); - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $errors; - } - - private static function isOctal(string $str): bool - { - if ('-' === $str[0]) { - $str = substr($str, 1); - } - - return $str === '0'.decoct(\intval($str, 8)); - } -} diff --git a/vendor/symfony/config/composer.json b/vendor/symfony/config/composer.json deleted file mode 100644 index b357ed3..0000000 --- a/vendor/symfony/config/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "symfony/config", - "type": "library", - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22" - }, - "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/finder": "<4.4" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Config\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php deleted file mode 100644 index 3decfc0..0000000 --- a/vendor/symfony/console/Application.php +++ /dev/null @@ -1,1276 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\CompleteCommand; -use Symfony\Component\Console\Command\DumpCompletionCommand; -use Symfony\Component\Console\Command\HelpCommand; -use Symfony\Component\Console\Command\LazyCommand; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Command\SignalableCommandInterface; -use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleSignalEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\NamespaceNotFoundException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\SignalRegistry\SignalRegistry; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * An Application is the container for a collection of commands. - * - * It is the main entry point of a Console application. - * - * This class is optimized for a standard CLI environment. - * - * Usage: - * - * $app = new Application('myapp', '1.0 (stable)'); - * $app->add(new SimpleCommand()); - * $app->run(); - * - * @author Fabien Potencier - */ -class Application implements ResetInterface -{ - private $commands = []; - private $wantHelps = false; - private $runningCommand; - private $name; - private $version; - private $commandLoader; - private $catchExceptions = true; - private $autoExit = true; - private $definition; - private $helperSet; - private $dispatcher; - private $terminal; - private $defaultCommand; - private $singleCommand = false; - private $initialized; - private $signalRegistry; - private $signalsToDispatchEvent = []; - - public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN') - { - $this->name = $name; - $this->version = $version; - $this->terminal = new Terminal(); - $this->defaultCommand = 'list'; - if (\defined('SIGINT') && SignalRegistry::isSupported()) { - $this->signalRegistry = new SignalRegistry(); - $this->signalsToDispatchEvent = [\SIGINT, \SIGTERM, \SIGUSR1, \SIGUSR2]; - } - } - - /** - * @final - */ - public function setDispatcher(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - public function setCommandLoader(CommandLoaderInterface $commandLoader) - { - $this->commandLoader = $commandLoader; - } - - public function getSignalRegistry(): SignalRegistry - { - if (!$this->signalRegistry) { - throw new RuntimeException('Signals are not supported. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); - } - - return $this->signalRegistry; - } - - public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent) - { - $this->signalsToDispatchEvent = $signalsToDispatchEvent; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - * - * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. - */ - public function run(InputInterface $input = null, OutputInterface $output = null) - { - if (\function_exists('putenv')) { - @putenv('LINES='.$this->terminal->getHeight()); - @putenv('COLUMNS='.$this->terminal->getWidth()); - } - - if (null === $input) { - $input = new ArgvInput(); - } - - if (null === $output) { - $output = new ConsoleOutput(); - } - - $renderException = function (\Throwable $e) use ($output) { - if ($output instanceof ConsoleOutputInterface) { - $this->renderThrowable($e, $output->getErrorOutput()); - } else { - $this->renderThrowable($e, $output); - } - }; - if ($phpHandler = set_exception_handler($renderException)) { - restore_exception_handler(); - if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { - $errorHandler = true; - } elseif ($errorHandler = $phpHandler[0]->setExceptionHandler($renderException)) { - $phpHandler[0]->setExceptionHandler($errorHandler); - } - } - - $this->configureIO($input, $output); - - try { - $exitCode = $this->doRun($input, $output); - } catch (\Exception $e) { - if (!$this->catchExceptions) { - throw $e; - } - - $renderException($e); - - $exitCode = $e->getCode(); - if (is_numeric($exitCode)) { - $exitCode = (int) $exitCode; - if ($exitCode <= 0) { - $exitCode = 1; - } - } else { - $exitCode = 1; - } - } finally { - // if the exception handler changed, keep it - // otherwise, unregister $renderException - if (!$phpHandler) { - if (set_exception_handler($renderException) === $renderException) { - restore_exception_handler(); - } - restore_exception_handler(); - } elseif (!$errorHandler) { - $finalHandler = $phpHandler[0]->setExceptionHandler(null); - if ($finalHandler !== $renderException) { - $phpHandler[0]->setExceptionHandler($finalHandler); - } - } - } - - if ($this->autoExit) { - if ($exitCode > 255) { - $exitCode = 255; - } - - exit($exitCode); - } - - return $exitCode; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--version', '-V'], true)) { - $output->writeln($this->getLongVersion()); - - return 0; - } - - try { - // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. - $input->bind($this->getDefinition()); - } catch (ExceptionInterface $e) { - // Errors must be ignored, full binding/validation happens later when the command is known. - } - - $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(['--help', '-h'], true)) { - if (!$name) { - $name = 'help'; - $input = new ArrayInput(['command_name' => $this->defaultCommand]); - } else { - $this->wantHelps = true; - } - } - - if (!$name) { - $name = $this->defaultCommand; - $definition = $this->getDefinition(); - $definition->setArguments(array_merge( - $definition->getArguments(), - [ - 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), - ] - )); - } - - try { - $this->runningCommand = null; - // the command name MUST be the first element of the input - $command = $this->find($name); - } catch (\Throwable $e) { - if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - - if (0 === $event->getExitCode()) { - return 0; - } - - $e = $event->getError(); - } - - throw $e; - } - - $alternative = $alternatives[0]; - - $style = new SymfonyStyle($input, $output); - $style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error'); - if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - - return $event->getExitCode(); - } - - return 1; - } - - $command = $this->find($alternative); - } - - if ($command instanceof LazyCommand) { - $command = $command->getCommand(); - } - - $this->runningCommand = $command; - $exitCode = $this->doRunCommand($command, $input, $output); - $this->runningCommand = null; - - return $exitCode; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Get the helper set associated with the command. - * - * @return HelperSet - */ - public function getHelperSet() - { - if (!$this->helperSet) { - $this->helperSet = $this->getDefaultHelperSet(); - } - - return $this->helperSet; - } - - public function setDefinition(InputDefinition $definition) - { - $this->definition = $definition; - } - - /** - * Gets the InputDefinition related to this Application. - * - * @return InputDefinition - */ - public function getDefinition() - { - if (!$this->definition) { - $this->definition = $this->getDefaultInputDefinition(); - } - - if ($this->singleCommand) { - $inputDefinition = $this->definition; - $inputDefinition->setArguments(); - - return $inputDefinition; - } - - return $this->definition; - } - - /** - * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). - */ - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ( - CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() - && 'command' === $input->getCompletionName() - ) { - $suggestions->suggestValues(array_filter(array_map(function (Command $command) { - return $command->isHidden() ? null : $command->getName(); - }, $this->all()))); - - return; - } - - if (CompletionInput::TYPE_OPTION_NAME === $input->getCompletionType()) { - $suggestions->suggestOptions($this->getDefinition()->getOptions()); - - return; - } - } - - /** - * Gets the help message. - * - * @return string - */ - public function getHelp() - { - return $this->getLongVersion(); - } - - /** - * Gets whether to catch exceptions or not during commands execution. - * - * @return bool - */ - public function areExceptionsCaught() - { - return $this->catchExceptions; - } - - /** - * Sets whether to catch exceptions or not during commands execution. - */ - public function setCatchExceptions(bool $boolean) - { - $this->catchExceptions = $boolean; - } - - /** - * Gets whether to automatically exit after a command execution or not. - * - * @return bool - */ - public function isAutoExitEnabled() - { - return $this->autoExit; - } - - /** - * Sets whether to automatically exit after a command execution or not. - */ - public function setAutoExit(bool $boolean) - { - $this->autoExit = $boolean; - } - - /** - * Gets the name of the application. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Sets the application name. - **/ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * Gets the application version. - * - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Sets the application version. - */ - public function setVersion(string $version) - { - $this->version = $version; - } - - /** - * Returns the long version of the application. - * - * @return string - */ - public function getLongVersion() - { - if ('UNKNOWN' !== $this->getName()) { - if ('UNKNOWN' !== $this->getVersion()) { - return sprintf('%s %s', $this->getName(), $this->getVersion()); - } - - return $this->getName(); - } - - return 'Console Tool'; - } - - /** - * Registers a new command. - * - * @return Command - */ - public function register(string $name) - { - return $this->add(new Command($name)); - } - - /** - * Adds an array of command objects. - * - * If a Command is not enabled it will not be added. - * - * @param Command[] $commands An array of commands - */ - public function addCommands(array $commands) - { - foreach ($commands as $command) { - $this->add($command); - } - } - - /** - * Adds a command object. - * - * If a command with the same name already exists, it will be overridden. - * If the command is not enabled it will not be added. - * - * @return Command|null - */ - public function add(Command $command) - { - $this->init(); - - $command->setApplication($this); - - if (!$command->isEnabled()) { - $command->setApplication(null); - - return null; - } - - if (!$command instanceof LazyCommand) { - // Will throw if the command is not correctly initialized. - $command->getDefinition(); - } - - if (!$command->getName()) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command))); - } - - $this->commands[$command->getName()] = $command; - - foreach ($command->getAliases() as $alias) { - $this->commands[$alias] = $command; - } - - return $command; - } - - /** - * Returns a registered command by name or alias. - * - * @return Command - * - * @throws CommandNotFoundException When given command name does not exist - */ - public function get(string $name) - { - $this->init(); - - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); - } - - // When the command has a different name than the one used at the command loader level - if (!isset($this->commands[$name])) { - throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name)); - } - - $command = $this->commands[$name]; - - if ($this->wantHelps) { - $this->wantHelps = false; - - $helpCommand = $this->get('help'); - $helpCommand->setCommand($command); - - return $helpCommand; - } - - return $command; - } - - /** - * Returns true if the command exists, false otherwise. - * - * @return bool - */ - public function has(string $name) - { - $this->init(); - - return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); - } - - /** - * Returns an array of all unique namespaces used by currently registered commands. - * - * It does not return the global namespace which always exists. - * - * @return string[] - */ - public function getNamespaces() - { - $namespaces = []; - foreach ($this->all() as $command) { - if ($command->isHidden()) { - continue; - } - - $namespaces[] = $this->extractAllNamespaces($command->getName()); - - foreach ($command->getAliases() as $alias) { - $namespaces[] = $this->extractAllNamespaces($alias); - } - } - - return array_values(array_unique(array_filter(array_merge([], ...$namespaces)))); - } - - /** - * Finds a registered namespace by a name or an abbreviation. - * - * @return string - * - * @throws NamespaceNotFoundException When namespace is incorrect or ambiguous - */ - public function findNamespace(string $namespace) - { - $allNamespaces = $this->getNamespaces(); - $expr = implode('[^:]*:', array_map('preg_quote', explode(':', $namespace))).'[^:]*'; - $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces); - - if (empty($namespaces)) { - $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); - - if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - - $message .= implode("\n ", $alternatives); - } - - throw new NamespaceNotFoundException($message, $alternatives); - } - - $exact = \in_array($namespace, $namespaces, true); - if (\count($namespaces) > 1 && !$exact) { - throw new NamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); - } - - return $exact ? $namespace : reset($namespaces); - } - - /** - * Finds a command by name or alias. - * - * Contrary to get, this command tries to find the best - * match if you give it an abbreviation of a name or alias. - * - * @return Command - * - * @throws CommandNotFoundException When command name is incorrect or ambiguous - */ - public function find(string $name) - { - $this->init(); - - $aliases = []; - - foreach ($this->commands as $command) { - foreach ($command->getAliases() as $alias) { - if (!$this->has($alias)) { - $this->commands[$alias] = $command; - } - } - } - - if ($this->has($name)) { - return $this->get($name); - } - - $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); - $expr = implode('[^:]*:', array_map('preg_quote', explode(':', $name))).'[^:]*'; - $commands = preg_grep('{^'.$expr.'}', $allCommands); - - if (empty($commands)) { - $commands = preg_grep('{^'.$expr.'}i', $allCommands); - } - - // if no commands matched or we just matched namespaces - if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { - if (false !== $pos = strrpos($name, ':')) { - // check if a namespace exists and contains commands - $this->findNamespace(substr($name, 0, $pos)); - } - - $message = sprintf('Command "%s" is not defined.', $name); - - if ($alternatives = $this->findAlternatives($name, $allCommands)) { - // remove hidden commands - $alternatives = array_filter($alternatives, function ($name) { - return !$this->get($name)->isHidden(); - }); - - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new CommandNotFoundException($message, array_values($alternatives)); - } - - // filter out aliases for commands which are already on the list - if (\count($commands) > 1) { - $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; - $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) { - if (!$commandList[$nameOrAlias] instanceof Command) { - $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias); - } - - $commandName = $commandList[$nameOrAlias]->getName(); - - $aliases[$nameOrAlias] = $commandName; - - return $commandName === $nameOrAlias || !\in_array($commandName, $commands); - })); - } - - if (\count($commands) > 1) { - $usableWidth = $this->terminal->getWidth() - 10; - $abbrevs = array_values($commands); - $maxLen = 0; - foreach ($abbrevs as $abbrev) { - $maxLen = max(Helper::width($abbrev), $maxLen); - } - $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen, &$commands) { - if ($commandList[$cmd]->isHidden()) { - unset($commands[array_search($cmd, $commands)]); - - return false; - } - - $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription(); - - return Helper::width($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev; - }, array_values($commands)); - - if (\count($commands) > 1) { - $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs)); - - throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands)); - } - } - - $command = $this->get(reset($commands)); - - if ($command->isHidden()) { - throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); - } - - return $command; - } - - /** - * Gets the commands (registered in the given namespace if provided). - * - * The array keys are the full names and the values the command instances. - * - * @return Command[] - */ - public function all(string $namespace = null) - { - $this->init(); - - if (null === $namespace) { - if (!$this->commandLoader) { - return $this->commands; - } - - $commands = $this->commands; - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - - return $commands; - } - - $commands = []; - foreach ($this->commands as $name => $command) { - if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { - $commands[$name] = $command; - } - } - - if ($this->commandLoader) { - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - } - - return $commands; - } - - /** - * Returns an array of possible abbreviations given a set of names. - * - * @return string[][] - */ - public static function getAbbreviations(array $names) - { - $abbrevs = []; - foreach ($names as $name) { - for ($len = \strlen($name); $len > 0; --$len) { - $abbrev = substr($name, 0, $len); - $abbrevs[$abbrev][] = $name; - } - } - - return $abbrevs; - } - - public function renderThrowable(\Throwable $e, OutputInterface $output): void - { - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - - $this->doRenderThrowable($e, $output); - - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', OutputFormatter::escape(sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET); - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } - - protected function doRenderThrowable(\Throwable $e, OutputInterface $output): void - { - do { - $message = trim($e->getMessage()); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $class = get_debug_type($e); - $title = sprintf(' [%s%s] ', $class, 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); - $len = Helper::width($title); - } else { - $len = 0; - } - - if (str_contains($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $message); - } - - $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX; - $lines = []; - foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { - foreach ($this->splitStringByWidth($line, $width - 4) as $line) { - // pre-format lines to get the right string length - $lineLength = Helper::width($line) + 4; - $lines[] = [$line, $lineLength]; - - $len = max($lineLength, $len); - } - } - - $messages = []; - if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); - } - $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::width($title)))); - } - foreach ($lines as $line) { - $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1])); - } - $messages[] = $emptyLine; - $messages[] = ''; - - $output->writeln($messages, OutputInterface::VERBOSITY_QUIET); - - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $output->writeln('Exception trace:', OutputInterface::VERBOSITY_QUIET); - - // exception related properties - $trace = $e->getTrace(); - - array_unshift($trace, [ - 'function' => '', - 'file' => $e->getFile() ?: 'n/a', - 'line' => $e->getLine() ?: 'n/a', - 'args' => [], - ]); - - for ($i = 0, $count = \count($trace); $i < $count; ++$i) { - $class = $trace[$i]['class'] ?? ''; - $type = $trace[$i]['type'] ?? ''; - $function = $trace[$i]['function'] ?? ''; - $file = $trace[$i]['file'] ?? 'n/a'; - $line = $trace[$i]['line'] ?? 'n/a'; - - $output->writeln(sprintf(' %s%s at %s:%s', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET); - } - - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } while ($e = $e->getPrevious()); - } - - /** - * Configures the input and output instances based on the user arguments and options. - */ - protected function configureIO(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--ansi'], true)) { - $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { - $output->setDecorated(false); - } - - if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { - $input->setInteractive(false); - } - - switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { - case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; - case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; - case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; - case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; - default: $shellVerbosity = 0; break; - } - - if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); - $shellVerbosity = -1; - } else { - if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); - $shellVerbosity = 3; - } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); - $shellVerbosity = 2; - } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); - $shellVerbosity = 1; - } - } - - if (-1 === $shellVerbosity) { - $input->setInteractive(false); - } - - if (\function_exists('putenv')) { - @putenv('SHELL_VERBOSITY='.$shellVerbosity); - } - $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; - $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; - } - - /** - * Runs the current command. - * - * If an event dispatcher has been attached to the application, - * events are also dispatched during the life-cycle of the command. - * - * @return int 0 if everything went fine, or an error code - */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) - { - foreach ($command->getHelperSet() as $helper) { - if ($helper instanceof InputAwareInterface) { - $helper->setInput($input); - } - } - - if ($command instanceof SignalableCommandInterface && ($this->signalsToDispatchEvent || $command->getSubscribedSignals())) { - if (!$this->signalRegistry) { - throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); - } - - if (Terminal::hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); - - foreach ([\SIGINT, \SIGTERM] as $signal) { - $this->signalRegistry->register($signal, static function () use ($sttyMode) { - shell_exec('stty '.$sttyMode); - }); - } - } - - if ($this->dispatcher) { - foreach ($this->signalsToDispatchEvent as $signal) { - $event = new ConsoleSignalEvent($command, $input, $output, $signal); - - $this->signalRegistry->register($signal, function ($signal, $hasNext) use ($event) { - $this->dispatcher->dispatch($event, ConsoleEvents::SIGNAL); - - // No more handlers, we try to simulate PHP default behavior - if (!$hasNext) { - if (!\in_array($signal, [\SIGUSR1, \SIGUSR2], true)) { - exit(0); - } - } - }); - } - } - - foreach ($command->getSubscribedSignals() as $signal) { - $this->signalRegistry->register($signal, [$command, 'handleSignal']); - } - } - - if (null === $this->dispatcher) { - return $command->run($input, $output); - } - - // bind before the console.command event, so the listeners have access to input options/arguments - try { - $command->mergeApplicationDefinition(); - $input->bind($command->getDefinition()); - } catch (ExceptionInterface $e) { - // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition - } - - $event = new ConsoleCommandEvent($command, $input, $output); - $e = null; - - try { - $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND); - - if ($event->commandShouldRun()) { - $exitCode = $command->run($input, $output); - } else { - $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; - } - } catch (\Throwable $e) { - $event = new ConsoleErrorEvent($input, $output, $e, $command); - $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); - $e = $event->getError(); - - if (0 === $exitCode = $event->getExitCode()) { - $e = null; - } - } - - $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); - $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE); - - if (null !== $e) { - throw $e; - } - - return $event->getExitCode(); - } - - /** - * Gets the name of the command based on input. - * - * @return string|null - */ - protected function getCommandName(InputInterface $input) - { - return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument(); - } - - /** - * Gets the default input definition. - * - * @return InputDefinition - */ - protected function getDefaultInputDefinition() - { - return new InputDefinition([ - new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display help for the given command. When no command is given display help for the '.$this->defaultCommand.' command'), - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), - new InputOption('--ansi', '', InputOption::VALUE_NEGATABLE, 'Force (or disable --no-ansi) ANSI output', null), - new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - ]); - } - - /** - * Gets the default commands that should always be available. - * - * @return Command[] - */ - protected function getDefaultCommands() - { - return [new HelpCommand(), new ListCommand(), new CompleteCommand(), new DumpCompletionCommand()]; - } - - /** - * Gets the default helper set with the helpers that should always be available. - * - * @return HelperSet - */ - protected function getDefaultHelperSet() - { - return new HelperSet([ - new FormatterHelper(), - new DebugFormatterHelper(), - new ProcessHelper(), - new QuestionHelper(), - ]); - } - - /** - * Returns abbreviated suggestions in string format. - */ - private function getAbbreviationSuggestions(array $abbrevs): string - { - return ' '.implode("\n ", $abbrevs); - } - - /** - * Returns the namespace part of the command name. - * - * This method is not part of public API and should not be used directly. - * - * @return string - */ - public function extractNamespace(string $name, int $limit = null) - { - $parts = explode(':', $name, -1); - - return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit)); - } - - /** - * Finds alternative of $name among $collection, - * if nothing is found in $collection, try in $abbrevs. - * - * @return string[] - */ - private function findAlternatives(string $name, iterable $collection): array - { - $threshold = 1e3; - $alternatives = []; - - $collectionParts = []; - foreach ($collection as $item) { - $collectionParts[$item] = explode(':', $item); - } - - foreach (explode(':', $name) as $i => $subname) { - foreach ($collectionParts as $collectionName => $parts) { - $exists = isset($alternatives[$collectionName]); - if (!isset($parts[$i]) && $exists) { - $alternatives[$collectionName] += $threshold; - continue; - } elseif (!isset($parts[$i])) { - continue; - } - - $lev = levenshtein($subname, $parts[$i]); - if ($lev <= \strlen($subname) / 3 || '' !== $subname && str_contains($parts[$i], $subname)) { - $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; - } elseif ($exists) { - $alternatives[$collectionName] += $threshold; - } - } - } - - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - /** - * Sets the default Command name. - * - * @return $this - */ - public function setDefaultCommand(string $commandName, bool $isSingleCommand = false) - { - $this->defaultCommand = explode('|', ltrim($commandName, '|'))[0]; - - if ($isSingleCommand) { - // Ensure the command exist - $this->find($commandName); - - $this->singleCommand = true; - } - - return $this; - } - - /** - * @internal - */ - public function isSingleCommand(): bool - { - return $this->singleCommand; - } - - private function splitStringByWidth(string $string, int $width): array - { - // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. - // additionally, array_slice() is not enough as some character has doubled width. - // we need a function to split string not by character count but by string width - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return str_split($string, $width); - } - - $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = []; - $line = ''; - - $offset = 0; - while (preg_match('/.{1,10000}/u', $utf8String, $m, 0, $offset)) { - $offset += \strlen($m[0]); - - foreach (preg_split('//u', $m[0]) as $char) { - // test if $char could be appended to current line - if (mb_strwidth($line.$char, 'utf8') <= $width) { - $line .= $char; - continue; - } - // if not, push current line to array and make new line - $lines[] = str_pad($line, $width); - $line = $char; - } - } - - $lines[] = \count($lines) ? str_pad($line, $width) : $line; - - mb_convert_variables($encoding, 'utf8', $lines); - - return $lines; - } - - /** - * Returns all namespaces of the command name. - * - * @return string[] - */ - private function extractAllNamespaces(string $name): array - { - // -1 as third argument is needed to skip the command short name when exploding - $parts = explode(':', $name, -1); - $namespaces = []; - - foreach ($parts as $part) { - if (\count($namespaces)) { - $namespaces[] = end($namespaces).':'.$part; - } else { - $namespaces[] = $part; - } - } - - return $namespaces; - } - - private function init() - { - if ($this->initialized) { - return; - } - $this->initialized = true; - - foreach ($this->getDefaultCommands() as $command) { - $this->add($command); - } - } -} diff --git a/vendor/symfony/console/Attribute/AsCommand.php b/vendor/symfony/console/Attribute/AsCommand.php deleted file mode 100644 index b337f54..0000000 --- a/vendor/symfony/console/Attribute/AsCommand.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Attribute; - -/** - * Service tag to autoconfigure commands. - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class AsCommand -{ - public function __construct( - public string $name, - public ?string $description = null, - array $aliases = [], - bool $hidden = false, - ) { - if (!$hidden && !$aliases) { - return; - } - - $name = explode('|', $name); - $name = array_merge($name, $aliases); - - if ($hidden && '' !== $name[0]) { - array_unshift($name, ''); - } - - $this->name = implode('|', $name); - } -} diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md deleted file mode 100644 index 6662dd1..0000000 --- a/vendor/symfony/console/CHANGELOG.md +++ /dev/null @@ -1,217 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `TesterTrait::assertCommandIsSuccessful()` to test command - * Deprecate `HelperSet::setCommand()` and `getCommand()` without replacement - -5.3 ---- - - * Add `GithubActionReporter` to render annotations in a Github Action - * Add `InputOption::VALUE_NEGATABLE` flag to handle `--foo`/`--no-foo` options - * Add the `Command::$defaultDescription` static property and the `description` attribute - on the `console.command` tag to allow the `list` command to instantiate commands lazily - * Add option `--short` to the `list` command - * Add support for bright colors - * Add `#[AsCommand]` attribute for declaring commands on PHP 8 - * Add `Helper::width()` and `Helper::length()` - * The `--ansi` and `--no-ansi` options now default to `null`. - -5.2.0 ------ - - * Added `SingleCommandApplication::setAutoExit()` to allow testing via `CommandTester` - * added support for multiline responses to questions through `Question::setMultiline()` - and `Question::isMultiline()` - * Added `SignalRegistry` class to stack signals handlers - * Added support for signals: - * Added `Application::getSignalRegistry()` and `Application::setSignalsToDispatchEvent()` methods - * Added `SignalableCommandInterface` interface - * Added `TableCellStyle` class to customize table cell - * Removed `php ` prefix invocation from help messages. - -5.1.0 ------ - - * `Command::setHidden()` is final since Symfony 5.1 - * Add `SingleCommandApplication` - * Add `Cursor` class - -5.0.0 ------ - - * removed support for finding hidden commands using an abbreviation, use the full name instead - * removed `TableStyle::setCrossingChar()` method in favor of `TableStyle::setDefaultCrossingChar()` - * removed `TableStyle::setHorizontalBorderChar()` method in favor of `TableStyle::setDefaultCrossingChars()` - * removed `TableStyle::getHorizontalBorderChar()` method in favor of `TableStyle::getBorderChars()` - * removed `TableStyle::setVerticalBorderChar()` method in favor of `TableStyle::setVerticalBorderChars()` - * removed `TableStyle::getVerticalBorderChar()` method in favor of `TableStyle::getBorderChars()` - * removed support for returning `null` from `Command::execute()`, return `0` instead - * `ProcessHelper::run()` accepts only `array|Symfony\Component\Process\Process` for its `command` argument - * `Application::setDispatcher` accepts only `Symfony\Contracts\EventDispatcher\EventDispatcherInterface` - for its `dispatcher` argument - * renamed `Application::renderException()` and `Application::doRenderException()` - to `renderThrowable()` and `doRenderThrowable()` respectively. - -4.4.0 ------ - - * deprecated finding hidden commands using an abbreviation, use the full name instead - * added `Question::setTrimmable` default to true to allow the answer to be trimmed - * added method `minSecondsBetweenRedraws()` and `maxSecondsBetweenRedraws()` on `ProgressBar` - * `Application` implements `ResetInterface` - * marked all dispatched event classes as `@final` - * added support for displaying table horizontally - * deprecated returning `null` from `Command::execute()`, return `0` instead - * Deprecated the `Application::renderException()` and `Application::doRenderException()` methods, - use `renderThrowable()` and `doRenderThrowable()` instead. - * added support for the `NO_COLOR` env var (https://no-color.org/) - -4.3.0 ------ - - * added support for hyperlinks - * added `ProgressBar::iterate()` method that simplify updating the progress bar when iterating - * added `Question::setAutocompleterCallback()` to provide a callback function - that dynamically generates suggestions as the user types - -4.2.0 ------ - - * allowed passing commands as `[$process, 'ENV_VAR' => 'value']` to - `ProcessHelper::run()` to pass environment variables - * deprecated passing a command as a string to `ProcessHelper::run()`, - pass it the command as an array of its arguments instead - * made the `ProcessHelper` class final - * added `WrappableOutputFormatterInterface::formatAndWrap()` (implemented in `OutputFormatter`) - * added `capture_stderr_separately` option to `CommandTester::execute()` - -4.1.0 ------ - - * added option to run suggested command if command is not found and only 1 alternative is available - * added option to modify console output and print multiple modifiable sections - * added support for iterable messages in output `write` and `writeln` methods - -4.0.0 ------ - - * `OutputFormatter` throws an exception when unknown options are used - * removed `QuestionHelper::setInputStream()/getInputStream()` - * removed `Application::getTerminalWidth()/getTerminalHeight()` and - `Application::setTerminalDimensions()/getTerminalDimensions()` - * removed `ConsoleExceptionEvent` - * removed `ConsoleEvents::EXCEPTION` - -3.4.0 ------ - - * added `SHELL_VERBOSITY` env var to control verbosity - * added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11 - `ContainerCommandLoader` for commands lazy-loading - * added a case-insensitive command name matching fallback - * added static `Command::$defaultName/getDefaultName()`, allowing for - commands to be registered at compile time in the application command loader. - Setting the `$defaultName` property avoids the need for filling the `command` - attribute on the `console.command` tag when using `AddConsoleCommandPass`. - -3.3.0 ------ - - * added `ExceptionListener` - * added `AddConsoleCommandPass` (originally in FrameworkBundle) - * [BC BREAK] `Input::getOption()` no longer returns the default value for options - with value optional explicitly passed empty - * added console.error event to catch exceptions thrown by other listeners - * deprecated console.exception event in favor of console.error - * added ability to handle `CommandNotFoundException` through the - `console.error` event - * deprecated default validation in `SymfonyQuestionHelper::ask` - -3.2.0 ------- - - * added `setInputs()` method to CommandTester for ease testing of commands expecting inputs - * added `setStream()` and `getStream()` methods to Input (implement StreamableInputInterface) - * added StreamableInputInterface - * added LockableTrait - -3.1.0 ------ - - * added truncate method to FormatterHelper - * added setColumnWidth(s) method to Table - -2.8.3 ------ - - * remove readline support from the question helper as it caused issues - -2.8.0 ------ - - * use readline for user input in the question helper when available to allow - the use of arrow keys - -2.6.0 ------ - - * added a Process helper - * added a DebugFormatter helper - -2.5.0 ------ - - * deprecated the dialog helper (use the question helper instead) - * deprecated TableHelper in favor of Table - * deprecated ProgressHelper in favor of ProgressBar - * added ConsoleLogger - * added a question helper - * added a way to set the process name of a command - * added a way to set a default command instead of `ListCommand` - -2.4.0 ------ - - * added a way to force terminal dimensions - * added a convenient method to detect verbosity level - * [BC BREAK] made descriptors use output instead of returning a string - -2.3.0 ------ - - * added multiselect support to the select dialog helper - * added Table Helper for tabular data rendering - * added support for events in `Application` - * added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()` - * added a way to set the progress bar progress via the `setCurrent` method - * added support for multiple InputOption shortcuts, written as `'-a|-b|-c'` - * added two additional verbosity levels, VERBOSITY_VERY_VERBOSE and VERBOSITY_DEBUG - -2.2.0 ------ - - * added support for colorization on Windows via ConEmu - * add a method to Dialog Helper to ask for a question and hide the response - * added support for interactive selections in console (DialogHelper::select()) - * added support for autocompletion as you type in Dialog Helper - -2.1.0 ------ - - * added ConsoleOutputInterface - * added the possibility to disable a command (Command::isEnabled()) - * added suggestions when a command does not exist - * added a --raw option to the list command - * added support for STDERR in the console output class (errors are now sent - to STDERR) - * made the defaults (helper set, commands, input definition) in Application - more easily customizable - * added support for the shell even if readline is not available - * added support for process isolation in Symfony shell via - `--process-isolation` switch - * added support for `--`, which disables options parsing after that point - (tokens will be parsed as arguments) diff --git a/vendor/symfony/console/CI/GithubActionReporter.php b/vendor/symfony/console/CI/GithubActionReporter.php deleted file mode 100644 index a15c1ff..0000000 --- a/vendor/symfony/console/CI/GithubActionReporter.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CI; - -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Utility class for Github actions. - * - * @author Maxime Steinhausser - */ -class GithubActionReporter -{ - private $output; - - /** - * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85 - */ - private const ESCAPED_DATA = [ - '%' => '%25', - "\r" => '%0D', - "\n" => '%0A', - ]; - - /** - * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L87-L94 - */ - private const ESCAPED_PROPERTIES = [ - '%' => '%25', - "\r" => '%0D', - "\n" => '%0A', - ':' => '%3A', - ',' => '%2C', - ]; - - public function __construct(OutputInterface $output) - { - $this->output = $output; - } - - public static function isGithubActionEnvironment(): bool - { - return false !== getenv('GITHUB_ACTIONS'); - } - - /** - * Output an error using the Github annotations format. - * - * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message - */ - public function error(string $message, string $file = null, int $line = null, int $col = null): void - { - $this->log('error', $message, $file, $line, $col); - } - - /** - * Output a warning using the Github annotations format. - * - * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message - */ - public function warning(string $message, string $file = null, int $line = null, int $col = null): void - { - $this->log('warning', $message, $file, $line, $col); - } - - /** - * Output a debug log using the Github annotations format. - * - * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message - */ - public function debug(string $message, string $file = null, int $line = null, int $col = null): void - { - $this->log('debug', $message, $file, $line, $col); - } - - private function log(string $type, string $message, string $file = null, int $line = null, int $col = null): void - { - // Some values must be encoded. - $message = strtr($message, self::ESCAPED_DATA); - - if (!$file) { - // No file provided, output the message solely: - $this->output->writeln(sprintf('::%s::%s', $type, $message)); - - return; - } - - $this->output->writeln(sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message)); - } -} diff --git a/vendor/symfony/console/Color.php b/vendor/symfony/console/Color.php deleted file mode 100644 index 22a4ce9..0000000 --- a/vendor/symfony/console/Color.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * @author Fabien Potencier - */ -final class Color -{ - private const COLORS = [ - 'black' => 0, - 'red' => 1, - 'green' => 2, - 'yellow' => 3, - 'blue' => 4, - 'magenta' => 5, - 'cyan' => 6, - 'white' => 7, - 'default' => 9, - ]; - - private const BRIGHT_COLORS = [ - 'gray' => 0, - 'bright-red' => 1, - 'bright-green' => 2, - 'bright-yellow' => 3, - 'bright-blue' => 4, - 'bright-magenta' => 5, - 'bright-cyan' => 6, - 'bright-white' => 7, - ]; - - private const AVAILABLE_OPTIONS = [ - 'bold' => ['set' => 1, 'unset' => 22], - 'underscore' => ['set' => 4, 'unset' => 24], - 'blink' => ['set' => 5, 'unset' => 25], - 'reverse' => ['set' => 7, 'unset' => 27], - 'conceal' => ['set' => 8, 'unset' => 28], - ]; - - private $foreground; - private $background; - private $options = []; - - public function __construct(string $foreground = '', string $background = '', array $options = []) - { - $this->foreground = $this->parseColor($foreground); - $this->background = $this->parseColor($background, true); - - foreach ($options as $option) { - if (!isset(self::AVAILABLE_OPTIONS[$option])) { - throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(self::AVAILABLE_OPTIONS)))); - } - - $this->options[$option] = self::AVAILABLE_OPTIONS[$option]; - } - } - - public function apply(string $text): string - { - return $this->set().$text.$this->unset(); - } - - public function set(): string - { - $setCodes = []; - if ('' !== $this->foreground) { - $setCodes[] = $this->foreground; - } - if ('' !== $this->background) { - $setCodes[] = $this->background; - } - foreach ($this->options as $option) { - $setCodes[] = $option['set']; - } - if (0 === \count($setCodes)) { - return ''; - } - - return sprintf("\033[%sm", implode(';', $setCodes)); - } - - public function unset(): string - { - $unsetCodes = []; - if ('' !== $this->foreground) { - $unsetCodes[] = 39; - } - if ('' !== $this->background) { - $unsetCodes[] = 49; - } - foreach ($this->options as $option) { - $unsetCodes[] = $option['unset']; - } - if (0 === \count($unsetCodes)) { - return ''; - } - - return sprintf("\033[%sm", implode(';', $unsetCodes)); - } - - private function parseColor(string $color, bool $background = false): string - { - if ('' === $color) { - return ''; - } - - if ('#' === $color[0]) { - $color = substr($color, 1); - - if (3 === \strlen($color)) { - $color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2]; - } - - if (6 !== \strlen($color)) { - throw new InvalidArgumentException(sprintf('Invalid "%s" color.', $color)); - } - - return ($background ? '4' : '3').$this->convertHexColorToAnsi(hexdec($color)); - } - - if (isset(self::COLORS[$color])) { - return ($background ? '4' : '3').self::COLORS[$color]; - } - - if (isset(self::BRIGHT_COLORS[$color])) { - return ($background ? '10' : '9').self::BRIGHT_COLORS[$color]; - } - - throw new InvalidArgumentException(sprintf('Invalid "%s" color; expected one of (%s).', $color, implode(', ', array_merge(array_keys(self::COLORS), array_keys(self::BRIGHT_COLORS))))); - } - - private function convertHexColorToAnsi(int $color): string - { - $r = ($color >> 16) & 255; - $g = ($color >> 8) & 255; - $b = $color & 255; - - // see https://github.com/termstandard/colors/ for more information about true color support - if ('truecolor' !== getenv('COLORTERM')) { - return (string) $this->degradeHexColorToAnsi($r, $g, $b); - } - - return sprintf('8;2;%d;%d;%d', $r, $g, $b); - } - - private function degradeHexColorToAnsi(int $r, int $g, int $b): int - { - if (0 === round($this->getSaturation($r, $g, $b) / 50)) { - return 0; - } - - return (round($b / 255) << 2) | (round($g / 255) << 1) | round($r / 255); - } - - private function getSaturation(int $r, int $g, int $b): int - { - $r = $r / 255; - $g = $g / 255; - $b = $b / 255; - $v = max($r, $g, $b); - - if (0 === $diff = $v - min($r, $g, $b)) { - return 0; - } - - return (int) $diff * 100 / $v; - } -} diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php deleted file mode 100644 index 146f601..0000000 --- a/vendor/symfony/console/Command/Command.php +++ /dev/null @@ -1,710 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Attribute\AsCommand; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Base class for all commands. - * - * @author Fabien Potencier - */ -class Command -{ - // see https://tldp.org/LDP/abs/html/exitcodes.html - public const SUCCESS = 0; - public const FAILURE = 1; - public const INVALID = 2; - - /** - * @var string|null The default command name - */ - protected static $defaultName; - - /** - * @var string|null The default command description - */ - protected static $defaultDescription; - - private $application; - private $name; - private $processTitle; - private $aliases = []; - private $definition; - private $hidden = false; - private $help = ''; - private $description = ''; - private $fullDefinition; - private $ignoreValidationErrors = false; - private $code; - private $synopsis = []; - private $usages = []; - private $helperSet; - - /** - * @return string|null - */ - public static function getDefaultName() - { - $class = static::class; - - if (\PHP_VERSION_ID >= 80000 && $attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) { - return $attribute[0]->newInstance()->name; - } - - $r = new \ReflectionProperty($class, 'defaultName'); - - return $class === $r->class ? static::$defaultName : null; - } - - public static function getDefaultDescription(): ?string - { - $class = static::class; - - if (\PHP_VERSION_ID >= 80000 && $attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) { - return $attribute[0]->newInstance()->description; - } - - $r = new \ReflectionProperty($class, 'defaultDescription'); - - return $class === $r->class ? static::$defaultDescription : null; - } - - /** - * @param string|null $name The name of the command; passing null means it must be set in configure() - * - * @throws LogicException When the command name is empty - */ - public function __construct(string $name = null) - { - $this->definition = new InputDefinition(); - - if (null === $name && null !== $name = static::getDefaultName()) { - $aliases = explode('|', $name); - - if ('' === $name = array_shift($aliases)) { - $this->setHidden(true); - $name = array_shift($aliases); - } - - $this->setAliases($aliases); - } - - if (null !== $name) { - $this->setName($name); - } - - if ('' === $this->description) { - $this->setDescription(static::getDefaultDescription() ?? ''); - } - - $this->configure(); - } - - /** - * Ignores validation errors. - * - * This is mainly useful for the help command. - */ - public function ignoreValidationErrors() - { - $this->ignoreValidationErrors = true; - } - - public function setApplication(Application $application = null) - { - $this->application = $application; - if ($application) { - $this->setHelperSet($application->getHelperSet()); - } else { - $this->helperSet = null; - } - - $this->fullDefinition = null; - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Gets the helper set. - * - * @return HelperSet|null - */ - public function getHelperSet() - { - return $this->helperSet; - } - - /** - * Gets the application instance for this command. - * - * @return Application|null - */ - public function getApplication() - { - return $this->application; - } - - /** - * Checks whether the command is enabled or not in the current environment. - * - * Override this to check for x or y and return false if the command cannot - * run properly under the current conditions. - * - * @return bool - */ - public function isEnabled() - { - return true; - } - - /** - * Configures the current command. - */ - protected function configure() - { - } - - /** - * Executes the current command. - * - * This method is not abstract because you can use this class - * as a concrete class. In this case, instead of defining the - * execute() method, you set the code to execute by passing - * a Closure to the setCode() method. - * - * @return int 0 if everything went fine, or an exit code - * - * @throws LogicException When this abstract method is not implemented - * - * @see setCode() - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - throw new LogicException('You must override the execute() method in the concrete command class.'); - } - - /** - * Interacts with the user. - * - * This method is executed before the InputDefinition is validated. - * This means that this is the only place where the command can - * interactively ask for values of missing required arguments. - */ - protected function interact(InputInterface $input, OutputInterface $output) - { - } - - /** - * Initializes the command after the input has been bound and before the input - * is validated. - * - * This is mainly useful when a lot of commands extends one main command - * where some things need to be initialized based on the input arguments and options. - * - * @see InputInterface::bind() - * @see InputInterface::validate() - */ - protected function initialize(InputInterface $input, OutputInterface $output) - { - } - - /** - * Runs the command. - * - * The code to execute is either defined directly with the - * setCode() method or by overriding the execute() method - * in a sub-class. - * - * @return int The command exit code - * - * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. - * - * @see setCode() - * @see execute() - */ - public function run(InputInterface $input, OutputInterface $output) - { - // add the application arguments and options - $this->mergeApplicationDefinition(); - - // bind the input against the command specific arguments/options - try { - $input->bind($this->getDefinition()); - } catch (ExceptionInterface $e) { - if (!$this->ignoreValidationErrors) { - throw $e; - } - } - - $this->initialize($input, $output); - - if (null !== $this->processTitle) { - if (\function_exists('cli_set_process_title')) { - if (!@cli_set_process_title($this->processTitle)) { - if ('Darwin' === \PHP_OS) { - $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE); - } else { - cli_set_process_title($this->processTitle); - } - } - } elseif (\function_exists('setproctitle')) { - setproctitle($this->processTitle); - } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { - $output->writeln('Install the proctitle PECL to be able to change the process title.'); - } - } - - if ($input->isInteractive()) { - $this->interact($input, $output); - } - - // The command name argument is often omitted when a command is executed directly with its run() method. - // It would fail the validation if we didn't make sure the command argument is present, - // since it's required by the application. - if ($input->hasArgument('command') && null === $input->getArgument('command')) { - $input->setArgument('command', $this->getName()); - } - - $input->validate(); - - if ($this->code) { - $statusCode = ($this->code)($input, $output); - } else { - $statusCode = $this->execute($input, $output); - - if (!\is_int($statusCode)) { - throw new \TypeError(sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::class, get_debug_type($statusCode))); - } - } - - return is_numeric($statusCode) ? (int) $statusCode : 0; - } - - /** - * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). - */ - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - } - - /** - * Sets the code to execute when running this command. - * - * If this method is used, it overrides the code defined - * in the execute() method. - * - * @param callable $code A callable(InputInterface $input, OutputInterface $output) - * - * @return $this - * - * @throws InvalidArgumentException - * - * @see execute() - */ - public function setCode(callable $code) - { - if ($code instanceof \Closure) { - $r = new \ReflectionFunction($code); - if (null === $r->getClosureThis()) { - set_error_handler(static function () {}); - try { - if ($c = \Closure::bind($code, $this)) { - $code = $c; - } - } finally { - restore_error_handler(); - } - } - } - - $this->code = $code; - - return $this; - } - - /** - * Merges the application definition with the command definition. - * - * This method is not part of public API and should not be used directly. - * - * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments - * - * @internal - */ - public function mergeApplicationDefinition(bool $mergeArgs = true) - { - if (null === $this->application) { - return; - } - - $this->fullDefinition = new InputDefinition(); - $this->fullDefinition->setOptions($this->definition->getOptions()); - $this->fullDefinition->addOptions($this->application->getDefinition()->getOptions()); - - if ($mergeArgs) { - $this->fullDefinition->setArguments($this->application->getDefinition()->getArguments()); - $this->fullDefinition->addArguments($this->definition->getArguments()); - } else { - $this->fullDefinition->setArguments($this->definition->getArguments()); - } - } - - /** - * Sets an array of argument and option instances. - * - * @param array|InputDefinition $definition An array of argument and option instances or a definition instance - * - * @return $this - */ - public function setDefinition($definition) - { - if ($definition instanceof InputDefinition) { - $this->definition = $definition; - } else { - $this->definition->setDefinition($definition); - } - - $this->fullDefinition = null; - - return $this; - } - - /** - * Gets the InputDefinition attached to this Command. - * - * @return InputDefinition - */ - public function getDefinition() - { - return $this->fullDefinition ?? $this->getNativeDefinition(); - } - - /** - * Gets the InputDefinition to be used to create representations of this Command. - * - * Can be overridden to provide the original command representation when it would otherwise - * be changed by merging with the application InputDefinition. - * - * This method is not part of public API and should not be used directly. - * - * @return InputDefinition - */ - public function getNativeDefinition() - { - if (null === $this->definition) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class)); - } - - return $this->definition; - } - - /** - * Adds an argument. - * - * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) - * - * @throws InvalidArgumentException When argument mode is not valid - * - * @return $this - */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null) - { - $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); - if (null !== $this->fullDefinition) { - $this->fullDefinition->addArgument(new InputArgument($name, $mode, $description, $default)); - } - - return $this; - } - - /** - * Adds an option. - * - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants - * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) - * - * @throws InvalidArgumentException If option mode is invalid or incompatible - * - * @return $this - */ - public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) - { - $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); - if (null !== $this->fullDefinition) { - $this->fullDefinition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); - } - - return $this; - } - - /** - * Sets the name of the command. - * - * This method can set both the namespace and the name if - * you separate them by a colon (:) - * - * $command->setName('foo:bar'); - * - * @return $this - * - * @throws InvalidArgumentException When the name is invalid - */ - public function setName(string $name) - { - $this->validateName($name); - - $this->name = $name; - - return $this; - } - - /** - * Sets the process title of the command. - * - * This feature should be used only when creating a long process command, - * like a daemon. - * - * @return $this - */ - public function setProcessTitle(string $title) - { - $this->processTitle = $title; - - return $this; - } - - /** - * Returns the command name. - * - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * @param bool $hidden Whether or not the command should be hidden from the list of commands - * The default value will be true in Symfony 6.0 - * - * @return $this - * - * @final since Symfony 5.1 - */ - public function setHidden(bool $hidden /*= true*/) - { - $this->hidden = $hidden; - - return $this; - } - - /** - * @return bool whether the command should be publicly shown or not - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * Sets the description for the command. - * - * @return $this - */ - public function setDescription(string $description) - { - $this->description = $description; - - return $this; - } - - /** - * Returns the description for the command. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Sets the help for the command. - * - * @return $this - */ - public function setHelp(string $help) - { - $this->help = $help; - - return $this; - } - - /** - * Returns the help for the command. - * - * @return string - */ - public function getHelp() - { - return $this->help; - } - - /** - * Returns the processed help for the command replacing the %command.name% and - * %command.full_name% patterns with the real values dynamically. - * - * @return string - */ - public function getProcessedHelp() - { - $name = $this->name; - $isSingleCommand = $this->application && $this->application->isSingleCommand(); - - $placeholders = [ - '%command.name%', - '%command.full_name%', - ]; - $replacements = [ - $name, - $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, - ]; - - return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); - } - - /** - * Sets the aliases for the command. - * - * @param string[] $aliases An array of aliases for the command - * - * @return $this - * - * @throws InvalidArgumentException When an alias is invalid - */ - public function setAliases(iterable $aliases) - { - $list = []; - - foreach ($aliases as $alias) { - $this->validateName($alias); - $list[] = $alias; - } - - $this->aliases = \is_array($aliases) ? $aliases : $list; - - return $this; - } - - /** - * Returns the aliases for the command. - * - * @return array - */ - public function getAliases() - { - return $this->aliases; - } - - /** - * Returns the synopsis for the command. - * - * @param bool $short Whether to show the short version of the synopsis (with options folded) or not - * - * @return string - */ - public function getSynopsis(bool $short = false) - { - $key = $short ? 'short' : 'long'; - - if (!isset($this->synopsis[$key])) { - $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); - } - - return $this->synopsis[$key]; - } - - /** - * Add a command usage example, it'll be prefixed with the command name. - * - * @return $this - */ - public function addUsage(string $usage) - { - if (!str_starts_with($usage, $this->name)) { - $usage = sprintf('%s %s', $this->name, $usage); - } - - $this->usages[] = $usage; - - return $this; - } - - /** - * Returns alternative usages of the command. - * - * @return array - */ - public function getUsages() - { - return $this->usages; - } - - /** - * Gets a helper instance by name. - * - * @return mixed - * - * @throws LogicException if no HelperSet is defined - * @throws InvalidArgumentException if the helper is not defined - */ - public function getHelper(string $name) - { - if (null === $this->helperSet) { - throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name)); - } - - return $this->helperSet->get($name); - } - - /** - * Validates a command name. - * - * It must be non-empty and parts can optionally be separated by ":". - * - * @throws InvalidArgumentException When the name is invalid - */ - private function validateName(string $name) - { - if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { - throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); - } - } -} diff --git a/vendor/symfony/console/Command/CompleteCommand.php b/vendor/symfony/console/Command/CompleteCommand.php deleted file mode 100644 index 97357d6..0000000 --- a/vendor/symfony/console/Command/CompleteCommand.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Completion\Output\BashCompletionOutput; -use Symfony\Component\Console\Completion\Output\CompletionOutputInterface; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Responsible for providing the values to the shell completion. - * - * @author Wouter de Jong - */ -final class CompleteCommand extends Command -{ - protected static $defaultName = '|_complete'; - protected static $defaultDescription = 'Internal command to provide shell completion suggestions'; - - private $completionOutputs; - - private $isDebug = false; - - /** - * @param array> $completionOutputs A list of additional completion outputs, with shell name as key and FQCN as value - */ - public function __construct(array $completionOutputs = []) - { - // must be set before the parent constructor, as the property value is used in configure() - $this->completionOutputs = $completionOutputs + ['bash' => BashCompletionOutput::class]; - - parent::__construct(); - } - - protected function configure(): void - { - $this - ->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("'.implode('", "', array_keys($this->completionOutputs)).'")') - ->addOption('input', 'i', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'An array of input tokens (e.g. COMP_WORDS or argv)') - ->addOption('current', 'c', InputOption::VALUE_REQUIRED, 'The index of the "input" array that the cursor is in (e.g. COMP_CWORD)') - ->addOption('symfony', 'S', InputOption::VALUE_REQUIRED, 'The version of the completion script') - ; - } - - protected function initialize(InputInterface $input, OutputInterface $output) - { - $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOLEAN); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - try { - // uncomment when a bugfix or BC break has been introduced in the shell completion scripts - //$version = $input->getOption('symfony'); - //if ($version && version_compare($version, 'x.y', '>=')) { - // $message = sprintf('Completion script version is not supported ("%s" given, ">=x.y" required).', $version); - // $this->log($message); - - // $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.'); - - // return 126; - //} - - $shell = $input->getOption('shell'); - if (!$shell) { - throw new \RuntimeException('The "--shell" option must be set.'); - } - - if (!$completionOutput = $this->completionOutputs[$shell] ?? false) { - throw new \RuntimeException(sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs)))); - } - - $completionInput = $this->createCompletionInput($input); - $suggestions = new CompletionSuggestions(); - - $this->log([ - '', - ''.date('Y-m-d H:i:s').'', - 'Input: ("|" indicates the cursor position)', - ' '.(string) $completionInput, - 'Command:', - ' '.(string) implode(' ', $_SERVER['argv']), - 'Messages:', - ]); - - $command = $this->findCommand($completionInput, $output); - if (null === $command) { - $this->log(' No command found, completing using the Application class.'); - - $this->getApplication()->complete($completionInput, $suggestions); - } elseif ( - $completionInput->mustSuggestArgumentValuesFor('command') - && $command->getName() !== $completionInput->getCompletionValue() - ) { - $this->log(' No command found, completing using the Application class.'); - - // expand shortcut names ("cache:cl") into their full name ("cache:clear") - $suggestions->suggestValue($command->getName()); - } else { - $command->mergeApplicationDefinition(); - $completionInput->bind($command->getDefinition()); - - if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) { - $this->log(' Completing option names for the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).' command.'); - - $suggestions->suggestOptions($command->getDefinition()->getOptions()); - } else { - $this->log([ - ' Completing using the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).' class.', - ' Completing '.$completionInput->getCompletionType().' for '.$completionInput->getCompletionName().'', - ]); - if (null !== $compval = $completionInput->getCompletionValue()) { - $this->log(' Current value: '.$compval.''); - } - - $command->complete($completionInput, $suggestions); - } - } - - /** @var CompletionOutputInterface $completionOutput */ - $completionOutput = new $completionOutput(); - - $this->log('Suggestions:'); - if ($options = $suggestions->getOptionSuggestions()) { - $this->log(' --'.implode(' --', array_map(function ($o) { return $o->getName(); }, $options))); - } elseif ($values = $suggestions->getValueSuggestions()) { - $this->log(' '.implode(' ', $values)); - } else { - $this->log(' No suggestions were provided'); - } - - $completionOutput->write($suggestions, $output); - } catch (\Throwable $e) { - $this->log([ - 'Error!', - (string) $e, - ]); - - if ($output->isDebug()) { - throw $e; - } - - return self::FAILURE; - } - - return self::SUCCESS; - } - - private function createCompletionInput(InputInterface $input): CompletionInput - { - $currentIndex = $input->getOption('current'); - if (!$currentIndex || !ctype_digit($currentIndex)) { - throw new \RuntimeException('The "--current" option must be set and it must be an integer.'); - } - - $completionInput = CompletionInput::fromTokens($input->getOption('input'), (int) $currentIndex); - - try { - $completionInput->bind($this->getApplication()->getDefinition()); - } catch (ExceptionInterface $e) { - } - - return $completionInput; - } - - private function findCommand(CompletionInput $completionInput, OutputInterface $output): ?Command - { - try { - $inputName = $completionInput->getFirstArgument(); - if (null === $inputName) { - return null; - } - - return $this->getApplication()->find($inputName); - } catch (CommandNotFoundException $e) { - } - - return null; - } - - private function log($messages): void - { - if (!$this->isDebug) { - return; - } - - $commandName = basename($_SERVER['argv'][0]); - file_put_contents(sys_get_temp_dir().'/sf_'.$commandName.'.log', implode(\PHP_EOL, (array) $messages).\PHP_EOL, \FILE_APPEND); - } -} diff --git a/vendor/symfony/console/Command/DumpCompletionCommand.php b/vendor/symfony/console/Command/DumpCompletionCommand.php deleted file mode 100644 index 64a8005..0000000 --- a/vendor/symfony/console/Command/DumpCompletionCommand.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Process\Process; - -/** - * Dumps the completion script for the current shell. - * - * @author Wouter de Jong - */ -final class DumpCompletionCommand extends Command -{ - protected static $defaultName = 'completion'; - protected static $defaultDescription = 'Dump the shell completion script'; - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('shell')) { - $suggestions->suggestValues($this->getSupportedShells()); - } - } - - protected function configure() - { - $fullCommand = $_SERVER['PHP_SELF']; - $commandName = basename($fullCommand); - $fullCommand = realpath($fullCommand) ?: $fullCommand; - - $this - ->setHelp(<<%command.name% command dumps the shell completion script required -to use shell autocompletion (currently only bash completion is supported). - -Static installation -------------------- - -Dump the script to a global completion file and restart your shell: - - %command.full_name% bash | sudo tee /etc/bash_completion.d/${commandName} - -Or dump the script to a local file and source it: - - %command.full_name% bash > completion.sh - - # source the file whenever you use the project - source completion.sh - - # or add this line at the end of your "~/.bashrc" file: - source /path/to/completion.sh - -Dynamic installation --------------------- - -Add this to the end of your shell configuration file (e.g. "~/.bashrc"): - - eval "$(${fullCommand} completion bash)" -EOH - ) - ->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given') - ->addOption('debug', null, InputOption::VALUE_NONE, 'Tail the completion debug log') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $commandName = basename($_SERVER['argv'][0]); - - if ($input->getOption('debug')) { - $this->tailDebugLog($commandName, $output); - - return self::SUCCESS; - } - - $shell = $input->getArgument('shell') ?? self::guessShell(); - $completionFile = __DIR__.'/../Resources/completion.'.$shell; - if (!file_exists($completionFile)) { - $supportedShells = $this->getSupportedShells(); - - ($output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output) - ->writeln(sprintf('Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").', $shell, implode('", "', $supportedShells))); - - return self::INVALID; - } - - $output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], file_get_contents($completionFile))); - - return self::SUCCESS; - } - - private static function guessShell(): string - { - return basename($_SERVER['SHELL'] ?? ''); - } - - private function tailDebugLog(string $commandName, OutputInterface $output): void - { - $debugFile = sys_get_temp_dir().'/sf_'.$commandName.'.log'; - if (!file_exists($debugFile)) { - touch($debugFile); - } - $process = new Process(['tail', '-f', $debugFile], null, null, null, 0); - $process->run(function (string $type, string $line) use ($output): void { - $output->write($line); - }); - } - - /** - * @return string[] - */ - private function getSupportedShells(): array - { - return array_map(function ($f) { - return pathinfo($f, \PATHINFO_EXTENSION); - }, glob(__DIR__.'/../Resources/completion.*')); - } -} diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php deleted file mode 100644 index c66ef46..0000000 --- a/vendor/symfony/console/Command/HelpCommand.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Descriptor\ApplicationDescription; -use Symfony\Component\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * HelpCommand displays the help for a given command. - * - * @author Fabien Potencier - */ -class HelpCommand extends Command -{ - private $command; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this->ignoreValidationErrors(); - - $this - ->setName('help') - ->setDefinition([ - new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - ]) - ->setDescription('Display help for a command') - ->setHelp(<<<'EOF' -The %command.name% command displays help for a given command: - - %command.full_name% list - -You can also output the help in other formats by using the --format option: - - %command.full_name% --format=xml list - -To display the list of available commands, please use the list command. -EOF - ) - ; - } - - public function setCommand(Command $command) - { - $this->command = $command; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - if (null === $this->command) { - $this->command = $this->getApplication()->find($input->getArgument('command_name')); - } - - $helper = new DescriptorHelper(); - $helper->describe($output, $this->command, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - ]); - - $this->command = null; - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('command_name')) { - $descriptor = new ApplicationDescription($this->getApplication()); - $suggestions->suggestValues(array_keys($descriptor->getCommands())); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } -} diff --git a/vendor/symfony/console/Command/LazyCommand.php b/vendor/symfony/console/Command/LazyCommand.php deleted file mode 100644 index e576ad0..0000000 --- a/vendor/symfony/console/Command/LazyCommand.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Nicolas Grekas - */ -final class LazyCommand extends Command -{ - private $command; - private $isEnabled; - - public function __construct(string $name, array $aliases, string $description, bool $isHidden, \Closure $commandFactory, ?bool $isEnabled = true) - { - $this->setName($name) - ->setAliases($aliases) - ->setHidden($isHidden) - ->setDescription($description); - - $this->command = $commandFactory; - $this->isEnabled = $isEnabled; - } - - public function ignoreValidationErrors(): void - { - $this->getCommand()->ignoreValidationErrors(); - } - - public function setApplication(Application $application = null): void - { - if ($this->command instanceof parent) { - $this->command->setApplication($application); - } - - parent::setApplication($application); - } - - public function setHelperSet(HelperSet $helperSet): void - { - if ($this->command instanceof parent) { - $this->command->setHelperSet($helperSet); - } - - parent::setHelperSet($helperSet); - } - - public function isEnabled(): bool - { - return $this->isEnabled ?? $this->getCommand()->isEnabled(); - } - - public function run(InputInterface $input, OutputInterface $output): int - { - return $this->getCommand()->run($input, $output); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - $this->getCommand()->complete($input, $suggestions); - } - - /** - * @return $this - */ - public function setCode(callable $code): self - { - $this->getCommand()->setCode($code); - - return $this; - } - - /** - * @internal - */ - public function mergeApplicationDefinition(bool $mergeArgs = true): void - { - $this->getCommand()->mergeApplicationDefinition($mergeArgs); - } - - /** - * @return $this - */ - public function setDefinition($definition): self - { - $this->getCommand()->setDefinition($definition); - - return $this; - } - - public function getDefinition(): InputDefinition - { - return $this->getCommand()->getDefinition(); - } - - public function getNativeDefinition(): InputDefinition - { - return $this->getCommand()->getNativeDefinition(); - } - - /** - * @return $this - */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null): self - { - $this->getCommand()->addArgument($name, $mode, $description, $default); - - return $this; - } - - /** - * @return $this - */ - public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null): self - { - $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default); - - return $this; - } - - /** - * @return $this - */ - public function setProcessTitle(string $title): self - { - $this->getCommand()->setProcessTitle($title); - - return $this; - } - - /** - * @return $this - */ - public function setHelp(string $help): self - { - $this->getCommand()->setHelp($help); - - return $this; - } - - public function getHelp(): string - { - return $this->getCommand()->getHelp(); - } - - public function getProcessedHelp(): string - { - return $this->getCommand()->getProcessedHelp(); - } - - public function getSynopsis(bool $short = false): string - { - return $this->getCommand()->getSynopsis($short); - } - - /** - * @return $this - */ - public function addUsage(string $usage): self - { - $this->getCommand()->addUsage($usage); - - return $this; - } - - public function getUsages(): array - { - return $this->getCommand()->getUsages(); - } - - /** - * @return mixed - */ - public function getHelper(string $name) - { - return $this->getCommand()->getHelper($name); - } - - public function getCommand(): parent - { - if (!$this->command instanceof \Closure) { - return $this->command; - } - - $command = $this->command = ($this->command)(); - $command->setApplication($this->getApplication()); - - if (null !== $this->getHelperSet()) { - $command->setHelperSet($this->getHelperSet()); - } - - $command->setName($this->getName()) - ->setAliases($this->getAliases()) - ->setHidden($this->isHidden()) - ->setDescription($this->getDescription()); - - // Will throw if the command is not correctly initialized. - $command->getDefinition(); - - return $command; - } -} diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php deleted file mode 100644 index f04a4ef..0000000 --- a/vendor/symfony/console/Command/ListCommand.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Descriptor\ApplicationDescription; -use Symfony\Component\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * ListCommand displays the list of all available commands for the application. - * - * @author Fabien Potencier - */ -class ListCommand extends Command -{ - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setName('list') - ->setDefinition([ - new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('short', null, InputOption::VALUE_NONE, 'To skip describing commands\' arguments'), - ]) - ->setDescription('List commands') - ->setHelp(<<<'EOF' -The %command.name% command lists all commands: - - %command.full_name% - -You can also display the commands for a specific namespace: - - %command.full_name% test - -You can also output the information in other formats by using the --format option: - - %command.full_name% --format=xml - -It's also possible to get raw list of commands (useful for embedding command runner): - - %command.full_name% --raw -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'namespace' => $input->getArgument('namespace'), - 'short' => $input->getOption('short'), - ]); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('namespace')) { - $descriptor = new ApplicationDescription($this->getApplication()); - $suggestions->suggestValues(array_keys($descriptor->getNamespaces())); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } -} diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php deleted file mode 100644 index b1856dc..0000000 --- a/vendor/symfony/console/Command/LockableTrait.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\LockInterface; -use Symfony\Component\Lock\Store\FlockStore; -use Symfony\Component\Lock\Store\SemaphoreStore; - -/** - * Basic lock feature for commands. - * - * @author Geoffrey Brier - */ -trait LockableTrait -{ - /** @var LockInterface|null */ - private $lock; - - /** - * Locks a command. - */ - private function lock(string $name = null, bool $blocking = false): bool - { - if (!class_exists(SemaphoreStore::class)) { - throw new LogicException('To enable the locking feature you must install the symfony/lock component.'); - } - - if (null !== $this->lock) { - throw new LogicException('A lock is already in place.'); - } - - if (SemaphoreStore::isSupported()) { - $store = new SemaphoreStore(); - } else { - $store = new FlockStore(); - } - - $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName()); - if (!$this->lock->acquire($blocking)) { - $this->lock = null; - - return false; - } - - return true; - } - - /** - * Releases the command lock if there is one. - */ - private function release() - { - if ($this->lock) { - $this->lock->release(); - $this->lock = null; - } - } -} diff --git a/vendor/symfony/console/Command/SignalableCommandInterface.php b/vendor/symfony/console/Command/SignalableCommandInterface.php deleted file mode 100644 index d439728..0000000 --- a/vendor/symfony/console/Command/SignalableCommandInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -/** - * Interface for command reacting to signal. - * - * @author Grégoire Pineau - */ -interface SignalableCommandInterface -{ - /** - * Returns the list of signals to subscribe. - */ - public function getSubscribedSignals(): array; - - /** - * The method will be called when the application is signaled. - */ - public function handleSignal(int $signal): void; -} diff --git a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php deleted file mode 100644 index 0adaf88..0000000 --- a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * @author Robin Chalas - */ -interface CommandLoaderInterface -{ - /** - * Loads a command. - * - * @return Command - * - * @throws CommandNotFoundException - */ - public function get(string $name); - - /** - * Checks if a command exists. - * - * @return bool - */ - public function has(string $name); - - /** - * @return string[] - */ - public function getNames(); -} diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php deleted file mode 100644 index ddccb3d..0000000 --- a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * Loads commands from a PSR-11 container. - * - * @author Robin Chalas - */ -class ContainerCommandLoader implements CommandLoaderInterface -{ - private $container; - private $commandMap; - - /** - * @param array $commandMap An array with command names as keys and service ids as values - */ - public function __construct(ContainerInterface $container, array $commandMap) - { - $this->container = $container; - $this->commandMap = $commandMap; - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - return $this->container->get($this->commandMap[$name]); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); - } - - /** - * {@inheritdoc} - */ - public function getNames() - { - return array_keys($this->commandMap); - } -} diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php deleted file mode 100644 index 7e2db34..0000000 --- a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * A simple command loader using factories to instantiate commands lazily. - * - * @author Maxime Steinhausser - */ -class FactoryCommandLoader implements CommandLoaderInterface -{ - private $factories; - - /** - * @param callable[] $factories Indexed by command names - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return isset($this->factories[$name]); - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (!isset($this->factories[$name])) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - $factory = $this->factories[$name]; - - return $factory(); - } - - /** - * {@inheritdoc} - */ - public function getNames() - { - return array_keys($this->factories); - } -} diff --git a/vendor/symfony/console/Completion/CompletionInput.php b/vendor/symfony/console/Completion/CompletionInput.php deleted file mode 100644 index 368b945..0000000 --- a/vendor/symfony/console/Completion/CompletionInput.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Completion; - -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * An input specialized for shell completion. - * - * This input allows unfinished option names or values and exposes what kind of - * completion is expected. - * - * @author Wouter de Jong - */ -final class CompletionInput extends ArgvInput -{ - public const TYPE_ARGUMENT_VALUE = 'argument_value'; - public const TYPE_OPTION_VALUE = 'option_value'; - public const TYPE_OPTION_NAME = 'option_name'; - public const TYPE_NONE = 'none'; - - private $tokens; - private $currentIndex; - private $completionType; - private $completionName = null; - private $completionValue = ''; - - /** - * Converts a terminal string into tokens. - * - * This is required for shell completions without COMP_WORDS support. - */ - public static function fromString(string $inputStr, int $currentIndex): self - { - preg_match_all('/(?<=^|\s)([\'"]?)(.+?)(?tokens = $tokens; - $input->currentIndex = $currentIndex; - - return $input; - } - - /** - * {@inheritdoc} - */ - public function bind(InputDefinition $definition): void - { - parent::bind($definition); - - $relevantToken = $this->getRelevantToken(); - if ('-' === $relevantToken[0]) { - // the current token is an input option: complete either option name or option value - [$optionToken, $optionValue] = explode('=', $relevantToken, 2) + ['', '']; - - $option = $this->getOptionFromToken($optionToken); - if (null === $option && !$this->isCursorFree()) { - $this->completionType = self::TYPE_OPTION_NAME; - $this->completionValue = $relevantToken; - - return; - } - - if (null !== $option && $option->acceptValue()) { - $this->completionType = self::TYPE_OPTION_VALUE; - $this->completionName = $option->getName(); - $this->completionValue = $optionValue ?: (!str_starts_with($optionToken, '--') ? substr($optionToken, 2) : ''); - - return; - } - } - - $previousToken = $this->tokens[$this->currentIndex - 1]; - if ('-' === $previousToken[0] && '' !== trim($previousToken, '-')) { - // check if previous option accepted a value - $previousOption = $this->getOptionFromToken($previousToken); - if (null !== $previousOption && $previousOption->acceptValue()) { - $this->completionType = self::TYPE_OPTION_VALUE; - $this->completionName = $previousOption->getName(); - $this->completionValue = $relevantToken; - - return; - } - } - - // complete argument value - $this->completionType = self::TYPE_ARGUMENT_VALUE; - - foreach ($this->definition->getArguments() as $argumentName => $argument) { - if (!isset($this->arguments[$argumentName])) { - break; - } - - $argumentValue = $this->arguments[$argumentName]; - $this->completionName = $argumentName; - if (\is_array($argumentValue)) { - $this->completionValue = $argumentValue ? $argumentValue[array_key_last($argumentValue)] : null; - } else { - $this->completionValue = $argumentValue; - } - } - - if ($this->currentIndex >= \count($this->tokens)) { - if (!isset($this->arguments[$argumentName]) || $this->definition->getArgument($argumentName)->isArray()) { - $this->completionName = $argumentName; - $this->completionValue = ''; - } else { - // we've reached the end - $this->completionType = self::TYPE_NONE; - $this->completionName = null; - $this->completionValue = ''; - } - } - } - - /** - * Returns the type of completion required. - * - * TYPE_ARGUMENT_VALUE when completing the value of an input argument - * TYPE_OPTION_VALUE when completing the value of an input option - * TYPE_OPTION_NAME when completing the name of an input option - * TYPE_NONE when nothing should be completed - * - * @return string One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component - */ - public function getCompletionType(): string - { - return $this->completionType; - } - - /** - * The name of the input option or argument when completing a value. - * - * @return string|null returns null when completing an option name - */ - public function getCompletionName(): ?string - { - return $this->completionName; - } - - /** - * The value already typed by the user (or empty string). - */ - public function getCompletionValue(): string - { - return $this->completionValue; - } - - public function mustSuggestOptionValuesFor(string $optionName): bool - { - return self::TYPE_OPTION_VALUE === $this->getCompletionType() && $optionName === $this->getCompletionName(); - } - - public function mustSuggestArgumentValuesFor(string $argumentName): bool - { - return self::TYPE_ARGUMENT_VALUE === $this->getCompletionType() && $argumentName === $this->getCompletionName(); - } - - protected function parseToken(string $token, bool $parseOptions): bool - { - try { - return parent::parseToken($token, $parseOptions); - } catch (RuntimeException $e) { - // suppress errors, completed input is almost never valid - } - - return $parseOptions; - } - - private function getOptionFromToken(string $optionToken): ?InputOption - { - $optionName = ltrim($optionToken, '-'); - if (!$optionName) { - return null; - } - - if ('-' === ($optionToken[1] ?? ' ')) { - // long option name - return $this->definition->hasOption($optionName) ? $this->definition->getOption($optionName) : null; - } - - // short option name - return $this->definition->hasShortcut($optionName[0]) ? $this->definition->getOptionForShortcut($optionName[0]) : null; - } - - /** - * The token of the cursor, or the last token if the cursor is at the end of the input. - */ - private function getRelevantToken(): string - { - return $this->tokens[$this->isCursorFree() ? $this->currentIndex - 1 : $this->currentIndex]; - } - - /** - * Whether the cursor is "free" (i.e. at the end of the input preceded by a space). - */ - private function isCursorFree(): bool - { - $nrOfTokens = \count($this->tokens); - if ($this->currentIndex > $nrOfTokens) { - throw new \LogicException('Current index is invalid, it must be the number of input tokens or one more.'); - } - - return $this->currentIndex >= $nrOfTokens; - } - - public function __toString() - { - $str = ''; - foreach ($this->tokens as $i => $token) { - $str .= $token; - - if ($this->currentIndex === $i) { - $str .= '|'; - } - - $str .= ' '; - } - - if ($this->currentIndex > $i) { - $str .= '|'; - } - - return rtrim($str); - } -} diff --git a/vendor/symfony/console/Completion/CompletionSuggestions.php b/vendor/symfony/console/Completion/CompletionSuggestions.php deleted file mode 100644 index d8905e5..0000000 --- a/vendor/symfony/console/Completion/CompletionSuggestions.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Completion; - -use Symfony\Component\Console\Input\InputOption; - -/** - * Stores all completion suggestions for the current input. - * - * @author Wouter de Jong - */ -final class CompletionSuggestions -{ - private $valueSuggestions = []; - private $optionSuggestions = []; - - /** - * Add a suggested value for an input option or argument. - * - * @param string|Suggestion $value - * - * @return $this - */ - public function suggestValue($value): self - { - $this->valueSuggestions[] = !$value instanceof Suggestion ? new Suggestion($value) : $value; - - return $this; - } - - /** - * Add multiple suggested values at once for an input option or argument. - * - * @param list $values - * - * @return $this - */ - public function suggestValues(array $values): self - { - foreach ($values as $value) { - $this->suggestValue($value); - } - - return $this; - } - - /** - * Add a suggestion for an input option name. - * - * @return $this - */ - public function suggestOption(InputOption $option): self - { - $this->optionSuggestions[] = $option; - - return $this; - } - - /** - * Add multiple suggestions for input option names at once. - * - * @param InputOption[] $options - * - * @return $this - */ - public function suggestOptions(array $options): self - { - foreach ($options as $option) { - $this->suggestOption($option); - } - - return $this; - } - - /** - * @return InputOption[] - */ - public function getOptionSuggestions(): array - { - return $this->optionSuggestions; - } - - /** - * @return Suggestion[] - */ - public function getValueSuggestions(): array - { - return $this->valueSuggestions; - } -} diff --git a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php b/vendor/symfony/console/Completion/Output/BashCompletionOutput.php deleted file mode 100644 index 8d5ffa6..0000000 --- a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Completion\Output; - -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Wouter de Jong - */ -class BashCompletionOutput implements CompletionOutputInterface -{ - public function write(CompletionSuggestions $suggestions, OutputInterface $output): void - { - $values = $suggestions->getValueSuggestions(); - foreach ($suggestions->getOptionSuggestions() as $option) { - $values[] = '--'.$option->getName(); - } - $output->writeln(implode("\n", $values)); - } -} diff --git a/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php b/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php deleted file mode 100644 index 659e596..0000000 --- a/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Completion\Output; - -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Transforms the {@see CompletionSuggestions} object into output readable by the shell completion. - * - * @author Wouter de Jong - */ -interface CompletionOutputInterface -{ - public function write(CompletionSuggestions $suggestions, OutputInterface $output): void; -} diff --git a/vendor/symfony/console/Completion/Suggestion.php b/vendor/symfony/console/Completion/Suggestion.php deleted file mode 100644 index 6c7bc4d..0000000 --- a/vendor/symfony/console/Completion/Suggestion.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Completion; - -/** - * Represents a single suggested value. - * - * @author Wouter de Jong - */ -class Suggestion -{ - private $value; - - public function __construct(string $value) - { - $this->value = $value; - } - - public function getValue(): string - { - return $this->value; - } - - public function __toString(): string - { - return $this->getValue(); - } -} diff --git a/vendor/symfony/console/ConsoleEvents.php b/vendor/symfony/console/ConsoleEvents.php deleted file mode 100644 index 6ae8f32..0000000 --- a/vendor/symfony/console/ConsoleEvents.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleSignalEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; - -/** - * Contains all events dispatched by an Application. - * - * @author Francesco Levorato - */ -final class ConsoleEvents -{ - /** - * The COMMAND event allows you to attach listeners before any command is - * executed by the console. It also allows you to modify the command, input and output - * before they are handed to the command. - * - * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") - */ - public const COMMAND = 'console.command'; - - /** - * The SIGNAL event allows you to perform some actions - * after the command execution was interrupted. - * - * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent") - */ - public const SIGNAL = 'console.signal'; - - /** - * The TERMINATE event allows you to attach listeners after a command is - * executed by the console. - * - * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") - */ - public const TERMINATE = 'console.terminate'; - - /** - * The ERROR event occurs when an uncaught exception or error appears. - * - * This event allows you to deal with the exception/error or - * to modify the thrown exception. - * - * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") - */ - public const ERROR = 'console.error'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - ConsoleCommandEvent::class => self::COMMAND, - ConsoleErrorEvent::class => self::ERROR, - ConsoleSignalEvent::class => self::SIGNAL, - ConsoleTerminateEvent::class => self::TERMINATE, - ]; -} diff --git a/vendor/symfony/console/Cursor.php b/vendor/symfony/console/Cursor.php deleted file mode 100644 index 0c4dafb..0000000 --- a/vendor/symfony/console/Cursor.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Pierre du Plessis - */ -final class Cursor -{ - private $output; - private $input; - - /** - * @param resource|null $input - */ - public function __construct(OutputInterface $output, $input = null) - { - $this->output = $output; - $this->input = $input ?? (\defined('STDIN') ? \STDIN : fopen('php://input', 'r+')); - } - - /** - * @return $this - */ - public function moveUp(int $lines = 1): self - { - $this->output->write(sprintf("\x1b[%dA", $lines)); - - return $this; - } - - /** - * @return $this - */ - public function moveDown(int $lines = 1): self - { - $this->output->write(sprintf("\x1b[%dB", $lines)); - - return $this; - } - - /** - * @return $this - */ - public function moveRight(int $columns = 1): self - { - $this->output->write(sprintf("\x1b[%dC", $columns)); - - return $this; - } - - /** - * @return $this - */ - public function moveLeft(int $columns = 1): self - { - $this->output->write(sprintf("\x1b[%dD", $columns)); - - return $this; - } - - /** - * @return $this - */ - public function moveToColumn(int $column): self - { - $this->output->write(sprintf("\x1b[%dG", $column)); - - return $this; - } - - /** - * @return $this - */ - public function moveToPosition(int $column, int $row): self - { - $this->output->write(sprintf("\x1b[%d;%dH", $row + 1, $column)); - - return $this; - } - - /** - * @return $this - */ - public function savePosition(): self - { - $this->output->write("\x1b7"); - - return $this; - } - - /** - * @return $this - */ - public function restorePosition(): self - { - $this->output->write("\x1b8"); - - return $this; - } - - /** - * @return $this - */ - public function hide(): self - { - $this->output->write("\x1b[?25l"); - - return $this; - } - - /** - * @return $this - */ - public function show(): self - { - $this->output->write("\x1b[?25h\x1b[?0c"); - - return $this; - } - - /** - * Clears all the output from the current line. - * - * @return $this - */ - public function clearLine(): self - { - $this->output->write("\x1b[2K"); - - return $this; - } - - /** - * Clears all the output from the current line after the current position. - */ - public function clearLineAfter(): self - { - $this->output->write("\x1b[K"); - - return $this; - } - - /** - * Clears all the output from the cursors' current position to the end of the screen. - * - * @return $this - */ - public function clearOutput(): self - { - $this->output->write("\x1b[0J"); - - return $this; - } - - /** - * Clears the entire screen. - * - * @return $this - */ - public function clearScreen(): self - { - $this->output->write("\x1b[2J"); - - return $this; - } - - /** - * Returns the current cursor position as x,y coordinates. - */ - public function getCurrentPosition(): array - { - static $isTtySupported; - - if (null === $isTtySupported && \function_exists('proc_open')) { - $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); - } - - if (!$isTtySupported) { - return [1, 1]; - } - - $sttyMode = shell_exec('stty -g'); - shell_exec('stty -icanon -echo'); - - @fwrite($this->input, "\033[6n"); - - $code = trim(fread($this->input, 1024)); - - shell_exec(sprintf('stty %s', $sttyMode)); - - sscanf($code, "\033[%d;%dR", $row, $col); - - return [$col, $row]; - } -} diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php deleted file mode 100644 index 743e306..0000000 --- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\DependencyInjection; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\LazyCommand; -use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Registers console commands. - * - * @author Grégoire Pineau - */ -class AddConsoleCommandPass implements CompilerPassInterface -{ - private $commandLoaderServiceId; - private $commandTag; - private $noPreloadTag; - private $privateTagName; - - public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->commandLoaderServiceId = $commandLoaderServiceId; - $this->commandTag = $commandTag; - $this->noPreloadTag = $noPreloadTag; - $this->privateTagName = $privateTagName; - } - - public function process(ContainerBuilder $container) - { - $commandServices = $container->findTaggedServiceIds($this->commandTag, true); - $lazyCommandMap = []; - $lazyCommandRefs = []; - $serviceIds = []; - - foreach ($commandServices as $id => $tags) { - $definition = $container->getDefinition($id); - $definition->addTag($this->noPreloadTag); - $class = $container->getParameterBag()->resolveValue($definition->getClass()); - - if (isset($tags[0]['command'])) { - $aliases = $tags[0]['command']; - } else { - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(Command::class)) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); - } - $aliases = $class::getDefaultName(); - } - - $aliases = explode('|', $aliases ?? ''); - $commandName = array_shift($aliases); - - if ($isHidden = '' === $commandName) { - $commandName = array_shift($aliases); - } - - if (null === $commandName) { - if (!$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) { - $commandId = 'console.command.public_alias.'.$id; - $container->setAlias($commandId, $id)->setPublic(true); - $id = $commandId; - } - $serviceIds[] = $id; - - continue; - } - - $description = $tags[0]['description'] ?? null; - - unset($tags[0]); - $lazyCommandMap[$commandName] = $id; - $lazyCommandRefs[$id] = new TypedReference($id, $class); - - foreach ($aliases as $alias) { - $lazyCommandMap[$alias] = $id; - } - - foreach ($tags as $tag) { - if (isset($tag['command'])) { - $aliases[] = $tag['command']; - $lazyCommandMap[$tag['command']] = $id; - } - - $description = $description ?? $tag['description'] ?? null; - } - - $definition->addMethodCall('setName', [$commandName]); - - if ($aliases) { - $definition->addMethodCall('setAliases', [$aliases]); - } - - if ($isHidden) { - $definition->addMethodCall('setHidden', [true]); - } - - if (!$description) { - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(Command::class)) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); - } - $description = $class::getDefaultDescription(); - } - - if ($description) { - $definition->addMethodCall('setDescription', [$description]); - - $container->register('.'.$id.'.lazy', LazyCommand::class) - ->setArguments([$commandName, $aliases, $description, $isHidden, new ServiceClosureArgument($lazyCommandRefs[$id])]); - - $lazyCommandRefs[$id] = new Reference('.'.$id.'.lazy'); - } - } - - $container - ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) - ->setPublic(true) - ->addTag($this->noPreloadTag) - ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]); - - $container->setParameter('console.command.ids', $serviceIds); - } -} diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php deleted file mode 100644 index fac01ad..0000000 --- a/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * @author Jean-François Simon - * - * @internal - */ -class ApplicationDescription -{ - public const GLOBAL_NAMESPACE = '_global'; - - private $application; - private $namespace; - private $showHidden; - - /** - * @var array - */ - private $namespaces; - - /** - * @var array - */ - private $commands; - - /** - * @var array - */ - private $aliases; - - public function __construct(Application $application, string $namespace = null, bool $showHidden = false) - { - $this->application = $application; - $this->namespace = $namespace; - $this->showHidden = $showHidden; - } - - public function getNamespaces(): array - { - if (null === $this->namespaces) { - $this->inspectApplication(); - } - - return $this->namespaces; - } - - /** - * @return Command[] - */ - public function getCommands(): array - { - if (null === $this->commands) { - $this->inspectApplication(); - } - - return $this->commands; - } - - /** - * @throws CommandNotFoundException - */ - public function getCommand(string $name): Command - { - if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - return $this->commands[$name] ?? $this->aliases[$name]; - } - - private function inspectApplication() - { - $this->commands = []; - $this->namespaces = []; - - $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); - foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = []; - - /** @var Command $command */ - foreach ($commands as $name => $command) { - if (!$command->getName() || (!$this->showHidden && $command->isHidden())) { - continue; - } - - if ($command->getName() === $name) { - $this->commands[$name] = $command; - } else { - $this->aliases[$name] = $command; - } - - $names[] = $name; - } - - $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; - } - } - - private function sortCommands(array $commands): array - { - $namespacedCommands = []; - $globalCommands = []; - $sortedCommands = []; - foreach ($commands as $name => $command) { - $key = $this->application->extractNamespace($name, 1); - if (\in_array($key, ['', self::GLOBAL_NAMESPACE], true)) { - $globalCommands[$name] = $command; - } else { - $namespacedCommands[$key][$name] = $command; - } - } - - if ($globalCommands) { - ksort($globalCommands); - $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands; - } - - if ($namespacedCommands) { - ksort($namespacedCommands); - foreach ($namespacedCommands as $key => $commandsSet) { - ksort($commandsSet); - $sortedCommands[$key] = $commandsSet; - } - } - - return $sortedCommands; - } -} diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php deleted file mode 100644 index a364830..0000000 --- a/vendor/symfony/console/Descriptor/Descriptor.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Jean-François Simon - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** - * @var OutputInterface - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, object $object, array $options = []) - { - $this->output = $output; - - switch (true) { - case $object instanceof InputArgument: - $this->describeInputArgument($object, $options); - break; - case $object instanceof InputOption: - $this->describeInputOption($object, $options); - break; - case $object instanceof InputDefinition: - $this->describeInputDefinition($object, $options); - break; - case $object instanceof Command: - $this->describeCommand($object, $options); - break; - case $object instanceof Application: - $this->describeApplication($object, $options); - break; - default: - throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); - } - } - - /** - * Writes content to output. - */ - protected function write(string $content, bool $decorated = false) - { - $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); - } - - /** - * Describes an InputArgument instance. - */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = []); - - /** - * Describes an InputOption instance. - */ - abstract protected function describeInputOption(InputOption $option, array $options = []); - - /** - * Describes an InputDefinition instance. - */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); - - /** - * Describes a Command instance. - */ - abstract protected function describeCommand(Command $command, array $options = []); - - /** - * Describes an Application instance. - */ - abstract protected function describeApplication(Application $application, array $options = []); -} diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php deleted file mode 100644 index ebea303..0000000 --- a/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Descriptor interface. - * - * @author Jean-François Simon - */ -interface DescriptorInterface -{ - public function describe(OutputInterface $output, object $object, array $options = []); -} diff --git a/vendor/symfony/console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Descriptor/JsonDescriptor.php deleted file mode 100644 index 1d28659..0000000 --- a/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * JSON descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->writeData($this->getInputArgumentData($argument), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $this->writeData($this->getInputOptionData($option), $options); - if ($option->isNegatable()) { - $this->writeData($this->getInputOptionData($option, true), $options); - } - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $this->writeData($this->getInputDefinitionData($definition), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $this->writeData($this->getCommandData($command, $options['short'] ?? false), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace, true); - $commands = []; - - foreach ($description->getCommands() as $command) { - $commands[] = $this->getCommandData($command, $options['short'] ?? false); - } - - $data = []; - if ('UNKNOWN' !== $application->getName()) { - $data['application']['name'] = $application->getName(); - if ('UNKNOWN' !== $application->getVersion()) { - $data['application']['version'] = $application->getVersion(); - } - } - - $data['commands'] = $commands; - - if ($describedNamespace) { - $data['namespace'] = $describedNamespace; - } else { - $data['namespaces'] = array_values($description->getNamespaces()); - } - - $this->writeData($data, $options); - } - - /** - * Writes data as json. - */ - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - $this->write(json_encode($data, $flags)); - } - - private function getInputArgumentData(InputArgument $argument): array - { - return [ - 'name' => $argument->getName(), - 'is_required' => $argument->isRequired(), - 'is_array' => $argument->isArray(), - 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), - 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault(), - ]; - } - - private function getInputOptionData(InputOption $option, bool $negated = false): array - { - return $negated ? [ - 'name' => '--no-'.$option->getName(), - 'shortcut' => '', - 'accept_value' => false, - 'is_value_required' => false, - 'is_multiple' => false, - 'description' => 'Negate the "--'.$option->getName().'" option', - 'default' => false, - ] : [ - 'name' => '--'.$option->getName(), - 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', - 'accept_value' => $option->acceptValue(), - 'is_value_required' => $option->isValueRequired(), - 'is_multiple' => $option->isArray(), - 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), - 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault(), - ]; - } - - private function getInputDefinitionData(InputDefinition $definition): array - { - $inputArguments = []; - foreach ($definition->getArguments() as $name => $argument) { - $inputArguments[$name] = $this->getInputArgumentData($argument); - } - - $inputOptions = []; - foreach ($definition->getOptions() as $name => $option) { - $inputOptions[$name] = $this->getInputOptionData($option); - if ($option->isNegatable()) { - $inputOptions['no-'.$name] = $this->getInputOptionData($option, true); - } - } - - return ['arguments' => $inputArguments, 'options' => $inputOptions]; - } - - private function getCommandData(Command $command, bool $short = false): array - { - $data = [ - 'name' => $command->getName(), - 'description' => $command->getDescription(), - ]; - - if ($short) { - $data += [ - 'usage' => $command->getAliases(), - ]; - } else { - $command->mergeApplicationDefinition(false); - - $data += [ - 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), - 'help' => $command->getProcessedHelp(), - 'definition' => $this->getInputDefinitionData($command->getDefinition()), - ]; - } - - $data['hidden'] = $command->isHidden(); - - return $data; - } -} diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php deleted file mode 100644 index 21ceca6..0000000 --- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Markdown descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class MarkdownDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, object $object, array $options = []) - { - $decorated = $output->isDecorated(); - $output->setDecorated(false); - - parent::describe($output, $object, $options); - - $output->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - protected function write(string $content, bool $decorated = true) - { - parent::write($content, $decorated); - } - - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->write( - '#### `'.($argument->getName() ?: '')."`\n\n" - .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '') - .'* Is required: '.($argument->isRequired() ? 'yes' : 'no')."\n" - .'* Is array: '.($argument->isArray() ? 'yes' : 'no')."\n" - .'* Default: `'.str_replace("\n", '', var_export($argument->getDefault(), true)).'`' - ); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $name = '--'.$option->getName(); - if ($option->isNegatable()) { - $name .= '|--no-'.$option->getName(); - } - if ($option->getShortcut()) { - $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).''; - } - - $this->write( - '#### `'.$name.'`'."\n\n" - .($option->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $option->getDescription())."\n\n" : '') - .'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n" - .'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n" - .'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n" - .'* Is negatable: '.($option->isNegatable() ? 'yes' : 'no')."\n" - .'* Default: `'.str_replace("\n", '', var_export($option->getDefault(), true)).'`' - ); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - if ($showArguments = \count($definition->getArguments()) > 0) { - $this->write('### Arguments'); - foreach ($definition->getArguments() as $argument) { - $this->write("\n\n"); - if (null !== $describeInputArgument = $this->describeInputArgument($argument)) { - $this->write($describeInputArgument); - } - } - } - - if (\count($definition->getOptions()) > 0) { - if ($showArguments) { - $this->write("\n\n"); - } - - $this->write('### Options'); - foreach ($definition->getOptions() as $option) { - $this->write("\n\n"); - if (null !== $describeInputOption = $this->describeInputOption($option)) { - $this->write($describeInputOption); - } - } - } - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - if ($options['short'] ?? false) { - $this->write( - '`'.$command->getName()."`\n" - .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n" - .($command->getDescription() ? $command->getDescription()."\n\n" : '') - .'### Usage'."\n\n" - .array_reduce($command->getAliases(), function ($carry, $usage) { - return $carry.'* `'.$usage.'`'."\n"; - }) - ); - - return; - } - - $command->mergeApplicationDefinition(false); - - $this->write( - '`'.$command->getName()."`\n" - .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n" - .($command->getDescription() ? $command->getDescription()."\n\n" : '') - .'### Usage'."\n\n" - .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { - return $carry.'* `'.$usage.'`'."\n"; - }) - ); - - if ($help = $command->getProcessedHelp()) { - $this->write("\n"); - $this->write($help); - } - - $definition = $command->getDefinition(); - if ($definition->getOptions() || $definition->getArguments()) { - $this->write("\n\n"); - $this->describeInputDefinition($definition); - } - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace); - $title = $this->getApplicationTitle($application); - - $this->write($title."\n".str_repeat('=', Helper::width($title))); - - foreach ($description->getNamespaces() as $namespace) { - if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { - $this->write("\n\n"); - $this->write('**'.$namespace['id'].':**'); - } - - $this->write("\n\n"); - $this->write(implode("\n", array_map(function ($commandName) use ($description) { - return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName())); - }, $namespace['commands']))); - } - - foreach ($description->getCommands() as $command) { - $this->write("\n\n"); - if (null !== $describeCommand = $this->describeCommand($command, $options)) { - $this->write($describeCommand); - } - } - } - - private function getApplicationTitle(Application $application): string - { - if ('UNKNOWN' !== $application->getName()) { - if ('UNKNOWN' !== $application->getVersion()) { - return sprintf('%s %s', $application->getName(), $application->getVersion()); - } - - return $application->getName(); - } - - return 'Console Tool'; - } -} diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php deleted file mode 100644 index fbb140a..0000000 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,341 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * Text descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { - $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); - } else { - $default = ''; - } - - $totalWidth = $options['total_width'] ?? Helper::width($argument->getName()); - $spacingWidth = $totalWidth - \strlen($argument->getName()); - - $this->writeText(sprintf(' %s %s%s%s', - $argument->getName(), - str_repeat(' ', $spacingWidth), - // + 4 = 2 spaces before , 2 spaces after - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()), - $default - ), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { - $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); - } else { - $default = ''; - } - - $value = ''; - if ($option->acceptValue()) { - $value = '='.strtoupper($option->getName()); - - if ($option->isValueOptional()) { - $value = '['.$value.']'; - } - } - - $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]); - $synopsis = sprintf('%s%s', - $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', - sprintf($option->isNegatable() ? '--%1$s|--no-%1$s' : '--%1$s%2$s', $option->getName(), $value) - ); - - $spacingWidth = $totalWidth - Helper::width($synopsis); - - $this->writeText(sprintf(' %s %s%s%s%s', - $synopsis, - str_repeat(' ', $spacingWidth), - // + 4 = 2 spaces before , 2 spaces after - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()), - $default, - $option->isArray() ? ' (multiple values allowed)' : '' - ), $options); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); - foreach ($definition->getArguments() as $argument) { - $totalWidth = max($totalWidth, Helper::width($argument->getName())); - } - - if ($definition->getArguments()) { - $this->writeText('Arguments:', $options); - $this->writeText("\n"); - foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); - $this->writeText("\n"); - } - } - - if ($definition->getArguments() && $definition->getOptions()) { - $this->writeText("\n"); - } - - if ($definition->getOptions()) { - $laterOptions = []; - - $this->writeText('Options:', $options); - foreach ($definition->getOptions() as $option) { - if (\strlen($option->getShortcut() ?? '') > 1) { - $laterOptions[] = $option; - continue; - } - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - foreach ($laterOptions as $option) { - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - } - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $command->mergeApplicationDefinition(false); - - if ($description = $command->getDescription()) { - $this->writeText('Description:', $options); - $this->writeText("\n"); - $this->writeText(' '.$description); - $this->writeText("\n\n"); - } - - $this->writeText('Usage:', $options); - foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { - $this->writeText("\n"); - $this->writeText(' '.OutputFormatter::escape($usage), $options); - } - $this->writeText("\n"); - - $definition = $command->getDefinition(); - if ($definition->getOptions() || $definition->getArguments()) { - $this->writeText("\n"); - $this->describeInputDefinition($definition, $options); - $this->writeText("\n"); - } - - $help = $command->getProcessedHelp(); - if ($help && $help !== $description) { - $this->writeText("\n"); - $this->writeText('Help:', $options); - $this->writeText("\n"); - $this->writeText(' '.str_replace("\n", "\n ", $help), $options); - $this->writeText("\n"); - } - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $describedNamespace = $options['namespace'] ?? null; - $description = new ApplicationDescription($application, $describedNamespace); - - if (isset($options['raw_text']) && $options['raw_text']) { - $width = $this->getColumnWidth($description->getCommands()); - - foreach ($description->getCommands() as $command) { - $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); - $this->writeText("\n"); - } - } else { - if ('' != $help = $application->getHelp()) { - $this->writeText("$help\n\n", $options); - } - - $this->writeText("Usage:\n", $options); - $this->writeText(" command [options] [arguments]\n\n", $options); - - $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options); - - $this->writeText("\n"); - $this->writeText("\n"); - - $commands = $description->getCommands(); - $namespaces = $description->getNamespaces(); - if ($describedNamespace && $namespaces) { - // make sure all alias commands are included when describing a specific namespace - $describedNamespaceInfo = reset($namespaces); - foreach ($describedNamespaceInfo['commands'] as $name) { - $commands[$name] = $description->getCommand($name); - } - } - - // calculate max. width based on available commands per namespace - $width = $this->getColumnWidth(array_merge(...array_values(array_map(function ($namespace) use ($commands) { - return array_intersect($namespace['commands'], array_keys($commands)); - }, array_values($namespaces))))); - - if ($describedNamespace) { - $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); - } else { - $this->writeText('Available commands:', $options); - } - - foreach ($namespaces as $namespace) { - $namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) { - return isset($commands[$name]); - }); - - if (!$namespace['commands']) { - continue; - } - - if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { - $this->writeText("\n"); - $this->writeText(' '.$namespace['id'].'', $options); - } - - foreach ($namespace['commands'] as $name) { - $this->writeText("\n"); - $spacingWidth = $width - Helper::width($name); - $command = $commands[$name]; - $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : ''; - $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options); - } - } - - $this->writeText("\n"); - } - } - - /** - * {@inheritdoc} - */ - private function writeText(string $content, array $options = []) - { - $this->write( - isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, - isset($options['raw_output']) ? !$options['raw_output'] : true - ); - } - - /** - * Formats command aliases to show them in the command description. - */ - private function getCommandAliasesText(Command $command): string - { - $text = ''; - $aliases = $command->getAliases(); - - if ($aliases) { - $text = '['.implode('|', $aliases).'] '; - } - - return $text; - } - - /** - * Formats input option/argument default value. - * - * @param mixed $default - */ - private function formatDefaultValue($default): string - { - if (\INF === $default) { - return 'INF'; - } - - if (\is_string($default)) { - $default = OutputFormatter::escape($default); - } elseif (\is_array($default)) { - foreach ($default as $key => $value) { - if (\is_string($value)) { - $default[$key] = OutputFormatter::escape($value); - } - } - } - - return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); - } - - /** - * @param array $commands - */ - private function getColumnWidth(array $commands): int - { - $widths = []; - - foreach ($commands as $command) { - if ($command instanceof Command) { - $widths[] = Helper::width($command->getName()); - foreach ($command->getAliases() as $alias) { - $widths[] = Helper::width($alias); - } - } else { - $widths[] = Helper::width($command); - } - } - - return $widths ? max($widths) + 2 : 0; - } - - /** - * @param InputOption[] $options - */ - private function calculateTotalWidthForOptions(array $options): int - { - $totalWidth = 0; - foreach ($options as $option) { - // "-" + shortcut + ", --" + name - $nameLength = 1 + max(Helper::width($option->getShortcut()), 1) + 4 + Helper::width($option->getName()); - if ($option->isNegatable()) { - $nameLength += 6 + Helper::width($option->getName()); // |--no- + name - } elseif ($option->acceptValue()) { - $valueLength = 1 + Helper::width($option->getName()); // = + value - $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] - - $nameLength += $valueLength; - } - $totalWidth = max($totalWidth, $nameLength); - } - - return $totalWidth; - } -} diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php deleted file mode 100644 index 4f7cd8b..0000000 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; - -/** - * XML descriptor. - * - * @author Jean-François Simon - * - * @internal - */ -class XmlDescriptor extends Descriptor -{ - public function getInputDefinitionDocument(InputDefinition $definition): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($definitionXML = $dom->createElement('definition')); - - $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments')); - foreach ($definition->getArguments() as $argument) { - $this->appendDocument($argumentsXML, $this->getInputArgumentDocument($argument)); - } - - $definitionXML->appendChild($optionsXML = $dom->createElement('options')); - foreach ($definition->getOptions() as $option) { - $this->appendDocument($optionsXML, $this->getInputOptionDocument($option)); - } - - return $dom; - } - - public function getCommandDocument(Command $command, bool $short = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($commandXML = $dom->createElement('command')); - - $commandXML->setAttribute('id', $command->getName()); - $commandXML->setAttribute('name', $command->getName()); - $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0); - - $commandXML->appendChild($usagesXML = $dom->createElement('usages')); - - $commandXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getDescription()))); - - if ($short) { - foreach ($command->getAliases() as $usage) { - $usagesXML->appendChild($dom->createElement('usage', $usage)); - } - } else { - $command->mergeApplicationDefinition(false); - - foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) { - $usagesXML->appendChild($dom->createElement('usage', $usage)); - } - - $commandXML->appendChild($helpXML = $dom->createElement('help')); - $helpXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getProcessedHelp()))); - - $definitionXML = $this->getInputDefinitionDocument($command->getDefinition()); - $this->appendDocument($commandXML, $definitionXML->getElementsByTagName('definition')->item(0)); - } - - return $dom; - } - - public function getApplicationDocument(Application $application, string $namespace = null, bool $short = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($rootXml = $dom->createElement('symfony')); - - if ('UNKNOWN' !== $application->getName()) { - $rootXml->setAttribute('name', $application->getName()); - if ('UNKNOWN' !== $application->getVersion()) { - $rootXml->setAttribute('version', $application->getVersion()); - } - } - - $rootXml->appendChild($commandsXML = $dom->createElement('commands')); - - $description = new ApplicationDescription($application, $namespace, true); - - if ($namespace) { - $commandsXML->setAttribute('namespace', $namespace); - } - - foreach ($description->getCommands() as $command) { - $this->appendDocument($commandsXML, $this->getCommandDocument($command, $short)); - } - - if (!$namespace) { - $rootXml->appendChild($namespacesXML = $dom->createElement('namespaces')); - - foreach ($description->getNamespaces() as $namespaceDescription) { - $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace')); - $namespaceArrayXML->setAttribute('id', $namespaceDescription['id']); - - foreach ($namespaceDescription['commands'] as $name) { - $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command')); - $commandXML->appendChild($dom->createTextNode($name)); - } - } - } - - return $dom; - } - - /** - * {@inheritdoc} - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - $this->writeDocument($this->getInputArgumentDocument($argument)); - } - - /** - * {@inheritdoc} - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - $this->writeDocument($this->getInputOptionDocument($option)); - } - - /** - * {@inheritdoc} - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $this->writeDocument($this->getInputDefinitionDocument($definition)); - } - - /** - * {@inheritdoc} - */ - protected function describeCommand(Command $command, array $options = []) - { - $this->writeDocument($this->getCommandDocument($command, $options['short'] ?? false)); - } - - /** - * {@inheritdoc} - */ - protected function describeApplication(Application $application, array $options = []) - { - $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null, $options['short'] ?? false)); - } - - /** - * Appends document children to parent node. - */ - private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) - { - foreach ($importedParent->childNodes as $childNode) { - $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, true)); - } - } - - /** - * Writes DOM document. - */ - private function writeDocument(\DOMDocument $dom) - { - $dom->formatOutput = true; - $this->write($dom->saveXML()); - } - - private function getInputArgumentDocument(InputArgument $argument): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - $dom->appendChild($objectXML = $dom->createElement('argument')); - $objectXML->setAttribute('name', $argument->getName()); - $objectXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0); - $objectXML->setAttribute('is_array', $argument->isArray() ? 1 : 0); - $objectXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); - - $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : [])); - foreach ($defaults as $default) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->appendChild($dom->createTextNode($default)); - } - - return $dom; - } - - private function getInputOptionDocument(InputOption $option): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - $dom->appendChild($objectXML = $dom->createElement('option')); - $objectXML->setAttribute('name', '--'.$option->getName()); - $pos = strpos($option->getShortcut() ?? '', '|'); - if (false !== $pos) { - $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); - $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut())); - } else { - $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); - } - $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0); - $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0); - $objectXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0); - $objectXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); - - if ($option->acceptValue()) { - $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : [])); - $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - - if (!empty($defaults)) { - foreach ($defaults as $default) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->appendChild($dom->createTextNode($default)); - } - } - } - - if ($option->isNegatable()) { - $dom->appendChild($objectXML = $dom->createElement('option')); - $objectXML->setAttribute('name', '--no-'.$option->getName()); - $objectXML->setAttribute('shortcut', ''); - $objectXML->setAttribute('accept_value', 0); - $objectXML->setAttribute('is_value_required', 0); - $objectXML->setAttribute('is_multiple', 0); - $objectXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createTextNode('Negate the "--'.$option->getName().'" option')); - } - - return $dom; - } -} diff --git a/vendor/symfony/console/Event/ConsoleCommandEvent.php b/vendor/symfony/console/Event/ConsoleCommandEvent.php deleted file mode 100644 index 08bd18f..0000000 --- a/vendor/symfony/console/Event/ConsoleCommandEvent.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -/** - * Allows to do things before the command is executed, like skipping the command or changing the input. - * - * @author Fabien Potencier - */ -final class ConsoleCommandEvent extends ConsoleEvent -{ - /** - * The return code for skipped commands, this will also be passed into the terminate event. - */ - public const RETURN_CODE_DISABLED = 113; - - /** - * Indicates if the command should be run or skipped. - */ - private $commandShouldRun = true; - - /** - * Disables the command, so it won't be run. - */ - public function disableCommand(): bool - { - return $this->commandShouldRun = false; - } - - public function enableCommand(): bool - { - return $this->commandShouldRun = true; - } - - /** - * Returns true if the command is runnable, false otherwise. - */ - public function commandShouldRun(): bool - { - return $this->commandShouldRun; - } -} diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php deleted file mode 100644 index 57d9b38..0000000 --- a/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Allows to handle throwables thrown while running a command. - * - * @author Wouter de Jong - */ -final class ConsoleErrorEvent extends ConsoleEvent -{ - private $error; - private $exitCode; - - public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null) - { - parent::__construct($command, $input, $output); - - $this->error = $error; - } - - public function getError(): \Throwable - { - return $this->error; - } - - public function setError(\Throwable $error): void - { - $this->error = $error; - } - - public function setExitCode(int $exitCode): void - { - $this->exitCode = $exitCode; - - $r = new \ReflectionProperty($this->error, 'code'); - $r->setAccessible(true); - $r->setValue($this->error, $this->exitCode); - } - - public function getExitCode(): int - { - return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); - } -} diff --git a/vendor/symfony/console/Event/ConsoleEvent.php b/vendor/symfony/console/Event/ConsoleEvent.php deleted file mode 100644 index be7937d..0000000 --- a/vendor/symfony/console/Event/ConsoleEvent.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Allows to inspect input and output of a command. - * - * @author Francesco Levorato - */ -class ConsoleEvent extends Event -{ - protected $command; - - private $input; - private $output; - - public function __construct(?Command $command, InputInterface $input, OutputInterface $output) - { - $this->command = $command; - $this->input = $input; - $this->output = $output; - } - - /** - * Gets the command that is executed. - * - * @return Command|null - */ - public function getCommand() - { - return $this->command; - } - - /** - * Gets the input instance. - * - * @return InputInterface - */ - public function getInput() - { - return $this->input; - } - - /** - * Gets the output instance. - * - * @return OutputInterface - */ - public function getOutput() - { - return $this->output; - } -} diff --git a/vendor/symfony/console/Event/ConsoleSignalEvent.php b/vendor/symfony/console/Event/ConsoleSignalEvent.php deleted file mode 100644 index ef13ed2..0000000 --- a/vendor/symfony/console/Event/ConsoleSignalEvent.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author marie - */ -final class ConsoleSignalEvent extends ConsoleEvent -{ - private $handlingSignal; - - public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal) - { - parent::__construct($command, $input, $output); - $this->handlingSignal = $handlingSignal; - } - - public function getHandlingSignal(): int - { - return $this->handlingSignal; - } -} diff --git a/vendor/symfony/console/Event/ConsoleTerminateEvent.php b/vendor/symfony/console/Event/ConsoleTerminateEvent.php deleted file mode 100644 index 190038d..0000000 --- a/vendor/symfony/console/Event/ConsoleTerminateEvent.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Allows to manipulate the exit code of a command after its execution. - * - * @author Francesco Levorato - */ -final class ConsoleTerminateEvent extends ConsoleEvent -{ - private $exitCode; - - public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode) - { - parent::__construct($command, $input, $output); - - $this->setExitCode($exitCode); - } - - public function setExitCode(int $exitCode): void - { - $this->exitCode = $exitCode; - } - - public function getExitCode(): int - { - return $this->exitCode; - } -} diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php deleted file mode 100644 index 897d985..0000000 --- a/vendor/symfony/console/EventListener/ErrorListener.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * @author James Halsall - * @author Robin Chalas - */ -class ErrorListener implements EventSubscriberInterface -{ - private $logger; - - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger; - } - - public function onConsoleError(ConsoleErrorEvent $event) - { - if (null === $this->logger) { - return; - } - - $error = $event->getError(); - - if (!$inputString = $this->getInputString($event)) { - $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]); - - return; - } - - $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); - } - - public function onConsoleTerminate(ConsoleTerminateEvent $event) - { - if (null === $this->logger) { - return; - } - - $exitCode = $event->getExitCode(); - - if (0 === $exitCode) { - return; - } - - if (!$inputString = $this->getInputString($event)) { - $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]); - - return; - } - - $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]); - } - - public static function getSubscribedEvents() - { - return [ - ConsoleEvents::ERROR => ['onConsoleError', -128], - ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128], - ]; - } - - private static function getInputString(ConsoleEvent $event): ?string - { - $commandName = $event->getCommand() ? $event->getCommand()->getName() : null; - $input = $event->getInput(); - - if (method_exists($input, '__toString')) { - if ($commandName) { - return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input); - } - - return (string) $input; - } - - return $commandName; - } -} diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php deleted file mode 100644 index 910ae19..0000000 --- a/vendor/symfony/console/Exception/CommandNotFoundException.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect command name typed in the console. - * - * @author Jérôme Tamarelle - */ -class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface -{ - private $alternatives; - - /** - * @param string $message Exception message to throw - * @param string[] $alternatives List of similar defined names - * @param int $code Exception code - * @param \Throwable|null $previous Previous exception used for the exception chaining - */ - public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->alternatives = $alternatives; - } - - /** - * @return string[] - */ - public function getAlternatives() - { - return $this->alternatives; - } -} diff --git a/vendor/symfony/console/Exception/ExceptionInterface.php b/vendor/symfony/console/Exception/ExceptionInterface.php deleted file mode 100644 index 1624e13..0000000 --- a/vendor/symfony/console/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * ExceptionInterface. - * - * @author Jérôme Tamarelle - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/console/Exception/InvalidArgumentException.php b/vendor/symfony/console/Exception/InvalidArgumentException.php deleted file mode 100644 index 07cc0b6..0000000 --- a/vendor/symfony/console/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/console/Exception/InvalidOptionException.php b/vendor/symfony/console/Exception/InvalidOptionException.php deleted file mode 100644 index b2eec61..0000000 --- a/vendor/symfony/console/Exception/InvalidOptionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect option name typed in the console. - * - * @author Jérôme Tamarelle - */ -class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/console/Exception/LogicException.php b/vendor/symfony/console/Exception/LogicException.php deleted file mode 100644 index fc37b8d..0000000 --- a/vendor/symfony/console/Exception/LogicException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/console/Exception/MissingInputException.php b/vendor/symfony/console/Exception/MissingInputException.php deleted file mode 100644 index 04f02ad..0000000 --- a/vendor/symfony/console/Exception/MissingInputException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents failure to read input from stdin. - * - * @author Gabriel Ostrolucký - */ -class MissingInputException extends RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/console/Exception/NamespaceNotFoundException.php b/vendor/symfony/console/Exception/NamespaceNotFoundException.php deleted file mode 100644 index dd16e45..0000000 --- a/vendor/symfony/console/Exception/NamespaceNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * Represents an incorrect namespace typed in the console. - * - * @author Pierre du Plessis - */ -class NamespaceNotFoundException extends CommandNotFoundException -{ -} diff --git a/vendor/symfony/console/Exception/RuntimeException.php b/vendor/symfony/console/Exception/RuntimeException.php deleted file mode 100644 index 51d7d80..0000000 --- a/vendor/symfony/console/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Exception; - -/** - * @author Jérôme Tamarelle - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/console/Formatter/NullOutputFormatter.php b/vendor/symfony/console/Formatter/NullOutputFormatter.php deleted file mode 100644 index d770e14..0000000 --- a/vendor/symfony/console/Formatter/NullOutputFormatter.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * @author Tien Xuan Vo - */ -final class NullOutputFormatter implements OutputFormatterInterface -{ - private $style; - - /** - * {@inheritdoc} - */ - public function format(?string $message): ?string - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getStyle(string $name): OutputFormatterStyleInterface - { - // to comply with the interface we must return a OutputFormatterStyleInterface - return $this->style ?? $this->style = new NullOutputFormatterStyle(); - } - - /** - * {@inheritdoc} - */ - public function hasStyle(string $name): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isDecorated(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated): void - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function setStyle(string $name, OutputFormatterStyleInterface $style): void - { - // do nothing - } -} diff --git a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php deleted file mode 100644 index bfd0afe..0000000 --- a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * @author Tien Xuan Vo - */ -final class NullOutputFormatterStyle implements OutputFormatterStyleInterface -{ - /** - * {@inheritdoc} - */ - public function apply(string $text): string - { - return $text; - } - - /** - * {@inheritdoc} - */ - public function setBackground(string $color = null): void - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function setForeground(string $color = null): void - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function setOption(string $option): void - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function setOptions(array $options): void - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function unsetOption(string $option): void - { - // do nothing - } -} diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php deleted file mode 100644 index 603e5dc..0000000 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * Formatter class for console output. - * - * @author Konstantin Kudryashov - * @author Roland Franssen - */ -class OutputFormatter implements WrappableOutputFormatterInterface -{ - private $decorated; - private $styles = []; - private $styleStack; - - public function __clone() - { - $this->styleStack = clone $this->styleStack; - foreach ($this->styles as $key => $value) { - $this->styles[$key] = clone $value; - } - } - - /** - * Escapes "<" and ">" special chars in given text. - * - * @return string - */ - public static function escape(string $text) - { - $text = preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text); - - return self::escapeTrailingBackslash($text); - } - - /** - * Escapes trailing "\" in given text. - * - * @internal - */ - public static function escapeTrailingBackslash(string $text): string - { - if (str_ends_with($text, '\\')) { - $len = \strlen($text); - $text = rtrim($text, '\\'); - $text = str_replace("\0", '', $text); - $text .= str_repeat("\0", $len - \strlen($text)); - } - - return $text; - } - - /** - * Initializes console output formatter. - * - * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances - */ - public function __construct(bool $decorated = false, array $styles = []) - { - $this->decorated = $decorated; - - $this->setStyle('error', new OutputFormatterStyle('white', 'red')); - $this->setStyle('info', new OutputFormatterStyle('green')); - $this->setStyle('comment', new OutputFormatterStyle('yellow')); - $this->setStyle('question', new OutputFormatterStyle('black', 'cyan')); - - foreach ($styles as $name => $style) { - $this->setStyle($name, $style); - } - - $this->styleStack = new OutputFormatterStyleStack(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated) - { - $this->decorated = $decorated; - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->decorated; - } - - /** - * {@inheritdoc} - */ - public function setStyle(string $name, OutputFormatterStyleInterface $style) - { - $this->styles[strtolower($name)] = $style; - } - - /** - * {@inheritdoc} - */ - public function hasStyle(string $name) - { - return isset($this->styles[strtolower($name)]); - } - - /** - * {@inheritdoc} - */ - public function getStyle(string $name) - { - if (!$this->hasStyle($name)) { - throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name)); - } - - return $this->styles[strtolower($name)]; - } - - /** - * {@inheritdoc} - */ - public function format(?string $message) - { - return $this->formatAndWrap($message, 0); - } - - /** - * {@inheritdoc} - */ - public function formatAndWrap(?string $message, int $width) - { - if (null === $message) { - return ''; - } - - $offset = 0; - $output = ''; - $openTagRegex = '[a-z](?:[^\\\\<>]*+ | \\\\.)*'; - $closeTagRegex = '[a-z][^<>]*+'; - $currentLineLength = 0; - preg_match_all("#<(($openTagRegex) | /($closeTagRegex)?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE); - foreach ($matches[0] as $i => $match) { - $pos = $match[1]; - $text = $match[0]; - - if (0 != $pos && '\\' == $message[$pos - 1]) { - continue; - } - - // add the text up to the next tag - $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset), $output, $width, $currentLineLength); - $offset = $pos + \strlen($text); - - // opening tag? - if ($open = '/' != $text[1]) { - $tag = $matches[1][$i][0]; - } else { - $tag = $matches[3][$i][0] ?? ''; - } - - if (!$open && !$tag) { - // - $this->styleStack->pop(); - } elseif (null === $style = $this->createStyleFromString($tag)) { - $output .= $this->applyCurrentStyle($text, $output, $width, $currentLineLength); - } elseif ($open) { - $this->styleStack->push($style); - } else { - $this->styleStack->pop($style); - } - } - - $output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength); - - return strtr($output, ["\0" => '\\', '\\<' => '<', '\\>' => '>']); - } - - /** - * @return OutputFormatterStyleStack - */ - public function getStyleStack() - { - return $this->styleStack; - } - - /** - * Tries to create new style instance from string. - */ - private function createStyleFromString(string $string): ?OutputFormatterStyleInterface - { - if (isset($this->styles[$string])) { - return $this->styles[$string]; - } - - if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) { - return null; - } - - $style = new OutputFormatterStyle(); - foreach ($matches as $match) { - array_shift($match); - $match[0] = strtolower($match[0]); - - if ('fg' == $match[0]) { - $style->setForeground(strtolower($match[1])); - } elseif ('bg' == $match[0]) { - $style->setBackground(strtolower($match[1])); - } elseif ('href' === $match[0]) { - $url = preg_replace('{\\\\([<>])}', '$1', $match[1]); - $style->setHref($url); - } elseif ('options' === $match[0]) { - preg_match_all('([^,;]+)', strtolower($match[1]), $options); - $options = array_shift($options); - foreach ($options as $option) { - $style->setOption($option); - } - } else { - return null; - } - } - - return $style; - } - - /** - * Applies current style from stack to text, if must be applied. - */ - private function applyCurrentStyle(string $text, string $current, int $width, int &$currentLineLength): string - { - if ('' === $text) { - return ''; - } - - if (!$width) { - return $this->isDecorated() ? $this->styleStack->getCurrent()->apply($text) : $text; - } - - if (!$currentLineLength && '' !== $current) { - $text = ltrim($text); - } - - if ($currentLineLength) { - $prefix = substr($text, 0, $i = $width - $currentLineLength)."\n"; - $text = substr($text, $i); - } else { - $prefix = ''; - } - - preg_match('~(\\n)$~', $text, $matches); - $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text); - $text = rtrim($text, "\n").($matches[1] ?? ''); - - if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) { - $text = "\n".$text; - } - - $lines = explode("\n", $text); - - foreach ($lines as $line) { - $currentLineLength += \strlen($line); - if ($width <= $currentLineLength) { - $currentLineLength = 0; - } - } - - if ($this->isDecorated()) { - foreach ($lines as $i => $line) { - $lines[$i] = $this->styleStack->getCurrent()->apply($line); - } - } - - return implode("\n", $lines); - } -} diff --git a/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Formatter/OutputFormatterInterface.php deleted file mode 100644 index 0b5f839..0000000 --- a/vendor/symfony/console/Formatter/OutputFormatterInterface.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter interface for console output. - * - * @author Konstantin Kudryashov - */ -interface OutputFormatterInterface -{ - /** - * Sets the decorated flag. - */ - public function setDecorated(bool $decorated); - - /** - * Whether the output will decorate messages. - * - * @return bool - */ - public function isDecorated(); - - /** - * Sets a new style. - */ - public function setStyle(string $name, OutputFormatterStyleInterface $style); - - /** - * Checks if output formatter has style with specified name. - * - * @return bool - */ - public function hasStyle(string $name); - - /** - * Gets style options from style with specified name. - * - * @return OutputFormatterStyleInterface - * - * @throws \InvalidArgumentException When style isn't defined - */ - public function getStyle(string $name); - - /** - * Formats a message according to the given styles. - * - * @return string|null - */ - public function format(?string $message); -} diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php deleted file mode 100644 index 0fb36ac..0000000 --- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Color; - -/** - * Formatter style class for defining styles. - * - * @author Konstantin Kudryashov - */ -class OutputFormatterStyle implements OutputFormatterStyleInterface -{ - private $color; - private $foreground; - private $background; - private $options; - private $href; - private $handlesHrefGracefully; - - /** - * Initializes output formatter style. - * - * @param string|null $foreground The style foreground color name - * @param string|null $background The style background color name - */ - public function __construct(string $foreground = null, string $background = null, array $options = []) - { - $this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options); - } - - /** - * {@inheritdoc} - */ - public function setForeground(string $color = null) - { - $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options); - } - - /** - * {@inheritdoc} - */ - public function setBackground(string $color = null) - { - $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options); - } - - public function setHref(string $url): void - { - $this->href = $url; - } - - /** - * {@inheritdoc} - */ - public function setOption(string $option) - { - $this->options[] = $option; - $this->color = new Color($this->foreground, $this->background, $this->options); - } - - /** - * {@inheritdoc} - */ - public function unsetOption(string $option) - { - $pos = array_search($option, $this->options); - if (false !== $pos) { - unset($this->options[$pos]); - } - - $this->color = new Color($this->foreground, $this->background, $this->options); - } - - /** - * {@inheritdoc} - */ - public function setOptions(array $options) - { - $this->color = new Color($this->foreground, $this->background, $this->options = $options); - } - - /** - * {@inheritdoc} - */ - public function apply(string $text) - { - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (null !== $this->href && $this->handlesHrefGracefully) { - $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\"; - } - - return $this->color->apply($text); - } -} diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php deleted file mode 100644 index b30560d..0000000 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter style interface for defining styles. - * - * @author Konstantin Kudryashov - */ -interface OutputFormatterStyleInterface -{ - /** - * Sets style foreground color. - */ - public function setForeground(string $color = null); - - /** - * Sets style background color. - */ - public function setBackground(string $color = null); - - /** - * Sets some specific style option. - */ - public function setOption(string $option); - - /** - * Unsets some specific style option. - */ - public function unsetOption(string $option); - - /** - * Sets multiple style options at once. - */ - public function setOptions(array $options); - - /** - * Applies the style to a given text. - * - * @return string - */ - public function apply(string $text); -} diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php deleted file mode 100644 index fc48dc0..0000000 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Jean-François Simon - */ -class OutputFormatterStyleStack implements ResetInterface -{ - /** - * @var OutputFormatterStyleInterface[] - */ - private $styles; - - private $emptyStyle; - - public function __construct(OutputFormatterStyleInterface $emptyStyle = null) - { - $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle(); - $this->reset(); - } - - /** - * Resets stack (ie. empty internal arrays). - */ - public function reset() - { - $this->styles = []; - } - - /** - * Pushes a style in the stack. - */ - public function push(OutputFormatterStyleInterface $style) - { - $this->styles[] = $style; - } - - /** - * Pops a style from the stack. - * - * @return OutputFormatterStyleInterface - * - * @throws InvalidArgumentException When style tags incorrectly nested - */ - public function pop(OutputFormatterStyleInterface $style = null) - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - if (null === $style) { - return array_pop($this->styles); - } - - foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { - if ($style->apply('') === $stackedStyle->apply('')) { - $this->styles = \array_slice($this->styles, 0, $index); - - return $stackedStyle; - } - } - - throw new InvalidArgumentException('Incorrectly nested style tag found.'); - } - - /** - * Computes current style with stacks top codes. - * - * @return OutputFormatterStyle - */ - public function getCurrent() - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - return $this->styles[\count($this->styles) - 1]; - } - - /** - * @return $this - */ - public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) - { - $this->emptyStyle = $emptyStyle; - - return $this; - } - - /** - * @return OutputFormatterStyleInterface - */ - public function getEmptyStyle() - { - return $this->emptyStyle; - } -} diff --git a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php deleted file mode 100644 index 42319ee..0000000 --- a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Formatter; - -/** - * Formatter interface for console output that supports word wrapping. - * - * @author Roland Franssen - */ -interface WrappableOutputFormatterInterface extends OutputFormatterInterface -{ - /** - * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping). - */ - public function formatAndWrap(?string $message, int $width); -} diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php deleted file mode 100644 index e258ba0..0000000 --- a/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * Helps outputting debug information when running an external program from a command. - * - * An external program can be a Process, an HTTP request, or anything else. - * - * @author Fabien Potencier - */ -class DebugFormatterHelper extends Helper -{ - private const COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; - private $started = []; - private $count = -1; - - /** - * Starts a debug formatting session. - * - * @return string - */ - public function start(string $id, string $message, string $prefix = 'RUN') - { - $this->started[$id] = ['border' => ++$this->count % \count(self::COLORS)]; - - return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); - } - - /** - * Adds progress to a formatting session. - * - * @return string - */ - public function progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR') - { - $message = ''; - - if ($error) { - if (isset($this->started[$id]['out'])) { - $message .= "\n"; - unset($this->started[$id]['out']); - } - if (!isset($this->started[$id]['err'])) { - $message .= sprintf('%s %s ', $this->getBorder($id), $errorPrefix); - $this->started[$id]['err'] = true; - } - - $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $errorPrefix), $buffer); - } else { - if (isset($this->started[$id]['err'])) { - $message .= "\n"; - unset($this->started[$id]['err']); - } - if (!isset($this->started[$id]['out'])) { - $message .= sprintf('%s %s ', $this->getBorder($id), $prefix); - $this->started[$id]['out'] = true; - } - - $message .= str_replace("\n", sprintf("\n%s %s ", $this->getBorder($id), $prefix), $buffer); - } - - return $message; - } - - /** - * Stops a formatting session. - * - * @return string - */ - public function stop(string $id, string $message, bool $successful, string $prefix = 'RES') - { - $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : ''; - - if ($successful) { - return sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); - } - - $message = sprintf("%s%s %s %s\n", $trailingEOL, $this->getBorder($id), $prefix, $message); - - unset($this->started[$id]['out'], $this->started[$id]['err']); - - return $message; - } - - private function getBorder(string $id): string - { - return sprintf(' ', self::COLORS[$this->started[$id]['border']]); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'debug_formatter'; - } -} diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php deleted file mode 100644 index af85e9c..0000000 --- a/vendor/symfony/console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Descriptor\JsonDescriptor; -use Symfony\Component\Console\Descriptor\MarkdownDescriptor; -use Symfony\Component\Console\Descriptor\TextDescriptor; -use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * This class adds helper method to describe objects in various formats. - * - * @author Jean-François Simon - */ -class DescriptorHelper extends Helper -{ - /** - * @var DescriptorInterface[] - */ - private $descriptors = []; - - public function __construct() - { - $this - ->register('txt', new TextDescriptor()) - ->register('xml', new XmlDescriptor()) - ->register('json', new JsonDescriptor()) - ->register('md', new MarkdownDescriptor()) - ; - } - - /** - * Describes an object if supported. - * - * Available options are: - * * format: string, the output format name - * * raw_text: boolean, sets output type as raw - * - * @throws InvalidArgumentException when the given format is not supported - */ - public function describe(OutputInterface $output, ?object $object, array $options = []) - { - $options = array_merge([ - 'raw_text' => false, - 'format' => 'txt', - ], $options); - - if (!isset($this->descriptors[$options['format']])) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); - } - - $descriptor = $this->descriptors[$options['format']]; - $descriptor->describe($output, $object, $options); - } - - /** - * Registers a descriptor. - * - * @return $this - */ - public function register(string $format, DescriptorInterface $descriptor) - { - $this->descriptors[$format] = $descriptor; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'descriptor'; - } - - public function getFormats(): array - { - return array_keys($this->descriptors); - } -} diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php deleted file mode 100644 index b013b6c..0000000 --- a/vendor/symfony/console/Helper/Dumper.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * @author Roland Franssen - */ -final class Dumper -{ - private $output; - private $dumper; - private $cloner; - private $handler; - - public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) - { - $this->output = $output; - $this->dumper = $dumper; - $this->cloner = $cloner; - - if (class_exists(CliDumper::class)) { - $this->handler = function ($var): string { - $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); - $dumper->setColors($this->output->isDecorated()); - - return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true)); - }; - } else { - $this->handler = function ($var): string { - switch (true) { - case null === $var: - return 'null'; - case true === $var: - return 'true'; - case false === $var: - return 'false'; - case \is_string($var): - return '"'.$var.'"'; - default: - return rtrim(print_r($var, true)); - } - }; - } - } - - public function __invoke($var): string - { - return ($this->handler)($var); - } -} diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php deleted file mode 100644 index 92d8dc7..0000000 --- a/vendor/symfony/console/Helper/FormatterHelper.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatter; - -/** - * The Formatter class provides helpers to format messages. - * - * @author Fabien Potencier - */ -class FormatterHelper extends Helper -{ - /** - * Formats a message within a section. - * - * @return string - */ - public function formatSection(string $section, string $message, string $style = 'info') - { - return sprintf('<%s>[%s] %s', $style, $section, $style, $message); - } - - /** - * Formats a message as a block of text. - * - * @param string|array $messages The message to write in the block - * - * @return string - */ - public function formatBlock($messages, string $style, bool $large = false) - { - if (!\is_array($messages)) { - $messages = [$messages]; - } - - $len = 0; - $lines = []; - foreach ($messages as $message) { - $message = OutputFormatter::escape($message); - $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); - $len = max(self::width($message) + ($large ? 4 : 2), $len); - } - - $messages = $large ? [str_repeat(' ', $len)] : []; - for ($i = 0; isset($lines[$i]); ++$i) { - $messages[] = $lines[$i].str_repeat(' ', $len - self::width($lines[$i])); - } - if ($large) { - $messages[] = str_repeat(' ', $len); - } - - for ($i = 0; isset($messages[$i]); ++$i) { - $messages[$i] = sprintf('<%s>%s', $style, $messages[$i], $style); - } - - return implode("\n", $messages); - } - - /** - * Truncates a message to the given length. - * - * @return string - */ - public function truncate(string $message, int $length, string $suffix = '...') - { - $computedLength = $length - self::width($suffix); - - if ($computedLength > self::width($message)) { - return $message; - } - - return self::substr($message, 0, $length).$suffix; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'formatter'; - } -} diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php deleted file mode 100644 index 50f51c7..0000000 --- a/vendor/symfony/console/Helper/Helper.php +++ /dev/null @@ -1,178 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\String\UnicodeString; - -/** - * Helper is the base class for all helper classes. - * - * @author Fabien Potencier - */ -abstract class Helper implements HelperInterface -{ - protected $helperSet = null; - - /** - * {@inheritdoc} - */ - public function setHelperSet(HelperSet $helperSet = null) - { - $this->helperSet = $helperSet; - } - - /** - * {@inheritdoc} - */ - public function getHelperSet() - { - return $this->helperSet; - } - - /** - * Returns the length of a string, using mb_strwidth if it is available. - * - * @deprecated since Symfony 5.3 - * - * @return int - */ - public static function strlen(?string $string) - { - trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::width() or Helper::length() instead.', __METHOD__); - - return self::width($string); - } - - /** - * Returns the width of a string, using mb_strwidth if it is available. - * The width is how many characters positions the string will use. - */ - public static function width(?string $string): int - { - $string ?? $string = ''; - - if (preg_match('//u', $string)) { - return (new UnicodeString($string))->width(false); - } - - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return \strlen($string); - } - - return mb_strwidth($string, $encoding); - } - - /** - * Returns the length of a string, using mb_strlen if it is available. - * The length is related to how many bytes the string will use. - */ - public static function length(?string $string): int - { - $string ?? $string = ''; - - if (preg_match('//u', $string)) { - return (new UnicodeString($string))->length(); - } - - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return \strlen($string); - } - - return mb_strlen($string, $encoding); - } - - /** - * Returns the subset of a string, using mb_substr if it is available. - * - * @return string - */ - public static function substr(?string $string, int $from, int $length = null) - { - $string ?? $string = ''; - - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return substr($string, $from, $length); - } - - return mb_substr($string, $from, $length, $encoding); - } - - public static function formatTime($secs) - { - static $timeFormats = [ - [0, '< 1 sec'], - [1, '1 sec'], - [2, 'secs', 1], - [60, '1 min'], - [120, 'mins', 60], - [3600, '1 hr'], - [7200, 'hrs', 3600], - [86400, '1 day'], - [172800, 'days', 86400], - ]; - - foreach ($timeFormats as $index => $format) { - if ($secs >= $format[0]) { - if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) - || $index == \count($timeFormats) - 1 - ) { - if (2 == \count($format)) { - return $format[1]; - } - - return floor($secs / $format[2]).' '.$format[1]; - } - } - } - } - - public static function formatMemory(int $memory) - { - if ($memory >= 1024 * 1024 * 1024) { - return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024); - } - - if ($memory >= 1024 * 1024) { - return sprintf('%.1f MiB', $memory / 1024 / 1024); - } - - if ($memory >= 1024) { - return sprintf('%d KiB', $memory / 1024); - } - - return sprintf('%d B', $memory); - } - - /** - * @deprecated since Symfony 5.3 - */ - public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string) - { - trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::removeDecoration() instead.', __METHOD__); - - return self::width(self::removeDecoration($formatter, $string)); - } - - public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string) - { - $isDecorated = $formatter->isDecorated(); - $formatter->setDecorated(false); - // remove <...> formatting - $string = $formatter->format($string ?? ''); - // remove already formatted characters - $string = preg_replace("/\033\[[^m]*m/", '', $string ?? ''); - $formatter->setDecorated($isDecorated); - - return $string; - } -} diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php deleted file mode 100644 index fc952b4..0000000 --- a/vendor/symfony/console/Helper/HelperInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * HelperInterface is the interface all helpers must implement. - * - * @author Fabien Potencier - */ -interface HelperInterface -{ - /** - * Sets the helper set associated with this helper. - */ - public function setHelperSet(HelperSet $helperSet = null); - - /** - * Gets the helper set associated with this helper. - * - * @return HelperSet|null - */ - public function getHelperSet(); - - /** - * Returns the canonical name of this helper. - * - * @return string - */ - public function getName(); -} diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php deleted file mode 100644 index 719762d..0000000 --- a/vendor/symfony/console/Helper/HelperSet.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * HelperSet represents a set of helpers to be used with a command. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class HelperSet implements \IteratorAggregate -{ - /** @var array */ - private $helpers = []; - private $command; - - /** - * @param Helper[] $helpers An array of helper - */ - public function __construct(array $helpers = []) - { - foreach ($helpers as $alias => $helper) { - $this->set($helper, \is_int($alias) ? null : $alias); - } - } - - public function set(HelperInterface $helper, string $alias = null) - { - $this->helpers[$helper->getName()] = $helper; - if (null !== $alias) { - $this->helpers[$alias] = $helper; - } - - $helper->setHelperSet($this); - } - - /** - * Returns true if the helper if defined. - * - * @return bool - */ - public function has(string $name) - { - return isset($this->helpers[$name]); - } - - /** - * Gets a helper value. - * - * @return HelperInterface - * - * @throws InvalidArgumentException if the helper is not defined - */ - public function get(string $name) - { - if (!$this->has($name)) { - throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); - } - - return $this->helpers[$name]; - } - - /** - * @deprecated since Symfony 5.4 - */ - public function setCommand(Command $command = null) - { - trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__); - - $this->command = $command; - } - - /** - * Gets the command associated with this helper set. - * - * @return Command - * - * @deprecated since Symfony 5.4 - */ - public function getCommand() - { - trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__); - - return $this->command; - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->helpers); - } -} diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php deleted file mode 100644 index 0d0dba2..0000000 --- a/vendor/symfony/console/Helper/InputAwareHelper.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Input\InputInterface; - -/** - * An implementation of InputAwareInterface for Helpers. - * - * @author Wouter J - */ -abstract class InputAwareHelper extends Helper implements InputAwareInterface -{ - protected $input; - - /** - * {@inheritdoc} - */ - public function setInput(InputInterface $input) - { - $this->input = $input; - } -} diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php deleted file mode 100644 index 4ea3d72..0000000 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\Process; - -/** - * The ProcessHelper class provides helpers to run external processes. - * - * @author Fabien Potencier - * - * @final - */ -class ProcessHelper extends Helper -{ - /** - * Runs an external process. - * - * @param array|Process $cmd An instance of Process or an array of the command and arguments - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - */ - public function run(OutputInterface $output, $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process - { - if (!class_exists(Process::class)) { - throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".'); - } - - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - if ($cmd instanceof Process) { - $cmd = [$cmd]; - } - - if (!\is_array($cmd)) { - throw new \TypeError(sprintf('The "command" argument of "%s()" must be an array or a "%s" instance, "%s" given.', __METHOD__, Process::class, get_debug_type($cmd))); - } - - if (\is_string($cmd[0] ?? null)) { - $process = new Process($cmd); - $cmd = []; - } elseif (($cmd[0] ?? null) instanceof Process) { - $process = $cmd[0]; - unset($cmd[0]); - } else { - throw new \InvalidArgumentException(sprintf('Invalid command provided to "%s()": the command should be an array whose first element is either the path to the binary to run or a "Process" object.', __METHOD__)); - } - - if ($verbosity <= $output->getVerbosity()) { - $output->write($formatter->start(spl_object_hash($process), $this->escapeString($process->getCommandLine()))); - } - - if ($output->isDebug()) { - $callback = $this->wrapCallback($output, $process, $callback); - } - - $process->run($callback, $cmd); - - if ($verbosity <= $output->getVerbosity()) { - $message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode()); - $output->write($formatter->stop(spl_object_hash($process), $message, $process->isSuccessful())); - } - - if (!$process->isSuccessful() && null !== $error) { - $output->writeln(sprintf('%s', $this->escapeString($error))); - } - - return $process; - } - - /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @param array|Process $cmd An instance of Process or a command to run - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @throws ProcessFailedException - * - * @see run() - */ - public function mustRun(OutputInterface $output, $cmd, string $error = null, callable $callback = null): Process - { - $process = $this->run($output, $cmd, $error, $callback); - - if (!$process->isSuccessful()) { - throw new ProcessFailedException($process); - } - - return $process; - } - - /** - * Wraps a Process callback to add debugging output. - */ - public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null): callable - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - return function ($type, $buffer) use ($output, $process, $callback, $formatter) { - $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); - - if (null !== $callback) { - $callback($type, $buffer); - } - }; - } - - private function escapeString(string $str): string - { - return str_replace('<', '\\<', $str); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'process'; - } -} diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php deleted file mode 100644 index b1fb213..0000000 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ /dev/null @@ -1,611 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Cursor; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Terminal; - -/** - * The ProgressBar provides helpers to display progress output. - * - * @author Fabien Potencier - * @author Chris Jones - */ -final class ProgressBar -{ - public const FORMAT_VERBOSE = 'verbose'; - public const FORMAT_VERY_VERBOSE = 'very_verbose'; - public const FORMAT_DEBUG = 'debug'; - public const FORMAT_NORMAL = 'normal'; - - private const FORMAT_VERBOSE_NOMAX = 'verbose_nomax'; - private const FORMAT_VERY_VERBOSE_NOMAX = 'very_verbose_nomax'; - private const FORMAT_DEBUG_NOMAX = 'debug_nomax'; - private const FORMAT_NORMAL_NOMAX = 'normal_nomax'; - - private $barWidth = 28; - private $barChar; - private $emptyBarChar = '-'; - private $progressChar = '>'; - private $format; - private $internalFormat; - private $redrawFreq = 1; - private $writeCount; - private $lastWriteTime; - private $minSecondsBetweenRedraws = 0; - private $maxSecondsBetweenRedraws = 1; - private $output; - private $step = 0; - private $max; - private $startTime; - private $stepWidth; - private $percent = 0.0; - private $formatLineCount; - private $messages = []; - private $overwrite = true; - private $terminal; - private $previousMessage; - private $cursor; - - private static $formatters; - private static $formats; - - /** - * @param int $max Maximum steps (0 if unknown) - */ - public function __construct(OutputInterface $output, int $max = 0, float $minSecondsBetweenRedraws = 1 / 25) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $this->output = $output; - $this->setMaxSteps($max); - $this->terminal = new Terminal(); - - if (0 < $minSecondsBetweenRedraws) { - $this->redrawFreq = null; - $this->minSecondsBetweenRedraws = $minSecondsBetweenRedraws; - } - - if (!$this->output->isDecorated()) { - // disable overwrite when output does not support ANSI codes. - $this->overwrite = false; - - // set a reasonable redraw frequency so output isn't flooded - $this->redrawFreq = null; - } - - $this->startTime = time(); - $this->cursor = new Cursor($output); - } - - /** - * Sets a placeholder formatter for a given name. - * - * This method also allow you to override an existing placeholder. - * - * @param string $name The placeholder name (including the delimiter char like %) - * @param callable $callable A PHP callable - */ - public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - self::$formatters[$name] = $callable; - } - - /** - * Gets the placeholder formatter for a given name. - * - * @param string $name The placeholder name (including the delimiter char like %) - */ - public static function getPlaceholderFormatterDefinition(string $name): ?callable - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - return self::$formatters[$name] ?? null; - } - - /** - * Sets a format for a given name. - * - * This method also allow you to override an existing format. - * - * @param string $name The format name - * @param string $format A format string - */ - public static function setFormatDefinition(string $name, string $format): void - { - if (!self::$formats) { - self::$formats = self::initFormats(); - } - - self::$formats[$name] = $format; - } - - /** - * Gets the format for a given name. - * - * @param string $name The format name - */ - public static function getFormatDefinition(string $name): ?string - { - if (!self::$formats) { - self::$formats = self::initFormats(); - } - - return self::$formats[$name] ?? null; - } - - /** - * Associates a text with a named placeholder. - * - * The text is displayed when the progress bar is rendered but only - * when the corresponding placeholder is part of the custom format line - * (by wrapping the name with %). - * - * @param string $message The text to associate with the placeholder - * @param string $name The name of the placeholder - */ - public function setMessage(string $message, string $name = 'message') - { - $this->messages[$name] = $message; - } - - public function getMessage(string $name = 'message') - { - return $this->messages[$name]; - } - - public function getStartTime(): int - { - return $this->startTime; - } - - public function getMaxSteps(): int - { - return $this->max; - } - - public function getProgress(): int - { - return $this->step; - } - - private function getStepWidth(): int - { - return $this->stepWidth; - } - - public function getProgressPercent(): float - { - return $this->percent; - } - - public function getBarOffset(): float - { - return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth); - } - - public function getEstimated(): float - { - if (!$this->step) { - return 0; - } - - return round((time() - $this->startTime) / $this->step * $this->max); - } - - public function getRemaining(): float - { - if (!$this->step) { - return 0; - } - - return round((time() - $this->startTime) / $this->step * ($this->max - $this->step)); - } - - public function setBarWidth(int $size) - { - $this->barWidth = max(1, $size); - } - - public function getBarWidth(): int - { - return $this->barWidth; - } - - public function setBarCharacter(string $char) - { - $this->barChar = $char; - } - - public function getBarCharacter(): string - { - return $this->barChar ?? ($this->max ? '=' : $this->emptyBarChar); - } - - public function setEmptyBarCharacter(string $char) - { - $this->emptyBarChar = $char; - } - - public function getEmptyBarCharacter(): string - { - return $this->emptyBarChar; - } - - public function setProgressCharacter(string $char) - { - $this->progressChar = $char; - } - - public function getProgressCharacter(): string - { - return $this->progressChar; - } - - public function setFormat(string $format) - { - $this->format = null; - $this->internalFormat = $format; - } - - /** - * Sets the redraw frequency. - * - * @param int|null $freq The frequency in steps - */ - public function setRedrawFrequency(?int $freq) - { - $this->redrawFreq = null !== $freq ? max(1, $freq) : null; - } - - public function minSecondsBetweenRedraws(float $seconds): void - { - $this->minSecondsBetweenRedraws = $seconds; - } - - public function maxSecondsBetweenRedraws(float $seconds): void - { - $this->maxSecondsBetweenRedraws = $seconds; - } - - /** - * Returns an iterator that will automatically update the progress bar when iterated. - * - * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable - */ - public function iterate(iterable $iterable, int $max = null): iterable - { - $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0)); - - foreach ($iterable as $key => $value) { - yield $key => $value; - - $this->advance(); - } - - $this->finish(); - } - - /** - * Starts the progress output. - * - * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged - */ - public function start(int $max = null) - { - $this->startTime = time(); - $this->step = 0; - $this->percent = 0.0; - - if (null !== $max) { - $this->setMaxSteps($max); - } - - $this->display(); - } - - /** - * Advances the progress output X steps. - * - * @param int $step Number of steps to advance - */ - public function advance(int $step = 1) - { - $this->setProgress($this->step + $step); - } - - /** - * Sets whether to overwrite the progressbar, false for new line. - */ - public function setOverwrite(bool $overwrite) - { - $this->overwrite = $overwrite; - } - - public function setProgress(int $step) - { - if ($this->max && $step > $this->max) { - $this->max = $step; - } elseif ($step < 0) { - $step = 0; - } - - $redrawFreq = $this->redrawFreq ?? (($this->max ?: 10) / 10); - $prevPeriod = (int) ($this->step / $redrawFreq); - $currPeriod = (int) ($step / $redrawFreq); - $this->step = $step; - $this->percent = $this->max ? (float) $this->step / $this->max : 0; - $timeInterval = microtime(true) - $this->lastWriteTime; - - // Draw regardless of other limits - if ($this->max === $step) { - $this->display(); - - return; - } - - // Throttling - if ($timeInterval < $this->minSecondsBetweenRedraws) { - return; - } - - // Draw each step period, but not too late - if ($prevPeriod !== $currPeriod || $timeInterval >= $this->maxSecondsBetweenRedraws) { - $this->display(); - } - } - - public function setMaxSteps(int $max) - { - $this->format = null; - $this->max = max(0, $max); - $this->stepWidth = $this->max ? Helper::width((string) $this->max) : 4; - } - - /** - * Finishes the progress output. - */ - public function finish(): void - { - if (!$this->max) { - $this->max = $this->step; - } - - if ($this->step === $this->max && !$this->overwrite) { - // prevent double 100% output - return; - } - - $this->setProgress($this->max); - } - - /** - * Outputs the current progress string. - */ - public function display(): void - { - if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { - return; - } - - if (null === $this->format) { - $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); - } - - $this->overwrite($this->buildLine()); - } - - /** - * Removes the progress bar from the current line. - * - * This is useful if you wish to write some output - * while a progress bar is running. - * Call display() to show the progress bar again. - */ - public function clear(): void - { - if (!$this->overwrite) { - return; - } - - if (null === $this->format) { - $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); - } - - $this->overwrite(''); - } - - private function setRealFormat(string $format) - { - // try to use the _nomax variant if available - if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) { - $this->format = self::getFormatDefinition($format.'_nomax'); - } elseif (null !== self::getFormatDefinition($format)) { - $this->format = self::getFormatDefinition($format); - } else { - $this->format = $format; - } - - $this->formatLineCount = substr_count($this->format, "\n"); - } - - /** - * Overwrites a previous message to the output. - */ - private function overwrite(string $message): void - { - if ($this->previousMessage === $message) { - return; - } - - $originalMessage = $message; - - if ($this->overwrite) { - if (null !== $this->previousMessage) { - if ($this->output instanceof ConsoleSectionOutput) { - $messageLines = explode("\n", $message); - $lineCount = \count($messageLines); - foreach ($messageLines as $messageLine) { - $messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine)); - if ($messageLineLength > $this->terminal->getWidth()) { - $lineCount += floor($messageLineLength / $this->terminal->getWidth()); - } - } - $this->output->clear($lineCount); - } else { - for ($i = 0; $i < $this->formatLineCount; ++$i) { - $this->cursor->moveToColumn(1); - $this->cursor->clearLine(); - $this->cursor->moveUp(); - } - - $this->cursor->moveToColumn(1); - $this->cursor->clearLine(); - } - } - } elseif ($this->step > 0) { - $message = \PHP_EOL.$message; - } - - $this->previousMessage = $originalMessage; - $this->lastWriteTime = microtime(true); - - $this->output->write($message); - ++$this->writeCount; - } - - private function determineBestFormat(): string - { - switch ($this->output->getVerbosity()) { - // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - case OutputInterface::VERBOSITY_VERBOSE: - return $this->max ? self::FORMAT_VERBOSE : self::FORMAT_VERBOSE_NOMAX; - case OutputInterface::VERBOSITY_VERY_VERBOSE: - return $this->max ? self::FORMAT_VERY_VERBOSE : self::FORMAT_VERY_VERBOSE_NOMAX; - case OutputInterface::VERBOSITY_DEBUG: - return $this->max ? self::FORMAT_DEBUG : self::FORMAT_DEBUG_NOMAX; - default: - return $this->max ? self::FORMAT_NORMAL : self::FORMAT_NORMAL_NOMAX; - } - } - - private static function initPlaceholderFormatters(): array - { - return [ - 'bar' => function (self $bar, OutputInterface $output) { - $completeBars = $bar->getBarOffset(); - $display = str_repeat($bar->getBarCharacter(), $completeBars); - if ($completeBars < $bar->getBarWidth()) { - $emptyBars = $bar->getBarWidth() - $completeBars - Helper::length(Helper::removeDecoration($output->getFormatter(), $bar->getProgressCharacter())); - $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars); - } - - return $display; - }, - 'elapsed' => function (self $bar) { - return Helper::formatTime(time() - $bar->getStartTime()); - }, - 'remaining' => function (self $bar) { - if (!$bar->getMaxSteps()) { - throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); - } - - return Helper::formatTime($bar->getRemaining()); - }, - 'estimated' => function (self $bar) { - if (!$bar->getMaxSteps()) { - throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); - } - - return Helper::formatTime($bar->getEstimated()); - }, - 'memory' => function (self $bar) { - return Helper::formatMemory(memory_get_usage(true)); - }, - 'current' => function (self $bar) { - return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT); - }, - 'max' => function (self $bar) { - return $bar->getMaxSteps(); - }, - 'percent' => function (self $bar) { - return floor($bar->getProgressPercent() * 100); - }, - ]; - } - - private static function initFormats(): array - { - return [ - self::FORMAT_NORMAL => ' %current%/%max% [%bar%] %percent:3s%%', - self::FORMAT_NORMAL_NOMAX => ' %current% [%bar%]', - - self::FORMAT_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', - self::FORMAT_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%', - - self::FORMAT_VERY_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%', - self::FORMAT_VERY_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%', - - self::FORMAT_DEBUG => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', - self::FORMAT_DEBUG_NOMAX => ' %current% [%bar%] %elapsed:6s% %memory:6s%', - ]; - } - - private function buildLine(): string - { - $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; - $callback = function ($matches) { - if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { - $text = $formatter($this, $this->output); - } elseif (isset($this->messages[$matches[1]])) { - $text = $this->messages[$matches[1]]; - } else { - return $matches[0]; - } - - if (isset($matches[2])) { - $text = sprintf('%'.$matches[2], $text); - } - - return $text; - }; - $line = preg_replace_callback($regex, $callback, $this->format); - - // gets string length for each sub line with multiline format - $linesLength = array_map(function ($subLine) { - return Helper::width(Helper::removeDecoration($this->output->getFormatter(), rtrim($subLine, "\r"))); - }, explode("\n", $line)); - - $linesWidth = max($linesLength); - - $terminalWidth = $this->terminal->getWidth(); - if ($linesWidth <= $terminalWidth) { - return $line; - } - - $this->setBarWidth($this->barWidth - $linesWidth + $terminalWidth); - - return preg_replace_callback($regex, $callback, $this->format); - } -} diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php deleted file mode 100644 index 3482343..0000000 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Kevin Bond - */ -class ProgressIndicator -{ - private const FORMATS = [ - 'normal' => ' %indicator% %message%', - 'normal_no_ansi' => ' %message%', - - 'verbose' => ' %indicator% %message% (%elapsed:6s%)', - 'verbose_no_ansi' => ' %message% (%elapsed:6s%)', - - 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', - 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', - ]; - - private $output; - private $startTime; - private $format; - private $message; - private $indicatorValues; - private $indicatorCurrent; - private $indicatorChangeInterval; - private $indicatorUpdateTime; - private $started = false; - - /** - * @var array - */ - private static $formatters; - - /** - * @param int $indicatorChangeInterval Change interval in milliseconds - * @param array|null $indicatorValues Animated indicator characters - */ - public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null) - { - $this->output = $output; - - if (null === $format) { - $format = $this->determineBestFormat(); - } - - if (null === $indicatorValues) { - $indicatorValues = ['-', '\\', '|', '/']; - } - - $indicatorValues = array_values($indicatorValues); - - if (2 > \count($indicatorValues)) { - throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); - } - - $this->format = self::getFormatDefinition($format); - $this->indicatorChangeInterval = $indicatorChangeInterval; - $this->indicatorValues = $indicatorValues; - $this->startTime = time(); - } - - /** - * Sets the current indicator message. - */ - public function setMessage(?string $message) - { - $this->message = $message; - - $this->display(); - } - - /** - * Starts the indicator output. - */ - public function start(string $message) - { - if ($this->started) { - throw new LogicException('Progress indicator already started.'); - } - - $this->message = $message; - $this->started = true; - $this->startTime = time(); - $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval; - $this->indicatorCurrent = 0; - - $this->display(); - } - - /** - * Advances the indicator. - */ - public function advance() - { - if (!$this->started) { - throw new LogicException('Progress indicator has not yet been started.'); - } - - if (!$this->output->isDecorated()) { - return; - } - - $currentTime = $this->getCurrentTimeInMilliseconds(); - - if ($currentTime < $this->indicatorUpdateTime) { - return; - } - - $this->indicatorUpdateTime = $currentTime + $this->indicatorChangeInterval; - ++$this->indicatorCurrent; - - $this->display(); - } - - /** - * Finish the indicator with message. - * - * @param $message - */ - public function finish(string $message) - { - if (!$this->started) { - throw new LogicException('Progress indicator has not yet been started.'); - } - - $this->message = $message; - $this->display(); - $this->output->writeln(''); - $this->started = false; - } - - /** - * Gets the format for a given name. - * - * @return string|null - */ - public static function getFormatDefinition(string $name) - { - return self::FORMATS[$name] ?? null; - } - - /** - * Sets a placeholder formatter for a given name. - * - * This method also allow you to override an existing placeholder. - */ - public static function setPlaceholderFormatterDefinition(string $name, callable $callable) - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - self::$formatters[$name] = $callable; - } - - /** - * Gets the placeholder formatter for a given name (including the delimiter char like %). - * - * @return callable|null - */ - public static function getPlaceholderFormatterDefinition(string $name) - { - if (!self::$formatters) { - self::$formatters = self::initPlaceholderFormatters(); - } - - return self::$formatters[$name] ?? null; - } - - private function display() - { - if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { - return; - } - - $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) { - if ($formatter = self::getPlaceholderFormatterDefinition($matches[1])) { - return $formatter($this); - } - - return $matches[0]; - }, $this->format ?? '')); - } - - private function determineBestFormat(): string - { - switch ($this->output->getVerbosity()) { - // OutputInterface::VERBOSITY_QUIET: display is disabled anyway - case OutputInterface::VERBOSITY_VERBOSE: - return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi'; - case OutputInterface::VERBOSITY_VERY_VERBOSE: - case OutputInterface::VERBOSITY_DEBUG: - return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi'; - default: - return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi'; - } - } - - /** - * Overwrites a previous message to the output. - */ - private function overwrite(string $message) - { - if ($this->output->isDecorated()) { - $this->output->write("\x0D\x1B[2K"); - $this->output->write($message); - } else { - $this->output->writeln($message); - } - } - - private function getCurrentTimeInMilliseconds(): float - { - return round(microtime(true) * 1000); - } - - private static function initPlaceholderFormatters(): array - { - return [ - 'indicator' => function (self $indicator) { - return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; - }, - 'message' => function (self $indicator) { - return $indicator->message; - }, - 'elapsed' => function (self $indicator) { - return Helper::formatTime(time() - $indicator->startTime); - }, - 'memory' => function () { - return Helper::formatMemory(memory_get_usage(true)); - }, - ]; - } -} diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php deleted file mode 100644 index 842a618..0000000 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ /dev/null @@ -1,615 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Cursor; -use Symfony\Component\Console\Exception\MissingInputException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\StreamableInputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Terminal; -use function Symfony\Component\String\s; - -/** - * The QuestionHelper class provides helpers to interact with the user. - * - * @author Fabien Potencier - */ -class QuestionHelper extends Helper -{ - /** - * @var resource|null - */ - private $inputStream; - - private static $stty = true; - private static $stdinIsInteractive; - - /** - * Asks a question to the user. - * - * @return mixed The user answer - * - * @throws RuntimeException If there is no data to read in the input stream - */ - public function ask(InputInterface $input, OutputInterface $output, Question $question) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - if (!$input->isInteractive()) { - return $this->getDefaultAnswer($question); - } - - if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) { - $this->inputStream = $stream; - } - - try { - if (!$question->getValidator()) { - return $this->doAsk($output, $question); - } - - $interviewer = function () use ($output, $question) { - return $this->doAsk($output, $question); - }; - - return $this->validateAttempts($interviewer, $output, $question); - } catch (MissingInputException $exception) { - $input->setInteractive(false); - - if (null === $fallbackOutput = $this->getDefaultAnswer($question)) { - throw $exception; - } - - return $fallbackOutput; - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'question'; - } - - /** - * Prevents usage of stty. - */ - public static function disableStty() - { - self::$stty = false; - } - - /** - * Asks the question to the user. - * - * @return mixed - * - * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden - */ - private function doAsk(OutputInterface $output, Question $question) - { - $this->writePrompt($output, $question); - - $inputStream = $this->inputStream ?: \STDIN; - $autocomplete = $question->getAutocompleterCallback(); - - if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) { - $ret = false; - if ($question->isHidden()) { - try { - $hiddenResponse = $this->getHiddenResponse($output, $inputStream, $question->isTrimmable()); - $ret = $question->isTrimmable() ? trim($hiddenResponse) : $hiddenResponse; - } catch (RuntimeException $e) { - if (!$question->isHiddenFallback()) { - throw $e; - } - } - } - - if (false === $ret) { - $ret = $this->readInput($inputStream, $question); - if (false === $ret) { - throw new MissingInputException('Aborted.'); - } - if ($question->isTrimmable()) { - $ret = trim($ret); - } - } - } else { - $autocomplete = $this->autocomplete($output, $question, $inputStream, $autocomplete); - $ret = $question->isTrimmable() ? trim($autocomplete) : $autocomplete; - } - - if ($output instanceof ConsoleSectionOutput) { - $output->addContent($ret); - } - - $ret = \strlen($ret) > 0 ? $ret : $question->getDefault(); - - if ($normalizer = $question->getNormalizer()) { - return $normalizer($ret); - } - - return $ret; - } - - /** - * @return mixed - */ - private function getDefaultAnswer(Question $question) - { - $default = $question->getDefault(); - - if (null === $default) { - return $default; - } - - if ($validator = $question->getValidator()) { - return \call_user_func($question->getValidator(), $default); - } elseif ($question instanceof ChoiceQuestion) { - $choices = $question->getChoices(); - - if (!$question->isMultiselect()) { - return $choices[$default] ?? $default; - } - - $default = explode(',', $default); - foreach ($default as $k => $v) { - $v = $question->isTrimmable() ? trim($v) : $v; - $default[$k] = $choices[$v] ?? $v; - } - } - - return $default; - } - - /** - * Outputs the question prompt. - */ - protected function writePrompt(OutputInterface $output, Question $question) - { - $message = $question->getQuestion(); - - if ($question instanceof ChoiceQuestion) { - $output->writeln(array_merge([ - $question->getQuestion(), - ], $this->formatChoiceQuestionChoices($question, 'info'))); - - $message = $question->getPrompt(); - } - - $output->write($message); - } - - /** - * @return string[] - */ - protected function formatChoiceQuestionChoices(ChoiceQuestion $question, string $tag) - { - $messages = []; - - $maxWidth = max(array_map([__CLASS__, 'width'], array_keys($choices = $question->getChoices()))); - - foreach ($choices as $key => $value) { - $padding = str_repeat(' ', $maxWidth - self::width($key)); - - $messages[] = sprintf(" [<$tag>%s$padding] %s", $key, $value); - } - - return $messages; - } - - /** - * Outputs an error message. - */ - protected function writeError(OutputInterface $output, \Exception $error) - { - if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) { - $message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error'); - } else { - $message = ''.$error->getMessage().''; - } - - $output->writeln($message); - } - - /** - * Autocompletes a question. - * - * @param resource $inputStream - */ - private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string - { - $cursor = new Cursor($output, $inputStream); - - $fullChoice = ''; - $ret = ''; - - $i = 0; - $ofs = -1; - $matches = $autocomplete($ret); - $numMatches = \count($matches); - - $sttyMode = shell_exec('stty -g'); - $isStdin = 'php://stdin' === (stream_get_meta_data($inputStream)['uri'] ?? null); - $r = [$inputStream]; - $w = []; - - // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead) - shell_exec('stty -icanon -echo'); - - // Add highlighted text style - $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white')); - - // Read a keypress - while (!feof($inputStream)) { - while ($isStdin && 0 === @stream_select($r, $w, $w, 0, 100)) { - // Give signal handlers a chance to run - $r = [$inputStream]; - } - $c = fread($inputStream, 1); - - // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false. - if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) { - shell_exec('stty '.$sttyMode); - throw new MissingInputException('Aborted.'); - } elseif ("\177" === $c) { // Backspace Character - if (0 === $numMatches && 0 !== $i) { - --$i; - $cursor->moveLeft(s($fullChoice)->slice(-1)->width(false)); - - $fullChoice = self::substr($fullChoice, 0, $i); - } - - if (0 === $i) { - $ofs = -1; - $matches = $autocomplete($ret); - $numMatches = \count($matches); - } else { - $numMatches = 0; - } - - // Pop the last character off the end of our string - $ret = self::substr($ret, 0, $i); - } elseif ("\033" === $c) { - // Did we read an escape sequence? - $c .= fread($inputStream, 2); - - // A = Up Arrow. B = Down Arrow - if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) { - if ('A' === $c[2] && -1 === $ofs) { - $ofs = 0; - } - - if (0 === $numMatches) { - continue; - } - - $ofs += ('A' === $c[2]) ? -1 : 1; - $ofs = ($numMatches + $ofs) % $numMatches; - } - } elseif (\ord($c) < 32) { - if ("\t" === $c || "\n" === $c) { - if ($numMatches > 0 && -1 !== $ofs) { - $ret = (string) $matches[$ofs]; - // Echo out remaining chars for current match - $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)))); - $output->write($remainingCharacters); - $fullChoice .= $remainingCharacters; - $i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding); - - $matches = array_filter( - $autocomplete($ret), - function ($match) use ($ret) { - return '' === $ret || str_starts_with($match, $ret); - } - ); - $numMatches = \count($matches); - $ofs = -1; - } - - if ("\n" === $c) { - $output->write($c); - break; - } - - $numMatches = 0; - } - - continue; - } else { - if ("\x80" <= $c) { - $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]); - } - - $output->write($c); - $ret .= $c; - $fullChoice .= $c; - ++$i; - - $tempRet = $ret; - - if ($question instanceof ChoiceQuestion && $question->isMultiselect()) { - $tempRet = $this->mostRecentlyEnteredValue($fullChoice); - } - - $numMatches = 0; - $ofs = 0; - - foreach ($autocomplete($ret) as $value) { - // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) - if (str_starts_with($value, $tempRet)) { - $matches[$numMatches++] = $value; - } - } - } - - $cursor->clearLineAfter(); - - if ($numMatches > 0 && -1 !== $ofs) { - $cursor->savePosition(); - // Write highlighted text, complete the partially entered response - $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))); - $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).''); - $cursor->restorePosition(); - } - } - - // Reset stty so it behaves normally again - shell_exec('stty '.$sttyMode); - - return $fullChoice; - } - - private function mostRecentlyEnteredValue(string $entered): string - { - // Determine the most recent value that the user entered - if (!str_contains($entered, ',')) { - return $entered; - } - - $choices = explode(',', $entered); - if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) { - return $lastChoice; - } - - return $entered; - } - - /** - * Gets a hidden response from user. - * - * @param resource $inputStream The handler resource - * @param bool $trimmable Is the answer trimmable - * - * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden - */ - private function getHiddenResponse(OutputInterface $output, $inputStream, bool $trimmable = true): string - { - if ('\\' === \DIRECTORY_SEPARATOR) { - $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; - - // handle code running from a phar - if ('phar:' === substr(__FILE__, 0, 5)) { - $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; - copy($exe, $tmpExe); - $exe = $tmpExe; - } - - $sExec = shell_exec('"'.$exe.'"'); - $value = $trimmable ? rtrim($sExec) : $sExec; - $output->writeln(''); - - if (isset($tmpExe)) { - unlink($tmpExe); - } - - return $value; - } - - if (self::$stty && Terminal::hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); - shell_exec('stty -echo'); - } elseif ($this->isInteractiveInput($inputStream)) { - throw new RuntimeException('Unable to hide the response.'); - } - - $value = fgets($inputStream, 4096); - - if (self::$stty && Terminal::hasSttyAvailable()) { - shell_exec('stty '.$sttyMode); - } - - if (false === $value) { - throw new MissingInputException('Aborted.'); - } - if ($trimmable) { - $value = trim($value); - } - $output->writeln(''); - - return $value; - } - - /** - * Validates an attempt. - * - * @param callable $interviewer A callable that will ask for a question and return the result - * - * @return mixed The validated response - * - * @throws \Exception In case the max number of attempts has been reached and no valid response has been given - */ - private function validateAttempts(callable $interviewer, OutputInterface $output, Question $question) - { - $error = null; - $attempts = $question->getMaxAttempts(); - - while (null === $attempts || $attempts--) { - if (null !== $error) { - $this->writeError($output, $error); - } - - try { - return $question->getValidator()($interviewer()); - } catch (RuntimeException $e) { - throw $e; - } catch (\Exception $error) { - } - } - - throw $error; - } - - private function isInteractiveInput($inputStream): bool - { - if ('php://stdin' !== (stream_get_meta_data($inputStream)['uri'] ?? null)) { - return false; - } - - if (null !== self::$stdinIsInteractive) { - return self::$stdinIsInteractive; - } - - if (\function_exists('stream_isatty')) { - return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r')); - } - - if (\function_exists('posix_isatty')) { - return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r')); - } - - if (!\function_exists('exec')) { - return self::$stdinIsInteractive = true; - } - - exec('stty 2> /dev/null', $output, $status); - - return self::$stdinIsInteractive = 1 !== $status; - } - - /** - * Reads one or more lines of input and returns what is read. - * - * @param resource $inputStream The handler resource - * @param Question $question The question being asked - * - * @return string|false The input received, false in case input could not be read - */ - private function readInput($inputStream, Question $question) - { - if (!$question->isMultiline()) { - $cp = $this->setIOCodepage(); - $ret = fgets($inputStream, 4096); - - return $this->resetIOCodepage($cp, $ret); - } - - $multiLineStreamReader = $this->cloneInputStream($inputStream); - if (null === $multiLineStreamReader) { - return false; - } - - $ret = ''; - $cp = $this->setIOCodepage(); - while (false !== ($char = fgetc($multiLineStreamReader))) { - if (\PHP_EOL === "{$ret}{$char}") { - break; - } - $ret .= $char; - } - - return $this->resetIOCodepage($cp, $ret); - } - - /** - * Sets console I/O to the host code page. - * - * @return int Previous code page in IBM/EBCDIC format - */ - private function setIOCodepage(): int - { - if (\function_exists('sapi_windows_cp_set')) { - $cp = sapi_windows_cp_get(); - sapi_windows_cp_set(sapi_windows_cp_get('oem')); - - return $cp; - } - - return 0; - } - - /** - * Sets console I/O to the specified code page and converts the user input. - * - * @param string|false $input - * - * @return string|false - */ - private function resetIOCodepage(int $cp, $input) - { - if (0 !== $cp) { - sapi_windows_cp_set($cp); - - if (false !== $input && '' !== $input) { - $input = sapi_windows_cp_conv(sapi_windows_cp_get('oem'), $cp, $input); - } - } - - return $input; - } - - /** - * Clones an input stream in order to act on one instance of the same - * stream without affecting the other instance. - * - * @param resource $inputStream The handler resource - * - * @return resource|null The cloned resource, null in case it could not be cloned - */ - private function cloneInputStream($inputStream) - { - $streamMetaData = stream_get_meta_data($inputStream); - $seekable = $streamMetaData['seekable'] ?? false; - $mode = $streamMetaData['mode'] ?? 'rb'; - $uri = $streamMetaData['uri'] ?? null; - - if (null === $uri) { - return null; - } - - $cloneStream = fopen($uri, $mode); - - // For seekable and writable streams, add all the same data to the - // cloned stream and then seek to the same offset. - if (true === $seekable && !\in_array($mode, ['r', 'rb', 'rt'])) { - $offset = ftell($inputStream); - rewind($inputStream); - stream_copy_to_stream($inputStream, $cloneStream); - fseek($inputStream, $offset); - fseek($cloneStream, $offset); - } - - return $cloneStream; - } -} diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php deleted file mode 100644 index 01f94ab..0000000 --- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * Symfony Style Guide compliant question helper. - * - * @author Kevin Bond - */ -class SymfonyQuestionHelper extends QuestionHelper -{ - /** - * {@inheritdoc} - */ - protected function writePrompt(OutputInterface $output, Question $question) - { - $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); - $default = $question->getDefault(); - - if ($question->isMultiline()) { - $text .= sprintf(' (press %s to continue)', $this->getEofShortcut()); - } - - switch (true) { - case null === $default: - $text = sprintf(' %s:', $text); - - break; - - case $question instanceof ConfirmationQuestion: - $text = sprintf(' %s (yes/no) [%s]:', $text, $default ? 'yes' : 'no'); - - break; - - case $question instanceof ChoiceQuestion && $question->isMultiselect(): - $choices = $question->getChoices(); - $default = explode(',', $default); - - foreach ($default as $key => $value) { - $default[$key] = $choices[trim($value)]; - } - - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(implode(', ', $default))); - - break; - - case $question instanceof ChoiceQuestion: - $choices = $question->getChoices(); - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default] ?? $default)); - - break; - - default: - $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($default)); - } - - $output->writeln($text); - - $prompt = ' > '; - - if ($question instanceof ChoiceQuestion) { - $output->writeln($this->formatChoiceQuestionChoices($question, 'comment')); - - $prompt = $question->getPrompt(); - } - - $output->write($prompt); - } - - /** - * {@inheritdoc} - */ - protected function writeError(OutputInterface $output, \Exception $error) - { - if ($output instanceof SymfonyStyle) { - $output->newLine(); - $output->error($error->getMessage()); - - return; - } - - parent::writeError($output, $error); - } - - private function getEofShortcut(): string - { - if ('Windows' === \PHP_OS_FAMILY) { - return 'Ctrl+Z then Enter'; - } - - return 'Ctrl+D'; - } -} diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php deleted file mode 100644 index 0e6694e..0000000 --- a/vendor/symfony/console/Helper/Table.php +++ /dev/null @@ -1,894 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Provides helpers to display a table. - * - * @author Fabien Potencier - * @author Саша Стаменковић - * @author Abdellatif Ait boudad - * @author Max Grigorian - * @author Dany Maillard - */ -class Table -{ - private const SEPARATOR_TOP = 0; - private const SEPARATOR_TOP_BOTTOM = 1; - private const SEPARATOR_MID = 2; - private const SEPARATOR_BOTTOM = 3; - private const BORDER_OUTSIDE = 0; - private const BORDER_INSIDE = 1; - - private $headerTitle; - private $footerTitle; - - /** - * Table headers. - */ - private $headers = []; - - /** - * Table rows. - */ - private $rows = []; - private $horizontal = false; - - /** - * Column widths cache. - */ - private $effectiveColumnWidths = []; - - /** - * Number of columns cache. - * - * @var int - */ - private $numberOfColumns; - - /** - * @var OutputInterface - */ - private $output; - - /** - * @var TableStyle - */ - private $style; - - /** - * @var array - */ - private $columnStyles = []; - - /** - * User set column widths. - * - * @var array - */ - private $columnWidths = []; - private $columnMaxWidths = []; - - /** - * @var array|null - */ - private static $styles; - - private $rendered = false; - - public function __construct(OutputInterface $output) - { - $this->output = $output; - - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - $this->setStyle('default'); - } - - /** - * Sets a style definition. - */ - public static function setStyleDefinition(string $name, TableStyle $style) - { - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - self::$styles[$name] = $style; - } - - /** - * Gets a style definition by name. - * - * @return TableStyle - */ - public static function getStyleDefinition(string $name) - { - if (!self::$styles) { - self::$styles = self::initStyles(); - } - - if (isset(self::$styles[$name])) { - return self::$styles[$name]; - } - - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } - - /** - * Sets table style. - * - * @param TableStyle|string $name The style name or a TableStyle instance - * - * @return $this - */ - public function setStyle($name) - { - $this->style = $this->resolveStyle($name); - - return $this; - } - - /** - * Gets the current table style. - * - * @return TableStyle - */ - public function getStyle() - { - return $this->style; - } - - /** - * Sets table column style. - * - * @param TableStyle|string $name The style name or a TableStyle instance - * - * @return $this - */ - public function setColumnStyle(int $columnIndex, $name) - { - $this->columnStyles[$columnIndex] = $this->resolveStyle($name); - - return $this; - } - - /** - * Gets the current style for a column. - * - * If style was not set, it returns the global table style. - * - * @return TableStyle - */ - public function getColumnStyle(int $columnIndex) - { - return $this->columnStyles[$columnIndex] ?? $this->getStyle(); - } - - /** - * Sets the minimum width of a column. - * - * @return $this - */ - public function setColumnWidth(int $columnIndex, int $width) - { - $this->columnWidths[$columnIndex] = $width; - - return $this; - } - - /** - * Sets the minimum width of all columns. - * - * @return $this - */ - public function setColumnWidths(array $widths) - { - $this->columnWidths = []; - foreach ($widths as $index => $width) { - $this->setColumnWidth($index, $width); - } - - return $this; - } - - /** - * Sets the maximum width of a column. - * - * Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while - * formatted strings are preserved. - * - * @return $this - */ - public function setColumnMaxWidth(int $columnIndex, int $width): self - { - if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) { - throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, get_debug_type($this->output->getFormatter()))); - } - - $this->columnMaxWidths[$columnIndex] = $width; - - return $this; - } - - /** - * @return $this - */ - public function setHeaders(array $headers) - { - $headers = array_values($headers); - if (!empty($headers) && !\is_array($headers[0])) { - $headers = [$headers]; - } - - $this->headers = $headers; - - return $this; - } - - public function setRows(array $rows) - { - $this->rows = []; - - return $this->addRows($rows); - } - - /** - * @return $this - */ - public function addRows(array $rows) - { - foreach ($rows as $row) { - $this->addRow($row); - } - - return $this; - } - - /** - * @return $this - */ - public function addRow($row) - { - if ($row instanceof TableSeparator) { - $this->rows[] = $row; - - return $this; - } - - if (!\is_array($row)) { - throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.'); - } - - $this->rows[] = array_values($row); - - return $this; - } - - /** - * Adds a row to the table, and re-renders the table. - * - * @return $this - */ - public function appendRow($row): self - { - if (!$this->output instanceof ConsoleSectionOutput) { - throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__)); - } - - if ($this->rendered) { - $this->output->clear($this->calculateRowCount()); - } - - $this->addRow($row); - $this->render(); - - return $this; - } - - /** - * @return $this - */ - public function setRow($column, array $row) - { - $this->rows[$column] = $row; - - return $this; - } - - /** - * @return $this - */ - public function setHeaderTitle(?string $title): self - { - $this->headerTitle = $title; - - return $this; - } - - /** - * @return $this - */ - public function setFooterTitle(?string $title): self - { - $this->footerTitle = $title; - - return $this; - } - - /** - * @return $this - */ - public function setHorizontal(bool $horizontal = true): self - { - $this->horizontal = $horizontal; - - return $this; - } - - /** - * Renders table to output. - * - * Example: - * - * +---------------+-----------------------+------------------+ - * | ISBN | Title | Author | - * +---------------+-----------------------+------------------+ - * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | - * +---------------+-----------------------+------------------+ - */ - public function render() - { - $divider = new TableSeparator(); - if ($this->horizontal) { - $rows = []; - foreach ($this->headers[0] ?? [] as $i => $header) { - $rows[$i] = [$header]; - foreach ($this->rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - if (isset($row[$i])) { - $rows[$i][] = $row[$i]; - } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) { - // Noop, there is a "title" - } else { - $rows[$i][] = null; - } - } - } - } else { - $rows = array_merge($this->headers, [$divider], $this->rows); - } - - $this->calculateNumberOfColumns($rows); - - $rows = $this->buildTableRows($rows); - $this->calculateColumnsWidth($rows); - - $isHeader = !$this->horizontal; - $isFirstRow = $this->horizontal; - $hasTitle = (bool) $this->headerTitle; - foreach ($rows as $row) { - if ($divider === $row) { - $isHeader = false; - $isFirstRow = true; - - continue; - } - if ($row instanceof TableSeparator) { - $this->renderRowSeparator(); - - continue; - } - if (!$row) { - continue; - } - - if ($isHeader || $isFirstRow) { - $this->renderRowSeparator( - $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM, - $hasTitle ? $this->headerTitle : null, - $hasTitle ? $this->style->getHeaderTitleFormat() : null - ); - $isFirstRow = false; - $hasTitle = false; - } - if ($this->horizontal) { - $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat()); - } else { - $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat()); - } - } - $this->renderRowSeparator(self::SEPARATOR_BOTTOM, $this->footerTitle, $this->style->getFooterTitleFormat()); - - $this->cleanup(); - $this->rendered = true; - } - - /** - * Renders horizontal header separator. - * - * Example: - * - * +-----+-----------+-------+ - */ - private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) - { - if (0 === $count = $this->numberOfColumns) { - return; - } - - $borders = $this->style->getBorderChars(); - if (!$borders[0] && !$borders[2] && !$this->style->getCrossingChar()) { - return; - } - - $crossings = $this->style->getCrossingChars(); - if (self::SEPARATOR_MID === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[2], $crossings[8], $crossings[0], $crossings[4]]; - } elseif (self::SEPARATOR_TOP === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[1], $crossings[2], $crossings[3]]; - } elseif (self::SEPARATOR_TOP_BOTTOM === $type) { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[9], $crossings[10], $crossings[11]]; - } else { - [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[7], $crossings[6], $crossings[5]]; - } - - $markup = $leftChar; - for ($column = 0; $column < $count; ++$column) { - $markup .= str_repeat($horizontal, $this->effectiveColumnWidths[$column]); - $markup .= $column === $count - 1 ? $rightChar : $midChar; - } - - if (null !== $title) { - $titleLength = Helper::width(Helper::removeDecoration($formatter = $this->output->getFormatter(), $formattedTitle = sprintf($titleFormat, $title))); - $markupLength = Helper::width($markup); - if ($titleLength > $limit = $markupLength - 4) { - $titleLength = $limit; - $formatLength = Helper::width(Helper::removeDecoration($formatter, sprintf($titleFormat, ''))); - $formattedTitle = sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3).'...'); - } - - $titleStart = intdiv($markupLength - $titleLength, 2); - if (false === mb_detect_encoding($markup, null, true)) { - $markup = substr_replace($markup, $formattedTitle, $titleStart, $titleLength); - } else { - $markup = mb_substr($markup, 0, $titleStart).$formattedTitle.mb_substr($markup, $titleStart + $titleLength); - } - } - - $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup)); - } - - /** - * Renders vertical column separator. - */ - private function renderColumnSeparator(int $type = self::BORDER_OUTSIDE): string - { - $borders = $this->style->getBorderChars(); - - return sprintf($this->style->getBorderFormat(), self::BORDER_OUTSIDE === $type ? $borders[1] : $borders[3]); - } - - /** - * Renders table row. - * - * Example: - * - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - */ - private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null) - { - $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); - $columns = $this->getRowColumns($row); - $last = \count($columns) - 1; - foreach ($columns as $i => $column) { - if ($firstCellFormat && 0 === $i) { - $rowContent .= $this->renderCell($row, $column, $firstCellFormat); - } else { - $rowContent .= $this->renderCell($row, $column, $cellFormat); - } - $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE); - } - $this->output->writeln($rowContent); - } - - /** - * Renders table cell with padding. - */ - private function renderCell(array $row, int $column, string $cellFormat): string - { - $cell = $row[$column] ?? ''; - $width = $this->effectiveColumnWidths[$column]; - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - // add the width of the following columns(numbers of colspan). - foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) { - $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn]; - } - } - - // str_pad won't work properly with multi-byte strings, we need to fix the padding - if (false !== $encoding = mb_detect_encoding($cell, null, true)) { - $width += \strlen($cell) - mb_strwidth($cell, $encoding); - } - - $style = $this->getColumnStyle($column); - - if ($cell instanceof TableSeparator) { - return sprintf($style->getBorderFormat(), str_repeat($style->getBorderChars()[2], $width)); - } - - $width += Helper::length($cell) - Helper::length(Helper::removeDecoration($this->output->getFormatter(), $cell)); - $content = sprintf($style->getCellRowContentFormat(), $cell); - - $padType = $style->getPadType(); - if ($cell instanceof TableCell && $cell->getStyle() instanceof TableCellStyle) { - $isNotStyledByTag = !preg_match('/^<(\w+|(\w+=[\w,]+;?)*)>.+<\/(\w+|(\w+=\w+;?)*)?>$/', $cell); - if ($isNotStyledByTag) { - $cellFormat = $cell->getStyle()->getCellFormat(); - if (!\is_string($cellFormat)) { - $tag = http_build_query($cell->getStyle()->getTagOptions(), '', ';'); - $cellFormat = '<'.$tag.'>%s'; - } - - if (strstr($content, '')) { - $content = str_replace('', '', $content); - $width -= 3; - } - if (strstr($content, '')) { - $content = str_replace('', '', $content); - $width -= \strlen(''); - } - } - - $padType = $cell->getStyle()->getPadByAlign(); - } - - return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $padType)); - } - - /** - * Calculate number of columns for this table. - */ - private function calculateNumberOfColumns(array $rows) - { - $columns = [0]; - foreach ($rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - - $columns[] = $this->getNumberOfColumns($row); - } - - $this->numberOfColumns = max($columns); - } - - private function buildTableRows(array $rows): TableRows - { - /** @var WrappableOutputFormatterInterface $formatter */ - $formatter = $this->output->getFormatter(); - $unmergedRows = []; - for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { - $rows = $this->fillNextRows($rows, $rowKey); - - // Remove any new line breaks and replace it with a new line - foreach ($rows[$rowKey] as $column => $cell) { - $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1; - - if (isset($this->columnMaxWidths[$column]) && Helper::width(Helper::removeDecoration($formatter, $cell)) > $this->columnMaxWidths[$column]) { - $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan); - } - if (!strstr($cell ?? '', "\n")) { - continue; - } - $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell))); - $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; - $lines = explode("\n", str_replace("\n", "\n", $cell)); - foreach ($lines as $lineKey => $line) { - if ($colspan > 1) { - $line = new TableCell($line, ['colspan' => $colspan]); - } - if (0 === $lineKey) { - $rows[$rowKey][$column] = $line; - } else { - if (!\array_key_exists($rowKey, $unmergedRows) || !\array_key_exists($lineKey, $unmergedRows[$rowKey])) { - $unmergedRows[$rowKey][$lineKey] = $this->copyRow($rows, $rowKey); - } - $unmergedRows[$rowKey][$lineKey][$column] = $line; - } - } - } - } - - return new TableRows(function () use ($rows, $unmergedRows): \Traversable { - foreach ($rows as $rowKey => $row) { - yield $row instanceof TableSeparator ? $row : $this->fillCells($row); - - if (isset($unmergedRows[$rowKey])) { - foreach ($unmergedRows[$rowKey] as $row) { - yield $row instanceof TableSeparator ? $row : $this->fillCells($row); - } - } - } - }); - } - - private function calculateRowCount(): int - { - $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [new TableSeparator()], $this->rows)))); - - if ($this->headers) { - ++$numberOfRows; // Add row for header separator - } - - if (\count($this->rows) > 0) { - ++$numberOfRows; // Add row for footer separator - } - - return $numberOfRows; - } - - /** - * fill rows that contains rowspan > 1. - * - * @throws InvalidArgumentException - */ - private function fillNextRows(array $rows, int $line): array - { - $unmergedRows = []; - foreach ($rows[$line] as $column => $cell) { - if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { - throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', get_debug_type($cell))); - } - if ($cell instanceof TableCell && $cell->getRowspan() > 1) { - $nbLines = $cell->getRowspan() - 1; - $lines = [$cell]; - if (strstr($cell, "\n")) { - $lines = explode("\n", str_replace("\n", "\n", $cell)); - $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; - - $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]); - unset($lines[0]); - } - - // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows); - foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { - $value = $lines[$unmergedRowKey - $line] ?? ''; - $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]); - if ($nbLines === $unmergedRowKey - $line) { - break; - } - } - } - } - - foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { - // we need to know if $unmergedRow will be merged or inserted into $rows - if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { - foreach ($unmergedRow as $cellKey => $cell) { - // insert cell into row at cellKey position - array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]); - } - } else { - $row = $this->copyRow($rows, $unmergedRowKey - 1); - foreach ($unmergedRow as $column => $cell) { - if (!empty($cell)) { - $row[$column] = $unmergedRow[$column]; - } - } - array_splice($rows, $unmergedRowKey, 0, [$row]); - } - } - - return $rows; - } - - /** - * fill cells for a row that contains colspan > 1. - */ - private function fillCells(iterable $row) - { - $newRow = []; - - foreach ($row as $column => $cell) { - $newRow[] = $cell; - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { - // insert empty value at column position - $newRow[] = ''; - } - } - } - - return $newRow ?: $row; - } - - private function copyRow(array $rows, int $line): array - { - $row = $rows[$line]; - foreach ($row as $cellKey => $cellValue) { - $row[$cellKey] = ''; - if ($cellValue instanceof TableCell) { - $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]); - } - } - - return $row; - } - - /** - * Gets number of columns by row. - */ - private function getNumberOfColumns(array $row): int - { - $columns = \count($row); - foreach ($row as $column) { - $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0; - } - - return $columns; - } - - /** - * Gets list of columns for the given row. - */ - private function getRowColumns(array $row): array - { - $columns = range(0, $this->numberOfColumns - 1); - foreach ($row as $cellKey => $cell) { - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - // exclude grouped columns. - $columns = array_diff($columns, range($cellKey + 1, $cellKey + $cell->getColspan() - 1)); - } - } - - return $columns; - } - - /** - * Calculates columns widths. - */ - private function calculateColumnsWidth(iterable $rows) - { - for ($column = 0; $column < $this->numberOfColumns; ++$column) { - $lengths = []; - foreach ($rows as $row) { - if ($row instanceof TableSeparator) { - continue; - } - - foreach ($row as $i => $cell) { - if ($cell instanceof TableCell) { - $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell); - $textLength = Helper::width($textContent); - if ($textLength > 0) { - $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan())); - foreach ($contentColumns as $position => $content) { - $row[$i + $position] = $content; - } - } - } - } - - $lengths[] = $this->getCellWidth($row, $column); - } - - $this->effectiveColumnWidths[$column] = max($lengths) + Helper::width($this->style->getCellRowContentFormat()) - 2; - } - } - - private function getColumnSeparatorWidth(): int - { - return Helper::width(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3])); - } - - private function getCellWidth(array $row, int $column): int - { - $cellWidth = 0; - - if (isset($row[$column])) { - $cell = $row[$column]; - $cellWidth = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $cell)); - } - - $columnWidth = $this->columnWidths[$column] ?? 0; - $cellWidth = max($cellWidth, $columnWidth); - - return isset($this->columnMaxWidths[$column]) ? min($this->columnMaxWidths[$column], $cellWidth) : $cellWidth; - } - - /** - * Called after rendering to cleanup cache data. - */ - private function cleanup() - { - $this->effectiveColumnWidths = []; - $this->numberOfColumns = null; - } - - /** - * @return array - */ - private static function initStyles(): array - { - $borderless = new TableStyle(); - $borderless - ->setHorizontalBorderChars('=') - ->setVerticalBorderChars(' ') - ->setDefaultCrossingChar(' ') - ; - - $compact = new TableStyle(); - $compact - ->setHorizontalBorderChars('') - ->setVerticalBorderChars('') - ->setDefaultCrossingChar('') - ->setCellRowContentFormat('%s ') - ; - - $styleGuide = new TableStyle(); - $styleGuide - ->setHorizontalBorderChars('-') - ->setVerticalBorderChars(' ') - ->setDefaultCrossingChar(' ') - ->setCellHeaderFormat('%s') - ; - - $box = (new TableStyle()) - ->setHorizontalBorderChars('─') - ->setVerticalBorderChars('│') - ->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├') - ; - - $boxDouble = (new TableStyle()) - ->setHorizontalBorderChars('═', '─') - ->setVerticalBorderChars('║', '│') - ->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣') - ; - - return [ - 'default' => new TableStyle(), - 'borderless' => $borderless, - 'compact' => $compact, - 'symfony-style-guide' => $styleGuide, - 'box' => $box, - 'box-double' => $boxDouble, - ]; - } - - private function resolveStyle($name): TableStyle - { - if ($name instanceof TableStyle) { - return $name; - } - - if (isset(self::$styles[$name])) { - return self::$styles[$name]; - } - - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } -} diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php deleted file mode 100644 index 1a7bc6e..0000000 --- a/vendor/symfony/console/Helper/TableCell.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * @author Abdellatif Ait boudad - */ -class TableCell -{ - private $value; - private $options = [ - 'rowspan' => 1, - 'colspan' => 1, - 'style' => null, - ]; - - public function __construct(string $value = '', array $options = []) - { - $this->value = $value; - - // check option names - if ($diff = array_diff(array_keys($options), array_keys($this->options))) { - throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff))); - } - - if (isset($options['style']) && !$options['style'] instanceof TableCellStyle) { - throw new InvalidArgumentException('The style option must be an instance of "TableCellStyle".'); - } - - $this->options = array_merge($this->options, $options); - } - - /** - * Returns the cell value. - * - * @return string - */ - public function __toString() - { - return $this->value; - } - - /** - * Gets number of colspan. - * - * @return int - */ - public function getColspan() - { - return (int) $this->options['colspan']; - } - - /** - * Gets number of rowspan. - * - * @return int - */ - public function getRowspan() - { - return (int) $this->options['rowspan']; - } - - public function getStyle(): ?TableCellStyle - { - return $this->options['style']; - } -} diff --git a/vendor/symfony/console/Helper/TableCellStyle.php b/vendor/symfony/console/Helper/TableCellStyle.php deleted file mode 100644 index 19cd0ff..0000000 --- a/vendor/symfony/console/Helper/TableCellStyle.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * @author Yewhen Khoptynskyi - */ -class TableCellStyle -{ - public const DEFAULT_ALIGN = 'left'; - - private const TAG_OPTIONS = [ - 'fg', - 'bg', - 'options', - ]; - - private const ALIGN_MAP = [ - 'left' => \STR_PAD_RIGHT, - 'center' => \STR_PAD_BOTH, - 'right' => \STR_PAD_LEFT, - ]; - - private $options = [ - 'fg' => 'default', - 'bg' => 'default', - 'options' => null, - 'align' => self::DEFAULT_ALIGN, - 'cellFormat' => null, - ]; - - public function __construct(array $options = []) - { - if ($diff = array_diff(array_keys($options), array_keys($this->options))) { - throw new InvalidArgumentException(sprintf('The TableCellStyle does not support the following options: \'%s\'.', implode('\', \'', $diff))); - } - - if (isset($options['align']) && !\array_key_exists($options['align'], self::ALIGN_MAP)) { - throw new InvalidArgumentException(sprintf('Wrong align value. Value must be following: \'%s\'.', implode('\', \'', array_keys(self::ALIGN_MAP)))); - } - - $this->options = array_merge($this->options, $options); - } - - public function getOptions(): array - { - return $this->options; - } - - /** - * Gets options we need for tag for example fg, bg. - * - * @return string[] - */ - public function getTagOptions() - { - return array_filter( - $this->getOptions(), - function ($key) { - return \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]); - }, - \ARRAY_FILTER_USE_KEY - ); - } - - /** - * @return int - */ - public function getPadByAlign() - { - return self::ALIGN_MAP[$this->getOptions()['align']]; - } - - public function getCellFormat(): ?string - { - return $this->getOptions()['cellFormat']; - } -} diff --git a/vendor/symfony/console/Helper/TableRows.php b/vendor/symfony/console/Helper/TableRows.php deleted file mode 100644 index cbc07d2..0000000 --- a/vendor/symfony/console/Helper/TableRows.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * @internal - */ -class TableRows implements \IteratorAggregate -{ - private $generator; - - public function __construct(\Closure $generator) - { - $this->generator = $generator; - } - - public function getIterator(): \Traversable - { - return ($this->generator)(); - } -} diff --git a/vendor/symfony/console/Helper/TableSeparator.php b/vendor/symfony/console/Helper/TableSeparator.php deleted file mode 100644 index e541c53..0000000 --- a/vendor/symfony/console/Helper/TableSeparator.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * Marks a row as being a separator. - * - * @author Fabien Potencier - */ -class TableSeparator extends TableCell -{ - public function __construct(array $options = []) - { - parent::__construct('', $options); - } -} diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php deleted file mode 100644 index dfc41e6..0000000 --- a/vendor/symfony/console/Helper/TableStyle.php +++ /dev/null @@ -1,376 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Defines the styles for a Table. - * - * @author Fabien Potencier - * @author Саша Стаменковић - * @author Dany Maillard - */ -class TableStyle -{ - private $paddingChar = ' '; - private $horizontalOutsideBorderChar = '-'; - private $horizontalInsideBorderChar = '-'; - private $verticalOutsideBorderChar = '|'; - private $verticalInsideBorderChar = '|'; - private $crossingChar = '+'; - private $crossingTopRightChar = '+'; - private $crossingTopMidChar = '+'; - private $crossingTopLeftChar = '+'; - private $crossingMidRightChar = '+'; - private $crossingBottomRightChar = '+'; - private $crossingBottomMidChar = '+'; - private $crossingBottomLeftChar = '+'; - private $crossingMidLeftChar = '+'; - private $crossingTopLeftBottomChar = '+'; - private $crossingTopMidBottomChar = '+'; - private $crossingTopRightBottomChar = '+'; - private $headerTitleFormat = ' %s '; - private $footerTitleFormat = ' %s '; - private $cellHeaderFormat = '%s'; - private $cellRowFormat = '%s'; - private $cellRowContentFormat = ' %s '; - private $borderFormat = '%s'; - private $padType = \STR_PAD_RIGHT; - - /** - * Sets padding character, used for cell padding. - * - * @return $this - */ - public function setPaddingChar(string $paddingChar) - { - if (!$paddingChar) { - throw new LogicException('The padding char must not be empty.'); - } - - $this->paddingChar = $paddingChar; - - return $this; - } - - /** - * Gets padding character, used for cell padding. - * - * @return string - */ - public function getPaddingChar() - { - return $this->paddingChar; - } - - /** - * Sets horizontal border characters. - * - * - * ╔═══════════════╤══════════════════════════╤══════════════════╗ - * 1 ISBN 2 Title │ Author ║ - * ╠═══════════════╪══════════════════════════╪══════════════════╣ - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * ╚═══════════════╧══════════════════════════╧══════════════════╝ - * - * - * @return $this - */ - public function setHorizontalBorderChars(string $outside, string $inside = null): self - { - $this->horizontalOutsideBorderChar = $outside; - $this->horizontalInsideBorderChar = $inside ?? $outside; - - return $this; - } - - /** - * Sets vertical border characters. - * - * - * ╔═══════════════╤══════════════════════════╤══════════════════╗ - * ║ ISBN │ Title │ Author ║ - * ╠═══════1═══════╪══════════════════════════╪══════════════════╣ - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * ╟───────2───────┼──────────────────────────┼──────────────────╢ - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * ╚═══════════════╧══════════════════════════╧══════════════════╝ - * - * - * @return $this - */ - public function setVerticalBorderChars(string $outside, string $inside = null): self - { - $this->verticalOutsideBorderChar = $outside; - $this->verticalInsideBorderChar = $inside ?? $outside; - - return $this; - } - - /** - * Gets border characters. - * - * @internal - */ - public function getBorderChars(): array - { - return [ - $this->horizontalOutsideBorderChar, - $this->verticalOutsideBorderChar, - $this->horizontalInsideBorderChar, - $this->verticalInsideBorderChar, - ]; - } - - /** - * Sets crossing characters. - * - * Example: - * - * 1═══════════════2══════════════════════════2══════════════════3 - * ║ ISBN │ Title │ Author ║ - * 8'══════════════0'═════════════════════════0'═════════════════4' - * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║ - * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║ - * 8───────────────0──────────────────────────0──────────────────4 - * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║ - * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║ - * 7═══════════════6══════════════════════════6══════════════════5 - * - * - * @param string $cross Crossing char (see #0 of example) - * @param string $topLeft Top left char (see #1 of example) - * @param string $topMid Top mid char (see #2 of example) - * @param string $topRight Top right char (see #3 of example) - * @param string $midRight Mid right char (see #4 of example) - * @param string $bottomRight Bottom right char (see #5 of example) - * @param string $bottomMid Bottom mid char (see #6 of example) - * @param string $bottomLeft Bottom left char (see #7 of example) - * @param string $midLeft Mid left char (see #8 of example) - * @param string|null $topLeftBottom Top left bottom char (see #8' of example), equals to $midLeft if null - * @param string|null $topMidBottom Top mid bottom char (see #0' of example), equals to $cross if null - * @param string|null $topRightBottom Top right bottom char (see #4' of example), equals to $midRight if null - * - * @return $this - */ - public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null): self - { - $this->crossingChar = $cross; - $this->crossingTopLeftChar = $topLeft; - $this->crossingTopMidChar = $topMid; - $this->crossingTopRightChar = $topRight; - $this->crossingMidRightChar = $midRight; - $this->crossingBottomRightChar = $bottomRight; - $this->crossingBottomMidChar = $bottomMid; - $this->crossingBottomLeftChar = $bottomLeft; - $this->crossingMidLeftChar = $midLeft; - $this->crossingTopLeftBottomChar = $topLeftBottom ?? $midLeft; - $this->crossingTopMidBottomChar = $topMidBottom ?? $cross; - $this->crossingTopRightBottomChar = $topRightBottom ?? $midRight; - - return $this; - } - - /** - * Sets default crossing character used for each cross. - * - * @see {@link setCrossingChars()} for setting each crossing individually. - */ - public function setDefaultCrossingChar(string $char): self - { - return $this->setCrossingChars($char, $char, $char, $char, $char, $char, $char, $char, $char); - } - - /** - * Gets crossing character. - * - * @return string - */ - public function getCrossingChar() - { - return $this->crossingChar; - } - - /** - * Gets crossing characters. - * - * @internal - */ - public function getCrossingChars(): array - { - return [ - $this->crossingChar, - $this->crossingTopLeftChar, - $this->crossingTopMidChar, - $this->crossingTopRightChar, - $this->crossingMidRightChar, - $this->crossingBottomRightChar, - $this->crossingBottomMidChar, - $this->crossingBottomLeftChar, - $this->crossingMidLeftChar, - $this->crossingTopLeftBottomChar, - $this->crossingTopMidBottomChar, - $this->crossingTopRightBottomChar, - ]; - } - - /** - * Sets header cell format. - * - * @return $this - */ - public function setCellHeaderFormat(string $cellHeaderFormat) - { - $this->cellHeaderFormat = $cellHeaderFormat; - - return $this; - } - - /** - * Gets header cell format. - * - * @return string - */ - public function getCellHeaderFormat() - { - return $this->cellHeaderFormat; - } - - /** - * Sets row cell format. - * - * @return $this - */ - public function setCellRowFormat(string $cellRowFormat) - { - $this->cellRowFormat = $cellRowFormat; - - return $this; - } - - /** - * Gets row cell format. - * - * @return string - */ - public function getCellRowFormat() - { - return $this->cellRowFormat; - } - - /** - * Sets row cell content format. - * - * @return $this - */ - public function setCellRowContentFormat(string $cellRowContentFormat) - { - $this->cellRowContentFormat = $cellRowContentFormat; - - return $this; - } - - /** - * Gets row cell content format. - * - * @return string - */ - public function getCellRowContentFormat() - { - return $this->cellRowContentFormat; - } - - /** - * Sets table border format. - * - * @return $this - */ - public function setBorderFormat(string $borderFormat) - { - $this->borderFormat = $borderFormat; - - return $this; - } - - /** - * Gets table border format. - * - * @return string - */ - public function getBorderFormat() - { - return $this->borderFormat; - } - - /** - * Sets cell padding type. - * - * @return $this - */ - public function setPadType(int $padType) - { - if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], true)) { - throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); - } - - $this->padType = $padType; - - return $this; - } - - /** - * Gets cell padding type. - * - * @return int - */ - public function getPadType() - { - return $this->padType; - } - - public function getHeaderTitleFormat(): string - { - return $this->headerTitleFormat; - } - - /** - * @return $this - */ - public function setHeaderTitleFormat(string $format): self - { - $this->headerTitleFormat = $format; - - return $this; - } - - public function getFooterTitleFormat(): string - { - return $this->footerTitleFormat; - } - - /** - * @return $this - */ - public function setFooterTitleFormat(string $format): self - { - $this->footerTitleFormat = $format; - - return $this; - } -} diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php deleted file mode 100644 index 675b9ef..0000000 --- a/vendor/symfony/console/Input/ArgvInput.php +++ /dev/null @@ -1,378 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * ArgvInput represents an input coming from the CLI arguments. - * - * Usage: - * - * $input = new ArgvInput(); - * - * By default, the `$_SERVER['argv']` array is used for the input values. - * - * This can be overridden by explicitly passing the input values in the constructor: - * - * $input = new ArgvInput($_SERVER['argv']); - * - * If you pass it yourself, don't forget that the first element of the array - * is the name of the running application. - * - * When passing an argument to the constructor, be sure that it respects - * the same rules as the argv one. It's almost always better to use the - * `StringInput` when you want to provide your own input. - * - * @author Fabien Potencier - * - * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 - */ -class ArgvInput extends Input -{ - private $tokens; - private $parsed; - - public function __construct(array $argv = null, InputDefinition $definition = null) - { - $argv = $argv ?? $_SERVER['argv'] ?? []; - - // strip the application name - array_shift($argv); - - $this->tokens = $argv; - - parent::__construct($definition); - } - - protected function setTokens(array $tokens) - { - $this->tokens = $tokens; - } - - /** - * {@inheritdoc} - */ - protected function parse() - { - $parseOptions = true; - $this->parsed = $this->tokens; - while (null !== $token = array_shift($this->parsed)) { - $parseOptions = $this->parseToken($token, $parseOptions); - } - } - - protected function parseToken(string $token, bool $parseOptions): bool - { - if ($parseOptions && '' == $token) { - $this->parseArgument($token); - } elseif ($parseOptions && '--' == $token) { - return false; - } elseif ($parseOptions && str_starts_with($token, '--')) { - $this->parseLongOption($token); - } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { - $this->parseShortOption($token); - } else { - $this->parseArgument($token); - } - - return $parseOptions; - } - - /** - * Parses a short option. - */ - private function parseShortOption(string $token) - { - $name = substr($token, 1); - - if (\strlen($name) > 1) { - if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { - // an option with a value (with no space) - $this->addShortOption($name[0], substr($name, 1)); - } else { - $this->parseShortOptionSet($name); - } - } else { - $this->addShortOption($name, null); - } - } - - /** - * Parses a short option set. - * - * @throws RuntimeException When option given doesn't exist - */ - private function parseShortOptionSet(string $name) - { - $len = \strlen($name); - for ($i = 0; $i < $len; ++$i) { - if (!$this->definition->hasShortcut($name[$i])) { - $encoding = mb_detect_encoding($name, null, true); - throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding))); - } - - $option = $this->definition->getOptionForShortcut($name[$i]); - if ($option->acceptValue()) { - $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); - - break; - } else { - $this->addLongOption($option->getName(), null); - } - } - } - - /** - * Parses a long option. - */ - private function parseLongOption(string $token) - { - $name = substr($token, 2); - - if (false !== $pos = strpos($name, '=')) { - if ('' === $value = substr($name, $pos + 1)) { - array_unshift($this->parsed, $value); - } - $this->addLongOption(substr($name, 0, $pos), $value); - } else { - $this->addLongOption($name, null); - } - } - - /** - * Parses an argument. - * - * @throws RuntimeException When too many arguments are given - */ - private function parseArgument(string $token) - { - $c = \count($this->arguments); - - // if input is expecting another argument, add it - if ($this->definition->hasArgument($c)) { - $arg = $this->definition->getArgument($c); - $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; - - // if last argument isArray(), append token to last argument - } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { - $arg = $this->definition->getArgument($c - 1); - $this->arguments[$arg->getName()][] = $token; - - // unexpected argument - } else { - $all = $this->definition->getArguments(); - $symfonyCommandName = null; - if (($inputArgument = $all[$key = array_key_first($all)] ?? null) && 'command' === $inputArgument->getName()) { - $symfonyCommandName = $this->arguments['command'] ?? null; - unset($all[$key]); - } - - if (\count($all)) { - if ($symfonyCommandName) { - $message = sprintf('Too many arguments to "%s" command, expected arguments "%s".', $symfonyCommandName, implode('" "', array_keys($all))); - } else { - $message = sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))); - } - } elseif ($symfonyCommandName) { - $message = sprintf('No arguments expected for "%s" command, got "%s".', $symfonyCommandName, $token); - } else { - $message = sprintf('No arguments expected, got "%s".', $token); - } - - throw new RuntimeException($message); - } - } - - /** - * Adds a short option value. - * - * @throws RuntimeException When option given doesn't exist - */ - private function addShortOption(string $shortcut, $value) - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * Adds a long option value. - * - * @throws RuntimeException When option given doesn't exist - */ - private function addLongOption(string $name, $value) - { - if (!$this->definition->hasOption($name)) { - if (!$this->definition->hasNegation($name)) { - throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name)); - } - - $optionName = $this->definition->negationToName($name); - if (null !== $value) { - throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); - } - $this->options[$optionName] = false; - - return; - } - - $option = $this->definition->getOption($name); - - if (null !== $value && !$option->acceptValue()) { - throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); - } - - if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) { - // if option accepts an optional or mandatory argument - // let's see if there is one provided - $next = array_shift($this->parsed); - if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) { - $value = $next; - } else { - array_unshift($this->parsed, $next); - } - } - - if (null === $value) { - if ($option->isValueRequired()) { - throw new RuntimeException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isArray() && !$option->isValueOptional()) { - $value = true; - } - } - - if ($option->isArray()) { - $this->options[$name][] = $value; - } else { - $this->options[$name] = $value; - } - } - - /** - * {@inheritdoc} - */ - public function getFirstArgument() - { - $isOption = false; - foreach ($this->tokens as $i => $token) { - if ($token && '-' === $token[0]) { - if (str_contains($token, '=') || !isset($this->tokens[$i + 1])) { - continue; - } - - // If it's a long option, consider that everything after "--" is the option name. - // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator) - $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1); - if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) { - // noop - } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) { - $isOption = true; - } - - continue; - } - - if ($isOption) { - $isOption = false; - continue; - } - - return $token; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasParameterOption($values, bool $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->tokens as $token) { - if ($onlyParams && '--' === $token) { - return false; - } - foreach ($values as $value) { - // Options with values: - // For long options, test for '--option=' at beginning - // For short options, test for '-o' at beginning - $leading = str_starts_with($value, '--') ? $value.'=' : $value; - if ($token === $value || '' !== $leading && str_starts_with($token, $leading)) { - return true; - } - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getParameterOption($values, $default = false, bool $onlyParams = false) - { - $values = (array) $values; - $tokens = $this->tokens; - - while (0 < \count($tokens)) { - $token = array_shift($tokens); - if ($onlyParams && '--' === $token) { - return $default; - } - - foreach ($values as $value) { - if ($token === $value) { - return array_shift($tokens); - } - // Options with values: - // For long options, test for '--option=' at beginning - // For short options, test for '-o' at beginning - $leading = str_starts_with($value, '--') ? $value.'=' : $value; - if ('' !== $leading && str_starts_with($token, $leading)) { - return substr($token, \strlen($leading)); - } - } - } - - return $default; - } - - /** - * Returns a stringified representation of the args passed to the command. - * - * @return string - */ - public function __toString() - { - $tokens = array_map(function ($token) { - if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { - return $match[1].$this->escapeToken($match[2]); - } - - if ($token && '-' !== $token[0]) { - return $this->escapeToken($token); - } - - return $token; - }, $this->tokens); - - return implode(' ', $tokens); - } -} diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php deleted file mode 100644 index c651614..0000000 --- a/vendor/symfony/console/Input/ArrayInput.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\InvalidOptionException; - -/** - * ArrayInput represents an input provided as an array. - * - * Usage: - * - * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); - * - * @author Fabien Potencier - */ -class ArrayInput extends Input -{ - private $parameters; - - public function __construct(array $parameters, InputDefinition $definition = null) - { - $this->parameters = $parameters; - - parent::__construct($definition); - } - - /** - * {@inheritdoc} - */ - public function getFirstArgument() - { - foreach ($this->parameters as $param => $value) { - if ($param && \is_string($param) && '-' === $param[0]) { - continue; - } - - return $value; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasParameterOption($values, bool $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if (!\is_int($k)) { - $v = $k; - } - - if ($onlyParams && '--' === $v) { - return false; - } - - if (\in_array($v, $values)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getParameterOption($values, $default = false, bool $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) { - return $default; - } - - if (\is_int($k)) { - if (\in_array($v, $values)) { - return true; - } - } elseif (\in_array($k, $values)) { - return $v; - } - } - - return $default; - } - - /** - * Returns a stringified representation of the args passed to the command. - * - * @return string - */ - public function __toString() - { - $params = []; - foreach ($this->parameters as $param => $val) { - if ($param && \is_string($param) && '-' === $param[0]) { - $glue = ('-' === $param[1]) ? '=' : ' '; - if (\is_array($val)) { - foreach ($val as $v) { - $params[] = $param.('' != $v ? $glue.$this->escapeToken($v) : ''); - } - } else { - $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : ''); - } - } else { - $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); - } - } - - return implode(' ', $params); - } - - /** - * {@inheritdoc} - */ - protected function parse() - { - foreach ($this->parameters as $key => $value) { - if ('--' === $key) { - return; - } - if (str_starts_with($key, '--')) { - $this->addLongOption(substr($key, 2), $value); - } elseif (str_starts_with($key, '-')) { - $this->addShortOption(substr($key, 1), $value); - } else { - $this->addArgument($key, $value); - } - } - } - - /** - * Adds a short option value. - * - * @throws InvalidOptionException When option given doesn't exist - */ - private function addShortOption(string $shortcut, $value) - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * Adds a long option value. - * - * @throws InvalidOptionException When option given doesn't exist - * @throws InvalidOptionException When a required value is missing - */ - private function addLongOption(string $name, $value) - { - if (!$this->definition->hasOption($name)) { - if (!$this->definition->hasNegation($name)) { - throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name)); - } - - $optionName = $this->definition->negationToName($name); - $this->options[$optionName] = false; - - return; - } - - $option = $this->definition->getOption($name); - - if (null === $value) { - if ($option->isValueRequired()) { - throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isValueOptional()) { - $value = true; - } - } - - $this->options[$name] = $value; - } - - /** - * Adds an argument value. - * - * @param string|int $name The argument name - * @param mixed $value The value for the argument - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - private function addArgument($name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } -} diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php deleted file mode 100644 index d37460e..0000000 --- a/vendor/symfony/console/Input/Input.php +++ /dev/null @@ -1,213 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * Input is the base class for all concrete Input classes. - * - * Three concrete classes are provided by default: - * - * * `ArgvInput`: The input comes from the CLI arguments (argv) - * * `StringInput`: The input is provided as a string - * * `ArrayInput`: The input is provided as an array - * - * @author Fabien Potencier - */ -abstract class Input implements InputInterface, StreamableInputInterface -{ - protected $definition; - protected $stream; - protected $options = []; - protected $arguments = []; - protected $interactive = true; - - public function __construct(InputDefinition $definition = null) - { - if (null === $definition) { - $this->definition = new InputDefinition(); - } else { - $this->bind($definition); - $this->validate(); - } - } - - /** - * {@inheritdoc} - */ - public function bind(InputDefinition $definition) - { - $this->arguments = []; - $this->options = []; - $this->definition = $definition; - - $this->parse(); - } - - /** - * Processes command line arguments. - */ - abstract protected function parse(); - - /** - * {@inheritdoc} - */ - public function validate() - { - $definition = $this->definition; - $givenArguments = $this->arguments; - - $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); - }); - - if (\count($missingArguments) > 0) { - throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); - } - } - - /** - * {@inheritdoc} - */ - public function isInteractive() - { - return $this->interactive; - } - - /** - * {@inheritdoc} - */ - public function setInteractive(bool $interactive) - { - $this->interactive = $interactive; - } - - /** - * {@inheritdoc} - */ - public function getArguments() - { - return array_merge($this->definition->getArgumentDefaults(), $this->arguments); - } - - /** - * {@inheritdoc} - */ - public function getArgument(string $name) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setArgument(string $name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasArgument(string $name) - { - return $this->definition->hasArgument($name); - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - return array_merge($this->definition->getOptionDefaults(), $this->options); - } - - /** - * {@inheritdoc} - */ - public function getOption(string $name) - { - if ($this->definition->hasNegation($name)) { - if (null === $value = $this->getOption($this->definition->negationToName($name))) { - return $value; - } - - return !$value; - } - - if (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setOption(string $name, $value) - { - if ($this->definition->hasNegation($name)) { - $this->options[$this->definition->negationToName($name)] = !$value; - - return; - } elseif (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - $this->options[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasOption(string $name) - { - return $this->definition->hasOption($name) || $this->definition->hasNegation($name); - } - - /** - * Escapes a token through escapeshellarg if it contains unsafe chars. - * - * @return string - */ - public function escapeToken(string $token) - { - return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); - } - - /** - * {@inheritdoc} - */ - public function setStream($stream) - { - $this->stream = $stream; - } - - /** - * {@inheritdoc} - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php deleted file mode 100644 index e891b94..0000000 --- a/vendor/symfony/console/Input/InputArgument.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a command line argument. - * - * @author Fabien Potencier - */ -class InputArgument -{ - public const REQUIRED = 1; - public const OPTIONAL = 2; - public const IS_ARRAY = 4; - - private $name; - private $mode; - private $default; - private $description; - - /** - * @param string $name The argument name - * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL - * @param string $description A description text - * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) - * - * @throws InvalidArgumentException When argument mode is not valid - */ - public function __construct(string $name, int $mode = null, string $description = '', $default = null) - { - if (null === $mode) { - $mode = self::OPTIONAL; - } elseif ($mode > 7 || $mode < 1) { - throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->mode = $mode; - $this->description = $description; - - $this->setDefault($default); - } - - /** - * Returns the argument name. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Returns true if the argument is required. - * - * @return bool true if parameter mode is self::REQUIRED, false otherwise - */ - public function isRequired() - { - return self::REQUIRED === (self::REQUIRED & $this->mode); - } - - /** - * Returns true if the argument can take multiple values. - * - * @return bool true if mode is self::IS_ARRAY, false otherwise - */ - public function isArray() - { - return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); - } - - /** - * Sets the default value. - * - * @param string|bool|int|float|array|null $default - * - * @throws LogicException When incorrect default value is given - */ - public function setDefault($default = null) - { - if (self::REQUIRED === $this->mode && null !== $default) { - throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!\is_array($default)) { - throw new LogicException('A default value for an array argument must be an array.'); - } - } - - $this->default = $default; - } - - /** - * Returns the default value. - * - * @return string|bool|int|float|array|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns the description text. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } -} diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php deleted file mode 100644 index 5a288de..0000000 --- a/vendor/symfony/console/Input/InputAwareInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -/** - * InputAwareInterface should be implemented by classes that depends on the - * Console Input. - * - * @author Wouter J - */ -interface InputAwareInterface -{ - /** - * Sets the Console Input. - */ - public function setInput(InputInterface $input); -} diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php deleted file mode 100644 index 11f704f..0000000 --- a/vendor/symfony/console/Input/InputDefinition.php +++ /dev/null @@ -1,424 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * A InputDefinition represents a set of valid command line arguments and options. - * - * Usage: - * - * $definition = new InputDefinition([ - * new InputArgument('name', InputArgument::REQUIRED), - * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), - * ]); - * - * @author Fabien Potencier - */ -class InputDefinition -{ - private $arguments; - private $requiredCount; - private $lastArrayArgument; - private $lastOptionalArgument; - private $options; - private $negations; - private $shortcuts; - - /** - * @param array $definition An array of InputArgument and InputOption instance - */ - public function __construct(array $definition = []) - { - $this->setDefinition($definition); - } - - /** - * Sets the definition of the input. - */ - public function setDefinition(array $definition) - { - $arguments = []; - $options = []; - foreach ($definition as $item) { - if ($item instanceof InputOption) { - $options[] = $item; - } else { - $arguments[] = $item; - } - } - - $this->setArguments($arguments); - $this->setOptions($options); - } - - /** - * Sets the InputArgument objects. - * - * @param InputArgument[] $arguments An array of InputArgument objects - */ - public function setArguments(array $arguments = []) - { - $this->arguments = []; - $this->requiredCount = 0; - $this->lastOptionalArgument = null; - $this->lastArrayArgument = null; - $this->addArguments($arguments); - } - - /** - * Adds an array of InputArgument objects. - * - * @param InputArgument[] $arguments An array of InputArgument objects - */ - public function addArguments(?array $arguments = []) - { - if (null !== $arguments) { - foreach ($arguments as $argument) { - $this->addArgument($argument); - } - } - } - - /** - * @throws LogicException When incorrect argument is given - */ - public function addArgument(InputArgument $argument) - { - if (isset($this->arguments[$argument->getName()])) { - throw new LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName())); - } - - if (null !== $this->lastArrayArgument) { - throw new LogicException(sprintf('Cannot add a required argument "%s" after an array argument "%s".', $argument->getName(), $this->lastArrayArgument->getName())); - } - - if ($argument->isRequired() && null !== $this->lastOptionalArgument) { - throw new LogicException(sprintf('Cannot add a required argument "%s" after an optional one "%s".', $argument->getName(), $this->lastOptionalArgument->getName())); - } - - if ($argument->isArray()) { - $this->lastArrayArgument = $argument; - } - - if ($argument->isRequired()) { - ++$this->requiredCount; - } else { - $this->lastOptionalArgument = $argument; - } - - $this->arguments[$argument->getName()] = $argument; - } - - /** - * Returns an InputArgument by name or by position. - * - * @param string|int $name The InputArgument name or position - * - * @return InputArgument - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function getArgument($name) - { - if (!$this->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; - - return $arguments[$name]; - } - - /** - * Returns true if an InputArgument object exists by name or position. - * - * @param string|int $name The InputArgument name or position - * - * @return bool - */ - public function hasArgument($name) - { - $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; - - return isset($arguments[$name]); - } - - /** - * Gets the array of InputArgument objects. - * - * @return InputArgument[] - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Returns the number of InputArguments. - * - * @return int - */ - public function getArgumentCount() - { - return null !== $this->lastArrayArgument ? \PHP_INT_MAX : \count($this->arguments); - } - - /** - * Returns the number of required InputArguments. - * - * @return int - */ - public function getArgumentRequiredCount() - { - return $this->requiredCount; - } - - /** - * @return array - */ - public function getArgumentDefaults() - { - $values = []; - foreach ($this->arguments as $argument) { - $values[$argument->getName()] = $argument->getDefault(); - } - - return $values; - } - - /** - * Sets the InputOption objects. - * - * @param InputOption[] $options An array of InputOption objects - */ - public function setOptions(array $options = []) - { - $this->options = []; - $this->shortcuts = []; - $this->negations = []; - $this->addOptions($options); - } - - /** - * Adds an array of InputOption objects. - * - * @param InputOption[] $options An array of InputOption objects - */ - public function addOptions(array $options = []) - { - foreach ($options as $option) { - $this->addOption($option); - } - } - - /** - * @throws LogicException When option given already exist - */ - public function addOption(InputOption $option) - { - if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { - throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName())); - } - if (isset($this->negations[$option->getName()])) { - throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName())); - } - - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) { - throw new LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut)); - } - } - } - - $this->options[$option->getName()] = $option; - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - $this->shortcuts[$shortcut] = $option->getName(); - } - } - - if ($option->isNegatable()) { - $negatedName = 'no-'.$option->getName(); - if (isset($this->options[$negatedName])) { - throw new LogicException(sprintf('An option named "%s" already exists.', $negatedName)); - } - $this->negations[$negatedName] = $option->getName(); - } - } - - /** - * Returns an InputOption by name. - * - * @return InputOption - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function getOption(string $name) - { - if (!$this->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); - } - - return $this->options[$name]; - } - - /** - * Returns true if an InputOption object exists by name. - * - * This method can't be used to check if the user included the option when - * executing the command (use getOption() instead). - * - * @return bool - */ - public function hasOption(string $name) - { - return isset($this->options[$name]); - } - - /** - * Gets the array of InputOption objects. - * - * @return InputOption[] - */ - public function getOptions() - { - return $this->options; - } - - /** - * Returns true if an InputOption object exists by shortcut. - * - * @return bool - */ - public function hasShortcut(string $name) - { - return isset($this->shortcuts[$name]); - } - - /** - * Returns true if an InputOption object exists by negated name. - */ - public function hasNegation(string $name): bool - { - return isset($this->negations[$name]); - } - - /** - * Gets an InputOption by shortcut. - * - * @return InputOption - */ - public function getOptionForShortcut(string $shortcut) - { - return $this->getOption($this->shortcutToName($shortcut)); - } - - /** - * @return array - */ - public function getOptionDefaults() - { - $values = []; - foreach ($this->options as $option) { - $values[$option->getName()] = $option->getDefault(); - } - - return $values; - } - - /** - * Returns the InputOption name given a shortcut. - * - * @throws InvalidArgumentException When option given does not exist - * - * @internal - */ - public function shortcutToName(string $shortcut): string - { - if (!isset($this->shortcuts[$shortcut])) { - throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - return $this->shortcuts[$shortcut]; - } - - /** - * Returns the InputOption name given a negation. - * - * @throws InvalidArgumentException When option given does not exist - * - * @internal - */ - public function negationToName(string $negation): string - { - if (!isset($this->negations[$negation])) { - throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $negation)); - } - - return $this->negations[$negation]; - } - - /** - * Gets the synopsis. - * - * @return string - */ - public function getSynopsis(bool $short = false) - { - $elements = []; - - if ($short && $this->getOptions()) { - $elements[] = '[options]'; - } elseif (!$short) { - foreach ($this->getOptions() as $option) { - $value = ''; - if ($option->acceptValue()) { - $value = sprintf( - ' %s%s%s', - $option->isValueOptional() ? '[' : '', - strtoupper($option->getName()), - $option->isValueOptional() ? ']' : '' - ); - } - - $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; - $negation = $option->isNegatable() ? sprintf('|--no-%s', $option->getName()) : ''; - $elements[] = sprintf('[%s--%s%s%s]', $shortcut, $option->getName(), $value, $negation); - } - } - - if (\count($elements) && $this->getArguments()) { - $elements[] = '[--]'; - } - - $tail = ''; - foreach ($this->getArguments() as $argument) { - $element = '<'.$argument->getName().'>'; - if ($argument->isArray()) { - $element .= '...'; - } - - if (!$argument->isRequired()) { - $element = '['.$element; - $tail .= ']'; - } - - $elements[] = $element; - } - - return implode(' ', $elements).$tail; - } -} diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php deleted file mode 100644 index 628b603..0000000 --- a/vendor/symfony/console/Input/InputInterface.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * InputInterface is the interface implemented by all input classes. - * - * @author Fabien Potencier - */ -interface InputInterface -{ - /** - * Returns the first argument from the raw parameters (not parsed). - * - * @return string|null - */ - public function getFirstArgument(); - - /** - * Returns true if the raw parameters (not parsed) contain a value. - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * Does not necessarily return the correct result for short options - * when multiple flags are combined in the same option. - * - * @param string|array $values The values to look for in the raw parameters (can be an array) - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal - * - * @return bool - */ - public function hasParameterOption($values, bool $onlyParams = false); - - /** - * Returns the value of a raw option (not parsed). - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * Does not necessarily return the correct result for short options - * when multiple flags are combined in the same option. - * - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) - * @param string|bool|int|float|array|null $default The default value to return if no result is found - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal - * - * @return mixed - */ - public function getParameterOption($values, $default = false, bool $onlyParams = false); - - /** - * Binds the current Input instance with the given arguments and options. - * - * @throws RuntimeException - */ - public function bind(InputDefinition $definition); - - /** - * Validates the input. - * - * @throws RuntimeException When not enough arguments are given - */ - public function validate(); - - /** - * Returns all the given arguments merged with the default values. - * - * @return array - */ - public function getArguments(); - - /** - * Returns the argument value for a given argument name. - * - * @return mixed - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function getArgument(string $name); - - /** - * Sets an argument value by name. - * - * @param mixed $value The argument value - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - public function setArgument(string $name, $value); - - /** - * Returns true if an InputArgument object exists by name or position. - * - * @return bool - */ - public function hasArgument(string $name); - - /** - * Returns all the given options merged with the default values. - * - * @return array - */ - public function getOptions(); - - /** - * Returns the option value for a given option name. - * - * @return mixed - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function getOption(string $name); - - /** - * Sets an option value by name. - * - * @param mixed $value The option value - * - * @throws InvalidArgumentException When option given doesn't exist - */ - public function setOption(string $name, $value); - - /** - * Returns true if an InputOption object exists by name. - * - * @return bool - */ - public function hasOption(string $name); - - /** - * Is this input means interactive? - * - * @return bool - */ - public function isInteractive(); - - /** - * Sets the input interactivity. - */ - public function setInteractive(bool $interactive); -} diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php deleted file mode 100644 index 2bec34f..0000000 --- a/vendor/symfony/console/Input/InputOption.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a command line option. - * - * @author Fabien Potencier - */ -class InputOption -{ - /** - * Do not accept input for the option (e.g. --yell). This is the default behavior of options. - */ - public const VALUE_NONE = 1; - - /** - * A value must be passed when the option is used (e.g. --iterations=5 or -i5). - */ - public const VALUE_REQUIRED = 2; - - /** - * The option may or may not have a value (e.g. --yell or --yell=loud). - */ - public const VALUE_OPTIONAL = 4; - - /** - * The option accepts multiple values (e.g. --dir=/foo --dir=/bar). - */ - public const VALUE_IS_ARRAY = 8; - - /** - * The option may have either positive or negative value (e.g. --ansi or --no-ansi). - */ - public const VALUE_NEGATABLE = 16; - - private $name; - private $shortcut; - private $mode; - private $default; - private $description; - - /** - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the VALUE_* constants - * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE) - * - * @throws InvalidArgumentException If option mode is invalid or incompatible - */ - public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) - { - if (str_starts_with($name, '--')) { - $name = substr($name, 2); - } - - if (empty($name)) { - throw new InvalidArgumentException('An option name cannot be empty.'); - } - - if (empty($shortcut)) { - $shortcut = null; - } - - if (null !== $shortcut) { - if (\is_array($shortcut)) { - $shortcut = implode('|', $shortcut); - } - $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); - $shortcuts = array_filter($shortcuts); - $shortcut = implode('|', $shortcuts); - - if (empty($shortcut)) { - throw new InvalidArgumentException('An option shortcut cannot be empty.'); - } - } - - if (null === $mode) { - $mode = self::VALUE_NONE; - } elseif ($mode >= (self::VALUE_NEGATABLE << 1) || $mode < 1) { - throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->shortcut = $shortcut; - $this->mode = $mode; - $this->description = $description; - - if ($this->isArray() && !$this->acceptValue()) { - throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); - } - if ($this->isNegatable() && $this->acceptValue()) { - throw new InvalidArgumentException('Impossible to have an option mode VALUE_NEGATABLE if the option also accepts a value.'); - } - - $this->setDefault($default); - } - - /** - * Returns the option shortcut. - * - * @return string|null - */ - public function getShortcut() - { - return $this->shortcut; - } - - /** - * Returns the option name. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Returns true if the option accepts a value. - * - * @return bool true if value mode is not self::VALUE_NONE, false otherwise - */ - public function acceptValue() - { - return $this->isValueRequired() || $this->isValueOptional(); - } - - /** - * Returns true if the option requires a value. - * - * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise - */ - public function isValueRequired() - { - return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); - } - - /** - * Returns true if the option takes an optional value. - * - * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise - */ - public function isValueOptional() - { - return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); - } - - /** - * Returns true if the option can take multiple values. - * - * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise - */ - public function isArray() - { - return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); - } - - public function isNegatable(): bool - { - return self::VALUE_NEGATABLE === (self::VALUE_NEGATABLE & $this->mode); - } - - /** - * @param string|bool|int|float|array|null $default - */ - public function setDefault($default = null) - { - if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { - throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!\is_array($default)) { - throw new LogicException('A default value for an array option must be an array.'); - } - } - - $this->default = $this->acceptValue() || $this->isNegatable() ? $default : false; - } - - /** - * Returns the default value. - * - * @return string|bool|int|float|array|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns the description text. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Checks whether the given option equals this one. - * - * @return bool - */ - public function equals(self $option) - { - return $option->getName() === $this->getName() - && $option->getShortcut() === $this->getShortcut() - && $option->getDefault() === $this->getDefault() - && $option->isNegatable() === $this->isNegatable() - && $option->isArray() === $this->isArray() - && $option->isValueRequired() === $this->isValueRequired() - && $option->isValueOptional() === $this->isValueOptional() - ; - } -} diff --git a/vendor/symfony/console/Input/StreamableInputInterface.php b/vendor/symfony/console/Input/StreamableInputInterface.php deleted file mode 100644 index d7e462f..0000000 --- a/vendor/symfony/console/Input/StreamableInputInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -/** - * StreamableInputInterface is the interface implemented by all input classes - * that have an input stream. - * - * @author Robin Chalas - */ -interface StreamableInputInterface extends InputInterface -{ - /** - * Sets the input stream to read from when interacting with the user. - * - * This is mainly useful for testing purpose. - * - * @param resource $stream The input stream - */ - public function setStream($stream); - - /** - * Returns the input stream. - * - * @return resource|null - */ - public function getStream(); -} diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php deleted file mode 100644 index 56bb66c..0000000 --- a/vendor/symfony/console/Input/StringInput.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * StringInput represents an input provided as a string. - * - * Usage: - * - * $input = new StringInput('foo --bar="foobar"'); - * - * @author Fabien Potencier - */ -class StringInput extends ArgvInput -{ - public const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); - } - - /** - * Tokenizes a string. - * - * @throws InvalidArgumentException When unable to parse input (should never happen) - */ - private function tokenize(string $input): array - { - $tokens = []; - $length = \strlen($input); - $cursor = 0; - $token = null; - while ($cursor < $length) { - if ('\\' === $input[$cursor]) { - $token .= $input[++$cursor] ?? ''; - ++$cursor; - continue; - } - - if (preg_match('/\s+/A', $input, $match, 0, $cursor)) { - if (null !== $token) { - $tokens[] = $token; - $token = null; - } - } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) { - $token .= $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1))); - } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) { - $token .= stripcslashes(substr($match[0], 1, -1)); - } elseif (preg_match('/'.self::REGEX_UNQUOTED_STRING.'/A', $input, $match, 0, $cursor)) { - $token .= $match[1]; - } else { - // should never happen - throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10))); - } - - $cursor += \strlen($match[0]); - } - - if (null !== $token) { - $tokens[] = $token; - } - - return $tokens; - } -} diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/console/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php deleted file mode 100644 index c9ee035..0000000 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Logger; - -use Psr\Log\AbstractLogger; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * PSR-3 compliant console logger. - * - * @author Kévin Dunglas - * - * @see https://www.php-fig.org/psr/psr-3/ - */ -class ConsoleLogger extends AbstractLogger -{ - public const INFO = 'info'; - public const ERROR = 'error'; - - private $output; - private $verbosityLevelMap = [ - LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, - LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, - LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, - LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, - LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, - LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, - ]; - private $formatLevelMap = [ - LogLevel::EMERGENCY => self::ERROR, - LogLevel::ALERT => self::ERROR, - LogLevel::CRITICAL => self::ERROR, - LogLevel::ERROR => self::ERROR, - LogLevel::WARNING => self::INFO, - LogLevel::NOTICE => self::INFO, - LogLevel::INFO => self::INFO, - LogLevel::DEBUG => self::INFO, - ]; - private $errored = false; - - public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = []) - { - $this->output = $output; - $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; - $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function log($level, $message, array $context = []) - { - if (!isset($this->verbosityLevelMap[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); - } - - $output = $this->output; - - // Write to the error output if necessary and available - if (self::ERROR === $this->formatLevelMap[$level]) { - if ($this->output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - $this->errored = true; - } - - // the if condition check isn't necessary -- it's the same one that $output will do internally anyway. - // We only do it for efficiency here as the message formatting is relatively expensive. - if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) { - $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]); - } - } - - /** - * Returns true when any messages have been logged at error levels. - * - * @return bool - */ - public function hasErrored() - { - return $this->errored; - } - - /** - * Interpolates context values into the message placeholders. - * - * @author PHP Framework Interoperability Group - */ - private function interpolate(string $message, array $context): string - { - if (!str_contains($message, '{')) { - return $message; - } - - $replacements = []; - foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { - $replacements["{{$key}}"] = $val; - } elseif ($val instanceof \DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); - } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; - } else { - $replacements["{{$key}}"] = '['.\gettype($val).']'; - } - } - - return strtr($message, $replacements); - } -} diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php deleted file mode 100644 index d37c6e3..0000000 --- a/vendor/symfony/console/Output/BufferedOutput.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -/** - * @author Jean-François Simon - */ -class BufferedOutput extends Output -{ - private $buffer = ''; - - /** - * Empties buffer and returns its content. - * - * @return string - */ - public function fetch() - { - $content = $this->buffer; - $this->buffer = ''; - - return $content; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $message, bool $newline) - { - $this->buffer .= $message; - - if ($newline) { - $this->buffer .= \PHP_EOL; - } - } -} diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php deleted file mode 100644 index f19f9eb..0000000 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR. - * - * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR. - * - * $output = new ConsoleOutput(); - * - * This is equivalent to: - * - * $output = new StreamOutput(fopen('php://stdout', 'w')); - * $stdErr = new StreamOutput(fopen('php://stderr', 'w')); - * - * @author Fabien Potencier - */ -class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface -{ - private $stderr; - private $consoleSectionOutputs = []; - - /** - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - */ - public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) - { - parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter); - - if (null === $formatter) { - // for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter. - $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated); - - return; - } - - $actualDecorated = $this->isDecorated(); - $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter()); - - if (null === $decorated) { - $this->setDecorated($actualDecorated && $this->stderr->isDecorated()); - } - } - - /** - * Creates a new output section. - */ - public function section(): ConsoleSectionOutput - { - return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter()); - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated) - { - parent::setDecorated($decorated); - $this->stderr->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - parent::setFormatter($formatter); - $this->stderr->setFormatter($formatter); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity(int $level) - { - parent::setVerbosity($level); - $this->stderr->setVerbosity($level); - } - - /** - * {@inheritdoc} - */ - public function getErrorOutput() - { - return $this->stderr; - } - - /** - * {@inheritdoc} - */ - public function setErrorOutput(OutputInterface $error) - { - $this->stderr = $error; - } - - /** - * Returns true if current environment supports writing console output to - * STDOUT. - * - * @return bool - */ - protected function hasStdoutSupport() - { - return false === $this->isRunningOS400(); - } - - /** - * Returns true if current environment supports writing console output to - * STDERR. - * - * @return bool - */ - protected function hasStderrSupport() - { - return false === $this->isRunningOS400(); - } - - /** - * Checks if current executing environment is IBM iSeries (OS400), which - * doesn't properly convert character-encodings between ASCII to EBCDIC. - */ - private function isRunningOS400(): bool - { - $checks = [ - \function_exists('php_uname') ? php_uname('s') : '', - getenv('OSTYPE'), - \PHP_OS, - ]; - - return false !== stripos(implode(';', $checks), 'OS400'); - } - - /** - * @return resource - */ - private function openOutputStream() - { - if (!$this->hasStdoutSupport()) { - return fopen('php://output', 'w'); - } - - // Use STDOUT when possible to prevent from opening too many file descriptors - return \defined('STDOUT') ? \STDOUT : (@fopen('php://stdout', 'w') ?: fopen('php://output', 'w')); - } - - /** - * @return resource - */ - private function openErrorStream() - { - if (!$this->hasStderrSupport()) { - return fopen('php://output', 'w'); - } - - // Use STDERR when possible to prevent from opening too many file descriptors - return \defined('STDERR') ? \STDERR : (@fopen('php://stderr', 'w') ?: fopen('php://output', 'w')); - } -} diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php deleted file mode 100644 index 6b6635f..0000000 --- a/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -/** - * ConsoleOutputInterface is the interface implemented by ConsoleOutput class. - * This adds information about stderr and section output stream. - * - * @author Dariusz Górecki - */ -interface ConsoleOutputInterface extends OutputInterface -{ - /** - * Gets the OutputInterface for errors. - * - * @return OutputInterface - */ - public function getErrorOutput(); - - public function setErrorOutput(OutputInterface $error); - - public function section(): ConsoleSectionOutput; -} diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php deleted file mode 100644 index 8f16497..0000000 --- a/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Terminal; - -/** - * @author Pierre du Plessis - * @author Gabriel Ostrolucký - */ -class ConsoleSectionOutput extends StreamOutput -{ - private $content = []; - private $lines = 0; - private $sections; - private $terminal; - - /** - * @param resource $stream - * @param ConsoleSectionOutput[] $sections - */ - public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter) - { - parent::__construct($stream, $verbosity, $decorated, $formatter); - array_unshift($sections, $this); - $this->sections = &$sections; - $this->terminal = new Terminal(); - } - - /** - * Clears previous output for this section. - * - * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared - */ - public function clear(int $lines = null) - { - if (empty($this->content) || !$this->isDecorated()) { - return; - } - - if ($lines) { - array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content - } else { - $lines = $this->lines; - $this->content = []; - } - - $this->lines -= $lines; - - parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false); - } - - /** - * Overwrites the previous output with a new message. - * - * @param array|string $message - */ - public function overwrite($message) - { - $this->clear(); - $this->writeln($message); - } - - public function getContent(): string - { - return implode('', $this->content); - } - - /** - * @internal - */ - public function addContent(string $input) - { - foreach (explode(\PHP_EOL, $input) as $lineContent) { - $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; - $this->content[] = $lineContent; - $this->content[] = \PHP_EOL; - } - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $message, bool $newline) - { - if (!$this->isDecorated()) { - parent::doWrite($message, $newline); - - return; - } - - $erasedContent = $this->popStreamContentUntilCurrentSection(); - - $this->addContent($message); - - parent::doWrite($message, true); - parent::doWrite($erasedContent, false); - } - - /** - * At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits - * current section. Then it erases content it crawled through. Optionally, it erases part of current section too. - */ - private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0): string - { - $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection; - $erasedContent = []; - - foreach ($this->sections as $section) { - if ($section === $this) { - break; - } - - $numberOfLinesToClear += $section->lines; - $erasedContent[] = $section->getContent(); - } - - if ($numberOfLinesToClear > 0) { - // move cursor up n lines - parent::doWrite(sprintf("\x1b[%dA", $numberOfLinesToClear), false); - // erase to end of screen - parent::doWrite("\x1b[0J", false); - } - - return implode('', array_reverse($erasedContent)); - } - - private function getDisplayLength(string $text): int - { - return Helper::width(Helper::removeDecoration($this->getFormatter(), str_replace("\t", ' ', $text))); - } -} diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php deleted file mode 100644 index 3bbe63e..0000000 --- a/vendor/symfony/console/Output/NullOutput.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\NullOutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * NullOutput suppresses all output. - * - * $output = new NullOutput(); - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class NullOutput implements OutputInterface -{ - private $formatter; - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - if ($this->formatter) { - return $this->formatter; - } - // to comply with the interface we must return a OutputFormatterInterface - return $this->formatter = new NullOutputFormatter(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function setVerbosity(int $level) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return self::VERBOSITY_QUIET; - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, int $options = self::OUTPUT_NORMAL) - { - // do nothing - } - - /** - * {@inheritdoc} - */ - public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) - { - // do nothing - } -} diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php deleted file mode 100644 index d7c5fb2..0000000 --- a/vendor/symfony/console/Output/Output.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * Base class for output classes. - * - * There are five levels of verbosity: - * - * * normal: no option passed (normal output) - * * verbose: -v (more output) - * * very verbose: -vv (highly extended output) - * * debug: -vvv (all debug output) - * * quiet: -q (no output) - * - * @author Fabien Potencier - */ -abstract class Output implements OutputInterface -{ - private $verbosity; - private $formatter; - - /** - * @param int|null $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool $decorated Whether to decorate messages - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - */ - public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) - { - $this->verbosity = $verbosity ?? self::VERBOSITY_NORMAL; - $this->formatter = $formatter ?? new OutputFormatter(); - $this->formatter->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - $this->formatter = $formatter; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->formatter; - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated) - { - $this->formatter->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->formatter->isDecorated(); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity(int $level) - { - $this->verbosity = $level; - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return self::VERBOSITY_QUIET === $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return self::VERBOSITY_VERBOSE <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return self::VERBOSITY_DEBUG <= $this->verbosity; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, int $options = self::OUTPUT_NORMAL) - { - $this->write($messages, true, $options); - } - - /** - * {@inheritdoc} - */ - public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN; - $type = $types & $options ?: self::OUTPUT_NORMAL; - - $verbosities = self::VERBOSITY_QUIET | self::VERBOSITY_NORMAL | self::VERBOSITY_VERBOSE | self::VERBOSITY_VERY_VERBOSE | self::VERBOSITY_DEBUG; - $verbosity = $verbosities & $options ?: self::VERBOSITY_NORMAL; - - if ($verbosity > $this->getVerbosity()) { - return; - } - - foreach ($messages as $message) { - switch ($type) { - case OutputInterface::OUTPUT_NORMAL: - $message = $this->formatter->format($message); - break; - case OutputInterface::OUTPUT_RAW: - break; - case OutputInterface::OUTPUT_PLAIN: - $message = strip_tags($this->formatter->format($message)); - break; - } - - $this->doWrite($message ?? '', $newline); - } - } - - /** - * Writes a message to the output. - */ - abstract protected function doWrite(string $message, bool $newline); -} diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php deleted file mode 100644 index 55caab8..0000000 --- a/vendor/symfony/console/Output/OutputInterface.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * OutputInterface is the interface implemented by all Output classes. - * - * @author Fabien Potencier - */ -interface OutputInterface -{ - public const VERBOSITY_QUIET = 16; - public const VERBOSITY_NORMAL = 32; - public const VERBOSITY_VERBOSE = 64; - public const VERBOSITY_VERY_VERBOSE = 128; - public const VERBOSITY_DEBUG = 256; - - public const OUTPUT_NORMAL = 1; - public const OUTPUT_RAW = 2; - public const OUTPUT_PLAIN = 4; - - /** - * Writes a message to the output. - * - * @param string|iterable $messages The message as an iterable of strings or a single string - * @param bool $newline Whether to add a newline - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - */ - public function write($messages, bool $newline = false, int $options = 0); - - /** - * Writes a message to the output and adds a newline at the end. - * - * @param string|iterable $messages The message as an iterable of strings or a single string - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL - */ - public function writeln($messages, int $options = 0); - - /** - * Sets the verbosity of the output. - */ - public function setVerbosity(int $level); - - /** - * Gets the current verbosity of the output. - * - * @return int - */ - public function getVerbosity(); - - /** - * Returns whether verbosity is quiet (-q). - * - * @return bool - */ - public function isQuiet(); - - /** - * Returns whether verbosity is verbose (-v). - * - * @return bool - */ - public function isVerbose(); - - /** - * Returns whether verbosity is very verbose (-vv). - * - * @return bool - */ - public function isVeryVerbose(); - - /** - * Returns whether verbosity is debug (-vvv). - * - * @return bool - */ - public function isDebug(); - - /** - * Sets the decorated flag. - */ - public function setDecorated(bool $decorated); - - /** - * Gets the decorated flag. - * - * @return bool - */ - public function isDecorated(); - - public function setFormatter(OutputFormatterInterface $formatter); - - /** - * Returns current output formatter instance. - * - * @return OutputFormatterInterface - */ - public function getFormatter(); -} diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php deleted file mode 100644 index 7f55518..0000000 --- a/vendor/symfony/console/Output/StreamOutput.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * StreamOutput writes the output to a given stream. - * - * Usage: - * - * $output = new StreamOutput(fopen('php://stdout', 'w')); - * - * As `StreamOutput` can use any stream, you can also use a file: - * - * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); - * - * @author Fabien Potencier - */ -class StreamOutput extends Output -{ - private $stream; - - /** - * @param resource $stream A stream resource - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) - * - * @throws InvalidArgumentException When first argument is not a real stream - */ - public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); - } - - $this->stream = $stream; - - if (null === $decorated) { - $decorated = $this->hasColorSupport(); - } - - parent::__construct($verbosity, $decorated, $formatter); - } - - /** - * Gets the stream attached to this StreamOutput instance. - * - * @return resource - */ - public function getStream() - { - return $this->stream; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $message, bool $newline) - { - if ($newline) { - $message .= \PHP_EOL; - } - - @fwrite($this->stream, $message); - - fflush($this->stream); - } - - /** - * Returns true if the stream supports colorization. - * - * Colorization is disabled if not supported by the stream: - * - * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo - * terminals via named pipes, so we can only check the environment. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @return bool true if the stream supports colorization, false otherwise - */ - protected function hasColorSupport() - { - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($this->stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return stream_isatty($this->stream); - } -} diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php deleted file mode 100644 index 3f4d375..0000000 --- a/vendor/symfony/console/Output/TrimmedBufferOutput.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Output; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; - -/** - * A BufferedOutput that keeps only the last N chars. - * - * @author Jérémy Derussé - */ -class TrimmedBufferOutput extends Output -{ - private $maxLength; - private $buffer = ''; - - public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) - { - if ($maxLength <= 0) { - throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength)); - } - - parent::__construct($verbosity, $decorated, $formatter); - $this->maxLength = $maxLength; - } - - /** - * Empties buffer and returns its content. - * - * @return string - */ - public function fetch() - { - $content = $this->buffer; - $this->buffer = ''; - - return $content; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $message, bool $newline) - { - $this->buffer .= $message; - - if ($newline) { - $this->buffer .= \PHP_EOL; - } - - $this->buffer = substr($this->buffer, 0 - $this->maxLength); - } -} diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php deleted file mode 100644 index bf1f904..0000000 --- a/vendor/symfony/console/Question/ChoiceQuestion.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -use Symfony\Component\Console\Exception\InvalidArgumentException; - -/** - * Represents a choice question. - * - * @author Fabien Potencier - */ -class ChoiceQuestion extends Question -{ - private $choices; - private $multiselect = false; - private $prompt = ' > '; - private $errorMessage = 'Value "%s" is invalid'; - - /** - * @param string $question The question to ask to the user - * @param array $choices The list of available choices - * @param mixed $default The default answer to return - */ - public function __construct(string $question, array $choices, $default = null) - { - if (!$choices) { - throw new \LogicException('Choice question must have at least 1 choice available.'); - } - - parent::__construct($question, $default); - - $this->choices = $choices; - $this->setValidator($this->getDefaultValidator()); - $this->setAutocompleterValues($choices); - } - - /** - * Returns available choices. - * - * @return array - */ - public function getChoices() - { - return $this->choices; - } - - /** - * Sets multiselect option. - * - * When multiselect is set to true, multiple choices can be answered. - * - * @return $this - */ - public function setMultiselect(bool $multiselect) - { - $this->multiselect = $multiselect; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - /** - * Returns whether the choices are multiselect. - * - * @return bool - */ - public function isMultiselect() - { - return $this->multiselect; - } - - /** - * Gets the prompt for choices. - * - * @return string - */ - public function getPrompt() - { - return $this->prompt; - } - - /** - * Sets the prompt for choices. - * - * @return $this - */ - public function setPrompt(string $prompt) - { - $this->prompt = $prompt; - - return $this; - } - - /** - * Sets the error message for invalid values. - * - * The error message has a string placeholder (%s) for the invalid value. - * - * @return $this - */ - public function setErrorMessage(string $errorMessage) - { - $this->errorMessage = $errorMessage; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - private function getDefaultValidator(): callable - { - $choices = $this->choices; - $errorMessage = $this->errorMessage; - $multiselect = $this->multiselect; - $isAssoc = $this->isAssoc($choices); - - return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { - if ($multiselect) { - // Check for a separated comma values - if (!preg_match('/^[^,]+(?:,[^,]+)*$/', (string) $selected, $matches)) { - throw new InvalidArgumentException(sprintf($errorMessage, $selected)); - } - - $selectedChoices = explode(',', (string) $selected); - } else { - $selectedChoices = [$selected]; - } - - if ($this->isTrimmable()) { - foreach ($selectedChoices as $k => $v) { - $selectedChoices[$k] = trim((string) $v); - } - } - - $multiselectChoices = []; - foreach ($selectedChoices as $value) { - $results = []; - foreach ($choices as $key => $choice) { - if ($choice === $value) { - $results[] = $key; - } - } - - if (\count($results) > 1) { - throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of "%s".', implode('" or "', $results))); - } - - $result = array_search($value, $choices); - - if (!$isAssoc) { - if (false !== $result) { - $result = $choices[$result]; - } elseif (isset($choices[$value])) { - $result = $choices[$value]; - } - } elseif (false === $result && isset($choices[$value])) { - $result = $value; - } - - if (false === $result) { - throw new InvalidArgumentException(sprintf($errorMessage, $value)); - } - - // For associative choices, consistently return the key as string: - $multiselectChoices[] = $isAssoc ? (string) $result : $result; - } - - if ($multiselect) { - return $multiselectChoices; - } - - return current($multiselectChoices); - }; - } -} diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php deleted file mode 100644 index 4228521..0000000 --- a/vendor/symfony/console/Question/ConfirmationQuestion.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -/** - * Represents a yes/no question. - * - * @author Fabien Potencier - */ -class ConfirmationQuestion extends Question -{ - private $trueAnswerRegex; - - /** - * @param string $question The question to ask to the user - * @param bool $default The default answer to return, true or false - * @param string $trueAnswerRegex A regex to match the "yes" answer - */ - public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') - { - parent::__construct($question, $default); - - $this->trueAnswerRegex = $trueAnswerRegex; - $this->setNormalizer($this->getDefaultNormalizer()); - } - - /** - * Returns the default answer normalizer. - */ - private function getDefaultNormalizer(): callable - { - $default = $this->getDefault(); - $regex = $this->trueAnswerRegex; - - return function ($answer) use ($default, $regex) { - if (\is_bool($answer)) { - return $answer; - } - - $answerIsTrue = (bool) preg_match($regex, $answer); - if (false === $default) { - return $answer && $answerIsTrue; - } - - return '' === $answer || $answerIsTrue; - }; - } -} diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php deleted file mode 100644 index 3a73f04..0000000 --- a/vendor/symfony/console/Question/Question.php +++ /dev/null @@ -1,299 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Question; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; - -/** - * Represents a Question. - * - * @author Fabien Potencier - */ -class Question -{ - private $question; - private $attempts; - private $hidden = false; - private $hiddenFallback = true; - private $autocompleterCallback; - private $validator; - private $default; - private $normalizer; - private $trimmable = true; - private $multiline = false; - - /** - * @param string $question The question to ask to the user - * @param string|bool|int|float|null $default The default answer to return if the user enters nothing - */ - public function __construct(string $question, $default = null) - { - $this->question = $question; - $this->default = $default; - } - - /** - * Returns the question. - * - * @return string - */ - public function getQuestion() - { - return $this->question; - } - - /** - * Returns the default answer. - * - * @return string|bool|int|float|null - */ - public function getDefault() - { - return $this->default; - } - - /** - * Returns whether the user response accepts newline characters. - */ - public function isMultiline(): bool - { - return $this->multiline; - } - - /** - * Sets whether the user response should accept newline characters. - * - * @return $this - */ - public function setMultiline(bool $multiline): self - { - $this->multiline = $multiline; - - return $this; - } - - /** - * Returns whether the user response must be hidden. - * - * @return bool - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * Sets whether the user response must be hidden or not. - * - * @return $this - * - * @throws LogicException In case the autocompleter is also used - */ - public function setHidden(bool $hidden) - { - if ($this->autocompleterCallback) { - throw new LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->hidden = $hidden; - - return $this; - } - - /** - * In case the response cannot be hidden, whether to fallback on non-hidden question or not. - * - * @return bool - */ - public function isHiddenFallback() - { - return $this->hiddenFallback; - } - - /** - * Sets whether to fallback on non-hidden question if the response cannot be hidden. - * - * @return $this - */ - public function setHiddenFallback(bool $fallback) - { - $this->hiddenFallback = $fallback; - - return $this; - } - - /** - * Gets values for the autocompleter. - * - * @return iterable|null - */ - public function getAutocompleterValues() - { - $callback = $this->getAutocompleterCallback(); - - return $callback ? $callback('') : null; - } - - /** - * Sets values for the autocompleter. - * - * @return $this - * - * @throws LogicException - */ - public function setAutocompleterValues(?iterable $values) - { - if (\is_array($values)) { - $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); - - $callback = static function () use ($values) { - return $values; - }; - } elseif ($values instanceof \Traversable) { - $valueCache = null; - $callback = static function () use ($values, &$valueCache) { - return $valueCache ?? $valueCache = iterator_to_array($values, false); - }; - } else { - $callback = null; - } - - return $this->setAutocompleterCallback($callback); - } - - /** - * Gets the callback function used for the autocompleter. - */ - public function getAutocompleterCallback(): ?callable - { - return $this->autocompleterCallback; - } - - /** - * Sets the callback function used for the autocompleter. - * - * The callback is passed the user input as argument and should return an iterable of corresponding suggestions. - * - * @return $this - */ - public function setAutocompleterCallback(callable $callback = null): self - { - if ($this->hidden && null !== $callback) { - throw new LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->autocompleterCallback = $callback; - - return $this; - } - - /** - * Sets a validator for the question. - * - * @return $this - */ - public function setValidator(callable $validator = null) - { - $this->validator = $validator; - - return $this; - } - - /** - * Gets the validator for the question. - * - * @return callable|null - */ - public function getValidator() - { - return $this->validator; - } - - /** - * Sets the maximum number of attempts. - * - * Null means an unlimited number of attempts. - * - * @return $this - * - * @throws InvalidArgumentException in case the number of attempts is invalid - */ - public function setMaxAttempts(?int $attempts) - { - if (null !== $attempts && $attempts < 1) { - throw new InvalidArgumentException('Maximum number of attempts must be a positive value.'); - } - - $this->attempts = $attempts; - - return $this; - } - - /** - * Gets the maximum number of attempts. - * - * Null means an unlimited number of attempts. - * - * @return int|null - */ - public function getMaxAttempts() - { - return $this->attempts; - } - - /** - * Sets a normalizer for the response. - * - * The normalizer can be a callable (a string), a closure or a class implementing __invoke. - * - * @return $this - */ - public function setNormalizer(callable $normalizer) - { - $this->normalizer = $normalizer; - - return $this; - } - - /** - * Gets the normalizer for the response. - * - * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. - * - * @return callable|null - */ - public function getNormalizer() - { - return $this->normalizer; - } - - protected function isAssoc(array $array) - { - return (bool) \count(array_filter(array_keys($array), 'is_string')); - } - - public function isTrimmable(): bool - { - return $this->trimmable; - } - - /** - * @return $this - */ - public function setTrimmable(bool $trimmable): self - { - $this->trimmable = $trimmable; - - return $this; - } -} diff --git a/vendor/symfony/console/README.md b/vendor/symfony/console/README.md deleted file mode 100644 index c4c1299..0000000 --- a/vendor/symfony/console/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Console Component -================= - -The Console component eases the creation of beautiful and testable command line -interfaces. - -Sponsor -------- - -The Console component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2]. - -Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and -fix your projects. We provide a wide range of professional services including development, -consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps. -We are a worker cooperative! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/console.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -Credits -------- - -`Resources/bin/hiddeninput.exe` is a third party binary provided within this -component. Find sources and license at https://github.com/Seldaek/hidden-input. - -[1]: https://symfony.com/backers -[2]: https://les-tilleuls.coop -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/console/Resources/bin/hiddeninput.exe b/vendor/symfony/console/Resources/bin/hiddeninput.exe deleted file mode 100644 index c8cf65e..0000000 Binary files a/vendor/symfony/console/Resources/bin/hiddeninput.exe and /dev/null differ diff --git a/vendor/symfony/console/Resources/completion.bash b/vendor/symfony/console/Resources/completion.bash deleted file mode 100644 index c5e89c3..0000000 --- a/vendor/symfony/console/Resources/completion.bash +++ /dev/null @@ -1,81 +0,0 @@ -# This file is part of the Symfony package. -# -# (c) Fabien Potencier -# -# For the full copyright and license information, please view -# https://symfony.com/doc/current/contributing/code/license.html - -_sf_{{ COMMAND_NAME }}() { - # Use newline as only separator to allow space in completion values - IFS=$'\n' - local sf_cmd="${COMP_WORDS[0]}" - - # for an alias, get the real script behind it - if [[ $(type -t $sf_cmd) == "alias" ]]; then - sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/") - fi - - if [ ! -f "$sf_cmd" ]; then - return 1 - fi - - local cur prev words cword - _get_comp_words_by_ref -n := cur prev words cword - - local completecmd=("$sf_cmd" "_complete" "-sbash" "-c$cword" "-S{{ VERSION }}") - for w in ${words[@]}; do - w=$(printf -- '%b' "$w") - # remove quotes from typed values - quote="${w:0:1}" - if [ "$quote" == \' ]; then - w="${w%\'}" - w="${w#\'}" - elif [ "$quote" == \" ]; then - w="${w%\"}" - w="${w#\"}" - fi - # empty values are ignored - if [ ! -z "$w" ]; then - completecmd+=("-i$w") - fi - done - - local sfcomplete - if sfcomplete=$(${completecmd[@]} 2>&1); then - local quote suggestions - quote=${cur:0:1} - - # Use single quotes by default if suggestions contains backslash (FQCN) - if [ "$quote" == '' ] && [[ "$sfcomplete" =~ \\ ]]; then - quote=\' - fi - - if [ "$quote" == \' ]; then - # single quotes: no additional escaping (does not accept ' in values) - suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done) - elif [ "$quote" == \" ]; then - # double quotes: double escaping for \ $ ` " - suggestions=$(for s in $sfcomplete; do - s=${s//\\/\\\\} - s=${s//\$/\\\$} - s=${s//\`/\\\`} - s=${s//\"/\\\"} - printf $'%q%q%q\n' "$quote" "$s" "$quote"; - done) - else - # no quotes: double escaping - suggestions=$(for s in $sfcomplete; do printf $'%q\n' $(printf '%q' "$s"); done) - fi - COMPREPLY=($(IFS=$'\n' compgen -W "$suggestions" -- $(printf -- "%q" "$cur"))) - __ltrim_colon_completions "$cur" - else - if [[ "$sfcomplete" != *"Command \"_complete\" is not defined."* ]]; then - >&2 echo - >&2 echo $sfcomplete - fi - - return 1 - fi -} - -complete -F _sf_{{ COMMAND_NAME }} {{ COMMAND_NAME }} diff --git a/vendor/symfony/console/SignalRegistry/SignalRegistry.php b/vendor/symfony/console/SignalRegistry/SignalRegistry.php deleted file mode 100644 index ed93dd0..0000000 --- a/vendor/symfony/console/SignalRegistry/SignalRegistry.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\SignalRegistry; - -final class SignalRegistry -{ - private $signalHandlers = []; - - public function __construct() - { - if (\function_exists('pcntl_async_signals')) { - pcntl_async_signals(true); - } - } - - public function register(int $signal, callable $signalHandler): void - { - if (!isset($this->signalHandlers[$signal])) { - $previousCallback = pcntl_signal_get_handler($signal); - - if (\is_callable($previousCallback)) { - $this->signalHandlers[$signal][] = $previousCallback; - } - } - - $this->signalHandlers[$signal][] = $signalHandler; - - pcntl_signal($signal, [$this, 'handle']); - } - - public static function isSupported(): bool - { - if (!\function_exists('pcntl_signal')) { - return false; - } - - if (\in_array('pcntl_signal', explode(',', ini_get('disable_functions')))) { - return false; - } - - return true; - } - - /** - * @internal - */ - public function handle(int $signal): void - { - $count = \count($this->signalHandlers[$signal]); - - foreach ($this->signalHandlers[$signal] as $i => $signalHandler) { - $hasNext = $i !== $count - 1; - $signalHandler($signal, $hasNext); - } - } -} diff --git a/vendor/symfony/console/SingleCommandApplication.php b/vendor/symfony/console/SingleCommandApplication.php deleted file mode 100644 index e93c182..0000000 --- a/vendor/symfony/console/SingleCommandApplication.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * @author Grégoire Pineau - */ -class SingleCommandApplication extends Command -{ - private $version = 'UNKNOWN'; - private $autoExit = true; - private $running = false; - - /** - * @return $this - */ - public function setVersion(string $version): self - { - $this->version = $version; - - return $this; - } - - /** - * @final - * - * @return $this - */ - public function setAutoExit(bool $autoExit): self - { - $this->autoExit = $autoExit; - - return $this; - } - - public function run(InputInterface $input = null, OutputInterface $output = null): int - { - if ($this->running) { - return parent::run($input, $output); - } - - // We use the command name as the application name - $application = new Application($this->getName() ?: 'UNKNOWN', $this->version); - $application->setAutoExit($this->autoExit); - // Fix the usage of the command displayed with "--help" - $this->setName($_SERVER['argv'][0]); - $application->add($this); - $application->setDefaultCommand($this->getName(), true); - - $this->running = true; - try { - $ret = $application->run($input, $output); - } finally { - $this->running = false; - } - - return $ret ?? 1; - } -} diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php deleted file mode 100644 index 67a98ff..0000000 --- a/vendor/symfony/console/Style/OutputStyle.php +++ /dev/null @@ -1,153 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Decorates output to add console style guide helpers. - * - * @author Kevin Bond - */ -abstract class OutputStyle implements OutputInterface, StyleInterface -{ - private $output; - - public function __construct(OutputInterface $output) - { - $this->output = $output; - } - - /** - * {@inheritdoc} - */ - public function newLine(int $count = 1) - { - $this->output->write(str_repeat(\PHP_EOL, $count)); - } - - /** - * @return ProgressBar - */ - public function createProgressBar(int $max = 0) - { - return new ProgressBar($this->output, $max); - } - - /** - * {@inheritdoc} - */ - public function write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) - { - $this->output->write($messages, $newline, $type); - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, int $type = self::OUTPUT_NORMAL) - { - $this->output->writeln($messages, $type); - } - - /** - * {@inheritdoc} - */ - public function setVerbosity(int $level) - { - $this->output->setVerbosity($level); - } - - /** - * {@inheritdoc} - */ - public function getVerbosity() - { - return $this->output->getVerbosity(); - } - - /** - * {@inheritdoc} - */ - public function setDecorated(bool $decorated) - { - $this->output->setDecorated($decorated); - } - - /** - * {@inheritdoc} - */ - public function isDecorated() - { - return $this->output->isDecorated(); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(OutputFormatterInterface $formatter) - { - $this->output->setFormatter($formatter); - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - return $this->output->getFormatter(); - } - - /** - * {@inheritdoc} - */ - public function isQuiet() - { - return $this->output->isQuiet(); - } - - /** - * {@inheritdoc} - */ - public function isVerbose() - { - return $this->output->isVerbose(); - } - - /** - * {@inheritdoc} - */ - public function isVeryVerbose() - { - return $this->output->isVeryVerbose(); - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return $this->output->isDebug(); - } - - protected function getErrorOutput() - { - if (!$this->output instanceof ConsoleOutputInterface) { - return $this->output; - } - - return $this->output->getErrorOutput(); - } -} diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php deleted file mode 100644 index 38d23b7..0000000 --- a/vendor/symfony/console/Style/StyleInterface.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -/** - * Output style helpers. - * - * @author Kevin Bond - */ -interface StyleInterface -{ - /** - * Formats a command title. - */ - public function title(string $message); - - /** - * Formats a section title. - */ - public function section(string $message); - - /** - * Formats a list. - */ - public function listing(array $elements); - - /** - * Formats informational text. - * - * @param string|array $message - */ - public function text($message); - - /** - * Formats a success result bar. - * - * @param string|array $message - */ - public function success($message); - - /** - * Formats an error result bar. - * - * @param string|array $message - */ - public function error($message); - - /** - * Formats an warning result bar. - * - * @param string|array $message - */ - public function warning($message); - - /** - * Formats a note admonition. - * - * @param string|array $message - */ - public function note($message); - - /** - * Formats a caution admonition. - * - * @param string|array $message - */ - public function caution($message); - - /** - * Formats a table. - */ - public function table(array $headers, array $rows); - - /** - * Asks a question. - * - * @return mixed - */ - public function ask(string $question, string $default = null, callable $validator = null); - - /** - * Asks a question with the user input hidden. - * - * @return mixed - */ - public function askHidden(string $question, callable $validator = null); - - /** - * Asks for confirmation. - * - * @return bool - */ - public function confirm(string $question, bool $default = true); - - /** - * Asks a choice question. - * - * @param string|int|null $default - * - * @return mixed - */ - public function choice(string $question, array $choices, $default = null); - - /** - * Add newline(s). - */ - public function newLine(int $count = 1); - - /** - * Starts the progress output. - */ - public function progressStart(int $max = 0); - - /** - * Advances the progress output X steps. - */ - public function progressAdvance(int $step = 1); - - /** - * Finishes the progress output. - */ - public function progressFinish(); -} diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php deleted file mode 100644 index bcf30d8..0000000 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ /dev/null @@ -1,518 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Style; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Helper\SymfonyQuestionHelper; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Helper\TableCell; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\TrimmedBufferOutput; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Terminal; - -/** - * Output decorator helpers for the Symfony Style Guide. - * - * @author Kevin Bond - */ -class SymfonyStyle extends OutputStyle -{ - public const MAX_LINE_LENGTH = 120; - - private $input; - private $output; - private $questionHelper; - private $progressBar; - private $lineLength; - private $bufferedOutput; - - public function __construct(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter()); - // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not. - $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH; - $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); - - parent::__construct($this->output = $output); - } - - /** - * Formats a message as a block of text. - * - * @param string|array $messages The message to write in the block - */ - public function block($messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) - { - $messages = \is_array($messages) ? array_values($messages) : [$messages]; - - $this->autoPrependBlock(); - $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function title(string $message) - { - $this->autoPrependBlock(); - $this->writeln([ - sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), - sprintf('%s', str_repeat('=', Helper::width(Helper::removeDecoration($this->getFormatter(), $message)))), - ]); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function section(string $message) - { - $this->autoPrependBlock(); - $this->writeln([ - sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), - sprintf('%s', str_repeat('-', Helper::width(Helper::removeDecoration($this->getFormatter(), $message)))), - ]); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function listing(array $elements) - { - $this->autoPrependText(); - $elements = array_map(function ($element) { - return sprintf(' * %s', $element); - }, $elements); - - $this->writeln($elements); - $this->newLine(); - } - - /** - * {@inheritdoc} - */ - public function text($message) - { - $this->autoPrependText(); - - $messages = \is_array($message) ? array_values($message) : [$message]; - foreach ($messages as $message) { - $this->writeln(sprintf(' %s', $message)); - } - } - - /** - * Formats a command comment. - * - * @param string|array $message - */ - public function comment($message) - { - $this->block($message, null, null, ' // ', false, false); - } - - /** - * {@inheritdoc} - */ - public function success($message) - { - $this->block($message, 'OK', 'fg=black;bg=green', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function error($message) - { - $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function warning($message) - { - $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function note($message) - { - $this->block($message, 'NOTE', 'fg=yellow', ' ! '); - } - - /** - * Formats an info message. - * - * @param string|array $message - */ - public function info($message) - { - $this->block($message, 'INFO', 'fg=green', ' ', true); - } - - /** - * {@inheritdoc} - */ - public function caution($message) - { - $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true); - } - - /** - * {@inheritdoc} - */ - public function table(array $headers, array $rows) - { - $this->createTable() - ->setHeaders($headers) - ->setRows($rows) - ->render() - ; - - $this->newLine(); - } - - /** - * Formats a horizontal table. - */ - public function horizontalTable(array $headers, array $rows) - { - $this->createTable() - ->setHorizontal(true) - ->setHeaders($headers) - ->setRows($rows) - ->render() - ; - - $this->newLine(); - } - - /** - * Formats a list of key/value horizontally. - * - * Each row can be one of: - * * 'A title' - * * ['key' => 'value'] - * * new TableSeparator() - * - * @param string|array|TableSeparator ...$list - */ - public function definitionList(...$list) - { - $headers = []; - $row = []; - foreach ($list as $value) { - if ($value instanceof TableSeparator) { - $headers[] = $value; - $row[] = $value; - continue; - } - if (\is_string($value)) { - $headers[] = new TableCell($value, ['colspan' => 2]); - $row[] = null; - continue; - } - if (!\is_array($value)) { - throw new InvalidArgumentException('Value should be an array, string, or an instance of TableSeparator.'); - } - $headers[] = key($value); - $row[] = current($value); - } - - $this->horizontalTable($headers, [$row]); - } - - /** - * {@inheritdoc} - */ - public function ask(string $question, string $default = null, callable $validator = null) - { - $question = new Question($question, $default); - $question->setValidator($validator); - - return $this->askQuestion($question); - } - - /** - * {@inheritdoc} - */ - public function askHidden(string $question, callable $validator = null) - { - $question = new Question($question); - - $question->setHidden(true); - $question->setValidator($validator); - - return $this->askQuestion($question); - } - - /** - * {@inheritdoc} - */ - public function confirm(string $question, bool $default = true) - { - return $this->askQuestion(new ConfirmationQuestion($question, $default)); - } - - /** - * {@inheritdoc} - */ - public function choice(string $question, array $choices, $default = null) - { - if (null !== $default) { - $values = array_flip($choices); - $default = $values[$default] ?? $default; - } - - return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); - } - - /** - * {@inheritdoc} - */ - public function progressStart(int $max = 0) - { - $this->progressBar = $this->createProgressBar($max); - $this->progressBar->start(); - } - - /** - * {@inheritdoc} - */ - public function progressAdvance(int $step = 1) - { - $this->getProgressBar()->advance($step); - } - - /** - * {@inheritdoc} - */ - public function progressFinish() - { - $this->getProgressBar()->finish(); - $this->newLine(2); - $this->progressBar = null; - } - - /** - * {@inheritdoc} - */ - public function createProgressBar(int $max = 0) - { - $progressBar = parent::createProgressBar($max); - - if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) { - $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 - $progressBar->setProgressCharacter(''); - $progressBar->setBarCharacter('▓'); // dark shade character \u2593 - } - - return $progressBar; - } - - /** - * @see ProgressBar::iterate() - */ - public function progressIterate(iterable $iterable, int $max = null): iterable - { - yield from $this->createProgressBar()->iterate($iterable, $max); - - $this->newLine(2); - } - - /** - * @return mixed - */ - public function askQuestion(Question $question) - { - if ($this->input->isInteractive()) { - $this->autoPrependBlock(); - } - - if (!$this->questionHelper) { - $this->questionHelper = new SymfonyQuestionHelper(); - } - - $answer = $this->questionHelper->ask($this->input, $this, $question); - - if ($this->input->isInteractive()) { - $this->newLine(); - $this->bufferedOutput->write("\n"); - } - - return $answer; - } - - /** - * {@inheritdoc} - */ - public function writeln($messages, int $type = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - foreach ($messages as $message) { - parent::writeln($message, $type); - $this->writeBuffer($message, true, $type); - } - } - - /** - * {@inheritdoc} - */ - public function write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL) - { - if (!is_iterable($messages)) { - $messages = [$messages]; - } - - foreach ($messages as $message) { - parent::write($message, $newline, $type); - $this->writeBuffer($message, $newline, $type); - } - } - - /** - * {@inheritdoc} - */ - public function newLine(int $count = 1) - { - parent::newLine($count); - $this->bufferedOutput->write(str_repeat("\n", $count)); - } - - /** - * Returns a new instance which makes use of stderr if available. - * - * @return self - */ - public function getErrorStyle() - { - return new self($this->input, $this->getErrorOutput()); - } - - public function createTable(): Table - { - $output = $this->output instanceof ConsoleOutputInterface ? $this->output->section() : $this->output; - $style = clone Table::getStyleDefinition('symfony-style-guide'); - $style->setCellHeaderFormat('%s'); - - return (new Table($output))->setStyle($style); - } - - private function getProgressBar(): ProgressBar - { - if (!$this->progressBar) { - throw new RuntimeException('The ProgressBar is not started.'); - } - - return $this->progressBar; - } - - private function autoPrependBlock(): void - { - $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); - - if (!isset($chars[0])) { - $this->newLine(); //empty history, so we should start with a new line. - - return; - } - //Prepend new line for each non LF chars (This means no blank line was output before) - $this->newLine(2 - substr_count($chars, "\n")); - } - - private function autoPrependText(): void - { - $fetched = $this->bufferedOutput->fetch(); - //Prepend new line if last char isn't EOL: - if (!str_ends_with($fetched, "\n")) { - $this->newLine(); - } - } - - private function writeBuffer(string $message, bool $newLine, int $type): void - { - // We need to know if the last chars are PHP_EOL - $this->bufferedOutput->write($message, $newLine, $type); - } - - private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array - { - $indentLength = 0; - $prefixLength = Helper::width(Helper::removeDecoration($this->getFormatter(), $prefix)); - $lines = []; - - if (null !== $type) { - $type = sprintf('[%s] ', $type); - $indentLength = \strlen($type); - $lineIndentation = str_repeat(' ', $indentLength); - } - - // wrap and add newlines for each element - foreach ($messages as $key => $message) { - if ($escape) { - $message = OutputFormatter::escape($message); - } - - $decorationLength = Helper::width($message) - Helper::width(Helper::removeDecoration($this->getFormatter(), $message)); - $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength); - $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true)); - foreach ($messageLines as $messageLine) { - $lines[] = $messageLine; - } - - if (\count($messages) > 1 && $key < \count($messages) - 1) { - $lines[] = ''; - } - } - - $firstLineIndex = 0; - if ($padding && $this->isDecorated()) { - $firstLineIndex = 1; - array_unshift($lines, ''); - $lines[] = ''; - } - - foreach ($lines as $i => &$line) { - if (null !== $type) { - $line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line; - } - - $line = $prefix.$line; - $line .= str_repeat(' ', max($this->lineLength - Helper::width(Helper::removeDecoration($this->getFormatter(), $line)), 0)); - - if ($style) { - $line = sprintf('<%s>%s', $style, $line); - } - } - - return $lines; - } -} diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php deleted file mode 100644 index 08c5353..0000000 --- a/vendor/symfony/console/Terminal.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -class Terminal -{ - private static $width; - private static $height; - private static $stty; - - /** - * Gets the terminal width. - * - * @return int - */ - public function getWidth() - { - $width = getenv('COLUMNS'); - if (false !== $width) { - return (int) trim($width); - } - - if (null === self::$width) { - self::initDimensions(); - } - - return self::$width ?: 80; - } - - /** - * Gets the terminal height. - * - * @return int - */ - public function getHeight() - { - $height = getenv('LINES'); - if (false !== $height) { - return (int) trim($height); - } - - if (null === self::$height) { - self::initDimensions(); - } - - return self::$height ?: 50; - } - - /** - * @internal - */ - public static function hasSttyAvailable(): bool - { - if (null !== self::$stty) { - return self::$stty; - } - - // skip check if exec function is disabled - if (!\function_exists('exec')) { - return false; - } - - exec('stty 2>&1', $output, $exitcode); - - return self::$stty = 0 === $exitcode; - } - - private static function initDimensions() - { - if ('\\' === \DIRECTORY_SEPARATOR) { - if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { - // extract [w, H] from "wxh (WxH)" - // or [w, h] from "wxh" - self::$width = (int) $matches[1]; - self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2]; - } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) { - // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash) - // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT - self::initDimensionsUsingStty(); - } elseif (null !== $dimensions = self::getConsoleMode()) { - // extract [w, h] from "wxh" - self::$width = (int) $dimensions[0]; - self::$height = (int) $dimensions[1]; - } - } else { - self::initDimensionsUsingStty(); - } - } - - /** - * Returns whether STDOUT has vt100 support (some Windows 10+ configurations). - */ - private static function hasVt100Support(): bool - { - return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w')); - } - - /** - * Initializes dimensions using the output of an stty columns line. - */ - private static function initDimensionsUsingStty() - { - if ($sttyString = self::getSttyColumns()) { - if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { - // extract [w, h] from "rows h; columns w;" - self::$width = (int) $matches[2]; - self::$height = (int) $matches[1]; - } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { - // extract [w, h] from "; h rows; w columns" - self::$width = (int) $matches[2]; - self::$height = (int) $matches[1]; - } - } - } - - /** - * Runs and parses mode CON if it's available, suppressing any error output. - * - * @return int[]|null An array composed of the width and the height or null if it could not be parsed - */ - private static function getConsoleMode(): ?array - { - $info = self::readFromProcess('mode CON'); - - if (null === $info || !preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return null; - } - - return [(int) $matches[2], (int) $matches[1]]; - } - - /** - * Runs and parses stty -a if it's available, suppressing any error output. - */ - private static function getSttyColumns(): ?string - { - return self::readFromProcess('stty -a | grep columns'); - } - - private static function readFromProcess(string $command): ?string - { - if (!\function_exists('proc_open')) { - return null; - } - - $descriptorspec = [ - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ]; - - $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); - if (!\is_resource($process)) { - return null; - } - - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - return $info; - } -} diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php deleted file mode 100644 index 19a95c8..0000000 --- a/vendor/symfony/console/Tester/ApplicationTester.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tester; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArrayInput; - -/** - * Eases the testing of console applications. - * - * When testing an application, don't forget to disable the auto exit flag: - * - * $application = new Application(); - * $application->setAutoExit(false); - * - * @author Fabien Potencier - */ -class ApplicationTester -{ - use TesterTrait; - - private $application; - - public function __construct(Application $application) - { - $this->application = $application; - } - - /** - * Executes the application. - * - * Available options: - * - * * interactive: Sets the input interactive flag - * * decorated: Sets the output decorated flag - * * verbosity: Sets the output verbosity flag - * * capture_stderr_separately: Make output of stdOut and stdErr separately available - * - * @return int The command exit code - */ - public function run(array $input, array $options = []) - { - $this->input = new ArrayInput($input); - if (isset($options['interactive'])) { - $this->input->setInteractive($options['interactive']); - } - - if ($this->inputs) { - $this->input->setStream(self::createStream($this->inputs)); - } - - $this->initOutput($options); - - return $this->statusCode = $this->application->run($this->input, $this->output); - } -} diff --git a/vendor/symfony/console/Tester/CommandCompletionTester.php b/vendor/symfony/console/Tester/CommandCompletionTester.php deleted file mode 100644 index ade7327..0000000 --- a/vendor/symfony/console/Tester/CommandCompletionTester.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tester; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; - -/** - * Eases the testing of command completion. - * - * @author Jérôme Tamarelle - */ -class CommandCompletionTester -{ - private $command; - - public function __construct(Command $command) - { - $this->command = $command; - } - - /** - * Create completion suggestions from input tokens. - */ - public function complete(array $input): array - { - $currentIndex = \count($input); - if ('' === end($input)) { - array_pop($input); - } - array_unshift($input, $this->command->getName()); - - $completionInput = CompletionInput::fromTokens($input, $currentIndex); - $completionInput->bind($this->command->getDefinition()); - $suggestions = new CompletionSuggestions(); - - $this->command->complete($completionInput, $suggestions); - - $options = []; - foreach ($suggestions->getOptionSuggestions() as $option) { - $options[] = '--'.$option->getName(); - } - - return array_map('strval', array_merge($options, $suggestions->getValueSuggestions())); - } -} diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php deleted file mode 100644 index 6c15c25..0000000 --- a/vendor/symfony/console/Tester/CommandTester.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tester; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\ArrayInput; - -/** - * Eases the testing of console commands. - * - * @author Fabien Potencier - * @author Robin Chalas - */ -class CommandTester -{ - use TesterTrait; - - private $command; - - public function __construct(Command $command) - { - $this->command = $command; - } - - /** - * Executes the command. - * - * Available execution options: - * - * * interactive: Sets the input interactive flag - * * decorated: Sets the output decorated flag - * * verbosity: Sets the output verbosity flag - * * capture_stderr_separately: Make output of stdOut and stdErr separately available - * - * @param array $input An array of command arguments and options - * @param array $options An array of execution options - * - * @return int The command exit code - */ - public function execute(array $input, array $options = []) - { - // set the command name automatically if the application requires - // this argument and no command name was passed - if (!isset($input['command']) - && (null !== $application = $this->command->getApplication()) - && $application->getDefinition()->hasArgument('command') - ) { - $input = array_merge(['command' => $this->command->getName()], $input); - } - - $this->input = new ArrayInput($input); - // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. - $this->input->setStream(self::createStream($this->inputs)); - - if (isset($options['interactive'])) { - $this->input->setInteractive($options['interactive']); - } - - if (!isset($options['decorated'])) { - $options['decorated'] = false; - } - - $this->initOutput($options); - - return $this->statusCode = $this->command->run($this->input, $this->output); - } -} diff --git a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php b/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php deleted file mode 100644 index a473242..0000000 --- a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tester\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\Console\Command\Command; - -final class CommandIsSuccessful extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is successful'; - } - - /** - * {@inheritdoc} - */ - protected function matches($other): bool - { - return Command::SUCCESS === $other; - } - - /** - * {@inheritdoc} - */ - protected function failureDescription($other): string - { - return 'the command '.$this->toString(); - } - - /** - * {@inheritdoc} - */ - protected function additionalFailureDescription($other): string - { - $mapping = [ - Command::FAILURE => 'Command failed.', - Command::INVALID => 'Command was invalid.', - ]; - - return $mapping[$other] ?? sprintf('Command returned exit status %d.', $other); - } -} diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php deleted file mode 100644 index 40bc581..0000000 --- a/vendor/symfony/console/Tester/TesterTrait.php +++ /dev/null @@ -1,197 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tester; - -use PHPUnit\Framework\Assert; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful; - -/** - * @author Amrouche Hamza - */ -trait TesterTrait -{ - /** @var StreamOutput */ - private $output; - private $inputs = []; - private $captureStreamsIndependently = false; - /** @var InputInterface */ - private $input; - /** @var int */ - private $statusCode; - - /** - * Gets the display returned by the last execution of the command or application. - * - * @throws \RuntimeException If it's called before the execute method - * - * @return string - */ - public function getDisplay(bool $normalize = false) - { - if (null === $this->output) { - throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?'); - } - - rewind($this->output->getStream()); - - $display = stream_get_contents($this->output->getStream()); - - if ($normalize) { - $display = str_replace(\PHP_EOL, "\n", $display); - } - - return $display; - } - - /** - * Gets the output written to STDERR by the application. - * - * @param bool $normalize Whether to normalize end of lines to \n or not - * - * @return string - */ - public function getErrorOutput(bool $normalize = false) - { - if (!$this->captureStreamsIndependently) { - throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.'); - } - - rewind($this->output->getErrorOutput()->getStream()); - - $display = stream_get_contents($this->output->getErrorOutput()->getStream()); - - if ($normalize) { - $display = str_replace(\PHP_EOL, "\n", $display); - } - - return $display; - } - - /** - * Gets the input instance used by the last execution of the command or application. - * - * @return InputInterface - */ - public function getInput() - { - return $this->input; - } - - /** - * Gets the output instance used by the last execution of the command or application. - * - * @return OutputInterface - */ - public function getOutput() - { - return $this->output; - } - - /** - * Gets the status code returned by the last execution of the command or application. - * - * @throws \RuntimeException If it's called before the execute method - * - * @return int - */ - public function getStatusCode() - { - if (null === $this->statusCode) { - throw new \RuntimeException('Status code not initialized, did you execute the command before requesting the status code?'); - } - - return $this->statusCode; - } - - public function assertCommandIsSuccessful(string $message = ''): void - { - Assert::assertThat($this->statusCode, new CommandIsSuccessful(), $message); - } - - /** - * Sets the user inputs. - * - * @param array $inputs An array of strings representing each input - * passed to the command input stream - * - * @return $this - */ - public function setInputs(array $inputs) - { - $this->inputs = $inputs; - - return $this; - } - - /** - * Initializes the output property. - * - * Available options: - * - * * decorated: Sets the output decorated flag - * * verbosity: Sets the output verbosity flag - * * capture_stderr_separately: Make output of stdOut and stdErr separately available - */ - private function initOutput(array $options) - { - $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; - if (!$this->captureStreamsIndependently) { - $this->output = new StreamOutput(fopen('php://memory', 'w', false)); - if (isset($options['decorated'])) { - $this->output->setDecorated($options['decorated']); - } - if (isset($options['verbosity'])) { - $this->output->setVerbosity($options['verbosity']); - } - } else { - $this->output = new ConsoleOutput( - $options['verbosity'] ?? ConsoleOutput::VERBOSITY_NORMAL, - $options['decorated'] ?? null - ); - - $errorOutput = new StreamOutput(fopen('php://memory', 'w', false)); - $errorOutput->setFormatter($this->output->getFormatter()); - $errorOutput->setVerbosity($this->output->getVerbosity()); - $errorOutput->setDecorated($this->output->isDecorated()); - - $reflectedOutput = new \ReflectionObject($this->output); - $strErrProperty = $reflectedOutput->getProperty('stderr'); - $strErrProperty->setAccessible(true); - $strErrProperty->setValue($this->output, $errorOutput); - - $reflectedParent = $reflectedOutput->getParentClass(); - $streamProperty = $reflectedParent->getProperty('stream'); - $streamProperty->setAccessible(true); - $streamProperty->setValue($this->output, fopen('php://memory', 'w', false)); - } - } - - /** - * @return resource - */ - private static function createStream(array $inputs) - { - $stream = fopen('php://memory', 'r+', false); - - foreach ($inputs as $input) { - fwrite($stream, $input.\PHP_EOL); - } - - rewind($stream); - - return $stream; - } -} diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json deleted file mode 100644 index 9a56506..0000000 --- a/vendor/symfony/console/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "symfony/console", - "type": "library", - "description": "Eases the creation of beautiful and testable command line interfaces", - "keywords": ["console", "cli", "command line", "terminal"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "require-dev": { - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "suggest": { - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "", - "psr/log": "For using the console logger" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Console\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/dependency-injection/Alias.php b/vendor/symfony/dependency-injection/Alias.php deleted file mode 100644 index 71bfef5..0000000 --- a/vendor/symfony/dependency-injection/Alias.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -class Alias -{ - private const DEFAULT_DEPRECATION_TEMPLATE = 'The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.'; - - private $id; - private $public; - private $deprecation = []; - - public function __construct(string $id, bool $public = false) - { - $this->id = $id; - $this->public = $public; - } - - /** - * Checks if this DI Alias should be public or not. - * - * @return bool - */ - public function isPublic() - { - return $this->public; - } - - /** - * Sets if this Alias is public. - * - * @return $this - */ - public function setPublic(bool $boolean) - { - $this->public = $boolean; - - return $this; - } - - /** - * Sets if this Alias is private. - * - * @return $this - * - * @deprecated since Symfony 5.2, use setPublic() instead - */ - public function setPrivate(bool $boolean) - { - trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s()" method is deprecated, use "setPublic()" instead.', __METHOD__); - - return $this->setPublic(!$boolean); - } - - /** - * Whether this alias is private. - * - * @return bool - */ - public function isPrivate() - { - return !$this->public; - } - - /** - * Whether this alias is deprecated, that means it should not be referenced - * anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(/* string $package, string $version, string $message */) - { - $args = \func_get_args(); - - if (\func_num_args() < 3) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__); - - $status = $args[0] ?? true; - - if (!$status) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Passing a null message to un-deprecate a node is deprecated.'); - } - - $message = (string) ($args[1] ?? null); - $package = $version = ''; - } else { - $status = true; - $package = (string) $args[0]; - $version = (string) $args[1]; - $message = (string) $args[2]; - } - - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%alias_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%alias_id%" placeholder.'); - } - } - - $this->deprecation = $status ? ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE] : []; - - return $this; - } - - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @deprecated since Symfony 5.1, use "getDeprecation()" instead. - */ - public function getDeprecationMessage(string $id): string - { - trigger_deprecation('symfony/dependency-injection', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__); - - return $this->getDeprecation($id)['message']; - } - - /** - * @param string $id Service id relying on this definition - */ - public function getDeprecation(string $id): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%alias_id%', $id, $this->deprecation['message']), - ]; - } - - /** - * Returns the Id of this alias. - * - * @return string - */ - public function __toString() - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/AbstractArgument.php b/vendor/symfony/dependency-injection/Argument/AbstractArgument.php deleted file mode 100644 index 3ba5ff3..0000000 --- a/vendor/symfony/dependency-injection/Argument/AbstractArgument.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents an abstract service argument, which have to be set by a compiler pass or a DI extension. - */ -final class AbstractArgument -{ - private $text; - private $context; - - public function __construct(string $text = '') - { - $this->text = trim($text, '. '); - } - - public function setContext(string $context): void - { - $this->context = $context.' is abstract'.('' === $this->text ? '' : ': '); - } - - public function getText(): string - { - return $this->text; - } - - public function getTextWithContext(): string - { - return $this->context.$this->text.'.'; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php b/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php deleted file mode 100644 index b46eb77..0000000 --- a/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a complex argument containing nested values. - * - * @author Titouan Galopin - */ -interface ArgumentInterface -{ - /** - * @return array - */ - public function getValues(); - - public function setValues(array $values); -} diff --git a/vendor/symfony/dependency-injection/Argument/BoundArgument.php b/vendor/symfony/dependency-injection/Argument/BoundArgument.php deleted file mode 100644 index c2afe2c..0000000 --- a/vendor/symfony/dependency-injection/Argument/BoundArgument.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * @author Guilhem Niot - */ -final class BoundArgument implements ArgumentInterface -{ - public const SERVICE_BINDING = 0; - public const DEFAULTS_BINDING = 1; - public const INSTANCEOF_BINDING = 2; - - private static $sequence = 0; - - private $value; - private $identifier; - private $used; - private $type; - private $file; - - public function __construct($value, bool $trackUsage = true, int $type = 0, string $file = null) - { - $this->value = $value; - if ($trackUsage) { - $this->identifier = ++self::$sequence; - } else { - $this->used = true; - } - $this->type = $type; - $this->file = $file; - } - - /** - * {@inheritdoc} - */ - public function getValues(): array - { - return [$this->value, $this->identifier, $this->used, $this->type, $this->file]; - } - - /** - * {@inheritdoc} - */ - public function setValues(array $values) - { - if (5 === \count($values)) { - [$this->value, $this->identifier, $this->used, $this->type, $this->file] = $values; - } else { - [$this->value, $this->identifier, $this->used] = $values; - } - } -} diff --git a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php b/vendor/symfony/dependency-injection/Argument/IteratorArgument.php deleted file mode 100644 index d413678..0000000 --- a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a collection of values to lazily iterate over. - * - * @author Titouan Galopin - */ -class IteratorArgument implements ArgumentInterface -{ - use ReferenceSetArgumentTrait; -} diff --git a/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php b/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php deleted file mode 100644 index 150c9bf..0000000 --- a/vendor/symfony/dependency-injection/Argument/ReferenceSetArgumentTrait.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Titouan Galopin - * @author Nicolas Grekas - */ -trait ReferenceSetArgumentTrait -{ - private $values; - - /** - * @param Reference[] $values - */ - public function __construct(array $values) - { - $this->setValues($values); - } - - /** - * @return Reference[] - */ - public function getValues() - { - return $this->values; - } - - /** - * @param Reference[] $values The service references to put in the set - */ - public function setValues(array $values) - { - foreach ($values as $k => $v) { - if (null !== $v && !$v instanceof Reference) { - throw new InvalidArgumentException(sprintf('A "%s" must hold only Reference instances, "%s" given.', __CLASS__, get_debug_type($v))); - } - } - - $this->values = $values; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php b/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php deleted file mode 100644 index 41fec78..0000000 --- a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * @internal - */ -class RewindableGenerator implements \IteratorAggregate, \Countable -{ - private $generator; - private $count; - - /** - * @param int|callable $count - */ - public function __construct(callable $generator, $count) - { - $this->generator = $generator; - $this->count = $count; - } - - public function getIterator(): \Traversable - { - $g = $this->generator; - - return $g(); - } - - public function count(): int - { - if (\is_callable($count = $this->count)) { - $this->count = $count(); - } - - return $this->count; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php b/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php deleted file mode 100644 index 6331aff..0000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Represents a service wrapped in a memoizing closure. - * - * @author Nicolas Grekas - */ -class ServiceClosureArgument implements ArgumentInterface -{ - private $values; - - public function __construct(Reference $reference) - { - $this->values = [$reference]; - } - - /** - * {@inheritdoc} - */ - public function getValues() - { - return $this->values; - } - - /** - * {@inheritdoc} - */ - public function setValues(array $values) - { - if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) { - throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.'); - } - - $this->values = $values; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceLocator.php b/vendor/symfony/dependency-injection/Argument/ServiceLocator.php deleted file mode 100644 index bc138fe..0000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceLocator.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ServiceLocator extends BaseServiceLocator -{ - private $factory; - private $serviceMap; - private $serviceTypes; - - public function __construct(\Closure $factory, array $serviceMap, array $serviceTypes = null) - { - $this->factory = $factory; - $this->serviceMap = $serviceMap; - $this->serviceTypes = $serviceTypes; - parent::__construct($serviceMap); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $id) - { - return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id); - } - - /** - * {@inheritdoc} - */ - public function getProvidedServices(): array - { - return $this->serviceTypes ?? $this->serviceTypes = array_map(function () { return '?'; }, $this->serviceMap); - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php b/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php deleted file mode 100644 index fcbf478..0000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\Reference; - -/** - * Represents a closure acting as a service locator. - * - * @author Nicolas Grekas - */ -class ServiceLocatorArgument implements ArgumentInterface -{ - use ReferenceSetArgumentTrait; - - private $taggedIteratorArgument; - - /** - * @param Reference[]|TaggedIteratorArgument $values - */ - public function __construct($values = []) - { - if ($values instanceof TaggedIteratorArgument) { - $this->taggedIteratorArgument = $values; - $this->values = []; - } else { - $this->setValues($values); - } - } - - public function getTaggedIteratorArgument(): ?TaggedIteratorArgument - { - return $this->taggedIteratorArgument; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php b/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php deleted file mode 100644 index 1ba8de7..0000000 --- a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a collection of services found by tag name to lazily iterate over. - * - * @author Roland Franssen - */ -class TaggedIteratorArgument extends IteratorArgument -{ - private $tag; - private $indexAttribute; - private $defaultIndexMethod; - private $defaultPriorityMethod; - private $needsIndexes = false; - - /** - * @param string $tag The name of the tag identifying the target services - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param bool $needsIndexes Whether indexes are required and should be generated when computing the map - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - */ - public function __construct(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, bool $needsIndexes = false, string $defaultPriorityMethod = null) - { - parent::__construct([]); - - if (null === $indexAttribute && $needsIndexes) { - $indexAttribute = preg_match('/[^.]++$/', $tag, $m) ? $m[0] : $tag; - } - - $this->tag = $tag; - $this->indexAttribute = $indexAttribute; - $this->defaultIndexMethod = $defaultIndexMethod ?: ($indexAttribute ? 'getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))).'Name' : null); - $this->needsIndexes = $needsIndexes; - $this->defaultPriorityMethod = $defaultPriorityMethod ?: ($indexAttribute ? 'getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))).'Priority' : null); - } - - public function getTag() - { - return $this->tag; - } - - public function getIndexAttribute(): ?string - { - return $this->indexAttribute; - } - - public function getDefaultIndexMethod(): ?string - { - return $this->defaultIndexMethod; - } - - public function needsIndexes(): bool - { - return $this->needsIndexes; - } - - public function getDefaultPriorityMethod(): ?string - { - return $this->defaultPriorityMethod; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php b/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php deleted file mode 100644 index 2320336..0000000 --- a/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which index and priority a service class should be found in tagged iterators/locators. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class AsTaggedItem -{ - public function __construct( - public ?string $index = null, - public ?int $priority = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php b/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php deleted file mode 100644 index abab040..0000000 --- a/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell how a base type should be autoconfigured. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class Autoconfigure -{ - public function __construct( - public ?array $tags = null, - public ?array $calls = null, - public ?array $bind = null, - public bool|string|null $lazy = null, - public ?bool $public = null, - public ?bool $shared = null, - public ?bool $autowire = null, - public ?array $properties = null, - public array|string|null $configurator = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php b/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php deleted file mode 100644 index ed5807c..0000000 --- a/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell how a base type should be tagged. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class AutoconfigureTag extends Autoconfigure -{ - public function __construct(string $name = null, array $attributes = []) - { - parent::__construct( - tags: [ - [$name ?? 0 => $attributes], - ] - ); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php b/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php deleted file mode 100644 index d498f46..0000000 --- a/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class TaggedIterator -{ - public function __construct( - public string $tag, - public ?string $indexAttribute = null, - public ?string $defaultIndexMethod = null, - public ?string $defaultPriorityMethod = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php b/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php deleted file mode 100644 index 4617e0f..0000000 --- a/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class TaggedLocator -{ - public function __construct( - public string $tag, - public ?string $indexAttribute = null, - public ?string $defaultIndexMethod = null, - public ?string $defaultPriorityMethod = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Target.php b/vendor/symfony/dependency-injection/Attribute/Target.php deleted file mode 100644 index a7a4d8b..0000000 --- a/vendor/symfony/dependency-injection/Attribute/Target.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * An attribute to tell how a dependency is used and hint named autowiring aliases. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -final class Target -{ - /** - * @var string - */ - public $name; - - public function __construct(string $name) - { - $this->name = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $name)))); - } - - public static function parseName(\ReflectionParameter $parameter): string - { - if (80000 > \PHP_VERSION_ID || !$target = $parameter->getAttributes(self::class)[0] ?? null) { - return $parameter->name; - } - - $name = $target->newInstance()->name; - - if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $name)) { - if (($function = $parameter->getDeclaringFunction()) instanceof \ReflectionMethod) { - $function = $function->class.'::'.$function->name; - } else { - $function = $function->name; - } - - throw new InvalidArgumentException(sprintf('Invalid #[Target] name "%s" on parameter "$%s" of "%s()": the first character must be a letter.', $name, $parameter->name, $function)); - } - - return $name; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/When.php b/vendor/symfony/dependency-injection/Attribute/When.php deleted file mode 100644 index 3114115..0000000 --- a/vendor/symfony/dependency-injection/Attribute/When.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which environement this class should be registered as a service. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class When -{ - public function __construct( - public string $env, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/CHANGELOG.md b/vendor/symfony/dependency-injection/CHANGELOG.md deleted file mode 100644 index 88a6df8..0000000 --- a/vendor/symfony/dependency-injection/CHANGELOG.md +++ /dev/null @@ -1,302 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - * Add `$defaultIndexMethod` and `$defaultPriorityMethod` to `TaggedIterator` and `TaggedLocator` attributes - * Add `service_closure()` to the PHP-DSL - * Add support for autoconfigurable attributes on methods, properties and parameters - * Make auto-aliases private by default - * Add support for autowiring union and intersection types - -5.3 ---- - - * Add `ServicesConfigurator::remove()` in the PHP-DSL - * Add `%env(not:...)%` processor to negate boolean values - * Add support for loading autoconfiguration rules via the `#[Autoconfigure]` and `#[AutoconfigureTag]` attributes on PHP 8 - * Add `#[AsTaggedItem]` attribute for defining the index and priority of classes found in tagged iterators/locators - * Add autoconfigurable attributes - * Add support for autowiring tagged iterators and locators via attributes on PHP 8 - * Add support for per-env configuration in XML and Yaml loaders - * Add `ContainerBuilder::willBeAvailable()` to help with conditional configuration - * Add support an integer return value for default_index_method - * Add `#[When(env: 'foo')]` to skip autoregistering a class when the env doesn't match - * Add `env()` and `EnvConfigurator` in the PHP-DSL - * Add support for `ConfigBuilder` in the `PhpFileLoader` - * Add `ContainerConfigurator::env()` to get the current environment - * Add `#[Target]` to tell how a dependency is used and hint named autowiring aliases - -5.2.0 ------ - - * added `param()` and `abstract_arg()` in the PHP-DSL - * deprecated `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead - * added support for the `#[Required]` attribute - -5.1.0 ------ - - * deprecated `inline()` in favor of `inline_service()` and `ref()` in favor of `service()` when using the PHP-DSL - * allow decorators to reference their decorated service using the special `.inner` id - * added support to autowire public typed properties in php 7.4 - * added support for defining method calls, a configurator, and property setters in `InlineServiceConfigurator` - * added possibility to define abstract service arguments - * allowed mixing "parent" and instanceof-conditionals/defaults/bindings - * updated the signature of method `Definition::setDeprecated()` to `Definition::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `Alias::setDeprecated()` to `Alias::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `DeprecateTrait::deprecate()` to `DeprecateTrait::deprecation(string $package, string $version, string $message)` - * deprecated the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service, - configure them explicitly instead - * added class `Symfony\Component\DependencyInjection\Dumper\Preloader` to help with preloading on PHP 7.4+ - * added tags `container.preload`/`.no_preload` to declare extra classes to preload/services to not preload - * allowed loading and dumping tags with an attribute named "name" - * deprecated `Definition::getDeprecationMessage()`, use `Definition::getDeprecation()` instead - * deprecated `Alias::getDeprecationMessage()`, use `Alias::getDeprecation()` instead - * added support of PHP8 static return type for withers - * added `AliasDeprecatedPublicServicesPass` to deprecate public services to private - -5.0.0 ------ - - * removed support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` - * removed support for non-string default env() parameters - * moved `ServiceSubscriberInterface` to the `Symfony\Contracts\Service` namespace - * removed `RepeatedPass` and `RepeatablePassInterface` - * removed support for short factory/configurator syntax from `YamlFileLoader` - * removed `ResettableContainerInterface`, use `ResetInterface` instead - * added argument `$returnsClone` to `Definition::addMethodCall()` - * removed `tagged`, use `tagged_iterator` instead - -4.4.0 ------ - - * added `CheckTypeDeclarationsPass` to check injected parameters type during compilation - * added support for opcache.preload by generating a preloading script in the cache folder - * added support for dumping the container in one file instead of many files - * deprecated support for short factories and short configurators in Yaml - * added `tagged_iterator` alias for `tagged` which might be deprecated in a future version - * deprecated passing an instance of `Symfony\Component\DependencyInjection\Parameter` as class name to `Symfony\Component\DependencyInjection\Definition` - * added support for binding iterable and tagged services - * made singly-implemented interfaces detection be scoped by file - * added ability to define a static priority method for tagged service - * added support for improved syntax to define method calls in Yaml - * made the `%env(base64:...)%` processor able to decode base64url - * added ability to choose behavior of decorations on non existent decorated services - -4.3.0 ------ - - * added `%env(trim:...)%` processor to trim a string value - * added `%env(default:param_name:...)%` processor to fallback to a parameter or to null when using `%env(default::...)%` - * added `%env(url:...)%` processor to convert an URL or DNS into an array of components - * added `%env(query_string:...)%` processor to convert a query string into an array of key values - * added support for deprecating aliases - * made `ContainerParametersResource` final and not implement `Serializable` anymore - * added `ReverseContainer`: a container that turns services back to their ids - * added ability to define an index for a tagged collection - * added ability to define an index for services in an injected service locator argument - * made `ServiceLocator` implement `ServiceProviderInterface` - * deprecated support for non-string default env() parameters - * added `%env(require:...)%` processor to `require()` a PHP file and use the value returned from it - -4.2.0 ------ - - * added `ContainerBuilder::registerAliasForArgument()` to support autowiring by type+name - * added support for binding by type+name - * added `ServiceSubscriberTrait` to ease implementing `ServiceSubscriberInterface` using methods' return types - * added `ServiceLocatorArgument` and `!service_locator` config tag for creating optimized service-locators - * added support for autoconfiguring bindings - * added `%env(key:...)%` processor to fetch a specific key from an array - * deprecated `ServiceSubscriberInterface`, use the same interface from the `Symfony\Contracts\Service` namespace instead - * deprecated `ResettableContainerInterface`, use `Symfony\Contracts\Service\ResetInterface` instead - -4.1.0 ------ - - * added support for variadics in named arguments - * added PSR-11 `ContainerBagInterface` and its `ContainerBag` implementation to access parameters as-a-service - * added support for service's decorators autowiring - * deprecated the `TypedReference::canBeAutoregistered()` and `TypedReference::getRequiringClass()` methods - * environment variables are validated when used in extension configuration - * deprecated support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` - -4.0.0 ------ - - * Relying on service auto-registration while autowiring is not supported anymore. - Explicitly inject your dependencies or create services whose ids are - their fully-qualified class name. - - Before: - - ```php - namespace App\Controller; - - use App\Mailer; - - class DefaultController - { - public function __construct(Mailer $mailer) { - // ... - } - - // ... - } - ``` - ```yml - services: - App\Controller\DefaultController: - autowire: true - ``` - - After: - - ```php - // same PHP code - ``` - ```yml - services: - App\Controller\DefaultController: - autowire: true - - # or - # App\Controller\DefaultController: - # arguments: { $mailer: "@App\Mailer" } - - App\Mailer: - autowire: true - ``` - * removed autowiring services based on the types they implement - * added a third `$methodName` argument to the `getProxyFactoryCode()` method - of the `DumperInterface` - * removed support for autowiring types - * removed `Container::isFrozen` - * removed support for dumping an ucompiled container in `PhpDumper` - * removed support for generating a dumped `Container` without populating the method map - * removed support for case insensitive service identifiers - * removed the `DefinitionDecorator` class, replaced by `ChildDefinition` - * removed the `AutowireServiceResource` class and related `AutowirePass::createResourceForClass()` method - * removed `LoggingFormatter`, `Compiler::getLoggingFormatter()` and `addLogMessage()` class and methods, use the `ContainerBuilder::log()` method instead - * removed `FactoryReturnTypePass` - * removed `ContainerBuilder::addClassResource()`, use the `addObjectResource()` or the `getReflectionClass()` method instead. - * removed support for top-level anonymous services - * removed silent behavior for unused attributes and elements - * removed support for setting and accessing private services in `Container` - * removed support for setting pre-defined services in `Container` - * removed support for case insensitivity of parameter names - * removed `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead - -3.4.0 ------ - - * moved the `ExtensionCompilerPass` to before-optimization passes with priority -1000 - * deprecated "public-by-default" definitions and aliases, the new default will be "private" in 4.0 - * added `EnvVarProcessorInterface` and corresponding "container.env_var_processor" tag for processing env vars - * added support for ignore-on-uninitialized references - * deprecated service auto-registration while autowiring - * deprecated the ability to check for the initialization of a private service with the `Container::initialized()` method - * deprecated support for top-level anonymous services in XML - * deprecated case insensitivity of parameter names - * deprecated the `ResolveDefinitionTemplatesPass` class in favor of `ResolveChildDefinitionsPass` - * added `TaggedIteratorArgument` with YAML (`!tagged foo`) and XML (``) support - * deprecated `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead - -3.3.0 ------ - - * deprecated autowiring services based on the types they implement; - rename (or alias) your services to their FQCN id to make them autowirable - * added "ServiceSubscriberInterface" - to allow for per-class explicit service-locator definitions - * added "container.service_locator" tag for defining service-locator services - * added anonymous services support in YAML configuration files using the `!service` tag. - * added "TypedReference" and "ServiceClosureArgument" for creating service-locator services - * added `ServiceLocator` - a PSR-11 container holding a set of services to be lazily loaded - * added "instanceof" section for local interface-defined configs - * added prototype services for PSR4-based discovery and registration - * added `ContainerBuilder::getReflectionClass()` for retrieving and tracking reflection class info - * deprecated `ContainerBuilder::getClassResource()`, use `ContainerBuilder::getReflectionClass()` or `ContainerBuilder::addObjectResource()` instead - * added `ContainerBuilder::fileExists()` for checking and tracking file or directory existence - * deprecated autowiring-types, use aliases instead - * added support for omitting the factory class name in a service definition if the definition class is set - * deprecated case insensitivity of service identifiers - * added "iterator" argument type for lazy iteration over a set of values and services - * added file-wide configurable defaults for service attributes "public", "tags", - "autowire" and "autoconfigure" - * made the "class" attribute optional, using the "id" as fallback - * using the `PhpDumper` with an uncompiled `ContainerBuilder` is deprecated and - will not be supported anymore in 4.0 - * deprecated the `DefinitionDecorator` class in favor of `ChildDefinition` - * allow config files to be loaded using a glob pattern - * [BC BREAK] the `NullDumper` class is now final - -3.2.0 ------ - - * allowed to prioritize compiler passes by introducing a third argument to `PassConfig::addPass()`, to `Compiler::addPass` and to `ContainerBuilder::addCompilerPass()` - * added support for PHP constants in YAML configuration files - * deprecated the ability to set or unset a private service with the `Container::set()` method - * deprecated the ability to check for the existence of a private service with the `Container::has()` method - * deprecated the ability to request a private service with the `Container::get()` method - * deprecated support for generating a dumped `Container` without populating the method map - -3.0.0 ------ - - * removed all deprecated codes from 2.x versions - -2.8.0 ------ - - * deprecated the abstract ContainerAware class in favor of ContainerAwareTrait - * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0 - * allowed specifying a directory to recursively load all configuration files it contains - * deprecated the concept of scopes - * added `Definition::setShared()` and `Definition::isShared()` - * added ResettableContainerInterface to be able to reset the container to release memory on shutdown - * added a way to define the priority of service decoration - * added support for service autowiring - -2.7.0 ------ - - * deprecated synchronized services - -2.6.0 ------ - - * added new factory syntax and deprecated the old one - -2.5.0 ------ - - * added DecoratorServicePass and a way to override a service definition (Definition::setDecoratedService()) - * deprecated SimpleXMLElement class. - -2.4.0 ------ - - * added support for expressions in service definitions - * added ContainerAwareTrait to add default container aware behavior to a class - -2.2.0 ------ - - * added Extension::isConfigEnabled() to ease working with enableable configurations - * added an Extension base class with sensible defaults to be used in conjunction - with the Config component. - * added PrependExtensionInterface (to be able to allow extensions to prepend - application configuration settings for any Bundle) - -2.1.0 ------ - - * added IntrospectableContainerInterface (to be able to check if a service - has been initialized or not) - * added ConfigurationExtensionInterface - * added Definition::clearTag() - * component exceptions that inherit base SPL classes are now used exclusively - (this includes dumped containers) - * [BC BREAK] fixed unescaping of class arguments, method - ParameterBag::unescapeValue() was made public diff --git a/vendor/symfony/dependency-injection/ChildDefinition.php b/vendor/symfony/dependency-injection/ChildDefinition.php deleted file mode 100644 index 5c648ba..0000000 --- a/vendor/symfony/dependency-injection/ChildDefinition.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; - -/** - * This definition extends another definition. - * - * @author Johannes M. Schmitt - */ -class ChildDefinition extends Definition -{ - private $parent; - - /** - * @param string $parent The id of Definition instance to decorate - */ - public function __construct(string $parent) - { - $this->parent = $parent; - } - - /** - * Returns the Definition to inherit from. - * - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Sets the Definition to inherit from. - * - * @return $this - */ - public function setParent(string $parent) - { - $this->parent = $parent; - - return $this; - } - - /** - * Gets an argument to pass to the service constructor/factory method. - * - * If replaceArgument() has been used to replace an argument, this method - * will return the replacement value. - * - * @param int|string $index - * - * @return mixed - * - * @throws OutOfBoundsException When the argument does not exist - */ - public function getArgument($index) - { - if (\array_key_exists('index_'.$index, $this->arguments)) { - return $this->arguments['index_'.$index]; - } - - return parent::getArgument($index); - } - - /** - * You should always use this method when overwriting existing arguments - * of the parent definition. - * - * If you directly call setArguments() keep in mind that you must follow - * certain conventions when you want to overwrite the arguments of the - * parent definition, otherwise your arguments will only be appended. - * - * @param int|string $index - * @param mixed $value - * - * @return $this - * - * @throws InvalidArgumentException when $index isn't an integer - */ - public function replaceArgument($index, $value) - { - if (\is_int($index)) { - $this->arguments['index_'.$index] = $value; - } elseif (str_starts_with($index, '$')) { - $this->arguments[$index] = $value; - } else { - throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.'); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php b/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php deleted file mode 100644 index 362c5f5..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -abstract class AbstractRecursivePass implements CompilerPassInterface -{ - /** - * @var ContainerBuilder - */ - protected $container; - protected $currentId; - - private $processExpressions = false; - private $expressionLanguage; - private $inExpression = false; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->container = $container; - - try { - $this->processValue($container->getDefinitions(), true); - } finally { - $this->container = null; - } - } - - protected function enableExpressionProcessing() - { - $this->processExpressions = true; - } - - protected function inExpression(bool $reset = true): bool - { - $inExpression = $this->inExpression; - if ($reset) { - $this->inExpression = false; - } - - return $inExpression; - } - - /** - * Processes a value found in a definition tree. - * - * @param mixed $value - * - * @return mixed - */ - protected function processValue($value, bool $isRoot = false) - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - if ($isRoot) { - $this->currentId = $k; - } - if ($v !== $processedValue = $this->processValue($v, $isRoot)) { - $value[$k] = $processedValue; - } - } - } elseif ($value instanceof ArgumentInterface) { - $value->setValues($this->processValue($value->getValues())); - } elseif ($value instanceof Expression && $this->processExpressions) { - $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']); - } elseif ($value instanceof Definition) { - $value->setArguments($this->processValue($value->getArguments())); - $value->setProperties($this->processValue($value->getProperties())); - $value->setMethodCalls($this->processValue($value->getMethodCalls())); - - $changes = $value->getChanges(); - if (isset($changes['factory'])) { - $value->setFactory($this->processValue($value->getFactory())); - } - if (isset($changes['configurator'])) { - $value->setConfigurator($this->processValue($value->getConfigurator())); - } - } - - return $value; - } - - /** - * @return \ReflectionFunctionAbstract|null - * - * @throws RuntimeException - */ - protected function getConstructor(Definition $definition, bool $required) - { - if ($definition->isSynthetic()) { - return null; - } - - if (\is_string($factory = $definition->getFactory())) { - if (!\function_exists($factory)) { - throw new RuntimeException(sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory)); - } - $r = new \ReflectionFunction($factory); - if (false !== $r->getFileName() && file_exists($r->getFileName())) { - $this->container->fileExists($r->getFileName()); - } - - return $r; - } - - if ($factory) { - [$class, $method] = $factory; - - if ('__construct' === $method) { - throw new RuntimeException(sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId)); - } - - if ($class instanceof Reference) { - $factoryDefinition = $this->container->findDefinition((string) $class); - while ((null === $class = $factoryDefinition->getClass()) && $factoryDefinition instanceof ChildDefinition) { - $factoryDefinition = $this->container->findDefinition($factoryDefinition->getParent()); - } - } elseif ($class instanceof Definition) { - $class = $class->getClass(); - } elseif (null === $class) { - $class = $definition->getClass(); - } - - return $this->getReflectionMethod(new Definition($class), $method); - } - - while ((null === $class = $definition->getClass()) && $definition instanceof ChildDefinition) { - $definition = $this->container->findDefinition($definition->getParent()); - } - - try { - if (!$r = $this->container->getReflectionClass($class)) { - if (null === $class) { - throw new RuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId)); - } - - throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); - } - } catch (\ReflectionException $e) { - throw new RuntimeException(sprintf('Invalid service "%s": ', $this->currentId).lcfirst($e->getMessage())); - } - if (!$r = $r->getConstructor()) { - if ($required) { - throw new RuntimeException(sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, sprintf($class !== $this->currentId ? ' "%s"' : '', $class))); - } - } elseif (!$r->isPublic()) { - throw new RuntimeException(sprintf('Invalid service "%s": ', $this->currentId).sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class).' must be public.'); - } - - return $r; - } - - /** - * @throws RuntimeException - * - * @return \ReflectionFunctionAbstract - */ - protected function getReflectionMethod(Definition $definition, string $method) - { - if ('__construct' === $method) { - return $this->getConstructor($definition, true); - } - - while ((null === $class = $definition->getClass()) && $definition instanceof ChildDefinition) { - $definition = $this->container->findDefinition($definition->getParent()); - } - - if (null === $class) { - throw new RuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId)); - } - - if (!$r = $this->container->getReflectionClass($class)) { - throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); - } - - if (!$r->hasMethod($method)) { - if ($r->hasMethod('__call') && ($r = $r->getMethod('__call')) && $r->isPublic()) { - return new \ReflectionMethod(static function (...$arguments) {}, '__invoke'); - } - - throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method)); - } - - $r = $r->getMethod($method); - if (!$r->isPublic()) { - throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method)); - } - - return $r; - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - if (!class_exists(ExpressionLanguage::class)) { - throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - - $providers = $this->container->getExpressionLanguageProviders(); - $this->expressionLanguage = new ExpressionLanguage(null, $providers, function (string $arg): string { - if ('""' === substr_replace($arg, '', 1, -1)) { - $id = stripcslashes(substr($arg, 1, -1)); - $this->inExpression = true; - $arg = $this->processValue(new Reference($id)); - $this->inExpression = false; - if (!$arg instanceof Reference) { - throw new RuntimeException(sprintf('"%s::processValue()" must return a Reference when processing an expression, "%s" returned for service("%s").', static::class, get_debug_type($arg), $id)); - } - $arg = sprintf('"%s"', $arg); - } - - return sprintf('$this->get(%s)', $arg); - }); - } - - return $this->expressionLanguage; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php b/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php deleted file mode 100644 index 8d3fefe..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -final class AliasDeprecatedPublicServicesPass extends AbstractRecursivePass -{ - private $tagName; - - private $aliases = []; - - public function __construct(string $tagName = 'container.private') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tagName = $tagName; - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference && isset($this->aliases[$id = (string) $value])) { - return new Reference($this->aliases[$id], $value->getInvalidBehavior()); - } - - return parent::processValue($value, $isRoot); - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->findTaggedServiceIds($this->tagName) as $id => $tags) { - if (null === $package = $tags[0]['package'] ?? null) { - throw new InvalidArgumentException(sprintf('The "package" attribute is mandatory for the "%s" tag on the "%s" service.', $this->tagName, $id)); - } - - if (null === $version = $tags[0]['version'] ?? null) { - throw new InvalidArgumentException(sprintf('The "version" attribute is mandatory for the "%s" tag on the "%s" service.', $this->tagName, $id)); - } - - $definition = $container->getDefinition($id); - if (!$definition->isPublic() || $definition->isPrivate()) { - continue; - } - - $container - ->setAlias($id, $aliasId = '.'.$this->tagName.'.'.$id) - ->setPublic(true) - ->setDeprecated($package, $version, 'Accessing the "%alias_id%" service directly from the container is deprecated, use dependency injection instead.'); - - $container->setDefinition($aliasId, $definition); - - $this->aliases[$id] = $aliasId; - } - - parent::process($container); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php deleted file mode 100644 index f7dbe6c..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Run this pass before passes that need to know more about the relation of - * your services. - * - * This class will populate the ServiceReferenceGraph with information. You can - * retrieve the graph in other passes from the compiler. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class AnalyzeServiceReferencesPass extends AbstractRecursivePass -{ - private $graph; - private $currentDefinition; - private $onlyConstructorArguments; - private $hasProxyDumper; - private $lazy; - private $byConstructor; - private $byFactory; - private $definitions; - private $aliases; - - /** - * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls - */ - public function __construct(bool $onlyConstructorArguments = false, bool $hasProxyDumper = true) - { - $this->onlyConstructorArguments = $onlyConstructorArguments; - $this->hasProxyDumper = $hasProxyDumper; - $this->enableExpressionProcessing(); - } - - /** - * Processes a ContainerBuilder object to populate the service reference graph. - */ - public function process(ContainerBuilder $container) - { - $this->container = $container; - $this->graph = $container->getCompiler()->getServiceReferenceGraph(); - $this->graph->clear(); - $this->lazy = false; - $this->byConstructor = false; - $this->byFactory = false; - $this->definitions = $container->getDefinitions(); - $this->aliases = $container->getAliases(); - - foreach ($this->aliases as $id => $alias) { - $targetId = $this->getDefinitionId((string) $alias); - $this->graph->connect($id, $alias, $targetId, null !== $targetId ? $this->container->getDefinition($targetId) : null, null); - } - - try { - parent::process($container); - } finally { - $this->aliases = $this->definitions = []; - } - } - - protected function processValue($value, bool $isRoot = false) - { - $lazy = $this->lazy; - $inExpression = $this->inExpression(); - - if ($value instanceof ArgumentInterface) { - $this->lazy = !$this->byFactory || !$value instanceof IteratorArgument; - parent::processValue($value->getValues()); - $this->lazy = $lazy; - - return $value; - } - if ($value instanceof Reference) { - $targetId = $this->getDefinitionId((string) $value); - $targetDefinition = null !== $targetId ? $this->container->getDefinition($targetId) : null; - - $this->graph->connect( - $this->currentId, - $this->currentDefinition, - $targetId, - $targetDefinition, - $value, - $this->lazy || ($this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy()), - ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), - $this->byConstructor - ); - - if ($inExpression) { - $this->graph->connect( - '.internal.reference_in_expression', - null, - $targetId, - $targetDefinition, - $value, - $this->lazy || ($targetDefinition && $targetDefinition->isLazy()), - true - ); - } - - return $value; - } - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - if ($isRoot) { - if ($value->isSynthetic() || $value->isAbstract()) { - return $value; - } - $this->currentDefinition = $value; - } elseif ($this->currentDefinition === $value) { - return $value; - } - $this->lazy = false; - - $byConstructor = $this->byConstructor; - $this->byConstructor = $isRoot || $byConstructor; - - $byFactory = $this->byFactory; - $this->byFactory = true; - $this->processValue($value->getFactory()); - $this->byFactory = $byFactory; - $this->processValue($value->getArguments()); - - $properties = $value->getProperties(); - $setters = $value->getMethodCalls(); - - // Any references before a "wither" are part of the constructor-instantiation graph - $lastWitherIndex = null; - foreach ($setters as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (null !== $lastWitherIndex) { - $this->processValue($properties); - $setters = $properties = []; - - foreach ($value->getMethodCalls() as $k => $call) { - if (null === $lastWitherIndex) { - $setters[] = $call; - continue; - } - - if ($lastWitherIndex === $k) { - $lastWitherIndex = null; - } - - $this->processValue($call); - } - } - - $this->byConstructor = $byConstructor; - - if (!$this->onlyConstructorArguments) { - $this->processValue($properties); - $this->processValue($setters); - $this->processValue($value->getConfigurator()); - } - $this->lazy = $lazy; - - return $value; - } - - private function getDefinitionId(string $id): ?string - { - while (isset($this->aliases[$id])) { - $id = (string) $this->aliases[$id]; - } - - return isset($this->definitions[$id]) ? $id : null; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php deleted file mode 100644 index 4db7185..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Alexander M. Turek - */ -final class AttributeAutoconfigurationPass extends AbstractRecursivePass -{ - private $classAttributeConfigurators = []; - private $methodAttributeConfigurators = []; - private $propertyAttributeConfigurators = []; - private $parameterAttributeConfigurators = []; - - public function process(ContainerBuilder $container): void - { - if (80000 > \PHP_VERSION_ID || !$container->getAutoconfiguredAttributes()) { - return; - } - - foreach ($container->getAutoconfiguredAttributes() as $attributeName => $callable) { - $callableReflector = new \ReflectionFunction(\Closure::fromCallable($callable)); - if ($callableReflector->getNumberOfParameters() <= 2) { - $this->classAttributeConfigurators[$attributeName] = $callable; - continue; - } - - $reflectorParameter = $callableReflector->getParameters()[2]; - $parameterType = $reflectorParameter->getType(); - $types = []; - if ($parameterType instanceof \ReflectionUnionType) { - foreach ($parameterType->getTypes() as $type) { - $types[] = $type->getName(); - } - } elseif ($parameterType instanceof \ReflectionNamedType) { - $types[] = $parameterType->getName(); - } else { - throw new LogicException(sprintf('Argument "$%s" of attribute autoconfigurator should have a type, use one or more of "\ReflectionClass|\ReflectionMethod|\ReflectionProperty|\ReflectionParameter|\Reflector" in "%s" on line "%d".', $reflectorParameter->getName(), $callableReflector->getFileName(), $callableReflector->getStartLine())); - } - - try { - $attributeReflector = new \ReflectionClass($attributeName); - } catch (\ReflectionException $e) { - continue; - } - - $targets = $attributeReflector->getAttributes(\Attribute::class)[0] ?? 0; - $targets = $targets ? $targets->getArguments()[0] ?? -1 : 0; - - foreach (['class', 'method', 'property', 'parameter'] as $symbol) { - if (['Reflector'] !== $types) { - if (!\in_array('Reflection'.ucfirst($symbol), $types, true)) { - continue; - } - if (!($targets & \constant('Attribute::TARGET_'.strtoupper($symbol)))) { - throw new LogicException(sprintf('Invalid type "Reflection%s" on argument "$%s": attribute "%s" cannot target a '.$symbol.' in "%s" on line "%d".', ucfirst($symbol), $reflectorParameter->getName(), $attributeName, $callableReflector->getFileName(), $callableReflector->getStartLine())); - } - } - $this->{$symbol.'AttributeConfigurators'}[$attributeName] = $callable; - } - } - - parent::process($container); - } - - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Definition - || !$value->isAutoconfigured() - || $value->isAbstract() - || $value->hasTag('container.ignore_attributes') - || !($classReflector = $this->container->getReflectionClass($value->getClass(), false)) - ) { - return parent::processValue($value, $isRoot); - } - - $instanceof = $value->getInstanceofConditionals(); - $conditionals = $instanceof[$classReflector->getName()] ?? new ChildDefinition(''); - - if ($this->classAttributeConfigurators) { - foreach ($classReflector->getAttributes() as $attribute) { - if ($configurator = $this->classAttributeConfigurators[$attribute->getName()] ?? null) { - $configurator($conditionals, $attribute->newInstance(), $classReflector); - } - } - } - - if ($this->parameterAttributeConfigurators) { - try { - $constructorReflector = $this->getConstructor($value, false); - } catch (RuntimeException $e) { - $constructorReflector = null; - } - - if ($constructorReflector) { - foreach ($constructorReflector->getParameters() as $parameterReflector) { - foreach ($parameterReflector->getAttributes() as $attribute) { - if ($configurator = $this->parameterAttributeConfigurators[$attribute->getName()] ?? null) { - $configurator($conditionals, $attribute->newInstance(), $parameterReflector); - } - } - } - } - } - - if ($this->methodAttributeConfigurators || $this->parameterAttributeConfigurators) { - foreach ($classReflector->getMethods(\ReflectionMethod::IS_PUBLIC) as $methodReflector) { - if ($methodReflector->isStatic() || $methodReflector->isConstructor() || $methodReflector->isDestructor()) { - continue; - } - - if ($this->methodAttributeConfigurators) { - foreach ($methodReflector->getAttributes() as $attribute) { - if ($configurator = $this->methodAttributeConfigurators[$attribute->getName()] ?? null) { - $configurator($conditionals, $attribute->newInstance(), $methodReflector); - } - } - } - - if ($this->parameterAttributeConfigurators) { - foreach ($methodReflector->getParameters() as $parameterReflector) { - foreach ($parameterReflector->getAttributes() as $attribute) { - if ($configurator = $this->parameterAttributeConfigurators[$attribute->getName()] ?? null) { - $configurator($conditionals, $attribute->newInstance(), $parameterReflector); - } - } - } - } - } - } - - if ($this->propertyAttributeConfigurators) { - foreach ($classReflector->getProperties(\ReflectionProperty::IS_PUBLIC) as $propertyReflector) { - if ($propertyReflector->isStatic()) { - continue; - } - - foreach ($propertyReflector->getAttributes() as $attribute) { - if ($configurator = $this->propertyAttributeConfigurators[$attribute->getName()] ?? null) { - $configurator($conditionals, $attribute->newInstance(), $propertyReflector); - } - } - } - } - - if (!isset($instanceof[$classReflector->getName()]) && new ChildDefinition('') != $conditionals) { - $instanceof[$classReflector->getName()] = $conditionals; - $value->setInstanceofConditionals($instanceof); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php b/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php deleted file mode 100644 index b150e70..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * Sets a service to be an alias of another one, given a format pattern. - */ -class AutoAliasServicePass implements CompilerPassInterface -{ - private $privateAliases = []; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { - foreach ($tags as $tag) { - if (!isset($tag['format'])) { - throw new InvalidArgumentException(sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId)); - } - - $aliasId = $container->getParameterBag()->resolveValue($tag['format']); - if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) { - $alias = new Alias($aliasId, $container->getDefinition($serviceId)->isPublic()); - $container->setAlias($serviceId, $alias); - - if (!$alias->isPublic()) { - $alias->setPublic(true); - $this->privateAliases[] = $alias; - } - } - } - } - } - - /** - * @internal to be removed in Symfony 6.0 - */ - public function getPrivateAliases(): array - { - $privateAliases = $this->privateAliases; - $this->privateAliases = []; - - return $privateAliases; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php deleted file mode 100644 index c2b8077..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php +++ /dev/null @@ -1,625 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\Attribute\TaggedIterator; -use Symfony\Component\DependencyInjection\Attribute\TaggedLocator; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\AutowiringFailedException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Inspects existing service definitions and wires the autowired ones using the type hints of their classes. - * - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class AutowirePass extends AbstractRecursivePass -{ - private $types; - private $ambiguousServiceTypes; - private $autowiringAliases; - private $lastFailure; - private $throwOnAutowiringException; - private $decoratedClass; - private $decoratedId; - private $methodCalls; - private $defaultArgument; - private $getPreviousValue; - private $decoratedMethodIndex; - private $decoratedMethodArgumentIndex; - private $typesClone; - private $combinedAliases; - - public function __construct(bool $throwOnAutowireException = true) - { - $this->throwOnAutowiringException = $throwOnAutowireException; - $this->defaultArgument = new class() { - public $value; - public $names; - }; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->populateCombinedAliases($container); - - try { - $this->typesClone = clone $this; - parent::process($container); - } finally { - $this->decoratedClass = null; - $this->decoratedId = null; - $this->methodCalls = null; - $this->defaultArgument->names = null; - $this->getPreviousValue = null; - $this->decoratedMethodIndex = null; - $this->decoratedMethodArgumentIndex = null; - $this->typesClone = null; - $this->combinedAliases = []; - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - try { - return $this->doProcessValue($value, $isRoot); - } catch (AutowiringFailedException $e) { - if ($this->throwOnAutowiringException) { - throw $e; - } - - $this->container->getDefinition($this->currentId)->addError($e->getMessageCallback() ?? $e->getMessage()); - - return parent::processValue($value, $isRoot); - } - } - - /** - * @return mixed - */ - private function doProcessValue($value, bool $isRoot = false) - { - if ($value instanceof TypedReference) { - if ($ref = $this->getAutowiredReference($value, true)) { - return $ref; - } - if (ContainerBuilder::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) { - $message = $this->createTypeNotFoundMessageCallback($value, 'it'); - - // since the error message varies by referenced id and $this->currentId, so should the id of the dummy errored definition - $this->container->register($id = sprintf('.errored.%s.%s', $this->currentId, (string) $value), $value->getType()) - ->addError($message); - - return new TypedReference($id, $value->getType(), $value->getInvalidBehavior(), $value->getName()); - } - } - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - $this->container->log($this, sprintf('Skipping service "%s": Class or interface "%s" cannot be loaded.', $this->currentId, $value->getClass())); - - return $value; - } - - $this->methodCalls = $value->getMethodCalls(); - - try { - $constructor = $this->getConstructor($value, false); - } catch (RuntimeException $e) { - throw new AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e); - } - - if ($constructor) { - array_unshift($this->methodCalls, [$constructor, $value->getArguments()]); - } - - $checkAttributes = 80000 <= \PHP_VERSION_ID && !$value->hasTag('container.ignore_attributes'); - $this->methodCalls = $this->autowireCalls($reflectionClass, $isRoot, $checkAttributes); - - if ($constructor) { - [, $arguments] = array_shift($this->methodCalls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - } - - if ($this->methodCalls !== $value->getMethodCalls()) { - $value->setMethodCalls($this->methodCalls); - } - - return $value; - } - - private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot, bool $checkAttributes): array - { - $this->decoratedId = null; - $this->decoratedClass = null; - $this->getPreviousValue = null; - - if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && null !== ($this->decoratedId = $definition->innerServiceId) && $this->container->has($this->decoratedId)) { - $this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass(); - } - - $patchedIndexes = []; - - foreach ($this->methodCalls as $i => $call) { - [$method, $arguments] = $call; - - if ($method instanceof \ReflectionFunctionAbstract) { - $reflectionMethod = $method; - } else { - $definition = new Definition($reflectionClass->name); - try { - $reflectionMethod = $this->getReflectionMethod($definition, $method); - } catch (RuntimeException $e) { - if ($definition->getFactory()) { - continue; - } - throw $e; - } - } - - $arguments = $this->autowireMethod($reflectionMethod, $arguments, $checkAttributes, $i); - - if ($arguments !== $call[1]) { - $this->methodCalls[$i][1] = $arguments; - $patchedIndexes[] = $i; - } - } - - // use named arguments to skip complex default values - foreach ($patchedIndexes as $i) { - $namedArguments = null; - $arguments = $this->methodCalls[$i][1]; - - foreach ($arguments as $j => $value) { - if ($namedArguments && !$value instanceof $this->defaultArgument) { - unset($arguments[$j]); - $arguments[$namedArguments[$j]] = $value; - } - if ($namedArguments || !$value instanceof $this->defaultArgument) { - continue; - } - - if (\PHP_VERSION_ID >= 80100 && (\is_array($value->value) ? $value->value : \is_object($value->value))) { - unset($arguments[$j]); - $namedArguments = $value->names; - } else { - $arguments[$j] = $value->value; - } - } - - $this->methodCalls[$i][1] = $arguments; - } - - return $this->methodCalls; - } - - /** - * Autowires the constructor or a method. - * - * @throws AutowiringFailedException - */ - private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments, bool $checkAttributes, int $methodIndex): array - { - $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId; - $method = $reflectionMethod->name; - $parameters = $reflectionMethod->getParameters(); - if ($reflectionMethod->isVariadic()) { - array_pop($parameters); - } - $this->defaultArgument->names = new \ArrayObject(); - - foreach ($parameters as $index => $parameter) { - $this->defaultArgument->names[$index] = $parameter->name; - - if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) { - continue; - } - - $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true); - - if ($checkAttributes) { - foreach ($parameter->getAttributes() as $attribute) { - if (TaggedIterator::class === $attribute->getName()) { - $attribute = $attribute->newInstance(); - $arguments[$index] = new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, false, $attribute->defaultPriorityMethod); - break; - } - - if (TaggedLocator::class === $attribute->getName()) { - $attribute = $attribute->newInstance(); - $arguments[$index] = new ServiceLocatorArgument(new TaggedIteratorArgument($attribute->tag, $attribute->indexAttribute, $attribute->defaultIndexMethod, true, $attribute->defaultPriorityMethod)); - break; - } - } - - if ('' !== ($arguments[$index] ?? '')) { - continue; - } - } - - if (!$type) { - if (isset($arguments[$index])) { - continue; - } - - // no default value? Then fail - if (!$parameter->isDefaultValueAvailable()) { - // For core classes, isDefaultValueAvailable() can - // be false when isOptional() returns true. If the - // argument *is* optional, allow it to be missing - if ($parameter->isOptional()) { - --$index; - break; - } - $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false); - $type = $type ? sprintf('is type-hinted "%s"', ltrim($type, '\\')) : 'has no type-hint'; - - throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); - } - - // specifically pass the default value - $arguments[$index] = clone $this->defaultArgument; - $arguments[$index]->value = $parameter->getDefaultValue(); - - continue; - } - - $getValue = function () use ($type, $parameter, $class, $method) { - if (!$value = $this->getAutowiredReference($ref = new TypedReference($type, $type, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, Target::parseName($parameter)), true)) { - $failureMessage = $this->createTypeNotFoundMessageCallback($ref, sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method)); - - if ($parameter->isDefaultValueAvailable()) { - $value = clone $this->defaultArgument; - $value->value = $parameter->getDefaultValue(); - } elseif (!$parameter->allowsNull()) { - throw new AutowiringFailedException($this->currentId, $failureMessage); - } - } - - return $value; - }; - - if ($this->decoratedClass && $isDecorated = is_a($this->decoratedClass, $type, true)) { - if ($this->getPreviousValue) { - // The inner service is injected only if there is only 1 argument matching the type of the decorated class - // across all arguments of all autowired methods. - // If a second matching argument is found, the default behavior is restored. - - $getPreviousValue = $this->getPreviousValue; - $this->methodCalls[$this->decoratedMethodIndex][1][$this->decoratedMethodArgumentIndex] = $getPreviousValue(); - $this->decoratedClass = null; // Prevent further checks - } else { - $arguments[$index] = new TypedReference($this->decoratedId, $this->decoratedClass); - $this->getPreviousValue = $getValue; - $this->decoratedMethodIndex = $methodIndex; - $this->decoratedMethodArgumentIndex = $index; - - continue; - } - } - - $arguments[$index] = $getValue(); - } - - if ($parameters && !isset($arguments[++$index])) { - while (0 <= --$index) { - if (!$arguments[$index] instanceof $this->defaultArgument) { - break; - } - unset($arguments[$index]); - } - } - - // it's possible index 1 was set, then index 0, then 2, etc - // make sure that we re-order so they're injected as expected - ksort($arguments); - - return $arguments; - } - - /** - * Returns a reference to the service matching the given type, if any. - */ - private function getAutowiredReference(TypedReference $reference, bool $filterType): ?TypedReference - { - $this->lastFailure = null; - $type = $reference->getType(); - - if ($type !== (string) $reference) { - return $reference; - } - - if ($filterType && false !== $m = strpbrk($type, '&|')) { - $types = array_diff(explode($m[0], $type), ['int', 'string', 'array', 'bool', 'float', 'iterable', 'object', 'callable', 'null']); - - sort($types); - - $type = implode($m[0], $types); - } - - if (null !== $name = $reference->getName()) { - if ($this->container->has($alias = $type.' $'.$name) && !$this->container->findDefinition($alias)->isAbstract()) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - if (null !== ($alias = $this->combinedAliases[$alias] ?? null) && !$this->container->findDefinition($alias)->isAbstract()) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - if ($this->container->has($name) && !$this->container->findDefinition($name)->isAbstract()) { - foreach ($this->container->getAliases() + $this->combinedAliases as $id => $alias) { - if ($name === (string) $alias && str_starts_with($id, $type.' $')) { - return new TypedReference($name, $type, $reference->getInvalidBehavior()); - } - } - } - } - - if ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract()) { - return new TypedReference($type, $type, $reference->getInvalidBehavior()); - } - - if (null !== ($alias = $this->combinedAliases[$type] ?? null) && !$this->container->findDefinition($alias)->isAbstract()) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - return null; - } - - /** - * Populates the list of available types. - */ - private function populateAvailableTypes(ContainerBuilder $container) - { - $this->types = []; - $this->ambiguousServiceTypes = []; - $this->autowiringAliases = []; - - foreach ($container->getDefinitions() as $id => $definition) { - $this->populateAvailableType($container, $id, $definition); - } - - foreach ($container->getAliases() as $id => $alias) { - $this->populateAutowiringAlias($id); - } - } - - /** - * Populates the list of available types for a given definition. - */ - private function populateAvailableType(ContainerBuilder $container, string $id, Definition $definition) - { - // Never use abstract services - if ($definition->isAbstract()) { - return; - } - - if ('' === $id || '.' === $id[0] || $definition->isDeprecated() || !$reflectionClass = $container->getReflectionClass($definition->getClass(), false)) { - return; - } - - foreach ($reflectionClass->getInterfaces() as $reflectionInterface) { - $this->set($reflectionInterface->name, $id); - } - - do { - $this->set($reflectionClass->name, $id); - } while ($reflectionClass = $reflectionClass->getParentClass()); - - $this->populateAutowiringAlias($id); - } - - /** - * Associates a type and a service id if applicable. - */ - private function set(string $type, string $id) - { - // is this already a type/class that is known to match multiple services? - if (isset($this->ambiguousServiceTypes[$type])) { - $this->ambiguousServiceTypes[$type][] = $id; - - return; - } - - // check to make sure the type doesn't match multiple services - if (!isset($this->types[$type]) || $this->types[$type] === $id) { - $this->types[$type] = $id; - - return; - } - - // keep an array of all services matching this type - if (!isset($this->ambiguousServiceTypes[$type])) { - $this->ambiguousServiceTypes[$type] = [$this->types[$type]]; - unset($this->types[$type]); - } - $this->ambiguousServiceTypes[$type][] = $id; - } - - private function createTypeNotFoundMessageCallback(TypedReference $reference, string $label): \Closure - { - if (null === $this->typesClone->container) { - $this->typesClone->container = new ContainerBuilder($this->container->getParameterBag()); - $this->typesClone->container->setAliases($this->container->getAliases()); - $this->typesClone->container->setDefinitions($this->container->getDefinitions()); - $this->typesClone->container->setResourceTracking(false); - } - $currentId = $this->currentId; - - return (function () use ($reference, $label, $currentId) { - return $this->createTypeNotFoundMessage($reference, $label, $currentId); - })->bindTo($this->typesClone); - } - - private function createTypeNotFoundMessage(TypedReference $reference, string $label, string $currentId): string - { - if (!$r = $this->container->getReflectionClass($type = $reference->getType(), false)) { - // either $type does not exist or a parent class does not exist - try { - $resource = new ClassExistenceResource($type, false); - // isFresh() will explode ONLY if a parent class/trait does not exist - $resource->isFresh(0); - $parentMsg = false; - } catch (\ReflectionException $e) { - $parentMsg = $e->getMessage(); - } - - $message = sprintf('has type "%s" but this class %s.', $type, $parentMsg ? sprintf('is missing a parent class (%s)', $parentMsg) : 'was not found'); - } else { - $alternatives = $this->createTypeAlternatives($this->container, $reference); - $message = $this->container->has($type) ? 'this service is abstract' : 'no such service exists'; - $message = sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives); - - if ($r->isInterface() && !$alternatives) { - $message .= ' Did you create a class that implements this interface?'; - } - } - - $message = sprintf('Cannot autowire service "%s": %s %s', $currentId, $label, $message); - - if (null !== $this->lastFailure) { - $message = $this->lastFailure."\n".$message; - $this->lastFailure = null; - } - - return $message; - } - - private function createTypeAlternatives(ContainerBuilder $container, TypedReference $reference): string - { - // try suggesting available aliases first - if ($message = $this->getAliasesSuggestionForType($container, $type = $reference->getType())) { - return ' '.$message; - } - if (null === $this->ambiguousServiceTypes) { - $this->populateAvailableTypes($container); - } - - $servicesAndAliases = $container->getServiceIds(); - if (null !== ($autowiringAliases = $this->autowiringAliases[$type] ?? null) && !isset($autowiringAliases[''])) { - return sprintf(' Available autowiring aliases for this %s are: "$%s".', class_exists($type, false) ? 'class' : 'interface', implode('", "$', $autowiringAliases)); - } - - if (!$container->has($type) && false !== $key = array_search(strtolower($type), array_map('strtolower', $servicesAndAliases))) { - return sprintf(' Did you mean "%s"?', $servicesAndAliases[$key]); - } elseif (isset($this->ambiguousServiceTypes[$type])) { - $message = sprintf('one of these existing services: "%s"', implode('", "', $this->ambiguousServiceTypes[$type])); - } elseif (isset($this->types[$type])) { - $message = sprintf('the existing "%s" service', $this->types[$type]); - } else { - return ''; - } - - return sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message); - } - - private function getAliasesSuggestionForType(ContainerBuilder $container, string $type): ?string - { - $aliases = []; - foreach (class_parents($type) + class_implements($type) as $parent) { - if ($container->has($parent) && !$container->findDefinition($parent)->isAbstract()) { - $aliases[] = $parent; - } - } - - if (1 < $len = \count($aliases)) { - $message = 'Try changing the type-hint to one of its parents: '; - for ($i = 0, --$len; $i < $len; ++$i) { - $message .= sprintf('%s "%s", ', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]); - } - $message .= sprintf('or %s "%s".', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]); - - return $message; - } - - if ($aliases) { - return sprintf('Try changing the type-hint to "%s" instead.', $aliases[0]); - } - - return null; - } - - private function populateAutowiringAlias(string $id): void - { - if (!preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))^((?&V)(?:\\\\(?&V))*+)(?: \$((?&V)))?$/', $id, $m)) { - return; - } - - $type = $m[2]; - $name = $m[3] ?? ''; - - if (class_exists($type, false) || interface_exists($type, false)) { - $this->autowiringAliases[$type][$name] = $name; - } - } - - private function populateCombinedAliases(ContainerBuilder $container): void - { - $this->combinedAliases = []; - $reverseAliases = []; - - foreach ($container->getAliases() as $id => $alias) { - if (!preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))^((?&V)(?:\\\\(?&V))*+)(?: \$((?&V)))?$/', $id, $m)) { - continue; - } - - $type = $m[2]; - $name = $m[3] ?? ''; - $reverseAliases[(string) $alias][$name][] = $type; - } - - foreach ($reverseAliases as $alias => $names) { - foreach ($names as $name => $types) { - if (2 > $count = \count($types)) { - continue; - } - sort($types); - $i = 1 << $count; - - // compute the powerset of the list of types - while ($i--) { - $set = []; - for ($j = 0; $j < $count; ++$j) { - if ($i & (1 << $j)) { - $set[] = $types[$j]; - } - } - - if (2 <= \count($set)) { - $this->combinedAliases[implode('&', $set).('' === $name ? '' : ' $'.$name)] = $alias; - $this->combinedAliases[implode('|', $set).('' === $name ? '' : ' $'.$name)] = $alias; - } - } - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php deleted file mode 100644 index 5c255cf..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Contracts\Service\Attribute\Required; - -/** - * Looks for definitions with autowiring enabled and registers their corresponding "@required" methods as setters. - * - * @author Nicolas Grekas - */ -class AutowireRequiredMethodsPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - return $value; - } - - $alreadyCalledMethods = []; - $withers = []; - - foreach ($value->getMethodCalls() as [$method]) { - $alreadyCalledMethods[strtolower($method)] = true; - } - - foreach ($reflectionClass->getMethods() as $reflectionMethod) { - $r = $reflectionMethod; - - if ($r->isConstructor() || isset($alreadyCalledMethods[strtolower($r->name)])) { - continue; - } - - while (true) { - if (\PHP_VERSION_ID >= 80000 && $r->getAttributes(Required::class)) { - if ($this->isWither($r, $r->getDocComment() ?: '')) { - $withers[] = [$r->name, [], true]; - } else { - $value->addMethodCall($r->name, []); - } - break; - } - if (false !== $doc = $r->getDocComment()) { - if (false !== stripos($doc, '@required') && preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@required(?:\s|\*/$)#i', $doc)) { - if ($this->isWither($reflectionMethod, $doc)) { - $withers[] = [$reflectionMethod->name, [], true]; - } else { - $value->addMethodCall($reflectionMethod->name, []); - } - break; - } - if (false === stripos($doc, '@inheritdoc') || !preg_match('#(?:^/\*\*|\n\s*+\*)\s*+(?:\{@inheritdoc\}|@inheritdoc)(?:\s|\*/$)#i', $doc)) { - break; - } - } - try { - $r = $r->getPrototype(); - } catch (\ReflectionException $e) { - break; // method has no prototype - } - } - } - - if ($withers) { - // Prepend withers to prevent creating circular loops - $setters = $value->getMethodCalls(); - $value->setMethodCalls($withers); - foreach ($setters as $call) { - $value->addMethodCall($call[0], $call[1], $call[2] ?? false); - } - } - - return $value; - } - - private function isWither(\ReflectionMethod $reflectionMethod, string $doc): bool - { - $match = preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@return\s++(static|\$this)[\s\*]#i', $doc, $matches); - if ($match && 'static' === $matches[1]) { - return true; - } - - if ($match && '$this' === $matches[1]) { - return false; - } - - $reflectionType = $reflectionMethod->hasReturnType() ? $reflectionMethod->getReturnType() : null; - - return $reflectionType instanceof \ReflectionNamedType && 'static' === $reflectionType->getName(); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php deleted file mode 100644 index 52024b8..0000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Contracts\Service\Attribute\Required; - -/** - * Looks for definitions with autowiring enabled and registers their corresponding "@required" properties. - * - * @author Sebastien Morel (Plopix) - * @author Nicolas Grekas - */ -class AutowireRequiredPropertiesPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (\PHP_VERSION_ID < 70400) { - return $value; - } - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - return $value; - } - - $properties = $value->getProperties(); - foreach ($reflectionClass->getProperties() as $reflectionProperty) { - if (!($type = $reflectionProperty->getType()) instanceof \ReflectionNamedType) { - continue; - } - if ((\PHP_VERSION_ID < 80000 || !$reflectionProperty->getAttributes(Required::class)) - && ((false === $doc = $reflectionProperty->getDocComment()) || false === stripos($doc, '@required') || !preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@required(?:\s|\*/$)#i', $doc)) - ) { - continue; - } - if (\array_key_exists($name = $reflectionProperty->getName(), $properties)) { - continue; - } - - $type = $type->getName(); - $value->setProperty($name, new TypedReference($type, $type, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name)); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php deleted file mode 100644 index 93808b2..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Checks if arguments of methods are properly configured. - * - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class CheckArgumentsValidityPass extends AbstractRecursivePass -{ - private $throwExceptions; - - public function __construct(bool $throwExceptions = true) - { - $this->throwExceptions = $throwExceptions; - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $i = 0; - $hasNamedArgs = false; - foreach ($value->getArguments() as $k => $v) { - if (\PHP_VERSION_ID >= 80000 && preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) { - $hasNamedArgs = true; - continue; - } - - if ($k !== $i++) { - if (!\is_int($k)) { - $msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - - $msg = sprintf('Invalid constructor argument %d for service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $this->currentId, $i); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - } - - if ($hasNamedArgs) { - $msg = sprintf('Invalid constructor argument for service "%s": cannot use positional argument after named argument. Check your service definition.', $this->currentId); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - } - - foreach ($value->getMethodCalls() as $methodCall) { - $i = 0; - $hasNamedArgs = false; - foreach ($methodCall[1] as $k => $v) { - if (\PHP_VERSION_ID >= 80000 && preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) { - $hasNamedArgs = true; - continue; - } - - if ($k !== $i++) { - if (!\is_int($k)) { - $msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - - $msg = sprintf('Invalid argument %d for method call "%s" of service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $methodCall[0], $this->currentId, $i); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - } - - if ($hasNamedArgs) { - $msg = sprintf('Invalid argument for method call "%s" of service "%s": cannot use positional argument after named argument. Check your service definition.', $methodCall[0], $this->currentId); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - } - } - - return null; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php deleted file mode 100644 index 55d911c..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; - -/** - * Checks your services for circular references. - * - * References from method calls are ignored since we might be able to resolve - * these references depending on the order in which services are called. - * - * Circular reference from method calls will only be detected at run-time. - * - * @author Johannes M. Schmitt - */ -class CheckCircularReferencesPass implements CompilerPassInterface -{ - private $currentPath; - private $checkedNodes; - - /** - * Checks the ContainerBuilder object for circular references. - */ - public function process(ContainerBuilder $container) - { - $graph = $container->getCompiler()->getServiceReferenceGraph(); - - $this->checkedNodes = []; - foreach ($graph->getNodes() as $id => $node) { - $this->currentPath = [$id]; - - $this->checkOutEdges($node->getOutEdges()); - } - } - - /** - * Checks for circular references. - * - * @param ServiceReferenceGraphEdge[] $edges An array of Edges - * - * @throws ServiceCircularReferenceException when a circular reference is found - */ - private function checkOutEdges(array $edges) - { - foreach ($edges as $edge) { - $node = $edge->getDestNode(); - $id = $node->getId(); - - if (empty($this->checkedNodes[$id])) { - // Don't check circular references for lazy edges - if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) { - $searchKey = array_search($id, $this->currentPath); - $this->currentPath[] = $id; - - if (false !== $searchKey) { - throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey)); - } - - $this->checkOutEdges($node->getOutEdges()); - } - - $this->checkedNodes[$id] = true; - array_pop($this->currentPath); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php deleted file mode 100644 index 6fe564a..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Loader\FileLoader; - -/** - * This pass validates each definition individually only taking the information - * into account which is contained in the definition itself. - * - * Later passes can rely on the following, and specifically do not need to - * perform these checks themselves: - * - * - non synthetic, non abstract services always have a class set - * - synthetic services are always public - * - * @author Johannes M. Schmitt - */ -class CheckDefinitionValidityPass implements CompilerPassInterface -{ - /** - * Processes the ContainerBuilder to validate the Definition. - * - * @throws RuntimeException When the Definition is invalid - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getDefinitions() as $id => $definition) { - // synthetic service is public - if ($definition->isSynthetic() && !$definition->isPublic()) { - throw new RuntimeException(sprintf('A synthetic service ("%s") must be public.', $id)); - } - - // non-synthetic, non-abstract service has class - if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass() && !$definition->hasTag('container.service_locator') && (!$definition->getFactory() || !preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id))) { - if ($definition->getFactory()) { - throw new RuntimeException(sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id)); - } - if (class_exists($id) || interface_exists($id, false)) { - if (str_starts_with($id, '\\') && 1 < substr_count($id, '\\')) { - throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "%s" to get rid of this error.', $id, substr($id, 1))); - } - - throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface in the global namespace. Leaving out the "class" attribute is only allowed for namespaced classes. Please specify the class attribute explicitly to get rid of this error.', $id)); - } - - throw new RuntimeException(sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id)); - } - - // tag attribute values must be scalars - foreach ($definition->getTags() as $name => $tags) { - foreach ($tags as $attributes) { - foreach ($attributes as $attribute => $value) { - if (!is_scalar($value) && null !== $value) { - throw new RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute)); - } - } - } - } - - if ($definition->isPublic() && !$definition->isPrivate()) { - $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); - if (null !== $usedEnvs) { - throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.'); - } - } - } - - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic() && !$alias->isPrivate()) { - $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); - if (null !== $usedEnvs) { - throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.'); - } - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php deleted file mode 100644 index fd31738..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Checks that all references are pointing to a valid service. - * - * @author Johannes M. Schmitt - */ -class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass -{ - private $serviceLocatorContextIds = []; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->serviceLocatorContextIds = []; - foreach ($container->findTaggedServiceIds('container.service_locator_context') as $id => $tags) { - $this->serviceLocatorContextIds[$id] = $tags[0]['id']; - $container->getDefinition($id)->clearTag('container.service_locator_context'); - } - - try { - return parent::process($container); - } finally { - $this->serviceLocatorContextIds = []; - } - } - - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $value->getInvalidBehavior() || $this->container->has($id = (string) $value)) { - return $value; - } - - $currentId = $this->currentId; - $graph = $this->container->getCompiler()->getServiceReferenceGraph(); - - if (isset($this->serviceLocatorContextIds[$currentId])) { - $currentId = $this->serviceLocatorContextIds[$currentId]; - $locator = $this->container->getDefinition($this->currentId)->getFactory()[0]; - - foreach ($locator->getArgument(0) as $k => $v) { - if ($v->getValues()[0] === $value) { - if ($k !== $id) { - $currentId = $k.'" in the container provided to "'.$currentId; - } - throw new ServiceNotFoundException($id, $currentId, null, $this->getAlternatives($id)); - } - } - } - - if ('.' === $currentId[0] && $graph->hasNode($currentId)) { - foreach ($graph->getNode($currentId)->getInEdges() as $edge) { - if (!$edge->getValue() instanceof Reference || ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $edge->getValue()->getInvalidBehavior()) { - continue; - } - $sourceId = $edge->getSourceNode()->getId(); - - if ('.' !== $sourceId[0]) { - $currentId = $sourceId; - break; - } - } - } - - throw new ServiceNotFoundException($id, $currentId, null, $this->getAlternatives($id)); - } - - private function getAlternatives(string $id): array - { - $alternatives = []; - foreach ($this->container->getServiceIds() as $knownId) { - if ('' === $knownId || '.' === $knownId[0]) { - continue; - } - - $lev = levenshtein($id, $knownId); - if ($lev <= \strlen($id) / 3 || false !== strpos($knownId, $id)) { - $alternatives[] = $knownId; - } - } - - return $alternatives; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php deleted file mode 100644 index 0349ef7..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Checks the validity of references. - * - * The following checks are performed by this pass: - * - target definitions are not abstract - * - * @author Johannes M. Schmitt - */ -class CheckReferenceValidityPass extends AbstractRecursivePass -{ - protected function processValue($value, bool $isRoot = false) - { - if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) { - return $value; - } - if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) { - $targetDefinition = $this->container->getDefinition((string) $value); - - if ($targetDefinition->isAbstract()) { - throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value)); - } - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php b/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php deleted file mode 100644 index b7ec85c..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php +++ /dev/null @@ -1,329 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\InvalidParameterTypeException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * Checks whether injected parameters are compatible with type declarations. - * - * This pass should be run after all optimization passes. - * - * It can be added either: - * * before removing passes to check all services even if they are not currently used, - * * after removing passes to check only services are used in the app. - * - * @author Nicolas Grekas - * @author Julien Maulny - */ -final class CheckTypeDeclarationsPass extends AbstractRecursivePass -{ - private const SCALAR_TYPES = [ - 'int' => true, - 'float' => true, - 'bool' => true, - 'string' => true, - ]; - - private const BUILTIN_TYPES = [ - 'array' => true, - 'bool' => true, - 'callable' => true, - 'float' => true, - 'int' => true, - 'iterable' => true, - 'object' => true, - 'string' => true, - ]; - - private $autoload; - private $skippedIds; - - private $expressionLanguage; - - /** - * @param bool $autoload Whether services who's class in not loaded should be checked or not. - * Defaults to false to save loading code during compilation. - * @param array $skippedIds An array indexed by the service ids to skip - */ - public function __construct(bool $autoload = false, array $skippedIds = []) - { - $this->autoload = $autoload; - $this->skippedIds = $skippedIds; - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (isset($this->skippedIds[$this->currentId])) { - return $value; - } - - if (!$value instanceof Definition || $value->hasErrors() || $value->isDeprecated()) { - return parent::processValue($value, $isRoot); - } - - if (!$this->autoload) { - if (!$class = $value->getClass()) { - return parent::processValue($value, $isRoot); - } - if (!class_exists($class, false) && !interface_exists($class, false)) { - return parent::processValue($value, $isRoot); - } - } - - if (ServiceLocator::class === $value->getClass()) { - return parent::processValue($value, $isRoot); - } - - if ($constructor = $this->getConstructor($value, false)) { - $this->checkTypeDeclarations($value, $constructor, $value->getArguments()); - } - - foreach ($value->getMethodCalls() as $methodCall) { - try { - $reflectionMethod = $this->getReflectionMethod($value, $methodCall[0]); - } catch (RuntimeException $e) { - if ($value->getFactory()) { - continue; - } - - throw $e; - } - - $this->checkTypeDeclarations($value, $reflectionMethod, $methodCall[1]); - } - - return parent::processValue($value, $isRoot); - } - - /** - * @throws InvalidArgumentException When not enough parameters are defined for the method - */ - private function checkTypeDeclarations(Definition $checkedDefinition, \ReflectionFunctionAbstract $reflectionFunction, array $values): void - { - $numberOfRequiredParameters = $reflectionFunction->getNumberOfRequiredParameters(); - - if (\count($values) < $numberOfRequiredParameters) { - throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": "%s::%s()" requires %d arguments, %d passed.', $this->currentId, $reflectionFunction->class, $reflectionFunction->name, $numberOfRequiredParameters, \count($values))); - } - - $reflectionParameters = $reflectionFunction->getParameters(); - $checksCount = min($reflectionFunction->getNumberOfParameters(), \count($values)); - - $envPlaceholderUniquePrefix = $this->container->getParameterBag() instanceof EnvPlaceholderParameterBag ? $this->container->getParameterBag()->getEnvPlaceholderUniquePrefix() : null; - - for ($i = 0; $i < $checksCount; ++$i) { - if (!$reflectionParameters[$i]->hasType() || $reflectionParameters[$i]->isVariadic()) { - continue; - } - - $this->checkType($checkedDefinition, $values[$i], $reflectionParameters[$i], $envPlaceholderUniquePrefix); - } - - if ($reflectionFunction->isVariadic() && ($lastParameter = end($reflectionParameters))->hasType()) { - $variadicParameters = \array_slice($values, $lastParameter->getPosition()); - - foreach ($variadicParameters as $variadicParameter) { - $this->checkType($checkedDefinition, $variadicParameter, $lastParameter, $envPlaceholderUniquePrefix); - } - } - } - - /** - * @throws InvalidParameterTypeException When a parameter is not compatible with the declared type - */ - private function checkType(Definition $checkedDefinition, $value, \ReflectionParameter $parameter, ?string $envPlaceholderUniquePrefix, \ReflectionType $reflectionType = null): void - { - $reflectionType = $reflectionType ?? $parameter->getType(); - - if ($reflectionType instanceof \ReflectionUnionType) { - foreach ($reflectionType->getTypes() as $t) { - try { - $this->checkType($checkedDefinition, $value, $parameter, $envPlaceholderUniquePrefix, $t); - - return; - } catch (InvalidParameterTypeException $e) { - } - } - - throw new InvalidParameterTypeException($this->currentId, $e->getCode(), $parameter); - } - if ($reflectionType instanceof \ReflectionIntersectionType) { - foreach ($reflectionType->getTypes() as $t) { - $this->checkType($checkedDefinition, $value, $parameter, $envPlaceholderUniquePrefix, $t); - } - - return; - } - if (!$reflectionType instanceof \ReflectionNamedType) { - return; - } - - $type = $reflectionType->getName(); - - if ($value instanceof Reference) { - if (!$this->container->has($value = (string) $value)) { - return; - } - - if ('service_container' === $value && is_a($type, Container::class, true)) { - return; - } - - $value = $this->container->findDefinition($value); - } - - if ('self' === $type) { - $type = $parameter->getDeclaringClass()->getName(); - } - - if ('static' === $type) { - $type = $checkedDefinition->getClass(); - } - - $class = null; - - if ($value instanceof Definition) { - if ($value->getFactory()) { - return; - } - - $class = $value->getClass(); - - if ($class && isset(self::BUILTIN_TYPES[strtolower($class)])) { - $class = strtolower($class); - } elseif (!$class || (!$this->autoload && !class_exists($class, false) && !interface_exists($class, false))) { - return; - } - } elseif ($value instanceof Parameter) { - $value = $this->container->getParameter($value); - } elseif ($value instanceof Expression) { - try { - $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this->container]); - } catch (\Exception $e) { - // If a service from the expression cannot be fetched from the container, we skip the validation. - return; - } - } elseif (\is_string($value)) { - if ('%' === ($value[0] ?? '') && preg_match('/^%([^%]+)%$/', $value, $match)) { - $value = $this->container->getParameter(substr($value, 1, -1)); - } - - if ($envPlaceholderUniquePrefix && \is_string($value) && str_contains($value, 'env_')) { - // If the value is an env placeholder that is either mixed with a string or with another env placeholder, then its resolved value will always be a string, so we don't need to resolve it. - // We don't need to change the value because it is already a string. - if ('' === preg_replace('/'.$envPlaceholderUniquePrefix.'_\w+_[a-f0-9]{32}/U', '', $value, -1, $c) && 1 === $c) { - try { - $value = $this->container->resolveEnvPlaceholders($value, true); - } catch (\Exception $e) { - // If an env placeholder cannot be resolved, we skip the validation. - return; - } - } - } - } - - if (null === $value && $parameter->allowsNull()) { - return; - } - - if (null === $class) { - if ($value instanceof IteratorArgument) { - $class = RewindableGenerator::class; - } elseif ($value instanceof ServiceClosureArgument) { - $class = \Closure::class; - } elseif ($value instanceof ServiceLocatorArgument) { - $class = ServiceLocator::class; - } elseif (\is_object($value)) { - $class = \get_class($value); - } else { - $class = \gettype($value); - $class = ['integer' => 'int', 'double' => 'float', 'boolean' => 'bool'][$class] ?? $class; - } - } - - if (isset(self::SCALAR_TYPES[$type]) && isset(self::SCALAR_TYPES[$class])) { - return; - } - - if ('string' === $type && method_exists($class, '__toString')) { - return; - } - - if ('callable' === $type && (\Closure::class === $class || method_exists($class, '__invoke'))) { - return; - } - - if ('callable' === $type && \is_array($value) && isset($value[0]) && ($value[0] instanceof Reference || $value[0] instanceof Definition || \is_string($value[0]))) { - return; - } - - if ('iterable' === $type && (\is_array($value) || 'array' === $class || is_subclass_of($class, \Traversable::class))) { - return; - } - - if ($type === $class) { - return; - } - - if ('object' === $type && !isset(self::BUILTIN_TYPES[$class])) { - return; - } - - if ('mixed' === $type) { - return; - } - - if (is_a($class, $type, true)) { - return; - } - - if ('false' === $type) { - if (false === $value) { - return; - } - } elseif ($reflectionType->isBuiltin()) { - $checkFunction = sprintf('is_%s', $type); - if ($checkFunction($value)) { - return; - } - } - - throw new InvalidParameterTypeException($this->currentId, \is_object($value) ? $class : get_debug_type($value), $parameter); - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - $this->expressionLanguage = new ExpressionLanguage(null, $this->container->getExpressionLanguageProviders()); - } - - return $this->expressionLanguage; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/Compiler.php b/vendor/symfony/dependency-injection/Compiler/Compiler.php deleted file mode 100644 index 4c5d003..0000000 --- a/vendor/symfony/dependency-injection/Compiler/Compiler.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; - -/** - * This class is used to remove circular dependencies between individual passes. - * - * @author Johannes M. Schmitt - */ -class Compiler -{ - private $passConfig; - private $log = []; - private $serviceReferenceGraph; - - public function __construct() - { - $this->passConfig = new PassConfig(); - $this->serviceReferenceGraph = new ServiceReferenceGraph(); - } - - /** - * @return PassConfig - */ - public function getPassConfig() - { - return $this->passConfig; - } - - /** - * @return ServiceReferenceGraph - */ - public function getServiceReferenceGraph() - { - return $this->serviceReferenceGraph; - } - - public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) - { - $this->passConfig->addPass($pass, $type, $priority); - } - - /** - * @final - */ - public function log(CompilerPassInterface $pass, string $message) - { - if (str_contains($message, "\n")) { - $message = str_replace("\n", "\n".\get_class($pass).': ', trim($message)); - } - - $this->log[] = \get_class($pass).': '.$message; - } - - /** - * @return array - */ - public function getLog() - { - return $this->log; - } - - /** - * Run the Compiler and process all Passes. - */ - public function compile(ContainerBuilder $container) - { - try { - foreach ($this->passConfig->getPasses() as $pass) { - $pass->process($container); - } - } catch (\Exception $e) { - $usedEnvs = []; - $prev = $e; - - do { - $msg = $prev->getMessage(); - - if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) { - $r = new \ReflectionProperty($prev, 'message'); - $r->setAccessible(true); - $r->setValue($prev, $resolvedMsg); - } - } while ($prev = $prev->getPrevious()); - - if ($usedEnvs) { - $e = new EnvParameterException($usedEnvs, $e); - } - - throw $e; - } finally { - $this->getServiceReferenceGraph()->clear(); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php b/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php deleted file mode 100644 index 3085006..0000000 --- a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Interface that must be implemented by compilation passes. - * - * @author Johannes M. Schmitt - */ -interface CompilerPassInterface -{ - /** - * You can modify the container here before it is dumped to PHP code. - */ - public function process(ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php deleted file mode 100644 index 0284587..0000000 --- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Overwrites a service but keeps the overridden one. - * - * @author Christophe Coevoet - * @author Fabien Potencier - * @author Diego Saint Esteben - */ -class DecoratorServicePass extends AbstractRecursivePass -{ - private $innerId = '.inner'; - - public function __construct(?string $innerId = '.inner') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->innerId = $innerId; - } - - public function process(ContainerBuilder $container) - { - $definitions = new \SplPriorityQueue(); - $order = \PHP_INT_MAX; - - foreach ($container->getDefinitions() as $id => $definition) { - if (!$decorated = $definition->getDecoratedService()) { - continue; - } - $definitions->insert([$id, $definition], [$decorated[2], --$order]); - } - $decoratingDefinitions = []; - - foreach ($definitions as [$id, $definition]) { - $decoratedService = $definition->getDecoratedService(); - [$inner, $renamedId] = $decoratedService; - $invalidBehavior = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - - $definition->setDecoratedService(null); - - if (!$renamedId) { - $renamedId = $id.'.inner'; - } - - $this->currentId = $renamedId; - $this->processValue($definition); - - $definition->innerServiceId = $renamedId; - $definition->decorationOnInvalid = $invalidBehavior; - - // we create a new alias/service for the service we are replacing - // to be able to reference it in the new one - if ($container->hasAlias($inner)) { - $alias = $container->getAlias($inner); - $public = $alias->isPublic(); - $container->setAlias($renamedId, new Alias((string) $alias, false)); - $decoratedDefinition = $container->findDefinition($alias); - } elseif ($container->hasDefinition($inner)) { - $decoratedDefinition = $container->getDefinition($inner); - $public = $decoratedDefinition->isPublic(); - $decoratedDefinition->setPublic(false); - $container->setDefinition($renamedId, $decoratedDefinition); - $decoratingDefinitions[$inner] = $decoratedDefinition; - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { - $container->removeDefinition($id); - continue; - } elseif (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { - $public = $definition->isPublic(); - $decoratedDefinition = null; - } else { - throw new ServiceNotFoundException($inner, $id); - } - - if ($decoratedDefinition && $decoratedDefinition->isSynthetic()) { - throw new InvalidArgumentException(sprintf('A synthetic service cannot be decorated: service "%s" cannot decorate "%s".', $id, $inner)); - } - - if (isset($decoratingDefinitions[$inner])) { - $decoratingDefinition = $decoratingDefinitions[$inner]; - - $decoratingTags = $decoratingDefinition->getTags(); - $resetTags = []; - - // container.service_locator and container.service_subscriber have special logic and they must not be transferred out to decorators - foreach (['container.service_locator', 'container.service_subscriber'] as $containerTag) { - if (isset($decoratingTags[$containerTag])) { - $resetTags[$containerTag] = $decoratingTags[$containerTag]; - unset($decoratingTags[$containerTag]); - } - } - - $definition->setTags(array_merge($decoratingTags, $definition->getTags())); - $decoratingDefinition->setTags($resetTags); - $decoratingDefinitions[$inner] = $definition; - } - - $container->setAlias($inner, $id)->setPublic($public); - } - } - - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference && $this->innerId === (string) $value) { - return new Reference($this->currentId, $value->getInvalidBehavior()); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php b/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php deleted file mode 100644 index 5e7ba31..0000000 --- a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Throws an exception for any Definitions that have errors and still exist. - * - * @author Ryan Weaver - */ -class DefinitionErrorExceptionPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Definition || !$value->hasErrors()) { - return parent::processValue($value, $isRoot); - } - - if ($isRoot && !$value->isPublic()) { - $graph = $this->container->getCompiler()->getServiceReferenceGraph(); - $runtimeException = false; - foreach ($graph->getNode($this->currentId)->getInEdges() as $edge) { - if (!$edge->getValue() instanceof Reference || ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE !== $edge->getValue()->getInvalidBehavior()) { - $runtimeException = false; - break; - } - $runtimeException = true; - } - if ($runtimeException) { - return parent::processValue($value, $isRoot); - } - } - - // only show the first error so the user can focus on it - $errors = $value->getErrors(); - $message = reset($errors); - - throw new RuntimeException($message); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php deleted file mode 100644 index 27e5048..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * A pass to automatically process extensions if they implement - * CompilerPassInterface. - * - * @author Wouter J - */ -class ExtensionCompilerPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getExtensions() as $extension) { - if (!$extension instanceof CompilerPassInterface) { - continue; - } - - $extension->process($container); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php deleted file mode 100644 index 00ebdfe..0000000 --- a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php +++ /dev/null @@ -1,223 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Inline service definitions where this is possible. - * - * @author Johannes M. Schmitt - */ -class InlineServiceDefinitionsPass extends AbstractRecursivePass -{ - private $analyzingPass; - private $cloningIds = []; - private $connectedIds = []; - private $notInlinedIds = []; - private $inlinedIds = []; - private $notInlinableIds = []; - private $graph; - - public function __construct(AnalyzeServiceReferencesPass $analyzingPass = null) - { - $this->analyzingPass = $analyzingPass; - } - - public function process(ContainerBuilder $container) - { - $this->container = $container; - if ($this->analyzingPass) { - $analyzedContainer = new ContainerBuilder(); - $analyzedContainer->setAliases($container->getAliases()); - $analyzedContainer->setDefinitions($container->getDefinitions()); - foreach ($container->getExpressionLanguageProviders() as $provider) { - $analyzedContainer->addExpressionLanguageProvider($provider); - } - } else { - $analyzedContainer = $container; - } - try { - $remainingInlinedIds = []; - $this->connectedIds = $this->notInlinedIds = $container->getDefinitions(); - do { - if ($this->analyzingPass) { - $analyzedContainer->setDefinitions(array_intersect_key($analyzedContainer->getDefinitions(), $this->connectedIds)); - $this->analyzingPass->process($analyzedContainer); - } - $this->graph = $analyzedContainer->getCompiler()->getServiceReferenceGraph(); - $notInlinedIds = $this->notInlinedIds; - $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = []; - - foreach ($analyzedContainer->getDefinitions() as $id => $definition) { - if (!$this->graph->hasNode($id)) { - continue; - } - foreach ($this->graph->getNode($id)->getOutEdges() as $edge) { - if (isset($notInlinedIds[$edge->getSourceNode()->getId()])) { - $this->currentId = $id; - $this->processValue($definition, true); - break; - } - } - } - - foreach ($this->inlinedIds as $id => $isPublicOrNotShared) { - if ($isPublicOrNotShared) { - $remainingInlinedIds[$id] = $id; - } else { - $container->removeDefinition($id); - $analyzedContainer->removeDefinition($id); - } - } - } while ($this->inlinedIds && $this->analyzingPass); - - foreach ($remainingInlinedIds as $id) { - if (isset($this->notInlinableIds[$id])) { - continue; - } - - $definition = $container->getDefinition($id); - - if (!$definition->isShared() && !$definition->isPublic()) { - $container->removeDefinition($id); - } - } - } finally { - $this->container = null; - $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = []; - $this->notInlinableIds = []; - $this->graph = null; - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof ArgumentInterface) { - // References found in ArgumentInterface::getValues() are not inlineable - return $value; - } - - if ($value instanceof Definition && $this->cloningIds) { - if ($value->isShared()) { - return $value; - } - $value = clone $value; - } - - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } elseif (!$this->container->hasDefinition($id = (string) $value)) { - return $value; - } - - $definition = $this->container->getDefinition($id); - - if (!$this->isInlineableDefinition($id, $definition)) { - $this->notInlinableIds[$id] = true; - - return $value; - } - - $this->container->log($this, sprintf('Inlined service "%s" to "%s".', $id, $this->currentId)); - $this->inlinedIds[$id] = $definition->isPublic() || !$definition->isShared(); - $this->notInlinedIds[$this->currentId] = true; - - if ($definition->isShared()) { - return $definition; - } - - if (isset($this->cloningIds[$id])) { - $ids = array_keys($this->cloningIds); - $ids[] = $id; - - throw new ServiceCircularReferenceException($id, \array_slice($ids, array_search($id, $ids))); - } - - $this->cloningIds[$id] = true; - try { - return $this->processValue($definition); - } finally { - unset($this->cloningIds[$id]); - } - } - - /** - * Checks if the definition is inlineable. - */ - private function isInlineableDefinition(string $id, Definition $definition): bool - { - if ($definition->hasErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) { - return false; - } - - if (!$definition->isShared()) { - if (!$this->graph->hasNode($id)) { - return true; - } - - foreach ($this->graph->getNode($id)->getInEdges() as $edge) { - $srcId = $edge->getSourceNode()->getId(); - $this->connectedIds[$srcId] = true; - if ($edge->isWeak() || $edge->isLazy()) { - return !$this->connectedIds[$id] = true; - } - } - - return true; - } - - if ($definition->isPublic()) { - return false; - } - - if (!$this->graph->hasNode($id)) { - return true; - } - - if ($this->currentId == $id) { - return false; - } - $this->connectedIds[$id] = true; - - $srcIds = []; - $srcCount = 0; - foreach ($this->graph->getNode($id)->getInEdges() as $edge) { - $srcId = $edge->getSourceNode()->getId(); - $this->connectedIds[$srcId] = true; - if ($edge->isWeak() || $edge->isLazy()) { - return false; - } - $srcIds[$srcId] = true; - ++$srcCount; - } - - if (1 !== \count($srcIds)) { - $this->notInlinedIds[$id] = true; - - return false; - } - - if ($srcCount > 1 && \is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) { - return false; - } - - return $this->container->getDefinition($srcId)->isShared(); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php deleted file mode 100644 index 9dc3931..0000000 --- a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\Extension; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; - -/** - * Merges extension configs into the container builder. - * - * @author Fabien Potencier - */ -class MergeExtensionConfigurationPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $parameters = $container->getParameterBag()->all(); - $definitions = $container->getDefinitions(); - $aliases = $container->getAliases(); - $exprLangProviders = $container->getExpressionLanguageProviders(); - $configAvailable = class_exists(BaseNode::class); - - foreach ($container->getExtensions() as $extension) { - if ($extension instanceof PrependExtensionInterface) { - $extension->prepend($container); - } - } - - foreach ($container->getExtensions() as $name => $extension) { - if (!$config = $container->getExtensionConfig($name)) { - // this extension was not called - continue; - } - $resolvingBag = $container->getParameterBag(); - if ($resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) { - // create a dedicated bag so that we can track env vars per-extension - $resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag); - if ($configAvailable) { - BaseNode::setPlaceholderUniquePrefix($resolvingBag->getEnvPlaceholderUniquePrefix()); - } - } - $config = $resolvingBag->resolveValue($config); - - try { - $tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag); - $tmpContainer->setResourceTracking($container->isTrackingResources()); - $tmpContainer->addObjectResource($extension); - if ($extension instanceof ConfigurationExtensionInterface && null !== $configuration = $extension->getConfiguration($config, $tmpContainer)) { - $tmpContainer->addObjectResource($configuration); - } - - foreach ($exprLangProviders as $provider) { - $tmpContainer->addExpressionLanguageProvider($provider); - } - - $extension->load($config, $tmpContainer); - } catch (\Exception $e) { - if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) { - $container->getParameterBag()->mergeEnvPlaceholders($resolvingBag); - } - - throw $e; - } - - if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) { - // don't keep track of env vars that are *overridden* when configs are merged - $resolvingBag->freezeAfterProcessing($extension, $tmpContainer); - } - - $container->merge($tmpContainer); - $container->getParameterBag()->add($parameters); - } - - $container->addDefinitions($definitions); - $container->addAliases($aliases); - } -} - -/** - * @internal - */ -class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag -{ - private $processedEnvPlaceholders; - - public function __construct(parent $parameterBag) - { - parent::__construct($parameterBag->all()); - $this->mergeEnvPlaceholders($parameterBag); - } - - public function freezeAfterProcessing(Extension $extension, ContainerBuilder $container) - { - if (!$config = $extension->getProcessedConfigs()) { - // Extension::processConfiguration() wasn't called, we cannot know how configs were merged - return; - } - $this->processedEnvPlaceholders = []; - - // serialize config and container to catch env vars nested in object graphs - $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all()); - - foreach (parent::getEnvPlaceholders() as $env => $placeholders) { - foreach ($placeholders as $placeholder) { - if (false !== stripos($config, $placeholder)) { - $this->processedEnvPlaceholders[$env] = $placeholders; - break; - } - } - } - } - - /** - * {@inheritdoc} - */ - public function getEnvPlaceholders(): array - { - return $this->processedEnvPlaceholders ?? parent::getEnvPlaceholders(); - } - - public function getUnusedEnvPlaceholders(): array - { - return null === $this->processedEnvPlaceholders ? [] : array_diff_key(parent::getEnvPlaceholders(), $this->processedEnvPlaceholders); - } -} - -/** - * A container builder preventing using methods that wouldn't have any effect from extensions. - * - * @internal - */ -class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder -{ - private $extensionClass; - - public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null) - { - parent::__construct($parameterBag); - - $this->extensionClass = \get_class($extension); - } - - /** - * {@inheritdoc} - */ - public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): self - { - throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_debug_type($pass), $this->extensionClass)); - } - - /** - * {@inheritdoc} - */ - public function registerExtension(ExtensionInterface $extension) - { - throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_debug_type($extension), $this->extensionClass)); - } - - /** - * {@inheritdoc} - */ - public function compile(bool $resolveEnvPlaceholders = false) - { - throw new LogicException(sprintf('Cannot compile the container in extension "%s".', $this->extensionClass)); - } - - /** - * {@inheritdoc} - */ - public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null) - { - if (true !== $format || !\is_string($value)) { - return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); - } - - $bag = $this->getParameterBag(); - $value = $bag->resolveValue($value); - - if (!$bag instanceof EnvPlaceholderParameterBag) { - return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); - } - - foreach ($bag->getEnvPlaceholders() as $env => $placeholders) { - if (!str_contains($env, ':')) { - continue; - } - foreach ($placeholders as $placeholder) { - if (false !== stripos($value, $placeholder)) { - throw new RuntimeException(sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.', $env, $this->extensionClass)); - } - } - } - - return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php deleted file mode 100644 index 9f9a56e..0000000 --- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php +++ /dev/null @@ -1,269 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * Compiler Pass Configuration. - * - * This class has a default configuration embedded. - * - * @author Johannes M. Schmitt - */ -class PassConfig -{ - public const TYPE_AFTER_REMOVING = 'afterRemoving'; - public const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization'; - public const TYPE_BEFORE_REMOVING = 'beforeRemoving'; - public const TYPE_OPTIMIZE = 'optimization'; - public const TYPE_REMOVE = 'removing'; - - private $mergePass; - private $afterRemovingPasses = []; - private $beforeOptimizationPasses = []; - private $beforeRemovingPasses = []; - private $optimizationPasses; - private $removingPasses; - - public function __construct() - { - $this->mergePass = new MergeExtensionConfigurationPass(); - - $this->beforeOptimizationPasses = [ - 100 => [ - new ResolveClassPass(), - new RegisterAutoconfigureAttributesPass(), - new AttributeAutoconfigurationPass(), - new ResolveInstanceofConditionalsPass(), - new RegisterEnvVarProcessorsPass(), - ], - -1000 => [new ExtensionCompilerPass()], - ]; - - $this->optimizationPasses = [[ - $autoAliasServicePass = new AutoAliasServicePass(), - new ValidateEnvPlaceholdersPass(), - new ResolveDecoratorStackPass(), - new ResolveChildDefinitionsPass(), - new RegisterServiceSubscribersPass(), - new ResolveParameterPlaceHoldersPass(false, false), - new ResolveFactoryClassPass(), - new ResolveNamedArgumentsPass(), - new AutowireRequiredMethodsPass(), - new AutowireRequiredPropertiesPass(), - new ResolveBindingsPass(), - new ServiceLocatorTagPass(), - new DecoratorServicePass(), - new CheckDefinitionValidityPass(), - new AutowirePass(false), - new ServiceLocatorTagPass(), - new ResolveTaggedIteratorArgumentPass(), - new ResolveServiceSubscribersPass(), - new ResolveReferencesToAliasesPass(), - new ResolveInvalidReferencesPass(), - new AnalyzeServiceReferencesPass(true), - new CheckCircularReferencesPass(), - new CheckReferenceValidityPass(), - new CheckArgumentsValidityPass(false), - ]]; - - $this->removingPasses = [[ - new RemovePrivateAliasesPass(), - (new ReplaceAliasByActualDefinitionPass())->setAutoAliasServicePass($autoAliasServicePass), - new RemoveAbstractDefinitionsPass(), - new RemoveUnusedDefinitionsPass(), - new AnalyzeServiceReferencesPass(), - new CheckExceptionOnInvalidReferenceBehaviorPass(), - new InlineServiceDefinitionsPass(new AnalyzeServiceReferencesPass()), - new AnalyzeServiceReferencesPass(), - new DefinitionErrorExceptionPass(), - ]]; - - $this->afterRemovingPasses = [[ - new ResolveHotPathPass(), - new ResolveNoPreloadPass(), - new AliasDeprecatedPublicServicesPass(), - ]]; - } - - /** - * Returns all passes in order to be processed. - * - * @return CompilerPassInterface[] - */ - public function getPasses() - { - return array_merge( - [$this->mergePass], - $this->getBeforeOptimizationPasses(), - $this->getOptimizationPasses(), - $this->getBeforeRemovingPasses(), - $this->getRemovingPasses(), - $this->getAfterRemovingPasses() - ); - } - - /** - * Adds a pass. - * - * @throws InvalidArgumentException when a pass type doesn't exist - */ - public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) - { - $property = $type.'Passes'; - if (!isset($this->$property)) { - throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type)); - } - - $passes = &$this->$property; - - if (!isset($passes[$priority])) { - $passes[$priority] = []; - } - $passes[$priority][] = $pass; - } - - /** - * Gets all passes for the AfterRemoving pass. - * - * @return CompilerPassInterface[] - */ - public function getAfterRemovingPasses() - { - return $this->sortPasses($this->afterRemovingPasses); - } - - /** - * Gets all passes for the BeforeOptimization pass. - * - * @return CompilerPassInterface[] - */ - public function getBeforeOptimizationPasses() - { - return $this->sortPasses($this->beforeOptimizationPasses); - } - - /** - * Gets all passes for the BeforeRemoving pass. - * - * @return CompilerPassInterface[] - */ - public function getBeforeRemovingPasses() - { - return $this->sortPasses($this->beforeRemovingPasses); - } - - /** - * Gets all passes for the Optimization pass. - * - * @return CompilerPassInterface[] - */ - public function getOptimizationPasses() - { - return $this->sortPasses($this->optimizationPasses); - } - - /** - * Gets all passes for the Removing pass. - * - * @return CompilerPassInterface[] - */ - public function getRemovingPasses() - { - return $this->sortPasses($this->removingPasses); - } - - /** - * Gets the Merge pass. - * - * @return CompilerPassInterface - */ - public function getMergePass() - { - return $this->mergePass; - } - - public function setMergePass(CompilerPassInterface $pass) - { - $this->mergePass = $pass; - } - - /** - * Sets the AfterRemoving passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setAfterRemovingPasses(array $passes) - { - $this->afterRemovingPasses = [$passes]; - } - - /** - * Sets the BeforeOptimization passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setBeforeOptimizationPasses(array $passes) - { - $this->beforeOptimizationPasses = [$passes]; - } - - /** - * Sets the BeforeRemoving passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setBeforeRemovingPasses(array $passes) - { - $this->beforeRemovingPasses = [$passes]; - } - - /** - * Sets the Optimization passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setOptimizationPasses(array $passes) - { - $this->optimizationPasses = [$passes]; - } - - /** - * Sets the Removing passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setRemovingPasses(array $passes) - { - $this->removingPasses = [$passes]; - } - - /** - * Sort passes by priority. - * - * @param array $passes CompilerPassInterface instances with their priority as key - * - * @return CompilerPassInterface[] - */ - private function sortPasses(array $passes): array - { - if (0 === \count($passes)) { - return []; - } - - krsort($passes); - - // Flatten the array - return array_merge(...$passes); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php b/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php deleted file mode 100644 index 8c4d841..0000000 --- a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Trait that allows a generic method to find and sort service by priority option in the tag. - * - * @author Iltar van der Berg - */ -trait PriorityTaggedServiceTrait -{ - /** - * Finds all services with the given tag name and order them by their priority. - * - * The order of additions must be respected for services having the same priority, - * and knowing that the \SplPriorityQueue class does not respect the FIFO method, - * we should not use that class. - * - * @see https://bugs.php.net/53710 - * @see https://bugs.php.net/60926 - * - * @param string|TaggedIteratorArgument $tagName - * - * @return Reference[] - */ - private function findAndSortTaggedServices($tagName, ContainerBuilder $container): array - { - $indexAttribute = $defaultIndexMethod = $needsIndexes = $defaultPriorityMethod = null; - - if ($tagName instanceof TaggedIteratorArgument) { - $indexAttribute = $tagName->getIndexAttribute(); - $defaultIndexMethod = $tagName->getDefaultIndexMethod(); - $needsIndexes = $tagName->needsIndexes(); - $defaultPriorityMethod = $tagName->getDefaultPriorityMethod() ?? 'getDefaultPriority'; - $tagName = $tagName->getTag(); - } - - $i = 0; - $services = []; - - foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) { - $defaultPriority = null; - $defaultIndex = null; - $definition = $container->getDefinition($serviceId); - $class = $definition->getClass(); - $class = $container->getParameterBag()->resolveValue($class) ?: null; - $checkTaggedItem = !$definition->hasTag(80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() ? 'container.ignore_attributes' : $tagName); - - foreach ($attributes as $attribute) { - $index = $priority = null; - - if (isset($attribute['priority'])) { - $priority = $attribute['priority']; - } elseif (null === $defaultPriority && $defaultPriorityMethod && $class) { - $defaultPriority = PriorityTaggedServiceUtil::getDefault($container, $serviceId, $class, $defaultPriorityMethod, $tagName, 'priority', $checkTaggedItem); - } - $priority = $priority ?? $defaultPriority ?? $defaultPriority = 0; - - if (null === $indexAttribute && !$defaultIndexMethod && !$needsIndexes) { - $services[] = [$priority, ++$i, null, $serviceId, null]; - continue 2; - } - - if (null !== $indexAttribute && isset($attribute[$indexAttribute])) { - $index = $attribute[$indexAttribute]; - } elseif (null === $defaultIndex && $defaultPriorityMethod && $class) { - $defaultIndex = PriorityTaggedServiceUtil::getDefault($container, $serviceId, $class, $defaultIndexMethod ?? 'getDefaultName', $tagName, $indexAttribute, $checkTaggedItem); - } - $index = $index ?? $defaultIndex ?? $defaultIndex = $serviceId; - - $services[] = [$priority, ++$i, $index, $serviceId, $class]; - } - } - - uasort($services, static function ($a, $b) { return $b[0] <=> $a[0] ?: $a[1] <=> $b[1]; }); - - $refs = []; - foreach ($services as [, , $index, $serviceId, $class]) { - if (!$class) { - $reference = new Reference($serviceId); - } elseif ($index === $serviceId) { - $reference = new TypedReference($serviceId, $class); - } else { - $reference = new TypedReference($serviceId, $class, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $index); - } - - if (null === $index) { - $refs[] = $reference; - } else { - $refs[$index] = $reference; - } - } - - return $refs; - } -} - -/** - * @internal - */ -class PriorityTaggedServiceUtil -{ - /** - * @return string|int|null - */ - public static function getDefault(ContainerBuilder $container, string $serviceId, string $class, string $defaultMethod, string $tagName, ?string $indexAttribute, bool $checkTaggedItem) - { - if (!($r = $container->getReflectionClass($class)) || (!$checkTaggedItem && !$r->hasMethod($defaultMethod))) { - return null; - } - - if ($checkTaggedItem && !$r->hasMethod($defaultMethod)) { - foreach ($r->getAttributes(AsTaggedItem::class) as $attribute) { - return 'priority' === $indexAttribute ? $attribute->newInstance()->priority : $attribute->newInstance()->index; - } - - return null; - } - - if (null !== $indexAttribute) { - $service = $class !== $serviceId ? sprintf('service "%s"', $serviceId) : 'on the corresponding service'; - $message = [sprintf('Either method "%s::%s()" should ', $class, $defaultMethod), sprintf(' or tag "%s" on %s is missing attribute "%s".', $tagName, $service, $indexAttribute)]; - } else { - $message = [sprintf('Method "%s::%s()" should ', $class, $defaultMethod), '.']; - } - - if (!($rm = $r->getMethod($defaultMethod))->isStatic()) { - throw new InvalidArgumentException(implode('be static', $message)); - } - - if (!$rm->isPublic()) { - throw new InvalidArgumentException(implode('be public', $message)); - } - - $default = $rm->invoke(null); - - if ('priority' === $indexAttribute) { - if (!\is_int($default)) { - throw new InvalidArgumentException(implode(sprintf('return int (got "%s")', get_debug_type($default)), $message)); - } - - return $default; - } - - if (\is_int($default)) { - $default = (string) $default; - } - - if (!\is_string($default)) { - throw new InvalidArgumentException(implode(sprintf('return string|int (got "%s")', get_debug_type($default)), $message)); - } - - return $default; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php deleted file mode 100644 index 08befc4..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - -/** - * Reads #[Autoconfigure] attributes on definitions that are autoconfigured - * and don't have the "container.ignore_attributes" tag. - * - * @author Nicolas Grekas - */ -final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface -{ - private static $registerForAutoconfiguration; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (80000 > \PHP_VERSION_ID) { - return; - } - - foreach ($container->getDefinitions() as $id => $definition) { - if ($this->accept($definition) && $class = $container->getReflectionClass($definition->getClass(), false)) { - $this->processClass($container, $class); - } - } - } - - public function accept(Definition $definition): bool - { - return 80000 <= \PHP_VERSION_ID && $definition->isAutoconfigured() && !$definition->hasTag('container.ignore_attributes'); - } - - public function processClass(ContainerBuilder $container, \ReflectionClass $class) - { - foreach ($class->getAttributes(Autoconfigure::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - self::registerForAutoconfiguration($container, $class, $attribute); - } - } - - private static function registerForAutoconfiguration(ContainerBuilder $container, \ReflectionClass $class, \ReflectionAttribute $attribute) - { - if (self::$registerForAutoconfiguration) { - return (self::$registerForAutoconfiguration)($container, $class, $attribute); - } - - $parseDefinitions = new \ReflectionMethod(YamlFileLoader::class, 'parseDefinitions'); - $parseDefinitions->setAccessible(true); - $yamlLoader = $parseDefinitions->getDeclaringClass()->newInstanceWithoutConstructor(); - - self::$registerForAutoconfiguration = static function (ContainerBuilder $container, \ReflectionClass $class, \ReflectionAttribute $attribute) use ($parseDefinitions, $yamlLoader) { - $attribute = (array) $attribute->newInstance(); - - foreach ($attribute['tags'] ?? [] as $i => $tag) { - if (\is_array($tag) && [0] === array_keys($tag)) { - $attribute['tags'][$i] = [$class->name => $tag[0]]; - } - } - - $parseDefinitions->invoke( - $yamlLoader, - [ - 'services' => [ - '_instanceof' => [ - $class->name => [$container->registerForAutoconfiguration($class->name)] + $attribute, - ], - ], - ], - $class->getFileName() - ); - }; - - return (self::$registerForAutoconfiguration)($container, $class, $attribute); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php deleted file mode 100644 index 251889e..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\EnvVarProcessor; -use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Creates the container.env_var_processors_locator service. - * - * @author Nicolas Grekas - */ -class RegisterEnvVarProcessorsPass implements CompilerPassInterface -{ - private const ALLOWED_TYPES = ['array', 'bool', 'float', 'int', 'string']; - - public function process(ContainerBuilder $container) - { - $bag = $container->getParameterBag(); - $types = []; - $processors = []; - foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) { - if (!$r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass())) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } elseif (!$r->isSubclassOf(EnvVarProcessorInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EnvVarProcessorInterface::class)); - } - foreach ($class::getProvidedTypes() as $prefix => $type) { - $processors[$prefix] = new Reference($id); - $types[$prefix] = self::validateProvidedTypes($type, $class); - } - } - - if ($bag instanceof EnvPlaceholderParameterBag) { - foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) { - if (!isset($types[$prefix])) { - $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class); - } - } - $bag->setProvidedTypes($types); - } - - if ($processors) { - $container->setAlias('container.env_var_processors_locator', (string) ServiceLocatorTagPass::register($container, $processors)) - ->setPublic(true) - ; - } - } - - private static function validateProvidedTypes(string $types, string $class): array - { - $types = explode('|', $types); - - foreach ($types as $type) { - if (!\in_array($type, self::ALLOWED_TYPES)) { - throw new InvalidArgumentException(sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, implode('", "', self::ALLOWED_TYPES))); - } - } - - return $types; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php deleted file mode 100644 index c5eb9bf..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class RegisterReverseContainerPass implements CompilerPassInterface -{ - private $beforeRemoving; - private $serviceId; - private $tagName; - - public function __construct(bool $beforeRemoving, string $serviceId = 'reverse_container', string $tagName = 'container.reversible') - { - if (1 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->beforeRemoving = $beforeRemoving; - $this->serviceId = $serviceId; - $this->tagName = $tagName; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->serviceId)) { - return; - } - - $refType = $this->beforeRemoving ? ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - $services = []; - foreach ($container->findTaggedServiceIds($this->tagName) as $id => $tags) { - $services[$id] = new Reference($id, $refType); - } - - if ($this->beforeRemoving) { - // prevent inlining of the reverse container - $services[$this->serviceId] = new Reference($this->serviceId, $refType); - } - $locator = $container->getDefinition($this->serviceId)->getArgument(1); - - if ($locator instanceof Reference) { - $locator = $container->getDefinition((string) $locator); - } - if ($locator instanceof Definition) { - foreach ($services as $id => $ref) { - $services[$id] = new ServiceClosureArgument($ref); - } - $locator->replaceArgument(0, $services); - } else { - $locator->setValues($services); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php deleted file mode 100644 index 2a458ad..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * Compiler pass to register tagged services that require a service locator. - * - * @author Nicolas Grekas - */ -class RegisterServiceSubscribersPass extends AbstractRecursivePass -{ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) { - return parent::processValue($value, $isRoot); - } - - $serviceMap = []; - $autowire = $value->isAutowired(); - - foreach ($value->getTag('container.service_subscriber') as $attributes) { - if (!$attributes) { - $autowire = true; - continue; - } - ksort($attributes); - if ([] !== array_diff(array_keys($attributes), ['id', 'key'])) { - throw new InvalidArgumentException(sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', implode('", "', array_keys($attributes)), $this->currentId)); - } - if (!\array_key_exists('id', $attributes)) { - throw new InvalidArgumentException(sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId)); - } - if (!\array_key_exists('key', $attributes)) { - $attributes['key'] = $attributes['id']; - } - if (isset($serviceMap[$attributes['key']])) { - continue; - } - $serviceMap[$attributes['key']] = new Reference($attributes['id']); - } - $class = $value->getClass(); - - if (!$r = $this->container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId)); - } - if (!$r->isSubclassOf(ServiceSubscriberInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $this->currentId, ServiceSubscriberInterface::class)); - } - $class = $r->name; - $replaceDeprecatedSession = $this->container->has('.session.deprecated') && $r->isSubclassOf(AbstractController::class); - $subscriberMap = []; - - foreach ($class::getSubscribedServices() as $key => $type) { - if (!\is_string($type) || !preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))(?(DEFINE)(?(?&cn)(?:\\\\(?&cn))*+))^\??(?&fqcn)(?:(?:\|(?&fqcn))*+|(?:&(?&fqcn))*+)$/', $type)) { - throw new InvalidArgumentException(sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, \is_string($type) ? $type : get_debug_type($type))); - } - if ($optionalBehavior = '?' === $type[0]) { - $type = substr($type, 1); - $optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } - if (\is_int($name = $key)) { - $key = $type; - $name = null; - } - if (!isset($serviceMap[$key])) { - if (!$autowire) { - throw new InvalidArgumentException(sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".', $this->currentId, $key, $class)); - } - if ($replaceDeprecatedSession && SessionInterface::class === $type) { - // This prevents triggering the deprecation when building the container - // Should be removed in Symfony 6.0 - $type = '.session.deprecated'; - } - $serviceMap[$key] = new Reference($type); - } - - if ($name) { - if (false !== $i = strpos($name, '::get')) { - $name = lcfirst(substr($name, 5 + $i)); - } elseif (str_contains($name, '::')) { - $name = null; - } - } - - if (null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) { - $camelCaseName = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $name)))); - $name = $this->container->has($type.' $'.$camelCaseName) ? $camelCaseName : $name; - } - - $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name); - unset($serviceMap[$key]); - } - - if ($serviceMap = array_keys($serviceMap)) { - $message = sprintf(1 < \count($serviceMap) ? 'keys "%s" do' : 'key "%s" does', str_replace('%', '%%', implode('", "', $serviceMap))); - throw new InvalidArgumentException(sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId)); - } - - $locatorRef = ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId); - - $value->addTag('container.service_subscriber.locator', ['id' => (string) $locatorRef]); - - $value->setBindings([ - PsrContainerInterface::class => new BoundArgument($locatorRef, false), - ServiceProviderInterface::class => new BoundArgument($locatorRef, false), - ] + $value->getBindings()); - - return parent::processValue($value); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php deleted file mode 100644 index 04b6852..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Removes abstract Definitions. - */ -class RemoveAbstractDefinitionsPass implements CompilerPassInterface -{ - /** - * Removes abstract definitions from the ContainerBuilder. - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isAbstract()) { - $container->removeDefinition($id); - $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php deleted file mode 100644 index 75b36d2..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Remove private aliases from the container. They were only used to establish - * dependencies between services, and these dependencies have been resolved in - * one of the previous passes. - * - * @author Johannes M. Schmitt - */ -class RemovePrivateAliasesPass implements CompilerPassInterface -{ - /** - * Removes private aliases from the ContainerBuilder. - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic()) { - continue; - } - - $container->removeAlias($id); - $container->log($this, sprintf('Removed service "%s"; reason: private alias.', $id)); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php deleted file mode 100644 index cf1a3dd..0000000 --- a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Removes unused service definitions from the container. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class RemoveUnusedDefinitionsPass extends AbstractRecursivePass -{ - private $connectedIds = []; - - /** - * Processes the ContainerBuilder to remove unused definitions. - */ - public function process(ContainerBuilder $container) - { - try { - $this->enableExpressionProcessing(); - $this->container = $container; - $connectedIds = []; - $aliases = $container->getAliases(); - - foreach ($aliases as $id => $alias) { - if ($alias->isPublic()) { - $this->connectedIds[] = (string) $aliases[$id]; - } - } - - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isPublic()) { - $connectedIds[$id] = true; - $this->processValue($definition); - } - } - - while ($this->connectedIds) { - $ids = $this->connectedIds; - $this->connectedIds = []; - foreach ($ids as $id) { - if (!isset($connectedIds[$id]) && $container->hasDefinition($id)) { - $connectedIds[$id] = true; - $this->processValue($container->getDefinition($id)); - } - } - } - - foreach ($container->getDefinitions() as $id => $definition) { - if (!isset($connectedIds[$id])) { - $container->removeDefinition($id); - $container->resolveEnvPlaceholders(!$definition->hasErrors() ? serialize($definition) : $definition); - $container->log($this, sprintf('Removed service "%s"; reason: unused.', $id)); - } - } - } finally { - $this->container = null; - $this->connectedIds = []; - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - - if (ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior()) { - $this->connectedIds[] = (string) $value; - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php deleted file mode 100644 index bb2ba0d..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Replaces aliases with actual service definitions, effectively removing these - * aliases. - * - * @author Johannes M. Schmitt - */ -class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass -{ - private $replacements; - private $autoAliasServicePass; - - /** - * @internal to be removed in Symfony 6.0 - * - * @return $this - */ - public function setAutoAliasServicePass(AutoAliasServicePass $autoAliasServicePass): self - { - $this->autoAliasServicePass = $autoAliasServicePass; - - return $this; - } - - /** - * Process the Container to replace aliases with service definitions. - * - * @throws InvalidArgumentException if the service definition does not exist - */ - public function process(ContainerBuilder $container) - { - // First collect all alias targets that need to be replaced - $seenAliasTargets = []; - $replacements = []; - - $privateAliases = $this->autoAliasServicePass ? $this->autoAliasServicePass->getPrivateAliases() : []; - foreach ($privateAliases as $target) { - $target->setDeprecated('symfony/dependency-injection', '5.4', 'Accessing the "%alias_id%" service directly from the container is deprecated, use dependency injection instead.'); - } - - foreach ($container->getAliases() as $definitionId => $target) { - $targetId = (string) $target; - // Special case: leave this target alone - if ('service_container' === $targetId) { - continue; - } - // Check if target needs to be replaced - if (isset($replacements[$targetId])) { - $container->setAlias($definitionId, $replacements[$targetId])->setPublic($target->isPublic()); - - if ($target->isDeprecated()) { - $container->getAlias($definitionId)->setDeprecated(...array_values($target->getDeprecation('%alias_id%'))); - } - } - // No need to process the same target twice - if (isset($seenAliasTargets[$targetId])) { - continue; - } - // Process new target - $seenAliasTargets[$targetId] = true; - try { - $definition = $container->getDefinition($targetId); - } catch (ServiceNotFoundException $e) { - if ('' !== $e->getId() && '@' === $e->getId()[0]) { - throw new ServiceNotFoundException($e->getId(), $e->getSourceId(), null, [substr($e->getId(), 1)]); - } - - throw $e; - } - if ($definition->isPublic()) { - continue; - } - // Remove private definition and schedule for replacement - $definition->setPublic($target->isPublic()); - $container->setDefinition($definitionId, $definition); - $container->removeDefinition($targetId); - $replacements[$targetId] = $definitionId; - - if ($target->isPublic() && $target->isDeprecated()) { - $definition->addTag('container.private', $target->getDeprecation('%service_id%')); - } - } - $this->replacements = $replacements; - - parent::process($container); - $this->replacements = []; - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) { - // Perform the replacement - $newId = $this->replacements[$referenceId]; - $value = new Reference($newId, $value->getInvalidBehavior()); - $this->container->log($this, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId)); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php deleted file mode 100644 index 5bc3791..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * @author Guilhem Niot - */ -class ResolveBindingsPass extends AbstractRecursivePass -{ - private $usedBindings = []; - private $unusedBindings = []; - private $errorMessages = []; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->usedBindings = $container->getRemovedBindingIds(); - - try { - parent::process($container); - - foreach ($this->unusedBindings as [$key, $serviceId, $bindingType, $file]) { - $argumentType = $argumentName = $message = null; - - if (str_contains($key, ' ')) { - [$argumentType, $argumentName] = explode(' ', $key, 2); - } elseif ('$' === $key[0]) { - $argumentName = $key; - } else { - $argumentType = $key; - } - - if ($argumentType) { - $message .= sprintf('of type "%s" ', $argumentType); - } - - if ($argumentName) { - $message .= sprintf('named "%s" ', $argumentName); - } - - if (BoundArgument::DEFAULTS_BINDING === $bindingType) { - $message .= 'under "_defaults"'; - } elseif (BoundArgument::INSTANCEOF_BINDING === $bindingType) { - $message .= 'under "_instanceof"'; - } else { - $message .= sprintf('for service "%s"', $serviceId); - } - - if ($file) { - $message .= sprintf(' in file "%s"', $file); - } - - $message = sprintf('A binding is configured for an argument %s, but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.', $message); - - if ($this->errorMessages) { - $message .= sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : ''); - } - foreach ($this->errorMessages as $m) { - $message .= "\n - ".$m; - } - throw new InvalidArgumentException($message); - } - } finally { - $this->usedBindings = []; - $this->unusedBindings = []; - $this->errorMessages = []; - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof TypedReference && $value->getType() === (string) $value) { - // Already checked - $bindings = $this->container->getDefinition($this->currentId)->getBindings(); - $name = $value->getName(); - - if (isset($name, $bindings[$name = $value.' $'.$name])) { - return $this->getBindingValue($bindings[$name]); - } - - if (isset($bindings[$value->getType()])) { - return $this->getBindingValue($bindings[$value->getType()]); - } - - return parent::processValue($value, $isRoot); - } - - if (!$value instanceof Definition || !$bindings = $value->getBindings()) { - return parent::processValue($value, $isRoot); - } - - $bindingNames = []; - - foreach ($bindings as $key => $binding) { - [$bindingValue, $bindingId, $used, $bindingType, $file] = $binding->getValues(); - if ($used) { - $this->usedBindings[$bindingId] = true; - unset($this->unusedBindings[$bindingId]); - } elseif (!isset($this->usedBindings[$bindingId])) { - $this->unusedBindings[$bindingId] = [$key, $this->currentId, $bindingType, $file]; - } - - if (preg_match('/^(?:(?:array|bool|float|int|string|iterable|([^ $]++)) )\$/', $key, $m)) { - $bindingNames[substr($key, \strlen($m[0]))] = $binding; - } - - if (!isset($m[1])) { - continue; - } - - if (is_subclass_of($m[1], \UnitEnum::class)) { - $bindingNames[substr($key, \strlen($m[0]))] = $binding; - continue; - } - - if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition && !$bindingValue instanceof TaggedIteratorArgument && !$bindingValue instanceof ServiceLocatorArgument) { - throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected "%s", "%s", "%s", "%s" or null, "%s" given.', $key, $this->currentId, Reference::class, Definition::class, TaggedIteratorArgument::class, ServiceLocatorArgument::class, get_debug_type($bindingValue))); - } - } - - if ($value->isAbstract()) { - return parent::processValue($value, $isRoot); - } - - $calls = $value->getMethodCalls(); - - try { - if ($constructor = $this->getConstructor($value, false)) { - $calls[] = [$constructor, $value->getArguments()]; - } - } catch (RuntimeException $e) { - $this->errorMessages[] = $e->getMessage(); - $this->container->getDefinition($this->currentId)->addError($e->getMessage()); - - return parent::processValue($value, $isRoot); - } - - foreach ($calls as $i => $call) { - [$method, $arguments] = $call; - - if ($method instanceof \ReflectionFunctionAbstract) { - $reflectionMethod = $method; - } else { - try { - $reflectionMethod = $this->getReflectionMethod($value, $method); - } catch (RuntimeException $e) { - if ($value->getFactory()) { - continue; - } - throw $e; - } - } - - foreach ($reflectionMethod->getParameters() as $key => $parameter) { - if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) { - continue; - } - - $typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter); - $name = Target::parseName($parameter); - - if ($typeHint && \array_key_exists($k = ltrim($typeHint, '\\').' $'.$name, $bindings)) { - $arguments[$key] = $this->getBindingValue($bindings[$k]); - - continue; - } - - if (\array_key_exists('$'.$name, $bindings)) { - $arguments[$key] = $this->getBindingValue($bindings['$'.$name]); - - continue; - } - - if ($typeHint && '\\' === $typeHint[0] && isset($bindings[$typeHint = substr($typeHint, 1)])) { - $arguments[$key] = $this->getBindingValue($bindings[$typeHint]); - - continue; - } - - if (isset($bindingNames[$name]) || isset($bindingNames[$parameter->name])) { - $bindingKey = array_search($binding, $bindings, true); - $argumentType = substr($bindingKey, 0, strpos($bindingKey, ' ')); - $this->errorMessages[] = sprintf('Did you forget to add the type "%s" to argument "$%s" of method "%s::%s()"?', $argumentType, $parameter->name, $reflectionMethod->class, $reflectionMethod->name); - } - } - - if ($arguments !== $call[1]) { - ksort($arguments); - $calls[$i][1] = $arguments; - } - } - - if ($constructor) { - [, $arguments] = array_pop($calls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - } - - if ($calls !== $value->getMethodCalls()) { - $value->setMethodCalls($calls); - } - - return parent::processValue($value, $isRoot); - } - - /** - * @return mixed - */ - private function getBindingValue(BoundArgument $binding) - { - [$bindingValue, $bindingId] = $binding->getValues(); - - $this->usedBindings[$bindingId] = true; - unset($this->unusedBindings[$bindingId]); - - return $bindingValue; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php deleted file mode 100644 index 46a2d78..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ExceptionInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; - -/** - * This replaces all ChildDefinition instances with their equivalent fully - * merged Definition instance. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class ResolveChildDefinitionsPass extends AbstractRecursivePass -{ - private $currentPath; - - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - if ($isRoot) { - // yes, we are specifically fetching the definition from the - // container to ensure we are not operating on stale data - $value = $this->container->getDefinition($this->currentId); - } - if ($value instanceof ChildDefinition) { - $this->currentPath = []; - $value = $this->resolveDefinition($value); - if ($isRoot) { - $this->container->setDefinition($this->currentId, $value); - } - } - - return parent::processValue($value, $isRoot); - } - - /** - * Resolves the definition. - * - * @throws RuntimeException When the definition is invalid - */ - private function resolveDefinition(ChildDefinition $definition): Definition - { - try { - return $this->doResolveDefinition($definition); - } catch (ServiceCircularReferenceException $e) { - throw $e; - } catch (ExceptionInterface $e) { - $r = new \ReflectionProperty($e, 'message'); - $r->setAccessible(true); - $r->setValue($e, sprintf('Service "%s": %s', $this->currentId, $e->getMessage())); - - throw $e; - } - } - - private function doResolveDefinition(ChildDefinition $definition): Definition - { - if (!$this->container->has($parent = $definition->getParent())) { - throw new RuntimeException(sprintf('Parent definition "%s" does not exist.', $parent)); - } - - $searchKey = array_search($parent, $this->currentPath); - $this->currentPath[] = $parent; - - if (false !== $searchKey) { - throw new ServiceCircularReferenceException($parent, \array_slice($this->currentPath, $searchKey)); - } - - $parentDef = $this->container->findDefinition($parent); - if ($parentDef instanceof ChildDefinition) { - $id = $this->currentId; - $this->currentId = $parent; - $parentDef = $this->resolveDefinition($parentDef); - $this->container->setDefinition($parent, $parentDef); - $this->currentId = $id; - } - - $this->container->log($this, sprintf('Resolving inheritance for "%s" (parent: %s).', $this->currentId, $parent)); - $def = new Definition(); - - // merge in parent definition - // purposely ignored attributes: abstract, shared, tags, autoconfigured - $def->setClass($parentDef->getClass()); - $def->setArguments($parentDef->getArguments()); - $def->setMethodCalls($parentDef->getMethodCalls()); - $def->setProperties($parentDef->getProperties()); - if ($parentDef->isDeprecated()) { - $deprecation = $parentDef->getDeprecation('%service_id%'); - $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - $def->setFactory($parentDef->getFactory()); - $def->setConfigurator($parentDef->getConfigurator()); - $def->setFile($parentDef->getFile()); - $def->setPublic($parentDef->isPublic()); - $def->setLazy($parentDef->isLazy()); - $def->setAutowired($parentDef->isAutowired()); - $def->setChanges($parentDef->getChanges()); - - $def->setBindings($definition->getBindings() + $parentDef->getBindings()); - - $def->setSynthetic($definition->isSynthetic()); - - // overwrite with values specified in the decorator - $changes = $definition->getChanges(); - if (isset($changes['class'])) { - $def->setClass($definition->getClass()); - } - if (isset($changes['factory'])) { - $def->setFactory($definition->getFactory()); - } - if (isset($changes['configurator'])) { - $def->setConfigurator($definition->getConfigurator()); - } - if (isset($changes['file'])) { - $def->setFile($definition->getFile()); - } - if (isset($changes['public'])) { - $def->setPublic($definition->isPublic()); - } else { - $def->setPublic($parentDef->isPublic()); - } - if (isset($changes['lazy'])) { - $def->setLazy($definition->isLazy()); - } - if (isset($changes['deprecated'])) { - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation('%service_id%'); - $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']); - } else { - $def->setDeprecated(false); - } - } - if (isset($changes['autowired'])) { - $def->setAutowired($definition->isAutowired()); - } - if (isset($changes['shared'])) { - $def->setShared($definition->isShared()); - } - if (isset($changes['decorated_service'])) { - $decoratedService = $definition->getDecoratedService(); - if (null === $decoratedService) { - $def->setDecoratedService($decoratedService); - } else { - $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2], $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } - } - - // merge arguments - foreach ($definition->getArguments() as $k => $v) { - if (is_numeric($k)) { - $def->addArgument($v); - } elseif (str_starts_with($k, 'index_')) { - $def->replaceArgument((int) substr($k, \strlen('index_')), $v); - } else { - $def->setArgument($k, $v); - } - } - - // merge properties - foreach ($definition->getProperties() as $k => $v) { - $def->setProperty($k, $v); - } - - // append method calls - if ($calls = $definition->getMethodCalls()) { - $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls)); - } - - $def->addError($parentDef); - $def->addError($definition); - - // these attributes are always taken from the child - $def->setAbstract($definition->isAbstract()); - $def->setTags($definition->getTags()); - // autoconfigure is never taken from parent (on purpose) - // and it's not legal on an instanceof - $def->setAutoconfigured($definition->isAutoconfigured()); - - return $def; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php deleted file mode 100644 index e67a2a8..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - */ -class ResolveClassPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isSynthetic() || null !== $definition->getClass()) { - continue; - } - if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id)) { - if ($definition instanceof ChildDefinition && !class_exists($id)) { - throw new InvalidArgumentException(sprintf('Service definition "%s" has a parent but no class, and its name looks like an FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id)); - } - $definition->setClass($id); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php deleted file mode 100644 index 4914b3a..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class ResolveDecoratorStackPass implements CompilerPassInterface -{ - private $tag; - - public function __construct(string $tag = 'container.stack') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tag = $tag; - } - - public function process(ContainerBuilder $container) - { - $stacks = []; - - foreach ($container->findTaggedServiceIds($this->tag) as $id => $tags) { - $definition = $container->getDefinition($id); - - if (!$definition instanceof ChildDefinition) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": only definitions with a "parent" can have the "%s" tag.', $id, $this->tag)); - } - - if (!$stack = $definition->getArguments()) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": the stack of decorators is empty.', $id)); - } - - $stacks[$id] = $stack; - } - - if (!$stacks) { - return; - } - - $resolvedDefinitions = []; - - foreach ($container->getDefinitions() as $id => $definition) { - if (!isset($stacks[$id])) { - $resolvedDefinitions[$id] = $definition; - continue; - } - - foreach (array_reverse($this->resolveStack($stacks, [$id]), true) as $k => $v) { - $resolvedDefinitions[$k] = $v; - } - - $alias = $container->setAlias($id, $k); - - if ($definition->getChanges()['public'] ?? false) { - $alias->setPublic($definition->isPublic()); - } - - if ($definition->isDeprecated()) { - $alias->setDeprecated(...array_values($definition->getDeprecation('%alias_id%'))); - } - } - - $container->setDefinitions($resolvedDefinitions); - } - - private function resolveStack(array $stacks, array $path): array - { - $definitions = []; - $id = end($path); - $prefix = '.'.$id.'.'; - - if (!isset($stacks[$id])) { - return [$id => new ChildDefinition($id)]; - } - - if (key($path) !== $searchKey = array_search($id, $path)) { - throw new ServiceCircularReferenceException($id, \array_slice($path, $searchKey)); - } - - foreach ($stacks[$id] as $k => $definition) { - if ($definition instanceof ChildDefinition && isset($stacks[$definition->getParent()])) { - $path[] = $definition->getParent(); - $definition = unserialize(serialize($definition)); // deep clone - } elseif ($definition instanceof Definition) { - $definitions[$decoratedId = $prefix.$k] = $definition; - continue; - } elseif ($definition instanceof Reference || $definition instanceof Alias) { - $path[] = (string) $definition; - } else { - throw new InvalidArgumentException(sprintf('Invalid service "%s": unexpected value of type "%s" found in the stack of decorators.', $id, get_debug_type($definition))); - } - - $p = $prefix.$k; - - foreach ($this->resolveStack($stacks, $path) as $k => $v) { - $definitions[$decoratedId = $p.$k] = $definition instanceof ChildDefinition ? $definition->setParent($k) : new ChildDefinition($k); - $definition = null; - } - array_pop($path); - } - - if (1 === \count($path)) { - foreach ($definitions as $k => $definition) { - $definition->setPublic(false)->setTags([])->setDecoratedService($decoratedId); - } - $definition->setDecoratedService(null); - } - - return $definitions; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php deleted file mode 100644 index ea52b14..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Replaces env var placeholders by their current values. - */ -class ResolveEnvPlaceholdersPass extends AbstractRecursivePass -{ - protected function processValue($value, bool $isRoot = false) - { - if (\is_string($value)) { - return $this->container->resolveEnvPlaceholders($value, true); - } - if ($value instanceof Definition) { - $changes = $value->getChanges(); - if (isset($changes['class'])) { - $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), true)); - } - if (isset($changes['file'])) { - $value->setFile($this->container->resolveEnvPlaceholders($value->getFile(), true)); - } - } - - $value = parent::processValue($value, $isRoot); - - if ($value && \is_array($value) && !$isRoot) { - $value = array_combine($this->container->resolveEnvPlaceholders(array_keys($value), true), $value); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php deleted file mode 100644 index 23f535b..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Maxime Steinhausser - */ -class ResolveFactoryClassPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) { - if (null === $class = $value->getClass()) { - throw new RuntimeException(sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId)); - } - - $factory[0] = $class; - $value->setFactory($factory); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php deleted file mode 100644 index dee2dc6..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Propagate "container.hot_path" tags to referenced services. - * - * @author Nicolas Grekas - */ -class ResolveHotPathPass extends AbstractRecursivePass -{ - private $tagName; - private $resolvedIds = []; - - public function __construct(string $tagName = 'container.hot_path') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tagName = $tagName; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - try { - parent::process($container); - $container->getDefinition('service_container')->clearTag($this->tagName); - } finally { - $this->resolvedIds = []; - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof ArgumentInterface) { - return $value; - } - - if ($value instanceof Definition && $isRoot) { - if ($value->isDeprecated()) { - return $value->clearTag($this->tagName); - } - - $this->resolvedIds[$this->currentId] = true; - - if (!$value->hasTag($this->tagName)) { - return $value; - } - } - - if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->hasDefinition($id = (string) $value)) { - $definition = $this->container->getDefinition($id); - - if ($definition->isDeprecated() || $definition->hasTag($this->tagName)) { - return $value; - } - - $definition->addTag($this->tagName); - - if (isset($this->resolvedIds[$id])) { - parent::processValue($definition, false); - } - - return $value; - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php deleted file mode 100644 index b211b84..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Applies instanceof conditionals to definitions. - * - * @author Nicolas Grekas - */ -class ResolveInstanceofConditionalsPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) { - if ($definition->getArguments()) { - throw new InvalidArgumentException(sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and should be removed.', $interface)); - } - } - - $tagsToKeep = []; - - if ($container->hasParameter('container.behavior_describing_tags')) { - $tagsToKeep = $container->getParameter('container.behavior_describing_tags'); - } - - foreach ($container->getDefinitions() as $id => $definition) { - $container->setDefinition($id, $this->processDefinition($container, $id, $definition, $tagsToKeep)); - } - - if ($container->hasParameter('container.behavior_describing_tags')) { - $container->getParameterBag()->remove('container.behavior_describing_tags'); - } - } - - private function processDefinition(ContainerBuilder $container, string $id, Definition $definition, array $tagsToKeep): Definition - { - $instanceofConditionals = $definition->getInstanceofConditionals(); - $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : []; - if (!$instanceofConditionals && !$autoconfiguredInstanceof) { - return $definition; - } - - if (!$class = $container->getParameterBag()->resolveValue($definition->getClass())) { - return $definition; - } - - $conditionals = $this->mergeConditionals($autoconfiguredInstanceof, $instanceofConditionals, $container); - - $definition->setInstanceofConditionals([]); - $shared = null; - $instanceofTags = []; - $instanceofCalls = []; - $instanceofBindings = []; - $reflectionClass = null; - $parent = $definition instanceof ChildDefinition ? $definition->getParent() : null; - - foreach ($conditionals as $interface => $instanceofDefs) { - if ($interface !== $class && !($reflectionClass ?? $reflectionClass = $container->getReflectionClass($class, false) ?: false)) { - continue; - } - - if ($interface !== $class && !is_subclass_of($class, $interface)) { - continue; - } - - foreach ($instanceofDefs as $key => $instanceofDef) { - /** @var ChildDefinition $instanceofDef */ - $instanceofDef = clone $instanceofDef; - $instanceofDef->setAbstract(true)->setParent($parent ?: '.abstract.instanceof.'.$id); - $parent = '.instanceof.'.$interface.'.'.$key.'.'.$id; - $container->setDefinition($parent, $instanceofDef); - $instanceofTags[] = $instanceofDef->getTags(); - $instanceofBindings = $instanceofDef->getBindings() + $instanceofBindings; - - foreach ($instanceofDef->getMethodCalls() as $methodCall) { - $instanceofCalls[] = $methodCall; - } - - $instanceofDef->setTags([]); - $instanceofDef->setMethodCalls([]); - $instanceofDef->setBindings([]); - - if (isset($instanceofDef->getChanges()['shared'])) { - $shared = $instanceofDef->isShared(); - } - } - } - - if ($parent) { - $bindings = $definition->getBindings(); - $abstract = $container->setDefinition('.abstract.instanceof.'.$id, $definition); - $definition->setBindings([]); - $definition = serialize($definition); - - if (Definition::class === \get_class($abstract)) { - // cast Definition to ChildDefinition - $definition = substr_replace($definition, '53', 2, 2); - $definition = substr_replace($definition, 'Child', 44, 0); - } - /** @var ChildDefinition $definition */ - $definition = unserialize($definition); - $definition->setParent($parent); - - if (null !== $shared && !isset($definition->getChanges()['shared'])) { - $definition->setShared($shared); - } - - // Don't add tags to service decorators - $i = \count($instanceofTags); - while (0 <= --$i) { - foreach ($instanceofTags[$i] as $k => $v) { - if (null === $definition->getDecoratedService() || \in_array($k, $tagsToKeep, true)) { - foreach ($v as $v) { - if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) { - continue; - } - $definition->addTag($k, $v); - } - } - } - } - - $definition->setMethodCalls(array_merge($instanceofCalls, $definition->getMethodCalls())); - $definition->setBindings($bindings + $instanceofBindings); - - // reset fields with "merge" behavior - $abstract - ->setBindings([]) - ->setArguments([]) - ->setMethodCalls([]) - ->setDecoratedService(null) - ->setTags([]) - ->setAbstract(true); - } - - return $definition; - } - - private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container): array - { - // make each value an array of ChildDefinition - $conditionals = array_map(function ($childDef) { return [$childDef]; }, $autoconfiguredInstanceof); - - foreach ($instanceofConditionals as $interface => $instanceofDef) { - // make sure the interface/class exists (but don't validate automaticInstanceofConditionals) - if (!$container->getReflectionClass($interface)) { - throw new RuntimeException(sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface)); - } - - if (!isset($autoconfiguredInstanceof[$interface])) { - $conditionals[$interface] = []; - } - - $conditionals[$interface][] = $instanceofDef; - } - - return $conditionals; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php deleted file mode 100644 index 948de42..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Emulates the invalid behavior if the reference is not found within the - * container. - * - * @author Johannes M. Schmitt - */ -class ResolveInvalidReferencesPass implements CompilerPassInterface -{ - private $container; - private $signalingException; - private $currentId; - - /** - * Process the ContainerBuilder to resolve invalid references. - */ - public function process(ContainerBuilder $container) - { - $this->container = $container; - $this->signalingException = new RuntimeException('Invalid reference.'); - - try { - foreach ($container->getDefinitions() as $this->currentId => $definition) { - $this->processValue($definition); - } - } finally { - $this->container = $this->signalingException = null; - } - } - - /** - * Processes arguments to determine invalid references. - * - * @return mixed - * - * @throws RuntimeException When an invalid reference is found - */ - private function processValue($value, int $rootLevel = 0, int $level = 0) - { - if ($value instanceof ServiceClosureArgument) { - $value->setValues($this->processValue($value->getValues(), 1, 1)); - } elseif ($value instanceof ArgumentInterface) { - $value->setValues($this->processValue($value->getValues(), $rootLevel, 1 + $level)); - } elseif ($value instanceof Definition) { - if ($value->isSynthetic() || $value->isAbstract()) { - return $value; - } - $value->setArguments($this->processValue($value->getArguments(), 0)); - $value->setProperties($this->processValue($value->getProperties(), 1)); - $value->setMethodCalls($this->processValue($value->getMethodCalls(), 2)); - } elseif (\is_array($value)) { - $i = 0; - - foreach ($value as $k => $v) { - try { - if (false !== $i && $k !== $i++) { - $i = false; - } - if ($v !== $processedValue = $this->processValue($v, $rootLevel, 1 + $level)) { - $value[$k] = $processedValue; - } - } catch (RuntimeException $e) { - if ($rootLevel < $level || ($rootLevel && !$level)) { - unset($value[$k]); - } elseif ($rootLevel) { - throw $e; - } else { - $value[$k] = null; - } - } - } - - // Ensure numerically indexed arguments have sequential numeric keys. - if (false !== $i) { - $value = array_values($value); - } - } elseif ($value instanceof Reference) { - if ($this->container->has($id = (string) $value)) { - return $value; - } - - $currentDefinition = $this->container->getDefinition($this->currentId); - - // resolve decorated service behavior depending on decorator service - if ($currentDefinition->innerServiceId === $id && ContainerInterface::NULL_ON_INVALID_REFERENCE === $currentDefinition->decorationOnInvalid) { - return null; - } - - $invalidBehavior = $value->getInvalidBehavior(); - - if (ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior && $value instanceof TypedReference && !$this->container->has($id)) { - $e = new ServiceNotFoundException($id, $this->currentId); - - // since the error message varies by $id and $this->currentId, so should the id of the dummy errored definition - $this->container->register($id = sprintf('.errored.%s.%s', $this->currentId, $id), $value->getType()) - ->addError($e->getMessage()); - - return new TypedReference($id, $value->getType(), $value->getInvalidBehavior()); - } - - // resolve invalid behavior - if (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { - $value = null; - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { - if (0 < $level || $rootLevel) { - throw $this->signalingException; - } - $value = null; - } - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php deleted file mode 100644 index c1c5748..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Resolves named arguments to their corresponding numeric index. - * - * @author Kévin Dunglas - */ -class ResolveNamedArgumentsPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof AbstractArgument && $value->getText().'.' === $value->getTextWithContext()) { - $value->setContext(sprintf('A value found in service "%s"', $this->currentId)); - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $calls = $value->getMethodCalls(); - $calls[] = ['__construct', $value->getArguments()]; - - foreach ($calls as $i => $call) { - [$method, $arguments] = $call; - $parameters = null; - $resolvedArguments = []; - - foreach ($arguments as $key => $argument) { - if ($argument instanceof AbstractArgument && $argument->getText().'.' === $argument->getTextWithContext()) { - $argument->setContext(sprintf('Argument '.(\is_int($key) ? 1 + $key : '"%3$s"').' of '.('__construct' === $method ? 'service "%s"' : 'method call "%s::%s()"'), $this->currentId, $method, $key)); - } - - if (\is_int($key)) { - $resolvedArguments[$key] = $argument; - continue; - } - - if (null === $parameters) { - $r = $this->getReflectionMethod($value, $method); - $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId; - $method = $r->getName(); - $parameters = $r->getParameters(); - } - - if (isset($key[0]) && '$' !== $key[0] && !class_exists($key) && !interface_exists($key, false)) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": did you forget to add the "$" prefix to argument "%s"?', $this->currentId, $key)); - } - - if (isset($key[0]) && '$' === $key[0]) { - foreach ($parameters as $j => $p) { - if ($key === '$'.$p->name) { - if ($p->isVariadic() && \is_array($argument)) { - foreach ($argument as $variadicArgument) { - $resolvedArguments[$j++] = $variadicArgument; - } - } else { - $resolvedArguments[$j] = $argument; - } - - continue 2; - } - } - - throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument named "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key)); - } - - if (null !== $argument && !$argument instanceof Reference && !$argument instanceof Definition) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": the value of argument "%s" of method "%s()" must be null, an instance of "%s" or an instance of "%s", "%s" given.', $this->currentId, $key, $class !== $this->currentId ? $class.'::'.$method : $method, Reference::class, Definition::class, get_debug_type($argument))); - } - - $typeFound = false; - foreach ($parameters as $j => $p) { - if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) { - $resolvedArguments[$j] = $argument; - $typeFound = true; - } - } - - if (!$typeFound) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument type-hinted as "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key)); - } - } - - if ($resolvedArguments !== $call[1]) { - ksort($resolvedArguments); - $calls[$i][1] = $resolvedArguments; - } - } - - [, $arguments] = array_pop($calls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - if ($calls !== $value->getMethodCalls()) { - $value->setMethodCalls($calls); - } - - foreach ($value->getProperties() as $key => $argument) { - if ($argument instanceof AbstractArgument && $argument->getText().'.' === $argument->getTextWithContext()) { - $argument->setContext(sprintf('Property "%s" of service "%s"', $key, $this->currentId)); - } - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php deleted file mode 100644 index 016be55..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Propagate the "container.no_preload" tag. - * - * @author Nicolas Grekas - */ -class ResolveNoPreloadPass extends AbstractRecursivePass -{ - private const DO_PRELOAD_TAG = '.container.do_preload'; - - private $tagName; - private $resolvedIds = []; - - public function __construct(string $tagName = 'container.no_preload') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/dependency-injection', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tagName = $tagName; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->container = $container; - - try { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isPublic() && !$definition->isPrivate() && !isset($this->resolvedIds[$id])) { - $this->resolvedIds[$id] = true; - $this->processValue($definition, true); - } - } - - foreach ($container->getAliases() as $alias) { - if ($alias->isPublic() && !$alias->isPrivate() && !isset($this->resolvedIds[$id = (string) $alias]) && $container->hasDefinition($id)) { - $this->resolvedIds[$id] = true; - $this->processValue($container->getDefinition($id), true); - } - } - } finally { - $this->resolvedIds = []; - $this->container = null; - } - - foreach ($container->getDefinitions() as $definition) { - if ($definition->hasTag(self::DO_PRELOAD_TAG)) { - $definition->clearTag(self::DO_PRELOAD_TAG); - } elseif (!$definition->isDeprecated() && !$definition->hasErrors()) { - $definition->addTag($this->tagName); - } - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->hasDefinition($id = (string) $value)) { - $definition = $this->container->getDefinition($id); - - if (!isset($this->resolvedIds[$id]) && (!$definition->isPublic() || $definition->isPrivate())) { - $this->resolvedIds[$id] = true; - $this->processValue($definition, true); - } - - return $value; - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - if ($value->hasTag($this->tagName) || $value->isDeprecated() || $value->hasErrors()) { - return $value; - } - - if ($isRoot) { - $value->addTag(self::DO_PRELOAD_TAG); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php deleted file mode 100644 index b1c81ee..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; - -/** - * Resolves all parameter placeholders "%somevalue%" to their real values. - * - * @author Johannes M. Schmitt - */ -class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass -{ - private $bag; - private $resolveArrays; - private $throwOnResolveException; - - public function __construct($resolveArrays = true, $throwOnResolveException = true) - { - $this->resolveArrays = $resolveArrays; - $this->throwOnResolveException = $throwOnResolveException; - } - - /** - * {@inheritdoc} - * - * @throws ParameterNotFoundException - */ - public function process(ContainerBuilder $container) - { - $this->bag = $container->getParameterBag(); - - try { - parent::process($container); - - $aliases = []; - foreach ($container->getAliases() as $name => $target) { - $this->currentId = $name; - $aliases[$this->bag->resolveValue($name)] = $target; - } - $container->setAliases($aliases); - } catch (ParameterNotFoundException $e) { - $e->setSourceId($this->currentId); - - throw $e; - } - - $this->bag->resolve(); - $this->bag = null; - } - - protected function processValue($value, bool $isRoot = false) - { - if (\is_string($value)) { - try { - $v = $this->bag->resolveValue($value); - } catch (ParameterNotFoundException $e) { - if ($this->throwOnResolveException) { - throw $e; - } - - $v = null; - $this->container->getDefinition($this->currentId)->addError($e->getMessage()); - } - - return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value; - } - if ($value instanceof Definition) { - $value->setBindings($this->processValue($value->getBindings())); - $changes = $value->getChanges(); - if (isset($changes['class'])) { - $value->setClass($this->bag->resolveValue($value->getClass())); - } - if (isset($changes['file'])) { - $value->setFile($this->bag->resolveValue($value->getFile())); - } - } - - $value = parent::processValue($value, $isRoot); - - if ($value && \is_array($value)) { - $value = array_combine($this->bag->resolveValue(array_keys($value)), $value); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php deleted file mode 100644 index b63e3f5..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s" class is deprecated.', ResolvePrivatesPass::class); - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Nicolas Grekas - * - * @deprecated since Symfony 5.2 - */ -class ResolvePrivatesPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isPrivate()) { - $definition->setPublic(false); - $definition->setPrivate(true); - } - } - - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPrivate()) { - $alias->setPublic(false); - $alias->setPrivate(true); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php deleted file mode 100644 index e59893f..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Replaces all references to aliases with references to the actual service. - * - * @author Johannes M. Schmitt - */ -class ResolveReferencesToAliasesPass extends AbstractRecursivePass -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - parent::process($container); - - foreach ($container->getAliases() as $id => $alias) { - $aliasId = (string) $alias; - $this->currentId = $id; - - if ($aliasId !== $defId = $this->getDefinitionId($aliasId, $container)) { - $container->setAlias($id, $defId)->setPublic($alias->isPublic()); - } - } - } - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - - $defId = $this->getDefinitionId($id = (string) $value, $this->container); - - return $defId !== $id ? new Reference($defId, $value->getInvalidBehavior()) : $value; - } - - private function getDefinitionId(string $id, ContainerBuilder $container): string - { - if (!$container->hasAlias($id)) { - return $id; - } - - $alias = $container->getAlias($id); - - if ($alias->isDeprecated()) { - $referencingDefinition = $container->hasDefinition($this->currentId) ? $container->getDefinition($this->currentId) : $container->getAlias($this->currentId); - if (!$referencingDefinition->isDeprecated()) { - $deprecation = $alias->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], rtrim($deprecation['message'], '. ').'. It is being referenced by the "%s" '.($container->hasDefinition($this->currentId) ? 'service.' : 'alias.'), $this->currentId); - } - } - - $seen = []; - do { - if (isset($seen[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id])); - } - - $seen[$id] = true; - $id = (string) $container->getAlias($id); - } while ($container->hasAlias($id)); - - return $id; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php deleted file mode 100644 index 518c03d..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * Compiler pass to inject their service locator to service subscribers. - * - * @author Nicolas Grekas - */ -class ResolveServiceSubscribersPass extends AbstractRecursivePass -{ - private $serviceLocator; - - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference && $this->serviceLocator && \in_array((string) $value, [ContainerInterface::class, ServiceProviderInterface::class], true)) { - return new Reference($this->serviceLocator); - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $serviceLocator = $this->serviceLocator; - $this->serviceLocator = null; - - if ($value->hasTag('container.service_subscriber.locator')) { - $this->serviceLocator = $value->getTag('container.service_subscriber.locator')[0]['id']; - $value->clearTag('container.service_subscriber.locator'); - } - - try { - return parent::processValue($value); - } finally { - $this->serviceLocator = $serviceLocator; - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php deleted file mode 100644 index 48a034a..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; - -/** - * Resolves all TaggedIteratorArgument arguments. - * - * @author Roland Franssen - */ -class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass -{ - use PriorityTaggedServiceTrait; - - /** - * {@inheritdoc} - */ - protected function processValue($value, bool $isRoot = false) - { - if (!$value instanceof TaggedIteratorArgument) { - return parent::processValue($value, $isRoot); - } - - $value->setValues($this->findAndSortTaggedServices($value, $this->container)); - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php deleted file mode 100644 index faa7b57..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; - -/** - * Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances. - * - * @author Nicolas Grekas - */ -final class ServiceLocatorTagPass extends AbstractRecursivePass -{ - use PriorityTaggedServiceTrait; - - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof ServiceLocatorArgument) { - if ($value->getTaggedIteratorArgument()) { - $value->setValues($this->findAndSortTaggedServices($value->getTaggedIteratorArgument(), $this->container)); - } - - return self::register($this->container, $value->getValues()); - } - - if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) { - return parent::processValue($value, $isRoot); - } - - if (!$value->getClass()) { - $value->setClass(ServiceLocator::class); - } - - $services = $value->getArguments()[0] ?? null; - - if ($services instanceof TaggedIteratorArgument) { - $services = $this->findAndSortTaggedServices($services, $this->container); - } - - if (!\is_array($services)) { - throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId)); - } - - $i = 0; - - foreach ($services as $k => $v) { - if ($v instanceof ServiceClosureArgument) { - continue; - } - if (!$v instanceof Reference) { - throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, get_debug_type($v), $k)); - } - - if ($i === $k) { - unset($services[$k]); - - $k = (string) $v; - ++$i; - } elseif (\is_int($k)) { - $i = null; - } - $services[$k] = new ServiceClosureArgument($v); - } - ksort($services); - - $value->setArgument(0, $services); - - $id = '.service_locator.'.ContainerBuilder::hash($value); - - if ($isRoot) { - if ($id !== $this->currentId) { - $this->container->setAlias($id, new Alias($this->currentId, false)); - } - - return $value; - } - - $this->container->setDefinition($id, $value->setPublic(false)); - - return new Reference($id); - } - - /** - * @param Reference[] $refMap - */ - public static function register(ContainerBuilder $container, array $refMap, string $callerId = null): Reference - { - foreach ($refMap as $id => $ref) { - if (!$ref instanceof Reference) { - throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', get_debug_type($ref), $id)); - } - $refMap[$id] = new ServiceClosureArgument($ref); - } - - $locator = (new Definition(ServiceLocator::class)) - ->addArgument($refMap) - ->addTag('container.service_locator'); - - if (null !== $callerId && $container->hasDefinition($callerId)) { - $locator->setBindings($container->getDefinition($callerId)->getBindings()); - } - - if (!$container->hasDefinition($id = '.service_locator.'.ContainerBuilder::hash($locator))) { - $container->setDefinition($id, $locator); - } - - if (null !== $callerId) { - $locatorId = $id; - // Locators are shared when they hold the exact same list of factories; - // to have them specialized per consumer service, we use a cloning factory - // to derivate customized instances from the prototype one. - $container->register($id .= '.'.$callerId, ServiceLocator::class) - ->setFactory([new Reference($locatorId), 'withContext']) - ->addTag('container.service_locator_context', ['id' => $callerId]) - ->addArgument($callerId) - ->addArgument(new Reference('service_container')); - } - - return new Reference($id); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php deleted file mode 100644 index 1225514..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * This is a directed graph of your services. - * - * This information can be used by your compiler passes instead of collecting - * it themselves which improves performance quite a lot. - * - * @author Johannes M. Schmitt - * - * @final - */ -class ServiceReferenceGraph -{ - /** - * @var ServiceReferenceGraphNode[] - */ - private $nodes = []; - - public function hasNode(string $id): bool - { - return isset($this->nodes[$id]); - } - - /** - * Gets a node by identifier. - * - * @throws InvalidArgumentException if no node matches the supplied identifier - */ - public function getNode(string $id): ServiceReferenceGraphNode - { - if (!isset($this->nodes[$id])) { - throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id)); - } - - return $this->nodes[$id]; - } - - /** - * Returns all nodes. - * - * @return ServiceReferenceGraphNode[] - */ - public function getNodes(): array - { - return $this->nodes; - } - - /** - * Clears all nodes. - */ - public function clear() - { - foreach ($this->nodes as $node) { - $node->clear(); - } - $this->nodes = []; - } - - /** - * Connects 2 nodes together in the Graph. - */ - public function connect(?string $sourceId, $sourceValue, ?string $destId, $destValue = null, Reference $reference = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false) - { - if (null === $sourceId || null === $destId) { - return; - } - - $sourceNode = $this->createNode($sourceId, $sourceValue); - $destNode = $this->createNode($destId, $destValue); - $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor); - - $sourceNode->addOutEdge($edge); - $destNode->addInEdge($edge); - } - - private function createNode(string $id, $value): ServiceReferenceGraphNode - { - if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) { - return $this->nodes[$id]; - } - - return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php deleted file mode 100644 index 9861456..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -/** - * Represents an edge in your service graph. - * - * Value is typically a reference. - * - * @author Johannes M. Schmitt - */ -class ServiceReferenceGraphEdge -{ - private $sourceNode; - private $destNode; - private $value; - private $lazy; - private $weak; - private $byConstructor; - - public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false) - { - $this->sourceNode = $sourceNode; - $this->destNode = $destNode; - $this->value = $value; - $this->lazy = $lazy; - $this->weak = $weak; - $this->byConstructor = $byConstructor; - } - - /** - * Returns the value of the edge. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns the source node. - * - * @return ServiceReferenceGraphNode - */ - public function getSourceNode() - { - return $this->sourceNode; - } - - /** - * Returns the destination node. - * - * @return ServiceReferenceGraphNode - */ - public function getDestNode() - { - return $this->destNode; - } - - /** - * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation. - * - * @return bool - */ - public function isLazy() - { - return $this->lazy; - } - - /** - * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service. - * - * @return bool - */ - public function isWeak() - { - return $this->weak; - } - - /** - * Returns true if the edge links with a constructor argument. - * - * @return bool - */ - public function isReferencedByConstructor() - { - return $this->byConstructor; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php deleted file mode 100644 index ba96da2..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Represents a node in your service graph. - * - * Value is typically a definition, or an alias. - * - * @author Johannes M. Schmitt - */ -class ServiceReferenceGraphNode -{ - private $id; - private $inEdges = []; - private $outEdges = []; - private $value; - - /** - * @param string $id The node identifier - * @param mixed $value The node value - */ - public function __construct(string $id, $value) - { - $this->id = $id; - $this->value = $value; - } - - public function addInEdge(ServiceReferenceGraphEdge $edge) - { - $this->inEdges[] = $edge; - } - - public function addOutEdge(ServiceReferenceGraphEdge $edge) - { - $this->outEdges[] = $edge; - } - - /** - * Checks if the value of this node is an Alias. - * - * @return bool - */ - public function isAlias() - { - return $this->value instanceof Alias; - } - - /** - * Checks if the value of this node is a Definition. - * - * @return bool - */ - public function isDefinition() - { - return $this->value instanceof Definition; - } - - /** - * Returns the identifier. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Returns the in edges. - * - * @return ServiceReferenceGraphEdge[] - */ - public function getInEdges() - { - return $this->inEdges; - } - - /** - * Returns the out edges. - * - * @return ServiceReferenceGraphEdge[] - */ - public function getOutEdges() - { - return $this->outEdges; - } - - /** - * Returns the value of this Node. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Clears all edges. - */ - public function clear() - { - $this->inEdges = $this->outEdges = []; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php b/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php deleted file mode 100644 index 23bfe59..0000000 --- a/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; - -/** - * Validates environment variable placeholders used in extension configuration with dummy values. - * - * @author Roland Franssen - */ -class ValidateEnvPlaceholdersPass implements CompilerPassInterface -{ - private const TYPE_FIXTURES = ['array' => [], 'bool' => false, 'float' => 0.0, 'int' => 0, 'string' => '']; - - private $extensionConfig = []; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $this->extensionConfig = []; - - if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) { - return; - } - - $resolvingBag = $container->getParameterBag(); - if (!$resolvingBag instanceof EnvPlaceholderParameterBag) { - return; - } - - $defaultBag = new ParameterBag($resolvingBag->all()); - $envTypes = $resolvingBag->getProvidedTypes(); - foreach ($resolvingBag->getEnvPlaceholders() + $resolvingBag->getUnusedEnvPlaceholders() as $env => $placeholders) { - $values = []; - if (false === $i = strpos($env, ':')) { - $default = $defaultBag->has("env($env)") ? $defaultBag->get("env($env)") : self::TYPE_FIXTURES['string']; - $defaultType = null !== $default ? get_debug_type($default) : 'string'; - $values[$defaultType] = $default; - } else { - $prefix = substr($env, 0, $i); - foreach ($envTypes[$prefix] ?? ['string'] as $type) { - $values[$type] = self::TYPE_FIXTURES[$type] ?? null; - } - } - foreach ($placeholders as $placeholder) { - BaseNode::setPlaceholder($placeholder, $values); - } - } - - $processor = new Processor(); - - foreach ($extensions as $name => $extension) { - if (!($extension instanceof ConfigurationExtensionInterface || $extension instanceof ConfigurationInterface) - || !$config = array_filter($container->getExtensionConfig($name)) - ) { - // this extension has no semantic configuration or was not called - continue; - } - - $config = $resolvingBag->resolveValue($config); - - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } elseif (null === $configuration = $extension->getConfiguration($config, $container)) { - continue; - } - - $this->extensionConfig[$name] = $processor->processConfiguration($configuration, $config); - } - - $resolvingBag->clearUnusedEnvPlaceholders(); - } - - /** - * @internal - */ - public function getExtensionConfig(): array - { - try { - return $this->extensionConfig; - } finally { - $this->extensionConfig = []; - } - } -} diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php deleted file mode 100644 index c10398b..0000000 --- a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Tracks container parameters. - * - * @author Maxime Steinhausser - * - * @final - */ -class ContainerParametersResource implements ResourceInterface -{ - private $parameters; - - /** - * @param array $parameters The container parameters to track - */ - public function __construct(array $parameters) - { - $this->parameters = $parameters; - } - - public function __toString(): string - { - return 'container_parameters_'.md5(serialize($this->parameters)); - } - - public function getParameters(): array - { - return $this->parameters; - } -} diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php deleted file mode 100644 index 2f2affa..0000000 --- a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Config\ResourceCheckerInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * @author Maxime Steinhausser - */ -class ContainerParametersResourceChecker implements ResourceCheckerInterface -{ - /** @var ContainerInterface */ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function supports(ResourceInterface $metadata) - { - return $metadata instanceof ContainerParametersResource; - } - - /** - * {@inheritdoc} - */ - public function isFresh(ResourceInterface $resource, int $timestamp) - { - foreach ($resource->getParameters() as $key => $value) { - if (!$this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/dependency-injection/Container.php b/vendor/symfony/dependency-injection/Container.php deleted file mode 100644 index 6f61eb8..0000000 --- a/vendor/symfony/dependency-injection/Container.php +++ /dev/null @@ -1,434 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator as ArgumentServiceLocator; -use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(RewindableGenerator::class); -class_exists(ArgumentServiceLocator::class); - -/** - * Container is a dependency injection container. - * - * It gives access to object instances (services). - * Services and parameters are simple key/pair stores. - * The container can have four possible behaviors when a service - * does not exist (or is not initialized for the last case): - * - * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default) - * * NULL_ON_INVALID_REFERENCE: Returns null - * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference - * (for instance, ignore a setter if the service does not exist) - * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class Container implements ContainerInterface, ResetInterface -{ - protected $parameterBag; - protected $services = []; - protected $privates = []; - protected $fileMap = []; - protected $methodMap = []; - protected $factories = []; - protected $aliases = []; - protected $loading = []; - protected $resolving = []; - protected $syntheticIds = []; - - private $envCache = []; - private $compiled = false; - private $getEnv; - - public function __construct(ParameterBagInterface $parameterBag = null) - { - $this->parameterBag = $parameterBag ?? new EnvPlaceholderParameterBag(); - } - - /** - * Compiles the container. - * - * This method does two things: - * - * * Parameter values are resolved; - * * The parameter bag is frozen. - */ - public function compile() - { - $this->parameterBag->resolve(); - - $this->parameterBag = new FrozenParameterBag($this->parameterBag->all()); - - $this->compiled = true; - } - - /** - * Returns true if the container is compiled. - * - * @return bool - */ - public function isCompiled() - { - return $this->compiled; - } - - /** - * Gets the service container parameter bag. - * - * @return ParameterBagInterface - */ - public function getParameterBag() - { - return $this->parameterBag; - } - - /** - * Gets a parameter. - * - * @return array|bool|string|int|float|\UnitEnum|null - * - * @throws InvalidArgumentException if the parameter is not defined - */ - public function getParameter(string $name) - { - return $this->parameterBag->get($name); - } - - /** - * @return bool - */ - public function hasParameter(string $name) - { - return $this->parameterBag->has($name); - } - - /** - * Sets a parameter. - * - * @param string $name The parameter name - * @param array|bool|string|int|float|\UnitEnum|null $value The parameter value - */ - public function setParameter(string $name, $value) - { - $this->parameterBag->set($name, $value); - } - - /** - * Sets a service. - * - * Setting a synthetic service to null resets it: has() returns false and get() - * behaves in the same way as if the service was never created. - */ - public function set(string $id, ?object $service) - { - // Runs the internal initializer; used by the dumped container to include always-needed files - if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) { - $initialize = $this->privates['service_container']; - unset($this->privates['service_container']); - $initialize(); - } - - if ('service_container' === $id) { - throw new InvalidArgumentException('You cannot set service "service_container".'); - } - - if (!(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) { - if (isset($this->syntheticIds[$id]) || !isset($this->getRemovedIds()[$id])) { - // no-op - } elseif (null === $service) { - throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot unset it.', $id)); - } else { - throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot replace it.', $id)); - } - } elseif (isset($this->services[$id])) { - throw new InvalidArgumentException(sprintf('The "%s" service is already initialized, you cannot replace it.', $id)); - } - - if (isset($this->aliases[$id])) { - unset($this->aliases[$id]); - } - - if (null === $service) { - unset($this->services[$id]); - - return; - } - - $this->services[$id] = $service; - } - - /** - * Returns true if the given service is defined. - * - * @param string $id The service identifier - * - * @return bool - */ - public function has(string $id) - { - if (isset($this->aliases[$id])) { - $id = $this->aliases[$id]; - } - if (isset($this->services[$id])) { - return true; - } - if ('service_container' === $id) { - return true; - } - - return isset($this->fileMap[$id]) || isset($this->methodMap[$id]); - } - - /** - * Gets a service. - * - * @return object|null - * - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * @throws \Exception if an exception has been thrown when the service has been resolved - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1) - { - return $this->services[$id] - ?? $this->services[$id = $this->aliases[$id] ?? $id] - ?? ('service_container' === $id ? $this : ($this->factories[$id] ?? [$this, 'make'])($id, $invalidBehavior)); - } - - /** - * Creates a service. - * - * As a separate method to allow "get()" to use the really fast `??` operator. - */ - private function make(string $id, int $invalidBehavior) - { - if (isset($this->loading[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), [$id])); - } - - $this->loading[$id] = true; - - try { - if (isset($this->fileMap[$id])) { - return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->load($this->fileMap[$id]); - } elseif (isset($this->methodMap[$id])) { - return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->{$this->methodMap[$id]}(); - } - } catch (\Exception $e) { - unset($this->services[$id]); - - throw $e; - } finally { - unset($this->loading[$id]); - } - - if (/* self::EXCEPTION_ON_INVALID_REFERENCE */ 1 === $invalidBehavior) { - if (!$id) { - throw new ServiceNotFoundException($id); - } - if (isset($this->syntheticIds[$id])) { - throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id)); - } - if (isset($this->getRemovedIds()[$id])) { - throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id)); - } - - $alternatives = []; - foreach ($this->getServiceIds() as $knownId) { - if ('' === $knownId || '.' === $knownId[0]) { - continue; - } - $lev = levenshtein($id, $knownId); - if ($lev <= \strlen($id) / 3 || str_contains($knownId, $id)) { - $alternatives[] = $knownId; - } - } - - throw new ServiceNotFoundException($id, null, null, $alternatives); - } - - return null; - } - - /** - * Returns true if the given service has actually been initialized. - * - * @return bool - */ - public function initialized(string $id) - { - if (isset($this->aliases[$id])) { - $id = $this->aliases[$id]; - } - - if ('service_container' === $id) { - return false; - } - - return isset($this->services[$id]); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $services = $this->services + $this->privates; - $this->services = $this->factories = $this->privates = []; - - foreach ($services as $service) { - try { - if ($service instanceof ResetInterface) { - $service->reset(); - } - } catch (\Throwable $e) { - continue; - } - } - } - - /** - * Gets all service ids. - * - * @return string[] - */ - public function getServiceIds() - { - return array_map('strval', array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->aliases), array_keys($this->services)))); - } - - /** - * Gets service ids that existed at compile time. - * - * @return array - */ - public function getRemovedIds() - { - return []; - } - - /** - * Camelizes a string. - * - * @return string - */ - public static function camelize(string $id) - { - return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']); - } - - /** - * A string to underscore. - * - * @return string - */ - public static function underscore(string $id) - { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id))); - } - - /** - * Creates a service by requiring its factory file. - */ - protected function load(string $file) - { - return require $file; - } - - /** - * Fetches a variable from the environment. - * - * @return mixed - * - * @throws EnvNotFoundException When the environment variable is not found and has no default value - */ - protected function getEnv(string $name) - { - if (isset($this->resolving[$envName = "env($name)"])) { - throw new ParameterCircularReferenceException(array_keys($this->resolving)); - } - if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) { - return $this->envCache[$name]; - } - if (!$this->has($id = 'container.env_var_processors_locator')) { - $this->set($id, new ServiceLocator([])); - } - if (!$this->getEnv) { - $this->getEnv = \Closure::fromCallable([$this, 'getEnv']); - } - $processors = $this->get($id); - - if (false !== $i = strpos($name, ':')) { - $prefix = substr($name, 0, $i); - $localName = substr($name, 1 + $i); - } else { - $prefix = 'string'; - $localName = $name; - } - $processor = $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this); - - $this->resolving[$envName] = true; - try { - return $this->envCache[$name] = $processor->getEnv($prefix, $localName, $this->getEnv); - } finally { - unset($this->resolving[$envName]); - } - } - - /** - * @param string|false $registry - * @param string|bool $load - * - * @return mixed - * - * @internal - */ - final protected function getService($registry, string $id, ?string $method, $load) - { - if ('service_container' === $id) { - return $this; - } - if (\is_string($load)) { - throw new RuntimeException($load); - } - if (null === $method) { - return false !== $registry ? $this->{$registry}[$id] ?? null : null; - } - if (false !== $registry) { - return $this->{$registry}[$id] ?? $this->{$registry}[$id] = $load ? $this->load($method) : $this->{$method}(); - } - if (!$load) { - return $this->{$method}(); - } - - return ($factory = $this->factories[$id] ?? $this->factories['service_container'][$id] ?? null) ? $factory() : $this->load($method); - } - - private function __clone() - { - } -} diff --git a/vendor/symfony/dependency-injection/ContainerAwareInterface.php b/vendor/symfony/dependency-injection/ContainerAwareInterface.php deleted file mode 100644 index e7b9d57..0000000 --- a/vendor/symfony/dependency-injection/ContainerAwareInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * ContainerAwareInterface should be implemented by classes that depends on a Container. - * - * @author Fabien Potencier - */ -interface ContainerAwareInterface -{ - /** - * Sets the container. - */ - public function setContainer(ContainerInterface $container = null); -} diff --git a/vendor/symfony/dependency-injection/ContainerAwareTrait.php b/vendor/symfony/dependency-injection/ContainerAwareTrait.php deleted file mode 100644 index ee1ea2c..0000000 --- a/vendor/symfony/dependency-injection/ContainerAwareTrait.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * ContainerAware trait. - * - * @author Fabien Potencier - */ -trait ContainerAwareTrait -{ - /** - * @var ContainerInterface - */ - protected $container; - - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } -} diff --git a/vendor/symfony/dependency-injection/ContainerBuilder.php b/vendor/symfony/dependency-injection/ContainerBuilder.php deleted file mode 100644 index 485630a..0000000 --- a/vendor/symfony/dependency-injection/ContainerBuilder.php +++ /dev/null @@ -1,1702 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Composer\InstalledVersions; -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Config\Resource\ComposerResource; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Resource\GlobResource; -use Symfony\Component\Config\Resource\ReflectionClassResource; -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\Compiler\Compiler; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass; -use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface; -use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; - -/** - * ContainerBuilder is a DI container that provides an API to easily describe services. - * - * @author Fabien Potencier - */ -class ContainerBuilder extends Container implements TaggedContainerInterface -{ - /** - * @var array - */ - private $extensions = []; - - /** - * @var array - */ - private $extensionsByNs = []; - - /** - * @var array - */ - private $definitions = []; - - /** - * @var array - */ - private $aliasDefinitions = []; - - /** - * @var array - */ - private $resources = []; - - /** - * @var array>> - */ - private $extensionConfigs = []; - - /** - * @var Compiler - */ - private $compiler; - - /** - * @var bool - */ - private $trackResources; - - /** - * @var InstantiatorInterface|null - */ - private $proxyInstantiator; - - /** - * @var ExpressionLanguage|null - */ - private $expressionLanguage; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - /** - * @var string[] with tag names used by findTaggedServiceIds - */ - private $usedTags = []; - - /** - * @var string[][] a map of env var names to their placeholders - */ - private $envPlaceholders = []; - - /** - * @var int[] a map of env vars to their resolution counter - */ - private $envCounters = []; - - /** - * @var string[] the list of vendor directories - */ - private $vendors; - - /** - * @var array - */ - private $autoconfiguredInstanceof = []; - - /** - * @var array - */ - private $autoconfiguredAttributes = []; - - /** - * @var array - */ - private $removedIds = []; - - /** - * @var array - */ - private $removedBindingIds = []; - - private const INTERNAL_TYPES = [ - 'int' => true, - 'float' => true, - 'string' => true, - 'bool' => true, - 'resource' => true, - 'object' => true, - 'array' => true, - 'null' => true, - 'callable' => true, - 'iterable' => true, - 'mixed' => true, - ]; - - public function __construct(ParameterBagInterface $parameterBag = null) - { - parent::__construct($parameterBag); - - $this->trackResources = interface_exists(ResourceInterface::class); - $this->setDefinition('service_container', (new Definition(ContainerInterface::class))->setSynthetic(true)->setPublic(true)); - $this->setAlias(PsrContainerInterface::class, new Alias('service_container', false))->setDeprecated('symfony/dependency-injection', '5.1', $deprecationMessage = 'The "%alias_id%" autowiring alias is deprecated. Define it explicitly in your app if you want to keep using it.'); - $this->setAlias(ContainerInterface::class, new Alias('service_container', false))->setDeprecated('symfony/dependency-injection', '5.1', $deprecationMessage); - } - - /** - * @var array - */ - private $classReflectors; - - /** - * Sets the track resources flag. - * - * If you are not using the loaders and therefore don't want - * to depend on the Config component, set this flag to false. - */ - public function setResourceTracking(bool $track) - { - $this->trackResources = $track; - } - - /** - * Checks if resources are tracked. - * - * @return bool - */ - public function isTrackingResources() - { - return $this->trackResources; - } - - /** - * Sets the instantiator to be used when fetching proxies. - */ - public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator) - { - $this->proxyInstantiator = $proxyInstantiator; - } - - public function registerExtension(ExtensionInterface $extension) - { - $this->extensions[$extension->getAlias()] = $extension; - - if (false !== $extension->getNamespace()) { - $this->extensionsByNs[$extension->getNamespace()] = $extension; - } - } - - /** - * Returns an extension by alias or namespace. - * - * @return ExtensionInterface - * - * @throws LogicException if the extension is not registered - */ - public function getExtension(string $name) - { - if (isset($this->extensions[$name])) { - return $this->extensions[$name]; - } - - if (isset($this->extensionsByNs[$name])) { - return $this->extensionsByNs[$name]; - } - - throw new LogicException(sprintf('Container extension "%s" is not registered.', $name)); - } - - /** - * Returns all registered extensions. - * - * @return array - */ - public function getExtensions() - { - return $this->extensions; - } - - /** - * Checks if we have an extension. - * - * @return bool - */ - public function hasExtension(string $name) - { - return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]); - } - - /** - * Returns an array of resources loaded to build this configuration. - * - * @return ResourceInterface[] - */ - public function getResources() - { - return array_values($this->resources); - } - - /** - * @return $this - */ - public function addResource(ResourceInterface $resource) - { - if (!$this->trackResources) { - return $this; - } - - if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) { - return $this; - } - - $this->resources[(string) $resource] = $resource; - - return $this; - } - - /** - * Sets the resources for this configuration. - * - * @param array $resources - * - * @return $this - */ - public function setResources(array $resources) - { - if (!$this->trackResources) { - return $this; - } - - $this->resources = $resources; - - return $this; - } - - /** - * Adds the object class hierarchy as resources. - * - * @param object|string $object An object instance or class name - * - * @return $this - */ - public function addObjectResource($object) - { - if ($this->trackResources) { - if (\is_object($object)) { - $object = \get_class($object); - } - if (!isset($this->classReflectors[$object])) { - $this->classReflectors[$object] = new \ReflectionClass($object); - } - $class = $this->classReflectors[$object]; - - foreach ($class->getInterfaceNames() as $name) { - if (null === $interface = &$this->classReflectors[$name]) { - $interface = new \ReflectionClass($name); - } - $file = $interface->getFileName(); - if (false !== $file && file_exists($file)) { - $this->fileExists($file); - } - } - do { - $file = $class->getFileName(); - if (false !== $file && file_exists($file)) { - $this->fileExists($file); - } - foreach ($class->getTraitNames() as $name) { - $this->addObjectResource($name); - } - } while ($class = $class->getParentClass()); - } - - return $this; - } - - /** - * Retrieves the requested reflection class and registers it for resource tracking. - * - * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true - * - * @final - */ - public function getReflectionClass(?string $class, bool $throw = true): ?\ReflectionClass - { - if (!$class = $this->getParameterBag()->resolveValue($class)) { - return null; - } - - if (isset(self::INTERNAL_TYPES[$class])) { - return null; - } - - $resource = $classReflector = null; - - try { - if (isset($this->classReflectors[$class])) { - $classReflector = $this->classReflectors[$class]; - } elseif (class_exists(ClassExistenceResource::class)) { - $resource = new ClassExistenceResource($class, false); - $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class); - } else { - $classReflector = class_exists($class) ? new \ReflectionClass($class) : false; - } - } catch (\ReflectionException $e) { - if ($throw) { - throw $e; - } - } - - if ($this->trackResources) { - if (!$classReflector) { - $this->addResource($resource ?? new ClassExistenceResource($class, false)); - } elseif (!$classReflector->isInternal()) { - $path = $classReflector->getFileName(); - - if (!$this->inVendors($path)) { - $this->addResource(new ReflectionClassResource($classReflector, $this->vendors)); - } - } - $this->classReflectors[$class] = $classReflector; - } - - return $classReflector ?: null; - } - - /** - * Checks whether the requested file or directory exists and registers the result for resource tracking. - * - * @param string $path The file or directory path for which to check the existence - * @param bool|string $trackContents Whether to track contents of the given resource. If a string is passed, - * it will be used as pattern for tracking contents of the requested directory - * - * @final - */ - public function fileExists(string $path, $trackContents = true): bool - { - $exists = file_exists($path); - - if (!$this->trackResources || $this->inVendors($path)) { - return $exists; - } - - if (!$exists) { - $this->addResource(new FileExistenceResource($path)); - - return $exists; - } - - if (is_dir($path)) { - if ($trackContents) { - $this->addResource(new DirectoryResource($path, \is_string($trackContents) ? $trackContents : null)); - } else { - $this->addResource(new GlobResource($path, '/*', false)); - } - } elseif ($trackContents) { - $this->addResource(new FileResource($path)); - } - - return $exists; - } - - /** - * Loads the configuration for an extension. - * - * @param string $extension The extension alias or namespace - * @param array|null $values An array of values that customizes the extension - * - * @return $this - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - * @throws \LogicException if the extension is not registered - */ - public function loadFromExtension(string $extension, array $values = null) - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Cannot load from an extension on a compiled container.'); - } - - $namespace = $this->getExtension($extension)->getAlias(); - - $this->extensionConfigs[$namespace][] = $values ?? []; - - return $this; - } - - /** - * Adds a compiler pass. - * - * @param string $type The type of compiler pass - * @param int $priority Used to sort the passes - * - * @return $this - */ - public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) - { - $this->getCompiler()->addPass($pass, $type, $priority); - - $this->addObjectResource($pass); - - return $this; - } - - /** - * Returns the compiler pass config which can then be modified. - * - * @return PassConfig - */ - public function getCompilerPassConfig() - { - return $this->getCompiler()->getPassConfig(); - } - - /** - * Returns the compiler. - * - * @return Compiler - */ - public function getCompiler() - { - if (null === $this->compiler) { - $this->compiler = new Compiler(); - } - - return $this->compiler; - } - - /** - * Sets a service. - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function set(string $id, ?object $service) - { - if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) { - // setting a synthetic service on a compiled container is alright - throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id)); - } - - unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]); - - parent::set($id, $service); - } - - /** - * Removes a service definition. - */ - public function removeDefinition(string $id) - { - if (isset($this->definitions[$id])) { - unset($this->definitions[$id]); - $this->removedIds[$id] = true; - } - } - - /** - * Returns true if the given service is defined. - * - * @param string $id The service identifier - * - * @return bool - */ - public function has(string $id) - { - return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id); - } - - /** - * @return object|null - * - * @throws InvalidArgumentException when no definitions are available - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * @throws \Exception - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) - { - if ($this->isCompiled() && isset($this->removedIds[$id]) && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior) { - return parent::get($id); - } - - return $this->doGet($id, $invalidBehavior); - } - - private function doGet(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, bool $isConstructorArgument = false) - { - if (isset($inlineServices[$id])) { - return $inlineServices[$id]; - } - if (null === $inlineServices) { - $isConstructorArgument = true; - $inlineServices = []; - } - try { - if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) { - return parent::get($id, $invalidBehavior); - } - if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) { - return $service; - } - } catch (ServiceCircularReferenceException $e) { - if ($isConstructorArgument) { - throw $e; - } - } - - if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) { - $alias = $this->aliasDefinitions[$id]; - - if ($alias->isDeprecated()) { - $deprecation = $alias->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - return $this->doGet((string) $alias, $invalidBehavior, $inlineServices, $isConstructorArgument); - } - - try { - $definition = $this->getDefinition($id); - } catch (ServiceNotFoundException $e) { - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $invalidBehavior) { - return null; - } - - throw $e; - } - - if ($definition->hasErrors() && $e = $definition->getErrors()) { - throw new RuntimeException(reset($e)); - } - - if ($isConstructorArgument) { - $this->loading[$id] = true; - } - - try { - return $this->createService($definition, $inlineServices, $isConstructorArgument, $id); - } finally { - if ($isConstructorArgument) { - unset($this->loading[$id]); - } - } - } - - /** - * Merges a ContainerBuilder with the current ContainerBuilder configuration. - * - * Service definitions overrides the current defined ones. - * - * But for parameters, they are overridden by the current ones. It allows - * the parameters passed to the container constructor to have precedence - * over the loaded ones. - * - * $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); - * $loader = new LoaderXXX($container); - * $loader->load('resource_name'); - * $container->register('foo', 'stdClass'); - * - * In the above example, even if the loaded resource defines a foo - * parameter, the value will still be 'bar' as defined in the ContainerBuilder - * constructor. - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function merge(self $container) - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Cannot merge on a compiled container.'); - } - - $this->addDefinitions($container->getDefinitions()); - $this->addAliases($container->getAliases()); - $this->getParameterBag()->add($container->getParameterBag()->all()); - - if ($this->trackResources) { - foreach ($container->getResources() as $resource) { - $this->addResource($resource); - } - } - - foreach ($this->extensions as $name => $extension) { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name)); - } - - if ($this->getParameterBag() instanceof EnvPlaceholderParameterBag && $container->getParameterBag() instanceof EnvPlaceholderParameterBag) { - $envPlaceholders = $container->getParameterBag()->getEnvPlaceholders(); - $this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag()); - } else { - $envPlaceholders = []; - } - - foreach ($container->envCounters as $env => $count) { - if (!$count && !isset($envPlaceholders[$env])) { - continue; - } - if (!isset($this->envCounters[$env])) { - $this->envCounters[$env] = $count; - } else { - $this->envCounters[$env] += $count; - } - } - - foreach ($container->getAutoconfiguredInstanceof() as $interface => $childDefinition) { - if (isset($this->autoconfiguredInstanceof[$interface])) { - throw new InvalidArgumentException(sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface)); - } - - $this->autoconfiguredInstanceof[$interface] = $childDefinition; - } - - foreach ($container->getAutoconfiguredAttributes() as $attribute => $configurator) { - if (isset($this->autoconfiguredAttributes[$attribute])) { - throw new InvalidArgumentException(sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same attribute.', $attribute)); - } - - $this->autoconfiguredAttributes[$attribute] = $configurator; - } - } - - /** - * Returns the configuration array for the given extension. - * - * @return array> - */ - public function getExtensionConfig(string $name) - { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - return $this->extensionConfigs[$name]; - } - - /** - * Prepends a config array to the configs of the given extension. - * - * @param array $config - */ - public function prependExtensionConfig(string $name, array $config) - { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - array_unshift($this->extensionConfigs[$name], $config); - } - - /** - * Compiles the container. - * - * This method passes the container to compiler - * passes whose job is to manipulate and optimize - * the container. - * - * The main compiler passes roughly do four things: - * - * * The extension configurations are merged; - * * Parameter values are resolved; - * * The parameter bag is frozen; - * * Extension loading is disabled. - * - * @param bool $resolveEnvPlaceholders Whether %env()% parameters should be resolved using the current - * env vars or be replaced by uniquely identifiable placeholders. - * Set to "true" when you want to use the current ContainerBuilder - * directly, keep to "false" when the container is dumped instead. - */ - public function compile(bool $resolveEnvPlaceholders = false) - { - $compiler = $this->getCompiler(); - - if ($this->trackResources) { - foreach ($compiler->getPassConfig()->getPasses() as $pass) { - $this->addObjectResource($pass); - } - } - $bag = $this->getParameterBag(); - - if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) { - $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000); - } - - $compiler->compile($this); - - foreach ($this->definitions as $id => $definition) { - if ($this->trackResources && $definition->isLazy()) { - $this->getReflectionClass($definition->getClass()); - } - } - - $this->extensionConfigs = []; - - if ($bag instanceof EnvPlaceholderParameterBag) { - if ($resolveEnvPlaceholders) { - $this->parameterBag = new ParameterBag($this->resolveEnvPlaceholders($bag->all(), true)); - } - - $this->envPlaceholders = $bag->getEnvPlaceholders(); - } - - parent::compile(); - - foreach ($this->definitions + $this->aliasDefinitions as $id => $definition) { - if (!$definition->isPublic() || $definition->isPrivate()) { - $this->removedIds[$id] = true; - } - } - } - - /** - * {@inheritdoc} - */ - public function getServiceIds() - { - return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()))); - } - - /** - * Gets removed service or alias ids. - * - * @return array - */ - public function getRemovedIds() - { - return $this->removedIds; - } - - /** - * Adds the service aliases. - * - * @param array $aliases - */ - public function addAliases(array $aliases) - { - foreach ($aliases as $alias => $id) { - $this->setAlias($alias, $id); - } - } - - /** - * Sets the service aliases. - * - * @param array $aliases - */ - public function setAliases(array $aliases) - { - $this->aliasDefinitions = []; - $this->addAliases($aliases); - } - - /** - * Sets an alias for an existing service. - * - * @param string $alias The alias to create - * @param string|Alias $id The service to alias - * - * @return Alias - * - * @throws InvalidArgumentException if the id is not a string or an Alias - * @throws InvalidArgumentException if the alias is for itself - */ - public function setAlias(string $alias, $id) - { - if ('' === $alias || '\\' === $alias[-1] || \strlen($alias) !== strcspn($alias, "\0\r\n'")) { - throw new InvalidArgumentException(sprintf('Invalid alias id: "%s".', $alias)); - } - - if (\is_string($id)) { - $id = new Alias($id); - } elseif (!$id instanceof Alias) { - throw new InvalidArgumentException('$id must be a string, or an Alias object.'); - } - - if ($alias === (string) $id) { - throw new InvalidArgumentException(sprintf('An alias cannot reference itself, got a circular reference on "%s".', $alias)); - } - - unset($this->definitions[$alias], $this->removedIds[$alias]); - - return $this->aliasDefinitions[$alias] = $id; - } - - public function removeAlias(string $alias) - { - if (isset($this->aliasDefinitions[$alias])) { - unset($this->aliasDefinitions[$alias]); - $this->removedIds[$alias] = true; - } - } - - /** - * @return bool - */ - public function hasAlias(string $id) - { - return isset($this->aliasDefinitions[$id]); - } - - /** - * @return array - */ - public function getAliases() - { - return $this->aliasDefinitions; - } - - /** - * @return Alias - * - * @throws InvalidArgumentException if the alias does not exist - */ - public function getAlias(string $id) - { - if (!isset($this->aliasDefinitions[$id])) { - throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id)); - } - - return $this->aliasDefinitions[$id]; - } - - /** - * Registers a service definition. - * - * This methods allows for simple registration of service definition - * with a fluid interface. - * - * @return Definition - */ - public function register(string $id, string $class = null) - { - return $this->setDefinition($id, new Definition($class)); - } - - /** - * Registers an autowired service definition. - * - * This method implements a shortcut for using setDefinition() with - * an autowired definition. - * - * @return Definition - */ - public function autowire(string $id, string $class = null) - { - return $this->setDefinition($id, (new Definition($class))->setAutowired(true)); - } - - /** - * Adds the service definitions. - * - * @param array $definitions - */ - public function addDefinitions(array $definitions) - { - foreach ($definitions as $id => $definition) { - $this->setDefinition($id, $definition); - } - } - - /** - * Sets the service definitions. - * - * @param array $definitions - */ - public function setDefinitions(array $definitions) - { - $this->definitions = []; - $this->addDefinitions($definitions); - } - - /** - * Gets all service definitions. - * - * @return array - */ - public function getDefinitions() - { - return $this->definitions; - } - - /** - * Sets a service definition. - * - * @return Definition - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function setDefinition(string $id, Definition $definition) - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Adding definition to a compiled container is not allowed.'); - } - - if ('' === $id || '\\' === $id[-1] || \strlen($id) !== strcspn($id, "\0\r\n'")) { - throw new InvalidArgumentException(sprintf('Invalid service id: "%s".', $id)); - } - - unset($this->aliasDefinitions[$id], $this->removedIds[$id]); - - return $this->definitions[$id] = $definition; - } - - /** - * Returns true if a service definition exists under the given identifier. - * - * @return bool - */ - public function hasDefinition(string $id) - { - return isset($this->definitions[$id]); - } - - /** - * Gets a service definition. - * - * @return Definition - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - public function getDefinition(string $id) - { - if (!isset($this->definitions[$id])) { - throw new ServiceNotFoundException($id); - } - - return $this->definitions[$id]; - } - - /** - * Gets a service definition by id or alias. - * - * The method "unaliases" recursively to return a Definition instance. - * - * @return Definition - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - public function findDefinition(string $id) - { - $seen = []; - while (isset($this->aliasDefinitions[$id])) { - $id = (string) $this->aliasDefinitions[$id]; - - if (isset($seen[$id])) { - $seen = array_values($seen); - $seen = \array_slice($seen, array_search($id, $seen)); - $seen[] = $id; - - throw new ServiceCircularReferenceException($id, $seen); - } - - $seen[$id] = $id; - } - - return $this->getDefinition($id); - } - - /** - * Creates a service for a service definition. - * - * @return mixed - * - * @throws RuntimeException When the factory definition is incomplete - * @throws RuntimeException When the service is a synthetic service - * @throws InvalidArgumentException When configure callable is not callable - */ - private function createService(Definition $definition, array &$inlineServices, bool $isConstructorArgument = false, string $id = null, bool $tryProxy = true) - { - if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) { - return $inlineServices[$h]; - } - - if ($definition instanceof ChildDefinition) { - throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id)); - } - - if ($definition->isSynthetic()) { - throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id)); - } - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - if ($tryProxy && $definition->isLazy() && !$tryProxy = !($proxy = $this->proxyInstantiator) || $proxy instanceof RealServiceInstantiator) { - $proxy = $proxy->instantiateProxy( - $this, - $definition, - $id, function () use ($definition, &$inlineServices, $id) { - return $this->createService($definition, $inlineServices, true, $id, false); - } - ); - $this->shareService($definition, $proxy, $id, $inlineServices); - - return $proxy; - } - - $parameterBag = $this->getParameterBag(); - - if (null !== $definition->getFile()) { - require_once $parameterBag->resolveValue($definition->getFile()); - } - - $arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())), $inlineServices, $isConstructorArgument); - - if (null !== $factory = $definition->getFactory()) { - if (\is_array($factory)) { - $factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]]; - } elseif (!\is_string($factory)) { - throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory.', $id)); - } - } - - if (null !== $id && $definition->isShared() && isset($this->services[$id]) && ($tryProxy || !$definition->isLazy())) { - return $this->services[$id]; - } - - if (null !== $factory) { - $service = $factory(...$arguments); - - if (!$definition->isDeprecated() && \is_array($factory) && \is_string($factory[0])) { - $r = new \ReflectionClass($factory[0]); - - if (0 < strpos($r->getDocComment(), "\n * @deprecated ")) { - trigger_deprecation('', '', 'The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name); - } - } - } else { - $r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass())); - - $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments)); - - if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) { - trigger_deprecation('', '', 'The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name); - } - } - - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (null === $lastWitherIndex && ($tryProxy || !$definition->isLazy())) { - // share only if proxying failed, or if not a proxy, and if no withers are found - $this->shareService($definition, $service, $id, $inlineServices); - } - - $properties = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())), $inlineServices); - foreach ($properties as $name => $value) { - $service->$name = $value; - } - - foreach ($definition->getMethodCalls() as $k => $call) { - $service = $this->callMethod($service, $call, $inlineServices); - - if ($lastWitherIndex === $k && ($tryProxy || !$definition->isLazy())) { - // share only if proxying failed, or if not a proxy, and this is the last wither - $this->shareService($definition, $service, $id, $inlineServices); - } - } - - if ($callable = $definition->getConfigurator()) { - if (\is_array($callable)) { - $callable[0] = $parameterBag->resolveValue($callable[0]); - - if ($callable[0] instanceof Reference) { - $callable[0] = $this->doGet((string) $callable[0], $callable[0]->getInvalidBehavior(), $inlineServices); - } elseif ($callable[0] instanceof Definition) { - $callable[0] = $this->createService($callable[0], $inlineServices); - } - } - - if (!\is_callable($callable)) { - throw new InvalidArgumentException(sprintf('The configure callable for class "%s" is not a callable.', get_debug_type($service))); - } - - $callable($service); - } - - return $service; - } - - /** - * Replaces service references by the real service instance and evaluates expressions. - * - * @param mixed $value - * - * @return mixed The same value with all service references replaced by - * the real service instances and all expressions evaluated - */ - public function resolveServices($value) - { - return $this->doResolveServices($value); - } - - private function doResolveServices($value, array &$inlineServices = [], bool $isConstructorArgument = false) - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = $this->doResolveServices($v, $inlineServices, $isConstructorArgument); - } - } elseif ($value instanceof ServiceClosureArgument) { - $reference = $value->getValues()[0]; - $value = function () use ($reference) { - return $this->resolveServices($reference); - }; - } elseif ($value instanceof IteratorArgument) { - $value = new RewindableGenerator(function () use ($value, &$inlineServices) { - foreach ($value->getValues() as $k => $v) { - foreach (self::getServiceConditionals($v) as $s) { - if (!$this->has($s)) { - continue 2; - } - } - foreach (self::getInitializedConditionals($v) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) { - continue 2; - } - } - - yield $k => $this->doResolveServices($v, $inlineServices); - } - }, function () use ($value): int { - $count = 0; - foreach ($value->getValues() as $v) { - foreach (self::getServiceConditionals($v) as $s) { - if (!$this->has($s)) { - continue 2; - } - } - foreach (self::getInitializedConditionals($v) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) { - continue 2; - } - } - - ++$count; - } - - return $count; - }); - } elseif ($value instanceof ServiceLocatorArgument) { - $refs = $types = []; - foreach ($value->getValues() as $k => $v) { - if ($v) { - $refs[$k] = [$v]; - $types[$k] = $v instanceof TypedReference ? $v->getType() : '?'; - } - } - $value = new ServiceLocator(\Closure::fromCallable([$this, 'resolveServices']), $refs, $types); - } elseif ($value instanceof Reference) { - $value = $this->doGet((string) $value, $value->getInvalidBehavior(), $inlineServices, $isConstructorArgument); - } elseif ($value instanceof Definition) { - $value = $this->createService($value, $inlineServices, $isConstructorArgument); - } elseif ($value instanceof Parameter) { - $value = $this->getParameter((string) $value); - } elseif ($value instanceof Expression) { - $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]); - } elseif ($value instanceof AbstractArgument) { - throw new RuntimeException($value->getTextWithContext()); - } - - return $value; - } - - /** - * Returns service ids for a given tag. - * - * Example: - * - * $container->register('foo')->addTag('my.tag', ['hello' => 'world']); - * - * $serviceIds = $container->findTaggedServiceIds('my.tag'); - * foreach ($serviceIds as $serviceId => $tags) { - * foreach ($tags as $tag) { - * echo $tag['hello']; - * } - * } - * - * @return array An array of tags with the tagged service as key, holding a list of attribute arrays - */ - public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false) - { - $this->usedTags[] = $name; - $tags = []; - foreach ($this->getDefinitions() as $id => $definition) { - if ($definition->hasTag($name)) { - if ($throwOnAbstract && $definition->isAbstract()) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name)); - } - $tags[$id] = $definition->getTag($name); - } - } - - return $tags; - } - - /** - * Returns all tags the defined services use. - * - * @return string[] - */ - public function findTags() - { - $tags = []; - foreach ($this->getDefinitions() as $id => $definition) { - $tags[] = array_keys($definition->getTags()); - } - - return array_unique(array_merge([], ...$tags)); - } - - /** - * Returns all tags not queried by findTaggedServiceIds. - * - * @return string[] - */ - public function findUnusedTags() - { - return array_values(array_diff($this->findTags(), $this->usedTags)); - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * @return ExpressionFunctionProviderInterface[] - */ - public function getExpressionLanguageProviders() - { - return $this->expressionLanguageProviders; - } - - /** - * Returns a ChildDefinition that will be used for autoconfiguring the interface/class. - * - * @return ChildDefinition - */ - public function registerForAutoconfiguration(string $interface) - { - if (!isset($this->autoconfiguredInstanceof[$interface])) { - $this->autoconfiguredInstanceof[$interface] = new ChildDefinition(''); - } - - return $this->autoconfiguredInstanceof[$interface]; - } - - /** - * Registers an attribute that will be used for autoconfiguring annotated classes. - * - * The third argument passed to the callable is the reflector of the - * class/method/property/parameter that the attribute targets. Using one or many of - * \ReflectionClass|\ReflectionMethod|\ReflectionProperty|\ReflectionParameter as a type-hint - * for this argument allows filtering which attributes should be passed to the callable. - * - * @template T - * - * @param class-string $attributeClass - * @param callable(ChildDefinition, T, \Reflector): void $configurator - */ - public function registerAttributeForAutoconfiguration(string $attributeClass, callable $configurator): void - { - $this->autoconfiguredAttributes[$attributeClass] = $configurator; - } - - /** - * Registers an autowiring alias that only binds to a specific argument name. - * - * The argument name is derived from $name if provided (from $id otherwise) - * using camel case: "foo.bar" or "foo_bar" creates an alias bound to - * "$fooBar"-named arguments with $type as type-hint. Such arguments will - * receive the service $id when autowiring is used. - */ - public function registerAliasForArgument(string $id, string $type, string $name = null): Alias - { - $name = (new Target($name ?? $id))->name; - - if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $name)) { - throw new InvalidArgumentException(sprintf('Invalid argument name "%s" for service "%s": the first character must be a letter.', $name, $id)); - } - - return $this->setAlias($type.' $'.$name, $id); - } - - /** - * Returns an array of ChildDefinition[] keyed by interface. - * - * @return array - */ - public function getAutoconfiguredInstanceof() - { - return $this->autoconfiguredInstanceof; - } - - /** - * @return array - */ - public function getAutoconfiguredAttributes(): array - { - return $this->autoconfiguredAttributes; - } - - /** - * Resolves env parameter placeholders in a string or an array. - * - * @param mixed $value The value to resolve - * @param string|true|null $format A sprintf() format returning the replacement for each env var name or - * null to resolve back to the original "%env(VAR)%" format or - * true to resolve to the actual values of the referenced env vars - * @param array &$usedEnvs Env vars found while resolving are added to this array - * - * @return mixed The value with env parameters resolved if a string or an array is passed - */ - public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null) - { - if (null === $format) { - $format = '%%env(%s)%%'; - } - - $bag = $this->getParameterBag(); - if (true === $format) { - $value = $bag->resolveValue($value); - } - - if ($value instanceof Definition) { - $value = (array) $value; - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); - } - - return $result; - } - - if (!\is_string($value) || 38 > \strlen($value) || !preg_match('/env[_(]/i', $value)) { - return $value; - } - $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; - - $completed = false; - foreach ($envPlaceholders as $env => $placeholders) { - foreach ($placeholders as $placeholder) { - if (false !== stripos($value, $placeholder)) { - if (true === $format) { - $resolved = $bag->escapeValue($this->getEnv($env)); - } else { - $resolved = sprintf($format, $env); - } - if ($placeholder === $value) { - $value = $resolved; - $completed = true; - } else { - if (!\is_string($resolved) && !is_numeric($resolved)) { - throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "env(%s)" of type "%s" inside string value "%s".', $env, get_debug_type($resolved), $this->resolveEnvPlaceholders($value))); - } - $value = str_ireplace($placeholder, $resolved, $value); - } - $usedEnvs[$env] = $env; - $this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1; - - if ($completed) { - break 2; - } - } - } - } - - return $value; - } - - /** - * Get statistics about env usage. - * - * @return int[] The number of time each env vars has been resolved - */ - public function getEnvCounters() - { - $bag = $this->getParameterBag(); - $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; - - foreach ($envPlaceholders as $env => $placeholders) { - if (!isset($this->envCounters[$env])) { - $this->envCounters[$env] = 0; - } - } - - return $this->envCounters; - } - - /** - * @final - */ - public function log(CompilerPassInterface $pass, string $message) - { - $this->getCompiler()->log($pass, $this->resolveEnvPlaceholders($message)); - } - - /** - * Checks whether a class is available and will remain available in the "no-dev" mode of Composer. - * - * When parent packages are provided and if any of them is in dev-only mode, - * the class will be considered available even if it is also in dev-only mode. - */ - final public static function willBeAvailable(string $package, string $class, array $parentPackages): bool - { - $skipDeprecation = 3 < \func_num_args() && func_get_arg(3); - $hasRuntimeApi = class_exists(InstalledVersions::class); - - if (!$hasRuntimeApi && !$skipDeprecation) { - trigger_deprecation('symfony/dependency-injection', '5.4', 'Calling "%s" when dependencies have been installed with Composer 1 is deprecated. Consider upgrading to Composer 2.', __METHOD__); - } - - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - return false; - } - - if (!$hasRuntimeApi || !InstalledVersions::isInstalled($package) || InstalledVersions::isInstalled($package, false)) { - return true; - } - - // the package is installed but in dev-mode only, check if this applies to one of the parent packages too - - $rootPackage = InstalledVersions::getRootPackage()['name'] ?? ''; - - if ('symfony/symfony' === $rootPackage) { - return true; - } - - foreach ($parentPackages as $parentPackage) { - if ($rootPackage === $parentPackage || (InstalledVersions::isInstalled($parentPackage) && !InstalledVersions::isInstalled($parentPackage, false))) { - return true; - } - } - - return false; - } - - /** - * Gets removed binding ids. - * - * @return array - * - * @internal - */ - public function getRemovedBindingIds(): array - { - return $this->removedBindingIds; - } - - /** - * Removes bindings for a service. - * - * @internal - */ - public function removeBindings(string $id) - { - if ($this->hasDefinition($id)) { - foreach ($this->getDefinition($id)->getBindings() as $key => $binding) { - [, $bindingId] = $binding->getValues(); - $this->removedBindingIds[(int) $bindingId] = true; - } - } - } - - /** - * Returns the Service Conditionals. - * - * @param mixed $value An array of conditionals to return - * - * @return string[] - * - * @internal - */ - public static function getServiceConditionals($value): array - { - $services = []; - - if (\is_array($value)) { - foreach ($value as $v) { - $services = array_unique(array_merge($services, self::getServiceConditionals($v))); - } - } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) { - $services[] = (string) $value; - } - - return $services; - } - - /** - * Returns the initialized conditionals. - * - * @param mixed $value An array of conditionals to return - * - * @return string[] - * - * @internal - */ - public static function getInitializedConditionals($value): array - { - $services = []; - - if (\is_array($value)) { - foreach ($value as $v) { - $services = array_unique(array_merge($services, self::getInitializedConditionals($v))); - } - } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) { - $services[] = (string) $value; - } - - return $services; - } - - /** - * Computes a reasonably unique hash of a value. - * - * @param mixed $value A serializable value - * - * @return string - */ - public static function hash($value) - { - $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7); - - return str_replace(['/', '+'], ['.', '_'], $hash); - } - - /** - * {@inheritdoc} - */ - protected function getEnv(string $name) - { - $value = parent::getEnv($name); - $bag = $this->getParameterBag(); - - if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) { - return $value; - } - - $envPlaceholders = $bag->getEnvPlaceholders(); - if (isset($envPlaceholders[$name][$value])) { - $bag = new ParameterBag($bag->all()); - - return $bag->unescapeValue($bag->get("env($name)")); - } - foreach ($envPlaceholders as $env => $placeholders) { - if (isset($placeholders[$value])) { - return $this->getEnv($env); - } - } - - $this->resolving["env($name)"] = true; - try { - return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), true)); - } finally { - unset($this->resolving["env($name)"]); - } - } - - private function callMethod(object $service, array $call, array &$inlineServices) - { - foreach (self::getServiceConditionals($call[1]) as $s) { - if (!$this->has($s)) { - return $service; - } - } - foreach (self::getInitializedConditionals($call[1]) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) { - return $service; - } - } - - $result = $service->{$call[0]}(...$this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices)); - - return empty($call[2]) ? $service : $result; - } - - /** - * Shares a given service in the container. - * - * @param mixed $service - */ - private function shareService(Definition $definition, $service, ?string $id, array &$inlineServices) - { - $inlineServices[$id ?? spl_object_hash($definition)] = $service; - - if (null !== $id && $definition->isShared()) { - $this->services[$id] = $service; - unset($this->loading[$id]); - } - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - if (!class_exists(\Symfony\Component\ExpressionLanguage\ExpressionLanguage::class)) { - throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); - } - - return $this->expressionLanguage; - } - - private function inVendors(string $path): bool - { - if (null === $this->vendors) { - $this->vendors = (new ComposerResource())->getVendors(); - } - $path = realpath($path) ?: $path; - - foreach ($this->vendors as $vendor) { - if (str_starts_with($path, $vendor) && false !== strpbrk(substr($path, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) { - $this->addResource(new FileResource($vendor.'/composer/installed.json')); - - return true; - } - } - - return false; - } -} diff --git a/vendor/symfony/dependency-injection/ContainerInterface.php b/vendor/symfony/dependency-injection/ContainerInterface.php deleted file mode 100644 index 3a44b99..0000000 --- a/vendor/symfony/dependency-injection/ContainerInterface.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -/** - * ContainerInterface is the interface implemented by service container classes. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -interface ContainerInterface extends PsrContainerInterface -{ - public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0; - public const EXCEPTION_ON_INVALID_REFERENCE = 1; - public const NULL_ON_INVALID_REFERENCE = 2; - public const IGNORE_ON_INVALID_REFERENCE = 3; - public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4; - - /** - * Sets a service. - */ - public function set(string $id, ?object $service); - - /** - * Gets a service. - * - * @param string $id The service identifier - * @param int $invalidBehavior The behavior when the service does not exist - * - * @return object|null - * - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); - - /** - * @return bool - */ - public function has(string $id); - - /** - * Check for whether or not a service has been initialized. - * - * @return bool - */ - public function initialized(string $id); - - /** - * @return array|bool|string|int|float|\UnitEnum|null - * - * @throws InvalidArgumentException if the parameter is not defined - */ - public function getParameter(string $name); - - /** - * @return bool - */ - public function hasParameter(string $name); - - /** - * Sets a parameter. - * - * @param string $name The parameter name - * @param array|bool|string|int|float|\UnitEnum|null $value The parameter value - */ - public function setParameter(string $name, $value); -} diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php deleted file mode 100644 index 7fc6752..0000000 --- a/vendor/symfony/dependency-injection/Definition.php +++ /dev/null @@ -1,922 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; - -/** - * Definition represents a service definition. - * - * @author Fabien Potencier - */ -class Definition -{ - private const DEFAULT_DEPRECATION_TEMPLATE = 'The "%service_id%" service is deprecated. You should stop using it, as it will be removed in the future.'; - - private $class; - private $file; - private $factory; - private $shared = true; - private $deprecation = []; - private $properties = []; - private $calls = []; - private $instanceof = []; - private $autoconfigured = false; - private $configurator; - private $tags = []; - private $public = false; - private $synthetic = false; - private $abstract = false; - private $lazy = false; - private $decoratedService; - private $autowired = false; - private $changes = []; - private $bindings = []; - private $errors = []; - - protected $arguments = []; - - /** - * @internal - * - * Used to store the name of the inner id when using service decoration together with autowiring - */ - public $innerServiceId; - - /** - * @internal - * - * Used to store the behavior to follow when using service decoration and the decorated service is invalid - */ - public $decorationOnInvalid; - - public function __construct(string $class = null, array $arguments = []) - { - if (null !== $class) { - $this->setClass($class); - } - $this->arguments = $arguments; - } - - /** - * Returns all changes tracked for the Definition object. - * - * @return array - */ - public function getChanges() - { - return $this->changes; - } - - /** - * Sets the tracked changes for the Definition object. - * - * @param array $changes An array of changes for this Definition - * - * @return $this - */ - public function setChanges(array $changes) - { - $this->changes = $changes; - - return $this; - } - - /** - * Sets a factory. - * - * @param string|array|Reference|null $factory A PHP function, reference or an array containing a class/Reference and a method to call - * - * @return $this - */ - public function setFactory($factory) - { - $this->changes['factory'] = true; - - if (\is_string($factory) && str_contains($factory, '::')) { - $factory = explode('::', $factory, 2); - } elseif ($factory instanceof Reference) { - $factory = [$factory, '__invoke']; - } - - $this->factory = $factory; - - return $this; - } - - /** - * Gets the factory. - * - * @return string|array|null The PHP function or an array containing a class/Reference and a method to call - */ - public function getFactory() - { - return $this->factory; - } - - /** - * Sets the service that this service is decorating. - * - * @param string|null $id The decorated service id, use null to remove decoration - * @param string|null $renamedId The new decorated service id - * - * @return $this - * - * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals - */ - public function setDecoratedService(?string $id, string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) - { - if ($renamedId && $id === $renamedId) { - throw new InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id)); - } - - $this->changes['decorated_service'] = true; - - if (null === $id) { - $this->decoratedService = null; - } else { - $this->decoratedService = [$id, $renamedId, $priority]; - - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { - $this->decoratedService[] = $invalidBehavior; - } - } - - return $this; - } - - /** - * Gets the service that this service is decorating. - * - * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated - */ - public function getDecoratedService() - { - return $this->decoratedService; - } - - /** - * Sets the service class. - * - * @return $this - */ - public function setClass(?string $class) - { - $this->changes['class'] = true; - - $this->class = $class; - - return $this; - } - - /** - * Gets the service class. - * - * @return string|null - */ - public function getClass() - { - return $this->class; - } - - /** - * Sets the arguments to pass to the service constructor/factory method. - * - * @return $this - */ - public function setArguments(array $arguments) - { - $this->arguments = $arguments; - - return $this; - } - - /** - * Sets the properties to define when creating the service. - * - * @return $this - */ - public function setProperties(array $properties) - { - $this->properties = $properties; - - return $this; - } - - /** - * Gets the properties to define when creating the service. - * - * @return array - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Sets a specific property. - * - * @param mixed $value - * - * @return $this - */ - public function setProperty(string $name, $value) - { - $this->properties[$name] = $value; - - return $this; - } - - /** - * Adds an argument to pass to the service constructor/factory method. - * - * @param mixed $argument An argument - * - * @return $this - */ - public function addArgument($argument) - { - $this->arguments[] = $argument; - - return $this; - } - - /** - * Replaces a specific argument. - * - * @param int|string $index - * @param mixed $argument - * - * @return $this - * - * @throws OutOfBoundsException When the replaced argument does not exist - */ - public function replaceArgument($index, $argument) - { - if (0 === \count($this->arguments)) { - throw new OutOfBoundsException(sprintf('Cannot replace arguments for class "%s" if none have been configured yet.', $this->class)); - } - - if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) { - throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d] of the arguments of class "%s".', $index, \count($this->arguments) - 1, $this->class)); - } - - if (!\array_key_exists($index, $this->arguments)) { - throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist in class "%s".', $index, $this->class)); - } - - $this->arguments[$index] = $argument; - - return $this; - } - - /** - * Sets a specific argument. - * - * @param int|string $key - * @param mixed $value - * - * @return $this - */ - public function setArgument($key, $value) - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Gets the arguments to pass to the service constructor/factory method. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Gets an argument to pass to the service constructor/factory method. - * - * @param int|string $index - * - * @return mixed - * - * @throws OutOfBoundsException When the argument does not exist - */ - public function getArgument($index) - { - if (!\array_key_exists($index, $this->arguments)) { - throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist in class "%s".', $index, $this->class)); - } - - return $this->arguments[$index]; - } - - /** - * Sets the methods to call after service initialization. - * - * @return $this - */ - public function setMethodCalls(array $calls = []) - { - $this->calls = []; - foreach ($calls as $call) { - $this->addMethodCall($call[0], $call[1], $call[2] ?? false); - } - - return $this; - } - - /** - * Adds a method to call after service initialization. - * - * @param string $method The method name to call - * @param array $arguments An array of arguments to pass to the method call - * @param bool $returnsClone Whether the call returns the service instance or not - * - * @return $this - * - * @throws InvalidArgumentException on empty $method param - */ - public function addMethodCall(string $method, array $arguments = [], bool $returnsClone = false) - { - if (empty($method)) { - throw new InvalidArgumentException('Method name cannot be empty.'); - } - $this->calls[] = $returnsClone ? [$method, $arguments, true] : [$method, $arguments]; - - return $this; - } - - /** - * Removes a method to call after service initialization. - * - * @return $this - */ - public function removeMethodCall(string $method) - { - foreach ($this->calls as $i => $call) { - if ($call[0] === $method) { - unset($this->calls[$i]); - } - } - - return $this; - } - - /** - * Check if the current definition has a given method to call after service initialization. - * - * @return bool - */ - public function hasMethodCall(string $method) - { - foreach ($this->calls as $call) { - if ($call[0] === $method) { - return true; - } - } - - return false; - } - - /** - * Gets the methods to call after service initialization. - * - * @return array - */ - public function getMethodCalls() - { - return $this->calls; - } - - /** - * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. - * - * @param ChildDefinition[] $instanceof - * - * @return $this - */ - public function setInstanceofConditionals(array $instanceof) - { - $this->instanceof = $instanceof; - - return $this; - } - - /** - * Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. - * - * @return ChildDefinition[] - */ - public function getInstanceofConditionals() - { - return $this->instanceof; - } - - /** - * Sets whether or not instanceof conditionals should be prepended with a global set. - * - * @return $this - */ - public function setAutoconfigured(bool $autoconfigured) - { - $this->changes['autoconfigured'] = true; - - $this->autoconfigured = $autoconfigured; - - return $this; - } - - /** - * @return bool - */ - public function isAutoconfigured() - { - return $this->autoconfigured; - } - - /** - * Sets tags for this definition. - * - * @return $this - */ - public function setTags(array $tags) - { - $this->tags = $tags; - - return $this; - } - - /** - * Returns all tags. - * - * @return array - */ - public function getTags() - { - return $this->tags; - } - - /** - * Gets a tag by name. - * - * @return array - */ - public function getTag(string $name) - { - return $this->tags[$name] ?? []; - } - - /** - * Adds a tag for this definition. - * - * @return $this - */ - public function addTag(string $name, array $attributes = []) - { - $this->tags[$name][] = $attributes; - - return $this; - } - - /** - * Whether this definition has a tag with the given name. - * - * @return bool - */ - public function hasTag(string $name) - { - return isset($this->tags[$name]); - } - - /** - * Clears all tags for a given name. - * - * @return $this - */ - public function clearTag(string $name) - { - unset($this->tags[$name]); - - return $this; - } - - /** - * Clears the tags for this definition. - * - * @return $this - */ - public function clearTags() - { - $this->tags = []; - - return $this; - } - - /** - * Sets a file to require before creating the service. - * - * @return $this - */ - public function setFile(?string $file) - { - $this->changes['file'] = true; - - $this->file = $file; - - return $this; - } - - /** - * Gets the file to require before creating the service. - * - * @return string|null - */ - public function getFile() - { - return $this->file; - } - - /** - * Sets if the service must be shared or not. - * - * @return $this - */ - public function setShared(bool $shared) - { - $this->changes['shared'] = true; - - $this->shared = $shared; - - return $this; - } - - /** - * Whether this service is shared. - * - * @return bool - */ - public function isShared() - { - return $this->shared; - } - - /** - * Sets the visibility of this service. - * - * @return $this - */ - public function setPublic(bool $boolean) - { - $this->changes['public'] = true; - - $this->public = $boolean; - - return $this; - } - - /** - * Whether this service is public facing. - * - * @return bool - */ - public function isPublic() - { - return $this->public; - } - - /** - * Sets if this service is private. - * - * @return $this - * - * @deprecated since Symfony 5.2, use setPublic() instead - */ - public function setPrivate(bool $boolean) - { - trigger_deprecation('symfony/dependency-injection', '5.2', 'The "%s()" method is deprecated, use "setPublic()" instead.', __METHOD__); - - return $this->setPublic(!$boolean); - } - - /** - * Whether this service is private. - * - * @return bool - */ - public function isPrivate() - { - return !$this->public; - } - - /** - * Sets the lazy flag of this service. - * - * @return $this - */ - public function setLazy(bool $lazy) - { - $this->changes['lazy'] = true; - - $this->lazy = $lazy; - - return $this; - } - - /** - * Whether this service is lazy. - * - * @return bool - */ - public function isLazy() - { - return $this->lazy; - } - - /** - * Sets whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - * - * @return $this - */ - public function setSynthetic(bool $boolean) - { - $this->synthetic = $boolean; - - if (!isset($this->changes['public'])) { - $this->setPublic(true); - } - - return $this; - } - - /** - * Whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - * - * @return bool - */ - public function isSynthetic() - { - return $this->synthetic; - } - - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - * - * @return $this - */ - public function setAbstract(bool $boolean) - { - $this->abstract = $boolean; - - return $this; - } - - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - * - * @return bool - */ - public function isAbstract() - { - return $this->abstract; - } - - /** - * Whether this definition is deprecated, that means it should not be called - * anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(/* string $package, string $version, string $message */) - { - $args = \func_get_args(); - - if (\func_num_args() < 3) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__); - - $status = $args[0] ?? true; - - if (!$status) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Passing a null message to un-deprecate a node is deprecated.'); - } - - $message = (string) ($args[1] ?? null); - $package = $version = ''; - } else { - $status = true; - $package = (string) $args[0]; - $version = (string) $args[1]; - $message = (string) $args[2]; - } - - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%service_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.'); - } - } - - $this->changes['deprecated'] = true; - $this->deprecation = $status ? ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE] : []; - - return $this; - } - - /** - * Whether this definition is deprecated, that means it should not be called - * anymore. - * - * @return bool - */ - public function isDeprecated() - { - return (bool) $this->deprecation; - } - - /** - * Message to use if this definition is deprecated. - * - * @deprecated since Symfony 5.1, use "getDeprecation()" instead. - * - * @param string $id Service id relying on this definition - * - * @return string - */ - public function getDeprecationMessage(string $id) - { - trigger_deprecation('symfony/dependency-injection', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__); - - return $this->getDeprecation($id)['message']; - } - - /** - * @param string $id Service id relying on this definition - */ - public function getDeprecation(string $id): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%service_id%', $id, $this->deprecation['message']), - ]; - } - - /** - * Sets a configurator to call after the service is fully initialized. - * - * @param string|array|Reference|null $configurator A PHP function, reference or an array containing a class/Reference and a method to call - * - * @return $this - */ - public function setConfigurator($configurator) - { - $this->changes['configurator'] = true; - - if (\is_string($configurator) && str_contains($configurator, '::')) { - $configurator = explode('::', $configurator, 2); - } elseif ($configurator instanceof Reference) { - $configurator = [$configurator, '__invoke']; - } - - $this->configurator = $configurator; - - return $this; - } - - /** - * Gets the configurator to call after the service is fully initialized. - * - * @return string|array|null - */ - public function getConfigurator() - { - return $this->configurator; - } - - /** - * Is the definition autowired? - * - * @return bool - */ - public function isAutowired() - { - return $this->autowired; - } - - /** - * Enables/disables autowiring. - * - * @return $this - */ - public function setAutowired(bool $autowired) - { - $this->changes['autowired'] = true; - - $this->autowired = $autowired; - - return $this; - } - - /** - * Gets bindings. - * - * @return BoundArgument[] - */ - public function getBindings() - { - return $this->bindings; - } - - /** - * Sets bindings. - * - * Bindings map $named or FQCN arguments to values that should be - * injected in the matching parameters (of the constructor, of methods - * called and of controller actions). - * - * @return $this - */ - public function setBindings(array $bindings) - { - foreach ($bindings as $key => $binding) { - if (0 < strpos($key, '$') && $key !== $k = preg_replace('/[ \t]*\$/', ' $', $key)) { - unset($bindings[$key]); - $bindings[$key = $k] = $binding; - } - if (!$binding instanceof BoundArgument) { - $bindings[$key] = new BoundArgument($binding); - } - } - - $this->bindings = $bindings; - - return $this; - } - - /** - * Add an error that occurred when building this Definition. - * - * @param string|\Closure|self $error - * - * @return $this - */ - public function addError($error) - { - if ($error instanceof self) { - $this->errors = array_merge($this->errors, $error->errors); - } else { - $this->errors[] = $error; - } - - return $this; - } - - /** - * Returns any errors that occurred while building this Definition. - * - * @return array - */ - public function getErrors() - { - foreach ($this->errors as $i => $error) { - if ($error instanceof \Closure) { - $this->errors[$i] = (string) $error(); - } elseif (!\is_string($error)) { - $this->errors[$i] = (string) $error; - } - } - - return $this->errors; - } - - public function hasErrors(): bool - { - return (bool) $this->errors; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/Dumper.php b/vendor/symfony/dependency-injection/Dumper/Dumper.php deleted file mode 100644 index e7407b0..0000000 --- a/vendor/symfony/dependency-injection/Dumper/Dumper.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Dumper is the abstract class for all built-in dumpers. - * - * @author Fabien Potencier - */ -abstract class Dumper implements DumperInterface -{ - protected $container; - - public function __construct(ContainerBuilder $container) - { - $this->container = $container; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/DumperInterface.php b/vendor/symfony/dependency-injection/Dumper/DumperInterface.php deleted file mode 100644 index a00f30b..0000000 --- a/vendor/symfony/dependency-injection/Dumper/DumperInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -/** - * DumperInterface is the interface implemented by service container dumper classes. - * - * @author Fabien Potencier - */ -interface DumperInterface -{ - /** - * Dumps the service container. - * - * @return string|array - */ - public function dump(array $options = []); -} diff --git a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php deleted file mode 100644 index e8ca838..0000000 --- a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php +++ /dev/null @@ -1,251 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; - -/** - * GraphvizDumper dumps a service container as a graphviz file. - * - * You can convert the generated dot file with the dot utility (http://www.graphviz.org/): - * - * dot -Tpng container.dot > foo.png - * - * @author Fabien Potencier - */ -class GraphvizDumper extends Dumper -{ - private $nodes; - private $edges; - // All values should be strings - private $options = [ - 'graph' => ['ratio' => 'compress'], - 'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'], - 'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'], - 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'], - 'node.definition' => ['fillcolor' => '#eeeeee'], - 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'], - ]; - - /** - * Dumps the service container as a graphviz graph. - * - * Available options: - * - * * graph: The default options for the whole graph - * * node: The default options for nodes - * * edge: The default options for edges - * * node.instance: The default options for services that are defined directly by object instances - * * node.definition: The default options for services that are defined via service definition instances - * * node.missing: The default options for missing services - * - * @return string - */ - public function dump(array $options = []) - { - foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) { - if (isset($options[$key])) { - $this->options[$key] = array_merge($this->options[$key], $options[$key]); - } - } - - $this->nodes = $this->findNodes(); - - $this->edges = []; - foreach ($this->container->getDefinitions() as $id => $definition) { - $this->edges[$id] = array_merge( - $this->findEdges($id, $definition->getArguments(), true, ''), - $this->findEdges($id, $definition->getProperties(), false, '') - ); - - foreach ($definition->getMethodCalls() as $call) { - $this->edges[$id] = array_merge( - $this->edges[$id], - $this->findEdges($id, $call[1], false, $call[0].'()') - ); - } - } - - return $this->container->resolveEnvPlaceholders($this->startDot().$this->addNodes().$this->addEdges().$this->endDot(), '__ENV_%s__'); - } - - private function addNodes(): string - { - $code = ''; - foreach ($this->nodes as $id => $node) { - $aliases = $this->getAliases($id); - - $code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes'])); - } - - return $code; - } - - private function addEdges(): string - { - $code = ''; - foreach ($this->edges as $id => $edges) { - foreach ($edges as $edge) { - $code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : ''); - } - } - - return $code; - } - - /** - * Finds all edges belonging to a specific service id. - */ - private function findEdges(string $id, array $arguments, bool $required, string $name, bool $lazy = false): array - { - $edges = []; - foreach ($arguments as $argument) { - if ($argument instanceof Parameter) { - $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; - } elseif (\is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) { - $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null; - } - - if ($argument instanceof Reference) { - $lazyEdge = $lazy; - - if (!$this->container->has((string) $argument)) { - $this->nodes[(string) $argument] = ['name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']]; - } elseif ('service_container' !== (string) $argument) { - $lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy(); - } - - $edges[] = [['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge]]; - } elseif ($argument instanceof ArgumentInterface) { - $edges[] = $this->findEdges($id, $argument->getValues(), $required, $name, true); - } elseif ($argument instanceof Definition) { - $edges[] = $this->findEdges($id, $argument->getArguments(), $required, ''); - $edges[] = $this->findEdges($id, $argument->getProperties(), false, ''); - - foreach ($argument->getMethodCalls() as $call) { - $edges[] = $this->findEdges($id, $call[1], false, $call[0].'()'); - } - } elseif (\is_array($argument)) { - $edges[] = $this->findEdges($id, $argument, $required, $name, $lazy); - } - } - - return array_merge([], ...$edges); - } - - private function findNodes(): array - { - $nodes = []; - - $container = $this->cloneContainer(); - - foreach ($container->getDefinitions() as $id => $definition) { - $class = $definition->getClass(); - - if ('\\' === substr($class, 0, 1)) { - $class = substr($class, 1); - } - - try { - $class = $this->container->getParameterBag()->resolveValue($class); - } catch (ParameterNotFoundException $e) { - } - - $nodes[$id] = ['class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])]; - $container->setDefinition($id, new Definition('stdClass')); - } - - foreach ($container->getServiceIds() as $id) { - if (\array_key_exists($id, $container->getAliases())) { - continue; - } - - if (!$container->hasDefinition($id)) { - $nodes[$id] = ['class' => str_replace('\\', '\\\\', \get_class($container->get($id))), 'attributes' => $this->options['node.instance']]; - } - } - - return $nodes; - } - - private function cloneContainer(): ContainerBuilder - { - $parameterBag = new ParameterBag($this->container->getParameterBag()->all()); - - $container = new ContainerBuilder($parameterBag); - $container->setDefinitions($this->container->getDefinitions()); - $container->setAliases($this->container->getAliases()); - $container->setResources($this->container->getResources()); - foreach ($this->container->getExtensions() as $extension) { - $container->registerExtension($extension); - } - - return $container; - } - - private function startDot(): string - { - return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", - $this->addOptions($this->options['graph']), - $this->addOptions($this->options['node']), - $this->addOptions($this->options['edge']) - ); - } - - private function endDot(): string - { - return "}\n"; - } - - private function addAttributes(array $attributes): string - { - $code = []; - foreach ($attributes as $k => $v) { - $code[] = sprintf('%s="%s"', $k, $v); - } - - return $code ? ', '.implode(', ', $code) : ''; - } - - private function addOptions(array $options): string - { - $code = []; - foreach ($options as $k => $v) { - $code[] = sprintf('%s="%s"', $k, $v); - } - - return implode(' ', $code); - } - - private function dotize(string $id): string - { - return preg_replace('/\W/i', '_', $id); - } - - private function getAliases(string $id): array - { - $aliases = []; - foreach ($this->container->getAliases() as $alias => $origin) { - if ($id == $origin) { - $aliases[] = $alias; - } - } - - return $aliases; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php deleted file mode 100644 index 3043669..0000000 --- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php +++ /dev/null @@ -1,2261 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; -use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass; -use Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface as ProxyDumper; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper; -use Symfony\Component\DependencyInjection\Loader\FileLoader; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\DependencyInjection\Variable; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\HttpKernel\Kernel; - -/** - * PhpDumper dumps a service container as a PHP class. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class PhpDumper extends Dumper -{ - /** - * Characters that might appear in the generated variable name as first character. - */ - public const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz'; - - /** - * Characters that might appear in the generated variable name as any but the first character. - */ - public const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_'; - - /** - * @var \SplObjectStorage|null - */ - private $definitionVariables; - private $referenceVariables; - private $variableCount; - private $inlinedDefinitions; - private $serviceCalls; - private $reservedVariables = ['instance', 'class', 'this', 'container']; - private $expressionLanguage; - private $targetDirRegex; - private $targetDirMaxMatches; - private $docStar; - private $serviceIdToMethodNameMap; - private $usedMethodNames; - private $namespace; - private $asFiles; - private $hotPathTag; - private $preloadTags; - private $inlineFactories; - private $inlineRequires; - private $inlinedRequires = []; - private $circularReferences = []; - private $singleUsePrivateIds = []; - private $preload = []; - private $addThrow = false; - private $addGetService = false; - private $locatedIds = []; - private $serviceLocatorTag; - private $exportedVariables = []; - private $baseClass; - - /** - * @var ProxyDumper - */ - private $proxyDumper; - - /** - * {@inheritdoc} - */ - public function __construct(ContainerBuilder $container) - { - if (!$container->isCompiled()) { - throw new LogicException('Cannot dump an uncompiled container.'); - } - - parent::__construct($container); - } - - /** - * Sets the dumper to be used when dumping proxies in the generated container. - */ - public function setProxyDumper(ProxyDumper $proxyDumper) - { - $this->proxyDumper = $proxyDumper; - } - - /** - * Dumps the service container as a PHP class. - * - * Available options: - * - * * class: The class name - * * base_class: The base class name - * * namespace: The class namespace - * * as_files: To split the container in several files - * - * @return string|array A PHP class representing the service container or an array of PHP files if the "as_files" option is set - * - * @throws EnvParameterException When an env var exists but has not been dumped - */ - public function dump(array $options = []) - { - $this->locatedIds = []; - $this->targetDirRegex = null; - $this->inlinedRequires = []; - $this->exportedVariables = []; - $options = array_merge([ - 'class' => 'ProjectServiceContainer', - 'base_class' => 'Container', - 'namespace' => '', - 'as_files' => false, - 'debug' => true, - 'hot_path_tag' => 'container.hot_path', - 'preload_tags' => ['container.preload', 'container.no_preload'], - 'inline_factories_parameter' => 'container.dumper.inline_factories', - 'inline_class_loader_parameter' => 'container.dumper.inline_class_loader', - 'preload_classes' => [], - 'service_locator_tag' => 'container.service_locator', - 'build_time' => time(), - ], $options); - - $this->addThrow = $this->addGetService = false; - $this->namespace = $options['namespace']; - $this->asFiles = $options['as_files']; - $this->hotPathTag = $options['hot_path_tag']; - $this->preloadTags = $options['preload_tags']; - $this->inlineFactories = $this->asFiles && $options['inline_factories_parameter'] && $this->container->hasParameter($options['inline_factories_parameter']) && $this->container->getParameter($options['inline_factories_parameter']); - $this->inlineRequires = $options['inline_class_loader_parameter'] && ($this->container->hasParameter($options['inline_class_loader_parameter']) ? $this->container->getParameter($options['inline_class_loader_parameter']) : (\PHP_VERSION_ID < 70400 || $options['debug'])); - $this->serviceLocatorTag = $options['service_locator_tag']; - - if (!str_starts_with($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) { - $baseClass = sprintf('%s\%s', $options['namespace'] ? '\\'.$options['namespace'] : '', $baseClass); - $this->baseClass = $baseClass; - } elseif ('Container' === $baseClass) { - $this->baseClass = Container::class; - } else { - $this->baseClass = $baseClass; - } - - $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass); - - if ($this->getProxyDumper() instanceof NullDumper) { - (new AnalyzeServiceReferencesPass(true, false))->process($this->container); - try { - (new CheckCircularReferencesPass())->process($this->container); - } catch (ServiceCircularReferenceException $e) { - $path = $e->getPath(); - end($path); - $path[key($path)] .= '". Try running "composer require symfony/proxy-manager-bridge'; - - throw new ServiceCircularReferenceException($e->getServiceId(), $path); - } - } - - $this->analyzeReferences(); - $this->docStar = $options['debug'] ? '*' : ''; - - if (!empty($options['file']) && is_dir($dir = \dirname($options['file']))) { - // Build a regexp where the first root dirs are mandatory, - // but every other sub-dir is optional up to the full path in $dir - // Mandate at least 1 root dir and not more than 5 optional dirs. - - $dir = explode(\DIRECTORY_SEPARATOR, realpath($dir)); - $i = \count($dir); - - if (2 + (int) ('\\' === \DIRECTORY_SEPARATOR) <= $i) { - $regex = ''; - $lastOptionalDir = $i > 8 ? $i - 5 : (2 + (int) ('\\' === \DIRECTORY_SEPARATOR)); - $this->targetDirMaxMatches = $i - $lastOptionalDir; - - while (--$i >= $lastOptionalDir) { - $regex = sprintf('(%s%s)?', preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#'), $regex); - } - - do { - $regex = preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#').$regex; - } while (0 < --$i); - - $this->targetDirRegex = '#(^|file://|[:;, \|\r\n])'.preg_quote($dir[0], '#').$regex.'#'; - } - } - - $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null; - - if ($options['preload_classes']) { - $this->preload = array_combine($options['preload_classes'], $options['preload_classes']); - } - - $code = - $this->startClass($options['class'], $baseClass, $this->inlineFactories && $proxyClasses). - $this->addServices($services). - $this->addDeprecatedAliases(). - $this->addDefaultParametersMethod() - ; - - $proxyClasses = $proxyClasses ?? $this->generateProxyClasses(); - - if ($this->addGetService) { - $code = preg_replace( - "/(\r?\n\r?\n public function __construct.+?\\{\r?\n)/s", - "\n protected \$getService;$1 \$this->getService = \\Closure::fromCallable([\$this, 'getService']);\n", - $code, - 1 - ); - } - - if ($this->asFiles) { - $fileTemplate = <<docStar} - * @internal This class has been auto-generated by the Symfony Dependency Injection Component. - */ -class %s extends {$options['class']} -{%s} - -EOF; - $files = []; - $preloadedFiles = []; - $ids = $this->container->getRemovedIds(); - foreach ($this->container->getDefinitions() as $id => $definition) { - if (!$definition->isPublic()) { - $ids[$id] = true; - } - } - if ($ids = array_keys($ids)) { - sort($ids); - $c = "doExport($id)." => true,\n"; - } - $files['removed-ids.php'] = $c."];\n"; - } - - if (!$this->inlineFactories) { - foreach ($this->generateServiceFiles($services) as $file => [$c, $preload]) { - $files[$file] = sprintf($fileTemplate, substr($file, 0, -4), $c); - - if ($preload) { - $preloadedFiles[$file] = $file; - } - } - foreach ($proxyClasses as $file => $c) { - $files[$file] = "endClass(); - - if ($this->inlineFactories && $proxyClasses) { - $files['proxy-classes.php'] = " $c) { - $code["Container{$hash}/{$file}"] = substr_replace($c, "namespace ? "\nnamespace {$this->namespace};\n" : ''; - $time = $options['build_time']; - $id = hash('crc32', $hash.$time); - $this->asFiles = false; - - if ($this->preload && null !== $autoloadFile = $this->getAutoloadFile()) { - $autoloadFile = trim($this->export($autoloadFile), '()\\'); - - $preloadedFiles = array_reverse($preloadedFiles); - if ('' !== $preloadedFiles = implode("';\nrequire __DIR__.'/", $preloadedFiles)) { - $preloadedFiles = "require __DIR__.'/$preloadedFiles';\n"; - } - - $code[$options['class'].'.preload.php'] = <<= 7.4 when preloading is desired - -use Symfony\Component\DependencyInjection\Dumper\Preloader; - -if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) { - return; -} - -require $autoloadFile; -(require __DIR__.'/{$options['class']}.php')->set(\\Container{$hash}\\{$options['class']}::class, null); -$preloadedFiles -\$classes = []; - -EOF; - - foreach ($this->preload as $class) { - if (!$class || str_contains($class, '$') || \in_array($class, ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'null', 'callable', 'iterable', 'mixed', 'void'], true)) { - continue; - } - if (!(class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) || ((new \ReflectionClass($class))->isUserDefined() && !\in_array($class, ['Attribute', 'JsonException', 'ReturnTypeWillChange', 'Stringable', 'UnhandledMatchError', 'ValueError'], true))) { - $code[$options['class'].'.preload.php'] .= sprintf("\$classes[] = '%s';\n", $class); - } - } - - $code[$options['class'].'.preload.php'] .= <<<'EOF' - -$preloaded = Preloader::preload($classes); - -EOF; - } - - $code[$options['class'].'.php'] = << '$hash', - 'container.build_id' => '$id', - 'container.build_time' => $time, -], __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}'); - -EOF; - } else { - $code .= $this->endClass(); - foreach ($proxyClasses as $c) { - $code .= $c; - } - } - - $this->targetDirRegex = null; - $this->inlinedRequires = []; - $this->circularReferences = []; - $this->locatedIds = []; - $this->exportedVariables = []; - $this->preload = []; - - $unusedEnvs = []; - foreach ($this->container->getEnvCounters() as $env => $use) { - if (!$use) { - $unusedEnvs[] = $env; - } - } - if ($unusedEnvs) { - throw new EnvParameterException($unusedEnvs, null, 'Environment variables "%s" are never used. Please, check your container\'s configuration.'); - } - - return $code; - } - - /** - * Retrieves the currently set proxy dumper or instantiates one. - */ - private function getProxyDumper(): ProxyDumper - { - if (!$this->proxyDumper) { - $this->proxyDumper = new NullDumper(); - } - - return $this->proxyDumper; - } - - private function analyzeReferences() - { - (new AnalyzeServiceReferencesPass(false, !$this->getProxyDumper() instanceof NullDumper))->process($this->container); - $checkedNodes = []; - $this->circularReferences = []; - $this->singleUsePrivateIds = []; - foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) { - if (!$node->getValue() instanceof Definition) { - continue; - } - - if ($this->isSingleUsePrivateNode($node)) { - $this->singleUsePrivateIds[$id] = $id; - } - - $this->collectCircularReferences($id, $node->getOutEdges(), $checkedNodes); - } - - $this->container->getCompiler()->getServiceReferenceGraph()->clear(); - $this->singleUsePrivateIds = array_diff_key($this->singleUsePrivateIds, $this->circularReferences); - } - - private function collectCircularReferences(string $sourceId, array $edges, array &$checkedNodes, array &$loops = [], array $path = [], bool $byConstructor = true): void - { - $path[$sourceId] = $byConstructor; - $checkedNodes[$sourceId] = true; - foreach ($edges as $edge) { - $node = $edge->getDestNode(); - $id = $node->getId(); - if ($sourceId === $id || !$node->getValue() instanceof Definition || $edge->isLazy() || $edge->isWeak()) { - continue; - } - - if (isset($path[$id])) { - $loop = null; - $loopByConstructor = $edge->isReferencedByConstructor(); - $pathInLoop = [$id, []]; - foreach ($path as $k => $pathByConstructor) { - if (null !== $loop) { - $loop[] = $k; - $pathInLoop[1][$k] = $pathByConstructor; - $loops[$k][] = &$pathInLoop; - $loopByConstructor = $loopByConstructor && $pathByConstructor; - } elseif ($k === $id) { - $loop = []; - } - } - $this->addCircularReferences($id, $loop, $loopByConstructor); - } elseif (!isset($checkedNodes[$id])) { - $this->collectCircularReferences($id, $node->getOutEdges(), $checkedNodes, $loops, $path, $edge->isReferencedByConstructor()); - } elseif (isset($loops[$id])) { - // we already had detected loops for this edge - // let's check if we have a common ancestor in one of the detected loops - foreach ($loops[$id] as [$first, $loopPath]) { - if (!isset($path[$first])) { - continue; - } - // We have a common ancestor, let's fill the current path - $fillPath = null; - foreach ($loopPath as $k => $pathByConstructor) { - if (null !== $fillPath) { - $fillPath[$k] = $pathByConstructor; - } elseif ($k === $id) { - $fillPath = $path; - $fillPath[$k] = $pathByConstructor; - } - } - - // we can now build the loop - $loop = null; - $loopByConstructor = $edge->isReferencedByConstructor(); - foreach ($fillPath as $k => $pathByConstructor) { - if (null !== $loop) { - $loop[] = $k; - $loopByConstructor = $loopByConstructor && $pathByConstructor; - } elseif ($k === $first) { - $loop = []; - } - } - $this->addCircularReferences($first, $loop, true); - break; - } - } - } - unset($path[$sourceId]); - } - - private function addCircularReferences(string $sourceId, array $currentPath, bool $byConstructor) - { - $currentId = $sourceId; - $currentPath = array_reverse($currentPath); - $currentPath[] = $currentId; - foreach ($currentPath as $parentId) { - if (empty($this->circularReferences[$parentId][$currentId])) { - $this->circularReferences[$parentId][$currentId] = $byConstructor; - } - - $currentId = $parentId; - } - } - - private function collectLineage(string $class, array &$lineage) - { - if (isset($lineage[$class])) { - return; - } - if (!$r = $this->container->getReflectionClass($class, false)) { - return; - } - if (is_a($class, $this->baseClass, true)) { - return; - } - $file = $r->getFileName(); - if (str_ends_with($file, ') : eval()\'d code')) { - $file = substr($file, 0, strrpos($file, '(', -17)); - } - if (!$file || $this->doExport($file) === $exportedFile = $this->export($file)) { - return; - } - - $lineage[$class] = substr($exportedFile, 1, -1); - - if ($parent = $r->getParentClass()) { - $this->collectLineage($parent->name, $lineage); - } - - foreach ($r->getInterfaces() as $parent) { - $this->collectLineage($parent->name, $lineage); - } - - foreach ($r->getTraits() as $parent) { - $this->collectLineage($parent->name, $lineage); - } - - unset($lineage[$class]); - $lineage[$class] = substr($exportedFile, 1, -1); - } - - private function generateProxyClasses(): array - { - $proxyClasses = []; - $alreadyGenerated = []; - $definitions = $this->container->getDefinitions(); - $strip = '' === $this->docStar && method_exists(Kernel::class, 'stripComments'); - $proxyDumper = $this->getProxyDumper(); - ksort($definitions); - foreach ($definitions as $definition) { - if (!$proxyDumper->isProxyCandidate($definition)) { - continue; - } - if (isset($alreadyGenerated[$class = $definition->getClass()])) { - continue; - } - $alreadyGenerated[$class] = true; - // register class' reflector for resource tracking - $this->container->getReflectionClass($class); - if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition)) { - continue; - } - - if ($this->inlineRequires) { - $lineage = []; - $this->collectLineage($class, $lineage); - - $code = ''; - foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) { - if ($this->inlineFactories) { - $this->inlinedRequires[$file] = true; - } - $code .= sprintf("include_once %s;\n", $file); - } - - $proxyCode = $code.$proxyCode; - } - - if ($strip) { - $proxyCode = "inlineRequires ? substr($proxyCode, \strlen($code)) : $proxyCode, 3)[1]; - - if ($this->asFiles || $this->namespace) { - $proxyCode .= "\nif (!\\class_exists('$proxyClass', false)) {\n \\class_alias(__NAMESPACE__.'\\\\$proxyClass', '$proxyClass', false);\n}\n"; - } - - $proxyClasses[$proxyClass.'.php'] = $proxyCode; - } - - return $proxyClasses; - } - - private function addServiceInclude(string $cId, Definition $definition): string - { - $code = ''; - - if ($this->inlineRequires && (!$this->isHotPath($definition) || $this->getProxyDumper()->isProxyCandidate($definition))) { - $lineage = []; - foreach ($this->inlinedDefinitions as $def) { - if (!$def->isDeprecated()) { - foreach ($this->getClasses($def, $cId) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - foreach ($this->serviceCalls as $id => [$callCount, $behavior]) { - if ('service_container' !== $id && $id !== $cId - && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $behavior - && $this->container->has($id) - && $this->isTrivialInstance($def = $this->container->findDefinition($id)) - ) { - foreach ($this->getClasses($def, $cId) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) { - $code .= sprintf(" include_once %s;\n", $file); - } - } - - foreach ($this->inlinedDefinitions as $def) { - if ($file = $def->getFile()) { - $file = $this->dumpValue($file); - $file = '(' === $file[0] ? substr($file, 1, -1) : $file; - $code .= sprintf(" include_once %s;\n", $file); - } - } - - if ('' !== $code) { - $code .= "\n"; - } - - return $code; - } - - /** - * @throws InvalidArgumentException - * @throws RuntimeException - */ - private function addServiceInstance(string $id, Definition $definition, bool $isSimpleInstance): string - { - $class = $this->dumpValue($definition->getClass()); - - if (str_starts_with($class, "'") && !str_contains($class, '$') && !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { - throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id)); - } - - $isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition); - $instantiation = ''; - - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (!$isProxyCandidate && $definition->isShared() && !isset($this->singleUsePrivateIds[$id]) && null === $lastWitherIndex) { - $instantiation = sprintf('$this->%s[%s] = %s', $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', $this->doExport($id), $isSimpleInstance ? '' : '$instance'); - } elseif (!$isSimpleInstance) { - $instantiation = '$instance'; - } - - $return = ''; - if ($isSimpleInstance) { - $return = 'return '; - } else { - $instantiation .= ' = '; - } - - return $this->addNewInstance($definition, ' '.$return.$instantiation, $id); - } - - private function isTrivialInstance(Definition $definition): bool - { - if ($definition->hasErrors()) { - return true; - } - if ($definition->isSynthetic() || $definition->getFile() || $definition->getMethodCalls() || $definition->getProperties() || $definition->getConfigurator()) { - return false; - } - if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < \count($definition->getArguments())) { - return false; - } - - foreach ($definition->getArguments() as $arg) { - if (!$arg || $arg instanceof Parameter) { - continue; - } - if (\is_array($arg) && 3 >= \count($arg)) { - foreach ($arg as $k => $v) { - if ($this->dumpValue($k) !== $this->dumpValue($k, false)) { - return false; - } - if (!$v || $v instanceof Parameter) { - continue; - } - if ($v instanceof Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) { - continue; - } - if (!is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) { - return false; - } - } - } elseif ($arg instanceof Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) { - continue; - } elseif (!is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) { - return false; - } - } - - return true; - } - - private function addServiceMethodCalls(Definition $definition, string $variableName, ?string $sharedNonLazyId): string - { - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - $calls = ''; - foreach ($definition->getMethodCalls() as $k => $call) { - $arguments = []; - foreach ($call[1] as $i => $value) { - $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value); - } - - $witherAssignation = ''; - - if ($call[2] ?? false) { - if (null !== $sharedNonLazyId && $lastWitherIndex === $k) { - $witherAssignation = sprintf('$this->%s[\'%s\'] = ', $definition->isPublic() ? 'services' : 'privates', $sharedNonLazyId); - } - $witherAssignation .= sprintf('$%s = ', $variableName); - } - - $calls .= $this->wrapServiceConditionals($call[1], sprintf(" %s\$%s->%s(%s);\n", $witherAssignation, $variableName, $call[0], implode(', ', $arguments))); - } - - return $calls; - } - - private function addServiceProperties(Definition $definition, string $variableName = 'instance'): string - { - $code = ''; - foreach ($definition->getProperties() as $name => $value) { - $code .= sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value)); - } - - return $code; - } - - private function addServiceConfigurator(Definition $definition, string $variableName = 'instance'): string - { - if (!$callable = $definition->getConfigurator()) { - return ''; - } - - if (\is_array($callable)) { - if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0])) - ) { - return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - $class = $this->dumpValue($callable[0]); - // If the class is a string we can optimize away - if (str_starts_with($class, "'") && !str_contains($class, '$')) { - return sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName); - } - - if (str_starts_with($class, 'new ')) { - return sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - return sprintf(" [%s, '%s'](\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - return sprintf(" %s(\$%s);\n", $callable, $variableName); - } - - private function addService(string $id, Definition $definition): array - { - $this->definitionVariables = new \SplObjectStorage(); - $this->referenceVariables = []; - $this->variableCount = 0; - $this->referenceVariables[$id] = new Variable('instance'); - - $return = []; - - if ($class = $definition->getClass()) { - $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class); - $return[] = sprintf(str_starts_with($class, '%') ? '@return object A %1$s instance' : '@return \%s', ltrim($class, '\\')); - } elseif ($definition->getFactory()) { - $factory = $definition->getFactory(); - if (\is_string($factory)) { - $return[] = sprintf('@return object An instance returned by %s()', $factory); - } elseif (\is_array($factory) && (\is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) { - $class = $factory[0] instanceof Definition ? $factory[0]->getClass() : (string) $factory[0]; - $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class); - $return[] = sprintf('@return object An instance returned by %s::%s()', $class, $factory[1]); - } - } - - if ($definition->isDeprecated()) { - if ($return && str_starts_with($return[\count($return) - 1], '@return')) { - $return[] = ''; - } - - $deprecation = $definition->getDeprecation($id); - $return[] = sprintf('@deprecated %s', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return)); - $return = $this->container->resolveEnvPlaceholders($return); - - $shared = $definition->isShared() ? ' shared' : ''; - $public = $definition->isPublic() ? 'public' : 'private'; - $autowired = $definition->isAutowired() ? ' autowired' : ''; - $asFile = $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition); - $methodName = $this->generateMethodName($id); - - if ($asFile || $definition->isLazy()) { - $lazyInitialization = '$lazyLoad = true'; - } else { - $lazyInitialization = ''; - } - - $code = <<docStar} - * Gets the $public '$id'$shared$autowired service. - * - * $return -EOF; - $code = str_replace('*/', ' ', $code).<<hasErrors() && $e = $definition->getErrors()) { - $this->addThrow = true; - - $code .= sprintf(" \$this->throw(%s);\n", $this->export(reset($e))); - } else { - $this->serviceCalls = []; - $this->inlinedDefinitions = $this->getDefinitionsFromArguments([$definition], null, $this->serviceCalls); - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation($id); - $code .= sprintf(" trigger_deprecation(%s, %s, %s);\n\n", $this->export($deprecation['package']), $this->export($deprecation['version']), $this->export($deprecation['message'])); - } elseif ($definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1])) { - foreach ($this->inlinedDefinitions as $def) { - foreach ($this->getClasses($def, $id) as $class) { - $this->preload[$class] = $class; - } - } - } - - if (!$definition->isShared()) { - $factory = sprintf('$this->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id)); - } - - if ($isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition)) { - if (!$definition->isShared()) { - $code .= sprintf(' %s = %1$s ?? ', $factory); - - if ($asFile) { - $code .= "function () {\n"; - $code .= " return self::do(\$container);\n"; - $code .= " };\n\n"; - } else { - $code .= sprintf("\\Closure::fromCallable([\$this, '%s']);\n\n", $methodName); - } - } - - $factoryCode = $asFile ? 'self::do($container, false)' : sprintf('$this->%s(false)', $methodName); - $factoryCode = $this->getProxyDumper()->getProxyFactoryCode($definition, $id, $factoryCode); - $code .= $asFile ? preg_replace('/function \(([^)]*+)\)( {|:)/', 'function (\1) use ($container)\2', $factoryCode) : $factoryCode; - } - - $c = $this->addServiceInclude($id, $definition); - - if ('' !== $c && $isProxyCandidate && !$definition->isShared()) { - $c = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $c))); - $code .= " static \$include = true;\n\n"; - $code .= " if (\$include) {\n"; - $code .= $c; - $code .= " \$include = false;\n"; - $code .= " }\n\n"; - } else { - $code .= $c; - } - - $c = $this->addInlineService($id, $definition); - - if (!$isProxyCandidate && !$definition->isShared()) { - $c = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $c))); - $lazyloadInitialization = $definition->isLazy() ? '$lazyLoad = true' : ''; - - $c = sprintf(" %s = function (%s) {\n%s };\n\n return %1\$s();\n", $factory, $lazyloadInitialization, $c); - } - - $code .= $c; - } - - if ($asFile) { - $code = str_replace('$this', '$container', $code); - $code = preg_replace('/function \(([^)]*+)\)( {|:)/', 'function (\1) use ($container)\2', $code); - } - - $code .= " }\n"; - - $this->definitionVariables = $this->inlinedDefinitions = null; - $this->referenceVariables = $this->serviceCalls = null; - - return [$file, $code]; - } - - private function addInlineVariables(string $id, Definition $definition, array $arguments, bool $forConstructor): string - { - $code = ''; - - foreach ($arguments as $argument) { - if (\is_array($argument)) { - $code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor); - } elseif ($argument instanceof Reference) { - $code .= $this->addInlineReference($id, $definition, $argument, $forConstructor); - } elseif ($argument instanceof Definition) { - $code .= $this->addInlineService($id, $definition, $argument, $forConstructor); - } - } - - return $code; - } - - private function addInlineReference(string $id, Definition $definition, string $targetId, bool $forConstructor): string - { - while ($this->container->hasAlias($targetId)) { - $targetId = (string) $this->container->getAlias($targetId); - } - - [$callCount, $behavior] = $this->serviceCalls[$targetId]; - - if ($id === $targetId) { - return $this->addInlineService($id, $definition, $definition); - } - - if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) { - return ''; - } - - if ($this->container->hasDefinition($targetId) && ($def = $this->container->getDefinition($targetId)) && !$def->isShared()) { - return ''; - } - - $hasSelfRef = isset($this->circularReferences[$id][$targetId]) && !isset($this->definitionVariables[$definition]); - - if ($hasSelfRef && !$forConstructor && !$forConstructor = !$this->circularReferences[$id][$targetId]) { - $code = $this->addInlineService($id, $definition, $definition); - } else { - $code = ''; - } - - if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) { - return $code; - } - - $name = $this->getNextVariableName(); - $this->referenceVariables[$targetId] = new Variable($name); - - $reference = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $behavior ? new Reference($targetId, $behavior) : null; - $code .= sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference)); - - if (!$hasSelfRef || !$forConstructor) { - return $code; - } - - $code .= sprintf(<<<'EOTXT' - - if (isset($this->%s[%s])) { - return $this->%1$s[%2$s]; - } - -EOTXT - , - $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', - $this->doExport($id) - ); - - return $code; - } - - private function addInlineService(string $id, Definition $definition, Definition $inlineDef = null, bool $forConstructor = true): string - { - $code = ''; - - if ($isSimpleInstance = $isRootInstance = null === $inlineDef) { - foreach ($this->serviceCalls as $targetId => [$callCount, $behavior, $byConstructor]) { - if ($byConstructor && isset($this->circularReferences[$id][$targetId]) && !$this->circularReferences[$id][$targetId]) { - $code .= $this->addInlineReference($id, $definition, $targetId, $forConstructor); - } - } - } - - if (isset($this->definitionVariables[$inlineDef = $inlineDef ?: $definition])) { - return $code; - } - - $arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()]; - - $code .= $this->addInlineVariables($id, $definition, $arguments, $forConstructor); - - if ($arguments = array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) { - $isSimpleInstance = false; - } elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) { - return $code; - } - - if (isset($this->definitionVariables[$inlineDef])) { - $isSimpleInstance = false; - } else { - $name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName(); - $this->definitionVariables[$inlineDef] = new Variable($name); - $code .= '' !== $code ? "\n" : ''; - - if ('instance' === $name) { - $code .= $this->addServiceInstance($id, $definition, $isSimpleInstance); - } else { - $code .= $this->addNewInstance($inlineDef, ' $'.$name.' = ', $id); - } - - if ('' !== $inline = $this->addInlineVariables($id, $definition, $arguments, false)) { - $code .= "\n".$inline."\n"; - } elseif ($arguments && 'instance' === $name) { - $code .= "\n"; - } - - $code .= $this->addServiceProperties($inlineDef, $name); - $code .= $this->addServiceMethodCalls($inlineDef, $name, !$this->getProxyDumper()->isProxyCandidate($inlineDef) && $inlineDef->isShared() && !isset($this->singleUsePrivateIds[$id]) ? $id : null); - $code .= $this->addServiceConfigurator($inlineDef, $name); - } - - if ($isRootInstance && !$isSimpleInstance) { - $code .= "\n return \$instance;\n"; - } - - return $code; - } - - private function addServices(array &$services = null): string - { - $publicServices = $privateServices = ''; - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic()) { - $services[$id] = $this->addService($id, $definition); - } elseif ($definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1])) { - $services[$id] = null; - - foreach ($this->getClasses($definition, $id) as $class) { - $this->preload[$class] = $class; - } - } - } - - foreach ($definitions as $id => $definition) { - if (!([$file, $code] = $services[$id]) || null !== $file) { - continue; - } - if ($definition->isPublic()) { - $publicServices .= $code; - } elseif (!$this->isTrivialInstance($definition) || isset($this->locatedIds[$id])) { - $privateServices .= $code; - } - } - - return $publicServices.$privateServices; - } - - private function generateServiceFiles(array $services): iterable - { - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (([$file, $code] = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) { - yield $file => [$code, $definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1]) && !$definition->isDeprecated() && !$definition->hasErrors()]; - } - } - } - - private function addNewInstance(Definition $definition, string $return = '', string $id = null): string - { - $tail = $return ? ";\n" : ''; - - if (BaseServiceLocator::class === $definition->getClass() && $definition->hasTag($this->serviceLocatorTag)) { - $arguments = []; - foreach ($definition->getArgument(0) as $k => $argument) { - $arguments[$k] = $argument->getValues()[0]; - } - - return $return.$this->dumpValue(new ServiceLocatorArgument($arguments)).$tail; - } - - $arguments = []; - foreach ($definition->getArguments() as $i => $value) { - $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value); - } - - if (null !== $definition->getFactory()) { - $callable = $definition->getFactory(); - - if (\is_array($callable)) { - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $callable[1])) { - throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s).', $callable[1] ?: 'n/a')); - } - - if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) { - return $return.sprintf('%s->%s(%s)', $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - $class = $this->dumpValue($callable[0]); - // If the class is a string we can optimize away - if (str_starts_with($class, "'") && !str_contains($class, '$')) { - if ("''" === $class) { - throw new RuntimeException(sprintf('Cannot dump definition: "%s" service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id ? 'The "'.$id.'"' : 'inline')); - } - - return $return.sprintf('%s::%s(%s)', $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - if (str_starts_with($class, 'new ')) { - return $return.sprintf('(%s)->%s(%s)', $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - return $return.sprintf("[%s, '%s'](%s)", $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - return $return.sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : '').$tail; - } - - if (null === $class = $definition->getClass()) { - throw new RuntimeException('Cannot dump definitions which have no class nor factory.'); - } - - return $return.sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), implode(', ', $arguments)).$tail; - } - - private function startClass(string $class, string $baseClass, bool $hasProxyClasses): string - { - $namespaceLine = !$this->asFiles && $this->namespace ? "\nnamespace {$this->namespace};\n" : ''; - - $code = <<docStar} - * @internal This class has been auto-generated by the Symfony Dependency Injection Component. - */ -class $class extends $baseClass -{ - protected \$parameters = []; - - public function __construct() - { - -EOF; - if ($this->asFiles) { - $code = str_replace('$parameters = []', "\$containerDir;\n protected \$parameters = [];\n private \$buildParameters", $code); - $code = str_replace('__construct()', '__construct(array $buildParameters = [], $containerDir = __DIR__)', $code); - $code .= " \$this->buildParameters = \$buildParameters;\n"; - $code .= " \$this->containerDir = \$containerDir;\n"; - - if (null !== $this->targetDirRegex) { - $code = str_replace('$parameters = []', "\$targetDir;\n protected \$parameters = []", $code); - $code .= ' $this->targetDir = \\dirname($containerDir);'."\n"; - } - } - - if (Container::class !== $this->baseClass) { - $r = $this->container->getReflectionClass($this->baseClass, false); - if (null !== $r - && (null !== $constructor = $r->getConstructor()) - && 0 === $constructor->getNumberOfRequiredParameters() - && Container::class !== $constructor->getDeclaringClass()->name - ) { - $code .= " parent::__construct();\n"; - $code .= " \$this->parameterBag = null;\n\n"; - } - } - - if ($this->container->getParameterBag()->all()) { - $code .= " \$this->parameters = \$this->getDefaultParameters();\n\n"; - } - $code .= " \$this->services = \$this->privates = [];\n"; - - $code .= $this->addSyntheticIds(); - $code .= $this->addMethodMap(); - $code .= $this->asFiles && !$this->inlineFactories ? $this->addFileMap() : ''; - $code .= $this->addAliases(); - $code .= $this->addInlineRequires($hasProxyClasses); - $code .= <<addRemovedIds(); - - if ($this->asFiles && !$this->inlineFactories) { - $code .= <<<'EOF' - - protected function load($file, $lazyLoad = true) - { - if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) { - return $class::do($this, $lazyLoad); - } - - if ('.' === $file[-4]) { - $class = substr($class, 0, -4); - } else { - $file .= '.php'; - } - - $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; - - return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; - } - -EOF; - } - - $proxyDumper = $this->getProxyDumper(); - foreach ($this->container->getDefinitions() as $definition) { - if (!$proxyDumper->isProxyCandidate($definition)) { - continue; - } - - if ($this->asFiles && !$this->inlineFactories) { - $proxyLoader = "class_exists(\$class, false) || require __DIR__.'/'.\$class.'.php';\n\n "; - } else { - $proxyLoader = ''; - } - - $code .= <<container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if ($definition->isSynthetic() && 'service_container' !== $id) { - $code .= ' '.$this->doExport($id)." => true,\n"; - } - } - - return $code ? " \$this->syntheticIds = [\n{$code} ];\n" : ''; - } - - private function addRemovedIds(): string - { - $ids = $this->container->getRemovedIds(); - foreach ($this->container->getDefinitions() as $id => $definition) { - if (!$definition->isPublic()) { - $ids[$id] = true; - } - } - if (!$ids) { - return ''; - } - if ($this->asFiles) { - $code = "require \$this->containerDir.\\DIRECTORY_SEPARATOR.'removed-ids.php'"; - } else { - $code = ''; - $ids = array_keys($ids); - sort($ids); - foreach ($ids as $id) { - if (preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id)) { - continue; - } - $code .= ' '.$this->doExport($id)." => true,\n"; - } - - $code = "[\n{$code} ]"; - } - - return <<container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic() && $definition->isPublic() && (!$this->asFiles || $this->inlineFactories || $this->isHotPath($definition))) { - $code .= ' '.$this->doExport($id).' => '.$this->doExport($this->generateMethodName($id)).",\n"; - } - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - if (!$id->isDeprecated()) { - continue; - } - $code .= ' '.$this->doExport($alias).' => '.$this->doExport($this->generateMethodName($alias)).",\n"; - } - - return $code ? " \$this->methodMap = [\n{$code} ];\n" : ''; - } - - private function addFileMap(): string - { - $code = ''; - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic() && $definition->isPublic() && !$this->isHotPath($definition)) { - $code .= sprintf(" %s => '%s',\n", $this->doExport($id), $this->generateMethodName($id)); - } - } - - return $code ? " \$this->fileMap = [\n{$code} ];\n" : ''; - } - - private function addAliases(): string - { - if (!$aliases = $this->container->getAliases()) { - return "\n \$this->aliases = [];\n"; - } - - $code = " \$this->aliases = [\n"; - ksort($aliases); - foreach ($aliases as $alias => $id) { - if ($id->isDeprecated()) { - continue; - } - - $id = (string) $id; - while (isset($aliases[$id])) { - $id = (string) $aliases[$id]; - } - $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n"; - } - - return $code." ];\n"; - } - - private function addDeprecatedAliases(): string - { - $code = ''; - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $definition) { - if (!$definition->isDeprecated()) { - continue; - } - $public = $definition->isPublic() ? 'public' : 'private'; - $id = (string) $definition; - $methodNameAlias = $this->generateMethodName($alias); - $idExported = $this->export($id); - $deprecation = $definition->getDeprecation($alias); - $packageExported = $this->export($deprecation['package']); - $versionExported = $this->export($deprecation['version']); - $messageExported = $this->export($deprecation['message']); - $code .= <<docStar} - * Gets the $public '$alias' alias. - * - * @return object The "$id" service. - */ - protected function {$methodNameAlias}() - { - trigger_deprecation($packageExported, $versionExported, $messageExported); - - return \$this->get($idExported); - } - -EOF; - } - - return $code; - } - - private function addInlineRequires(bool $hasProxyClasses): string - { - $lineage = []; - $hotPathServices = $this->hotPathTag && $this->inlineRequires ? $this->container->findTaggedServiceIds($this->hotPathTag) : []; - - foreach ($hotPathServices as $id => $tags) { - $definition = $this->container->getDefinition($id); - - if ($this->getProxyDumper()->isProxyCandidate($definition)) { - continue; - } - - $inlinedDefinitions = $this->getDefinitionsFromArguments([$definition]); - - foreach ($inlinedDefinitions as $def) { - foreach ($this->getClasses($def, $id) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - $code = ''; - - foreach ($lineage as $file) { - if (!isset($this->inlinedRequires[$file])) { - $this->inlinedRequires[$file] = true; - $code .= sprintf("\n include_once %s;", $file); - } - } - - if ($hasProxyClasses) { - $code .= "\n include_once __DIR__.'/proxy-classes.php';"; - } - - return $code ? sprintf("\n \$this->privates['service_container'] = function () {%s\n };\n", $code) : ''; - } - - private function addDefaultParametersMethod(): string - { - if (!$this->container->getParameterBag()->all()) { - return ''; - } - - $php = []; - $dynamicPhp = []; - - foreach ($this->container->getParameterBag()->all() as $key => $value) { - if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) { - throw new InvalidArgumentException(sprintf('Parameter name cannot use env parameters: "%s".', $resolvedKey)); - } - $hasEnum = false; - $export = $this->exportParameters([$value], '', 12, $hasEnum); - $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2); - - if ($hasEnum || preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $export[1])) { - $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]); - } else { - $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); - } - } - $parameters = sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8)); - - $code = <<<'EOF' - - /** - * @return array|bool|float|int|string|\UnitEnum|null - */ - public function getParameter(string $name) - { - if (isset($this->buildParameters[$name])) { - return $this->buildParameters[$name]; - } - - if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) { - throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); - } - if (isset($this->loadedDynamicParameters[$name])) { - return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); - } - - return $this->parameters[$name]; - } - - public function hasParameter(string $name): bool - { - if (isset($this->buildParameters[$name])) { - return true; - } - - return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters); - } - - public function setParameter(string $name, $value): void - { - throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); - } - - public function getParameterBag(): ParameterBagInterface - { - if (null === $this->parameterBag) { - $parameters = $this->parameters; - foreach ($this->loadedDynamicParameters as $name => $loaded) { - $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); - } - foreach ($this->buildParameters as $name => $value) { - $parameters[$name] = $value; - } - $this->parameterBag = new FrozenParameterBag($parameters); - } - - return $this->parameterBag; - } - -EOF; - if (!$this->asFiles) { - $code = preg_replace('/^.*buildParameters.*\n.*\n.*\n\n?/m', '', $code); - } - - if ($dynamicPhp) { - $loadedDynamicParameters = $this->exportParameters(array_combine(array_keys($dynamicPhp), array_fill(0, \count($dynamicPhp), false)), '', 8); - $getDynamicParameter = <<<'EOF' - switch ($name) { -%s - default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%%s" must be defined.', $name)); - } - $this->loadedDynamicParameters[$name] = true; - - return $this->dynamicParameters[$name] = $value; -EOF; - $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp)); - } else { - $loadedDynamicParameters = '[]'; - $getDynamicParameter = str_repeat(' ', 8).'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));'; - } - - $code .= << $value) { - if (\is_array($value)) { - $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4, $hasEnum); - } elseif ($value instanceof ArgumentInterface) { - throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain special arguments. "%s" found in "%s".', get_debug_type($value), $path.'/'.$key)); - } elseif ($value instanceof Variable) { - throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path.'/'.$key)); - } elseif ($value instanceof Definition) { - throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path.'/'.$key)); - } elseif ($value instanceof Reference) { - throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path.'/'.$key)); - } elseif ($value instanceof Expression) { - throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key)); - } elseif ($value instanceof \UnitEnum) { - $hasEnum = true; - $value = sprintf('\%s::%s', \get_class($value), $value->name); - } else { - $value = $this->export($value); - } - - $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value); - } - - return sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4)); - } - - private function endClass(): string - { - if ($this->addThrow) { - return <<<'EOF' - - protected function throw($message) - { - throw new RuntimeException($message); - } -} - -EOF; - } - - return <<<'EOF' -} - -EOF; - } - - private function wrapServiceConditionals($value, string $code): string - { - if (!$condition = $this->getServiceConditionals($value)) { - return $code; - } - - // re-indent the wrapped code - $code = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $code))); - - return sprintf(" if (%s) {\n%s }\n", $condition, $code); - } - - private function getServiceConditionals($value): string - { - $conditions = []; - foreach (ContainerBuilder::getInitializedConditionals($value) as $service) { - if (!$this->container->hasDefinition($service)) { - return 'false'; - } - $conditions[] = sprintf('isset($this->%s[%s])', $this->container->getDefinition($service)->isPublic() ? 'services' : 'privates', $this->doExport($service)); - } - foreach (ContainerBuilder::getServiceConditionals($value) as $service) { - if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) { - continue; - } - - $conditions[] = sprintf('$this->has(%s)', $this->doExport($service)); - } - - if (!$conditions) { - return ''; - } - - return implode(' && ', $conditions); - } - - private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = [], bool $byConstructor = null): \SplObjectStorage - { - if (null === $definitions) { - $definitions = new \SplObjectStorage(); - } - - foreach ($arguments as $argument) { - if (\is_array($argument)) { - $this->getDefinitionsFromArguments($argument, $definitions, $calls, $byConstructor); - } elseif ($argument instanceof Reference) { - $id = (string) $argument; - - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if (!isset($calls[$id])) { - $calls[$id] = [0, $argument->getInvalidBehavior(), $byConstructor]; - } else { - $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior()); - } - - ++$calls[$id][0]; - } elseif (!$argument instanceof Definition) { - // no-op - } elseif (isset($definitions[$argument])) { - $definitions[$argument] = 1 + $definitions[$argument]; - } else { - $definitions[$argument] = 1; - $arguments = [$argument->getArguments(), $argument->getFactory()]; - $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null === $byConstructor || $byConstructor); - $arguments = [$argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()]; - $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null !== $byConstructor && $byConstructor); - } - } - - return $definitions; - } - - /** - * @throws RuntimeException - */ - private function dumpValue($value, bool $interpolate = true): string - { - if (\is_array($value)) { - if ($value && $interpolate && false !== $param = array_search($value, $this->container->getParameterBag()->all(), true)) { - return $this->dumpValue("%$param%"); - } - $code = []; - foreach ($value as $k => $v) { - $code[] = sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)); - } - - return sprintf('[%s]', implode(', ', $code)); - } elseif ($value instanceof ArgumentInterface) { - $scope = [$this->definitionVariables, $this->referenceVariables]; - $this->definitionVariables = $this->referenceVariables = null; - - try { - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - $code = $this->dumpValue($value, $interpolate); - - $returnedType = ''; - if ($value instanceof TypedReference) { - $returnedType = sprintf(': %s\%s', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $value->getInvalidBehavior() ? '' : '?', str_replace(['|', '&'], ['|\\', '&\\'], $value->getType())); - } - - $code = sprintf('return %s;', $code); - - return sprintf("function ()%s {\n %s\n }", $returnedType, $code); - } - - if ($value instanceof IteratorArgument) { - $operands = [0]; - $code = []; - $code[] = 'new RewindableGenerator(function () {'; - - if (!$values = $value->getValues()) { - $code[] = ' return new \EmptyIterator();'; - } else { - $countCode = []; - $countCode[] = 'function () {'; - - foreach ($values as $k => $v) { - ($c = $this->getServiceConditionals($v)) ? $operands[] = "(int) ($c)" : ++$operands[0]; - $v = $this->wrapServiceConditionals($v, sprintf(" yield %s => %s;\n", $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate))); - foreach (explode("\n", $v) as $v) { - if ($v) { - $code[] = ' '.$v; - } - } - } - - $countCode[] = sprintf(' return %s;', implode(' + ', $operands)); - $countCode[] = ' }'; - } - - $code[] = sprintf(' }, %s)', \count($operands) > 1 ? implode("\n", $countCode) : $operands[0]); - - return implode("\n", $code); - } - - if ($value instanceof ServiceLocatorArgument) { - $serviceMap = ''; - $serviceTypes = ''; - foreach ($value->getValues() as $k => $v) { - if (!$v) { - continue; - } - $id = (string) $v; - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - $definition = $this->container->getDefinition($id); - $load = !($definition->hasErrors() && $e = $definition->getErrors()) ? $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition) : reset($e); - $serviceMap .= sprintf("\n %s => [%s, %s, %s, %s],", - $this->export($k), - $this->export($definition->isShared() ? ($definition->isPublic() ? 'services' : 'privates') : false), - $this->doExport($id), - $this->export(ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $v->getInvalidBehavior() && !\is_string($load) ? $this->generateMethodName($id) : null), - $this->export($load) - ); - $serviceTypes .= sprintf("\n %s => %s,", $this->export($k), $this->export($v instanceof TypedReference ? $v->getType() : '?')); - $this->locatedIds[$id] = true; - } - $this->addGetService = true; - - return sprintf('new \%s($this->getService, [%s%s], [%s%s])', ServiceLocator::class, $serviceMap, $serviceMap ? "\n " : '', $serviceTypes, $serviceTypes ? "\n " : ''); - } - } finally { - [$this->definitionVariables, $this->referenceVariables] = $scope; - } - } elseif ($value instanceof Definition) { - if ($value->hasErrors() && $e = $value->getErrors()) { - $this->addThrow = true; - - return sprintf('$this->throw(%s)', $this->export(reset($e))); - } - if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) { - return $this->dumpValue($this->definitionVariables[$value], $interpolate); - } - if ($value->getMethodCalls()) { - throw new RuntimeException('Cannot dump definitions which have method calls.'); - } - if ($value->getProperties()) { - throw new RuntimeException('Cannot dump definitions which have properties.'); - } - if (null !== $value->getConfigurator()) { - throw new RuntimeException('Cannot dump definitions which have a configurator.'); - } - - return $this->addNewInstance($value); - } elseif ($value instanceof Variable) { - return '$'.$value; - } elseif ($value instanceof Reference) { - $id = (string) $value; - - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) { - return $this->dumpValue($this->referenceVariables[$id], $interpolate); - } - - return $this->getServiceCall($id, $value); - } elseif ($value instanceof Expression) { - return $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']); - } elseif ($value instanceof Parameter) { - return $this->dumpParameter($value); - } elseif (true === $interpolate && \is_string($value)) { - if (preg_match('/^%([^%]+)%$/', $value, $match)) { - // we do this to deal with non string values (Boolean, integer, ...) - // the preg_replace_callback converts them to strings - return $this->dumpParameter($match[1]); - } else { - $replaceParameters = function ($match) { - return "'.".$this->dumpParameter($match[2]).".'"; - }; - - $code = str_replace('%%', '%', preg_replace_callback('/(?export($value))); - - return $code; - } - } elseif ($value instanceof \UnitEnum) { - return sprintf('\%s::%s', \get_class($value), $value->name); - } elseif ($value instanceof AbstractArgument) { - throw new RuntimeException($value->getTextWithContext()); - } elseif (\is_object($value) || \is_resource($value)) { - throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); - } - - return $this->export($value); - } - - /** - * Dumps a string to a literal (aka PHP Code) class value. - * - * @throws RuntimeException - */ - private function dumpLiteralClass(string $class): string - { - if (str_contains($class, '$')) { - return sprintf('${($_ = %s) && false ?: "_"}', $class); - } - if (!str_starts_with($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { - throw new RuntimeException(sprintf('Cannot dump definition because of invalid class name (%s).', $class ?: 'n/a')); - } - - $class = substr(str_replace('\\\\', '\\', $class), 1, -1); - - return str_starts_with($class, '\\') ? $class : '\\'.$class; - } - - private function dumpParameter(string $name): string - { - if ($this->container->hasParameter($name)) { - $value = $this->container->getParameter($name); - $dumpedValue = $this->dumpValue($value, false); - - if (!$value || !\is_array($value)) { - return $dumpedValue; - } - - if (!preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) { - return sprintf('$this->parameters[%s]', $this->doExport($name)); - } - } - - return sprintf('$this->getParameter(%s)', $this->doExport($name)); - } - - private function getServiceCall(string $id, Reference $reference = null): string - { - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if ('service_container' === $id) { - return '$this'; - } - - if ($this->container->hasDefinition($id) && $definition = $this->container->getDefinition($id)) { - if ($definition->isSynthetic()) { - $code = sprintf('$this->get(%s%s)', $this->doExport($id), null !== $reference ? ', '.$reference->getInvalidBehavior() : ''); - } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) { - $code = 'null'; - if (!$definition->isShared()) { - return $code; - } - } elseif ($this->isTrivialInstance($definition)) { - if ($definition->hasErrors() && $e = $definition->getErrors()) { - $this->addThrow = true; - - return sprintf('$this->throw(%s)', $this->export(reset($e))); - } - $code = $this->addNewInstance($definition, '', $id); - if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) { - $code = sprintf('$this->%s[%s] = %s', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code); - } - $code = "($code)"; - } else { - $code = $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition) ? "\$this->load('%s')" : '$this->%s()'; - $code = sprintf($code, $this->generateMethodName($id)); - - if (!$definition->isShared()) { - $factory = sprintf('$this->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id)); - $code = sprintf('(isset(%s) ? %1$s() : %s)', $factory, $code); - } - } - if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) { - $code = sprintf('($this->%s[%s] ?? %s)', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code); - } - - return $code; - } - if (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) { - return 'null'; - } - if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $reference->getInvalidBehavior()) { - $code = sprintf('$this->get(%s, /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ %d)', $this->doExport($id), ContainerInterface::NULL_ON_INVALID_REFERENCE); - } else { - $code = sprintf('$this->get(%s)', $this->doExport($id)); - } - - return sprintf('($this->services[%s] ?? %s)', $this->doExport($id), $code); - } - - /** - * Initializes the method names map to avoid conflicts with the Container methods. - */ - private function initializeMethodNamesMap(string $class) - { - $this->serviceIdToMethodNameMap = []; - $this->usedMethodNames = []; - - if ($reflectionClass = $this->container->getReflectionClass($class)) { - foreach ($reflectionClass->getMethods() as $method) { - $this->usedMethodNames[strtolower($method->getName())] = true; - } - } - } - - /** - * @throws InvalidArgumentException - */ - private function generateMethodName(string $id): string - { - if (isset($this->serviceIdToMethodNameMap[$id])) { - return $this->serviceIdToMethodNameMap[$id]; - } - - $i = strrpos($id, '\\'); - $name = Container::camelize(false !== $i && isset($id[1 + $i]) ? substr($id, 1 + $i) : $id); - $name = preg_replace('/[^a-zA-Z0-9_\x7f-\xff]/', '', $name); - $methodName = 'get'.$name.'Service'; - $suffix = 1; - - while (isset($this->usedMethodNames[strtolower($methodName)])) { - ++$suffix; - $methodName = 'get'.$name.$suffix.'Service'; - } - - $this->serviceIdToMethodNameMap[$id] = $methodName; - $this->usedMethodNames[strtolower($methodName)] = true; - - return $methodName; - } - - private function getNextVariableName(): string - { - $firstChars = self::FIRST_CHARS; - $firstCharsLength = \strlen($firstChars); - $nonFirstChars = self::NON_FIRST_CHARS; - $nonFirstCharsLength = \strlen($nonFirstChars); - - while (true) { - $name = ''; - $i = $this->variableCount; - - if ('' === $name) { - $name .= $firstChars[$i % $firstCharsLength]; - $i = (int) ($i / $firstCharsLength); - } - - while ($i > 0) { - --$i; - $name .= $nonFirstChars[$i % $nonFirstCharsLength]; - $i = (int) ($i / $nonFirstCharsLength); - } - - ++$this->variableCount; - - // check that the name is not reserved - if (\in_array($name, $this->reservedVariables, true)) { - continue; - } - - return $name; - } - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - if (!class_exists(\Symfony\Component\ExpressionLanguage\ExpressionLanguage::class)) { - throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $providers = $this->container->getExpressionLanguageProviders(); - $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) { - $id = '""' === substr_replace($arg, '', 1, -1) ? stripcslashes(substr($arg, 1, -1)) : null; - - if (null !== $id && ($this->container->hasAlias($id) || $this->container->hasDefinition($id))) { - return $this->getServiceCall($id); - } - - return sprintf('$this->get(%s)', $arg); - }); - - if ($this->container->isTrackingResources()) { - foreach ($providers as $provider) { - $this->container->addObjectResource($provider); - } - } - } - - return $this->expressionLanguage; - } - - private function isHotPath(Definition $definition): bool - { - return $this->hotPathTag && $definition->hasTag($this->hotPathTag) && !$definition->isDeprecated(); - } - - private function isSingleUsePrivateNode(ServiceReferenceGraphNode $node): bool - { - if ($node->getValue()->isPublic()) { - return false; - } - $ids = []; - foreach ($node->getInEdges() as $edge) { - if (!$value = $edge->getSourceNode()->getValue()) { - continue; - } - if ($edge->isLazy() || !$value instanceof Definition || !$value->isShared()) { - return false; - } - $ids[$edge->getSourceNode()->getId()] = true; - } - - return 1 === \count($ids); - } - - /** - * @return mixed - */ - private function export($value) - { - if (null !== $this->targetDirRegex && \is_string($value) && preg_match($this->targetDirRegex, $value, $matches, \PREG_OFFSET_CAPTURE)) { - $suffix = $matches[0][1] + \strlen($matches[0][0]); - $matches[0][1] += \strlen($matches[1][0]); - $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : ''; - - if ('\\' === \DIRECTORY_SEPARATOR && isset($value[$suffix])) { - $cookie = '\\'.random_int(100000, \PHP_INT_MAX); - $suffix = '.'.$this->doExport(str_replace('\\', $cookie, substr($value, $suffix)), true); - $suffix = str_replace('\\'.$cookie, "'.\\DIRECTORY_SEPARATOR.'", $suffix); - } else { - $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : ''; - } - - $dirname = $this->asFiles ? '$this->containerDir' : '__DIR__'; - $offset = 2 + $this->targetDirMaxMatches - \count($matches); - - if (0 < $offset) { - $dirname = sprintf('\dirname(__DIR__, %d)', $offset + (int) $this->asFiles); - } elseif ($this->asFiles) { - $dirname = "\$this->targetDir.''"; // empty string concatenation on purpose - } - - if ($prefix || $suffix) { - return sprintf('(%s%s%s)', $prefix, $dirname, $suffix); - } - - return $dirname; - } - - return $this->doExport($value, true); - } - - /** - * @return mixed - */ - private function doExport($value, bool $resolveEnv = false) - { - $shouldCacheValue = $resolveEnv && \is_string($value); - if ($shouldCacheValue && isset($this->exportedVariables[$value])) { - return $this->exportedVariables[$value]; - } - if (\is_string($value) && str_contains($value, "\n")) { - $cleanParts = explode("\n", $value); - $cleanParts = array_map(function ($part) { return var_export($part, true); }, $cleanParts); - $export = implode('."\n".', $cleanParts); - } else { - $export = var_export($value, true); - } - if ($this->asFiles) { - if (false !== strpos($export, '$this')) { - $export = str_replace('$this', "$'.'this", $export); - } - if (false !== strpos($export, 'function () {')) { - $export = str_replace('function () {', "function ('.') {", $export); - } - } - - if ($resolveEnv && "'" === $export[0] && $export !== $resolvedExport = $this->container->resolveEnvPlaceholders($export, "'.\$this->getEnv('string:%s').'")) { - $export = $resolvedExport; - if (str_ends_with($export, ".''")) { - $export = substr($export, 0, -3); - if ("'" === $export[1]) { - $export = substr_replace($export, '', 18, 7); - } - } - if ("'" === $export[1]) { - $export = substr($export, 3); - } - } - - if ($shouldCacheValue) { - $this->exportedVariables[$value] = $export; - } - - return $export; - } - - private function getAutoloadFile(): ?string - { - $file = null; - - foreach (spl_autoload_functions() as $autoloader) { - if (!\is_array($autoloader)) { - continue; - } - - if ($autoloader[0] instanceof DebugClassLoader || $autoloader[0] instanceof LegacyDebugClassLoader) { - $autoloader = $autoloader[0]->getClassLoader(); - } - - if (!\is_array($autoloader) || !$autoloader[0] instanceof ClassLoader || !$autoloader[0]->findFile(__CLASS__)) { - continue; - } - - foreach (get_declared_classes() as $class) { - if (str_starts_with($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) { - $file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php'; - - if (null !== $this->targetDirRegex && preg_match($this->targetDirRegex.'A', $file)) { - return $file; - } - } - } - } - - return $file; - } - - private function getClasses(Definition $definition, string $id): array - { - $classes = []; - - while ($definition instanceof Definition) { - foreach ($definition->getTag($this->preloadTags[0]) as $tag) { - if (!isset($tag['class'])) { - throw new InvalidArgumentException(sprintf('Missing attribute "class" on tag "%s" for service "%s".', $this->preloadTags[0], $id)); - } - - $classes[] = trim($tag['class'], '\\'); - } - - if ($class = $definition->getClass()) { - $classes[] = trim($class, '\\'); - } - $factory = $definition->getFactory(); - - if (!\is_array($factory)) { - $factory = [$factory]; - } - - if (\is_string($factory[0])) { - if (false !== $i = strrpos($factory[0], '::')) { - $factory[0] = substr($factory[0], 0, $i); - } - $classes[] = trim($factory[0], '\\'); - } - - $definition = $factory[0]; - } - - return $classes; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/Preloader.php b/vendor/symfony/dependency-injection/Dumper/Preloader.php deleted file mode 100644 index c61b08e..0000000 --- a/vendor/symfony/dependency-injection/Dumper/Preloader.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -/** - * @author Nicolas Grekas - */ -final class Preloader -{ - public static function append(string $file, array $list): void - { - if (!file_exists($file)) { - throw new \LogicException(sprintf('File "%s" does not exist.', $file)); - } - - $cacheDir = \dirname($file); - $classes = []; - - foreach ($list as $item) { - if (0 === strpos($item, $cacheDir)) { - file_put_contents($file, sprintf("require_once __DIR__.%s;\n", var_export(strtr(substr($item, \strlen($cacheDir)), \DIRECTORY_SEPARATOR, '/'), true)), \FILE_APPEND); - continue; - } - - $classes[] = sprintf("\$classes[] = %s;\n", var_export($item, true)); - } - - file_put_contents($file, sprintf("\n\$classes = [];\n%s\$preloaded = Preloader::preload(\$classes, \$preloaded);\n", implode('', $classes)), \FILE_APPEND); - } - - public static function preload(array $classes, array $preloaded = []): array - { - set_error_handler(function ($t, $m, $f, $l) { - if (error_reporting() & $t) { - if (__FILE__ !== $f) { - throw new \ErrorException($m, 0, $t, $f, $l); - } - - throw new \ReflectionException($m); - } - }); - - $prev = []; - - try { - while ($prev !== $classes) { - $prev = $classes; - foreach ($classes as $c) { - if (!isset($preloaded[$c])) { - self::doPreload($c, $preloaded); - } - } - $classes = array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits()); - } - } finally { - restore_error_handler(); - } - - return $preloaded; - } - - private static function doPreload(string $class, array &$preloaded): void - { - if (isset($preloaded[$class]) || \in_array($class, ['self', 'static', 'parent'], true)) { - return; - } - - $preloaded[$class] = true; - - try { - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - return; - } - - $r = new \ReflectionClass($class); - - if ($r->isInternal()) { - return; - } - - $r->getConstants(); - $r->getDefaultProperties(); - - if (\PHP_VERSION_ID >= 70400) { - foreach ($r->getProperties(\ReflectionProperty::IS_PUBLIC) as $p) { - self::preloadType($p->getType(), $preloaded); - } - } - - foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { - foreach ($m->getParameters() as $p) { - if ($p->isDefaultValueAvailable() && $p->isDefaultValueConstant()) { - $c = $p->getDefaultValueConstantName(); - - if ($i = strpos($c, '::')) { - self::doPreload(substr($c, 0, $i), $preloaded); - } - } - - self::preloadType($p->getType(), $preloaded); - } - - self::preloadType($m->getReturnType(), $preloaded); - } - } catch (\Throwable $e) { - // ignore missing classes - } - } - - private static function preloadType(?\ReflectionType $t, array &$preloaded): void - { - if (!$t) { - return; - } - - foreach (($t instanceof \ReflectionUnionType || $t instanceof \ReflectionIntersectionType) ? $t->getTypes() : [$t] as $t) { - if (!$t->isBuiltin()) { - self::doPreload($t instanceof \ReflectionNamedType ? $t->getName() : $t, $preloaded); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php deleted file mode 100644 index 4f7b16d..0000000 --- a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php +++ /dev/null @@ -1,395 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * XmlDumper dumps a service container as an XML string. - * - * @author Fabien Potencier - * @author Martin Hasoň - */ -class XmlDumper extends Dumper -{ - /** - * @var \DOMDocument - */ - private $document; - - /** - * Dumps the service container as an XML string. - * - * @return string - */ - public function dump(array $options = []) - { - $this->document = new \DOMDocument('1.0', 'utf-8'); - $this->document->formatOutput = true; - - $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container'); - $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd'); - - $this->addParameters($container); - $this->addServices($container); - - $this->document->appendChild($container); - $xml = $this->document->saveXML(); - $this->document = null; - - return $this->container->resolveEnvPlaceholders($xml); - } - - private function addParameters(\DOMElement $parent) - { - $data = $this->container->getParameterBag()->all(); - if (!$data) { - return; - } - - if ($this->container->isCompiled()) { - $data = $this->escape($data); - } - - $parameters = $this->document->createElement('parameters'); - $parent->appendChild($parameters); - $this->convertParameters($data, 'parameter', $parameters); - } - - private function addMethodCalls(array $methodcalls, \DOMElement $parent) - { - foreach ($methodcalls as $methodcall) { - $call = $this->document->createElement('call'); - $call->setAttribute('method', $methodcall[0]); - if (\count($methodcall[1])) { - $this->convertParameters($methodcall[1], 'argument', $call); - } - if ($methodcall[2] ?? false) { - $call->setAttribute('returns-clone', 'true'); - } - $parent->appendChild($call); - } - } - - private function addService(Definition $definition, ?string $id, \DOMElement $parent) - { - $service = $this->document->createElement('service'); - if (null !== $id) { - $service->setAttribute('id', $id); - } - if ($class = $definition->getClass()) { - if ('\\' === substr($class, 0, 1)) { - $class = substr($class, 1); - } - - $service->setAttribute('class', $class); - } - if (!$definition->isShared()) { - $service->setAttribute('shared', 'false'); - } - if ($definition->isPublic()) { - $service->setAttribute('public', 'true'); - } - if ($definition->isSynthetic()) { - $service->setAttribute('synthetic', 'true'); - } - if ($definition->isLazy()) { - $service->setAttribute('lazy', 'true'); - } - if (null !== $decoratedService = $definition->getDecoratedService()) { - [$decorated, $renamedId, $priority] = $decoratedService; - $service->setAttribute('decorates', $decorated); - - $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE], true)) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore'; - $service->setAttribute('decoration-on-invalid', $invalidBehavior); - } - if (null !== $renamedId) { - $service->setAttribute('decoration-inner-name', $renamedId); - } - if (0 !== $priority) { - $service->setAttribute('decoration-priority', $priority); - } - } - - foreach ($definition->getTags() as $name => $tags) { - foreach ($tags as $attributes) { - $tag = $this->document->createElement('tag'); - if (!\array_key_exists('name', $attributes)) { - $tag->setAttribute('name', $name); - } else { - $tag->appendChild($this->document->createTextNode($name)); - } - foreach ($attributes as $key => $value) { - $tag->setAttribute($key, $value ?? ''); - } - $service->appendChild($tag); - } - } - - if ($definition->getFile()) { - $file = $this->document->createElement('file'); - $file->appendChild($this->document->createTextNode($definition->getFile())); - $service->appendChild($file); - } - - if ($parameters = $definition->getArguments()) { - $this->convertParameters($parameters, 'argument', $service); - } - - if ($parameters = $definition->getProperties()) { - $this->convertParameters($parameters, 'property', $service, 'name'); - } - - $this->addMethodCalls($definition->getMethodCalls(), $service); - - if ($callable = $definition->getFactory()) { - $factory = $this->document->createElement('factory'); - - if (\is_array($callable) && $callable[0] instanceof Definition) { - $this->addService($callable[0], null, $factory); - $factory->setAttribute('method', $callable[1]); - } elseif (\is_array($callable)) { - if (null !== $callable[0]) { - $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); - } - $factory->setAttribute('method', $callable[1]); - } else { - $factory->setAttribute('function', $callable); - } - $service->appendChild($factory); - } - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation('%service_id%'); - $deprecated = $this->document->createElement('deprecated'); - $deprecated->appendChild($this->document->createTextNode($definition->getDeprecation('%service_id%')['message'])); - $deprecated->setAttribute('package', $deprecation['package']); - $deprecated->setAttribute('version', $deprecation['version']); - - $service->appendChild($deprecated); - } - - if ($definition->isAutowired()) { - $service->setAttribute('autowire', 'true'); - } - - if ($definition->isAutoconfigured()) { - $service->setAttribute('autoconfigure', 'true'); - } - - if ($definition->isAbstract()) { - $service->setAttribute('abstract', 'true'); - } - - if ($callable = $definition->getConfigurator()) { - $configurator = $this->document->createElement('configurator'); - - if (\is_array($callable) && $callable[0] instanceof Definition) { - $this->addService($callable[0], null, $configurator); - $configurator->setAttribute('method', $callable[1]); - } elseif (\is_array($callable)) { - $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); - $configurator->setAttribute('method', $callable[1]); - } else { - $configurator->setAttribute('function', $callable); - } - $service->appendChild($configurator); - } - - $parent->appendChild($service); - } - - private function addServiceAlias(string $alias, Alias $id, \DOMElement $parent) - { - $service = $this->document->createElement('service'); - $service->setAttribute('id', $alias); - $service->setAttribute('alias', $id); - if ($id->isPublic()) { - $service->setAttribute('public', 'true'); - } - - if ($id->isDeprecated()) { - $deprecation = $id->getDeprecation('%alias_id%'); - $deprecated = $this->document->createElement('deprecated'); - $deprecated->appendChild($this->document->createTextNode($deprecation['message'])); - $deprecated->setAttribute('package', $deprecation['package']); - $deprecated->setAttribute('version', $deprecation['version']); - - $service->appendChild($deprecated); - } - - $parent->appendChild($service); - } - - private function addServices(\DOMElement $parent) - { - $definitions = $this->container->getDefinitions(); - if (!$definitions) { - return; - } - - $services = $this->document->createElement('services'); - foreach ($definitions as $id => $definition) { - $this->addService($definition, $id, $services); - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - while (isset($aliases[(string) $id])) { - $id = $aliases[(string) $id]; - } - $this->addServiceAlias($alias, $id, $services); - } - $parent->appendChild($services); - } - - private function convertParameters(array $parameters, string $type, \DOMElement $parent, string $keyAttribute = 'key') - { - $withKeys = !array_is_list($parameters); - foreach ($parameters as $key => $value) { - $element = $this->document->createElement($type); - if ($withKeys) { - $element->setAttribute($keyAttribute, $key); - } - - if (\is_array($tag = $value)) { - $element->setAttribute('type', 'collection'); - $this->convertParameters($value, $type, $element, 'key'); - } elseif ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) { - $element->setAttribute('type', $value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator'); - $element->setAttribute('tag', $tag->getTag()); - - if (null !== $tag->getIndexAttribute()) { - $element->setAttribute('index-by', $tag->getIndexAttribute()); - - if (null !== $tag->getDefaultIndexMethod()) { - $element->setAttribute('default-index-method', $tag->getDefaultIndexMethod()); - } - if (null !== $tag->getDefaultPriorityMethod()) { - $element->setAttribute('default-priority-method', $tag->getDefaultPriorityMethod()); - } - } - } elseif ($value instanceof IteratorArgument) { - $element->setAttribute('type', 'iterator'); - $this->convertParameters($value->getValues(), $type, $element, 'key'); - } elseif ($value instanceof ServiceLocatorArgument) { - $element->setAttribute('type', 'service_locator'); - $this->convertParameters($value->getValues(), $type, $element, 'key'); - } elseif ($value instanceof Reference || $value instanceof ServiceClosureArgument) { - $element->setAttribute('type', 'service'); - if ($value instanceof ServiceClosureArgument) { - $element->setAttribute('type', 'service_closure'); - $value = $value->getValues()[0]; - } - $element->setAttribute('id', (string) $value); - $behavior = $value->getInvalidBehavior(); - if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'null'); - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'ignore'); - } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'ignore_uninitialized'); - } - } elseif ($value instanceof Definition) { - $element->setAttribute('type', 'service'); - $this->addService($value, null, $element); - } elseif ($value instanceof Expression) { - $element->setAttribute('type', 'expression'); - $text = $this->document->createTextNode(self::phpToXml((string) $value)); - $element->appendChild($text); - } elseif (\is_string($value) && !preg_match('/^[^\x00-\x08\x0B\x0E-\x1A\x1C-\x1F\x7F]*+$/u', $value)) { - $element->setAttribute('type', 'binary'); - $text = $this->document->createTextNode(self::phpToXml(base64_encode($value))); - $element->appendChild($text); - } elseif ($value instanceof \UnitEnum) { - $element->setAttribute('type', 'constant'); - $element->appendChild($this->document->createTextNode(self::phpToXml($value))); - } elseif ($value instanceof AbstractArgument) { - $element->setAttribute('type', 'abstract'); - $text = $this->document->createTextNode(self::phpToXml($value->getText())); - $element->appendChild($text); - } else { - if (\in_array($value, ['null', 'true', 'false'], true)) { - $element->setAttribute('type', 'string'); - } - - if (\is_string($value) && (is_numeric($value) || preg_match('/^0b[01]*$/', $value) || preg_match('/^0x[0-9a-f]++$/i', $value))) { - $element->setAttribute('type', 'string'); - } - - $text = $this->document->createTextNode(self::phpToXml($value)); - $element->appendChild($text); - } - $parent->appendChild($element); - } - } - - /** - * Escapes arguments. - */ - private function escape(array $arguments): array - { - $args = []; - foreach ($arguments as $k => $v) { - if (\is_array($v)) { - $args[$k] = $this->escape($v); - } elseif (\is_string($v)) { - $args[$k] = str_replace('%', '%%', $v); - } else { - $args[$k] = $v; - } - } - - return $args; - } - - /** - * Converts php types to xml types. - * - * @param mixed $value Value to convert - * - * @throws RuntimeException When trying to dump object or resource - */ - public static function phpToXml($value): string - { - switch (true) { - case null === $value: - return 'null'; - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case $value instanceof Parameter: - return '%'.$value.'%'; - case $value instanceof \UnitEnum: - return sprintf('%s::%s', \get_class($value), $value->name); - case \is_object($value) || \is_resource($value): - throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); - default: - return (string) $value; - } - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php deleted file mode 100644 index 823eb97..0000000 --- a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php +++ /dev/null @@ -1,375 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Yaml\Dumper as YmlDumper; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Tag\TaggedValue; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlDumper dumps a service container as a YAML string. - * - * @author Fabien Potencier - */ -class YamlDumper extends Dumper -{ - private $dumper; - - /** - * Dumps the service container as an YAML string. - * - * @return string - */ - public function dump(array $options = []) - { - if (!class_exists(\Symfony\Component\Yaml\Dumper::class)) { - throw new LogicException('Unable to dump the container as the Symfony Yaml Component is not installed.'); - } - - if (null === $this->dumper) { - $this->dumper = new YmlDumper(); - } - - return $this->container->resolveEnvPlaceholders($this->addParameters()."\n".$this->addServices()); - } - - private function addService(string $id, Definition $definition): string - { - $code = " $id:\n"; - if ($class = $definition->getClass()) { - if ('\\' === substr($class, 0, 1)) { - $class = substr($class, 1); - } - - $code .= sprintf(" class: %s\n", $this->dumper->dump($class)); - } - - if (!$definition->isPrivate()) { - $code .= sprintf(" public: %s\n", $definition->isPublic() ? 'true' : 'false'); - } - - $tagsCode = ''; - foreach ($definition->getTags() as $name => $tags) { - foreach ($tags as $attributes) { - $att = []; - foreach ($attributes as $key => $value) { - $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value)); - } - $att = $att ? ': { '.implode(', ', $att).' }' : ''; - - $tagsCode .= sprintf(" - %s%s\n", $this->dumper->dump($name), $att); - } - } - if ($tagsCode) { - $code .= " tags:\n".$tagsCode; - } - - if ($definition->getFile()) { - $code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile())); - } - - if ($definition->isSynthetic()) { - $code .= " synthetic: true\n"; - } - - if ($definition->isDeprecated()) { - $code .= " deprecated:\n"; - foreach ($definition->getDeprecation('%service_id%') as $key => $value) { - if ('' !== $value) { - $code .= sprintf(" %s: %s\n", $key, $this->dumper->dump($value)); - } - } - } - - if ($definition->isAutowired()) { - $code .= " autowire: true\n"; - } - - if ($definition->isAutoconfigured()) { - $code .= " autoconfigure: true\n"; - } - - if ($definition->isAbstract()) { - $code .= " abstract: true\n"; - } - - if ($definition->isLazy()) { - $code .= " lazy: true\n"; - } - - if ($definition->getArguments()) { - $code .= sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0)); - } - - if ($definition->getProperties()) { - $code .= sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0)); - } - - if ($definition->getMethodCalls()) { - $code .= sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12)); - } - - if (!$definition->isShared()) { - $code .= " shared: false\n"; - } - - if (null !== $decoratedService = $definition->getDecoratedService()) { - [$decorated, $renamedId, $priority] = $decoratedService; - $code .= sprintf(" decorates: %s\n", $decorated); - if (null !== $renamedId) { - $code .= sprintf(" decoration_inner_name: %s\n", $renamedId); - } - if (0 !== $priority) { - $code .= sprintf(" decoration_priority: %s\n", $priority); - } - - $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE])) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore'; - $code .= sprintf(" decoration_on_invalid: %s\n", $invalidBehavior); - } - } - - if ($callable = $definition->getFactory()) { - $code .= sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); - } - - if ($callable = $definition->getConfigurator()) { - $code .= sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); - } - - return $code; - } - - private function addServiceAlias(string $alias, Alias $id): string - { - $deprecated = ''; - - if ($id->isDeprecated()) { - $deprecated = " deprecated:\n"; - - foreach ($id->getDeprecation('%alias_id%') as $key => $value) { - if ('' !== $value) { - $deprecated .= sprintf(" %s: %s\n", $key, $value); - } - } - } - - if (!$id->isDeprecated() && $id->isPrivate()) { - return sprintf(" %s: '@%s'\n", $alias, $id); - } - - if ($id->isPublic()) { - $deprecated = " public: true\n".$deprecated; - } - - return sprintf(" %s:\n alias: %s\n%s", $alias, $id, $deprecated); - } - - private function addServices(): string - { - if (!$this->container->getDefinitions()) { - return ''; - } - - $code = "services:\n"; - foreach ($this->container->getDefinitions() as $id => $definition) { - $code .= $this->addService($id, $definition); - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - while (isset($aliases[(string) $id])) { - $id = $aliases[(string) $id]; - } - $code .= $this->addServiceAlias($alias, $id); - } - - return $code; - } - - private function addParameters(): string - { - if (!$this->container->getParameterBag()->all()) { - return ''; - } - - $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isCompiled()); - - return $this->dumper->dump(['parameters' => $parameters], 2); - } - - /** - * Dumps callable to YAML format. - * - * @param mixed $callable - * - * @return mixed - */ - private function dumpCallable($callable) - { - if (\is_array($callable)) { - if ($callable[0] instanceof Reference) { - $callable = [$this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]]; - } else { - $callable = [$callable[0], $callable[1]]; - } - } - - return $callable; - } - - /** - * Dumps the value to YAML format. - * - * @return mixed - * - * @throws RuntimeException When trying to dump object or resource - */ - private function dumpValue($value) - { - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - - return new TaggedValue('service_closure', $this->getServiceCall((string) $value, $value)); - } - if ($value instanceof ArgumentInterface) { - $tag = $value; - - if ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) { - if (null === $tag->getIndexAttribute()) { - $content = $tag->getTag(); - } else { - $content = [ - 'tag' => $tag->getTag(), - 'index_by' => $tag->getIndexAttribute(), - ]; - - if (null !== $tag->getDefaultIndexMethod()) { - $content['default_index_method'] = $tag->getDefaultIndexMethod(); - } - if (null !== $tag->getDefaultPriorityMethod()) { - $content['default_priority_method'] = $tag->getDefaultPriorityMethod(); - } - } - - return new TaggedValue($value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator', $content); - } - - if ($value instanceof IteratorArgument) { - $tag = 'iterator'; - } elseif ($value instanceof ServiceLocatorArgument) { - $tag = 'service_locator'; - } else { - throw new RuntimeException(sprintf('Unspecified Yaml tag for type "%s".', get_debug_type($value))); - } - - return new TaggedValue($tag, $this->dumpValue($value->getValues())); - } - - if (\is_array($value)) { - $code = []; - foreach ($value as $k => $v) { - $code[$k] = $this->dumpValue($v); - } - - return $code; - } elseif ($value instanceof Reference) { - return $this->getServiceCall((string) $value, $value); - } elseif ($value instanceof Parameter) { - return $this->getParameterCall((string) $value); - } elseif ($value instanceof Expression) { - return $this->getExpressionCall((string) $value); - } elseif ($value instanceof Definition) { - return new TaggedValue('service', (new Parser())->parse("_:\n".$this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']); - } elseif ($value instanceof \UnitEnum) { - return new TaggedValue('php/const', sprintf('%s::%s', \get_class($value), $value->name)); - } elseif ($value instanceof AbstractArgument) { - return new TaggedValue('abstract', $value->getText()); - } elseif (\is_object($value) || \is_resource($value)) { - throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); - } - - return $value; - } - - private function getServiceCall(string $id, Reference $reference = null): string - { - if (null !== $reference) { - switch ($reference->getInvalidBehavior()) { - case ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: break; - case ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE: break; - case ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE: return sprintf('@!%s', $id); - default: return sprintf('@?%s', $id); - } - } - - return sprintf('@%s', $id); - } - - private function getParameterCall(string $id): string - { - return sprintf('%%%s%%', $id); - } - - private function getExpressionCall(string $expression): string - { - return sprintf('@=%s', $expression); - } - - private function prepareParameters(array $parameters, bool $escape = true): array - { - $filtered = []; - foreach ($parameters as $key => $value) { - if (\is_array($value)) { - $value = $this->prepareParameters($value, $escape); - } elseif ($value instanceof Reference || \is_string($value) && str_starts_with($value, '@')) { - $value = '@'.$value; - } - - $filtered[$key] = $value; - } - - return $escape ? $this->escape($filtered) : $filtered; - } - - private function escape(array $arguments): array - { - $args = []; - foreach ($arguments as $k => $v) { - if (\is_array($v)) { - $args[$k] = $this->escape($v); - } elseif (\is_string($v)) { - $args[$k] = str_replace('%', '%%', $v); - } else { - $args[$k] = $v; - } - } - - return $args; - } -} diff --git a/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php b/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php deleted file mode 100644 index 0c547f8..0000000 --- a/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * EnvVarLoaderInterface objects return key/value pairs that are added to the list of available env vars. - * - * @author Nicolas Grekas - */ -interface EnvVarLoaderInterface -{ - /** - * @return string[] Key/value pairs that can be accessed using the regular "%env()%" syntax - */ - public function loadEnvVars(): array; -} diff --git a/vendor/symfony/dependency-injection/EnvVarProcessor.php b/vendor/symfony/dependency-injection/EnvVarProcessor.php deleted file mode 100644 index 77ac210..0000000 --- a/vendor/symfony/dependency-injection/EnvVarProcessor.php +++ /dev/null @@ -1,304 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Nicolas Grekas - */ -class EnvVarProcessor implements EnvVarProcessorInterface -{ - private $container; - private $loaders; - private $loadedVars = []; - - /** - * @param EnvVarLoaderInterface[] $loaders - */ - public function __construct(ContainerInterface $container, \Traversable $loaders = null) - { - $this->container = $container; - $this->loaders = $loaders ?? new \ArrayIterator(); - } - - /** - * {@inheritdoc} - */ - public static function getProvidedTypes() - { - return [ - 'base64' => 'string', - 'bool' => 'bool', - 'not' => 'bool', - 'const' => 'bool|int|float|string|array', - 'csv' => 'array', - 'file' => 'string', - 'float' => 'float', - 'int' => 'int', - 'json' => 'array', - 'key' => 'bool|int|float|string|array', - 'url' => 'array', - 'query_string' => 'array', - 'resolve' => 'string', - 'default' => 'bool|int|float|string|array', - 'string' => 'string', - 'trim' => 'string', - 'require' => 'bool|int|float|string|array', - ]; - } - - /** - * {@inheritdoc} - */ - public function getEnv(string $prefix, string $name, \Closure $getEnv) - { - $i = strpos($name, ':'); - - if ('key' === $prefix) { - if (false === $i) { - throw new RuntimeException(sprintf('Invalid env "key:%s": a key specifier should be provided.', $name)); - } - - $next = substr($name, $i + 1); - $key = substr($name, 0, $i); - $array = $getEnv($next); - - if (!\is_array($array)) { - throw new RuntimeException(sprintf('Resolved value of "%s" did not result in an array value.', $next)); - } - - if (!isset($array[$key]) && !\array_key_exists($key, $array)) { - throw new EnvNotFoundException(sprintf('Key "%s" not found in %s (resolved from "%s").', $key, json_encode($array), $next)); - } - - return $array[$key]; - } - - if ('default' === $prefix) { - if (false === $i) { - throw new RuntimeException(sprintf('Invalid env "default:%s": a fallback parameter should be provided.', $name)); - } - - $next = substr($name, $i + 1); - $default = substr($name, 0, $i); - - if ('' !== $default && !$this->container->hasParameter($default)) { - throw new RuntimeException(sprintf('Invalid env fallback in "default:%s": parameter "%s" not found.', $name, $default)); - } - - try { - $env = $getEnv($next); - - if ('' !== $env && null !== $env) { - return $env; - } - } catch (EnvNotFoundException $e) { - // no-op - } - - return '' === $default ? null : $this->container->getParameter($default); - } - - if ('file' === $prefix || 'require' === $prefix) { - if (!is_scalar($file = $getEnv($name))) { - throw new RuntimeException(sprintf('Invalid file name: env var "%s" is non-scalar.', $name)); - } - if (!is_file($file)) { - throw new EnvNotFoundException(sprintf('File "%s" not found (resolved from "%s").', $file, $name)); - } - - if ('file' === $prefix) { - return file_get_contents($file); - } else { - return require $file; - } - } - - if (false !== $i || 'string' !== $prefix) { - $env = $getEnv($name); - } elseif (isset($_ENV[$name])) { - $env = $_ENV[$name]; - } elseif (isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')) { - $env = $_SERVER[$name]; - } elseif (false === ($env = getenv($name)) || null === $env) { // null is a possible value because of thread safety issues - foreach ($this->loadedVars as $vars) { - if (false !== $env = ($vars[$name] ?? false)) { - break; - } - } - - if (false === $env || null === $env) { - $loaders = $this->loaders; - $this->loaders = new \ArrayIterator(); - - try { - $i = 0; - $ended = true; - $count = $loaders instanceof \Countable ? $loaders->count() : 0; - foreach ($loaders as $loader) { - if (\count($this->loadedVars) > $i++) { - continue; - } - $this->loadedVars[] = $vars = $loader->loadEnvVars(); - if (false !== $env = $vars[$name] ?? false) { - $ended = false; - break; - } - } - if ($ended || $count === $i) { - $loaders = $this->loaders; - } - } catch (ParameterCircularReferenceException $e) { - // skip loaders that need an env var that is not defined - } finally { - $this->loaders = $loaders; - } - } - - if (false === $env || null === $env) { - if (!$this->container->hasParameter("env($name)")) { - throw new EnvNotFoundException(sprintf('Environment variable not found: "%s".', $name)); - } - - $env = $this->container->getParameter("env($name)"); - } - } - - if (null === $env) { - if (!isset($this->getProvidedTypes()[$prefix])) { - throw new RuntimeException(sprintf('Unsupported env var prefix "%s".', $prefix)); - } - - return null; - } - - if (!is_scalar($env)) { - throw new RuntimeException(sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix)); - } - - if ('string' === $prefix) { - return (string) $env; - } - - if (\in_array($prefix, ['bool', 'not'], true)) { - $env = (bool) (filter_var($env, \FILTER_VALIDATE_BOOLEAN) ?: filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)); - - return 'not' === $prefix ? !$env : $env; - } - - if ('int' === $prefix) { - if (false === $env = filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)) { - throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to int.', $name)); - } - - return (int) $env; - } - - if ('float' === $prefix) { - if (false === $env = filter_var($env, \FILTER_VALIDATE_FLOAT)) { - throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to float.', $name)); - } - - return (float) $env; - } - - if ('const' === $prefix) { - if (!\defined($env)) { - throw new RuntimeException(sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env)); - } - - return \constant($env); - } - - if ('base64' === $prefix) { - return base64_decode(strtr($env, '-_', '+/')); - } - - if ('json' === $prefix) { - $env = json_decode($env, true); - - if (\JSON_ERROR_NONE !== json_last_error()) { - throw new RuntimeException(sprintf('Invalid JSON in env var "%s": ', $name).json_last_error_msg()); - } - - if (null !== $env && !\is_array($env)) { - throw new RuntimeException(sprintf('Invalid JSON env var "%s": array or null expected, "%s" given.', $name, get_debug_type($env))); - } - - return $env; - } - - if ('url' === $prefix) { - $parsedEnv = parse_url($env); - - if (false === $parsedEnv) { - throw new RuntimeException(sprintf('Invalid URL in env var "%s".', $name)); - } - if (!isset($parsedEnv['scheme'], $parsedEnv['host'])) { - throw new RuntimeException(sprintf('Invalid URL env var "%s": schema and host expected, "%s" given.', $name, $env)); - } - $parsedEnv += [ - 'port' => null, - 'user' => null, - 'pass' => null, - 'path' => null, - 'query' => null, - 'fragment' => null, - ]; - - // remove the '/' separator - $parsedEnv['path'] = '/' === ($parsedEnv['path'] ?? '/') ? '' : substr($parsedEnv['path'], 1); - - return $parsedEnv; - } - - if ('query_string' === $prefix) { - $queryString = parse_url($env, \PHP_URL_QUERY) ?: $env; - parse_str($queryString, $result); - - return $result; - } - - if ('resolve' === $prefix) { - return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($name, $getEnv) { - if (!isset($match[1])) { - return '%'; - } - - if (str_starts_with($match[1], 'env(') && str_ends_with($match[1], ')') && 'env()' !== $match[1]) { - $value = $getEnv(substr($match[1], 4, -1)); - } else { - $value = $this->container->getParameter($match[1]); - } - - if (!is_scalar($value)) { - throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, get_debug_type($value))); - } - - return $value; - }, $env); - } - - if ('csv' === $prefix) { - return str_getcsv($env, ',', '"', \PHP_VERSION_ID >= 70400 ? '' : '\\'); - } - - if ('trim' === $prefix) { - return trim($env); - } - - throw new RuntimeException(sprintf('Unsupported env var prefix "%s" for env name "%s".', $prefix, $name)); - } -} diff --git a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php b/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php deleted file mode 100644 index d3275fe..0000000 --- a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * The EnvVarProcessorInterface is implemented by objects that manage environment-like variables. - * - * @author Nicolas Grekas - */ -interface EnvVarProcessorInterface -{ - /** - * Returns the value of the given variable as managed by the current instance. - * - * @param string $prefix The namespace of the variable - * @param string $name The name of the variable within the namespace - * @param \Closure $getEnv A closure that allows fetching more env vars - * - * @return mixed - * - * @throws RuntimeException on error - */ - public function getEnv(string $prefix, string $name, \Closure $getEnv); - - /** - * @return string[] The PHP-types managed by getEnv(), keyed by prefixes - */ - public static function getProvidedTypes(); -} diff --git a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php deleted file mode 100644 index 0006f56..0000000 --- a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Thrown when a definition cannot be autowired. - */ -class AutowiringFailedException extends RuntimeException -{ - private $serviceId; - private $messageCallback; - - public function __construct(string $serviceId, $message = '', int $code = 0, \Throwable $previous = null) - { - $this->serviceId = $serviceId; - - if ($message instanceof \Closure - && (\function_exists('xdebug_is_enabled') ? xdebug_is_enabled() : \function_exists('xdebug_info')) - ) { - $message = $message(); - } - - if (!$message instanceof \Closure) { - parent::__construct($message, $code, $previous); - - return; - } - - $this->messageCallback = $message; - parent::__construct('', $code, $previous); - - $this->message = new class($this->message, $this->messageCallback) { - private $message; - private $messageCallback; - - public function __construct(&$message, &$messageCallback) - { - $this->message = &$message; - $this->messageCallback = &$messageCallback; - } - - public function __toString(): string - { - $messageCallback = $this->messageCallback; - $this->messageCallback = null; - - try { - return $this->message = $messageCallback(); - } catch (\Throwable $e) { - return $this->message = $e->getMessage(); - } - } - }; - } - - public function getMessageCallback(): ?\Closure - { - return $this->messageCallback; - } - - public function getServiceId() - { - return $this->serviceId; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php deleted file mode 100644 index 959238e..0000000 --- a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base BadMethodCallException for Dependency Injection component. - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php deleted file mode 100644 index 04ac848..0000000 --- a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when an environment variable is not found. - * - * @author Nicolas Grekas - */ -class EnvNotFoundException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/vendor/symfony/dependency-injection/Exception/EnvParameterException.php deleted file mode 100644 index 48b5e48..0000000 --- a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception wraps exceptions whose messages contain a reference to an env parameter. - * - * @author Nicolas Grekas - */ -class EnvParameterException extends InvalidArgumentException -{ - public function __construct(array $envs, \Throwable $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.') - { - parent::__construct(sprintf($message, implode('", "', $envs)), 0, $previous); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php deleted file mode 100644 index 6202df7..0000000 --- a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\ContainerExceptionInterface; - -/** - * Base ExceptionInterface for Dependency Injection component. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - */ -interface ExceptionInterface extends ContainerExceptionInterface, \Throwable -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php deleted file mode 100644 index 119bb7d..0000000 --- a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base InvalidArgumentException for Dependency Injection component. - * - * @author Bulat Shakirzyanov - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php b/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php deleted file mode 100644 index 2a11626..0000000 --- a/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Thrown when trying to inject a parameter into a constructor/method with an incompatible type. - * - * @author Nicolas Grekas - * @author Julien Maulny - */ -class InvalidParameterTypeException extends InvalidArgumentException -{ - public function __construct(string $serviceId, string $type, \ReflectionParameter $parameter) - { - $acceptedType = $parameter->getType(); - $acceptedType = $acceptedType instanceof \ReflectionNamedType ? $acceptedType->getName() : (string) $acceptedType; - $this->code = $type; - - $function = $parameter->getDeclaringFunction(); - $functionName = $function instanceof \ReflectionMethod - ? sprintf('%s::%s', $function->getDeclaringClass()->getName(), $function->getName()) - : $function->getName(); - - parent::__construct(sprintf('Invalid definition for service "%s": argument %d of "%s()" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $functionName, $acceptedType, $type)); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/LogicException.php b/vendor/symfony/dependency-injection/Exception/LogicException.php deleted file mode 100644 index 17a070c..0000000 --- a/vendor/symfony/dependency-injection/Exception/LogicException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base LogicException for Dependency Injection component. - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php b/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php deleted file mode 100644 index a61f143..0000000 --- a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base OutOfBoundsException for Dependency Injection component. - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php deleted file mode 100644 index 2450ccb..0000000 --- a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when a circular reference in a parameter is detected. - * - * @author Fabien Potencier - */ -class ParameterCircularReferenceException extends RuntimeException -{ - private $parameters; - - public function __construct(array $parameters, \Throwable $previous = null) - { - parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous); - - $this->parameters = $parameters; - } - - public function getParameters() - { - return $this->parameters; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php deleted file mode 100644 index 5d38310..0000000 --- a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * This exception is thrown when a non-existent parameter is used. - * - * @author Fabien Potencier - */ -class ParameterNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface -{ - private $key; - private $sourceId; - private $sourceKey; - private $alternatives; - private $nonNestedAlternative; - - /** - * @param string $key The requested parameter key - * @param string|null $sourceId The service id that references the non-existent parameter - * @param string|null $sourceKey The parameter key that references the non-existent parameter - * @param \Throwable|null $previous The previous exception - * @param string[] $alternatives Some parameter name alternatives - * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters - */ - public function __construct(string $key, string $sourceId = null, string $sourceKey = null, \Throwable $previous = null, array $alternatives = [], string $nonNestedAlternative = null) - { - $this->key = $key; - $this->sourceId = $sourceId; - $this->sourceKey = $sourceKey; - $this->alternatives = $alternatives; - $this->nonNestedAlternative = $nonNestedAlternative; - - parent::__construct('', 0, $previous); - - $this->updateRepr(); - } - - public function updateRepr() - { - if (null !== $this->sourceId) { - $this->message = sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key); - } elseif (null !== $this->sourceKey) { - $this->message = sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key); - } else { - $this->message = sprintf('You have requested a non-existent parameter "%s".', $this->key); - } - - if ($this->alternatives) { - if (1 == \count($this->alternatives)) { - $this->message .= ' Did you mean this: "'; - } else { - $this->message .= ' Did you mean one of these: "'; - } - $this->message .= implode('", "', $this->alternatives).'"?'; - } elseif (null !== $this->nonNestedAlternative) { - $this->message .= ' You cannot access nested array items, do you want to inject "'.$this->nonNestedAlternative.'" instead?'; - } - } - - public function getKey() - { - return $this->key; - } - - public function getSourceId() - { - return $this->sourceId; - } - - public function getSourceKey() - { - return $this->sourceKey; - } - - public function setSourceId(?string $sourceId) - { - $this->sourceId = $sourceId; - - $this->updateRepr(); - } - - public function setSourceKey(?string $sourceKey) - { - $this->sourceKey = $sourceKey; - - $this->updateRepr(); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/RuntimeException.php b/vendor/symfony/dependency-injection/Exception/RuntimeException.php deleted file mode 100644 index 5c24541..0000000 --- a/vendor/symfony/dependency-injection/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base RuntimeException for Dependency Injection component. - * - * @author Johannes M. Schmitt - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php deleted file mode 100644 index a38671b..0000000 --- a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when a circular reference is detected. - * - * @author Johannes M. Schmitt - */ -class ServiceCircularReferenceException extends RuntimeException -{ - private $serviceId; - private $path; - - public function __construct(string $serviceId, array $path, \Throwable $previous = null) - { - parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous); - - $this->serviceId = $serviceId; - $this->path = $path; - } - - public function getServiceId() - { - return $this->serviceId; - } - - public function getPath() - { - return $this->path; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php deleted file mode 100644 index f91afae..0000000 --- a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * This exception is thrown when a non-existent service is requested. - * - * @author Johannes M. Schmitt - */ -class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface -{ - private $id; - private $sourceId; - private $alternatives; - - public function __construct(string $id, string $sourceId = null, \Throwable $previous = null, array $alternatives = [], string $msg = null) - { - if (null !== $msg) { - // no-op - } elseif (null === $sourceId) { - $msg = sprintf('You have requested a non-existent service "%s".', $id); - } else { - $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id); - } - - if ($alternatives) { - if (1 == \count($alternatives)) { - $msg .= ' Did you mean this: "'; - } else { - $msg .= ' Did you mean one of these: "'; - } - $msg .= implode('", "', $alternatives).'"?'; - } - - parent::__construct($msg, 0, $previous); - - $this->id = $id; - $this->sourceId = $sourceId; - $this->alternatives = $alternatives; - } - - public function getId() - { - return $this->id; - } - - public function getSourceId() - { - return $this->sourceId; - } - - public function getAlternatives() - { - return $this->alternatives; - } -} diff --git a/vendor/symfony/dependency-injection/ExpressionLanguage.php b/vendor/symfony/dependency-injection/ExpressionLanguage.php deleted file mode 100644 index 961c737..0000000 --- a/vendor/symfony/dependency-injection/ExpressionLanguage.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage; - -if (!class_exists(BaseExpressionLanguage::class)) { - return; -} - -/** - * Adds some function to the default ExpressionLanguage. - * - * @author Fabien Potencier - * - * @see ExpressionLanguageProvider - */ -class ExpressionLanguage extends BaseExpressionLanguage -{ - /** - * {@inheritdoc} - */ - public function __construct(CacheItemPoolInterface $cache = null, array $providers = [], callable $serviceCompiler = null) - { - // prepend the default provider to let users override it easily - array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler)); - - parent::__construct($cache, $providers); - } -} diff --git a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php b/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php deleted file mode 100644 index 9198ca0..0000000 --- a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\ExpressionLanguage\ExpressionFunction; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; - -/** - * Define some ExpressionLanguage functions. - * - * To get a service, use service('request'). - * To get a parameter, use parameter('kernel.debug'). - * - * @author Fabien Potencier - */ -class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface -{ - private $serviceCompiler; - - public function __construct(callable $serviceCompiler = null) - { - $this->serviceCompiler = $serviceCompiler; - } - - public function getFunctions() - { - return [ - new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) { - return sprintf('$this->get(%s)', $arg); - }, function (array $variables, $value) { - return $variables['container']->get($value); - }), - - new ExpressionFunction('parameter', function ($arg) { - return sprintf('$this->getParameter(%s)', $arg); - }, function (array $variables, $value) { - return $variables['container']->getParameter($value); - }), - ]; - } -} diff --git a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php deleted file mode 100644 index a42967f..0000000 --- a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ConfigurationExtensionInterface is the interface implemented by container extension classes. - * - * @author Kevin Bond - */ -interface ConfigurationExtensionInterface -{ - /** - * Returns extension configuration. - * - * @return ConfigurationInterface|null - */ - public function getConfiguration(array $config, ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/Extension/Extension.php b/vendor/symfony/dependency-injection/Extension/Extension.php deleted file mode 100644 index ef6c1aa..0000000 --- a/vendor/symfony/dependency-injection/Extension/Extension.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * Provides useful features shared by many extensions. - * - * @author Fabien Potencier - */ -abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface -{ - private $processedConfigs = []; - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function getNamespace() - { - return 'http://example.org/schema/dic/'.$this->getAlias(); - } - - /** - * Returns the recommended alias to use in XML. - * - * This alias is also the mandatory prefix to use when using YAML. - * - * This convention is to remove the "Extension" postfix from the class - * name and then lowercase and underscore the result. So: - * - * AcmeHelloExtension - * - * becomes - * - * acme_hello - * - * This can be overridden in a sub-class to specify the alias manually. - * - * @return string - * - * @throws BadMethodCallException When the extension name does not follow conventions - */ - public function getAlias() - { - $className = static::class; - if (!str_ends_with($className, 'Extension')) { - throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.'); - } - $classBaseName = substr(strrchr($className, '\\'), 1, -9); - - return Container::underscore($classBaseName); - } - - /** - * {@inheritdoc} - */ - public function getConfiguration(array $config, ContainerBuilder $container) - { - $class = static::class; - - if (str_contains($class, "\0")) { - return null; // ignore anonymous classes - } - - $class = substr_replace($class, '\Configuration', strrpos($class, '\\')); - $class = $container->getReflectionClass($class); - - if (!$class) { - return null; - } - - if (!$class->implementsInterface(ConfigurationInterface::class)) { - throw new LogicException(sprintf('The extension configuration class "%s" must implement "%s".', $class->getName(), ConfigurationInterface::class)); - } - - if (!($constructor = $class->getConstructor()) || !$constructor->getNumberOfRequiredParameters()) { - return $class->newInstance(); - } - - return null; - } - - final protected function processConfiguration(ConfigurationInterface $configuration, array $configs): array - { - $processor = new Processor(); - - return $this->processedConfigs[] = $processor->processConfiguration($configuration, $configs); - } - - /** - * @internal - */ - final public function getProcessedConfigs(): array - { - try { - return $this->processedConfigs; - } finally { - $this->processedConfigs = []; - } - } - - /** - * @return bool - * - * @throws InvalidArgumentException When the config is not enableable - */ - protected function isConfigEnabled(ContainerBuilder $container, array $config) - { - if (!\array_key_exists('enabled', $config)) { - throw new InvalidArgumentException("The config array has no 'enabled' key."); - } - - return (bool) $container->getParameterBag()->resolveValue($config['enabled']); - } -} diff --git a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php deleted file mode 100644 index f2373ed..0000000 --- a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ExtensionInterface is the interface implemented by container extension classes. - * - * @author Fabien Potencier - */ -interface ExtensionInterface -{ - /** - * Loads a specific configuration. - * - * @throws \InvalidArgumentException When provided tag is not defined in this extension - */ - public function load(array $configs, ContainerBuilder $container); - - /** - * Returns the namespace to be used for this extension (XML namespace). - * - * @return string - */ - public function getNamespace(); - - /** - * Returns the base path for the XSD files. - * - * @return string|false - */ - public function getXsdValidationBasePath(); - - /** - * Returns the recommended alias to use in XML. - * - * This alias is also the mandatory prefix to use when using YAML. - * - * @return string - */ - public function getAlias(); -} diff --git a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php deleted file mode 100644 index 5bd18d7..0000000 --- a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -interface PrependExtensionInterface -{ - /** - * Allow an extension to prepend the extension configurations. - */ - public function prepend(ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/LICENSE b/vendor/symfony/dependency-injection/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/dependency-injection/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php deleted file mode 100644 index a9d7811..0000000 --- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Lazy proxy instantiator, capable of instantiating a proxy given a container, the - * service definitions and a callback that produces the real service instance. - * - * @author Marco Pivetta - */ -interface InstantiatorInterface -{ - /** - * Instantiates a proxy object. - * - * @param string $id Identifier of the requested service - * @param callable $realInstantiator Zero-argument callback that is capable of producing the real service instance - * - * @return object - */ - public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator); -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php deleted file mode 100644 index 1696e7a..0000000 --- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; - -/** - * {@inheritdoc} - * - * Noop proxy instantiator - produces the real service instead of a proxy instance. - * - * @author Marco Pivetta - */ -class RealServiceInstantiator implements InstantiatorInterface -{ - /** - * {@inheritdoc} - */ - public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator) - { - return $realInstantiator(); - } -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php deleted file mode 100644 index 351560d..0000000 --- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services. - * - * @author Marco Pivetta - */ -interface DumperInterface -{ - /** - * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. - * - * @return bool - */ - public function isProxyCandidate(Definition $definition); - - /** - * Generates the code to be used to instantiate a proxy in the dumped factory code. - * - * @return string - */ - public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode); - - /** - * Generates the code for the lazy proxy. - * - * @return string - */ - public function getProxyCode(Definition $definition); -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php deleted file mode 100644 index 7e0f14c..0000000 --- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Null dumper, negates any proxy code generation for any given service definition. - * - * @author Marco Pivetta - * - * @final - */ -class NullDumper implements DumperInterface -{ - /** - * {@inheritdoc} - */ - public function isProxyCandidate(Definition $definition): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string - { - return ''; - } - - /** - * {@inheritdoc} - */ - public function getProxyCode(Definition $definition): string - { - return ''; - } -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php b/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php deleted file mode 100644 index 8eb45b5..0000000 --- a/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ProxyHelper -{ - /** - * @return string|null The FQCN or builtin name of the type hint, or null when the type hint references an invalid self|parent context - */ - public static function getTypeHint(\ReflectionFunctionAbstract $r, \ReflectionParameter $p = null, bool $noBuiltin = false): ?string - { - if ($p instanceof \ReflectionParameter) { - $type = $p->getType(); - } else { - $type = $r->getReturnType(); - } - if (!$type) { - return null; - } - - $types = []; - $glue = '|'; - if ($type instanceof \ReflectionUnionType) { - $reflectionTypes = $type->getTypes(); - } elseif ($type instanceof \ReflectionIntersectionType) { - $reflectionTypes = $type->getTypes(); - $glue = '&'; - } elseif ($type instanceof \ReflectionNamedType) { - $reflectionTypes = [$type]; - } else { - return null; - } - - foreach ($reflectionTypes as $type) { - if ($type->isBuiltin()) { - if (!$noBuiltin) { - $types[] = $type->getName(); - } - continue; - } - - $lcName = strtolower($type->getName()); - $prefix = $noBuiltin ? '' : '\\'; - - if ('self' !== $lcName && 'parent' !== $lcName) { - $types[] = $prefix.$type->getName(); - continue; - } - if (!$r instanceof \ReflectionMethod) { - continue; - } - if ('self' === $lcName) { - $types[] = $prefix.$r->getDeclaringClass()->name; - } else { - $types[] = ($parent = $r->getDeclaringClass()->getParentClass()) ? $prefix.$parent->name : null; - } - } - - sort($types); - - return $types ? implode($glue, $types) : null; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php deleted file mode 100644 index fe2b91a..0000000 --- a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ClosureLoader loads service definitions from a PHP closure. - * - * The Closure has access to the container as its first argument. - * - * @author Fabien Potencier - */ -class ClosureLoader extends Loader -{ - private $container; - - public function __construct(ContainerBuilder $container, string $env = null) - { - $this->container = $container; - parent::__construct($env); - } - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - return $resource($this->container, $this->env); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return $resource instanceof \Closure; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php deleted file mode 100644 index e5b1888..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -abstract class AbstractConfigurator -{ - public const FACTORY = 'unknown'; - - /** - * @var callable(mixed, bool $allowService)|null - */ - public static $valuePreProcessor; - - /** @internal */ - protected $definition; - - public function __call(string $method, array $args) - { - if (method_exists($this, 'set'.$method)) { - return $this->{'set'.$method}(...$args); - } - - throw new \BadMethodCallException(sprintf('Call to undefined method "%s::%s()".', static::class, $method)); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value. - * - * @param mixed $value - * @param bool $allowServices whether Definition and Reference are allowed; by default, only scalars and arrays are - * - * @return mixed the value, optionally cast to a Definition/Reference - */ - public static function processValue($value, $allowServices = false) - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = static::processValue($v, $allowServices); - } - - return self::$valuePreProcessor ? (self::$valuePreProcessor)($value, $allowServices) : $value; - } - - if (self::$valuePreProcessor) { - $value = (self::$valuePreProcessor)($value, $allowServices); - } - - if ($value instanceof ReferenceConfigurator) { - $reference = new Reference($value->id, $value->invalidBehavior); - - return $value instanceof ClosureReferenceConfigurator ? new ServiceClosureArgument($reference) : $reference; - } - - if ($value instanceof InlineServiceConfigurator) { - $def = $value->definition; - $value->definition = null; - - return $def; - } - - if ($value instanceof ParamConfigurator) { - return (string) $value; - } - - if ($value instanceof self) { - throw new InvalidArgumentException(sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY)); - } - - switch (true) { - case null === $value: - case is_scalar($value): - return $value; - - case $value instanceof ArgumentInterface: - case $value instanceof Definition: - case $value instanceof Expression: - case $value instanceof Parameter: - case $value instanceof AbstractArgument: - case $value instanceof Reference: - if ($allowServices) { - return $value; - } - } - - throw new InvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', get_debug_type($value))); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php deleted file mode 100644 index 96d6fd7..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -abstract class AbstractServiceConfigurator extends AbstractConfigurator -{ - protected $parent; - protected $id; - private $defaultTags = []; - - public function __construct(ServicesConfigurator $parent, Definition $definition, string $id = null, array $defaultTags = []) - { - $this->parent = $parent; - $this->definition = $definition; - $this->id = $id; - $this->defaultTags = $defaultTags; - } - - public function __destruct() - { - // default tags should be added last - foreach ($this->defaultTags as $name => $attributes) { - foreach ($attributes as $attribute) { - $this->definition->addTag($name, $attribute); - } - } - $this->defaultTags = []; - } - - /** - * Registers a service. - */ - final public function set(?string $id, string $class = null): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->set($id, $class); - } - - /** - * Creates an alias. - */ - final public function alias(string $id, string $referencedId): AliasConfigurator - { - $this->__destruct(); - - return $this->parent->alias($id, $referencedId); - } - - /** - * Registers a PSR-4 namespace using a glob pattern. - */ - final public function load(string $namespace, string $resource): PrototypeConfigurator - { - $this->__destruct(); - - return $this->parent->load($namespace, $resource); - } - - /** - * Gets an already defined service definition. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - final public function get(string $id): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->get($id); - } - - /** - * Removes an already defined service definition or alias. - */ - final public function remove(string $id): ServicesConfigurator - { - $this->__destruct(); - - return $this->parent->remove($id); - } - - /** - * Registers a stack of decorator services. - * - * @param InlineServiceConfigurator[]|ReferenceConfigurator[] $services - */ - final public function stack(string $id, array $services): AliasConfigurator - { - $this->__destruct(); - - return $this->parent->stack($id, $services); - } - - /** - * Registers a service. - */ - final public function __invoke(string $id, string $class = null): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->set($id, $class); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php deleted file mode 100644 index 650a956..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Alias; - -/** - * @author Nicolas Grekas - */ -class AliasConfigurator extends AbstractServiceConfigurator -{ - use Traits\DeprecateTrait; - use Traits\PublicTrait; - - public const FACTORY = 'alias'; - - public function __construct(ServicesConfigurator $parent, Alias $alias) - { - $this->parent = $parent; - $this->definition = $alias; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php deleted file mode 100644 index ba83d91..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -class ClosureReferenceConfigurator extends ReferenceConfigurator -{ -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php deleted file mode 100644 index ac6fdb6..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -class ContainerConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'container'; - - private $container; - private $loader; - private $instanceof; - private $path; - private $file; - private $anonymousCount = 0; - private $env; - - public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof, string $path, string $file, string $env = null) - { - $this->container = $container; - $this->loader = $loader; - $this->instanceof = &$instanceof; - $this->path = $path; - $this->file = $file; - $this->env = $env; - } - - final public function extension(string $namespace, array $config) - { - if (!$this->container->hasExtension($namespace)) { - $extensions = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getAlias(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $this->file, $namespace, $extensions ? implode('", "', $extensions) : 'none')); - } - - $this->container->loadFromExtension($namespace, static::processValue($config)); - } - - final public function import(string $resource, string $type = null, $ignoreErrors = false) - { - $this->loader->setCurrentDir(\dirname($this->path)); - $this->loader->import($resource, $type, $ignoreErrors, $this->file); - } - - final public function parameters(): ParametersConfigurator - { - return new ParametersConfigurator($this->container); - } - - final public function services(): ServicesConfigurator - { - return new ServicesConfigurator($this->container, $this->loader, $this->instanceof, $this->path, $this->anonymousCount); - } - - /** - * Get the current environment to be able to write conditional configuration. - */ - final public function env(): ?string - { - return $this->env; - } - - /** - * @return static - */ - final public function withPath(string $path): self - { - $clone = clone $this; - $clone->path = $clone->file = $path; - $clone->loader->setCurrentDir(\dirname($path)); - - return $clone; - } -} - -/** - * Creates a parameter. - */ -function param(string $name): ParamConfigurator -{ - return new ParamConfigurator($name); -} - -/** - * Creates a service reference. - * - * @deprecated since Symfony 5.1, use service() instead. - */ -function ref(string $id): ReferenceConfigurator -{ - trigger_deprecation('symfony/dependency-injection', '5.1', '"%s()" is deprecated, use "service()" instead.', __FUNCTION__); - - return new ReferenceConfigurator($id); -} - -/** - * Creates a reference to a service. - */ -function service(string $serviceId): ReferenceConfigurator -{ - return new ReferenceConfigurator($serviceId); -} - -/** - * Creates an inline service. - * - * @deprecated since Symfony 5.1, use inline_service() instead. - */ -function inline(string $class = null): InlineServiceConfigurator -{ - trigger_deprecation('symfony/dependency-injection', '5.1', '"%s()" is deprecated, use "inline_service()" instead.', __FUNCTION__); - - return new InlineServiceConfigurator(new Definition($class)); -} - -/** - * Creates an inline service. - */ -function inline_service(string $class = null): InlineServiceConfigurator -{ - return new InlineServiceConfigurator(new Definition($class)); -} - -/** - * Creates a service locator. - * - * @param ReferenceConfigurator[] $values - */ -function service_locator(array $values): ServiceLocatorArgument -{ - return new ServiceLocatorArgument(AbstractConfigurator::processValue($values, true)); -} - -/** - * Creates a lazy iterator. - * - * @param ReferenceConfigurator[] $values - */ -function iterator(array $values): IteratorArgument -{ - return new IteratorArgument(AbstractConfigurator::processValue($values, true)); -} - -/** - * Creates a lazy iterator by tag name. - */ -function tagged_iterator(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, string $defaultPriorityMethod = null): TaggedIteratorArgument -{ - return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, false, $defaultPriorityMethod); -} - -/** - * Creates a service locator by tag name. - */ -function tagged_locator(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, string $defaultPriorityMethod = null): ServiceLocatorArgument -{ - return new ServiceLocatorArgument(new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, true, $defaultPriorityMethod)); -} - -/** - * Creates an expression. - */ -function expr(string $expression): Expression -{ - return new Expression($expression); -} - -/** - * Creates an abstract argument. - */ -function abstract_arg(string $description): AbstractArgument -{ - return new AbstractArgument($description); -} - -/** - * Creates an environment variable reference. - */ -function env(string $name): EnvConfigurator -{ - return new EnvConfigurator($name); -} - -/** - * Creates a closure service reference. - */ -function service_closure(string $serviceId): ClosureReferenceConfigurator -{ - return new ClosureReferenceConfigurator($serviceId); -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php deleted file mode 100644 index 49a92e5..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - */ -class DefaultsConfigurator extends AbstractServiceConfigurator -{ - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\PublicTrait; - - public const FACTORY = 'defaults'; - - private $path; - - public function __construct(ServicesConfigurator $parent, Definition $definition, string $path = null) - { - parent::__construct($parent, $definition, null, []); - - $this->path = $path; - } - - /** - * Adds a tag for this definition. - * - * @return $this - * - * @throws InvalidArgumentException when an invalid tag name or attribute is provided - */ - final public function tag(string $name, array $attributes = []): self - { - if ('' === $name) { - throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); - } - - foreach ($attributes as $attribute => $value) { - if (null !== $value && !is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute)); - } - } - - $this->definition->addTag($name, $attributes); - - return $this; - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): InstanceofConfigurator - { - return $this->parent->instanceof($fqcn); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php deleted file mode 100644 index d1864f5..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; - -class EnvConfigurator extends ParamConfigurator -{ - /** - * @var string[] - */ - private $stack; - - public function __construct(string $name) - { - $this->stack = explode(':', $name); - } - - public function __toString(): string - { - return '%env('.implode(':', $this->stack).')%'; - } - - /** - * @return $this - */ - public function __call(string $name, array $arguments): self - { - $processor = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $name)); - - $this->custom($processor, ...$arguments); - - return $this; - } - - /** - * @return $this - */ - public function custom(string $processor, ...$args): self - { - array_unshift($this->stack, $processor, ...$args); - - return $this; - } - - /** - * @return $this - */ - public function base64(): self - { - array_unshift($this->stack, 'base64'); - - return $this; - } - - /** - * @return $this - */ - public function bool(): self - { - array_unshift($this->stack, 'bool'); - - return $this; - } - - /** - * @return $this - */ - public function not(): self - { - array_unshift($this->stack, 'not'); - - return $this; - } - - /** - * @return $this - */ - public function const(): self - { - array_unshift($this->stack, 'const'); - - return $this; - } - - /** - * @return $this - */ - public function csv(): self - { - array_unshift($this->stack, 'csv'); - - return $this; - } - - /** - * @return $this - */ - public function file(): self - { - array_unshift($this->stack, 'file'); - - return $this; - } - - /** - * @return $this - */ - public function float(): self - { - array_unshift($this->stack, 'float'); - - return $this; - } - - /** - * @return $this - */ - public function int(): self - { - array_unshift($this->stack, 'int'); - - return $this; - } - - /** - * @return $this - */ - public function json(): self - { - array_unshift($this->stack, 'json'); - - return $this; - } - - /** - * @return $this - */ - public function key(string $key): self - { - array_unshift($this->stack, 'key', $key); - - return $this; - } - - /** - * @return $this - */ - public function url(): self - { - array_unshift($this->stack, 'url'); - - return $this; - } - - /** - * @return $this - */ - public function queryString(): self - { - array_unshift($this->stack, 'query_string'); - - return $this; - } - - /** - * @return $this - */ - public function resolve(): self - { - array_unshift($this->stack, 'resolve'); - - return $this; - } - - /** - * @return $this - */ - public function default(string $fallbackParam): self - { - array_unshift($this->stack, 'default', $fallbackParam); - - return $this; - } - - /** - * @return $this - */ - public function string(): self - { - array_unshift($this->stack, 'string'); - - return $this; - } - - /** - * @return $this - */ - public function trim(): self - { - array_unshift($this->stack, 'trim'); - - return $this; - } - - /** - * @return $this - */ - public function require(): self - { - array_unshift($this->stack, 'require'); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php deleted file mode 100644 index da90a0a..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class InlineServiceConfigurator extends AbstractConfigurator -{ - use Traits\ArgumentTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\FactoryTrait; - use Traits\FileTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\TagTrait; - - public const FACTORY = 'service'; - - private $id = '[inline]'; - private $allowParent = true; - private $path = null; - - public function __construct(Definition $definition) - { - $this->definition = $definition; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php deleted file mode 100644 index fbba623..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class InstanceofConfigurator extends AbstractServiceConfigurator -{ - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\LazyTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\TagTrait; - - public const FACTORY = 'instanceof'; - - private $path; - - public function __construct(ServicesConfigurator $parent, Definition $definition, string $id, string $path = null) - { - parent::__construct($parent, $definition, $id, []); - - $this->path = $path; - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): self - { - return $this->parent->instanceof($fqcn); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php deleted file mode 100644 index f0cf177..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -class ParametersConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'parameters'; - - private $container; - - public function __construct(ContainerBuilder $container) - { - $this->container = $container; - } - - /** - * Creates a parameter. - * - * @return $this - */ - final public function set(string $name, $value): self - { - if ($value instanceof Expression) { - throw new InvalidArgumentException(sprintf('Using an expression in parameter "%s" is not allowed.', $name)); - } - - $this->container->setParameter($name, static::processValue($value, true)); - - return $this; - } - - /** - * Creates a parameter. - * - * @return $this - */ - final public function __invoke(string $name, $value): self - { - return $this->set($name, $value); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php deleted file mode 100644 index e1b3702..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; - -/** - * @author Nicolas Grekas - */ -class PrototypeConfigurator extends AbstractServiceConfigurator -{ - use Traits\AbstractTrait; - use Traits\ArgumentTrait; - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\DeprecateTrait; - use Traits\FactoryTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\TagTrait; - - public const FACTORY = 'load'; - - private $loader; - private $resource; - private $excludes; - private $allowParent; - - public function __construct(ServicesConfigurator $parent, PhpFileLoader $loader, Definition $defaults, string $namespace, string $resource, bool $allowParent) - { - $definition = new Definition(); - if (!$defaults->isPublic() || !$defaults->isPrivate()) { - $definition->setPublic($defaults->isPublic()); - } - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - // deep clone, to avoid multiple process of the same instance in the passes - $definition->setBindings(unserialize(serialize($defaults->getBindings()))); - $definition->setChanges([]); - - $this->loader = $loader; - $this->resource = $resource; - $this->allowParent = $allowParent; - - parent::__construct($parent, $definition, $namespace, $defaults->getTags()); - } - - public function __destruct() - { - parent::__destruct(); - - if ($this->loader) { - $this->loader->registerClasses($this->definition, $this->id, $this->resource, $this->excludes); - } - $this->loader = null; - } - - /** - * Excludes files from registration using glob patterns. - * - * @param string[]|string $excludes - * - * @return $this - */ - final public function exclude($excludes): self - { - $this->excludes = (array) $excludes; - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php deleted file mode 100644 index fa04253..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * @author Nicolas Grekas - */ -class ReferenceConfigurator extends AbstractConfigurator -{ - /** @internal */ - protected $id; - - /** @internal */ - protected $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - - public function __construct(string $id) - { - $this->id = $id; - } - - /** - * @return $this - */ - final public function ignoreOnInvalid(): self - { - $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - - return $this; - } - - /** - * @return $this - */ - final public function nullOnInvalid(): self - { - $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - - return $this; - } - - /** - * @return $this - */ - final public function ignoreOnUninitialized(): self - { - $this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - - return $this; - } - - /** - * @return string - */ - public function __toString() - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php deleted file mode 100644 index 932ecd3..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class ServiceConfigurator extends AbstractServiceConfigurator -{ - use Traits\AbstractTrait; - use Traits\ArgumentTrait; - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ClassTrait; - use Traits\ConfiguratorTrait; - use Traits\DecorateTrait; - use Traits\DeprecateTrait; - use Traits\FactoryTrait; - use Traits\FileTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\SyntheticTrait; - use Traits\TagTrait; - - public const FACTORY = 'services'; - - private $container; - private $instanceof; - private $allowParent; - private $path; - private $destructed = false; - - public function __construct(ContainerBuilder $container, array $instanceof, bool $allowParent, ServicesConfigurator $parent, Definition $definition, ?string $id, array $defaultTags, string $path = null) - { - $this->container = $container; - $this->instanceof = $instanceof; - $this->allowParent = $allowParent; - $this->path = $path; - - parent::__construct($parent, $definition, $id, $defaultTags); - } - - public function __destruct() - { - if ($this->destructed) { - return; - } - $this->destructed = true; - - parent::__destruct(); - - $this->container->removeBindings($this->id); - $this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof)); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php deleted file mode 100644 index 388251e..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; - -/** - * @author Nicolas Grekas - */ -class ServicesConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'services'; - - private $defaults; - private $container; - private $loader; - private $instanceof; - private $path; - private $anonymousHash; - private $anonymousCount; - - public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof, string $path = null, int &$anonymousCount = 0) - { - $this->defaults = new Definition(); - $this->container = $container; - $this->loader = $loader; - $this->instanceof = &$instanceof; - $this->path = $path; - $this->anonymousHash = ContainerBuilder::hash($path ?: mt_rand()); - $this->anonymousCount = &$anonymousCount; - $instanceof = []; - } - - /** - * Defines a set of defaults for following service definitions. - */ - final public function defaults(): DefaultsConfigurator - { - return new DefaultsConfigurator($this, $this->defaults = new Definition(), $this->path); - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): InstanceofConfigurator - { - $this->instanceof[$fqcn] = $definition = new ChildDefinition(''); - - return new InstanceofConfigurator($this, $definition, $fqcn, $this->path); - } - - /** - * Registers a service. - * - * @param string|null $id The service id, or null to create an anonymous service - * @param string|null $class The class of the service, or null when $id is also the class name - */ - final public function set(?string $id, string $class = null): ServiceConfigurator - { - $defaults = $this->defaults; - $definition = new Definition(); - - if (null === $id) { - if (!$class) { - throw new \LogicException('Anonymous services must have a class name.'); - } - - $id = sprintf('.%d_%s', ++$this->anonymousCount, preg_replace('/^.*\\\\/', '', $class).'~'.$this->anonymousHash); - } elseif (!$defaults->isPublic() || !$defaults->isPrivate()) { - $definition->setPublic($defaults->isPublic() && !$defaults->isPrivate()); - } - - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - // deep clone, to avoid multiple process of the same instance in the passes - $definition->setBindings(unserialize(serialize($defaults->getBindings()))); - $definition->setChanges([]); - - $configurator = new ServiceConfigurator($this->container, $this->instanceof, true, $this, $definition, $id, $defaults->getTags(), $this->path); - - return null !== $class ? $configurator->class($class) : $configurator; - } - - /** - * Removes an already defined service definition or alias. - * - * @return $this - */ - final public function remove(string $id): self - { - $this->container->removeDefinition($id); - $this->container->removeAlias($id); - - return $this; - } - - /** - * Creates an alias. - */ - final public function alias(string $id, string $referencedId): AliasConfigurator - { - $ref = static::processValue($referencedId, true); - $alias = new Alias((string) $ref); - if (!$this->defaults->isPublic() || !$this->defaults->isPrivate()) { - $alias->setPublic($this->defaults->isPublic()); - } - $this->container->setAlias($id, $alias); - - return new AliasConfigurator($this, $alias); - } - - /** - * Registers a PSR-4 namespace using a glob pattern. - */ - final public function load(string $namespace, string $resource): PrototypeConfigurator - { - return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, true); - } - - /** - * Gets an already defined service definition. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - final public function get(string $id): ServiceConfigurator - { - $definition = $this->container->getDefinition($id); - - return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), true, $this, $definition, $id, []); - } - - /** - * Registers a stack of decorator services. - * - * @param InlineServiceConfigurator[]|ReferenceConfigurator[] $services - */ - final public function stack(string $id, array $services): AliasConfigurator - { - foreach ($services as $i => $service) { - if ($service instanceof InlineServiceConfigurator) { - $definition = $service->definition->setInstanceofConditionals($this->instanceof); - - $changes = $definition->getChanges(); - $definition->setAutowired((isset($changes['autowired']) ? $definition : $this->defaults)->isAutowired()); - $definition->setAutoconfigured((isset($changes['autoconfigured']) ? $definition : $this->defaults)->isAutoconfigured()); - $definition->setBindings(array_merge($this->defaults->getBindings(), $definition->getBindings())); - $definition->setChanges($changes); - - $services[$i] = $definition; - } elseif (!$service instanceof ReferenceConfigurator) { - throw new InvalidArgumentException(sprintf('"%s()" expects a list of definitions as returned by "%s()" or "%s()", "%s" given at index "%s" for service "%s".', __METHOD__, InlineServiceConfigurator::FACTORY, ReferenceConfigurator::FACTORY, $service instanceof AbstractConfigurator ? $service::FACTORY.'()' : get_debug_type($service), $i, $id)); - } - } - - $alias = $this->alias($id, ''); - $alias->definition = $this->set($id) - ->parent('') - ->args($services) - ->tag('container.stack') - ->definition; - - return $alias; - } - - /** - * Registers a service. - */ - final public function __invoke(string $id, string $class = null): ServiceConfigurator - { - return $this->set($id, $class); - } - - public function __destruct() - { - $this->loader->registerAliasesForSinglyImplementedInterfaces(); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php deleted file mode 100644 index 82ba21d..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait AbstractTrait -{ - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - * - * @return $this - */ - final public function abstract(bool $abstract = true): self - { - $this->definition->setAbstract($abstract); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php deleted file mode 100644 index 5c9a475..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ArgumentTrait -{ - /** - * Sets the arguments to pass to the service constructor/factory method. - * - * @return $this - */ - final public function args(array $arguments): self - { - $this->definition->setArguments(static::processValue($arguments, true)); - - return $this; - } - - /** - * Sets one argument to pass to the service constructor/factory method. - * - * @param string|int $key - * @param mixed $value - * - * @return $this - */ - final public function arg($key, $value): self - { - $this->definition->setArgument($key, static::processValue($value, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php deleted file mode 100644 index 9eab22c..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait AutoconfigureTrait -{ - /** - * Sets whether or not instanceof conditionals should be prepended with a global set. - * - * @return $this - * - * @throws InvalidArgumentException when a parent is already set - */ - final public function autoconfigure(bool $autoconfigured = true): self - { - $this->definition->setAutoconfigured($autoconfigured); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php deleted file mode 100644 index 2837a02..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait AutowireTrait -{ - /** - * Enables/disables autowiring. - * - * @return $this - */ - final public function autowire(bool $autowired = true): self - { - $this->definition->setAutowired($autowired); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php deleted file mode 100644 index 3021e07..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator; -use Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator; - -trait BindTrait -{ - /** - * Sets bindings. - * - * Bindings map $named or FQCN arguments to values that should be - * injected in the matching parameters (of the constructor, of methods - * called and of controller actions). - * - * @param string $nameOrFqcn A parameter name with its "$" prefix, or an FQCN - * @param mixed $valueOrRef The value or reference to bind - * - * @return $this - */ - final public function bind(string $nameOrFqcn, $valueOrRef): self - { - $valueOrRef = static::processValue($valueOrRef, true); - $bindings = $this->definition->getBindings(); - $type = $this instanceof DefaultsConfigurator ? BoundArgument::DEFAULTS_BINDING : ($this instanceof InstanceofConfigurator ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING); - $bindings[$nameOrFqcn] = new BoundArgument($valueOrRef, true, $type, $this->path ?? null); - $this->definition->setBindings($bindings); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php deleted file mode 100644 index 28f92d2..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait CallTrait -{ - /** - * Adds a method to call after service initialization. - * - * @param string $method The method name to call - * @param array $arguments An array of arguments to pass to the method call - * @param bool $returnsClone Whether the call returns the service instance or not - * - * @return $this - * - * @throws InvalidArgumentException on empty $method param - */ - final public function call(string $method, array $arguments = [], bool $returnsClone = false): self - { - $this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php deleted file mode 100644 index 20da791..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ClassTrait -{ - /** - * Sets the service class. - * - * @return $this - */ - final public function class(?string $class): self - { - $this->definition->setClass($class); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php deleted file mode 100644 index 25d363c..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ConfiguratorTrait -{ - /** - * Sets a configurator to call after the service is fully initialized. - * - * @param string|array $configurator A PHP callable reference - * - * @return $this - */ - final public function configurator($configurator): self - { - $this->definition->setConfigurator(static::processValue($configurator, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php deleted file mode 100644 index b3a1ae1..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait DecorateTrait -{ - /** - * Sets the service that this service is decorating. - * - * @param string|null $id The decorated service id, use null to remove decoration - * - * @return $this - * - * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals - */ - final public function decorate(?string $id, string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): self - { - $this->definition->setDecoratedService($id, $renamedId, $priority, $invalidBehavior); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php deleted file mode 100644 index ea77e45..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait DeprecateTrait -{ - /** - * Whether this definition is deprecated, that means it should not be called anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - final public function deprecate(/* string $package, string $version, string $message */): self - { - $args = \func_get_args(); - $package = $version = $message = ''; - - if (\func_num_args() < 3) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'The signature of method "%s()" requires 3 arguments: "string $package, string $version, string $message", not defining them is deprecated.', __METHOD__); - - $message = (string) ($args[0] ?? null); - } else { - $package = (string) $args[0]; - $version = (string) $args[1]; - $message = (string) $args[2]; - } - - $this->definition->setDeprecated($package, $version, $message); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php deleted file mode 100644 index 1286ba4..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; - -trait FactoryTrait -{ - /** - * Sets a factory. - * - * @param string|array|ReferenceConfigurator $factory A PHP callable reference - * - * @return $this - */ - final public function factory($factory): self - { - if (\is_string($factory) && 1 === substr_count($factory, ':')) { - $factoryParts = explode(':', $factory); - - throw new InvalidArgumentException(sprintf('Invalid factory "%s": the "service:method" notation is not available when using PHP-based DI configuration. Use "[service(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1])); - } - - $this->definition->setFactory(static::processValue($factory, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php deleted file mode 100644 index 5f42aef..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait FileTrait -{ - /** - * Sets a file to require before creating the service. - * - * @return $this - */ - final public function file(string $file): self - { - $this->definition->setFile($file); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php deleted file mode 100644 index 2829def..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait LazyTrait -{ - /** - * Sets the lazy flag of this service. - * - * @param bool|string $lazy A FQCN to derivate the lazy proxy from or `true` to make it extend from the definition's class - * - * @return $this - */ - final public function lazy($lazy = true): self - { - $this->definition->setLazy((bool) $lazy); - if (\is_string($lazy)) { - $this->definition->addTag('proxy', ['interface' => $lazy]); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php deleted file mode 100644 index 37194e5..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait ParentTrait -{ - /** - * Sets the Definition to inherit from. - * - * @return $this - * - * @throws InvalidArgumentException when parent cannot be set - */ - final public function parent(string $parent): self - { - if (!$this->allowParent) { - throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); - } - - if ($this->definition instanceof ChildDefinition) { - $this->definition->setParent($parent); - } else { - // cast Definition to ChildDefinition - $definition = serialize($this->definition); - $definition = substr_replace($definition, '53', 2, 2); - $definition = substr_replace($definition, 'Child', 44, 0); - $definition = unserialize($definition); - - $this->definition = $definition->setParent($parent); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php deleted file mode 100644 index 10fdcfb..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait PropertyTrait -{ - /** - * Sets a specific property. - * - * @return $this - */ - final public function property(string $name, $value): self - { - $this->definition->setProperty($name, static::processValue($value, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php deleted file mode 100644 index f15756c..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait PublicTrait -{ - /** - * @return $this - */ - final public function public(): self - { - $this->definition->setPublic(true); - - return $this; - } - - /** - * @return $this - */ - final public function private(): self - { - $this->definition->setPublic(false); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php deleted file mode 100644 index 16fde0f..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ShareTrait -{ - /** - * Sets if the service must be shared or not. - * - * @return $this - */ - final public function share(bool $shared = true): self - { - $this->definition->setShared($shared); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php deleted file mode 100644 index cb08b11..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait SyntheticTrait -{ - /** - * Sets whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - * - * @return $this - */ - final public function synthetic(bool $synthetic = true): self - { - $this->definition->setSynthetic($synthetic); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php deleted file mode 100644 index f4d5f00..0000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait TagTrait -{ - /** - * Adds a tag for this definition. - * - * @return $this - */ - final public function tag(string $name, array $attributes = []): self - { - if ('' === $name) { - throw new InvalidArgumentException(sprintf('The tag name for service "%s" must be a non-empty string.', $this->id)); - } - - foreach ($attributes as $attribute => $value) { - if (!is_scalar($value) && null !== $value) { - throw new InvalidArgumentException(sprintf('A tag attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $this->id, $name, $attribute)); - } - } - - $this->definition->addTag($name, $attributes); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php b/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php deleted file mode 100644 index b4e9a59..0000000 --- a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -/** - * DirectoryLoader is a recursive loader to go through directories. - * - * @author Sebastien Lavoie - */ -class DirectoryLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($file, string $type = null) - { - $file = rtrim($file, '/'); - $path = $this->locator->locate($file); - $this->container->fileExists($path, false); - - foreach (scandir($path) as $dir) { - if ('.' !== $dir[0]) { - if (is_dir($path.'/'.$dir)) { - $dir .= '/'; // append / to allow recursion - } - - $this->setCurrentDir($path); - - $this->import($dir, null, false, $path); - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if ('directory' === $type) { - return true; - } - - return null === $type && \is_string($resource) && str_ends_with($resource, '/'); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/FileLoader.php b/vendor/symfony/dependency-injection/Loader/FileLoader.php deleted file mode 100644 index f5f78e3..0000000 --- a/vendor/symfony/dependency-injection/Loader/FileLoader.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader; -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Config\Resource\GlobResource; -use Symfony\Component\DependencyInjection\Attribute\When; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\RegisterAutoconfigureAttributesPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * FileLoader is the abstract class used by all built-in loaders that are file based. - * - * @author Fabien Potencier - */ -abstract class FileLoader extends BaseFileLoader -{ - public const ANONYMOUS_ID_REGEXP = '/^\.\d+_[^~]*+~[._a-zA-Z\d]{7}$/'; - - protected $container; - protected $isLoadingInstanceof = false; - protected $instanceof = []; - protected $interfaces = []; - protected $singlyImplemented = []; - protected $autoRegisterAliasesForSinglyImplementedInterfaces = true; - - public function __construct(ContainerBuilder $container, FileLocatorInterface $locator, string $env = null) - { - $this->container = $container; - - parent::__construct($locator, $env); - } - - /** - * {@inheritdoc} - * - * @param bool|string $ignoreErrors Whether errors should be ignored; pass "not_found" to ignore only when the loaded resource is not found - */ - public function import($resource, string $type = null, $ignoreErrors = false, string $sourceResource = null, $exclude = null) - { - $args = \func_get_args(); - - if ($ignoreNotFound = 'not_found' === $ignoreErrors) { - $args[2] = false; - } elseif (!\is_bool($ignoreErrors)) { - throw new \TypeError(sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors))); - } - - try { - return parent::import(...$args); - } catch (LoaderLoadException $e) { - if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) { - throw $e; - } - - foreach ($prev->getTrace() as $frame) { - if ('import' === ($frame['function'] ?? null) && is_a($frame['class'] ?? '', Loader::class, true)) { - break; - } - } - - if (__FILE__ !== $frame['file']) { - throw $e; - } - } - - return null; - } - - /** - * Registers a set of classes as services using PSR-4 for discovery. - * - * @param Definition $prototype A definition to use as template - * @param string $namespace The namespace prefix of classes in the scanned directory - * @param string $resource The directory to look for classes, glob-patterns allowed - * @param string|string[]|null $exclude A globbed path of files to exclude or an array of globbed paths of files to exclude - */ - public function registerClasses(Definition $prototype, string $namespace, string $resource, $exclude = null) - { - if (!str_ends_with($namespace, '\\')) { - throw new InvalidArgumentException(sprintf('Namespace prefix must end with a "\\": "%s".', $namespace)); - } - if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++$/', $namespace)) { - throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace)); - } - - $autoconfigureAttributes = new RegisterAutoconfigureAttributesPass(); - $autoconfigureAttributes = $autoconfigureAttributes->accept($prototype) ? $autoconfigureAttributes : null; - $classes = $this->findClasses($namespace, $resource, (array) $exclude, $autoconfigureAttributes); - // prepare for deep cloning - $serializedPrototype = serialize($prototype); - - foreach ($classes as $class => $errorMessage) { - if (null === $errorMessage && $autoconfigureAttributes && $this->env) { - $r = $this->container->getReflectionClass($class); - $attribute = null; - foreach ($r->getAttributes(When::class) as $attribute) { - if ($this->env === $attribute->newInstance()->env) { - $attribute = null; - break; - } - } - if (null !== $attribute) { - continue; - } - } - - if (interface_exists($class, false)) { - $this->interfaces[] = $class; - } else { - $this->setDefinition($class, $definition = unserialize($serializedPrototype)); - if (null !== $errorMessage) { - $definition->addError($errorMessage); - - continue; - } - foreach (class_implements($class, false) as $interface) { - $this->singlyImplemented[$interface] = ($this->singlyImplemented[$interface] ?? $class) !== $class ? false : $class; - } - } - } - - if ($this->autoRegisterAliasesForSinglyImplementedInterfaces) { - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - public function registerAliasesForSinglyImplementedInterfaces() - { - foreach ($this->interfaces as $interface) { - if (!empty($this->singlyImplemented[$interface]) && !$this->container->has($interface)) { - $this->container->setAlias($interface, $this->singlyImplemented[$interface]); - } - } - - $this->interfaces = $this->singlyImplemented = []; - } - - /** - * Registers a definition in the container with its instanceof-conditionals. - */ - protected function setDefinition(string $id, Definition $definition) - { - $this->container->removeBindings($id); - - if ($this->isLoadingInstanceof) { - if (!$definition instanceof ChildDefinition) { - throw new InvalidArgumentException(sprintf('Invalid type definition "%s": ChildDefinition expected, "%s" given.', $id, get_debug_type($definition))); - } - $this->instanceof[$id] = $definition; - } else { - $this->container->setDefinition($id, $definition->setInstanceofConditionals($this->instanceof)); - } - } - - private function findClasses(string $namespace, string $pattern, array $excludePatterns, ?RegisterAutoconfigureAttributesPass $autoconfigureAttributes): array - { - $parameterBag = $this->container->getParameterBag(); - - $excludePaths = []; - $excludePrefix = null; - $excludePatterns = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePatterns)); - foreach ($excludePatterns as $excludePattern) { - foreach ($this->glob($excludePattern, true, $resource, true, true) as $path => $info) { - if (null === $excludePrefix) { - $excludePrefix = $resource->getPrefix(); - } - - // normalize Windows slashes and remove trailing slashes - $excludePaths[rtrim(str_replace('\\', '/', $path), '/')] = true; - } - } - - $pattern = $parameterBag->unescapeValue($parameterBag->resolveValue($pattern)); - $classes = []; - $extRegexp = '/\\.php$/'; - $prefixLen = null; - foreach ($this->glob($pattern, true, $resource, false, false, $excludePaths) as $path => $info) { - if (null === $prefixLen) { - $prefixLen = \strlen($resource->getPrefix()); - - if ($excludePrefix && !str_starts_with($excludePrefix, $resource->getPrefix())) { - throw new InvalidArgumentException(sprintf('Invalid "exclude" pattern when importing classes for "%s": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $namespace, $excludePattern, $pattern)); - } - } - - if (isset($excludePaths[str_replace('\\', '/', $path)])) { - continue; - } - - if (!preg_match($extRegexp, $path, $m) || !$info->isReadable()) { - continue; - } - $class = $namespace.ltrim(str_replace('/', '\\', substr($path, $prefixLen, -\strlen($m[0]))), '\\'); - - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+$/', $class)) { - continue; - } - - try { - $r = $this->container->getReflectionClass($class); - } catch (\ReflectionException $e) { - $classes[$class] = $e->getMessage(); - continue; - } - // check to make sure the expected class exists - if (!$r) { - throw new InvalidArgumentException(sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern)); - } - - if ($r->isInstantiable() || $r->isInterface()) { - $classes[$class] = null; - } - - if ($autoconfigureAttributes && !$r->isInstantiable()) { - $autoconfigureAttributes->processClass($this->container, $r); - } - } - - // track only for new & removed files - if ($resource instanceof GlobResource) { - $this->container->addResource($resource); - } else { - foreach ($resource as $path) { - $this->container->fileExists($path, false); - } - } - - return $classes; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php b/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php deleted file mode 100644 index e38aaf4..0000000 --- a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Nicolas Grekas - */ -class GlobFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - foreach ($this->glob($resource, false, $globResource) as $path => $info) { - $this->import($path); - } - - $this->container->addResource($globResource); - - return null; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'glob' === $type; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php deleted file mode 100644 index d88d7a6..0000000 --- a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * IniFileLoader loads parameters from INI files. - * - * @author Fabien Potencier - */ -class IniFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - $path = $this->locator->locate($resource); - - $this->container->fileExists($path); - - // first pass to catch parsing errors - $result = parse_ini_file($path, true); - if (false === $result || [] === $result) { - throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource)); - } - - // real raw parsing - $result = parse_ini_file($path, true, \INI_SCANNER_RAW); - - if (isset($result['parameters']) && \is_array($result['parameters'])) { - foreach ($result['parameters'] as $key => $value) { - $this->container->setParameter($key, $this->phpize($value)); - } - } - - if ($this->env && \is_array($result['parameters@'.$this->env] ?? null)) { - foreach ($result['parameters@'.$this->env] as $key => $value) { - $this->container->setParameter($key, $this->phpize($value)); - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'ini' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'ini' === $type; - } - - /** - * Note that the following features are not supported: - * * strings with escaped quotes are not supported "foo\"bar"; - * * string concatenation ("foo" "bar"). - * - * @return mixed - */ - private function phpize(string $value) - { - // trim on the right as comments removal keep whitespaces - if ($value !== $v = rtrim($value)) { - $value = '""' === substr_replace($v, '', 1, -1) ? substr($v, 1, -1) : $v; - } - $lowercaseValue = strtolower($value); - - switch (true) { - case \defined($value): - return \constant($value); - case 'yes' === $lowercaseValue || 'on' === $lowercaseValue: - return true; - case 'no' === $lowercaseValue || 'off' === $lowercaseValue || 'none' === $lowercaseValue: - return false; - case isset($value[1]) && ( - ("'" === $value[0] && "'" === $value[\strlen($value) - 1]) || - ('"' === $value[0] && '"' === $value[\strlen($value) - 1]) - ): - // quoted string - return substr($value, 1, -1); - default: - return XmlUtils::phpize($value); - } - } -} diff --git a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php b/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php deleted file mode 100644 index 3815b28..0000000 --- a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php +++ /dev/null @@ -1,211 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface; -use Symfony\Component\Config\Builder\ConfigBuilderInterface; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\DependencyInjection\Attribute\When; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -/** - * PhpFileLoader loads service definitions from a PHP file. - * - * The PHP file is required and the $container variable can be - * used within the file to change the container. - * - * @author Fabien Potencier - */ -class PhpFileLoader extends FileLoader -{ - protected $autoRegisterAliasesForSinglyImplementedInterfaces = false; - private $generator; - - public function __construct(ContainerBuilder $container, FileLocatorInterface $locator, string $env = null, ConfigBuilderGeneratorInterface $generator = null) - { - parent::__construct($container, $locator, $env); - $this->generator = $generator; - } - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - // the container and loader variables are exposed to the included file below - $container = $this->container; - $loader = $this; - - $path = $this->locator->locate($resource); - $this->setCurrentDir(\dirname($path)); - $this->container->fileExists($path); - - // the closure forbids access to the private scope in the included file - $load = \Closure::bind(function ($path, $env) use ($container, $loader, $resource, $type) { - return include $path; - }, $this, ProtectedPhpFileLoader::class); - - try { - $callback = $load($path, $this->env); - - if (\is_object($callback) && \is_callable($callback)) { - $this->executeCallback($callback, new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path); - } - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'php' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'php' === $type; - } - - /** - * Resolve the parameters to the $callback and execute it. - */ - private function executeCallback(callable $callback, ContainerConfigurator $containerConfigurator, string $path) - { - if (!$callback instanceof \Closure) { - $callback = \Closure::fromCallable($callback); - } - - $arguments = []; - $configBuilders = []; - $r = new \ReflectionFunction($callback); - - if (\PHP_VERSION_ID >= 80000) { - $attribute = null; - foreach ($r->getAttributes(When::class) as $attribute) { - if ($this->env === $attribute->newInstance()->env) { - $attribute = null; - break; - } - } - if (null !== $attribute) { - return; - } - } - - foreach ($r->getParameters() as $parameter) { - $reflectionType = $parameter->getType(); - if (!$reflectionType instanceof \ReflectionNamedType) { - throw new \InvalidArgumentException(sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s" or "%s").', $parameter->getName(), $path, ContainerConfigurator::class, ContainerBuilder::class)); - } - $type = $reflectionType->getName(); - - switch ($type) { - case ContainerConfigurator::class: - $arguments[] = $containerConfigurator; - break; - case ContainerBuilder::class: - $arguments[] = $this->container; - break; - case FileLoader::class: - case self::class: - $arguments[] = $this; - break; - default: - try { - $configBuilder = $this->configBuilder($type); - } catch (InvalidArgumentException|\LogicException $e) { - throw new \InvalidArgumentException(sprintf('Could not resolve argument "%s" for "%s".', $type.' $'.$parameter->getName(), $path), 0, $e); - } - $configBuilders[] = $configBuilder; - $arguments[] = $configBuilder; - } - } - - // Force load ContainerConfigurator to make env(), param() etc available. - class_exists(ContainerConfigurator::class); - - $callback(...$arguments); - - /** @var ConfigBuilderInterface $configBuilder */ - foreach ($configBuilders as $configBuilder) { - $containerConfigurator->extension($configBuilder->getExtensionAlias(), $configBuilder->toArray()); - } - } - - /** - * @param string $namespace FQCN string for a class implementing ConfigBuilderInterface - */ - private function configBuilder(string $namespace): ConfigBuilderInterface - { - if (!class_exists(ConfigBuilderGenerator::class)) { - throw new \LogicException('You cannot use the config builder as the Config component is not installed. Try running "composer require symfony/config".'); - } - - if (null === $this->generator) { - throw new \LogicException('You cannot use the ConfigBuilders without providing a class implementing ConfigBuilderGeneratorInterface.'); - } - - // If class exists and implements ConfigBuilderInterface - if (class_exists($namespace) && is_subclass_of($namespace, ConfigBuilderInterface::class)) { - return new $namespace(); - } - - // If it does not start with Symfony\Config\ we dont know how to handle this - if ('Symfony\\Config\\' !== substr($namespace, 0, 15)) { - throw new InvalidArgumentException(sprintf('Could not find or generate class "%s".', $namespace)); - } - - // Try to get the extension alias - $alias = Container::underscore(substr($namespace, 15, -6)); - - if (false !== strpos($alias, '\\')) { - throw new InvalidArgumentException('You can only use "root" ConfigBuilders from "Symfony\\Config\\" namespace. Nested classes like "Symfony\\Config\\Framework\\CacheConfig" cannot be used.'); - } - - if (!$this->container->hasExtension($alias)) { - $extensions = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getAlias(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s". Looked for namespace "%s", found "%s".', $namespace, $alias, $extensions ? implode('", "', $extensions) : 'none')); - } - - $extension = $this->container->getExtension($alias); - if (!$extension instanceof ConfigurationExtensionInterface) { - throw new \LogicException(sprintf('You cannot use the config builder for "%s" because the extension does not implement "%s".', $namespace, ConfigurationExtensionInterface::class)); - } - - $configuration = $extension->getConfiguration([], $this->container); - $loader = $this->generator->build($configuration); - - return $loader(); - } -} - -/** - * @internal - */ -final class ProtectedPhpFileLoader extends PhpFileLoader -{ -} diff --git a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php deleted file mode 100644 index d0a016f..0000000 --- a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php +++ /dev/null @@ -1,782 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * XmlFileLoader loads XML files service definitions. - * - * @author Fabien Potencier - */ -class XmlFileLoader extends FileLoader -{ - public const NS = 'http://symfony.com/schema/dic/services'; - - protected $autoRegisterAliasesForSinglyImplementedInterfaces = false; - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - $path = $this->locator->locate($resource); - - $xml = $this->parseFileToDOM($path); - - $this->container->fileExists($path); - - $this->loadXml($xml, $path); - - if ($this->env) { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - foreach ($xpath->query(sprintf('//container:when[@env="%s"]', $this->env)) ?: [] as $root) { - $env = $this->env; - $this->env = null; - try { - $this->loadXml($xml, $path, $root); - } finally { - $this->env = $env; - } - } - } - - return null; - } - - private function loadXml(\DOMDocument $xml, string $path, \DOMNode $root = null): void - { - $defaults = $this->getServiceDefaults($xml, $path, $root); - - // anonymous services - $this->processAnonymousServices($xml, $path, $root); - - // imports - $this->parseImports($xml, $path, $root); - - // parameters - $this->parseParameters($xml, $path, $root); - - // extensions - $this->loadFromExtensions($xml, $root); - - // services - try { - $this->parseDefinitions($xml, $path, $defaults, $root); - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'xml' === $type; - } - - private function parseParameters(\DOMDocument $xml, string $file, \DOMNode $root = null) - { - if ($parameters = $this->getChildren($root ?? $xml->documentElement, 'parameters')) { - $this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter', $file)); - } - } - - private function parseImports(\DOMDocument $xml, string $file, \DOMNode $root = null) - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (false === $imports = $xpath->query('.//container:imports/container:import', $root)) { - return; - } - - $defaultDirectory = \dirname($file); - foreach ($imports as $import) { - $this->setCurrentDir($defaultDirectory); - $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, XmlUtils::phpize($import->getAttribute('ignore-errors')) ?: false, $file); - } - } - - private function parseDefinitions(\DOMDocument $xml, string $file, Definition $defaults, \DOMNode $root = null) - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (false === $services = $xpath->query('.//container:services/container:service|.//container:services/container:prototype|.//container:services/container:stack', $root)) { - return; - } - $this->setCurrentDir(\dirname($file)); - - $this->instanceof = []; - $this->isLoadingInstanceof = true; - $instanceof = $xpath->query('.//container:services/container:instanceof', $root); - foreach ($instanceof as $service) { - $this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, new Definition())); - } - - $this->isLoadingInstanceof = false; - foreach ($services as $service) { - if ('stack' === $service->tagName) { - $service->setAttribute('parent', '-'); - $definition = $this->parseDefinition($service, $file, $defaults) - ->setTags(array_merge_recursive(['container.stack' => [[]]], $defaults->getTags())) - ; - $this->setDefinition($id = (string) $service->getAttribute('id'), $definition); - $stack = []; - - foreach ($this->getChildren($service, 'service') as $k => $frame) { - $k = $frame->getAttribute('id') ?: $k; - $frame->setAttribute('id', $id.'" at index "'.$k); - - if ($alias = $frame->getAttribute('alias')) { - $this->validateAlias($frame, $file); - $stack[$k] = new Reference($alias); - } else { - $stack[$k] = $this->parseDefinition($frame, $file, $defaults) - ->setInstanceofConditionals($this->instanceof); - } - } - - $definition->setArguments($stack); - } elseif (null !== $definition = $this->parseDefinition($service, $file, $defaults)) { - if ('prototype' === $service->tagName) { - $excludes = array_column($this->getChildren($service, 'exclude'), 'nodeValue'); - if ($service->hasAttribute('exclude')) { - if (\count($excludes) > 0) { - throw new InvalidArgumentException('You cannot use both the attribute "exclude" and tags at the same time.'); - } - $excludes = [$service->getAttribute('exclude')]; - } - $this->registerClasses($definition, (string) $service->getAttribute('namespace'), (string) $service->getAttribute('resource'), $excludes); - } else { - $this->setDefinition((string) $service->getAttribute('id'), $definition); - } - } - } - } - - private function getServiceDefaults(\DOMDocument $xml, string $file, \DOMNode $root = null): Definition - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (null === $defaultsNode = $xpath->query('.//container:services/container:defaults', $root)->item(0)) { - return new Definition(); - } - - $defaultsNode->setAttribute('id', ''); - - return $this->parseDefinition($defaultsNode, $file, new Definition()); - } - - /** - * Parses an individual Definition. - */ - private function parseDefinition(\DOMElement $service, string $file, Definition $defaults): ?Definition - { - if ($alias = $service->getAttribute('alias')) { - $this->validateAlias($service, $file); - - $this->container->setAlias($service->getAttribute('id'), $alias = new Alias($alias)); - if ($publicAttr = $service->getAttribute('public')) { - $alias->setPublic(XmlUtils::phpize($publicAttr)); - } elseif ($defaults->getChanges()['public'] ?? false) { - $alias->setPublic($defaults->isPublic()); - } - - if ($deprecated = $this->getChildren($service, 'deprecated')) { - $message = $deprecated[0]->nodeValue ?: ''; - $package = $deprecated[0]->getAttribute('package') ?: ''; - $version = $deprecated[0]->getAttribute('version') ?: ''; - - if (!$deprecated[0]->hasAttribute('package')) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.', $file); - } - - if (!$deprecated[0]->hasAttribute('version')) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the node "deprecated" in "%s" is deprecated.', $file); - } - - $alias->setDeprecated($package, $version, $message); - } - - return null; - } - - if ($this->isLoadingInstanceof) { - $definition = new ChildDefinition(''); - } elseif ($parent = $service->getAttribute('parent')) { - $definition = new ChildDefinition($parent); - } else { - $definition = new Definition(); - } - - if ($defaults->getChanges()['public'] ?? false) { - $definition->setPublic($defaults->isPublic()); - } - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - $definition->setChanges([]); - - foreach (['class', 'public', 'shared', 'synthetic', 'abstract'] as $key) { - if ($value = $service->getAttribute($key)) { - $method = 'set'.$key; - $definition->$method($value = XmlUtils::phpize($value)); - } - } - - if ($value = $service->getAttribute('lazy')) { - $definition->setLazy((bool) $value = XmlUtils::phpize($value)); - if (\is_string($value)) { - $definition->addTag('proxy', ['interface' => $value]); - } - } - - if ($value = $service->getAttribute('autowire')) { - $definition->setAutowired(XmlUtils::phpize($value)); - } - - if ($value = $service->getAttribute('autoconfigure')) { - $definition->setAutoconfigured(XmlUtils::phpize($value)); - } - - if ($files = $this->getChildren($service, 'file')) { - $definition->setFile($files[0]->nodeValue); - } - - if ($deprecated = $this->getChildren($service, 'deprecated')) { - $message = $deprecated[0]->nodeValue ?: ''; - $package = $deprecated[0]->getAttribute('package') ?: ''; - $version = $deprecated[0]->getAttribute('version') ?: ''; - - if ('' === $package) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the node "deprecated" in "%s" is deprecated.', $file); - } - - if ('' === $version) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the node "deprecated" in "%s" is deprecated.', $file); - } - - $definition->setDeprecated($package, $version, $message); - } - - $definition->setArguments($this->getArgumentsAsPhp($service, 'argument', $file, $definition instanceof ChildDefinition)); - $definition->setProperties($this->getArgumentsAsPhp($service, 'property', $file)); - - if ($factories = $this->getChildren($service, 'factory')) { - $factory = $factories[0]; - if ($function = $factory->getAttribute('function')) { - $definition->setFactory($function); - } else { - if ($childService = $factory->getAttribute('service')) { - $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } else { - $class = $factory->hasAttribute('class') ? $factory->getAttribute('class') : null; - } - - $definition->setFactory([$class, $factory->getAttribute('method') ?: '__invoke']); - } - } - - if ($configurators = $this->getChildren($service, 'configurator')) { - $configurator = $configurators[0]; - if ($function = $configurator->getAttribute('function')) { - $definition->setConfigurator($function); - } else { - if ($childService = $configurator->getAttribute('service')) { - $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } else { - $class = $configurator->getAttribute('class'); - } - - $definition->setConfigurator([$class, $configurator->getAttribute('method') ?: '__invoke']); - } - } - - foreach ($this->getChildren($service, 'call') as $call) { - $definition->addMethodCall($call->getAttribute('method'), $this->getArgumentsAsPhp($call, 'argument', $file), XmlUtils::phpize($call->getAttribute('returns-clone'))); - } - - $tags = $this->getChildren($service, 'tag'); - - foreach ($tags as $tag) { - $parameters = []; - $tagName = $tag->nodeValue; - foreach ($tag->attributes as $name => $node) { - if ('name' === $name && '' === $tagName) { - continue; - } - - if (str_contains($name, '-') && !str_contains($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { - $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); - } - // keep not normalized key - $parameters[$name] = XmlUtils::phpize($node->nodeValue); - } - - if ('' === $tagName && '' === $tagName = $tag->getAttribute('name')) { - throw new InvalidArgumentException(sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $service->getAttribute('id'), $file)); - } - - $definition->addTag($tagName, $parameters); - } - - $definition->setTags(array_merge_recursive($definition->getTags(), $defaults->getTags())); - - $bindings = $this->getArgumentsAsPhp($service, 'bind', $file); - $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING; - foreach ($bindings as $argument => $value) { - $bindings[$argument] = new BoundArgument($value, true, $bindingType, $file); - } - - // deep clone, to avoid multiple process of the same instance in the passes - $bindings = array_merge(unserialize(serialize($defaults->getBindings())), $bindings); - - if ($bindings) { - $definition->setBindings($bindings); - } - - if ($decorates = $service->getAttribute('decorates')) { - $decorationOnInvalid = $service->getAttribute('decoration-on-invalid') ?: 'exception'; - if ('exception' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('ignore' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif ('null' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } else { - throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration-on-invalid" on service "%s". Did you mean "exception", "ignore" or "null" in "%s"?', $decorationOnInvalid, $service->getAttribute('id'), $file)); - } - - $renameId = $service->hasAttribute('decoration-inner-name') ? $service->getAttribute('decoration-inner-name') : null; - $priority = $service->hasAttribute('decoration-priority') ? $service->getAttribute('decoration-priority') : 0; - - $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior); - } - - return $definition; - } - - /** - * Parses an XML file to a \DOMDocument. - * - * @throws InvalidArgumentException When loading of XML file returns error - */ - private function parseFileToDOM(string $file): \DOMDocument - { - try { - $dom = XmlUtils::loadFile($file, [$this, 'validateSchema']); - } catch (\InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('Unable to parse file "%s": ', $file).$e->getMessage(), $e->getCode(), $e); - } - - $this->validateExtensions($dom, $file); - - return $dom; - } - - /** - * Processes anonymous services. - */ - private function processAnonymousServices(\DOMDocument $xml, string $file, \DOMNode $root = null) - { - $definitions = []; - $count = 0; - $suffix = '~'.ContainerBuilder::hash($file); - - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - // anonymous services as arguments/properties - if (false !== $nodes = $xpath->query('.//container:argument[@type="service"][not(@id)]|.//container:property[@type="service"][not(@id)]|.//container:bind[not(@id)]|.//container:factory[not(@service)]|.//container:configurator[not(@service)]', $root)) { - foreach ($nodes as $node) { - if ($services = $this->getChildren($node, 'service')) { - // give it a unique name - $id = sprintf('.%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $services[0]->getAttribute('class')).$suffix); - $node->setAttribute('id', $id); - $node->setAttribute('service', $id); - - $definitions[$id] = [$services[0], $file]; - $services[0]->setAttribute('id', $id); - - // anonymous services are always private - // we could not use the constant false here, because of XML parsing - $services[0]->setAttribute('public', 'false'); - } - } - } - - // anonymous services "in the wild" - if (false !== $nodes = $xpath->query('.//container:services/container:service[not(@id)]', $root)) { - foreach ($nodes as $node) { - throw new InvalidArgumentException(sprintf('Top-level services must have "id" attribute, none found in "%s" at line %d.', $file, $node->getLineNo())); - } - } - - // resolve definitions - uksort($definitions, 'strnatcmp'); - foreach (array_reverse($definitions) as $id => [$domElement, $file]) { - if (null !== $definition = $this->parseDefinition($domElement, $file, new Definition())) { - $this->setDefinition($id, $definition); - } - } - } - - private function getArgumentsAsPhp(\DOMElement $node, string $name, string $file, bool $isChildDefinition = false): array - { - $arguments = []; - foreach ($this->getChildren($node, $name) as $arg) { - if ($arg->hasAttribute('name')) { - $arg->setAttribute('key', $arg->getAttribute('name')); - } - - // this is used by ChildDefinition to overwrite a specific - // argument of the parent definition - if ($arg->hasAttribute('index')) { - $key = ($isChildDefinition ? 'index_' : '').$arg->getAttribute('index'); - } elseif (!$arg->hasAttribute('key')) { - // Append an empty argument, then fetch its key to overwrite it later - $arguments[] = null; - $keys = array_keys($arguments); - $key = array_pop($keys); - } else { - $key = $arg->getAttribute('key'); - } - - $onInvalid = $arg->getAttribute('on-invalid'); - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if ('ignore' == $onInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif ('ignore_uninitialized' == $onInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - } elseif ('null' == $onInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } - - switch ($arg->getAttribute('type')) { - case 'service': - if ('' === $arg->getAttribute('id')) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file)); - } - - $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior); - break; - case 'expression': - if (!class_exists(Expression::class)) { - throw new \LogicException('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - $arguments[$key] = new Expression($arg->nodeValue); - break; - case 'collection': - $arguments[$key] = $this->getArgumentsAsPhp($arg, $name, $file); - break; - case 'iterator': - $arg = $this->getArgumentsAsPhp($arg, $name, $file); - try { - $arguments[$key] = new IteratorArgument($arg); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="iterator" only accepts collections of type="service" references in "%s".', $name, $file)); - } - break; - case 'service_closure': - if ('' === $arg->getAttribute('id')) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_closure" has no or empty "id" attribute in "%s".', $name, $file)); - } - - $arguments[$key] = new ServiceClosureArgument(new Reference($arg->getAttribute('id'), $invalidBehavior)); - break; - case 'service_locator': - $arg = $this->getArgumentsAsPhp($arg, $name, $file); - try { - $arguments[$key] = new ServiceLocatorArgument($arg); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service_locator" only accepts maps of type="service" references in "%s".', $name, $file)); - } - break; - case 'tagged': - case 'tagged_iterator': - case 'tagged_locator': - $type = $arg->getAttribute('type'); - $forLocator = 'tagged_locator' === $type; - - if (!$arg->getAttribute('tag')) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="%s" has no or empty "tag" attribute in "%s".', $name, $type, $file)); - } - - $arguments[$key] = new TaggedIteratorArgument($arg->getAttribute('tag'), $arg->getAttribute('index-by') ?: null, $arg->getAttribute('default-index-method') ?: null, $forLocator, $arg->getAttribute('default-priority-method') ?: null); - - if ($forLocator) { - $arguments[$key] = new ServiceLocatorArgument($arguments[$key]); - } - break; - case 'binary': - if (false === $value = base64_decode($arg->nodeValue)) { - throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="binary" is not a valid base64 encoded string.', $name)); - } - $arguments[$key] = $value; - break; - case 'abstract': - $arguments[$key] = new AbstractArgument($arg->nodeValue); - break; - case 'string': - $arguments[$key] = $arg->nodeValue; - break; - case 'constant': - $arguments[$key] = \constant(trim($arg->nodeValue)); - break; - default: - $arguments[$key] = XmlUtils::phpize($arg->nodeValue); - } - } - - return $arguments; - } - - /** - * Get child elements by name. - * - * @return \DOMElement[] - */ - private function getChildren(\DOMNode $node, string $name): array - { - $children = []; - foreach ($node->childNodes as $child) { - if ($child instanceof \DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) { - $children[] = $child; - } - } - - return $children; - } - - /** - * Validates a documents XML schema. - * - * @return bool - * - * @throws RuntimeException When extension references a non-existent XSD file - */ - public function validateSchema(\DOMDocument $dom) - { - $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')]; - - if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) { - $items = preg_split('/\s+/', $element); - for ($i = 0, $nb = \count($items); $i < $nb; $i += 2) { - if (!$this->container->hasExtension($items[$i])) { - continue; - } - - if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { - $ns = $extension->getNamespace(); - $path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); - - if (!is_file($path)) { - throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s".', get_debug_type($extension), $path)); - } - - $schemaLocations[$items[$i]] = $path; - } - } - } - - $tmpfiles = []; - $imports = ''; - foreach ($schemaLocations as $namespace => $location) { - $parts = explode('/', $location); - $locationstart = 'file:///'; - if (0 === stripos($location, 'phar://')) { - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - if ($tmpfile) { - copy($location, $tmpfile); - $tmpfiles[] = $tmpfile; - $parts = explode('/', str_replace('\\', '/', $tmpfile)); - } else { - array_shift($parts); - $locationstart = 'phar:///'; - } - } elseif ('\\' === \DIRECTORY_SEPARATOR && str_starts_with($location, '\\\\')) { - $locationstart = ''; - } - $drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; - $location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts)); - - $imports .= sprintf(' '."\n", $namespace, $location); - } - - $source = << - - - -$imports - -EOF - ; - - if ($this->shouldEnableEntityLoader()) { - $disableEntities = libxml_disable_entity_loader(false); - $valid = @$dom->schemaValidateSource($source); - libxml_disable_entity_loader($disableEntities); - } else { - $valid = @$dom->schemaValidateSource($source); - } - foreach ($tmpfiles as $tmpfile) { - @unlink($tmpfile); - } - - return $valid; - } - - private function shouldEnableEntityLoader(): bool - { - // Version prior to 8.0 can be enabled without deprecation - if (\PHP_VERSION_ID < 80000) { - return true; - } - - static $dom, $schema; - if (null === $dom) { - $dom = new \DOMDocument(); - $dom->loadXML(''); - - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - register_shutdown_function(static function () use ($tmpfile) { - @unlink($tmpfile); - }); - $schema = ' - - -'; - file_put_contents($tmpfile, ' - - - -'); - } - - return !@$dom->schemaValidateSource($schema); - } - - private function validateAlias(\DOMElement $alias, string $file) - { - foreach ($alias->attributes as $name => $node) { - if (!\in_array($name, ['alias', 'id', 'public'])) { - throw new InvalidArgumentException(sprintf('Invalid attribute "%s" defined for alias "%s" in "%s".', $name, $alias->getAttribute('id'), $file)); - } - } - - foreach ($alias->childNodes as $child) { - if (!$child instanceof \DOMElement || self::NS !== $child->namespaceURI) { - continue; - } - if (!\in_array($child->localName, ['deprecated'], true)) { - throw new InvalidArgumentException(sprintf('Invalid child element "%s" defined for alias "%s" in "%s".', $child->localName, $alias->getAttribute('id'), $file)); - } - } - } - - /** - * Validates an extension. - * - * @throws InvalidArgumentException When no extension is found corresponding to a tag - */ - private function validateExtensions(\DOMDocument $dom, string $file) - { - foreach ($dom->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) { - continue; - } - - // can it be handled by an extension? - if (!$this->container->hasExtension($node->namespaceURI)) { - $extensionNamespaces = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getNamespace(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $node->tagName, $file, $node->namespaceURI, $extensionNamespaces ? implode('", "', $extensionNamespaces) : 'none')); - } - } - } - - /** - * Loads from an extension. - */ - private function loadFromExtensions(\DOMDocument $xml) - { - foreach ($xml->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement || self::NS === $node->namespaceURI) { - continue; - } - - $values = static::convertDomElementToArray($node); - if (!\is_array($values)) { - $values = []; - } - - $this->container->loadFromExtension($node->namespaceURI, $values); - } - } - - /** - * Converts a \DOMElement object to a PHP array. - * - * The following rules applies during the conversion: - * - * * Each tag is converted to a key value or an array - * if there is more than one "value" - * - * * The content of a tag is set under a "value" key (bar) - * if the tag also has some nested tags - * - * * The attributes are converted to keys () - * - * * The nested-tags are converted to keys (bar) - * - * @param \DOMElement $element A \DOMElement instance - * - * @return mixed - */ - public static function convertDomElementToArray(\DOMElement $element) - { - return XmlUtils::convertDomElementToArray($element); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php deleted file mode 100644 index 7efda3c..0000000 --- a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php +++ /dev/null @@ -1,966 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Tag\TaggedValue; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileLoader loads YAML files service definitions. - * - * @author Fabien Potencier - */ -class YamlFileLoader extends FileLoader -{ - private const SERVICE_KEYWORDS = [ - 'alias' => 'alias', - 'parent' => 'parent', - 'class' => 'class', - 'shared' => 'shared', - 'synthetic' => 'synthetic', - 'lazy' => 'lazy', - 'public' => 'public', - 'abstract' => 'abstract', - 'deprecated' => 'deprecated', - 'factory' => 'factory', - 'file' => 'file', - 'arguments' => 'arguments', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'decorates' => 'decorates', - 'decoration_inner_name' => 'decoration_inner_name', - 'decoration_priority' => 'decoration_priority', - 'decoration_on_invalid' => 'decoration_on_invalid', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - ]; - - private const PROTOTYPE_KEYWORDS = [ - 'resource' => 'resource', - 'namespace' => 'namespace', - 'exclude' => 'exclude', - 'parent' => 'parent', - 'shared' => 'shared', - 'lazy' => 'lazy', - 'public' => 'public', - 'abstract' => 'abstract', - 'deprecated' => 'deprecated', - 'factory' => 'factory', - 'arguments' => 'arguments', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - ]; - - private const INSTANCEOF_KEYWORDS = [ - 'shared' => 'shared', - 'lazy' => 'lazy', - 'public' => 'public', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'bind' => 'bind', - ]; - - private const DEFAULTS_KEYWORDS = [ - 'public' => 'public', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - ]; - - private $yamlParser; - - private $anonymousServicesCount; - private $anonymousServicesSuffix; - - protected $autoRegisterAliasesForSinglyImplementedInterfaces = false; - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - $path = $this->locator->locate($resource); - - $content = $this->loadFile($path); - - $this->container->fileExists($path); - - // empty file - if (null === $content) { - return null; - } - - $this->loadContent($content, $path); - - // per-env configuration - if ($this->env && isset($content['when@'.$this->env])) { - if (!\is_array($content['when@'.$this->env])) { - throw new InvalidArgumentException(sprintf('The "when@%s" key should contain an array in "%s". Check your YAML syntax.', $this->env, $path)); - } - - $env = $this->env; - $this->env = null; - try { - $this->loadContent($content['when@'.$env], $path); - } finally { - $this->env = $env; - } - } - - return null; - } - - private function loadContent(array $content, string $path) - { - // imports - $this->parseImports($content, $path); - - // parameters - if (isset($content['parameters'])) { - if (!\is_array($content['parameters'])) { - throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in "%s". Check your YAML syntax.', $path)); - } - - foreach ($content['parameters'] as $key => $value) { - $this->container->setParameter($key, $this->resolveServices($value, $path, true)); - } - } - - // extensions - $this->loadFromExtensions($content); - - // services - $this->anonymousServicesCount = 0; - $this->anonymousServicesSuffix = '~'.ContainerBuilder::hash($path); - $this->setCurrentDir(\dirname($path)); - try { - $this->parseDefinitions($content, $path); - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yaml', 'yml'], true)) { - return true; - } - - return \in_array($type, ['yaml', 'yml'], true); - } - - private function parseImports(array $content, string $file) - { - if (!isset($content['imports'])) { - return; - } - - if (!\is_array($content['imports'])) { - throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in "%s". Check your YAML syntax.', $file)); - } - - $defaultDirectory = \dirname($file); - foreach ($content['imports'] as $import) { - if (!\is_array($import)) { - $import = ['resource' => $import]; - } - if (!isset($import['resource'])) { - throw new InvalidArgumentException(sprintf('An import should provide a resource in "%s". Check your YAML syntax.', $file)); - } - - $this->setCurrentDir($defaultDirectory); - $this->import($import['resource'], $import['type'] ?? null, $import['ignore_errors'] ?? false, $file); - } - } - - private function parseDefinitions(array $content, string $file) - { - if (!isset($content['services'])) { - return; - } - - if (!\is_array($content['services'])) { - throw new InvalidArgumentException(sprintf('The "services" key should contain an array in "%s". Check your YAML syntax.', $file)); - } - - if (\array_key_exists('_instanceof', $content['services'])) { - $instanceof = $content['services']['_instanceof']; - unset($content['services']['_instanceof']); - - if (!\is_array($instanceof)) { - throw new InvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', get_debug_type($instanceof), $file)); - } - $this->instanceof = []; - $this->isLoadingInstanceof = true; - foreach ($instanceof as $id => $service) { - if (!$service || !\is_array($service)) { - throw new InvalidArgumentException(sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in "%s". Check your YAML syntax.', $id, $file)); - } - if (\is_string($service) && str_starts_with($service, '@')) { - throw new InvalidArgumentException(sprintf('Type definition "%s" cannot be an alias within "_instanceof" in "%s". Check your YAML syntax.', $id, $file)); - } - $this->parseDefinition($id, $service, $file, []); - } - } - - $this->isLoadingInstanceof = false; - $defaults = $this->parseDefaults($content, $file); - foreach ($content['services'] as $id => $service) { - $this->parseDefinition($id, $service, $file, $defaults); - } - } - - /** - * @throws InvalidArgumentException - */ - private function parseDefaults(array &$content, string $file): array - { - if (!\array_key_exists('_defaults', $content['services'])) { - return []; - } - $defaults = $content['services']['_defaults']; - unset($content['services']['_defaults']); - - if (!\is_array($defaults)) { - throw new InvalidArgumentException(sprintf('Service "_defaults" key must be an array, "%s" given in "%s".', get_debug_type($defaults), $file)); - } - - foreach ($defaults as $key => $default) { - if (!isset(self::DEFAULTS_KEYWORDS[$key])) { - throw new InvalidArgumentException(sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".', $key, $file, implode('", "', self::DEFAULTS_KEYWORDS))); - } - } - - if (isset($defaults['tags'])) { - if (!\is_array($tags = $defaults['tags'])) { - throw new InvalidArgumentException(sprintf('Parameter "tags" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file)); - } - - foreach ($tags as $tag) { - if (!\is_array($tag)) { - $tag = ['name' => $tag]; - } - - if (1 === \count($tag) && \is_array(current($tag))) { - $name = key($tag); - $tag = current($tag); - } else { - if (!isset($tag['name'])) { - throw new InvalidArgumentException(sprintf('A "tags" entry in "_defaults" is missing a "name" key in "%s".', $file)); - } - $name = $tag['name']; - unset($tag['name']); - } - - if (!\is_string($name) || '' === $name) { - throw new InvalidArgumentException(sprintf('The tag name in "_defaults" must be a non-empty string in "%s".', $file)); - } - - foreach ($tag as $attribute => $value) { - if (!is_scalar($value) && null !== $value) { - throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in "%s". Check your YAML syntax.', $name, $attribute, $file)); - } - } - } - } - - if (isset($defaults['bind'])) { - if (!\is_array($defaults['bind'])) { - throw new InvalidArgumentException(sprintf('Parameter "bind" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file)); - } - - foreach ($this->resolveServices($defaults['bind'], $file) as $argument => $value) { - $defaults['bind'][$argument] = new BoundArgument($value, true, BoundArgument::DEFAULTS_BINDING, $file); - } - } - - return $defaults; - } - - private function isUsingShortSyntax(array $service): bool - { - foreach ($service as $key => $value) { - if (\is_string($key) && ('' === $key || ('$' !== $key[0] && !str_contains($key, '\\')))) { - return false; - } - } - - return true; - } - - /** - * Parses a definition. - * - * @param array|string|null $service - * - * @throws InvalidArgumentException When tags are invalid - */ - private function parseDefinition(string $id, $service, string $file, array $defaults, bool $return = false) - { - if (preg_match('/^_[a-zA-Z0-9_]*$/', $id)) { - throw new InvalidArgumentException(sprintf('Service names that start with an underscore are reserved. Rename the "%s" service or define it in XML instead.', $id)); - } - - if (\is_string($service) && str_starts_with($service, '@')) { - $alias = new Alias(substr($service, 1)); - - if (isset($defaults['public'])) { - $alias->setPublic($defaults['public']); - } - - return $return ? $alias : $this->container->setAlias($id, $alias); - } - - if (\is_array($service) && $this->isUsingShortSyntax($service)) { - $service = ['arguments' => $service]; - } - - if (null === $service) { - $service = []; - } - - if (!\is_array($service)) { - throw new InvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but "%s" found for service "%s" in "%s". Check your YAML syntax.', get_debug_type($service), $id, $file)); - } - - if (isset($service['stack'])) { - if (!\is_array($service['stack'])) { - throw new InvalidArgumentException(sprintf('A stack must be an array of definitions, "%s" given for service "%s" in "%s". Check your YAML syntax.', get_debug_type($service), $id, $file)); - } - - $stack = []; - - foreach ($service['stack'] as $k => $frame) { - if (\is_array($frame) && 1 === \count($frame) && !isset(self::SERVICE_KEYWORDS[key($frame)])) { - $frame = [ - 'class' => key($frame), - 'arguments' => current($frame), - ]; - } - - if (\is_array($frame) && isset($frame['stack'])) { - throw new InvalidArgumentException(sprintf('Service stack "%s" cannot contain another stack in "%s".', $id, $file)); - } - - $definition = $this->parseDefinition($id.'" at index "'.$k, $frame, $file, $defaults, true); - - if ($definition instanceof Definition) { - $definition->setInstanceofConditionals($this->instanceof); - } - - $stack[$k] = $definition; - } - - if ($diff = array_diff(array_keys($service), ['stack', 'public', 'deprecated'])) { - throw new InvalidArgumentException(sprintf('Invalid attribute "%s"; supported ones are "public" and "deprecated" for service "%s" in "%s". Check your YAML syntax.', implode('", "', $diff), $id, $file)); - } - - $service = [ - 'parent' => '', - 'arguments' => $stack, - 'tags' => ['container.stack'], - 'public' => $service['public'] ?? null, - 'deprecated' => $service['deprecated'] ?? null, - ]; - } - - $definition = isset($service[0]) && $service[0] instanceof Definition ? array_shift($service) : null; - $return = null === $definition ? $return : true; - - $this->checkDefinition($id, $service, $file); - - if (isset($service['alias'])) { - $alias = new Alias($service['alias']); - - if (isset($service['public'])) { - $alias->setPublic($service['public']); - } elseif (isset($defaults['public'])) { - $alias->setPublic($defaults['public']); - } - - foreach ($service as $key => $value) { - if (!\in_array($key, ['alias', 'public', 'deprecated'])) { - throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias", "public" and "deprecated".', $key, $id, $file)); - } - - if ('deprecated' === $key) { - $deprecation = \is_array($value) ? $value : ['message' => $value]; - - if (!isset($deprecation['package'])) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the "deprecated" option in "%s" is deprecated.', $file); - } - - if (!isset($deprecation['version'])) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the "deprecated" option in "%s" is deprecated.', $file); - } - - $alias->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? ''); - } - } - - return $return ? $alias : $this->container->setAlias($id, $alias); - } - - if (null !== $definition) { - // no-op - } elseif ($this->isLoadingInstanceof) { - $definition = new ChildDefinition(''); - } elseif (isset($service['parent'])) { - if ('' !== $service['parent'] && '@' === $service['parent'][0]) { - throw new InvalidArgumentException(sprintf('The value of the "parent" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['parent'], substr($service['parent'], 1))); - } - - $definition = new ChildDefinition($service['parent']); - } else { - $definition = new Definition(); - } - - if (isset($defaults['public'])) { - $definition->setPublic($defaults['public']); - } - if (isset($defaults['autowire'])) { - $definition->setAutowired($defaults['autowire']); - } - if (isset($defaults['autoconfigure'])) { - $definition->setAutoconfigured($defaults['autoconfigure']); - } - - $definition->setChanges([]); - - if (isset($service['class'])) { - $definition->setClass($service['class']); - } - - if (isset($service['shared'])) { - $definition->setShared($service['shared']); - } - - if (isset($service['synthetic'])) { - $definition->setSynthetic($service['synthetic']); - } - - if (isset($service['lazy'])) { - $definition->setLazy((bool) $service['lazy']); - if (\is_string($service['lazy'])) { - $definition->addTag('proxy', ['interface' => $service['lazy']]); - } - } - - if (isset($service['public'])) { - $definition->setPublic($service['public']); - } - - if (isset($service['abstract'])) { - $definition->setAbstract($service['abstract']); - } - - if (isset($service['deprecated'])) { - $deprecation = \is_array($service['deprecated']) ? $service['deprecated'] : ['message' => $service['deprecated']]; - - if (!isset($deprecation['package'])) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "package" of the "deprecated" option in "%s" is deprecated.', $file); - } - - if (!isset($deprecation['version'])) { - trigger_deprecation('symfony/dependency-injection', '5.1', 'Not setting the attribute "version" of the "deprecated" option in "%s" is deprecated.', $file); - } - - $definition->setDeprecated($deprecation['package'] ?? '', $deprecation['version'] ?? '', $deprecation['message'] ?? ''); - } - - if (isset($service['factory'])) { - $definition->setFactory($this->parseCallable($service['factory'], 'factory', $id, $file)); - } - - if (isset($service['file'])) { - $definition->setFile($service['file']); - } - - if (isset($service['arguments'])) { - $definition->setArguments($this->resolveServices($service['arguments'], $file)); - } - - if (isset($service['properties'])) { - $definition->setProperties($this->resolveServices($service['properties'], $file)); - } - - if (isset($service['configurator'])) { - $definition->setConfigurator($this->parseCallable($service['configurator'], 'configurator', $id, $file)); - } - - if (isset($service['calls'])) { - if (!\is_array($service['calls'])) { - throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - foreach ($service['calls'] as $k => $call) { - if (!\is_array($call) && (!\is_string($k) || !$call instanceof TaggedValue)) { - throw new InvalidArgumentException(sprintf('Invalid method call for service "%s": expected map or array, "%s" given in "%s".', $id, $call instanceof TaggedValue ? '!'.$call->getTag() : get_debug_type($call), $file)); - } - - if (\is_string($k)) { - throw new InvalidArgumentException(sprintf('Invalid method call for service "%s", did you forgot a leading dash before "%s: ..." in "%s"?', $id, $k, $file)); - } - - if (isset($call['method']) && \is_string($call['method'])) { - $method = $call['method']; - $args = $call['arguments'] ?? []; - $returnsClone = $call['returns_clone'] ?? false; - } else { - if (1 === \count($call) && \is_string(key($call))) { - $method = key($call); - $args = $call[$method]; - - if ($args instanceof TaggedValue) { - if ('returns_clone' !== $args->getTag()) { - throw new InvalidArgumentException(sprintf('Unsupported tag "!%s", did you mean "!returns_clone" for service "%s" in "%s"?', $args->getTag(), $id, $file)); - } - - $returnsClone = true; - $args = $args->getValue(); - } else { - $returnsClone = false; - } - } elseif (empty($call[0])) { - throw new InvalidArgumentException(sprintf('Invalid call for service "%s": the method must be defined as the first index of an array or as the only key of a map in "%s".', $id, $file)); - } else { - $method = $call[0]; - $args = $call[1] ?? []; - $returnsClone = $call[2] ?? false; - } - } - - if (!\is_array($args)) { - throw new InvalidArgumentException(sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in "%s". Check your YAML syntax.', $method, $id, $file)); - } - - $args = $this->resolveServices($args, $file); - $definition->addMethodCall($method, $args, $returnsClone); - } - } - - $tags = $service['tags'] ?? []; - if (!\is_array($tags)) { - throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - if (isset($defaults['tags'])) { - $tags = array_merge($tags, $defaults['tags']); - } - - foreach ($tags as $tag) { - if (!\is_array($tag)) { - $tag = ['name' => $tag]; - } - - if (1 === \count($tag) && \is_array(current($tag))) { - $name = key($tag); - $tag = current($tag); - } else { - if (!isset($tag['name'])) { - throw new InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in "%s".', $id, $file)); - } - $name = $tag['name']; - unset($tag['name']); - } - - if (!\is_string($name) || '' === $name) { - throw new InvalidArgumentException(sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $id, $file)); - } - - foreach ($tag as $attribute => $value) { - if (!is_scalar($value) && null !== $value) { - throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in "%s". Check your YAML syntax.', $id, $name, $attribute, $file)); - } - } - - $definition->addTag($name, $tag); - } - - if (null !== $decorates = $service['decorates'] ?? null) { - if ('' !== $decorates && '@' === $decorates[0]) { - throw new InvalidArgumentException(sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($decorates, 1))); - } - - $decorationOnInvalid = \array_key_exists('decoration_on_invalid', $service) ? $service['decoration_on_invalid'] : 'exception'; - if ('exception' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('ignore' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif (null === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } elseif ('null' === $decorationOnInvalid) { - throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean null (without quotes) in "%s"?', $decorationOnInvalid, $id, $file)); - } else { - throw new InvalidArgumentException(sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean "exception", "ignore" or null in "%s"?', $decorationOnInvalid, $id, $file)); - } - - $renameId = $service['decoration_inner_name'] ?? null; - $priority = $service['decoration_priority'] ?? 0; - - $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior); - } - - if (isset($service['autowire'])) { - $definition->setAutowired($service['autowire']); - } - - if (isset($defaults['bind']) || isset($service['bind'])) { - // deep clone, to avoid multiple process of the same instance in the passes - $bindings = $definition->getBindings(); - $bindings += isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : []; - - if (isset($service['bind'])) { - if (!\is_array($service['bind'])) { - throw new InvalidArgumentException(sprintf('Parameter "bind" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - $bindings = array_merge($bindings, $this->resolveServices($service['bind'], $file)); - $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING; - foreach ($bindings as $argument => $value) { - if (!$value instanceof BoundArgument) { - $bindings[$argument] = new BoundArgument($value, true, $bindingType, $file); - } - } - } - - $definition->setBindings($bindings); - } - - if (isset($service['autoconfigure'])) { - $definition->setAutoconfigured($service['autoconfigure']); - } - - if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) { - throw new InvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - if ($return) { - if (\array_key_exists('resource', $service)) { - throw new InvalidArgumentException(sprintf('Invalid "resource" attribute found for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - return $definition; - } - - if (\array_key_exists('resource', $service)) { - if (!\is_string($service['resource'])) { - throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - $exclude = $service['exclude'] ?? null; - $namespace = $service['namespace'] ?? $id; - $this->registerClasses($definition, $namespace, $service['resource'], $exclude); - } else { - $this->setDefinition($id, $definition); - } - } - - /** - * Parses a callable. - * - * @param string|array $callable A callable reference - * - * @throws InvalidArgumentException When errors occur - * - * @return string|array|Reference - */ - private function parseCallable($callable, string $parameter, string $id, string $file) - { - if (\is_string($callable)) { - if ('' !== $callable && '@' === $callable[0]) { - if (!str_contains($callable, ':')) { - return [$this->resolveServices($callable, $file), '__invoke']; - } - - throw new InvalidArgumentException(sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s" in "%s").', $parameter, $id, $callable, substr($callable, 1), $file)); - } - - return $callable; - } - - if (\is_array($callable)) { - if (isset($callable[0]) && isset($callable[1])) { - return [$this->resolveServices($callable[0], $file), $callable[1]]; - } - - if ('factory' === $parameter && isset($callable[1]) && null === $callable[0]) { - return $callable; - } - - throw new InvalidArgumentException(sprintf('Parameter "%s" must contain an array with two elements for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file)); - } - - throw new InvalidArgumentException(sprintf('Parameter "%s" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file)); - } - - /** - * Loads a YAML file. - * - * @return array|null - * - * @throws InvalidArgumentException when the given file is not a local file or when it does not exist - */ - protected function loadFile(string $file) - { - if (!class_exists(\Symfony\Component\Yaml\Parser::class)) { - throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.'); - } - - if (!stream_is_local($file)) { - throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file)); - } - - if (!is_file($file)) { - throw new InvalidArgumentException(sprintf('The file "%s" does not exist.', $file)); - } - - if (null === $this->yamlParser) { - $this->yamlParser = new YamlParser(); - } - - try { - $configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS); - } catch (ParseException $e) { - throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $file).$e->getMessage(), 0, $e); - } - - return $this->validate($configuration, $file); - } - - /** - * Validates a YAML file. - * - * @throws InvalidArgumentException When service file is not valid - */ - private function validate($content, string $file): ?array - { - if (null === $content) { - return $content; - } - - if (!\is_array($content)) { - throw new InvalidArgumentException(sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file)); - } - - foreach ($content as $namespace => $data) { - if (\in_array($namespace, ['imports', 'parameters', 'services']) || 0 === strpos($namespace, 'when@')) { - continue; - } - - if (!$this->container->hasExtension($namespace)) { - $extensionNamespaces = array_filter(array_map(function (ExtensionInterface $ext) { return $ext->getAlias(); }, $this->container->getExtensions())); - throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $file, $namespace, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none')); - } - } - - return $content; - } - - /** - * @return mixed - */ - private function resolveServices($value, string $file, bool $isParameter = false) - { - if ($value instanceof TaggedValue) { - $argument = $value->getValue(); - if ('iterator' === $value->getTag()) { - if (!\is_array($argument)) { - throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts sequences in "%s".', $file)); - } - $argument = $this->resolveServices($argument, $file, $isParameter); - try { - return new IteratorArgument($argument); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts arrays of "@service" references in "%s".', $file)); - } - } - if ('service_closure' === $value->getTag()) { - $argument = $this->resolveServices($argument, $file, $isParameter); - - if (!$argument instanceof Reference) { - throw new InvalidArgumentException(sprintf('"!service_closure" tag only accepts service references in "%s".', $file)); - } - - return new ServiceClosureArgument($argument); - } - if ('service_locator' === $value->getTag()) { - if (!\is_array($argument)) { - throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps in "%s".', $file)); - } - - $argument = $this->resolveServices($argument, $file, $isParameter); - - try { - return new ServiceLocatorArgument($argument); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('"!service_locator" tag only accepts maps of "@service" references in "%s".', $file)); - } - } - if (\in_array($value->getTag(), ['tagged', 'tagged_iterator', 'tagged_locator'], true)) { - $forLocator = 'tagged_locator' === $value->getTag(); - - if (\is_array($argument) && isset($argument['tag']) && $argument['tag']) { - if ($diff = array_diff(array_keys($argument), ['tag', 'index_by', 'default_index_method', 'default_priority_method'])) { - throw new InvalidArgumentException(sprintf('"!%s" tag contains unsupported key "%s"; supported ones are "tag", "index_by", "default_index_method", and "default_priority_method".', $value->getTag(), implode('", "', $diff))); - } - - $argument = new TaggedIteratorArgument($argument['tag'], $argument['index_by'] ?? null, $argument['default_index_method'] ?? null, $forLocator, $argument['default_priority_method'] ?? null); - } elseif (\is_string($argument) && $argument) { - $argument = new TaggedIteratorArgument($argument, null, null, $forLocator); - } else { - throw new InvalidArgumentException(sprintf('"!%s" tags only accept a non empty string or an array with a key "tag" in "%s".', $value->getTag(), $file)); - } - - if ($forLocator) { - $argument = new ServiceLocatorArgument($argument); - } - - return $argument; - } - if ('service' === $value->getTag()) { - if ($isParameter) { - throw new InvalidArgumentException(sprintf('Using an anonymous service in a parameter is not allowed in "%s".', $file)); - } - - $isLoadingInstanceof = $this->isLoadingInstanceof; - $this->isLoadingInstanceof = false; - $instanceof = $this->instanceof; - $this->instanceof = []; - - $id = sprintf('.%d_%s', ++$this->anonymousServicesCount, preg_replace('/^.*\\\\/', '', $argument['class'] ?? '').$this->anonymousServicesSuffix); - $this->parseDefinition($id, $argument, $file, []); - - if (!$this->container->hasDefinition($id)) { - throw new InvalidArgumentException(sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file)); - } - - $this->container->getDefinition($id); - - $this->isLoadingInstanceof = $isLoadingInstanceof; - $this->instanceof = $instanceof; - - return new Reference($id); - } - if ('abstract' === $value->getTag()) { - return new AbstractArgument($value->getValue()); - } - - throw new InvalidArgumentException(sprintf('Unsupported tag "!%s".', $value->getTag())); - } - - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = $this->resolveServices($v, $file, $isParameter); - } - } elseif (\is_string($value) && str_starts_with($value, '@=')) { - if ($isParameter) { - throw new InvalidArgumentException(sprintf('Using expressions in parameters is not allowed in "%s".', $file)); - } - - if (!class_exists(Expression::class)) { - throw new \LogicException('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - return new Expression(substr($value, 2)); - } elseif (\is_string($value) && str_starts_with($value, '@')) { - if (str_starts_with($value, '@@')) { - $value = substr($value, 1); - $invalidBehavior = null; - } elseif (str_starts_with($value, '@!')) { - $value = substr($value, 2); - $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - } elseif (str_starts_with($value, '@?')) { - $value = substr($value, 2); - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } else { - $value = substr($value, 1); - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } - - if (null !== $invalidBehavior) { - $value = new Reference($value, $invalidBehavior); - } - } - - return $value; - } - - private function loadFromExtensions(array $content) - { - foreach ($content as $namespace => $values) { - if (\in_array($namespace, ['imports', 'parameters', 'services']) || 0 === strpos($namespace, 'when@')) { - continue; - } - - if (!\is_array($values) && null !== $values) { - $values = []; - } - - $this->container->loadFromExtension($namespace, $values); - } - } - - private function checkDefinition(string $id, array $definition, string $file) - { - if ($this->isLoadingInstanceof) { - $keywords = self::INSTANCEOF_KEYWORDS; - } elseif (isset($definition['resource']) || isset($definition['namespace'])) { - $keywords = self::PROTOTYPE_KEYWORDS; - } else { - $keywords = self::SERVICE_KEYWORDS; - } - - foreach ($definition as $key => $value) { - if (!isset($keywords[$key])) { - throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords))); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd b/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd deleted file mode 100644 index 3c30002..0000000 --- a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/dependency-injection/Parameter.php b/vendor/symfony/dependency-injection/Parameter.php deleted file mode 100644 index e182e12..0000000 --- a/vendor/symfony/dependency-injection/Parameter.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Parameter represents a parameter reference. - * - * @author Fabien Potencier - */ -class Parameter -{ - private $id; - - public function __construct(string $id) - { - $this->id = $id; - } - - /** - * @return string - */ - public function __toString() - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php b/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php deleted file mode 100644 index 54aaa55..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Container; - -/** - * @author Nicolas Grekas - */ -class ContainerBag extends FrozenParameterBag implements ContainerBagInterface -{ - private $container; - - public function __construct(Container $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->container->getParameterBag()->all(); - } - - /** - * {@inheritdoc} - * - * @return array|bool|string|int|float|\UnitEnum|null - */ - public function get(string $name) - { - return $this->container->getParameter($name); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has(string $name) - { - return $this->container->hasParameter($name); - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php b/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php deleted file mode 100644 index f8380ac..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; - -/** - * ContainerBagInterface is the interface implemented by objects that manage service container parameters. - * - * @author Nicolas Grekas - */ -interface ContainerBagInterface extends ContainerInterface -{ - /** - * Gets the service container parameters. - * - * @return array - */ - public function all(); - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @param mixed $value A value - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - */ - public function resolveValue($value); - - /** - * Escape parameter placeholders %. - * - * @param mixed $value - * - * @return mixed - */ - public function escapeValue($value); - - /** - * Unescape parameter placeholders %. - * - * @param mixed $value - * - * @return mixed - */ - public function unescapeValue($value); -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php deleted file mode 100644 index 67b8aee..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Nicolas Grekas - */ -class EnvPlaceholderParameterBag extends ParameterBag -{ - private $envPlaceholderUniquePrefix; - private $envPlaceholders = []; - private $unusedEnvPlaceholders = []; - private $providedTypes = []; - - private static $counter = 0; - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (str_starts_with($name, 'env(') && str_ends_with($name, ')') && 'env()' !== $name) { - $env = substr($name, 4, -1); - - if (isset($this->envPlaceholders[$env])) { - foreach ($this->envPlaceholders[$env] as $placeholder) { - return $placeholder; // return first result - } - } - if (isset($this->unusedEnvPlaceholders[$env])) { - foreach ($this->unusedEnvPlaceholders[$env] as $placeholder) { - return $placeholder; // return first result - } - } - if (!preg_match('/^(?:[-.\w]*+:)*+\w++$/', $env)) { - throw new InvalidArgumentException(sprintf('Invalid %s name: only "word" characters are allowed.', $name)); - } - if ($this->has($name) && null !== ($defaultValue = parent::get($name)) && !\is_string($defaultValue)) { - throw new RuntimeException(sprintf('The default value of an env() parameter must be a string or null, but "%s" given to "%s".', get_debug_type($defaultValue), $name)); - } - - $uniqueName = md5($name.'_'.self::$counter++); - $placeholder = sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.', '___'), $uniqueName); - $this->envPlaceholders[$env][$placeholder] = $placeholder; - - return $placeholder; - } - - return parent::get($name); - } - - /** - * Gets the common env placeholder prefix for env vars created by this bag. - */ - public function getEnvPlaceholderUniquePrefix(): string - { - if (null === $this->envPlaceholderUniquePrefix) { - $reproducibleEntropy = unserialize(serialize($this->parameters)); - array_walk_recursive($reproducibleEntropy, function (&$v) { $v = null; }); - $this->envPlaceholderUniquePrefix = 'env_'.substr(md5(serialize($reproducibleEntropy)), -16); - } - - return $this->envPlaceholderUniquePrefix; - } - - /** - * Returns the map of env vars used in the resolved parameter values to their placeholders. - * - * @return string[][] A map of env var names to their placeholders - */ - public function getEnvPlaceholders() - { - return $this->envPlaceholders; - } - - public function getUnusedEnvPlaceholders(): array - { - return $this->unusedEnvPlaceholders; - } - - public function clearUnusedEnvPlaceholders() - { - $this->unusedEnvPlaceholders = []; - } - - /** - * Merges the env placeholders of another EnvPlaceholderParameterBag. - */ - public function mergeEnvPlaceholders(self $bag) - { - if ($newPlaceholders = $bag->getEnvPlaceholders()) { - $this->envPlaceholders += $newPlaceholders; - - foreach ($newPlaceholders as $env => $placeholders) { - $this->envPlaceholders[$env] += $placeholders; - } - } - - if ($newUnusedPlaceholders = $bag->getUnusedEnvPlaceholders()) { - $this->unusedEnvPlaceholders += $newUnusedPlaceholders; - - foreach ($newUnusedPlaceholders as $env => $placeholders) { - $this->unusedEnvPlaceholders[$env] += $placeholders; - } - } - } - - /** - * Maps env prefixes to their corresponding PHP types. - */ - public function setProvidedTypes(array $providedTypes) - { - $this->providedTypes = $providedTypes; - } - - /** - * Gets the PHP types corresponding to env() parameter prefixes. - * - * @return string[][] - */ - public function getProvidedTypes() - { - return $this->providedTypes; - } - - /** - * {@inheritdoc} - */ - public function resolve() - { - if ($this->resolved) { - return; - } - parent::resolve(); - - foreach ($this->envPlaceholders as $env => $placeholders) { - if ($this->has($name = "env($env)") && null !== ($default = $this->parameters[$name]) && !\is_string($default)) { - throw new RuntimeException(sprintf('The default value of env parameter "%s" must be a string or null, "%s" given.', $env, get_debug_type($default))); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php deleted file mode 100644 index 5a4aaf8..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * Holds read-only parameters. - * - * @author Fabien Potencier - */ -class FrozenParameterBag extends ParameterBag -{ - /** - * For performance reasons, the constructor assumes that - * all keys are already lowercased. - * - * This is always the case when used internally. - * - * @param array $parameters An array of parameters - */ - public function __construct(array $parameters = []) - { - $this->parameters = $parameters; - $this->resolved = true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - throw new LogicException('Impossible to call clear() on a frozen ParameterBag.'); - } - - /** - * {@inheritdoc} - */ - public function add(array $parameters) - { - throw new LogicException('Impossible to call add() on a frozen ParameterBag.'); - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - throw new LogicException('Impossible to call remove() on a frozen ParameterBag.'); - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php deleted file mode 100644 index b1bf775..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php +++ /dev/null @@ -1,276 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Holds parameters. - * - * @author Fabien Potencier - */ -class ParameterBag implements ParameterBagInterface -{ - protected $parameters = []; - protected $resolved = false; - - public function __construct(array $parameters = []) - { - $this->add($parameters); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->parameters = []; - } - - /** - * {@inheritdoc} - */ - public function add(array $parameters) - { - foreach ($parameters as $key => $value) { - $this->set($key, $value); - } - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->parameters; - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (!\array_key_exists($name, $this->parameters)) { - if (!$name) { - throw new ParameterNotFoundException($name); - } - - $alternatives = []; - foreach ($this->parameters as $key => $parameterValue) { - $lev = levenshtein($name, $key); - if ($lev <= \strlen($name) / 3 || str_contains($key, $name)) { - $alternatives[] = $key; - } - } - - $nonNestedAlternative = null; - if (!\count($alternatives) && str_contains($name, '.')) { - $namePartsLength = array_map('strlen', explode('.', $name)); - $key = substr($name, 0, -1 * (1 + array_pop($namePartsLength))); - while (\count($namePartsLength)) { - if ($this->has($key)) { - if (\is_array($this->get($key))) { - $nonNestedAlternative = $key; - } - break; - } - - $key = substr($key, 0, -1 * (1 + array_pop($namePartsLength))); - } - } - - throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative); - } - - return $this->parameters[$name]; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->parameters[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return \array_key_exists($name, $this->parameters); - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - unset($this->parameters[$name]); - } - - /** - * {@inheritdoc} - */ - public function resolve() - { - if ($this->resolved) { - return; - } - - $parameters = []; - foreach ($this->parameters as $key => $value) { - try { - $value = $this->resolveValue($value); - $parameters[$key] = $this->unescapeValue($value); - } catch (ParameterNotFoundException $e) { - $e->setSourceKey($key); - - throw $e; - } - } - - $this->parameters = $parameters; - $this->resolved = true; - } - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @param mixed $value A value - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) - * - * @return mixed - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - * @throws ParameterCircularReferenceException if a circular reference if detected - * @throws RuntimeException when a given parameter has a type problem - */ - public function resolveValue($value, array $resolving = []) - { - if (\is_array($value)) { - $args = []; - foreach ($value as $k => $v) { - $args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving); - } - - return $args; - } - - if (!\is_string($value) || 2 > \strlen($value)) { - return $value; - } - - return $this->resolveString($value, $resolving); - } - - /** - * Resolves parameters inside a string. - * - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) - * - * @return mixed - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - * @throws ParameterCircularReferenceException if a circular reference if detected - * @throws RuntimeException when a given parameter has a type problem - */ - public function resolveString(string $value, array $resolving = []) - { - // we do this to deal with non string values (Boolean, integer, ...) - // as the preg_replace_callback throw an exception when trying - // a non-string in a parameter value - if (preg_match('/^%([^%\s]+)%$/', $value, $match)) { - $key = $match[1]; - - if (isset($resolving[$key])) { - throw new ParameterCircularReferenceException(array_keys($resolving)); - } - - $resolving[$key] = true; - - return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving); - } - - return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving, $value) { - // skip %% - if (!isset($match[1])) { - return '%%'; - } - - $key = $match[1]; - if (isset($resolving[$key])) { - throw new ParameterCircularReferenceException(array_keys($resolving)); - } - - $resolved = $this->get($key); - - if (!\is_string($resolved) && !is_numeric($resolved)) { - throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".', $key, get_debug_type($resolved), $value)); - } - - $resolved = (string) $resolved; - $resolving[$key] = true; - - return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving); - }, $value); - } - - public function isResolved() - { - return $this->resolved; - } - - /** - * {@inheritdoc} - */ - public function escapeValue($value) - { - if (\is_string($value)) { - return str_replace('%', '%%', $value); - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[$k] = $this->escapeValue($v); - } - - return $result; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - public function unescapeValue($value) - { - if (\is_string($value)) { - return str_replace('%%', '%', $value); - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[$k] = $this->unescapeValue($v); - } - - return $result; - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php deleted file mode 100644 index 808a0fa..0000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; - -/** - * ParameterBagInterface is the interface implemented by objects that manage service container parameters. - * - * @author Fabien Potencier - */ -interface ParameterBagInterface -{ - /** - * Clears all parameters. - * - * @throws LogicException if the ParameterBagInterface cannot be cleared - */ - public function clear(); - - /** - * Adds parameters to the service container parameters. - * - * @throws LogicException if the parameter cannot be added - */ - public function add(array $parameters); - - /** - * Gets the service container parameters. - * - * @return array - */ - public function all(); - - /** - * Gets a service container parameter. - * - * @return array|bool|string|int|float|\UnitEnum|null - * - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function get(string $name); - - /** - * Removes a parameter. - */ - public function remove(string $name); - - /** - * Sets a service container parameter. - * - * @param array|bool|string|int|float|\UnitEnum|null $value The parameter value - * - * @throws LogicException if the parameter cannot be set - */ - public function set(string $name, $value); - - /** - * Returns true if a parameter name is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Replaces parameter placeholders (%name%) by their values for all parameters. - */ - public function resolve(); - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @param mixed $value A value - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - */ - public function resolveValue($value); - - /** - * Escape parameter placeholders %. - * - * @param mixed $value - * - * @return mixed - */ - public function escapeValue($value); - - /** - * Unescape parameter placeholders %. - * - * @param mixed $value - * - * @return mixed - */ - public function unescapeValue($value); -} diff --git a/vendor/symfony/dependency-injection/README.md b/vendor/symfony/dependency-injection/README.md deleted file mode 100644 index fa6719a..0000000 --- a/vendor/symfony/dependency-injection/README.md +++ /dev/null @@ -1,14 +0,0 @@ -DependencyInjection Component -============================= - -The DependencyInjection component allows you to standardize and centralize the -way objects are constructed in your application. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/dependency_injection.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/dependency-injection/Reference.php b/vendor/symfony/dependency-injection/Reference.php deleted file mode 100644 index 7f7b32c..0000000 --- a/vendor/symfony/dependency-injection/Reference.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Reference represents a service reference. - * - * @author Fabien Potencier - */ -class Reference -{ - private $id; - private $invalidBehavior; - - public function __construct(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) - { - $this->id = $id; - $this->invalidBehavior = $invalidBehavior; - } - - /** - * @return string - */ - public function __toString() - { - return $this->id; - } - - /** - * Returns the behavior to be used when the service does not exist. - * - * @return int - */ - public function getInvalidBehavior() - { - return $this->invalidBehavior; - } -} diff --git a/vendor/symfony/dependency-injection/ReverseContainer.php b/vendor/symfony/dependency-injection/ReverseContainer.php deleted file mode 100644 index 280e9e2..0000000 --- a/vendor/symfony/dependency-injection/ReverseContainer.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -/** - * Turns public and "container.reversible" services back to their ids. - * - * @author Nicolas Grekas - */ -final class ReverseContainer -{ - private $serviceContainer; - private $reversibleLocator; - private $tagName; - private $getServiceId; - - public function __construct(Container $serviceContainer, ContainerInterface $reversibleLocator, string $tagName = 'container.reversible') - { - $this->serviceContainer = $serviceContainer; - $this->reversibleLocator = $reversibleLocator; - $this->tagName = $tagName; - $this->getServiceId = \Closure::bind(function (object $service): ?string { - return array_search($service, $this->services, true) ?: array_search($service, $this->privates, true) ?: null; - }, $serviceContainer, Container::class); - } - - /** - * Returns the id of the passed object when it exists as a service. - * - * To be reversible, services need to be either public or be tagged with "container.reversible". - */ - public function getId(object $service): ?string - { - if ($this->serviceContainer === $service) { - return 'service_container'; - } - - if (null === $id = ($this->getServiceId)($service)) { - return null; - } - - if ($this->serviceContainer->has($id) || $this->reversibleLocator->has($id)) { - return $id; - } - - return null; - } - - /** - * @throws ServiceNotFoundException When the service is not reversible - */ - public function getService(string $id): object - { - if ($this->serviceContainer->has($id)) { - return $this->serviceContainer->get($id); - } - - if ($this->reversibleLocator->has($id)) { - return $this->reversibleLocator->get($id); - } - - if (isset($this->serviceContainer->getRemovedIds()[$id])) { - throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is private and cannot be accessed by reference. You should either make it public, or tag it as "%s".', $id, $this->tagName)); - } - - // will throw a ServiceNotFoundException - $this->serviceContainer->get($id); - } -} diff --git a/vendor/symfony/dependency-injection/ServiceLocator.php b/vendor/symfony/dependency-injection/ServiceLocator.php deleted file mode 100644 index 4be0d6f..0000000 --- a/vendor/symfony/dependency-injection/ServiceLocator.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Contracts\Service\ServiceLocatorTrait; -use Symfony\Contracts\Service\ServiceProviderInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * @author Robin Chalas - * @author Nicolas Grekas - */ -class ServiceLocator implements ServiceProviderInterface -{ - use ServiceLocatorTrait { - get as private doGet; - } - - private $externalId; - private $container; - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $id) - { - if (!$this->externalId) { - return $this->doGet($id); - } - - try { - return $this->doGet($id); - } catch (RuntimeException $e) { - $what = sprintf('service "%s" required by "%s"', $id, $this->externalId); - $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage()); - - if ($e->getMessage() === $message) { - $message = sprintf('Cannot resolve %s: %s', $what, $message); - } - - $r = new \ReflectionProperty($e, 'message'); - $r->setAccessible(true); - $r->setValue($e, $message); - - throw $e; - } - } - - public function __invoke(string $id) - { - return isset($this->factories[$id]) ? $this->get($id) : null; - } - - /** - * @internal - * - * @return static - */ - public function withContext(string $externalId, Container $container): self - { - $locator = clone $this; - $locator->externalId = $externalId; - $locator->container = $container; - - return $locator; - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if ($this->loading) { - $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $this->formatAlternatives()); - - return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $msg); - } - - $class = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 4); - $class = isset($class[3]['object']) ? \get_class($class[3]['object']) : null; - $externalId = $this->externalId ?: $class; - - $msg = []; - $msg[] = sprintf('Service "%s" not found:', $id); - - if (!$this->container) { - $class = null; - } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { - $msg[] = 'even though it exists in the app\'s container,'; - } else { - try { - $this->container->get($id); - $class = null; - } catch (ServiceNotFoundException $e) { - if ($e->getAlternatives()) { - $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or')); - } else { - $class = null; - } - } - } - if ($externalId) { - $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); - } else { - $msg[] = sprintf('the current service locator %s', $this->formatAlternatives()); - } - - if (!$class) { - // no-op - } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) { - $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); - } else { - $msg[] = 'Try using dependency injection instead.'; - } - - return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], implode(' ', $msg)); - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new ServiceCircularReferenceException($id, $path); - } - - private function formatAlternatives(array $alternatives = null, string $separator = 'and'): string - { - $format = '"%s"%s'; - if (null === $alternatives) { - if (!$alternatives = array_keys($this->factories)) { - return 'is empty...'; - } - $format = sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : ''); - } - $last = array_pop($alternatives); - - return sprintf($format, $alternatives ? implode('", "', $alternatives) : $last, $alternatives ? sprintf(' %s "%s"', $separator, $last) : ''); - } -} diff --git a/vendor/symfony/dependency-injection/TaggedContainerInterface.php b/vendor/symfony/dependency-injection/TaggedContainerInterface.php deleted file mode 100644 index 25d5a09..0000000 --- a/vendor/symfony/dependency-injection/TaggedContainerInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags. - * - * @author Fabien Potencier - */ -interface TaggedContainerInterface extends ContainerInterface -{ - /** - * Returns service ids for a given tag. - * - * @param string $name The tag name - * - * @return array - */ - public function findTaggedServiceIds(string $name); -} diff --git a/vendor/symfony/dependency-injection/TypedReference.php b/vendor/symfony/dependency-injection/TypedReference.php deleted file mode 100644 index 4099a00..0000000 --- a/vendor/symfony/dependency-injection/TypedReference.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Represents a PHP type-hinted service reference. - * - * @author Nicolas Grekas - */ -class TypedReference extends Reference -{ - private $type; - private $name; - - /** - * @param string $id The service identifier - * @param string $type The PHP type of the identified service - * @param int $invalidBehavior The behavior when the service does not exist - * @param string|null $name The name of the argument targeting the service - */ - public function __construct(string $id, string $type, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, string $name = null) - { - $this->name = $type === $id ? $name : null; - parent::__construct($id, $invalidBehavior); - $this->type = $type; - } - - public function getType() - { - return $this->type; - } - - public function getName(): ?string - { - return $this->name; - } -} diff --git a/vendor/symfony/dependency-injection/Variable.php b/vendor/symfony/dependency-injection/Variable.php deleted file mode 100644 index 21d33eb..0000000 --- a/vendor/symfony/dependency-injection/Variable.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Represents a variable. - * - * $var = new Variable('a'); - * - * will be dumped as - * - * $a - * - * by the PHP dumper. - * - * @author Johannes M. Schmitt - */ -class Variable -{ - private $name; - - public function __construct(string $name) - { - $this->name = $name; - } - - /** - * @return string - */ - public function __toString() - { - return $this->name; - } -} diff --git a/vendor/symfony/dependency-injection/composer.json b/vendor/symfony/dependency-injection/composer.json deleted file mode 100644 index cb891c7..0000000 --- a/vendor/symfony/dependency-injection/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "symfony/dependency-injection", - "type": "library", - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/service-contracts": "^1.1.6|^2" - }, - "require-dev": { - "symfony/yaml": "^4.4.26|^5.0|^6.0", - "symfony/config": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/yaml": "", - "symfony/config": "", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<5.3", - "symfony/finder": "<4.4", - "symfony/proxy-manager-bridge": "<4.4", - "symfony/yaml": "<4.4.26" - }, - "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0|2.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/deprecation-contracts/.gitignore b/vendor/symfony/deprecation-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/deprecation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/deprecation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE deleted file mode 100644 index 406242f..0000000 --- a/vendor/symfony/deprecation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md deleted file mode 100644 index 4957933..0000000 --- a/vendor/symfony/deprecation-contracts/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Symfony Deprecation Contracts -============================= - -A generic function and convention to trigger deprecation notices. - -This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices. - -By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, -the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments. - -The function requires at least 3 arguments: - - the name of the Composer package that is triggering the deprecation - - the version of the package that introduced the deprecation - - the message of the deprecation - - more arguments can be provided: they will be inserted in the message using `printf()` formatting - -Example: -```php -trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin'); -``` - -This will generate the following message: -`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` - -While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty -`function trigger_deprecation() {}` in your application. diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json deleted file mode 100644 index cc7cc12..0000000 --- a/vendor/symfony/deprecation-contracts/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/deprecation-contracts", - "type": "library", - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php deleted file mode 100644 index d437150..0000000 --- a/vendor/symfony/deprecation-contracts/function.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (!function_exists('trigger_deprecation')) { - /** - * Triggers a silenced deprecation notice. - * - * @param string $package The name of the Composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The message of the deprecation - * @param mixed ...$args Values to insert in the message using printf() formatting - * - * @author Nicolas Grekas - */ - function trigger_deprecation(string $package, string $version, string $message, ...$args): void - { - @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); - } -} diff --git a/vendor/symfony/dotenv/CHANGELOG.md b/vendor/symfony/dotenv/CHANGELOG.md deleted file mode 100644 index 3cf07ee..0000000 --- a/vendor/symfony/dotenv/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `dotenv:dump` command to compile the contents of the .env files into a PHP-optimized file called `.env.local.php` - * Add `debug:dotenv` command to list all dotenv files with variables and values - * Add `$overrideExistingVars` on `Dotenv::bootEnv()` and `Dotenv::loadEnv()` - -5.1.0 ------ - - * added `Dotenv::bootEnv()` to check for `.env.local.php` before calling `Dotenv::loadEnv()` - * added `Dotenv::setProdEnvs()` and `Dotenv::usePutenv()` - * made Dotenv's constructor accept `$envKey` and `$debugKey` arguments, to define - the name of the env vars that configure the env name and debug settings - * deprecated passing `$usePutenv` argument to Dotenv's constructor - -5.0.0 ------ - - * using `putenv()` is disabled by default - -4.3.0 ------ - - * deprecated use of `putenv()` by default. This feature will be opted-in with a constructor argument to `Dotenv` - -4.2.0 ------ - - * added `Dotenv::overload()` and `$overrideExistingVars` as optional parameter of `Dotenv::populate()` - * added `Dotenv::loadEnv()` to load a .env file and its corresponding .env.local, .env.$env and .env.$env.local files if they exist - -3.3.0 ------ - - * [BC BREAK] Since v3.3.7, the latest Dotenv files override the previous ones. Real env vars are not affected and are not overridden. - * added the component diff --git a/vendor/symfony/dotenv/Command/DebugCommand.php b/vendor/symfony/dotenv/Command/DebugCommand.php deleted file mode 100644 index 8ceb1fd..0000000 --- a/vendor/symfony/dotenv/Command/DebugCommand.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Dotenv\Dotenv; - -/** - * A console command to debug current dotenv files with variables and values. - * - * @author Christopher Hertel - */ -final class DebugCommand extends Command -{ - protected static $defaultName = 'debug:dotenv'; - protected static $defaultDescription = 'Lists all dotenv files with variables and values'; - - private $kernelEnvironment; - private $projectDirectory; - - public function __construct(string $kernelEnvironment, string $projectDirectory) - { - $this->kernelEnvironment = $kernelEnvironment; - $this->projectDirectory = $projectDirectory; - - parent::__construct(); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $io->title('Dotenv Variables & Files'); - - if (!\array_key_exists('SYMFONY_DOTENV_VARS', $_SERVER)) { - $io->error('Dotenv component is not initialized.'); - - return 1; - } - - $envFiles = $this->getEnvFiles(); - $availableFiles = array_filter($envFiles, function (string $file) { - return is_file($this->getFilePath($file)); - }); - - if (\in_array('.env.local.php', $availableFiles, true)) { - $io->warning('Due to existing dump file (.env.local.php) all other dotenv files are skipped.'); - } - - if (is_file($this->getFilePath('.env')) && is_file($this->getFilePath('.env.dist'))) { - $io->warning('The file .env.dist gets skipped due to the existence of .env.'); - } - - $io->section('Scanned Files (in descending priority)'); - $io->listing(array_map(static function (string $envFile) use ($availableFiles) { - return \in_array($envFile, $availableFiles, true) - ? sprintf('✓ %s', $envFile) - : sprintf('⨯ %s', $envFile); - }, $envFiles)); - - $io->section('Variables'); - $io->table( - array_merge(['Variable', 'Value'], $availableFiles), - $this->getVariables($availableFiles) - ); - - $io->comment('Note real values might be different between web and CLI.'); - - return 0; - } - - private function getVariables(array $envFiles): array - { - $vars = explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? ''); - sort($vars); - - $output = []; - $fileValues = []; - foreach ($vars as $var) { - $realValue = $_SERVER[$var]; - $varDetails = [$var, $realValue]; - foreach ($envFiles as $envFile) { - $values = $fileValues[$envFile] ?? $fileValues[$envFile] = $this->loadValues($envFile); - - $varString = $values[$var] ?? 'n/a'; - $shortenedVar = $this->getHelper('formatter')->truncate($varString, 30); - $varDetails[] = $varString === $realValue ? ''.$shortenedVar.'' : $shortenedVar; - } - - $output[] = $varDetails; - } - - return $output; - } - - private function getEnvFiles(): array - { - $files = [ - '.env.local.php', - sprintf('.env.%s.local', $this->kernelEnvironment), - sprintf('.env.%s', $this->kernelEnvironment), - ]; - - if ('test' !== $this->kernelEnvironment) { - $files[] = '.env.local'; - } - - if (!is_file($this->getFilePath('.env')) && is_file($this->getFilePath('.env.dist'))) { - $files[] = '.env.dist'; - } else { - $files[] = '.env'; - } - - return $files; - } - - private function getFilePath(string $file): string - { - return $this->projectDirectory.\DIRECTORY_SEPARATOR.$file; - } - - private function loadValues(string $file): array - { - $filePath = $this->getFilePath($file); - - if (str_ends_with($filePath, '.php')) { - return include $filePath; - } - - return (new Dotenv())->parse(file_get_contents($filePath)); - } -} diff --git a/vendor/symfony/dotenv/Command/DotenvDumpCommand.php b/vendor/symfony/dotenv/Command/DotenvDumpCommand.php deleted file mode 100644 index 4411054..0000000 --- a/vendor/symfony/dotenv/Command/DotenvDumpCommand.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; -use Symfony\Component\Dotenv\Dotenv; - -/** - * A console command to compile .env files into a PHP-optimized file called .env.local.php. - * - * @internal - */ -#[Autoconfigure(bind: ['$projectDir' => '%kernel.project_dir%', '$defaultEnv' => '%kernel.environment%'])] -final class DotenvDumpCommand extends Command -{ - protected static $defaultName = 'dotenv:dump'; - protected static $defaultDescription = 'Compiles .env files to .env.local.php'; - - private $projectDir; - private $defaultEnv; - - public function __construct(string $projectDir, string $defaultEnv = null) - { - $this->projectDir = $projectDir; - $this->defaultEnv = $defaultEnv; - - parent::__construct(); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('env', null === $this->defaultEnv ? InputArgument::REQUIRED : InputArgument::OPTIONAL, 'The application environment to dump .env files for - e.g. "prod".'), - ]) - ->addOption('empty', null, InputOption::VALUE_NONE, 'Ignore the content of .env files') - ->setHelp(<<<'EOT' -The %command.name% command compiles .env files into a PHP-optimized file called .env.local.php. - - %command.full_name% -EOT - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $config = []; - if (is_file($projectDir = $this->projectDir)) { - $config = ['dotenv_path' => basename($projectDir)]; - $projectDir = \dirname($projectDir); - } - - $composerFile = $projectDir.'/composer.json'; - $config += (is_file($composerFile) ? json_decode(file_get_contents($composerFile), true) : [])['extra']['runtime'] ?? []; - $dotenvPath = $projectDir.'/'.($config['dotenv_path'] ?? '.env'); - $env = $input->getArgument('env') ?? $this->defaultEnv; - $envKey = $config['env_var_name'] ?? 'APP_ENV'; - - if ($input->getOption('empty')) { - $vars = [$envKey => $env]; - } else { - $vars = $this->loadEnv($dotenvPath, $env, $config); - $env = $vars[$envKey]; - } - - $vars = var_export($vars, true); - $vars = <<writeln(sprintf('Successfully dumped .env files in .env.local.php for the %s environment.', $env)); - - return 0; - } - - private function loadEnv(string $dotenvPath, string $env, array $config): array - { - $dotenv = new Dotenv(); - $envKey = $config['env_var_name'] ?? 'APP_ENV'; - $testEnvs = $config['test_envs'] ?? ['test']; - - $globalsBackup = [$_SERVER, $_ENV]; - unset($_SERVER[$envKey]); - $_ENV = [$envKey => $env]; - $_SERVER['SYMFONY_DOTENV_VARS'] = implode(',', array_keys($_SERVER)); - - try { - $dotenv->loadEnv($dotenvPath, null, 'dev', $testEnvs); - unset($_ENV['SYMFONY_DOTENV_VARS']); - - return $_ENV; - } finally { - [$_SERVER, $_ENV] = $globalsBackup; - } - } -} diff --git a/vendor/symfony/dotenv/Dotenv.php b/vendor/symfony/dotenv/Dotenv.php deleted file mode 100644 index 2c76d52..0000000 --- a/vendor/symfony/dotenv/Dotenv.php +++ /dev/null @@ -1,573 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv; - -use Symfony\Component\Dotenv\Exception\FormatException; -use Symfony\Component\Dotenv\Exception\FormatExceptionContext; -use Symfony\Component\Dotenv\Exception\PathException; -use Symfony\Component\Process\Exception\ExceptionInterface as ProcessException; -use Symfony\Component\Process\Process; - -/** - * Manages .env files. - * - * @author Fabien Potencier - * @author Kévin Dunglas - */ -final class Dotenv -{ - public const VARNAME_REGEX = '(?i:[A-Z][A-Z0-9_]*+)'; - public const STATE_VARNAME = 0; - public const STATE_VALUE = 1; - - private $path; - private $cursor; - private $lineno; - private $data; - private $end; - private $values; - private $envKey; - private $debugKey; - private $prodEnvs = ['prod']; - private $usePutenv = false; - - /** - * @param string $envKey - */ - public function __construct($envKey = 'APP_ENV', string $debugKey = 'APP_DEBUG') - { - if (\in_array($envKey = (string) $envKey, ['1', ''], true)) { - trigger_deprecation('symfony/dotenv', '5.1', 'Passing a boolean to the constructor of "%s" is deprecated, use "Dotenv::usePutenv()".', __CLASS__); - $this->usePutenv = (bool) $envKey; - $envKey = 'APP_ENV'; - } - - $this->envKey = $envKey; - $this->debugKey = $debugKey; - } - - /** - * @return $this - */ - public function setProdEnvs(array $prodEnvs): self - { - $this->prodEnvs = $prodEnvs; - - return $this; - } - - /** - * @param bool $usePutenv If `putenv()` should be used to define environment variables or not. - * Beware that `putenv()` is not thread safe, that's why this setting defaults to false - * - * @return $this - */ - public function usePutenv(bool $usePutenv = true): self - { - $this->usePutenv = $usePutenv; - - return $this; - } - - /** - * Loads one or several .env files. - * - * @param string $path A file to load - * @param string[] ...$extraPaths A list of additional files to load - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function load(string $path, string ...$extraPaths): void - { - $this->doLoad(false, \func_get_args()); - } - - /** - * Loads a .env file and the corresponding .env.local, .env.$env and .env.$env.local files if they exist. - * - * .env.local is always ignored in test env because tests should produce the same results for everyone. - * .env.dist is loaded when it exists and .env is not found. - * - * @param string $path A file to load - * @param string $envKey|null The name of the env vars that defines the app env - * @param string $defaultEnv The app env to use when none is defined - * @param array $testEnvs A list of app envs for which .env.local should be ignored - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function loadEnv(string $path, string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void - { - $k = $envKey ?? $this->envKey; - - if (is_file($path) || !is_file($p = "$path.dist")) { - $this->doLoad($overrideExistingVars, [$path]); - } else { - $this->doLoad($overrideExistingVars, [$p]); - } - - if (null === $env = $_SERVER[$k] ?? $_ENV[$k] ?? null) { - $this->populate([$k => $env = $defaultEnv], $overrideExistingVars); - } - - if (!\in_array($env, $testEnvs, true) && is_file($p = "$path.local")) { - $this->doLoad($overrideExistingVars, [$p]); - $env = $_SERVER[$k] ?? $_ENV[$k] ?? $env; - } - - if ('local' === $env) { - return; - } - - if (is_file($p = "$path.$env")) { - $this->doLoad($overrideExistingVars, [$p]); - } - - if (is_file($p = "$path.$env.local")) { - $this->doLoad($overrideExistingVars, [$p]); - } - } - - /** - * Loads env vars from .env.local.php if the file exists or from the other .env files otherwise. - * - * This method also configures the APP_DEBUG env var according to the current APP_ENV. - * - * See method loadEnv() for rules related to .env files. - */ - public function bootEnv(string $path, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void - { - $p = $path.'.local.php'; - $env = is_file($p) ? include $p : null; - $k = $this->envKey; - - if (\is_array($env) && ($overrideExistingVars || !isset($env[$k]) || ($_SERVER[$k] ?? $_ENV[$k] ?? $env[$k]) === $env[$k])) { - $this->populate($env, $overrideExistingVars); - } else { - $this->loadEnv($path, $k, $defaultEnv, $testEnvs, $overrideExistingVars); - } - - $_SERVER += $_ENV; - - $k = $this->debugKey; - $debug = $_SERVER[$k] ?? !\in_array($_SERVER[$this->envKey], $this->prodEnvs, true); - $_SERVER[$k] = $_ENV[$k] = (int) $debug || (!\is_bool($debug) && filter_var($debug, \FILTER_VALIDATE_BOOLEAN)) ? '1' : '0'; - } - - /** - * Loads one or several .env files and enables override existing vars. - * - * @param string $path A file to load - * @param string[] ...$extraPaths A list of additional files to load - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function overload(string $path, string ...$extraPaths): void - { - $this->doLoad(true, \func_get_args()); - } - - /** - * Sets values as environment variables (via putenv, $_ENV, and $_SERVER). - * - * @param array $values An array of env variables - * @param bool $overrideExistingVars true when existing environment variables must be overridden - */ - public function populate(array $values, bool $overrideExistingVars = false): void - { - $updateLoadedVars = false; - $loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '')); - - foreach ($values as $name => $value) { - $notHttpName = 0 !== strpos($name, 'HTTP_'); - if (isset($_SERVER[$name]) && $notHttpName && !isset($_ENV[$name])) { - $_ENV[$name] = $_SERVER[$name]; - } - - // don't check existence with getenv() because of thread safety issues - if (!isset($loadedVars[$name]) && !$overrideExistingVars && isset($_ENV[$name])) { - continue; - } - - if ($this->usePutenv) { - putenv("$name=$value"); - } - - $_ENV[$name] = $value; - if ($notHttpName) { - $_SERVER[$name] = $value; - } - - if (!isset($loadedVars[$name])) { - $loadedVars[$name] = $updateLoadedVars = true; - } - } - - if ($updateLoadedVars) { - unset($loadedVars['']); - $loadedVars = implode(',', array_keys($loadedVars)); - $_ENV['SYMFONY_DOTENV_VARS'] = $_SERVER['SYMFONY_DOTENV_VARS'] = $loadedVars; - - if ($this->usePutenv) { - putenv('SYMFONY_DOTENV_VARS='.$loadedVars); - } - } - } - - /** - * Parses the contents of an .env file. - * - * @param string $data The data to be parsed - * @param string $path The original file name where data where stored (used for more meaningful error messages) - * - * @throws FormatException when a file has a syntax error - */ - public function parse(string $data, string $path = '.env'): array - { - $this->path = $path; - $this->data = str_replace(["\r\n", "\r"], "\n", $data); - $this->lineno = 1; - $this->cursor = 0; - $this->end = \strlen($this->data); - $state = self::STATE_VARNAME; - $this->values = []; - $name = ''; - - $this->skipEmptyLines(); - - while ($this->cursor < $this->end) { - switch ($state) { - case self::STATE_VARNAME: - $name = $this->lexVarname(); - $state = self::STATE_VALUE; - break; - - case self::STATE_VALUE: - $this->values[$name] = $this->lexValue(); - $state = self::STATE_VARNAME; - break; - } - } - - if (self::STATE_VALUE === $state) { - $this->values[$name] = ''; - } - - try { - return $this->values; - } finally { - $this->values = []; - $this->data = null; - $this->path = null; - } - } - - private function lexVarname(): string - { - // var name + optional export - if (!preg_match('/(export[ \t]++)?('.self::VARNAME_REGEX.')/A', $this->data, $matches, 0, $this->cursor)) { - throw $this->createFormatException('Invalid character in variable name'); - } - $this->moveCursor($matches[0]); - - if ($this->cursor === $this->end || "\n" === $this->data[$this->cursor] || '#' === $this->data[$this->cursor]) { - if ($matches[1]) { - throw $this->createFormatException('Unable to unset an environment variable'); - } - - throw $this->createFormatException('Missing = in the environment variable declaration'); - } - - if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) { - throw $this->createFormatException('Whitespace characters are not supported after the variable name'); - } - - if ('=' !== $this->data[$this->cursor]) { - throw $this->createFormatException('Missing = in the environment variable declaration'); - } - ++$this->cursor; - - return $matches[2]; - } - - private function lexValue(): string - { - if (preg_match('/[ \t]*+(?:#.*)?$/Am', $this->data, $matches, 0, $this->cursor)) { - $this->moveCursor($matches[0]); - $this->skipEmptyLines(); - - return ''; - } - - if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) { - throw $this->createFormatException('Whitespace are not supported before the value'); - } - - $loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? ($_ENV['SYMFONY_DOTENV_VARS'] ?? ''))); - unset($loadedVars['']); - $v = ''; - - do { - if ("'" === $this->data[$this->cursor]) { - $len = 0; - - do { - if ($this->cursor + ++$len === $this->end) { - $this->cursor += $len; - - throw $this->createFormatException('Missing quote to end the value'); - } - } while ("'" !== $this->data[$this->cursor + $len]); - - $v .= substr($this->data, 1 + $this->cursor, $len - 1); - $this->cursor += 1 + $len; - } elseif ('"' === $this->data[$this->cursor]) { - $value = ''; - - if (++$this->cursor === $this->end) { - throw $this->createFormatException('Missing quote to end the value'); - } - - while ('"' !== $this->data[$this->cursor] || ('\\' === $this->data[$this->cursor - 1] && '\\' !== $this->data[$this->cursor - 2])) { - $value .= $this->data[$this->cursor]; - ++$this->cursor; - - if ($this->cursor === $this->end) { - throw $this->createFormatException('Missing quote to end the value'); - } - } - ++$this->cursor; - $value = str_replace(['\\"', '\r', '\n'], ['"', "\r", "\n"], $value); - $resolvedValue = $value; - $resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars); - $resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars); - $resolvedValue = str_replace('\\\\', '\\', $resolvedValue); - $v .= $resolvedValue; - } else { - $value = ''; - $prevChr = $this->data[$this->cursor - 1]; - while ($this->cursor < $this->end && !\in_array($this->data[$this->cursor], ["\n", '"', "'"], true) && !((' ' === $prevChr || "\t" === $prevChr) && '#' === $this->data[$this->cursor])) { - if ('\\' === $this->data[$this->cursor] && isset($this->data[$this->cursor + 1]) && ('"' === $this->data[$this->cursor + 1] || "'" === $this->data[$this->cursor + 1])) { - ++$this->cursor; - } - - $value .= $prevChr = $this->data[$this->cursor]; - - if ('$' === $this->data[$this->cursor] && isset($this->data[$this->cursor + 1]) && '(' === $this->data[$this->cursor + 1]) { - ++$this->cursor; - $value .= '('.$this->lexNestedExpression().')'; - } - - ++$this->cursor; - } - $value = rtrim($value); - $resolvedValue = $value; - $resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars); - $resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars); - $resolvedValue = str_replace('\\\\', '\\', $resolvedValue); - - if ($resolvedValue === $value && preg_match('/\s+/', $value)) { - throw $this->createFormatException('A value containing spaces must be surrounded by quotes'); - } - - $v .= $resolvedValue; - - if ($this->cursor < $this->end && '#' === $this->data[$this->cursor]) { - break; - } - } - } while ($this->cursor < $this->end && "\n" !== $this->data[$this->cursor]); - - $this->skipEmptyLines(); - - return $v; - } - - private function lexNestedExpression(): string - { - ++$this->cursor; - $value = ''; - - while ("\n" !== $this->data[$this->cursor] && ')' !== $this->data[$this->cursor]) { - $value .= $this->data[$this->cursor]; - - if ('(' === $this->data[$this->cursor]) { - $value .= $this->lexNestedExpression().')'; - } - - ++$this->cursor; - - if ($this->cursor === $this->end) { - throw $this->createFormatException('Missing closing parenthesis.'); - } - } - - if ("\n" === $this->data[$this->cursor]) { - throw $this->createFormatException('Missing closing parenthesis.'); - } - - return $value; - } - - private function skipEmptyLines() - { - if (preg_match('/(?:\s*+(?:#[^\n]*+)?+)++/A', $this->data, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - } - } - - private function resolveCommands(string $value, array $loadedVars): string - { - if (false === strpos($value, '$')) { - return $value; - } - - $regex = '/ - (\\\\)? # escaped with a backslash? - \$ - (? - \( # require opening parenthesis - ([^()]|\g)+ # allow any number of non-parens, or balanced parens (by nesting the expression recursively) - \) # require closing paren - ) - /x'; - - return preg_replace_callback($regex, function ($matches) use ($loadedVars) { - if ('\\' === $matches[1]) { - return substr($matches[0], 1); - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - throw new \LogicException('Resolving commands is not supported on Windows.'); - } - - if (!class_exists(Process::class)) { - throw new \LogicException('Resolving commands requires the Symfony Process component.'); - } - - $process = method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline('echo '.$matches[0]) : new Process('echo '.$matches[0]); - - if (!method_exists(Process::class, 'fromShellCommandline') && method_exists(Process::class, 'inheritEnvironmentVariables')) { - // Symfony 3.4 does not inherit env vars by default: - $process->inheritEnvironmentVariables(); - } - - $env = []; - foreach ($this->values as $name => $value) { - if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')))) { - $env[$name] = $value; - } - } - $process->setEnv($env); - - try { - $process->mustRun(); - } catch (ProcessException $e) { - throw $this->createFormatException(sprintf('Issue expanding a command (%s)', $process->getErrorOutput())); - } - - return preg_replace('/[\r\n]+$/', '', $process->getOutput()); - }, $value); - } - - private function resolveVariables(string $value, array $loadedVars): string - { - if (false === strpos($value, '$')) { - return $value; - } - - $regex = '/ - (?\\\\*) # escaped with a backslash? - \$ - (?!\() # no opening parenthesis - (?P\{)? # optional brace - (?P'.self::VARNAME_REGEX.')? # var name - (?P:[-=][^\}]++)? # optional default value - (?P\})? # optional closing brace - /x'; - - $value = preg_replace_callback($regex, function ($matches) use ($loadedVars) { - // odd number of backslashes means the $ character is escaped - if (1 === \strlen($matches['backslashes']) % 2) { - return substr($matches[0], 1); - } - - // unescaped $ not followed by variable name - if (!isset($matches['name'])) { - return $matches[0]; - } - - if ('{' === $matches['opening_brace'] && !isset($matches['closing_brace'])) { - throw $this->createFormatException('Unclosed braces on variable expansion'); - } - - $name = $matches['name']; - if (isset($loadedVars[$name]) && isset($this->values[$name])) { - $value = $this->values[$name]; - } elseif (isset($_ENV[$name])) { - $value = $_ENV[$name]; - } elseif (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) { - $value = $_SERVER[$name]; - } elseif (isset($this->values[$name])) { - $value = $this->values[$name]; - } else { - $value = (string) getenv($name); - } - - if ('' === $value && isset($matches['default_value']) && '' !== $matches['default_value']) { - $unsupportedChars = strpbrk($matches['default_value'], '\'"{$'); - if (false !== $unsupportedChars) { - throw $this->createFormatException(sprintf('Unsupported character "%s" found in the default value of variable "$%s".', $unsupportedChars[0], $name)); - } - - $value = substr($matches['default_value'], 2); - - if ('=' === $matches['default_value'][1]) { - $this->values[$name] = $value; - } - } - - if (!$matches['opening_brace'] && isset($matches['closing_brace'])) { - $value .= '}'; - } - - return $matches['backslashes'].$value; - }, $value); - - return $value; - } - - private function moveCursor(string $text) - { - $this->cursor += \strlen($text); - $this->lineno += substr_count($text, "\n"); - } - - private function createFormatException(string $message): FormatException - { - return new FormatException($message, new FormatExceptionContext($this->data, $this->path, $this->lineno, $this->cursor)); - } - - private function doLoad(bool $overrideExistingVars, array $paths): void - { - foreach ($paths as $path) { - if (!is_readable($path) || is_dir($path)) { - throw new PathException($path); - } - - $this->populate($this->parse(file_get_contents($path), $path), $overrideExistingVars); - } - } -} diff --git a/vendor/symfony/dotenv/Exception/ExceptionInterface.php b/vendor/symfony/dotenv/Exception/ExceptionInterface.php deleted file mode 100644 index 140a93f..0000000 --- a/vendor/symfony/dotenv/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Interface for exceptions. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/dotenv/Exception/FormatException.php b/vendor/symfony/dotenv/Exception/FormatException.php deleted file mode 100644 index 3ac77e5..0000000 --- a/vendor/symfony/dotenv/Exception/FormatException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Thrown when a file has a syntax error. - * - * @author Fabien Potencier - */ -final class FormatException extends \LogicException implements ExceptionInterface -{ - private $context; - - public function __construct(string $message, FormatExceptionContext $context, int $code = 0, \Throwable $previous = null) - { - $this->context = $context; - - parent::__construct(sprintf("%s in \"%s\" at line %d.\n%s", $message, $context->getPath(), $context->getLineno(), $context->getDetails()), $code, $previous); - } - - public function getContext(): FormatExceptionContext - { - return $this->context; - } -} diff --git a/vendor/symfony/dotenv/Exception/FormatExceptionContext.php b/vendor/symfony/dotenv/Exception/FormatExceptionContext.php deleted file mode 100644 index 96d902f..0000000 --- a/vendor/symfony/dotenv/Exception/FormatExceptionContext.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * @author Fabien Potencier - */ -final class FormatExceptionContext -{ - private $data; - private $path; - private $lineno; - private $cursor; - - public function __construct(string $data, string $path, int $lineno, int $cursor) - { - $this->data = $data; - $this->path = $path; - $this->lineno = $lineno; - $this->cursor = $cursor; - } - - public function getPath(): string - { - return $this->path; - } - - public function getLineno(): int - { - return $this->lineno; - } - - public function getDetails(): string - { - $before = str_replace("\n", '\n', substr($this->data, max(0, $this->cursor - 20), min(20, $this->cursor))); - $after = str_replace("\n", '\n', substr($this->data, $this->cursor, 20)); - - return '...'.$before.$after."...\n".str_repeat(' ', \strlen($before) + 2).'^ line '.$this->lineno.' offset '.$this->cursor; - } -} diff --git a/vendor/symfony/dotenv/Exception/PathException.php b/vendor/symfony/dotenv/Exception/PathException.php deleted file mode 100644 index 4a4d717..0000000 --- a/vendor/symfony/dotenv/Exception/PathException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Thrown when a file does not exist or is not readable. - * - * @author Fabien Potencier - */ -final class PathException extends \RuntimeException implements ExceptionInterface -{ - public function __construct(string $path, int $code = 0, \Throwable $previous = null) - { - parent::__construct(sprintf('Unable to read the "%s" environment file.', $path), $code, $previous); - } -} diff --git a/vendor/symfony/dotenv/LICENSE b/vendor/symfony/dotenv/LICENSE deleted file mode 100644 index 7fa9539..0000000 --- a/vendor/symfony/dotenv/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/dotenv/README.md b/vendor/symfony/dotenv/README.md deleted file mode 100644 index 08c90fc..0000000 --- a/vendor/symfony/dotenv/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Dotenv Component -================ - -Symfony Dotenv parses `.env` files to make environment variables stored in them -accessible via `$_SERVER` or `$_ENV`. - -Getting Started ---------------- - -``` -$ composer require symfony/dotenv -``` - -```php -use Symfony\Component\Dotenv\Dotenv; - -$dotenv = new Dotenv(); -$dotenv->load(__DIR__.'/.env'); - -// you can also load several files -$dotenv->load(__DIR__.'/.env', __DIR__.'/.env.dev'); - -// overwrites existing env variables -$dotenv->overload(__DIR__.'/.env'); - -// loads .env, .env.local, and .env.$APP_ENV.local or .env.$APP_ENV -$dotenv->loadEnv(__DIR__.'/.env'); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/dotenv/composer.json b/vendor/symfony/dotenv/composer.json deleted file mode 100644 index bec034f..0000000 --- a/vendor/symfony/dotenv/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "symfony/dotenv", - "type": "library", - "description": "Registers environment variables from a .env file", - "keywords": ["environment", "env", "dotenv"], - "homepage": "https://symfony.com", - "license" : "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Dotenv\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/error-handler/BufferingLogger.php b/vendor/symfony/error-handler/BufferingLogger.php deleted file mode 100644 index fdfc724..0000000 --- a/vendor/symfony/error-handler/BufferingLogger.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Psr\Log\AbstractLogger; - -/** - * A buffering logger that stacks logs for later. - * - * @author Nicolas Grekas - */ -class BufferingLogger extends AbstractLogger -{ - private $logs = []; - - public function log($level, $message, array $context = []): void - { - $this->logs[] = [$level, $message, $context]; - } - - public function cleanLogs(): array - { - $logs = $this->logs; - $this->logs = []; - - return $logs; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - foreach ($this->logs as [$level, $message, $context]) { - if (false !== strpos($message, '{')) { - foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && \is_callable([$val, '__toString']))) { - $message = str_replace("{{$key}}", $val, $message); - } elseif ($val instanceof \DateTimeInterface) { - $message = str_replace("{{$key}}", $val->format(\DateTime::RFC3339), $message); - } elseif (\is_object($val)) { - $message = str_replace("{{$key}}", '[object '.\get_class($val).']', $message); - } else { - $message = str_replace("{{$key}}", '['.\gettype($val).']', $message); - } - } - } - - error_log(sprintf('%s [%s] %s', date(\DateTime::RFC3339), $level, $message)); - } - } -} diff --git a/vendor/symfony/error-handler/CHANGELOG.md b/vendor/symfony/error-handler/CHANGELOG.md deleted file mode 100644 index 2976566..0000000 --- a/vendor/symfony/error-handler/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Make `DebugClassLoader` trigger deprecation notices on missing return types - * Add `SYMFONY_PATCH_TYPE_DECLARATIONS='force=2'` mode to `DebugClassLoader` to turn annotations into native return types - -5.2.0 ------ - - * added the ability to set `HtmlErrorRenderer::$template` to a custom template to render when not in debug mode. - -5.1.0 ------ - - * The `HtmlErrorRenderer` and `SerializerErrorRenderer` add `X-Debug-Exception` and `X-Debug-Exception-File` headers in debug mode. - -4.4.0 ------ - - * added the component - * added `ErrorHandler::call()` method utility to turn any PHP error into `\ErrorException` diff --git a/vendor/symfony/error-handler/Debug.php b/vendor/symfony/error-handler/Debug.php deleted file mode 100644 index 4a82812..0000000 --- a/vendor/symfony/error-handler/Debug.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -/** - * Registers all the debug tools. - * - * @author Fabien Potencier - */ -class Debug -{ - public static function enable(): ErrorHandler - { - error_reporting(-1); - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - ini_set('display_errors', 0); - } elseif (!filter_var(ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || ini_get('error_log')) { - // CLI - display errors only if they're not already logged to STDERR - ini_set('display_errors', 1); - } - - @ini_set('zend.assertions', 1); - ini_set('assert.active', 1); - ini_set('assert.warning', 0); - ini_set('assert.exception', 1); - - DebugClassLoader::enable(); - - return ErrorHandler::register(new ErrorHandler(new BufferingLogger(), true)); - } -} diff --git a/vendor/symfony/error-handler/DebugClassLoader.php b/vendor/symfony/error-handler/DebugClassLoader.php deleted file mode 100644 index e4388fe..0000000 --- a/vendor/symfony/error-handler/DebugClassLoader.php +++ /dev/null @@ -1,1210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Composer\InstalledVersions; -use Doctrine\Common\Persistence\Proxy as LegacyProxy; -use Doctrine\Persistence\Proxy; -use Mockery\MockInterface; -use Phake\IMock; -use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation; -use PHPUnit\Framework\MockObject\MockObject; -use Prophecy\Prophecy\ProphecySubjectInterface; -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\ErrorHandler\Internal\TentativeTypes; - -/** - * Autoloader checking if the class is really defined in the file found. - * - * The ClassLoader will wrap all registered autoloaders - * and will throw an exception if a file is found but does - * not declare the class. - * - * It can also patch classes to turn docblocks into actual return types. - * This behavior is controlled by the SYMFONY_PATCH_TYPE_DECLARATIONS env var, - * which is a url-encoded array with the follow parameters: - * - "force": any value enables deprecation notices - can be any of: - * - "phpdoc" to patch only docblock annotations - * - "2" to add all possible return types - * - "1" to add return types but only to tests/final/internal/private methods - * - "php": the target version of PHP - e.g. "7.1" doesn't generate "object" types - * - "deprecations": "1" to trigger a deprecation notice when a child class misses a - * return type while the parent declares an "@return" annotation - * - * Note that patching doesn't care about any coding style so you'd better to run - * php-cs-fixer after, with rules "phpdoc_trim_consecutive_blank_line_separation" - * and "no_superfluous_phpdoc_tags" enabled typically. - * - * @author Fabien Potencier - * @author Christophe Coevoet - * @author Nicolas Grekas - * @author Guilhem Niot - */ -class DebugClassLoader -{ - private const SPECIAL_RETURN_TYPES = [ - 'void' => 'void', - 'null' => 'null', - 'resource' => 'resource', - 'boolean' => 'bool', - 'true' => 'bool', - 'false' => 'false', - 'integer' => 'int', - 'array' => 'array', - 'bool' => 'bool', - 'callable' => 'callable', - 'float' => 'float', - 'int' => 'int', - 'iterable' => 'iterable', - 'object' => 'object', - 'string' => 'string', - 'self' => 'self', - 'parent' => 'parent', - 'mixed' => 'mixed', - 'static' => 'static', - '$this' => 'static', - 'list' => 'array', - ]; - - private const BUILTIN_RETURN_TYPES = [ - 'void' => true, - 'array' => true, - 'false' => true, - 'bool' => true, - 'callable' => true, - 'float' => true, - 'int' => true, - 'iterable' => true, - 'object' => true, - 'string' => true, - 'self' => true, - 'parent' => true, - 'mixed' => true, - 'static' => true, - ]; - - private const MAGIC_METHODS = [ - '__isset' => 'bool', - '__sleep' => 'array', - '__toString' => 'string', - '__debugInfo' => 'array', - '__serialize' => 'array', - ]; - - private $classLoader; - private $isFinder; - private $loaded = []; - private $patchTypes; - - private static $caseCheck; - private static $checkedClasses = []; - private static $final = []; - private static $finalMethods = []; - private static $deprecated = []; - private static $internal = []; - private static $internalMethods = []; - private static $annotatedParameters = []; - private static $darwinCache = ['/' => ['/', []]]; - private static $method = []; - private static $returnTypes = []; - private static $methodTraits = []; - private static $fileOffsets = []; - - public function __construct(callable $classLoader) - { - $this->classLoader = $classLoader; - $this->isFinder = \is_array($classLoader) && method_exists($classLoader[0], 'findFile'); - parse_str(getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') ?: '', $this->patchTypes); - $this->patchTypes += [ - 'force' => null, - 'php' => \PHP_MAJOR_VERSION.'.'.\PHP_MINOR_VERSION, - 'deprecations' => \PHP_VERSION_ID >= 70400, - ]; - - if ('phpdoc' === $this->patchTypes['force']) { - $this->patchTypes['force'] = 'docblock'; - } - - if (!isset(self::$caseCheck)) { - $file = is_file(__FILE__) ? __FILE__ : rtrim(realpath('.'), \DIRECTORY_SEPARATOR); - $i = strrpos($file, \DIRECTORY_SEPARATOR); - $dir = substr($file, 0, 1 + $i); - $file = substr($file, 1 + $i); - $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file); - $test = realpath($dir.$test); - - if (false === $test || false === $i) { - // filesystem is case sensitive - self::$caseCheck = 0; - } elseif (substr($test, -\strlen($file)) === $file) { - // filesystem is case insensitive and realpath() normalizes the case of characters - self::$caseCheck = 1; - } elseif ('Darwin' === \PHP_OS_FAMILY) { - // on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters - self::$caseCheck = 2; - } else { - // filesystem case checks failed, fallback to disabling them - self::$caseCheck = 0; - } - } - } - - public function getClassLoader(): callable - { - return $this->classLoader; - } - - /** - * Wraps all autoloaders. - */ - public static function enable(): void - { - // Ensures we don't hit https://bugs.php.net/42098 - class_exists(\Symfony\Component\ErrorHandler\ErrorHandler::class); - class_exists(\Psr\Log\LogLevel::class); - - if (!\is_array($functions = spl_autoload_functions())) { - return; - } - - foreach ($functions as $function) { - spl_autoload_unregister($function); - } - - foreach ($functions as $function) { - if (!\is_array($function) || !$function[0] instanceof self) { - $function = [new static($function), 'loadClass']; - } - - spl_autoload_register($function); - } - } - - /** - * Disables the wrapping. - */ - public static function disable(): void - { - if (!\is_array($functions = spl_autoload_functions())) { - return; - } - - foreach ($functions as $function) { - spl_autoload_unregister($function); - } - - foreach ($functions as $function) { - if (\is_array($function) && $function[0] instanceof self) { - $function = $function[0]->getClassLoader(); - } - - spl_autoload_register($function); - } - } - - public static function checkClasses(): bool - { - if (!\is_array($functions = spl_autoload_functions())) { - return false; - } - - $loader = null; - - foreach ($functions as $function) { - if (\is_array($function) && $function[0] instanceof self) { - $loader = $function[0]; - break; - } - } - - if (null === $loader) { - return false; - } - - static $offsets = [ - 'get_declared_interfaces' => 0, - 'get_declared_traits' => 0, - 'get_declared_classes' => 0, - ]; - - foreach ($offsets as $getSymbols => $i) { - $symbols = $getSymbols(); - - for (; $i < \count($symbols); ++$i) { - if (!is_subclass_of($symbols[$i], MockObject::class) - && !is_subclass_of($symbols[$i], ProphecySubjectInterface::class) - && !is_subclass_of($symbols[$i], Proxy::class) - && !is_subclass_of($symbols[$i], ProxyInterface::class) - && !is_subclass_of($symbols[$i], LegacyProxy::class) - && !is_subclass_of($symbols[$i], MockInterface::class) - && !is_subclass_of($symbols[$i], IMock::class) - ) { - $loader->checkClass($symbols[$i]); - } - } - - $offsets[$getSymbols] = $i; - } - - return true; - } - - public function findFile(string $class): ?string - { - return $this->isFinder ? ($this->classLoader[0]->findFile($class) ?: null) : null; - } - - /** - * Loads the given class or interface. - * - * @throws \RuntimeException - */ - public function loadClass(string $class): void - { - $e = error_reporting(error_reporting() | \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR); - - try { - if ($this->isFinder && !isset($this->loaded[$class])) { - $this->loaded[$class] = true; - if (!$file = $this->classLoader[0]->findFile($class) ?: '') { - // no-op - } elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) { - include $file; - - return; - } elseif (false === include $file) { - return; - } - } else { - ($this->classLoader)($class); - $file = ''; - } - } finally { - error_reporting($e); - } - - $this->checkClass($class, $file); - } - - private function checkClass(string $class, string $file = null): void - { - $exists = null === $file || class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); - - if (null !== $file && $class && '\\' === $class[0]) { - $class = substr($class, 1); - } - - if ($exists) { - if (isset(self::$checkedClasses[$class])) { - return; - } - self::$checkedClasses[$class] = true; - - $refl = new \ReflectionClass($class); - if (null === $file && $refl->isInternal()) { - return; - } - $name = $refl->getName(); - - if ($name !== $class && 0 === strcasecmp($name, $class)) { - throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name)); - } - - $deprecations = $this->checkAnnotations($refl, $name); - - foreach ($deprecations as $message) { - @trigger_error($message, \E_USER_DEPRECATED); - } - } - - if (!$file) { - return; - } - - if (!$exists) { - if (false !== strpos($class, '/')) { - throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); - } - - throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); - } - - if (self::$caseCheck && $message = $this->checkCase($refl, $file, $class)) { - throw new \RuntimeException(sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', $message[0], $message[1], $message[2])); - } - } - - public function checkAnnotations(\ReflectionClass $refl, string $class): array - { - if ( - 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7' === $class - || 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV6' === $class - ) { - return []; - } - $deprecations = []; - - $className = false !== strpos($class, "@anonymous\0") ? (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous' : $class; - - // Don't trigger deprecations for classes in the same vendor - if ($class !== $className) { - $vendor = preg_match('/^namespace ([^;\\\\\s]++)[;\\\\]/m', @file_get_contents($refl->getFileName()), $vendor) ? $vendor[1].'\\' : ''; - $vendorLen = \strlen($vendor); - } elseif (2 > $vendorLen = 1 + (strpos($class, '\\') ?: strpos($class, '_'))) { - $vendorLen = 0; - $vendor = ''; - } else { - $vendor = str_replace('_', '\\', substr($class, 0, $vendorLen)); - } - - $parent = get_parent_class($class) ?: null; - self::$returnTypes[$class] = []; - $classIsTemplate = false; - - // Detect annotations on the class - if ($doc = $this->parsePhpDoc($refl)) { - $classIsTemplate = isset($doc['template']); - - foreach (['final', 'deprecated', 'internal'] as $annotation) { - if (null !== $description = $doc[$annotation][0] ?? null) { - self::${$annotation}[$class] = '' !== $description ? ' '.$description.(preg_match('/[.!]$/', $description) ? '' : '.') : '.'; - } - } - - if ($refl->isInterface() && isset($doc['method'])) { - foreach ($doc['method'] as $name => [$static, $returnType, $signature, $description]) { - self::$method[$class][] = [$class, $static, $returnType, $name.$signature, $description]; - - if ('' !== $returnType) { - $this->setReturnType($returnType, $refl->name, $name, $refl->getFileName(), $parent); - } - } - } - } - - $parentAndOwnInterfaces = $this->getOwnInterfaces($class, $parent); - if ($parent) { - $parentAndOwnInterfaces[$parent] = $parent; - - if (!isset(self::$checkedClasses[$parent])) { - $this->checkClass($parent); - } - - if (isset(self::$final[$parent])) { - $deprecations[] = sprintf('The "%s" class is considered final%s It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $className); - } - } - - // Detect if the parent is annotated - foreach ($parentAndOwnInterfaces + class_uses($class, false) as $use) { - if (!isset(self::$checkedClasses[$use])) { - $this->checkClass($use); - } - if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])) { - $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); - $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); - - $deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s', $className, $type, $verb, $use, self::$deprecated[$use]); - } - if (isset(self::$internal[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen)) { - $deprecations[] = sprintf('The "%s" %s is considered internal%s It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $className); - } - if (isset(self::$method[$use])) { - if ($refl->isAbstract()) { - if (isset(self::$method[$class])) { - self::$method[$class] = array_merge(self::$method[$class], self::$method[$use]); - } else { - self::$method[$class] = self::$method[$use]; - } - } elseif (!$refl->isInterface()) { - if (!strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) - && 0 === strpos($className, 'Symfony\\') - && (!class_exists(InstalledVersions::class) - || 'symfony/symfony' !== InstalledVersions::getRootPackage()['name']) - ) { - // skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested - continue; - } - $hasCall = $refl->hasMethod('__call'); - $hasStaticCall = $refl->hasMethod('__callStatic'); - foreach (self::$method[$use] as [$interface, $static, $returnType, $name, $description]) { - if ($static ? $hasStaticCall : $hasCall) { - continue; - } - $realName = substr($name, 0, strpos($name, '(')); - if (!$refl->hasMethod($realName) || !($methodRefl = $refl->getMethod($realName))->isPublic() || ($static && !$methodRefl->isStatic()) || (!$static && $methodRefl->isStatic())) { - $deprecations[] = sprintf('Class "%s" should implement method "%s::%s%s"%s', $className, ($static ? 'static ' : '').$interface, $name, $returnType ? ': '.$returnType : '', null === $description ? '.' : ': '.$description); - } - } - } - } - } - - if (trait_exists($class)) { - $file = $refl->getFileName(); - - foreach ($refl->getMethods() as $method) { - if ($method->getFileName() === $file) { - self::$methodTraits[$file][$method->getStartLine()] = $class; - } - } - - return $deprecations; - } - - // Inherit @final, @internal, @param and @return annotations for methods - self::$finalMethods[$class] = []; - self::$internalMethods[$class] = []; - self::$annotatedParameters[$class] = []; - foreach ($parentAndOwnInterfaces as $use) { - foreach (['finalMethods', 'internalMethods', 'annotatedParameters', 'returnTypes'] as $property) { - if (isset(self::${$property}[$use])) { - self::${$property}[$class] = self::${$property}[$class] ? self::${$property}[$use] + self::${$property}[$class] : self::${$property}[$use]; - } - } - - if (null !== (TentativeTypes::RETURN_TYPES[$use] ?? null)) { - foreach (TentativeTypes::RETURN_TYPES[$use] as $method => $returnType) { - $returnType = explode('|', $returnType); - foreach ($returnType as $i => $t) { - if ('?' !== $t && !isset(self::BUILTIN_RETURN_TYPES[$t])) { - $returnType[$i] = '\\'.$t; - } - } - $returnType = implode('|', $returnType); - - self::$returnTypes[$class] += [$method => [$returnType, 0 === strpos($returnType, '?') ? substr($returnType, 1).'|null' : $returnType, $use, '']]; - } - } - } - - foreach ($refl->getMethods() as $method) { - if ($method->class !== $class) { - continue; - } - - if (null === $ns = self::$methodTraits[$method->getFileName()][$method->getStartLine()] ?? null) { - $ns = $vendor; - $len = $vendorLen; - } elseif (2 > $len = 1 + (strpos($ns, '\\') ?: strpos($ns, '_'))) { - $len = 0; - $ns = ''; - } else { - $ns = str_replace('_', '\\', substr($ns, 0, $len)); - } - - if ($parent && isset(self::$finalMethods[$parent][$method->name])) { - [$declaringClass, $message] = self::$finalMethods[$parent][$method->name]; - $deprecations[] = sprintf('The "%s::%s()" method is considered final%s It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $className); - } - - if (isset(self::$internalMethods[$class][$method->name])) { - [$declaringClass, $message] = self::$internalMethods[$class][$method->name]; - if (strncmp($ns, $declaringClass, $len)) { - $deprecations[] = sprintf('The "%s::%s()" method is considered internal%s It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $className); - } - } - - // To read method annotations - $doc = $this->parsePhpDoc($method); - - if (($classIsTemplate || isset($doc['template'])) && $method->hasReturnType()) { - unset($doc['return']); - } - - if (isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = []; - foreach ($method->getParameters() as $parameter) { - $definedParameters[$parameter->name] = true; - } - - foreach (self::$annotatedParameters[$class][$method->name] as $parameterName => $deprecation) { - if (!isset($definedParameters[$parameterName]) && !isset($doc['param'][$parameterName])) { - $deprecations[] = sprintf($deprecation, $className); - } - } - } - - $forcePatchTypes = $this->patchTypes['force']; - - if ($canAddReturnType = null !== $forcePatchTypes && false === strpos($method->getFileName(), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) { - if ('void' !== (self::MAGIC_METHODS[$method->name] ?? 'void')) { - $this->patchTypes['force'] = $forcePatchTypes ?: 'docblock'; - } - - $canAddReturnType = 2 === (int) $forcePatchTypes - || false !== stripos($method->getFileName(), \DIRECTORY_SEPARATOR.'Tests'.\DIRECTORY_SEPARATOR) - || $refl->isFinal() - || $method->isFinal() - || $method->isPrivate() - || ('.' === (self::$internal[$class] ?? null) && !$refl->isAbstract()) - || '.' === (self::$final[$class] ?? null) - || '' === ($doc['final'][0] ?? null) - || '' === ($doc['internal'][0] ?? null) - ; - } - - if (null !== ($returnType = self::$returnTypes[$class][$method->name] ?? null) && 'docblock' === $this->patchTypes['force'] && !$method->hasReturnType() && isset(TentativeTypes::RETURN_TYPES[$returnType[2]][$method->name])) { - $this->patchReturnTypeWillChange($method); - } - - if (null !== ($returnType ?? $returnType = self::MAGIC_METHODS[$method->name] ?? null) && !$method->hasReturnType() && !isset($doc['return'])) { - [$normalizedType, $returnType, $declaringClass, $declaringFile] = \is_string($returnType) ? [$returnType, $returnType, '', ''] : $returnType; - - if ($canAddReturnType && 'docblock' !== $this->patchTypes['force']) { - $this->patchMethod($method, $returnType, $declaringFile, $normalizedType); - } - if (!isset($doc['deprecated']) && strncmp($ns, $declaringClass, $len)) { - if ('docblock' === $this->patchTypes['force']) { - $this->patchMethod($method, $returnType, $declaringFile, $normalizedType); - } elseif ('' !== $declaringClass && $this->patchTypes['deprecations']) { - $deprecations[] = sprintf('Method "%s::%s()" might add "%s" as a native return type declaration in the future. Do the same in %s "%s" now to avoid errors or add an explicit @return annotation to suppress this message.', $declaringClass, $method->name, $normalizedType, interface_exists($declaringClass) ? 'implementation' : 'child class', $className); - } - } - } - - if (!$doc) { - $this->patchTypes['force'] = $forcePatchTypes; - - continue; - } - - if (isset($doc['return']) || 'void' !== (self::MAGIC_METHODS[$method->name] ?? 'void')) { - $this->setReturnType($doc['return'] ?? self::MAGIC_METHODS[$method->name], $method->class, $method->name, $method->getFileName(), $parent, $method->getReturnType()); - - if (isset(self::$returnTypes[$class][$method->name][0]) && $canAddReturnType) { - $this->fixReturnStatements($method, self::$returnTypes[$class][$method->name][0]); - } - - if ($method->isPrivate()) { - unset(self::$returnTypes[$class][$method->name]); - } - } - - $this->patchTypes['force'] = $forcePatchTypes; - - if ($method->isPrivate()) { - continue; - } - - $finalOrInternal = false; - - foreach (['final', 'internal'] as $annotation) { - if (null !== $description = $doc[$annotation][0] ?? null) { - self::${$annotation.'Methods'}[$class][$method->name] = [$class, '' !== $description ? ' '.$description.(preg_match('/[[:punct:]]$/', $description) ? '' : '.') : '.']; - $finalOrInternal = true; - } - } - - if ($finalOrInternal || $method->isConstructor() || !isset($doc['param']) || StatelessInvocation::class === $class) { - continue; - } - if (!isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = []; - foreach ($method->getParameters() as $parameter) { - $definedParameters[$parameter->name] = true; - } - } - foreach ($doc['param'] as $parameterName => $parameterType) { - if (!isset($definedParameters[$parameterName])) { - self::$annotatedParameters[$class][$method->name][$parameterName] = sprintf('The "%%s::%s()" method will require a new "%s$%s" argument in the next major version of its %s "%s", not defining it is deprecated.', $method->name, $parameterType ? $parameterType.' ' : '', $parameterName, interface_exists($className) ? 'interface' : 'parent class', $className); - } - } - } - - return $deprecations; - } - - public function checkCase(\ReflectionClass $refl, string $file, string $class): ?array - { - $real = explode('\\', $class.strrchr($file, '.')); - $tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file)); - - $i = \count($tail) - 1; - $j = \count($real) - 1; - - while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { - --$i; - --$j; - } - - array_splice($tail, 0, $i + 1); - - if (!$tail) { - return null; - } - - $tail = \DIRECTORY_SEPARATOR.implode(\DIRECTORY_SEPARATOR, $tail); - $tailLen = \strlen($tail); - $real = $refl->getFileName(); - - if (2 === self::$caseCheck) { - $real = $this->darwinRealpath($real); - } - - if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true) - && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false) - ) { - return [substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)]; - } - - return null; - } - - /** - * `realpath` on MacOSX doesn't normalize the case of characters. - */ - private function darwinRealpath(string $real): string - { - $i = 1 + strrpos($real, '/'); - $file = substr($real, $i); - $real = substr($real, 0, $i); - - if (isset(self::$darwinCache[$real])) { - $kDir = $real; - } else { - $kDir = strtolower($real); - - if (isset(self::$darwinCache[$kDir])) { - $real = self::$darwinCache[$kDir][0]; - } else { - $dir = getcwd(); - - if (!@chdir($real)) { - return $real.$file; - } - - $real = getcwd().'/'; - chdir($dir); - - $dir = $real; - $k = $kDir; - $i = \strlen($dir) - 1; - while (!isset(self::$darwinCache[$k])) { - self::$darwinCache[$k] = [$dir, []]; - self::$darwinCache[$dir] = &self::$darwinCache[$k]; - - while ('/' !== $dir[--$i]) { - } - $k = substr($k, 0, ++$i); - $dir = substr($dir, 0, $i--); - } - } - } - - $dirFiles = self::$darwinCache[$kDir][1]; - - if (!isset($dirFiles[$file]) && ') : eval()\'d code' === substr($file, -17)) { - // Get the file name from "file_name.php(123) : eval()'d code" - $file = substr($file, 0, strrpos($file, '(', -17)); - } - - if (isset($dirFiles[$file])) { - return $real.$dirFiles[$file]; - } - - $kFile = strtolower($file); - - if (!isset($dirFiles[$kFile])) { - foreach (scandir($real, 2) as $f) { - if ('.' !== $f[0]) { - $dirFiles[$f] = $f; - if ($f === $file) { - $kFile = $k = $file; - } elseif ($f !== $k = strtolower($f)) { - $dirFiles[$k] = $f; - } - } - } - self::$darwinCache[$kDir][1] = $dirFiles; - } - - return $real.$dirFiles[$kFile]; - } - - /** - * `class_implements` includes interfaces from the parents so we have to manually exclude them. - * - * @return string[] - */ - private function getOwnInterfaces(string $class, ?string $parent): array - { - $ownInterfaces = class_implements($class, false); - - if ($parent) { - foreach (class_implements($parent, false) as $interface) { - unset($ownInterfaces[$interface]); - } - } - - foreach ($ownInterfaces as $interface) { - foreach (class_implements($interface) as $interface) { - unset($ownInterfaces[$interface]); - } - } - - return $ownInterfaces; - } - - private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, \ReflectionType $returnType = null): void - { - if ('__construct' === $method) { - return; - } - - if ($nullable = 0 === strpos($types, 'null|')) { - $types = substr($types, 5); - } elseif ($nullable = '|null' === substr($types, -5)) { - $types = substr($types, 0, -5); - } - $arrayType = ['array' => 'array']; - $typesMap = []; - $glue = false !== strpos($types, '&') ? '&' : '|'; - foreach (explode($glue, $types) as $t) { - $t = self::SPECIAL_RETURN_TYPES[strtolower($t)] ?? $t; - $typesMap[$this->normalizeType($t, $class, $parent, $returnType)][$t] = $t; - } - - if (isset($typesMap['array'])) { - if (isset($typesMap['Traversable']) || isset($typesMap['\Traversable'])) { - $typesMap['iterable'] = $arrayType !== $typesMap['array'] ? $typesMap['array'] : ['iterable']; - unset($typesMap['array'], $typesMap['Traversable'], $typesMap['\Traversable']); - } elseif ($arrayType !== $typesMap['array'] && isset(self::$returnTypes[$class][$method]) && !$returnType) { - return; - } - } - - if (isset($typesMap['array']) && isset($typesMap['iterable'])) { - if ($arrayType !== $typesMap['array']) { - $typesMap['iterable'] = $typesMap['array']; - } - unset($typesMap['array']); - } - - $iterable = $object = true; - foreach ($typesMap as $n => $t) { - if ('null' !== $n) { - $iterable = $iterable && (\in_array($n, ['array', 'iterable']) || false !== strpos($n, 'Iterator')); - $object = $object && (\in_array($n, ['callable', 'object', '$this', 'static']) || !isset(self::SPECIAL_RETURN_TYPES[$n])); - } - } - - $phpTypes = []; - $docTypes = []; - - foreach ($typesMap as $n => $t) { - if ('null' === $n) { - $nullable = true; - continue; - } - - $docTypes[] = $t; - - if ('mixed' === $n || 'void' === $n) { - $nullable = false; - $phpTypes = ['' => $n]; - continue; - } - - if ('resource' === $n) { - // there is no native type for "resource" - return; - } - - if (!isset($phpTypes[''])) { - $phpTypes[] = $n; - } - } - $docTypes = array_merge([], ...$docTypes); - - if (!$phpTypes) { - return; - } - - if (1 < \count($phpTypes)) { - if ($iterable && '8.0' > $this->patchTypes['php']) { - $phpTypes = $docTypes = ['iterable']; - } elseif ($object && 'object' === $this->patchTypes['force']) { - $phpTypes = $docTypes = ['object']; - } elseif ('8.0' > $this->patchTypes['php']) { - // ignore multi-types return declarations - return; - } - } - - $phpType = sprintf($nullable ? (1 < \count($phpTypes) ? '%s|null' : '?%s') : '%s', implode($glue, $phpTypes)); - $docType = sprintf($nullable ? '%s|null' : '%s', implode($glue, $docTypes)); - - self::$returnTypes[$class][$method] = [$phpType, $docType, $class, $filename]; - } - - private function normalizeType(string $type, string $class, ?string $parent, ?\ReflectionType $returnType): string - { - if (isset(self::SPECIAL_RETURN_TYPES[$lcType = strtolower($type)])) { - if ('parent' === $lcType = self::SPECIAL_RETURN_TYPES[$lcType]) { - $lcType = null !== $parent ? '\\'.$parent : 'parent'; - } elseif ('self' === $lcType) { - $lcType = '\\'.$class; - } - - return $lcType; - } - - // We could resolve "use" statements to return the FQDN - // but this would be too expensive for a runtime checker - - if ('[]' !== substr($type, -2)) { - return $type; - } - - if ($returnType instanceof \ReflectionNamedType) { - $type = $returnType->getName(); - - if ('mixed' !== $type) { - return isset(self::SPECIAL_RETURN_TYPES[$type]) ? $type : '\\'.$type; - } - } - - return 'array'; - } - - /** - * Utility method to add #[ReturnTypeWillChange] where php triggers deprecations. - */ - private function patchReturnTypeWillChange(\ReflectionMethod $method) - { - if (\PHP_VERSION_ID >= 80000 && \count($method->getAttributes(\ReturnTypeWillChange::class))) { - return; - } - - if (!is_file($file = $method->getFileName())) { - return; - } - - $fileOffset = self::$fileOffsets[$file] ?? 0; - - $code = file($file); - - $startLine = $method->getStartLine() + $fileOffset - 2; - - if (false !== stripos($code[$startLine], 'ReturnTypeWillChange')) { - return; - } - - $code[$startLine] .= " #[\\ReturnTypeWillChange]\n"; - self::$fileOffsets[$file] = 1 + $fileOffset; - file_put_contents($file, $code); - } - - /** - * Utility method to add @return annotations to the Symfony code-base where it triggers self-deprecations. - */ - private function patchMethod(\ReflectionMethod $method, string $returnType, string $declaringFile, string $normalizedType) - { - static $patchedMethods = []; - static $useStatements = []; - - if (!is_file($file = $method->getFileName()) || isset($patchedMethods[$file][$startLine = $method->getStartLine()])) { - return; - } - - $patchedMethods[$file][$startLine] = true; - $fileOffset = self::$fileOffsets[$file] ?? 0; - $startLine += $fileOffset - 2; - if ($nullable = '|null' === substr($returnType, -5)) { - $returnType = substr($returnType, 0, -5); - } - $glue = false !== strpos($returnType, '&') ? '&' : '|'; - $returnType = explode($glue, $returnType); - $code = file($file); - - foreach ($returnType as $i => $type) { - if (preg_match('/((?:\[\])+)$/', $type, $m)) { - $type = substr($type, 0, -\strlen($m[1])); - $format = '%s'.$m[1]; - } else { - $format = null; - } - - if (isset(self::SPECIAL_RETURN_TYPES[$type]) || ('\\' === $type[0] && !$p = strrpos($type, '\\', 1))) { - continue; - } - - [$namespace, $useOffset, $useMap] = $useStatements[$file] ?? $useStatements[$file] = self::getUseStatements($file); - - if ('\\' !== $type[0]) { - [$declaringNamespace, , $declaringUseMap] = $useStatements[$declaringFile] ?? $useStatements[$declaringFile] = self::getUseStatements($declaringFile); - - $p = strpos($type, '\\', 1); - $alias = $p ? substr($type, 0, $p) : $type; - - if (isset($declaringUseMap[$alias])) { - $type = '\\'.$declaringUseMap[$alias].($p ? substr($type, $p) : ''); - } else { - $type = '\\'.$declaringNamespace.$type; - } - - $p = strrpos($type, '\\', 1); - } - - $alias = substr($type, 1 + $p); - $type = substr($type, 1); - - if (!isset($useMap[$alias]) && (class_exists($c = $namespace.$alias) || interface_exists($c) || trait_exists($c))) { - $useMap[$alias] = $c; - } - - if (!isset($useMap[$alias])) { - $useStatements[$file][2][$alias] = $type; - $code[$useOffset] = "use $type;\n".$code[$useOffset]; - ++$fileOffset; - } elseif ($useMap[$alias] !== $type) { - $alias .= 'FIXME'; - $useStatements[$file][2][$alias] = $type; - $code[$useOffset] = "use $type as $alias;\n".$code[$useOffset]; - ++$fileOffset; - } - - $returnType[$i] = null !== $format ? sprintf($format, $alias) : $alias; - } - - if ('docblock' === $this->patchTypes['force'] || ('object' === $normalizedType && '7.1' === $this->patchTypes['php'])) { - $returnType = implode($glue, $returnType).($nullable ? '|null' : ''); - - if (false !== strpos($code[$startLine], '#[')) { - --$startLine; - } - - if ($method->getDocComment()) { - $code[$startLine] = " * @return $returnType\n".$code[$startLine]; - } else { - $code[$startLine] .= <<fixReturnStatements($method, $normalizedType); - } - - private static function getUseStatements(string $file): array - { - $namespace = ''; - $useMap = []; - $useOffset = 0; - - if (!is_file($file)) { - return [$namespace, $useOffset, $useMap]; - } - - $file = file($file); - - for ($i = 0; $i < \count($file); ++$i) { - if (preg_match('/^(class|interface|trait|abstract) /', $file[$i])) { - break; - } - - if (0 === strpos($file[$i], 'namespace ')) { - $namespace = substr($file[$i], \strlen('namespace '), -2).'\\'; - $useOffset = $i + 2; - } - - if (0 === strpos($file[$i], 'use ')) { - $useOffset = $i; - - for (; 0 === strpos($file[$i], 'use '); ++$i) { - $u = explode(' as ', substr($file[$i], 4, -2), 2); - - if (1 === \count($u)) { - $p = strrpos($u[0], '\\'); - $useMap[substr($u[0], false !== $p ? 1 + $p : 0)] = $u[0]; - } else { - $useMap[$u[1]] = $u[0]; - } - } - - break; - } - } - - return [$namespace, $useOffset, $useMap]; - } - - private function fixReturnStatements(\ReflectionMethod $method, string $returnType) - { - if ('docblock' !== $this->patchTypes['force']) { - if ('7.1' === $this->patchTypes['php'] && 'object' === ltrim($returnType, '?')) { - return; - } - - if ('7.4' > $this->patchTypes['php'] && $method->hasReturnType()) { - return; - } - - if ('8.0' > $this->patchTypes['php'] && (false !== strpos($returnType, '|') || \in_array($returnType, ['mixed', 'static'], true))) { - return; - } - - if ('8.1' > $this->patchTypes['php'] && false !== strpos($returnType, '&')) { - return; - } - } - - if (!is_file($file = $method->getFileName())) { - return; - } - - $fixedCode = $code = file($file); - $i = (self::$fileOffsets[$file] ?? 0) + $method->getStartLine(); - - if ('?' !== $returnType && 'docblock' !== $this->patchTypes['force']) { - $fixedCode[$i - 1] = preg_replace('/\)(?::[^;\n]++)?(;?\n)/', "): $returnType\\1", $code[$i - 1]); - } - - $end = $method->isGenerator() ? $i : $method->getEndLine(); - for (; $i < $end; ++$i) { - if ('void' === $returnType) { - $fixedCode[$i] = str_replace(' return null;', ' return;', $code[$i]); - } elseif ('mixed' === $returnType || '?' === $returnType[0]) { - $fixedCode[$i] = str_replace(' return;', ' return null;', $code[$i]); - } else { - $fixedCode[$i] = str_replace(' return;', " return $returnType!?;", $code[$i]); - } - } - - if ($fixedCode !== $code) { - file_put_contents($file, $fixedCode); - } - } - - /** - * @param \ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflector - */ - private function parsePhpDoc(\Reflector $reflector): array - { - if (!$doc = $reflector->getDocComment()) { - return []; - } - - $tagName = ''; - $tagContent = ''; - - $tags = []; - - foreach (explode("\n", substr($doc, 3, -2)) as $line) { - $line = ltrim($line); - $line = ltrim($line, '*'); - - if ('' === $line = trim($line)) { - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - } - $tagName = $tagContent = ''; - continue; - } - - if ('@' === $line[0]) { - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - $tagContent = ''; - } - - if (preg_match('{^@([-a-zA-Z0-9_:]++)(\s|$)}', $line, $m)) { - $tagName = $m[1]; - $tagContent = str_replace("\t", ' ', ltrim(substr($line, 2 + \strlen($tagName)))); - } else { - $tagName = ''; - } - } elseif ('' !== $tagName) { - $tagContent .= ' '.str_replace("\t", ' ', $line); - } - } - - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - } - - foreach ($tags['method'] ?? [] as $i => $method) { - unset($tags['method'][$i]); - - $parts = preg_split('{(\s++|\((?:[^()]*+|(?R))*\)(?: *: *[^ ]++)?|<(?:[^<>]*+|(?R))*>|\{(?:[^{}]*+|(?R))*\})}', $method, -1, \PREG_SPLIT_DELIM_CAPTURE); - $returnType = ''; - $static = 'static' === $parts[0]; - - for ($i = $static ? 2 : 0; null !== $p = $parts[$i] ?? null; $i += 2) { - if (\in_array($p, ['', '|', '&', 'callable'], true) || \in_array(substr($returnType, -1), ['|', '&'], true)) { - $returnType .= trim($parts[$i - 1] ?? '').$p; - continue; - } - - $signature = '(' === ($parts[$i + 1][0] ?? '(') ? $parts[$i + 1] ?? '()' : null; - - if (null === $signature && '' === $returnType) { - $returnType = $p; - continue; - } - - if ($static && 2 === $i) { - $static = false; - $returnType = 'static'; - } - - if (\in_array($description = trim(implode('', \array_slice($parts, 2 + $i))), ['', '.'], true)) { - $description = null; - } elseif (!preg_match('/[.!]$/', $description)) { - $description .= '.'; - } - - $tags['method'][$p] = [$static, $returnType, $signature ?? '()', $description]; - break; - } - } - - foreach ($tags['param'] ?? [] as $i => $param) { - unset($tags['param'][$i]); - - if (\strlen($param) !== strcspn($param, '<{(')) { - $param = preg_replace('{\(([^()]*+|(?R))*\)(?: *: *[^ ]++)?|<([^<>]*+|(?R))*>|\{([^{}]*+|(?R))*\}}', '', $param); - } - - if (false === $i = strpos($param, '$')) { - continue; - } - - $type = 0 === $i ? '' : rtrim(substr($param, 0, $i), ' &'); - $param = substr($param, 1 + $i, (strpos($param, ' ', $i) ?: (1 + $i + \strlen($param))) - $i - 1); - - $tags['param'][$param] = $type; - } - - foreach (['var', 'return'] as $k) { - if (null === $v = $tags[$k][0] ?? null) { - continue; - } - if (\strlen($v) !== strcspn($v, '<{(')) { - $v = preg_replace('{\(([^()]*+|(?R))*\)(?: *: *[^ ]++)?|<([^<>]*+|(?R))*>|\{([^{}]*+|(?R))*\}}', '', $v); - } - - $tags[$k] = substr($v, 0, strpos($v, ' ') ?: \strlen($v)) ?: null; - } - - return $tags; - } -} diff --git a/vendor/symfony/error-handler/Error/ClassNotFoundError.php b/vendor/symfony/error-handler/Error/ClassNotFoundError.php deleted file mode 100644 index 443fba2..0000000 --- a/vendor/symfony/error-handler/Error/ClassNotFoundError.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class ClassNotFoundError extends \Error -{ - /** - * {@inheritdoc} - */ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setAccessible(true); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/Error/FatalError.php b/vendor/symfony/error-handler/Error/FatalError.php deleted file mode 100644 index 57fc690..0000000 --- a/vendor/symfony/error-handler/Error/FatalError.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class FatalError extends \Error -{ - private $error; - - /** - * {@inheritdoc} - * - * @param array $error An array as returned by error_get_last() - */ - public function __construct(string $message, int $code, array $error, int $traceOffset = null, bool $traceArgs = true, array $trace = null) - { - parent::__construct($message, $code); - - $this->error = $error; - - if (null !== $trace) { - if (!$traceArgs) { - foreach ($trace as &$frame) { - unset($frame['args'], $frame['this'], $frame); - } - } - } elseif (null !== $traceOffset) { - if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) { - if (0 < $traceOffset) { - array_splice($trace, -$traceOffset); - } - - foreach ($trace as &$frame) { - if (!isset($frame['type'])) { - // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 - if (isset($frame['class'])) { - $frame['type'] = '::'; - } - } elseif ('dynamic' === $frame['type']) { - $frame['type'] = '->'; - } elseif ('static' === $frame['type']) { - $frame['type'] = '::'; - } - - // XDebug also has a different name for the parameters array - if (!$traceArgs) { - unset($frame['params'], $frame['args']); - } elseif (isset($frame['params']) && !isset($frame['args'])) { - $frame['args'] = $frame['params']; - unset($frame['params']); - } - } - - unset($frame); - $trace = array_reverse($trace); - } else { - $trace = []; - } - } - - foreach ([ - 'file' => $error['file'], - 'line' => $error['line'], - 'trace' => $trace, - ] as $property => $value) { - if (null !== $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setAccessible(true); - $refl->setValue($this, $value); - } - } - } - - /** - * {@inheritdoc} - */ - public function getError(): array - { - return $this->error; - } -} diff --git a/vendor/symfony/error-handler/Error/OutOfMemoryError.php b/vendor/symfony/error-handler/Error/OutOfMemoryError.php deleted file mode 100644 index d685c3d..0000000 --- a/vendor/symfony/error-handler/Error/OutOfMemoryError.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class OutOfMemoryError extends FatalError -{ -} diff --git a/vendor/symfony/error-handler/Error/UndefinedFunctionError.php b/vendor/symfony/error-handler/Error/UndefinedFunctionError.php deleted file mode 100644 index b57dd15..0000000 --- a/vendor/symfony/error-handler/Error/UndefinedFunctionError.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class UndefinedFunctionError extends \Error -{ - /** - * {@inheritdoc} - */ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setAccessible(true); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/Error/UndefinedMethodError.php b/vendor/symfony/error-handler/Error/UndefinedMethodError.php deleted file mode 100644 index adc8731..0000000 --- a/vendor/symfony/error-handler/Error/UndefinedMethodError.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class UndefinedMethodError extends \Error -{ - /** - * {@inheritdoc} - */ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setAccessible(true); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php deleted file mode 100644 index f85d275..0000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ErrorHandler\Error\ClassNotFoundError; -use Symfony\Component\ErrorHandler\Error\FatalError; - -/** - * @author Fabien Potencier - */ -class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface -{ - /** - * {@inheritdoc} - */ - public function enhance(\Throwable $error): ?\Throwable - { - // Some specific versions of PHP produce a fatal error when extending a not found class. - $message = !$error instanceof FatalError ? $error->getMessage() : $error->getError()['message']; - if (!preg_match('/^(Class|Interface|Trait) [\'"]([^\'"]+)[\'"] not found$/', $message, $matches)) { - return null; - } - $typeName = strtolower($matches[1]); - $fullyQualifiedClassName = $matches[2]; - - if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedClassName, '\\')) { - $className = substr($fullyQualifiedClassName, $namespaceSeparatorIndex + 1); - $namespacePrefix = substr($fullyQualifiedClassName, 0, $namespaceSeparatorIndex); - $message = sprintf('Attempted to load %s "%s" from namespace "%s".', $typeName, $className, $namespacePrefix); - $tail = ' for another namespace?'; - } else { - $className = $fullyQualifiedClassName; - $message = sprintf('Attempted to load %s "%s" from the global namespace.', $typeName, $className); - $tail = '?'; - } - - if ($candidates = $this->getClassCandidates($className)) { - $tail = array_pop($candidates).'"?'; - if ($candidates) { - $tail = ' for e.g. "'.implode('", "', $candidates).'" or "'.$tail; - } else { - $tail = ' for "'.$tail; - } - } - $message .= "\nDid you forget a \"use\" statement".$tail; - - return new ClassNotFoundError($message, $error); - } - - /** - * Tries to guess the full namespace for a given class name. - * - * By default, it looks for PSR-0 and PSR-4 classes registered via a Symfony or a Composer - * autoloader (that should cover all common cases). - * - * @param string $class A class name (without its namespace) - * - * Returns an array of possible fully qualified class names - */ - private function getClassCandidates(string $class): array - { - if (!\is_array($functions = spl_autoload_functions())) { - return []; - } - - // find Symfony and Composer autoloaders - $classes = []; - - foreach ($functions as $function) { - if (!\is_array($function)) { - continue; - } - // get class loaders wrapped by DebugClassLoader - if ($function[0] instanceof DebugClassLoader) { - $function = $function[0]->getClassLoader(); - - if (!\is_array($function)) { - continue; - } - } - - if ($function[0] instanceof ClassLoader) { - foreach ($function[0]->getPrefixes() as $prefix => $paths) { - foreach ($paths as $path) { - $classes[] = $this->findClassInPath($path, $class, $prefix); - } - } - - foreach ($function[0]->getPrefixesPsr4() as $prefix => $paths) { - foreach ($paths as $path) { - $classes[] = $this->findClassInPath($path, $class, $prefix); - } - } - } - } - - return array_unique(array_merge([], ...$classes)); - } - - private function findClassInPath(string $path, string $class, string $prefix): array - { - if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { - return []; - } - - $classes = []; - $filename = $class.'.php'; - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) { - $classes[] = $class; - } - } - - return $classes; - } - - private function convertFileToClass(string $path, string $file, string $prefix): ?string - { - $candidates = [ - // namespaced class - $namespacedClass = str_replace([$path.\DIRECTORY_SEPARATOR, '.php', '/'], ['', '', '\\'], $file), - // namespaced class (with target dir) - $prefix.$namespacedClass, - // namespaced class (with target dir and separator) - $prefix.'\\'.$namespacedClass, - // PEAR class - str_replace('\\', '_', $namespacedClass), - // PEAR class (with target dir) - str_replace('\\', '_', $prefix.$namespacedClass), - // PEAR class (with target dir and separator) - str_replace('\\', '_', $prefix.'\\'.$namespacedClass), - ]; - - if ($prefix) { - $candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); }); - } - - // We cannot use the autoloader here as most of them use require; but if the class - // is not found, the new autoloader call will require the file again leading to a - // "cannot redeclare class" error. - foreach ($candidates as $candidate) { - if ($this->classExists($candidate)) { - return $candidate; - } - } - - try { - require_once $file; - } catch (\Throwable $e) { - return null; - } - - foreach ($candidates as $candidate) { - if ($this->classExists($candidate)) { - return $candidate; - } - } - - return null; - } - - private function classExists(string $class): bool - { - return class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php b/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php deleted file mode 100644 index 7c3f4ef..0000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -interface ErrorEnhancerInterface -{ - /** - * Returns an \Throwable instance if the class is able to improve the error, null otherwise. - */ - public function enhance(\Throwable $error): ?\Throwable; -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php deleted file mode 100644 index f4c49c2..0000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\UndefinedFunctionError; - -/** - * @author Fabien Potencier - */ -class UndefinedFunctionErrorEnhancer implements ErrorEnhancerInterface -{ - /** - * {@inheritdoc} - */ - public function enhance(\Throwable $error): ?\Throwable - { - if ($error instanceof FatalError) { - return null; - } - - $message = $error->getMessage(); - $messageLen = \strlen($message); - $notFoundSuffix = '()'; - $notFoundSuffixLen = \strlen($notFoundSuffix); - if ($notFoundSuffixLen > $messageLen) { - return null; - } - - if (0 !== substr_compare($message, $notFoundSuffix, -$notFoundSuffixLen)) { - return null; - } - - $prefix = 'Call to undefined function '; - $prefixLen = \strlen($prefix); - if (0 !== strpos($message, $prefix)) { - return null; - } - - $fullyQualifiedFunctionName = substr($message, $prefixLen, -$notFoundSuffixLen); - if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedFunctionName, '\\')) { - $functionName = substr($fullyQualifiedFunctionName, $namespaceSeparatorIndex + 1); - $namespacePrefix = substr($fullyQualifiedFunctionName, 0, $namespaceSeparatorIndex); - $message = sprintf('Attempted to call function "%s" from namespace "%s".', $functionName, $namespacePrefix); - } else { - $functionName = $fullyQualifiedFunctionName; - $message = sprintf('Attempted to call function "%s" from the global namespace.', $functionName); - } - - $candidates = []; - foreach (get_defined_functions() as $type => $definedFunctionNames) { - foreach ($definedFunctionNames as $definedFunctionName) { - if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) { - $definedFunctionNameBasename = substr($definedFunctionName, $namespaceSeparatorIndex + 1); - } else { - $definedFunctionNameBasename = $definedFunctionName; - } - - if ($definedFunctionNameBasename === $functionName) { - $candidates[] = '\\'.$definedFunctionName; - } - } - } - - if ($candidates) { - sort($candidates); - $last = array_pop($candidates).'"?'; - if ($candidates) { - $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; - } else { - $candidates = '"'.$last; - } - $message .= "\nDid you mean to call ".$candidates; - } - - return new UndefinedFunctionError($message, $error); - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php deleted file mode 100644 index c4355f9..0000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\UndefinedMethodError; - -/** - * @author Grégoire Pineau - */ -class UndefinedMethodErrorEnhancer implements ErrorEnhancerInterface -{ - /** - * {@inheritdoc} - */ - public function enhance(\Throwable $error): ?\Throwable - { - if ($error instanceof FatalError) { - return null; - } - - $message = $error->getMessage(); - preg_match('/^Call to undefined method (.*)::(.*)\(\)$/', $message, $matches); - if (!$matches) { - return null; - } - - $className = $matches[1]; - $methodName = $matches[2]; - - $message = sprintf('Attempted to call an undefined method named "%s" of class "%s".', $methodName, $className); - - if ('' === $methodName || !class_exists($className) || null === $methods = get_class_methods($className)) { - // failed to get the class or its methods on which an unknown method was called (for example on an anonymous class) - return new UndefinedMethodError($message, $error); - } - - $candidates = []; - foreach ($methods as $definedMethodName) { - $lev = levenshtein($methodName, $definedMethodName); - if ($lev <= \strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { - $candidates[] = $definedMethodName; - } - } - - if ($candidates) { - sort($candidates); - $last = array_pop($candidates).'"?'; - if ($candidates) { - $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; - } else { - $candidates = '"'.$last; - } - - $message .= "\nDid you mean to call ".$candidates; - } - - return new UndefinedMethodError($message, $error); - } -} diff --git a/vendor/symfony/error-handler/ErrorHandler.php b/vendor/symfony/error-handler/ErrorHandler.php deleted file mode 100644 index ffb823e..0000000 --- a/vendor/symfony/error-handler/ErrorHandler.php +++ /dev/null @@ -1,798 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\OutOfMemoryError; -use Symfony\Component\ErrorHandler\ErrorEnhancer\ClassNotFoundErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorEnhancer\ErrorEnhancerInterface; -use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedFunctionErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedMethodErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; - -/** - * A generic ErrorHandler for the PHP engine. - * - * Provides five bit fields that control how errors are handled: - * - thrownErrors: errors thrown as \ErrorException - * - loggedErrors: logged errors, when not @-silenced - * - scopedErrors: errors thrown or logged with their local context - * - tracedErrors: errors logged with their stack trace - * - screamedErrors: never @-silenced errors - * - * Each error level can be logged by a dedicated PSR-3 logger object. - * Screaming only applies to logging. - * Throwing takes precedence over logging. - * Uncaught exceptions are logged as E_ERROR. - * E_DEPRECATED and E_USER_DEPRECATED levels never throw. - * E_RECOVERABLE_ERROR and E_USER_ERROR levels always throw. - * Non catchable errors that can be detected at shutdown time are logged when the scream bit field allows so. - * As errors have a performance cost, repeated errors are all logged, so that the developer - * can see them and weight them as more important to fix than others of the same level. - * - * @author Nicolas Grekas - * @author Grégoire Pineau - * - * @final - */ -class ErrorHandler -{ - private $levels = [ - \E_DEPRECATED => 'Deprecated', - \E_USER_DEPRECATED => 'User Deprecated', - \E_NOTICE => 'Notice', - \E_USER_NOTICE => 'User Notice', - \E_STRICT => 'Runtime Notice', - \E_WARNING => 'Warning', - \E_USER_WARNING => 'User Warning', - \E_COMPILE_WARNING => 'Compile Warning', - \E_CORE_WARNING => 'Core Warning', - \E_USER_ERROR => 'User Error', - \E_RECOVERABLE_ERROR => 'Catchable Fatal Error', - \E_COMPILE_ERROR => 'Compile Error', - \E_PARSE => 'Parse Error', - \E_ERROR => 'Error', - \E_CORE_ERROR => 'Core Error', - ]; - - private $loggers = [ - \E_DEPRECATED => [null, LogLevel::INFO], - \E_USER_DEPRECATED => [null, LogLevel::INFO], - \E_NOTICE => [null, LogLevel::WARNING], - \E_USER_NOTICE => [null, LogLevel::WARNING], - \E_STRICT => [null, LogLevel::WARNING], - \E_WARNING => [null, LogLevel::WARNING], - \E_USER_WARNING => [null, LogLevel::WARNING], - \E_COMPILE_WARNING => [null, LogLevel::WARNING], - \E_CORE_WARNING => [null, LogLevel::WARNING], - \E_USER_ERROR => [null, LogLevel::CRITICAL], - \E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], - \E_COMPILE_ERROR => [null, LogLevel::CRITICAL], - \E_PARSE => [null, LogLevel::CRITICAL], - \E_ERROR => [null, LogLevel::CRITICAL], - \E_CORE_ERROR => [null, LogLevel::CRITICAL], - ]; - - private $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED - private $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED - private $tracedErrors = 0x77FB; // E_ALL - E_STRICT - E_PARSE - private $screamedErrors = 0x55; // E_ERROR + E_CORE_ERROR + E_COMPILE_ERROR + E_PARSE - private $loggedErrors = 0; - private $configureException; - private $debug; - - private $isRecursive = 0; - private $isRoot = false; - private $exceptionHandler; - private $bootstrappingLogger; - - private static $reservedMemory; - private static $toStringException; - private static $silencedErrorCache = []; - private static $silencedErrorCount = 0; - private static $exitCode = 0; - - /** - * Registers the error handler. - */ - public static function register(self $handler = null, bool $replace = true): self - { - if (null === self::$reservedMemory) { - self::$reservedMemory = str_repeat('x', 32768); - register_shutdown_function(__CLASS__.'::handleFatalError'); - } - - if ($handlerIsNew = null === $handler) { - $handler = new static(); - } - - if (null === $prev = set_error_handler([$handler, 'handleError'])) { - restore_error_handler(); - // Specifying the error types earlier would expose us to https://bugs.php.net/63206 - set_error_handler([$handler, 'handleError'], $handler->thrownErrors | $handler->loggedErrors); - $handler->isRoot = true; - } - - if ($handlerIsNew && \is_array($prev) && $prev[0] instanceof self) { - $handler = $prev[0]; - $replace = false; - } - if (!$replace && $prev) { - restore_error_handler(); - $handlerIsRegistered = \is_array($prev) && $handler === $prev[0]; - } else { - $handlerIsRegistered = true; - } - if (\is_array($prev = set_exception_handler([$handler, 'handleException'])) && $prev[0] instanceof self) { - restore_exception_handler(); - if (!$handlerIsRegistered) { - $handler = $prev[0]; - } elseif ($handler !== $prev[0] && $replace) { - set_exception_handler([$handler, 'handleException']); - $p = $prev[0]->setExceptionHandler(null); - $handler->setExceptionHandler($p); - $prev[0]->setExceptionHandler($p); - } - } else { - $handler->setExceptionHandler($prev ?? [$handler, 'renderException']); - } - - $handler->throwAt(\E_ALL & $handler->thrownErrors, true); - - return $handler; - } - - /** - * Calls a function and turns any PHP error into \ErrorException. - * - * @return mixed What $function(...$arguments) returns - * - * @throws \ErrorException When $function(...$arguments) triggers a PHP error - */ - public static function call(callable $function, ...$arguments) - { - set_error_handler(static function (int $type, string $message, string $file, int $line) { - if (__FILE__ === $file) { - $trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3); - $file = $trace[2]['file'] ?? $file; - $line = $trace[2]['line'] ?? $line; - } - - throw new \ErrorException($message, 0, $type, $file, $line); - }); - - try { - return $function(...$arguments); - } finally { - restore_error_handler(); - } - } - - public function __construct(BufferingLogger $bootstrappingLogger = null, bool $debug = false) - { - if ($bootstrappingLogger) { - $this->bootstrappingLogger = $bootstrappingLogger; - $this->setDefaultLogger($bootstrappingLogger); - } - $traceReflector = new \ReflectionProperty(\Exception::class, 'trace'); - $traceReflector->setAccessible(true); - $this->configureException = \Closure::bind(static function ($e, $trace, $file = null, $line = null) use ($traceReflector) { - $traceReflector->setValue($e, $trace); - $e->file = $file ?? $e->file; - $e->line = $line ?? $e->line; - }, null, new class() extends \Exception { - }); - $this->debug = $debug; - } - - /** - * Sets a logger to non assigned errors levels. - * - * @param LoggerInterface $logger A PSR-3 logger to put as default for the given levels - * @param array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants - * @param bool $replace Whether to replace or not any existing logger - */ - public function setDefaultLogger(LoggerInterface $logger, $levels = \E_ALL, bool $replace = false): void - { - $loggers = []; - - if (\is_array($levels)) { - foreach ($levels as $type => $logLevel) { - if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { - $loggers[$type] = [$logger, $logLevel]; - } - } - } else { - if (null === $levels) { - $levels = \E_ALL; - } - foreach ($this->loggers as $type => $log) { - if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) { - $log[0] = $logger; - $loggers[$type] = $log; - } - } - } - - $this->setLoggers($loggers); - } - - /** - * Sets a logger for each error level. - * - * @param array $loggers Error levels to [LoggerInterface|null, LogLevel::*] map - * - * @return array The previous map - * - * @throws \InvalidArgumentException - */ - public function setLoggers(array $loggers): array - { - $prevLogged = $this->loggedErrors; - $prev = $this->loggers; - $flush = []; - - foreach ($loggers as $type => $log) { - if (!isset($prev[$type])) { - throw new \InvalidArgumentException('Unknown error type: '.$type); - } - if (!\is_array($log)) { - $log = [$log]; - } elseif (!\array_key_exists(0, $log)) { - throw new \InvalidArgumentException('No logger provided.'); - } - if (null === $log[0]) { - $this->loggedErrors &= ~$type; - } elseif ($log[0] instanceof LoggerInterface) { - $this->loggedErrors |= $type; - } else { - throw new \InvalidArgumentException('Invalid logger provided.'); - } - $this->loggers[$type] = $log + $prev[$type]; - - if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) { - $flush[$type] = $type; - } - } - $this->reRegister($prevLogged | $this->thrownErrors); - - if ($flush) { - foreach ($this->bootstrappingLogger->cleanLogs() as $log) { - $type = ThrowableUtils::getSeverity($log[2]['exception']); - if (!isset($flush[$type])) { - $this->bootstrappingLogger->log($log[0], $log[1], $log[2]); - } elseif ($this->loggers[$type][0]) { - $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]); - } - } - } - - return $prev; - } - - /** - * Sets a user exception handler. - * - * @param callable(\Throwable $e)|null $handler - * - * @return callable|null The previous exception handler - */ - public function setExceptionHandler(?callable $handler): ?callable - { - $prev = $this->exceptionHandler; - $this->exceptionHandler = $handler; - - return $prev; - } - - /** - * Sets the PHP error levels that throw an exception when a PHP error occurs. - * - * @param int $levels A bit field of E_* constants for thrown errors - * @param bool $replace Replace or amend the previous value - * - * @return int The previous value - */ - public function throwAt(int $levels, bool $replace = false): int - { - $prev = $this->thrownErrors; - $this->thrownErrors = ($levels | \E_RECOVERABLE_ERROR | \E_USER_ERROR) & ~\E_USER_DEPRECATED & ~\E_DEPRECATED; - if (!$replace) { - $this->thrownErrors |= $prev; - } - $this->reRegister($prev | $this->loggedErrors); - - return $prev; - } - - /** - * Sets the PHP error levels for which local variables are preserved. - * - * @param int $levels A bit field of E_* constants for scoped errors - * @param bool $replace Replace or amend the previous value - * - * @return int The previous value - */ - public function scopeAt(int $levels, bool $replace = false): int - { - $prev = $this->scopedErrors; - $this->scopedErrors = $levels; - if (!$replace) { - $this->scopedErrors |= $prev; - } - - return $prev; - } - - /** - * Sets the PHP error levels for which the stack trace is preserved. - * - * @param int $levels A bit field of E_* constants for traced errors - * @param bool $replace Replace or amend the previous value - * - * @return int The previous value - */ - public function traceAt(int $levels, bool $replace = false): int - { - $prev = $this->tracedErrors; - $this->tracedErrors = $levels; - if (!$replace) { - $this->tracedErrors |= $prev; - } - - return $prev; - } - - /** - * Sets the error levels where the @-operator is ignored. - * - * @param int $levels A bit field of E_* constants for screamed errors - * @param bool $replace Replace or amend the previous value - * - * @return int The previous value - */ - public function screamAt(int $levels, bool $replace = false): int - { - $prev = $this->screamedErrors; - $this->screamedErrors = $levels; - if (!$replace) { - $this->screamedErrors |= $prev; - } - - return $prev; - } - - /** - * Re-registers as a PHP error handler if levels changed. - */ - private function reRegister(int $prev): void - { - if ($prev !== $this->thrownErrors | $this->loggedErrors) { - $handler = set_error_handler('var_dump'); - $handler = \is_array($handler) ? $handler[0] : null; - restore_error_handler(); - if ($handler === $this) { - restore_error_handler(); - if ($this->isRoot) { - set_error_handler([$this, 'handleError'], $this->thrownErrors | $this->loggedErrors); - } else { - set_error_handler([$this, 'handleError']); - } - } - } - } - - /** - * Handles errors by filtering then logging them according to the configured bit fields. - * - * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself - * - * @throws \ErrorException When $this->thrownErrors requests so - * - * @internal - */ - public function handleError(int $type, string $message, string $file, int $line): bool - { - if (\PHP_VERSION_ID >= 70300 && \E_WARNING === $type && '"' === $message[0] && false !== strpos($message, '" targeting switch is equivalent to "break')) { - $type = \E_DEPRECATED; - } - - // Level is the current error reporting level to manage silent error. - $level = error_reporting(); - $silenced = 0 === ($level & $type); - // Strong errors are not authorized to be silenced. - $level |= \E_RECOVERABLE_ERROR | \E_USER_ERROR | \E_DEPRECATED | \E_USER_DEPRECATED; - $log = $this->loggedErrors & $type; - $throw = $this->thrownErrors & $type & $level; - $type &= $level | $this->screamedErrors; - - // Never throw on warnings triggered by assert() - if (\E_WARNING === $type && 'a' === $message[0] && 0 === strncmp($message, 'assert(): ', 10)) { - $throw = 0; - } - - if (!$type || (!$log && !$throw)) { - return false; - } - - $logMessage = $this->levels[$type].': '.$message; - - if (null !== self::$toStringException) { - $errorAsException = self::$toStringException; - self::$toStringException = null; - } elseif (!$throw && !($type & $level)) { - if (!isset(self::$silencedErrorCache[$id = $file.':'.$line])) { - $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 5), $type, $file, $line, false) : []; - $errorAsException = new SilencedErrorContext($type, $file, $line, isset($lightTrace[1]) ? [$lightTrace[0]] : $lightTrace); - } elseif (isset(self::$silencedErrorCache[$id][$message])) { - $lightTrace = null; - $errorAsException = self::$silencedErrorCache[$id][$message]; - ++$errorAsException->count; - } else { - $lightTrace = []; - $errorAsException = null; - } - - if (100 < ++self::$silencedErrorCount) { - self::$silencedErrorCache = $lightTrace = []; - self::$silencedErrorCount = 1; - } - if ($errorAsException) { - self::$silencedErrorCache[$id][$message] = $errorAsException; - } - if (null === $lightTrace) { - return true; - } - } else { - if (false !== strpos($message, '@anonymous')) { - $backtrace = debug_backtrace(false, 5); - - for ($i = 1; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['function'], $backtrace[$i]['args'][0]) - && ('trigger_error' === $backtrace[$i]['function'] || 'user_error' === $backtrace[$i]['function']) - ) { - if ($backtrace[$i]['args'][0] !== $message) { - $message = $this->parseAnonymousClass($backtrace[$i]['args'][0]); - $logMessage = $this->levels[$type].': '.$message; - } - - break; - } - } - } - - $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); - - if ($throw || $this->tracedErrors & $type) { - $backtrace = $errorAsException->getTrace(); - $lightTrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw); - ($this->configureException)($errorAsException, $lightTrace, $file, $line); - } else { - ($this->configureException)($errorAsException, []); - $backtrace = []; - } - } - - if ($throw) { - if (\PHP_VERSION_ID < 70400 && \E_USER_ERROR & $type) { - for ($i = 1; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['function'], $backtrace[$i]['type'], $backtrace[$i - 1]['function']) - && '__toString' === $backtrace[$i]['function'] - && '->' === $backtrace[$i]['type'] - && !isset($backtrace[$i - 1]['class']) - && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function']) - ) { - // Here, we know trigger_error() has been called from __toString(). - // PHP triggers a fatal error when throwing from __toString(). - // A small convention allows working around the limitation: - // given a caught $e exception in __toString(), quitting the method with - // `return trigger_error($e, E_USER_ERROR);` allows this error handler - // to make $e get through the __toString() barrier. - - $context = 4 < \func_num_args() ? (func_get_arg(4) ?: []) : []; - - foreach ($context as $e) { - if ($e instanceof \Throwable && $e->__toString() === $message) { - self::$toStringException = $e; - - return true; - } - } - - // Display the original error message instead of the default one. - $this->handleException($errorAsException); - - // Stop the process by giving back the error to the native handler. - return false; - } - } - } - - throw $errorAsException; - } - - if ($this->isRecursive) { - $log = 0; - } else { - if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) { - $currentErrorHandler = set_error_handler('var_dump'); - restore_error_handler(); - } - - try { - $this->isRecursive = true; - $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; - $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? ['exception' => $errorAsException] : []); - } finally { - $this->isRecursive = false; - - if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) { - set_error_handler($currentErrorHandler); - } - } - } - - return !$silenced && $type && $log; - } - - /** - * Handles an exception by logging then forwarding it to another handler. - * - * @internal - */ - public function handleException(\Throwable $exception) - { - $handlerException = null; - - if (!$exception instanceof FatalError) { - self::$exitCode = 255; - - $type = ThrowableUtils::getSeverity($exception); - } else { - $type = $exception->getError()['type']; - } - - if ($this->loggedErrors & $type) { - if (false !== strpos($message = $exception->getMessage(), "@anonymous\0")) { - $message = $this->parseAnonymousClass($message); - } - - if ($exception instanceof FatalError) { - $message = 'Fatal '.$message; - } elseif ($exception instanceof \Error) { - $message = 'Uncaught Error: '.$message; - } elseif ($exception instanceof \ErrorException) { - $message = 'Uncaught '.$message; - } else { - $message = 'Uncaught Exception: '.$message; - } - - try { - $this->loggers[$type][0]->log($this->loggers[$type][1], $message, ['exception' => $exception]); - } catch (\Throwable $handlerException) { - } - } - - if (!$exception instanceof OutOfMemoryError) { - foreach ($this->getErrorEnhancers() as $errorEnhancer) { - if ($e = $errorEnhancer->enhance($exception)) { - $exception = $e; - break; - } - } - } - - $exceptionHandler = $this->exceptionHandler; - $this->exceptionHandler = [$this, 'renderException']; - - if (null === $exceptionHandler || $exceptionHandler === $this->exceptionHandler) { - $this->exceptionHandler = null; - } - - try { - if (null !== $exceptionHandler) { - return $exceptionHandler($exception); - } - $handlerException = $handlerException ?: $exception; - } catch (\Throwable $handlerException) { - } - if ($exception === $handlerException && null === $this->exceptionHandler) { - self::$reservedMemory = null; // Disable the fatal error handler - throw $exception; // Give back $exception to the native handler - } - - $loggedErrors = $this->loggedErrors; - if ($exception === $handlerException) { - $this->loggedErrors &= ~$type; - } - - try { - $this->handleException($handlerException); - } finally { - $this->loggedErrors = $loggedErrors; - } - } - - /** - * Shutdown registered function for handling PHP fatal errors. - * - * @param array|null $error An array as returned by error_get_last() - * - * @internal - */ - public static function handleFatalError(array $error = null): void - { - if (null === self::$reservedMemory) { - return; - } - - $handler = self::$reservedMemory = null; - $handlers = []; - $previousHandler = null; - $sameHandlerLimit = 10; - - while (!\is_array($handler) || !$handler[0] instanceof self) { - $handler = set_exception_handler('var_dump'); - restore_exception_handler(); - - if (!$handler) { - break; - } - restore_exception_handler(); - - if ($handler !== $previousHandler) { - array_unshift($handlers, $handler); - $previousHandler = $handler; - } elseif (0 === --$sameHandlerLimit) { - $handler = null; - break; - } - } - foreach ($handlers as $h) { - set_exception_handler($h); - } - if (!$handler) { - return; - } - if ($handler !== $h) { - $handler[0]->setExceptionHandler($h); - } - $handler = $handler[0]; - $handlers = []; - - if ($exit = null === $error) { - $error = error_get_last(); - } - - if ($error && $error['type'] &= \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR) { - // Let's not throw anymore but keep logging - $handler->throwAt(0, true); - $trace = $error['backtrace'] ?? null; - - if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { - $fatalError = new OutOfMemoryError($handler->levels[$error['type']].': '.$error['message'], 0, $error, 2, false, $trace); - } else { - $fatalError = new FatalError($handler->levels[$error['type']].': '.$error['message'], 0, $error, 2, true, $trace); - } - } else { - $fatalError = null; - } - - try { - if (null !== $fatalError) { - self::$exitCode = 255; - $handler->handleException($fatalError); - } - } catch (FatalError $e) { - // Ignore this re-throw - } - - if ($exit && self::$exitCode) { - $exitCode = self::$exitCode; - register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); }); - } - } - - /** - * Renders the given exception. - * - * As this method is mainly called during boot where nothing is yet available, - * the output is always either HTML or CLI depending where PHP runs. - */ - private function renderException(\Throwable $exception): void - { - $renderer = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliErrorRenderer() : new HtmlErrorRenderer($this->debug); - - $exception = $renderer->render($exception); - - if (!headers_sent()) { - http_response_code($exception->getStatusCode()); - - foreach ($exception->getHeaders() as $name => $value) { - header($name.': '.$value, false); - } - } - - echo $exception->getAsString(); - } - - /** - * Override this method if you want to define more error enhancers. - * - * @return ErrorEnhancerInterface[] - */ - protected function getErrorEnhancers(): iterable - { - return [ - new UndefinedFunctionErrorEnhancer(), - new UndefinedMethodErrorEnhancer(), - new ClassNotFoundErrorEnhancer(), - ]; - } - - /** - * Cleans the trace by removing function arguments and the frames added by the error handler and DebugClassLoader. - */ - private function cleanTrace(array $backtrace, int $type, string &$file, int &$line, bool $throw): array - { - $lightTrace = $backtrace; - - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $lightTrace = \array_slice($lightTrace, 1 + $i); - break; - } - } - if (\E_USER_DEPRECATED === $type) { - for ($i = 0; isset($lightTrace[$i]); ++$i) { - if (!isset($lightTrace[$i]['file'], $lightTrace[$i]['line'], $lightTrace[$i]['function'])) { - continue; - } - if (!isset($lightTrace[$i]['class']) && 'trigger_deprecation' === $lightTrace[$i]['function']) { - $file = $lightTrace[$i]['file']; - $line = $lightTrace[$i]['line']; - $lightTrace = \array_slice($lightTrace, 1 + $i); - break; - } - } - } - if (class_exists(DebugClassLoader::class, false)) { - for ($i = \count($lightTrace) - 2; 0 < $i; --$i) { - if (DebugClassLoader::class === ($lightTrace[$i]['class'] ?? null)) { - array_splice($lightTrace, --$i, 2); - } - } - } - if (!($throw || $this->scopedErrors & $type)) { - for ($i = 0; isset($lightTrace[$i]); ++$i) { - unset($lightTrace[$i]['args'], $lightTrace[$i]['object']); - } - } - - return $lightTrace; - } - - /** - * Parse the error message by removing the anonymous class notation - * and using the parent class instead if possible. - */ - private function parseAnonymousClass(string $message): string - { - return preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', static function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $message); - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php deleted file mode 100644 index 5c0f6a7..0000000 --- a/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -// Help opcache.preload discover always-needed symbols -class_exists(CliDumper::class); - -/** - * @author Nicolas Grekas - */ -class CliErrorRenderer implements ErrorRendererInterface -{ - /** - * {@inheritdoc} - */ - public function render(\Throwable $exception): FlattenException - { - $cloner = new VarCloner(); - $dumper = new class() extends CliDumper { - protected function supportsColors(): bool - { - $outputStream = $this->outputStream; - $this->outputStream = fopen('php://stdout', 'w'); - - try { - return parent::supportsColors(); - } finally { - $this->outputStream = $outputStream; - } - } - }; - - return FlattenException::createFromThrowable($exception) - ->setAsString($dumper->dump($cloner->cloneVar($exception), true)); - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php b/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php deleted file mode 100644 index aba1966..0000000 --- a/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; - -/** - * Formats an exception to be used as response content. - * - * @author Yonel Ceruto - */ -interface ErrorRendererInterface -{ - /** - * Renders a Throwable as a FlattenException. - */ - public function render(\Throwable $exception): FlattenException; -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php deleted file mode 100644 index dbd2935..0000000 --- a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php +++ /dev/null @@ -1,367 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Psr\Log\LoggerInterface; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; - -/** - * @author Yonel Ceruto - */ -class HtmlErrorRenderer implements ErrorRendererInterface -{ - private const GHOST_ADDONS = [ - '02-14' => self::GHOST_HEART, - '02-29' => self::GHOST_PLUS, - '10-18' => self::GHOST_GIFT, - ]; - - private const GHOST_GIFT = 'M124.00534057617188,5.3606138080358505 C124.40059661865234,4.644828304648399 125.1237564086914,3.712414965033531 123.88127899169922,3.487462028861046 C123.53517150878906,3.3097832053899765 123.18894958496094,2.9953975528478622 122.8432846069336,3.345616325736046 C122.07421112060547,3.649444565176964 121.40750122070312,4.074306473135948 122.2164306640625,4.869479164481163 C122.57514953613281,5.3830065578222275 122.90142822265625,6.503447040915489 123.3077621459961,6.626829609274864 C123.55027770996094,6.210384353995323 123.7774658203125,5.785196766257286 124.00534057617188,5.3606138080358505 zM122.30630493164062,7.336987480521202 C121.60028076171875,6.076864704489708 121.03211975097656,4.72498320043087 120.16796875,3.562500938773155 C119.11695098876953,2.44033907353878 117.04605865478516,2.940566048026085 116.57544708251953,4.387995228171349 C115.95028686523438,5.819030746817589 117.2991714477539,7.527640804648399 118.826171875,7.348545059561729 C119.98493194580078,7.367936596274376 121.15027618408203,7.420116886496544 122.30630493164062,7.336987480521202 zM128.1732177734375,7.379541382193565 C129.67486572265625,7.17823551595211 130.53842163085938,5.287807449698448 129.68344116210938,4.032590612769127 C128.92578125,2.693056806921959 126.74605560302734,2.6463639587163925 125.98509216308594,4.007616028189659 C125.32617950439453,5.108129009604454 124.75428009033203,6.258124336600304 124.14962768554688,7.388818249106407 C125.48638916015625,7.465229496359825 126.8357162475586,7.447416767477989 128.1732177734375,7.379541382193565 zM130.6601104736328,8.991325363516808 C131.17202758789062,8.540884003043175 133.1543731689453,8.009847149252892 131.65304565429688,7.582054600119591 C131.2811279296875,7.476506695151329 130.84751892089844,6.99234913289547 130.5132598876953,7.124847874045372 C129.78744506835938,8.02728746831417 128.67140197753906,8.55669592320919 127.50616455078125,8.501235947012901 C127.27806091308594,8.576229080557823 126.11459350585938,8.38720129430294 126.428955078125,8.601900085806847 C127.25099182128906,9.070617660880089 128.0523223876953,9.579657539725304 128.902587890625,9.995706543326378 C129.49813842773438,9.678531631827354 130.0761260986328,9.329126343131065 130.6601104736328,8.991325363516808 zM118.96446990966797,9.246344551444054 C119.4022445678711,8.991325363516808 119.84001922607422,8.736305221915245 120.27779388427734,8.481284126639366 C118.93965911865234,8.414779648184776 117.40827941894531,8.607666000723839 116.39698791503906,7.531384453177452 C116.11186981201172,7.212117180228233 115.83845520019531,6.846597656607628 115.44329071044922,7.248530372977257 C114.96995544433594,7.574637398123741 113.5140609741211,7.908811077475548 114.63501739501953,8.306883797049522 C115.61112976074219,8.883499130606651 116.58037567138672,9.474181160330772 117.58061218261719,10.008124336600304 C118.05723571777344,9.784612640738487 118.50651550292969,9.5052699893713 118.96446990966797,9.246344551444054 zM125.38018035888672,12.091858848929405 C125.9474868774414,11.636047348380089 127.32159423828125,11.201767906546593 127.36749267578125,10.712632164359093 C126.08487701416016,9.974547371268272 124.83960723876953,9.152772888541222 123.49772644042969,8.528907760977745 C123.03594207763672,8.353693947196007 122.66152954101562,8.623294815421104 122.28982543945312,8.857431396842003 C121.19065856933594,9.51122473180294 120.06505584716797,10.12446115911007 119.00167083740234,10.835315689444542 C120.39238739013672,11.69529627263546 121.79983520507812,12.529837593436241 123.22095489501953,13.338589653372765 C123.94580841064453,12.932025894522667 124.66128540039062,12.508862480521202 125.38018035888672,12.091858848929405 zM131.07164001464844,13.514615997672081 C131.66018676757812,13.143282875418663 132.2487335205078,12.771927818655968 132.8372802734375,12.400571808218956 C132.8324737548828,11.156818374991417 132.8523406982422,9.912529930472374 132.81829833984375,8.669195160269737 C131.63046264648438,9.332009300589561 130.45948791503906,10.027913078665733 129.30828857421875,10.752535805106163 C129.182373046875,12.035354599356651 129.24623107910156,13.33940313756466 129.27359008789062,14.628684982657433 C129.88104248046875,14.27079389989376 130.4737548828125,13.888019546866417 131.07164001464844,13.514640793204308 zM117.26847839355469,12.731024727225304 C117.32825469970703,11.67083452641964 117.45709991455078,10.46224020421505 116.17853546142578,10.148179039359093 C115.37110900878906,9.77159021794796 114.25194549560547,8.806716904044151 113.62991333007812,8.81639002263546 C113.61052703857422,10.0110072940588 113.62078857421875,11.20585821568966 113.61869049072266,12.400571808218956 C114.81139373779297,13.144886955618858 115.98292541503906,13.925040230154991 117.20137023925781,14.626662239432335 C117.31951141357422,14.010867103934288 117.24227905273438,13.35805033147335 117.26847839355469,12.731024727225304 zM125.80937957763672,16.836034759879112 C126.51483917236328,16.390663132071495 127.22030639648438,15.945291504263878 127.92576599121094,15.49991987645626 C127.92250061035156,14.215868934988976 127.97560119628906,12.929980263113976 127.91757202148438,11.647302612662315 C127.14225769042969,11.869626984000206 126.25550079345703,12.556857094168663 125.43866729736328,12.983742699027061 C124.82704162597656,13.342005714774132 124.21542358398438,13.700271591544151 123.60379028320312,14.05853746831417 C123.61585235595703,15.429577812552452 123.57081604003906,16.803131088614464 123.64839172363281,18.172149643301964 C124.37957000732422,17.744937881827354 125.09130859375,17.284801468253136 125.80937957763672,16.836034759879112 zM122.8521499633789,16.115344032645226 C122.8521499633789,15.429741844534874 122.8521499633789,14.744139656424522 122.8521499633789,14.05853746831417 C121.43595123291016,13.230924591422081 120.02428436279297,12.395455345511436 118.60256958007812,11.577354416251183 C118.52394104003906,12.888403877615929 118.56887817382812,14.204405769705772 118.55702209472656,15.517732605338097 C119.97289276123047,16.4041957706213 121.37410736083984,17.314891800284386 122.80789947509766,18.172149643301964 C122.86368560791016,17.488990768790245 122.84332275390625,16.800363525748253 122.8521499633789,16.115344032645226 zM131.10684204101562,18.871450409293175 C131.68399047851562,18.48711584508419 132.2611541748047,18.10278509557247 132.8383026123047,17.718475326895714 C132.81423950195312,16.499977096915245 132.89776611328125,15.264989838004112 132.77627563476562,14.05993078649044 C131.5760040283203,14.744719490408897 130.41763305664062,15.524359688162804 129.23875427246094,16.255397781729698 C129.26707458496094,17.516149505972862 129.18060302734375,18.791316971182823 129.3108367919922,20.041303619742393 C129.91973876953125,19.667551025748253 130.51010131835938,19.264152511954308 131.10684204101562,18.871450409293175 zM117.2557373046875,18.188333496451378 C117.25104522705078,17.549470886588097 117.24633026123047,16.91058538854122 117.24163055419922,16.271720871329308 C116.04924774169922,15.525708183646202 114.87187957763672,14.75476549565792 113.66158294677734,14.038097366690636 C113.5858383178711,15.262084946036339 113.62901306152344,16.49083898961544 113.61761474609375,17.717010483145714 C114.82051086425781,18.513254150748253 116.00987243652344,19.330610260367393 117.22888946533203,20.101993545889854 C117.27559661865234,19.466014847159386 117.25241088867188,18.825733169913292 117.2557373046875,18.188333496451378 zM125.8398666381836,22.38675306737423 C126.54049682617188,21.921453461050987 127.24110412597656,21.456151947379112 127.94172668457031,20.99083136022091 C127.94009399414062,19.693386062979698 127.96646118164062,18.395381912589073 127.93160247802734,17.098379120230675 C126.50540924072266,17.97775076329708 125.08877563476562,18.873308166861534 123.68258666992188,19.78428266942501 C123.52366638183594,21.03710363805294 123.626708984375,22.32878302037716 123.62647247314453,23.595300659537315 C124.06291198730469,23.86113165318966 125.1788101196289,22.68297766149044 125.8398666381836,22.38675306737423 zM122.8521499633789,21.83134649693966 C122.76741790771484,20.936696991324425 123.21651458740234,19.67745779454708 122.0794677734375,19.330633148550987 C120.93280029296875,18.604360565543175 119.7907485961914,17.870157226920128 118.62899780273438,17.16818617284298 C118.45966339111328,18.396427139639854 118.63676452636719,19.675991043448448 118.50668334960938,20.919256195425987 C119.89984130859375,21.92635916173458 121.32942199707031,22.88914106786251 122.78502655029297,23.803510650992393 C122.90177917480469,23.1627406924963 122.82917022705078,22.48402212560177 122.8521499633789,21.83134649693966 zM117.9798355102539,21.59483526647091 C116.28416442871094,20.46288488805294 114.58848571777344,19.330957397818565 112.892822265625,18.199007019400597 C112.89473724365234,14.705654129385948 112.84647369384766,11.211485847830772 112.90847778320312,7.718807205557823 C113.7575912475586,7.194885239005089 114.66117858886719,6.765397056937218 115.5350341796875,6.284702762961388 C114.97061157226562,4.668964847922325 115.78496551513672,2.7054970115423203 117.42159271240234,2.1007001250982285 C118.79354095458984,1.537783369421959 120.44731903076172,2.0457767099142075 121.32200622558594,3.23083733022213 C121.95732116699219,2.9050118774175644 122.59264373779297,2.5791852325201035 123.22796630859375,2.253336176276207 C123.86669921875,2.5821153968572617 124.50543975830078,2.9108948558568954 125.1441650390625,3.23967407643795 C126.05941009521484,2.154020771384239 127.62747192382812,1.5344576686620712 128.986328125,2.1429056972265244 C130.61741638183594,2.716217741370201 131.50650024414062,4.675290569663048 130.9215545654297,6.2884936183691025 C131.8018341064453,6.78548763692379 132.7589111328125,7.1738648265600204 133.5660400390625,7.780336365103722 C133.60182189941406,11.252970680594444 133.56637573242188,14.726140961050987 133.5631103515625,18.199007019400597 C130.18914794921875,20.431867584586143 126.86984252929688,22.74994657933712 123.44108581542969,24.897907242178917 C122.44406127929688,24.897628769278526 121.5834732055664,23.815067276358604 120.65831756591797,23.37616156041622 C119.76387023925781,22.784828171133995 118.87168884277344,22.19007681310177 117.9798355102539,21.59483526647091 z'; - private const GHOST_HEART = 'M125.91386369681868,8.305165958366445 C128.95033202169043,-0.40540639102854037 140.8469835342744,8.305165958366445 125.91386369681868,19.504526138305664 C110.98208663272044,8.305165958366445 122.87795231771452,-0.40540639102854037 125.91386369681868,8.305165958366445 z'; - private const GHOST_PLUS = 'M111.36824226379395,8.969108581542969 L118.69175148010254,8.969108581542969 L118.69175148010254,1.6455793380737305 L126.20429420471191,1.6455793380737305 L126.20429420471191,8.969108581542969 L133.52781105041504,8.969108581542969 L133.52781105041504,16.481630325317383 L126.20429420471191,16.481630325317383 L126.20429420471191,23.805158615112305 L118.69175148010254,23.805158615112305 L118.69175148010254,16.481630325317383 L111.36824226379395,16.481630325317383 z'; - - private $debug; - private $charset; - private $fileLinkFormat; - private $projectDir; - private $outputBuffer; - private $logger; - - private static $template = 'views/error.html.php'; - - /** - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - * @param string|FileLinkFormatter|null $fileLinkFormat - * @param bool|callable $outputBuffer The output buffer as a string or a callable that should return it - */ - public function __construct($debug = false, string $charset = null, $fileLinkFormat = null, string $projectDir = null, $outputBuffer = '', LoggerInterface $logger = null) - { - if (!\is_bool($debug) && !\is_callable($debug)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a boolean or a callable, "%s" given.', __METHOD__, \gettype($debug))); - } - - if (!\is_string($outputBuffer) && !\is_callable($outputBuffer)) { - throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be a string or a callable, "%s" given.', __METHOD__, \gettype($outputBuffer))); - } - - $this->debug = $debug; - $this->charset = $charset ?: (ini_get('default_charset') ?: 'UTF-8'); - $this->fileLinkFormat = $fileLinkFormat ?: (ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')); - $this->projectDir = $projectDir; - $this->outputBuffer = $outputBuffer; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function render(\Throwable $exception): FlattenException - { - $headers = ['Content-Type' => 'text/html; charset='.$this->charset]; - if (\is_bool($this->debug) ? $this->debug : ($this->debug)($exception)) { - $headers['X-Debug-Exception'] = rawurlencode($exception->getMessage()); - $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); - } - - $exception = FlattenException::createFromThrowable($exception, null, $headers); - - return $exception->setAsString($this->renderException($exception)); - } - - /** - * Gets the HTML content associated with the given exception. - */ - public function getBody(FlattenException $exception): string - { - return $this->renderException($exception, 'views/exception.html.php'); - } - - /** - * Gets the stylesheet associated with the given exception. - */ - public function getStylesheet(): string - { - if (!$this->debug) { - return $this->include('assets/css/error.css'); - } - - return $this->include('assets/css/exception.css'); - } - - public static function isDebug(RequestStack $requestStack, bool $debug): \Closure - { - return static function () use ($requestStack, $debug): bool { - if (!$request = $requestStack->getCurrentRequest()) { - return $debug; - } - - return $debug && $request->attributes->getBoolean('showException', true); - }; - } - - public static function getAndCleanOutputBuffer(RequestStack $requestStack): \Closure - { - return static function () use ($requestStack): string { - if (!$request = $requestStack->getCurrentRequest()) { - return ''; - } - - $startObLevel = $request->headers->get('X-Php-Ob-Level', -1); - - if (ob_get_level() <= $startObLevel) { - return ''; - } - - Response::closeOutputBuffers($startObLevel + 1, true); - - return ob_get_clean(); - }; - } - - private function renderException(FlattenException $exception, string $debugTemplate = 'views/exception_full.html.php'): string - { - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - $statusText = $this->escape($exception->getStatusText()); - $statusCode = $this->escape($exception->getStatusCode()); - - if (!$debug) { - return $this->include(self::$template, [ - 'statusText' => $statusText, - 'statusCode' => $statusCode, - ]); - } - - $exceptionMessage = $this->escape($exception->getMessage()); - - return $this->include($debugTemplate, [ - 'exception' => $exception, - 'exceptionMessage' => $exceptionMessage, - 'statusText' => $statusText, - 'statusCode' => $statusCode, - 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, - 'currentContent' => \is_string($this->outputBuffer) ? $this->outputBuffer : ($this->outputBuffer)(), - ]); - } - - /** - * Formats an array as a string. - */ - private function formatArgs(array $args): string - { - $result = []; - foreach ($args as $key => $item) { - if ('object' === $item[0]) { - $formattedValue = sprintf('object(%s)', $this->abbrClass($item[1])); - } elseif ('array' === $item[0]) { - $formattedValue = sprintf('array(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('null' === $item[0]) { - $formattedValue = 'null'; - } elseif ('boolean' === $item[0]) { - $formattedValue = ''.strtolower(var_export($item[1], true)).''; - } elseif ('resource' === $item[0]) { - $formattedValue = 'resource'; - } else { - $formattedValue = str_replace("\n", '', $this->escape(var_export($item[1], true))); - } - - $result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escape($key), $formattedValue); - } - - return implode(', ', $result); - } - - private function formatArgsAsText(array $args) - { - return strip_tags($this->formatArgs($args)); - } - - private function escape(string $string): string - { - return htmlspecialchars($string, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset); - } - - private function abbrClass(string $class): string - { - $parts = explode('\\', $class); - $short = array_pop($parts); - - return sprintf('%s', $class, $short); - } - - private function getFileRelative(string $file): ?string - { - $file = str_replace('\\', '/', $file); - - if (null !== $this->projectDir && 0 === strpos($file, $this->projectDir)) { - return ltrim(substr($file, \strlen($this->projectDir)), '/'); - } - - return null; - } - - /** - * Returns the link for a given file/line pair. - * - * @return string|false - */ - private function getFileLink(string $file, int $line) - { - if ($fmt = $this->fileLinkFormat) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } - - /** - * Formats a file path. - * - * @param string $file An absolute file path - * @param int $line The line number - * @param string $text Use this text for the link rather than the file path - */ - private function formatFile(string $file, int $line, string $text = null): string - { - $file = trim($file); - - if (null === $text) { - $text = $file; - if (null !== $rel = $this->getFileRelative($text)) { - $rel = explode('/', $rel, 2); - $text = sprintf('%s%s', $this->projectDir, $rel[0], '/'.($rel[1] ?? '')); - } - } - - if (0 < $line) { - $text .= ' at line '.$line; - } - - if (false !== $link = $this->getFileLink($file, $line)) { - return sprintf('%s', $this->escape($link), $text); - } - - return $text; - } - - /** - * Returns an excerpt of a code file around the given line number. - * - * @param string $file A file path - * @param int $line The selected line number - * @param int $srcContext The number of displayed lines around or -1 for the whole file - */ - private function fileExcerpt(string $file, int $line, int $srcContext = 3): string - { - if (is_file($file) && is_readable($file)) { - // highlight_file could throw warnings - // see https://bugs.php.net/25725 - $code = @highlight_file($file, true); - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
)++[^<]*+)
#', function ($m) { - return "".str_replace('
', "

", $m[2]).''; - }, $code); - $content = explode('
', $code); - - $lines = []; - if (0 > $srcContext) { - $srcContext = \count($content); - } - - for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, \count($content)); $i <= $max; ++$i) { - $lines[] = ''.$this->fixCodeMarkup($content[$i - 1]).''; - } - - return '
    '.implode("\n", $lines).'
'; - } - - return ''; - } - - private function fixCodeMarkup(string $line) - { - // ending tag from previous line - $opening = strpos($line, ''); - if (false !== $closing && (false === $opening || $closing < $opening)) { - $line = substr_replace($line, '', $closing, 7); - } - - // missing tag at the end of line - $opening = strrpos($line, ''); - if (false !== $opening && (false === $closing || $closing < $opening)) { - $line .= ''; - } - - return trim($line); - } - - private function formatFileFromText(string $text) - { - return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { - return 'in '.$this->formatFile($match[2], $match[3]); - }, $text); - } - - private function formatLogMessage(string $message, array $context) - { - if ($context && false !== strpos($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (is_scalar($val)) { - $replacements['{'.$key.'}'] = $val; - } - } - - if ($replacements) { - $message = strtr($message, $replacements); - } - } - - return $this->escape($message); - } - - private function addElementToGhost(): string - { - if (!isset(self::GHOST_ADDONS[date('m-d')])) { - return ''; - } - - return ''; - } - - private function include(string $name, array $context = []): string - { - extract($context, \EXTR_SKIP); - ob_start(); - - include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; - - return trim(ob_get_clean()); - } - - /** - * Allows overriding the default non-debug template. - * - * @param string $template path to the custom template file to render - */ - public static function setTemplate(string $template): void - { - self::$template = $template; - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php deleted file mode 100644 index cec8e4d..0000000 --- a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Serializer\Exception\NotEncodableValueException; -use Symfony\Component\Serializer\SerializerInterface; - -/** - * Formats an exception using Serializer for rendering. - * - * @author Nicolas Grekas - */ -class SerializerErrorRenderer implements ErrorRendererInterface -{ - private $serializer; - private $format; - private $fallbackErrorRenderer; - private $debug; - - /** - * @param string|callable(FlattenException) $format The format as a string or a callable that should return it - * formats not supported by Request::getMimeTypes() should be given as mime types - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - */ - public function __construct(SerializerInterface $serializer, $format, ErrorRendererInterface $fallbackErrorRenderer = null, $debug = false) - { - if (!\is_string($format) && !\is_callable($format)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a string or a callable, "%s" given.', __METHOD__, \gettype($format))); - } - - if (!\is_bool($debug) && !\is_callable($debug)) { - throw new \TypeError(sprintf('Argument 4 passed to "%s()" must be a boolean or a callable, "%s" given.', __METHOD__, \gettype($debug))); - } - - $this->serializer = $serializer; - $this->format = $format; - $this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer(); - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - public function render(\Throwable $exception): FlattenException - { - $headers = []; - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - if ($debug) { - $headers['X-Debug-Exception'] = rawurlencode($exception->getMessage()); - $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); - } - - $flattenException = FlattenException::createFromThrowable($exception, null, $headers); - - try { - $format = \is_string($this->format) ? $this->format : ($this->format)($flattenException); - $headers = [ - 'Content-Type' => Request::getMimeTypes($format)[0] ?? $format, - 'Vary' => 'Accept', - ]; - - return $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ - 'exception' => $exception, - 'debug' => $debug, - ])) - ->setHeaders($flattenException->getHeaders() + $headers); - } catch (NotEncodableValueException $e) { - return $this->fallbackErrorRenderer->render($exception); - } - } - - public static function getPreferredFormat(RequestStack $requestStack): \Closure - { - return static function () use ($requestStack) { - if (!$request = $requestStack->getCurrentRequest()) { - throw new NotEncodableValueException(); - } - - return $request->getPreferredFormat(); - }; - } -} diff --git a/vendor/symfony/error-handler/Exception/FlattenException.php b/vendor/symfony/error-handler/Exception/FlattenException.php deleted file mode 100644 index 262dae6..0000000 --- a/vendor/symfony/error-handler/Exception/FlattenException.php +++ /dev/null @@ -1,427 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; - -/** - * FlattenException wraps a PHP Error or Exception to be able to serialize it. - * - * Basically, this class removes all objects from the trace. - * - * @author Fabien Potencier - */ -class FlattenException -{ - /** @var string */ - private $message; - - /** @var int|string */ - private $code; - - /** @var self|null */ - private $previous; - - /** @var array */ - private $trace; - - /** @var string */ - private $traceAsString; - - /** @var string */ - private $class; - - /** @var int */ - private $statusCode; - - /** @var string */ - private $statusText; - - /** @var array */ - private $headers; - - /** @var string */ - private $file; - - /** @var int */ - private $line; - - /** @var string|null */ - private $asString; - - /** - * @return static - */ - public static function create(\Exception $exception, int $statusCode = null, array $headers = []): self - { - return static::createFromThrowable($exception, $statusCode, $headers); - } - - /** - * @return static - */ - public static function createFromThrowable(\Throwable $exception, int $statusCode = null, array $headers = []): self - { - $e = new static(); - $e->setMessage($exception->getMessage()); - $e->setCode($exception->getCode()); - - if ($exception instanceof HttpExceptionInterface) { - $statusCode = $exception->getStatusCode(); - $headers = array_merge($headers, $exception->getHeaders()); - } elseif ($exception instanceof RequestExceptionInterface) { - $statusCode = 400; - } - - if (null === $statusCode) { - $statusCode = 500; - } - - if (class_exists(Response::class) && isset(Response::$statusTexts[$statusCode])) { - $statusText = Response::$statusTexts[$statusCode]; - } else { - $statusText = 'Whoops, looks like something went wrong.'; - } - - $e->setStatusText($statusText); - $e->setStatusCode($statusCode); - $e->setHeaders($headers); - $e->setTraceFromThrowable($exception); - $e->setClass(\get_class($exception)); - $e->setFile($exception->getFile()); - $e->setLine($exception->getLine()); - - $previous = $exception->getPrevious(); - - if ($previous instanceof \Throwable) { - $e->setPrevious(static::createFromThrowable($previous)); - } - - return $e; - } - - public function toArray(): array - { - $exceptions = []; - foreach (array_merge([$this], $this->getAllPrevious()) as $exception) { - $exceptions[] = [ - 'message' => $exception->getMessage(), - 'class' => $exception->getClass(), - 'trace' => $exception->getTrace(), - ]; - } - - return $exceptions; - } - - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * @return $this - */ - public function setStatusCode(int $code): self - { - $this->statusCode = $code; - - return $this; - } - - public function getHeaders(): array - { - return $this->headers; - } - - /** - * @return $this - */ - public function setHeaders(array $headers): self - { - $this->headers = $headers; - - return $this; - } - - public function getClass(): string - { - return $this->class; - } - - /** - * @return $this - */ - public function setClass(string $class): self - { - $this->class = false !== strpos($class, "@anonymous\0") ? (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous' : $class; - - return $this; - } - - public function getFile(): string - { - return $this->file; - } - - /** - * @return $this - */ - public function setFile(string $file): self - { - $this->file = $file; - - return $this; - } - - public function getLine(): int - { - return $this->line; - } - - /** - * @return $this - */ - public function setLine(int $line): self - { - $this->line = $line; - - return $this; - } - - public function getStatusText(): string - { - return $this->statusText; - } - - /** - * @return $this - */ - public function setStatusText(string $statusText): self - { - $this->statusText = $statusText; - - return $this; - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * @return $this - */ - public function setMessage(string $message): self - { - if (false !== strpos($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $message); - } - - $this->message = $message; - - return $this; - } - - /** - * @return int|string int most of the time (might be a string with PDOException) - */ - public function getCode() - { - return $this->code; - } - - /** - * @param int|string $code - * - * @return $this - */ - public function setCode($code): self - { - $this->code = $code; - - return $this; - } - - public function getPrevious(): ?self - { - return $this->previous; - } - - /** - * @return $this - */ - public function setPrevious(?self $previous): self - { - $this->previous = $previous; - - return $this; - } - - /** - * @return self[] - */ - public function getAllPrevious(): array - { - $exceptions = []; - $e = $this; - while ($e = $e->getPrevious()) { - $exceptions[] = $e; - } - - return $exceptions; - } - - public function getTrace(): array - { - return $this->trace; - } - - /** - * @return $this - */ - public function setTraceFromThrowable(\Throwable $throwable): self - { - $this->traceAsString = $throwable->getTraceAsString(); - - return $this->setTrace($throwable->getTrace(), $throwable->getFile(), $throwable->getLine()); - } - - /** - * @return $this - */ - public function setTrace(array $trace, ?string $file, ?int $line): self - { - $this->trace = []; - $this->trace[] = [ - 'namespace' => '', - 'short_class' => '', - 'class' => '', - 'type' => '', - 'function' => '', - 'file' => $file, - 'line' => $line, - 'args' => [], - ]; - foreach ($trace as $entry) { - $class = ''; - $namespace = ''; - if (isset($entry['class'])) { - $parts = explode('\\', $entry['class']); - $class = array_pop($parts); - $namespace = implode('\\', $parts); - } - - $this->trace[] = [ - 'namespace' => $namespace, - 'short_class' => $class, - 'class' => $entry['class'] ?? '', - 'type' => $entry['type'] ?? '', - 'function' => $entry['function'] ?? null, - 'file' => $entry['file'] ?? null, - 'line' => $entry['line'] ?? null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [], - ]; - } - - return $this; - } - - private function flattenArgs(array $args, int $level = 0, int &$count = 0): array - { - $result = []; - foreach ($args as $key => $value) { - if (++$count > 1e4) { - return ['array', '*SKIPPED over 10000 entries*']; - } - if ($value instanceof \__PHP_Incomplete_Class) { - $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)]; - } elseif (\is_object($value)) { - $result[$key] = ['object', \get_class($value)]; - } elseif (\is_array($value)) { - if ($level > 10) { - $result[$key] = ['array', '*DEEP NESTED ARRAY*']; - } else { - $result[$key] = ['array', $this->flattenArgs($value, $level + 1, $count)]; - } - } elseif (null === $value) { - $result[$key] = ['null', null]; - } elseif (\is_bool($value)) { - $result[$key] = ['boolean', $value]; - } elseif (\is_int($value)) { - $result[$key] = ['integer', $value]; - } elseif (\is_float($value)) { - $result[$key] = ['float', $value]; - } elseif (\is_resource($value)) { - $result[$key] = ['resource', get_resource_type($value)]; - } else { - $result[$key] = ['string', (string) $value]; - } - } - - return $result; - } - - private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value): string - { - $array = new \ArrayObject($value); - - return $array['__PHP_Incomplete_Class_Name']; - } - - public function getTraceAsString(): string - { - return $this->traceAsString; - } - - /** - * @return $this - */ - public function setAsString(?string $asString): self - { - $this->asString = $asString; - - return $this; - } - - public function getAsString(): string - { - if (null !== $this->asString) { - return $this->asString; - } - - $message = ''; - $next = false; - - foreach (array_reverse(array_merge([$this], $this->getAllPrevious())) as $exception) { - if ($next) { - $message .= 'Next '; - } else { - $next = true; - } - $message .= $exception->getClass(); - - if ('' != $exception->getMessage()) { - $message .= ': '.$exception->getMessage(); - } - - $message .= ' in '.$exception->getFile().':'.$exception->getLine(). - "\nStack trace:\n".$exception->getTraceAsString()."\n\n"; - } - - return rtrim($message); - } -} diff --git a/vendor/symfony/error-handler/Exception/SilencedErrorContext.php b/vendor/symfony/error-handler/Exception/SilencedErrorContext.php deleted file mode 100644 index 18defc7..0000000 --- a/vendor/symfony/error-handler/Exception/SilencedErrorContext.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -/** - * Data Object that represents a Silenced Error. - * - * @author Grégoire Pineau - */ -class SilencedErrorContext implements \JsonSerializable -{ - public $count = 1; - - private $severity; - private $file; - private $line; - private $trace; - - public function __construct(int $severity, string $file, int $line, array $trace = [], int $count = 1) - { - $this->severity = $severity; - $this->file = $file; - $this->line = $line; - $this->trace = $trace; - $this->count = $count; - } - - public function getSeverity(): int - { - return $this->severity; - } - - public function getFile(): string - { - return $this->file; - } - - public function getLine(): int - { - return $this->line; - } - - public function getTrace(): array - { - return $this->trace; - } - - public function jsonSerialize(): array - { - return [ - 'severity' => $this->severity, - 'file' => $this->file, - 'line' => $this->line, - 'trace' => $this->trace, - 'count' => $this->count, - ]; - } -} diff --git a/vendor/symfony/error-handler/Internal/TentativeTypes.php b/vendor/symfony/error-handler/Internal/TentativeTypes.php deleted file mode 100644 index 5707a83..0000000 --- a/vendor/symfony/error-handler/Internal/TentativeTypes.php +++ /dev/null @@ -1,1640 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Internal; - -/** - * This class has been generated by extract-tentative-return-types.php. - * - * @internal - */ -class TentativeTypes -{ - public const RETURN_TYPES = [ - 'CURLFile' => [ - 'getFilename' => 'string', - 'getMimeType' => 'string', - 'getPostFilename' => 'string', - 'setMimeType' => 'void', - 'setPostFilename' => 'void', - ], - 'DateTimeInterface' => [ - 'format' => 'string', - 'getTimezone' => 'DateTimeZone|false', - 'getOffset' => 'int', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - '__wakeup' => 'void', - ], - 'DateTime' => [ - '__wakeup' => 'void', - '__set_state' => 'DateTime', - 'createFromImmutable' => 'DateTime', - 'createFromFormat' => 'DateTime|false', - 'getLastErrors' => 'array|false', - 'format' => 'string', - 'modify' => 'DateTime|false', - 'add' => 'DateTime', - 'sub' => 'DateTime', - 'getTimezone' => 'DateTimeZone|false', - 'setTimezone' => 'DateTime', - 'getOffset' => 'int', - 'setTime' => 'DateTime', - 'setDate' => 'DateTime', - 'setISODate' => 'DateTime', - 'setTimestamp' => 'DateTime', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - ], - 'DateTimeImmutable' => [ - '__wakeup' => 'void', - '__set_state' => 'DateTimeImmutable', - 'createFromFormat' => 'DateTimeImmutable|false', - 'getLastErrors' => 'array|false', - 'format' => 'string', - 'getTimezone' => 'DateTimeZone|false', - 'getOffset' => 'int', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - 'modify' => 'DateTimeImmutable|false', - 'add' => 'DateTimeImmutable', - 'sub' => 'DateTimeImmutable', - 'setTimezone' => 'DateTimeImmutable', - 'setTime' => 'DateTimeImmutable', - 'setDate' => 'DateTimeImmutable', - 'setISODate' => 'DateTimeImmutable', - 'setTimestamp' => 'DateTimeImmutable', - 'createFromMutable' => 'DateTimeImmutable', - ], - 'DateTimeZone' => [ - 'getName' => 'string', - 'getOffset' => 'int', - 'getTransitions' => 'array|false', - 'getLocation' => 'array|false', - 'listAbbreviations' => 'array', - 'listIdentifiers' => 'array', - '__wakeup' => 'void', - '__set_state' => 'DateTimeZone', - ], - 'DateInterval' => [ - 'createFromDateString' => 'DateInterval|false', - 'format' => 'string', - '__wakeup' => 'void', - '__set_state' => 'DateInterval', - ], - 'DatePeriod' => [ - 'getStartDate' => 'DateTimeInterface', - 'getEndDate' => '?DateTimeInterface', - 'getDateInterval' => 'DateInterval', - 'getRecurrences' => '?int', - '__wakeup' => 'void', - '__set_state' => 'DatePeriod', - ], - 'DOMNode' => [ - 'C14N' => 'string|false', - 'C14NFile' => 'int|false', - 'getLineNo' => 'int', - 'getNodePath' => '?string', - 'hasAttributes' => 'bool', - 'hasChildNodes' => 'bool', - 'isDefaultNamespace' => 'bool', - 'isSameNode' => 'bool', - 'isSupported' => 'bool', - 'lookupNamespaceURI' => '?string', - 'lookupPrefix' => '?string', - 'normalize' => 'void', - ], - 'DOMImplementation' => [ - 'getFeature' => 'never', - 'hasFeature' => 'bool', - ], - 'DOMDocumentFragment' => [ - 'appendXML' => 'bool', - ], - 'DOMNodeList' => [ - 'count' => 'int', - ], - 'DOMCharacterData' => [ - 'appendData' => 'bool', - 'insertData' => 'bool', - 'deleteData' => 'bool', - 'replaceData' => 'bool', - ], - 'DOMAttr' => [ - 'isId' => 'bool', - ], - 'DOMElement' => [ - 'getAttribute' => 'string', - 'getAttributeNS' => 'string', - 'getElementsByTagName' => 'DOMNodeList', - 'getElementsByTagNameNS' => 'DOMNodeList', - 'hasAttribute' => 'bool', - 'hasAttributeNS' => 'bool', - 'removeAttribute' => 'bool', - 'removeAttributeNS' => 'void', - 'setAttributeNS' => 'void', - 'setIdAttribute' => 'void', - 'setIdAttributeNS' => 'void', - 'setIdAttributeNode' => 'void', - ], - 'DOMDocument' => [ - 'createComment' => 'DOMComment', - 'createDocumentFragment' => 'DOMDocumentFragment', - 'createTextNode' => 'DOMText', - 'getElementById' => '?DOMElement', - 'getElementsByTagName' => 'DOMNodeList', - 'getElementsByTagNameNS' => 'DOMNodeList', - 'normalizeDocument' => 'void', - 'registerNodeClass' => 'bool', - 'save' => 'int|false', - 'saveHTML' => 'string|false', - 'saveHTMLFile' => 'int|false', - 'saveXML' => 'string|false', - 'schemaValidate' => 'bool', - 'schemaValidateSource' => 'bool', - 'relaxNGValidate' => 'bool', - 'relaxNGValidateSource' => 'bool', - 'validate' => 'bool', - 'xinclude' => 'int|false', - ], - 'DOMText' => [ - 'isWhitespaceInElementContent' => 'bool', - 'isElementContentWhitespace' => 'bool', - ], - 'DOMNamedNodeMap' => [ - 'getNamedItem' => '?DOMNode', - 'getNamedItemNS' => '?DOMNode', - 'item' => '?DOMNode', - 'count' => 'int', - ], - 'DOMXPath' => [ - 'evaluate' => 'mixed', - 'query' => 'mixed', - 'registerNamespace' => 'bool', - 'registerPhpFunctions' => 'void', - ], - 'finfo' => [ - 'file' => 'string|false', - 'buffer' => 'string|false', - ], - 'IntlPartsIterator' => [ - 'getBreakIterator' => 'IntlBreakIterator', - 'getRuleStatus' => 'int', - ], - 'IntlBreakIterator' => [ - 'createCharacterInstance' => '?IntlBreakIterator', - 'createCodePointInstance' => 'IntlCodePointBreakIterator', - 'createLineInstance' => '?IntlBreakIterator', - 'createSentenceInstance' => '?IntlBreakIterator', - 'createTitleInstance' => '?IntlBreakIterator', - 'createWordInstance' => '?IntlBreakIterator', - 'current' => 'int', - 'first' => 'int', - 'following' => 'int', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - 'getLocale' => 'string|false', - 'getPartsIterator' => 'IntlPartsIterator', - 'getText' => '?string', - 'isBoundary' => 'bool', - 'last' => 'int', - 'next' => 'int', - 'preceding' => 'int', - 'previous' => 'int', - 'setText' => '?bool', - ], - 'IntlRuleBasedBreakIterator' => [ - 'getBinaryRules' => 'string|false', - 'getRules' => 'string|false', - 'getRuleStatus' => 'int', - 'getRuleStatusVec' => 'array|false', - ], - 'IntlCodePointBreakIterator' => [ - 'getLastCodePoint' => 'int', - ], - 'IntlCalendar' => [ - 'createInstance' => '?IntlCalendar', - 'equals' => 'bool', - 'fieldDifference' => 'int|false', - 'add' => 'bool', - 'after' => 'bool', - 'before' => 'bool', - 'fromDateTime' => '?IntlCalendar', - 'get' => 'int|false', - 'getActualMaximum' => 'int|false', - 'getActualMinimum' => 'int|false', - 'getAvailableLocales' => 'array', - 'getDayOfWeekType' => 'int|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getFirstDayOfWeek' => 'int|false', - 'getGreatestMinimum' => 'int|false', - 'getKeywordValuesForLocale' => 'IntlIterator|false', - 'getLeastMaximum' => 'int|false', - 'getLocale' => 'string|false', - 'getMaximum' => 'int|false', - 'getMinimalDaysInFirstWeek' => 'int|false', - 'getMinimum' => 'int|false', - 'getNow' => 'float', - 'getRepeatedWallTimeOption' => 'int', - 'getSkippedWallTimeOption' => 'int', - 'getTime' => 'float|false', - 'getTimeZone' => 'IntlTimeZone|false', - 'getType' => 'string', - 'getWeekendTransition' => 'int|false', - 'inDaylightTime' => 'bool', - 'isEquivalentTo' => 'bool', - 'isLenient' => 'bool', - 'isWeekend' => 'bool', - 'roll' => 'bool', - 'isSet' => 'bool', - 'setTime' => 'bool', - 'setTimeZone' => 'bool', - 'toDateTime' => 'DateTime|false', - ], - 'IntlGregorianCalendar' => [ - 'setGregorianChange' => 'bool', - 'getGregorianChange' => 'float', - 'isLeapYear' => 'bool', - ], - 'Collator' => [ - 'create' => '?Collator', - 'compare' => 'int|false', - 'sort' => 'bool', - 'sortWithSortKeys' => 'bool', - 'asort' => 'bool', - 'getAttribute' => 'int|false', - 'setAttribute' => 'bool', - 'getStrength' => 'int', - 'getLocale' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getSortKey' => 'string|false', - ], - 'IntlIterator' => [ - 'current' => 'mixed', - 'key' => 'mixed', - 'next' => 'void', - 'rewind' => 'void', - 'valid' => 'bool', - ], - 'UConverter' => [ - 'convert' => 'string|false', - 'fromUCallback' => 'string|int|array|null', - 'getAliases' => 'array|false|null', - 'getAvailable' => 'array', - 'getDestinationEncoding' => 'string|false|null', - 'getDestinationType' => 'int|false|null', - 'getErrorCode' => 'int', - 'getErrorMessage' => '?string', - 'getSourceEncoding' => 'string|false|null', - 'getSourceType' => 'int|false|null', - 'getStandards' => '?array', - 'getSubstChars' => 'string|false|null', - 'reasonText' => 'string', - 'setDestinationEncoding' => 'bool', - 'setSourceEncoding' => 'bool', - 'setSubstChars' => 'bool', - 'toUCallback' => 'string|int|array|null', - 'transcode' => 'string|false', - ], - 'IntlDateFormatter' => [ - 'create' => '?IntlDateFormatter', - 'getDateType' => 'int|false', - 'getTimeType' => 'int|false', - 'getCalendar' => 'int|false', - 'setCalendar' => 'bool', - 'getTimeZoneId' => 'string|false', - 'getCalendarObject' => 'IntlCalendar|false|null', - 'getTimeZone' => 'IntlTimeZone|false', - 'setTimeZone' => '?bool', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string|false', - 'setLenient' => 'void', - 'isLenient' => 'bool', - 'format' => 'string|false', - 'formatObject' => 'string|false', - 'parse' => 'int|float|false', - 'localtime' => 'array|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'NumberFormatter' => [ - 'create' => '?NumberFormatter', - 'format' => 'string|false', - 'parse' => 'int|float|false', - 'formatCurrency' => 'string|false', - 'parseCurrency' => 'float|false', - 'setAttribute' => 'bool', - 'getAttribute' => 'int|float|false', - 'setTextAttribute' => 'bool', - 'getTextAttribute' => 'string|false', - 'setSymbol' => 'bool', - 'getSymbol' => 'string|false', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Locale' => [ - 'getDefault' => 'string', - 'getPrimaryLanguage' => '?string', - 'getScript' => '?string', - 'getRegion' => '?string', - 'getKeywords' => 'array|false|null', - 'getDisplayScript' => 'string|false', - 'getDisplayRegion' => 'string|false', - 'getDisplayName' => 'string|false', - 'getDisplayLanguage' => 'string|false', - 'getDisplayVariant' => 'string|false', - 'composeLocale' => 'string|false', - 'parseLocale' => '?array', - 'getAllVariants' => '?array', - 'filterMatches' => '?bool', - 'lookup' => '?string', - 'canonicalize' => '?string', - 'acceptFromHttp' => 'string|false', - ], - 'MessageFormatter' => [ - 'create' => '?MessageFormatter', - 'format' => 'string|false', - 'formatMessage' => 'string|false', - 'parse' => 'array|false', - 'parseMessage' => 'array|false', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Normalizer' => [ - 'normalize' => 'string|false', - 'isNormalized' => 'bool', - 'getRawDecomposition' => '?string', - ], - 'ResourceBundle' => [ - 'create' => '?ResourceBundle', - 'get' => 'mixed', - 'count' => 'int', - 'getLocales' => 'array|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Spoofchecker' => [ - 'isSuspicious' => 'bool', - 'areConfusable' => 'bool', - 'setAllowedLocales' => 'void', - 'setChecks' => 'void', - 'setRestrictionLevel' => 'void', - ], - 'IntlTimeZone' => [ - 'countEquivalentIDs' => 'int|false', - 'createDefault' => 'IntlTimeZone', - 'createEnumeration' => 'IntlIterator|false', - 'createTimeZone' => '?IntlTimeZone', - 'createTimeZoneIDEnumeration' => 'IntlIterator|false', - 'fromDateTimeZone' => '?IntlTimeZone', - 'getCanonicalID' => 'string|false', - 'getDisplayName' => 'string|false', - 'getDSTSavings' => 'int', - 'getEquivalentID' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getGMT' => 'IntlTimeZone', - 'getID' => 'string|false', - 'getOffset' => 'bool', - 'getRawOffset' => 'int', - 'getRegion' => 'string|false', - 'getTZDataVersion' => 'string|false', - 'getUnknown' => 'IntlTimeZone', - 'getWindowsID' => 'string|false', - 'getIDForWindowsID' => 'string|false', - 'hasSameRules' => 'bool', - 'toDateTimeZone' => 'DateTimeZone|false', - 'useDaylightTime' => 'bool', - ], - 'Transliterator' => [ - 'create' => '?Transliterator', - 'createFromRules' => '?Transliterator', - 'createInverse' => '?Transliterator', - 'listIDs' => 'array|false', - 'transliterate' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - ], - 'IntlChar' => [ - 'hasBinaryProperty' => '?bool', - 'charAge' => '?array', - 'charDigitValue' => '?int', - 'charDirection' => '?int', - 'charFromName' => '?int', - 'charMirror' => 'int|string|null', - 'charName' => '?string', - 'charType' => '?int', - 'chr' => '?string', - 'digit' => 'int|false|null', - 'enumCharNames' => '?bool', - 'enumCharTypes' => 'void', - 'foldCase' => 'int|string|null', - 'forDigit' => 'int', - 'getBidiPairedBracket' => 'int|string|null', - 'getBlockCode' => '?int', - 'getCombiningClass' => '?int', - 'getFC_NFKC_Closure' => 'string|false|null', - 'getIntPropertyMaxValue' => 'int', - 'getIntPropertyMinValue' => 'int', - 'getIntPropertyValue' => '?int', - 'getNumericValue' => '?float', - 'getPropertyEnum' => 'int', - 'getPropertyName' => 'string|false', - 'getPropertyValueEnum' => 'int', - 'getPropertyValueName' => 'string|false', - 'getUnicodeVersion' => 'array', - 'isalnum' => '?bool', - 'isalpha' => '?bool', - 'isbase' => '?bool', - 'isblank' => '?bool', - 'iscntrl' => '?bool', - 'isdefined' => '?bool', - 'isdigit' => '?bool', - 'isgraph' => '?bool', - 'isIDIgnorable' => '?bool', - 'isIDPart' => '?bool', - 'isIDStart' => '?bool', - 'isISOControl' => '?bool', - 'isJavaIDPart' => '?bool', - 'isJavaIDStart' => '?bool', - 'isJavaSpaceChar' => '?bool', - 'islower' => '?bool', - 'isMirrored' => '?bool', - 'isprint' => '?bool', - 'ispunct' => '?bool', - 'isspace' => '?bool', - 'istitle' => '?bool', - 'isUAlphabetic' => '?bool', - 'isULowercase' => '?bool', - 'isupper' => '?bool', - 'isUUppercase' => '?bool', - 'isUWhiteSpace' => '?bool', - 'isWhitespace' => '?bool', - 'isxdigit' => '?bool', - 'ord' => '?int', - 'tolower' => 'int|string|null', - 'totitle' => 'int|string|null', - 'toupper' => 'int|string|null', - ], - 'JsonSerializable' => [ - 'jsonSerialize' => 'mixed', - ], - 'mysqli' => [ - 'autocommit' => 'bool', - 'begin_transaction' => 'bool', - 'change_user' => 'bool', - 'character_set_name' => 'string', - 'commit' => 'bool', - 'connect' => 'bool', - 'dump_debug_info' => 'bool', - 'get_charset' => '?object', - 'get_client_info' => 'string', - 'get_connection_stats' => 'array', - 'get_server_info' => 'string', - 'get_warnings' => 'mysqli_warning|false', - 'kill' => 'bool', - 'multi_query' => 'bool', - 'more_results' => 'bool', - 'next_result' => 'bool', - 'ping' => 'bool', - 'poll' => 'int|false', - 'prepare' => 'mysqli_stmt|false', - 'query' => 'mysqli_result|bool', - 'real_connect' => 'bool', - 'real_escape_string' => 'string', - 'reap_async_query' => 'mysqli_result|bool', - 'escape_string' => 'string', - 'real_query' => 'bool', - 'release_savepoint' => 'bool', - 'rollback' => 'bool', - 'savepoint' => 'bool', - 'select_db' => 'bool', - 'set_charset' => 'bool', - 'options' => 'bool', - 'set_opt' => 'bool', - 'stat' => 'string|false', - 'stmt_init' => 'mysqli_stmt|false', - 'store_result' => 'mysqli_result|false', - 'thread_safe' => 'bool', - 'use_result' => 'mysqli_result|false', - 'refresh' => 'bool', - ], - 'mysqli_result' => [ - 'close' => 'void', - 'free' => 'void', - 'data_seek' => 'bool', - 'fetch_field' => 'object|false', - 'fetch_fields' => 'array', - 'fetch_field_direct' => 'object|false', - 'fetch_all' => 'array', - 'fetch_array' => 'array|null|false', - 'fetch_assoc' => 'array|null|false', - 'fetch_object' => 'object|null|false', - 'fetch_row' => 'array|null|false', - 'field_seek' => 'bool', - 'free_result' => 'void', - ], - 'mysqli_stmt' => [ - 'attr_get' => 'int', - 'attr_set' => 'bool', - 'bind_param' => 'bool', - 'bind_result' => 'bool', - 'data_seek' => 'void', - 'execute' => 'bool', - 'fetch' => '?bool', - 'get_warnings' => 'mysqli_warning|false', - 'result_metadata' => 'mysqli_result|false', - 'more_results' => 'bool', - 'next_result' => 'bool', - 'num_rows' => 'int|string', - 'send_long_data' => 'bool', - 'free_result' => 'void', - 'reset' => 'bool', - 'prepare' => 'bool', - 'store_result' => 'bool', - 'get_result' => 'mysqli_result|false', - ], - 'OCILob' => [ - 'save' => 'bool', - 'import' => 'bool', - 'saveFile' => 'bool', - 'load' => 'string|false', - 'read' => 'string|false', - 'eof' => 'bool', - 'tell' => 'int|false', - 'rewind' => 'bool', - 'seek' => 'bool', - 'size' => 'int|false', - 'write' => 'int|false', - 'append' => 'bool', - 'truncate' => 'bool', - 'erase' => 'int|false', - 'flush' => 'bool', - 'setBuffering' => 'bool', - 'getBuffering' => 'bool', - 'writeToFile' => 'bool', - 'export' => 'bool', - 'writeTemporary' => 'bool', - 'close' => 'bool', - 'free' => 'bool', - ], - 'OCICollection' => [ - 'free' => 'bool', - 'append' => 'bool', - 'getElem' => 'string|float|null|false', - 'assign' => 'bool', - 'assignElem' => 'bool', - 'size' => 'int|false', - 'max' => 'int|false', - 'trim' => 'bool', - ], - 'PDO' => [ - 'beginTransaction' => 'bool', - 'commit' => 'bool', - 'errorCode' => '?string', - 'errorInfo' => 'array', - 'exec' => 'int|false', - 'getAttribute' => 'mixed', - 'getAvailableDrivers' => 'array', - 'inTransaction' => 'bool', - 'lastInsertId' => 'string|false', - 'prepare' => 'PDOStatement|false', - 'query' => 'PDOStatement|false', - 'quote' => 'string|false', - 'rollBack' => 'bool', - 'setAttribute' => 'bool', - ], - 'PDOStatement' => [ - 'bindColumn' => 'bool', - 'bindParam' => 'bool', - 'bindValue' => 'bool', - 'closeCursor' => 'bool', - 'columnCount' => 'int', - 'debugDumpParams' => '?bool', - 'errorCode' => '?string', - 'errorInfo' => 'array', - 'execute' => 'bool', - 'fetch' => 'mixed', - 'fetchAll' => 'array', - 'fetchColumn' => 'mixed', - 'fetchObject' => 'object|false', - 'getAttribute' => 'mixed', - 'getColumnMeta' => 'array|false', - 'nextRowset' => 'bool', - 'rowCount' => 'int', - 'setAttribute' => 'bool', - ], - 'PDO_PGSql_Ext' => [ - 'pgsqlCopyFromArray' => 'bool', - 'pgsqlCopyFromFile' => 'bool', - 'pgsqlCopyToArray' => 'array|false', - 'pgsqlCopyToFile' => 'bool', - 'pgsqlLOBCreate' => 'string|false', - 'pgsqlLOBUnlink' => 'bool', - 'pgsqlGetNotify' => 'array|false', - 'pgsqlGetPid' => 'int', - ], - 'PDO_SQLite_Ext' => [ - 'sqliteCreateFunction' => 'bool', - 'sqliteCreateAggregate' => 'bool', - 'sqliteCreateCollation' => 'bool', - ], - 'Phar' => [ - 'addEmptyDir' => 'void', - 'addFile' => 'void', - 'addFromString' => 'void', - 'buildFromDirectory' => 'array', - 'buildFromIterator' => 'array', - 'compressFiles' => 'void', - 'compress' => '?Phar', - 'decompress' => '?Phar', - 'convertToExecutable' => '?Phar', - 'convertToData' => '?PharData', - 'count' => 'int', - 'extractTo' => 'bool', - 'getAlias' => '?string', - 'getPath' => 'string', - 'getMetadata' => 'mixed', - 'getModified' => 'bool', - 'getSignature' => 'array|false', - 'getStub' => 'string', - 'getVersion' => 'string', - 'hasMetadata' => 'bool', - 'isBuffering' => 'bool', - 'isCompressed' => 'int|false', - 'isFileFormat' => 'bool', - 'isWritable' => 'bool', - 'offsetExists' => 'bool', - 'offsetGet' => 'SplFileInfo', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'setAlias' => 'bool', - 'setDefaultStub' => 'bool', - 'setMetadata' => 'void', - 'setSignatureAlgorithm' => 'void', - 'startBuffering' => 'void', - 'stopBuffering' => 'void', - ], - 'PharData' => [ - 'addEmptyDir' => 'void', - 'addFile' => 'void', - 'addFromString' => 'void', - 'buildFromDirectory' => 'array', - 'buildFromIterator' => 'array', - 'compressFiles' => 'void', - 'compress' => '?PharData', - 'decompress' => '?PharData', - 'convertToExecutable' => '?Phar', - 'convertToData' => '?PharData', - 'count' => 'int', - 'extractTo' => 'bool', - 'getAlias' => '?string', - 'getPath' => 'string', - 'getMetadata' => 'mixed', - 'getModified' => 'bool', - 'getSignature' => 'array|false', - 'getStub' => 'string', - 'getVersion' => 'string', - 'hasMetadata' => 'bool', - 'isBuffering' => 'bool', - 'isCompressed' => 'int|false', - 'isFileFormat' => 'bool', - 'isWritable' => 'bool', - 'offsetExists' => 'bool', - 'offsetGet' => 'SplFileInfo', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'setAlias' => 'bool', - 'setDefaultStub' => 'bool', - 'setMetadata' => 'void', - 'setSignatureAlgorithm' => 'void', - 'startBuffering' => 'void', - 'stopBuffering' => 'void', - ], - 'PharFileInfo' => [ - 'chmod' => 'void', - 'getCompressedSize' => 'int', - 'getCRC32' => 'int', - 'getContent' => 'string', - 'getMetadata' => 'mixed', - 'getPharFlags' => 'int', - 'hasMetadata' => 'bool', - 'isCompressed' => 'bool', - 'isCRCChecked' => 'bool', - 'setMetadata' => 'void', - ], - 'Reflection' => [ - 'getModifierNames' => 'array', - ], - 'ReflectionFunctionAbstract' => [ - 'inNamespace' => 'bool', - 'isClosure' => 'bool', - 'isDeprecated' => 'bool', - 'isInternal' => 'bool', - 'isUserDefined' => 'bool', - 'isGenerator' => 'bool', - 'isVariadic' => 'bool', - 'isStatic' => 'bool', - 'getClosureThis' => '?object', - 'getClosureScopeClass' => '?ReflectionClass', - 'getDocComment' => 'string|false', - 'getEndLine' => 'int|false', - 'getExtension' => '?ReflectionExtension', - 'getExtensionName' => 'string|false', - 'getFileName' => 'string|false', - 'getName' => 'string', - 'getNamespaceName' => 'string', - 'getNumberOfParameters' => 'int', - 'getNumberOfRequiredParameters' => 'int', - 'getParameters' => 'array', - 'getShortName' => 'string', - 'getStartLine' => 'int|false', - 'getStaticVariables' => 'array', - 'returnsReference' => 'bool', - 'hasReturnType' => 'bool', - 'getReturnType' => '?ReflectionType', - ], - 'ReflectionFunction' => [ - 'isDisabled' => 'bool', - 'invoke' => 'mixed', - 'invokeArgs' => 'mixed', - 'getClosure' => 'Closure', - 'getExecutingLine' => 'int', - 'getExecutingFile' => 'string', - 'getTrace' => 'array', - 'getFunction' => 'ReflectionFunctionAbstract', - 'getThis' => '?object', - 'getExecutingGenerator' => 'Generator', - ], - 'ReflectionMethod' => [ - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'isAbstract' => 'bool', - 'isFinal' => 'bool', - 'isConstructor' => 'bool', - 'isDestructor' => 'bool', - 'getClosure' => 'Closure', - 'getModifiers' => 'int', - 'invoke' => 'mixed', - 'invokeArgs' => 'mixed', - 'getDeclaringClass' => 'ReflectionClass', - 'getPrototype' => 'ReflectionMethod', - 'setAccessible' => 'void', - ], - 'ReflectionClass' => [ - 'getName' => 'string', - 'isInternal' => 'bool', - 'isUserDefined' => 'bool', - 'isAnonymous' => 'bool', - 'isInstantiable' => 'bool', - 'isCloneable' => 'bool', - 'getFileName' => 'string|false', - 'getStartLine' => 'int|false', - 'getEndLine' => 'int|false', - 'getDocComment' => 'string|false', - 'getConstructor' => '?ReflectionMethod', - 'hasMethod' => 'bool', - 'getMethod' => 'ReflectionMethod', - 'getMethods' => 'array', - 'hasProperty' => 'bool', - 'getProperty' => 'ReflectionProperty', - 'getProperties' => 'array', - 'hasConstant' => 'bool', - 'getConstants' => 'array', - 'getReflectionConstants' => 'array', - 'getConstant' => 'mixed', - 'getReflectionConstant' => 'ReflectionClassConstant|false', - 'getInterfaces' => 'array', - 'getInterfaceNames' => 'array', - 'isInterface' => 'bool', - 'getTraits' => 'array', - 'getTraitNames' => 'array', - 'getTraitAliases' => 'array', - 'isTrait' => 'bool', - 'isAbstract' => 'bool', - 'isFinal' => 'bool', - 'getModifiers' => 'int', - 'isInstance' => 'bool', - 'newInstance' => 'object', - 'newInstanceWithoutConstructor' => 'object', - 'newInstanceArgs' => '?object', - 'getParentClass' => 'ReflectionClass|false', - 'isSubclassOf' => 'bool', - 'getStaticProperties' => '?array', - 'getStaticPropertyValue' => 'mixed', - 'setStaticPropertyValue' => 'void', - 'getDefaultProperties' => 'array', - 'isIterable' => 'bool', - 'isIterateable' => 'bool', - 'implementsInterface' => 'bool', - 'getExtension' => '?ReflectionExtension', - 'getExtensionName' => 'string|false', - 'inNamespace' => 'bool', - 'getNamespaceName' => 'string', - 'getShortName' => 'string', - ], - 'ReflectionProperty' => [ - 'getName' => 'string', - 'getValue' => 'mixed', - 'setValue' => 'void', - 'isInitialized' => 'bool', - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'isStatic' => 'bool', - 'isDefault' => 'bool', - 'getModifiers' => 'int', - 'getDeclaringClass' => 'ReflectionClass', - 'getDocComment' => 'string|false', - 'setAccessible' => 'void', - 'getType' => '?ReflectionType', - 'hasType' => 'bool', - 'getDefaultValue' => 'mixed', - ], - 'ReflectionClassConstant' => [ - 'getName' => 'string', - 'getValue' => 'mixed', - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'getModifiers' => 'int', - 'getDeclaringClass' => 'ReflectionClass', - 'getDocComment' => 'string|false', - ], - 'ReflectionParameter' => [ - 'getName' => 'string', - 'isPassedByReference' => 'bool', - 'canBePassedByValue' => 'bool', - 'getDeclaringFunction' => 'ReflectionFunctionAbstract', - 'getDeclaringClass' => '?ReflectionClass', - 'getClass' => '?ReflectionClass', - 'hasType' => 'bool', - 'getType' => '?ReflectionType', - 'isArray' => 'bool', - 'isCallable' => 'bool', - 'allowsNull' => 'bool', - 'getPosition' => 'int', - 'isOptional' => 'bool', - 'isDefaultValueAvailable' => 'bool', - 'getDefaultValue' => 'mixed', - 'isDefaultValueConstant' => 'bool', - 'getDefaultValueConstantName' => '?string', - 'isVariadic' => 'bool', - ], - 'ReflectionType' => [ - 'allowsNull' => 'bool', - ], - 'ReflectionNamedType' => [ - 'getName' => 'string', - 'isBuiltin' => 'bool', - ], - 'ReflectionExtension' => [ - 'getName' => 'string', - 'getVersion' => '?string', - 'getFunctions' => 'array', - 'getConstants' => 'array', - 'getINIEntries' => 'array', - 'getClasses' => 'array', - 'getClassNames' => 'array', - 'getDependencies' => 'array', - 'info' => 'void', - 'isPersistent' => 'bool', - 'isTemporary' => 'bool', - ], - 'ReflectionZendExtension' => [ - 'getName' => 'string', - 'getVersion' => 'string', - 'getAuthor' => 'string', - 'getURL' => 'string', - 'getCopyright' => 'string', - ], - 'SessionHandlerInterface' => [ - 'open' => 'bool', - 'close' => 'bool', - 'read' => 'string|false', - 'write' => 'bool', - 'destroy' => 'bool', - 'gc' => 'int|false', - ], - 'SessionIdInterface' => [ - 'create_sid' => 'string', - ], - 'SessionUpdateTimestampHandlerInterface' => [ - 'validateId' => 'bool', - 'updateTimestamp' => 'bool', - ], - 'SessionHandler' => [ - 'open' => 'bool', - 'close' => 'bool', - 'read' => 'string|false', - 'write' => 'bool', - 'destroy' => 'bool', - 'gc' => 'int|false', - 'create_sid' => 'string', - ], - 'SimpleXMLElement' => [ - 'xpath' => 'array|null|false', - 'registerXPathNamespace' => 'bool', - 'asXML' => 'string|bool', - 'saveXML' => 'string|bool', - 'getNamespaces' => 'array', - 'getDocNamespaces' => 'array|false', - 'children' => '?SimpleXMLElement', - 'attributes' => '?SimpleXMLElement', - 'addChild' => '?SimpleXMLElement', - 'addAttribute' => 'void', - 'getName' => 'string', - 'count' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'current' => 'SimpleXMLElement', - 'key' => 'string', - 'next' => 'void', - 'hasChildren' => 'bool', - 'getChildren' => '?SimpleXMLElement', - ], - 'SNMP' => [ - 'close' => 'bool', - 'setSecurity' => 'bool', - 'get' => 'mixed', - 'getnext' => 'mixed', - 'walk' => 'array|false', - 'set' => 'bool', - 'getErrno' => 'int', - 'getError' => 'string', - ], - 'SoapServer' => [ - 'fault' => 'void', - 'addSoapHeader' => 'void', - 'setPersistence' => 'void', - 'setClass' => 'void', - 'setObject' => 'void', - 'getFunctions' => 'array', - 'addFunction' => 'void', - 'handle' => 'void', - ], - 'SoapClient' => [ - '__call' => 'mixed', - '__soapCall' => 'mixed', - '__getFunctions' => '?array', - '__getTypes' => '?array', - '__getLastRequest' => '?string', - '__getLastResponse' => '?string', - '__getLastRequestHeaders' => '?string', - '__getLastResponseHeaders' => '?string', - '__doRequest' => '?string', - '__setCookie' => 'void', - '__getCookies' => 'array', - '__setSoapHeaders' => 'bool', - '__setLocation' => '?string', - ], - 'ArrayObject' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'append' => 'void', - 'getArrayCopy' => 'array', - 'count' => 'int', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'asort' => 'bool', - 'ksort' => 'bool', - 'uasort' => 'bool', - 'uksort' => 'bool', - 'natsort' => 'bool', - 'natcasesort' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - 'getIterator' => 'Iterator', - 'exchangeArray' => 'array', - 'setIteratorClass' => 'void', - 'getIteratorClass' => 'string', - '__debugInfo' => 'array', - ], - 'ArrayIterator' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'append' => 'void', - 'getArrayCopy' => 'array', - 'count' => 'int', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'asort' => 'bool', - 'ksort' => 'bool', - 'uasort' => 'bool', - 'uksort' => 'bool', - 'natsort' => 'bool', - 'natcasesort' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'string|int|null', - 'next' => 'void', - 'valid' => 'bool', - 'seek' => 'void', - '__debugInfo' => 'array', - ], - 'RecursiveArrayIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveArrayIterator', - ], - 'SplFileInfo' => [ - 'getPath' => 'string', - 'getFilename' => 'string', - 'getExtension' => 'string', - 'getBasename' => 'string', - 'getPathname' => 'string', - 'getPerms' => 'int|false', - 'getInode' => 'int|false', - 'getSize' => 'int|false', - 'getOwner' => 'int|false', - 'getGroup' => 'int|false', - 'getATime' => 'int|false', - 'getMTime' => 'int|false', - 'getCTime' => 'int|false', - 'getType' => 'string|false', - 'isWritable' => 'bool', - 'isReadable' => 'bool', - 'isExecutable' => 'bool', - 'isFile' => 'bool', - 'isDir' => 'bool', - 'isLink' => 'bool', - 'getLinkTarget' => 'string|false', - 'getRealPath' => 'string|false', - 'getFileInfo' => 'SplFileInfo', - 'getPathInfo' => '?SplFileInfo', - 'openFile' => 'SplFileObject', - 'setFileClass' => 'void', - 'setInfoClass' => 'void', - '__debugInfo' => 'array', - '_bad_state_ex' => 'void', - ], - 'DirectoryIterator' => [ - 'getFilename' => 'string', - 'getExtension' => 'string', - 'getBasename' => 'string', - 'isDot' => 'bool', - 'rewind' => 'void', - 'valid' => 'bool', - 'next' => 'void', - 'seek' => 'void', - ], - 'FilesystemIterator' => [ - 'rewind' => 'void', - 'key' => 'string', - 'current' => 'string|SplFileInfo|FilesystemIterator', - 'getFlags' => 'int', - 'setFlags' => 'void', - ], - 'RecursiveDirectoryIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveDirectoryIterator', - 'getSubPath' => 'string', - 'getSubPathname' => 'string', - ], - 'GlobIterator' => [ - 'count' => 'int', - ], - 'SplFileObject' => [ - 'rewind' => 'void', - 'eof' => 'bool', - 'valid' => 'bool', - 'fgets' => 'string', - 'fread' => 'string|false', - 'fgetcsv' => 'array|false', - 'fputcsv' => 'int|false', - 'setCsvControl' => 'void', - 'getCsvControl' => 'array', - 'flock' => 'bool', - 'fflush' => 'bool', - 'ftell' => 'int|false', - 'fseek' => 'int', - 'fgetc' => 'string|false', - 'fpassthru' => 'int', - 'fscanf' => 'array|int|null', - 'fwrite' => 'int|false', - 'fstat' => 'array', - 'ftruncate' => 'bool', - 'current' => 'string|array|false', - 'key' => 'int', - 'next' => 'void', - 'setFlags' => 'void', - 'getFlags' => 'int', - 'setMaxLineLen' => 'void', - 'getMaxLineLen' => 'int', - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveIterator', - 'seek' => 'void', - 'getCurrentLine' => 'string', - ], - 'SplDoublyLinkedList' => [ - 'add' => 'void', - 'pop' => 'mixed', - 'shift' => 'mixed', - 'push' => 'void', - 'unshift' => 'void', - 'top' => 'mixed', - 'bottom' => 'mixed', - '__debugInfo' => 'array', - 'count' => 'int', - 'isEmpty' => 'bool', - 'setIteratorMode' => 'int', - 'getIteratorMode' => 'int', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'prev' => 'void', - 'next' => 'void', - 'valid' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - ], - 'SplQueue' => [ - 'enqueue' => 'void', - 'dequeue' => 'mixed', - ], - 'SplFixedArray' => [ - '__wakeup' => 'void', - 'count' => 'int', - 'toArray' => 'array', - 'fromArray' => 'SplFixedArray', - 'getSize' => 'int', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - ], - 'SplPriorityQueue' => [ - 'compare' => 'int', - 'setExtractFlags' => 'int', - 'top' => 'mixed', - 'extract' => 'mixed', - 'count' => 'int', - 'isEmpty' => 'bool', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'next' => 'void', - 'valid' => 'bool', - 'isCorrupted' => 'bool', - 'getExtractFlags' => 'int', - '__debugInfo' => 'array', - ], - 'SplHeap' => [ - 'extract' => 'mixed', - 'insert' => 'bool', - 'top' => 'mixed', - 'count' => 'int', - 'isEmpty' => 'bool', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'next' => 'void', - 'valid' => 'bool', - 'recoverFromCorruption' => 'bool', - 'compare' => 'int', - 'isCorrupted' => 'bool', - '__debugInfo' => 'array', - ], - 'SplMinHeap' => [ - 'compare' => 'int', - ], - 'SplMaxHeap' => [ - 'compare' => 'int', - ], - 'EmptyIterator' => [ - 'current' => 'never', - 'next' => 'void', - 'key' => 'never', - 'valid' => 'bool', - 'rewind' => 'void', - ], - 'CallbackFilterIterator' => [ - 'accept' => 'bool', - ], - 'RecursiveCallbackFilterIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveCallbackFilterIterator', - ], - 'RecursiveIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveIterator', - ], - 'RecursiveIteratorIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - 'getDepth' => 'int', - 'getSubIterator' => '?RecursiveIterator', - 'getInnerIterator' => 'RecursiveIterator', - 'beginIteration' => 'void', - 'endIteration' => 'void', - 'callHasChildren' => 'bool', - 'callGetChildren' => '?RecursiveIterator', - 'beginChildren' => 'void', - 'endChildren' => 'void', - 'nextElement' => 'void', - 'setMaxDepth' => 'void', - 'getMaxDepth' => 'int|false', - ], - 'OuterIterator' => [ - 'getInnerIterator' => '?Iterator', - ], - 'IteratorIterator' => [ - 'getInnerIterator' => '?Iterator', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - ], - 'FilterIterator' => [ - 'accept' => 'bool', - 'rewind' => 'void', - 'next' => 'void', - ], - 'RecursiveFilterIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveFilterIterator', - ], - 'ParentIterator' => [ - 'accept' => 'bool', - ], - 'SeekableIterator' => [ - 'seek' => 'void', - ], - 'LimitIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'next' => 'void', - 'seek' => 'int', - 'getPosition' => 'int', - ], - 'CachingIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'next' => 'void', - 'hasNext' => 'bool', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'offsetExists' => 'bool', - 'getCache' => 'array', - 'count' => 'int', - ], - 'RecursiveCachingIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveCachingIterator', - ], - 'NoRewindIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - ], - 'AppendIterator' => [ - 'append' => 'void', - 'rewind' => 'void', - 'valid' => 'bool', - 'current' => 'mixed', - 'next' => 'void', - 'getIteratorIndex' => '?int', - 'getArrayIterator' => 'ArrayIterator', - ], - 'InfiniteIterator' => [ - 'next' => 'void', - ], - 'RegexIterator' => [ - 'accept' => 'bool', - 'getMode' => 'int', - 'setMode' => 'void', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'getRegex' => 'string', - 'getPregFlags' => 'int', - 'setPregFlags' => 'void', - ], - 'RecursiveRegexIterator' => [ - 'accept' => 'bool', - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveRegexIterator', - ], - 'RecursiveTreeIterator' => [ - 'key' => 'mixed', - 'current' => 'mixed', - 'getPrefix' => 'string', - 'setPostfix' => 'void', - 'setPrefixPart' => 'void', - 'getEntry' => 'string', - 'getPostfix' => 'string', - ], - 'SplObserver' => [ - 'update' => 'void', - ], - 'SplSubject' => [ - 'attach' => 'void', - 'detach' => 'void', - 'notify' => 'void', - ], - 'SplObjectStorage' => [ - 'attach' => 'void', - 'detach' => 'void', - 'contains' => 'bool', - 'addAll' => 'int', - 'removeAll' => 'int', - 'removeAllExcept' => 'int', - 'getInfo' => 'mixed', - 'setInfo' => 'void', - 'count' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'int', - 'current' => 'object', - 'next' => 'void', - 'unserialize' => 'void', - 'serialize' => 'string', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'getHash' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - '__debugInfo' => 'array', - ], - 'MultipleIterator' => [ - 'getFlags' => 'int', - 'setFlags' => 'void', - 'attachIterator' => 'void', - 'detachIterator' => 'void', - 'containsIterator' => 'bool', - 'countIterators' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'array', - 'current' => 'array', - 'next' => 'void', - '__debugInfo' => 'array', - ], - 'SQLite3' => [ - 'open' => 'void', - 'version' => 'array', - 'lastInsertRowID' => 'int', - 'lastErrorCode' => 'int', - 'lastExtendedErrorCode' => 'int', - 'lastErrorMsg' => 'string', - 'changes' => 'int', - 'busyTimeout' => 'bool', - 'loadExtension' => 'bool', - 'backup' => 'bool', - 'escapeString' => 'string', - 'prepare' => 'SQLite3Stmt|false', - 'exec' => 'bool', - 'query' => 'SQLite3Result|false', - 'querySingle' => 'mixed', - 'createFunction' => 'bool', - 'createAggregate' => 'bool', - 'createCollation' => 'bool', - 'enableExceptions' => 'bool', - 'enableExtendedResultCodes' => 'bool', - 'setAuthorizer' => 'bool', - ], - 'SQLite3Stmt' => [ - 'bindParam' => 'bool', - 'bindValue' => 'bool', - 'clear' => 'bool', - 'close' => 'bool', - 'execute' => 'SQLite3Result|false', - 'getSQL' => 'string|false', - 'paramCount' => 'int', - 'readOnly' => 'bool', - 'reset' => 'bool', - ], - 'SQLite3Result' => [ - 'numColumns' => 'int', - 'columnName' => 'string|false', - 'columnType' => 'int|false', - 'fetchArray' => 'array|false', - 'reset' => 'bool', - ], - 'Directory' => [ - 'close' => 'void', - 'rewind' => 'void', - 'read' => 'string|false', - ], - 'php_user_filter' => [ - 'filter' => 'int', - 'onCreate' => 'bool', - 'onClose' => 'void', - ], - 'tidy' => [ - 'getOpt' => 'string|int|bool', - 'cleanRepair' => 'bool', - 'parseFile' => 'bool', - 'parseString' => 'bool', - 'repairString' => 'string|false', - 'repairFile' => 'string|false', - 'diagnose' => 'bool', - 'getRelease' => 'string', - 'getConfig' => 'array', - 'getStatus' => 'int', - 'getHtmlVer' => 'int', - 'getOptDoc' => 'string|false', - 'isXhtml' => 'bool', - 'isXml' => 'bool', - 'root' => '?tidyNode', - 'head' => '?tidyNode', - 'html' => '?tidyNode', - 'body' => '?tidyNode', - ], - 'XMLReader' => [ - 'getAttribute' => '?string', - 'getAttributeNo' => '?string', - 'getAttributeNs' => '?string', - 'getParserProperty' => 'bool', - 'isValid' => 'bool', - 'lookupNamespace' => '?string', - 'moveToAttribute' => 'bool', - 'moveToAttributeNo' => 'bool', - 'moveToAttributeNs' => 'bool', - 'moveToElement' => 'bool', - 'moveToFirstAttribute' => 'bool', - 'moveToNextAttribute' => 'bool', - 'read' => 'bool', - 'next' => 'bool', - 'readInnerXml' => 'string', - 'readOuterXml' => 'string', - 'readString' => 'string', - 'setSchema' => 'bool', - 'setParserProperty' => 'bool', - 'setRelaxNGSchema' => 'bool', - 'setRelaxNGSchemaSource' => 'bool', - 'expand' => 'DOMNode|false', - ], - 'XMLWriter' => [ - 'openUri' => 'bool', - 'openMemory' => 'bool', - 'setIndent' => 'bool', - 'setIndentString' => 'bool', - 'startComment' => 'bool', - 'endComment' => 'bool', - 'startAttribute' => 'bool', - 'endAttribute' => 'bool', - 'writeAttribute' => 'bool', - 'startAttributeNs' => 'bool', - 'writeAttributeNs' => 'bool', - 'startElement' => 'bool', - 'endElement' => 'bool', - 'fullEndElement' => 'bool', - 'startElementNs' => 'bool', - 'writeElement' => 'bool', - 'writeElementNs' => 'bool', - 'startPi' => 'bool', - 'endPi' => 'bool', - 'writePi' => 'bool', - 'startCdata' => 'bool', - 'endCdata' => 'bool', - 'writeCdata' => 'bool', - 'text' => 'bool', - 'writeRaw' => 'bool', - 'startDocument' => 'bool', - 'endDocument' => 'bool', - 'writeComment' => 'bool', - 'startDtd' => 'bool', - 'endDtd' => 'bool', - 'writeDtd' => 'bool', - 'startDtdElement' => 'bool', - 'endDtdElement' => 'bool', - 'writeDtdElement' => 'bool', - 'startDtdAttlist' => 'bool', - 'endDtdAttlist' => 'bool', - 'writeDtdAttlist' => 'bool', - 'startDtdEntity' => 'bool', - 'endDtdEntity' => 'bool', - 'writeDtdEntity' => 'bool', - 'outputMemory' => 'string', - 'flush' => 'string|int', - ], - 'XSLTProcessor' => [ - 'importStylesheet' => 'bool', - 'transformToDoc' => 'DOMDocument|false', - 'transformToUri' => 'int', - 'transformToXml' => 'string|null|false', - 'setParameter' => 'bool', - 'getParameter' => 'string|false', - 'removeParameter' => 'bool', - 'hasExsltSupport' => 'bool', - 'registerPHPFunctions' => 'void', - 'setSecurityPrefs' => 'int', - 'getSecurityPrefs' => 'int', - ], - 'ZipArchive' => [ - 'open' => 'bool|int', - 'setPassword' => 'bool', - 'close' => 'bool', - 'count' => 'int', - 'getStatusString' => 'string', - 'addEmptyDir' => 'bool', - 'addFromString' => 'bool', - 'addFile' => 'bool', - 'replaceFile' => 'bool', - 'addGlob' => 'array|false', - 'addPattern' => 'array|false', - 'renameIndex' => 'bool', - 'renameName' => 'bool', - 'setArchiveComment' => 'bool', - 'getArchiveComment' => 'string|false', - 'setCommentIndex' => 'bool', - 'setCommentName' => 'bool', - 'setMtimeIndex' => 'bool', - 'setMtimeName' => 'bool', - 'getCommentIndex' => 'string|false', - 'getCommentName' => 'string|false', - 'deleteIndex' => 'bool', - 'deleteName' => 'bool', - 'statName' => 'array|false', - 'statIndex' => 'array|false', - 'locateName' => 'int|false', - 'getNameIndex' => 'string|false', - 'unchangeArchive' => 'bool', - 'unchangeAll' => 'bool', - 'unchangeIndex' => 'bool', - 'unchangeName' => 'bool', - 'extractTo' => 'bool', - 'getFromName' => 'string|false', - 'getFromIndex' => 'string|false', - 'setExternalAttributesName' => 'bool', - 'setExternalAttributesIndex' => 'bool', - 'getExternalAttributesName' => 'bool', - 'getExternalAttributesIndex' => 'bool', - 'setCompressionName' => 'bool', - 'setCompressionIndex' => 'bool', - 'setEncryptionName' => 'bool', - 'setEncryptionIndex' => 'bool', - 'registerProgressCallback' => 'bool', - 'registerCancelCallback' => 'bool', - ], - 'Exception' => [ - '__wakeup' => 'void', - ], - 'Error' => [ - '__wakeup' => 'void', - ], - 'IteratorAggregate' => [ - 'getIterator' => 'Traversable', - ], - 'Iterator' => [ - 'current' => 'mixed', - 'next' => 'void', - 'key' => 'mixed', - 'valid' => 'bool', - 'rewind' => 'void', - ], - 'ArrayAccess' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - ], - 'Countable' => [ - 'count' => 'int', - ], - ]; -} diff --git a/vendor/symfony/error-handler/LICENSE b/vendor/symfony/error-handler/LICENSE deleted file mode 100644 index 9c907a4..0000000 --- a/vendor/symfony/error-handler/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/error-handler/README.md b/vendor/symfony/error-handler/README.md deleted file mode 100644 index 12c0bfa..0000000 --- a/vendor/symfony/error-handler/README.md +++ /dev/null @@ -1,44 +0,0 @@ -ErrorHandler Component -====================== - -The ErrorHandler component provides tools to manage errors and ease debugging PHP code. - -Getting Started ---------------- - -``` -$ composer require symfony/error-handler -``` - -```php -use Symfony\Component\ErrorHandler\Debug; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\ErrorHandler\DebugClassLoader; - -Debug::enable(); - -// or enable only one feature -//ErrorHandler::register(); -//DebugClassLoader::enable(); - -// If you want a custom generic template when debug is not enabled -// HtmlErrorRenderer::setTemplate('/path/to/custom/error.html.php'); - -$data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) { - // if any code executed inside this anonymous function fails, a PHP exception - // will be thrown, even if the code uses the '@' PHP silence operator - $data = json_decode(file_get_contents($filename), true); - $data['read_at'] = date($datetimeFormat); - file_put_contents($filename, json_encode($data)); - - return $data; -}); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/error-handler/Resources/assets/css/error.css b/vendor/symfony/error-handler/Resources/assets/css/error.css deleted file mode 100644 index 332d818..0000000 --- a/vendor/symfony/error-handler/Resources/assets/css/error.css +++ /dev/null @@ -1,4 +0,0 @@ -body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; } -.container { margin: 30px; max-width: 600px; } -h1 { color: #dc3545; font-size: 24px; } -h2 { font-size: 18px; } diff --git a/vendor/symfony/error-handler/Resources/assets/css/exception.css b/vendor/symfony/error-handler/Resources/assets/css/exception.css deleted file mode 100644 index 7cb3206..0000000 --- a/vendor/symfony/error-handler/Resources/assets/css/exception.css +++ /dev/null @@ -1,252 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/profiler.css.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -:root { - --font-sans-serif: Helvetica, Arial, sans-serif; - --page-background: #f9f9f9; - --color-text: #222; - /* when updating any of these colors, do the same in toolbar.css.twig */ - --color-success: #4f805d; - --color-warning: #a46a1f; - --color-error: #b0413e; - --color-muted: #999; - --tab-background: #fff; - --tab-color: #444; - --tab-active-background: #666; - --tab-active-color: #fafafa; - --tab-disabled-background: #f5f5f5; - --tab-disabled-color: #999; - --metric-value-background: #fff; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #e0e0e0; - --metric-label-color: inherit; - --table-border: #e0e0e0; - --table-background: #fff; - --table-header: #e0e0e0; - --trace-selected-background: #F7E5A1; - --tree-active-background: #F7E5A1; - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(128, 128, 128, .2); - --border: 1px solid #e0e0e0; - --background-error: var(--color-error); - --highlight-comment: #969896; - --highlight-default: #222222; - --highlight-keyword: #a71d5d; - --highlight-string: #183691; - --base-0: #fff; - --base-1: #f5f5f5; - --base-2: #e0e0e0; - --base-3: #ccc; - --base-4: #666; - --base-5: #444; - --base-6: #222; -} - -.theme-dark { - --page-background: #36393e; - --color-text: #e0e0e0; - --color-muted: #777; - --color-error: #d43934; - --tab-background: #555; - --tab-color: #ccc; - --tab-active-background: #888; - --tab-active-color: #fafafa; - --tab-disabled-background: var(--page-background); - --tab-disabled-color: #777; - --metric-value-background: #555; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #777; - --metric-label-color: #e0e0e0; - --trace-selected-background: #71663acc; - --table-border: #444; - --table-background: #333; - --table-header: #555; - --info-background: rgba(79, 148, 195, 0.5); - --tree-active-background: var(--metric-label-background); - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(32, 32, 32, .2); - --border: 1px solid #666; - --background-error: #b0413e; - --highlight-comment: #dedede; - --highlight-default: var(--base-6); - --highlight-keyword: #ff413c; - --highlight-string: #70a6fd; - --base-0: #2e3136; - --base-1: #444; - --base-2: #666; - --base-3: #666; - --base-4: #666; - --base-5: #e0e0e0; - --base-6: #f5f5f5; - --card-label-background: var(--tab-active-background); - --card-label-color: var(--tab-active-color); -} - -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} - -html { - /* always display the vertical scrollbar to avoid jumps when toggling contents */ - overflow-y: scroll; -} -body { background-color: var(--page-background); color: var(--base-6); font: 14px/1.4 Helvetica, Arial, sans-serif; padding-bottom: 45px; } - -a { cursor: pointer; text-decoration: none; } -a:hover { text-decoration: underline; } -abbr[title] { border-bottom: none; cursor: help; text-decoration: none; } - -code, pre { font: 13px/1.5 Consolas, Monaco, Menlo, "Ubuntu Mono", "Liberation Mono", monospace; } - -table, tr, th, td { background: var(--base-0); border-collapse: collapse; vertical-align: top; } -table { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 1em 0; width: 100%; } -table th, table td { border: solid var(--base-2); border-width: 1px 0; padding: 8px 10px; } -table th { background-color: var(--base-2); font-weight: bold; text-align: left; } - -.m-t-5 { margin-top: 5px; } -.hidden-xs-down { display: none; } -.block { display: block; } -.full-width { width: 100%; } -.hidden { display: none; } -.prewrap { white-space: pre-wrap; } -.nowrap { white-space: nowrap; } -.newline { display: block; } -.break-long-words { word-wrap: break-word; overflow-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; min-width: 0; } -.text-small { font-size: 12px !important; } -.text-muted { color: #999; } -.text-bold { font-weight: bold; } -.empty { border: 4px dashed var(--base-2); color: #999; margin: 1em 0; padding: .5em 2em; } - -.status-success { background: rgba(94, 151, 110, 0.3); } -.status-warning { background: rgba(240, 181, 24, 0.3); } -.status-error { background: rgba(176, 65, 62, 0.2); } -.status-success td, .status-warning td, .status-error td { background: transparent; } -tr.status-error td, tr.status-warning td { border-bottom: 1px solid var(--base-2); border-top: 1px solid var(--base-2); } -.status-warning .colored { color: #A46A1F; } -.status-error .colored { color: var(--color-error); } - -.sf-toggle { cursor: pointer; position: relative; } -.sf-toggle-content { -moz-transition: display .25s ease; -webkit-transition: display .25s ease; transition: display .25s ease; } -.sf-toggle-content.sf-toggle-hidden { display: none; } -.sf-toggle-content.sf-toggle-visible { display: block; } -thead.sf-toggle-content.sf-toggle-visible, tbody.sf-toggle-content.sf-toggle-visible { display: table-row-group; } -.sf-toggle-off .icon-close, .sf-toggle-on .icon-open { display: none; } -.sf-toggle-off .icon-open, .sf-toggle-on .icon-close { display: block; } - -.tab-navigation { margin: 0 0 1em 0; padding: 0; } -.tab-navigation li { background: var(--tab-background); border: 1px solid var(--table-border); color: var(--tab-color); cursor: pointer; display: inline-block; font-size: 16px; margin: 0 0 0 -1px; padding: .5em .75em; z-index: 1; } -.tab-navigation li .badge { background-color: var(--base-1); color: var(--base-4); display: inline-block; font-size: 14px; font-weight: bold; margin-left: 8px; min-width: 10px; padding: 1px 6px; text-align: center; white-space: nowrap; } -.tab-navigation li.disabled { background: var(--tab-disabled-background); color: var(--tab-disabled-color); } -.tab-navigation li.active { background: var(--tab-active-background); color: var(--tab-active-color); z-index: 1100; } -.tab-navigation li.active .badge { background-color: var(--base-5); color: var(--base-2); } -.tab-content > *:first-child { margin-top: 0; } -.tab-navigation li .badge.status-warning { background: var(--color-warning); color: #FFF; } -.tab-navigation li .badge.status-error { background: var(--background-error); color: #FFF; } -.sf-tabs .tab:not(:first-child) { display: none; } - -[data-filters] { position: relative; } -[data-filtered] { cursor: pointer; } -[data-filtered]:after { content: '\00a0\25BE'; } -[data-filtered]:hover .filter-list li { display: inline-flex; } -[class*="filter-hidden-"] { display: none; } -.filter-list { position: absolute; border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; } -.filter-list :after { content: ''; } -.filter-list li { - background: var(--tab-disabled-background); - border-bottom: var(--border); - color: var(--tab-disabled-color); - display: none; - list-style: none; - margin: 0; - padding: 5px 10px; - text-align: left; - font-weight: normal; -} -.filter-list li.active { - background: var(--tab-background); - color: var(--tab-color); -} -.filter-list li.last-active { - background: var(--tab-active-background); - color: var(--tab-active-color); -} - -.filter-list-level li { cursor: s-resize; } -.filter-list-level li.active { cursor: n-resize; } -.filter-list-level li.last-active { cursor: default; } -.filter-list-level li.last-active:before { content: '\2714\00a0'; } -.filter-list-choice li:before { content: '\2714\00a0'; color: transparent; } -.filter-list-choice li.active:before { color: unset; } - -.container { max-width: 1024px; margin: 0 auto; padding: 0 15px; } -.container::after { content: ""; display: table; clear: both; } - -header { background-color: #222; color: rgba(255, 255, 255, 0.75); font-size: 13px; height: 33px; line-height: 33px; padding: 0; } -header .container { display: flex; justify-content: space-between; } -.logo { flex: 1; font-size: 13px; font-weight: normal; margin: 0; padding: 0; } -.logo svg { height: 18px; width: 18px; opacity: .8; vertical-align: -5px; } - -.help-link { margin-left: 15px; } -.help-link a { color: inherit; } -.help-link .icon svg { height: 15px; width: 15px; opacity: .7; vertical-align: -2px; } -.help-link a:hover { color: #EEE; text-decoration: none; } -.help-link a:hover svg { opacity: .9; } - -.exception-summary { background: var(--background-error); border-bottom: 2px solid rgba(0, 0, 0, 0.1); border-top: 1px solid rgba(0, 0, 0, .3); flex: 0 0 auto; margin-bottom: 15px; } -.exception-metadata { background: rgba(0, 0, 0, 0.1); padding: 7px 0; } -.exception-metadata .container { display: flex; flex-direction: row; justify-content: space-between; } -.exception-metadata h2, .exception-metadata h2 > a { color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 400; margin: 0; } -.exception-http small { font-size: 13px; opacity: .7; } -.exception-hierarchy { flex: 1; } -.exception-hierarchy .icon { margin: 0 3px; opacity: .7; } -.exception-hierarchy .icon svg { height: 13px; width: 13px; vertical-align: -2px; } - -.exception-without-message .exception-message-wrapper { display: none; } -.exception-message-wrapper .container { display: flex; align-items: flex-start; min-height: 70px; padding: 10px 15px 8px; } -.exception-message { flex-grow: 1; } -.exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; } -.exception-message.long { font-size: 18px; } -.exception-message a { border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: inherit; text-decoration: none; } -.exception-message a:hover { border-bottom-color: #ffffff; } - -.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; } - -.trace + .trace { margin-top: 30px; } -.trace-head { background-color: var(--base-2); padding: 10px; position: relative; } -.trace-head .trace-class { color: var(--base-6); font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; } -.trace-head .trace-namespace { color: #999; display: block; font-size: 13px; } -.trace-head .icon { position: absolute; right: 0; top: 0; } -.trace-head .icon svg { fill: var(--base-5); height: 24px; width: 24px; } - -.trace-details { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 1em 0; table-layout: fixed; } - -.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; } - -.trace-line { position: relative; padding-top: 8px; padding-bottom: 8px; } -.trace-line + .trace-line { border-top: var(--border); } -.trace-line:hover { background: var(--base-1); } -.trace-line a { color: var(--base-6); } -.trace-line .icon { opacity: .4; position: absolute; left: 10px; } -.trace-line .icon svg { fill: var(--base-5); height: 16px; width: 16px; } -.trace-line .icon.icon-copy { left: auto; top: auto; padding-left: 5px; display: none } -.trace-line:hover .icon.icon-copy:not(.hidden) { display: inline-block } -.trace-line-header { padding-left: 36px; padding-right: 10px; } - -.trace-file-path, .trace-file-path a { color: var(--base-6); font-size: 13px; } -.trace-class { color: var(--color-error); } -.trace-type { padding: 0 2px; } -.trace-method { color: var(--color-error); font-weight: bold; } -.trace-arguments { color: #777; font-weight: normal; padding-left: 2px; } - -.trace-code { background: var(--base-0); font-size: 12px; margin: 10px 10px 2px 10px; padding: 10px; overflow-x: auto; white-space: nowrap; } -.trace-code ol { margin: 0; float: left; } -.trace-code li { color: #969896; margin: 0; padding-left: 10px; float: left; width: 100%; } -.trace-code li + li { margin-top: 5px; } -.trace-code li.selected { background: var(--trace-selected-background); margin-top: 2px; } -.trace-code li code { color: var(--base-6); white-space: nowrap; } - -.trace-as-text .stacktrace { line-height: 1.8; margin: 0 0 15px; white-space: pre-wrap; } - -@media (min-width: 575px) { - .hidden-xs-down { display: initial; } - .help-link { margin-left: 30px; } -} diff --git a/vendor/symfony/error-handler/Resources/assets/css/exception_full.css b/vendor/symfony/error-handler/Resources/assets/css/exception_full.css deleted file mode 100644 index fa77cb3..0000000 --- a/vendor/symfony/error-handler/Resources/assets/css/exception_full.css +++ /dev/null @@ -1,128 +0,0 @@ -.sf-reset .traces { - padding-bottom: 14px; -} -.sf-reset .traces li { - font-size: 12px; - color: #868686; - padding: 5px 4px; - list-style-type: decimal; - margin-left: 20px; -} -.sf-reset #logs .traces li.error { - font-style: normal; - color: #AA3333; - background: #f9ecec; -} -.sf-reset #logs .traces li.warning { - font-style: normal; - background: #ffcc00; -} -/* fix for Opera not liking empty
  • */ -.sf-reset .traces li:after { - content: "\00A0"; -} -.sf-reset .trace { - border: 1px solid #D3D3D3; - padding: 10px; - overflow: auto; - margin: 10px 0 20px; -} -.sf-reset .block-exception { - -moz-border-radius: 16px; - -webkit-border-radius: 16px; - border-radius: 16px; - margin-bottom: 20px; - background-color: #f6f6f6; - border: 1px solid #dfdfdf; - padding: 30px 28px; - word-wrap: break-word; - overflow: hidden; -} -.sf-reset .block-exception div { - color: #313131; - font-size: 10px; -} -.sf-reset .block-exception-detected .illustration-exception, -.sf-reset .block-exception-detected .text-exception { - float: left; -} -.sf-reset .block-exception-detected .illustration-exception { - width: 152px; -} -.sf-reset .block-exception-detected .text-exception { - width: 670px; - padding: 30px 44px 24px 46px; - position: relative; -} -.sf-reset .text-exception .open-quote, -.sf-reset .text-exception .close-quote { - font-family: Arial, Helvetica, sans-serif; - position: absolute; - color: #C9C9C9; - font-size: 8em; -} -.sf-reset .open-quote { - top: 0; - left: 0; -} -.sf-reset .close-quote { - bottom: -0.5em; - right: 50px; -} -.sf-reset .block-exception p { - font-family: Arial, Helvetica, sans-serif; -} -.sf-reset .block-exception p a, -.sf-reset .block-exception p a:hover { - color: #565656; -} -.sf-reset .logs h2 { - float: left; - width: 654px; -} -.sf-reset .error-count, .sf-reset .support { - float: right; - width: 170px; - text-align: right; -} -.sf-reset .error-count span { - display: inline-block; - background-color: #aacd4e; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: white; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .support a { - display: inline-block; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: #000000; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .toggle { - vertical-align: middle; -} -.sf-reset .linked ul, -.sf-reset .linked li { - display: inline; -} -.sf-reset #output-content { - color: #000; - font-size: 12px; -} -.sf-reset #traces-text pre { - white-space: pre; - font-size: 12px; - font-family: monospace; -} diff --git a/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg b/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg deleted file mode 100644 index 6837aff..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 b/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 deleted file mode 100644 index fb076ed..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 +++ /dev/null @@ -1 +0,0 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAYAAAABtRhCAAADVUlEQVRIx82XX0jTURTHLYPyqZdefQx66CEo80+aYpoIkqzUikz6Z5klQoWUWYRIJYEUGpQ+lIr9U5dOTLdCtkmWZis3rbnC5fw/neYW002307mX/cZvP3/7o1PwwOdh95x7vnf39zvnd29AgBer2xO6DclAXiMqZAqxIiNIN/IYSUS2BPhjmGATchUxI+ADWiRhpWK7HKuHFVBFdmU5YvnI4grFGCaReF/EBH4KsZlGgj2JBTuCYBWRIYF8YoEOJ6wBt/gEs7mBbyOjQXruPLSdOgPCiEiPSUUHDoL8Ug5IUo9B/d5wrt+G7OAKNrODPuVdB6vRCIzN6SdBlpW9RIgk/1FeAXabzRlrUPVCS/JhbmwudztnGeeH9AyXBIwtmM3wLinZJZHifjHw2V+NBoRh+9ixQrbgbnaSIcl7cGea6hoXQbNe7za241oeO5Z0p42M4BV2EqP2D50wo+6HzvwC6C4sApNOR8cmOrtcnhtj2kYRyC9eBvXzKrBZrXSs72kFd1t3MoKVbMekQkEnSNKOO8fac3LpmK6l1TlGtsxmsdKFsecPYgwxst0cwROMYDXboSotg0WLBRqjY51jLYcENElXwW2XJKPydvoI2GN9T8rBtrAArYIUruBJXkFheCQYlCpQP6uk5dAQFQNaUROMSGVQFxLmkoQsxDJrhLbTZ+nvVsERME9MgPJRKV/58AsyomTSzE813WLFvWK++qI0xSfQl8k8Pg46sYRuv5t6dS+4RqxDwaa4BGjYH+NTQvKScIp9+YL/hoZh3jDtLRHtt2C3g6bmhX+CpsFBWg7ilDSPgj0lD2ncr5ev/BP8VvyAJhqVyZeUhPOrEhEFxgEtjft846Z/guQTNT89Q5P9flMLoth4F7808wKtWWKzAwNQHxrh/1vaid2F+XpYTSbQf1XA2McOmOpROnvpvMEA4tSjq1cW0sws2gCYxswY6TKkvzYnJq1NHZLnRU4BX+4U0uburvusu8Kv8iHY7qefkM4IFngJHEOUXmLEPgiGsI8YnlZILit3vSSLRTQe/MPIZva5pshNIEmyFQlCvruJKXPkCEfmePzkphXHdzZNQdoRI9KPlBAxlj/I8U97ERPS5bjGbWDFbEdqHVe5caTBeZZx2H/IMvzeN15yoQAAAABJRU5ErkJggg== diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg deleted file mode 100644 index 498a74f..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg deleted file mode 100644 index 844a4f9..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg deleted file mode 100644 index be534ad..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg deleted file mode 100644 index 471c274..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg deleted file mode 100644 index b2593a9..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg deleted file mode 100644 index 2f5c3b3..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg deleted file mode 100644 index 03fd8e7..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php b/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php deleted file mode 100644 index 4b2f9c1..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php +++ /dev/null @@ -1 +0,0 @@ -addElementToGhost(); ?> diff --git a/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg b/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg deleted file mode 100644 index f10824a..0000000 --- a/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/js/exception.js b/vendor/symfony/error-handler/Resources/assets/js/exception.js deleted file mode 100644 index a85409d..0000000 --- a/vendor/symfony/error-handler/Resources/assets/js/exception.js +++ /dev/null @@ -1,297 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -/* .tab'); - var tabNavigation = document.createElement('ul'); - tabNavigation.className = 'tab-navigation'; - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('li'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); - } - - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope >.tab-navigation li'); - - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - document.getElementById(tabId).className = 'block'; - } else { - document.getElementById(tabId).className = 'hidden'; - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '
  • ' element */ - while (activeTab.tagName.toLowerCase() !== 'li') { - activeTab = activeTab.parentNode; - } - - /* get the full list of tabs through the parent of the active tab element */ - var tabNavigation = activeTab.parentNode.children; - for (var k = 0; k < tabNavigation.length; k++) { - var tabId = tabNavigation[k].getAttribute('data-tab-id'); - document.getElementById(tabId).className = 'hidden'; - removeClass(tabNavigation[k], 'active'); - } - - addClass(activeTab, 'active'); - var activeTabId = activeTab.getAttribute('data-tab-id'); - document.getElementById(activeTabId).className = 'block'; - }); - } - - tabGroups[i].setAttribute('data-processed', 'true'); - } - }, - - createToggles: function() { - var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])'); - - for (var i = 0; i < toggles.length; i++) { - var elementSelector = toggles[i].getAttribute('data-toggle-selector'); - var element = document.querySelector(elementSelector); - - addClass(element, 'sf-toggle-content'); - - if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { - addClass(toggles[i], 'sf-toggle-on'); - addClass(element, 'sf-toggle-visible'); - } else { - addClass(toggles[i], 'sf-toggle-off'); - addClass(element, 'sf-toggle-hidden'); - } - - addEventListener(toggles[i], 'click', function(e) { - e.preventDefault(); - - if ('' !== window.getSelection().toString()) { - /* Don't do anything on text selection */ - return; - } - - var toggle = e.target || e.srcElement; - - /* needed because when the toggle contains HTML contents, user can click */ - /* on any of those elements instead of their parent '.sf-toggle' element */ - while (!hasClass(toggle, 'sf-toggle')) { - toggle = toggle.parentNode; - } - - var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); - - toggleClass(toggle, 'sf-toggle-on'); - toggleClass(toggle, 'sf-toggle-off'); - toggleClass(element, 'sf-toggle-hidden'); - toggleClass(element, 'sf-toggle-visible'); - - /* the toggle doesn't change its contents when clicking on it */ - if (!toggle.hasAttribute('data-toggle-alt-content')) { - return; - } - - if (!toggle.hasAttribute('data-toggle-original-content')) { - toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); - } - - var currentContent = toggle.innerHTML; - var originalContent = toggle.getAttribute('data-toggle-original-content'); - var altContent = toggle.getAttribute('data-toggle-alt-content'); - toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; - }); - - /* Prevents from disallowing clicks on links inside toggles */ - var toggleLinks = toggles[i].querySelectorAll('a'); - for (var j = 0; j < toggleLinks.length; j++) { - addEventListener(toggleLinks[j], 'click', function(e) { - e.stopPropagation(); - }); - } - - /* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */ - var copyToClipboardElements = toggles[i].querySelectorAll('span[data-clipboard-text]'); - for (var k = 0; k < copyToClipboardElements.length; k++) { - addEventListener(copyToClipboardElements[k], 'click', function(e) { - e.stopPropagation(); - }); - } - - toggles[i].setAttribute('data-processed', 'true'); - } - }, - - createFilters: function() { - document.querySelectorAll('[data-filters] [data-filter]').forEach(function (filter) { - var filters = filter.closest('[data-filters]'), - type = 'choice', - name = filter.dataset.filter, - ucName = name.charAt(0).toUpperCase()+name.slice(1), - list = document.createElement('ul'), - values = filters.dataset['filter'+ucName] || filters.querySelectorAll('[data-filter-'+name+']'), - labels = {}, - defaults = null, - indexed = {}, - processed = {}; - if (typeof values === 'string') { - type = 'level'; - labels = values.split(','); - values = values.toLowerCase().split(','); - defaults = values.length - 1; - } - addClass(list, 'filter-list'); - addClass(list, 'filter-list-'+type); - values.forEach(function (value, i) { - if (value instanceof HTMLElement) { - value = value.dataset['filter'+ucName]; - } - if (value in processed) { - return; - } - var option = document.createElement('li'), - label = i in labels ? labels[i] : value, - active = false, - matches; - if ('' === label) { - option.innerHTML = '(none)'; - } else { - option.innerText = label; - } - option.dataset.filter = value; - option.setAttribute('title', 1 === (matches = filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').length) ? 'Matches 1 row' : 'Matches '+matches+' rows'); - indexed[value] = i; - list.appendChild(option); - addEventListener(option, 'click', function () { - if ('choice' === type) { - filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { - if (option.dataset.filter === row.dataset['filter'+ucName]) { - toggleClass(row, 'filter-hidden-'+name); - } - }); - toggleClass(option, 'active'); - } else if ('level' === type) { - if (i === this.parentNode.querySelectorAll('.active').length - 1) { - return; - } - this.parentNode.querySelectorAll('li').forEach(function (currentOption, j) { - if (j <= i) { - addClass(currentOption, 'active'); - if (i === j) { - addClass(currentOption, 'last-active'); - } else { - removeClass(currentOption, 'last-active'); - } - } else { - removeClass(currentOption, 'active'); - removeClass(currentOption, 'last-active'); - } - }); - filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { - if (i < indexed[row.dataset['filter'+ucName]]) { - addClass(row, 'filter-hidden-'+name); - } else { - removeClass(row, 'filter-hidden-'+name); - } - }); - } - }); - if ('choice' === type) { - active = null === defaults || 0 <= defaults.indexOf(value); - } else if ('level' === type) { - active = i <= defaults; - if (active && i === defaults) { - addClass(option, 'last-active'); - } - } - if (active) { - addClass(option, 'active'); - } else { - filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').forEach(function (row) { - toggleClass(row, 'filter-hidden-'+name); - }); - } - processed[value] = true; - }); - - if (1 < list.childNodes.length) { - filter.appendChild(list); - filter.dataset.filtered = ''; - } - }); - } - }; - })(); - - Sfjs.addEventListener(document, 'DOMContentLoaded', function() { - Sfjs.createTabs(); - Sfjs.createToggles(); - Sfjs.createFilters(); - }); -} -/*]]>*/ diff --git a/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php b/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php deleted file mode 100644 index cc98f58..0000000 --- a/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// Run from the root of the php-src repository, this script generates -// a table with all the methods that have a tentative return type. -// -// Usage: find -name *.stub.php | sort | /path/to/extract-tentative-return-types.php > /path/to/TentativeTypes.php - -echo << - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Internal; - -/** - * This class has been generated by extract-tentative-return-types.php. - * - * @internal - */ -class TentativeTypes -{ - public const RETURN_TYPES = [ - -EOPHP; - -while (false !== $file = fgets(\STDIN)) { - $code = file_get_contents(substr($file, 0, -1)); - - if (!str_contains($code, '@tentative-return-type')) { - continue; - } - - $code = preg_split('{^\s*(?:(?:abstract )?class|interface|trait) ([^\s]++)}m', $code, -1, \PREG_SPLIT_DELIM_CAPTURE); - - if (1 === count($code)) { - continue; - } - - for ($i = 1; null !== $class = $code[$i] ?? null; $i += 2) { - $methods = $code[1 + $i]; - - if (!str_contains($methods, '@tentative-return-type')) { - continue; - } - - echo " '$class' => [\n"; - - preg_replace_callback('{@tentative-return-type.*?[\s]function ([^(]++)[^)]++\)\s*+:\s*+([^\n;\{]++)}s', function ($m) { - $m[2] = str_replace(' ', '', $m[2]); - echo " '$m[1]' => '$m[2]',\n"; - - return ''; - }, $methods); - - echo " ],\n"; - } -} - -echo << - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\in_array('-h', $argv) || \in_array('--help', $argv)) { - echo implode(PHP_EOL, [ - ' Patches type declarations based on "@return" PHPDoc and triggers deprecations for', - ' incompatible method declarations.', - '', - ' This assists you to make your package compatible with Symfony 6, but it can be used', - ' for any class/package.', - '', - ' Available configuration via environment variables:', - ' SYMFONY_PATCH_TYPE_DECLARATIONS', - ' An url-encoded string to change the behavior of the script. Available parameters:', - ' - "force": any value enables deprecation notices - can be any of:', - ' - "phpdoc" to patch only docblock annotations', - ' - "2" to add all possible return types', - ' - "1" to add return types but only to tests/final/internal/private methods', - ' - "php": the target version of PHP - e.g. "7.1" doesn\'t generate "object" types', - ' - "deprecations": "1" to trigger a deprecation notice when a child class misses a', - ' return type while the parent declares an "@return" annotation', - '', - ' SYMFONY_PATCH_TYPE_EXCLUDE', - ' A regex matched against the full path to the class - any match will be excluded', - '', - ' Example: "SYMFONY_PATCH_TYPE_DECLARATIONS=php=7.4 ./patch-type-declarations"', - ]); - exit; -} - -if (false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) { - putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=force=2'); - echo 'No SYMFONY_PATCH_TYPE_DECLARATIONS env var set, patching type declarations in all methods (run the command with "-h" for more information).'.PHP_EOL; -} - -if (is_file($autoload = __DIR__.'/../../../../autoload.php')) { - // noop -} elseif (is_file($autoload = __DIR__.'/../../../../../../../autoload.php')) { - // noop -} else { - echo PHP_EOL.' /!\ Cannot find the Composer autoloader, did you forget to run "composer install"?'.PHP_EOL; - exit(1); -} - -if (is_file($phpunitAutoload = dirname($autoload).'/bin/.phpunit/phpunit/vendor/autoload.php')) { - require $phpunitAutoload; -} - -$loader = require $autoload; - -Symfony\Component\ErrorHandler\DebugClassLoader::enable(); - -$deprecations = []; -set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations) { - if (\E_USER_DEPRECATED !== $type) { - return; - } - - [,,,,, $class,] = explode('"', $msg); - $deprecations[$class][] = $msg; -}); - -$exclude = getenv('SYMFONY_PATCH_TYPE_EXCLUDE') ?: null; -foreach ($loader->getClassMap() as $class => $file) { - if (false !== strpos($file = realpath($file), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) { - continue; - } - - if ($exclude && preg_match($exclude, $file)) { - continue; - } - - class_exists($class); -} - -Symfony\Component\ErrorHandler\DebugClassLoader::checkClasses(); - -foreach ($deprecations as $class => $classDeprecations) { - echo $class.' ('.\count($classDeprecations).')'.PHP_EOL; - echo implode(PHP_EOL, $classDeprecations).PHP_EOL.PHP_EOL; -} - -if ($deprecations && false !== strpos(getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') ?? '', 'force')) { - echo 'These deprecations might be fixed by the patch script, run this again to check for type deprecations.'.PHP_EOL; -} diff --git a/vendor/symfony/error-handler/Resources/views/error.html.php b/vendor/symfony/error-handler/Resources/views/error.html.php deleted file mode 100644 index 5416d03..0000000 --- a/vendor/symfony/error-handler/Resources/views/error.html.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - An Error Occurred: <?= $statusText; ?> - - - -
    -

    Oops! An Error Occurred

    -

    The server returned a " ".

    - -

    - Something is broken. Please let us know what you were doing when this error occurred. - We will fix it as soon as possible. Sorry for any inconvenience caused. -

    -
    - - diff --git a/vendor/symfony/error-handler/Resources/views/exception.html.php b/vendor/symfony/error-handler/Resources/views/exception.html.php deleted file mode 100644 index c3e7a86..0000000 --- a/vendor/symfony/error-handler/Resources/views/exception.html.php +++ /dev/null @@ -1,116 +0,0 @@ -
    - - -
    -
    -

    formatFileFromText(nl2br($exceptionMessage)); ?>

    - -
    - include('assets/images/symfony-ghost.svg.php'); ?> -
    -
    -
    -
    - -
    -
    -
    - toArray(); - $exceptionWithUserCode = []; - $exceptionAsArrayCount = count($exceptionAsArray); - $last = $exceptionAsArrayCount - 1; - foreach ($exceptionAsArray as $i => $e) { - foreach ($e['trace'] as $trace) { - if ($trace['file'] && false === mb_strpos($trace['file'], '/vendor/') && false === mb_strpos($trace['file'], '/var/cache/') && $i < $last) { - $exceptionWithUserCode[] = $i; - } - } - } - ?> -

    - 1) { ?> - Exceptions - - Exception - -

    - -
    - $e) { - echo $this->include('views/traces.html.php', [ - 'exception' => $e, - 'index' => $i + 1, - 'expand' => in_array($i, $exceptionWithUserCode, true) || ([] === $exceptionWithUserCode && 0 === $i), - ]); - } - ?> -
    -
    - - -
    -

    - Logs - countErrors()) { ?>countErrors(); ?> -

    - -
    - getLogs()) { ?> - include('views/logs.html.php', ['logs' => $logger->getLogs()]); ?> - -
    -

    No log messages

    -
    - -
    -
    - - -
    -

    - 1) { ?> - Stack Traces - - Stack Trace - -

    - -
    - $e) { - echo $this->include('views/traces_text.html.php', [ - 'exception' => $e, - 'index' => $i + 1, - 'numExceptions' => $exceptionAsArrayCount, - ]); - } - ?> -
    -
    - - -
    -

    Output content

    - -
    - -
    -
    - -
    -
    diff --git a/vendor/symfony/error-handler/Resources/views/exception_full.html.php b/vendor/symfony/error-handler/Resources/views/exception_full.html.php deleted file mode 100644 index 04f0fd5..0000000 --- a/vendor/symfony/error-handler/Resources/views/exception_full.html.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - <?= $_message; ?> - - - - - - - - -
    -
    -

    include('assets/images/symfony-logo.svg'); ?> Symfony Exception

    - - -
    -
    - - - include('views/exception.html.php', $context); ?> - - - - - diff --git a/vendor/symfony/error-handler/Resources/views/logs.html.php b/vendor/symfony/error-handler/Resources/views/logs.html.php deleted file mode 100644 index ea6e727..0000000 --- a/vendor/symfony/error-handler/Resources/views/logs.html.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - = 400) { - $status = 'error'; - } elseif ($log['priority'] >= 300) { - $status = 'warning'; - } else { - $severity = 0; - if (($exception = $log['context']['exception'] ?? null) instanceof \ErrorException || $exception instanceof \Symfony\Component\ErrorHandler\Exception\SilencedErrorContext) { - $severity = $exception->getSeverity(); - } - $status = \E_DEPRECATED === $severity || \E_USER_DEPRECATED === $severity ? 'warning' : 'normal'; - } ?> - data-filter-channel="escape($log['channel']); ?>"> - - - - - - - - -
    LevelChannelMessage
    - escape($log['priorityName']); ?> - - - escape($log['channel']); ?> - - formatLogMessage($log['message'], $log['context']); ?> - -
    escape(json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)); ?>
    - -
    diff --git a/vendor/symfony/error-handler/Resources/views/trace.html.php b/vendor/symfony/error-handler/Resources/views/trace.html.php deleted file mode 100644 index 8dfdb4e..0000000 --- a/vendor/symfony/error-handler/Resources/views/trace.html.php +++ /dev/null @@ -1,43 +0,0 @@ -
    - - include('assets/images/icon-minus-square.svg'); ?> - include('assets/images/icon-plus-square.svg'); ?> - - - - abbrClass($trace['class']); ?>(formatArgs($trace['args']); ?>) - - - - getFileLink($trace['file'], $lineNumber); - $filePath = strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']); - $filePathParts = explode(\DIRECTORY_SEPARATOR, $filePath); - ?> - - in - - - - - - - - (line ) - - - -
    - -
    - fileExcerpt($trace['file'], $trace['line'], 5), [ - '#DD0000' => 'var(--highlight-string)', - '#007700' => 'var(--highlight-keyword)', - '#0000BB' => 'var(--highlight-default)', - '#FF8000' => 'var(--highlight-comment)', - ]); ?> -
    - diff --git a/vendor/symfony/error-handler/Resources/views/traces.html.php b/vendor/symfony/error-handler/Resources/views/traces.html.php deleted file mode 100644 index f64d917..0000000 --- a/vendor/symfony/error-handler/Resources/views/traces.html.php +++ /dev/null @@ -1,51 +0,0 @@ -
    -
    -
    -
    - include('assets/images/icon-minus-square-o.svg'); ?> - include('assets/images/icon-plus-square-o.svg'); ?> - - -
    - -

    - - - - -

    - - 1) { ?> -

    escape($exception['message']); ?>

    - -
    -
    - -
    - $trace) { - $isVendorTrace = $trace['file'] && (false !== mb_strpos($trace['file'], '/vendor/') || false !== mb_strpos($trace['file'], '/var/cache/')); - $displayCodeSnippet = $isFirstUserCode && !$isVendorTrace; - if ($displayCodeSnippet) { - $isFirstUserCode = false; - } ?> -
    - include('views/trace.html.php', [ - 'prefix' => $index, - 'i' => $i, - 'trace' => $trace, - 'style' => $isVendorTrace ? 'compact' : ($displayCodeSnippet ? 'expanded' : ''), - ]); ?> -
    - -
    -
    -
    diff --git a/vendor/symfony/error-handler/Resources/views/traces_text.html.php b/vendor/symfony/error-handler/Resources/views/traces_text.html.php deleted file mode 100644 index 6b47840..0000000 --- a/vendor/symfony/error-handler/Resources/views/traces_text.html.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - -
    -
    - 1) { ?> - [/] - - - include('assets/images/icon-minus-square-o.svg'); ?> - include('assets/images/icon-plus-square-o.svg'); ?> -
    -
    - -
    -escape($exception['class']).":\n";
    -                    if ($exception['message']) {
    -                        echo $this->escape($exception['message'])."\n";
    -                    }
    -
    -                    foreach ($exception['trace'] as $trace) {
    -                        echo "\n  ";
    -                        if ($trace['function']) {
    -                            echo $this->escape('at '.$trace['class'].$trace['type'].$trace['function']).'('.(isset($trace['args']) ? $this->formatArgsAsText($trace['args']) : '').')';
    -                        }
    -                        if ($trace['file'] && $trace['line']) {
    -                            echo($trace['function'] ? "\n     (" : 'at ').strtr(strip_tags($this->formatFile($trace['file'], $trace['line'])), [' at line '.$trace['line'] => '']).':'.$trace['line'].($trace['function'] ? ')' : '');
    -                        }
    -                    }
    -?>
    -                
    - -
    diff --git a/vendor/symfony/error-handler/ThrowableUtils.php b/vendor/symfony/error-handler/ThrowableUtils.php deleted file mode 100644 index 18d0498..0000000 --- a/vendor/symfony/error-handler/ThrowableUtils.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; - -/** - * @internal - */ -class ThrowableUtils -{ - /** - * @param SilencedErrorContext|\Throwable - */ - public static function getSeverity($throwable): int - { - if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) { - return $throwable->getSeverity(); - } - - if ($throwable instanceof \ParseError) { - return \E_PARSE; - } - - if ($throwable instanceof \TypeError) { - return \E_RECOVERABLE_ERROR; - } - - return \E_ERROR; - } -} diff --git a/vendor/symfony/error-handler/composer.json b/vendor/symfony/error-handler/composer.json deleted file mode 100644 index bc0d88e..0000000 --- a/vendor/symfony/error-handler/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/error-handler", - "type": "library", - "description": "Provides tools to manage errors and ease debugging PHP code", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\ErrorHandler\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "minimum-stability": "dev" -} diff --git a/vendor/symfony/event-dispatcher-contracts/.gitignore b/vendor/symfony/event-dispatcher-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/event-dispatcher-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md b/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/event-dispatcher-contracts/Event.php b/vendor/symfony/event-dispatcher-contracts/Event.php deleted file mode 100644 index 46dcb2b..0000000 --- a/vendor/symfony/event-dispatcher-contracts/Event.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; - -/** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Nicolas Grekas - */ -class Event implements StoppableEventInterface -{ - private $propagationStopped = false; - - /** - * {@inheritdoc} - */ - public function isPropagationStopped(): bool - { - return $this->propagationStopped; - } - - /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - */ - public function stopPropagation(): void - { - $this->propagationStopped = true; - } -} diff --git a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php deleted file mode 100644 index 351dc51..0000000 --- a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; - -/** - * Allows providing hooks on domain-specific lifecycles by dispatching events. - */ -interface EventDispatcherInterface extends PsrEventDispatcherInterface -{ - /** - * Dispatches an event to all registered listeners. - * - * @param object $event The event to pass to the event handlers/listeners - * @param string|null $eventName The name of the event to dispatch. If not supplied, - * the class of $event should be used instead. - * - * @return object The passed $event MUST be returned - */ - public function dispatch(object $event, string $eventName = null): object; -} diff --git a/vendor/symfony/event-dispatcher-contracts/LICENSE b/vendor/symfony/event-dispatcher-contracts/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/event-dispatcher-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/event-dispatcher-contracts/README.md b/vendor/symfony/event-dispatcher-contracts/README.md deleted file mode 100644 index b1ab4c0..0000000 --- a/vendor/symfony/event-dispatcher-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony EventDispatcher Contracts -================================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/event-dispatcher-contracts/composer.json b/vendor/symfony/event-dispatcher-contracts/composer.json deleted file mode 100644 index 660df81..0000000 --- a/vendor/symfony/event-dispatcher-contracts/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/event-dispatcher-contracts", - "type": "library", - "description": "Generic abstractions related to dispatching event", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php b/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php deleted file mode 100644 index bb931b8..0000000 --- a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Attribute; - -/** - * Service tag to autoconfigure event listeners. - * - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsEventListener -{ - public function __construct( - public ?string $event = null, - public ?string $method = null, - public int $priority = 0, - public ?string $dispatcher = null, - ) { - } -} diff --git a/vendor/symfony/event-dispatcher/CHANGELOG.md b/vendor/symfony/event-dispatcher/CHANGELOG.md deleted file mode 100644 index 0f98598..0000000 --- a/vendor/symfony/event-dispatcher/CHANGELOG.md +++ /dev/null @@ -1,91 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Allow `#[AsEventListener]` attribute on methods - -5.3 ---- - - * Add `#[AsEventListener]` attribute for declaring listeners on PHP 8 - -5.1.0 ------ - - * The `LegacyEventDispatcherProxy` class has been deprecated. - * Added an optional `dispatcher` attribute to the listener and subscriber tags in `RegisterListenerPass`. - -5.0.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method has been changed to `dispatch($event, string $eventName = null): object`. - * The `Event` class has been removed in favor of `Symfony\Contracts\EventDispatcher\Event`. - * The `TraceableEventDispatcherInterface` has been removed. - * The `WrappedListener` class is now final. - -4.4.0 ------ - - * `AddEventAliasesPass` has been added, allowing applications and bundles to extend the event alias mapping used by `RegisterListenersPass`. - * Made the `event` attribute of the `kernel.event_listener` tag optional for FQCN events. - -4.3.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated - * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead - -4.1.0 ------ - - * added support for invokable event listeners tagged with `kernel.event_listener` by default - * The `TraceableEventDispatcher::getOrphanedEvents()` method has been added. - * The `TraceableEventDispatcherInterface` has been deprecated. - -4.0.0 ------ - - * removed the `ContainerAwareEventDispatcher` class - * added the `reset()` method to the `TraceableEventDispatcherInterface` - -3.4.0 ------ - - * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated. - -3.3.0 ------ - - * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead. - -3.0.0 ------ - - * The method `getListenerPriority($eventName, $listener)` has been added to the - `EventDispatcherInterface`. - * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()` - and `Event::getName()` have been removed. - The event dispatcher and the event name are passed to the listener call. - -2.5.0 ------ - - * added Debug\TraceableEventDispatcher (originally in HttpKernel) - * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface - * added RegisterListenersPass (originally in HttpKernel) - -2.1.0 ------ - - * added TraceableEventDispatcherInterface - * added ContainerAwareEventDispatcher - * added a reference to the EventDispatcher on the Event - * added a reference to the Event name on the event - * added fluid interface to the dispatch() method which now returns the Event - object - * added GenericEvent event class - * added the possibility for subscribers to subscribe several times for the - same event - * added ImmutableEventDispatcher diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php deleted file mode 100644 index e1d2007..0000000 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,366 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier - */ -class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterface -{ - protected $logger; - protected $stopwatch; - - /** - * @var \SplObjectStorage - */ - private $callStack; - private $dispatcher; - private $wrappedListeners; - private $orphanedEvents; - private $requestStack; - private $currentRequestHash = ''; - - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null) - { - $this->dispatcher = $dispatcher; - $this->stopwatch = $stopwatch; - $this->logger = $logger; - $this->wrappedListeners = []; - $this->orphanedEvents = []; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { - $listener = $wrappedListener; - unset($this->wrappedListeners[$eventName][$index]); - break; - } - } - } - - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - // we might have wrapped listeners for the event (if called while dispatching) - // in that case get the priority by wrapper - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { - return $this->dispatcher->getListenerPriority($eventName, $wrappedListener); - } - } - } - - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null === $this->callStack) { - $this->callStack = new \SplObjectStorage(); - } - - $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; - - if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); - } - - $this->preProcess($eventName); - try { - $this->beforeDispatch($eventName, $event); - try { - $e = $this->stopwatch->start($eventName, 'section'); - try { - $this->dispatcher->dispatch($event, $eventName); - } finally { - if ($e->isStarted()) { - $e->stop(); - } - } - } finally { - $this->afterDispatch($eventName, $event); - } - } finally { - $this->currentRequestHash = $currentRequestHash; - $this->postProcess($eventName); - } - - return $event; - } - - /** - * @return array - */ - public function getCalledListeners(Request $request = null) - { - if (null === $this->callStack) { - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $called = []; - foreach ($this->callStack as $listener) { - [$eventName, $requestHash] = $this->callStack->getInfo(); - if (null === $hash || $hash === $requestHash) { - $called[] = $listener->getInfo($eventName); - } - } - - return $called; - } - - /** - * @return array - */ - public function getNotCalledListeners(Request $request = null) - { - try { - $allListeners = $this->getListeners(); - } catch (\Exception $e) { - if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); - } - - // unable to retrieve the uncalled listeners - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $calledListeners = []; - - if (null !== $this->callStack) { - foreach ($this->callStack as $calledListener) { - [, $requestHash] = $this->callStack->getInfo(); - - if (null === $hash || $hash === $requestHash) { - $calledListeners[] = $calledListener->getWrappedListener(); - } - } - } - - $notCalled = []; - foreach ($allListeners as $eventName => $listeners) { - foreach ($listeners as $listener) { - if (!\in_array($listener, $calledListeners, true)) { - if (!$listener instanceof WrappedListener) { - $listener = new WrappedListener($listener, null, $this->stopwatch, $this); - } - $notCalled[] = $listener->getInfo($eventName); - } - } - } - - uasort($notCalled, [$this, 'sortNotCalledListeners']); - - return $notCalled; - } - - public function getOrphanedEvents(Request $request = null): array - { - if ($request) { - return $this->orphanedEvents[spl_object_hash($request)] ?? []; - } - - if (!$this->orphanedEvents) { - return []; - } - - return array_merge(...array_values($this->orphanedEvents)); - } - - public function reset() - { - $this->callStack = null; - $this->orphanedEvents = []; - $this->currentRequestHash = ''; - } - - /** - * Proxies all method calls to the original event dispatcher. - * - * @param string $method The method name - * @param array $arguments The method arguments - * - * @return mixed - */ - public function __call(string $method, array $arguments) - { - return $this->dispatcher->{$method}(...$arguments); - } - - /** - * Called before dispatching the event. - */ - protected function beforeDispatch(string $eventName, object $event) - { - } - - /** - * Called after dispatching the event. - */ - protected function afterDispatch(string $eventName, object $event) - { - } - - private function preProcess(string $eventName): void - { - if (!$this->dispatcher->hasListeners($eventName)) { - $this->orphanedEvents[$this->currentRequestHash][] = $eventName; - - return; - } - - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - $priority = $this->getListenerPriority($eventName, $listener); - $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this); - $this->wrappedListeners[$eventName][] = $wrappedListener; - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]); - } - } - - private function postProcess(string $eventName): void - { - unset($this->wrappedListeners[$eventName]); - $skipped = false; - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch. - continue; - } - // Unwrap listener - $priority = $this->getListenerPriority($eventName, $listener); - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); - - if (null !== $this->logger) { - $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; - } - - if ($listener->wasCalled()) { - if (null !== $this->logger) { - $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); - } - } else { - $this->callStack->detach($listener); - } - - if (null !== $this->logger && $skipped) { - $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context); - } - - if ($listener->stoppedPropagation()) { - if (null !== $this->logger) { - $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); - } - - $skipped = true; - } - } - } - - private function sortNotCalledListeners(array $a, array $b) - { - if (0 !== $cmp = strcmp($a['event'], $b['event'])) { - return $cmp; - } - - if (\is_int($a['priority']) && !\is_int($b['priority'])) { - return 1; - } - - if (!\is_int($a['priority']) && \is_int($b['priority'])) { - return -1; - } - - if ($a['priority'] === $b['priority']) { - return 0; - } - - if ($a['priority'] > $b['priority']) { - return -1; - } - - return 1; - } -} diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php deleted file mode 100644 index 3916716..0000000 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Fabien Potencier - */ -final class WrappedListener -{ - private $listener; - private $optimizedListener; - private $name; - private $called; - private $stoppedPropagation; - private $stopwatch; - private $dispatcher; - private $pretty; - private $stub; - private $priority; - private static $hasClassStub; - - public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) - { - $this->listener = $listener; - $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); - $this->stopwatch = $stopwatch; - $this->dispatcher = $dispatcher; - $this->called = false; - $this->stoppedPropagation = false; - - if (\is_array($listener)) { - $this->name = \is_object($listener[0]) ? get_debug_type($listener[0]) : $listener[0]; - $this->pretty = $this->name.'::'.$listener[1]; - } elseif ($listener instanceof \Closure) { - $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { - $this->pretty = $this->name = 'closure'; - } elseif ($class = $r->getClosureScopeClass()) { - $this->name = $class->name; - $this->pretty = $this->name.'::'.$r->name; - } else { - $this->pretty = $this->name = $r->name; - } - } elseif (\is_string($listener)) { - $this->pretty = $this->name = $listener; - } else { - $this->name = get_debug_type($listener); - $this->pretty = $this->name.'::__invoke'; - } - - if (null !== $name) { - $this->name = $name; - } - - if (null === self::$hasClassStub) { - self::$hasClassStub = class_exists(ClassStub::class); - } - } - - public function getWrappedListener() - { - return $this->listener; - } - - public function wasCalled(): bool - { - return $this->called; - } - - public function stoppedPropagation(): bool - { - return $this->stoppedPropagation; - } - - public function getPretty(): string - { - return $this->pretty; - } - - public function getInfo(string $eventName): array - { - if (null === $this->stub) { - $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; - } - - return [ - 'event' => $eventName, - 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), - 'pretty' => $this->pretty, - 'stub' => $this->stub, - ]; - } - - public function __invoke(object $event, string $eventName, EventDispatcherInterface $dispatcher): void - { - $dispatcher = $this->dispatcher ?: $dispatcher; - - $this->called = true; - $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); - - $e = $this->stopwatch->start($this->name, 'event_listener'); - - ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); - - if ($e->isStarted()) { - $e->stop(); - } - - if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->stoppedPropagation = true; - } - } -} diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php deleted file mode 100644 index 6e7292b..0000000 --- a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This pass allows bundles to extend the list of event aliases. - * - * @author Alexander M. Turek - */ -class AddEventAliasesPass implements CompilerPassInterface -{ - private $eventAliases; - private $eventAliasesParameter; - - public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->eventAliases = $eventAliases; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - public function process(ContainerBuilder $container): void - { - $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : []; - - $container->setParameter( - $this->eventAliasesParameter, - array_merge($eventAliases, $this->eventAliases) - ); - } -} diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php deleted file mode 100644 index 8eabe7d..0000000 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ /dev/null @@ -1,238 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Compiler pass to register tagged services for an event dispatcher. - */ -class RegisterListenersPass implements CompilerPassInterface -{ - protected $dispatcherService; - protected $listenerTag; - protected $subscriberTag; - protected $eventAliasesParameter; - - private $hotPathEvents = []; - private $hotPathTagName = 'container.hot_path'; - private $noPreloadEvents = []; - private $noPreloadTagName = 'container.no_preload'; - - public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->dispatcherService = $dispatcherService; - $this->listenerTag = $listenerTag; - $this->subscriberTag = $subscriberTag; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - /** - * @return $this - */ - public function setHotPathEvents(array $hotPathEvents) - { - $this->hotPathEvents = array_flip($hotPathEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->hotPathTagName = func_get_arg(1); - } - - return $this; - } - - /** - * @return $this - */ - public function setNoPreloadEvents(array $noPreloadEvents): self - { - $this->noPreloadEvents = array_flip($noPreloadEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->noPreloadTagName = func_get_arg(1); - } - - return $this; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { - return; - } - - $aliases = []; - - if ($container->hasParameter($this->eventAliasesParameter)) { - $aliases = $container->getParameter($this->eventAliasesParameter); - } - - $globalDispatcherDefinition = $container->findDefinition($this->dispatcherService); - - foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { - $noPreload = 0; - - foreach ($events as $event) { - $priority = $event['priority'] ?? 0; - - if (!isset($event['event'])) { - if ($container->getDefinition($id)->hasTag($this->subscriberTag)) { - continue; - } - - $event['method'] = $event['method'] ?? '__invoke'; - $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']); - } - - $event['event'] = $aliases[$event['event']] ?? $event['event']; - - if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback([ - '/(?<=\b|_)[a-z]/i', - '/[^a-z0-9]/i', - ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); - $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - - if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) { - $event['method'] = '__invoke'; - } - } - - $dispatcherDefinition = $globalDispatcherDefinition; - if (isset($event['dispatcher'])) { - $dispatcherDefinition = $container->getDefinition($event['dispatcher']); - } - - $dispatcherDefinition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); - - if (isset($this->hotPathEvents[$event['event']])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$event['event']])) { - ++$noPreload; - } - } - - if ($noPreload && \count($events) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - } - - $extractingDispatcher = new ExtractingEventDispatcher(); - - foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(EventSubscriberInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class)); - } - $class = $r->name; - - $dispatcherDefinitions = []; - foreach ($tags as $attributes) { - if (!isset($attributes['dispatcher']) || isset($dispatcherDefinitions[$attributes['dispatcher']])) { - continue; - } - - $dispatcherDefinitions[$attributes['dispatcher']] = $container->getDefinition($attributes['dispatcher']); - } - - if (!$dispatcherDefinitions) { - $dispatcherDefinitions = [$globalDispatcherDefinition]; - } - - $noPreload = 0; - ExtractingEventDispatcher::$aliases = $aliases; - ExtractingEventDispatcher::$subscriber = $class; - $extractingDispatcher->addSubscriber($extractingDispatcher); - foreach ($extractingDispatcher->listeners as $args) { - $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; - foreach ($dispatcherDefinitions as $dispatcherDefinition) { - $dispatcherDefinition->addMethodCall('addListener', $args); - } - - if (isset($this->hotPathEvents[$args[0]])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$args[0]])) { - ++$noPreload; - } - } - if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - $extractingDispatcher->listeners = []; - ExtractingEventDispatcher::$aliases = []; - } - } - - private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string - { - if ( - null === ($class = $container->getDefinition($id)->getClass()) - || !($r = $container->getReflectionClass($class, false)) - || !$r->hasMethod($method) - || 1 > ($m = $r->getMethod($method))->getNumberOfParameters() - || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType - || $type->isBuiltin() - || Event::class === ($name = $type->getName()) - ) { - throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); - } - - return $name; - } -} - -/** - * @internal - */ -class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface -{ - public $listeners = []; - - public static $aliases = []; - public static $subscriber; - - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[] = [$eventName, $listener[1], $priority]; - } - - public static function getSubscribedEvents(): array - { - $events = []; - - foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) { - $events[self::$aliases[$eventName] ?? $eventName] = $params; - } - - return $events; - } -} diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php deleted file mode 100644 index c479a75..0000000 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ /dev/null @@ -1,280 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\Debug\WrappedListener; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - * @author Fabien Potencier - * @author Jordi Boggiano - * @author Jordan Alliot - * @author Nicolas Grekas - */ -class EventDispatcher implements EventDispatcherInterface -{ - private $listeners = []; - private $sorted = []; - private $optimized; - - public function __construct() - { - if (__CLASS__ === static::class) { - $this->optimized = []; - } - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null !== $this->optimized) { - $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); - } else { - $listeners = $this->getListeners($eventName); - } - - if ($listeners) { - $this->callListeners($listeners, $eventName, $event); - } - - return $event; - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - if (null !== $eventName) { - if (empty($this->listeners[$eventName])) { - return []; - } - - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - - return $this->sorted[$eventName]; - } - - foreach ($this->listeners as $eventName => $eventListeners) { - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - } - - return array_filter($this->sorted); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return null; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener) { - return $priority; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - if (null !== $eventName) { - return !empty($this->listeners[$eventName]); - } - - foreach ($this->listeners as $eventListeners) { - if ($eventListeners) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName], $this->optimized[$eventName]); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as $k => &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener) { - unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); - } - } - - if (!$listeners) { - unset($this->listeners[$eventName][$priority]); - } - } - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_string($params)) { - $this->addListener($eventName, [$subscriber, $params]); - } elseif (\is_string($params[0])) { - $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0); - } else { - foreach ($params as $listener) { - $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_array($params) && \is_array($params[0])) { - foreach ($params as $listener) { - $this->removeListener($eventName, [$subscriber, $listener[0]]); - } - } else { - $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); - } - } - } - - /** - * Triggers the listeners of an event. - * - * This method can be overridden to add functionality that is executed - * for each listener. - * - * @param callable[] $listeners The event listeners - * @param string $eventName The name of the event to dispatch - * @param object $event The event object to pass to the event handlers/listeners - */ - protected function callListeners(iterable $listeners, string $eventName, object $event) - { - $stoppable = $event instanceof StoppableEventInterface; - - foreach ($listeners as $listener) { - if ($stoppable && $event->isPropagationStopped()) { - break; - } - $listener($event, $eventName, $this); - } - } - - /** - * Sorts the internal list of listeners for the given event by priority. - */ - private function sortListeners(string $eventName) - { - krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as $k => &$listener) { - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - $this->sorted[$eventName][] = $listener; - } - } - } - - /** - * Optimizes the internal list of listeners for the given event by priority. - */ - private function optimizeListeners(string $eventName): array - { - krsort($this->listeners[$eventName]); - $this->optimized[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as &$listener) { - $closure = &$this->optimized[$eventName][]; - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $closure = static function (...$args) use (&$listener, &$closure) { - if ($listener[0] instanceof \Closure) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - ($closure = \Closure::fromCallable($listener))(...$args); - }; - } else { - $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); - } - } - } - - return $this->optimized[$eventName]; - } -} diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php deleted file mode 100644 index cc324e1..0000000 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Bernhard Schussek - */ -interface EventDispatcherInterface extends ContractsEventDispatcherInterface -{ - /** - * Adds an event listener that listens on the specified events. - * - * @param int $priority The higher this value, the earlier an event - * listener will be triggered in the chain (defaults to 0) - */ - public function addListener(string $eventName, callable $listener, int $priority = 0); - - /** - * Adds an event subscriber. - * - * The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - */ - public function addSubscriber(EventSubscriberInterface $subscriber); - - /** - * Removes an event listener from the specified events. - */ - public function removeListener(string $eventName, callable $listener); - - public function removeSubscriber(EventSubscriberInterface $subscriber); - - /** - * Gets the listeners of a specific event or all listeners sorted by descending priority. - * - * @return array - */ - public function getListeners(string $eventName = null); - - /** - * Gets the listener priority for a specific event. - * - * Returns null if the event or the listener does not exist. - * - * @return int|null - */ - public function getListenerPriority(string $eventName, callable $listener); - - /** - * Checks whether an event has any registered listeners. - * - * @return bool - */ - public function hasListeners(string $eventName = null); -} diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php deleted file mode 100644 index 2085e42..0000000 --- a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * An EventSubscriber knows itself what events it is interested in. - * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes - * {@link getSubscribedEvents} and registers the subscriber as a listener for all - * returned events. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek - */ -interface EventSubscriberInterface -{ - /** - * Returns an array of event names this subscriber wants to listen to. - * - * The array keys are event names and the value can be: - * - * * The method name to call (priority defaults to 0) - * * An array composed of the method name to call and the priority - * * An array of arrays composed of the method names to call and respective - * priorities, or 0 if unset - * - * For instance: - * - * * ['eventName' => 'methodName'] - * * ['eventName' => ['methodName', $priority]] - * * ['eventName' => [['methodName1', $priority], ['methodName2']]] - * - * The code must not depend on runtime state as it will only be called at compile time. - * All logic depending on runtime state must be put into the individual methods handling the events. - * - * @return array> - */ - public static function getSubscribedEvents(); -} diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php deleted file mode 100644 index b32a301..0000000 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Event encapsulation class. - * - * Encapsulates events thus decoupling the observer from the subject they encapsulate. - * - * @author Drak - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate -{ - protected $subject; - protected $arguments; - - /** - * Encapsulate an event with $subject and $args. - * - * @param mixed $subject The subject of the event, usually an object or a callable - * @param array $arguments Arguments to store in the event - */ - public function __construct($subject = null, array $arguments = []) - { - $this->subject = $subject; - $this->arguments = $arguments; - } - - /** - * Getter for subject property. - * - * @return mixed - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Get argument by key. - * - * @return mixed - * - * @throws \InvalidArgumentException if key is not found - */ - public function getArgument(string $key) - { - if ($this->hasArgument($key)) { - return $this->arguments[$key]; - } - - throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); - } - - /** - * Add argument to event. - * - * @param mixed $value Value - * - * @return $this - */ - public function setArgument(string $key, $value) - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Getter for all arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Set args property. - * - * @return $this - */ - public function setArguments(array $args = []) - { - $this->arguments = $args; - - return $this; - } - - /** - * Has argument. - * - * @return bool - */ - public function hasArgument(string $key) - { - return \array_key_exists($key, $this->arguments); - } - - /** - * ArrayAccess for argument getter. - * - * @param string $key Array key - * - * @return mixed - * - * @throws \InvalidArgumentException if key does not exist in $this->args - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->getArgument($key); - } - - /** - * ArrayAccess for argument setter. - * - * @param string $key Array key to set - * @param mixed $value Value - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->setArgument($key, $value); - } - - /** - * ArrayAccess for unset argument. - * - * @param string $key Array key - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if ($this->hasArgument($key)) { - unset($this->arguments[$key]); - } - } - - /** - * ArrayAccess has argument. - * - * @param string $key Array key - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->hasArgument($key); - } - - /** - * IteratorAggregate for iterating over the object like an array. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->arguments); - } -} diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php deleted file mode 100644 index 568d79c..0000000 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * A read-only proxy for an event dispatcher. - * - * @author Bernhard Schussek - */ -class ImmutableEventDispatcher implements EventDispatcherInterface -{ - private $dispatcher; - - public function __construct(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, string $eventName = null): object - { - return $this->dispatcher->dispatch($event, $eventName); - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function getListeners(string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } -} diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/event-dispatcher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php deleted file mode 100644 index 6e17c8f..0000000 --- a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/event-dispatcher', '5.1', '%s is deprecated, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class); - -/** - * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). - * - * @author Nicolas Grekas - * - * @deprecated since Symfony 5.1 - */ -final class LegacyEventDispatcherProxy -{ - public static function decorate(?EventDispatcherInterface $dispatcher): ?EventDispatcherInterface - { - return $dispatcher; - } -} diff --git a/vendor/symfony/event-dispatcher/README.md b/vendor/symfony/event-dispatcher/README.md deleted file mode 100644 index dcdb68d..0000000 --- a/vendor/symfony/event-dispatcher/README.md +++ /dev/null @@ -1,15 +0,0 @@ -EventDispatcher Component -========================= - -The EventDispatcher component provides tools that allow your application -components to communicate with each other by dispatching events and listening to -them. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json deleted file mode 100644 index 32b42e4..0000000 --- a/vendor/symfony/event-dispatcher/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "symfony/event-dispatcher", - "type": "library", - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/filesystem/CHANGELOG.md b/vendor/symfony/filesystem/CHANGELOG.md deleted file mode 100644 index fcb7170..0000000 --- a/vendor/symfony/filesystem/CHANGELOG.md +++ /dev/null @@ -1,82 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `Path` class - * Add `$lock` argument to `Filesystem::appendToFile()` - -5.0.0 ------ - - * `Filesystem::dumpFile()` and `appendToFile()` don't accept arrays anymore - -4.4.0 ------ - - * support for passing a `null` value to `Filesystem::isAbsolutePath()` is deprecated and will be removed in 5.0 - * `tempnam()` now accepts a third argument `$suffix`. - -4.3.0 ------ - - * support for passing arrays to `Filesystem::dumpFile()` is deprecated and will be removed in 5.0 - * support for passing arrays to `Filesystem::appendToFile()` is deprecated and will be removed in 5.0 - -4.0.0 ------ - - * removed `LockHandler` - * Support for passing relative paths to `Filesystem::makePathRelative()` has been removed. - -3.4.0 ------ - - * support for passing relative paths to `Filesystem::makePathRelative()` is deprecated and will be removed in 4.0 - -3.3.0 ------ - - * added `appendToFile()` to append contents to existing files - -3.2.0 ------ - - * added `readlink()` as a platform independent method to read links - -3.0.0 ------ - - * removed `$mode` argument from `Filesystem::dumpFile()` - -2.8.0 ------ - - * added tempnam() a stream aware version of PHP's native tempnam() - -2.6.0 ------ - - * added LockHandler - -2.3.12 ------- - - * deprecated dumpFile() file mode argument. - -2.3.0 ------ - - * added the dumpFile() method to atomically write files - -2.2.0 ------ - - * added a delete option for the mirror() method - -2.1.0 ------ - - * 24eb396 : BC Break : mkdir() function now throws exception in case of failure instead of returning Boolean value - * created the component diff --git a/vendor/symfony/filesystem/Exception/ExceptionInterface.php b/vendor/symfony/filesystem/Exception/ExceptionInterface.php deleted file mode 100644 index fc438d9..0000000 --- a/vendor/symfony/filesystem/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Romain Neutron - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/filesystem/Exception/FileNotFoundException.php b/vendor/symfony/filesystem/Exception/FileNotFoundException.php deleted file mode 100644 index 48b6408..0000000 --- a/vendor/symfony/filesystem/Exception/FileNotFoundException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception class thrown when a file couldn't be found. - * - * @author Fabien Potencier - * @author Christian Gärtner - */ -class FileNotFoundException extends IOException -{ - public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null) - { - if (null === $message) { - if (null === $path) { - $message = 'File could not be found.'; - } else { - $message = sprintf('File "%s" could not be found.', $path); - } - } - - parent::__construct($message, $code, $previous, $path); - } -} diff --git a/vendor/symfony/filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Exception/IOException.php deleted file mode 100644 index fea26e4..0000000 --- a/vendor/symfony/filesystem/Exception/IOException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * Exception class thrown when a filesystem operation failure happens. - * - * @author Romain Neutron - * @author Christian Gärtner - * @author Fabien Potencier - */ -class IOException extends \RuntimeException implements IOExceptionInterface -{ - private $path; - - public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null) - { - $this->path = $path; - - parent::__construct($message, $code, $previous); - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - return $this->path; - } -} diff --git a/vendor/symfony/filesystem/Exception/IOExceptionInterface.php b/vendor/symfony/filesystem/Exception/IOExceptionInterface.php deleted file mode 100644 index 42829ab..0000000 --- a/vendor/symfony/filesystem/Exception/IOExceptionInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * IOException interface for file and input/output stream related exceptions thrown by the component. - * - * @author Christian Gärtner - */ -interface IOExceptionInterface extends ExceptionInterface -{ - /** - * Returns the associated path for the exception. - * - * @return string|null - */ - public function getPath(); -} diff --git a/vendor/symfony/filesystem/Exception/InvalidArgumentException.php b/vendor/symfony/filesystem/Exception/InvalidArgumentException.php deleted file mode 100644 index abadc20..0000000 --- a/vendor/symfony/filesystem/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * @author Christian Flothmann - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/filesystem/Exception/RuntimeException.php b/vendor/symfony/filesystem/Exception/RuntimeException.php deleted file mode 100644 index a7512dc..0000000 --- a/vendor/symfony/filesystem/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem\Exception; - -/** - * @author Théo Fidry - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/filesystem/Filesystem.php b/vendor/symfony/filesystem/Filesystem.php deleted file mode 100644 index 524d17c..0000000 --- a/vendor/symfony/filesystem/Filesystem.php +++ /dev/null @@ -1,756 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem; - -use Symfony\Component\Filesystem\Exception\FileNotFoundException; -use Symfony\Component\Filesystem\Exception\InvalidArgumentException; -use Symfony\Component\Filesystem\Exception\IOException; - -/** - * Provides basic utility to manipulate the file system. - * - * @author Fabien Potencier - */ -class Filesystem -{ - private static $lastError; - - /** - * Copies a file. - * - * If the target file is older than the origin file, it's always overwritten. - * If the target file is newer, it is overwritten only when the - * $overwriteNewerFiles option is set to true. - * - * @throws FileNotFoundException When originFile doesn't exist - * @throws IOException When copy fails - */ - public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false) - { - $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://'); - if ($originIsLocal && !is_file($originFile)) { - throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile); - } - - $this->mkdir(\dirname($targetFile)); - - $doCopy = true; - if (!$overwriteNewerFiles && null === parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) { - $doCopy = filemtime($originFile) > filemtime($targetFile); - } - - if ($doCopy) { - // https://bugs.php.net/64634 - if (!$source = self::box('fopen', $originFile, 'r')) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); - } - - // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default - if (!$target = self::box('fopen', $targetFile, 'w', false, stream_context_create(['ftp' => ['overwrite' => true]]))) { - throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile); - } - - $bytesCopied = stream_copy_to_stream($source, $target); - fclose($source); - fclose($target); - unset($source, $target); - - if (!is_file($targetFile)) { - throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile); - } - - if ($originIsLocal) { - // Like `cp`, preserve executable permission bits - self::box('chmod', $targetFile, fileperms($targetFile) | (fileperms($originFile) & 0111)); - - if ($bytesCopied !== $bytesOrigin = filesize($originFile)) { - throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile); - } - } - } - } - - /** - * Creates a directory recursively. - * - * @param string|iterable $dirs The directory path - * - * @throws IOException On any directory creation failure - */ - public function mkdir($dirs, int $mode = 0777) - { - foreach ($this->toIterable($dirs) as $dir) { - if (is_dir($dir)) { - continue; - } - - if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) { - throw new IOException(sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir); - } - } - } - - /** - * Checks the existence of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to check - * - * @return bool - */ - public function exists($files) - { - $maxPathLength = \PHP_MAXPATHLEN - 2; - - foreach ($this->toIterable($files) as $file) { - if (\strlen($file) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file); - } - - if (!file_exists($file)) { - return false; - } - } - - return true; - } - - /** - * Sets access and modification time of file. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to create - * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used - * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used - * - * @throws IOException When touch fails - */ - public function touch($files, int $time = null, int $atime = null) - { - foreach ($this->toIterable($files) as $file) { - if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) { - throw new IOException(sprintf('Failed to touch "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - - /** - * Removes files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to remove - * - * @throws IOException When removal fails - */ - public function remove($files) - { - if ($files instanceof \Traversable) { - $files = iterator_to_array($files, false); - } elseif (!\is_array($files)) { - $files = [$files]; - } - - self::doRemove($files, false); - } - - private static function doRemove(array $files, bool $isRecursive): void - { - $files = array_reverse($files); - foreach ($files as $file) { - if (is_link($file)) { - // See https://bugs.php.net/52176 - if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) { - throw new IOException(sprintf('Failed to remove symlink "%s": ', $file).self::$lastError); - } - } elseif (is_dir($file)) { - if (!$isRecursive) { - $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-.')); - - if (file_exists($tmpName)) { - try { - self::doRemove([$tmpName], true); - } catch (IOException $e) { - } - } - - if (!file_exists($tmpName) && self::box('rename', $file, $tmpName)) { - $origFile = $file; - $file = $tmpName; - } else { - $origFile = null; - } - } - - $files = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS); - self::doRemove(iterator_to_array($files, true), true); - - if (!self::box('rmdir', $file) && file_exists($file) && !$isRecursive) { - $lastError = self::$lastError; - - if (null !== $origFile && self::box('rename', $file, $origFile)) { - $file = $origFile; - } - - throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError); - } - } elseif (!self::box('unlink', $file) && (str_contains(self::$lastError, 'Permission denied') || file_exists($file))) { - throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError); - } - } - } - - /** - * Change mode for an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode - * @param int $mode The new mode (octal) - * @param int $umask The mode mask (octal) - * @param bool $recursive Whether change the mod recursively or not - * - * @throws IOException When the change fails - */ - public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && !self::box('chmod', $file, $mode & ~$umask)) { - throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file); - } - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chmod(new \FilesystemIterator($file), $mode, $umask, true); - } - } - } - - /** - * Change the owner of an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change owner - * @param string|int $user A user name or number - * @param bool $recursive Whether change the owner recursively or not - * - * @throws IOException When the change fails - */ - public function chown($files, $user, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chown(new \FilesystemIterator($file), $user, true); - } - if (is_link($file) && \function_exists('lchown')) { - if (!self::box('lchown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); - } - } else { - if (!self::box('chown', $file, $user)) { - throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - } - - /** - * Change the group of an array of files or directories. - * - * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group - * @param string|int $group A group name or number - * @param bool $recursive Whether change the group recursively or not - * - * @throws IOException When the change fails - */ - public function chgrp($files, $group, bool $recursive = false) - { - foreach ($this->toIterable($files) as $file) { - if ($recursive && is_dir($file) && !is_link($file)) { - $this->chgrp(new \FilesystemIterator($file), $group, true); - } - if (is_link($file) && \function_exists('lchgrp')) { - if (!self::box('lchgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); - } - } else { - if (!self::box('chgrp', $file, $group)) { - throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file); - } - } - } - } - - /** - * Renames a file or a directory. - * - * @throws IOException When target file or directory already exists - * @throws IOException When origin cannot be renamed - */ - public function rename(string $origin, string $target, bool $overwrite = false) - { - // we check that target does not exist - if (!$overwrite && $this->isReadable($target)) { - throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target); - } - - if (!self::box('rename', $origin, $target)) { - if (is_dir($origin)) { - // See https://bugs.php.net/54097 & https://php.net/rename#113943 - $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]); - $this->remove($origin); - - return; - } - throw new IOException(sprintf('Cannot rename "%s" to "%s": ', $origin, $target).self::$lastError, 0, null, $target); - } - } - - /** - * Tells whether a file exists and is readable. - * - * @throws IOException When windows path is longer than 258 characters - */ - private function isReadable(string $filename): bool - { - $maxPathLength = \PHP_MAXPATHLEN - 2; - - if (\strlen($filename) > $maxPathLength) { - throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename); - } - - return is_readable($filename); - } - - /** - * Creates a symbolic link or copy a directory. - * - * @throws IOException When symlink fails - */ - public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false) - { - if ('\\' === \DIRECTORY_SEPARATOR) { - $originDir = strtr($originDir, '/', '\\'); - $targetDir = strtr($targetDir, '/', '\\'); - - if ($copyOnWindows) { - $this->mirror($originDir, $targetDir); - - return; - } - } - - $this->mkdir(\dirname($targetDir)); - - if (is_link($targetDir)) { - if (readlink($targetDir) === $originDir) { - return; - } - $this->remove($targetDir); - } - - if (!self::box('symlink', $originDir, $targetDir)) { - $this->linkException($originDir, $targetDir, 'symbolic'); - } - } - - /** - * Creates a hard link, or several hard links to a file. - * - * @param string|string[] $targetFiles The target file(s) - * - * @throws FileNotFoundException When original file is missing or not a file - * @throws IOException When link fails, including if link already exists - */ - public function hardlink(string $originFile, $targetFiles) - { - if (!$this->exists($originFile)) { - throw new FileNotFoundException(null, 0, null, $originFile); - } - - if (!is_file($originFile)) { - throw new FileNotFoundException(sprintf('Origin file "%s" is not a file.', $originFile)); - } - - foreach ($this->toIterable($targetFiles) as $targetFile) { - if (is_file($targetFile)) { - if (fileinode($originFile) === fileinode($targetFile)) { - continue; - } - $this->remove($targetFile); - } - - if (!self::box('link', $originFile, $targetFile)) { - $this->linkException($originFile, $targetFile, 'hard'); - } - } - } - - /** - * @param string $linkType Name of the link type, typically 'symbolic' or 'hard' - */ - private function linkException(string $origin, string $target, string $linkType) - { - if (self::$lastError) { - if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) { - throw new IOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target); - } - } - throw new IOException(sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target); - } - - /** - * Resolves links in paths. - * - * With $canonicalize = false (default) - * - if $path does not exist or is not a link, returns null - * - if $path is a link, returns the next direct target of the link without considering the existence of the target - * - * With $canonicalize = true - * - if $path does not exist, returns null - * - if $path exists, returns its absolute fully resolved final version - * - * @return string|null - */ - public function readlink(string $path, bool $canonicalize = false) - { - if (!$canonicalize && !is_link($path)) { - return null; - } - - if ($canonicalize) { - if (!$this->exists($path)) { - return null; - } - - if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70410) { - $path = readlink($path); - } - - return realpath($path); - } - - if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) { - return realpath($path); - } - - return readlink($path); - } - - /** - * Given an existing path, convert it to a path relative to a given starting path. - * - * @return string - */ - public function makePathRelative(string $endPath, string $startPath) - { - if (!$this->isAbsolutePath($startPath)) { - throw new InvalidArgumentException(sprintf('The start path "%s" is not absolute.', $startPath)); - } - - if (!$this->isAbsolutePath($endPath)) { - throw new InvalidArgumentException(sprintf('The end path "%s" is not absolute.', $endPath)); - } - - // Normalize separators on Windows - if ('\\' === \DIRECTORY_SEPARATOR) { - $endPath = str_replace('\\', '/', $endPath); - $startPath = str_replace('\\', '/', $startPath); - } - - $splitDriveLetter = function ($path) { - return (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) - ? [substr($path, 2), strtoupper($path[0])] - : [$path, null]; - }; - - $splitPath = function ($path) { - $result = []; - - foreach (explode('/', trim($path, '/')) as $segment) { - if ('..' === $segment) { - array_pop($result); - } elseif ('.' !== $segment && '' !== $segment) { - $result[] = $segment; - } - } - - return $result; - }; - - [$endPath, $endDriveLetter] = $splitDriveLetter($endPath); - [$startPath, $startDriveLetter] = $splitDriveLetter($startPath); - - $startPathArr = $splitPath($startPath); - $endPathArr = $splitPath($endPath); - - if ($endDriveLetter && $startDriveLetter && $endDriveLetter != $startDriveLetter) { - // End path is on another drive, so no relative path exists - return $endDriveLetter.':/'.($endPathArr ? implode('/', $endPathArr).'/' : ''); - } - - // Find for which directory the common path stops - $index = 0; - while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) { - ++$index; - } - - // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels) - if (1 === \count($startPathArr) && '' === $startPathArr[0]) { - $depth = 0; - } else { - $depth = \count($startPathArr) - $index; - } - - // Repeated "../" for each level need to reach the common path - $traverser = str_repeat('../', $depth); - - $endPathRemainder = implode('/', \array_slice($endPathArr, $index)); - - // Construct $endPath from traversing to the common path, then to the remaining $endPath - $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : ''); - - return '' === $relativePath ? './' : $relativePath; - } - - /** - * Mirrors a directory to another. - * - * Copies files and directories from the origin directory into the target directory. By default: - * - * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option) - * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option) - * - * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created - * @param array $options An array of boolean options - * Valid options are: - * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false) - * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false) - * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false) - * - * @throws IOException When file type is unknown - */ - public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []) - { - $targetDir = rtrim($targetDir, '/\\'); - $originDir = rtrim($originDir, '/\\'); - $originDirLen = \strlen($originDir); - - if (!$this->exists($originDir)) { - throw new IOException(sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir); - } - - // Iterate in destination folder to remove obsolete entries - if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) { - $deleteIterator = $iterator; - if (null === $deleteIterator) { - $flags = \FilesystemIterator::SKIP_DOTS; - $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST); - } - $targetDirLen = \strlen($targetDir); - foreach ($deleteIterator as $file) { - $origin = $originDir.substr($file->getPathname(), $targetDirLen); - if (!$this->exists($origin)) { - $this->remove($file); - } - } - } - - $copyOnWindows = $options['copy_on_windows'] ?? false; - - if (null === $iterator) { - $flags = $copyOnWindows ? \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS : \FilesystemIterator::SKIP_DOTS; - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($originDir, $flags), \RecursiveIteratorIterator::SELF_FIRST); - } - - $this->mkdir($targetDir); - $filesCreatedWhileMirroring = []; - - foreach ($iterator as $file) { - if ($file->getPathname() === $targetDir || $file->getRealPath() === $targetDir || isset($filesCreatedWhileMirroring[$file->getRealPath()])) { - continue; - } - - $target = $targetDir.substr($file->getPathname(), $originDirLen); - $filesCreatedWhileMirroring[$target] = true; - - if (!$copyOnWindows && is_link($file)) { - $this->symlink($file->getLinkTarget(), $target); - } elseif (is_dir($file)) { - $this->mkdir($target); - } elseif (is_file($file)) { - $this->copy($file, $target, $options['override'] ?? false); - } else { - throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file); - } - } - } - - /** - * Returns whether the file path is an absolute path. - * - * @return bool - */ - public function isAbsolutePath(string $file) - { - return '' !== $file && (strspn($file, '/\\', 0, 1) - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && strspn($file, '/\\', 2, 1) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ); - } - - /** - * Creates a temporary file with support for custom stream wrappers. - * - * @param string $prefix The prefix of the generated temporary filename - * Note: Windows uses only the first three characters of prefix - * @param string $suffix The suffix of the generated temporary filename - * - * @return string The new temporary filename (with path), or throw an exception on failure - */ - public function tempnam(string $dir, string $prefix/*, string $suffix = ''*/) - { - $suffix = \func_num_args() > 2 ? func_get_arg(2) : ''; - [$scheme, $hierarchy] = $this->getSchemeAndHierarchy($dir); - - // If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem - if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) { - // If tempnam failed or no scheme return the filename otherwise prepend the scheme - if ($tmpFile = self::box('tempnam', $hierarchy, $prefix)) { - if (null !== $scheme && 'gs' !== $scheme) { - return $scheme.'://'.$tmpFile; - } - - return $tmpFile; - } - - throw new IOException('A temporary file could not be created: '.self::$lastError); - } - - // Loop until we create a valid temp file or have reached 10 attempts - for ($i = 0; $i < 10; ++$i) { - // Create a unique filename - $tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true).$suffix; - - // Use fopen instead of file_exists as some streams do not support stat - // Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability - if (!$handle = self::box('fopen', $tmpFile, 'x+')) { - continue; - } - - // Close the file if it was successfully opened - self::box('fclose', $handle); - - return $tmpFile; - } - - throw new IOException('A temporary file could not be created: '.self::$lastError); - } - - /** - * Atomically dumps content into a file. - * - * @param string|resource $content The data to write into the file - * - * @throws IOException if the file cannot be written to - */ - public function dumpFile(string $filename, $content) - { - if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); - } - - $dir = \dirname($filename); - - if (!is_dir($dir)) { - $this->mkdir($dir); - } - - // Will create a temp file with 0600 access rights - // when the filesystem supports chmod. - $tmpFile = $this->tempnam($dir, basename($filename)); - - try { - if (false === self::box('file_put_contents', $tmpFile, $content)) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); - } - - self::box('chmod', $tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask()); - - $this->rename($tmpFile, $filename, true); - } finally { - if (file_exists($tmpFile)) { - self::box('unlink', $tmpFile); - } - } - } - - /** - * Appends content to an existing file. - * - * @param string|resource $content The content to append - * @param bool $lock Whether the file should be locked when writing to it - * - * @throws IOException If the file is not writable - */ - public function appendToFile(string $filename, $content/*, bool $lock = false*/) - { - if (\is_array($content)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__)); - } - - $dir = \dirname($filename); - - if (!is_dir($dir)) { - $this->mkdir($dir); - } - - $lock = \func_num_args() > 2 && func_get_arg(2); - - if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND | ($lock ? \LOCK_EX : 0))) { - throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename); - } - } - - private function toIterable($files): iterable - { - return is_iterable($files) ? $files : [$files]; - } - - /** - * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]). - */ - private function getSchemeAndHierarchy(string $filename): array - { - $components = explode('://', $filename, 2); - - return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; - } - - /** - * @param mixed ...$args - * - * @return mixed - */ - private static function box(callable $func, ...$args) - { - self::$lastError = null; - set_error_handler(__CLASS__.'::handleError'); - try { - return $func(...$args); - } finally { - restore_error_handler(); - } - } - - /** - * @internal - */ - public static function handleError(int $type, string $msg) - { - self::$lastError = $msg; - } -} diff --git a/vendor/symfony/filesystem/LICENSE b/vendor/symfony/filesystem/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/filesystem/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/filesystem/Path.php b/vendor/symfony/filesystem/Path.php deleted file mode 100644 index 0bbd5b4..0000000 --- a/vendor/symfony/filesystem/Path.php +++ /dev/null @@ -1,819 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Filesystem; - -use Symfony\Component\Filesystem\Exception\InvalidArgumentException; -use Symfony\Component\Filesystem\Exception\RuntimeException; - -/** - * Contains utility methods for handling path strings. - * - * The methods in this class are able to deal with both UNIX and Windows paths - * with both forward and backward slashes. All methods return normalized parts - * containing only forward slashes and no excess "." and ".." segments. - * - * @author Bernhard Schussek - * @author Thomas Schulz - * @author Théo Fidry - */ -final class Path -{ - /** - * The number of buffer entries that triggers a cleanup operation. - */ - private const CLEANUP_THRESHOLD = 1250; - - /** - * The buffer size after the cleanup operation. - */ - private const CLEANUP_SIZE = 1000; - - /** - * Buffers input/output of {@link canonicalize()}. - * - * @var array - */ - private static $buffer = []; - - /** - * @var int - */ - private static $bufferSize = 0; - - /** - * Canonicalizes the given path. - * - * During normalization, all slashes are replaced by forward slashes ("/"). - * Furthermore, all "." and ".." segments are removed as far as possible. - * ".." segments at the beginning of relative paths are not removed. - * - * ```php - * echo Path::canonicalize("\symfony\puli\..\css\style.css"); - * // => /symfony/css/style.css - * - * echo Path::canonicalize("../css/./style.css"); - * // => ../css/style.css - * ``` - * - * This method is able to deal with both UNIX and Windows paths. - */ - public static function canonicalize(string $path): string - { - if ('' === $path) { - return ''; - } - - // This method is called by many other methods in this class. Buffer - // the canonicalized paths to make up for the severe performance - // decrease. - if (isset(self::$buffer[$path])) { - return self::$buffer[$path]; - } - - // Replace "~" with user's home directory. - if ('~' === $path[0]) { - $path = self::getHomeDirectory().mb_substr($path, 1); - } - - $path = self::normalize($path); - - [$root, $pathWithoutRoot] = self::split($path); - - $canonicalParts = self::findCanonicalParts($root, $pathWithoutRoot); - - // Add the root directory again - self::$buffer[$path] = $canonicalPath = $root.implode('/', $canonicalParts); - ++self::$bufferSize; - - // Clean up regularly to prevent memory leaks - if (self::$bufferSize > self::CLEANUP_THRESHOLD) { - self::$buffer = \array_slice(self::$buffer, -self::CLEANUP_SIZE, null, true); - self::$bufferSize = self::CLEANUP_SIZE; - } - - return $canonicalPath; - } - - /** - * Normalizes the given path. - * - * During normalization, all slashes are replaced by forward slashes ("/"). - * Contrary to {@link canonicalize()}, this method does not remove invalid - * or dot path segments. Consequently, it is much more efficient and should - * be used whenever the given path is known to be a valid, absolute system - * path. - * - * This method is able to deal with both UNIX and Windows paths. - */ - public static function normalize(string $path): string - { - return str_replace('\\', '/', $path); - } - - /** - * Returns the directory part of the path. - * - * This method is similar to PHP's dirname(), but handles various cases - * where dirname() returns a weird result: - * - * - dirname() does not accept backslashes on UNIX - * - dirname("C:/symfony") returns "C:", not "C:/" - * - dirname("C:/") returns ".", not "C:/" - * - dirname("C:") returns ".", not "C:/" - * - dirname("symfony") returns ".", not "" - * - dirname() does not canonicalize the result - * - * This method fixes these shortcomings and behaves like dirname() - * otherwise. - * - * The result is a canonical path. - * - * @return string The canonical directory part. Returns the root directory - * if the root directory is passed. Returns an empty string - * if a relative path is passed that contains no slashes. - * Returns an empty string if an empty string is passed. - */ - public static function getDirectory(string $path): string - { - if ('' === $path) { - return ''; - } - - $path = self::canonicalize($path); - - // Maintain scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $scheme = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - if (false === ($dirSeparatorPosition = strrpos($path, '/'))) { - return ''; - } - - // Directory equals root directory "/" - if (0 === $dirSeparatorPosition) { - return $scheme.'/'; - } - - // Directory equals Windows root "C:/" - if (2 === $dirSeparatorPosition && ctype_alpha($path[0]) && ':' === $path[1]) { - return $scheme.mb_substr($path, 0, 3); - } - - return $scheme.mb_substr($path, 0, $dirSeparatorPosition); - } - - /** - * Returns canonical path of the user's home directory. - * - * Supported operating systems: - * - * - UNIX - * - Windows8 and upper - * - * If your operating system or environment isn't supported, an exception is thrown. - * - * The result is a canonical path. - * - * @throws RuntimeException If your operating system or environment isn't supported - */ - public static function getHomeDirectory(): string - { - // For UNIX support - if (getenv('HOME')) { - return self::canonicalize(getenv('HOME')); - } - - // For >= Windows8 support - if (getenv('HOMEDRIVE') && getenv('HOMEPATH')) { - return self::canonicalize(getenv('HOMEDRIVE').getenv('HOMEPATH')); - } - - throw new RuntimeException("Cannot find the home directory path: Your environment or operating system isn't supported."); - } - - /** - * Returns the root directory of a path. - * - * The result is a canonical path. - * - * @return string The canonical root directory. Returns an empty string if - * the given path is relative or empty. - */ - public static function getRoot(string $path): string - { - if ('' === $path) { - return ''; - } - - // Maintain scheme - if (false !== ($schemeSeparatorPosition = strpos($path, '://'))) { - $scheme = substr($path, 0, $schemeSeparatorPosition + 3); - $path = substr($path, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - $firstCharacter = $path[0]; - - // UNIX root "/" or "\" (Windows style) - if ('/' === $firstCharacter || '\\' === $firstCharacter) { - return $scheme.'/'; - } - - $length = mb_strlen($path); - - // Windows root - if ($length > 1 && ':' === $path[1] && ctype_alpha($firstCharacter)) { - // Special case: "C:" - if (2 === $length) { - return $scheme.$path.'/'; - } - - // Normal case: "C:/ or "C:\" - if ('/' === $path[2] || '\\' === $path[2]) { - return $scheme.$firstCharacter.$path[1].'/'; - } - } - - return ''; - } - - /** - * Returns the file name without the extension from a file path. - * - * @param string|null $extension if specified, only that extension is cut - * off (may contain leading dot) - */ - public static function getFilenameWithoutExtension(string $path, string $extension = null): string - { - if ('' === $path) { - return ''; - } - - if (null !== $extension) { - // remove extension and trailing dot - return rtrim(basename($path, $extension), '.'); - } - - return pathinfo($path, \PATHINFO_FILENAME); - } - - /** - * Returns the extension from a file path (without leading dot). - * - * @param bool $forceLowerCase forces the extension to be lower-case - */ - public static function getExtension(string $path, bool $forceLowerCase = false): string - { - if ('' === $path) { - return ''; - } - - $extension = pathinfo($path, \PATHINFO_EXTENSION); - - if ($forceLowerCase) { - $extension = self::toLower($extension); - } - - return $extension; - } - - /** - * Returns whether the path has an (or the specified) extension. - * - * @param string $path the path string - * @param string|string[]|null $extensions if null or not provided, checks if - * an extension exists, otherwise - * checks for the specified extension - * or array of extensions (with or - * without leading dot) - * @param bool $ignoreCase whether to ignore case-sensitivity - */ - public static function hasExtension(string $path, $extensions = null, bool $ignoreCase = false): bool - { - if ('' === $path) { - return false; - } - - $actualExtension = self::getExtension($path, $ignoreCase); - - // Only check if path has any extension - if ([] === $extensions || null === $extensions) { - return '' !== $actualExtension; - } - - if (\is_string($extensions)) { - $extensions = [$extensions]; - } - - foreach ($extensions as $key => $extension) { - if ($ignoreCase) { - $extension = self::toLower($extension); - } - - // remove leading '.' in extensions array - $extensions[$key] = ltrim($extension, '.'); - } - - return \in_array($actualExtension, $extensions, true); - } - - /** - * Changes the extension of a path string. - * - * @param string $path The path string with filename.ext to change. - * @param string $extension new extension (with or without leading dot) - * - * @return string the path string with new file extension - */ - public static function changeExtension(string $path, string $extension): string - { - if ('' === $path) { - return ''; - } - - $actualExtension = self::getExtension($path); - $extension = ltrim($extension, '.'); - - // No extension for paths - if ('/' === mb_substr($path, -1)) { - return $path; - } - - // No actual extension in path - if (empty($actualExtension)) { - return $path.('.' === mb_substr($path, -1) ? '' : '.').$extension; - } - - return mb_substr($path, 0, -mb_strlen($actualExtension)).$extension; - } - - public static function isAbsolute(string $path): bool - { - if ('' === $path) { - return false; - } - - // Strip scheme - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } - - $firstCharacter = $path[0]; - - // UNIX root "/" or "\" (Windows style) - if ('/' === $firstCharacter || '\\' === $firstCharacter) { - return true; - } - - // Windows root - if (mb_strlen($path) > 1 && ctype_alpha($firstCharacter) && ':' === $path[1]) { - // Special case: "C:" - if (2 === mb_strlen($path)) { - return true; - } - - // Normal case: "C:/ or "C:\" - if ('/' === $path[2] || '\\' === $path[2]) { - return true; - } - } - - return false; - } - - public static function isRelative(string $path): bool - { - return !self::isAbsolute($path); - } - - /** - * Turns a relative path into an absolute path in canonical form. - * - * Usually, the relative path is appended to the given base path. Dot - * segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * echo Path::makeAbsolute("../style.css", "/symfony/puli/css"); - * // => /symfony/puli/style.css - * ``` - * - * If an absolute path is passed, that path is returned unless its root - * directory is different than the one of the base path. In that case, an - * exception is thrown. - * - * ```php - * Path::makeAbsolute("/style.css", "/symfony/puli/css"); - * // => /style.css - * - * Path::makeAbsolute("C:/style.css", "C:/symfony/puli/css"); - * // => C:/style.css - * - * Path::makeAbsolute("C:/style.css", "/symfony/puli/css"); - * // InvalidArgumentException - * ``` - * - * If the base path is not an absolute path, an exception is thrown. - * - * The result is a canonical path. - * - * @param string $basePath an absolute base path - * - * @throws InvalidArgumentException if the base path is not absolute or if - * the given path is an absolute path with - * a different root than the base path - */ - public static function makeAbsolute(string $path, string $basePath): string - { - if ('' === $basePath) { - throw new InvalidArgumentException(sprintf('The base path must be a non-empty string. Got: "%s".', $basePath)); - } - - if (!self::isAbsolute($basePath)) { - throw new InvalidArgumentException(sprintf('The base path "%s" is not an absolute path.', $basePath)); - } - - if (self::isAbsolute($path)) { - return self::canonicalize($path); - } - - if (false !== ($schemeSeparatorPosition = mb_strpos($basePath, '://'))) { - $scheme = mb_substr($basePath, 0, $schemeSeparatorPosition + 3); - $basePath = mb_substr($basePath, $schemeSeparatorPosition + 3); - } else { - $scheme = ''; - } - - return $scheme.self::canonicalize(rtrim($basePath, '/\\').'/'.$path); - } - - /** - * Turns a path into a relative path. - * - * The relative path is created relative to the given base path: - * - * ```php - * echo Path::makeRelative("/symfony/style.css", "/symfony/puli"); - * // => ../style.css - * ``` - * - * If a relative path is passed and the base path is absolute, the relative - * path is returned unchanged: - * - * ```php - * Path::makeRelative("style.css", "/symfony/puli/css"); - * // => style.css - * ``` - * - * If both paths are relative, the relative path is created with the - * assumption that both paths are relative to the same directory: - * - * ```php - * Path::makeRelative("style.css", "symfony/puli/css"); - * // => ../../../style.css - * ``` - * - * If both paths are absolute, their root directory must be the same, - * otherwise an exception is thrown: - * - * ```php - * Path::makeRelative("C:/symfony/style.css", "/symfony/puli"); - * // InvalidArgumentException - * ``` - * - * If the passed path is absolute, but the base path is not, an exception - * is thrown as well: - * - * ```php - * Path::makeRelative("/symfony/style.css", "symfony/puli"); - * // InvalidArgumentException - * ``` - * - * If the base path is not an absolute path, an exception is thrown. - * - * The result is a canonical path. - * - * @throws InvalidArgumentException if the base path is not absolute or if - * the given path has a different root - * than the base path - */ - public static function makeRelative(string $path, string $basePath): string - { - $path = self::canonicalize($path); - $basePath = self::canonicalize($basePath); - - [$root, $relativePath] = self::split($path); - [$baseRoot, $relativeBasePath] = self::split($basePath); - - // If the base path is given as absolute path and the path is already - // relative, consider it to be relative to the given absolute path - // already - if ('' === $root && '' !== $baseRoot) { - // If base path is already in its root - if ('' === $relativeBasePath) { - $relativePath = ltrim($relativePath, './\\'); - } - - return $relativePath; - } - - // If the passed path is absolute, but the base path is not, we - // cannot generate a relative path - if ('' !== $root && '' === $baseRoot) { - throw new InvalidArgumentException(sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath)); - } - - // Fail if the roots of the two paths are different - if ($baseRoot && $root !== $baseRoot) { - throw new InvalidArgumentException(sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot)); - } - - if ('' === $relativeBasePath) { - return $relativePath; - } - - // Build a "../../" prefix with as many "../" parts as necessary - $parts = explode('/', $relativePath); - $baseParts = explode('/', $relativeBasePath); - $dotDotPrefix = ''; - - // Once we found a non-matching part in the prefix, we need to add - // "../" parts for all remaining parts - $match = true; - - foreach ($baseParts as $index => $basePart) { - if ($match && isset($parts[$index]) && $basePart === $parts[$index]) { - unset($parts[$index]); - - continue; - } - - $match = false; - $dotDotPrefix .= '../'; - } - - return rtrim($dotDotPrefix.implode('/', $parts), '/'); - } - - /** - * Returns whether the given path is on the local filesystem. - */ - public static function isLocal(string $path): bool - { - return '' !== $path && false === mb_strpos($path, '://'); - } - - /** - * Returns the longest common base path in canonical form of a set of paths or - * `null` if the paths are on different Windows partitions. - * - * Dot segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * '/symfony/css/style.css', - * '/symfony/css/..' - * ); - * // => /symfony - * ``` - * - * The root is returned if no common base path can be found: - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * '/symfony/css/style.css', - * '/puli/css/..' - * ); - * // => / - * ``` - * - * If the paths are located on different Windows partitions, `null` is - * returned. - * - * ```php - * $basePath = Path::getLongestCommonBasePath( - * 'C:/symfony/css/style.css', - * 'D:/symfony/css/..' - * ); - * // => null - * ``` - */ - public static function getLongestCommonBasePath(string ...$paths): ?string - { - [$bpRoot, $basePath] = self::split(self::canonicalize(reset($paths))); - - for (next($paths); null !== key($paths) && '' !== $basePath; next($paths)) { - [$root, $path] = self::split(self::canonicalize(current($paths))); - - // If we deal with different roots (e.g. C:/ vs. D:/), it's time - // to quit - if ($root !== $bpRoot) { - return null; - } - - // Make the base path shorter until it fits into path - while (true) { - if ('.' === $basePath) { - // No more base paths - $basePath = ''; - - // next path - continue 2; - } - - // Prevent false positives for common prefixes - // see isBasePath() - if (0 === mb_strpos($path.'/', $basePath.'/')) { - // next path - continue 2; - } - - $basePath = \dirname($basePath); - } - } - - return $bpRoot.$basePath; - } - - /** - * Joins two or more path strings into a canonical path. - */ - public static function join(string ...$paths): string - { - $finalPath = null; - $wasScheme = false; - - foreach ($paths as $path) { - if ('' === $path) { - continue; - } - - if (null === $finalPath) { - // For first part we keep slashes, like '/top', 'C:\' or 'phar://' - $finalPath = $path; - $wasScheme = (false !== mb_strpos($path, '://')); - continue; - } - - // Only add slash if previous part didn't end with '/' or '\' - if (!\in_array(mb_substr($finalPath, -1), ['/', '\\'])) { - $finalPath .= '/'; - } - - // If first part included a scheme like 'phar://' we allow \current part to start with '/', otherwise trim - $finalPath .= $wasScheme ? $path : ltrim($path, '/'); - $wasScheme = false; - } - - if (null === $finalPath) { - return ''; - } - - return self::canonicalize($finalPath); - } - - /** - * Returns whether a path is a base path of another path. - * - * Dot segments ("." and "..") are removed/collapsed and all slashes turned - * into forward slashes. - * - * ```php - * Path::isBasePath('/symfony', '/symfony/css'); - * // => true - * - * Path::isBasePath('/symfony', '/symfony'); - * // => true - * - * Path::isBasePath('/symfony', '/symfony/..'); - * // => false - * - * Path::isBasePath('/symfony', '/puli'); - * // => false - * ``` - */ - public static function isBasePath(string $basePath, string $ofPath): bool - { - $basePath = self::canonicalize($basePath); - $ofPath = self::canonicalize($ofPath); - - // Append slashes to prevent false positives when two paths have - // a common prefix, for example /base/foo and /base/foobar. - // Don't append a slash for the root "/", because then that root - // won't be discovered as common prefix ("//" is not a prefix of - // "/foobar/"). - return 0 === mb_strpos($ofPath.'/', rtrim($basePath, '/').'/'); - } - - /** - * @return non-empty-string[] - */ - private static function findCanonicalParts(string $root, string $pathWithoutRoot): array - { - $parts = explode('/', $pathWithoutRoot); - - $canonicalParts = []; - - // Collapse "." and "..", if possible - foreach ($parts as $part) { - if ('.' === $part || '' === $part) { - continue; - } - - // Collapse ".." with the previous part, if one exists - // Don't collapse ".." if the previous part is also ".." - if ('..' === $part && \count($canonicalParts) > 0 && '..' !== $canonicalParts[\count($canonicalParts) - 1]) { - array_pop($canonicalParts); - - continue; - } - - // Only add ".." prefixes for relative paths - if ('..' !== $part || '' === $root) { - $canonicalParts[] = $part; - } - } - - return $canonicalParts; - } - - /** - * Splits a canonical path into its root directory and the remainder. - * - * If the path has no root directory, an empty root directory will be - * returned. - * - * If the root directory is a Windows style partition, the resulting root - * will always contain a trailing slash. - * - * list ($root, $path) = Path::split("C:/symfony") - * // => ["C:/", "symfony"] - * - * list ($root, $path) = Path::split("C:") - * // => ["C:/", ""] - * - * @return array{string, string} an array with the root directory and the remaining relative path - */ - private static function split(string $path): array - { - if ('' === $path) { - return ['', '']; - } - - // Remember scheme as part of the root, if any - if (false !== ($schemeSeparatorPosition = mb_strpos($path, '://'))) { - $root = mb_substr($path, 0, $schemeSeparatorPosition + 3); - $path = mb_substr($path, $schemeSeparatorPosition + 3); - } else { - $root = ''; - } - - $length = mb_strlen($path); - - // Remove and remember root directory - if (0 === mb_strpos($path, '/')) { - $root .= '/'; - $path = $length > 1 ? mb_substr($path, 1) : ''; - } elseif ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) { - if (2 === $length) { - // Windows special case: "C:" - $root .= $path.'/'; - $path = ''; - } elseif ('/' === $path[2]) { - // Windows normal case: "C:/".. - $root .= mb_substr($path, 0, 3); - $path = $length > 3 ? mb_substr($path, 3) : ''; - } - } - - return [$root, $path]; - } - - private static function toLower(string $string): string - { - if (false !== $encoding = mb_detect_encoding($string)) { - return mb_strtolower($string, $encoding); - } - - return strtolower($string, $encoding); - } - - private function __construct() - { - } -} diff --git a/vendor/symfony/filesystem/README.md b/vendor/symfony/filesystem/README.md deleted file mode 100644 index f2f6d45..0000000 --- a/vendor/symfony/filesystem/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Filesystem Component -==================== - -The Filesystem component provides basic utilities for the filesystem. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/filesystem.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/filesystem/composer.json b/vendor/symfony/filesystem/composer.json deleted file mode 100644 index e756104..0000000 --- a/vendor/symfony/filesystem/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "symfony/filesystem", - "type": "library", - "description": "Provides basic utilities for the filesystem", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Filesystem\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/finder/CHANGELOG.md b/vendor/symfony/finder/CHANGELOG.md deleted file mode 100644 index 6a44e87..0000000 --- a/vendor/symfony/finder/CHANGELOG.md +++ /dev/null @@ -1,87 +0,0 @@ -CHANGELOG -========= - -5.4.0 ------ - - * Deprecate `Comparator::setTarget()` and `Comparator::setOperator()` - * Add a constructor to `Comparator` that allows setting target and operator - * Finder's iterator has now `Symfony\Component\Finder\SplFileInfo` inner type specified - * Add recursive .gitignore files support - -5.0.0 ------ - - * added `$useNaturalSort` argument to `Finder::sortByName()` - -4.3.0 ------ - - * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore - -4.2.0 ------ - - * added $useNaturalSort option to Finder::sortByName() method - * the `Finder::sortByName()` method will have a new `$useNaturalSort` - argument in version 5.0, not defining it is deprecated - * added `Finder::reverseSorting()` to reverse the sorting - -4.0.0 ------ - - * removed `ExceptionInterface` - * removed `Symfony\Component\Finder\Iterator\FilterIterator` - -3.4.0 ------ - - * deprecated `Symfony\Component\Finder\Iterator\FilterIterator` - * added Finder::hasResults() method to check if any results were found - -3.3.0 ------ - - * added double-star matching to Glob::toRegex() - -3.0.0 ------ - - * removed deprecated classes - -2.8.0 ------ - - * deprecated adapters and related classes - -2.5.0 ------ - * added support for GLOB_BRACE in the paths passed to Finder::in() - -2.3.0 ------ - - * added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs()) - * unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception - -2.2.0 ------ - - * added Finder::path() and Finder::notPath() methods - * added finder adapters to improve performance on specific platforms - * added support for wildcard characters (glob patterns) in the paths passed - to Finder::in() - -2.1.0 ------ - - * added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and - Finder::sortByModifiedTime() - * added Countable to Finder - * added support for an array of directories as an argument to - Finder::exclude() - * added searching based on the file content via Finder::contains() and - Finder::notContains() - * added support for the != operator in the Comparator - * [BC BREAK] filter expressions (used for file name and content) are no more - considered as regexps but glob patterns when they are enclosed in '*' or '?' diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php deleted file mode 100644 index 3af551f..0000000 --- a/vendor/symfony/finder/Comparator/Comparator.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * @author Fabien Potencier - */ -class Comparator -{ - private $target; - private $operator = '=='; - - public function __construct(string $target = null, string $operator = '==') - { - if (null === $target) { - trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__); - } - - $this->target = $target; - $this->doSetOperator($operator); - } - - /** - * Gets the target value. - * - * @return string - */ - public function getTarget() - { - if (null === $this->target) { - trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__); - } - - return $this->target; - } - - /** - * @deprecated set the target via the constructor instead - */ - public function setTarget(string $target) - { - trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__); - - $this->target = $target; - } - - /** - * Gets the comparison operator. - * - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Sets the comparison operator. - * - * @throws \InvalidArgumentException - * - * @deprecated set the operator via the constructor instead - */ - public function setOperator(string $operator) - { - trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__); - - $this->doSetOperator('' === $operator ? '==' : $operator); - } - - /** - * Tests against the target. - * - * @param mixed $test A test value - * - * @return bool - */ - public function test($test) - { - if (null === $this->target) { - trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__); - } - - switch ($this->operator) { - case '>': - return $test > $this->target; - case '>=': - return $test >= $this->target; - case '<': - return $test < $this->target; - case '<=': - return $test <= $this->target; - case '!=': - return $test != $this->target; - } - - return $test == $this->target; - } - - private function doSetOperator(string $operator): void - { - if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { - throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); - } - - $this->operator = $operator; - } -} diff --git a/vendor/symfony/finder/Comparator/DateComparator.php b/vendor/symfony/finder/Comparator/DateComparator.php deleted file mode 100644 index 8f651e1..0000000 --- a/vendor/symfony/finder/Comparator/DateComparator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * DateCompare compiles date comparisons. - * - * @author Fabien Potencier - */ -class DateComparator extends Comparator -{ - /** - * @param string $test A comparison string - * - * @throws \InvalidArgumentException If the test is not understood - */ - public function __construct(string $test) - { - if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test)); - } - - try { - $date = new \DateTime($matches[2]); - $target = $date->format('U'); - } catch (\Exception $e) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2])); - } - - $operator = $matches[1] ?? '=='; - if ('since' === $operator || 'after' === $operator) { - $operator = '>'; - } - - if ('until' === $operator || 'before' === $operator) { - $operator = '<'; - } - - parent::__construct($target, $operator); - } -} diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Comparator/NumberComparator.php deleted file mode 100644 index ff85d96..0000000 --- a/vendor/symfony/finder/Comparator/NumberComparator.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Comparator; - -/** - * NumberComparator compiles a simple comparison to an anonymous - * subroutine, which you can call with a value to be tested again. - * - * Now this would be very pointless, if NumberCompare didn't understand - * magnitudes. - * - * The target value may use magnitudes of kilobytes (k, ki), - * megabytes (m, mi), or gigabytes (g, gi). Those suffixed - * with an i use the appropriate 2**n version in accordance with the - * IEC standard: http://physics.nist.gov/cuu/Units/binary.html - * - * Based on the Perl Number::Compare module. - * - * @author Fabien Potencier PHP port - * @author Richard Clamp Perl version - * @copyright 2004-2005 Fabien Potencier - * @copyright 2002 Richard Clamp - * - * @see http://physics.nist.gov/cuu/Units/binary.html - */ -class NumberComparator extends Comparator -{ - /** - * @param string|int $test A comparison string or an integer - * - * @throws \InvalidArgumentException If the test is not understood - */ - public function __construct(?string $test) - { - if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) { - throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null')); - } - - $target = $matches[2]; - if (!is_numeric($target)) { - throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target)); - } - if (isset($matches[3])) { - // magnitude - switch (strtolower($matches[3])) { - case 'k': - $target *= 1000; - break; - case 'ki': - $target *= 1024; - break; - case 'm': - $target *= 1000000; - break; - case 'mi': - $target *= 1024 * 1024; - break; - case 'g': - $target *= 1000000000; - break; - case 'gi': - $target *= 1024 * 1024 * 1024; - break; - } - } - - parent::__construct($target, $matches[1] ?: '=='); - } -} diff --git a/vendor/symfony/finder/Exception/AccessDeniedException.php b/vendor/symfony/finder/Exception/AccessDeniedException.php deleted file mode 100644 index ee195ea..0000000 --- a/vendor/symfony/finder/Exception/AccessDeniedException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Jean-François Simon - */ -class AccessDeniedException extends \UnexpectedValueException -{ -} diff --git a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php deleted file mode 100644 index c6cc0f2..0000000 --- a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Andreas Erhard - */ -class DirectoryNotFoundException extends \InvalidArgumentException -{ -} diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php deleted file mode 100644 index 8cc564c..0000000 --- a/vendor/symfony/finder/Finder.php +++ /dev/null @@ -1,806 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -use Symfony\Component\Finder\Comparator\DateComparator; -use Symfony\Component\Finder\Comparator\NumberComparator; -use Symfony\Component\Finder\Exception\DirectoryNotFoundException; -use Symfony\Component\Finder\Iterator\CustomFilterIterator; -use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; -use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; -use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator; -use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; -use Symfony\Component\Finder\Iterator\FilenameFilterIterator; -use Symfony\Component\Finder\Iterator\LazyIterator; -use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; -use Symfony\Component\Finder\Iterator\SortableIterator; - -/** - * Finder allows to build rules to find files and directories. - * - * It is a thin wrapper around several specialized iterator classes. - * - * All rules may be invoked several times. - * - * All methods return the current Finder object to allow chaining: - * - * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class Finder implements \IteratorAggregate, \Countable -{ - public const IGNORE_VCS_FILES = 1; - public const IGNORE_DOT_FILES = 2; - public const IGNORE_VCS_IGNORED_FILES = 4; - - private $mode = 0; - private $names = []; - private $notNames = []; - private $exclude = []; - private $filters = []; - private $depths = []; - private $sizes = []; - private $followLinks = false; - private $reverseSorting = false; - private $sort = false; - private $ignore = 0; - private $dirs = []; - private $dates = []; - private $iterators = []; - private $contains = []; - private $notContains = []; - private $paths = []; - private $notPaths = []; - private $ignoreUnreadableDirs = false; - - private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; - - public function __construct() - { - $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; - } - - /** - * Creates a new Finder. - * - * @return static - */ - public static function create() - { - return new static(); - } - - /** - * Restricts the matching to directories only. - * - * @return $this - */ - public function directories() - { - $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES; - - return $this; - } - - /** - * Restricts the matching to files only. - * - * @return $this - */ - public function files() - { - $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES; - - return $this; - } - - /** - * Adds tests for the directory depth. - * - * Usage: - * - * $finder->depth('> 1') // the Finder will start matching at level 1. - * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. - * $finder->depth(['>= 1', '< 3']) - * - * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels - * - * @return $this - * - * @see DepthRangeFilterIterator - * @see NumberComparator - */ - public function depth($levels) - { - foreach ((array) $levels as $level) { - $this->depths[] = new Comparator\NumberComparator($level); - } - - return $this; - } - - /** - * Adds tests for file dates (last modified). - * - * The date must be something that strtotime() is able to parse: - * - * $finder->date('since yesterday'); - * $finder->date('until 2 days ago'); - * $finder->date('> now - 2 hours'); - * $finder->date('>= 2005-10-15'); - * $finder->date(['>= 2005-10-15', '<= 2006-05-27']); - * - * @param string|string[] $dates A date range string or an array of date ranges - * - * @return $this - * - * @see strtotime - * @see DateRangeFilterIterator - * @see DateComparator - */ - public function date($dates) - { - foreach ((array) $dates as $date) { - $this->dates[] = new Comparator\DateComparator($date); - } - - return $this; - } - - /** - * Adds rules that files must match. - * - * You can use patterns (delimited with / sign), globs or simple strings. - * - * $finder->name('*.php') - * $finder->name('/\.php$/') // same as above - * $finder->name('test.php') - * $finder->name(['test.py', 'test.php']) - * - * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function name($patterns) - { - $this->names = array_merge($this->names, (array) $patterns); - - return $this; - } - - /** - * Adds rules that files must not match. - * - * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function notName($patterns) - { - $this->notNames = array_merge($this->notNames, (array) $patterns); - - return $this; - } - - /** - * Adds tests that file contents must match. - * - * Strings or PCRE patterns can be used: - * - * $finder->contains('Lorem ipsum') - * $finder->contains('/Lorem ipsum/i') - * $finder->contains(['dolor', '/ipsum/i']) - * - * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns - * - * @return $this - * - * @see FilecontentFilterIterator - */ - public function contains($patterns) - { - $this->contains = array_merge($this->contains, (array) $patterns); - - return $this; - } - - /** - * Adds tests that file contents must not match. - * - * Strings or PCRE patterns can be used: - * - * $finder->notContains('Lorem ipsum') - * $finder->notContains('/Lorem ipsum/i') - * $finder->notContains(['lorem', '/dolor/i']) - * - * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns - * - * @return $this - * - * @see FilecontentFilterIterator - */ - public function notContains($patterns) - { - $this->notContains = array_merge($this->notContains, (array) $patterns); - - return $this; - } - - /** - * Adds rules that filenames must match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->path('some/special/dir') - * $finder->path('/some\/special\/dir/') // same as above - * $finder->path(['some dir', 'another/dir']) - * - * Use only / as dirname separator. - * - * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function path($patterns) - { - $this->paths = array_merge($this->paths, (array) $patterns); - - return $this; - } - - /** - * Adds rules that filenames must not match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->notPath('some/special/dir') - * $finder->notPath('/some\/special\/dir/') // same as above - * $finder->notPath(['some/file.txt', 'another/file.log']) - * - * Use only / as dirname separator. - * - * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns - * - * @return $this - * - * @see FilenameFilterIterator - */ - public function notPath($patterns) - { - $this->notPaths = array_merge($this->notPaths, (array) $patterns); - - return $this; - } - - /** - * Adds tests for file sizes. - * - * $finder->size('> 10K'); - * $finder->size('<= 1Ki'); - * $finder->size(4); - * $finder->size(['> 10K', '< 20K']) - * - * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges - * - * @return $this - * - * @see SizeRangeFilterIterator - * @see NumberComparator - */ - public function size($sizes) - { - foreach ((array) $sizes as $size) { - $this->sizes[] = new Comparator\NumberComparator($size); - } - - return $this; - } - - /** - * Excludes directories. - * - * Directories passed as argument must be relative to the ones defined with the `in()` method. For example: - * - * $finder->in(__DIR__)->exclude('ruby'); - * - * @param string|array $dirs A directory path or an array of directories - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function exclude($dirs) - { - $this->exclude = array_merge($this->exclude, (array) $dirs); - - return $this; - } - - /** - * Excludes "hidden" directories and files (starting with a dot). - * - * This option is enabled by default. - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function ignoreDotFiles(bool $ignoreDotFiles) - { - if ($ignoreDotFiles) { - $this->ignore |= static::IGNORE_DOT_FILES; - } else { - $this->ignore &= ~static::IGNORE_DOT_FILES; - } - - return $this; - } - - /** - * Forces the finder to ignore version control directories. - * - * This option is enabled by default. - * - * @return $this - * - * @see ExcludeDirectoryFilterIterator - */ - public function ignoreVCS(bool $ignoreVCS) - { - if ($ignoreVCS) { - $this->ignore |= static::IGNORE_VCS_FILES; - } else { - $this->ignore &= ~static::IGNORE_VCS_FILES; - } - - return $this; - } - - /** - * Forces Finder to obey .gitignore and ignore files based on rules listed there. - * - * This option is disabled by default. - * - * @return $this - */ - public function ignoreVCSIgnored(bool $ignoreVCSIgnored) - { - if ($ignoreVCSIgnored) { - $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; - } else { - $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; - } - - return $this; - } - - /** - * Adds VCS patterns. - * - * @see ignoreVCS() - * - * @param string|string[] $pattern VCS patterns to ignore - */ - public static function addVCSPattern($pattern) - { - foreach ((array) $pattern as $p) { - self::$vcsPatterns[] = $p; - } - - self::$vcsPatterns = array_unique(self::$vcsPatterns); - } - - /** - * Sorts files and directories by an anonymous function. - * - * The anonymous function receives two \SplFileInfo instances to compare. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sort(\Closure $closure) - { - $this->sort = $closure; - - return $this; - } - - /** - * Sorts files and directories by name. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByName(bool $useNaturalSort = false) - { - $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME; - - return $this; - } - - /** - * Sorts files and directories by type (directories before files), then by name. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByType() - { - $this->sort = Iterator\SortableIterator::SORT_BY_TYPE; - - return $this; - } - - /** - * Sorts files and directories by the last accessed time. - * - * This is the time that the file was last accessed, read or written to. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByAccessedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME; - - return $this; - } - - /** - * Reverses the sorting. - * - * @return $this - */ - public function reverseSorting() - { - $this->reverseSorting = true; - - return $this; - } - - /** - * Sorts files and directories by the last inode changed time. - * - * This is the time that the inode information was last modified (permissions, owner, group or other metadata). - * - * On Windows, since inode is not available, changed time is actually the file creation time. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByChangedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME; - - return $this; - } - - /** - * Sorts files and directories by the last modified time. - * - * This is the last time the actual contents of the file were last modified. - * - * This can be slow as all the matching files and directories must be retrieved for comparison. - * - * @return $this - * - * @see SortableIterator - */ - public function sortByModifiedTime() - { - $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME; - - return $this; - } - - /** - * Filters the iterator with an anonymous function. - * - * The anonymous function receives a \SplFileInfo and must return false - * to remove files. - * - * @return $this - * - * @see CustomFilterIterator - */ - public function filter(\Closure $closure) - { - $this->filters[] = $closure; - - return $this; - } - - /** - * Forces the following of symlinks. - * - * @return $this - */ - public function followLinks() - { - $this->followLinks = true; - - return $this; - } - - /** - * Tells finder to ignore unreadable directories. - * - * By default, scanning unreadable directories content throws an AccessDeniedException. - * - * @return $this - */ - public function ignoreUnreadableDirs(bool $ignore = true) - { - $this->ignoreUnreadableDirs = $ignore; - - return $this; - } - - /** - * Searches files and directories which match defined rules. - * - * @param string|string[] $dirs A directory path or an array of directories - * - * @return $this - * - * @throws DirectoryNotFoundException if one of the directories does not exist - */ - public function in($dirs) - { - $resolvedDirs = []; - - foreach ((array) $dirs as $dir) { - if (is_dir($dir)) { - $resolvedDirs[] = [$this->normalizeDir($dir)]; - } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) { - sort($glob); - $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob); - } else { - throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); - } - } - - $this->dirs = array_merge($this->dirs, ...$resolvedDirs); - - return $this; - } - - /** - * Returns an Iterator for the current Finder configuration. - * - * This method implements the IteratorAggregate interface. - * - * @return \Iterator - * - * @throws \LogicException if the in() method has not been called - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (0 === \count($this->dirs) && 0 === \count($this->iterators)) { - throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); - } - - if (1 === \count($this->dirs) && 0 === \count($this->iterators)) { - $iterator = $this->searchInDirectory($this->dirs[0]); - - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); - } - - return $iterator; - } - - $iterator = new \AppendIterator(); - foreach ($this->dirs as $dir) { - $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) { - return $this->searchInDirectory($dir); - }))); - } - - foreach ($this->iterators as $it) { - $iterator->append($it); - } - - if ($this->sort || $this->reverseSorting) { - $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator(); - } - - return $iterator; - } - - /** - * Appends an existing set of files/directories to the finder. - * - * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. - * - * @return $this - * - * @throws \InvalidArgumentException when the given argument is not iterable - */ - public function append(iterable $iterator) - { - if ($iterator instanceof \IteratorAggregate) { - $this->iterators[] = $iterator->getIterator(); - } elseif ($iterator instanceof \Iterator) { - $this->iterators[] = $iterator; - } elseif (is_iterable($iterator)) { - $it = new \ArrayIterator(); - foreach ($iterator as $file) { - $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file); - $it[$file->getPathname()] = $file; - } - $this->iterators[] = $it; - } else { - throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); - } - - return $this; - } - - /** - * Check if any results were found. - * - * @return bool - */ - public function hasResults() - { - foreach ($this->getIterator() as $_) { - return true; - } - - return false; - } - - /** - * Counts all the results collected by the iterators. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return iterator_count($this->getIterator()); - } - - private function searchInDirectory(string $dir): \Iterator - { - $exclude = $this->exclude; - $notPaths = $this->notPaths; - - if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { - $exclude = array_merge($exclude, self::$vcsPatterns); - } - - if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $notPaths[] = '#(^|/)\..+(/|$)#'; - } - - $minDepth = 0; - $maxDepth = \PHP_INT_MAX; - - foreach ($this->depths as $comparator) { - switch ($comparator->getOperator()) { - case '>': - $minDepth = $comparator->getTarget() + 1; - break; - case '>=': - $minDepth = $comparator->getTarget(); - break; - case '<': - $maxDepth = $comparator->getTarget() - 1; - break; - case '<=': - $maxDepth = $comparator->getTarget(); - break; - default: - $minDepth = $maxDepth = $comparator->getTarget(); - } - } - - $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - - if ($this->followLinks) { - $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; - } - - $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); - - if ($exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude); - } - - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); - - if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) { - $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth); - } - - if ($this->mode) { - $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); - } - - if ($this->names || $this->notNames) { - $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); - } - - if ($this->contains || $this->notContains) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); - } - - if ($this->sizes) { - $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); - } - - if ($this->dates) { - $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); - } - - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); - } - - if ($this->paths || $notPaths) { - $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); - } - - if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) { - $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir); - } - - return $iterator; - } - - /** - * Normalizes given directory names by removing trailing slashes. - * - * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper - */ - private function normalizeDir(string $dir): string - { - if ('/' === $dir) { - return $dir; - } - - $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); - - if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) { - $dir .= '/'; - } - - return $dir; - } -} diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php deleted file mode 100644 index d42cca1..0000000 --- a/vendor/symfony/finder/Gitignore.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Gitignore matches against text. - * - * @author Michael Voříšek - * @author Ahmed Abdou - */ -class Gitignore -{ - /** - * Returns a regexp which is the equivalent of the gitignore pattern. - * - * Format specification: https://git-scm.com/docs/gitignore#_pattern_format - */ - public static function toRegex(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, false); - } - - public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string - { - return self::buildRegex($gitignoreFileContent, true); - } - - private static function buildRegex(string $gitignoreFileContent, bool $inverted): string - { - $gitignoreFileContent = preg_replace('~(? - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Glob matches globbing patterns against text. - * - * if match_glob("foo.*", "foo.bar") echo "matched\n"; - * - * // prints foo.bar and foo.baz - * $regex = glob_to_regex("foo.*"); - * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t) - * { - * if (/$regex/) echo "matched: $car\n"; - * } - * - * Glob implements glob(3) style matching that can be used to match - * against text, rather than fetching names from a filesystem. - * - * Based on the Perl Text::Glob module. - * - * @author Fabien Potencier PHP port - * @author Richard Clamp Perl version - * @copyright 2004-2005 Fabien Potencier - * @copyright 2002 Richard Clamp - */ -class Glob -{ - /** - * Returns a regexp which is the equivalent of the glob pattern. - * - * @return string - */ - public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#') - { - $firstByte = true; - $escaping = false; - $inCurlies = 0; - $regex = ''; - $sizeGlob = \strlen($glob); - for ($i = 0; $i < $sizeGlob; ++$i) { - $car = $glob[$i]; - if ($firstByte && $strictLeadingDot && '.' !== $car) { - $regex .= '(?=[^\.])'; - } - - $firstByte = '/' === $car; - - if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) { - $car = '[^/]++/'; - if (!isset($glob[$i + 3])) { - $car .= '?'; - } - - if ($strictLeadingDot) { - $car = '(?=[^\.])'.$car; - } - - $car = '/(?:'.$car.')*'; - $i += 2 + isset($glob[$i + 3]); - - if ('/' === $delimiter) { - $car = str_replace('/', '\\/', $car); - } - } - - if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) { - $regex .= "\\$car"; - } elseif ('*' === $car) { - $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*'); - } elseif ('?' === $car) { - $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.'); - } elseif ('{' === $car) { - $regex .= $escaping ? '\\{' : '('; - if (!$escaping) { - ++$inCurlies; - } - } elseif ('}' === $car && $inCurlies) { - $regex .= $escaping ? '}' : ')'; - if (!$escaping) { - --$inCurlies; - } - } elseif (',' === $car && $inCurlies) { - $regex .= $escaping ? ',' : '|'; - } elseif ('\\' === $car) { - if ($escaping) { - $regex .= '\\\\'; - $escaping = false; - } else { - $escaping = true; - } - - continue; - } else { - $regex .= $car; - } - $escaping = false; - } - - return $delimiter.'^'.$regex.'$'.$delimiter; - } -} diff --git a/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Iterator/CustomFilterIterator.php deleted file mode 100644 index f7bf19b..0000000 --- a/vendor/symfony/finder/Iterator/CustomFilterIterator.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * CustomFilterIterator filters files by applying anonymous functions. - * - * The anonymous function receives a \SplFileInfo and must return false - * to remove files. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class CustomFilterIterator extends \FilterIterator -{ - private $filters = []; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param callable[] $filters An array of PHP callbacks - * - * @throws \InvalidArgumentException - */ - public function __construct(\Iterator $iterator, array $filters) - { - foreach ($filters as $filter) { - if (!\is_callable($filter)) { - throw new \InvalidArgumentException('Invalid PHP callback.'); - } - } - $this->filters = $filters; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - - foreach ($this->filters as $filter) { - if (false === $filter($fileinfo)) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php deleted file mode 100644 index f592e19..0000000 --- a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\DateComparator; - -/** - * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class DateRangeFilterIterator extends \FilterIterator -{ - private $comparators = []; - - /** - * @param \Iterator $iterator - * @param DateComparator[] $comparators - */ - public function __construct(\Iterator $iterator, array $comparators) - { - $this->comparators = $comparators; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - - if (!file_exists($fileinfo->getPathname())) { - return false; - } - - $filedate = $fileinfo->getMTime(); - foreach ($this->comparators as $compare) { - if (!$compare->test($filedate)) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php deleted file mode 100644 index f593a3f..0000000 --- a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * DepthRangeFilterIterator limits the directory depth. - * - * @author Fabien Potencier - * - * @template-covariant TKey - * @template-covariant TValue - * - * @extends \FilterIterator - */ -class DepthRangeFilterIterator extends \FilterIterator -{ - private $minDepth = 0; - - /** - * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter - * @param int $minDepth The min depth - * @param int $maxDepth The max depth - */ - public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX) - { - $this->minDepth = $minDepth; - $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - return $this->getInnerIterator()->getDepth() >= $this->minDepth; - } -} diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php deleted file mode 100644 index d9e182c..0000000 --- a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * ExcludeDirectoryFilterIterator filters out directories. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - * @implements \RecursiveIterator - */ -class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator -{ - private $iterator; - private $isRecursive; - private $excludedDirs = []; - private $excludedPattern; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $directories An array of directories to exclude - */ - public function __construct(\Iterator $iterator, array $directories) - { - $this->iterator = $iterator; - $this->isRecursive = $iterator instanceof \RecursiveIterator; - $patterns = []; - foreach ($directories as $directory) { - $directory = rtrim($directory, '/'); - if (!$this->isRecursive || str_contains($directory, '/')) { - $patterns[] = preg_quote($directory, '#'); - } else { - $this->excludedDirs[$directory] = true; - } - } - if ($patterns) { - $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#'; - } - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) { - return false; - } - - if ($this->excludedPattern) { - $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath(); - $path = str_replace('\\', '/', $path); - - return !preg_match($this->excludedPattern, $path); - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return $this->isRecursive && $this->iterator->hasChildren(); - } - - /** - * @return self - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - $children = new self($this->iterator->getChildren(), []); - $children->excludedDirs = $this->excludedDirs; - $children->excludedPattern = $this->excludedPattern; - - return $children; - } -} diff --git a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php deleted file mode 100644 index 793ae35..0000000 --- a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * FileTypeFilterIterator only keeps files, directories, or both. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class FileTypeFilterIterator extends \FilterIterator -{ - public const ONLY_FILES = 1; - public const ONLY_DIRECTORIES = 2; - - private $mode; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) - */ - public function __construct(\Iterator $iterator, int $mode) - { - $this->mode = $mode; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) { - return false; - } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) { - return false; - } - - return true; - } -} diff --git a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php deleted file mode 100644 index 79f8c29..0000000 --- a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings). - * - * @author Fabien Potencier - * @author Włodzimierz Gajda - * - * @extends MultiplePcreFilterIterator - */ -class FilecontentFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - if (!$this->matchRegexps && !$this->noMatchRegexps) { - return true; - } - - $fileinfo = $this->current(); - - if ($fileinfo->isDir() || !$fileinfo->isReadable()) { - return false; - } - - $content = $fileinfo->getContents(); - if (!$content) { - return false; - } - - return $this->isAccepted($content); - } - - /** - * Converts string to regexp if necessary. - * - * @param string $str Pattern: string or regexp - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; - } -} diff --git a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/vendor/symfony/finder/Iterator/FilenameFilterIterator.php deleted file mode 100644 index 77b3b24..0000000 --- a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Glob; - -/** - * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). - * - * @author Fabien Potencier - * - * @extends MultiplePcreFilterIterator - */ -class FilenameFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - return $this->isAccepted($this->current()->getFilename()); - } - - /** - * Converts glob to regexp. - * - * PCRE patterns are left unchanged. - * Glob strings are transformed with Glob::toRegex(). - * - * @param string $str Pattern: glob or regexp - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : Glob::toRegex($str); - } -} diff --git a/vendor/symfony/finder/Iterator/LazyIterator.php b/vendor/symfony/finder/Iterator/LazyIterator.php deleted file mode 100644 index 32cc37f..0000000 --- a/vendor/symfony/finder/Iterator/LazyIterator.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * @author Jérémy Derussé - * - * @internal - */ -class LazyIterator implements \IteratorAggregate -{ - private $iteratorFactory; - - public function __construct(callable $iteratorFactory) - { - $this->iteratorFactory = $iteratorFactory; - } - - public function getIterator(): \Traversable - { - yield from ($this->iteratorFactory)(); - } -} diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php deleted file mode 100644 index 9905172..0000000 --- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). - * - * @author Fabien Potencier - * - * @template-covariant TKey - * @template-covariant TValue - * - * @extends \FilterIterator - */ -abstract class MultiplePcreFilterIterator extends \FilterIterator -{ - protected $matchRegexps = []; - protected $noMatchRegexps = []; - - /** - * @param \Iterator $iterator The Iterator to filter - * @param string[] $matchPatterns An array of patterns that need to match - * @param string[] $noMatchPatterns An array of patterns that need to not match - */ - public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns) - { - foreach ($matchPatterns as $pattern) { - $this->matchRegexps[] = $this->toRegex($pattern); - } - - foreach ($noMatchPatterns as $pattern) { - $this->noMatchRegexps[] = $this->toRegex($pattern); - } - - parent::__construct($iterator); - } - - /** - * Checks whether the string is accepted by the regex filters. - * - * If there is no regexps defined in the class, this method will accept the string. - * Such case can be handled by child classes before calling the method if they want to - * apply a different behavior. - * - * @return bool - */ - protected function isAccepted(string $string) - { - // should at least not match one rule to exclude - foreach ($this->noMatchRegexps as $regex) { - if (preg_match($regex, $string)) { - return false; - } - } - - // should at least match one rule - if ($this->matchRegexps) { - foreach ($this->matchRegexps as $regex) { - if (preg_match($regex, $string)) { - return true; - } - } - - return false; - } - - // If there is no match rules, the file is accepted - return true; - } - - /** - * Checks whether the string is a regex. - * - * @return bool - */ - protected function isRegex(string $str) - { - if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) { - $start = substr($m[1], 0, 1); - $end = substr($m[1], -1); - - if ($start === $end) { - return !preg_match('/[*?[:alnum:] \\\\]/', $start); - } - - foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { - if ($start === $delimiters[0] && $end === $delimiters[1]) { - return true; - } - } - } - - return false; - } - - /** - * Converts string into regexp. - * - * @return string - */ - abstract protected function toRegex(string $str); -} diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Iterator/PathFilterIterator.php deleted file mode 100644 index 7974c4e..0000000 --- a/vendor/symfony/finder/Iterator/PathFilterIterator.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * PathFilterIterator filters files by path patterns (e.g. some/special/dir). - * - * @author Fabien Potencier - * @author Włodzimierz Gajda - * - * @extends MultiplePcreFilterIterator - */ -class PathFilterIterator extends MultiplePcreFilterIterator -{ - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $filename = $this->current()->getRelativePathname(); - - if ('\\' === \DIRECTORY_SEPARATOR) { - $filename = str_replace('\\', '/', $filename); - } - - return $this->isAccepted($filename); - } - - /** - * Converts strings to regexp. - * - * PCRE patterns are left unchanged. - * - * Default conversion: - * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' - * - * Use only / as directory separator (on Windows also). - * - * @param string $str Pattern: regexp or dirname - * - * @return string - */ - protected function toRegex(string $str) - { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; - } -} diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php deleted file mode 100644 index 27589cd..0000000 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Exception\AccessDeniedException; -use Symfony\Component\Finder\SplFileInfo; - -/** - * Extends the \RecursiveDirectoryIterator to support relative paths. - * - * @author Victor Berchet - */ -class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator -{ - /** - * @var bool - */ - private $ignoreUnreadableDirs; - - /** - * @var bool - */ - private $rewindable; - - // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations - private $rootPath; - private $subPath; - private $directorySeparator = '/'; - - /** - * @throws \RuntimeException - */ - public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) - { - if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) { - throw new \RuntimeException('This iterator only support returning current as fileinfo.'); - } - - parent::__construct($path, $flags); - $this->ignoreUnreadableDirs = $ignoreUnreadableDirs; - $this->rootPath = $path; - if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) { - $this->directorySeparator = \DIRECTORY_SEPARATOR; - } - } - - /** - * Return an instance of SplFileInfo with support for relative paths. - * - * @return SplFileInfo - */ - #[\ReturnTypeWillChange] - public function current() - { - // the logic here avoids redoing the same work in all iterations - - if (null === $subPathname = $this->subPath) { - $subPathname = $this->subPath = $this->getSubPath(); - } - if ('' !== $subPathname) { - $subPathname .= $this->directorySeparator; - } - $subPathname .= $this->getFilename(); - - if ('/' !== $basePath = $this->rootPath) { - $basePath .= $this->directorySeparator; - } - - return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname); - } - - /** - * @param bool $allowLinks - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren($allowLinks = false) - { - $hasChildren = parent::hasChildren($allowLinks); - - if (!$hasChildren || !$this->ignoreUnreadableDirs) { - return $hasChildren; - } - - try { - parent::getChildren(); - - return true; - } catch (\UnexpectedValueException $e) { - // If directory is unreadable and finder is set to ignore it, skip children - return false; - } - } - - /** - * @return \RecursiveDirectoryIterator - * - * @throws AccessDeniedException - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - try { - $children = parent::getChildren(); - - if ($children instanceof self) { - // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore - $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; - - // performance optimization to avoid redoing the same work in all children - $children->rewindable = &$this->rewindable; - $children->rootPath = $this->rootPath; - } - - return $children; - } catch (\UnexpectedValueException $e) { - throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Do nothing for non rewindable stream. - * - * @return void - */ - #[\ReturnTypeWillChange] - public function rewind() - { - if (false === $this->isRewindable()) { - return; - } - - parent::rewind(); - } - - /** - * Checks if the stream is rewindable. - * - * @return bool - */ - public function isRewindable() - { - if (null !== $this->rewindable) { - return $this->rewindable; - } - - if (false !== $stream = @opendir($this->getPath())) { - $infos = stream_get_meta_data($stream); - closedir($stream); - - if ($infos['seekable']) { - return $this->rewindable = true; - } - } - - return $this->rewindable = false; - } -} diff --git a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php deleted file mode 100644 index 575bf29..0000000 --- a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Comparator\NumberComparator; - -/** - * SizeRangeFilterIterator filters out files that are not in the given size range. - * - * @author Fabien Potencier - * - * @extends \FilterIterator - */ -class SizeRangeFilterIterator extends \FilterIterator -{ - private $comparators = []; - - /** - * @param \Iterator $iterator - * @param NumberComparator[] $comparators - */ - public function __construct(\Iterator $iterator, array $comparators) - { - $this->comparators = $comparators; - - parent::__construct($iterator); - } - - /** - * Filters the iterator values. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $fileinfo = $this->current(); - if (!$fileinfo->isFile()) { - return true; - } - - $filesize = $fileinfo->getSize(); - foreach ($this->comparators as $compare) { - if (!$compare->test($filesize)) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php deleted file mode 100644 index 9afde5c..0000000 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * SortableIterator applies a sort on a given Iterator. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class SortableIterator implements \IteratorAggregate -{ - public const SORT_BY_NONE = 0; - public const SORT_BY_NAME = 1; - public const SORT_BY_TYPE = 2; - public const SORT_BY_ACCESSED_TIME = 3; - public const SORT_BY_CHANGED_TIME = 4; - public const SORT_BY_MODIFIED_TIME = 5; - public const SORT_BY_NAME_NATURAL = 6; - - private $iterator; - private $sort; - - /** - * @param \Traversable $iterator - * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) - * - * @throws \InvalidArgumentException - */ - public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = false) - { - $this->iterator = $iterator; - $order = $reverseOrder ? -1 : 1; - - if (self::SORT_BY_NAME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_NAME_NATURAL === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_TYPE === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - if ($a->isDir() && $b->isFile()) { - return -$order; - } elseif ($a->isFile() && $b->isDir()) { - return $order; - } - - return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); - }; - } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getATime() - $b->getATime()); - }; - } elseif (self::SORT_BY_CHANGED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getCTime() - $b->getCTime()); - }; - } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { - $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) { - return $order * ($a->getMTime() - $b->getMTime()); - }; - } elseif (self::SORT_BY_NONE === $sort) { - $this->sort = $order; - } elseif (\is_callable($sort)) { - $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : $sort; - } else { - throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); - } - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (1 === $this->sort) { - return $this->iterator; - } - - $array = iterator_to_array($this->iterator, true); - - if (-1 === $this->sort) { - $array = array_reverse($array); - } else { - uasort($array, $this->sort); - } - - return new \ArrayIterator($array); - } -} diff --git a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php deleted file mode 100644 index e27158c..0000000 --- a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\Gitignore; - -final class VcsIgnoredFilterIterator extends \FilterIterator -{ - /** - * @var string - */ - private $baseDir; - - /** - * @var array - */ - private $gitignoreFilesCache = []; - - /** - * @var array - */ - private $ignoredPathsCache = []; - - public function __construct(\Iterator $iterator, string $baseDir) - { - $this->baseDir = $this->normalizePath($baseDir); - - parent::__construct($iterator); - } - - public function accept(): bool - { - $file = $this->current(); - - $fileRealPath = $this->normalizePath($file->getRealPath()); - - return !$this->isIgnored($fileRealPath); - } - - private function isIgnored(string $fileRealPath): bool - { - if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) { - $fileRealPath .= '/'; - } - - if (isset($this->ignoredPathsCache[$fileRealPath])) { - return $this->ignoredPathsCache[$fileRealPath]; - } - - $ignored = false; - - foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) { - if ($this->isIgnored($parentDirectory)) { - // rules in ignored directories are ignored, no need to check further. - break; - } - - $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1); - - if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) { - continue; - } - - [$exclusionRegex, $inclusionRegex] = $regexps; - - if (preg_match($exclusionRegex, $fileRelativePath)) { - $ignored = true; - - continue; - } - - if (preg_match($inclusionRegex, $fileRelativePath)) { - $ignored = false; - } - } - - return $this->ignoredPathsCache[$fileRealPath] = $ignored; - } - - /** - * @return list - */ - private function parentsDirectoryDownward(string $fileRealPath): array - { - $parentDirectories = []; - - $parentDirectory = $fileRealPath; - - while (true) { - $newParentDirectory = \dirname($parentDirectory); - - // dirname('/') = '/' - if ($newParentDirectory === $parentDirectory) { - break; - } - - $parentDirectory = $newParentDirectory; - - if (0 !== strpos($parentDirectory, $this->baseDir)) { - break; - } - - $parentDirectories[] = $parentDirectory; - } - - return array_reverse($parentDirectories); - } - - /** - * @return array{0: string, 1: string}|null - */ - private function readGitignoreFile(string $path): ?array - { - if (\array_key_exists($path, $this->gitignoreFilesCache)) { - return $this->gitignoreFilesCache[$path]; - } - - if (!file_exists($path)) { - return $this->gitignoreFilesCache[$path] = null; - } - - if (!is_file($path) || !is_readable($path)) { - throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable."); - } - - $gitignoreFileContent = file_get_contents($path); - - return $this->gitignoreFilesCache[$path] = [ - Gitignore::toRegex($gitignoreFileContent), - Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent), - ]; - } - - private function normalizePath(string $path): string - { - if ('\\' === \DIRECTORY_SEPARATOR) { - return str_replace('\\', '/', $path); - } - - return $path; - } -} diff --git a/vendor/symfony/finder/LICENSE b/vendor/symfony/finder/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/finder/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/finder/README.md b/vendor/symfony/finder/README.md deleted file mode 100644 index 22bdeb9..0000000 --- a/vendor/symfony/finder/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Finder Component -================ - -The Finder component finds files and directories via an intuitive fluent -interface. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/finder.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/finder/SplFileInfo.php b/vendor/symfony/finder/SplFileInfo.php deleted file mode 100644 index 11604a2..0000000 --- a/vendor/symfony/finder/SplFileInfo.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder; - -/** - * Extends \SplFileInfo to support relative paths. - * - * @author Fabien Potencier - */ -class SplFileInfo extends \SplFileInfo -{ - private $relativePath; - private $relativePathname; - - /** - * @param string $file The file name - * @param string $relativePath The relative path - * @param string $relativePathname The relative path name - */ - public function __construct(string $file, string $relativePath, string $relativePathname) - { - parent::__construct($file); - $this->relativePath = $relativePath; - $this->relativePathname = $relativePathname; - } - - /** - * Returns the relative path. - * - * This path does not contain the file name. - * - * @return string - */ - public function getRelativePath() - { - return $this->relativePath; - } - - /** - * Returns the relative path name. - * - * This path contains the file name. - * - * @return string - */ - public function getRelativePathname() - { - return $this->relativePathname; - } - - public function getFilenameWithoutExtension(): string - { - $filename = $this->getFilename(); - - return pathinfo($filename, \PATHINFO_FILENAME); - } - - /** - * Returns the contents of the file. - * - * @return string - * - * @throws \RuntimeException - */ - public function getContents() - { - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $content = file_get_contents($this->getPathname()); - } finally { - restore_error_handler(); - } - if (false === $content) { - throw new \RuntimeException($error); - } - - return $content; - } -} diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json deleted file mode 100644 index ef19911..0000000 --- a/vendor/symfony/finder/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "symfony/finder", - "type": "library", - "description": "Finds files and directories via an intuitive fluent interface", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Finder\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/flex/.php-cs-fixer.dist.php b/vendor/symfony/flex/.php-cs-fixer.dist.php deleted file mode 100644 index e1a10d3..0000000 --- a/vendor/symfony/flex/.php-cs-fixer.dist.php +++ /dev/null @@ -1,18 +0,0 @@ -in(__DIR__); - -return (new PhpCsFixer\Config()) - ->setFinder($finder) - ->setRules(array( - '@Symfony' => true, - '@Symfony:risky' => true, - 'fopen_flags' => false, - '@PHPUnit48Migration:risky' => true, - 'array_syntax' => ['syntax' => 'short'], - 'ordered_imports' => true, - 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice - 'protected_to_private' => false, - )) - ->setRiskyAllowed(true) -; diff --git a/vendor/symfony/flex/LICENSE b/vendor/symfony/flex/LICENSE deleted file mode 100644 index 3c464ca..0000000 --- a/vendor/symfony/flex/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/flex/README.md b/vendor/symfony/flex/README.md deleted file mode 100644 index 1102474..0000000 --- a/vendor/symfony/flex/README.md +++ /dev/null @@ -1,10 +0,0 @@ -

    - -

    - -[Symfony Flex][1] helps developers create [Symfony][2] applications, from the most -simple micro-style projects to the more complex ones with dozens of -dependencies. - -[1]: https://symfony.com/doc/current/setup/flex.html -[2]: https://symfony.com diff --git a/vendor/symfony/flex/composer.json b/vendor/symfony/flex/composer.json deleted file mode 100644 index 9fbe22c..0000000 --- a/vendor/symfony/flex/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "symfony/flex", - "type": "composer-plugin", - "description": "Composer plugin for Symfony", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "minimum-stability": "dev", - "require": { - "php": ">=7.1", - "composer-plugin-api": "^1.0|^2.0" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "symfony/dotenv": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/phpunit-bridge": "^4.4.12|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0" - }, - "autoload": { - "psr-4": { - "Symfony\\Flex\\": "src" - } - }, - "extra": { - "class": "Symfony\\Flex\\Flex" - } -} diff --git a/vendor/symfony/flex/src/Cache.php b/vendor/symfony/flex/src/Cache.php deleted file mode 100644 index 12f71dd..0000000 --- a/vendor/symfony/flex/src/Cache.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Cache as BaseCache; -use Composer\IO\IOInterface; -use Composer\Package\RootPackageInterface; -use Composer\Semver\Constraint\Constraint; -use Composer\Semver\VersionParser; - -/** - * @author Nicolas Grekas - */ -class Cache extends BaseCache -{ - private $versions; - private $versionParser; - private $symfonyRequire; - private $rootConstraints = []; - private $symfonyConstraints; - private $downloader; - private $io; - - public function setSymfonyRequire(string $symfonyRequire, RootPackageInterface $rootPackage, Downloader $downloader, IOInterface $io = null) - { - $this->versionParser = new VersionParser(); - $this->symfonyRequire = $symfonyRequire; - $this->symfonyConstraints = $this->versionParser->parseConstraints($symfonyRequire); - $this->downloader = $downloader; - $this->io = $io; - - foreach ($rootPackage->getRequires() + $rootPackage->getDevRequires() as $name => $link) { - $this->rootConstraints[$name] = $link->getConstraint(); - } - } - - public function read($file) - { - $content = parent::read($file); - - if (0 === strpos($file, 'provider-symfony$') && \is_array($data = json_decode($content, true))) { - $content = json_encode($this->removeLegacyTags($data)); - } - - return $content; - } - - public function removeLegacyTags(array $data): array - { - if (!$this->symfonyConstraints || !isset($data['packages'])) { - return $data; - } - - foreach ($data['packages'] as $name => $versions) { - if (!isset($this->getVersions()['splits'][$name])) { - continue; - } - - $rootConstraint = $this->rootConstraints[$name] ?? null; - $rootVersions = []; - - foreach ($versions as $version => $composerJson) { - if (null !== $alias = $composerJson['extra']['branch-alias'][$version] ?? null) { - $normalizedVersion = $this->versionParser->normalize($alias); - } elseif (null === $normalizedVersion = $composerJson['version_normalized'] ?? null) { - continue; - } - - $constraint = new Constraint('==', $normalizedVersion); - - if ($rootConstraint && $rootConstraint->matches($constraint)) { - $rootVersions[$version] = $composerJson; - } - - if (!$this->symfonyConstraints->matches($constraint)) { - if (null !== $this->io) { - $this->io->writeError(sprintf('Restricting packages listed in "symfony/symfony" to "%s"', $this->symfonyRequire)); - $this->io = null; - } - unset($versions[$version]); - } - } - - if ($rootConstraint && !array_intersect_key($rootVersions, $versions)) { - $versions = $rootVersions; - } - - $data['packages'][$name] = $versions; - } - - if (null === $symfonySymfony = $data['packages']['symfony/symfony'] ?? null) { - return $data; - } - - foreach ($symfonySymfony as $version => $composerJson) { - if (null !== $alias = $composerJson['extra']['branch-alias'][$version] ?? null) { - $normalizedVersion = $this->versionParser->normalize($alias); - } elseif (null === $normalizedVersion = $composerJson['version_normalized'] ?? null) { - continue; - } - - if (!$this->symfonyConstraints->matches(new Constraint('==', $normalizedVersion))) { - unset($symfonySymfony[$version]); - } - } - - if ($symfonySymfony) { - $data['packages']['symfony/symfony'] = $symfonySymfony; - } - - return $data; - } - - private function getVersions(): array - { - if (null !== $this->versions) { - return $this->versions; - } - - $versions = $this->downloader->getVersions(); - $this->downloader = null; - $okVersions = []; - - if (!isset($versions['splits'])) { - throw new \LogicException('The Flex index is missing a "splits" entry. Did you forget to add "flex://defaults" in the "extra.symfony.endpoint" array of your composer.json?'); - } - foreach ($versions['splits'] as $name => $vers) { - foreach ($vers as $i => $v) { - if (!isset($okVersions[$v])) { - $okVersions[$v] = false; - - for ($j = 0; $j < 60; ++$j) { - if ($this->symfonyConstraints->matches(new Constraint('==', $v.'.'.$j.'.0'))) { - $okVersions[$v] = true; - break; - } - } - } - - if (!$okVersions[$v]) { - unset($vers[$i]); - } - } - - if (!$vers || $vers === $versions['splits'][$name]) { - unset($versions['splits'][$name]); - } - } - - return $this->versions = $versions; - } -} diff --git a/vendor/symfony/flex/src/Command/DumpEnvCommand.php b/vendor/symfony/flex/src/Command/DumpEnvCommand.php deleted file mode 100644 index 6f7ed6f..0000000 --- a/vendor/symfony/flex/src/Command/DumpEnvCommand.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\BaseCommand; -use Composer\Config; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Dotenv\Dotenv; -use Symfony\Flex\Options; - -class DumpEnvCommand extends BaseCommand -{ - private $config; - private $options; - - public function __construct(Config $config, Options $options) - { - $this->config = $config; - $this->options = $options; - - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:dump-env') - ->setAliases(['dump-env']) - ->setDescription('Compiles .env files to .env.local.php.') - ->setDefinition([ - new InputArgument('env', InputArgument::OPTIONAL, 'The application environment to dump .env files for - e.g. "prod".'), - ]) - ->addOption('empty', null, InputOption::VALUE_NONE, 'Ignore the content of .env files') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $runtime = $this->options->get('runtime') ?? []; - $envKey = $runtime['env_var_name'] ?? 'APP_ENV'; - - if ($env = $input->getArgument('env') ?? $runtime['env'] ?? null) { - $_SERVER[$envKey] = $env; - } - - $path = $this->options->get('root-dir').'/'.($runtime['dotenv_path'] ?? '.env'); - - if (!$env || !$input->getOption('empty')) { - $vars = $this->loadEnv($path, $env, $runtime); - $env = $vars[$envKey]; - } - - if ($input->getOption('empty')) { - $vars = [$envKey => $env]; - } - - $vars = var_export($vars, true); - $vars = <<getIO()->writeError('Successfully dumped .env files in .env.local.php'); - - return 0; - } - - private function loadEnv(string $path, ?string $env, array $runtime): array - { - if (!file_exists($autoloadFile = $this->config->get('vendor-dir').'/autoload.php')) { - throw new \RuntimeException(sprintf('Please run "composer install" before running this command: "%s" not found.', $autoloadFile)); - } - - require $autoloadFile; - - if (!class_exists(Dotenv::class)) { - throw new \RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); - } - - $envKey = $runtime['env_var_name'] ?? 'APP_ENV'; - $globalsBackup = [$_SERVER, $_ENV]; - unset($_SERVER[$envKey]); - $_ENV = [$envKey => $env]; - $_SERVER['SYMFONY_DOTENV_VARS'] = implode(',', array_keys($_SERVER)); - putenv('SYMFONY_DOTENV_VARS='.$_SERVER['SYMFONY_DOTENV_VARS']); - - try { - if (method_exists(Dotenv::class, 'usePutenv')) { - $dotenv = new Dotenv(); - } else { - $dotenv = new Dotenv(false); - } - - if (!$env && file_exists($p = "$path.local")) { - $env = $_ENV[$envKey] = $dotenv->parse(file_get_contents($p), $p)[$envKey] ?? null; - } - - if (!$env) { - throw new \RuntimeException(sprintf('Please provide the name of the environment either by passing it as command line argument or by defining the "%s" variable in the ".env.local" file.', $envKey)); - } - - $testEnvs = $runtime['test_envs'] ?? ['test']; - - if (method_exists($dotenv, 'loadEnv')) { - $dotenv->loadEnv($path, $envKey, 'dev', $testEnvs); - } else { - // fallback code in case your Dotenv component is not 4.2 or higher (when loadEnv() was added) - $dotenv->load(file_exists($path) || !file_exists($p = "$path.dist") ? $path : $p); - - if (!\in_array($env, $testEnvs, true) && file_exists($p = "$path.local")) { - $dotenv->load($p); - } - - if (file_exists($p = "$path.$env")) { - $dotenv->load($p); - } - - if (file_exists($p = "$path.$env.local")) { - $dotenv->load($p); - } - } - - unset($_ENV['SYMFONY_DOTENV_VARS']); - $env = $_ENV; - } finally { - list($_SERVER, $_ENV) = $globalsBackup; - } - - return $env; - } -} diff --git a/vendor/symfony/flex/src/Command/GenerateIdCommand.php b/vendor/symfony/flex/src/Command/GenerateIdCommand.php deleted file mode 100644 index f262615..0000000 --- a/vendor/symfony/flex/src/Command/GenerateIdCommand.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -class GenerateIdCommand extends Command -{ - public function __construct() - { - // No-op to support downgrading to v1.12.x - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:generate-id'); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $ui = new SymfonyStyle($input, $output); - $ui->error('This command is a noop and should not be used anymore.'); - - return 1; - } -} diff --git a/vendor/symfony/flex/src/Command/InstallRecipesCommand.php b/vendor/symfony/flex/src/Command/InstallRecipesCommand.php deleted file mode 100644 index d1ae1a4..0000000 --- a/vendor/symfony/flex/src/Command/InstallRecipesCommand.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\BaseCommand; -use Composer\DependencyResolver\Operation\InstallOperation; -use Composer\Util\ProcessExecutor; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\Event\UpdateEvent; -use Symfony\Flex\Flex; - -class InstallRecipesCommand extends BaseCommand -{ - /** @var Flex */ - private $flex; - private $rootDir; - private $dotenvPath; - - public function __construct(/* cannot be type-hinted */ $flex, string $rootDir, string $dotenvPath = '.env') - { - $this->flex = $flex; - $this->rootDir = $rootDir; - $this->dotenvPath = $dotenvPath; - - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:recipes:install') - ->setAliases(['recipes:install', 'symfony:sync-recipes', 'sync-recipes', 'fix-recipes']) - ->setDescription('Installs or reinstalls recipes for already installed packages.') - ->addArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Recipes that should be installed.') - ->addOption('force', null, InputOption::VALUE_NONE, 'Overwrite existing files when a new version of a recipe is available') - ->addOption('reset', null, InputOption::VALUE_NONE, 'Reset all recipes back to their initial state (should be combined with --force)') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $win = '\\' === \DIRECTORY_SEPARATOR; - $force = (bool) $input->getOption('force'); - - if ($force && !@is_executable(strtok(exec($win ? 'where git' : 'command -v git'), \PHP_EOL))) { - throw new RuntimeException('Cannot run "sync-recipes --force": git not found.'); - } - - $symfonyLock = $this->flex->getLock(); - $composer = $this->getComposer(); - $locker = $composer->getLocker(); - $lockData = $locker->getLockData(); - - $packages = []; - $totalPackages = []; - foreach ($lockData['packages'] as $pkg) { - $totalPackages[] = $pkg['name']; - if ($force || !$symfonyLock->has($pkg['name'])) { - $packages[] = $pkg['name']; - } - } - foreach ($lockData['packages-dev'] as $pkg) { - $totalPackages[] = $pkg['name']; - if ($force || !$symfonyLock->has($pkg['name'])) { - $packages[] = $pkg['name']; - } - } - - $io = $this->getIO(); - - if (!$io->isVerbose()) { - $io->writeError([ - 'Run command with -v to see more details', - '', - ]); - } - - if ($targetPackages = $input->getArgument('packages')) { - if ($invalidPackages = array_diff($targetPackages, $totalPackages)) { - $io->writeError(sprintf('Cannot update: some packages are not installed: %s', implode(', ', $invalidPackages))); - - return 1; - } - - if ($packagesRequiringForce = array_diff($targetPackages, $packages)) { - $io->writeError(sprintf('Recipe(s) already installed for: %s', implode(', ', $packagesRequiringForce))); - $io->writeError('Re-run the command with --force to re-install the recipes.'); - $io->writeError(''); - } - - $packages = array_diff($targetPackages, $packagesRequiringForce); - } - - if (!$packages) { - $io->writeError('No recipes to install.'); - - return 0; - } - - $composer = $this->getComposer(); - $installedRepo = $composer->getRepositoryManager()->getLocalRepository(); - - $operations = []; - foreach ($packages as $package) { - if (null === $pkg = $installedRepo->findPackage($package, '*')) { - $io->writeError(sprintf('Package %s is not installed', $package)); - - return 1; - } - - $operations[] = new InstallOperation($pkg); - } - - $dotenvFile = $this->dotenvPath; - $dotenvPath = $this->rootDir.'/'.$dotenvFile; - - if ($createEnvLocal = $force && file_exists($dotenvPath) && file_exists($dotenvPath.'.dist') && !file_exists($dotenvPath.'.local')) { - rename($dotenvPath, $dotenvPath.'.local'); - $pipes = []; - proc_close(proc_open(sprintf('git mv %s %s > %s 2>&1 || %s %1$s %2$s', ProcessExecutor::escape($dotenvFile.'.dist'), ProcessExecutor::escape($dotenvFile), $win ? 'NUL' : '/dev/null', $win ? 'rename' : 'mv'), $pipes, $pipes, $this->rootDir)); - if (file_exists($this->rootDir.'/phpunit.xml.dist')) { - touch($dotenvPath.'.test'); - } - } - - $this->flex->update(new UpdateEvent($force, (bool) $input->getOption('reset')), $operations); - - if ($force) { - $output = [ - '', - ' ', - ' Files have been reset to the latest version of the recipe. ', - ' ', - '', - ' * Use git diff to inspect the changes.', - '', - ' Not all of the changes will be relevant to your app: you now', - ' need to selectively add or revert them using e.g. a combination', - ' of git add -p and git checkout -p', - '', - ]; - - if ($createEnvLocal) { - $output[] = ' Dotenv files have been renamed: .env -> .env.local and .env.dist -> .env'; - $output[] = ' See https://symfony.com/doc/current/configuration/dot-env-changes.html'; - $output[] = ''; - } - - $output[] = ' * Use git checkout . to revert the changes.'; - $output[] = ''; - - if ($createEnvLocal) { - $root = '.' !== $this->rootDir ? $this->rootDir.'/' : ''; - $output[] = ' To revert the changes made to .env files, run'; - $output[] = sprintf(' git mv %s %s && %s %s %1$s', ProcessExecutor::escape($root.$dotenvFile), ProcessExecutor::escape($root.$dotenvFile.'.dist'), $win ? 'rename' : 'mv', ProcessExecutor::escape($root.$dotenvFile.'.local')); - $output[] = ''; - } - - $output[] = ' New (untracked) files can be inspected using git clean --dry-run'; - $output[] = ' Add the new files you want to keep using git add'; - $output[] = ' then delete the rest using git clean --force'; - $output[] = ''; - - $io->write($output); - } - - return 0; - } -} diff --git a/vendor/symfony/flex/src/Command/RecipesCommand.php b/vendor/symfony/flex/src/Command/RecipesCommand.php deleted file mode 100644 index 2aaf88e..0000000 --- a/vendor/symfony/flex/src/Command/RecipesCommand.php +++ /dev/null @@ -1,329 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\BaseCommand; -use Composer\Downloader\TransportException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\GithubApi; -use Symfony\Flex\InformationOperation; -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; - -/** - * @author Maxime Hélias - */ -class RecipesCommand extends BaseCommand -{ - /** @var \Symfony\Flex\Flex */ - private $flex; - - private $symfonyLock; - private $githubApi; - - public function __construct(/* cannot be type-hinted */ $flex, Lock $symfonyLock, $downloader) - { - $this->flex = $flex; - $this->symfonyLock = $symfonyLock; - $this->githubApi = new GithubApi($downloader); - - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:recipes') - ->setAliases(['recipes']) - ->setDescription('Shows information about all available recipes.') - ->setDefinition([ - new InputArgument('package', InputArgument::OPTIONAL, 'Package to inspect, if not provided all packages are.'), - ]) - ->addOption('outdated', 'o', InputOption::VALUE_NONE, 'Show only recipes that are outdated') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository(); - - // Inspect one or all packages - $package = $input->getArgument('package'); - if (null !== $package) { - $packages = [0 => ['name' => strtolower($package)]]; - } else { - $locker = $this->getComposer()->getLocker(); - $lockData = $locker->getLockData(); - - // Merge all packages installed - $packages = array_merge($lockData['packages'], $lockData['packages-dev']); - } - - $operations = []; - foreach ($packages as $value) { - if (null === $pkg = $installedRepo->findPackage($value['name'], '*')) { - $this->getIO()->writeError(sprintf('Package %s is not installed', $value['name'])); - - continue; - } - - $operations[] = new InformationOperation($pkg); - } - - $recipes = $this->flex->fetchRecipes($operations, false); - ksort($recipes); - - $nbRecipe = \count($recipes); - if ($nbRecipe <= 0) { - $this->getIO()->writeError('No recipe found'); - - return 1; - } - - // Display the information about a specific recipe - if (1 === $nbRecipe) { - $this->displayPackageInformation(current($recipes)); - - return 0; - } - - $outdated = $input->getOption('outdated'); - - $write = []; - $hasOutdatedRecipes = false; - /** @var Recipe $recipe */ - foreach ($recipes as $name => $recipe) { - $lockRef = $this->symfonyLock->get($name)['recipe']['ref'] ?? null; - - $additional = null; - if (null === $lockRef && null !== $recipe->getRef()) { - $additional = '(recipe not installed)'; - } elseif ($recipe->getRef() !== $lockRef && !$recipe->isAuto()) { - $additional = '(update available)'; - } - - if ($outdated && null === $additional) { - continue; - } - - $hasOutdatedRecipes = true; - $write[] = sprintf(' * %s %s', $name, $additional); - } - - // Nothing to display - if (!$hasOutdatedRecipes) { - return 0; - } - - $this->getIO()->write(array_merge([ - '', - ' ', - sprintf(' %s recipes. ', $outdated ? ' Outdated' : 'Available'), - ' ', - '', - ], $write, [ - '', - 'Run:', - ' * composer recipes vendor/package to see details about a recipe.', - ' * composer recipes:update vendor/package to update that recipe.', - '', - ])); - - if ($outdated) { - return 1; - } - - return 0; - } - - private function displayPackageInformation(Recipe $recipe) - { - $io = $this->getIO(); - $recipeLock = $this->symfonyLock->get($recipe->getName()); - - $lockRef = $recipeLock['recipe']['ref'] ?? null; - $lockRepo = $recipeLock['recipe']['repo'] ?? null; - $lockFiles = $recipeLock['files'] ?? null; - $lockBranch = $recipeLock['recipe']['branch'] ?? null; - $lockVersion = $recipeLock['recipe']['version'] ?? $recipeLock['version'] ?? null; - - $status = 'up to date'; - if ($recipe->isAuto()) { - $status = 'auto-generated recipe'; - } elseif (null === $lockRef && null !== $recipe->getRef()) { - $status = 'recipe not installed'; - } elseif ($recipe->getRef() !== $lockRef) { - $status = 'update available'; - } - - $gitSha = null; - $commitDate = null; - if (null !== $lockRef && null !== $lockRepo) { - try { - $recipeCommitData = $this->githubApi->findRecipeCommitDataFromTreeRef( - $recipe->getName(), - $lockRepo, - $lockBranch ?? '', - $lockVersion, - $lockRef - ); - $gitSha = $recipeCommitData ? $recipeCommitData['commit'] : null; - $commitDate = $recipeCommitData ? $recipeCommitData['date'] : null; - } catch (TransportException $exception) { - $io->writeError('Error downloading exact git sha for installed recipe.'); - } - } - - $io->write('name : '.$recipe->getName()); - $io->write('version : '.($lockVersion ?? 'n/a')); - $io->write('status : '.$status); - if (!$recipe->isAuto() && null !== $lockVersion) { - $recipeUrl = sprintf( - 'https://%s/tree/%s/%s/%s', - $lockRepo, - // if something fails, default to the branch as the closest "sha" - $gitSha ?? $lockBranch, - $recipe->getName(), - $lockVersion - ); - - $io->write('installed recipe : '.$recipeUrl); - } - - if ($lockRef !== $recipe->getRef()) { - $io->write('latest recipe : '.$recipe->getURL()); - } - - if ($lockRef !== $recipe->getRef() && null !== $lockVersion) { - $historyUrl = sprintf( - 'https://%s/commits/%s/%s', - $lockRepo, - $lockBranch, - $recipe->getName() - ); - - // show commits since one second after the currently-installed recipe - if (null !== $commitDate) { - $historyUrl .= '?since='.(new \DateTime($commitDate))->modify('+1 seconds')->format('c\Z'); - } - - $io->write('recipe history : '.$historyUrl); - } - - if (null !== $lockFiles) { - $io->write('files : '); - $io->write(''); - - $tree = $this->generateFilesTree($lockFiles); - - $this->displayFilesTree($tree); - } - - if ($lockRef !== $recipe->getRef()) { - $io->write([ - '', - 'Update this recipe by running:', - sprintf('composer recipes:update %s', $recipe->getName()), - ]); - } - } - - private function generateFilesTree(array $files): array - { - $tree = []; - foreach ($files as $file) { - $path = explode('/', $file); - - $tree = array_merge_recursive($tree, $this->addNode($path)); - } - - return $tree; - } - - private function addNode(array $node): array - { - $current = array_shift($node); - - $subTree = []; - if (null !== $current) { - $subTree[$current] = $this->addNode($node); - } - - return $subTree; - } - - /** - * Note : We do not display file modification information with Configurator like ComposerScripts, Container, DockerComposer, Dockerfile, Env, Gitignore and Makefile. - */ - private function displayFilesTree(array $tree) - { - end($tree); - $endKey = key($tree); - foreach ($tree as $dir => $files) { - $treeBar = '├'; - $total = \count($files); - if (0 === $total || $endKey === $dir) { - $treeBar = '└'; - } - - $info = sprintf( - '%s──%s', - $treeBar, - $dir - ); - $this->writeTreeLine($info); - - $treeBar = str_replace('└', ' ', $treeBar); - - $this->displayTree($files, $treeBar); - } - } - - private function displayTree(array $tree, $previousTreeBar = '├', $level = 1) - { - $previousTreeBar = str_replace('├', '│', $previousTreeBar); - $treeBar = $previousTreeBar.' ├'; - - $i = 0; - $total = \count($tree); - - foreach ($tree as $dir => $files) { - ++$i; - if ($i === $total) { - $treeBar = $previousTreeBar.' └'; - } - - $info = sprintf( - '%s──%s', - $treeBar, - $dir - ); - $this->writeTreeLine($info); - - $treeBar = str_replace('└', ' ', $treeBar); - - $this->displayTree($files, $treeBar, $level + 1); - } - } - - private function writeTreeLine($line) - { - $io = $this->getIO(); - if (!$io->isDecorated()) { - $line = str_replace(['└', '├', '──', '│'], ['`-', '|-', '-', '|'], $line); - } - - $io->write($line); - } -} diff --git a/vendor/symfony/flex/src/Command/RemoveCommand.php b/vendor/symfony/flex/src/Command/RemoveCommand.php deleted file mode 100644 index d6cd698..0000000 --- a/vendor/symfony/flex/src/Command/RemoveCommand.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\RemoveCommand as BaseRemoveCommand; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\PackageResolver; - -class RemoveCommand extends BaseRemoveCommand -{ - private $resolver; - - public function __construct(PackageResolver $resolver) - { - $this->resolver = $resolver; - - parent::__construct(); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $input->setArgument('packages', $this->resolver->resolve($input->getArgument('packages'))); - - return parent::execute($input, $output); - } -} diff --git a/vendor/symfony/flex/src/Command/RequireCommand.php b/vendor/symfony/flex/src/Command/RequireCommand.php deleted file mode 100644 index a92eef0..0000000 --- a/vendor/symfony/flex/src/Command/RequireCommand.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\RequireCommand as BaseRequireCommand; -use Composer\Factory; -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Composer\Plugin\PluginInterface; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\PackageResolver; - -class RequireCommand extends BaseRequireCommand -{ - private $resolver; - private $updateComposerLock; - - public function __construct(PackageResolver $resolver, \Closure $updateComposerLock = null) - { - $this->resolver = $resolver; - $this->updateComposerLock = $updateComposerLock; - - parent::__construct(); - } - - protected function configure() - { - parent::configure(); - $this->addOption('no-unpack', null, InputOption::VALUE_NONE, '[DEPRECATED] Disable unpacking Symfony packs in composer.json.'); - $this->addOption('unpack', null, InputOption::VALUE_NONE, '[DEPRECATED] Unpacking is now enabled by default.'); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - if ($input->getOption('no-unpack')) { - $this->getIO()->writeError('The "--unpack" command line option is deprecated; unpacking is now enabled by default.'); - } - - if ($input->getOption('unpack')) { - $this->getIO()->writeError('The "--unpack" command line option is deprecated; unpacking is now enabled by default.'); - } - - $packages = $this->resolver->resolve($input->getArgument('packages'), true); - if ($packages) { - $input->setArgument('packages', $this->resolver->resolve($input->getArgument('packages'), true)); - } - - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>') && $input->hasOption('no-suggest')) { - $input->setOption('no-suggest', true); - } - - $file = Factory::getComposerFile(); - $contents = file_get_contents($file); - $json = JsonFile::parseJson($contents); - - if (\array_key_exists('require-dev', $json) && !$json['require-dev'] && (new JsonManipulator($contents))->removeMainKey('require-dev')) { - $manipulator = new JsonManipulator($contents); - $manipulator->addLink('require-dev', 'php', '*'); - file_put_contents($file, $manipulator->getContents()); - } else { - $file = null; - } - unset($contents, $json, $manipulator); - - try { - return parent::execute($input, $output) ?? 0; - } finally { - if (null !== $file) { - $manipulator = new JsonManipulator(file_get_contents($file)); - $manipulator->removeSubNode('require-dev', 'php'); - file_put_contents($file, $manipulator->getContents()); - - if ($this->updateComposerLock) { - ($this->updateComposerLock)(); - } - } - } - } -} diff --git a/vendor/symfony/flex/src/Command/UnpackCommand.php b/vendor/symfony/flex/src/Command/UnpackCommand.php deleted file mode 100644 index 3f62108..0000000 --- a/vendor/symfony/flex/src/Command/UnpackCommand.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\BaseCommand; -use Composer\Factory; -use Composer\Installer; -use Composer\Package\Version\VersionParser; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\PackageResolver; -use Symfony\Flex\Unpack\Operation; -use Symfony\Flex\Unpacker; - -/** - * @deprecated since Flex 1.4 - */ -class UnpackCommand extends BaseCommand -{ - private $resolver; - - public function __construct(PackageResolver $resolver) - { - $this->resolver = $resolver; - - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:unpack') - ->setAliases(['unpack']) - ->setDescription('[DEPRECATED] Unpacks a Symfony pack.') - ->setDefinition([ - new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'Installed packages to unpack.'), - new InputOption('sort-packages', null, InputOption::VALUE_NONE, 'Sorts packages'), - ]) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $composer = $this->getComposer(); - $packages = $this->resolver->resolve($input->getArgument('packages'), true); - $io = $this->getIO(); - $lockData = $composer->getLocker()->getLockData(); - $installedRepo = $composer->getRepositoryManager()->getLocalRepository(); - $versionParser = new VersionParser(); - $dryRun = $input->hasOption('dry-run') && $input->getOption('dry-run'); - - $io->writeError('Command "symfony:unpack" is deprecated, Symfony packs are always unpacked now.'); - - $op = new Operation(true, $input->getOption('sort-packages') || $composer->getConfig()->get('sort-packages')); - foreach ($versionParser->parseNameVersionPairs($packages) as $package) { - if (null === $pkg = $installedRepo->findPackage($package['name'], '*')) { - $io->writeError(sprintf('Package %s is not installed', $package['name'])); - - return 1; - } - - $dev = false; - foreach ($lockData['packages-dev'] as $p) { - if ($package['name'] === $p['name']) { - $dev = true; - - break; - } - } - - $op->addPackage($pkg->getName(), $pkg->getVersion(), $dev); - } - - $unpacker = new Unpacker($composer, $this->resolver, $dryRun); - $result = $unpacker->unpack($op); - - // remove the packages themselves - if (!$result->getUnpacked()) { - $io->writeError('Nothing to unpack'); - - return 0; - } - - $io->writeError('Unpacking Symfony packs'); - foreach ($result->getUnpacked() as $pkg) { - $io->writeError(sprintf(' - Unpacked %s', $pkg->getName())); - } - - $unpacker->updateLock($result, $io); - - if ($input->hasOption('no-install') && $input->getOption('no-install')) { - return 0; - } - - $composer = Factory::create($io, null, true); - $installer = Installer::create($io, $composer); - $installer - ->setDryRun($dryRun) - ->setDevMode(true) - ->setDumpAutoloader(false) - ->setIgnorePlatformRequirements(true) - ->setUpdate(true) - ->setUpdateAllowList(['php']) - ; - - if (method_exists($composer->getEventDispatcher(), 'setRunScripts')) { - $composer->getEventDispatcher()->setRunScripts(false); - } else { - $installer->setRunScripts(false); - } - - if (method_exists($installer, 'setSkipSuggest')) { - $installer->setSkipSuggest(true); - } - - return $installer->run(); - } -} diff --git a/vendor/symfony/flex/src/Command/UpdateCommand.php b/vendor/symfony/flex/src/Command/UpdateCommand.php deleted file mode 100644 index 82329f4..0000000 --- a/vendor/symfony/flex/src/Command/UpdateCommand.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\UpdateCommand as BaseUpdateCommand; -use Composer\Plugin\PluginInterface; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\PackageResolver; - -class UpdateCommand extends BaseUpdateCommand -{ - private $resolver; - - public function __construct(PackageResolver $resolver) - { - $this->resolver = $resolver; - - parent::__construct(); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $input->setArgument('packages', $this->resolver->resolve($input->getArgument('packages'))); - - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>') && $input->hasOption('no-suggest')) { - $input->setOption('no-suggest', true); - } - - return parent::execute($input, $output); - } -} diff --git a/vendor/symfony/flex/src/Command/UpdateRecipesCommand.php b/vendor/symfony/flex/src/Command/UpdateRecipesCommand.php deleted file mode 100644 index 9a663cc..0000000 --- a/vendor/symfony/flex/src/Command/UpdateRecipesCommand.php +++ /dev/null @@ -1,423 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Command; - -use Composer\Command\BaseCommand; -use Composer\IO\IOInterface; -use Composer\Util\ProcessExecutor; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Flex\Configurator; -use Symfony\Flex\Downloader; -use Symfony\Flex\Flex; -use Symfony\Flex\GithubApi; -use Symfony\Flex\InformationOperation; -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipePatcher; -use Symfony\Flex\Update\RecipeUpdate; - -class UpdateRecipesCommand extends BaseCommand -{ - /** @var Flex */ - private $flex; - private $downloader; - private $configurator; - private $rootDir; - private $githubApi; - private $processExecutor; - - public function __construct(/* cannot be type-hinted */ $flex, Downloader $downloader, $httpDownloader, Configurator $configurator, string $rootDir) - { - $this->flex = $flex; - $this->downloader = $downloader; - $this->configurator = $configurator; - $this->rootDir = $rootDir; - $this->githubApi = new GithubApi($httpDownloader); - - parent::__construct(); - } - - protected function configure() - { - $this->setName('symfony:recipes:update') - ->setAliases(['recipes:update']) - ->setDescription('Updates an already-installed recipe to the latest version.') - ->addArgument('package', InputArgument::OPTIONAL, 'Recipe that should be updated.') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $win = '\\' === \DIRECTORY_SEPARATOR; - $runtimeExceptionClass = class_exists(RuntimeException::class) ? RuntimeException::class : \RuntimeException::class; - if (!@is_executable(strtok(exec($win ? 'where git' : 'command -v git'), \PHP_EOL))) { - throw new $runtimeExceptionClass('Cannot run "recipes:update": git not found.'); - } - - $io = $this->getIO(); - if (!$this->isIndexClean($io)) { - $io->write([ - ' Cannot run recipes:update: Your git index contains uncommitted changes.', - ' Please commit or stash them and try again!', - ]); - - return 1; - } - - $packageName = $input->getArgument('package'); - $symfonyLock = $this->flex->getLock(); - if (!$packageName) { - $packageName = $this->askForPackage($io, $symfonyLock); - - if (null === $packageName) { - $io->writeError('All packages appear to be up-to-date!'); - - return 0; - } - } - - if (!$symfonyLock->has($packageName)) { - $io->writeError([ - 'Package not found inside symfony.lock. It looks like it\'s not installed?', - sprintf('Try running composer recipes:install %s --force -v to re-install the recipe.', $packageName), - ]); - - return 1; - } - - $packageLockData = $symfonyLock->get($packageName); - if (!isset($packageLockData['recipe'])) { - $io->writeError([ - 'It doesn\'t look like this package had a recipe when it was originally installed.', - 'To install the latest version of the recipe, if there is one, run:', - sprintf(' composer recipes:install %s --force -v', $packageName), - ]); - - return 1; - } - - $recipeRef = $packageLockData['recipe']['ref'] ?? null; - $recipeVersion = $packageLockData['recipe']['version'] ?? null; - if (!$recipeRef || !$recipeVersion) { - $io->writeError([ - 'The version of the installed recipe was not saved into symfony.lock.', - 'This is possible if it was installed by an old version of Symfony Flex.', - 'Update the recipe by re-installing the latest version with:', - sprintf(' composer recipes:install %s --force -v', $packageName), - ]); - - return 1; - } - - $originalRecipe = $this->getRecipe($packageName, $recipeRef, $recipeVersion); - - if (null === $originalRecipe) { - $io->writeError([ - 'The original recipe version you have installed could not be found, it may be too old.', - 'Update the recipe by re-installing the latest version with:', - sprintf(' composer recipes:install %s --force -v', $packageName), - ]); - - return 1; - } - - $newRecipe = $this->getRecipe($packageName); - - if ($newRecipe->getRef() === $originalRecipe->getRef()) { - $io->write(sprintf('This recipe for %s is already at the latest version.', $packageName)); - - return 0; - } - - $io->write([ - sprintf(' Updating recipe for %s...', $packageName), - '', - ]); - - $recipeUpdate = new RecipeUpdate($originalRecipe, $newRecipe, $symfonyLock, $this->rootDir); - $this->configurator->populateUpdate($recipeUpdate); - $originalComposerJsonHash = $this->flex->getComposerJsonHash(); - $patcher = new RecipePatcher($this->rootDir, $io); - - try { - $patch = $patcher->generatePatch($recipeUpdate->getOriginalFiles(), $recipeUpdate->getNewFiles()); - $hasConflicts = !$patcher->applyPatch($patch); - } catch (\Throwable $throwable) { - $io->writeError([ - 'There was an error applying the recipe update patch', - $throwable->getMessage(), - '', - 'Update the recipe by re-installing the latest version with:', - sprintf(' composer recipes:install %s --force -v', $packageName), - ]); - - return 1; - } - - $symfonyLock->add($packageName, $newRecipe->getLock()); - $this->flex->finish($this->rootDir, $originalComposerJsonHash); - - // stage symfony.lock, as all patched files with already be staged - $cmdOutput = ''; - $this->getProcessExecutor()->execute('git add symfony.lock', $cmdOutput, $this->rootDir); - - $io->write([ - ' ', - ' Yes! Recipe updated! ', - ' ', - '', - ]); - - if ($hasConflicts) { - $io->write([ - ' The recipe was updated but with one or more conflicts.', - ' Run git status to see them.', - ' After resolving, commit your changes like normal.', - ]); - } else { - if (!$patch->getPatch()) { - // no changes were required - $io->write([ - ' No files were changed as a result of the update.', - ]); - } else { - $io->write([ - ' Run git status or git diff --cached to see the changes.', - ' When you\'re ready, commit these changes like normal.', - ]); - } - } - - if (0 !== \count($recipeUpdate->getCopyFromPackagePaths())) { - $io->write([ - '', - ' NOTE:', - ' This recipe copies the following paths from the bundle into your app:', - ]); - foreach ($recipeUpdate->getCopyFromPackagePaths() as $source => $target) { - $io->write(sprintf(' * %s => %s', $source, $target)); - } - $io->write([ - '', - ' The recipe updater has no way of knowing if these files have changed since you originally installed the recipe.', - ' And so, no updates were made to these paths.', - ]); - } - - if (0 !== \count($patch->getRemovedPatches())) { - if (1 === \count($patch->getRemovedPatches())) { - $notes = [ - sprintf(' The file %s was not updated because it doesn\'t exist in your app.', array_keys($patch->getRemovedPatches())[0]), - ]; - } else { - $notes = [' The following files were not updated because they don\'t exist in your app:']; - foreach ($patch->getRemovedPatches() as $filename => $contents) { - $notes[] = sprintf(' * %s', $filename); - } - } - $io->write([ - '', - ' NOTE:', - ]); - $io->write($notes); - $io->write(''); - if ($io->askConfirmation(' Would you like to save the "diff" to a file so you can review it? (Y/n) ')) { - $patchFilename = str_replace('/', '.', $packageName).'.updates-for-deleted-files.patch'; - file_put_contents($this->rootDir.'/'.$patchFilename, implode("\n", $patch->getRemovedPatches())); - $io->write([ - '', - sprintf(' Saved diff to %s', $patchFilename), - ]); - } - } - - if ($patch->getPatch()) { - $io->write(''); - $io->write(' Calculating CHANGELOG...', false); - $changelog = $this->generateChangelog($originalRecipe); - $io->write("\r", false); // clear current line - if ($changelog) { - $io->write($changelog); - } else { - $io->write('No CHANGELOG could be calculated.'); - } - } - - return 0; - } - - private function getRecipe(string $packageName, string $recipeRef = null, string $recipeVersion = null): ?Recipe - { - $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository(); - $package = $installedRepo->findPackage($packageName, '*'); - if (null === $package) { - throw new RuntimeException(sprintf('Could not find package "%s". Try running "composer install".', $packageName)); - } - $operation = new InformationOperation($package); - if (null !== $recipeRef) { - $operation->setSpecificRecipeVersion($recipeRef, $recipeVersion); - } - $recipes = $this->downloader->getRecipes([$operation]); - - if (0 === \count($recipes['manifests'] ?? [])) { - return null; - } - - return new Recipe( - $package, - $packageName, - $operation->getOperationType(), - $recipes['manifests'][$packageName], - $recipes['locks'][$packageName] ?? [] - ); - } - - private function generateChangelog(Recipe $originalRecipe): ?array - { - $recipeData = $originalRecipe->getLock()['recipe'] ?? null; - if (null === $recipeData) { - return null; - } - - if (!isset($recipeData['ref']) || !isset($recipeData['repo']) || !isset($recipeData['branch']) || !isset($recipeData['version'])) { - return null; - } - - $currentRecipeVersionData = $this->githubApi->findRecipeCommitDataFromTreeRef( - $originalRecipe->getName(), - $recipeData['repo'], - $recipeData['branch'], - $recipeData['version'], - $recipeData['ref'] - ); - - if (!$currentRecipeVersionData) { - return null; - } - - $recipeVersions = $this->githubApi->getVersionsOfRecipe( - $recipeData['repo'], - $recipeData['branch'], - $originalRecipe->getName() - ); - if (!$recipeVersions) { - return null; - } - - $newerRecipeVersions = array_filter($recipeVersions, function ($version) use ($recipeData) { - return version_compare($version, $recipeData['version'], '>'); - }); - - $newCommits = $currentRecipeVersionData['new_commits']; - foreach ($newerRecipeVersions as $newerRecipeVersion) { - $newCommits = array_merge( - $newCommits, - $this->githubApi->getCommitDataForPath($recipeData['repo'], $originalRecipe->getName().'/'.$newerRecipeVersion, $recipeData['branch']) - ); - } - - $newCommits = array_unique($newCommits); - asort($newCommits); - - $pullRequests = []; - foreach ($newCommits as $commit => $date) { - $pr = $this->githubApi->getPullRequestForCommit($commit, $recipeData['repo']); - if ($pr) { - $pullRequests[$pr['number']] = $pr; - } - } - - $lines = []; - // borrowed from symfony/console's OutputFormatterStyle - $handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - foreach ($pullRequests as $number => $data) { - $url = $data['url']; - if ($handlesHrefGracefully) { - $url = "\033]8;;$url\033\\$number\033]8;;\033\\"; - } - $lines[] = sprintf(' * %s (PR %s)', $data['title'], $url); - } - - return $lines; - } - - private function askForPackage(IOInterface $io, Lock $symfonyLock): ?string - { - $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository(); - $locker = $this->getComposer()->getLocker(); - $lockData = $locker->getLockData(); - - // Merge all packages installed - $packages = array_merge($lockData['packages'], $lockData['packages-dev']); - - $operations = []; - foreach ($packages as $value) { - if (null === $pkg = $installedRepo->findPackage($value['name'], '*')) { - continue; - } - - $operations[] = new InformationOperation($pkg); - } - - $recipes = $this->flex->fetchRecipes($operations, false); - ksort($recipes); - - $outdatedRecipes = []; - foreach ($recipes as $name => $recipe) { - $lockRef = $symfonyLock->get($name)['recipe']['ref'] ?? null; - - if (null !== $lockRef && $recipe->getRef() !== $lockRef && !$recipe->isAuto()) { - $outdatedRecipes[] = $name; - } - } - - if (0 === \count($outdatedRecipes)) { - return null; - } - - $question = 'Which outdated recipe would you like to update? (default: 0)'; - - $choice = $io->select( - $question, - $outdatedRecipes, - 0 - ); - - return $outdatedRecipes[$choice]; - } - - private function isIndexClean(IOInterface $io): bool - { - $output = ''; - - $this->getProcessExecutor()->execute('git status --porcelain --untracked-files=no', $output, $this->rootDir); - if ('' !== trim($output)) { - return false; - } - - return true; - } - - private function getProcessExecutor(): ProcessExecutor - { - if (null === $this->processExecutor) { - $this->processExecutor = new ProcessExecutor($this->getIO()); - } - - return $this->processExecutor; - } -} diff --git a/vendor/symfony/flex/src/ComposerRepository.php b/vendor/symfony/flex/src/ComposerRepository.php deleted file mode 100644 index 26bbb16..0000000 --- a/vendor/symfony/flex/src/ComposerRepository.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Repository\ComposerRepository as BaseComposerRepository; - -/** - * @author Nicolas Grekas - */ -class ComposerRepository extends BaseComposerRepository -{ - private $providerFiles; - - protected function loadProviderListings($data) - { - if (null !== $this->providerFiles) { - parent::loadProviderListings($data); - - return; - } - - $data = [$data]; - - while ($data) { - $this->providerFiles = []; - foreach ($data as $data) { - $this->loadProviderListings($data); - } - - $loadingFiles = $this->providerFiles; - $this->providerFiles = null; - $data = []; - $this->rfs->download($loadingFiles, function (...$args) use (&$data) { - $data[] = $this->fetchFile(...$args); - }); - } - } - - protected function fetchFile($filename, $cacheKey = null, $sha256 = null, $storeLastModifiedTime = false) - { - if (null !== $this->providerFiles) { - $this->providerFiles[] = [$filename, $cacheKey, $sha256, $storeLastModifiedTime]; - - return []; - } - - return parent::fetchFile($filename, $cacheKey, $sha256, $storeLastModifiedTime); - } -} diff --git a/vendor/symfony/flex/src/Configurator.php b/vendor/symfony/flex/src/Configurator.php deleted file mode 100644 index da957f0..0000000 --- a/vendor/symfony/flex/src/Configurator.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Composer; -use Composer\IO\IOInterface; -use Symfony\Flex\Configurator\AbstractConfigurator; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class Configurator -{ - private $composer; - private $io; - private $options; - private $configurators; - private $cache; - - public function __construct(Composer $composer, IOInterface $io, Options $options) - { - $this->composer = $composer; - $this->io = $io; - $this->options = $options; - // ordered list of configurators - $this->configurators = [ - 'bundles' => Configurator\BundlesConfigurator::class, - 'copy-from-recipe' => Configurator\CopyFromRecipeConfigurator::class, - 'copy-from-package' => Configurator\CopyFromPackageConfigurator::class, - 'env' => Configurator\EnvConfigurator::class, - 'container' => Configurator\ContainerConfigurator::class, - 'makefile' => Configurator\MakefileConfigurator::class, - 'composer-scripts' => Configurator\ComposerScriptsConfigurator::class, - 'gitignore' => Configurator\GitignoreConfigurator::class, - 'dockerfile' => Configurator\DockerfileConfigurator::class, - 'docker-compose' => Configurator\DockerComposeConfigurator::class, - ]; - } - - public function install(Recipe $recipe, Lock $lock, array $options = []) - { - $manifest = $recipe->getManifest(); - foreach (array_keys($this->configurators) as $key) { - if (isset($manifest[$key])) { - $this->get($key)->configure($recipe, $manifest[$key], $lock, $options); - } - } - } - - public function populateUpdate(RecipeUpdate $recipeUpdate): void - { - $originalManifest = $recipeUpdate->getOriginalRecipe()->getManifest(); - $newManifest = $recipeUpdate->getNewRecipe()->getManifest(); - foreach (array_keys($this->configurators) as $key) { - if (!isset($originalManifest[$key]) && !isset($newManifest[$key])) { - continue; - } - - $this->get($key)->update($recipeUpdate, $originalManifest[$key] ?? [], $newManifest[$key] ?? []); - } - } - - public function unconfigure(Recipe $recipe, Lock $lock) - { - $manifest = $recipe->getManifest(); - foreach (array_keys($this->configurators) as $key) { - if (isset($manifest[$key])) { - $this->get($key)->unconfigure($recipe, $manifest[$key], $lock); - } - } - } - - private function get($key): AbstractConfigurator - { - if (!isset($this->configurators[$key])) { - throw new \InvalidArgumentException(sprintf('Unknown configurator "%s".', $key)); - } - - if (isset($this->cache[$key])) { - return $this->cache[$key]; - } - - $class = $this->configurators[$key]; - - return $this->cache[$key] = new $class($this->composer, $this->io, $this->options); - } -} diff --git a/vendor/symfony/flex/src/Configurator/AbstractConfigurator.php b/vendor/symfony/flex/src/Configurator/AbstractConfigurator.php deleted file mode 100644 index 26711fc..0000000 --- a/vendor/symfony/flex/src/Configurator/AbstractConfigurator.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Composer\Composer; -use Composer\IO\IOInterface; -use Symfony\Flex\Lock; -use Symfony\Flex\Options; -use Symfony\Flex\Path; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -abstract class AbstractConfigurator -{ - protected $composer; - protected $io; - protected $options; - protected $path; - - public function __construct(Composer $composer, IOInterface $io, Options $options) - { - $this->composer = $composer; - $this->io = $io; - $this->options = $options; - $this->path = new Path($options->get('root-dir')); - } - - abstract public function configure(Recipe $recipe, $config, Lock $lock, array $options = []); - - abstract public function unconfigure(Recipe $recipe, $config, Lock $lock); - - abstract public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void; - - protected function write($messages) - { - if (!\is_array($messages)) { - $messages = [$messages]; - } - foreach ($messages as $i => $message) { - $messages[$i] = ' '.$message; - } - $this->io->writeError($messages, true, IOInterface::VERBOSE); - } - - protected function isFileMarked(Recipe $recipe, string $file): bool - { - return is_file($file) && false !== strpos(file_get_contents($file), sprintf('###> %s ###', $recipe->getName())); - } - - protected function markData(Recipe $recipe, string $data): string - { - return "\n".sprintf('###> %s ###%s%s%s###< %s ###%s', $recipe->getName(), "\n", rtrim($data, "\r\n"), "\n", $recipe->getName(), "\n"); - } - - protected function isFileXmlMarked(Recipe $recipe, string $file): bool - { - return is_file($file) && false !== strpos(file_get_contents($file), sprintf('###+ %s ###', $recipe->getName())); - } - - protected function markXmlData(Recipe $recipe, string $data): string - { - return "\n".sprintf(' %s%s%s %s', $recipe->getName(), "\n", rtrim($data, "\r\n"), "\n", $recipe->getName(), "\n"); - } - - /** - * @return bool True if section was found and replaced - */ - protected function updateData(string $file, string $data): bool - { - if (!file_exists($file)) { - return false; - } - - $contents = file_get_contents($file); - - $newContents = $this->updateDataString($contents, $data); - if (null === $newContents) { - return false; - } - - file_put_contents($file, $newContents); - - return true; - } - - /** - * @return string|null returns the updated content if the section was found, null if not found - */ - protected function updateDataString(string $contents, string $data): ?string - { - $pieces = explode("\n", trim($data)); - $startMark = trim(reset($pieces)); - $endMark = trim(end($pieces)); - - if (false === strpos($contents, $startMark) || false === strpos($contents, $endMark)) { - return null; - } - - $pattern = '/'.preg_quote($startMark, '/').'.*?'.preg_quote($endMark, '/').'/s'; - - return preg_replace($pattern, trim($data), $contents); - } - - protected function extractSection(Recipe $recipe, string $contents): ?string - { - $section = $this->markData($recipe, '----'); - - $pieces = explode("\n", trim($section)); - $startMark = trim(reset($pieces)); - $endMark = trim(end($pieces)); - - $pattern = '/'.preg_quote($startMark, '/').'.*?'.preg_quote($endMark, '/').'/s'; - - $matches = []; - preg_match($pattern, $contents, $matches); - - return $matches[0] ?? null; - } -} diff --git a/vendor/symfony/flex/src/Configurator/BundlesConfigurator.php b/vendor/symfony/flex/src/Configurator/BundlesConfigurator.php deleted file mode 100644 index 877f41b..0000000 --- a/vendor/symfony/flex/src/Configurator/BundlesConfigurator.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class BundlesConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $bundles, Lock $lock, array $options = []) - { - $this->write('Enabling the package as a Symfony bundle'); - $registered = $this->configureBundles($bundles); - $this->dump($this->getConfFile(), $registered); - } - - public function unconfigure(Recipe $recipe, $bundles, Lock $lock) - { - $this->write('Disabling the Symfony bundle'); - $file = $this->getConfFile(); - if (!file_exists($file)) { - return; - } - - $registered = $this->load($file); - foreach (array_keys($this->prepareBundles($bundles)) as $class) { - unset($registered[$class]); - } - $this->dump($file, $registered); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $originalBundles = $this->configureBundles($originalConfig); - $recipeUpdate->setOriginalFile( - $this->getLocalConfFile(), - $this->buildContents($originalBundles) - ); - - $newBundles = $this->configureBundles($newConfig); - $recipeUpdate->setNewFile( - $this->getLocalConfFile(), - $this->buildContents($newBundles) - ); - } - - private function configureBundles(array $bundles): array - { - $file = $this->getConfFile(); - $registered = $this->load($file); - $classes = $this->prepareBundles($bundles); - if (isset($classes[$fwb = 'Symfony\Bundle\FrameworkBundle\FrameworkBundle'])) { - foreach ($classes[$fwb] as $env) { - $registered[$fwb][$env] = true; - } - unset($classes[$fwb]); - } - foreach ($classes as $class => $envs) { - // if the class already existed, clear so we can update the envs - if (isset($registered[$class])) { - $registered[$class] = []; - } - foreach ($envs as $env) { - $registered[$class][$env] = true; - } - } - - return $registered; - } - - private function prepareBundles(array $bundles): array - { - foreach ($bundles as $class => $envs) { - $bundles[ltrim($class, '\\')] = $envs; - } - - return $bundles; - } - - private function load(string $file): array - { - $bundles = file_exists($file) ? (require $file) : []; - if (!\is_array($bundles)) { - $bundles = []; - } - - return $bundles; - } - - private function dump(string $file, array $bundles) - { - $contents = $this->buildContents($bundles); - - if (!is_dir(\dirname($file))) { - mkdir(\dirname($file), 0777, true); - } - - file_put_contents($file, $contents); - - if (\function_exists('opcache_invalidate')) { - opcache_invalidate($file); - } - } - - private function buildContents(array $bundles): string - { - $contents = " $envs) { - $contents .= " $class::class => ["; - foreach ($envs as $env => $value) { - $booleanValue = var_export($value, true); - $contents .= "'$env' => $booleanValue, "; - } - $contents = substr($contents, 0, -2)."],\n"; - } - $contents .= "];\n"; - - return $contents; - } - - private function getConfFile(): string - { - return $this->options->get('root-dir').'/'.$this->getLocalConfFile(); - } - - private function getLocalConfFile(): string - { - return $this->options->expandTargetDir('%CONFIG_DIR%/bundles.php'); - } -} diff --git a/vendor/symfony/flex/src/Configurator/ComposerScriptsConfigurator.php b/vendor/symfony/flex/src/Configurator/ComposerScriptsConfigurator.php deleted file mode 100644 index abdcefc..0000000 --- a/vendor/symfony/flex/src/Configurator/ComposerScriptsConfigurator.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Composer\Factory; -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class ComposerScriptsConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $scripts, Lock $lock, array $options = []) - { - $json = new JsonFile(Factory::getComposerFile()); - - file_put_contents($json->getPath(), $this->configureScripts($scripts, $json)); - } - - public function unconfigure(Recipe $recipe, $scripts, Lock $lock) - { - $json = new JsonFile(Factory::getComposerFile()); - - $jsonContents = $json->read(); - $autoScripts = $jsonContents['scripts']['auto-scripts'] ?? []; - foreach (array_keys($scripts) as $cmd) { - unset($autoScripts[$cmd]); - } - - $manipulator = new JsonManipulator(file_get_contents($json->getPath())); - $manipulator->addSubNode('scripts', 'auto-scripts', $autoScripts); - - file_put_contents($json->getPath(), $manipulator->getContents()); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $json = new JsonFile(Factory::getComposerFile()); - $jsonPath = ltrim(str_replace($recipeUpdate->getRootDir(), '', $json->getPath()), '/\\'); - - $recipeUpdate->setOriginalFile( - $jsonPath, - $this->configureScripts($originalConfig, $json) - ); - $recipeUpdate->setNewFile( - $jsonPath, - $this->configureScripts($newConfig, $json) - ); - } - - private function configureScripts(array $scripts, JsonFile $json): string - { - $jsonContents = $json->read(); - $autoScripts = $jsonContents['scripts']['auto-scripts'] ?? []; - $autoScripts = array_merge($autoScripts, $scripts); - - $manipulator = new JsonManipulator(file_get_contents($json->getPath())); - $manipulator->addSubNode('scripts', 'auto-scripts', $autoScripts); - - return $manipulator->getContents(); - } -} diff --git a/vendor/symfony/flex/src/Configurator/ContainerConfigurator.php b/vendor/symfony/flex/src/Configurator/ContainerConfigurator.php deleted file mode 100644 index 897c8db..0000000 --- a/vendor/symfony/flex/src/Configurator/ContainerConfigurator.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class ContainerConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $parameters, Lock $lock, array $options = []) - { - $this->write('Setting parameters'); - $contents = $this->configureParameters($parameters); - - if (null !== $contents) { - file_put_contents($this->options->get('root-dir').'/'.$this->getServicesPath(), $contents); - } - } - - public function unconfigure(Recipe $recipe, $parameters, Lock $lock) - { - $this->write('Unsetting parameters'); - $target = $this->options->get('root-dir').'/'.$this->getServicesPath(); - $lines = []; - foreach (file($target) as $line) { - if ($this->removeParameters(1, $parameters, $line)) { - continue; - } - $lines[] = $line; - } - file_put_contents($target, implode('', $lines)); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - if ($originalConfig) { - $recipeUpdate->setOriginalFile( - $this->getServicesPath(), - $this->configureParameters($originalConfig, true) - ); - } - - if ($newConfig) { - $recipeUpdate->setNewFile( - $this->getServicesPath(), - $this->configureParameters($newConfig, true) - ); - } - } - - private function configureParameters(array $parameters, bool $update = false): string - { - $target = $this->options->get('root-dir').'/'.$this->getServicesPath(); - $endAt = 0; - $isParameters = false; - $lines = []; - foreach (file($target) as $i => $line) { - $lines[] = $line; - if (!$isParameters && !preg_match('/^parameters:/', $line)) { - continue; - } - if (!$isParameters) { - $isParameters = true; - continue; - } - if (!preg_match('/^\s+.*/', $line) && '' !== trim($line)) { - $endAt = $i - 1; - $isParameters = false; - continue; - } - foreach ($parameters as $key => $value) { - $matches = []; - if (preg_match(sprintf('/^\s+%s\:/', preg_quote($key, '/')), $line, $matches)) { - if ($update) { - $lines[$i] = substr($line, 0, \strlen($matches[0])).' '.str_replace("'", "''", $value)."\n"; - } - - unset($parameters[$key]); - } - } - } - - if ($parameters) { - $parametersLines = []; - if (!$endAt) { - $parametersLines[] = "parameters:\n"; - } - foreach ($parameters as $key => $value) { - if (\is_array($value)) { - $parametersLines[] = sprintf(" %s:\n%s", $key, $this->dumpYaml(2, $value)); - continue; - } - $parametersLines[] = sprintf(" %s: '%s'%s", $key, str_replace("'", "''", $value), "\n"); - } - if (!$endAt) { - $parametersLines[] = "\n"; - } - array_splice($lines, $endAt, 0, $parametersLines); - } - - return implode('', $lines); - } - - private function removeParameters($level, $params, $line) - { - foreach ($params as $key => $value) { - if (\is_array($value) && $this->removeParameters($level + 1, $value, $line)) { - return true; - } - if (preg_match(sprintf('/^(\s{%d}|\t{%d})+%s\:/', 4 * $level, $level, preg_quote($key, '/')), $line)) { - return true; - } - } - - return false; - } - - private function dumpYaml($level, $array): string - { - $line = ''; - foreach ($array as $key => $value) { - $line .= str_repeat(' ', $level); - if (!\is_array($value)) { - $line .= sprintf("%s: '%s'\n", $key, str_replace("'", "''", $value)); - continue; - } - $line .= sprintf("%s:\n", $key).$this->dumpYaml($level + 1, $value); - } - - return $line; - } - - private function getServicesPath(): string - { - return $this->options->expandTargetDir('%CONFIG_DIR%/services.yaml'); - } -} diff --git a/vendor/symfony/flex/src/Configurator/CopyFromPackageConfigurator.php b/vendor/symfony/flex/src/Configurator/CopyFromPackageConfigurator.php deleted file mode 100644 index 9d28fa2..0000000 --- a/vendor/symfony/flex/src/Configurator/CopyFromPackageConfigurator.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class CopyFromPackageConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $config, Lock $lock, array $options = []) - { - $this->write('Copying files from package'); - $packageDir = $this->composer->getInstallationManager()->getInstallPath($recipe->getPackage()); - $options = array_merge($this->options->toArray(), $options); - - $files = $this->getFilesToCopy($config, $packageDir); - foreach ($files as $source => $target) { - $this->copyFile($source, $target, $options); - } - } - - public function unconfigure(Recipe $recipe, $config, Lock $lock) - { - $this->write('Removing files from package'); - $packageDir = $this->composer->getInstallationManager()->getInstallPath($recipe->getPackage()); - $this->removeFiles($config, $packageDir, $this->options->get('root-dir')); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $packageDir = $this->composer->getInstallationManager()->getInstallPath($recipeUpdate->getNewRecipe()->getPackage()); - foreach ($originalConfig as $source => $target) { - if (isset($newConfig[$source])) { - // path is in both, we cannot update - $recipeUpdate->addCopyFromPackagePath( - $packageDir.'/'.$source, - $this->options->expandTargetDir($target) - ); - - unset($newConfig[$source]); - } - - // if any paths were removed from the recipe, we'll keep them - } - - // any remaining files are new, and we can copy them - foreach ($this->getFilesToCopy($newConfig, $packageDir) as $source => $target) { - if (!file_exists($source)) { - throw new \LogicException(sprintf('File "%s" does not exist!', $source)); - } - - $recipeUpdate->setNewFile($target, file_get_contents($source)); - } - } - - private function getFilesToCopy(array $manifest, string $from): array - { - $files = []; - foreach ($manifest as $source => $target) { - $target = $this->options->expandTargetDir($target); - if ('/' === substr($source, -1)) { - $files = array_merge($files, $this->getFilesForDir($this->path->concatenate([$from, $source]), $this->path->concatenate([$target]))); - - continue; - } - - $files[$this->path->concatenate([$from, $source])] = $target; - } - - return $files; - } - - private function removeFiles(array $manifest, string $from, string $to) - { - foreach ($manifest as $source => $target) { - $target = $this->options->expandTargetDir($target); - if ('/' === substr($source, -1)) { - $this->removeFilesFromDir($this->path->concatenate([$from, $source]), $this->path->concatenate([$to, $target])); - } else { - $targetPath = $this->path->concatenate([$to, $target]); - if (file_exists($targetPath)) { - @unlink($targetPath); - $this->write(sprintf(' Removed "%s"', $this->path->relativize($targetPath))); - } - } - } - } - - private function getFilesForDir(string $source, string $target): array - { - $iterator = $this->createSourceIterator($source, \RecursiveIteratorIterator::SELF_FIRST); - $files = []; - foreach ($iterator as $item) { - $targetPath = $this->path->concatenate([$target, $iterator->getSubPathName()]); - - $files[(string) $item] = $targetPath; - } - - return $files; - } - - /** - * @param string $source The absolute path to the source file - * @param string $target The relative (to root dir) path to the target - */ - public function copyFile(string $source, string $target, array $options) - { - $target = $this->options->get('root-dir').'/'.$target; - if (is_dir($source)) { - // directory will be created when a file is copied to it - return; - } - - $overwrite = $options['force'] ?? false; - if (!$this->options->shouldWriteFile($target, $overwrite)) { - return; - } - - if (!file_exists($source)) { - throw new \LogicException(sprintf('File "%s" does not exist!', $source)); - } - - if (!file_exists(\dirname($target))) { - mkdir(\dirname($target), 0777, true); - $this->write(sprintf(' Created "%s"', $this->path->relativize(\dirname($target)))); - } - - file_put_contents($target, $this->options->expandTargetDir(file_get_contents($source))); - @chmod($target, fileperms($target) | (fileperms($source) & 0111)); - $this->write(sprintf(' Created "%s"', $this->path->relativize($target))); - } - - private function removeFilesFromDir(string $source, string $target) - { - if (!is_dir($source)) { - return; - } - $iterator = $this->createSourceIterator($source, \RecursiveIteratorIterator::CHILD_FIRST); - foreach ($iterator as $item) { - $targetPath = $this->path->concatenate([$target, $iterator->getSubPathName()]); - if ($item->isDir()) { - // that removes the dir only if it is empty - @rmdir($targetPath); - $this->write(sprintf(' Removed directory "%s"', $this->path->relativize($targetPath))); - } else { - @unlink($targetPath); - $this->write(sprintf(' Removed "%s"', $this->path->relativize($targetPath))); - } - } - } - - private function createSourceIterator(string $source, int $mode): \RecursiveIteratorIterator - { - return new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), $mode); - } -} diff --git a/vendor/symfony/flex/src/Configurator/CopyFromRecipeConfigurator.php b/vendor/symfony/flex/src/Configurator/CopyFromRecipeConfigurator.php deleted file mode 100644 index b423311..0000000 --- a/vendor/symfony/flex/src/Configurator/CopyFromRecipeConfigurator.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class CopyFromRecipeConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $config, Lock $lock, array $options = []) - { - $this->write('Copying files from recipe'); - $options = array_merge($this->options->toArray(), $options); - - $lock->add($recipe->getName(), ['files' => $this->copyFiles($config, $recipe->getFiles(), $options)]); - } - - public function unconfigure(Recipe $recipe, $config, Lock $lock) - { - $this->write('Removing files from recipe'); - $this->removeFiles($config, $this->getRemovableFilesFromRecipeAndLock($recipe, $lock), $this->options->get('root-dir')); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - foreach ($recipeUpdate->getOriginalRecipe()->getFiles() as $filename => $data) { - $recipeUpdate->setOriginalFile($filename, $data['contents']); - } - - $files = []; - foreach ($recipeUpdate->getNewRecipe()->getFiles() as $filename => $data) { - $recipeUpdate->setNewFile($filename, $data['contents']); - - $files[] = $this->getLocalFilePath($recipeUpdate->getRootDir(), $filename); - } - $recipeUpdate->getLock()->add($recipeUpdate->getPackageName(), ['files' => $files]); - } - - private function getRemovableFilesFromRecipeAndLock(Recipe $recipe, Lock $lock): array - { - $lockedFiles = array_unique( - array_reduce( - array_column($lock->all(), 'files'), - function (array $carry, array $package) { - return array_merge($carry, $package); - }, - [] - ) - ); - - $removableFiles = $recipe->getFiles(); - - $lockedFiles = array_map('realpath', $lockedFiles); - - // Compare file paths by their real path to abstract OS differences - foreach (array_keys($removableFiles) as $file) { - if (\in_array(realpath($file), $lockedFiles)) { - unset($removableFiles[$file]); - } - } - - return $removableFiles; - } - - private function copyFiles(array $manifest, array $files, array $options): array - { - $copiedFiles = []; - $to = $options['root-dir'] ?? '.'; - - foreach ($manifest as $source => $target) { - $target = $this->options->expandTargetDir($target); - if ('/' === substr($source, -1)) { - $copiedFiles = array_merge( - $copiedFiles, - $this->copyDir($source, $this->path->concatenate([$to, $target]), $files, $options) - ); - } else { - $copiedFiles[] = $this->copyFile($this->path->concatenate([$to, $target]), $files[$source]['contents'], $files[$source]['executable'], $options); - } - } - - return $copiedFiles; - } - - private function copyDir(string $source, string $target, array $files, array $options): array - { - $copiedFiles = []; - foreach ($files as $file => $data) { - if (0 === strpos($file, $source)) { - $file = $this->path->concatenate([$target, substr($file, \strlen($source))]); - $copiedFiles[] = $this->copyFile($file, $data['contents'], $data['executable'], $options); - } - } - - return $copiedFiles; - } - - private function copyFile(string $to, string $contents, bool $executable, array $options): string - { - $overwrite = $options['force'] ?? false; - $basePath = $options['root-dir'] ?? '.'; - $copiedFile = $this->getLocalFilePath($basePath, $to); - - if (!$this->options->shouldWriteFile($to, $overwrite)) { - return $copiedFile; - } - - if (!is_dir(\dirname($to))) { - mkdir(\dirname($to), 0777, true); - } - - file_put_contents($to, $this->options->expandTargetDir($contents)); - if ($executable) { - @chmod($to, fileperms($to) | 0111); - } - - $this->write(sprintf(' Created "%s"', $this->path->relativize($to))); - - return $copiedFile; - } - - private function removeFiles(array $manifest, array $files, string $to) - { - foreach ($manifest as $source => $target) { - $target = $this->options->expandTargetDir($target); - - if ('.git' === $target) { - // never remove the main Git directory, even if it was created by a recipe - continue; - } - - if ('/' === substr($source, -1)) { - foreach (array_keys($files) as $file) { - if (0 === strpos($file, $source)) { - $this->removeFile($this->path->concatenate([$to, $target, substr($file, \strlen($source))])); - } - } - } else { - $this->removeFile($this->path->concatenate([$to, $target])); - } - } - } - - private function removeFile(string $to) - { - if (!file_exists($to)) { - return; - } - - @unlink($to); - $this->write(sprintf(' Removed "%s"', $this->path->relativize($to))); - - if (0 === \count(glob(\dirname($to).'/*', \GLOB_NOSORT))) { - @rmdir(\dirname($to)); - } - } - - private function getLocalFilePath(string $basePath, $destination): string - { - return str_replace($basePath.\DIRECTORY_SEPARATOR, '', $destination); - } -} diff --git a/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php b/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php deleted file mode 100644 index aba4f60..0000000 --- a/vendor/symfony/flex/src/Configurator/DockerComposeConfigurator.php +++ /dev/null @@ -1,384 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Composer\Composer; -use Composer\Factory; -use Composer\IO\IOInterface; -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Flex\Lock; -use Symfony\Flex\Options; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * Adds services and volumes to docker-compose.yml file. - * - * @author Kévin Dunglas - */ -class DockerComposeConfigurator extends AbstractConfigurator -{ - private $filesystem; - - public static $configureDockerRecipes = null; - - public function __construct(Composer $composer, IOInterface $io, Options $options) - { - parent::__construct($composer, $io, $options); - - $this->filesystem = new Filesystem(); - } - - public function configure(Recipe $recipe, $config, Lock $lock, array $options = []) - { - if (!self::shouldConfigureDockerRecipe($this->composer, $this->io, $recipe)) { - return; - } - - $this->configureDockerCompose($recipe, $config, $options['force'] ?? false); - - $this->write('Docker Compose definitions have been modified. Please run "docker-compose up --build" again to apply the changes.'); - } - - public function unconfigure(Recipe $recipe, $config, Lock $lock) - { - $rootDir = $this->options->get('root-dir'); - foreach ($this->normalizeConfig($config) as $file => $extra) { - if (null === $dockerComposeFile = $this->findDockerComposeFile($rootDir, $file)) { - continue; - } - - $name = $recipe->getName(); - // Remove recipe and add break line - $contents = preg_replace(sprintf('{%s+###> %s ###.*?###< %s ###%s+}s', "\n", $name, $name, "\n"), \PHP_EOL.\PHP_EOL, file_get_contents($dockerComposeFile), -1, $count); - if (!$count) { - return; - } - - foreach ($extra as $key => $value) { - if (0 === preg_match(sprintf('{^%s:[ \t\r\n]*([ \t]+\w|#)}m', $key), $contents, $matches)) { - $contents = preg_replace(sprintf('{\n?^%s:[ \t\r\n]*}sm', $key), '', $contents, -1, $count); - } - } - - $this->write(sprintf('Removing Docker Compose entries from "%s"', $dockerComposeFile)); - file_put_contents($dockerComposeFile, ltrim($contents, "\n")); - } - - $this->write('Docker Compose definitions have been modified. Please run "docker-compose up" again to apply the changes.'); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - if (!self::shouldConfigureDockerRecipe($this->composer, $this->io, $recipeUpdate->getNewRecipe())) { - return; - } - - $recipeUpdate->addOriginalFiles( - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getOriginalRecipe(), $originalConfig) - ); - - $recipeUpdate->addNewFiles( - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getNewRecipe(), $newConfig) - ); - } - - public static function shouldConfigureDockerRecipe(Composer $composer, IOInterface $io, Recipe $recipe): bool - { - if (null !== self::$configureDockerRecipes) { - return self::$configureDockerRecipes; - } - - if (null !== $dockerPreference = $composer->getPackage()->getExtra()['symfony']['docker'] ?? null) { - self::$configureDockerRecipes = $dockerPreference; - - return self::$configureDockerRecipes; - } - - if ('install' !== $recipe->getJob()) { - // default to not configuring - return false; - } - - if (!isset($_SERVER['SYMFONY_DOCKER'])) { - $answer = self::askDockerSupport($io, $recipe); - } elseif (filter_var($_SERVER['SYMFONY_DOCKER'], \FILTER_VALIDATE_BOOLEAN)) { - $answer = 'p'; - } else { - $answer = 'x'; - } - - if ('n' === $answer) { - self::$configureDockerRecipes = false; - - return self::$configureDockerRecipes; - } - if ('y' === $answer) { - self::$configureDockerRecipes = true; - - return self::$configureDockerRecipes; - } - - // yes or no permanently - self::$configureDockerRecipes = 'p' === $answer; - $json = new JsonFile(Factory::getComposerFile()); - $manipulator = new JsonManipulator(file_get_contents($json->getPath())); - $manipulator->addSubNode('extra', 'symfony.docker', self::$configureDockerRecipes); - file_put_contents($json->getPath(), $manipulator->getContents()); - - return self::$configureDockerRecipes; - } - - /** - * Normalizes the config and return the name of the main Docker Compose file if applicable. - */ - private function normalizeConfig(array $config): array - { - foreach ($config as $val) { - // Support for the short syntax recipe syntax that modifies docker-compose.yml only - return isset($val[0]) ? ['docker-compose.yml' => $config] : $config; - } - - return $config; - } - - /** - * Finds the Docker Compose file according to these rules: https://docs.docker.com/compose/reference/envvars/#compose_file. - */ - private function findDockerComposeFile(string $rootDir, string $file): ?string - { - if (isset($_SERVER['COMPOSE_FILE'])) { - $separator = $_SERVER['COMPOSE_PATH_SEPARATOR'] ?? ('\\' === \DIRECTORY_SEPARATOR ? ';' : ':'); - - $files = explode($separator, $_SERVER['COMPOSE_FILE']); - foreach ($files as $f) { - if ($file !== basename($f)) { - continue; - } - - if (!$this->filesystem->isAbsolutePath($f)) { - $f = realpath(sprintf('%s/%s', $rootDir, $f)); - } - - if ($this->filesystem->exists($f)) { - return $f; - } - } - } - - // COMPOSE_FILE not set, or doesn't contain the file we're looking for - $dir = $rootDir; - do { - // Test with the ".yaml" extension if the file doesn't end up with ".yml". - if ( - $this->filesystem->exists($dockerComposeFile = sprintf('%s/%s', $dir, $file)) || - $this->filesystem->exists($dockerComposeFile = substr($dockerComposeFile, 0, -2).'aml') - ) { - return $dockerComposeFile; - } - - $previousDir = $dir; - $dir = \dirname($dir); - } while ($dir !== $previousDir); - - return null; - } - - private function parse($level, $indent, $services): string - { - $line = ''; - foreach ($services as $key => $value) { - $line .= str_repeat(' ', $indent * $level); - if (!\is_array($value)) { - if (\is_string($key)) { - $line .= sprintf('%s:', $key); - } - $line .= sprintf("%s\n", $value); - continue; - } - $line .= sprintf("%s:\n", $key).$this->parse($level + 1, $indent, $value); - } - - return $line; - } - - private function configureDockerCompose(Recipe $recipe, array $config, bool $update): void - { - $rootDir = $this->options->get('root-dir'); - foreach ($this->normalizeConfig($config) as $file => $extra) { - $dockerComposeFile = $this->findDockerComposeFile($rootDir, $file); - if (null === $dockerComposeFile) { - $dockerComposeFile = $rootDir.'/'.$file; - file_put_contents($dockerComposeFile, "version: '3'\n"); - $this->write(sprintf(' Created "%s"', $file)); - } - - if (!$update && $this->isFileMarked($recipe, $dockerComposeFile)) { - continue; - } - - $this->write(sprintf('Adding Docker Compose definitions to "%s"', $dockerComposeFile)); - - $offset = 2; - $node = null; - $endAt = []; - $startAt = []; - $lines = []; - $nodesLines = []; - foreach (file($dockerComposeFile) as $i => $line) { - $lines[] = $line; - $ltrimedLine = ltrim($line, ' '); - if (null !== $node) { - $nodesLines[$node][$i] = $line; - } - - // Skip blank lines and comments - if (('' !== $ltrimedLine && 0 === strpos($ltrimedLine, '#')) || '' === trim($line)) { - continue; - } - - // Extract Docker Compose keys (usually "services" and "volumes") - if (!preg_match('/^[\'"]?([a-zA-Z0-9]+)[\'"]?:\s*$/', $line, $matches)) { - // Detect indentation to use - $offestLine = \strlen($line) - \strlen($ltrimedLine); - if ($offset > $offestLine && 0 !== $offestLine) { - $offset = $offestLine; - } - continue; - } - - // Keep end in memory (check break line on previous line) - $endAt[$node] = '' !== trim($lines[$i - 1]) ? $i : $i - 1; - $node = $matches[1]; - if (!isset($nodesLines[$node])) { - $nodesLines[$node] = []; - } - if (!isset($startAt[$node])) { - // the section contents starts at the next line - $startAt[$node] = $i + 1; - } - } - $endAt[$node] = \count($lines) + 1; - - foreach ($extra as $key => $value) { - if (isset($endAt[$key])) { - $data = $this->markData($recipe, $this->parse(1, $offset, $value)); - $updatedContents = $this->updateDataString(implode('', $nodesLines[$key]), $data); - if (null === $updatedContents) { - // not an update: just add to section - array_splice($lines, $endAt[$key], 0, $data); - - continue; - } - - $originalEndAt = $endAt[$key]; - $length = $endAt[$key] - $startAt[$key]; - array_splice($lines, $startAt[$key], $length, ltrim($updatedContents, "\n")); - - // reset any start/end positions after this to the new positions - foreach ($startAt as $sectionKey => $at) { - if ($at > $originalEndAt) { - $startAt[$sectionKey] = $at - $length - 1; - } - } - foreach ($endAt as $sectionKey => $at) { - if ($at > $originalEndAt) { - $endAt[$sectionKey] = $at - $length; - } - } - - continue; - } - - $lines[] = sprintf("\n%s:", $key); - $lines[] = $this->markData($recipe, $this->parse(1, $offset, $value)); - } - - file_put_contents($dockerComposeFile, implode('', $lines)); - } - } - - private function getContentsAfterApplyingRecipe(string $rootDir, Recipe $recipe, array $config): array - { - if (0 === \count($config)) { - return []; - } - - $files = array_map(function ($file) use ($rootDir) { - return $this->findDockerComposeFile($rootDir, $file); - }, array_keys($config)); - - $originalContents = []; - foreach ($files as $file) { - $originalContents[$file] = file_exists($file) ? file_get_contents($file) : null; - } - - $this->configureDockerCompose( - $recipe, - $config, - true - ); - - $updatedContents = []; - foreach ($files as $file) { - $localPath = ltrim(str_replace($rootDir, '', $file), '/\\'); - $updatedContents[$localPath] = file_exists($file) ? file_get_contents($file) : null; - } - - foreach ($originalContents as $file => $contents) { - if (null === $contents) { - if (file_exists($file)) { - unlink($file); - } - } else { - file_put_contents($file, $contents); - } - } - - return $updatedContents; - } - - private static function askDockerSupport(IOInterface $io, Recipe $recipe): string - { - $warning = $io->isInteractive() ? 'WARNING' : 'IGNORING'; - $io->writeError(sprintf(' - %s %s', $warning, $recipe->getFormattedOrigin())); - $question = ' The recipe for this package contains some Docker configuration. - - This may create/update docker-compose.yml or update Dockerfile (if it exists). - - Do you want to include Docker configuration from recipes? - [y] Yes - [n] No - [p] Yes permanently, never ask again for this project - [x] No permanently, never ask again for this project - (defaults to y): '; - - return $io->askAndValidate( - $question, - function ($value) { - if (null === $value) { - return 'y'; - } - $value = strtolower($value[0]); - if (!\in_array($value, ['y', 'n', 'p', 'x'], true)) { - throw new \InvalidArgumentException('Invalid choice.'); - } - - return $value; - }, - null, - 'y' - ); - } -} diff --git a/vendor/symfony/flex/src/Configurator/DockerfileConfigurator.php b/vendor/symfony/flex/src/Configurator/DockerfileConfigurator.php deleted file mode 100644 index 423cf9c..0000000 --- a/vendor/symfony/flex/src/Configurator/DockerfileConfigurator.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * Adds commands to a Dockerfile. - * - * @author Kévin Dunglas - */ -class DockerfileConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $config, Lock $lock, array $options = []) - { - if (!DockerComposeConfigurator::shouldConfigureDockerRecipe($this->composer, $this->io, $recipe)) { - return; - } - - $this->configureDockerfile($recipe, $config, $options['force'] ?? false); - } - - public function unconfigure(Recipe $recipe, $config, Lock $lock) - { - if (!file_exists($dockerfile = $this->options->get('root-dir').'/Dockerfile')) { - return; - } - - $name = $recipe->getName(); - $contents = preg_replace(sprintf('{%s+###> %s ###.*?###< %s ###%s+}s', "\n", $name, $name, "\n"), "\n", file_get_contents($dockerfile), -1, $count); - if (!$count) { - return; - } - - $this->write('Removing Dockerfile entries'); - file_put_contents($dockerfile, ltrim($contents, "\n")); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - if (!DockerComposeConfigurator::shouldConfigureDockerRecipe($this->composer, $this->io, $recipeUpdate->getNewRecipe())) { - return; - } - - $recipeUpdate->setOriginalFile( - 'Dockerfile', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getOriginalRecipe(), $originalConfig) - ); - - $recipeUpdate->setNewFile( - 'Dockerfile', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getNewRecipe(), $newConfig) - ); - } - - private function configureDockerfile(Recipe $recipe, array $config, bool $update, bool $writeOutput = true): void - { - $dockerfile = $this->options->get('root-dir').'/Dockerfile'; - if (!file_exists($dockerfile) || (!$update && $this->isFileMarked($recipe, $dockerfile))) { - return; - } - - if ($writeOutput) { - $this->write('Adding Dockerfile entries'); - } - - $data = ltrim($this->markData($recipe, implode("\n", $config)), "\n"); - if ($this->updateData($dockerfile, $data)) { - // done! Existing spot updated - return; - } - - $lines = []; - foreach (file($dockerfile) as $line) { - $lines[] = $line; - if (!preg_match('/^###> recipes ###$/', $line)) { - continue; - } - - $lines[] = $data; - } - - file_put_contents($dockerfile, implode('', $lines)); - } - - private function getContentsAfterApplyingRecipe(Recipe $recipe, array $config): ?string - { - if (0 === \count($config)) { - return null; - } - - $dockerfile = $this->options->get('root-dir').'/Dockerfile'; - $originalContents = file_exists($dockerfile) ? file_get_contents($dockerfile) : null; - - $this->configureDockerfile( - $recipe, - $config, - true, - false - ); - - $updatedContents = file_exists($dockerfile) ? file_get_contents($dockerfile) : null; - - if (null === $originalContents) { - if (file_exists($dockerfile)) { - unlink($dockerfile); - } - } else { - file_put_contents($dockerfile, $originalContents); - } - - return $updatedContents; - } -} diff --git a/vendor/symfony/flex/src/Configurator/EnvConfigurator.php b/vendor/symfony/flex/src/Configurator/EnvConfigurator.php deleted file mode 100644 index 9fd81bd..0000000 --- a/vendor/symfony/flex/src/Configurator/EnvConfigurator.php +++ /dev/null @@ -1,277 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class EnvConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $vars, Lock $lock, array $options = []) - { - $this->write('Adding environment variable defaults'); - - $this->configureEnvDist($recipe, $vars, $options['force'] ?? false); - if (!file_exists($this->options->get('root-dir').'/'.($this->options->get('runtime')['dotenv_path'] ?? '.env').'.test')) { - $this->configurePhpUnit($recipe, $vars, $options['force'] ?? false); - } - } - - public function unconfigure(Recipe $recipe, $vars, Lock $lock) - { - $this->unconfigureEnvFiles($recipe, $vars); - $this->unconfigurePhpUnit($recipe, $vars); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $recipeUpdate->addOriginalFiles( - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getOriginalRecipe(), $originalConfig) - ); - - $recipeUpdate->addNewFiles( - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getNewRecipe(), $newConfig) - ); - } - - private function configureEnvDist(Recipe $recipe, $vars, bool $update) - { - $dotenvPath = $this->options->get('runtime')['dotenv_path'] ?? '.env'; - - foreach ([$dotenvPath.'.dist', $dotenvPath] as $file) { - $env = $this->options->get('root-dir').'/'.$file; - if (!is_file($env)) { - continue; - } - - if (!$update && $this->isFileMarked($recipe, $env)) { - continue; - } - - $data = ''; - foreach ($vars as $key => $value) { - $existingValue = $update ? $this->findExistingValue($key, $env, $recipe) : null; - $value = $this->evaluateValue($value, $existingValue); - if ('#' === $key[0] && is_numeric(substr($key, 1))) { - if ('' === $value) { - $data .= "#\n"; - } else { - $data .= '# '.$value."\n"; - } - - continue; - } - - $value = $this->options->expandTargetDir($value); - if (false !== strpbrk($value, " \t\n&!\"")) { - $value = '"'.str_replace(['\\', '"', "\t", "\n"], ['\\\\', '\\"', '\t', '\n'], $value).'"'; - } - $data .= "$key=$value\n"; - } - $data = $this->markData($recipe, $data); - - if (!$this->updateData($env, $data)) { - file_put_contents($env, $data, \FILE_APPEND); - } - } - } - - private function configurePhpUnit(Recipe $recipe, $vars, bool $update) - { - foreach (['phpunit.xml.dist', 'phpunit.xml'] as $file) { - $phpunit = $this->options->get('root-dir').'/'.$file; - if (!is_file($phpunit)) { - continue; - } - - if (!$update && $this->isFileXmlMarked($recipe, $phpunit)) { - continue; - } - - $data = ''; - foreach ($vars as $key => $value) { - $value = $this->evaluateValue($value); - if ('#' === $key[0]) { - if (is_numeric(substr($key, 1))) { - $doc = new \DOMDocument(); - $data .= ' '.$doc->saveXML($doc->createComment(' '.$value.' '))."\n"; - } else { - $value = $this->options->expandTargetDir($value); - $doc = new \DOMDocument(); - $fragment = $doc->createElement('env'); - $fragment->setAttribute('name', substr($key, 1)); - $fragment->setAttribute('value', $value); - $data .= ' '.str_replace(['<', '/>'], [''], $doc->saveXML($fragment))."\n"; - } - } else { - $value = $this->options->expandTargetDir($value); - $doc = new \DOMDocument(); - $fragment = $doc->createElement('env'); - $fragment->setAttribute('name', $key); - $fragment->setAttribute('value', $value); - $data .= ' '.$doc->saveXML($fragment)."\n"; - } - } - $data = $this->markXmlData($recipe, $data); - - if (!$this->updateData($phpunit, $data)) { - file_put_contents($phpunit, preg_replace('{^(\s+)}m', $data.'$1', file_get_contents($phpunit))); - } - } - } - - private function unconfigureEnvFiles(Recipe $recipe, $vars) - { - $dotenvPath = $this->options->get('runtime')['dotenv_path'] ?? '.env'; - - foreach ([$dotenvPath, $dotenvPath.'.dist'] as $file) { - $env = $this->options->get('root-dir').'/'.$file; - if (!file_exists($env)) { - continue; - } - - $contents = preg_replace(sprintf('{%s*###> %s ###.*###< %s ###%s+}s', "\n", $recipe->getName(), $recipe->getName(), "\n"), "\n", file_get_contents($env), -1, $count); - if (!$count) { - continue; - } - - $this->write(sprintf('Removing environment variables from %s', $file)); - file_put_contents($env, $contents); - } - } - - private function unconfigurePhpUnit(Recipe $recipe, $vars) - { - foreach (['phpunit.xml.dist', 'phpunit.xml'] as $file) { - $phpunit = $this->options->get('root-dir').'/'.$file; - if (!is_file($phpunit)) { - continue; - } - - $contents = preg_replace(sprintf('{%s*\s+.*%s+}s', "\n", $recipe->getName(), $recipe->getName(), "\n"), "\n", file_get_contents($phpunit), -1, $count); - if (!$count) { - continue; - } - - $this->write(sprintf('Removing environment variables from %s', $file)); - file_put_contents($phpunit, $contents); - } - } - - /** - * Evaluates expressions like %generate(secret)%. - * - * If $originalValue is passed, and the value contains an expression. - * the $originalValue is used. - */ - private function evaluateValue($value, string $originalValue = null) - { - if ('%generate(secret)%' === $value) { - if (null !== $originalValue) { - return $originalValue; - } - - return $this->generateRandomBytes(); - } - if (preg_match('~^%generate\(secret,\s*([0-9]+)\)%$~', $value, $matches)) { - if (null !== $originalValue) { - return $originalValue; - } - - return $this->generateRandomBytes($matches[1]); - } - - return $value; - } - - private function generateRandomBytes($length = 16) - { - return bin2hex(random_bytes($length)); - } - - private function getContentsAfterApplyingRecipe(string $rootDir, Recipe $recipe, array $vars): array - { - $dotenvPath = $this->options->get('runtime')['dotenv_path'] ?? '.env'; - $files = [$dotenvPath, $dotenvPath.'.dist', 'phpunit.xml.dist', 'phpunit.xml']; - - if (0 === \count($vars)) { - return array_fill_keys($files, null); - } - - $originalContents = []; - foreach ($files as $file) { - $originalContents[$file] = file_exists($rootDir.'/'.$file) ? file_get_contents($rootDir.'/'.$file) : null; - } - - $this->configureEnvDist( - $recipe, - $vars, - true - ); - - if (!file_exists($rootDir.'/'.$dotenvPath.'.test')) { - $this->configurePhpUnit( - $recipe, - $vars, - true - ); - } - - $updatedContents = []; - foreach ($files as $file) { - $updatedContents[$file] = file_exists($rootDir.'/'.$file) ? file_get_contents($rootDir.'/'.$file) : null; - } - - foreach ($originalContents as $file => $contents) { - if (null === $contents) { - if (file_exists($rootDir.'/'.$file)) { - unlink($rootDir.'/'.$file); - } - } else { - file_put_contents($rootDir.'/'.$file, $contents); - } - } - - return $updatedContents; - } - - /** - * Attempts to find the existing value of an environment variable. - */ - private function findExistingValue(string $var, string $filename, Recipe $recipe): ?string - { - if (!file_exists($filename)) { - return null; - } - - $contents = file_get_contents($filename); - $section = $this->extractSection($recipe, $contents); - if (!$section) { - return null; - } - - $lines = explode("\n", $section); - foreach ($lines as $line) { - if (0 !== strpos($line, sprintf('%s=', $var))) { - continue; - } - - return trim(substr($line, \strlen($var) + 1)); - } - - return null; - } -} diff --git a/vendor/symfony/flex/src/Configurator/GitignoreConfigurator.php b/vendor/symfony/flex/src/Configurator/GitignoreConfigurator.php deleted file mode 100644 index 9d33d6c..0000000 --- a/vendor/symfony/flex/src/Configurator/GitignoreConfigurator.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class GitignoreConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $vars, Lock $lock, array $options = []) - { - $this->write('Adding entries to .gitignore'); - - $this->configureGitignore($recipe, $vars, $options['force'] ?? false); - } - - public function unconfigure(Recipe $recipe, $vars, Lock $lock) - { - $file = $this->options->get('root-dir').'/.gitignore'; - if (!file_exists($file)) { - return; - } - - $contents = preg_replace(sprintf('{%s*###> %s ###.*###< %s ###%s+}s', "\n", $recipe->getName(), $recipe->getName(), "\n"), "\n", file_get_contents($file), -1, $count); - if (!$count) { - return; - } - - $this->write('Removing entries in .gitignore'); - file_put_contents($file, ltrim($contents, "\r\n")); - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $recipeUpdate->setOriginalFile( - '.gitignore', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getOriginalRecipe(), $originalConfig) - ); - - $recipeUpdate->setNewFile( - '.gitignore', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getNewRecipe(), $newConfig) - ); - } - - private function configureGitignore(Recipe $recipe, array $vars, bool $update) - { - $gitignore = $this->options->get('root-dir').'/.gitignore'; - if (!$update && $this->isFileMarked($recipe, $gitignore)) { - return; - } - - $data = ''; - foreach ($vars as $value) { - $value = $this->options->expandTargetDir($value); - $data .= "$value\n"; - } - $data = "\n".ltrim($this->markData($recipe, $data), "\r\n"); - - if (!$this->updateData($gitignore, $data)) { - file_put_contents($gitignore, $data, \FILE_APPEND); - } - } - - private function getContentsAfterApplyingRecipe(string $rootDir, Recipe $recipe, $vars): ?string - { - if (0 === \count($vars)) { - return null; - } - - $file = $rootDir.'/.gitignore'; - $originalContents = file_exists($file) ? file_get_contents($file) : null; - - $this->configureGitignore( - $recipe, - $vars, - true - ); - - $updatedContents = file_exists($file) ? file_get_contents($file) : null; - - if (null === $originalContents) { - if (file_exists($file)) { - unlink($file); - } - } else { - file_put_contents($file, $originalContents); - } - - return $updatedContents; - } -} diff --git a/vendor/symfony/flex/src/Configurator/MakefileConfigurator.php b/vendor/symfony/flex/src/Configurator/MakefileConfigurator.php deleted file mode 100644 index 5b5abe4..0000000 --- a/vendor/symfony/flex/src/Configurator/MakefileConfigurator.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Configurator; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; -use Symfony\Flex\Update\RecipeUpdate; - -/** - * @author Fabien Potencier - */ -class MakefileConfigurator extends AbstractConfigurator -{ - public function configure(Recipe $recipe, $definitions, Lock $lock, array $options = []) - { - $this->write('Adding Makefile entries'); - - $this->configureMakefile($recipe, $definitions, $options['force'] ?? false); - } - - public function unconfigure(Recipe $recipe, $vars, Lock $lock) - { - if (!file_exists($makefile = $this->options->get('root-dir').'/Makefile')) { - return; - } - - $contents = preg_replace(sprintf('{%s*###> %s ###.*###< %s ###%s+}s', "\n", $recipe->getName(), $recipe->getName(), "\n"), "\n", file_get_contents($makefile), -1, $count); - if (!$count) { - return; - } - - $this->write(sprintf('Removing Makefile entries from %s', $makefile)); - if (!trim($contents)) { - @unlink($makefile); - } else { - file_put_contents($makefile, ltrim($contents, "\r\n")); - } - } - - public function update(RecipeUpdate $recipeUpdate, array $originalConfig, array $newConfig): void - { - $recipeUpdate->setOriginalFile( - 'Makefile', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getOriginalRecipe(), $originalConfig) - ); - - $recipeUpdate->setNewFile( - 'Makefile', - $this->getContentsAfterApplyingRecipe($recipeUpdate->getRootDir(), $recipeUpdate->getNewRecipe(), $newConfig) - ); - } - - private function configureMakefile(Recipe $recipe, array $definitions, bool $update) - { - $makefile = $this->options->get('root-dir').'/Makefile'; - if (!$update && $this->isFileMarked($recipe, $makefile)) { - return; - } - - $data = $this->options->expandTargetDir(implode("\n", $definitions)); - $data = $this->markData($recipe, $data); - $data = "\n".ltrim($data, "\r\n"); - - if (!file_exists($makefile)) { - $envKey = $this->options->get('runtime')['env_var_name'] ?? 'APP_ENV'; - $dotenvPath = $this->options->get('runtime')['dotenv_path'] ?? '.env'; - file_put_contents( - $this->options->get('root-dir').'/Makefile', - <<updateData($makefile, $data)) { - file_put_contents($makefile, $data, \FILE_APPEND); - } - } - - private function getContentsAfterApplyingRecipe(string $rootDir, Recipe $recipe, array $definitions): ?string - { - if (0 === \count($definitions)) { - return null; - } - - $file = $rootDir.'/Makefile'; - $originalContents = file_exists($file) ? file_get_contents($file) : null; - - $this->configureMakefile( - $recipe, - $definitions, - true - ); - - $updatedContents = file_exists($file) ? file_get_contents($file) : null; - - if (null === $originalContents) { - if (file_exists($file)) { - unlink($file); - } - } else { - file_put_contents($file, $originalContents); - } - - return $updatedContents; - } -} diff --git a/vendor/symfony/flex/src/CurlDownloader.php b/vendor/symfony/flex/src/CurlDownloader.php deleted file mode 100644 index 9da1333..0000000 --- a/vendor/symfony/flex/src/CurlDownloader.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Downloader\TransportException; - -/** - * @author Nicolas Grekas - */ -class CurlDownloader -{ - private $multiHandle; - private $shareHandle; - private $jobs = []; - private $exceptions = []; - - private static $options = [ - 'http' => [ - 'method' => \CURLOPT_CUSTOMREQUEST, - 'content' => \CURLOPT_POSTFIELDS, - ], - 'ssl' => [ - 'cafile' => \CURLOPT_CAINFO, - 'capath' => \CURLOPT_CAPATH, - ], - ]; - - private static $timeInfo = [ - 'total_time' => true, - 'namelookup_time' => true, - 'connect_time' => true, - 'pretransfer_time' => true, - 'starttransfer_time' => true, - 'redirect_time' => true, - ]; - - public function __construct() - { - $this->multiHandle = $mh = curl_multi_init(); - curl_multi_setopt($mh, \CURLMOPT_PIPELINING, /*CURLPIPE_MULTIPLEX*/ 2); - if (\defined('CURLMOPT_MAX_HOST_CONNECTIONS')) { - curl_multi_setopt($mh, \CURLMOPT_MAX_HOST_CONNECTIONS, 8); - } - - $this->shareHandle = $sh = curl_share_init(); - curl_share_setopt($sh, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_COOKIE); - curl_share_setopt($sh, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_DNS); - curl_share_setopt($sh, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_SSL_SESSION); - } - - public function get($origin, $url, $context, $file) - { - $params = stream_context_get_params($context); - - $ch = curl_init(); - $hd = fopen('php://temp/maxmemory:32768', 'w+b'); - if ($file && !$fd = @fopen($file.'~', 'w+b')) { - $file = null; - } - if (!$file) { - $fd = @fopen('php://temp/maxmemory:524288', 'w+b'); - } - $headers = array_diff($params['options']['http']['header'], ['Connection: close']); - - if (!isset($params['options']['http']['protocol_version'])) { - curl_setopt($ch, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_1_0); - } else { - $headers[] = 'Connection: keep-alive'; - if (0 === strpos($url, 'https://') && \defined('CURL_VERSION_HTTP2') && \defined('CURL_HTTP_VERSION_2_0') && (\CURL_VERSION_HTTP2 & curl_version()['features'])) { - curl_setopt($ch, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_2_0); - } - } - - curl_setopt($ch, \CURLOPT_URL, $url); - curl_setopt($ch, \CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, \CURLOPT_DNS_USE_GLOBAL_CACHE, false); - curl_setopt($ch, \CURLOPT_WRITEHEADER, $hd); - curl_setopt($ch, \CURLOPT_FILE, $fd); - curl_setopt($ch, \CURLOPT_SHARE, $this->shareHandle); - - foreach (self::$options as $type => $options) { - foreach ($options as $name => $curlopt) { - if (isset($params['options'][$type][$name])) { - curl_setopt($ch, $curlopt, $params['options'][$type][$name]); - } - } - } - - $progress = array_diff_key(curl_getinfo($ch), self::$timeInfo); - $this->jobs[(int) $ch] = [ - 'progress' => $progress, - 'ch' => $ch, - 'callback' => $params['notification'], - 'file' => $file, - 'fd' => $fd, - ]; - - curl_multi_add_handle($this->multiHandle, $ch); - $params['notification'](\STREAM_NOTIFY_RESOLVE, \STREAM_NOTIFY_SEVERITY_INFO, '', 0, 0, 0, false); - $active = true; - - try { - while ($active && isset($this->jobs[(int) $ch])) { - curl_multi_exec($this->multiHandle, $active); - curl_multi_select($this->multiHandle); - - while ($progress = curl_multi_info_read($this->multiHandle)) { - if (!isset($this->jobs[$i = (int) $h = $progress['handle']])) { - continue; - } - $progress = array_diff_key(curl_getinfo($h), self::$timeInfo); - $job = $this->jobs[$i]; - unset($this->jobs[$i]); - curl_multi_remove_handle($this->multiHandle, $h); - try { - $this->onProgress($h, $job['callback'], $progress, $job['progress']); - - if ('' !== curl_error($h)) { - throw new TransportException(curl_error($h)); - } - if ($job['file'] && \CURLE_OK === curl_errno($h) && !isset($this->exceptions[$i])) { - fclose($job['fd']); - rename($job['file'].'~', $job['file']); - } - } catch (TransportException $e) { - $this->exceptions[$i] = $e; - } - } - - foreach ($this->jobs as $i => $h) { - if (!isset($this->jobs[$i])) { - continue; - } - $h = $this->jobs[$i]['ch']; - $progress = array_diff_key(curl_getinfo($h), self::$timeInfo); - - if ($this->jobs[$i]['progress'] !== $progress) { - $previousProgress = $this->jobs[$i]['progress']; - $this->jobs[$i]['progress'] = $progress; - try { - $this->onProgress($h, $this->jobs[$i]['callback'], $progress, $previousProgress); - } catch (TransportException $e) { - unset($this->jobs[$i]); - curl_multi_remove_handle($this->multiHandle, $h); - $this->exceptions[$i] = $e; - } - } - } - } - - if ('' !== curl_error($ch) || \CURLE_OK !== curl_errno($ch)) { - $this->exceptions[(int) $ch] = new TransportException(curl_error($ch), curl_getinfo($ch, \CURLINFO_HTTP_CODE) ?: 0); - } - if (isset($this->exceptions[(int) $ch])) { - throw $this->exceptions[(int) $ch]; - } - } finally { - if ($file && !isset($this->exceptions[(int) $ch])) { - $fd = fopen($file, 'rb'); - } - $progress = array_diff_key(curl_getinfo($ch), self::$timeInfo); - $this->finishProgress($ch, $params['notification'], $progress); - unset($this->jobs[(int) $ch], $this->exceptions[(int) $ch]); - curl_multi_remove_handle($this->multiHandle, $ch); - curl_close($ch); - - rewind($hd); - $headers = explode("\r\n", rtrim(stream_get_contents($hd))); - fclose($hd); - - rewind($fd); - $contents = stream_get_contents($fd); - fclose($fd); - } - - return [$headers, $contents]; - } - - private function onProgress($ch, callable $notify, array $progress, array $previousProgress) - { - if (300 <= $progress['http_code'] && $progress['http_code'] < 400 || 0 > $progress['download_content_length']) { - return; - } - - if (!$previousProgress['http_code'] && $progress['http_code'] && $progress['http_code'] < 200 || 400 <= $progress['http_code']) { - $code = 403 === $progress['http_code'] ? \STREAM_NOTIFY_AUTH_RESULT : \STREAM_NOTIFY_FAILURE; - $notify($code, \STREAM_NOTIFY_SEVERITY_ERR, curl_error($ch), $progress['http_code'], 0, 0, false); - } - - if ($previousProgress['download_content_length'] < $progress['download_content_length']) { - $notify(\STREAM_NOTIFY_FILE_SIZE_IS, \STREAM_NOTIFY_SEVERITY_INFO, '', 0, 0, (int) $progress['download_content_length'], false); - } - - if ($previousProgress['size_download'] < $progress['size_download']) { - $notify(\STREAM_NOTIFY_PROGRESS, \STREAM_NOTIFY_SEVERITY_INFO, '', 0, (int) $progress['size_download'], (int) $progress['download_content_length'], false); - } - } - - private function finishProgress($ch, callable $notify, array $progress) - { - if ($progress['download_content_length'] < 0) { - $notify(\STREAM_NOTIFY_FILE_SIZE_IS, \STREAM_NOTIFY_SEVERITY_INFO, '', 0, 0, (int) $progress['size_download'], false); - $notify(\STREAM_NOTIFY_PROGRESS, \STREAM_NOTIFY_SEVERITY_INFO, '', 0, (int) $progress['size_download'], (int) $progress['size_download'], false); - } - } -} diff --git a/vendor/symfony/flex/src/Downloader.php b/vendor/symfony/flex/src/Downloader.php deleted file mode 100644 index 441f364..0000000 --- a/vendor/symfony/flex/src/Downloader.php +++ /dev/null @@ -1,494 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Cache as ComposerCache; -use Composer\Composer; -use Composer\DependencyResolver\Operation\OperationInterface; -use Composer\DependencyResolver\Operation\UninstallOperation; -use Composer\DependencyResolver\Operation\UpdateOperation; -use Composer\IO\IOInterface; -use Composer\Json\JsonFile; -use Composer\Util\Http\Response as ComposerResponse; -use Composer\Util\HttpDownloader; -use Composer\Util\Loop; - -/** - * @author Fabien Potencier - * @author Nicolas Grekas - */ -class Downloader -{ - private const DEFAULT_ENDPOINTS = [ - 'https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json', - 'https://raw.githubusercontent.com/symfony/recipes-contrib/flex/main/index.json', - ]; - private const MAX_LENGTH = 1000; - - private static $versions; - private static $aliases; - - private $io; - private $sess; - private $cache; - - /** @var HttpDownloader|ParallelDownloader */ - private $rfs; - private $degradedMode = false; - private $endpoints; - private $index; - private $conflicts; - private $legacyEndpoint; - private $caFile; - private $enabled = true; - private $composer; - - public function __construct(Composer $composer, IoInterface $io, $rfs) - { - if (getenv('SYMFONY_CAFILE')) { - $this->caFile = getenv('SYMFONY_CAFILE'); - } - - if (null === $endpoint = $composer->getPackage()->getExtra()['symfony']['endpoint'] ?? null) { - $this->endpoints = self::DEFAULT_ENDPOINTS; - } elseif (\is_array($endpoint) || false !== strpos($endpoint, '.json') || 'flex://defaults' === $endpoint) { - $this->endpoints = array_values((array) $endpoint); - if (\is_string($endpoint) && false !== strpos($endpoint, '.json')) { - $this->endpoints[] = 'flex://defaults'; - } - } else { - $this->legacyEndpoint = rtrim($endpoint, '/'); - } - - if (false === $endpoint = getenv('SYMFONY_ENDPOINT')) { - // no-op - } elseif (false !== strpos($endpoint, '.json') || 'flex://defaults' === $endpoint) { - $this->endpoints ?? $this->endpoints = self::DEFAULT_ENDPOINTS; - array_unshift($this->endpoints, $endpoint); - $this->legacyEndpoint = null; - } else { - $this->endpoints = null; - $this->legacyEndpoint = rtrim($endpoint, '/'); - } - - if (null !== $this->endpoints) { - if (false !== $i = array_search('flex://defaults', $this->endpoints, true)) { - array_splice($this->endpoints, $i, 1, self::DEFAULT_ENDPOINTS); - } - - $this->endpoints = array_fill_keys($this->endpoints, []); - } - - $this->io = $io; - $config = $composer->getConfig(); - $this->rfs = $rfs; - $this->cache = new ComposerCache($io, $config->get('cache-repo-dir').'/flex'); - $this->sess = bin2hex(random_bytes(16)); - $this->composer = $composer; - } - - public function getSessionId(): string - { - return $this->sess; - } - - public function setFlexId(string $id = null) - { - // No-op to support downgrading to v1.12.x - } - - public function isEnabled() - { - return $this->enabled; - } - - public function disable() - { - $this->enabled = false; - } - - public function getVersions() - { - $this->initialize(); - - return self::$versions ?? self::$versions = current($this->get([$this->legacyEndpoint.'/versions.json'])); - } - - public function getAliases() - { - $this->initialize(); - - return self::$aliases ?? self::$aliases = current($this->get([$this->legacyEndpoint.'/aliases.json'])); - } - - /** - * Downloads recipes. - * - * @param OperationInterface[] $operations - */ - public function getRecipes(array $operations): array - { - $this->initialize(); - - if ($this->conflicts) { - $lockedRepository = $this->composer->getLocker()->getLockedRepository(); - foreach ($this->conflicts as $conflicts) { - foreach ($conflicts as $package => $versions) { - foreach ($versions as $version => $conflicts) { - foreach ($conflicts as $conflictingPackage => $constraint) { - if ($lockedRepository->findPackage($conflictingPackage, $constraint)) { - unset($this->index[$package][$version]); - } - } - } - } - } - $this->conflicts = []; - } - - $data = []; - $urls = []; - $chunk = ''; - $recipeRef = null; - foreach ($operations as $operation) { - $o = 'i'; - if ($operation instanceof UpdateOperation) { - $package = $operation->getTargetPackage(); - $o = 'u'; - } else { - $package = $operation->getPackage(); - if ($operation instanceof UninstallOperation) { - $o = 'r'; - } - - if ($operation instanceof InformationOperation) { - $recipeRef = $operation->getRecipeRef(); - } - } - - $version = $package->getPrettyVersion(); - if ($operation instanceof InformationOperation && $operation->getVersion()) { - $version = $operation->getVersion(); - } - if (0 === strpos($version, 'dev-') && isset($package->getExtra()['branch-alias'])) { - $branchAliases = $package->getExtra()['branch-alias']; - if ( - (isset($branchAliases[$version]) && $alias = $branchAliases[$version]) || - (isset($branchAliases['dev-main']) && $alias = $branchAliases['dev-main']) || - (isset($branchAliases['dev-trunk']) && $alias = $branchAliases['dev-trunk']) || - (isset($branchAliases['dev-develop']) && $alias = $branchAliases['dev-develop']) || - (isset($branchAliases['dev-default']) && $alias = $branchAliases['dev-default']) || - (isset($branchAliases['dev-latest']) && $alias = $branchAliases['dev-latest']) || - (isset($branchAliases['dev-next']) && $alias = $branchAliases['dev-next']) || - (isset($branchAliases['dev-current']) && $alias = $branchAliases['dev-current']) || - (isset($branchAliases['dev-support']) && $alias = $branchAliases['dev-support']) || - (isset($branchAliases['dev-tip']) && $alias = $branchAliases['dev-tip']) || - (isset($branchAliases['dev-master']) && $alias = $branchAliases['dev-master']) - ) { - $version = $alias; - } - } - - if ($recipeVersions = $this->index[$package->getName()] ?? null) { - $version = explode('.', preg_replace('/^dev-|^v|\.x-dev$|-dev$/', '', $version)); - $version = $version[0].'.'.($version[1] ?? '9999999'); - - foreach (array_reverse($recipeVersions) as $v => $endpoint) { - if (version_compare($version, $v, '<')) { - continue; - } - - $data['locks'][$package->getName()]['version'] = $version; - $data['locks'][$package->getName()]['recipe']['version'] = $v; - $links = $this->endpoints[$endpoint]['_links']; - - if (null !== $recipeRef && isset($links['archived_recipes_template'])) { - if (isset($links['archived_recipes_template_relative'])) { - $links['archived_recipes_template'] = preg_replace('{[^/\?]*+(?=\?|$)}', $links['archived_recipes_template_relative'], $endpoint, 1); - } - - $urls[] = strtr($links['archived_recipes_template'], [ - '{package_dotted}' => str_replace('/', '.', $package->getName()), - '{ref}' => $recipeRef, - ]); - - break; - } - - if (isset($links['recipes_template_relative'])) { - $links['recipes_template'] = preg_replace('{[^/\?]*+(?=\?|$)}', $links['recipes_template_relative'], $endpoint, 1); - } - - $urls[] = strtr($links['recipe_template'], [ - '{package_dotted}' => str_replace('/', '.', $package->getName()), - '{package}' => $package->getName(), - '{version}' => $v, - ]); - - break; - } - - continue; - } - - if (\is_array($recipeVersions)) { - $data['conflicts'][$package->getName()] = true; - } - - if (null !== $this->endpoints) { - $data['locks'][$package->getName()]['version'] = $version; - continue; - } - - // FIXME: Multi name with getNames() - $name = str_replace('/', ',', $package->getName()); - $path = sprintf('%s,%s%s', $name, $o, $version); - if ($date = $package->getReleaseDate()) { - $path .= ','.$date->format('U'); - } - if (\strlen($chunk) + \strlen($path) > self::MAX_LENGTH) { - $urls[] = $this->legacyEndpoint.'/p/'.$chunk; - $chunk = $path; - } elseif ($chunk) { - $chunk .= ';'.$path; - } else { - $chunk = $path; - } - } - if ($chunk) { - $urls[] = $this->legacyEndpoint.'/p/'.$chunk; - } - - if (null === $this->endpoints) { - foreach ($this->get($urls, true) as $body) { - foreach ($body['manifests'] ?? [] as $name => $manifest) { - $data['manifests'][$name] = $manifest; - } - foreach ($body['locks'] ?? [] as $name => $lock) { - $data['locks'][$name] = $lock; - } - } - } else { - foreach ($this->get($urls, true) as $body) { - foreach ($body['manifests'] ?? [] as $name => $manifest) { - if (null === $version = $data['locks'][$name]['recipe']['version'] ?? null) { - continue; - } - $endpoint = $this->endpoints[$this->index[$name][$version]]; - - $data['locks'][$name]['recipe'] = [ - 'repo' => $endpoint['_links']['repository'], - 'branch' => $endpoint['branch'], - 'version' => $version, - 'ref' => $manifest['ref'], - ]; - - foreach ($manifest['files'] ?? [] as $i => $file) { - $manifest['files'][$i]['contents'] = \is_array($file['contents']) ? implode("\n", $file['contents']) : base64_decode($file['contents']); - } - - $data['manifests'][$name] = $manifest + [ - 'repository' => $endpoint['_links']['repository'], - 'package' => $name, - 'version' => $version, - 'origin' => strtr($endpoint['_links']['origin_template'], [ - '{package}' => $name, - '{version}' => $version, - ]), - 'is_contrib' => $endpoint['is_contrib'] ?? false, - ]; - } - } - } - - return $data; - } - - /** - * Used to "hide" a recipe version so that the next most-recent will be returned. - * - * This is used when resolving "conflicts". - */ - public function removeRecipeFromIndex(string $packageName, string $version) - { - unset($this->index[$packageName][$version]); - } - - /** - * Fetches and decodes JSON HTTP response bodies. - */ - private function get(array $urls, bool $isRecipe = false, int $try = 3): array - { - $responses = []; - $retries = []; - $options = []; - - foreach ($urls as $url) { - $cacheKey = self::generateCacheKey($url); - $headers = []; - - if (preg_match('{^https?://api\.github\.com/}', $url)) { - $headers[] = 'Accept: application/vnd.github.v3.raw'; - } elseif (preg_match('{^https?://raw\.githubusercontent\.com/}', $url) && $this->io->hasAuthentication('github.com')) { - $auth = $this->io->getAuthentication('github.com'); - if ('x-oauth-basic' === $auth['password']) { - $headers[] = 'Authorization: token '.$auth['username']; - } - } elseif ($this->legacyEndpoint) { - $headers[] = 'Package-Session: '.$this->sess; - } - - if ($contents = $this->cache->read($cacheKey)) { - $cachedResponse = Response::fromJson(json_decode($contents, true)); - if ($lastModified = $cachedResponse->getHeader('last-modified')) { - $headers[] = 'If-Modified-Since: '.$lastModified; - } - if ($eTag = $cachedResponse->getHeader('etag')) { - $headers[] = 'If-None-Match: '.$eTag; - } - $responses[$url] = $cachedResponse->getBody(); - } - - $options[$url] = $this->getOptions($headers); - } - - if ($this->rfs instanceof HttpDownloader) { - $loop = new Loop($this->rfs); - $jobs = []; - foreach ($urls as $url) { - $jobs[] = $this->rfs->add($url, $options[$url])->then(function (ComposerResponse $response) use ($url, &$responses) { - if (200 === $response->getStatusCode()) { - $cacheKey = self::generateCacheKey($url); - $responses[$url] = $this->parseJson($response->getBody(), $url, $cacheKey, $response->getHeaders())->getBody(); - } - }, function (\Exception $e) use ($url, &$retries) { - $retries[] = [$url, $e]; - }); - } - $loop->wait($jobs); - } else { - foreach ($urls as $i => $url) { - $urls[$i] = [$url]; - } - $this->rfs->download($urls, function ($url) use ($options, &$responses, &$retries, &$error) { - try { - $cacheKey = self::generateCacheKey($url); - $origin = method_exists($this->rfs, 'getOrigin') ? $this->rfs::getOrigin($url) : parse_url($url, \PHP_URL_HOST); - $json = $this->rfs->getContents($origin, $url, false, $options[$url]); - if (200 === $this->rfs->findStatusCode($this->rfs->getLastHeaders())) { - $responses[$url] = $this->parseJson($json, $url, $cacheKey, $this->rfs->getLastHeaders())->getBody(); - } - } catch (\Exception $e) { - $retries[] = [$url, $e]; - } - }); - } - - if (!$retries) { - return $responses; - } - - if (0 < --$try) { - usleep(100000); - - return $this->get(array_column($retries, 0), $isRecipe, $try) + $responses; - } - - foreach ($retries as [$url, $e]) { - if (isset($responses[$url])) { - $this->switchToDegradedMode($e, $url); - } elseif ($isRecipe) { - $this->io->writeError('Failed to download recipe: '.$e->getMessage().''); - } else { - throw $e; - } - } - - return $responses; - } - - private function parseJson(string $json, string $url, string $cacheKey, array $lastHeaders): Response - { - $data = JsonFile::parseJson($json, $url); - if (!empty($data['warning'])) { - $this->io->writeError('Warning from '.$url.': '.$data['warning'].''); - } - if (!empty($data['info'])) { - $this->io->writeError('Info from '.$url.': '.$data['info'].''); - } - - $response = new Response($data, $lastHeaders); - if ($cacheKey && ($response->getHeader('last-modified') || $response->getHeader('etag'))) { - $this->cache->write($cacheKey, json_encode($response)); - } - - return $response; - } - - private function switchToDegradedMode(\Exception $e, string $url) - { - if (!$this->degradedMode) { - $this->io->writeError(''.$e->getMessage().''); - $this->io->writeError(''.$url.' could not be fully loaded, package information was loaded from the local cache and may be out of date'); - } - $this->degradedMode = true; - } - - private function getOptions(array $headers): array - { - $options = ['http' => ['header' => $headers]]; - - if (null !== $this->caFile) { - $options['ssl']['cafile'] = $this->caFile; - } - - return $options; - } - - private function initialize() - { - if (null !== $this->index || null === $this->endpoints) { - $this->index ?? $this->index = []; - - return; - } - - $indexes = self::$versions = self::$aliases = []; - - foreach ($this->get(array_keys($this->endpoints)) as $endpoint => $index) { - $indexes[$endpoint] = $index; - } - - foreach ($this->endpoints as $endpoint => $config) { - $config = $indexes[$endpoint] ?? []; - foreach ($config['recipes'] ?? [] as $package => $versions) { - $this->index[$package] = $this->index[$package] ?? array_fill_keys($versions, $endpoint); - } - $this->conflicts[] = $config['recipe-conflicts'] ?? []; - self::$versions += $config['versions'] ?? []; - self::$aliases += $config['aliases'] ?? []; - unset($config['recipes'], $config['recipe-conflicts'], $config['versions'], $config['aliases']); - $this->endpoints[$endpoint] = $config; - } - } - - private static function generateCacheKey(string $url): string - { - $url = preg_replace('{^https://api.github.com/repos/([^/]++/[^/]++)/contents/}', '$1/', $url); - $url = preg_replace('{^https://raw.githubusercontent.com/([^/]++/[^/]++)/}', '$1/', $url); - - $key = preg_replace('{[^a-z0-9.]}i', '-', $url); - - // eCryptfs can have problems with filenames longer than around 143 chars - return \strlen($key) > 140 ? md5($url) : $key; - } -} diff --git a/vendor/symfony/flex/src/Event/UpdateEvent.php b/vendor/symfony/flex/src/Event/UpdateEvent.php deleted file mode 100644 index 06dbe0c..0000000 --- a/vendor/symfony/flex/src/Event/UpdateEvent.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Event; - -use Composer\Script\Event; -use Composer\Script\ScriptEvents; - -class UpdateEvent extends Event -{ - private $force; - private $reset; - - public function __construct(bool $force, bool $reset) - { - $this->name = ScriptEvents::POST_UPDATE_CMD; - $this->force = $force; - $this->reset = $reset; - } - - public function force(): bool - { - return $this->force; - } - - public function reset(): bool - { - return $this->reset; - } -} diff --git a/vendor/symfony/flex/src/Flex.php b/vendor/symfony/flex/src/Flex.php deleted file mode 100644 index 824eee7..0000000 --- a/vendor/symfony/flex/src/Flex.php +++ /dev/null @@ -1,1078 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Command\GlobalCommand; -use Composer\Composer; -use Composer\Console\Application; -use Composer\DependencyResolver\Operation\InstallOperation; -use Composer\DependencyResolver\Operation\OperationInterface; -use Composer\DependencyResolver\Operation\UninstallOperation; -use Composer\DependencyResolver\Operation\UpdateOperation; -use Composer\DependencyResolver\Pool; -use Composer\DependencyResolver\Transaction; -use Composer\Downloader\FileDownloader; -use Composer\EventDispatcher\EventSubscriberInterface; -use Composer\Factory; -use Composer\Installer; -use Composer\Installer\InstallerEvent; -use Composer\Installer\InstallerEvents; -use Composer\Installer\PackageEvent; -use Composer\Installer\PackageEvents; -use Composer\Installer\SuggestedPackagesReporter; -use Composer\IO\IOInterface; -use Composer\IO\NullIO; -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Composer\Package\BasePackage; -use Composer\Package\Comparer\Comparer; -use Composer\Package\Locker; -use Composer\Package\Package; -use Composer\Package\PackageInterface; -use Composer\Plugin\PluginEvents; -use Composer\Plugin\PluginInterface; -use Composer\Plugin\PreFileDownloadEvent; -use Composer\Plugin\PrePoolCreateEvent; -use Composer\Repository\ComposerRepository as BaseComposerRepository; -use Composer\Repository\RepositoryFactory; -use Composer\Repository\RepositoryManager; -use Composer\Script\Event; -use Composer\Script\ScriptEvents; -use Composer\Semver\VersionParser; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Flex\Event\UpdateEvent; -use Symfony\Flex\Unpack\Operation; -use Symfony\Thanks\Thanks; - -/** - * @author Fabien Potencier - * @author Nicolas Grekas - */ -class Flex implements PluginInterface, EventSubscriberInterface -{ - /** - * @var Composer - */ - private $composer; - - /** - * @var IOInterface - */ - private $io; - - private $config; - private $options; - private $configurator; - private $downloader; - - /** - * @var Installer - */ - private $installer; - private $postInstallOutput = ['']; - private $operations = []; - private $lock; - private $cacheDirPopulated = false; - private $displayThanksReminder = 0; - private $rfs; - private $progress = true; - private $dryRun = false; - private static $activated = true; - private static $repoReadingCommands = [ - 'create-project' => true, - 'outdated' => true, - 'require' => true, - 'update' => true, - 'install' => true, - ]; - private static $aliasResolveCommands = [ - 'require' => true, - 'update' => false, - 'remove' => false, - 'unpack' => true, - ]; - private $filter; - - public function activate(Composer $composer, IOInterface $io) - { - if (!\extension_loaded('openssl')) { - self::$activated = false; - $io->writeError('Symfony Flex has been disabled. You must enable the openssl extension in your "php.ini" file.'); - - return; - } - - // to avoid issues when Flex is upgraded, we load all PHP classes now - // that way, we are sure to use all classes from the same version - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__, \FilesystemIterator::SKIP_DOTS)) as $file) { - if ('.php' === substr($file, -4)) { - class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__), -4))); - } - } - - $this->composer = $composer; - $this->io = $io; - $this->config = $composer->getConfig(); - $this->options = $this->initOptions(); - - $symfonyRequire = preg_replace('/\.x$/', '.x-dev', getenv('SYMFONY_REQUIRE') ?: ($composer->getPackage()->getExtra()['symfony']['require'] ?? '')); - - if ($composer2 = version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '<=')) { - $rfs = Factory::createHttpDownloader($this->io, $this->config); - - $this->downloader = $downloader = new Downloader($composer, $io, $rfs); - - if ($symfonyRequire) { - $this->filter = new PackageFilter($io, $symfonyRequire, $this->downloader); - } - - $setRepositories = null; - } else { - $rfs = Factory::createRemoteFilesystem($this->io, $this->config); - $this->rfs = $rfs = new ParallelDownloader($this->io, $this->config, $rfs->getOptions(), $rfs->isTlsDisabled()); - - $this->downloader = $downloader = new Downloader($composer, $io, $this->rfs); - - $rootPackage = $composer->getPackage(); - $manager = RepositoryFactory::manager($this->io, $this->config, $composer->getEventDispatcher(), $this->rfs); - $setRepositories = \Closure::bind(function (RepositoryManager $manager) use (&$symfonyRequire, $rootPackage, $downloader) { - $manager->repositoryClasses = $this->repositoryClasses; - $manager->setRepositoryClass('composer', TruncatedComposerRepository::class); - $manager->repositories = $this->repositories; - $i = 0; - foreach (RepositoryFactory::defaultRepos(null, $this->config, $manager) as $repo) { - $manager->repositories[$i++] = $repo; - if ($repo instanceof TruncatedComposerRepository && $symfonyRequire) { - $repo->setSymfonyRequire($symfonyRequire, $rootPackage, $downloader, $this->io); - } - } - $manager->setLocalRepository($this->getLocalRepository()); - }, $composer->getRepositoryManager(), RepositoryManager::class); - - $setRepositories($manager); - $composer->setRepositoryManager($manager); - } - - $this->configurator = new Configurator($composer, $io, $this->options); - $this->lock = new Lock(getenv('SYMFONY_LOCKFILE') ?: str_replace('composer.json', 'symfony.lock', Factory::getComposerFile())); - - $disable = true; - foreach (array_merge($composer->getPackage()->getRequires() ?? [], $composer->getPackage()->getDevRequires() ?? []) as $link) { - // recipes apply only when symfony/flex is found in "require" or "require-dev" in the root package - if ('symfony/flex' === $link->getTarget()) { - $disable = false; - break; - } - } - if ($disable) { - $downloader->disable(); - } - - $populateRepoCacheDir = !$composer2 && __CLASS__ === self::class; - if (!$composer2 && $composer->getPluginManager()) { - foreach ($composer->getPluginManager()->getPlugins() as $plugin) { - if (0 === strpos(\get_class($plugin), 'Hirak\Prestissimo\Plugin')) { - if (method_exists($rfs, 'getRemoteContents')) { - $plugin->disable(); - } else { - $this->cacheDirPopulated = true; - } - $populateRepoCacheDir = false; - break; - } - } - } - - $backtrace = $this->configureInstaller(); - - foreach ($backtrace as $trace) { - if (!isset($trace['object']) || !isset($trace['args'][0])) { - continue; - } - - if (!$trace['object'] instanceof Application || !$trace['args'][0] instanceof ArgvInput) { - continue; - } - - // In Composer 1.0.*, $input knows about option and argument definitions - // Since Composer >=1.1, $input contains only raw values - $input = $trace['args'][0]; - $app = $trace['object']; - - $resolver = new PackageResolver($this->downloader); - - if (version_compare('1.1.0', PluginInterface::PLUGIN_API_VERSION, '>')) { - $note = $app->has('self-update') ? sprintf('`php %s self-update`', $_SERVER['argv'][0]) : 'https://getcomposer.org/'; - $io->writeError('Some Symfony Flex features may not work as expected: your version of Composer is too old'); - $io->writeError(sprintf('Please upgrade using %s', $note)); - } - - try { - $command = $input->getFirstArgument(); - $command = $command ? $app->find($command)->getName() : null; - } catch (\InvalidArgumentException $e) { - } - - if ('create-project' === $command) { - // detect Composer >=1.7 (using the Composer::VERSION constant doesn't work with snapshot builds) - if (class_exists(Comparer::class)) { - if ($input->hasOption('remove-vcs')) { - $input->setOption('remove-vcs', true); - } - } else { - $input->setInteractive(false); - } - $populateRepoCacheDir = $populateRepoCacheDir && !$input->hasOption('remove-vcs'); - } elseif ('update' === $command) { - $this->displayThanksReminder = 1; - } elseif ('outdated' === $command) { - $symfonyRequire = null; - if ($setRepositories) { - $setRepositories($manager); - } - } - - if (isset(self::$aliasResolveCommands[$command])) { - // early resolve for BC with Composer 1.0 - if ($input->hasArgument('packages')) { - $input->setArgument('packages', $resolver->resolve($input->getArgument('packages'), self::$aliasResolveCommands[$command])); - } - - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>') && $input->hasOption('no-suggest')) { - $input->setOption('no-suggest', true); - } - } - - if (!$composer2) { - if ($input->hasParameterOption('--no-progress', true)) { - $this->progress = false; - } - - if ($input->hasParameterOption('--dry-run', true)) { - $this->dryRun = true; - } - } - - if ($input->hasParameterOption('--prefer-lowest', true)) { - // When prefer-lowest is set and no stable version has been released, - // we consider "dev" more stable than "alpha", "beta" or "RC". This - // allows testing lowest versions with potential fixes applied. - BasePackage::$stabilities['dev'] = 1 + BasePackage::STABILITY_STABLE; - } - - if ($populateRepoCacheDir && isset(self::$repoReadingCommands[$command]) && ('install' !== $command || (file_exists($composerFile = Factory::getComposerFile()) && !file_exists(substr($composerFile, 0, -4).'lock')))) { - $this->populateRepoCacheDir(); - } - - $app->add(new Command\RequireCommand($resolver, \Closure::fromCallable([$this, 'updateComposerLock']))); - $app->add(new Command\UpdateCommand($resolver)); - $app->add(new Command\RemoveCommand($resolver)); - $app->add(new Command\UnpackCommand($resolver)); - $app->add(new Command\RecipesCommand($this, $this->lock, $rfs)); - $app->add(new Command\InstallRecipesCommand($this, $this->options->get('root-dir'), $this->options->get('runtime')['dotenv_path'] ?? '.env')); - $app->add(new Command\UpdateRecipesCommand($this, $this->downloader, $rfs, $this->configurator, $this->options->get('root-dir'))); - if (class_exists(Command\GenerateIdCommand::class)) { - $app->add(new Command\GenerateIdCommand(null)); - } - $app->add(new Command\DumpEnvCommand($this->config, $this->options)); - - break; - } - } - - public function deactivate(Composer $composer, IOInterface $io) - { - self::$activated = false; - } - - public function configureInstaller() - { - $backtrace = debug_backtrace(); - foreach ($backtrace as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof Installer) { - $this->installer = $trace['object']->setSuggestedPackagesReporter(new SuggestedPackagesReporter(new NullIO())); - } - - if (isset($trace['object']) && $trace['object'] instanceof GlobalCommand) { - $this->downloader->disable(); - } - } - - return $backtrace; - } - - public function configureProject(Event $event) - { - if (!$this->downloader->isEnabled()) { - $this->io->writeError('Project configuration is disabled: "symfony/flex" not found in the root composer.json'); - - return; - } - - // Remove LICENSE (which do not apply to the user project) - @unlink('LICENSE'); - - // Update composer.json (project is proprietary by default) - $file = Factory::getComposerFile(); - $contents = file_get_contents($file); - $manipulator = new JsonManipulator($contents); - $json = JsonFile::parseJson($contents); - - // new projects are most of the time proprietary - $manipulator->addMainKey('license', 'proprietary'); - - // extra.branch-alias doesn't apply to the project - $manipulator->removeSubNode('extra', 'branch-alias'); - - // 'name' and 'description' are only required for public packages - // don't use $manipulator->removeProperty() for BC with Composer 1.0 - $contents = preg_replace(['{^\s*+"name":.*,$\n}m', '{^\s*+"description":.*,$\n}m'], '', $manipulator->getContents(), 1); - file_put_contents($file, $contents); - - $this->updateComposerLock(); - } - - public function record(PackageEvent $event) - { - if ($this->shouldRecordOperation($event->getOperation(), $event->isDevMode(), $event->getComposer())) { - $this->operations[] = $event->getOperation(); - } - } - - public function recordOperations(InstallerEvent $event) - { - if (!$event->isExecutingOperations()) { - return; - } - - $versionParser = new VersionParser(); - $packages = []; - foreach ($this->lock->all() as $name => $info) { - $packages[] = new Package($name, $versionParser->normalize($info['version']), $info['version']); - } - - $transation = \Closure::bind(function () use ($packages, $event) { - return new Transaction($packages, $event->getTransaction()->resultPackageMap); - }, null, Transaction::class)(); - - foreach ($transation->getOperations() as $operation) { - if ($this->shouldRecordOperation($operation, $event->isDevMode(), $event->getComposer())) { - $this->operations[] = $operation; - } - } - } - - public function update(Event $event, $operations = []) - { - if ($operations) { - $this->operations = $operations; - } - - $this->install($event); - - $file = Factory::getComposerFile(); - $contents = file_get_contents($file); - $json = JsonFile::parseJson($contents); - - if (!isset($json['flex-require']) && !isset($json['flex-require-dev'])) { - $this->unpack($event); - - return; - } - - // merge "flex-require" with "require" - $manipulator = new JsonManipulator($contents); - $sortPackages = $this->composer->getConfig()->get('sort-packages'); - $symfonyVersion = $json['extra']['symfony']['require'] ?? null; - $versions = $symfonyVersion ? $this->downloader->getVersions() : null; - foreach (['require', 'require-dev'] as $type) { - if (isset($json['flex-'.$type])) { - foreach ($json['flex-'.$type] as $package => $constraint) { - if ($symfonyVersion && '*' === $constraint && isset($versions['splits'][$package])) { - // replace unbounded constraints for symfony/* packages by extra.symfony.require - $constraint = $symfonyVersion; - } - $manipulator->addLink($type, $package, $constraint, $sortPackages); - } - - $manipulator->removeMainKey('flex-'.$type); - } - } - - file_put_contents($file, $manipulator->getContents()); - - $this->reinstall($event, true); - } - - public function install(Event $event) - { - $rootDir = $this->options->get('root-dir'); - $runtime = $this->options->get('runtime'); - $dotenvPath = $rootDir.'/'.($runtime['dotenv_path'] ?? '.env'); - - if (!file_exists($dotenvPath) && !file_exists($dotenvPath.'.local') && file_exists($dotenvPath.'.dist') && false === strpos(file_get_contents($dotenvPath.'.dist'), '.env.local')) { - copy($dotenvPath.'.dist', $dotenvPath); - } - - // Execute missing recipes - $recipes = ScriptEvents::POST_UPDATE_CMD === $event->getName() ? $this->fetchRecipes($this->operations, $event instanceof UpdateEvent && $event->reset()) : []; - $this->operations = []; // Reset the operation after getting recipes - - if (2 === $this->displayThanksReminder) { - $love = '\\' === \DIRECTORY_SEPARATOR ? 'love' : '💖 '; - $star = '\\' === \DIRECTORY_SEPARATOR ? 'star' : '★ '; - - $this->io->writeError(''); - $this->io->writeError('What about running composer global require symfony/thanks && composer thanks now?'); - $this->io->writeError(sprintf('This will spread some %s by sending a %s to the GitHub repositories of your fellow package maintainers.', $love, $star)); - } - - $this->io->writeError(''); - - if (!$recipes) { - if (ScriptEvents::POST_UPDATE_CMD === $event->getName()) { - $this->finish($rootDir); - } - - if ($this->downloader->isEnabled()) { - $this->io->writeError('Run composer recipes at any time to see the status of your Symfony recipes.'); - $this->io->writeError(''); - } - - return; - } - - $this->io->writeError(sprintf('Symfony operations: %d recipe%s (%s)', \count($recipes), \count($recipes) > 1 ? 's' : '', $this->downloader->getSessionId())); - $installContribs = $this->composer->getPackage()->getExtra()['symfony']['allow-contrib'] ?? false; - $manifest = null; - $originalComposerJsonHash = $this->getComposerJsonHash(); - foreach ($recipes as $recipe) { - if ('install' === $recipe->getJob() && !$installContribs && $recipe->isContrib()) { - $warning = $this->io->isInteractive() ? 'WARNING' : 'IGNORING'; - $this->io->writeError(sprintf(' - %s %s', $warning, $this->formatOrigin($recipe))); - $question = sprintf(' The recipe for this package comes from the "contrib" repository, which is open to community contributions. - Review the recipe at %s - - Do you want to execute this recipe? - [y] Yes - [n] No - [a] Yes for all packages, only for the current installation session - [p] Yes permanently, never ask again for this project - (defaults to n): ', $recipe->getURL()); - $answer = $this->io->askAndValidate( - $question, - function ($value) { - if (null === $value) { - return 'n'; - } - $value = strtolower($value[0]); - if (!\in_array($value, ['y', 'n', 'a', 'p'])) { - throw new \InvalidArgumentException('Invalid choice.'); - } - - return $value; - }, - null, - 'n' - ); - if ('n' === $answer) { - continue; - } - if ('a' === $answer) { - $installContribs = true; - } - if ('p' === $answer) { - $installContribs = true; - $json = new JsonFile(Factory::getComposerFile()); - $manipulator = new JsonManipulator(file_get_contents($json->getPath())); - $manipulator->addSubNode('extra', 'symfony.allow-contrib', true); - file_put_contents($json->getPath(), $manipulator->getContents()); - } - } - - switch ($recipe->getJob()) { - case 'install': - $this->io->writeError(sprintf(' - Configuring %s', $this->formatOrigin($recipe))); - $this->configurator->install($recipe, $this->lock, [ - 'force' => $event instanceof UpdateEvent && $event->force(), - ]); - $manifest = $recipe->getManifest(); - if (isset($manifest['post-install-output'])) { - $this->postInstallOutput[] = sprintf(' %s instructions:', $recipe->getName()); - $this->postInstallOutput[] = ''; - foreach ($manifest['post-install-output'] as $line) { - $this->postInstallOutput[] = $this->options->expandTargetDir($line); - } - $this->postInstallOutput[] = ''; - } - break; - case 'update': - break; - case 'uninstall': - $this->io->writeError(sprintf(' - Unconfiguring %s', $this->formatOrigin($recipe))); - $this->configurator->unconfigure($recipe, $this->lock); - break; - } - } - - if (null !== $manifest) { - array_unshift( - $this->postInstallOutput, - ' ', - ' What\'s next? ', - ' ', - '', - 'Some files have been created and/or updated to configure your new packages.', - 'Please review, edit and commit them: these files are yours.' - ); - } - - $this->finish($rootDir, $originalComposerJsonHash); - } - - public function finish(string $rootDir, string $originalComposerJsonHash = null): void - { - $this->synchronizePackageJson($rootDir); - $this->lock->write(); - - if ($originalComposerJsonHash && $this->getComposerJsonHash() !== $originalComposerJsonHash) { - $this->updateComposerLock(); - } - } - - private function synchronizePackageJson(string $rootDir) - { - $rootDir = realpath($rootDir); - $vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), '/'); - - $synchronizer = new PackageJsonSynchronizer($rootDir, $vendorDir); - - if ($synchronizer->shouldSynchronize()) { - $lockData = $this->composer->getLocker()->getLockData(); - - if (method_exists($synchronizer, 'addPackageJsonLink') && 'string' === (new \ReflectionParameter([$synchronizer, 'addPackageJsonLink'], 'phpPackage'))->getType()->getName()) { - // support for smooth upgrades from older flex versions - $lockData['packages'] = array_column($lockData['packages'] ?? [], 'name'); - $lockData['packages-dev'] = array_column($lockData['packages-dev'] ?? [], 'name'); - } - - if ($synchronizer->synchronize(array_merge($lockData['packages'] ?? [], $lockData['packages-dev'] ?? []))) { - $this->io->writeError('Synchronizing package.json with PHP packages'); - $this->io->writeError('Don\'t forget to run npm install --force or yarn install --force to refresh your JavaScript dependencies!'); - $this->io->writeError(''); - } - } - } - - public function uninstall(Composer $composer, IOInterface $io) - { - $this->lock->delete(); - } - - public function enableThanksReminder() - { - if (1 === $this->displayThanksReminder) { - $this->displayThanksReminder = !class_exists(Thanks::class, false) && version_compare('1.1.0', PluginInterface::PLUGIN_API_VERSION, '<=') ? 2 : 0; - } - } - - public function executeAutoScripts(Event $event) - { - $event->stopPropagation(); - - // force reloading scripts as we might have added and removed during this run - $json = new JsonFile(Factory::getComposerFile()); - $jsonContents = $json->read(); - - $executor = new ScriptExecutor($this->composer, $this->io, $this->options); - foreach ($jsonContents['scripts']['auto-scripts'] as $cmd => $type) { - $executor->execute($type, $cmd); - } - - $this->io->write($this->postInstallOutput); - $this->postInstallOutput = []; - } - - public function populateProvidersCacheDir(InstallerEvent $event) - { - $listed = []; - $packages = []; - $pool = $event->getPool(); - $pool = \Closure::bind(function () { - foreach ($this->providerRepos as $k => $repo) { - $this->providerRepos[$k] = new class($repo) extends BaseComposerRepository { - private $repo; - - public function __construct($repo) - { - $this->repo = $repo; - } - - public function whatProvides(Pool $pool, $name, $bypassFilters = false) - { - $packages = []; - foreach ($this->repo->whatProvides($pool, $name, $bypassFilters) as $k => $p) { - $packages[$k] = clone $p; - } - - return $packages; - } - }; - } - - return $this; - }, clone $pool, $pool)(); - - foreach ($event->getRequest()->getJobs() as $job) { - if ('install' !== $job['cmd'] || false === strpos($job['packageName'], '/')) { - continue; - } - - $listed[$job['packageName']] = true; - $packages[] = [$job['packageName'], $job['constraint']]; - } - - $loadExtraRepos = !(new \ReflectionMethod(Pool::class, 'match'))->isPublic(); // Detect Composer < 1.7.3 - $this->rfs->download($packages, function ($packageName, $constraint) use (&$listed, &$packages, $pool, $loadExtraRepos) { - foreach ($pool->whatProvides($packageName, $constraint, true) as $package) { - $links = $loadExtraRepos ? array_merge($package->getRequires(), $package->getConflicts(), $package->getReplaces()) : $package->getRequires(); - foreach ($links as $link) { - if (isset($listed[$link->getTarget()]) || false === strpos($link->getTarget(), '/')) { - continue; - } - $listed[$link->getTarget()] = true; - $packages[] = [$link->getTarget(), $link->getConstraint()]; - } - } - }); - } - - public function populateFilesCacheDir(InstallerEvent $event) - { - if ($this->cacheDirPopulated || $this->dryRun) { - return; - } - $this->cacheDirPopulated = true; - - $downloads = []; - $cacheDir = rtrim($this->config->get('cache-files-dir'), '\/').\DIRECTORY_SEPARATOR; - $getCacheKey = function (PackageInterface $package, $processedUrl) { - return $this->getCacheKey($package, $processedUrl); - }; - $getCacheKey = \Closure::bind($getCacheKey, new FileDownloader($this->io, $this->config), FileDownloader::class); - - foreach ($event->getOperations() as $op) { - if ('install' === $op->getJobType()) { - $package = $op->getPackage(); - } elseif ('update' === $op->getJobType()) { - $package = $op->getTargetPackage(); - } else { - continue; - } - - if (!$fileUrl = $package->getDistUrl()) { - continue; - } - - if ($package->getDistMirrors()) { - $fileUrl = current($package->getDistUrls()); - } - - if (!preg_match('/^https?:/', $fileUrl) || !$originUrl = parse_url($fileUrl, \PHP_URL_HOST)) { - continue; - } - - if (file_exists($file = $cacheDir.$getCacheKey($package, $fileUrl))) { - continue; - } - - @mkdir(\dirname($file), 0775, true); - - if (!is_dir(\dirname($file))) { - continue; - } - - if (preg_match('#^https://github\.com/#', $package->getSourceUrl()) && preg_match('#^https://api\.github\.com/repos(/[^/]++/[^/]++/)zipball(.++)$#', $fileUrl, $m)) { - $fileUrl = sprintf('https://codeload.github.com%slegacy.zip%s', $m[1], $m[2]); - } - - $downloads[] = [$originUrl, $fileUrl, [], $file, false]; - } - - if (1 < \count($downloads)) { - $this->rfs->download($downloads, [$this->rfs, 'get'], false, $this->progress); - } - } - - public function onFileDownload(PreFileDownloadEvent $event) - { - if ($event->getRemoteFilesystem() !== $this->rfs) { - $event->setRemoteFilesystem($this->rfs->setNextOptions($event->getRemoteFilesystem()->getOptions())); - } - } - - /** - * @return Recipe[] - */ - public function fetchRecipes(array $operations, bool $reset): array - { - if (!$this->downloader->isEnabled()) { - $this->io->writeError('Symfony recipes are disabled: "symfony/flex" not found in the root composer.json'); - - return []; - } - $devPackages = null; - $data = $this->downloader->getRecipes($operations); - $manifests = $data['manifests'] ?? []; - $locks = $data['locks'] ?? []; - // symfony/flex recipes should always be applied first - $flexRecipe = []; - // symfony/framework-bundle recipe should always be applied first after the metapackages - $recipes = [ - 'symfony/framework-bundle' => null, - ]; - $metaRecipes = []; - - foreach ($operations as $operation) { - if ($operation instanceof UpdateOperation) { - $package = $operation->getTargetPackage(); - } else { - $package = $operation->getPackage(); - } - - // FIXME: Multi name with getNames() - $name = $package->getName(); - $job = method_exists($operation, 'getOperationType') ? $operation->getOperationType() : $operation->getJobType(); - - if (!isset($manifests[$name]) && isset($data['conflicts'][$name])) { - $this->io->writeError(sprintf(' - Skipping recipe for %s: all versions of the recipe conflict with your package versions.', $name), true, IOInterface::VERBOSE); - continue; - } - - while ($this->doesRecipeConflict($manifests[$name] ?? [], $operation)) { - $this->downloader->removeRecipeFromIndex($name, $manifests[$name]['version']); - $newData = $this->downloader->getRecipes([$operation]); - $newManifests = $newData['manifests'] ?? []; - - if (!isset($newManifests[$name])) { - // no older recipe found - $this->io->writeError(sprintf(' - Skipping recipe for %s: all versions of the recipe conflict with your package versions.', $name), true, IOInterface::VERBOSE); - - continue 2; - } - - // push the "old" recipe into the $manifests - $manifests[$name] = $newManifests[$name]; - $locks[$name] = $newData['locks'][$name]; - } - - if ($operation instanceof InstallOperation && isset($locks[$name])) { - $ref = $this->lock->get($name)['recipe']['ref'] ?? null; - if (!$reset && $ref && ($locks[$name]['recipe']['ref'] ?? null) === $ref) { - continue; - } - $this->lock->set($name, $locks[$name]); - } elseif ($operation instanceof UninstallOperation) { - if (!$this->lock->has($name)) { - continue; - } - $this->lock->remove($name); - } - - if (isset($manifests[$name])) { - if ('metapackage' === $package->getType()) { - $metaRecipes[$name] = new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? []); - } elseif ('symfony/flex' === $name) { - $flexRecipe = [$name => new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? [])]; - } else { - $recipes[$name] = new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? []); - } - } - - if (!isset($manifests[$name])) { - $bundles = []; - - if (null === $devPackages) { - $devPackages = array_column($this->composer->getLocker()->getLockData()['packages-dev'], 'name'); - } - $envs = \in_array($name, $devPackages) ? ['dev', 'test'] : ['all']; - $bundle = new SymfonyBundle($this->composer, $package, $job); - foreach ($bundle->getClassNames() as $bundleClass) { - $bundles[$bundleClass] = $envs; - } - - if ($bundles) { - $manifest = [ - 'origin' => sprintf('%s:%s@auto-generated recipe', $name, $package->getPrettyVersion()), - 'manifest' => ['bundles' => $bundles], - ]; - $recipes[$name] = new Recipe($package, $name, $job, $manifest); - } - } - } - - return array_merge($flexRecipe, $metaRecipes, array_filter($recipes)); - } - - public function truncatePackages(PrePoolCreateEvent $event) - { - if (!$this->filter) { - return; - } - - $rootPackage = $this->composer->getPackage(); - $lockedPackages = $event->getRequest()->getFixedOrLockedPackages(); - - $event->setPackages($this->filter->removeLegacyPackages($event->getPackages(), $rootPackage, $lockedPackages)); - } - - public function getComposerJsonHash(): string - { - return md5_file(Factory::getComposerFile()); - } - - public function getLock(): Lock - { - if (null === $this->lock) { - throw new \Exception('Cannot access lock before calling activate().'); - } - - return $this->lock; - } - - private function initOptions(): Options - { - $extra = $this->composer->getPackage()->getExtra(); - - $options = array_merge([ - 'bin-dir' => 'bin', - 'conf-dir' => 'conf', - 'config-dir' => 'config', - 'src-dir' => 'src', - 'var-dir' => 'var', - 'public-dir' => 'public', - 'root-dir' => $extra['symfony']['root-dir'] ?? '.', - 'runtime' => $extra['runtime'] ?? [], - ], $extra); - - return new Options($options, $this->io); - } - - private function formatOrigin(Recipe $recipe): string - { - if (method_exists($recipe, 'getFormattedOrigin')) { - return $recipe->getFormattedOrigin(); - } - - // BC with upgrading from flex < 1.18 - $origin = $recipe->getOrigin(); - - // symfony/translation:3.3@github.com/symfony/recipes:branch - if (!preg_match('/^([^:]++):([^@]++)@(.+)$/', $origin, $matches)) { - return $origin; - } - - return sprintf('%s (>=%s): From %s', $matches[1], $matches[2], 'auto-generated recipe' === $matches[3] ? ''.$matches[3].'' : $matches[3]); - } - - private function shouldRecordOperation(OperationInterface $operation, bool $isDevMode, Composer $composer = null): bool - { - if ($this->dryRun) { - return false; - } - - if ($operation instanceof UpdateOperation) { - $package = $operation->getTargetPackage(); - } else { - $package = $operation->getPackage(); - } - - // when Composer runs with --no-dev, ignore uninstall operations on packages from require-dev - if (!$isDevMode && $operation instanceof UninstallOperation) { - foreach (($composer ?? $this->composer)->getLocker()->getLockData()['packages-dev'] as $p) { - if ($package->getName() === $p['name']) { - return false; - } - } - } - - // FIXME: Multi name with getNames() - $name = $package->getName(); - if ($operation instanceof InstallOperation) { - if (!$this->lock->has($name)) { - return true; - } - } elseif ($operation instanceof UninstallOperation) { - return true; - } - - return false; - } - - private function populateRepoCacheDir() - { - $repos = []; - - foreach ($this->composer->getPackage()->getRepositories() as $name => $repo) { - if (!isset($repo['type']) || 'composer' !== $repo['type'] || !empty($repo['force-lazy-providers'])) { - continue; - } - - if (!preg_match('#^http(s\??)?://#', $repo['url'])) { - continue; - } - - $repo = new ComposerRepository($repo, $this->io, $this->config, null, $this->rfs); - - $repos[] = [$repo]; - } - - $this->rfs->download($repos, function ($repo) { - ParallelDownloader::$cacheNext = true; - $repo->getProviderNames(); - }); - } - - private function updateComposerLock() - { - $lock = substr(Factory::getComposerFile(), 0, -4).'lock'; - $composerJson = file_get_contents(Factory::getComposerFile()); - $lockFile = new JsonFile($lock, null, $this->io); - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>')) { - $locker = new Locker($this->io, $lockFile, $this->composer->getRepositoryManager(), $this->composer->getInstallationManager(), $composerJson); - } else { - $locker = new Locker($this->io, $lockFile, $this->composer->getInstallationManager(), $composerJson); - } - $lockData = $locker->getLockData(); - $lockData['content-hash'] = Locker::getContentHash($composerJson); - $lockFile->write($lockData); - } - - private function unpack(Event $event) - { - $jsonPath = Factory::getComposerFile(); - $json = JsonFile::parseJson(file_get_contents($jsonPath)); - $sortPackages = $this->composer->getConfig()->get('sort-packages'); - $unpackOp = new Operation(true, $sortPackages); - - foreach (['require', 'require-dev'] as $type) { - foreach ($json[$type] ?? [] as $package => $constraint) { - $unpackOp->addPackage($package, $constraint, 'require-dev' === $type); - } - } - - $unpacker = new Unpacker($this->composer, new PackageResolver($this->downloader), $this->dryRun); - $result = $unpacker->unpack($unpackOp); - - if (!$result->getUnpacked()) { - return; - } - - $this->io->writeError('Unpacking Symfony packs'); - foreach ($result->getUnpacked() as $pkg) { - $this->io->writeError(sprintf(' - Unpacked %s', $pkg->getName())); - } - - $unpacker->updateLock($result, $this->io); - - $this->reinstall($event, false); - } - - private function reinstall(Event $event, bool $update) - { - $event->stopPropagation(); - - $ed = $this->composer->getEventDispatcher(); - $disableScripts = !method_exists($ed, 'setRunScripts') || !((array) $ed)["\0*\0runScripts"]; - $composer = Factory::create($this->io, null, false, $disableScripts); - - $installer = clone $this->installer; - $installer->__construct( - $this->io, - $composer->getConfig(), - $composer->getPackage(), - $composer->getDownloadManager(), - $composer->getRepositoryManager(), - $composer->getLocker(), - $composer->getInstallationManager(), - $composer->getEventDispatcher(), - $composer->getAutoloadGenerator() - ); - - if (!$update) { - $installer->setUpdateAllowList(['php']); - } - - if (method_exists($installer, 'setSkipSuggest')) { - $installer->setSkipSuggest(true); - } - - $installer->run(); - - $this->io->write($this->postInstallOutput); - $this->postInstallOutput = []; - } - - public static function getSubscribedEvents(): array - { - if (!self::$activated) { - return []; - } - - $events = [ - ScriptEvents::POST_CREATE_PROJECT_CMD => 'configureProject', - ScriptEvents::POST_INSTALL_CMD => 'install', - ScriptEvents::PRE_UPDATE_CMD => 'configureInstaller', - ScriptEvents::POST_UPDATE_CMD => 'update', - 'auto-scripts' => 'executeAutoScripts', - ]; - - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>')) { - $events += [ - PackageEvents::POST_PACKAGE_INSTALL => 'record', - PackageEvents::POST_PACKAGE_UPDATE => [['record'], ['enableThanksReminder']], - PackageEvents::POST_PACKAGE_UNINSTALL => 'record', - InstallerEvents::PRE_DEPENDENCIES_SOLVING => [['populateProvidersCacheDir', \PHP_INT_MAX]], - InstallerEvents::POST_DEPENDENCIES_SOLVING => [['populateFilesCacheDir', \PHP_INT_MAX]], - PackageEvents::PRE_PACKAGE_INSTALL => [['populateFilesCacheDir', ~\PHP_INT_MAX]], - PackageEvents::PRE_PACKAGE_UPDATE => [['populateFilesCacheDir', ~\PHP_INT_MAX]], - PluginEvents::PRE_FILE_DOWNLOAD => 'onFileDownload', - ]; - } else { - $events += [ - PackageEvents::POST_PACKAGE_UPDATE => 'enableThanksReminder', - InstallerEvents::PRE_OPERATIONS_EXEC => 'recordOperations', - PluginEvents::PRE_POOL_CREATE => 'truncatePackages', - ]; - } - - return $events; - } - - private function doesRecipeConflict(array $recipeData, OperationInterface $operation): bool - { - if (empty($recipeData['manifest']['conflict']) || $operation instanceof UninstallOperation) { - return false; - } - - $lockedRepository = $this->composer->getLocker()->getLockedRepository(); - - foreach ($recipeData['manifest']['conflict'] as $conflictingPackage => $constraint) { - if ($lockedRepository->findPackage($conflictingPackage, $constraint)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/symfony/flex/src/GithubApi.php b/vendor/symfony/flex/src/GithubApi.php deleted file mode 100644 index 60e9018..0000000 --- a/vendor/symfony/flex/src/GithubApi.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Util\HttpDownloader; -use Composer\Util\RemoteFilesystem; - -class GithubApi -{ - /** @var HttpDownloader|RemoteFilesystem */ - private $downloader; - - public function __construct($downloader) - { - $this->downloader = $downloader; - } - - /** - * Attempts to find data about when the recipe was installed. - * - * Returns an array containing: - * commit: The git sha of the last commit of the recipe - * date: The date of the commit - * new_commits: An array of commit sha's in this recipe's directory+version since the commit - * The key is the sha & the value is the date - */ - public function findRecipeCommitDataFromTreeRef(string $package, string $repo, string $branch, string $version, string $lockRef): ?array - { - $repositoryName = $this->getRepositoryName($repo); - if (!$repositoryName) { - return null; - } - - $recipePath = sprintf('%s/%s', $package, $version); - $commitsData = $this->requestGitHubApi(sprintf( - 'https://api.github.com/repos/%s/commits?path=%s&sha=%s', - $repositoryName, - $recipePath, - $branch - )); - - $commitShas = []; - foreach ($commitsData as $commitData) { - $commitShas[$commitData['sha']] = $commitData['commit']['committer']['date']; - // go back the commits one-by-one - $treeUrl = $commitData['commit']['tree']['url'].'?recursive=true'; - - // fetch the full tree, then look for the tree for the package path - $treeData = $this->requestGitHubApi($treeUrl); - foreach ($treeData['tree'] as $treeItem) { - if ($treeItem['path'] !== $recipePath) { - continue; - } - - if ($treeItem['sha'] === $lockRef) { - // remove *this* commit from the new commits list - array_pop($commitShas); - - return [ - // shorten for brevity - 'commit' => substr($commitData['sha'], 0, 7), - 'date' => $commitData['commit']['committer']['date'], - 'new_commits' => $commitShas, - ]; - } - } - } - - return null; - } - - public function getVersionsOfRecipe(string $repo, string $branch, string $recipePath): ?array - { - $repositoryName = $this->getRepositoryName($repo); - if (!$repositoryName) { - return null; - } - - $url = sprintf( - 'https://api.github.com/repos/%s/contents/%s?ref=%s', - $repositoryName, - $recipePath, - $branch - ); - $contents = $this->requestGitHubApi($url); - $versions = []; - foreach ($contents as $fileData) { - if ('dir' !== $fileData['type']) { - continue; - } - - $versions[] = $fileData['name']; - } - - return $versions; - } - - public function getCommitDataForPath(string $repo, string $path, string $branch): array - { - $repositoryName = $this->getRepositoryName($repo); - if (!$repositoryName) { - return []; - } - - $commitsData = $this->requestGitHubApi(sprintf( - 'https://api.github.com/repos/%s/commits?path=%s&sha=%s', - $repositoryName, - $path, - $branch - )); - - $data = []; - foreach ($commitsData as $commitData) { - $data[$commitData['sha']] = $commitData['commit']['committer']['date']; - } - - return $data; - } - - public function getPullRequestForCommit(string $commit, string $repo): ?array - { - $data = $this->requestGitHubApi('https://api.github.com/search/issues?q='.$commit); - - if (0 === \count($data['items'])) { - return null; - } - - $repositoryName = $this->getRepositoryName($repo); - if (!$repositoryName) { - return null; - } - - $bestItem = null; - foreach ($data['items'] as $item) { - // make sure the PR referenced isn't from a different repository - if (false === strpos($item['html_url'], sprintf('%s/pull', $repositoryName))) { - continue; - } - - if (null === $bestItem) { - $bestItem = $item; - - continue; - } - - // find the first PR to reference - avoids rare cases where an invalid - // PR that references *many* commits is first - // e.g. https://api.github.com/search/issues?q=a1a70353f64f405cfbacfc4ce860af623442d6e5 - if ($item['number'] < $bestItem['number']) { - $bestItem = $item; - } - } - - if (!$bestItem) { - return null; - } - - return [ - 'number' => $bestItem['number'], - 'url' => $bestItem['html_url'], - 'title' => $bestItem['title'], - ]; - } - - private function requestGitHubApi(string $path) - { - if ($this->downloader instanceof HttpDownloader) { - $contents = $this->downloader->get($path)->getBody(); - } else { - $contents = $this->downloader->getContents('api.github.com', $path, false); - } - - return json_decode($contents, true); - } - - /** - * Converts the "repo" stored in symfony.lock to a repository name. - * - * For example: "github.com/symfony/recipes" => "symfony/recipes" - */ - private function getRepositoryName(string $repo): ?string - { - // only supports public repository placement - if (0 !== strpos($repo, 'github.com')) { - return null; - } - - $parts = explode('/', $repo); - if (3 !== \count($parts)) { - return null; - } - - return implode('/', [$parts[1], $parts[2]]); - } -} diff --git a/vendor/symfony/flex/src/InformationOperation.php b/vendor/symfony/flex/src/InformationOperation.php deleted file mode 100644 index 288dcc6..0000000 --- a/vendor/symfony/flex/src/InformationOperation.php +++ /dev/null @@ -1,91 +0,0 @@ - - */ -class InformationOperation implements OperationInterface -{ - private $package; - private $recipeRef = null; - private $version = null; - - public function __construct(PackageInterface $package) - { - $this->package = $package; - } - - /** - * Call to get information about a specific version of a recipe. - * - * Both $recipeRef and $version would normally come from the symfony.lock file. - */ - public function setSpecificRecipeVersion(string $recipeRef, string $version) - { - $this->recipeRef = $recipeRef; - $this->version = $version; - } - - /** - * Returns package instance. - * - * @return PackageInterface - */ - public function getPackage() - { - return $this->package; - } - - public function getRecipeRef(): ?string - { - return $this->recipeRef; - } - - public function getVersion(): ?string - { - return $this->version; - } - - public function getJobType() - { - return 'information'; - } - - /** - * {@inheritdoc} - */ - public function getOperationType() - { - return 'information'; - } - - /** - * {@inheritdoc} - */ - public function show($lock) - { - $pretty = method_exists($this->package, 'getFullPrettyVersion') ? $this->package->getFullPrettyVersion() : $this->formatVersion($this->package); - - return 'Information '.$this->package->getPrettyName().' ('.$pretty.')'; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->show(false); - } - - /** - * Compatibility for Composer 1.x, not needed in Composer 2. - */ - public function getReason() - { - return null; - } -} diff --git a/vendor/symfony/flex/src/Lock.php b/vendor/symfony/flex/src/Lock.php deleted file mode 100644 index a39a15a..0000000 --- a/vendor/symfony/flex/src/Lock.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Json\JsonFile; - -/** - * @author Fabien Potencier - */ -class Lock -{ - private $json; - private $lock = []; - private $changed = false; - - public function __construct($lockFile) - { - $this->json = new JsonFile($lockFile); - if ($this->json->exists()) { - $this->lock = $this->json->read(); - } - } - - public function has($name): bool - { - return \array_key_exists($name, $this->lock); - } - - public function add($name, $data) - { - $current = $this->lock[$name] ?? []; - $this->lock[$name] = array_merge($current, $data); - $this->changed = true; - } - - public function get($name) - { - return $this->lock[$name] ?? null; - } - - public function set($name, $data) - { - if (!\array_key_exists($name, $this->lock) || $data !== $this->lock[$name]) { - $this->lock[$name] = $data; - $this->changed = true; - } - } - - public function remove($name) - { - if (\array_key_exists($name, $this->lock)) { - unset($this->lock[$name]); - $this->changed = true; - } - } - - public function write() - { - if (!$this->changed) { - return; - } - - if ($this->lock) { - ksort($this->lock); - $this->json->write($this->lock); - } elseif ($this->json->exists()) { - @unlink($this->json->getPath()); - } - } - - public function delete() - { - @unlink($this->json->getPath()); - } - - public function all(): array - { - return $this->lock; - } -} diff --git a/vendor/symfony/flex/src/Options.php b/vendor/symfony/flex/src/Options.php deleted file mode 100644 index f0872b5..0000000 --- a/vendor/symfony/flex/src/Options.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\IO\IOInterface; -use Composer\Util\ProcessExecutor; - -/** - * @author Fabien Potencier - */ -class Options -{ - private $options; - private $writtenFiles = []; - private $io; - - public function __construct(array $options = [], IOInterface $io = null) - { - $this->options = $options; - $this->io = $io; - } - - public function get(string $name) - { - return $this->options[$name] ?? null; - } - - public function expandTargetDir(string $target): string - { - return preg_replace_callback('{%(.+?)%}', function ($matches) { - $option = str_replace('_', '-', strtolower($matches[1])); - if (!isset($this->options[$option])) { - return $matches[0]; - } - - return rtrim($this->options[$option], '/'); - }, $target); - } - - public function shouldWriteFile(string $file, bool $overwrite): bool - { - if (isset($this->writtenFiles[$file])) { - return false; - } - $this->writtenFiles[$file] = true; - - if (!file_exists($file)) { - return true; - } - - if (!$overwrite) { - return false; - } - - if (!filesize($file)) { - return true; - } - - exec('git status --short --ignored --untracked-files=all -- '.ProcessExecutor::escape($file).' 2>&1', $output, $status); - - if (0 !== $status) { - return $this->io && $this->io->askConfirmation(sprintf('Cannot determine the state of the "%s" file, overwrite anyway? [y/N] ', $file), false); - } - - if (empty($output[0]) || preg_match('/^[ AMDRCU][ D][ \t]/', $output[0])) { - return true; - } - - $name = basename($file); - $name = \strlen($output[0]) - \strlen($name) === strrpos($output[0], $name) ? substr($output[0], 3) : $name; - - return $this->io && $this->io->askConfirmation(sprintf('File "%s" has uncommitted changes, overwrite? [y/N] ', $name), false); - } - - public function toArray(): array - { - return $this->options; - } -} diff --git a/vendor/symfony/flex/src/PackageFilter.php b/vendor/symfony/flex/src/PackageFilter.php deleted file mode 100644 index d1d9709..0000000 --- a/vendor/symfony/flex/src/PackageFilter.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\IO\IOInterface; -use Composer\Package\AliasPackage; -use Composer\Package\PackageInterface; -use Composer\Package\RootPackageInterface; -use Composer\Semver\Constraint\Constraint; -use Composer\Semver\Intervals; -use Composer\Semver\VersionParser; - -/** - * @author Nicolas Grekas - */ -class PackageFilter -{ - private $versions; - private $versionParser; - private $symfonyRequire; - private $symfonyConstraints; - private $downloader; - private $io; - - public function __construct(IOInterface $io, string $symfonyRequire, Downloader $downloader) - { - $this->versionParser = new VersionParser(); - $this->symfonyRequire = $symfonyRequire; - $this->symfonyConstraints = $this->versionParser->parseConstraints($symfonyRequire); - $this->downloader = $downloader; - $this->io = $io; - } - - /** - * @param PackageInterface[] $data - * @param PackageInterface[] $lockedPackages - * - * @return PackageInterface[] - */ - public function removeLegacyPackages(array $data, RootPackageInterface $rootPackage, array $lockedPackages): array - { - if (!$this->symfonyConstraints || !$data) { - return $data; - } - - $lockedVersions = []; - foreach ($lockedPackages as $package) { - $lockedVersions[$package->getName()] = [$package->getVersion()]; - if ($package instanceof AliasPackage) { - $lockedVersions[$package->getName()][] = $package->getAliasOf()->getVersion(); - } - } - - $rootConstraints = []; - foreach ($rootPackage->getRequires() + $rootPackage->getDevRequires() as $name => $link) { - $rootConstraints[$name] = $link->getConstraint(); - } - - $knownVersions = $this->getVersions(); - $filteredPackages = []; - $symfonyPackages = []; - $oneSymfony = false; - foreach ($data as $package) { - $name = $package->getName(); - $versions = [$package->getVersion()]; - if ($package instanceof AliasPackage) { - $versions[] = $package->getAliasOf()->getVersion(); - } - - if ('symfony/symfony' !== $name && ( - !isset($knownVersions['splits'][$name]) - || array_intersect($versions, $lockedVersions[$name] ?? []) - || (isset($rootConstraints[$name]) && !Intervals::haveIntersections($this->symfonyConstraints, $rootConstraints[$name])) - )) { - $filteredPackages[] = $package; - continue; - } - - if (null !== $alias = $package->getExtra()['branch-alias'][$package->getVersion()] ?? null) { - $versions[] = $this->versionParser->normalize($alias); - } - - foreach ($versions as $version) { - if ($this->symfonyConstraints->matches(new Constraint('==', $version))) { - $filteredPackages[] = $package; - $oneSymfony = $oneSymfony || 'symfony/symfony' === $name; - continue 2; - } - } - - if ('symfony/symfony' === $name) { - $symfonyPackages[] = $package; - } elseif (null !== $this->io) { - $this->io->writeError(sprintf('Restricting packages listed in "symfony/symfony" to "%s"', $this->symfonyRequire)); - $this->io = null; - } - } - - if ($symfonyPackages && !$oneSymfony) { - $filteredPackages = array_merge($filteredPackages, $symfonyPackages); - } - - return $filteredPackages; - } - - private function getVersions(): array - { - if (null !== $this->versions) { - return $this->versions; - } - - $versions = $this->downloader->getVersions(); - $this->downloader = null; - $okVersions = []; - - if (!isset($versions['splits'])) { - throw new \LogicException('The Flex index is missing a "splits" entry. Did you forget to add "flex://defaults" in the "extra.symfony.endpoint" array of your composer.json?'); - } - foreach ($versions['splits'] as $name => $vers) { - foreach ($vers as $i => $v) { - if (!isset($okVersions[$v])) { - $okVersions[$v] = false; - $w = '.x' === substr($v, -2) ? $versions['next'] : $v; - - for ($j = 0; $j < 60; ++$j) { - if ($this->symfonyConstraints->matches(new Constraint('==', $w.'.'.$j.'.0'))) { - $okVersions[$v] = true; - break; - } - } - } - - if (!$okVersions[$v]) { - unset($vers[$i]); - } - } - - if (!$vers || $vers === $versions['splits'][$name]) { - unset($versions['splits'][$name]); - } - } - - return $this->versions = $versions; - } -} diff --git a/vendor/symfony/flex/src/PackageJsonSynchronizer.php b/vendor/symfony/flex/src/PackageJsonSynchronizer.php deleted file mode 100644 index 7c41b5f..0000000 --- a/vendor/symfony/flex/src/PackageJsonSynchronizer.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Seld\JsonLint\ParsingException; - -/** - * Synchronize package.json files detected in installed PHP packages with - * the current application. - */ -class PackageJsonSynchronizer -{ - private $rootDir; - private $vendorDir; - - public function __construct(string $rootDir, string $vendorDir = 'vendor') - { - $this->rootDir = $rootDir; - $this->vendorDir = $vendorDir; - } - - public function shouldSynchronize(): bool - { - return $this->rootDir && file_exists($this->rootDir.'/package.json'); - } - - public function synchronize(array $phpPackages): bool - { - try { - JsonFile::parseJson(file_get_contents($this->rootDir.'/package.json')); - } catch (ParsingException $e) { - // if package.json is invalid (possible during a recipe upgrade), we can't update the file - return false; - } - - $didChangePackageJson = $this->removeObsoletePackageJsonLinks(); - - $dependencies = []; - - foreach ($phpPackages as $k => $phpPackage) { - if (\is_string($phpPackage)) { - // support for smooth upgrades from older flex versions - $phpPackages[$k] = $phpPackage = [ - 'name' => $phpPackage, - 'keywords' => ['symfony-ux'], - ]; - } - - foreach ($this->resolvePackageDependencies($phpPackage) as $dependency => $constraint) { - $dependencies[$dependency][$phpPackage['name']] = $constraint; - } - } - - $didChangePackageJson = $this->registerDependencies($dependencies) || $didChangePackageJson; - - // Register controllers and entrypoints in controllers.json - $this->registerWebpackResources($phpPackages); - - return $didChangePackageJson; - } - - private function removeObsoletePackageJsonLinks(): bool - { - $didChangePackageJson = false; - - $manipulator = new JsonManipulator(file_get_contents($this->rootDir.'/package.json')); - $content = json_decode($manipulator->getContents(), true); - - $jsDependencies = $content['dependencies'] ?? []; - $jsDevDependencies = $content['devDependencies'] ?? []; - - foreach (['dependencies' => $jsDependencies, 'devDependencies' => $jsDevDependencies] as $key => $packages) { - foreach ($packages as $name => $version) { - if ('@' !== $name[0] || 0 !== strpos($version, 'file:'.$this->vendorDir.'/') || false === strpos($version, '/assets')) { - continue; - } - if (file_exists($this->rootDir.'/'.substr($version, 5).'/package.json')) { - continue; - } - - $manipulator->removeSubNode($key, $name); - $didChangePackageJson = true; - } - } - - file_put_contents($this->rootDir.'/package.json', $manipulator->getContents()); - - return $didChangePackageJson; - } - - private function resolvePackageDependencies($phpPackage): array - { - $dependencies = []; - - if (!$packageJson = $this->resolvePackageJson($phpPackage)) { - return $dependencies; - } - - $dependencies['@'.$phpPackage['name']] = 'file:'.substr($packageJson->getPath(), 1 + \strlen($this->rootDir), -13); - - foreach ($packageJson->read()['peerDependencies'] ?? [] as $peerDependency => $constraint) { - $dependencies[$peerDependency] = $constraint; - } - - return $dependencies; - } - - private function registerDependencies(array $flexDependencies): bool - { - $didChangePackageJson = false; - - $manipulator = new JsonManipulator(file_get_contents($this->rootDir.'/package.json')); - $content = json_decode($manipulator->getContents(), true); - - foreach ($flexDependencies as $dependency => $constraints) { - if (1 !== \count($constraints) && 1 !== \count(array_count_values($constraints))) { - // If the flex packages have a colliding peer dependency, leave the resolution to the user - continue; - } - - $constraint = array_shift($constraints); - - $parentNode = isset($content['dependencies'][$dependency]) ? 'dependencies' : 'devDependencies'; - if (!isset($content[$parentNode][$dependency])) { - $content['devDependencies'][$dependency] = $constraint; - $didChangePackageJson = true; - } elseif ($constraint !== $content[$parentNode][$dependency]) { - $content[$parentNode][$dependency] = $constraint; - $didChangePackageJson = true; - } - } - - if ($didChangePackageJson) { - if (isset($content['dependencies'])) { - $manipulator->addMainKey('dependencies', $content['dependencies']); - } - - if (isset($content['devDependencies'])) { - $devDependencies = $content['devDependencies']; - uksort($devDependencies, 'strnatcmp'); - $manipulator->addMainKey('devDependencies', $devDependencies); - } - - $newContents = $manipulator->getContents(); - if ($newContents === file_get_contents($this->rootDir.'/package.json')) { - return false; - } - - file_put_contents($this->rootDir.'/package.json', $manipulator->getContents()); - } - - return $didChangePackageJson; - } - - private function registerWebpackResources(array $phpPackages) - { - if (!file_exists($controllersJsonPath = $this->rootDir.'/assets/controllers.json')) { - return; - } - - $previousControllersJson = (new JsonFile($controllersJsonPath))->read(); - $newControllersJson = [ - 'controllers' => [], - 'entrypoints' => $previousControllersJson['entrypoints'], - ]; - - foreach ($phpPackages as $phpPackage) { - if (!$packageJson = $this->resolvePackageJson($phpPackage)) { - continue; - } - $name = '@'.$phpPackage['name']; - - foreach ($packageJson->read()['symfony']['controllers'] ?? [] as $controllerName => $defaultConfig) { - // If the package has just been added (no config), add the default config provided by the package - if (!isset($previousControllersJson['controllers'][$name][$controllerName])) { - $config = []; - $config['enabled'] = $defaultConfig['enabled']; - $config['fetch'] = $defaultConfig['fetch'] ?? 'eager'; - - if (isset($defaultConfig['autoimport'])) { - $config['autoimport'] = $defaultConfig['autoimport']; - } - - $newControllersJson['controllers'][$name][$controllerName] = $config; - - continue; - } - - // Otherwise, the package exists: merge new config with user config - $previousConfig = $previousControllersJson['controllers'][$name][$controllerName]; - - $config = []; - $config['enabled'] = $previousConfig['enabled']; - $config['fetch'] = $previousConfig['fetch'] ?? 'eager'; - - if (isset($defaultConfig['autoimport'])) { - $config['autoimport'] = []; - - // Use for each autoimport either the previous config if one existed or the default config otherwise - foreach ($defaultConfig['autoimport'] as $autoimport => $enabled) { - $config['autoimport'][$autoimport] = $previousConfig['autoimport'][$autoimport] ?? $enabled; - } - } - - $newControllersJson['controllers'][$name][$controllerName] = $config; - } - - foreach ($packageJson->read()['symfony']['entrypoints'] ?? [] as $entrypoint => $filename) { - if (!isset($newControllersJson['entrypoints'][$entrypoint])) { - $newControllersJson['entrypoints'][$entrypoint] = $filename; - } - } - } - - file_put_contents($controllersJsonPath, json_encode($newControllersJson, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)."\n"); - } - - private function resolvePackageJson(array $phpPackage): ?JsonFile - { - $packageDir = $this->rootDir.'/'.$this->vendorDir.'/'.$phpPackage['name']; - - if (!\in_array('symfony-ux', $phpPackage['keywords'] ?? [], true)) { - return null; - } - - foreach (['/assets', '/Resources/assets', '/src/Resources/assets'] as $subdir) { - $packageJsonPath = $packageDir.$subdir.'/package.json'; - - if (!file_exists($packageJsonPath)) { - continue; - } - - return new JsonFile($packageJsonPath); - } - - return null; - } -} diff --git a/vendor/symfony/flex/src/PackageResolver.php b/vendor/symfony/flex/src/PackageResolver.php deleted file mode 100644 index 878b5a8..0000000 --- a/vendor/symfony/flex/src/PackageResolver.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Factory; -use Composer\Package\Version\VersionParser; -use Composer\Repository\PlatformRepository; - -/** - * @author Fabien Potencier - */ -class PackageResolver -{ - private static $SYMFONY_VERSIONS = ['lts', 'previous', 'stable', 'next', 'dev']; - private $downloader; - - public function __construct(Downloader $downloader) - { - $this->downloader = $downloader; - } - - public function resolve(array $arguments = [], bool $isRequire = false): array - { - // first pass split on : and = to resolve package names - $packages = []; - foreach ($arguments as $i => $argument) { - if ((false !== $pos = strpos($argument, ':')) || (false !== $pos = strpos($argument, '='))) { - $package = $this->resolvePackageName(substr($argument, 0, $pos), $i); - $version = substr($argument, $pos + 1); - $packages[] = $package.':'.$version; - } else { - $packages[] = $this->resolvePackageName($argument, $i); - } - } - - // second pass to resolve versions - $versionParser = new VersionParser(); - $requires = []; - foreach ($versionParser->parseNameVersionPairs($packages) as $package) { - $requires[] = $package['name'].$this->parseVersion($package['name'], $package['version'] ?? '', $isRequire); - } - - return array_unique($requires); - } - - public function parseVersion(string $package, string $version, bool $isRequire): string - { - if (0 !== strpos($package, 'symfony/')) { - return $version ? ':'.$version : ''; - } - - $versions = $this->downloader->getVersions(); - - if (!isset($versions['splits'][$package])) { - return $version ? ':'.$version : ''; - } - - if (!$version || '*' === $version) { - try { - $config = @json_decode(file_get_contents(Factory::getComposerFile()), true); - } finally { - if (!$isRequire || !(isset($config['extra']['symfony']['require']) || isset($config['require']['symfony/framework-bundle']))) { - return ''; - } - } - $version = $config['extra']['symfony']['require'] ?? $config['require']['symfony/framework-bundle']; - } elseif ('dev' === $version) { - $version = '^'.$versions['dev-name'].'@dev'; - } elseif ('next' === $version) { - $version = '^'.$versions[$version].'@dev'; - } elseif (\in_array($version, self::$SYMFONY_VERSIONS, true)) { - $version = '^'.$versions[$version]; - } - - return ':'.$version; - } - - private function resolvePackageName(string $argument, int $position): string - { - if (false !== strpos($argument, '/') || preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $argument) || preg_match('{(?<=[a-z0-9_/-])\*|\*(?=[a-z0-9_/-])}i', $argument) || \in_array($argument, ['lock', 'mirrors', 'nothing', ''])) { - return $argument; - } - - $aliases = $this->downloader->getAliases(); - - if (isset($aliases[$argument])) { - $argument = $aliases[$argument]; - } else { - // is it a version or an alias that does not exist? - try { - $versionParser = new VersionParser(); - $versionParser->parseConstraints($argument); - } catch (\UnexpectedValueException $e) { - // is it a special Symfony version? - if (!\in_array($argument, self::$SYMFONY_VERSIONS, true)) { - $this->throwAlternatives($argument, $position); - } - } - } - - return $argument; - } - - /** - * @throws \UnexpectedValueException - */ - private function throwAlternatives(string $argument, int $position) - { - $alternatives = []; - foreach ($this->downloader->getAliases() as $alias => $package) { - $lev = levenshtein($argument, $alias); - if ($lev <= \strlen($argument) / 3 || ('' !== $argument && false !== strpos($alias, $argument))) { - $alternatives[$package][] = $alias; - } - } - - // First position can only be a package name, not a version - if ($alternatives || 0 === $position) { - $message = sprintf('"%s" is not a valid alias.', $argument); - if ($alternatives) { - if (1 === \count($alternatives)) { - $message .= " Did you mean this:\n"; - } else { - $message .= " Did you mean one of these:\n"; - } - foreach ($alternatives as $package => $aliases) { - $message .= sprintf(" \"%s\", supported aliases: \"%s\"\n", $package, implode('", "', $aliases)); - } - } - } else { - $message = sprintf('Could not parse version constraint "%s".', $argument); - } - - throw new \UnexpectedValueException($message); - } -} diff --git a/vendor/symfony/flex/src/ParallelDownloader.php b/vendor/symfony/flex/src/ParallelDownloader.php deleted file mode 100644 index 3acbc3b..0000000 --- a/vendor/symfony/flex/src/ParallelDownloader.php +++ /dev/null @@ -1,287 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Config; -use Composer\Downloader\TransportException; -use Composer\IO\IOInterface; -use Composer\Util\RemoteFilesystem; - -/** - * Speedup Composer by downloading packages in parallel. - * - * @author Nicolas Grekas - */ -class ParallelDownloader extends RemoteFilesystem -{ - private $io; - private $downloader; - private $quiet = true; - private $progress = true; - private $nextCallback; - private $downloadCount; - private $nextOptions = []; - private $sharedState; - private $fileName; - private $lastHeaders; - - public static $cacheNext = false; - protected static $cache = []; - - public function __construct(IOInterface $io, Config $config, array $options = [], $disableTls = false) - { - $this->io = $io; - if (!method_exists(parent::class, 'getRemoteContents')) { - $this->io->writeError('Composer >=1.7 not found, downloads will happen in sequence', true, IOInterface::DEBUG); - } elseif (!\extension_loaded('curl')) { - $this->io->writeError('ext-curl not found, downloads will happen in sequence', true, IOInterface::DEBUG); - } else { - $this->downloader = new CurlDownloader(); - } - parent::__construct($io, $config, $options, $disableTls); - } - - public function download(array &$nextArgs, callable $nextCallback, bool $quiet = true, bool $progress = true) - { - $previousState = [$this->quiet, $this->progress, $this->downloadCount, $this->nextCallback, $this->sharedState]; - $this->quiet = $quiet; - $this->progress = $progress; - $this->downloadCount = \count($nextArgs); - $this->nextCallback = $nextCallback; - $this->sharedState = (object) [ - 'bytesMaxCount' => 0, - 'bytesMax' => 0, - 'bytesTransferred' => 0, - 'nextArgs' => &$nextArgs, - 'nestingLevel' => 0, - 'maxNestingReached' => false, - 'lastProgress' => 0, - 'lastUpdate' => microtime(true), - ]; - - if (!$this->quiet) { - if (!$this->downloader && method_exists(parent::class, 'getRemoteContents')) { - $this->io->writeError('Enable the "cURL" PHP extension for faster downloads'); - } - - $note = ''; - if ($this->io->isDecorated()) { - $note = '\\' === \DIRECTORY_SEPARATOR ? '' : (false !== stripos(\PHP_OS, 'darwin') ? '🎵' : '🎶'); - $note .= $this->downloader ? ('\\' !== \DIRECTORY_SEPARATOR ? ' 💨' : '') : ''; - } - - $this->io->writeError(''); - $this->io->writeError(sprintf('Prefetching %d packages %s', $this->downloadCount, $note)); - $this->io->writeError(' - Downloading', false); - if ($this->progress) { - $this->io->writeError(' (0%)', false); - } - } - try { - $this->getNext(); - if ($this->quiet) { - // no-op - } elseif ($this->progress) { - $this->io->overwriteError(' (100%)'); - } else { - $this->io->writeError(' (100%)'); - } - } finally { - if (!$this->quiet) { - $this->io->writeError(''); - } - list($this->quiet, $this->progress, $this->downloadCount, $this->nextCallback, $this->sharedState) = $previousState; - } - } - - public function getOptions() - { - $options = array_replace_recursive(parent::getOptions(), $this->nextOptions); - $this->nextOptions = []; - - return $options; - } - - public function setNextOptions(array $options) - { - $this->nextOptions = parent::getOptions() !== $options ? $options : []; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getLastHeaders() - { - return $this->lastHeaders ?? parent::getLastHeaders(); - } - - /** - * {@inheritdoc} - */ - public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = []) - { - $options = array_replace_recursive($this->nextOptions, $options); - $this->nextOptions = []; - $rfs = clone $this; - $rfs->fileName = $fileName; - $rfs->progress = $this->progress && $progress; - - try { - return $rfs->get($originUrl, $fileUrl, $options, $fileName, $rfs->progress); - } finally { - $rfs->lastHeaders = null; - $this->lastHeaders = $rfs->getLastHeaders(); - } - } - - /** - * {@inheritdoc} - */ - public function getContents($originUrl, $fileUrl, $progress = true, $options = []) - { - return $this->copy($originUrl, $fileUrl, null, $progress, $options); - } - - /** - * @internal - */ - public function callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax, $nativeDownload = true) - { - if (!$nativeDownload && \STREAM_NOTIFY_SEVERITY_ERR === $severity) { - throw new TransportException($message, $messageCode); - } - - parent::callbackGet($notificationCode, $severity, $message, $messageCode, $bytesTransferred, $bytesMax); - - if (!$state = $this->sharedState) { - return; - } - - if (\STREAM_NOTIFY_FILE_SIZE_IS === $notificationCode) { - ++$state->bytesMaxCount; - $state->bytesMax += $bytesMax; - } - - if (!$bytesMax || \STREAM_NOTIFY_PROGRESS !== $notificationCode) { - if ($state->nextArgs && !$nativeDownload) { - $this->getNext(); - } - - return; - } - - if (0 < $state->bytesMax) { - $progress = $state->bytesMaxCount / $this->downloadCount; - $progress *= 100 * ($state->bytesTransferred + $bytesTransferred) / $state->bytesMax; - } else { - $progress = 0; - } - - if ($bytesTransferred === $bytesMax) { - $state->bytesTransferred += $bytesMax; - } - - if (null !== $state->nextArgs && !$this->quiet && $this->progress && 1 <= $progress - $state->lastProgress) { - $progressTime = microtime(true); - - if (5 <= $progress - $state->lastProgress || 1 <= $progressTime - $state->lastUpdate) { - $state->lastProgress = $progress; - $this->io->overwriteError(sprintf(' (%d%%)', $progress), false); - $state->lastUpdate = microtime(true); - } - } - - if (!$nativeDownload || !$state->nextArgs || $bytesTransferred === $bytesMax || $state->maxNestingReached) { - return; - } - - if (5 < $state->nestingLevel) { - $state->maxNestingReached = true; - } else { - $this->getNext(); - } - } - - /** - * {@inheritdoc} - */ - protected function getRemoteContents($originUrl, $fileUrl, $context, array &$responseHeaders = null, $maxFileSize = null) - { - if (isset(self::$cache[$fileUrl])) { - self::$cacheNext = false; - - $result = self::$cache[$fileUrl]; - - if (3 < \func_num_args()) { - list($responseHeaders, $result) = $result; - } - - return $result; - } - - if (self::$cacheNext) { - self::$cacheNext = false; - - if (3 < \func_num_args()) { - $result = $this->getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize); - self::$cache[$fileUrl] = [$responseHeaders, $result]; - } else { - $result = $this->getRemoteContents($originUrl, $fileUrl, $context); - self::$cache[$fileUrl] = $result; - } - - return $result; - } - - if (!$this->downloader || !preg_match('/^https?:/', $fileUrl)) { - return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize); - } - - try { - $result = $this->downloader->get($originUrl, $fileUrl, $context, $this->fileName); - - if (3 < \func_num_args()) { - list($responseHeaders, $result) = $result; - } - - return $result; - } catch (TransportException $e) { - $this->io->writeError('Retrying download: '.$e->getMessage(), true, IOInterface::DEBUG); - - return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize); - } catch (\Throwable $e) { - $responseHeaders = []; - throw $e; - } - } - - private function getNext() - { - $state = $this->sharedState; - ++$state->nestingLevel; - - try { - while ($state->nextArgs && (!$state->maxNestingReached || 1 === $state->nestingLevel)) { - try { - $state->maxNestingReached = false; - ($this->nextCallback)(...array_shift($state->nextArgs)); - } catch (TransportException $e) { - $this->io->writeError('Skipping download: '.$e->getMessage(), true, IOInterface::DEBUG); - } - } - } finally { - --$state->nestingLevel; - } - } -} diff --git a/vendor/symfony/flex/src/Path.php b/vendor/symfony/flex/src/Path.php deleted file mode 100644 index 8c7218b..0000000 --- a/vendor/symfony/flex/src/Path.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -/** - * @internal - */ -class Path -{ - private $workingDirectory; - - public function __construct($workingDirectory) - { - $this->workingDirectory = $workingDirectory; - } - - public function relativize(string $absolutePath): string - { - $relativePath = str_replace($this->workingDirectory, '.', $absolutePath); - - return is_dir($absolutePath) ? rtrim($relativePath, '/').'/' : $relativePath; - } - - public function concatenate(array $parts): string - { - $first = array_shift($parts); - - return array_reduce($parts, function (string $initial, string $next): string { - return rtrim($initial, '/').'/'.ltrim($next, '/'); - }, $first); - } -} diff --git a/vendor/symfony/flex/src/Recipe.php b/vendor/symfony/flex/src/Recipe.php deleted file mode 100644 index 3c86972..0000000 --- a/vendor/symfony/flex/src/Recipe.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Package\PackageInterface; - -/** - * @author Fabien Potencier - */ -class Recipe -{ - private $package; - private $name; - private $job; - private $data; - private $lock; - - public function __construct(PackageInterface $package, string $name, string $job, array $data, array $lock = []) - { - $this->package = $package; - $this->name = $name; - $this->job = $job; - $this->data = $data; - $this->lock = $lock; - } - - public function getPackage(): PackageInterface - { - return $this->package; - } - - public function getName(): string - { - return $this->name; - } - - public function getJob(): string - { - return $this->job; - } - - public function getManifest(): array - { - if (!isset($this->data['manifest'])) { - throw new \LogicException(sprintf('Manifest is not available for recipe "%s".', $this->name)); - } - - return $this->data['manifest']; - } - - public function getFiles(): array - { - return $this->data['files'] ?? []; - } - - public function getOrigin(): string - { - return $this->data['origin'] ?? ''; - } - - public function getFormattedOrigin(): string - { - if (!$this->getOrigin()) { - return ''; - } - - // symfony/translation:3.3@github.com/symfony/recipes:branch - if (!preg_match('/^([^:]++):([^@]++)@(.+)$/', $this->getOrigin(), $matches)) { - return $this->getOrigin(); - } - - return sprintf('%s (>=%s): From %s', $matches[1], $matches[2], 'auto-generated recipe' === $matches[3] ? ''.$matches[3].'' : $matches[3]); - } - - public function getURL(): string - { - if (!$this->data['origin']) { - return ''; - } - - // symfony/translation:3.3@github.com/symfony/recipes:branch - if (!preg_match('/^([^:]++):([^@]++)@([^:]++):(.+)$/', $this->data['origin'], $matches)) { - // that excludes auto-generated recipes, which is what we want - return ''; - } - - return sprintf('https://%s/tree/%s/%s/%s', $matches[3], $matches[4], $matches[1], $matches[2]); - } - - public function isContrib(): bool - { - return $this->data['is_contrib'] ?? false; - } - - public function getRef() - { - return $this->lock['recipe']['ref'] ?? null; - } - - public function isAuto(): bool - { - return !isset($this->lock['recipe']); - } - - public function getVersion(): string - { - return $this->lock['recipe']['version'] ?? $this->lock['version']; - } - - public function getLock(): array - { - return $this->lock; - } -} diff --git a/vendor/symfony/flex/src/Response.php b/vendor/symfony/flex/src/Response.php deleted file mode 100644 index 6384562..0000000 --- a/vendor/symfony/flex/src/Response.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -/** - * @author Fabien Potencier - */ -class Response implements \JsonSerializable -{ - private $body; - private $origHeaders; - private $headers; - private $code; - - /** - * @param mixed $body The response as JSON - */ - public function __construct($body, array $headers = [], int $code = 200) - { - $this->body = $body; - $this->origHeaders = $headers; - $this->headers = $this->parseHeaders($headers); - $this->code = $code; - } - - public function getStatusCode(): int - { - return $this->code; - } - - public function getHeader(string $name): string - { - return $this->headers[strtolower($name)][0] ?? ''; - } - - public function getHeaders(string $name): array - { - return $this->headers[strtolower($name)] ?? []; - } - - public function getBody() - { - return $this->body; - } - - public function getOrigHeaders(): array - { - return $this->origHeaders; - } - - public static function fromJson(array $json): self - { - $response = new self($json['body']); - $response->headers = $json['headers']; - - return $response; - } - - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ['body' => $this->body, 'headers' => $this->headers]; - } - - private function parseHeaders(array $headers): array - { - $values = []; - foreach (array_reverse($headers) as $header) { - if (preg_match('{^([^:]++):\s*(.+?)\s*$}i', $header, $match)) { - $values[strtolower($match[1])][] = $match[2]; - } elseif (preg_match('{^HTTP/}i', $header)) { - break; - } - } - - return $values; - } -} diff --git a/vendor/symfony/flex/src/ScriptExecutor.php b/vendor/symfony/flex/src/ScriptExecutor.php deleted file mode 100644 index 967aba9..0000000 --- a/vendor/symfony/flex/src/ScriptExecutor.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Composer; -use Composer\EventDispatcher\ScriptExecutionException; -use Composer\IO\IOInterface; -use Composer\Semver\Constraint\EmptyConstraint; -use Composer\Semver\Constraint\MatchAllConstraint; -use Composer\Util\ProcessExecutor; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Process\PhpExecutableFinder; - -/** - * @author Fabien Potencier - */ -class ScriptExecutor -{ - private $composer; - private $io; - private $options; - private $executor; - - public function __construct(Composer $composer, IOInterface $io, Options $options, ProcessExecutor $executor = null) - { - $this->composer = $composer; - $this->io = $io; - $this->options = $options; - $this->executor = $executor ?: new ProcessExecutor(); - } - - /** - * @throws ScriptExecutionException if the executed command returns a non-0 exit code - */ - public function execute(string $type, string $cmd) - { - $parsedCmd = $this->options->expandTargetDir($cmd); - if (null === $expandedCmd = $this->expandCmd($type, $parsedCmd)) { - return; - } - - $cmdOutput = new StreamOutput(fopen('php://temp', 'rw'), OutputInterface::VERBOSITY_VERBOSE, $this->io->isDecorated()); - $outputHandler = function ($type, $buffer) use ($cmdOutput) { - $cmdOutput->write($buffer, false, OutputInterface::OUTPUT_RAW); - }; - - $this->io->writeError(sprintf('Executing script %s', $parsedCmd), $this->io->isVerbose()); - $exitCode = $this->executor->execute($expandedCmd, $outputHandler); - - $code = 0 === $exitCode ? ' [OK]' : ' [KO]'; - - if ($this->io->isVerbose()) { - $this->io->writeError(sprintf('Executed script %s %s', $cmd, $code)); - } else { - $this->io->writeError($code); - } - - if (0 !== $exitCode) { - $this->io->writeError(' [KO]'); - $this->io->writeError(sprintf('Script %s returned with error code %s', $cmd, $exitCode)); - fseek($cmdOutput->getStream(), 0); - foreach (explode("\n", stream_get_contents($cmdOutput->getStream())) as $line) { - $this->io->writeError('!! '.$line); - } - - throw new ScriptExecutionException($cmd, $exitCode); - } - } - - private function expandCmd(string $type, string $cmd) - { - switch ($type) { - case 'symfony-cmd': - return $this->expandSymfonyCmd($cmd); - case 'php-script': - return $this->expandPhpScript($cmd); - case 'script': - return $cmd; - default: - throw new \InvalidArgumentException(sprintf('Invalid symfony/flex auto-script in composer.json: "%s" is not a valid type of command.', $type)); - } - } - - private function expandSymfonyCmd(string $cmd) - { - $repo = $this->composer->getRepositoryManager()->getLocalRepository(); - if (!$repo->findPackage('symfony/console', class_exists(MatchAllConstraint::class) ? new MatchAllConstraint() : new EmptyConstraint())) { - $this->io->writeError(sprintf('Skipping "%s" (needs symfony/console to run).', $cmd)); - - return null; - } - - $console = ProcessExecutor::escape($this->options->get('root-dir').'/'.$this->options->get('bin-dir').'/console'); - if ($this->io->isDecorated()) { - $console .= ' --ansi'; - } - - return $this->expandPhpScript($console.' '.$cmd); - } - - private function expandPhpScript(string $cmd): string - { - $phpFinder = new PhpExecutableFinder(); - if (!$php = $phpFinder->find(false)) { - throw new \RuntimeException('The PHP executable could not be found, add it to your PATH and try again.'); - } - - $arguments = $phpFinder->findArguments(); - - if ($env = (string) (getenv('COMPOSER_ORIGINAL_INIS'))) { - $paths = explode(\PATH_SEPARATOR, $env); - $ini = array_shift($paths); - } else { - $ini = php_ini_loaded_file(); - } - - if ($ini) { - $arguments[] = '--php-ini='.$ini; - } - - $phpArgs = implode(' ', array_map([ProcessExecutor::class, 'escape'], $arguments)); - - return ProcessExecutor::escape($php).($phpArgs ? ' '.$phpArgs : '').' '.$cmd; - } -} diff --git a/vendor/symfony/flex/src/SymfonyBundle.php b/vendor/symfony/flex/src/SymfonyBundle.php deleted file mode 100644 index 5c1cd1a..0000000 --- a/vendor/symfony/flex/src/SymfonyBundle.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Composer; -use Composer\Package\PackageInterface; - -/** - * @author Fabien Potencier - */ -class SymfonyBundle -{ - private $package; - private $operation; - private $vendorDir; - - public function __construct(Composer $composer, PackageInterface $package, string $operation) - { - $this->package = $package; - $this->operation = $operation; - $this->vendorDir = rtrim($composer->getConfig()->get('vendor-dir'), '/'); - } - - public function getClassNames(): array - { - $uninstall = 'uninstall' === $this->operation; - $classes = []; - $autoload = $this->package->getAutoload(); - $isSyliusPlugin = 'sylius-plugin' === $this->package->getType(); - foreach (['psr-4' => true, 'psr-0' => false] as $psr => $isPsr4) { - if (!isset($autoload[$psr])) { - continue; - } - - foreach ($autoload[$psr] as $namespace => $paths) { - if (!\is_array($paths)) { - $paths = [$paths]; - } - foreach ($paths as $path) { - foreach ($this->extractClassNames($namespace, $isSyliusPlugin) as $class) { - // we only check class existence on install as we do have the code available - // in contrast to uninstall operation - if (!$uninstall && !$this->isBundleClass($class, $path, $isPsr4)) { - continue; - } - - $classes[] = $class; - } - } - } - } - - return $classes; - } - - private function extractClassNames(string $namespace, bool $isSyliusPlugin): array - { - $namespace = trim($namespace, '\\'); - $class = $namespace.'\\'; - $parts = explode('\\', $namespace); - $suffix = $parts[\count($parts) - 1]; - $endOfWord = substr($suffix, -6); - - if ($isSyliusPlugin) { - if ('Bundle' !== $endOfWord && 'Plugin' !== $endOfWord) { - $suffix .= 'Bundle'; - } - } elseif ('Bundle' !== $endOfWord) { - $suffix .= 'Bundle'; - } - - $classes = [$class.$suffix]; - $acc = ''; - foreach (\array_slice($parts, 0, -1) as $part) { - if ('Bundle' === $part || ($isSyliusPlugin && 'Plugin' === $part)) { - continue; - } - $classes[] = $class.$part.$suffix; - $acc .= $part; - $classes[] = $class.$acc.$suffix; - } - - return array_unique($classes); - } - - private function isBundleClass(string $class, string $path, bool $isPsr4): bool - { - $classPath = ($this->vendorDir ? $this->vendorDir.'/' : '').$this->package->getPrettyName().'/'.$path.'/'; - $parts = explode('\\', $class); - $class = $parts[\count($parts) - 1]; - if (!$isPsr4) { - $classPath .= str_replace('\\', '', implode('/', \array_slice($parts, 0, -1))).'/'; - } - $classPath .= str_replace('\\', '/', $class).'.php'; - - if (!file_exists($classPath)) { - return false; - } - - // heuristic that should work in almost all cases - return false !== strpos(file_get_contents($classPath), 'Symfony\Component\HttpKernel\Bundle\Bundle'); - } -} diff --git a/vendor/symfony/flex/src/TruncatedComposerRepository.php b/vendor/symfony/flex/src/TruncatedComposerRepository.php deleted file mode 100644 index 82485ae..0000000 --- a/vendor/symfony/flex/src/TruncatedComposerRepository.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Config; -use Composer\EventDispatcher\EventDispatcher; -use Composer\IO\IOInterface; -use Composer\Package\RootPackageInterface; -use Composer\Repository\ComposerRepository as BaseComposerRepository; -use Composer\Util\RemoteFilesystem; - -/** - * @author Nicolas Grekas - */ -class TruncatedComposerRepository extends BaseComposerRepository -{ - public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, RemoteFilesystem $rfs = null) - { - parent::__construct($repoConfig, $io, $config, $eventDispatcher, $rfs); - - $this->cache = new Cache($io, $config->get('cache-repo-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $this->url), 'a-z0-9.$'); - } - - public function setSymfonyRequire(string $symfonyRequire, RootPackageInterface $rootPackage, Downloader $downloader, IOInterface $io) - { - $this->cache->setSymfonyRequire($symfonyRequire, $rootPackage, $downloader, $io); - } - - protected function fetchFile($filename, $cacheKey = null, $sha256 = null, $storeLastModifiedTime = false) - { - $data = parent::fetchFile($filename, $cacheKey, $sha256, $storeLastModifiedTime); - - return \is_array($data) ? $this->cache->removeLegacyTags($data) : $data; - } -} diff --git a/vendor/symfony/flex/src/Unpack/Operation.php b/vendor/symfony/flex/src/Unpack/Operation.php deleted file mode 100644 index 1a6efd3..0000000 --- a/vendor/symfony/flex/src/Unpack/Operation.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Unpack; - -class Operation -{ - private $packages = []; - private $unpack; - private $sort; - - public function __construct(bool $unpack, bool $sort) - { - $this->unpack = $unpack; - $this->sort = $sort; - } - - public function addPackage(string $name, string $version, bool $dev) - { - $this->packages[] = [ - 'name' => $name, - 'version' => $version, - 'dev' => $dev, - ]; - } - - public function getPackages(): array - { - return $this->packages; - } - - public function shouldUnpack(): bool - { - return $this->unpack; - } - - public function shouldSort(): bool - { - return $this->sort; - } -} diff --git a/vendor/symfony/flex/src/Unpack/Result.php b/vendor/symfony/flex/src/Unpack/Result.php deleted file mode 100644 index e352936..0000000 --- a/vendor/symfony/flex/src/Unpack/Result.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Unpack; - -use Composer\Package\PackageInterface; - -class Result -{ - private $unpacked = []; - private $required = []; - - public function addUnpacked(PackageInterface $package): bool - { - $name = $package->getName(); - - if (!isset($this->unpacked[$name])) { - $this->unpacked[$name] = $package; - - return true; - } - - return false; - } - - /** - * @return PackageInterface[] - */ - public function getUnpacked(): array - { - return $this->unpacked; - } - - public function addRequired(string $package) - { - $this->required[] = $package; - } - - /** - * @return string[] - */ - public function getRequired(): array - { - // we need at least one package for the command to work properly - return $this->required ?: ['symfony/flex']; - } -} diff --git a/vendor/symfony/flex/src/Unpacker.php b/vendor/symfony/flex/src/Unpacker.php deleted file mode 100644 index 9748292..0000000 --- a/vendor/symfony/flex/src/Unpacker.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex; - -use Composer\Composer; -use Composer\Config\JsonConfigSource; -use Composer\DependencyResolver\Pool; -use Composer\Factory; -use Composer\IO\IOInterface; -use Composer\Json\JsonFile; -use Composer\Json\JsonManipulator; -use Composer\Package\Locker; -use Composer\Package\Version\VersionSelector; -use Composer\Plugin\PluginInterface; -use Composer\Repository\CompositeRepository; -use Composer\Repository\RepositorySet; -use Composer\Semver\VersionParser; -use Symfony\Flex\Unpack\Operation; -use Symfony\Flex\Unpack\Result; - -class Unpacker -{ - private $composer; - private $resolver; - private $dryRun; - private $versionParser; - - public function __construct(Composer $composer, PackageResolver $resolver, bool $dryRun) - { - $this->composer = $composer; - $this->resolver = $resolver; - $this->dryRun = $dryRun; - $this->versionParser = new VersionParser(); - } - - public function unpack(Operation $op, Result $result = null, &$links = [], bool $devRequire = false): Result - { - if (null === $result) { - $result = new Result(); - } - - $localRepo = $this->composer->getRepositoryManager()->getLocalRepository(); - foreach ($op->getPackages() as $package) { - $pkg = $localRepo->findPackage($package['name'], '*'); - $pkg = $pkg ?? $this->composer->getRepositoryManager()->findPackage($package['name'], $package['version'] ?: '*'); - - // not unpackable or no --unpack flag or empty packs (markers) - if ( - null === $pkg || - 'symfony-pack' !== $pkg->getType() || - !$op->shouldUnpack() || - 0 === \count($pkg->getRequires()) + \count($pkg->getDevRequires()) - ) { - $result->addRequired($package['name'].($package['version'] ? ':'.$package['version'] : '')); - - continue; - } - - if (!$result->addUnpacked($pkg)) { - continue; - } - - $requires = []; - foreach ($pkg->getRequires() as $link) { - $requires[$link->getTarget()] = $link; - } - $devRequires = $pkg->getDevRequires(); - - foreach ($devRequires as $i => $link) { - if (!isset($requires[$link->getTarget()])) { - throw new \RuntimeException(sprintf('Symfony pack "%s" must duplicate all entries from "require-dev" into "require" but entry "%s" was not found.', $package['name'], $link->getTarget())); - } - $devRequires[$i] = $requires[$link->getTarget()]; - unset($requires[$link->getTarget()]); - } - - $versionSelector = null; - foreach ([$requires, $devRequires] as $dev => $requires) { - $dev = $dev ?: $devRequire ?: $package['dev']; - - foreach ($requires as $link) { - if ('php' === $linkName = $link->getTarget()) { - continue; - } - - $constraint = $link->getPrettyConstraint(); - $constraint = substr($this->resolver->parseVersion($linkName, $constraint, true), 1) ?: $constraint; - - if ($subPkg = $localRepo->findPackage($linkName, '*')) { - if ('symfony-pack' === $subPkg->getType()) { - $subOp = new Operation(true, $op->shouldSort()); - $subOp->addPackage($subPkg->getName(), $constraint, $dev); - $result = $this->unpack($subOp, $result, $links, $dev); - continue; - } - - if ('*' === $constraint) { - if (null === $versionSelector) { - $pool = class_exists(RepositorySet::class) ? RepositorySet::class : Pool::class; - $pool = new $pool($this->composer->getPackage()->getMinimumStability(), $this->composer->getPackage()->getStabilityFlags()); - $pool->addRepository(new CompositeRepository($this->composer->getRepositoryManager()->getRepositories())); - $versionSelector = new VersionSelector($pool); - } - - $constraint = $versionSelector->findRecommendedRequireVersion($subPkg); - } - } - - $linkType = $dev ? 'require-dev' : 'require'; - $constraint = $this->versionParser->parseConstraints($constraint); - - if (isset($links[$linkName])) { - $links[$linkName]['constraints'][] = $constraint; - if ('require' === $linkType) { - $links[$linkName]['type'] = 'require'; - } - } else { - $links[$linkName] = [ - 'type' => $linkType, - 'name' => $linkName, - 'constraints' => [$constraint], - ]; - } - } - } - } - - if ($this->dryRun || 1 < \func_num_args()) { - return $result; - } - - $jsonPath = Factory::getComposerFile(); - $jsonContent = file_get_contents($jsonPath); - $jsonStored = json_decode($jsonContent, true); - $jsonManipulator = new JsonManipulator($jsonContent); - - foreach ($links as $link) { - // nothing to do, package is already present in the "require" section - if (isset($jsonStored['require'][$link['name']])) { - continue; - } - - if (isset($jsonStored['require-dev'][$link['name']])) { - // nothing to do, package is already present in the "require-dev" section - if ('require-dev' === $link['type']) { - continue; - } - - // removes package from "require-dev", because it will be moved to "require" - // save stored constraint - $link['constraints'][] = $this->versionParser->parseConstraints($jsonStored['require-dev'][$link['name']]); - $jsonManipulator->removeSubNode('require-dev', $link['name']); - } - - $constraint = end($link['constraints']); - - if (!$jsonManipulator->addLink($link['type'], $link['name'], $constraint->getPrettyString(), $op->shouldSort())) { - throw new \RuntimeException(sprintf('Unable to unpack package "%s".', $link['name'])); - } - } - - file_put_contents($jsonPath, $jsonManipulator->getContents()); - - return $result; - } - - public function updateLock(Result $result, IOInterface $io): void - { - $json = new JsonFile(Factory::getComposerFile()); - $manipulator = new JsonConfigSource($json); - $locker = $this->composer->getLocker(); - $lockData = $locker->getLockData(); - - foreach ($result->getUnpacked() as $package) { - $manipulator->removeLink('require-dev', $package->getName()); - foreach ($lockData['packages-dev'] as $i => $pkg) { - if ($package->getName() === $pkg['name']) { - unset($lockData['packages-dev'][$i]); - } - } - $manipulator->removeLink('require', $package->getName()); - foreach ($lockData['packages'] as $i => $pkg) { - if ($package->getName() === $pkg['name']) { - unset($lockData['packages'][$i]); - } - } - } - $jsonContent = file_get_contents($json->getPath()); - $lockData['packages'] = array_values($lockData['packages']); - $lockData['packages-dev'] = array_values($lockData['packages-dev']); - $lockData['content-hash'] = Locker::getContentHash($jsonContent); - $lockFile = new JsonFile(substr($json->getPath(), 0, -4).'lock', null, $io); - - if (!$this->dryRun) { - $lockFile->write($lockData); - } - - // force removal of files under vendor/ - if (version_compare('2.0.0', PluginInterface::PLUGIN_API_VERSION, '>')) { - $locker = new Locker($io, $lockFile, $this->composer->getRepositoryManager(), $this->composer->getInstallationManager(), $jsonContent); - } else { - $locker = new Locker($io, $lockFile, $this->composer->getInstallationManager(), $jsonContent); - } - $this->composer->setLocker($locker); - } -} diff --git a/vendor/symfony/flex/src/Update/DiffHelper.php b/vendor/symfony/flex/src/Update/DiffHelper.php deleted file mode 100644 index 7072889..0000000 --- a/vendor/symfony/flex/src/Update/DiffHelper.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Update; - -class DiffHelper -{ - public static function removeFilesFromPatch(string $patch, array $files, array &$removedPatches): string - { - foreach ($files as $filename) { - $start = strpos($patch, sprintf('diff --git a/%s b/%s', $filename, $filename)); - if (false === $start) { - throw new \LogicException(sprintf('Could not find file "%s" in the patch.', $filename)); - } - - $end = strpos($patch, 'diff --git a/', $start + 1); - $contentBefore = substr($patch, 0, $start); - if (false === $end) { - // last patch in the file - $removedPatches[$filename] = rtrim(substr($patch, $start), "\n"); - $patch = rtrim($contentBefore, "\n"); - - continue; - } - - $removedPatches[$filename] = rtrim(substr($patch, $start, $end - $start), "\n"); - $patch = $contentBefore.substr($patch, $end); - } - - // valid patches end with a blank line - if ($patch && "\n" !== substr($patch, \strlen($patch) - 1, 1)) { - $patch = $patch."\n"; - } - - return $patch; - } -} diff --git a/vendor/symfony/flex/src/Update/RecipePatch.php b/vendor/symfony/flex/src/Update/RecipePatch.php deleted file mode 100644 index ff5f55b..0000000 --- a/vendor/symfony/flex/src/Update/RecipePatch.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Update; - -class RecipePatch -{ - private $patch; - private $blobs; - private $removedPatches; - - public function __construct(string $patch, array $blobs, array $removedPatches = []) - { - $this->patch = $patch; - $this->blobs = $blobs; - $this->removedPatches = $removedPatches; - } - - public function getPatch(): string - { - return $this->patch; - } - - public function getBlobs(): array - { - return $this->blobs; - } - - /** - * Patches for modified files that were removed because the file - * has been deleted in the user's project. - */ - public function getRemovedPatches(): array - { - return $this->removedPatches; - } -} diff --git a/vendor/symfony/flex/src/Update/RecipePatcher.php b/vendor/symfony/flex/src/Update/RecipePatcher.php deleted file mode 100644 index 288cf86..0000000 --- a/vendor/symfony/flex/src/Update/RecipePatcher.php +++ /dev/null @@ -1,226 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Update; - -use Composer\IO\IOInterface; -use Composer\Util\ProcessExecutor; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; - -class RecipePatcher -{ - private $rootDir; - private $filesystem; - private $io; - private $processExecutor; - - public function __construct(string $rootDir, IOInterface $io) - { - $this->rootDir = $rootDir; - $this->filesystem = new Filesystem(); - $this->io = $io; - $this->processExecutor = new ProcessExecutor($io); - } - - /** - * Applies the patch. If it fails unexpectedly, an exception will be thrown. - * - * @return bool returns true if fully successful, false if conflicts were encountered - */ - public function applyPatch(RecipePatch $patch): bool - { - if (!$patch->getPatch()) { - // nothing to do! - return true; - } - - $addedBlobs = $this->addMissingBlobs($patch->getBlobs()); - - $patchPath = $this->rootDir.'/_flex_recipe_update.patch'; - file_put_contents($patchPath, $patch->getPatch()); - - try { - $this->execute('git update-index --refresh', $this->rootDir); - - $output = ''; - $statusCode = $this->processExecutor->execute('git apply "_flex_recipe_update.patch" -3', $output, $this->rootDir); - - if (0 === $statusCode) { - // successful with no conflicts - return true; - } - - if (false !== strpos($this->processExecutor->getErrorOutput(), 'with conflicts')) { - // successful with conflicts - return false; - } - - throw new \LogicException('Error applying the patch: '.$this->processExecutor->getErrorOutput()); - } finally { - unlink($patchPath); - // clean up any temporary blobs - foreach ($addedBlobs as $filename) { - unlink($filename); - } - } - } - - public function generatePatch(array $originalFiles, array $newFiles): RecipePatch - { - // null implies "file does not exist" - $originalFiles = array_filter($originalFiles, function ($file) { - return null !== $file; - }); - $newFiles = array_filter($newFiles, function ($file) { - return null !== $file; - }); - - // find removed files and add them so they will be deleted - foreach ($originalFiles as $file => $contents) { - if (!isset($newFiles[$file])) { - $newFiles[$file] = null; - } - } - - // If a file is being modified, but does not exist in the current project, - // it cannot be patched. We generate the diff for these, but then remove - // it from the patch (and optionally report this diff to the user). - $modifiedFiles = array_intersect_key(array_keys($originalFiles), array_keys($newFiles)); - $deletedModifiedFiles = []; - foreach ($modifiedFiles as $modifiedFile) { - if (!file_exists($this->rootDir.'/'.$modifiedFile) && $originalFiles[$modifiedFile] !== $newFiles[$modifiedFile]) { - $deletedModifiedFiles[] = $modifiedFile; - } - } - - $tmpPath = sys_get_temp_dir().'/_flex_recipe_update'.uniqid(mt_rand(), true); - $this->filesystem->mkdir($tmpPath); - - try { - $this->execute('git init', $tmpPath); - $this->execute('git config commit.gpgsign false', $tmpPath); - $this->execute('git config user.name "Flex Updater"', $tmpPath); - $this->execute('git config user.email ""', $tmpPath); - - $blobs = []; - if (\count($originalFiles) > 0) { - $this->writeFiles($originalFiles, $tmpPath); - $this->execute('git add -A', $tmpPath); - $this->execute('git commit -m "original files"', $tmpPath); - - $blobs = $this->generateBlobs($originalFiles, $tmpPath); - } - - $this->writeFiles($newFiles, $tmpPath); - $this->execute('git add -A', $tmpPath); - - $patchString = $this->execute('git diff --cached', $tmpPath); - $removedPatches = []; - $patchString = DiffHelper::removeFilesFromPatch($patchString, $deletedModifiedFiles, $removedPatches); - - return new RecipePatch( - $patchString, - $blobs, - $removedPatches - ); - } finally { - try { - $this->filesystem->remove($tmpPath); - } catch (IOException $e) { - // this can sometimes fail due to git file permissions - // if that happens, just leave it: we're in the temp directory anyways - } - } - } - - private function writeFiles(array $files, string $directory): void - { - foreach ($files as $filename => $contents) { - $path = $directory.'/'.$filename; - if (null === $contents) { - if (file_exists($path)) { - unlink($path); - } - - continue; - } - - if (!file_exists(\dirname($path))) { - $this->filesystem->mkdir(\dirname($path)); - } - file_put_contents($path, $contents); - } - } - - private function execute(string $command, string $cwd): string - { - $output = ''; - $statusCode = $this->processExecutor->execute($command, $output, $cwd); - - if (0 !== $statusCode) { - throw new \LogicException(sprintf('Command "%s" failed: "%s". Output: "%s".', $command, $this->processExecutor->getErrorOutput(), $output)); - } - - return $output; - } - - /** - * Adds git blobs for each original file. - * - * For patching to work, each original file & contents needs to be - * available to git as a blob. This is because the patch contains - * the ref to the original blob, and git uses that to find the - * original file (which is needed for the 3-way merge). - */ - private function addMissingBlobs(array $blobs): array - { - $addedBlobs = []; - foreach ($blobs as $hash => $contents) { - $blobPath = $this->rootDir.'/'.$this->getBlobPath($hash); - if (file_exists($blobPath)) { - continue; - } - - $addedBlobs[] = $blobPath; - if (!file_exists(\dirname($blobPath))) { - $this->filesystem->mkdir(\dirname($blobPath)); - } - file_put_contents($blobPath, $contents); - } - - return $addedBlobs; - } - - private function generateBlobs(array $originalFiles, string $originalFilesRoot): array - { - $addedBlobs = []; - foreach ($originalFiles as $filename => $contents) { - // if the file didn't originally exist, no blob needed - if (!file_exists($originalFilesRoot.'/'.$filename)) { - continue; - } - - $hash = trim($this->execute('git hash-object '.ProcessExecutor::escape($filename), $originalFilesRoot)); - $addedBlobs[$hash] = file_get_contents($originalFilesRoot.'/'.$this->getBlobPath($hash)); - } - - return $addedBlobs; - } - - private function getBlobPath(string $hash): string - { - $hashStart = substr($hash, 0, 2); - $hashEnd = substr($hash, 2); - - return '.git/objects/'.$hashStart.'/'.$hashEnd; - } -} diff --git a/vendor/symfony/flex/src/Update/RecipeUpdate.php b/vendor/symfony/flex/src/Update/RecipeUpdate.php deleted file mode 100644 index 9944938..0000000 --- a/vendor/symfony/flex/src/Update/RecipeUpdate.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Flex\Update; - -use Symfony\Flex\Lock; -use Symfony\Flex\Recipe; - -class RecipeUpdate -{ - private $originalRecipe; - private $newRecipe; - private $lock; - private $rootDir; - - /** @var string[] */ - private $originalRecipeFiles = []; - /** @var string[] */ - private $newRecipeFiles = []; - private $copyFromPackagePaths = []; - - public function __construct(Recipe $originalRecipe, Recipe $newRecipe, Lock $lock, string $rootDir) - { - $this->originalRecipe = $originalRecipe; - $this->newRecipe = $newRecipe; - $this->lock = $lock; - $this->rootDir = $rootDir; - } - - public function getOriginalRecipe(): Recipe - { - return $this->originalRecipe; - } - - public function getNewRecipe(): Recipe - { - return $this->newRecipe; - } - - public function getLock(): Lock - { - return $this->lock; - } - - public function getRootDir(): string - { - return $this->rootDir; - } - - public function getPackageName(): string - { - return $this->originalRecipe->getName(); - } - - public function setOriginalFile(string $filename, ?string $contents): void - { - $this->originalRecipeFiles[$filename] = $contents; - } - - public function setNewFile(string $filename, ?string $contents): void - { - $this->newRecipeFiles[$filename] = $contents; - } - - public function addOriginalFiles(array $files) - { - foreach ($files as $file => $contents) { - if (null === $contents) { - continue; - } - - $this->setOriginalFile($file, $contents); - } - } - - public function addNewFiles(array $files) - { - foreach ($files as $file => $contents) { - if (null === $contents) { - continue; - } - - $this->setNewFile($file, $contents); - } - } - - public function getOriginalFiles(): array - { - return $this->originalRecipeFiles; - } - - public function getNewFiles(): array - { - return $this->newRecipeFiles; - } - - public function getCopyFromPackagePaths(): array - { - return $this->copyFromPackagePaths; - } - - public function addCopyFromPackagePath(string $source, string $target) - { - $this->copyFromPackagePaths[$source] = $target; - } -} diff --git a/vendor/symfony/form/AbstractExtension.php b/vendor/symfony/form/AbstractExtension.php deleted file mode 100644 index ca27900..0000000 --- a/vendor/symfony/form/AbstractExtension.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractExtension implements FormExtensionInterface -{ - /** - * The types provided by this extension. - * - * @var FormTypeInterface[] - */ - private $types; - - /** - * The type extensions provided by this extension. - * - * @var FormTypeExtensionInterface[][] - */ - private $typeExtensions; - - /** - * The type guesser provided by this extension. - * - * @var FormTypeGuesserInterface|null - */ - private $typeGuesser; - - /** - * Whether the type guesser has been loaded. - * - * @var bool - */ - private $typeGuesserLoaded = false; - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (null === $this->types) { - $this->initTypes(); - } - - if (!isset($this->types[$name])) { - throw new InvalidArgumentException(sprintf('The type "%s" cannot be loaded by this extension.', $name)); - } - - return $this->types[$name]; - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - if (null === $this->types) { - $this->initTypes(); - } - - return isset($this->types[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - if (null === $this->typeExtensions) { - $this->initTypeExtensions(); - } - - return $this->typeExtensions[$name] - ?? []; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - if (null === $this->typeExtensions) { - $this->initTypeExtensions(); - } - - return isset($this->typeExtensions[$name]) && \count($this->typeExtensions[$name]) > 0; - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (!$this->typeGuesserLoaded) { - $this->initTypeGuesser(); - } - - return $this->typeGuesser; - } - - /** - * Registers the types. - * - * @return FormTypeInterface[] - */ - protected function loadTypes() - { - return []; - } - - /** - * Registers the type extensions. - * - * @return FormTypeExtensionInterface[] - */ - protected function loadTypeExtensions() - { - return []; - } - - /** - * Registers the type guesser. - * - * @return FormTypeGuesserInterface|null - */ - protected function loadTypeGuesser() - { - return null; - } - - /** - * Initializes the types. - * - * @throws UnexpectedTypeException if any registered type is not an instance of FormTypeInterface - */ - private function initTypes() - { - $this->types = []; - - foreach ($this->loadTypes() as $type) { - if (!$type instanceof FormTypeInterface) { - throw new UnexpectedTypeException($type, FormTypeInterface::class); - } - - $this->types[\get_class($type)] = $type; - } - } - - /** - * Initializes the type extensions. - * - * @throws UnexpectedTypeException if any registered type extension is not - * an instance of FormTypeExtensionInterface - */ - private function initTypeExtensions() - { - $this->typeExtensions = []; - - foreach ($this->loadTypeExtensions() as $extension) { - if (!$extension instanceof FormTypeExtensionInterface) { - throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::class); - } - - foreach ($extension::getExtendedTypes() as $extendedType) { - $this->typeExtensions[$extendedType][] = $extension; - } - } - } - - /** - * Initializes the type guesser. - * - * @throws UnexpectedTypeException if the type guesser is not an instance of FormTypeGuesserInterface - */ - private function initTypeGuesser() - { - $this->typeGuesserLoaded = true; - - $this->typeGuesser = $this->loadTypeGuesser(); - if (null !== $this->typeGuesser && !$this->typeGuesser instanceof FormTypeGuesserInterface) { - throw new UnexpectedTypeException($this->typeGuesser, FormTypeGuesserInterface::class); - } - } -} diff --git a/vendor/symfony/form/AbstractRendererEngine.php b/vendor/symfony/form/AbstractRendererEngine.php deleted file mode 100644 index 07bf28c..0000000 --- a/vendor/symfony/form/AbstractRendererEngine.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Default implementation of {@link FormRendererEngineInterface}. - * - * @author Bernhard Schussek - */ -abstract class AbstractRendererEngine implements FormRendererEngineInterface, ResetInterface -{ - /** - * The variable in {@link FormView} used as cache key. - */ - public const CACHE_KEY_VAR = 'cache_key'; - - /** - * @var array - */ - protected $defaultThemes; - - /** - * @var array[] - */ - protected $themes = []; - - /** - * @var bool[] - */ - protected $useDefaultThemes = []; - - /** - * @var array[] - */ - protected $resources = []; - - /** - * @var array> - */ - private $resourceHierarchyLevels = []; - - /** - * Creates a new renderer engine. - * - * @param array $defaultThemes The default themes. The type of these - * themes is open to the implementation. - */ - public function __construct(array $defaultThemes = []) - { - $this->defaultThemes = $defaultThemes; - } - - /** - * {@inheritdoc} - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - // Do not cast, as casting turns objects into arrays of properties - $this->themes[$cacheKey] = \is_array($themes) ? $themes : [$themes]; - $this->useDefaultThemes[$cacheKey] = $useDefaultThemes; - - // Unset instead of resetting to an empty array, in order to allow - // implementations (like TwigRendererEngine) to check whether $cacheKey - // is set at all. - unset($this->resources[$cacheKey], $this->resourceHierarchyLevels[$cacheKey]); - } - - /** - * {@inheritdoc} - */ - public function getResourceForBlockName(FormView $view, string $blockName) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockName($cacheKey, $view, $blockName); - } - - return $this->resources[$cacheKey][$blockName]; - } - - /** - * {@inheritdoc} - */ - public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel); - } - - return $this->resources[$cacheKey][$blockName]; - } - - /** - * {@inheritdoc} - */ - public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - if (!isset($this->resources[$cacheKey][$blockName])) { - $this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $hierarchyLevel); - } - - // If $block was previously rendered loaded with loadTemplateForBlock(), the template - // is cached but the hierarchy level is not. In this case, we know that the block - // exists at this very hierarchy level, so we can just set it. - if (!isset($this->resourceHierarchyLevels[$cacheKey][$blockName])) { - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel; - } - - return $this->resourceHierarchyLevels[$cacheKey][$blockName]; - } - - /** - * Loads the cache with the resource for a given block name. - * - * @see getResourceForBlock() - * - * @return bool - */ - abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName); - - /** - * Loads the cache with the resource for a specific level of a block hierarchy. - * - * @see getResourceForBlockHierarchy() - */ - private function loadResourceForBlockNameHierarchy(string $cacheKey, FormView $view, array $blockNameHierarchy, int $hierarchyLevel): bool - { - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - // Try to find a template for that block - if ($this->loadResourceForBlockName($cacheKey, $view, $blockName)) { - // If loadTemplateForBlock() returns true, it was able to populate the - // cache. The only missing thing is to set the hierarchy level at which - // the template was found. - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $hierarchyLevel; - - return true; - } - - if ($hierarchyLevel > 0) { - $parentLevel = $hierarchyLevel - 1; - $parentBlockName = $blockNameHierarchy[$parentLevel]; - - // The next two if statements contain slightly duplicated code. This is by intention - // and tries to avoid execution of unnecessary checks in order to increase performance. - - if (isset($this->resources[$cacheKey][$parentBlockName])) { - // It may happen that the parent block is already loaded, but its level is not. - // In this case, the parent block must have been loaded by loadResourceForBlock(), - // which does not check the hierarchy of the block. Subsequently the block must have - // been found directly on the parent level. - if (!isset($this->resourceHierarchyLevels[$cacheKey][$parentBlockName])) { - $this->resourceHierarchyLevels[$cacheKey][$parentBlockName] = $parentLevel; - } - - // Cache the shortcuts for further accesses - $this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName]; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName]; - - return true; - } - - if ($this->loadResourceForBlockNameHierarchy($cacheKey, $view, $blockNameHierarchy, $parentLevel)) { - // Cache the shortcuts for further accesses - $this->resources[$cacheKey][$blockName] = $this->resources[$cacheKey][$parentBlockName]; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = $this->resourceHierarchyLevels[$cacheKey][$parentBlockName]; - - return true; - } - } - - // Cache the result for further accesses - $this->resources[$cacheKey][$blockName] = false; - $this->resourceHierarchyLevels[$cacheKey][$blockName] = false; - - return false; - } - - public function reset(): void - { - $this->themes = []; - $this->useDefaultThemes = []; - $this->resources = []; - $this->resourceHierarchyLevels = []; - } -} diff --git a/vendor/symfony/form/AbstractType.php b/vendor/symfony/form/AbstractType.php deleted file mode 100644 index 3325b8b..0000000 --- a/vendor/symfony/form/AbstractType.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Util\StringUtil; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractType implements FormTypeInterface -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return StringUtil::fqcnToBlockPrefix(static::class) ?: ''; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return FormType::class; - } -} diff --git a/vendor/symfony/form/AbstractTypeExtension.php b/vendor/symfony/form/AbstractTypeExtension.php deleted file mode 100644 index 9d369bf..0000000 --- a/vendor/symfony/form/AbstractTypeExtension.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -abstract class AbstractTypeExtension implements FormTypeExtensionInterface -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - } -} diff --git a/vendor/symfony/form/Button.php b/vendor/symfony/form/Button.php deleted file mode 100644 index 1ffdd46..0000000 --- a/vendor/symfony/form/Button.php +++ /dev/null @@ -1,455 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\AlreadySubmittedException; -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * A form button. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class Button implements \IteratorAggregate, FormInterface -{ - /** - * @var FormInterface|null - */ - private $parent; - - /** - * @var FormConfigInterface - */ - private $config; - - /** - * @var bool - */ - private $submitted = false; - - /** - * Creates a new button from a form configuration. - */ - public function __construct(FormConfigInterface $config) - { - $this->config = $config; - } - - /** - * Unsupported method. - * - * @param string $offset - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) - { - return false; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * - * @return FormInterface - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * @param FormInterface $value - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param string $offset - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * {@inheritdoc} - */ - public function setParent(FormInterface $parent = null) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot set the parent of a submitted button.'); - } - - $this->parent = $parent; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function add($child, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function get(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function has(string $name) - { - return false; - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @throws BadMethodCallException - */ - public function remove(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * {@inheritdoc} - */ - public function all() - { - return []; - } - - /** - * {@inheritdoc} - */ - public function getErrors(bool $deep = false, bool $flatten = true) - { - return new FormErrorIterator($this, []); - } - - /** - * Unsupported method. - * - * This method should not be invoked. - * - * @param mixed $modelData - * - * @return $this - */ - public function setData($modelData) - { - // no-op, called during initialization of the form tree - return $this; - } - - /** - * Unsupported method. - */ - public function getData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getNormData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getViewData() - { - return null; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getExtraData() - { - return []; - } - - /** - * Returns the button's configuration. - * - * @return FormConfigInterface - */ - public function getConfig() - { - return $this->config; - } - - /** - * Returns whether the button is submitted. - * - * @return bool - */ - public function isSubmitted() - { - return $this->submitted; - } - - /** - * Returns the name by which the button is identified in forms. - * - * @return string - */ - public function getName() - { - return $this->config->getName(); - } - - /** - * Unsupported method. - */ - public function getPropertyPath() - { - return null; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addError(FormError $error) - { - throw new BadMethodCallException('Buttons cannot have errors.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isValid() - { - return true; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isRequired() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isDisabled() - { - if ($this->parent && $this->parent->isDisabled()) { - return true; - } - - return $this->config->getDisabled(); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isEmpty() - { - return true; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function isSynchronized() - { - return true; - } - - /** - * Unsupported method. - */ - public function getTransformationFailure() - { - return null; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function initialize() - { - throw new BadMethodCallException('Buttons cannot be initialized. Call initialize() on the root form instead.'); - } - - /** - * Unsupported method. - * - * @param mixed $request - * - * @throws BadMethodCallException - */ - public function handleRequest($request = null) - { - throw new BadMethodCallException('Buttons cannot handle requests. Call handleRequest() on the root form instead.'); - } - - /** - * Submits data to the button. - * - * @param array|string|null $submittedData Not used - * @param bool $clearMissing Not used - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the button has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->submitted) { - throw new AlreadySubmittedException('A form can only be submitted once.'); - } - - $this->submitted = true; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->parent ? $this->parent->getRoot() : $this; - } - - /** - * {@inheritdoc} - */ - public function isRoot() - { - return null === $this->parent; - } - - /** - * {@inheritdoc} - */ - public function createView(FormView $parent = null) - { - if (null === $parent && $this->parent) { - $parent = $this->parent->createView(); - } - - $type = $this->config->getType(); - $options = $this->config->getOptions(); - - $view = $type->createView($this, $parent); - - $type->buildView($view, $this, $options); - $type->finishView($view, $this, $options); - - return $view; - } - - /** - * Unsupported method. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return 0; - } - - /** - * Unsupported method. - * - * @return \EmptyIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \EmptyIterator(); - } -} diff --git a/vendor/symfony/form/ButtonBuilder.php b/vendor/symfony/form/ButtonBuilder.php deleted file mode 100644 index c85bcc0..0000000 --- a/vendor/symfony/form/ButtonBuilder.php +++ /dev/null @@ -1,744 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * A builder for {@link Button} instances. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface -{ - protected $locked = false; - - /** - * @var bool - */ - private $disabled = false; - - /** - * @var ResolvedFormTypeInterface - */ - private $type; - - /** - * @var string - */ - private $name; - - /** - * @var array - */ - private $attributes = []; - - /** - * @var array - */ - private $options; - - /** - * @throws InvalidArgumentException if the name is empty - */ - public function __construct(?string $name, array $options = []) - { - if ('' === $name || null === $name) { - throw new InvalidArgumentException('Buttons cannot have empty names.'); - } - - $this->name = $name; - $this->options = $options; - - FormConfigBuilder::validateName($name); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function add($child, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function create(string $name, string $type = null, array $options = []) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function get(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function remove(string $name) - { - throw new BadMethodCallException('Buttons cannot have children.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function has(string $name) - { - return false; - } - - /** - * Returns the children. - * - * @return array - */ - public function all() - { - return []; - } - - /** - * Creates the button. - * - * @return Button - */ - public function getForm() - { - return new Button($this->getFormConfig()); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0) - { - throw new BadMethodCallException('Buttons do not support event listeners.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber) - { - throw new BadMethodCallException('Buttons do not support event subscribers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false) - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function resetViewTransformers() - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false) - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function resetModelTransformers() - { - throw new BadMethodCallException('Buttons do not support data transformers.'); - } - - /** - * {@inheritdoc} - */ - public function setAttribute(string $name, $value) - { - $this->attributes[$name] = $value; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAttributes(array $attributes) - { - $this->attributes = $attributes; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setDataMapper(DataMapperInterface $dataMapper = null) - { - throw new BadMethodCallException('Buttons do not support data mappers.'); - } - - /** - * Set whether the button is disabled. - * - * @return $this - */ - public function setDisabled(bool $disabled) - { - $this->disabled = $disabled; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setEmptyData($emptyData) - { - throw new BadMethodCallException('Buttons do not support empty data.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setErrorBubbling(bool $errorBubbling) - { - throw new BadMethodCallException('Buttons do not support error bubbling.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setRequired(bool $required) - { - throw new BadMethodCallException('Buttons cannot be required.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setPropertyPath($propertyPath) - { - throw new BadMethodCallException('Buttons do not support property paths.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setMapped(bool $mapped) - { - throw new BadMethodCallException('Buttons do not support data mapping.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setByReference(bool $byReference) - { - throw new BadMethodCallException('Buttons do not support data mapping.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setCompound(bool $compound) - { - throw new BadMethodCallException('Buttons cannot be compound.'); - } - - /** - * Sets the type of the button. - * - * @return $this - */ - public function setType(ResolvedFormTypeInterface $type) - { - $this->type = $type; - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setData($data) - { - throw new BadMethodCallException('Buttons do not support data.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setDataLocked(bool $locked) - { - throw new BadMethodCallException('Buttons do not support data locking.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setFormFactory(FormFactoryInterface $formFactory) - { - throw new BadMethodCallException('Buttons do not support form factories.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setAction(string $action) - { - throw new BadMethodCallException('Buttons do not support actions.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setMethod(string $method) - { - throw new BadMethodCallException('Buttons do not support methods.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler) - { - throw new BadMethodCallException('Buttons do not support request handlers.'); - } - - /** - * Unsupported method. - * - * @return $this - * - * @throws BadMethodCallException - */ - public function setAutoInitialize(bool $initialize) - { - if (true === $initialize) { - throw new BadMethodCallException('Buttons do not support automatic initialization.'); - } - - return $this; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setInheritData(bool $inheritData) - { - throw new BadMethodCallException('Buttons do not support data inheritance.'); - } - - /** - * Builds and returns the button configuration. - * - * @return FormConfigInterface - */ - public function getFormConfig() - { - // This method should be idempotent, so clone the builder - $config = clone $this; - $config->locked = true; - - return $config; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function setIsEmptyCallback(?callable $isEmptyCallback) - { - throw new BadMethodCallException('Buttons do not support "is empty" callback.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getEventDispatcher() - { - throw new BadMethodCallException('Buttons do not support event dispatching.'); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * Unsupported method. - */ - public function getPropertyPath() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getMapped() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getByReference() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getCompound() - { - return false; - } - - /** - * Returns the form type used to construct the button. - * - * @return ResolvedFormTypeInterface - */ - public function getType() - { - return $this->type; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getViewTransformers() - { - return []; - } - - /** - * Unsupported method. - * - * @return array - */ - public function getModelTransformers() - { - return []; - } - - /** - * Unsupported method. - */ - public function getDataMapper() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getRequired() - { - return false; - } - - /** - * Returns whether the button is disabled. - * - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getErrorBubbling() - { - return false; - } - - /** - * Unsupported method. - */ - public function getEmptyData() - { - return null; - } - - /** - * Returns additional attributes of the button. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Returns whether the attribute with the given name exists. - * - * @return bool - */ - public function hasAttribute(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * Returns the value of the given attribute. - * - * @param mixed $default The value returned if the attribute does not exist - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * Unsupported method. - */ - public function getData() - { - return null; - } - - /** - * Unsupported method. - */ - public function getDataClass() - { - return null; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getDataLocked() - { - return false; - } - - /** - * Unsupported method. - */ - public function getFormFactory() - { - throw new BadMethodCallException('Buttons do not support adding children.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getAction() - { - throw new BadMethodCallException('Buttons do not support actions.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getMethod() - { - throw new BadMethodCallException('Buttons do not support methods.'); - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getRequestHandler() - { - throw new BadMethodCallException('Buttons do not support request handlers.'); - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getAutoInitialize() - { - return false; - } - - /** - * Unsupported method. - * - * @return bool - */ - public function getInheritData() - { - return false; - } - - /** - * Returns all options passed during the construction of the button. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * Returns whether a specific option exists. - * - * @return bool - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * Returns the value of a specific option. - * - * @param mixed $default The value returned if the option does not exist - * - * @return mixed - */ - public function getOption(string $name, $default = null) - { - return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; - } - - /** - * Unsupported method. - * - * @throws BadMethodCallException - */ - public function getIsEmptyCallback(): ?callable - { - throw new BadMethodCallException('Buttons do not support "is empty" callback.'); - } - - /** - * Unsupported method. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return 0; - } - - /** - * Unsupported method. - * - * @return \EmptyIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \EmptyIterator(); - } -} diff --git a/vendor/symfony/form/ButtonTypeInterface.php b/vendor/symfony/form/ButtonTypeInterface.php deleted file mode 100644 index dd5117c..0000000 --- a/vendor/symfony/form/ButtonTypeInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A type that should be converted into a {@link Button} instance. - * - * @author Bernhard Schussek - */ -interface ButtonTypeInterface extends FormTypeInterface -{ -} diff --git a/vendor/symfony/form/CHANGELOG.md b/vendor/symfony/form/CHANGELOG.md deleted file mode 100644 index 9d7e764..0000000 --- a/vendor/symfony/form/CHANGELOG.md +++ /dev/null @@ -1,567 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate calling `FormErrorIterator::children()` if the current element is not iterable. - * Allow to pass `TranslatableMessage` objects to the `help` option - * Add the `EnumType` - -5.3 ---- - - * Changed `$forms` parameter type of the `DataMapperInterface::mapDataToForms()` method from `iterable` to `\Traversable`. - * Changed `$forms` parameter type of the `DataMapperInterface::mapFormsToData()` method from `iterable` to `\Traversable`. - * Deprecated passing an array as the second argument of the `DataMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `DataMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Deprecated passing an array as the second argument of the `CheckboxListMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `CheckboxListMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Deprecated passing an array as the second argument of the `RadioListMapper::mapDataToForms()` method, pass `\Traversable` instead. - * Deprecated passing an array as the first argument of the `RadioListMapper::mapFormsToData()` method, pass `\Traversable` instead. - * Added a `choice_translation_parameters` option to `ChoiceType` - * Add `UuidType` and `UlidType` - * Dependency on `symfony/intl` was removed. Install `symfony/intl` if you are using `LocaleType`, `CountryType`, `CurrencyType`, `LanguageType` or `TimezoneType`. - * Add `priority` option to `BaseType` and sorting view fields - -5.2.0 ------ - - * Added support for using the `{{ label }}` placeholder in constraint messages, which is replaced in the `ViolationMapper` by the corresponding field form label. - * Added `DataMapper`, `ChainAccessor`, `PropertyPathAccessor` and `CallbackAccessor` with new callable `getter` and `setter` options for each form type - * Deprecated `PropertyPathMapper` in favor of `DataMapper` and `PropertyPathAccessor` - * Added an `html5` option to `MoneyType` and `PercentType`, to use `` - -5.1.0 ------ - - * Deprecated not configuring the `rounding_mode` option of the `PercentType`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6. - * Deprecated not passing a rounding mode to the constructor of `PercentToLocalizedStringTransformer`. It will default to `\NumberFormatter::ROUND_HALFUP` in Symfony 6. - * Added `collection_entry` block prefix to `CollectionType` entries - * Added a `choice_filter` option to `ChoiceType` - * Added argument `callable|null $filter` to `ChoiceListFactoryInterface::createListFromChoices()` and `createListFromLoader()` - not defining them is deprecated. - * Added a `ChoiceList` facade to leverage explicit choice list caching based on options - * Added an `AbstractChoiceLoader` to simplify implementations and handle global optimizations - * The `view_timezone` option defaults to the `model_timezone` if no `reference_date` is configured. - * Implementing the `FormConfigInterface` without implementing the `getIsEmptyCallback()` method - is deprecated. The method will be added to the interface in 6.0. - * Implementing the `FormConfigBuilderInterface` without implementing the `setIsEmptyCallback()` method - is deprecated. The method will be added to the interface in 6.0. - * Added a `rounding_mode` option for the PercentType and correctly round the value when submitted - * Deprecated `Symfony\Component\Form\Extension\Validator\Util\ServerParams` in favor of its parent class `Symfony\Component\Form\Util\ServerParams` - * Added the `html5` option to the `ColorType` to validate the input - * Deprecated `NumberToLocalizedStringTransformer::ROUND_*` constants, use `\NumberFormatter::ROUND_*` instead - -5.0.0 ------ - - * Removed support for using different values for the "model_timezone" and "view_timezone" options of the `TimeType` - without configuring a reference date. - * Removed the `scale` option of the `IntegerType`. - * Using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget` option is - set to `single_text` is not supported anymore. - * The `format` option of `DateType` and `DateTimeType` cannot be used when the `html5` option is enabled. - * Using names for buttons that do not start with a letter, a digit, or an underscore throw an exception - * Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons throw an exception. - * removed the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * removed `getExtendedType()` method of the `FormTypeExtensionInterface` - * added static `getExtendedTypes()` method to the `FormTypeExtensionInterface` - * calling to `FormRenderer::searchAndRenderBlock()` method for fields which were already rendered throw a `BadMethodCallException` - * removed the `regions` option of the `TimezoneType` - * removed the `$scale` argument of the `IntegerToLocalizedStringTransformer` - * removed `TemplatingExtension` and `TemplatingRendererEngine` classes, use Twig instead - * passing a null message when instantiating a `Symfony\Component\Form\FormError` is not allowed - * removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` - -4.4.0 ------ - - * add new `WeekType` - * using different values for the "model_timezone" and "view_timezone" options of the `TimeType` without configuring a - reference date is deprecated - * preferred choices are repeated in the list of all choices - * deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` - * The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint. - * Overriding the methods `FormIntegrationTestCase::setUp()`, `TypeTestCase::setUp()` and `TypeTestCase::tearDown()` without the `void` return-type is deprecated. - * marked all dispatched event classes as `@final` - * Added the `validate` option to `SubmitType` to toggle the browser built-in form validation. - * Added the `alpha3` option to `LanguageType` and `CountryType` to use alpha3 instead of alpha2 codes - -4.3.0 ------ - - * added a `symbol` option to the `PercentType` that allows to disable or customize the output of the percent character - * Using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled is deprecated. - * Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated and will lead to an - exception in 5.0. - * Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons is deprecated and - will lead to an exception in 5.0. - * added `html5` option to `NumberType` that allows to render `type="number"` input fields - * deprecated using the `date_format`, `date_widget`, and `time_widget` options of the `DateTimeType` when the `widget` - option is set to `single_text` - * added `block_prefix` option to `BaseType`. - * added `help_html` option to display the `help` text as HTML. - * `FormError` doesn't implement `Serializable` anymore - * `FormDataCollector` has been marked as `final` - * added `label_translation_parameters`, `attr_translation_parameters`, `help_translation_parameters` options - to `FormType` to pass translation parameters to form labels, attributes (`placeholder` and `title`) and help text respectively. - The passed parameters will replace placeholders in translation messages. - - ```php - class OrderType extends AbstractType - { - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->add('comment', TextType::class, [ - 'label' => 'Comment to the order to %company%', - 'label_translation_parameters' => [ - '%company%' => 'Acme', - ], - 'help' => 'The address of the %company% is %address%', - 'help_translation_parameters' => [ - '%company%' => 'Acme Ltd.', - '%address%' => '4 Form street, Symfonyville', - ], - ]) - } - } - ``` - * added the `input_format` option to `DateType`, `DateTimeType`, and `TimeType` to specify the input format when setting - the `input` option to `string` - * dispatch `PreSubmitEvent` on `form.pre_submit` - * dispatch `SubmitEvent` on `form.submit` - * dispatch `PostSubmitEvent` on `form.post_submit` - * dispatch `PreSetDataEvent` on `form.pre_set_data` - * dispatch `PostSetDataEvent` on `form.post_set_data` - * added an `input` option to `NumberType` - * removed default option grouping in `TimezoneType`, use `group_by` instead - -4.2.0 ------ - - * The `getExtendedType()` method of the `FormTypeExtensionInterface` is deprecated and will be removed in 5.0. Type - extensions must implement the static `getExtendedTypes()` method instead and return an iterable of extended types. - - Before: - - ```php - class FooTypeExtension extends AbstractTypeExtension - { - public function getExtendedType() - { - return FormType::class; - } - - // ... - } - ``` - - After: - - ```php - class FooTypeExtension extends AbstractTypeExtension - { - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } - - // ... - } - ``` - * deprecated the `$scale` argument of the `IntegerToLocalizedStringTransformer` - * added `Symfony\Component\Form\ClearableErrorsInterface` - * deprecated calling `FormRenderer::searchAndRenderBlock` for fields which were already rendered - * added a cause when a CSRF error has occurred - * deprecated the `scale` option of the `IntegerType` - * removed restriction on allowed HTTP methods - * deprecated the `regions` option of the `TimezoneType` - -4.1.0 ------ - - * added `input=datetime_immutable` to `DateType`, `TimeType`, `DateTimeType` - * added `rounding_mode` option to `MoneyType` - * added `choice_translation_locale` option to `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * deprecated the `ChoiceLoaderInterface` implementation in `CountryType`, `LanguageType`, `LocaleType` and `CurrencyType` - * added `input=datetime_immutable` to DateType, TimeType, DateTimeType - * added `rounding_mode` option to MoneyType - -4.0.0 ------ - - * using the `choices` option in `CountryType`, `CurrencyType`, `LanguageType`, - `LocaleType`, and `TimezoneType` when the `choice_loader` option is not `null` - is not supported anymore and the configured choices will be ignored - * callable strings that are passed to the options of the `ChoiceType` are - treated as property paths - * the `choices_as_values` option of the `ChoiceType` has been removed - * removed the support for caching loaded choice lists in `LazyChoiceList`, - cache the choice list in the used `ChoiceLoaderInterface` implementation - instead - * removed the support for objects implementing both `\Traversable` and `\ArrayAccess` in `ResizeFormListener::preSubmit()` - * removed the ability to use `FormDataCollector` without the `symfony/var-dumper` component - * removed passing a `ValueExporter` instance to the `FormDataExtractor::__construct()` method - * removed passing guesser services ids as the fourth argument of `DependencyInjectionExtension::__construct()` - * removed the ability to validate an unsubmitted form. - * removed `ChoiceLoaderInterface` implementation in `TimezoneType` - * added the `false_values` option to the `CheckboxType` which allows to configure custom values which will be treated as `false` during submission - -3.4.0 ------ - - * added `DebugCommand` - * deprecated `ChoiceLoaderInterface` implementation in `TimezoneType` - * added options "input" and "regions" to `TimezoneType` - * added an option to ``Symfony\Component\Form\FormRendererEngineInterface::setTheme()`` and - ``Symfony\Component\Form\FormRendererInterface::setTheme()`` to disable usage of default themes when rendering a form - -3.3.0 ------ - - * deprecated using "choices" option in ``CountryType``, ``CurrencyType``, ``LanguageType``, ``LocaleType``, and - ``TimezoneType`` when "choice_loader" is not ``null`` - * added `Symfony\Component\Form\FormErrorIterator::findByCodes()` - * added `getTypedExtensions`, `getTypes`, and `getTypeGuessers` to `Symfony\Component\Form\Test\FormIntegrationTestCase` - * added `FormPass` - -3.2.0 ------ - - * added `CallbackChoiceLoader` - * implemented `ChoiceLoaderInterface` in children of `ChoiceType` - -3.1.0 ------ - - * deprecated the "choices_as_values" option of ChoiceType - * deprecated support for data objects that implements both `Traversable` and - `ArrayAccess` in `ResizeFormListener::preSubmit` method - * Using callable strings as choice options in `ChoiceType` has been deprecated - and will be used as `PropertyPath` instead of callable in Symfony 4.0. - * implemented `DataTransformerInterface` in `TextType` - * deprecated caching loaded choice list in `LazyChoiceList::$loadedList` - -3.0.0 ------ - - * removed `FormTypeInterface::setDefaultOptions()` method - * removed `AbstractType::setDefaultOptions()` method - * removed `FormTypeExtensionInterface::setDefaultOptions()` method - * removed `AbstractTypeExtension::setDefaultOptions()` method - * added `FormTypeInterface::configureOptions()` method - * added `FormTypeExtensionInterface::configureOptions()` method - -2.8.0 ------ - - * added option "choice_translation_domain" to DateType, TimeType and DateTimeType. - * deprecated option "read_only" in favor of "attr['readonly']" - * added the html5 "range" FormType - * deprecated the "cascade_validation" option in favor of setting "constraints" - with the Valid constraint - * moved data trimming logic of TrimListener into StringUtil - * [BC BREAK] When registering a type extension through the DI extension, the tag alias has to match the actual extended type. - -2.7.38 ------- - - * [BC BREAK] the `isFileUpload()` method was added to the `RequestHandlerInterface` - -2.7.0 ------ - - * added option "choice_translation_domain" to ChoiceType. - * deprecated option "precision" in favor of "scale" - * deprecated the overwriting of AbstractType::setDefaultOptions() in favor of overwriting AbstractType::configureOptions(). - * deprecated the overwriting of AbstractTypeExtension::setDefaultOptions() in favor of overwriting AbstractTypeExtension::configureOptions(). - * added new ChoiceList interface and implementations in the Symfony\Component\Form\ChoiceList namespace - * added new ChoiceView in the Symfony\Component\Form\ChoiceList\View namespace - * choice groups are now represented by ChoiceGroupView objects in the view - * deprecated the old ChoiceList interface and implementations - * deprecated the old ChoiceView class - * added CheckboxListMapper and RadioListMapper - * deprecated ChoiceToBooleanArrayTransformer and ChoicesToBooleanArrayTransformer - * deprecated FixCheckboxInputListener and FixRadioInputListener - * deprecated the "choice_list" option of ChoiceType - * added new options to ChoiceType: - * "choices_as_values" - * "choice_loader" - * "choice_label" - * "choice_name" - * "choice_value" - * "choice_attr" - * "group_by" - -2.6.2 ------ - - * Added back the `model_timezone` and `view_timezone` options for `TimeType`, `DateType` - and `BirthdayType` - -2.6.0 ------ - - * added "html5" option to Date, Time and DateTimeFormType to be able to - enable/disable HTML5 input date when widget option is "single_text" - * added "label_format" option with possible placeholders "%name%" and "%id%" - * [BC BREAK] drop support for model_timezone and view_timezone options in TimeType, DateType and BirthdayType, - update to 2.6.2 to get back support for these options - -2.5.0 ------- - - * deprecated options "max_length" and "pattern" in favor of putting these values in "attr" option - * added an option for multiple files upload - * form errors now reference their cause (constraint violation, exception, ...) - * form errors now remember which form they were originally added to - * [BC BREAK] added two optional parameters to FormInterface::getErrors() and - changed the method to return a Symfony\Component\Form\FormErrorIterator - instance instead of an array - * errors mapped to unsubmitted forms are discarded now - * ObjectChoiceList now compares choices by their value, if a value path is - given - * you can now pass interface names in the "data_class" option - * [BC BREAK] added `FormInterface::getTransformationFailure()` - -2.4.0 ------ - - * moved CSRF implementation to the new Security CSRF sub-component - * deprecated CsrfProviderInterface and its implementations - * deprecated options "csrf_provider" and "intention" in favor of the new options "csrf_token_manager" and "csrf_token_id" - -2.3.0 ------ - - * deprecated FormPerformanceTestCase and FormIntegrationTestCase in the Symfony\Component\Form\Tests namespace and moved them to the Symfony\Component\Form\Test namespace - * deprecated TypeTestCase in the Symfony\Component\Form\Tests\Extension\Core\Type namespace and moved it to the Symfony\Component\Form\Test namespace - * changed FormRenderer::humanize() to humanize also camel cased field name - * added RequestHandlerInterface and FormInterface::handleRequest() - * deprecated passing a Request instance to FormInterface::bind() - * added options "method" and "action" to FormType - * deprecated option "virtual" in favor "inherit_data" - * deprecated VirtualFormAwareIterator in favor of InheritDataAwareIterator - * [BC BREAK] removed the "array" type hint from DataMapperInterface - * improved forms inheriting their parent data to actually return that data from getData(), getNormData() and getViewData() - * added component-level exceptions for various SPL exceptions - changed all uses of the deprecated Exception class to use more specialized exceptions instead - removed NotInitializedException, NotValidException, TypeDefinitionException, TypeLoaderException, CreationException - * added events PRE_SUBMIT, SUBMIT and POST_SUBMIT - * deprecated events PRE_BIND, BIND and POST_BIND - * [BC BREAK] renamed bind() and isBound() in FormInterface to submit() and isSubmitted() - * added methods submit() and isSubmitted() to Form - * deprecated bind() and isBound() in Form - * deprecated AlreadyBoundException in favor of AlreadySubmittedException - * added support for PATCH requests - * [BC BREAK] added initialize() to FormInterface - * [BC BREAK] added getAutoInitialize() to FormConfigInterface - * [BC BREAK] added setAutoInitialize() to FormConfigBuilderInterface - * [BC BREAK] initialization for Form instances added to a form tree must be manually disabled - * PRE_SET_DATA is now guaranteed to be called after children were added by the form builder, - unless FormInterface::setData() is called manually - * fixed CSRF error message to be translated - * custom CSRF error messages can now be set through the "csrf_message" option - * fixed: expanded single-choice fields now show a radio button for the empty value - -2.2.0 ------ - - * TrimListener now removes unicode whitespaces - * deprecated getParent(), setParent() and hasParent() in FormBuilderInterface - * FormInterface::add() now accepts a FormInterface instance OR a field's name, type and options - * removed special characters between the choice or text fields of DateType unless - the option "format" is set to a custom value - * deprecated FormException and introduced ExceptionInterface instead - * [BC BREAK] FormException is now an interface - * protected FormBuilder methods from being called when it is turned into a FormConfigInterface with getFormConfig() - * [BC BREAK] inserted argument `$message` in the constructor of `FormError` - * the PropertyPath class and related classes were moved to a dedicated - PropertyAccess component. During the move, InvalidPropertyException was - renamed to NoSuchPropertyException. FormUtil was split: FormUtil::singularify() - can now be found in Symfony\Component\PropertyAccess\StringUtil. The methods - getValue() and setValue() from PropertyPath were extracted into a new class - PropertyAccessor. - * added an optional PropertyAccessorInterface parameter to FormType, - ObjectChoiceList and PropertyPathMapper - * [BC BREAK] PropertyPathMapper and FormType now have a constructor - * [BC BREAK] setting the option "validation_groups" to ``false`` now disables validation - instead of assuming group "Default" - -2.1.0 ------ - - * [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead - * [BC BREAK] child forms now aren't validated anymore by default - * made validation of form children configurable (new option: cascade_validation) - * added support for validation groups as callbacks - * made the translation catalogue configurable via the "translation_domain" option - * added Form::getErrorsAsString() to help debugging forms - * allowed setting different options for RepeatedType fields (like the label) - * added support for empty form name at root level, this enables rendering forms - without form name prefix in field names - * [BC BREAK] form and field names must start with a letter, digit or underscore - and only contain letters, digits, underscores, hyphens and colons - * [BC BREAK] changed default name of the prototype in the "collection" type - from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom - names anymore. - * [BC BREAK] improved ChoiceListInterface - * [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of - ArrayChoiceList - * added ChoiceList and ObjectChoiceList to use objects as choices - * [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer. - The former has been replaced by CollectionToArrayTransformer in combination - with EntityChoiceList, the latter is not required in the core anymore. - * [BC BREAK] renamed - * ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer - * ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer - * ArrayToChoicesTransformer to ChoicesToValuesTransformer - * ScalarToChoiceTransformer to ChoiceToValueTransformer - to be consistent with the naming in ChoiceListInterface. - They were merged into ChoiceList and have no public equivalent anymore. - * choice fields now throw a FormException if neither the "choices" nor the - "choice_list" option is set - * the radio type is now a child of the checkbox type - * the collection, choice (with multiple selection) and entity (with multiple - selection) types now make use of addXxx() and removeXxx() methods in your - model if you set "by_reference" to false. For a custom, non-recognized - singular form, set the "property_path" option like this: "plural|singular" - * forms now don't create an empty object anymore if they are completely - empty and not required. The empty value for such forms is null. - * added constant Guess::VERY_HIGH_CONFIDENCE - * [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData` - in class Form now throw an exception if the form is already bound - * fields of constrained classes without a NotBlank or NotNull constraint are - set to not required now, as stated in the docs - * fixed TimeType and DateTimeType to not display seconds when "widget" is - "single_text" unless "with_seconds" is set to true - * checkboxes of in an expanded multiple-choice field don't include the choice - in their name anymore. Their names terminate with "[]" now. - * deprecated FormValidatorInterface and substituted its implementations - by event subscribers - * simplified CSRF protection and removed the csrf type - * deprecated FieldType and merged it into FormType - * added new option "compound" that lets you switch between field and form behavior - * [BC BREAK] renamed theme blocks - * "field_*" to "form_*" - * "field_widget" to "form_widget_simple" - * "widget_choice_options" to "choice_widget_options" - * "generic_label" to "form_label" - * added theme blocks "form_widget_compound", "choice_widget_expanded" and - "choice_widget_collapsed" to make theming more modular - * ValidatorTypeGuesser now guesses "collection" for array type constraint - * added method `guessPattern` to FormTypeGuesserInterface to guess which pattern to use in the HTML5 attribute "pattern" - * deprecated method `guessMinLength` in favor of `guessPattern` - * labels don't display field attributes anymore. Label attributes can be - passed in the "label_attr" option/variable - * added option "mapped" which should be used instead of setting "property_path" to false - * [BC BREAK] "data_class" now *must* be set if a form maps to an object and should be left empty otherwise - * improved error mapping on forms - * dot (".") rules are now allowed to map errors assigned to a form to - one of its children - * errors are not mapped to unsynchronized forms anymore - * [BC BREAK] changed Form constructor to accept a single `FormConfigInterface` object - * [BC BREAK] changed argument order in the FormBuilder constructor - * added Form method `getViewData` - * deprecated Form methods - * `getTypes` - * `getErrorBubbling` - * `getNormTransformers` - * `getClientTransformers` - * `getAttribute` - * `hasAttribute` - * `getClientData` - * added FormBuilder methods - * `getTypes` - * `addViewTransformer` - * `getViewTransformers` - * `resetViewTransformers` - * `addModelTransformer` - * `getModelTransformers` - * `resetModelTransformers` - * deprecated FormBuilder methods - * `prependClientTransformer` - * `appendClientTransformer` - * `getClientTransformers` - * `resetClientTransformers` - * `prependNormTransformer` - * `appendNormTransformer` - * `getNormTransformers` - * `resetNormTransformers` - * deprecated the option "validation_constraint" in favor of the new - option "constraints" - * removed superfluous methods from DataMapperInterface - * `mapFormToData` - * `mapDataToForm` - * added `setDefaultOptions` to FormTypeInterface and FormTypeExtensionInterface - which accepts an OptionsResolverInterface instance - * deprecated the methods `getDefaultOptions` and `getAllowedOptionValues` - in FormTypeInterface and FormTypeExtensionInterface - * options passed during construction can now be accessed from FormConfigInterface - * added FormBuilderInterface and FormConfigEditorInterface - * [BC BREAK] the method `buildForm` in FormTypeInterface and FormTypeExtensionInterface - now receives a FormBuilderInterface instead of a FormBuilder instance - * [BC BREAK] the method `buildViewBottomUp` was renamed to `finishView` in - FormTypeInterface and FormTypeExtensionInterface - * [BC BREAK] the options array is now passed as last argument of the - methods - * `buildView` - * `finishView` - in FormTypeInterface and FormTypeExtensionInterface - * [BC BREAK] no options are passed to `getParent` of FormTypeInterface anymore - * deprecated DataEvent and FilterDataEvent in favor of the new FormEvent which is - now passed to all events thrown by the component - * FormEvents::BIND now replaces FormEvents::BIND_NORM_DATA - * FormEvents::PRE_SET_DATA now replaces FormEvents::SET_DATA - * FormEvents::PRE_BIND now replaces FormEvents::BIND_CLIENT_DATA - * deprecated FormEvents::SET_DATA, FormEvents::BIND_CLIENT_DATA and - FormEvents::BIND_NORM_DATA - * [BC BREAK] reversed the order of the first two arguments to `createNamed` - and `createNamedBuilder` in `FormFactoryInterface` - * deprecated `getChildren` in Form and FormBuilder in favor of `all` - * deprecated `hasChildren` in Form and FormBuilder in favor of `count` - * FormBuilder now implements \IteratorAggregate - * [BC BREAK] compound forms now always need a data mapper - * FormBuilder now maintains the order when explicitly adding form builders as children - * ChoiceType now doesn't add the empty value anymore if the choices already contain an empty element - * DateType, TimeType and DateTimeType now show empty values again if not required - * [BC BREAK] fixed rendering of errors for DateType, BirthdayType and similar ones - * [BC BREAK] fixed: form constraints are only validated if they belong to the validated group - * deprecated `bindRequest` in `Form` and replaced it by a listener to FormEvents::PRE_BIND - * fixed: the "data" option supersedes default values from the model - * changed DateType to refer to the "format" option for calculating the year and day choices instead - of padding them automatically - * [BC BREAK] DateType defaults to the format "yyyy-MM-dd" now if the widget is - "single_text", in order to support the HTML 5 date field out of the box - * added the option "format" to DateTimeType - * [BC BREAK] DateTimeType now outputs RFC 3339 dates by default, as generated and - consumed by HTML5 browsers, if the widget is "single_text" - * deprecated the options "data_timezone" and "user_timezone" in DateType, DateTimeType and TimeType - and renamed them to "model_timezone" and "view_timezone" - * fixed: TransformationFailedExceptions thrown in the model transformer are now caught by the form - * added FormRegistryInterface, ResolvedFormTypeInterface and ResolvedFormTypeFactoryInterface - * deprecated FormFactory methods - * `addType` - * `hasType` - * `getType` - * [BC BREAK] FormFactory now expects a FormRegistryInterface and a ResolvedFormTypeFactoryInterface as constructor argument - * [BC BREAK] The method `createBuilder` in FormTypeInterface is not supported anymore for performance reasons - * [BC BREAK] Removed `setTypes` from FormBuilder - * deprecated AbstractType methods - * `getExtensions` - * `setExtensions` - * ChoiceType now caches its created choice lists to improve performance - * [BC BREAK] Rows of a collection field cannot be themed individually anymore. All rows in the collection - field now have the same block names, which contains "entry" where it previously contained the row index. - * [BC BREAK] When registering a type through the DI extension, the tag alias has to match the actual type name. - * added FormRendererInterface, FormRendererEngineInterface and implementations of these interfaces - * [BC BREAK] removed the following methods from FormUtil: - * `toArrayKey` - * `toArrayKeys` - * `isChoiceGroup` - * `isChoiceSelected` - * [BC BREAK] renamed method `renderBlock` in FormHelper to `block` and changed its signature - * made FormView properties public and deprecated their accessor methods - * made the normalized data of a form accessible in the template through the variable "form.vars.data" - * made the original data of a choice accessible in the template through the property "choice.data" - * added convenience class Forms and FormFactoryBuilderInterface diff --git a/vendor/symfony/form/CallbackTransformer.php b/vendor/symfony/form/CallbackTransformer.php deleted file mode 100644 index 5125214..0000000 --- a/vendor/symfony/form/CallbackTransformer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -class CallbackTransformer implements DataTransformerInterface -{ - private $transform; - private $reverseTransform; - - /** - * @param callable $transform The forward transform callback - * @param callable $reverseTransform The reverse transform callback - */ - public function __construct(callable $transform, callable $reverseTransform) - { - $this->transform = $transform; - $this->reverseTransform = $reverseTransform; - } - - /** - * {@inheritdoc} - */ - public function transform($data) - { - return ($this->transform)($data); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($data) - { - return ($this->reverseTransform)($data); - } -} diff --git a/vendor/symfony/form/ChoiceList/ArrayChoiceList.php b/vendor/symfony/form/ChoiceList/ArrayChoiceList.php deleted file mode 100644 index 49b991a..0000000 --- a/vendor/symfony/form/ChoiceList/ArrayChoiceList.php +++ /dev/null @@ -1,238 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -/** - * A list of choices with arbitrary data types. - * - * The user of this class is responsible for assigning string values to the - * choices annd for their uniqueness. - * Both the choices and their values are passed to the constructor. - * Each choice must have a corresponding value (with the same key) in - * the values array. - * - * @author Bernhard Schussek - */ -class ArrayChoiceList implements ChoiceListInterface -{ - /** - * The choices in the list. - * - * @var array - */ - protected $choices; - - /** - * The values indexed by the original keys. - * - * @var array - */ - protected $structuredValues; - - /** - * The original keys of the choices array. - * - * @var int[]|string[] - */ - protected $originalKeys; - protected $valueCallback; - - /** - * Creates a list with the given choices and values. - * - * The given choice array must have the same array keys as the value array. - * - * @param iterable $choices The selectable choices - * @param callable|null $value The callable for creating the value - * for a choice. If `null` is passed, - * incrementing integers are used as - * values - */ - public function __construct(iterable $choices, callable $value = null) - { - if ($choices instanceof \Traversable) { - $choices = iterator_to_array($choices); - } - - if (null === $value && $this->castableToString($choices)) { - $value = function ($choice) { - return false === $choice ? '0' : (string) $choice; - }; - } - - if (null !== $value) { - // If a deterministic value generator was passed, use it later - $this->valueCallback = $value; - } else { - // Otherwise generate incrementing integers as values - $i = 0; - $value = function () use (&$i) { - return $i++; - }; - } - - // If the choices are given as recursive array (i.e. with explicit - // choice groups), flatten the array. The grouping information is needed - // in the view only. - $this->flatten($choices, $value, $choicesByValues, $keysByValues, $structuredValues); - - $this->choices = $choicesByValues; - $this->originalKeys = $keysByValues; - $this->structuredValues = $structuredValues; - } - - /** - * {@inheritdoc} - */ - public function getChoices() - { - return $this->choices; - } - - /** - * {@inheritdoc} - */ - public function getValues() - { - return array_map('strval', array_keys($this->choices)); - } - - /** - * {@inheritdoc} - */ - public function getStructuredValues() - { - return $this->structuredValues; - } - - /** - * {@inheritdoc} - */ - public function getOriginalKeys() - { - return $this->originalKeys; - } - - /** - * {@inheritdoc} - */ - public function getChoicesForValues(array $values) - { - $choices = []; - - foreach ($values as $i => $givenValue) { - if (\array_key_exists($givenValue, $this->choices)) { - $choices[$i] = $this->choices[$givenValue]; - } - } - - return $choices; - } - - /** - * {@inheritdoc} - */ - public function getValuesForChoices(array $choices) - { - $values = []; - - // Use the value callback to compare choices by their values, if present - if ($this->valueCallback) { - $givenValues = []; - - foreach ($choices as $i => $givenChoice) { - $givenValues[$i] = (string) ($this->valueCallback)($givenChoice); - } - - return array_intersect($givenValues, array_keys($this->choices)); - } - - // Otherwise compare choices by identity - foreach ($choices as $i => $givenChoice) { - foreach ($this->choices as $value => $choice) { - if ($choice === $givenChoice) { - $values[$i] = (string) $value; - break; - } - } - } - - return $values; - } - - /** - * Flattens an array into the given output variables. - * - * @param array $choices The array to flatten - * @param callable $value The callable for generating choice values - * @param array|null $choicesByValues The flattened choices indexed by the - * corresponding values - * @param array|null $keysByValues The original keys indexed by the - * corresponding values - * @param array|null $structuredValues The values indexed by the original keys - * - * @internal - */ - protected function flatten(array $choices, callable $value, ?array &$choicesByValues, ?array &$keysByValues, ?array &$structuredValues) - { - if (null === $choicesByValues) { - $choicesByValues = []; - $keysByValues = []; - $structuredValues = []; - } - - foreach ($choices as $key => $choice) { - if (\is_array($choice)) { - $this->flatten($choice, $value, $choicesByValues, $keysByValues, $structuredValues[$key]); - - continue; - } - - $choiceValue = (string) $value($choice); - $choicesByValues[$choiceValue] = $choice; - $keysByValues[$choiceValue] = $key; - $structuredValues[$key] = $choiceValue; - } - } - - /** - * Checks whether the given choices can be cast to strings without - * generating duplicates. - * This method is responsible for preventing conflict between scalar values - * and the empty value. - */ - private function castableToString(array $choices, array &$cache = []): bool - { - foreach ($choices as $choice) { - if (\is_array($choice)) { - if (!$this->castableToString($choice, $cache)) { - return false; - } - - continue; - } elseif (!is_scalar($choice)) { - return false; - } - - // prevent having false casted to the empty string by isset() - $choice = false === $choice ? '0' : (string) $choice; - - if (isset($cache[$choice])) { - return false; - } - - $cache[$choice] = true; - } - - return true; - } -} diff --git a/vendor/symfony/form/ChoiceList/ChoiceList.php b/vendor/symfony/form/ChoiceList/ChoiceList.php deleted file mode 100644 index df63c83..0000000 --- a/vendor/symfony/form/ChoiceList/ChoiceList.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceAttr; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFieldName; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFilter; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLoader; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceTranslationParameters; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceValue; -use Symfony\Component\Form\ChoiceList\Factory\Cache\GroupBy; -use Symfony\Component\Form\ChoiceList\Factory\Cache\PreferredChoice; -use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A set of convenient static methods to create cacheable choice list options. - * - * @author Jules Pietri - */ -final class ChoiceList -{ - /** - * Creates a cacheable loader from any callable providing iterable choices. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $choices A callable that must return iterable choices or grouped choices - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the loader - */ - public static function lazy($formType, callable $choices, $vary = null): ChoiceLoader - { - return self::loader($formType, new CallbackChoiceLoader($choices), $vary); - } - - /** - * Decorates a loader to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param ChoiceLoaderInterface $loader A loader responsible for creating loading choices or grouped choices - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the loader - */ - public static function loader($formType, ChoiceLoaderInterface $loader, $vary = null): ChoiceLoader - { - return new ChoiceLoader($formType, $loader, $vary); - } - - /** - * Decorates a "choice_value" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $value Any pseudo callable to create a unique string value from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function value($formType, $value, $vary = null): ChoiceValue - { - return new ChoiceValue($formType, $value, $vary); - } - - /** - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $filter Any pseudo callable to filter a choice list - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function filter($formType, $filter, $vary = null): ChoiceFilter - { - return new ChoiceFilter($formType, $filter, $vary); - } - - /** - * Decorates a "choice_label" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|false $label Any pseudo callable to create a label from a choice or false to discard it - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function label($formType, $label, $vary = null): ChoiceLabel - { - return new ChoiceLabel($formType, $label, $vary); - } - - /** - * Decorates a "choice_name" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $fieldName Any pseudo callable to create a field name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function fieldName($formType, $fieldName, $vary = null): ChoiceFieldName - { - return new ChoiceFieldName($formType, $fieldName, $vary); - } - - /** - * Decorates a "choice_attr" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $attr Any pseudo callable or array to create html attributes from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function attr($formType, $attr, $vary = null): ChoiceAttr - { - return new ChoiceAttr($formType, $attr, $vary); - } - - /** - * Decorates a "choice_translation_parameters" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $translationParameters Any pseudo callable or array to create translation parameters from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function translationParameters($formType, $translationParameters, $vary = null): ChoiceTranslationParameters - { - return new ChoiceTranslationParameters($formType, $translationParameters, $vary); - } - - /** - * Decorates a "group_by" callback to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable $groupBy Any pseudo callable to return a group name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the callback - */ - public static function groupBy($formType, $groupBy, $vary = null): GroupBy - { - return new GroupBy($formType, $groupBy, $vary); - } - - /** - * Decorates a "preferred_choices" option to make it cacheable. - * - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param callable|array $preferred Any pseudo callable or array to return a group name from a choice - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - public static function preferred($formType, $preferred, $vary = null): PreferredChoice - { - return new PreferredChoice($formType, $preferred, $vary); - } - - /** - * Should not be instantiated. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/form/ChoiceList/ChoiceListInterface.php b/vendor/symfony/form/ChoiceList/ChoiceListInterface.php deleted file mode 100644 index 8bf6f95..0000000 --- a/vendor/symfony/form/ChoiceList/ChoiceListInterface.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -/** - * A list of choices that can be selected in a choice field. - * - * A choice list assigns unique string values to each of a list of choices. - * These string values are displayed in the "value" attributes in HTML and - * submitted back to the server. - * - * The acceptable data types for the choices depend on the implementation. - * Values must always be strings and (within the list) free of duplicates. - * - * @author Bernhard Schussek - */ -interface ChoiceListInterface -{ - /** - * Returns all selectable choices. - * - * @return array The selectable choices indexed by the corresponding values - */ - public function getChoices(); - - /** - * Returns the values for the choices. - * - * The values are strings that do not contain duplicates: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => ['Yes' => true, 'No' => false], - * 'Undecided' => ['Maybe' => null], - * ], - * ]); - * - * In this example, the result of this method is: - * - * [ - * 'Yes' => '0', - * 'No' => '1', - * 'Maybe' => '2', - * ] - * - * Null and false MUST NOT conflict when being casted to string. - * For this some default incremented values SHOULD be computed. - * - * @return string[] - */ - public function getValues(); - - /** - * Returns the values in the structure originally passed to the list. - * - * Contrary to {@link getValues()}, the result is indexed by the original - * keys of the choices. If the original array contained nested arrays, these - * nested arrays are represented here as well: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => ['Yes' => true, 'No' => false], - * 'Undecided' => ['Maybe' => null], - * ], - * ]); - * - * In this example, the result of this method is: - * - * [ - * 'Decided' => ['Yes' => '0', 'No' => '1'], - * 'Undecided' => ['Maybe' => '2'], - * ] - * - * Nested arrays do not make sense in a view format unless - * they are used as a convenient way of grouping. - * If the implementation does not intend to support grouped choices, - * this method SHOULD be equivalent to {@link getValues()}. - * The $groupBy callback parameter SHOULD be used instead. - * - * @return string[] - */ - public function getStructuredValues(); - - /** - * Returns the original keys of the choices. - * - * The original keys are the keys of the choice array that was passed in the - * "choice" option of the choice type. Note that this array may contain - * duplicates if the "choice" option contained choice groups: - * - * $form->add('field', 'choice', [ - * 'choices' => [ - * 'Decided' => [true, false], - * 'Undecided' => [null], - * ], - * ]); - * - * In this example, the original key 0 appears twice, once for `true` and - * once for `null`. - * - * @return int[]|string[] The original choice keys indexed by the - * corresponding choice values - */ - public function getOriginalKeys(); - - /** - * Returns the choices corresponding to the given values. - * - * The choices are returned with the same keys and in the same order as the - * corresponding values in the given array. - * - * @param string[] $values An array of choice values. Non-existing values in - * this array are ignored - * - * @return array - */ - public function getChoicesForValues(array $values); - - /** - * Returns the values corresponding to the given choices. - * - * The values are returned with the same keys and in the same order as the - * corresponding choices in the given array. - * - * @param array $choices An array of choices. Non-existing choices in this - * array are ignored - * - * @return string[] - */ - public function getValuesForChoices(array $choices); -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php b/vendor/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php deleted file mode 100644 index 42b31e0..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/AbstractStaticOption.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A template decorator for static {@see ChoiceType} options. - * - * Used as fly weight for {@see CachingFactoryDecorator}. - * - * @internal - * - * @author Jules Pietri - */ -abstract class AbstractStaticOption -{ - private static $options = []; - - /** @var bool|callable|string|array|\Closure|ChoiceLoaderInterface */ - private $option; - - /** - * @param FormTypeInterface|FormTypeExtensionInterface $formType A form type or type extension configuring a cacheable choice list - * @param mixed $option Any pseudo callable, array, string or bool to define a choice list option - * @param mixed|null $vary Dynamic data used to compute a unique hash when caching the option - */ - final public function __construct($formType, $option, $vary = null) - { - if (!$formType instanceof FormTypeInterface && !$formType instanceof FormTypeExtensionInterface) { - throw new \TypeError(sprintf('Expected an instance of "%s" or "%s", but got "%s".', FormTypeInterface::class, FormTypeExtensionInterface::class, get_debug_type($formType))); - } - - $hash = CachingFactoryDecorator::generateHash([static::class, $formType, $vary]); - - $this->option = self::$options[$hash] ?? self::$options[$hash] = $option; - } - - /** - * @return mixed - */ - final public function getOption() - { - return $this->option; - } - - final public static function reset(): void - { - self::$options = []; - } -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php deleted file mode 100644 index 8de6956..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceAttr.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_attr" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceAttr extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php deleted file mode 100644 index 0c71e20..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFieldName.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_name" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceFieldName extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php deleted file mode 100644 index 13b8cd8..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceFilter.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_filter" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceFilter extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php deleted file mode 100644 index 664a090..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLabel.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_label" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceLabel extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php deleted file mode 100644 index 83b2ca0..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_loader" option. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceLoader extends AbstractStaticOption implements ChoiceLoaderInterface -{ - /** - * {@inheritdoc} - */ - public function loadChoiceList(callable $value = null): ChoiceListInterface - { - return $this->getOption()->loadChoiceList($value); - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null): array - { - return $this->getOption()->loadChoicesForValues($values, $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null): array - { - return $this->getOption()->loadValuesForChoices($choices, $value); - } -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php deleted file mode 100644 index e9ab5c7..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceTranslationParameters.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_translation_parameters" option. - * - * @internal - * - * @author Vincent Langlet - */ -final class ChoiceTranslationParameters extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php b/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php deleted file mode 100644 index d96f1e9..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/ChoiceValue.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "choice_value" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class ChoiceValue extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/GroupBy.php b/vendor/symfony/form/ChoiceList/Factory/Cache/GroupBy.php deleted file mode 100644 index 2ad492c..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/GroupBy.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "group_by" callback. - * - * @internal - * - * @author Jules Pietri - */ -final class GroupBy extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php b/vendor/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php deleted file mode 100644 index 4aefd69..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/Cache/PreferredChoice.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory\Cache; - -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeInterface; - -/** - * A cacheable wrapper for any {@see FormTypeInterface} or {@see FormTypeExtensionInterface} - * which configures a "preferred_choices" option. - * - * @internal - * - * @author Jules Pietri - */ -final class PreferredChoice extends AbstractStaticOption -{ -} diff --git a/vendor/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php b/vendor/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php deleted file mode 100644 index 2abdd1f..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/CachingFactoryDecorator.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Caches the choice lists created by the decorated factory. - * - * To cache a list based on its options, arguments must be decorated - * by a {@see Cache\AbstractStaticOption} implementation. - * - * @author Bernhard Schussek - * @author Jules Pietri - */ -class CachingFactoryDecorator implements ChoiceListFactoryInterface, ResetInterface -{ - private $decoratedFactory; - - /** - * @var ChoiceListInterface[] - */ - private $lists = []; - - /** - * @var ChoiceListView[] - */ - private $views = []; - - /** - * Generates a SHA-256 hash for the given value. - * - * Optionally, a namespace string can be passed. Calling this method will - * the same values, but different namespaces, will return different hashes. - * - * @param mixed $value The value to hash - * - * @return string The SHA-256 hash - * - * @internal - */ - public static function generateHash($value, string $namespace = ''): string - { - if (\is_object($value)) { - $value = spl_object_hash($value); - } elseif (\is_array($value)) { - array_walk_recursive($value, function (&$v) { - if (\is_object($v)) { - $v = spl_object_hash($v); - } - }); - } - - return hash('sha256', $namespace.':'.serialize($value)); - } - - public function __construct(ChoiceListFactoryInterface $decoratedFactory) - { - $this->decoratedFactory = $decoratedFactory; - } - - /** - * Returns the decorated factory. - * - * @return ChoiceListFactoryInterface - */ - public function getDecoratedFactory() - { - return $this->decoratedFactory; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - */ - public function createListFromChoices(iterable $choices, $value = null/*, $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($choices instanceof \Traversable) { - $choices = iterator_to_array($choices); - } - - $cache = true; - // Only cache per value and filter when needed. The value is not validated on purpose. - // The decorated factory may decide which values to accept and which not. - if ($value instanceof Cache\ChoiceValue) { - $value = $value->getOption(); - } elseif ($value) { - $cache = false; - } - if ($filter instanceof Cache\ChoiceFilter) { - $filter = $filter->getOption(); - } elseif ($filter) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - $hash = self::generateHash([$choices, $value, $filter], 'fromChoices'); - - if (!isset($this->lists[$hash])) { - $this->lists[$hash] = $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - return $this->lists[$hash]; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/*, $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - $cache = true; - - if ($loader instanceof Cache\ChoiceLoader) { - $loader = $loader->getOption(); - } else { - $cache = false; - } - - if ($value instanceof Cache\ChoiceValue) { - $value = $value->getOption(); - } elseif ($value) { - $cache = false; - } - - if ($filter instanceof Cache\ChoiceFilter) { - $filter = $filter->getOption(); - } elseif ($filter) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - $hash = self::generateHash([$loader, $value, $filter], 'fromLoader'); - - if (!isset($this->lists[$hash])) { - $this->lists[$hash] = $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - return $this->lists[$hash]; - } - - /** - * {@inheritdoc} - * - * @param mixed $preferredChoices - * @param mixed $label - * @param mixed $index - * @param mixed $groupBy - * @param mixed $attr - * @param mixed $labelTranslationParameters - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null/*, $labelTranslationParameters = []*/) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $cache = true; - - if ($preferredChoices instanceof Cache\PreferredChoice) { - $preferredChoices = $preferredChoices->getOption(); - } elseif ($preferredChoices) { - $cache = false; - } - - if ($label instanceof Cache\ChoiceLabel) { - $label = $label->getOption(); - } elseif (null !== $label) { - $cache = false; - } - - if ($index instanceof Cache\ChoiceFieldName) { - $index = $index->getOption(); - } elseif ($index) { - $cache = false; - } - - if ($groupBy instanceof Cache\GroupBy) { - $groupBy = $groupBy->getOption(); - } elseif ($groupBy) { - $cache = false; - } - - if ($attr instanceof Cache\ChoiceAttr) { - $attr = $attr->getOption(); - } elseif ($attr) { - $cache = false; - } - - if ($labelTranslationParameters instanceof Cache\ChoiceTranslationParameters) { - $labelTranslationParameters = $labelTranslationParameters->getOption(); - } elseif ([] !== $labelTranslationParameters) { - $cache = false; - } - - if (!$cache) { - return $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } - - $hash = self::generateHash([$list, $preferredChoices, $label, $index, $groupBy, $attr, $labelTranslationParameters]); - - if (!isset($this->views[$hash])) { - $this->views[$hash] = $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } - - return $this->views[$hash]; - } - - public function reset() - { - $this->lists = []; - $this->views = []; - Cache\AbstractStaticOption::reset(); - } -} diff --git a/vendor/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php b/vendor/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php deleted file mode 100644 index 6d4b555..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/ChoiceListFactoryInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; - -/** - * Creates {@link ChoiceListInterface} instances. - * - * @author Bernhard Schussek - */ -interface ChoiceListFactoryInterface -{ - /** - * Creates a choice list for the given choices. - * - * The choices should be passed in the values of the choices array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $filter The callable filtering the choices - * - * @return ChoiceListInterface - */ - public function createListFromChoices(iterable $choices, callable $value = null/*, callable $filter = null*/); - - /** - * Creates a choice list that is loaded with the given loader. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $filter The callable filtering the choices - * - * @return ChoiceListInterface - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null/*, callable $filter = null*/); - - /** - * Creates a view for the given choice list. - * - * Callables may be passed for all optional arguments. The callables receive - * the choice as first and the array key as the second argument. - * - * * The callable for the label and the name should return the generated - * label/choice name. - * * The callable for the preferred choices should return true or false, - * depending on whether the choice should be preferred or not. - * * The callable for the grouping should return the group name or null if - * a choice should not be grouped. - * * The callable for the attributes should return an array of HTML - * attributes that will be inserted in the tag of the choice. - * - * If no callable is passed, the labels will be generated from the choice - * keys. The view indices will be generated using an incrementing integer - * by default. - * - * The preferred choices can also be passed as array. Each choice that is - * contained in that array will be marked as preferred. - * - * The attributes can be passed as multi-dimensional array. The keys should - * match the keys of the choices. The values should be arrays of HTML - * attributes that should be added to the respective choice. - * - * @param array|callable|null $preferredChoices The preferred choices - * @param callable|false|null $label The callable generating the choice labels; - * pass false to discard the label - * @param array|callable|null $attr The callable generating the HTML attributes - * @param array|callable $labelTranslationParameters The parameters used to translate the choice labels - * - * @return ChoiceListView - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, callable $index = null, callable $groupBy = null, $attr = null/*, $labelTranslationParameters = []*/); -} diff --git a/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php b/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php deleted file mode 100644 index c4aa752..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php +++ /dev/null @@ -1,322 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ArrayChoiceList; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\LazyChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\Loader\FilterChoiceLoaderDecorator; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Translation\TranslatableMessage; - -/** - * Default implementation of {@link ChoiceListFactoryInterface}. - * - * @author Bernhard Schussek - * @author Jules Pietri - */ -class DefaultChoiceListFactory implements ChoiceListFactoryInterface -{ - /** - * {@inheritdoc} - * - * @param callable|null $filter - */ - public function createListFromChoices(iterable $choices, callable $value = null/*, callable $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($filter) { - // filter the choice list lazily - return $this->createListFromLoader(new FilterChoiceLoaderDecorator( - new CallbackChoiceLoader(static function () use ($choices) { - return $choices; - } - ), $filter), $value); - } - - return new ArrayChoiceList($choices, $value); - } - - /** - * {@inheritdoc} - * - * @param callable|null $filter - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, callable $value = null/*, callable $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if ($filter) { - $loader = new FilterChoiceLoaderDecorator($loader, $filter); - } - - return new LazyChoiceList($loader, $value); - } - - /** - * {@inheritdoc} - * - * @param array|callable $labelTranslationParameters The parameters used to translate the choice labels - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, callable $index = null, callable $groupBy = null, $attr = null/*, $labelTranslationParameters = []*/) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $preferredViews = []; - $preferredViewsOrder = []; - $otherViews = []; - $choices = $list->getChoices(); - $keys = $list->getOriginalKeys(); - - if (!\is_callable($preferredChoices)) { - if (empty($preferredChoices)) { - $preferredChoices = null; - } else { - // make sure we have keys that reflect order - $preferredChoices = array_values($preferredChoices); - $preferredChoices = static function ($choice) use ($preferredChoices) { - return array_search($choice, $preferredChoices, true); - }; - } - } - - // The names are generated from an incrementing integer by default - if (null === $index) { - $index = 0; - } - - // If $groupBy is a callable returning a string - // choices are added to the group with the name returned by the callable. - // If $groupBy is a callable returning an array - // choices are added to the groups with names returned by the callable - // If the callable returns null, the choice is not added to any group - if (\is_callable($groupBy)) { - foreach ($choices as $value => $choice) { - self::addChoiceViewsGroupedByCallable( - $groupBy, - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $preferredChoices, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - - // Remove empty group views that may have been created by - // addChoiceViewsGroupedByCallable() - foreach ($preferredViews as $key => $view) { - if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) { - unset($preferredViews[$key]); - } - } - - foreach ($otherViews as $key => $view) { - if ($view instanceof ChoiceGroupView && 0 === \count($view->choices)) { - unset($otherViews[$key]); - } - } - - foreach ($preferredViewsOrder as $key => $groupViewsOrder) { - if ($groupViewsOrder) { - $preferredViewsOrder[$key] = min($groupViewsOrder); - } else { - unset($preferredViewsOrder[$key]); - } - } - } else { - // Otherwise use the original structure of the choices - self::addChoiceViewsFromStructuredValues( - $list->getStructuredValues(), - $label, - $choices, - $keys, - $index, - $attr, - $labelTranslationParameters, - $preferredChoices, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - - uksort($preferredViews, static function ($a, $b) use ($preferredViewsOrder): int { - return isset($preferredViewsOrder[$a], $preferredViewsOrder[$b]) - ? $preferredViewsOrder[$a] <=> $preferredViewsOrder[$b] - : 0; - }); - - return new ChoiceListView($otherViews, $preferredViews); - } - - private static function addChoiceView($choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - // $value may be an integer or a string, since it's stored in the array - // keys. We want to guarantee it's a string though. - $key = $keys[$value]; - $nextIndex = \is_int($index) ? $index++ : $index($choice, $key, $value); - - // BC normalize label to accept a false value - if (null === $label) { - // If the labels are null, use the original choice key by default - $label = (string) $key; - } elseif (false !== $label) { - // If "choice_label" is set to false and "expanded" is true, the value false - // should be passed on to the "label" option of the checkboxes/radio buttons - $dynamicLabel = $label($choice, $key, $value); - - if (false === $dynamicLabel) { - $label = false; - } elseif ($dynamicLabel instanceof TranslatableMessage) { - $label = $dynamicLabel; - } else { - $label = (string) $dynamicLabel; - } - } - - $view = new ChoiceView( - $choice, - $value, - $label, - // The attributes may be a callable or a mapping from choice indices - // to nested arrays - \is_callable($attr) ? $attr($choice, $key, $value) : ($attr[$key] ?? []), - // The label translation parameters may be a callable or a mapping from choice indices - // to nested arrays - \is_callable($labelTranslationParameters) ? $labelTranslationParameters($choice, $key, $value) : ($labelTranslationParameters[$key] ?? []) - ); - - // $isPreferred may be null if no choices are preferred - if (null !== $isPreferred && false !== $preferredKey = $isPreferred($choice, $key, $value)) { - $preferredViews[$nextIndex] = $view; - $preferredViewsOrder[$nextIndex] = $preferredKey; - } - - $otherViews[$nextIndex] = $view; - } - - private static function addChoiceViewsFromStructuredValues(array $values, $label, array $choices, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - foreach ($values as $key => $value) { - if (null === $value) { - continue; - } - - // Add the contents of groups to new ChoiceGroupView instances - if (\is_array($value)) { - $preferredViewsForGroup = []; - $otherViewsForGroup = []; - - self::addChoiceViewsFromStructuredValues( - $value, - $label, - $choices, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViewsForGroup, - $preferredViewsOrder, - $otherViewsForGroup - ); - - if (\count($preferredViewsForGroup) > 0) { - $preferredViews[$key] = new ChoiceGroupView($key, $preferredViewsForGroup); - } - - if (\count($otherViewsForGroup) > 0) { - $otherViews[$key] = new ChoiceGroupView($key, $otherViewsForGroup); - } - - continue; - } - - // Add ungrouped items directly - self::addChoiceView( - $choices[$value], - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - } - } - - private static function addChoiceViewsGroupedByCallable(callable $groupBy, $choice, string $value, $label, array $keys, &$index, $attr, $labelTranslationParameters, ?callable $isPreferred, array &$preferredViews, array &$preferredViewsOrder, array &$otherViews) - { - $groupLabels = $groupBy($choice, $keys[$value], $value); - - if (null === $groupLabels) { - // If the callable returns null, don't group the choice - self::addChoiceView( - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews, - $preferredViewsOrder, - $otherViews - ); - - return; - } - - $groupLabels = \is_array($groupLabels) ? array_map('strval', $groupLabels) : [(string) $groupLabels]; - - foreach ($groupLabels as $groupLabel) { - // Initialize the group views if necessary. Unnecessarily built group - // views will be cleaned up at the end of createView() - if (!isset($preferredViews[$groupLabel])) { - $preferredViews[$groupLabel] = new ChoiceGroupView($groupLabel); - $otherViews[$groupLabel] = new ChoiceGroupView($groupLabel); - } - if (!isset($preferredViewsOrder[$groupLabel])) { - $preferredViewsOrder[$groupLabel] = []; - } - - self::addChoiceView( - $choice, - $value, - $label, - $keys, - $index, - $attr, - $labelTranslationParameters, - $isPreferred, - $preferredViews[$groupLabel]->choices, - $preferredViewsOrder[$groupLabel], - $otherViews[$groupLabel]->choices - ); - } - } -} diff --git a/vendor/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php b/vendor/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php deleted file mode 100644 index d3acea5..0000000 --- a/vendor/symfony/form/ChoiceList/Factory/PropertyAccessDecorator.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Factory; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Adds property path support to a choice list factory. - * - * Pass the decorated factory to the constructor: - * - * $decorator = new PropertyAccessDecorator($factory); - * - * You can now pass property paths for generating choice values, labels, view - * indices, HTML attributes and for determining the preferred choices and the - * choice groups: - * - * // extract values from the $value property - * $list = $createListFromChoices($objects, 'value'); - * - * @author Bernhard Schussek - */ -class PropertyAccessDecorator implements ChoiceListFactoryInterface -{ - private $decoratedFactory; - private $propertyAccessor; - - public function __construct(ChoiceListFactoryInterface $decoratedFactory, PropertyAccessorInterface $propertyAccessor = null) - { - $this->decoratedFactory = $decoratedFactory; - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - /** - * Returns the decorated factory. - * - * @return ChoiceListFactoryInterface - */ - public function getDecoratedFactory() - { - return $this->decoratedFactory; - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - * - * @return ChoiceListInterface - */ - public function createListFromChoices(iterable $choices, $value = null/*, $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if (\is_string($value)) { - $value = new PropertyPath($value); - } - - if ($value instanceof PropertyPathInterface) { - $accessor = $this->propertyAccessor; - $value = function ($choice) use ($accessor, $value) { - // The callable may be invoked with a non-object/array value - // when such values are passed to - // ChoiceListInterface::getValuesForChoices(). Handle this case - // so that the call to getValue() doesn't break. - return \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null; - }; - } - - if (\is_string($filter)) { - $filter = new PropertyPath($filter); - } - - if ($filter instanceof PropertyPath) { - $accessor = $this->propertyAccessor; - $filter = static function ($choice) use ($accessor, $filter) { - return (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter); - }; - } - - return $this->decoratedFactory->createListFromChoices($choices, $value, $filter); - } - - /** - * {@inheritdoc} - * - * @param mixed $value - * @param mixed $filter - * - * @return ChoiceListInterface - */ - public function createListFromLoader(ChoiceLoaderInterface $loader, $value = null/*, $filter = null*/) - { - $filter = \func_num_args() > 2 ? func_get_arg(2) : null; - - if (\is_string($value)) { - $value = new PropertyPath($value); - } - - if ($value instanceof PropertyPathInterface) { - $accessor = $this->propertyAccessor; - $value = function ($choice) use ($accessor, $value) { - // The callable may be invoked with a non-object/array value - // when such values are passed to - // ChoiceListInterface::getValuesForChoices(). Handle this case - // so that the call to getValue() doesn't break. - return \is_object($choice) || \is_array($choice) ? $accessor->getValue($choice, $value) : null; - }; - } - - if (\is_string($filter)) { - $filter = new PropertyPath($filter); - } - - if ($filter instanceof PropertyPath) { - $accessor = $this->propertyAccessor; - $filter = static function ($choice) use ($accessor, $filter) { - return (\is_object($choice) || \is_array($choice)) && $accessor->getValue($choice, $filter); - }; - } - - return $this->decoratedFactory->createListFromLoader($loader, $value, $filter); - } - - /** - * {@inheritdoc} - * - * @param mixed $preferredChoices - * @param mixed $label - * @param mixed $index - * @param mixed $groupBy - * @param mixed $attr - * @param mixed $labelTranslationParameters - * - * @return ChoiceListView - */ - public function createView(ChoiceListInterface $list, $preferredChoices = null, $label = null, $index = null, $groupBy = null, $attr = null/*, $labelTranslationParameters = []*/) - { - $labelTranslationParameters = \func_num_args() > 6 ? func_get_arg(6) : []; - $accessor = $this->propertyAccessor; - - if (\is_string($label)) { - $label = new PropertyPath($label); - } - - if ($label instanceof PropertyPathInterface) { - $label = function ($choice) use ($accessor, $label) { - return $accessor->getValue($choice, $label); - }; - } - - if (\is_string($preferredChoices)) { - $preferredChoices = new PropertyPath($preferredChoices); - } - - if ($preferredChoices instanceof PropertyPathInterface) { - $preferredChoices = function ($choice) use ($accessor, $preferredChoices) { - try { - return $accessor->getValue($choice, $preferredChoices); - } catch (UnexpectedTypeException $e) { - // Assume not preferred if not readable - return false; - } - }; - } - - if (\is_string($index)) { - $index = new PropertyPath($index); - } - - if ($index instanceof PropertyPathInterface) { - $index = function ($choice) use ($accessor, $index) { - return $accessor->getValue($choice, $index); - }; - } - - if (\is_string($groupBy)) { - $groupBy = new PropertyPath($groupBy); - } - - if ($groupBy instanceof PropertyPathInterface) { - $groupBy = function ($choice) use ($accessor, $groupBy) { - try { - return $accessor->getValue($choice, $groupBy); - } catch (UnexpectedTypeException $e) { - // Don't group if path is not readable - return null; - } - }; - } - - if (\is_string($attr)) { - $attr = new PropertyPath($attr); - } - - if ($attr instanceof PropertyPathInterface) { - $attr = function ($choice) use ($accessor, $attr) { - return $accessor->getValue($choice, $attr); - }; - } - - if (\is_string($labelTranslationParameters)) { - $labelTranslationParameters = new PropertyPath($labelTranslationParameters); - } - - if ($labelTranslationParameters instanceof PropertyPath) { - $labelTranslationParameters = static function ($choice) use ($accessor, $labelTranslationParameters) { - return $accessor->getValue($choice, $labelTranslationParameters); - }; - } - - return $this->decoratedFactory->createView( - $list, - $preferredChoices, - $label, - $index, - $groupBy, - $attr, - $labelTranslationParameters - ); - } -} diff --git a/vendor/symfony/form/ChoiceList/LazyChoiceList.php b/vendor/symfony/form/ChoiceList/LazyChoiceList.php deleted file mode 100644 index ab4c103..0000000 --- a/vendor/symfony/form/ChoiceList/LazyChoiceList.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList; - -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; - -/** - * A choice list that loads its choices lazily. - * - * The choices are fetched using a {@link ChoiceLoaderInterface} instance. - * If only {@link getChoicesForValues()} or {@link getValuesForChoices()} is - * called, the choice list is only loaded partially for improved performance. - * - * Once {@link getChoices()} or {@link getValues()} is called, the list is - * loaded fully. - * - * @author Bernhard Schussek - */ -class LazyChoiceList implements ChoiceListInterface -{ - private $loader; - - /** - * The callable creating string values for each choice. - * - * If null, choices are cast to strings. - * - * @var callable|null - */ - private $value; - - /** - * Creates a lazily-loaded list using the given loader. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as first and the array key as the second - * argument. - * - * @param callable|null $value The callable generating the choice values - */ - public function __construct(ChoiceLoaderInterface $loader, callable $value = null) - { - $this->loader = $loader; - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function getChoices() - { - return $this->loader->loadChoiceList($this->value)->getChoices(); - } - - /** - * {@inheritdoc} - */ - public function getValues() - { - return $this->loader->loadChoiceList($this->value)->getValues(); - } - - /** - * {@inheritdoc} - */ - public function getStructuredValues() - { - return $this->loader->loadChoiceList($this->value)->getStructuredValues(); - } - - /** - * {@inheritdoc} - */ - public function getOriginalKeys() - { - return $this->loader->loadChoiceList($this->value)->getOriginalKeys(); - } - - /** - * {@inheritdoc} - */ - public function getChoicesForValues(array $values) - { - return $this->loader->loadChoicesForValues($values, $this->value); - } - - /** - * {@inheritdoc} - */ - public function getValuesForChoices(array $choices) - { - return $this->loader->loadValuesForChoices($choices, $this->value); - } -} diff --git a/vendor/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php b/vendor/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php deleted file mode 100644 index a30af63..0000000 --- a/vendor/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -use Symfony\Component\Form\ChoiceList\ArrayChoiceList; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; - -/** - * @author Jules Pietri - */ -abstract class AbstractChoiceLoader implements ChoiceLoaderInterface -{ - /** - * The loaded choice list. - * - * @var ArrayChoiceList - */ - private $choiceList; - - /** - * @final - * - * {@inheritdoc} - */ - public function loadChoiceList(callable $value = null): ChoiceListInterface - { - return $this->choiceList ?? ($this->choiceList = new ArrayChoiceList($this->loadChoices(), $value)); - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null) - { - if (!$values) { - return []; - } - - if ($this->choiceList) { - return $this->choiceList->getChoicesForValues($values); - } - - return $this->doLoadChoicesForValues($values, $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null) - { - if (!$choices) { - return []; - } - - if ($value) { - // if a value callback exists, use it - return array_map($value, $choices); - } - - if ($this->choiceList) { - return $this->choiceList->getValuesForChoices($choices); - } - - return $this->doLoadValuesForChoices($choices); - } - - abstract protected function loadChoices(): iterable; - - protected function doLoadChoicesForValues(array $values, ?callable $value): array - { - return $this->loadChoiceList($value)->getChoicesForValues($values); - } - - protected function doLoadValuesForChoices(array $choices): array - { - return $this->loadChoiceList()->getValuesForChoices($choices); - } -} diff --git a/vendor/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php b/vendor/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php deleted file mode 100644 index 1811d43..0000000 --- a/vendor/symfony/form/ChoiceList/Loader/CallbackChoiceLoader.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * Loads an {@link ArrayChoiceList} instance from a callable returning iterable choices. - * - * @author Jules Pietri - */ -class CallbackChoiceLoader extends AbstractChoiceLoader -{ - private $callback; - - /** - * @param callable $callback The callable returning iterable choices - */ - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - protected function loadChoices(): iterable - { - return ($this->callback)(); - } -} diff --git a/vendor/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php b/vendor/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php deleted file mode 100644 index 98e03bb..0000000 --- a/vendor/symfony/form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; - -/** - * Loads a choice list. - * - * The methods {@link loadChoicesForValues()} and {@link loadValuesForChoices()} - * can be used to load the list only partially in cases where a fully-loaded - * list is not necessary. - * - * @author Bernhard Schussek - */ -interface ChoiceLoaderInterface -{ - /** - * Loads a list of choices. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param callable|null $value The callable which generates the values - * from choices - * - * @return ChoiceListInterface - */ - public function loadChoiceList(callable $value = null); - - /** - * Loads the choices corresponding to the given values. - * - * The choices are returned with the same keys and in the same order as the - * corresponding values in the given array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param string[] $values An array of choice values. Non-existing - * values in this array are ignored - * @param callable|null $value The callable generating the choice values - * - * @return array - */ - public function loadChoicesForValues(array $values, callable $value = null); - - /** - * Loads the values corresponding to the given choices. - * - * The values are returned with the same keys and in the same order as the - * corresponding choices in the given array. - * - * Optionally, a callable can be passed for generating the choice values. - * The callable receives the choice as only argument. - * Null may be passed when the choice list contains the empty value. - * - * @param array $choices An array of choices. Non-existing choices in - * this array are ignored - * @param callable|null $value The callable generating the choice values - * - * @return string[] - */ - public function loadValuesForChoices(array $choices, callable $value = null); -} diff --git a/vendor/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php b/vendor/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php deleted file mode 100644 index a52f3b8..0000000 --- a/vendor/symfony/form/ChoiceList/Loader/FilterChoiceLoaderDecorator.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * A decorator to filter choices only when they are loaded or partially loaded. - * - * @author Jules Pietri - */ -class FilterChoiceLoaderDecorator extends AbstractChoiceLoader -{ - private $decoratedLoader; - private $filter; - - public function __construct(ChoiceLoaderInterface $loader, callable $filter) - { - $this->decoratedLoader = $loader; - $this->filter = $filter; - } - - protected function loadChoices(): iterable - { - $list = $this->decoratedLoader->loadChoiceList(); - - if (array_values($list->getValues()) === array_values($structuredValues = $list->getStructuredValues())) { - return array_filter(array_combine($list->getOriginalKeys(), $list->getChoices()), $this->filter); - } - - foreach ($structuredValues as $group => $values) { - if ($values && $filtered = array_filter($list->getChoicesForValues($values), $this->filter)) { - $choices[$group] = $filtered; - } - // filter empty groups - } - - return $choices ?? []; - } - - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null): array - { - return array_filter($this->decoratedLoader->loadChoicesForValues($values, $value), $this->filter); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null): array - { - return $this->decoratedLoader->loadValuesForChoices(array_filter($choices, $this->filter), $value); - } -} diff --git a/vendor/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php b/vendor/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php deleted file mode 100644 index 546937b..0000000 --- a/vendor/symfony/form/ChoiceList/Loader/IntlCallbackChoiceLoader.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\Loader; - -/** - * Callback choice loader optimized for Intl choice types. - * - * @author Jules Pietri - * @author Yonel Ceruto - */ -class IntlCallbackChoiceLoader extends CallbackChoiceLoader -{ - /** - * {@inheritdoc} - */ - public function loadChoicesForValues(array $values, callable $value = null) - { - return parent::loadChoicesForValues(array_filter($values), $value); - } - - /** - * {@inheritdoc} - */ - public function loadValuesForChoices(array $choices, callable $value = null) - { - $choices = array_filter($choices); - - // If no callable is set, choices are the same as values - if (null === $value) { - return $choices; - } - - return parent::loadValuesForChoices($choices, $value); - } -} diff --git a/vendor/symfony/form/ChoiceList/View/ChoiceGroupView.php b/vendor/symfony/form/ChoiceList/View/ChoiceGroupView.php deleted file mode 100644 index 46b7d19..0000000 --- a/vendor/symfony/form/ChoiceList/View/ChoiceGroupView.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -/** - * Represents a group of choices in templates. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ChoiceGroupView implements \IteratorAggregate -{ - public $label; - public $choices; - - /** - * Creates a new choice group view. - * - * @param array $choices the choice views in the group - */ - public function __construct(string $label, array $choices = []) - { - $this->label = $label; - $this->choices = $choices; - } - - /** - * {@inheritdoc} - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->choices); - } -} diff --git a/vendor/symfony/form/ChoiceList/View/ChoiceListView.php b/vendor/symfony/form/ChoiceList/View/ChoiceListView.php deleted file mode 100644 index 586269b..0000000 --- a/vendor/symfony/form/ChoiceList/View/ChoiceListView.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -/** - * Represents a choice list in templates. - * - * A choice list contains choices and optionally preferred choices which are - * displayed in the very beginning of the list. Both choices and preferred - * choices may be grouped in {@link ChoiceGroupView} instances. - * - * @author Bernhard Schussek - */ -class ChoiceListView -{ - public $choices; - public $preferredChoices; - - /** - * Creates a new choice list view. - * - * @param ChoiceGroupView[]|ChoiceView[] $choices The choice views - * @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred choice views - */ - public function __construct(array $choices = [], array $preferredChoices = []) - { - $this->choices = $choices; - $this->preferredChoices = $preferredChoices; - } - - /** - * Returns whether a placeholder is in the choices. - * - * A placeholder must be the first child element, not be in a group and have an empty value. - * - * @return bool - */ - public function hasPlaceholder() - { - if ($this->preferredChoices) { - $firstChoice = reset($this->preferredChoices); - - return $firstChoice instanceof ChoiceView && '' === $firstChoice->value; - } - - $firstChoice = reset($this->choices); - - return $firstChoice instanceof ChoiceView && '' === $firstChoice->value; - } -} diff --git a/vendor/symfony/form/ChoiceList/View/ChoiceView.php b/vendor/symfony/form/ChoiceList/View/ChoiceView.php deleted file mode 100644 index e1d8ac9..0000000 --- a/vendor/symfony/form/ChoiceList/View/ChoiceView.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\ChoiceList\View; - -use Symfony\Component\Translation\TranslatableMessage; - -/** - * Represents a choice in templates. - * - * @author Bernhard Schussek - */ -class ChoiceView -{ - public $label; - public $value; - public $data; - - /** - * Additional attributes for the HTML tag. - */ - public $attr; - - /** - * Additional parameters used to translate the label. - */ - public $labelTranslationParameters; - - /** - * Creates a new choice view. - * - * @param mixed $data The original choice - * @param string $value The view representation of the choice - * @param string|TranslatableMessage|false $label The label displayed to humans; pass false to discard the label - * @param array $attr Additional attributes for the HTML tag - * @param array $labelTranslationParameters Additional parameters used to translate the label - */ - public function __construct($data, string $value, $label, array $attr = [], array $labelTranslationParameters = []) - { - $this->data = $data; - $this->value = $value; - $this->label = $label; - $this->attr = $attr; - $this->labelTranslationParameters = $labelTranslationParameters; - } -} diff --git a/vendor/symfony/form/ClearableErrorsInterface.php b/vendor/symfony/form/ClearableErrorsInterface.php deleted file mode 100644 index e609bed..0000000 --- a/vendor/symfony/form/ClearableErrorsInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A form element whose errors can be cleared. - * - * @author Colin O'Dell - */ -interface ClearableErrorsInterface -{ - /** - * Removes all the errors of this form. - * - * @param bool $deep Whether to remove errors from child forms as well - * - * @return $this - */ - public function clearErrors(bool $deep = false); -} diff --git a/vendor/symfony/form/ClickableInterface.php b/vendor/symfony/form/ClickableInterface.php deleted file mode 100644 index 8b02d36..0000000 --- a/vendor/symfony/form/ClickableInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A clickable form element. - * - * @author Bernhard Schussek - */ -interface ClickableInterface -{ - /** - * Returns whether this element was clicked. - * - * @return bool - */ - public function isClicked(); -} diff --git a/vendor/symfony/form/Command/DebugCommand.php b/vendor/symfony/form/Command/DebugCommand.php deleted file mode 100644 index 6979831..0000000 --- a/vendor/symfony/form/Command/DebugCommand.php +++ /dev/null @@ -1,292 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Form\Console\Helper\DescriptorHelper; -use Symfony\Component\Form\Extension\Core\CoreExtension; -use Symfony\Component\Form\FormRegistryInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * A console command for retrieving information about form types. - * - * @author Yonel Ceruto - */ -class DebugCommand extends Command -{ - protected static $defaultName = 'debug:form'; - protected static $defaultDescription = 'Display form type information'; - - private $formRegistry; - private $namespaces; - private $types; - private $extensions; - private $guessers; - private $fileLinkFormatter; - - public function __construct(FormRegistryInterface $formRegistry, array $namespaces = ['Symfony\Component\Form\Extension\Core\Type'], array $types = [], array $extensions = [], array $guessers = [], FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->formRegistry = $formRegistry; - $this->namespaces = $namespaces; - $this->types = $types; - $this->extensions = $extensions; - $this->guessers = $guessers; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('class', InputArgument::OPTIONAL, 'The form type class'), - new InputArgument('option', InputArgument::OPTIONAL, 'The form type option'), - new InputOption('show-deprecated', null, InputOption::VALUE_NONE, 'Display deprecated options in form types'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt or json)', 'txt'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays information about form types. - - php %command.full_name% - -The command lists all built-in types, services types, type extensions and -guessers currently available. - - php %command.full_name% Symfony\Component\Form\Extension\Core\Type\ChoiceType - php %command.full_name% ChoiceType - -The command lists all defined options that contains the given form type, -as well as their parents and type extensions. - - php %command.full_name% ChoiceType choice_value - -Use the --show-deprecated option to display form types with -deprecated options or the deprecated options of the given form type: - - php %command.full_name% --show-deprecated - php %command.full_name% ChoiceType --show-deprecated - -The command displays the definition of the given option name. - - php %command.full_name% --format=json - -The command lists everything in a machine readable json format. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - - if (null === $class = $input->getArgument('class')) { - $object = null; - $options['core_types'] = $this->getCoreTypes(); - $options['service_types'] = array_values(array_diff($this->types, $options['core_types'])); - if ($input->getOption('show-deprecated')) { - $options['core_types'] = $this->filterTypesByDeprecated($options['core_types']); - $options['service_types'] = $this->filterTypesByDeprecated($options['service_types']); - } - $options['extensions'] = $this->extensions; - $options['guessers'] = $this->guessers; - foreach ($options as $k => $list) { - sort($options[$k]); - } - } else { - if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) { - $class = $this->getFqcnTypeClass($input, $io, $class); - } - $resolvedType = $this->formRegistry->getType($class); - - if ($option = $input->getArgument('option')) { - $object = $resolvedType->getOptionsResolver(); - - if (!$object->isDefined($option)) { - $message = sprintf('Option "%s" is not defined in "%s".', $option, \get_class($resolvedType->getInnerType())); - - if ($alternatives = $this->findAlternatives($option, $object->getDefinedOptions())) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - - $options['type'] = $resolvedType->getInnerType(); - $options['option'] = $option; - } else { - $object = $resolvedType; - } - } - - $helper = new DescriptorHelper($this->fileLinkFormatter); - $options['format'] = $input->getOption('format'); - $options['show_deprecated'] = $input->getOption('show-deprecated'); - $helper->describe($io, $object, $options); - - return 0; - } - - private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, string $shortClassName): string - { - $classes = $this->getFqcnTypeClasses($shortClassName); - - if (0 === $count = \count($classes)) { - $message = sprintf("Could not find type \"%s\" into the following namespaces:\n %s", $shortClassName, implode("\n ", $this->namespaces)); - - $allTypes = array_merge($this->getCoreTypes(), $this->types); - if ($alternatives = $this->findAlternatives($shortClassName, $allTypes)) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - if (1 === $count) { - return $classes[0]; - } - if (!$input->isInteractive()) { - throw new InvalidArgumentException(sprintf("The type \"%s\" is ambiguous.\n\nDid you mean one of these?\n %s.", $shortClassName, implode("\n ", $classes))); - } - - return $io->choice(sprintf("The type \"%s\" is ambiguous.\n\nSelect one of the following form types to display its information:", $shortClassName), $classes, $classes[0]); - } - - private function getFqcnTypeClasses(string $shortClassName): array - { - $classes = []; - sort($this->namespaces); - foreach ($this->namespaces as $namespace) { - if (class_exists($fqcn = $namespace.'\\'.$shortClassName)) { - $classes[] = $fqcn; - } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName))) { - $classes[] = $fqcn; - } elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) { - $classes[] = $fqcn; - } elseif (str_ends_with($shortClassName, 'type') && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) { - $classes[] = $fqcn; - } - } - - return $classes; - } - - private function getCoreTypes(): array - { - $coreExtension = new CoreExtension(); - $loadTypesRefMethod = (new \ReflectionObject($coreExtension))->getMethod('loadTypes'); - $loadTypesRefMethod->setAccessible(true); - $coreTypes = $loadTypesRefMethod->invoke($coreExtension); - $coreTypes = array_map(function (FormTypeInterface $type) { return \get_class($type); }, $coreTypes); - sort($coreTypes); - - return $coreTypes; - } - - private function filterTypesByDeprecated(array $types): array - { - $typesWithDeprecatedOptions = []; - foreach ($types as $class) { - $optionsResolver = $this->formRegistry->getType($class)->getOptionsResolver(); - foreach ($optionsResolver->getDefinedOptions() as $option) { - if ($optionsResolver->isDeprecated($option)) { - $typesWithDeprecatedOptions[] = $class; - break; - } - } - } - - return $typesWithDeprecatedOptions; - } - - private function findAlternatives(string $name, array $collection): array - { - $alternatives = []; - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $threshold = 1e3; - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('class')) { - $suggestions->suggestValues(array_merge($this->getCoreTypes(), $this->types)); - - return; - } - - if ($input->mustSuggestArgumentValuesFor('option') && null !== $class = $input->getArgument('class')) { - $this->completeOptions($class, $suggestions); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } - - private function completeOptions(string $class, CompletionSuggestions $suggestions): void - { - if (!class_exists($class) || !is_subclass_of($class, FormTypeInterface::class)) { - $classes = $this->getFqcnTypeClasses($class); - - if (1 === \count($classes)) { - $class = $classes[0]; - } - } - - if (!$this->formRegistry->hasType($class)) { - return; - } - - $resolvedType = $this->formRegistry->getType($class); - $suggestions->suggestValues($resolvedType->getOptionsResolver()->getDefinedOptions()); - } -} diff --git a/vendor/symfony/form/Console/Descriptor/Descriptor.php b/vendor/symfony/form/Console/Descriptor/Descriptor.php deleted file mode 100644 index 4aceafb..0000000 --- a/vendor/symfony/form/Console/Descriptor/Descriptor.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\OutputStyle; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\Form\Util\OptionsResolverWrapper; -use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector; -use Symfony\Component\OptionsResolver\Exception\NoConfigurationException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** @var OutputStyle */ - protected $output; - protected $type; - protected $ownOptions = []; - protected $overriddenOptions = []; - protected $parentOptions = []; - protected $extensionOptions = []; - protected $requiredOptions = []; - protected $parents = []; - protected $extensions = []; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $this->output = $output instanceof OutputStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - - switch (true) { - case null === $object: - $this->describeDefaults($options); - break; - case $object instanceof ResolvedFormTypeInterface: - $this->describeResolvedFormType($object, $options); - break; - case $object instanceof OptionsResolver: - $this->describeOption($object, $options); - break; - default: - throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); - } - } - - abstract protected function describeDefaults(array $options); - - abstract protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []); - - abstract protected function describeOption(OptionsResolver $optionsResolver, array $options); - - protected function collectOptions(ResolvedFormTypeInterface $type) - { - $this->parents = []; - $this->extensions = []; - - if (null !== $type->getParent()) { - $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); - } else { - $optionsResolver = new OptionsResolver(); - } - - $type->getInnerType()->configureOptions($ownOptionsResolver = new OptionsResolverWrapper()); - $this->ownOptions = array_diff($ownOptionsResolver->getDefinedOptions(), $optionsResolver->getDefinedOptions()); - $overriddenOptions = array_intersect(array_merge($ownOptionsResolver->getDefinedOptions(), $ownOptionsResolver->getUndefinedOptions()), $optionsResolver->getDefinedOptions()); - - $this->parentOptions = []; - foreach ($this->parents as $class => $parentOptions) { - $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $parentOptions); - $this->parentOptions[$class] = array_diff($parentOptions, $overriddenOptions); - } - - $type->getInnerType()->configureOptions($optionsResolver); - $this->collectTypeExtensionsOptions($type, $optionsResolver); - $this->extensionOptions = []; - foreach ($this->extensions as $class => $extensionOptions) { - $this->overriddenOptions[$class] = array_intersect($overriddenOptions, $extensionOptions); - $this->extensionOptions[$class] = array_diff($extensionOptions, $overriddenOptions); - } - - $this->overriddenOptions = array_filter($this->overriddenOptions); - $this->parentOptions = array_filter($this->parentOptions); - $this->extensionOptions = array_filter($this->extensionOptions); - $this->requiredOptions = $optionsResolver->getRequiredOptions(); - - $this->parents = array_keys($this->parents); - $this->extensions = array_keys($this->extensions); - } - - protected function getOptionDefinition(OptionsResolver $optionsResolver, string $option) - { - $definition = []; - - if ($info = $optionsResolver->getInfo($option)) { - $definition = [ - 'info' => $info, - ]; - } - - $definition += [ - 'required' => $optionsResolver->isRequired($option), - 'deprecated' => $optionsResolver->isDeprecated($option), - ]; - - $introspector = new OptionsResolverIntrospector($optionsResolver); - - $map = [ - 'default' => 'getDefault', - 'lazy' => 'getLazyClosures', - 'allowedTypes' => 'getAllowedTypes', - 'allowedValues' => 'getAllowedValues', - 'normalizers' => 'getNormalizers', - 'deprecation' => 'getDeprecation', - ]; - - foreach ($map as $key => $method) { - try { - $definition[$key] = $introspector->{$method}($option); - } catch (NoConfigurationException $e) { - // noop - } - } - - if (isset($definition['deprecation']) && isset($definition['deprecation']['message']) && \is_string($definition['deprecation']['message'])) { - $definition['deprecationMessage'] = strtr($definition['deprecation']['message'], ['%name%' => $option]); - $definition['deprecationPackage'] = $definition['deprecation']['package']; - $definition['deprecationVersion'] = $definition['deprecation']['version']; - } - - return $definition; - } - - protected function filterOptionsByDeprecated(ResolvedFormTypeInterface $type) - { - $deprecatedOptions = []; - $resolver = $type->getOptionsResolver(); - foreach ($resolver->getDefinedOptions() as $option) { - if ($resolver->isDeprecated($option)) { - $deprecatedOptions[] = $option; - } - } - - $filterByDeprecated = function (array $options) use ($deprecatedOptions) { - foreach ($options as $class => $opts) { - if ($deprecated = array_intersect($deprecatedOptions, $opts)) { - $options[$class] = $deprecated; - } else { - unset($options[$class]); - } - } - - return $options; - }; - - $this->ownOptions = array_intersect($deprecatedOptions, $this->ownOptions); - $this->overriddenOptions = $filterByDeprecated($this->overriddenOptions); - $this->parentOptions = $filterByDeprecated($this->parentOptions); - $this->extensionOptions = $filterByDeprecated($this->extensionOptions); - } - - private function getParentOptionsResolver(ResolvedFormTypeInterface $type): OptionsResolver - { - $this->parents[$class = \get_class($type->getInnerType())] = []; - - if (null !== $type->getParent()) { - $optionsResolver = clone $this->getParentOptionsResolver($type->getParent()); - } else { - $optionsResolver = new OptionsResolver(); - } - - $inheritedOptions = $optionsResolver->getDefinedOptions(); - $type->getInnerType()->configureOptions($optionsResolver); - $this->parents[$class] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); - - $this->collectTypeExtensionsOptions($type, $optionsResolver); - - return $optionsResolver; - } - - private function collectTypeExtensionsOptions(ResolvedFormTypeInterface $type, OptionsResolver $optionsResolver) - { - foreach ($type->getTypeExtensions() as $extension) { - $inheritedOptions = $optionsResolver->getDefinedOptions(); - $extension->configureOptions($optionsResolver); - $this->extensions[\get_class($extension)] = array_diff($optionsResolver->getDefinedOptions(), $inheritedOptions); - } - } -} diff --git a/vendor/symfony/form/Console/Descriptor/JsonDescriptor.php b/vendor/symfony/form/Console/Descriptor/JsonDescriptor.php deleted file mode 100644 index d40561e..0000000 --- a/vendor/symfony/form/Console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - protected function describeDefaults(array $options) - { - $data['builtin_form_types'] = $options['core_types']; - $data['service_form_types'] = $options['service_types']; - if (!$options['show_deprecated']) { - $data['type_extensions'] = $options['extensions']; - $data['type_guessers'] = $options['guessers']; - } - - $this->writeData($data, $options); - } - - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) - { - $this->collectOptions($resolvedFormType); - - if ($options['show_deprecated']) { - $this->filterOptionsByDeprecated($resolvedFormType); - } - - $formOptions = [ - 'own' => $this->ownOptions, - 'overridden' => $this->overriddenOptions, - 'parent' => $this->parentOptions, - 'extension' => $this->extensionOptions, - 'required' => $this->requiredOptions, - ]; - $this->sortOptions($formOptions); - - $data = [ - 'class' => \get_class($resolvedFormType->getInnerType()), - 'block_prefix' => $resolvedFormType->getInnerType()->getBlockPrefix(), - 'options' => $formOptions, - 'parent_types' => $this->parents, - 'type_extensions' => $this->extensions, - ]; - - $this->writeData($data, $options); - } - - protected function describeOption(OptionsResolver $optionsResolver, array $options) - { - $definition = $this->getOptionDefinition($optionsResolver, $options['option']); - - $map = []; - if ($definition['deprecated']) { - $map['deprecated'] = 'deprecated'; - if (\is_string($definition['deprecationMessage'])) { - $map['deprecation_message'] = 'deprecationMessage'; - } - } - $map += [ - 'info' => 'info', - 'required' => 'required', - 'default' => 'default', - 'allowed_types' => 'allowedTypes', - 'allowed_values' => 'allowedValues', - ]; - foreach ($map as $label => $name) { - if (\array_key_exists($name, $definition)) { - $data[$label] = $definition[$name]; - - if ('default' === $name) { - $data['is_lazy'] = isset($definition['lazy']); - } - } - } - $data['has_normalizer'] = isset($definition['normalizers']); - - $this->writeData($data, $options); - } - - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - $this->output->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n"); - } - - private function sortOptions(array &$options) - { - foreach ($options as &$opts) { - $sorted = false; - foreach ($opts as &$opt) { - if (\is_array($opt)) { - sort($opt); - $sorted = true; - } - } - if (!$sorted) { - sort($opts); - } - } - } -} diff --git a/vendor/symfony/form/Console/Descriptor/TextDescriptor.php b/vendor/symfony/form/Console/Descriptor/TextDescriptor.php deleted file mode 100644 index 4862a67..0000000 --- a/vendor/symfony/form/Console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Descriptor; - -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Form\ResolvedFormTypeInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - private $fileLinkFormatter; - - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function describeDefaults(array $options) - { - if ($options['core_types']) { - $this->output->section('Built-in form types (Symfony\Component\Form\Extension\Core\Type)'); - $shortClassNames = array_map(function ($fqcn) { - return $this->formatClassLink($fqcn, \array_slice(explode('\\', $fqcn), -1)[0]); - }, $options['core_types']); - for ($i = 0, $loopsMax = \count($shortClassNames); $i * 5 < $loopsMax; ++$i) { - $this->output->writeln(' '.implode(', ', \array_slice($shortClassNames, $i * 5, 5))); - } - } - - if ($options['service_types']) { - $this->output->section('Service form types'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['service_types'])); - } - - if (!$options['show_deprecated']) { - if ($options['extensions']) { - $this->output->section('Type extensions'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['extensions'])); - } - - if ($options['guessers']) { - $this->output->section('Type guessers'); - $this->output->listing(array_map([$this, 'formatClassLink'], $options['guessers'])); - } - } - } - - protected function describeResolvedFormType(ResolvedFormTypeInterface $resolvedFormType, array $options = []) - { - $this->collectOptions($resolvedFormType); - - if ($options['show_deprecated']) { - $this->filterOptionsByDeprecated($resolvedFormType); - } - - $formOptions = $this->normalizeAndSortOptionsColumns(array_filter([ - 'own' => $this->ownOptions, - 'overridden' => $this->overriddenOptions, - 'parent' => $this->parentOptions, - 'extension' => $this->extensionOptions, - ])); - - // setting headers and column order - $tableHeaders = array_intersect_key([ - 'own' => 'Options', - 'overridden' => 'Overridden options', - 'parent' => 'Parent options', - 'extension' => 'Extension options', - ], $formOptions); - - $this->output->title(sprintf('%s (Block prefix: "%s")', \get_class($resolvedFormType->getInnerType()), $resolvedFormType->getInnerType()->getBlockPrefix())); - - if ($formOptions) { - $this->output->table($tableHeaders, $this->buildTableRows($tableHeaders, $formOptions)); - } - - if ($this->parents) { - $this->output->section('Parent types'); - $this->output->listing(array_map([$this, 'formatClassLink'], $this->parents)); - } - - if ($this->extensions) { - $this->output->section('Type extensions'); - $this->output->listing(array_map([$this, 'formatClassLink'], $this->extensions)); - } - } - - protected function describeOption(OptionsResolver $optionsResolver, array $options) - { - $definition = $this->getOptionDefinition($optionsResolver, $options['option']); - - $dump = new Dumper($this->output); - $map = []; - if ($definition['deprecated']) { - $map = [ - 'Deprecated' => 'deprecated', - 'Deprecation package' => 'deprecationPackage', - 'Deprecation version' => 'deprecationVersion', - 'Deprecation message' => 'deprecationMessage', - ]; - } - $map += [ - 'Info' => 'info', - 'Required' => 'required', - 'Default' => 'default', - 'Allowed types' => 'allowedTypes', - 'Allowed values' => 'allowedValues', - 'Normalizers' => 'normalizers', - ]; - $rows = []; - foreach ($map as $label => $name) { - $value = \array_key_exists($name, $definition) ? $dump($definition[$name]) : '-'; - if ('default' === $name && isset($definition['lazy'])) { - $value = "Value: $value\n\nClosure(s): ".$dump($definition['lazy']); - } - - $rows[] = ["$label", $value]; - $rows[] = new TableSeparator(); - } - array_pop($rows); - - $this->output->title(sprintf('%s (%s)', \get_class($options['type']), $options['option'])); - $this->output->table([], $rows); - } - - private function buildTableRows(array $headers, array $options): array - { - $tableRows = []; - $count = \count(max($options)); - for ($i = 0; $i < $count; ++$i) { - $cells = []; - foreach (array_keys($headers) as $group) { - $option = $options[$group][$i] ?? null; - if (\is_string($option) && \in_array($option, $this->requiredOptions, true)) { - $option .= ' (required)'; - } - $cells[] = $option; - } - $tableRows[] = $cells; - } - - return $tableRows; - } - - private function normalizeAndSortOptionsColumns(array $options): array - { - foreach ($options as $group => $opts) { - $sorted = false; - foreach ($opts as $class => $opt) { - if (\is_string($class)) { - unset($options[$group][$class]); - } - - if (!\is_array($opt) || 0 === \count($opt)) { - continue; - } - - if (!$sorted) { - $options[$group] = []; - } else { - $options[$group][] = null; - } - $options[$group][] = sprintf('%s', (new \ReflectionClass($class))->getShortName()); - $options[$group][] = new TableSeparator(); - - sort($opt); - $sorted = true; - $options[$group] = array_merge($options[$group], $opt); - } - - if (!$sorted) { - sort($options[$group]); - } - } - - return $options; - } - - private function formatClassLink(string $class, string $text = null): string - { - if (null === $text) { - $text = $class; - } - - if ('' === $fileLink = $this->getFileLink($class)) { - return $text; - } - - return sprintf('%s', $fileLink, $text); - } - - private function getFileLink(string $class): string - { - if (null === $this->fileLinkFormatter) { - return ''; - } - - try { - $r = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - } -} diff --git a/vendor/symfony/form/Console/Helper/DescriptorHelper.php b/vendor/symfony/form/Console/Helper/DescriptorHelper.php deleted file mode 100644 index 355fb95..0000000 --- a/vendor/symfony/form/Console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Console\Helper; - -use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; -use Symfony\Component\Form\Console\Descriptor\JsonDescriptor; -use Symfony\Component\Form\Console\Descriptor\TextDescriptor; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class DescriptorHelper extends BaseDescriptorHelper -{ - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this - ->register('txt', new TextDescriptor($fileLinkFormatter)) - ->register('json', new JsonDescriptor()) - ; - } -} diff --git a/vendor/symfony/form/DataAccessorInterface.php b/vendor/symfony/form/DataAccessorInterface.php deleted file mode 100644 index a5b4bc8..0000000 --- a/vendor/symfony/form/DataAccessorInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Writes and reads values to/from an object or array bound to a form. - * - * @author Yonel Ceruto - */ -interface DataAccessorInterface -{ - /** - * Returns the value at the end of the property of the object graph. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - * - * @return mixed - * - * @throws Exception\AccessException If unable to read from the given form data - */ - public function getValue($viewData, FormInterface $form); - - /** - * Sets the value at the end of the property of the object graph. - * - * @param object|array $viewData The view data of the compound form - * @param mixed $value The value to set at the end of the object graph - * @param FormInterface $form The {@link FormInterface()} instance to check - * - * @throws Exception\AccessException If unable to write the given value - */ - public function setValue(&$viewData, $value, FormInterface $form): void; - - /** - * Returns whether a value can be read from an object graph. - * - * Whenever this method returns true, {@link getValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - */ - public function isReadable($viewData, FormInterface $form): bool; - - /** - * Returns whether a value can be written at a given object graph. - * - * Whenever this method returns true, {@link setValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $viewData The view data of the compound form - * @param FormInterface $form The {@link FormInterface()} instance to check - */ - public function isWritable($viewData, FormInterface $form): bool; -} diff --git a/vendor/symfony/form/DataMapperInterface.php b/vendor/symfony/form/DataMapperInterface.php deleted file mode 100644 index c2cd360..0000000 --- a/vendor/symfony/form/DataMapperInterface.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -interface DataMapperInterface -{ - /** - * Maps the view data of a compound form to its children. - * - * The method is responsible for calling {@link FormInterface::setData()} - * on the children of compound forms, defining their underlying model data. - * - * @param mixed $viewData View data of the compound form being initialized - * @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances - * - * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported - */ - public function mapDataToForms($viewData, \Traversable $forms); - - /** - * Maps the model data of a list of children forms into the view data of their parent. - * - * This is the internal cascade call of FormInterface::submit for compound forms, since they - * cannot be bound to any input nor the request as scalar, but their children may: - * - * $compoundForm->submit($arrayOfChildrenViewData) - * // inside: - * $childForm->submit($childViewData); - * // for each entry, do the same and/or reverse transform - * $this->dataMapper->mapFormsToData($compoundForm, $compoundInitialViewData) - * // then reverse transform - * - * When a simple form is submitted the following is happening: - * - * $simpleForm->submit($submittedViewData) - * // inside: - * $this->viewData = $submittedViewData - * // then reverse transform - * - * The model data can be an array or an object, so this second argument is always passed - * by reference. - * - * @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances - * @param mixed $viewData The compound form's view data that get mapped - * its children model data - * - * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported - */ - public function mapFormsToData(\Traversable $forms, &$viewData); -} diff --git a/vendor/symfony/form/DataTransformerInterface.php b/vendor/symfony/form/DataTransformerInterface.php deleted file mode 100644 index 5f48428..0000000 --- a/vendor/symfony/form/DataTransformerInterface.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms a value between different representations. - * - * @author Bernhard Schussek - */ -interface DataTransformerInterface -{ - /** - * Transforms a value from the original representation to a transformed representation. - * - * This method is called when the form field is initialized with its default data, on - * two occasions for two types of transformers: - * - * 1. Model transformers which normalize the model data. - * This is mainly useful when the same form type (the same configuration) - * has to handle different kind of underlying data, e.g The DateType can - * deal with strings or \DateTime objects as input. - * - * 2. View transformers which adapt the normalized data to the view format. - * a/ When the form is simple, the value returned by convention is used - * directly in the view and thus can only be a string or an array. In - * this case the data class should be null. - * - * b/ When the form is compound the returned value should be an array or - * an object to be mapped to the children. Each property of the compound - * data will be used as model data by each child and will be transformed - * too. In this case data class should be the class of the object, or null - * when it is an array. - * - * All transformers are called in a configured order from model data to view value. - * At the end of this chain the view data will be validated against the data class - * setting. - * - * This method must be able to deal with empty values. Usually this will - * be NULL, but depending on your implementation other empty values are - * possible as well (such as empty strings). The reasoning behind this is - * that data transformers must be chainable. If the transform() method - * of the first data transformer outputs NULL, the second must be able to - * process that value. - * - * @param mixed $value The value in the original representation - * - * @return mixed - * - * @throws TransformationFailedException when the transformation fails - */ - public function transform($value); - - /** - * Transforms a value from the transformed representation to its original - * representation. - * - * This method is called when {@link Form::submit()} is called to transform the requests tainted data - * into an acceptable format. - * - * The same transformers are called in the reverse order so the responsibility is to - * return one of the types that would be expected as input of transform(). - * - * This method must be able to deal with empty values. Usually this will - * be an empty string, but depending on your implementation other empty - * values are possible as well (such as NULL). The reasoning behind - * this is that value transformers must be chainable. If the - * reverseTransform() method of the first value transformer outputs an - * empty string, the second value transformer must be able to process that - * value. - * - * By convention, reverseTransform() should return NULL if an empty string - * is passed. - * - * @param mixed $value The value in the transformed representation - * - * @return mixed - * - * @throws TransformationFailedException when the transformation fails - */ - public function reverseTransform($value); -} diff --git a/vendor/symfony/form/DependencyInjection/FormPass.php b/vendor/symfony/form/DependencyInjection/FormPass.php deleted file mode 100644 index 0ba4611..0000000 --- a/vendor/symfony/form/DependencyInjection/FormPass.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds all services with the tags "form.type", "form.type_extension" and - * "form.type_guesser" as arguments of the "form.extension" service. - * - * @author Bernhard Schussek - */ -class FormPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $formExtensionService; - private $formTypeTag; - private $formTypeExtensionTag; - private $formTypeGuesserTag; - private $formDebugCommandService; - - public function __construct(string $formExtensionService = 'form.extension', string $formTypeTag = 'form.type', string $formTypeExtensionTag = 'form.type_extension', string $formTypeGuesserTag = 'form.type_guesser', string $formDebugCommandService = 'console.command.form_debug') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->formExtensionService = $formExtensionService; - $this->formTypeTag = $formTypeTag; - $this->formTypeExtensionTag = $formTypeExtensionTag; - $this->formTypeGuesserTag = $formTypeGuesserTag; - $this->formDebugCommandService = $formDebugCommandService; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->formExtensionService)) { - return; - } - - $definition = $container->getDefinition($this->formExtensionService); - $definition->replaceArgument(0, $this->processFormTypes($container)); - $definition->replaceArgument(1, $this->processFormTypeExtensions($container)); - $definition->replaceArgument(2, $this->processFormTypeGuessers($container)); - } - - private function processFormTypes(ContainerBuilder $container): Reference - { - // Get service locator argument - $servicesMap = []; - $namespaces = ['Symfony\Component\Form\Extension\Core\Type' => true]; - - // Builds an array with fully-qualified type class names as keys and service IDs as values - foreach ($container->findTaggedServiceIds($this->formTypeTag, true) as $serviceId => $tag) { - // Add form type service to the service locator - $serviceDefinition = $container->getDefinition($serviceId); - $servicesMap[$formType = $serviceDefinition->getClass()] = new Reference($serviceId); - $namespaces[substr($formType, 0, strrpos($formType, '\\'))] = true; - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(1, array_keys($namespaces)); - $commandDefinition->setArgument(2, array_keys($servicesMap)); - } - - return ServiceLocatorTagPass::register($container, $servicesMap); - } - - private function processFormTypeExtensions(ContainerBuilder $container): array - { - $typeExtensions = []; - $typeExtensionsClasses = []; - foreach ($this->findAndSortTaggedServices($this->formTypeExtensionTag, $container) as $reference) { - $serviceId = (string) $reference; - $serviceDefinition = $container->getDefinition($serviceId); - - $tag = $serviceDefinition->getTag($this->formTypeExtensionTag); - $typeExtensionClass = $container->getParameterBag()->resolveValue($serviceDefinition->getClass()); - - if (isset($tag[0]['extended_type'])) { - $typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId); - $typeExtensionsClasses[] = $typeExtensionClass; - } else { - $extendsTypes = false; - - $typeExtensionsClasses[] = $typeExtensionClass; - foreach ($typeExtensionClass::getExtendedTypes() as $extendedType) { - $typeExtensions[$extendedType][] = new Reference($serviceId); - $extendsTypes = true; - } - - if (!$extendsTypes) { - throw new InvalidArgumentException(sprintf('The getExtendedTypes() method for service "%s" does not return any extended types.', $serviceId)); - } - } - } - - foreach ($typeExtensions as $extendedType => $extensions) { - $typeExtensions[$extendedType] = new IteratorArgument($extensions); - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(3, $typeExtensionsClasses); - } - - return $typeExtensions; - } - - private function processFormTypeGuessers(ContainerBuilder $container): ArgumentInterface - { - $guessers = []; - $guessersClasses = []; - foreach ($container->findTaggedServiceIds($this->formTypeGuesserTag, true) as $serviceId => $tags) { - $guessers[] = new Reference($serviceId); - - $serviceDefinition = $container->getDefinition($serviceId); - $guessersClasses[] = $serviceDefinition->getClass(); - } - - if ($container->hasDefinition($this->formDebugCommandService)) { - $commandDefinition = $container->getDefinition($this->formDebugCommandService); - $commandDefinition->setArgument(4, $guessersClasses); - } - - return new IteratorArgument($guessers); - } -} diff --git a/vendor/symfony/form/Event/PostSetDataEvent.php b/vendor/symfony/form/Event/PostSetDataEvent.php deleted file mode 100644 index eef5374..0000000 --- a/vendor/symfony/form/Event/PostSetDataEvent.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the end of the Form::setData() method. - * - * This event is mostly here for reading data after having pre-populated the form. - */ -final class PostSetDataEvent extends FormEvent -{ -} diff --git a/vendor/symfony/form/Event/PostSubmitEvent.php b/vendor/symfony/form/Event/PostSubmitEvent.php deleted file mode 100644 index aa3775f..0000000 --- a/vendor/symfony/form/Event/PostSubmitEvent.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched after the Form::submit() - * once the model and view data have been denormalized. - * - * It can be used to fetch data after denormalization. - */ -final class PostSubmitEvent extends FormEvent -{ -} diff --git a/vendor/symfony/form/Event/PreSetDataEvent.php b/vendor/symfony/form/Event/PreSetDataEvent.php deleted file mode 100644 index 5450400..0000000 --- a/vendor/symfony/form/Event/PreSetDataEvent.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the beginning of the Form::setData() method. - * - * It can be used to: - * - Modify the data given during pre-population; - * - Modify a form depending on the pre-populated data (adding or removing fields dynamically). - */ -final class PreSetDataEvent extends FormEvent -{ -} diff --git a/vendor/symfony/form/Event/PreSubmitEvent.php b/vendor/symfony/form/Event/PreSubmitEvent.php deleted file mode 100644 index a72ac5d..0000000 --- a/vendor/symfony/form/Event/PreSubmitEvent.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched at the beginning of the Form::submit() method. - * - * It can be used to: - * - Change data from the request, before submitting the data to the form. - * - Add or remove form fields, before submitting the data to the form. - */ -final class PreSubmitEvent extends FormEvent -{ -} diff --git a/vendor/symfony/form/Event/SubmitEvent.php b/vendor/symfony/form/Event/SubmitEvent.php deleted file mode 100644 index 71d3b06..0000000 --- a/vendor/symfony/form/Event/SubmitEvent.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Event; - -use Symfony\Component\Form\FormEvent; - -/** - * This event is dispatched just before the Form::submit() method - * transforms back the normalized data to the model and view data. - * - * It can be used to change data from the normalized representation of the data. - */ -final class SubmitEvent extends FormEvent -{ -} diff --git a/vendor/symfony/form/Exception/AccessException.php b/vendor/symfony/form/Exception/AccessException.php deleted file mode 100644 index ac712cc..0000000 --- a/vendor/symfony/form/Exception/AccessException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class AccessException extends RuntimeException -{ -} diff --git a/vendor/symfony/form/Exception/AlreadySubmittedException.php b/vendor/symfony/form/Exception/AlreadySubmittedException.php deleted file mode 100644 index 5e8c305..0000000 --- a/vendor/symfony/form/Exception/AlreadySubmittedException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Thrown when an operation is called that is not acceptable after submitting - * a form. - * - * @author Bernhard Schussek - */ -class AlreadySubmittedException extends LogicException -{ -} diff --git a/vendor/symfony/form/Exception/BadMethodCallException.php b/vendor/symfony/form/Exception/BadMethodCallException.php deleted file mode 100644 index 27649dd..0000000 --- a/vendor/symfony/form/Exception/BadMethodCallException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base BadMethodCallException for the Form component. - * - * @author Bernhard Schussek - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/form/Exception/ErrorMappingException.php b/vendor/symfony/form/Exception/ErrorMappingException.php deleted file mode 100644 index a696849..0000000 --- a/vendor/symfony/form/Exception/ErrorMappingException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class ErrorMappingException extends RuntimeException -{ -} diff --git a/vendor/symfony/form/Exception/ExceptionInterface.php b/vendor/symfony/form/Exception/ExceptionInterface.php deleted file mode 100644 index 69145f0..0000000 --- a/vendor/symfony/form/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base ExceptionInterface for the Form component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/form/Exception/InvalidArgumentException.php b/vendor/symfony/form/Exception/InvalidArgumentException.php deleted file mode 100644 index a270e0c..0000000 --- a/vendor/symfony/form/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base InvalidArgumentException for the Form component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/form/Exception/InvalidConfigurationException.php b/vendor/symfony/form/Exception/InvalidConfigurationException.php deleted file mode 100644 index daa0c42..0000000 --- a/vendor/symfony/form/Exception/InvalidConfigurationException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class InvalidConfigurationException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/form/Exception/LogicException.php b/vendor/symfony/form/Exception/LogicException.php deleted file mode 100644 index 8487802..0000000 --- a/vendor/symfony/form/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base LogicException for Form component. - * - * @author Alexander Kotynia - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/form/Exception/OutOfBoundsException.php b/vendor/symfony/form/Exception/OutOfBoundsException.php deleted file mode 100644 index 44d3116..0000000 --- a/vendor/symfony/form/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base OutOfBoundsException for Form component. - * - * @author Alexander Kotynia - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/form/Exception/RuntimeException.php b/vendor/symfony/form/Exception/RuntimeException.php deleted file mode 100644 index 0af48a4..0000000 --- a/vendor/symfony/form/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Base RuntimeException for the Form component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/form/Exception/StringCastException.php b/vendor/symfony/form/Exception/StringCastException.php deleted file mode 100644 index f9b51d6..0000000 --- a/vendor/symfony/form/Exception/StringCastException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class StringCastException extends RuntimeException -{ -} diff --git a/vendor/symfony/form/Exception/TransformationFailedException.php b/vendor/symfony/form/Exception/TransformationFailedException.php deleted file mode 100644 index 89eba08..0000000 --- a/vendor/symfony/form/Exception/TransformationFailedException.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -/** - * Indicates a value transformation error. - * - * @author Bernhard Schussek - */ -class TransformationFailedException extends RuntimeException -{ - private $invalidMessage; - private $invalidMessageParameters; - - public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, string $invalidMessage = null, array $invalidMessageParameters = []) - { - parent::__construct($message, $code, $previous); - - $this->setInvalidMessage($invalidMessage, $invalidMessageParameters); - } - - /** - * Sets the message that will be shown to the user. - * - * @param string|null $invalidMessage The message or message key - * @param array $invalidMessageParameters Data to be passed into the translator - */ - public function setInvalidMessage(string $invalidMessage = null, array $invalidMessageParameters = []): void - { - $this->invalidMessage = $invalidMessage; - $this->invalidMessageParameters = $invalidMessageParameters; - } - - public function getInvalidMessage(): ?string - { - return $this->invalidMessage; - } - - public function getInvalidMessageParameters(): array - { - return $this->invalidMessageParameters; - } -} diff --git a/vendor/symfony/form/Exception/UnexpectedTypeException.php b/vendor/symfony/form/Exception/UnexpectedTypeException.php deleted file mode 100644 index d25d470..0000000 --- a/vendor/symfony/form/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Exception; - -class UnexpectedTypeException extends InvalidArgumentException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, get_debug_type($value))); - } -} diff --git a/vendor/symfony/form/Extension/Core/CoreExtension.php b/vendor/symfony/form/Extension/Core/CoreExtension.php deleted file mode 100644 index c6768b8..0000000 --- a/vendor/symfony/form/Extension/Core/CoreExtension.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Represents the main form extension, which loads the core functionality. - * - * @author Bernhard Schussek - */ -class CoreExtension extends AbstractExtension -{ - private $propertyAccessor; - private $choiceListFactory; - private $translator; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null, TranslatorInterface $translator = null) - { - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - $this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor)); - $this->translator = $translator; - } - - protected function loadTypes() - { - return [ - new Type\FormType($this->propertyAccessor), - new Type\BirthdayType(), - new Type\CheckboxType(), - new Type\ChoiceType($this->choiceListFactory, $this->translator), - new Type\CollectionType(), - new Type\CountryType(), - new Type\DateIntervalType(), - new Type\DateType(), - new Type\DateTimeType(), - new Type\EmailType(), - new Type\HiddenType(), - new Type\IntegerType(), - new Type\LanguageType(), - new Type\LocaleType(), - new Type\MoneyType(), - new Type\NumberType(), - new Type\PasswordType(), - new Type\PercentType(), - new Type\RadioType(), - new Type\RangeType(), - new Type\RepeatedType(), - new Type\SearchType(), - new Type\TextareaType(), - new Type\TextType(), - new Type\TimeType(), - new Type\TimezoneType(), - new Type\UrlType(), - new Type\FileType($this->translator), - new Type\ButtonType(), - new Type\SubmitType(), - new Type\ResetType(), - new Type\CurrencyType(), - new Type\TelType(), - new Type\ColorType($this->translator), - new Type\WeekType(), - ]; - } - - protected function loadTypeExtensions() - { - return [ - new TransformationFailureExtension($this->translator), - ]; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php b/vendor/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php deleted file mode 100644 index fb12145..0000000 --- a/vendor/symfony/form/Extension/Core/DataAccessor/CallbackAccessor.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; - -/** - * Writes and reads values to/from an object or array using callback functions. - * - * @author Yonel Ceruto - */ -class CallbackAccessor implements DataAccessorInterface -{ - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - if (null === $getter = $form->getConfig()->getOption('getter')) { - throw new AccessException('Unable to read from the given form data as no getter is defined.'); - } - - return ($getter)($data, $form); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $value, FormInterface $form): void - { - if (null === $setter = $form->getConfig()->getOption('setter')) { - throw new AccessException('Unable to write the given value as no setter is defined.'); - } - - ($setter)($data, $form->getData(), $form); - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - return null !== $form->getConfig()->getOption('getter'); - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - return null !== $form->getConfig()->getOption('setter'); - } -} diff --git a/vendor/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php b/vendor/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php deleted file mode 100644 index 39e444b..0000000 --- a/vendor/symfony/form/Extension/Core/DataAccessor/ChainAccessor.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; - -/** - * @author Yonel Ceruto - */ -class ChainAccessor implements DataAccessorInterface -{ - private $accessors; - - /** - * @param DataAccessorInterface[]|iterable $accessors - */ - public function __construct(iterable $accessors) - { - $this->accessors = $accessors; - } - - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - foreach ($this->accessors as $accessor) { - if ($accessor->isReadable($data, $form)) { - return $accessor->getValue($data, $form); - } - } - - throw new AccessException('Unable to read from the given form data as no accessor in the chain is able to read the data.'); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $value, FormInterface $form): void - { - foreach ($this->accessors as $accessor) { - if ($accessor->isWritable($data, $form)) { - $accessor->setValue($data, $value, $form); - - return; - } - } - - throw new AccessException('Unable to write the given value as no accessor in the chain is able to set the data.'); - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - foreach ($this->accessors as $accessor) { - if ($accessor->isReadable($data, $form)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - foreach ($this->accessors as $accessor) { - if ($accessor->isWritable($data, $form)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php b/vendor/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php deleted file mode 100644 index 06b0d36..0000000 --- a/vendor/symfony/form/Extension/Core/DataAccessor/PropertyPathAccessor.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataAccessor; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\Exception\AccessException; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\PropertyAccess\Exception\AccessException as PropertyAccessException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Writes and reads values to/from an object or array using property path. - * - * @author Yonel Ceruto - * @author Bernhard Schussek - */ -class PropertyPathAccessor implements DataAccessorInterface -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor(); - } - - /** - * {@inheritdoc} - */ - public function getValue($data, FormInterface $form) - { - if (null === $propertyPath = $form->getPropertyPath()) { - throw new AccessException('Unable to read from the given form data as no property path is defined.'); - } - - return $this->getPropertyValue($data, $propertyPath); - } - - /** - * {@inheritdoc} - */ - public function setValue(&$data, $propertyValue, FormInterface $form): void - { - if (null === $propertyPath = $form->getPropertyPath()) { - throw new AccessException('Unable to write the given value as no property path is defined.'); - } - - // If the field is of type DateTimeInterface and the data is the same skip the update to - // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { - return; - } - - // If the data is identical to the value in $data, we are - // dealing with a reference - if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { - $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); - } - } - - /** - * {@inheritdoc} - */ - public function isReadable($data, FormInterface $form): bool - { - return null !== $form->getPropertyPath(); - } - - /** - * {@inheritdoc} - */ - public function isWritable($data, FormInterface $form): bool - { - return null !== $form->getPropertyPath(); - } - - private function getPropertyValue($data, PropertyPathInterface $propertyPath) - { - try { - return $this->propertyAccessor->getValue($data, $propertyPath); - } catch (PropertyAccessException $e) { - if (!$e instanceof UninitializedPropertyException - // For versions without UninitializedPropertyException check the exception message - && (class_exists(UninitializedPropertyException::class) || false === strpos($e->getMessage(), 'You should initialize it')) - ) { - throw $e; - } - - return null; - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php b/vendor/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php deleted file mode 100644 index ecfd83a..0000000 --- a/vendor/symfony/form/Extension/Core/DataMapper/CheckboxListMapper.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Maps choices to/from checkbox forms. - * - * A {@link ChoiceListInterface} implementation is used to find the - * corresponding string values for the choices. Each checkbox form whose "value" - * option corresponds to any of the selected values is marked as selected. - * - * @author Bernhard Schussek - */ -class CheckboxListMapper implements DataMapperInterface -{ - /** - * {@inheritdoc} - */ - public function mapDataToForms($choices, iterable $checkboxes) - { - if (\is_array($checkboxes)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null === $choices) { - $choices = []; - } - - if (!\is_array($choices)) { - throw new UnexpectedTypeException($choices, 'array'); - } - - foreach ($checkboxes as $checkbox) { - $value = $checkbox->getConfig()->getOption('value'); - $checkbox->setData(\in_array($value, $choices, true)); - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $checkboxes, &$choices) - { - if (\is_array($checkboxes)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (!\is_array($choices)) { - throw new UnexpectedTypeException($choices, 'array'); - } - - $values = []; - - foreach ($checkboxes as $checkbox) { - if ($checkbox->getData()) { - // construct an array of choice values - $values[] = $checkbox->getConfig()->getOption('value'); - } - } - - $choices = $values; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataMapper/DataMapper.php b/vendor/symfony/form/Extension/Core/DataMapper/DataMapper.php deleted file mode 100644 index 5f4c498..0000000 --- a/vendor/symfony/form/Extension/Core/DataMapper/DataMapper.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataAccessorInterface; -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\DataAccessor\CallbackAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; - -/** - * Maps arrays/objects to/from forms using data accessors. - * - * @author Bernhard Schussek - */ -class DataMapper implements DataMapperInterface -{ - private $dataAccessor; - - public function __construct(DataAccessorInterface $dataAccessor = null) - { - $this->dataAccessor = $dataAccessor ?? new ChainAccessor([ - new CallbackAccessor(), - new PropertyPathAccessor(), - ]); - } - - /** - * {@inheritdoc} - */ - public function mapDataToForms($data, iterable $forms): void - { - if (\is_array($forms)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - $empty = null === $data || [] === $data; - - if (!$empty && !\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $config = $form->getConfig(); - - if (!$empty && $config->getMapped() && $this->dataAccessor->isReadable($data, $form)) { - $form->setData($this->dataAccessor->getValue($data, $form)); - } else { - $form->setData($config->getData()); - } - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $forms, &$data): void - { - if (\is_array($forms)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null === $data) { - return; - } - - if (!\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $config = $form->getConfig(); - - // Write-back is disabled if the form is not synchronized (transformation failed), - // if the form was not submitted and if the form is disabled (modification not allowed) - if ($config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled() && $this->dataAccessor->isWritable($data, $form)) { - $this->dataAccessor->setValue($data, $form->getData(), $form); - } - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php b/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php deleted file mode 100644 index 504dbe4..0000000 --- a/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; - -trigger_deprecation('symfony/form', '5.2', 'The "%s" class is deprecated. Use "%s" instead.', PropertyPathMapper::class, DataMapper::class); - -/** - * Maps arrays/objects to/from forms using property paths. - * - * @author Bernhard Schussek - * - * @deprecated since symfony/form 5.2. Use {@see DataMapper} instead. - */ -class PropertyPathMapper implements DataMapperInterface -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - /** - * {@inheritdoc} - */ - public function mapDataToForms($data, iterable $forms) - { - $empty = null === $data || [] === $data; - - if (!$empty && !\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $propertyPath = $form->getPropertyPath(); - $config = $form->getConfig(); - - if (!$empty && null !== $propertyPath && $config->getMapped()) { - $form->setData($this->getPropertyValue($data, $propertyPath)); - } else { - $form->setData($config->getData()); - } - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $forms, &$data) - { - if (null === $data) { - return; - } - - if (!\is_array($data) && !\is_object($data)) { - throw new UnexpectedTypeException($data, 'object, array or empty'); - } - - foreach ($forms as $form) { - $propertyPath = $form->getPropertyPath(); - $config = $form->getConfig(); - - // Write-back is disabled if the form is not synchronized (transformation failed), - // if the form was not submitted and if the form is disabled (modification not allowed) - if (null !== $propertyPath && $config->getMapped() && $form->isSubmitted() && $form->isSynchronized() && !$form->isDisabled()) { - $propertyValue = $form->getData(); - // If the field is of type DateTimeInterface and the data is the same skip the update to - // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { - continue; - } - - // If the data is identical to the value in $data, we are - // dealing with a reference - if (!\is_object($data) || !$config->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { - $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); - } - } - } - } - - private function getPropertyValue($data, $propertyPath) - { - try { - return $this->propertyAccessor->getValue($data, $propertyPath); - } catch (AccessException $e) { - if (!$e instanceof UninitializedPropertyException - // For versions without UninitializedPropertyException check the exception message - && (class_exists(UninitializedPropertyException::class) || !str_contains($e->getMessage(), 'You should initialize it')) - ) { - throw $e; - } - - return null; - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php b/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php deleted file mode 100644 index b54adfa..0000000 --- a/vendor/symfony/form/Extension/Core/DataMapper/RadioListMapper.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataMapper; - -use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Maps choices to/from radio forms. - * - * A {@link ChoiceListInterface} implementation is used to find the - * corresponding string values for the choices. The radio form whose "value" - * option corresponds to the selected value is marked as selected. - * - * @author Bernhard Schussek - */ -class RadioListMapper implements DataMapperInterface -{ - /** - * {@inheritdoc} - */ - public function mapDataToForms($choice, iterable $radios) - { - if (\is_array($radios)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the second argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (!\is_string($choice)) { - throw new UnexpectedTypeException($choice, 'string'); - } - - foreach ($radios as $radio) { - $value = $radio->getConfig()->getOption('value'); - $radio->setData($choice === $value); - } - } - - /** - * {@inheritdoc} - */ - public function mapFormsToData(iterable $radios, &$choice) - { - if (\is_array($radios)) { - trigger_deprecation('symfony/form', '5.3', 'Passing an array as the first argument of the "%s()" method is deprecated, pass "\Traversable" instead.', __METHOD__); - } - - if (null !== $choice && !\is_string($choice)) { - throw new UnexpectedTypeException($choice, 'null or string'); - } - - $choice = null; - - foreach ($radios as $radio) { - if ($radio->getData()) { - if ('placeholder' === $radio->getName()) { - return; - } - - $choice = $radio->getConfig()->getOption('value'); - - return; - } - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php deleted file mode 100644 index f799209..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ArrayToPartsTransformer implements DataTransformerInterface -{ - private $partMapping; - - public function __construct(array $partMapping) - { - $this->partMapping = $partMapping; - } - - public function transform($array) - { - if (null === $array) { - $array = []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = []; - - foreach ($this->partMapping as $partKey => $originalKeys) { - if (empty($array)) { - $result[$partKey] = null; - } else { - $result[$partKey] = array_intersect_key($array, array_flip($originalKeys)); - } - } - - return $result; - } - - public function reverseTransform($array) - { - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = []; - $emptyKeys = []; - - foreach ($this->partMapping as $partKey => $originalKeys) { - if (!empty($array[$partKey])) { - foreach ($originalKeys as $originalKey) { - if (isset($array[$partKey][$originalKey])) { - $result[$originalKey] = $array[$partKey][$originalKey]; - } - } - } else { - $emptyKeys[] = $partKey; - } - } - - if (\count($emptyKeys) > 0) { - if (\count($emptyKeys) === \count($this->partMapping)) { - // All parts empty - return null; - } - - throw new TransformationFailedException(sprintf('The keys "%s" should not be empty.', implode('", "', $emptyKeys))); - } - - return $result; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php deleted file mode 100644 index 142f489..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/BaseDateTimeTransformer.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; - -abstract class BaseDateTimeTransformer implements DataTransformerInterface -{ - protected static $formats = [ - \IntlDateFormatter::NONE, - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - protected $inputTimezone; - - protected $outputTimezone; - - /** - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * - * @throws InvalidArgumentException if a timezone is not valid - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null) - { - $this->inputTimezone = $inputTimezone ?: date_default_timezone_get(); - $this->outputTimezone = $outputTimezone ?: date_default_timezone_get(); - - // Check if input and output timezones are valid - try { - new \DateTimeZone($this->inputTimezone); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Input timezone is invalid: "%s".', $this->inputTimezone), $e->getCode(), $e); - } - - try { - new \DateTimeZone($this->outputTimezone); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Output timezone is invalid: "%s".', $this->outputTimezone), $e->getCode(), $e); - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php deleted file mode 100644 index b2d5745..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/BooleanToStringTransformer.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a Boolean and a string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class BooleanToStringTransformer implements DataTransformerInterface -{ - private $trueValue; - - private $falseValues; - - /** - * @param string $trueValue The value emitted upon transform if the input is true - */ - public function __construct(string $trueValue, array $falseValues = [null]) - { - $this->trueValue = $trueValue; - $this->falseValues = $falseValues; - if (\in_array($this->trueValue, $this->falseValues, true)) { - throw new InvalidArgumentException('The specified "true" value is contained in the false-values.'); - } - } - - /** - * Transforms a Boolean into a string. - * - * @param bool $value Boolean value - * - * @return string|null - * - * @throws TransformationFailedException if the given value is not a Boolean - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!\is_bool($value)) { - throw new TransformationFailedException('Expected a Boolean.'); - } - - return $value ? $this->trueValue : null; - } - - /** - * Transforms a string into a Boolean. - * - * @param string $value String value - * - * @return bool - * - * @throws TransformationFailedException if the given value is not a string - */ - public function reverseTransform($value) - { - if (\in_array($value, $this->falseValues, true)) { - return false; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - return true; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php deleted file mode 100644 index e1feafe..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ChoiceToValueTransformer implements DataTransformerInterface -{ - private $choiceList; - - public function __construct(ChoiceListInterface $choiceList) - { - $this->choiceList = $choiceList; - } - - public function transform($choice) - { - return (string) current($this->choiceList->getValuesForChoices([$choice])); - } - - public function reverseTransform($value) - { - if (null !== $value && !\is_string($value)) { - throw new TransformationFailedException('Expected a string or null.'); - } - - $choices = $this->choiceList->getChoicesForValues([(string) $value]); - - if (1 !== \count($choices)) { - if (null === $value || '' === $value) { - return null; - } - - throw new TransformationFailedException(sprintf('The choice "%s" does not exist or is not unique.', $value)); - } - - return current($choices); - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php deleted file mode 100644 index 6c9e4fe..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ChoicesToValuesTransformer implements DataTransformerInterface -{ - private $choiceList; - - public function __construct(ChoiceListInterface $choiceList) - { - $this->choiceList = $choiceList; - } - - /** - * @return array - * - * @throws TransformationFailedException if the given value is not an array - */ - public function transform($array) - { - if (null === $array) { - return []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - return $this->choiceList->getValuesForChoices($array); - } - - /** - * @return array - * - * @throws TransformationFailedException if the given value is not an array - * or if no matching choice could be - * found for some given value - */ - public function reverseTransform($array) - { - if (null === $array) { - return []; - } - - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $choices = $this->choiceList->getChoicesForValues($array); - - if (\count($choices) !== \count($array)) { - throw new TransformationFailedException('Could not find all matching choices for the given values.'); - } - - return $choices; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php b/vendor/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php deleted file mode 100644 index e3107a8..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DataTransformerChain.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Passes a value through multiple value transformers. - * - * @author Bernhard Schussek - */ -class DataTransformerChain implements DataTransformerInterface -{ - protected $transformers; - - /** - * Uses the given value transformers to transform values. - * - * @param DataTransformerInterface[] $transformers - */ - public function __construct(array $transformers) - { - $this->transformers = $transformers; - } - - /** - * Passes the value through the transform() method of all nested transformers. - * - * The transformers receive the value in the same order as they were passed - * to the constructor. Each transformer receives the result of the previous - * transformer as input. The output of the last transformer is returned - * by this method. - * - * @param mixed $value The original value - * - * @return mixed - * - * @throws TransformationFailedException - */ - public function transform($value) - { - foreach ($this->transformers as $transformer) { - $value = $transformer->transform($value); - } - - return $value; - } - - /** - * Passes the value through the reverseTransform() method of all nested - * transformers. - * - * The transformers receive the value in the reverse order as they were passed - * to the constructor. Each transformer receives the result of the previous - * transformer as input. The output of the last transformer is returned - * by this method. - * - * @param mixed $value The transformed value - * - * @return mixed - * - * @throws TransformationFailedException - */ - public function reverseTransform($value) - { - for ($i = \count($this->transformers) - 1; $i >= 0; --$i) { - $value = $this->transformers[$i]->reverseTransform($value); - } - - return $value; - } - - /** - * @return DataTransformerInterface[] - */ - public function getTransformers() - { - return $this->transformers; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php deleted file mode 100644 index 5a37d4c..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToArrayTransformer.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized date interval and an interval string/array. - * - * @author Steffen Roßkamp - */ -class DateIntervalToArrayTransformer implements DataTransformerInterface -{ - public const YEARS = 'years'; - public const MONTHS = 'months'; - public const DAYS = 'days'; - public const HOURS = 'hours'; - public const MINUTES = 'minutes'; - public const SECONDS = 'seconds'; - public const INVERT = 'invert'; - - private const AVAILABLE_FIELDS = [ - self::YEARS => 'y', - self::MONTHS => 'm', - self::DAYS => 'd', - self::HOURS => 'h', - self::MINUTES => 'i', - self::SECONDS => 's', - self::INVERT => 'r', - ]; - private $fields; - private $pad; - - /** - * @param string[]|null $fields The date fields - * @param bool $pad Whether to use padding - */ - public function __construct(array $fields = null, bool $pad = false) - { - $this->fields = $fields ?? ['years', 'months', 'days', 'hours', 'minutes', 'seconds', 'invert']; - $this->pad = $pad; - } - - /** - * Transforms a normalized date interval into an interval array. - * - * @param \DateInterval $dateInterval Normalized date interval - * - * @return array - * - * @throws UnexpectedTypeException if the given value is not a \DateInterval instance - */ - public function transform($dateInterval) - { - if (null === $dateInterval) { - return array_intersect_key( - [ - 'years' => '', - 'months' => '', - 'weeks' => '', - 'days' => '', - 'hours' => '', - 'minutes' => '', - 'seconds' => '', - 'invert' => false, - ], - array_flip($this->fields) - ); - } - if (!$dateInterval instanceof \DateInterval) { - throw new UnexpectedTypeException($dateInterval, \DateInterval::class); - } - $result = []; - foreach (self::AVAILABLE_FIELDS as $field => $char) { - $result[$field] = $dateInterval->format('%'.($this->pad ? strtoupper($char) : $char)); - } - if (\in_array('weeks', $this->fields, true)) { - $result['weeks'] = '0'; - if (isset($result['days']) && (int) $result['days'] >= 7) { - $result['weeks'] = (string) floor($result['days'] / 7); - $result['days'] = (string) ($result['days'] % 7); - } - } - $result['invert'] = '-' === $result['invert']; - $result = array_intersect_key($result, array_flip($this->fields)); - - return $result; - } - - /** - * Transforms an interval array into a normalized date interval. - * - * @param array $value Interval array - * - * @return \DateInterval|null - * - * @throws UnexpectedTypeException if the given value is not an array - * @throws TransformationFailedException if the value could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - if (!\is_array($value)) { - throw new UnexpectedTypeException($value, 'array'); - } - if ('' === implode('', $value)) { - return null; - } - $emptyFields = []; - foreach ($this->fields as $field) { - if (!isset($value[$field])) { - $emptyFields[] = $field; - } - } - if (\count($emptyFields) > 0) { - throw new TransformationFailedException(sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields))); - } - if (isset($value['invert']) && !\is_bool($value['invert'])) { - throw new TransformationFailedException('The value of "invert" must be boolean.'); - } - foreach (self::AVAILABLE_FIELDS as $field => $char) { - if ('invert' !== $field && isset($value[$field]) && !ctype_digit((string) $value[$field])) { - throw new TransformationFailedException(sprintf('This amount of "%s" is invalid.', $field)); - } - } - try { - if (!empty($value['weeks'])) { - $interval = sprintf( - 'P%sY%sM%sWT%sH%sM%sS', - empty($value['years']) ? '0' : $value['years'], - empty($value['months']) ? '0' : $value['months'], - empty($value['weeks']) ? '0' : $value['weeks'], - empty($value['hours']) ? '0' : $value['hours'], - empty($value['minutes']) ? '0' : $value['minutes'], - empty($value['seconds']) ? '0' : $value['seconds'] - ); - } else { - $interval = sprintf( - 'P%sY%sM%sDT%sH%sM%sS', - empty($value['years']) ? '0' : $value['years'], - empty($value['months']) ? '0' : $value['months'], - empty($value['days']) ? '0' : $value['days'], - empty($value['hours']) ? '0' : $value['hours'], - empty($value['minutes']) ? '0' : $value['minutes'], - empty($value['seconds']) ? '0' : $value['seconds'] - ); - } - $dateInterval = new \DateInterval($interval); - if (isset($value['invert'])) { - $dateInterval->invert = $value['invert'] ? 1 : 0; - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateInterval; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php deleted file mode 100644 index 723c344..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a date string and a DateInterval object. - * - * @author Steffen Roßkamp - */ -class DateIntervalToStringTransformer implements DataTransformerInterface -{ - private $format; - - /** - * Transforms a \DateInterval instance to a string. - * - * @see \DateInterval::format() for supported formats - * - * @param string $format The date format - */ - public function __construct(string $format = 'P%yY%mM%dDT%hH%iM%sS') - { - $this->format = $format; - } - - /** - * Transforms a DateInterval object into a date string with the configured format. - * - * @param \DateInterval|null $value A DateInterval object - * - * @return string - * - * @throws UnexpectedTypeException if the given value is not a \DateInterval instance - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - if (!$value instanceof \DateInterval) { - throw new UnexpectedTypeException($value, \DateInterval::class); - } - - return $value->format($this->format); - } - - /** - * Transforms a date string in the configured format into a DateInterval object. - * - * @param string $value An ISO 8601 or date string like date interval presentation - * - * @return \DateInterval|null - * - * @throws UnexpectedTypeException if the given value is not a string - * @throws TransformationFailedException if the date interval could not be parsed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - if (!\is_string($value)) { - throw new UnexpectedTypeException($value, 'string'); - } - if ('' === $value) { - return null; - } - if (!$this->isISO8601($value)) { - throw new TransformationFailedException('Non ISO 8601 date strings are not supported yet.'); - } - $valuePattern = '/^'.preg_replace('/%([yYmMdDhHiIsSwW])(\w)/', '(?P<$1>\d+)$2', $this->format).'$/'; - if (!preg_match($valuePattern, $value)) { - throw new TransformationFailedException(sprintf('Value "%s" contains intervals not accepted by format "%s".', $value, $this->format)); - } - try { - $dateInterval = new \DateInterval($value); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateInterval; - } - - private function isISO8601(string $string): bool - { - return preg_match('/^P(?=\w*(?:\d|%\w))(?:\d+Y|%[yY]Y)?(?:\d+M|%[mM]M)?(?:(?:\d+D|%[dD]D)|(?:\d+W|%[wW]W))?(?:T(?:\d+H|[hH]H)?(?:\d+M|[iI]M)?(?:\d+S|[sS]S)?)?$/', $string); - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php deleted file mode 100644 index 6eb40af..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformer.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a DateTimeImmutable object and a DateTime object. - * - * @author Valentin Udaltsov - */ -final class DateTimeImmutableToDateTimeTransformer implements DataTransformerInterface -{ - /** - * Transforms a DateTimeImmutable into a DateTime object. - * - * @param \DateTimeImmutable|null $value A DateTimeImmutable object - * - * @throws TransformationFailedException If the given value is not a \DateTimeImmutable - */ - public function transform($value): ?\DateTime - { - if (null === $value) { - return null; - } - - if (!$value instanceof \DateTimeImmutable) { - throw new TransformationFailedException('Expected a \DateTimeImmutable.'); - } - - if (\PHP_VERSION_ID >= 70300) { - return \DateTime::createFromImmutable($value); - } - - return \DateTime::createFromFormat('U.u', $value->format('U.u'))->setTimezone($value->getTimezone()); - } - - /** - * Transforms a DateTime object into a DateTimeImmutable object. - * - * @param \DateTime|null $value A DateTime object - * - * @throws TransformationFailedException If the given value is not a \DateTime - */ - public function reverseTransform($value): ?\DateTimeImmutable - { - if (null === $value) { - return null; - } - - if (!$value instanceof \DateTime) { - throw new TransformationFailedException('Expected a \DateTime.'); - } - - return \DateTimeImmutable::createFromMutable($value); - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php deleted file mode 100644 index ac225d6..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a normalized time and a localized time string/array. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToArrayTransformer extends BaseDateTimeTransformer -{ - private $pad; - private $fields; - private $referenceDate; - - /** - * @param string|null $inputTimezone The input timezone - * @param string|null $outputTimezone The output timezone - * @param string[]|null $fields The date fields - * @param bool $pad Whether to use padding - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, array $fields = null, bool $pad = false, \DateTimeInterface $referenceDate = null) - { - parent::__construct($inputTimezone, $outputTimezone); - - $this->fields = $fields ?? ['year', 'month', 'day', 'hour', 'minute', 'second']; - $this->pad = $pad; - $this->referenceDate = $referenceDate ?? new \DateTimeImmutable('1970-01-01 00:00:00'); - } - - /** - * Transforms a normalized date into a localized date. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return array - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return array_intersect_key([ - 'year' => '', - 'month' => '', - 'day' => '', - 'hour' => '', - 'minute' => '', - 'second' => '', - ], array_flip($this->fields)); - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - $result = array_intersect_key([ - 'year' => $dateTime->format('Y'), - 'month' => $dateTime->format('m'), - 'day' => $dateTime->format('d'), - 'hour' => $dateTime->format('H'), - 'minute' => $dateTime->format('i'), - 'second' => $dateTime->format('s'), - ], array_flip($this->fields)); - - if (!$this->pad) { - foreach ($result as &$entry) { - // remove leading zeros - $entry = (string) (int) $entry; - } - // unset reference to keep scope clear - unset($entry); - } - - return $result; - } - - /** - * Transforms a localized date into a normalized date. - * - * @param array $value Localized date - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not an array, - * if the value could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array.'); - } - - if ('' === implode('', $value)) { - return null; - } - - $emptyFields = []; - - foreach ($this->fields as $field) { - if (!isset($value[$field])) { - $emptyFields[] = $field; - } - } - - if (\count($emptyFields) > 0) { - throw new TransformationFailedException(sprintf('The fields "%s" should not be empty.', implode('", "', $emptyFields))); - } - - if (isset($value['month']) && !ctype_digit((string) $value['month'])) { - throw new TransformationFailedException('This month is invalid.'); - } - - if (isset($value['day']) && !ctype_digit((string) $value['day'])) { - throw new TransformationFailedException('This day is invalid.'); - } - - if (isset($value['year']) && !ctype_digit((string) $value['year'])) { - throw new TransformationFailedException('This year is invalid.'); - } - - if (!empty($value['month']) && !empty($value['day']) && !empty($value['year']) && false === checkdate($value['month'], $value['day'], $value['year'])) { - throw new TransformationFailedException('This is an invalid date.'); - } - - if (isset($value['hour']) && !ctype_digit((string) $value['hour'])) { - throw new TransformationFailedException('This hour is invalid.'); - } - - if (isset($value['minute']) && !ctype_digit((string) $value['minute'])) { - throw new TransformationFailedException('This minute is invalid.'); - } - - if (isset($value['second']) && !ctype_digit((string) $value['second'])) { - throw new TransformationFailedException('This second is invalid.'); - } - - try { - $dateTime = new \DateTime(sprintf( - '%s-%s-%s %s:%s:%s', - empty($value['year']) ? $this->referenceDate->format('Y') : $value['year'], - empty($value['month']) ? $this->referenceDate->format('m') : $value['month'], - empty($value['day']) ? $this->referenceDate->format('d') : $value['day'], - $value['hour'] ?? $this->referenceDate->format('H'), - $value['minute'] ?? $this->referenceDate->format('i'), - $value['second'] ?? $this->referenceDate->format('s') - ), - new \DateTimeZone($this->outputTimezone) - ); - - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php deleted file mode 100644 index ebbc76b..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Franz Wilding - * @author Bernhard Schussek - * @author Fred Cox - */ -class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer -{ - public const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; - - /** - * Transforms a \DateTime into a local date and time string. - * - * According to the HTML standard, the input string of a datetime-local - * input is an RFC3339 date followed by 'T', followed by an RFC3339 time. - * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-local-date-and-time-string - * - * @param \DateTime|\DateTimeInterface $dateTime A DateTime object - * - * @return string - * - * @throws TransformationFailedException If the given value is not an - * instance of \DateTime or \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTime && !$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTime or \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - return $dateTime->format(self::HTML5_FORMAT); - } - - /** - * Transforms a local date and time string into a \DateTime. - * - * When transforming back to DateTime the regex is slightly laxer, taking into - * account rules for parsing a local date and time string - * https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#parse-a-local-date-and-time-string - * - * @param string $dateTimeLocal Formatted string - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * if the value could not be transformed - */ - public function reverseTransform($dateTimeLocal) - { - if (!\is_string($dateTimeLocal)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $dateTimeLocal) { - return null; - } - - // to maintain backwards compatibility we do not strictly validate the submitted date - // see https://github.com/symfony/symfony/issues/28699 - if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})[T ]\d{2}:\d{2}(?::\d{2})?/', $dateTimeLocal, $matches)) { - throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $dateTimeLocal)); - } - - try { - $dateTime = new \DateTime($dateTimeLocal, new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); - } - - return $dateTime; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php deleted file mode 100644 index 7c8a4bc..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized time and a localized time string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer -{ - private $dateFormat; - private $timeFormat; - private $pattern; - private $calendar; - - /** - * @see BaseDateTimeTransformer::formats for available format options - * - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * @param int|null $dateFormat The date format - * @param int|null $timeFormat The time format - * @param int $calendar One of the \IntlDateFormatter calendar constants - * @param string|null $pattern A pattern to pass to \IntlDateFormatter - * - * @throws UnexpectedTypeException If a format is not supported or if a timezone is not a string - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, int $dateFormat = null, int $timeFormat = null, int $calendar = \IntlDateFormatter::GREGORIAN, string $pattern = null) - { - parent::__construct($inputTimezone, $outputTimezone); - - if (null === $dateFormat) { - $dateFormat = \IntlDateFormatter::MEDIUM; - } - - if (null === $timeFormat) { - $timeFormat = \IntlDateFormatter::SHORT; - } - - if (!\in_array($dateFormat, self::$formats, true)) { - throw new UnexpectedTypeException($dateFormat, implode('", "', self::$formats)); - } - - if (!\in_array($timeFormat, self::$formats, true)) { - throw new UnexpectedTypeException($timeFormat, implode('", "', self::$formats)); - } - - $this->dateFormat = $dateFormat; - $this->timeFormat = $timeFormat; - $this->calendar = $calendar; - $this->pattern = $pattern; - } - - /** - * Transforms a normalized date into a localized date string/array. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException if the given value is not a \DateTimeInterface - * or if the date could not be transformed - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - $value = $this->getIntlDateFormatter()->format($dateTime->getTimestamp()); - - if (0 != intl_get_error_code()) { - throw new TransformationFailedException(intl_get_error_message()); - } - - return $value; - } - - /** - * Transforms a localized date string/array into a normalized date. - * - * @param string|array $value Localized date string/array - * - * @return \DateTime|null - * - * @throws TransformationFailedException if the given value is not a string, - * if the date could not be parsed - */ - public function reverseTransform($value) - { - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $value) { - return null; - } - - // date-only patterns require parsing to be done in UTC, as midnight might not exist in the local timezone due - // to DST changes - $dateOnly = $this->isPatternDateOnly(); - $dateFormatter = $this->getIntlDateFormatter($dateOnly); - - try { - $timestamp = @$dateFormatter->parse($value); - } catch (\IntlException $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if (0 != intl_get_error_code()) { - throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code()); - } elseif ($timestamp > 253402214400) { - // This timestamp represents UTC midnight of 9999-12-31 to prevent 5+ digit years - throw new TransformationFailedException('Years beyond 9999 are not supported.'); - } elseif (false === $timestamp) { - // the value couldn't be parsed but the Intl extension didn't report an error code, this - // could be the case when the Intl polyfill is used which always returns 0 as the error code - throw new TransformationFailedException(sprintf('"%s" could not be parsed as a date.', $value)); - } - - try { - if ($dateOnly) { - // we only care about year-month-date, which has been delivered as a timestamp pointing to UTC midnight - $dateTime = new \DateTime(gmdate('Y-m-d', $timestamp), new \DateTimeZone($this->outputTimezone)); - } else { - // read timestamp into DateTime object - the formatter delivers a timestamp - $dateTime = new \DateTime(sprintf('@%s', $timestamp)); - } - // set timezone separately, as it would be ignored if set via the constructor, - // see https://php.net/datetime.construct - $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->outputTimezone !== $this->inputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - return $dateTime; - } - - /** - * Returns a preconfigured IntlDateFormatter instance. - * - * @param bool $ignoreTimezone Use UTC regardless of the configured timezone - * - * @return \IntlDateFormatter - * - * @throws TransformationFailedException in case the date formatter cannot be constructed - */ - protected function getIntlDateFormatter(bool $ignoreTimezone = false) - { - $dateFormat = $this->dateFormat; - $timeFormat = $this->timeFormat; - $timezone = new \DateTimeZone($ignoreTimezone ? 'UTC' : $this->outputTimezone); - - $calendar = $this->calendar; - $pattern = $this->pattern; - - $intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern ?? ''); - - // new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323 - if (!$intlDateFormatter) { - throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code()); - } - - $intlDateFormatter->setLenient(false); - - return $intlDateFormatter; - } - - /** - * Checks if the pattern contains only a date. - * - * @return bool - */ - protected function isPatternDateOnly() - { - if (null === $this->pattern) { - return false; - } - - // strip escaped text - $pattern = preg_replace("#'(.*?)'#", '', $this->pattern); - - // check for the absence of time-related placeholders - return 0 === preg_match('#[ahHkKmsSAzZOvVxX]#', $pattern); - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php deleted file mode 100644 index e0cdbcf..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer -{ - /** - * Transforms a normalized date into a localized date. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if ($this->inputTimezone !== $this->outputTimezone) { - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } - - return preg_replace('/\+00:00$/', 'Z', $dateTime->format('c')); - } - - /** - * Transforms a formatted string following RFC 3339 into a normalized date. - * - * @param string $rfc3339 Formatted string - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * if the value could not be transformed - */ - public function reverseTransform($rfc3339) - { - if (!\is_string($rfc3339)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $rfc3339) { - return null; - } - - if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))$/', $rfc3339, $matches)) { - throw new TransformationFailedException(sprintf('The date "%s" is not a valid date.', $rfc3339)); - } - - try { - $dateTime = new \DateTime($rfc3339); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - - if (!checkdate($matches[2], $matches[3], $matches[1])) { - throw new TransformationFailedException(sprintf('The date "%s-%s-%s" is not a valid date.', $matches[1], $matches[2], $matches[3])); - } - - return $dateTime; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php deleted file mode 100644 index 955b465..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a date string and a DateTime object. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToStringTransformer extends BaseDateTimeTransformer -{ - /** - * Format used for generating strings. - * - * @var string - */ - private $generateFormat; - - /** - * Format used for parsing strings. - * - * Different than the {@link $generateFormat} because formats for parsing - * support additional characters in PHP that are not supported for - * generating strings. - * - * @var string - */ - private $parseFormat; - - /** - * Transforms a \DateTime instance to a string. - * - * @see \DateTime::format() for supported formats - * - * @param string|null $inputTimezone The name of the input timezone - * @param string|null $outputTimezone The name of the output timezone - * @param string $format The date format - */ - public function __construct(string $inputTimezone = null, string $outputTimezone = null, string $format = 'Y-m-d H:i:s') - { - parent::__construct($inputTimezone, $outputTimezone); - - $this->generateFormat = $this->parseFormat = $format; - - // See https://php.net/datetime.createfromformat - // The character "|" in the format makes sure that the parts of a date - // that are *not* specified in the format are reset to the corresponding - // values from 1970-01-01 00:00:00 instead of the current time. - // Without "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 12:32:47", - // where the time corresponds to the current server time. - // With "|" and "Y-m-d", "2010-02-03" becomes "2010-02-03 00:00:00", - // which is at least deterministic and thus used here. - if (!str_contains($this->parseFormat, '|')) { - $this->parseFormat .= '|'; - } - } - - /** - * Transforms a DateTime object into a date string with the configured format - * and timezone. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return string - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return ''; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - if (!$dateTime instanceof \DateTimeImmutable) { - $dateTime = clone $dateTime; - } - - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - - return $dateTime->format($this->generateFormat); - } - - /** - * Transforms a date string in the configured timezone into a DateTime object. - * - * @param string $value A value as produced by PHP's date() function - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (empty($value)) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - $outputTz = new \DateTimeZone($this->outputTimezone); - $dateTime = \DateTime::createFromFormat($this->parseFormat, $value, $outputTz); - - $lastErrors = \DateTime::getLastErrors(); - - if (0 < $lastErrors['warning_count'] || 0 < $lastErrors['error_count']) { - throw new TransformationFailedException(implode(', ', array_merge(array_values($lastErrors['warnings']), array_values($lastErrors['errors'])))); - } - - try { - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php deleted file mode 100644 index f6c38ba..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timestamp and a DateTime object. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class DateTimeToTimestampTransformer extends BaseDateTimeTransformer -{ - /** - * Transforms a DateTime object into a timestamp in the configured timezone. - * - * @param \DateTimeInterface $dateTime A DateTimeInterface object - * - * @return int|null - * - * @throws TransformationFailedException If the given value is not a \DateTimeInterface - */ - public function transform($dateTime) - { - if (null === $dateTime) { - return null; - } - - if (!$dateTime instanceof \DateTimeInterface) { - throw new TransformationFailedException('Expected a \DateTimeInterface.'); - } - - return $dateTime->getTimestamp(); - } - - /** - * Transforms a timestamp in the configured timezone into a DateTime object. - * - * @param string $value A timestamp - * - * @return \DateTime|null - * - * @throws TransformationFailedException If the given value is not a timestamp - * or if the given timestamp is invalid - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - try { - $dateTime = new \DateTime(); - $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - $dateTime->setTimestamp($value); - - if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - - return $dateTime; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php deleted file mode 100644 index 6dfccdf..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timezone identifier string and a DateTimeZone object. - * - * @author Roland Franssen - */ -class DateTimeZoneToStringTransformer implements DataTransformerInterface -{ - private $multiple; - - public function __construct(bool $multiple = false) - { - $this->multiple = $multiple; - } - - /** - * {@inheritdoc} - */ - public function transform($dateTimeZone) - { - if (null === $dateTimeZone) { - return null; - } - - if ($this->multiple) { - if (!\is_array($dateTimeZone)) { - throw new TransformationFailedException('Expected an array of \DateTimeZone objects.'); - } - - return array_map([new self(), 'transform'], $dateTimeZone); - } - - if (!$dateTimeZone instanceof \DateTimeZone) { - throw new TransformationFailedException('Expected a \DateTimeZone object.'); - } - - return $dateTimeZone->getName(); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if ($this->multiple) { - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array of timezone identifier strings.'); - } - - return array_map([new self(), 'reverseTransform'], $value); - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a timezone identifier string.'); - } - - try { - return new \DateTimeZone($value); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php deleted file mode 100644 index 1ba9140..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between an integer and a localized number with grouping - * (each thousand) and comma separators. - * - * @author Bernhard Schussek - */ -class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransformer -{ - /** - * Constructs a transformer. - * - * @param bool $grouping Whether thousands should be grouped - * @param int $roundingMode One of the ROUND_ constants in this class - * @param string|null $locale locale used for transforming - */ - public function __construct(?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_DOWN, string $locale = null) - { - parent::__construct(0, $grouping, $roundingMode, $locale); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - $decimalSeparator = $this->getNumberFormatter()->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - - if (\is_string($value) && str_contains($value, $decimalSeparator)) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid integer.', $value)); - } - - $result = parent::reverseTransform($value); - - return null !== $result ? (int) $result : null; - } - - /** - * @internal - */ - protected function castParsedValue($value) - { - return $value; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php deleted file mode 100644 index aa4629f..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformer.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a timezone identifier string and a IntlTimeZone object. - * - * @author Roland Franssen - */ -class IntlTimeZoneToStringTransformer implements DataTransformerInterface -{ - private $multiple; - - public function __construct(bool $multiple = false) - { - $this->multiple = $multiple; - } - - /** - * {@inheritdoc} - */ - public function transform($intlTimeZone) - { - if (null === $intlTimeZone) { - return null; - } - - if ($this->multiple) { - if (!\is_array($intlTimeZone)) { - throw new TransformationFailedException('Expected an array of \IntlTimeZone objects.'); - } - - return array_map([new self(), 'transform'], $intlTimeZone); - } - - if (!$intlTimeZone instanceof \IntlTimeZone) { - throw new TransformationFailedException('Expected a \IntlTimeZone object.'); - } - - return $intlTimeZone->getID(); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - if (null === $value) { - return; - } - - if ($this->multiple) { - if (!\is_array($value)) { - throw new TransformationFailedException('Expected an array of timezone identifier strings.'); - } - - return array_map([new self(), 'reverseTransform'], $value); - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a timezone identifier string.'); - } - - $intlTimeZone = \IntlTimeZone::createTimeZone($value); - - if ('Etc/Unknown' === $intlTimeZone->getID()) { - throw new TransformationFailedException(sprintf('Unknown timezone identifier "%s".', $value)); - } - - return $intlTimeZone; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php deleted file mode 100644 index 9784fe6..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformer.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a normalized format and a localized money string. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer -{ - private $divisor; - - public function __construct(?int $scale = 2, ?bool $grouping = true, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, ?int $divisor = 1, string $locale = null) - { - parent::__construct($scale ?? 2, $grouping ?? true, $roundingMode, $locale); - - $this->divisor = $divisor ?? 1; - } - - /** - * Transforms a normalized format into a localized money string. - * - * @param int|float|null $value Normalized number - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric or - * if the value cannot be transformed - */ - public function transform($value) - { - if (null !== $value && 1 !== $this->divisor) { - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - $value /= $this->divisor; - } - - return parent::transform($value); - } - - /** - * Transforms a localized money string into a normalized format. - * - * @param string $value Localized money string - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string - * or if the value cannot be transformed - */ - public function reverseTransform($value) - { - $value = parent::reverseTransform($value); - if (null !== $value && 1 !== $this->divisor) { - $value = (float) (string) ($value * $this->divisor); - } - - return $value; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php deleted file mode 100644 index 53e564b..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ /dev/null @@ -1,265 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between a number type and a localized number with grouping - * (each thousand) and comma separators. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class NumberToLocalizedStringTransformer implements DataTransformerInterface -{ - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_CEILING instead. - */ - public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_FLOOR instead. - */ - public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_UP instead. - */ - public const ROUND_UP = \NumberFormatter::ROUND_UP; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_DOWN instead. - */ - public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFEVEN instead. - */ - public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFUP instead. - */ - public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; - - /** - * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFDOWN instead. - */ - public const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN; - - protected $grouping; - - protected $roundingMode; - - private $scale; - private $locale; - - public function __construct(int $scale = null, ?bool $grouping = false, ?int $roundingMode = \NumberFormatter::ROUND_HALFUP, string $locale = null) - { - $this->scale = $scale; - $this->grouping = $grouping ?? false; - $this->roundingMode = $roundingMode ?? \NumberFormatter::ROUND_HALFUP; - $this->locale = $locale; - } - - /** - * Transforms a number type into localized number. - * - * @param int|float|null $value Number value - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric - * or if the value cannot be transformed - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - $formatter = $this->getNumberFormatter(); - $value = $formatter->format($value); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - // Convert non-breaking and narrow non-breaking spaces to normal ones - $value = str_replace(["\xc2\xa0", "\xe2\x80\xaf"], ' ', $value); - - return $value; - } - - /** - * Transforms a localized number into an integer or float. - * - * @param string $value The localized value - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string - * or if the value cannot be transformed - */ - public function reverseTransform($value) - { - if (null !== $value && !\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if (null === $value || '' === $value) { - return null; - } - - if (\in_array($value, ['NaN', 'NAN', 'nan'], true)) { - throw new TransformationFailedException('"NaN" is not a valid number.'); - } - - $position = 0; - $formatter = $this->getNumberFormatter(); - $groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); - $decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - - if ('.' !== $decSep && (!$this->grouping || '.' !== $groupSep)) { - $value = str_replace('.', $decSep, $value); - } - - if (',' !== $decSep && (!$this->grouping || ',' !== $groupSep)) { - $value = str_replace(',', $decSep, $value); - } - - if (str_contains($value, $decSep)) { - $type = \NumberFormatter::TYPE_DOUBLE; - } else { - $type = \PHP_INT_SIZE === 8 - ? \NumberFormatter::TYPE_INT64 - : \NumberFormatter::TYPE_INT32; - } - - $result = $formatter->parse($value, $type, $position); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - if ($result >= \PHP_INT_MAX || $result <= -\PHP_INT_MAX) { - throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.'); - } - - $result = $this->castParsedValue($result); - - if (false !== $encoding = mb_detect_encoding($value, null, true)) { - $length = mb_strlen($value, $encoding); - $remainder = mb_substr($value, $position, $length, $encoding); - } else { - $length = \strlen($value); - $remainder = substr($value, $position, $length); - } - - // After parsing, position holds the index of the character where the - // parsing stopped - if ($position < $length) { - // Check if there are unrecognized characters at the end of the - // number (excluding whitespace characters) - $remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0"); - - if ('' !== $remainder) { - throw new TransformationFailedException(sprintf('The number contains unrecognized characters: "%s".', $remainder)); - } - } - - // NumberFormatter::parse() does not round - return $this->round($result); - } - - /** - * Returns a preconfigured \NumberFormatter instance. - * - * @return \NumberFormatter - */ - protected function getNumberFormatter() - { - $formatter = new \NumberFormatter($this->locale ?? \Locale::getDefault(), \NumberFormatter::DECIMAL); - - if (null !== $this->scale) { - $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale); - $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode); - } - - $formatter->setAttribute(\NumberFormatter::GROUPING_USED, $this->grouping); - - return $formatter; - } - - /** - * @internal - */ - protected function castParsedValue($value) - { - if (\is_int($value) && $value === (int) $float = (float) $value) { - return $float; - } - - return $value; - } - - /** - * Rounds a number according to the configured scale and rounding mode. - * - * @param int|float $number A number - * - * @return int|float - */ - private function round($number) - { - if (null !== $this->scale && null !== $this->roundingMode) { - // shift number to maintain the correct scale during rounding - $roundingCoef = 10 ** $this->scale; - // string representation to avoid rounding errors, similar to bcmul() - $number = (string) ($number * $roundingCoef); - - switch ($this->roundingMode) { - case \NumberFormatter::ROUND_CEILING: - $number = ceil($number); - break; - case \NumberFormatter::ROUND_FLOOR: - $number = floor($number); - break; - case \NumberFormatter::ROUND_UP: - $number = $number > 0 ? ceil($number) : floor($number); - break; - case \NumberFormatter::ROUND_DOWN: - $number = $number > 0 ? floor($number) : ceil($number); - break; - case \NumberFormatter::ROUND_HALFEVEN: - $number = round($number, 0, \PHP_ROUND_HALF_EVEN); - break; - case \NumberFormatter::ROUND_HALFUP: - $number = round($number, 0, \PHP_ROUND_HALF_UP); - break; - case \NumberFormatter::ROUND_HALFDOWN: - $number = round($number, 0, \PHP_ROUND_HALF_DOWN); - break; - } - - $number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef; - } - - return $number; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php deleted file mode 100644 index 5b97f01..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * Transforms between a normalized format (integer or float) and a percentage value. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - */ -class PercentToLocalizedStringTransformer implements DataTransformerInterface -{ - public const FRACTIONAL = 'fractional'; - public const INTEGER = 'integer'; - - protected static $types = [ - self::FRACTIONAL, - self::INTEGER, - ]; - - private $roundingMode; - private $type; - private $scale; - private $html5Format; - - /** - * @see self::$types for a list of supported types - * - * @param int|null $roundingMode A value from \NumberFormatter, such as \NumberFormatter::ROUND_HALFUP - * @param bool $html5Format Use an HTML5 specific format, see https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - * - * @throws UnexpectedTypeException if the given value of type is unknown - */ - public function __construct(int $scale = null, string $type = null, int $roundingMode = null, bool $html5Format = false) - { - if (null === $type) { - $type = self::FRACTIONAL; - } - - if (null === $roundingMode && (\func_num_args() < 4 || func_get_arg(3))) { - trigger_deprecation('symfony/form', '5.1', 'Not passing a rounding mode to "%s()" is deprecated. Starting with Symfony 6.0 it will default to "\NumberFormatter::ROUND_HALFUP".', __METHOD__); - } - - if (!\in_array($type, self::$types, true)) { - throw new UnexpectedTypeException($type, implode('", "', self::$types)); - } - - $this->type = $type; - $this->scale = $scale ?? 0; - $this->roundingMode = $roundingMode; - $this->html5Format = $html5Format; - } - - /** - * Transforms between a normalized format (integer or float) into a percentage value. - * - * @param int|float $value Normalized value - * - * @return string - * - * @throws TransformationFailedException if the given value is not numeric or - * if the value could not be transformed - */ - public function transform($value) - { - if (null === $value) { - return ''; - } - - if (!is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - if (self::FRACTIONAL == $this->type) { - $value *= 100; - } - - $formatter = $this->getNumberFormatter(); - $value = $formatter->format($value); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - // replace the UTF-8 non break spaces - return $value; - } - - /** - * Transforms between a percentage value into a normalized format (integer or float). - * - * @param string $value Percentage value - * - * @return int|float|null - * - * @throws TransformationFailedException if the given value is not a string or - * if the value could not be transformed - */ - public function reverseTransform($value) - { - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - if ('' === $value) { - return null; - } - - $position = 0; - $formatter = $this->getNumberFormatter(); - $groupSep = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); - $decSep = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); - $grouping = $formatter->getAttribute(\NumberFormatter::GROUPING_USED); - - if ('.' !== $decSep && (!$grouping || '.' !== $groupSep)) { - $value = str_replace('.', $decSep, $value); - } - - if (',' !== $decSep && (!$grouping || ',' !== $groupSep)) { - $value = str_replace(',', $decSep, $value); - } - - if (str_contains($value, $decSep)) { - $type = \NumberFormatter::TYPE_DOUBLE; - } else { - $type = \PHP_INT_SIZE === 8 ? \NumberFormatter::TYPE_INT64 : \NumberFormatter::TYPE_INT32; - } - - // replace normal spaces so that the formatter can read them - $result = $formatter->parse(str_replace(' ', "\xc2\xa0", $value), $type, $position); - - if (intl_is_failure($formatter->getErrorCode())) { - throw new TransformationFailedException($formatter->getErrorMessage()); - } - - if (self::FRACTIONAL == $this->type) { - $result /= 100; - } - - if (\function_exists('mb_detect_encoding') && false !== $encoding = mb_detect_encoding($value, null, true)) { - $length = mb_strlen($value, $encoding); - $remainder = mb_substr($value, $position, $length, $encoding); - } else { - $length = \strlen($value); - $remainder = substr($value, $position, $length); - } - - // After parsing, position holds the index of the character where the - // parsing stopped - if ($position < $length) { - // Check if there are unrecognized characters at the end of the - // number (excluding whitespace characters) - $remainder = trim($remainder, " \t\n\r\0\x0b\xc2\xa0"); - - if ('' !== $remainder) { - throw new TransformationFailedException(sprintf('The number contains unrecognized characters: "%s".', $remainder)); - } - } - - return $this->round($result); - } - - /** - * Returns a preconfigured \NumberFormatter instance. - * - * @return \NumberFormatter - */ - protected function getNumberFormatter() - { - // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, - // according to https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - $formatter = new \NumberFormatter($this->html5Format ? 'en' : \Locale::getDefault(), \NumberFormatter::DECIMAL); - - if ($this->html5Format) { - $formatter->setAttribute(\NumberFormatter::GROUPING_USED, 0); - } - - $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->scale); - - if (null !== $this->roundingMode) { - $formatter->setAttribute(\NumberFormatter::ROUNDING_MODE, $this->roundingMode); - } - - return $formatter; - } - - /** - * Rounds a number according to the configured scale and rounding mode. - * - * @param int|float $number A number - * - * @return int|float - */ - private function round($number) - { - if (null !== $this->scale && null !== $this->roundingMode) { - // shift number to maintain the correct scale during rounding - $roundingCoef = 10 ** $this->scale; - - if (self::FRACTIONAL == $this->type) { - $roundingCoef *= 100; - } - - // string representation to avoid rounding errors, similar to bcmul() - $number = (string) ($number * $roundingCoef); - - switch ($this->roundingMode) { - case \NumberFormatter::ROUND_CEILING: - $number = ceil($number); - break; - case \NumberFormatter::ROUND_FLOOR: - $number = floor($number); - break; - case \NumberFormatter::ROUND_UP: - $number = $number > 0 ? ceil($number) : floor($number); - break; - case \NumberFormatter::ROUND_DOWN: - $number = $number > 0 ? floor($number) : ceil($number); - break; - case \NumberFormatter::ROUND_HALFEVEN: - $number = round($number, 0, \PHP_ROUND_HALF_EVEN); - break; - case \NumberFormatter::ROUND_HALFUP: - $number = round($number, 0, \PHP_ROUND_HALF_UP); - break; - case \NumberFormatter::ROUND_HALFDOWN: - $number = round($number, 0, \PHP_ROUND_HALF_DOWN); - break; - } - - $number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef; - } - - return $number; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php deleted file mode 100644 index 27e60b4..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/StringToFloatTransformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -class StringToFloatTransformer implements DataTransformerInterface -{ - private $scale; - - public function __construct(int $scale = null) - { - $this->scale = $scale; - } - - /** - * @param mixed $value - * - * @return float|null - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!\is_string($value) || !is_numeric($value)) { - throw new TransformationFailedException('Expected a numeric string.'); - } - - return (float) $value; - } - - /** - * @param mixed $value - * - * @return string|null - */ - public function reverseTransform($value) - { - if (null === $value) { - return null; - } - - if (!\is_int($value) && !\is_float($value)) { - throw new TransformationFailedException('Expected a numeric.'); - } - - if ($this->scale > 0) { - return number_format((float) $value, $this->scale, '.', ''); - } - - return (string) $value; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php deleted file mode 100644 index 33b57db..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/UlidToStringTransformer.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Uid\Ulid; - -/** - * Transforms between a ULID string and a Ulid object. - * - * @author Pavel Dyakonov - */ -class UlidToStringTransformer implements DataTransformerInterface -{ - /** - * Transforms a Ulid object into a string. - * - * @param Ulid $value A Ulid object - * - * @return string|null - * - * @throws TransformationFailedException If the given value is not a Ulid object - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!$value instanceof Ulid) { - throw new TransformationFailedException('Expected a Ulid.'); - } - - return (string) $value; - } - - /** - * Transforms a ULID string into a Ulid object. - * - * @param string $value A ULID string - * - * @return Ulid|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value || '' === $value) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - try { - $ulid = new Ulid($value); - } catch (\InvalidArgumentException $e) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid ULID.', $value), $e->getCode(), $e); - } - - return $ulid; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php deleted file mode 100644 index 1ccf04b..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/UuidToStringTransformer.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Uid\Uuid; - -/** - * Transforms between a UUID string and a Uuid object. - * - * @author Pavel Dyakonov - */ -class UuidToStringTransformer implements DataTransformerInterface -{ - /** - * Transforms a Uuid object into a string. - * - * @param Uuid $value A Uuid object - * - * @return string|null - * - * @throws TransformationFailedException If the given value is not a Uuid object - */ - public function transform($value) - { - if (null === $value) { - return null; - } - - if (!$value instanceof Uuid) { - throw new TransformationFailedException('Expected a Uuid.'); - } - - return (string) $value; - } - - /** - * Transforms a UUID string into a Uuid object. - * - * @param string $value A UUID string - * - * @return Uuid|null - * - * @throws TransformationFailedException If the given value is not a string, - * or could not be transformed - */ - public function reverseTransform($value) - { - if (null === $value || '' === $value) { - return null; - } - - if (!\is_string($value)) { - throw new TransformationFailedException('Expected a string.'); - } - - try { - $uuid = new Uuid($value); - } catch (\InvalidArgumentException $e) { - throw new TransformationFailedException(sprintf('The value "%s" is not a valid UUID.', $value), $e->getCode(), $e); - } - - return $uuid; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php deleted file mode 100644 index 5249e3b..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/ValueToDuplicatesTransformer.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * @author Bernhard Schussek - */ -class ValueToDuplicatesTransformer implements DataTransformerInterface -{ - private $keys; - - public function __construct(array $keys) - { - $this->keys = $keys; - } - - /** - * Duplicates the given value through the array. - * - * @param mixed $value The value - * - * @return array - */ - public function transform($value) - { - $result = []; - - foreach ($this->keys as $key) { - $result[$key] = $value; - } - - return $result; - } - - /** - * Extracts the duplicated value from an array. - * - * @return mixed - * - * @throws TransformationFailedException if the given value is not an array or - * if the given array cannot be transformed - */ - public function reverseTransform($array) - { - if (!\is_array($array)) { - throw new TransformationFailedException('Expected an array.'); - } - - $result = current($array); - $emptyKeys = []; - - foreach ($this->keys as $key) { - if (isset($array[$key]) && '' !== $array[$key] && false !== $array[$key] && [] !== $array[$key]) { - if ($array[$key] !== $result) { - throw new TransformationFailedException('All values in the array should be the same.'); - } - } else { - $emptyKeys[] = $key; - } - } - - if (\count($emptyKeys) > 0) { - if (\count($emptyKeys) == \count($this->keys)) { - // All keys empty - return null; - } - - throw new TransformationFailedException(sprintf('The keys "%s" should not be empty.', implode('", "', $emptyKeys))); - } - - return $result; - } -} diff --git a/vendor/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php b/vendor/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php deleted file mode 100644 index d7349bb..0000000 --- a/vendor/symfony/form/Extension/Core/DataTransformer/WeekToArrayTransformer.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\DataTransformer; - -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\Exception\TransformationFailedException; - -/** - * Transforms between an ISO 8601 week date string and an array. - * - * @author Damien Fayet - */ -class WeekToArrayTransformer implements DataTransformerInterface -{ - /** - * Transforms a string containing an ISO 8601 week date into an array. - * - * @param string|null $value A week date string - * - * @return array{year: int|null, week: int|null} - * - * @throws TransformationFailedException If the given value is not a string, - * or if the given value does not follow the right format - */ - public function transform($value) - { - if (null === $value) { - return ['year' => null, 'week' => null]; - } - - if (!\is_string($value)) { - throw new TransformationFailedException(sprintf('Value is expected to be a string but was "%s".', get_debug_type($value))); - } - - if (0 === preg_match('/^(?P\d{4})-W(?P\d{2})$/', $value, $matches)) { - throw new TransformationFailedException('Given data does not follow the date format "Y-\WW".'); - } - - return [ - 'year' => (int) $matches['year'], - 'week' => (int) $matches['week'], - ]; - } - - /** - * Transforms an array into a week date string. - * - * @param array{year: int|null, week: int|null} $value - * - * @return string|null A week date string following the format Y-\WW - * - * @throws TransformationFailedException If the given value cannot be merged in a valid week date string, - * or if the obtained week date does not exists - */ - public function reverseTransform($value) - { - if (null === $value || [] === $value) { - return null; - } - - if (!\is_array($value)) { - throw new TransformationFailedException(sprintf('Value is expected to be an array, but was "%s".', get_debug_type($value))); - } - - if (!\array_key_exists('year', $value)) { - throw new TransformationFailedException('Key "year" is missing.'); - } - - if (!\array_key_exists('week', $value)) { - throw new TransformationFailedException('Key "week" is missing.'); - } - - if ($additionalKeys = array_diff(array_keys($value), ['year', 'week'])) { - throw new TransformationFailedException(sprintf('Expected only keys "year" and "week" to be present, but also got ["%s"].', implode('", "', $additionalKeys))); - } - - if (null === $value['year'] && null === $value['week']) { - return null; - } - - if (!\is_int($value['year'])) { - throw new TransformationFailedException(sprintf('Year is expected to be an integer, but was "%s".', get_debug_type($value['year']))); - } - - if (!\is_int($value['week'])) { - throw new TransformationFailedException(sprintf('Week is expected to be an integer, but was "%s".', get_debug_type($value['week']))); - } - - // The 28th December is always in the last week of the year - if (date('W', strtotime('28th December '.$value['year'])) < $value['week']) { - throw new TransformationFailedException(sprintf('Week "%d" does not exist for year "%d".', $value['week'], $value['year'])); - } - - return sprintf('%d-W%02d', $value['year'], $value['week']); - } -} diff --git a/vendor/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php b/vendor/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php deleted file mode 100644 index c497212..0000000 --- a/vendor/symfony/form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * Adds a protocol to a URL if it doesn't already have one. - * - * @author Bernhard Schussek - */ -class FixUrlProtocolListener implements EventSubscriberInterface -{ - private $defaultProtocol; - - /** - * @param string|null $defaultProtocol The URL scheme to add when there is none or null to not modify the data - */ - public function __construct(?string $defaultProtocol = 'http') - { - $this->defaultProtocol = $defaultProtocol; - } - - public function onSubmit(FormEvent $event) - { - $data = $event->getData(); - - if ($this->defaultProtocol && $data && \is_string($data) && !preg_match('~^(?:[/.]|[\w+.-]+://|[^:/?@#]++@)~', $data)) { - $event->setData($this->defaultProtocol.'://'.$data); - } - } - - public static function getSubscribedEvents() - { - return [FormEvents::SUBMIT => 'onSubmit']; - } -} diff --git a/vendor/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php b/vendor/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php deleted file mode 100644 index cd4a3b5..0000000 --- a/vendor/symfony/form/Extension/Core/EventListener/MergeCollectionListener.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * @author Bernhard Schussek - */ -class MergeCollectionListener implements EventSubscriberInterface -{ - private $allowAdd; - private $allowDelete; - - /** - * @param bool $allowAdd Whether values might be added to the collection - * @param bool $allowDelete Whether values might be removed from the collection - */ - public function __construct(bool $allowAdd = false, bool $allowDelete = false) - { - $this->allowAdd = $allowAdd; - $this->allowDelete = $allowDelete; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::SUBMIT => 'onSubmit', - ]; - } - - public function onSubmit(FormEvent $event) - { - $dataToMergeInto = $event->getForm()->getNormData(); - $data = $event->getData(); - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - if (null !== $dataToMergeInto && !\is_array($dataToMergeInto) && !($dataToMergeInto instanceof \Traversable && $dataToMergeInto instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($dataToMergeInto, 'array or (\Traversable and \ArrayAccess)'); - } - - // If we are not allowed to change anything, return immediately - if ($data === $dataToMergeInto || (!$this->allowAdd && !$this->allowDelete)) { - $event->setData($dataToMergeInto); - - return; - } - - if (null === $dataToMergeInto) { - // No original data was set. Set it if allowed - if ($this->allowAdd) { - $dataToMergeInto = $data; - } - } else { - // Calculate delta - $itemsToAdd = \is_object($data) ? clone $data : $data; - $itemsToDelete = []; - - foreach ($dataToMergeInto as $beforeKey => $beforeItem) { - foreach ($data as $afterKey => $afterItem) { - if ($afterItem === $beforeItem) { - // Item found, next original item - unset($itemsToAdd[$afterKey]); - continue 2; - } - } - - // Item not found, remember for deletion - $itemsToDelete[] = $beforeKey; - } - - // Remove deleted items before adding to free keys that are to be - // replaced - if ($this->allowDelete) { - foreach ($itemsToDelete as $key) { - unset($dataToMergeInto[$key]); - } - } - - // Add remaining items - if ($this->allowAdd) { - foreach ($itemsToAdd as $key => $item) { - if (!isset($dataToMergeInto[$key])) { - $dataToMergeInto[$key] = $item; - } else { - $dataToMergeInto[] = $item; - } - } - } - } - - $event->setData($dataToMergeInto); - } -} diff --git a/vendor/symfony/form/Extension/Core/EventListener/ResizeFormListener.php b/vendor/symfony/form/Extension/Core/EventListener/ResizeFormListener.php deleted file mode 100644 index 813456b..0000000 --- a/vendor/symfony/form/Extension/Core/EventListener/ResizeFormListener.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; - -/** - * Resize a collection form element based on the data sent from the client. - * - * @author Bernhard Schussek - */ -class ResizeFormListener implements EventSubscriberInterface -{ - protected $type; - protected $options; - protected $allowAdd; - protected $allowDelete; - - private $deleteEmpty; - - /** - * @param bool $allowAdd Whether children could be added to the group - * @param bool $allowDelete Whether children could be removed from the group - * @param bool|callable $deleteEmpty - */ - public function __construct(string $type, array $options = [], bool $allowAdd = false, bool $allowDelete = false, $deleteEmpty = false) - { - $this->type = $type; - $this->allowAdd = $allowAdd; - $this->allowDelete = $allowDelete; - $this->options = $options; - $this->deleteEmpty = $deleteEmpty; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::PRE_SET_DATA => 'preSetData', - FormEvents::PRE_SUBMIT => 'preSubmit', - // (MergeCollectionListener, MergeDoctrineCollectionListener) - FormEvents::SUBMIT => ['onSubmit', 50], - ]; - } - - public function preSetData(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - // First remove all rows - foreach ($form as $name => $child) { - $form->remove($name); - } - - // Then add all rows again in the correct order - foreach ($data as $name => $value) { - $form->add($name, $this->type, array_replace([ - 'property_path' => '['.$name.']', - ], $this->options)); - } - } - - public function preSubmit(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - if (!\is_array($data)) { - $data = []; - } - - // Remove all empty rows - if ($this->allowDelete) { - foreach ($form as $name => $child) { - if (!isset($data[$name])) { - $form->remove($name); - } - } - } - - // Add all additional rows - if ($this->allowAdd) { - foreach ($data as $name => $value) { - if (!$form->has($name)) { - $form->add($name, $this->type, array_replace([ - 'property_path' => '['.$name.']', - ], $this->options)); - } - } - } - } - - public function onSubmit(FormEvent $event) - { - $form = $event->getForm(); - $data = $event->getData(); - - // At this point, $data is an array or an array-like object that already contains the - // new entries, which were added by the data mapper. The data mapper ignores existing - // entries, so we need to manually unset removed entries in the collection. - - if (null === $data) { - $data = []; - } - - if (!\is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) { - throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)'); - } - - if ($this->deleteEmpty) { - $previousData = $form->getData(); - /** @var FormInterface $child */ - foreach ($form as $name => $child) { - if (!$child->isValid() || !$child->isSynchronized()) { - continue; - } - - $isNew = !isset($previousData[$name]); - $isEmpty = \is_callable($this->deleteEmpty) ? ($this->deleteEmpty)($child->getData()) : $child->isEmpty(); - - // $isNew can only be true if allowAdd is true, so we don't - // need to check allowAdd again - if ($isEmpty && ($isNew || $this->allowDelete)) { - unset($data[$name]); - $form->remove($name); - } - } - } - - // The data mapper only adds, but does not remove items, so do this - // here - if ($this->allowDelete) { - $toDelete = []; - - foreach ($data as $name => $child) { - if (!$form->has($name)) { - $toDelete[] = $name; - } - } - - foreach ($toDelete as $name) { - unset($data[$name]); - } - } - - $event->setData($data); - } -} diff --git a/vendor/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php b/vendor/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php deleted file mode 100644 index dd2a2f2..0000000 --- a/vendor/symfony/form/Extension/Core/EventListener/TransformationFailureListener.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Christian Flothmann - */ -class TransformationFailureListener implements EventSubscriberInterface -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - public static function getSubscribedEvents() - { - return [ - FormEvents::POST_SUBMIT => ['convertTransformationFailureToFormError', -1024], - ]; - } - - public function convertTransformationFailureToFormError(FormEvent $event) - { - $form = $event->getForm(); - - if (null === $form->getTransformationFailure() || !$form->isValid()) { - return; - } - - foreach ($form as $child) { - if (!$child->isSynchronized()) { - return; - } - } - - $clientDataAsString = is_scalar($form->getViewData()) ? (string) $form->getViewData() : get_debug_type($form->getViewData()); - $messageTemplate = $form->getConfig()->getOption('invalid_message', 'The value {{ value }} is not valid.'); - $messageParameters = array_replace(['{{ value }}' => $clientDataAsString], $form->getConfig()->getOption('invalid_message_parameters', [])); - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, $messageParameters); - } else { - $message = strtr($messageTemplate, $messageParameters); - } - - $form->addError(new FormError($message, $messageTemplate, $messageParameters, null, $form->getTransformationFailure())); - } -} diff --git a/vendor/symfony/form/Extension/Core/EventListener/TrimListener.php b/vendor/symfony/form/Extension/Core/EventListener/TrimListener.php deleted file mode 100644 index be8c38a..0000000 --- a/vendor/symfony/form/Extension/Core/EventListener/TrimListener.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\Util\StringUtil; - -/** - * Trims string data. - * - * @author Bernhard Schussek - */ -class TrimListener implements EventSubscriberInterface -{ - public function preSubmit(FormEvent $event) - { - $data = $event->getData(); - - if (!\is_string($data)) { - return; - } - - $event->setData(StringUtil::trim($data)); - } - - public static function getSubscribedEvents() - { - return [FormEvents::PRE_SUBMIT => 'preSubmit']; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/BaseType.php b/vendor/symfony/form/Extension/Core/Type/BaseType.php deleted file mode 100644 index 4ac58bd..0000000 --- a/vendor/symfony/form/Extension/Core/Type/BaseType.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * Encapsulates common logic of {@link FormType} and {@link ButtonType}. - * - * This type does not appear in the form's type inheritance chain and as such - * cannot be extended (via {@link \Symfony\Component\Form\FormExtensionInterface}) nor themed. - * - * @author Bernhard Schussek - */ -abstract class BaseType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->setDisabled($options['disabled']); - $builder->setAutoInitialize($options['auto_initialize']); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $name = $form->getName(); - $blockName = $options['block_name'] ?: $form->getName(); - $translationDomain = $options['translation_domain']; - $labelTranslationParameters = $options['label_translation_parameters']; - $attrTranslationParameters = $options['attr_translation_parameters']; - $labelFormat = $options['label_format']; - - if ($view->parent) { - if ('' !== ($parentFullName = $view->parent->vars['full_name'])) { - $id = sprintf('%s_%s', $view->parent->vars['id'], $name); - $fullName = sprintf('%s[%s]', $parentFullName, $name); - $uniqueBlockPrefix = sprintf('%s_%s', $view->parent->vars['unique_block_prefix'], $blockName); - } else { - $id = $name; - $fullName = $name; - $uniqueBlockPrefix = '_'.$blockName; - } - - if (null === $translationDomain) { - $translationDomain = $view->parent->vars['translation_domain']; - } - - $labelTranslationParameters = array_merge($view->parent->vars['label_translation_parameters'], $labelTranslationParameters); - $attrTranslationParameters = array_merge($view->parent->vars['attr_translation_parameters'], $attrTranslationParameters); - - if (!$labelFormat) { - $labelFormat = $view->parent->vars['label_format']; - } - } else { - $id = $name; - $fullName = $name; - $uniqueBlockPrefix = '_'.$blockName; - - // Strip leading underscores and digits. These are allowed in - // form names, but not in HTML4 ID attributes. - // https://www.w3.org/TR/html401/struct/global#adef-id - $id = ltrim($id, '_0123456789'); - } - - $blockPrefixes = []; - for ($type = $form->getConfig()->getType(); null !== $type; $type = $type->getParent()) { - array_unshift($blockPrefixes, $type->getBlockPrefix()); - } - if (null !== $options['block_prefix']) { - $blockPrefixes[] = $options['block_prefix']; - } - $blockPrefixes[] = $uniqueBlockPrefix; - - $view->vars = array_replace($view->vars, [ - 'form' => $view, - 'id' => $id, - 'name' => $name, - 'full_name' => $fullName, - 'disabled' => $form->isDisabled(), - 'label' => $options['label'], - 'label_format' => $labelFormat, - 'label_html' => $options['label_html'], - 'multipart' => false, - 'attr' => $options['attr'], - 'block_prefixes' => $blockPrefixes, - 'unique_block_prefix' => $uniqueBlockPrefix, - 'row_attr' => $options['row_attr'], - 'translation_domain' => $translationDomain, - 'label_translation_parameters' => $labelTranslationParameters, - 'attr_translation_parameters' => $attrTranslationParameters, - 'priority' => $options['priority'], - // Using the block name here speeds up performance in collection - // forms, where each entry has the same full block name. - // Including the type is important too, because if rows of a - // collection form have different types (dynamically), they should - // be rendered differently. - // https://github.com/symfony/symfony/issues/5038 - AbstractRendererEngine::CACHE_KEY_VAR => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getBlockPrefix(), - ]); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'block_name' => null, - 'block_prefix' => null, - 'disabled' => false, - 'label' => null, - 'label_format' => null, - 'row_attr' => [], - 'label_html' => false, - 'label_translation_parameters' => [], - 'attr_translation_parameters' => [], - 'attr' => [], - 'translation_domain' => null, - 'auto_initialize' => true, - 'priority' => 0, - ]); - - $resolver->setAllowedTypes('block_prefix', ['null', 'string']); - $resolver->setAllowedTypes('attr', 'array'); - $resolver->setAllowedTypes('row_attr', 'array'); - $resolver->setAllowedTypes('label_html', 'bool'); - $resolver->setAllowedTypes('priority', 'int'); - - $resolver->setInfo('priority', 'The form rendering priority (higher priorities will be rendered first)'); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/BirthdayType.php b/vendor/symfony/form/Extension/Core/Type/BirthdayType.php deleted file mode 100644 index 50d8b1e..0000000 --- a/vendor/symfony/form/Extension/Core/Type/BirthdayType.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class BirthdayType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'years' => range((int) date('Y') - 120, date('Y')), - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid birthdate.'; - }, - ]); - - $resolver->setAllowedTypes('years', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return DateType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'birthday'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/ButtonType.php b/vendor/symfony/form/Extension/Core/Type/ButtonType.php deleted file mode 100644 index ba2f8df..0000000 --- a/vendor/symfony/form/Extension/Core/Type/ButtonType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\ButtonTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A form button. - * - * @author Bernhard Schussek - */ -class ButtonType extends BaseType implements ButtonTypeInterface -{ - /** - * {@inheritdoc} - */ - public function getParent() - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'button'; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - $resolver->setDefault('auto_initialize', false); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/CheckboxType.php b/vendor/symfony/form/Extension/Core/Type/CheckboxType.php deleted file mode 100644 index 6de35b9..0000000 --- a/vendor/symfony/form/Extension/Core/Type/CheckboxType.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CheckboxType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Unlike in other types, where the data is NULL by default, it - // needs to be a Boolean here. setData(null) is not acceptable - // for checkboxes and radio buttons (unless a custom model - // transformer handles this case). - // We cannot solve this case via overriding the "data" option, because - // doing so also calls setDataLocked(true). - $builder->setData($options['data'] ?? false); - $builder->addViewTransformer(new BooleanToStringTransformer($options['value'], $options['false_values'])); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'value' => $options['value'], - 'checked' => null !== $form->getViewData(), - ]); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $emptyData = function (FormInterface $form, $viewData) { - return $viewData; - }; - - $resolver->setDefaults([ - 'value' => '1', - 'empty_data' => $emptyData, - 'compound' => false, - 'false_values' => [null], - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The checkbox has an invalid value.'; - }, - 'is_empty_callback' => static function ($modelData): bool { - return false === $modelData; - }, - ]); - - $resolver->setAllowedTypes('false_values', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'checkbox'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/ChoiceType.php b/vendor/symfony/form/Extension/Core/Type/ChoiceType.php deleted file mode 100644 index 6b8757c..0000000 --- a/vendor/symfony/form/Extension/Core/Type/ChoiceType.php +++ /dev/null @@ -1,501 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceAttr; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFieldName; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceFilter; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLoader; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceTranslationParameters; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceValue; -use Symfony\Component\Form\ChoiceList\Factory\Cache\GroupBy; -use Symfony\Component\Form\ChoiceList\Factory\Cache\PreferredChoice; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceListView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper; -use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper; -use Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\ChoiceToValueTransformer; -use Symfony\Component\Form\Extension\Core\EventListener\MergeCollectionListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Contracts\Translation\TranslatorInterface; - -class ChoiceType extends AbstractType -{ - private $choiceListFactory; - private $translator; - - /** - * @param TranslatorInterface $translator - */ - public function __construct(ChoiceListFactoryInterface $choiceListFactory = null, $translator = null) - { - $this->choiceListFactory = $choiceListFactory ?? new CachingFactoryDecorator( - new PropertyAccessDecorator( - new DefaultChoiceListFactory() - ) - ); - - if (null !== $translator && !$translator instanceof TranslatorInterface) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be han instance of "%s", "%s" given.', __METHOD__, TranslatorInterface::class, \is_object($translator) ? \get_class($translator) : \gettype($translator))); - } - $this->translator = $translator; - - // BC, to be removed in 6.0 - if ($this->choiceListFactory instanceof CachingFactoryDecorator) { - return; - } - - $ref = new \ReflectionMethod($this->choiceListFactory, 'createListFromChoices'); - - if ($ref->getNumberOfParameters() < 3) { - trigger_deprecation('symfony/form', '5.1', 'Not defining a third parameter "callable|null $filter" in "%s::%s()" is deprecated.', $ref->class, $ref->name); - } - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $unknownValues = []; - $choiceList = $this->createChoiceList($options); - $builder->setAttribute('choice_list', $choiceList); - - if ($options['expanded']) { - $builder->setDataMapper($options['multiple'] ? new CheckboxListMapper() : new RadioListMapper()); - - // Initialize all choices before doing the index check below. - // This helps in cases where index checks are optimized for non - // initialized choice lists. For example, when using an SQL driver, - // the index check would read in one SQL query and the initialization - // requires another SQL query. When the initialization is done first, - // one SQL query is sufficient. - - $choiceListView = $this->createChoiceListView($choiceList, $options); - $builder->setAttribute('choice_list_view', $choiceListView); - - // Check if the choices already contain the empty value - // Only add the placeholder option if this is not the case - if (null !== $options['placeholder'] && 0 === \count($choiceList->getChoicesForValues(['']))) { - $placeholderView = new ChoiceView(null, '', $options['placeholder']); - - // "placeholder" is a reserved name - $this->addSubForm($builder, 'placeholder', $placeholderView, $options); - } - - $this->addSubForms($builder, $choiceListView->preferredChoices, $options); - $this->addSubForms($builder, $choiceListView->choices, $options); - } - - if ($options['expanded'] || $options['multiple']) { - // Make sure that scalar, submitted values are converted to arrays - // which can be submitted to the checkboxes/radio buttons - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($choiceList, $options, &$unknownValues) { - $form = $event->getForm(); - $data = $event->getData(); - - // Since the type always use mapper an empty array will not be - // considered as empty in Form::submit(), we need to evaluate - // empty data here so its value is submitted to sub forms - if (null === $data) { - $emptyData = $form->getConfig()->getEmptyData(); - $data = $emptyData instanceof \Closure ? $emptyData($form, $data) : $emptyData; - } - - // Convert the submitted data to a string, if scalar, before - // casting it to an array - if (!\is_array($data)) { - if ($options['multiple']) { - throw new TransformationFailedException('Expected an array.'); - } - - $data = (array) (string) $data; - } - - // A map from submitted values to integers - $valueMap = array_flip($data); - - // Make a copy of the value map to determine whether any unknown - // values were submitted - $unknownValues = $valueMap; - - // Reconstruct the data as mapping from child names to values - $knownValues = []; - - if ($options['expanded']) { - /** @var FormInterface $child */ - foreach ($form as $child) { - $value = $child->getConfig()->getOption('value'); - - // Add the value to $data with the child's name as key - if (isset($valueMap[$value])) { - $knownValues[$child->getName()] = $value; - unset($unknownValues[$value]); - continue; - } else { - $knownValues[$child->getName()] = null; - } - } - } else { - foreach ($data as $value) { - if ($choiceList->getChoicesForValues([$value])) { - $knownValues[] = $value; - unset($unknownValues[$value]); - } - } - } - - // The empty value is always known, independent of whether a - // field exists for it or not - unset($unknownValues['']); - - // Throw exception if unknown values were submitted (multiple choices will be handled in a different event listener below) - if (\count($unknownValues) > 0 && !$options['multiple']) { - throw new TransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', implode('", "', array_keys($unknownValues)))); - } - - $event->setData($knownValues); - }); - } - - if ($options['multiple']) { - $messageTemplate = $options['invalid_message'] ?? 'The value {{ value }} is not valid.'; - - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use (&$unknownValues, $messageTemplate) { - // Throw exception if unknown values were submitted - if (\count($unknownValues) > 0) { - $form = $event->getForm(); - - $clientDataAsString = is_scalar($form->getViewData()) ? (string) $form->getViewData() : (\is_array($form->getViewData()) ? implode('", "', array_keys($unknownValues)) : \gettype($form->getViewData())); - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, ['{{ value }}' => $clientDataAsString], 'validators'); - } else { - $message = strtr($messageTemplate, ['{{ value }}' => $clientDataAsString]); - } - - $form->addError(new FormError($message, $messageTemplate, ['{{ value }}' => $clientDataAsString], null, new TransformationFailedException(sprintf('The choices "%s" do not exist in the choice list.', $clientDataAsString)))); - } - }); - - // tag without "multiple" option or list of radio inputs - $builder->addViewTransformer(new ChoiceToValueTransformer($choiceList)); - } - - if ($options['multiple'] && $options['by_reference']) { - // Make sure the collection created during the client->norm - // transformation is merged back into the original collection - $builder->addEventSubscriber(new MergeCollectionListener(true, true)); - } - - // To avoid issues when the submitted choices are arrays (i.e. array to string conversions), - // we have to ensure that all elements of the submitted choice data are NULL, strings or ints. - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { - $data = $event->getData(); - - if (!\is_array($data)) { - return; - } - - foreach ($data as $v) { - if (null !== $v && !\is_string($v) && !\is_int($v)) { - throw new TransformationFailedException('All choices submitted must be NULL, strings or ints.'); - } - } - }, 256); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $choiceTranslationDomain = $options['choice_translation_domain']; - if ($view->parent && null === $choiceTranslationDomain) { - $choiceTranslationDomain = $view->vars['translation_domain']; - } - - /** @var ChoiceListInterface $choiceList */ - $choiceList = $form->getConfig()->getAttribute('choice_list'); - - /** @var ChoiceListView $choiceListView */ - $choiceListView = $form->getConfig()->hasAttribute('choice_list_view') - ? $form->getConfig()->getAttribute('choice_list_view') - : $this->createChoiceListView($choiceList, $options); - - $view->vars = array_replace($view->vars, [ - 'multiple' => $options['multiple'], - 'expanded' => $options['expanded'], - 'preferred_choices' => $choiceListView->preferredChoices, - 'choices' => $choiceListView->choices, - 'separator' => '-------------------', - 'placeholder' => null, - 'choice_translation_domain' => $choiceTranslationDomain, - 'choice_translation_parameters' => $options['choice_translation_parameters'], - ]); - - // The decision, whether a choice is selected, is potentially done - // thousand of times during the rendering of a template. Provide a - // closure here that is optimized for the value of the form, to - // avoid making the type check inside the closure. - if ($options['multiple']) { - $view->vars['is_selected'] = function ($choice, array $values) { - return \in_array($choice, $values, true); - }; - } else { - $view->vars['is_selected'] = function ($choice, $value) { - return $choice === $value; - }; - } - - // Check if the choices already contain the empty value - $view->vars['placeholder_in_choices'] = $choiceListView->hasPlaceholder(); - - // Only add the empty value option if this is not the case - if (null !== $options['placeholder'] && !$view->vars['placeholder_in_choices']) { - $view->vars['placeholder'] = $options['placeholder']; - } - - if ($options['multiple'] && !$options['expanded']) { - // Add "[]" to the name in case a select tag with multiple options is - // displayed. Otherwise only one of the selected options is sent in the - // POST request. - $view->vars['full_name'] .= '[]'; - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if ($options['expanded']) { - // Radio buttons should have the same name as the parent - $childName = $view->vars['full_name']; - - // Checkboxes should append "[]" to allow multiple selection - if ($options['multiple']) { - $childName .= '[]'; - } - - foreach ($view as $childView) { - $childView->vars['full_name'] = $childName; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $emptyData = function (Options $options) { - if ($options['expanded'] && !$options['multiple']) { - return null; - } - - if ($options['multiple']) { - return []; - } - - return ''; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) { - if ($options['multiple']) { - // never use an empty value for this case - return null; - } elseif ($options['required'] && ($options['expanded'] || isset($options['attr']['size']) && $options['attr']['size'] > 1)) { - // placeholder for required radio buttons or a select with size > 1 does not make sense - return null; - } elseif (false === $placeholder) { - // an empty value should be added but the user decided otherwise - return null; - } elseif ($options['expanded'] && '' === $placeholder) { - // never use an empty label for radio buttons - return 'None'; - } - - // empty value has been set explicitly - return $placeholder; - }; - - $compound = function (Options $options) { - return $options['expanded']; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (true === $choiceTranslationDomain) { - return $options['translation_domain']; - } - - return $choiceTranslationDomain; - }; - - $resolver->setDefaults([ - 'multiple' => false, - 'expanded' => false, - 'choices' => [], - 'choice_filter' => null, - 'choice_loader' => null, - 'choice_label' => null, - 'choice_name' => null, - 'choice_value' => null, - 'choice_attr' => null, - 'choice_translation_parameters' => [], - 'preferred_choices' => [], - 'group_by' => null, - 'empty_data' => $emptyData, - 'placeholder' => $placeholderDefault, - 'error_bubbling' => false, - 'compound' => $compound, - // The view data is always a string or an array of strings, - // even if the "data" option is manually set to an object. - // See https://github.com/symfony/symfony/pull/5582 - 'data_class' => null, - 'choice_translation_domain' => true, - 'trim' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The selected choice is invalid.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedTypes('choices', ['null', 'array', \Traversable::class]); - $resolver->setAllowedTypes('choice_translation_domain', ['null', 'bool', 'string']); - $resolver->setAllowedTypes('choice_loader', ['null', ChoiceLoaderInterface::class, ChoiceLoader::class]); - $resolver->setAllowedTypes('choice_filter', ['null', 'callable', 'string', PropertyPath::class, ChoiceFilter::class]); - $resolver->setAllowedTypes('choice_label', ['null', 'bool', 'callable', 'string', PropertyPath::class, ChoiceLabel::class]); - $resolver->setAllowedTypes('choice_name', ['null', 'callable', 'string', PropertyPath::class, ChoiceFieldName::class]); - $resolver->setAllowedTypes('choice_value', ['null', 'callable', 'string', PropertyPath::class, ChoiceValue::class]); - $resolver->setAllowedTypes('choice_attr', ['null', 'array', 'callable', 'string', PropertyPath::class, ChoiceAttr::class]); - $resolver->setAllowedTypes('choice_translation_parameters', ['null', 'array', 'callable', ChoiceTranslationParameters::class]); - $resolver->setAllowedTypes('preferred_choices', ['array', \Traversable::class, 'callable', 'string', PropertyPath::class, PreferredChoice::class]); - $resolver->setAllowedTypes('group_by', ['null', 'callable', 'string', PropertyPath::class, GroupBy::class]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'choice'; - } - - /** - * Adds the sub fields for an expanded choice field. - */ - private function addSubForms(FormBuilderInterface $builder, array $choiceViews, array $options) - { - foreach ($choiceViews as $name => $choiceView) { - // Flatten groups - if (\is_array($choiceView)) { - $this->addSubForms($builder, $choiceView, $options); - continue; - } - - if ($choiceView instanceof ChoiceGroupView) { - $this->addSubForms($builder, $choiceView->choices, $options); - continue; - } - - $this->addSubForm($builder, $name, $choiceView, $options); - } - } - - private function addSubForm(FormBuilderInterface $builder, string $name, ChoiceView $choiceView, array $options) - { - $choiceOpts = [ - 'value' => $choiceView->value, - 'label' => $choiceView->label, - 'label_html' => $options['label_html'], - 'attr' => $choiceView->attr, - 'label_translation_parameters' => $choiceView->labelTranslationParameters, - 'translation_domain' => $options['choice_translation_domain'], - 'block_name' => 'entry', - ]; - - if ($options['multiple']) { - $choiceType = CheckboxType::class; - // The user can check 0 or more checkboxes. If required - // is true, they are required to check all of them. - $choiceOpts['required'] = false; - } else { - $choiceType = RadioType::class; - } - - $builder->add($name, $choiceType, $choiceOpts); - } - - private function createChoiceList(array $options) - { - if (null !== $options['choice_loader']) { - return $this->choiceListFactory->createListFromLoader( - $options['choice_loader'], - $options['choice_value'], - $options['choice_filter'] - ); - } - - // Harden against NULL values (like in EntityType and ModelType) - $choices = null !== $options['choices'] ? $options['choices'] : []; - - return $this->choiceListFactory->createListFromChoices( - $choices, - $options['choice_value'], - $options['choice_filter'] - ); - } - - private function createChoiceListView(ChoiceListInterface $choiceList, array $options) - { - return $this->choiceListFactory->createView( - $choiceList, - $options['preferred_choices'], - $options['choice_label'], - $options['choice_name'], - $options['group_by'], - $options['choice_attr'], - $options['choice_translation_parameters'] - ); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/CollectionType.php b/vendor/symfony/form/Extension/Core/Type/CollectionType.php deleted file mode 100644 index 5cabf16..0000000 --- a/vendor/symfony/form/Extension/Core/Type/CollectionType.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CollectionType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ($options['allow_add'] && $options['prototype']) { - $prototypeOptions = array_replace([ - 'required' => $options['required'], - 'label' => $options['prototype_name'].'label__', - ], $options['entry_options']); - - if (null !== $options['prototype_data']) { - $prototypeOptions['data'] = $options['prototype_data']; - } - - $prototype = $builder->create($options['prototype_name'], $options['entry_type'], $prototypeOptions); - $builder->setAttribute('prototype', $prototype->getForm()); - } - - $resizeListener = new ResizeFormListener( - $options['entry_type'], - $options['entry_options'], - $options['allow_add'], - $options['allow_delete'], - $options['delete_empty'] - ); - - $builder->addEventSubscriber($resizeListener); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'allow_add' => $options['allow_add'], - 'allow_delete' => $options['allow_delete'], - ]); - - if ($form->getConfig()->hasAttribute('prototype')) { - $prototype = $form->getConfig()->getAttribute('prototype'); - $view->vars['prototype'] = $prototype->setParent($form)->createView($view); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $prefixOffset = -2; - // check if the entry type also defines a block prefix - /** @var FormInterface $entry */ - foreach ($form as $entry) { - if ($entry->getConfig()->getOption('block_prefix')) { - --$prefixOffset; - } - - break; - } - - foreach ($view as $entryView) { - array_splice($entryView->vars['block_prefixes'], $prefixOffset, 0, 'collection_entry'); - } - - /** @var FormInterface $prototype */ - if ($prototype = $form->getConfig()->getAttribute('prototype')) { - if ($view->vars['prototype']->vars['multipart']) { - $view->vars['multipart'] = true; - } - - if ($prefixOffset > -3 && $prototype->getConfig()->getOption('block_prefix')) { - --$prefixOffset; - } - - array_splice($view->vars['prototype']->vars['block_prefixes'], $prefixOffset, 0, 'collection_entry'); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $entryOptionsNormalizer = function (Options $options, $value) { - $value['block_name'] = 'entry'; - - return $value; - }; - - $resolver->setDefaults([ - 'allow_add' => false, - 'allow_delete' => false, - 'prototype' => true, - 'prototype_data' => null, - 'prototype_name' => '__name__', - 'entry_type' => TextType::class, - 'entry_options' => [], - 'delete_empty' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The collection is invalid.'; - }, - ]); - - $resolver->setNormalizer('entry_options', $entryOptionsNormalizer); - $resolver->setAllowedTypes('delete_empty', ['bool', 'callable']); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'collection'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/ColorType.php b/vendor/symfony/form/Extension/Core/Type/ColorType.php deleted file mode 100644 index f4cc052..0000000 --- a/vendor/symfony/form/Extension/Core/Type/ColorType.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -class ColorType extends AbstractType -{ - /** - * @see https://www.w3.org/TR/html52/sec-forms.html#color-state-typecolor - */ - private const HTML5_PATTERN = '/^#[0-9a-f]{6}$/i'; - - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['html5']) { - return; - } - - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event): void { - $value = $event->getData(); - if (null === $value || '' === $value) { - return; - } - - if (\is_string($value) && preg_match(self::HTML5_PATTERN, $value)) { - return; - } - - $messageTemplate = 'This value is not a valid HTML5 color.'; - $messageParameters = [ - '{{ value }}' => is_scalar($value) ? (string) $value : \gettype($value), - ]; - $message = $this->translator ? $this->translator->trans($messageTemplate, $messageParameters, 'validators') : $messageTemplate; - - $event->getForm()->addError(new FormError($message, $messageTemplate, $messageParameters)); - }); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid color.'; - }, - ]); - - $resolver->setAllowedTypes('html5', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'color'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/CountryType.php b/vendor/symfony/form/Extension/Core/Type/CountryType.php deleted file mode 100644 index 85293bc..0000000 --- a/vendor/symfony/form/Extension/Core/Type/CountryType.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Countries; -use Symfony\Component\Intl\Intl; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CountryType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - $alpha3 = $options['alpha3']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale, $alpha3) { - return array_flip($alpha3 ? Countries::getAlpha3Names($choiceTranslationLocale) : Countries::getNames($choiceTranslationLocale)); - }), [$choiceTranslationLocale, $alpha3]); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'alpha3' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid country.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setAllowedTypes('alpha3', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'country'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/CurrencyType.php b/vendor/symfony/form/Extension/Core/Type/CurrencyType.php deleted file mode 100644 index 427b493..0000000 --- a/vendor/symfony/form/Extension/Core/Type/CurrencyType.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Currencies; -use Symfony\Component\Intl\Intl; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class CurrencyType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale) { - return array_flip(Currencies::getNames($choiceTranslationLocale)); - }), $choiceTranslationLocale); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid currency.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'currency'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/DateIntervalType.php b/vendor/symfony/form/Extension/Core/Type/DateIntervalType.php deleted file mode 100644 index 4c05557..0000000 --- a/vendor/symfony/form/Extension/Core/Type/DateIntervalType.php +++ /dev/null @@ -1,291 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\InvalidConfigurationException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateIntervalToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Steffen Roßkamp - */ -class DateIntervalType extends AbstractType -{ - private const TIME_PARTS = [ - 'years', - 'months', - 'weeks', - 'days', - 'hours', - 'minutes', - 'seconds', - ]; - private const WIDGETS = [ - 'text' => TextType::class, - 'integer' => IntegerType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { - throw new InvalidConfigurationException('You must enable at least one interval field.'); - } - if ($options['with_invert'] && 'single_text' === $options['widget']) { - throw new InvalidConfigurationException('The single_text widget does not support invertible intervals.'); - } - if ($options['with_weeks'] && $options['with_days']) { - throw new InvalidConfigurationException('You cannot enable weeks and days fields together.'); - } - $format = 'P'; - $parts = []; - if ($options['with_years']) { - $format .= '%yY'; - $parts[] = 'years'; - } - if ($options['with_months']) { - $format .= '%mM'; - $parts[] = 'months'; - } - if ($options['with_weeks']) { - $format .= '%wW'; - $parts[] = 'weeks'; - } - if ($options['with_days']) { - $format .= '%dD'; - $parts[] = 'days'; - } - if ($options['with_hours'] || $options['with_minutes'] || $options['with_seconds']) { - $format .= 'T'; - } - if ($options['with_hours']) { - $format .= '%hH'; - $parts[] = 'hours'; - } - if ($options['with_minutes']) { - $format .= '%iM'; - $parts[] = 'minutes'; - } - if ($options['with_seconds']) { - $format .= '%sS'; - $parts[] = 'seconds'; - } - if ($options['with_invert']) { - $parts[] = 'invert'; - } - if ('single_text' === $options['widget']) { - $builder->addViewTransformer(new DateIntervalToStringTransformer($format)); - } else { - foreach (self::TIME_PARTS as $part) { - if ($options['with_'.$part]) { - $childOptions = [ - 'error_bubbling' => true, - 'label' => $options['labels'][$part], - // Append generic carry-along options - 'required' => $options['required'], - 'translation_domain' => $options['translation_domain'], - // when compound the array entries are ignored, we need to cascade the configuration here - 'empty_data' => $options['empty_data'][$part] ?? null, - ]; - if ('choice' === $options['widget']) { - $childOptions['choice_translation_domain'] = false; - $childOptions['choices'] = $options[$part]; - $childOptions['placeholder'] = $options['placeholder'][$part]; - } - $childForm = $builder->create($part, self::WIDGETS[$options['widget']], $childOptions); - if ('integer' === $options['widget']) { - $childForm->addModelTransformer( - new ReversedTransformer( - new IntegerToLocalizedStringTransformer() - ) - ); - } - $builder->add($childForm); - } - } - if ($options['with_invert']) { - $builder->add('invert', CheckboxType::class, [ - 'label' => $options['labels']['invert'], - 'error_bubbling' => true, - 'required' => false, - 'translation_domain' => $options['translation_domain'], - ]); - } - $builder->addViewTransformer(new DateIntervalToArrayTransformer($parts, 'text' === $options['widget'])); - } - if ('string' === $options['input']) { - $builder->addModelTransformer( - new ReversedTransformer( - new DateIntervalToStringTransformer($format) - ) - ); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer( - new ReversedTransformer( - new DateIntervalToArrayTransformer($parts) - ) - ); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $vars = [ - 'widget' => $options['widget'], - 'with_invert' => $options['with_invert'], - ]; - foreach (self::TIME_PARTS as $part) { - $vars['with_'.$part] = $options['with_'.$part]; - } - $view->vars = array_replace($view->vars, $vars); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - $emptyData = function (Options $options) { - return 'single_text' === $options['widget'] ? '' : []; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge(array_fill_keys(self::TIME_PARTS, $default), $placeholder); - } - - return array_fill_keys(self::TIME_PARTS, $placeholder); - }; - - $labelsNormalizer = function (Options $options, array $labels) { - return array_replace([ - 'years' => null, - 'months' => null, - 'days' => null, - 'weeks' => null, - 'hours' => null, - 'minutes' => null, - 'seconds' => null, - 'invert' => 'Negative interval', - ], array_filter($labels, function ($label) { - return null !== $label; - })); - }; - - $resolver->setDefaults([ - 'with_years' => true, - 'with_months' => true, - 'with_days' => true, - 'with_weeks' => false, - 'with_hours' => false, - 'with_minutes' => false, - 'with_seconds' => false, - 'with_invert' => false, - 'years' => range(0, 100), - 'months' => range(0, 12), - 'weeks' => range(0, 52), - 'days' => range(0, 31), - 'hours' => range(0, 24), - 'minutes' => range(0, 60), - 'seconds' => range(0, 60), - 'widget' => 'choice', - 'input' => 'dateinterval', - 'placeholder' => $placeholderDefault, - 'by_reference' => true, - 'error_bubbling' => false, - // If initialized with a \DateInterval object, FormType initializes - // this option to "\DateInterval". Since the internal, normalized - // representation is not \DateInterval, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'empty_data' => $emptyData, - 'labels' => [], - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please choose a valid date interval.'; - }, - ]); - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('labels', $labelsNormalizer); - - $resolver->setAllowedValues( - 'input', - [ - 'dateinterval', - 'string', - 'array', - ] - ); - $resolver->setAllowedValues( - 'widget', - [ - 'single_text', - 'text', - 'integer', - 'choice', - ] - ); - // Don't clone \DateInterval classes, as i.e. format() - // does not work after that - $resolver->setAllowedValues('by_reference', true); - - $resolver->setAllowedTypes('years', 'array'); - $resolver->setAllowedTypes('months', 'array'); - $resolver->setAllowedTypes('weeks', 'array'); - $resolver->setAllowedTypes('days', 'array'); - $resolver->setAllowedTypes('hours', 'array'); - $resolver->setAllowedTypes('minutes', 'array'); - $resolver->setAllowedTypes('seconds', 'array'); - $resolver->setAllowedTypes('with_years', 'bool'); - $resolver->setAllowedTypes('with_months', 'bool'); - $resolver->setAllowedTypes('with_weeks', 'bool'); - $resolver->setAllowedTypes('with_days', 'bool'); - $resolver->setAllowedTypes('with_hours', 'bool'); - $resolver->setAllowedTypes('with_minutes', 'bool'); - $resolver->setAllowedTypes('with_seconds', 'bool'); - $resolver->setAllowedTypes('with_invert', 'bool'); - $resolver->setAllowedTypes('labels', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'dateinterval'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/DateTimeType.php b/vendor/symfony/form/Extension/Core/Type/DateTimeType.php deleted file mode 100644 index 2f397f8..0000000 --- a/vendor/symfony/form/Extension/Core/Type/DateTimeType.php +++ /dev/null @@ -1,362 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DataTransformerChain; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToHtml5LocalDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class DateTimeType extends AbstractType -{ - public const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM; - public const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM; - - /** - * The HTML5 datetime-local format as defined in - * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local. - */ - public const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; - - private const ACCEPTED_FORMATS = [ - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $parts = ['year', 'month', 'day', 'hour']; - $dateParts = ['year', 'month', 'day']; - $timeParts = ['hour']; - - if ($options['with_minutes']) { - $parts[] = 'minute'; - $timeParts[] = 'minute'; - } - - if ($options['with_seconds']) { - $parts[] = 'second'; - $timeParts[] = 'second'; - } - - $dateFormat = \is_int($options['date_format']) ? $options['date_format'] : self::DEFAULT_DATE_FORMAT; - $timeFormat = self::DEFAULT_TIME_FORMAT; - $calendar = \IntlDateFormatter::GREGORIAN; - $pattern = \is_string($options['format']) ? $options['format'] : null; - - if (!\in_array($dateFormat, self::ACCEPTED_FORMATS, true)) { - throw new InvalidOptionsException('The "date_format" option must be one of the IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string representing a custom format.'); - } - - if ('single_text' === $options['widget']) { - if (self::HTML5_FORMAT === $pattern) { - $builder->addViewTransformer(new DateTimeToHtml5LocalDateTimeTransformer( - $options['model_timezone'], - $options['view_timezone'] - )); - } else { - $builder->addViewTransformer(new DateTimeToLocalizedStringTransformer( - $options['model_timezone'], - $options['view_timezone'], - $dateFormat, - $timeFormat, - $calendar, - $pattern - )); - } - } else { - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - // Only pass a subset of the options to children - $dateOptions = array_intersect_key($options, array_flip([ - 'years', - 'months', - 'days', - 'placeholder', - 'choice_translation_domain', - 'required', - 'translation_domain', - 'html5', - 'invalid_message', - 'invalid_message_parameters', - ])); - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $dateOptions['empty_data'] = $lazyEmptyData('date'); - } elseif (isset($emptyData['date'])) { - $dateOptions['empty_data'] = $emptyData['date']; - } - - $timeOptions = array_intersect_key($options, array_flip([ - 'hours', - 'minutes', - 'seconds', - 'with_minutes', - 'with_seconds', - 'placeholder', - 'choice_translation_domain', - 'required', - 'translation_domain', - 'html5', - 'invalid_message', - 'invalid_message_parameters', - ])); - - if ($emptyData instanceof \Closure) { - $timeOptions['empty_data'] = $lazyEmptyData('time'); - } elseif (isset($emptyData['time'])) { - $timeOptions['empty_data'] = $emptyData['time']; - } - - if (false === $options['label']) { - $dateOptions['label'] = false; - $timeOptions['label'] = false; - } - - if (null !== $options['date_widget']) { - $dateOptions['widget'] = $options['date_widget']; - } - - if (null !== $options['date_label']) { - $dateOptions['label'] = $options['date_label']; - } - - if (null !== $options['time_widget']) { - $timeOptions['widget'] = $options['time_widget']; - } - - if (null !== $options['time_label']) { - $timeOptions['label'] = $options['time_label']; - } - - if (null !== $options['date_format']) { - $dateOptions['format'] = $options['date_format']; - } - - $dateOptions['input'] = $timeOptions['input'] = 'array'; - $dateOptions['error_bubbling'] = $timeOptions['error_bubbling'] = true; - - $builder - ->addViewTransformer(new DataTransformerChain([ - new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts), - new ArrayToPartsTransformer([ - 'date' => $dateParts, - 'time' => $timeParts, - ]), - ])) - ->add('date', DateType::class, $dateOptions) - ->add('time', TimeType::class, $timeOptions) - ; - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], $parts) - )); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - // Change the input to an HTML5 datetime input if - // * the widget is set to "single_text" - // * the format matches the one expected by HTML5 - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - $view->vars['type'] = 'datetime-local'; - - // we need to force the browser to display the seconds by - // adding the HTML attribute step if not already defined. - // Otherwise the browser will not display and so not send the seconds - // therefore the value will always be considered as invalid. - if ($options['with_seconds'] && !isset($view->vars['attr']['step'])) { - $view->vars['attr']['step'] = 1; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - // Defaults to the value of "widget" - $dateWidget = function (Options $options) { - return 'single_text' === $options['widget'] ? null : $options['widget']; - }; - - // Defaults to the value of "widget" - $timeWidget = function (Options $options) { - return 'single_text' === $options['widget'] ? null : $options['widget']; - }; - - $resolver->setDefaults([ - 'input' => 'datetime', - 'model_timezone' => null, - 'view_timezone' => null, - 'format' => self::HTML5_FORMAT, - 'date_format' => null, - 'widget' => null, - 'date_widget' => $dateWidget, - 'time_widget' => $timeWidget, - 'with_minutes' => true, - 'with_seconds' => false, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'date_label' => null, - 'time_label' => null, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'input_format' => 'Y-m-d H:i:s', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid date and time.'; - }, - ]); - - // Don't add some defaults in order to preserve the defaults - // set in DateType and TimeType - $resolver->setDefined([ - 'placeholder', - 'choice_translation_domain', - 'years', - 'months', - 'days', - 'hours', - 'minutes', - 'seconds', - ]); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('date_widget', [ - null, // inherit default from DateType - 'single_text', - 'text', - 'choice', - ]); - $resolver->setAllowedValues('time_widget', [ - null, // inherit default from TimeType - 'single_text', - 'text', - 'choice', - ]); - // This option will overwrite "date_widget" and "time_widget" options - $resolver->setAllowedValues('widget', [ - null, // default, don't overwrite options - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('input_format', 'string'); - - $resolver->setNormalizer('date_format', function (Options $options, $dateFormat) { - if (null !== $dateFormat && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - throw new LogicException(sprintf('Cannot use the "date_format" option of the "%s" with an HTML5 date.', self::class)); - } - - return $dateFormat; - }); - $resolver->setNormalizer('date_widget', function (Options $options, $dateWidget) { - if (null !== $dateWidget && 'single_text' === $options['widget']) { - throw new LogicException(sprintf('Cannot use the "date_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class)); - } - - return $dateWidget; - }); - $resolver->setNormalizer('time_widget', function (Options $options, $timeWidget) { - if (null !== $timeWidget && 'single_text' === $options['widget']) { - throw new LogicException(sprintf('Cannot use the "time_widget" option of the "%s" when the "widget" option is set to "single_text".', self::class)); - } - - return $timeWidget; - }); - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'datetime'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/DateType.php b/vendor/symfony/form/Extension/Core/Type/DateType.php deleted file mode 100644 index 1a46a80..0000000 --- a/vendor/symfony/form/Extension/Core/Type/DateType.php +++ /dev/null @@ -1,405 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class DateType extends AbstractType -{ - public const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM; - public const HTML5_FORMAT = 'yyyy-MM-dd'; - - private const ACCEPTED_FORMATS = [ - \IntlDateFormatter::FULL, - \IntlDateFormatter::LONG, - \IntlDateFormatter::MEDIUM, - \IntlDateFormatter::SHORT, - ]; - - private const WIDGETS = [ - 'text' => TextType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $dateFormat = \is_int($options['format']) ? $options['format'] : self::DEFAULT_FORMAT; - $timeFormat = \IntlDateFormatter::NONE; - $calendar = \IntlDateFormatter::GREGORIAN; - $pattern = \is_string($options['format']) ? $options['format'] : ''; - - if (!\in_array($dateFormat, self::ACCEPTED_FORMATS, true)) { - throw new InvalidOptionsException('The "format" option must be one of the IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string representing a custom format.'); - } - - if ('single_text' === $options['widget']) { - if ('' !== $pattern && !str_contains($pattern, 'y') && !str_contains($pattern, 'M') && !str_contains($pattern, 'd')) { - throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" or "d". Its current value is "%s".', $pattern)); - } - - $builder->addViewTransformer(new DateTimeToLocalizedStringTransformer( - $options['model_timezone'], - $options['view_timezone'], - $dateFormat, - $timeFormat, - $calendar, - $pattern - )); - } else { - if ('' !== $pattern && (!str_contains($pattern, 'y') || !str_contains($pattern, 'M') || !str_contains($pattern, 'd'))) { - throw new InvalidOptionsException(sprintf('The "format" option should contain the letters "y", "M" and "d". Its current value is "%s".', $pattern)); - } - - $yearOptions = $monthOptions = $dayOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $yearOptions['empty_data'] = $lazyEmptyData('year'); - $monthOptions['empty_data'] = $lazyEmptyData('month'); - $dayOptions['empty_data'] = $lazyEmptyData('day'); - } else { - if (isset($emptyData['year'])) { - $yearOptions['empty_data'] = $emptyData['year']; - } - if (isset($emptyData['month'])) { - $monthOptions['empty_data'] = $emptyData['month']; - } - if (isset($emptyData['day'])) { - $dayOptions['empty_data'] = $emptyData['day']; - } - } - - if (isset($options['invalid_message'])) { - $dayOptions['invalid_message'] = $options['invalid_message']; - $monthOptions['invalid_message'] = $options['invalid_message']; - $yearOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $dayOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $monthOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - $formatter = new \IntlDateFormatter( - \Locale::getDefault(), - $dateFormat, - $timeFormat, - // see https://bugs.php.net/66323 - class_exists(\IntlTimeZone::class, false) ? \IntlTimeZone::createDefault() : null, - $calendar, - $pattern - ); - - // new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323 - if (!$formatter) { - throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code()); - } - - $formatter->setLenient(false); - - if ('choice' === $options['widget']) { - // Only pass a subset of the options to children - $yearOptions['choices'] = $this->formatTimestamps($formatter, '/y+/', $this->listYears($options['years'])); - $yearOptions['placeholder'] = $options['placeholder']['year']; - $yearOptions['choice_translation_domain'] = $options['choice_translation_domain']['year']; - $monthOptions['choices'] = $this->formatTimestamps($formatter, '/[M|L]+/', $this->listMonths($options['months'])); - $monthOptions['placeholder'] = $options['placeholder']['month']; - $monthOptions['choice_translation_domain'] = $options['choice_translation_domain']['month']; - $dayOptions['choices'] = $this->formatTimestamps($formatter, '/d+/', $this->listDays($options['days'])); - $dayOptions['placeholder'] = $options['placeholder']['day']; - $dayOptions['choice_translation_domain'] = $options['choice_translation_domain']['day']; - } - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $yearOptions[$passOpt] = $monthOptions[$passOpt] = $dayOptions[$passOpt] = $options[$passOpt]; - } - - $builder - ->add('year', self::WIDGETS[$options['widget']], $yearOptions) - ->add('month', self::WIDGETS[$options['widget']], $monthOptions) - ->add('day', self::WIDGETS[$options['widget']], $dayOptions) - ->addViewTransformer(new DateTimeToArrayTransformer( - $options['model_timezone'], $options['view_timezone'], ['year', 'month', 'day'] - )) - ->setAttribute('formatter', $formatter) - ; - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], ['year', 'month', 'day']) - )); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - // Change the input to an HTML5 date input if - // * the widget is set to "single_text" - // * the format matches the one expected by HTML5 - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget'] && self::HTML5_FORMAT === $options['format']) { - $view->vars['type'] = 'date'; - } - - if ($form->getConfig()->hasAttribute('formatter')) { - $pattern = $form->getConfig()->getAttribute('formatter')->getPattern(); - - // remove special characters unless the format was explicitly specified - if (!\is_string($options['format'])) { - // remove quoted strings first - $pattern = preg_replace('/\'[^\']+\'/', '', $pattern); - - // remove remaining special chars - $pattern = preg_replace('/[^yMd]+/', '', $pattern); - } - - // set right order with respect to locale (e.g.: de_DE=dd.MM.yy; en_US=M/d/yy) - // lookup various formats at http://userguide.icu-project.org/formatparse/datetime - if (preg_match('/^([yMd]+)[^yMd]*([yMd]+)[^yMd]*([yMd]+)$/', $pattern)) { - $pattern = preg_replace(['/y+/', '/M+/', '/d+/'], ['{{ year }}', '{{ month }}', '{{ day }}'], $pattern); - } else { - // default fallback - $pattern = '{{ year }}{{ month }}{{ day }}'; - } - - $view->vars['date_pattern'] = $pattern; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['year' => $default, 'month' => $default, 'day' => $default], - $placeholder - ); - } - - return [ - 'year' => $placeholder, - 'month' => $placeholder, - 'day' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['year' => $default, 'month' => $default, 'day' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'year' => $choiceTranslationDomain, - 'month' => $choiceTranslationDomain, - 'day' => $choiceTranslationDomain, - ]; - }; - - $format = function (Options $options) { - return 'single_text' === $options['widget'] ? self::HTML5_FORMAT : self::DEFAULT_FORMAT; - }; - - $resolver->setDefaults([ - 'years' => range((int) date('Y') - 5, (int) date('Y') + 5), - 'months' => range(1, 12), - 'days' => range(1, 31), - 'widget' => 'choice', - 'input' => 'datetime', - 'format' => $format, - 'model_timezone' => null, - 'view_timezone' => null, - 'placeholder' => $placeholderDefault, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'compound' => $compound, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'choice_translation_domain' => false, - 'input_format' => 'Y-m-d', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid date.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('format', ['int', 'string']); - $resolver->setAllowedTypes('years', 'array'); - $resolver->setAllowedTypes('months', 'array'); - $resolver->setAllowedTypes('days', 'array'); - $resolver->setAllowedTypes('input_format', 'string'); - - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && 'single_text' === $options['widget'] && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of "%s" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'date'; - } - - private function formatTimestamps(\IntlDateFormatter $formatter, string $regex, array $timestamps) - { - $pattern = $formatter->getPattern(); - $timezone = $formatter->getTimeZoneId(); - $formattedTimestamps = []; - - $formatter->setTimeZone('UTC'); - - if (preg_match($regex, $pattern, $matches)) { - $formatter->setPattern($matches[0]); - - foreach ($timestamps as $timestamp => $choice) { - $formattedTimestamps[$formatter->format($timestamp)] = $choice; - } - - // I'd like to clone the formatter above, but then we get a - // segmentation fault, so let's restore the old state instead - $formatter->setPattern($pattern); - } - - $formatter->setTimeZone($timezone); - - return $formattedTimestamps; - } - - private function listYears(array $years) - { - $result = []; - - foreach ($years as $year) { - $result[\PHP_INT_SIZE === 4 ? \DateTime::createFromFormat('Y e', $year.' UTC')->format('U') : gmmktime(0, 0, 0, 6, 15, $year)] = $year; - } - - return $result; - } - - private function listMonths(array $months) - { - $result = []; - - foreach ($months as $month) { - $result[gmmktime(0, 0, 0, $month, 15)] = $month; - } - - return $result; - } - - private function listDays(array $days) - { - $result = []; - - foreach ($days as $day) { - $result[gmmktime(0, 0, 0, 5, $day)] = $day; - } - - return $result; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/EmailType.php b/vendor/symfony/form/Extension/Core/Type/EmailType.php deleted file mode 100644 index 486bc02..0000000 --- a/vendor/symfony/form/Extension/Core/Type/EmailType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class EmailType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid email address.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'email'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/EnumType.php b/vendor/symfony/form/Extension/Core/Type/EnumType.php deleted file mode 100644 index c251cdb..0000000 --- a/vendor/symfony/form/Extension/Core/Type/EnumType.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A choice type for native PHP enums. - * - * @author Alexander M. Turek - */ -final class EnumType extends AbstractType -{ - public function configureOptions(OptionsResolver $resolver): void - { - $resolver - ->setRequired(['class']) - ->setAllowedTypes('class', 'string') - ->setAllowedValues('class', \Closure::fromCallable('enum_exists')) - ->setDefault('choices', static function (Options $options): array { - return $options['class']::cases(); - }) - ->setDefault('choice_label', static function (\UnitEnum $choice): string { - return $choice->name; - }) - ->setDefault('choice_value', static function (Options $options): ?\Closure { - if (!is_a($options['class'], \BackedEnum::class, true)) { - return null; - } - - return static function (?\BackedEnum $choice): ?string { - if (null === $choice) { - return null; - } - - return (string) $choice->value; - }; - }) - ; - } - - public function getParent(): string - { - return ChoiceType::class; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/FileType.php b/vendor/symfony/form/Extension/Core/Type/FileType.php deleted file mode 100644 index 36e23ec..0000000 --- a/vendor/symfony/form/Extension/Core/Type/FileType.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FileUploadError; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -class FileType extends AbstractType -{ - public const KIB_BYTES = 1024; - public const MIB_BYTES = 1048576; - - private const SUFFIXES = [ - 1 => 'bytes', - self::KIB_BYTES => 'KiB', - self::MIB_BYTES => 'MiB', - ]; - - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Ensure that submitted data is always an uploaded file or an array of some - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { - $form = $event->getForm(); - $requestHandler = $form->getConfig()->getRequestHandler(); - - if ($options['multiple']) { - $data = []; - $files = $event->getData(); - - if (!\is_array($files)) { - $files = []; - } - - foreach ($files as $file) { - if ($requestHandler->isFileUpload($file)) { - $data[] = $file; - - if (method_exists($requestHandler, 'getUploadFileError') && null !== $errorCode = $requestHandler->getUploadFileError($file)) { - $form->addError($this->getFileUploadError($errorCode)); - } - } - } - - // Since the array is never considered empty in the view data format - // on submission, we need to evaluate the configured empty data here - if ([] === $data) { - $emptyData = $form->getConfig()->getEmptyData(); - $data = $emptyData instanceof \Closure ? $emptyData($form, $data) : $emptyData; - } - - $event->setData($data); - } elseif ($requestHandler->isFileUpload($event->getData()) && method_exists($requestHandler, 'getUploadFileError') && null !== $errorCode = $requestHandler->getUploadFileError($event->getData())) { - $form->addError($this->getFileUploadError($errorCode)); - } elseif (!$requestHandler->isFileUpload($event->getData())) { - $event->setData(null); - } - }); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['multiple']) { - $view->vars['full_name'] .= '[]'; - $view->vars['attr']['multiple'] = 'multiple'; - } - - $view->vars = array_replace($view->vars, [ - 'type' => 'file', - 'value' => '', - ]); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $view->vars['multipart'] = true; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $dataClass = null; - if (class_exists(\Symfony\Component\HttpFoundation\File\File::class)) { - $dataClass = function (Options $options) { - return $options['multiple'] ? null : 'Symfony\Component\HttpFoundation\File\File'; - }; - } - - $emptyData = function (Options $options) { - return $options['multiple'] ? [] : null; - }; - - $resolver->setDefaults([ - 'compound' => false, - 'data_class' => $dataClass, - 'empty_data' => $emptyData, - 'multiple' => false, - 'allow_file_upload' => true, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid file.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'file'; - } - - private function getFileUploadError(int $errorCode) - { - $messageParameters = []; - - if (\UPLOAD_ERR_INI_SIZE === $errorCode) { - [$limitAsString, $suffix] = $this->factorizeSizes(0, self::getMaxFilesize()); - $messageTemplate = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; - $messageParameters = [ - '{{ limit }}' => $limitAsString, - '{{ suffix }}' => $suffix, - ]; - } elseif (\UPLOAD_ERR_FORM_SIZE === $errorCode) { - $messageTemplate = 'The file is too large.'; - } else { - $messageTemplate = 'The file could not be uploaded.'; - } - - if (null !== $this->translator) { - $message = $this->translator->trans($messageTemplate, $messageParameters, 'validators'); - } else { - $message = strtr($messageTemplate, $messageParameters); - } - - return new FileUploadError($message, $messageTemplate, $messageParameters); - } - - /** - * Returns the maximum size of an uploaded file as configured in php.ini. - * - * This method should be kept in sync with Symfony\Component\HttpFoundation\File\UploadedFile::getMaxFilesize(). - * - * @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX) - */ - private static function getMaxFilesize() - { - $iniMax = strtolower(ini_get('upload_max_filesize')); - - if ('' === $iniMax) { - return \PHP_INT_MAX; - } - - $max = ltrim($iniMax, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($iniMax, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Converts the limit to the smallest possible number - * (i.e. try "MB", then "kB", then "bytes"). - * - * This method should be kept in sync with Symfony\Component\Validator\Constraints\FileValidator::factorizeSizes(). - * - * @param int|float $limit - */ - private function factorizeSizes(int $size, $limit) - { - $coef = self::MIB_BYTES; - $coefFactor = self::KIB_BYTES; - - $limitAsString = (string) ($limit / $coef); - - // Restrict the limit to 2 decimals (without rounding! we - // need the precise value) - while (self::moreDecimalsThan($limitAsString, 2)) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - } - - // Convert size to the same measure, but round to 2 decimals - $sizeAsString = (string) round($size / $coef, 2); - - // If the size and limit produce the same string output - // (due to rounding), reduce the coefficient - while ($sizeAsString === $limitAsString) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - $sizeAsString = (string) round($size / $coef, 2); - } - - return [$limitAsString, self::SUFFIXES[$coef]]; - } - - /** - * This method should be kept in sync with Symfony\Component\Validator\Constraints\FileValidator::moreDecimalsThan(). - */ - private static function moreDecimalsThan(string $double, int $numberOfDecimals): bool - { - return \strlen($double) > \strlen(round($double, $numberOfDecimals)); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/FormType.php b/vendor/symfony/form/Extension/Core/Type/FormType.php deleted file mode 100644 index f3bfd4d..0000000 --- a/vendor/symfony/form/Extension/Core/Type/FormType.php +++ /dev/null @@ -1,257 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataAccessor\CallbackAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor; -use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; -use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; -use Symfony\Component\Form\Extension\Core\EventListener\TrimListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormConfigBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Translation\TranslatableMessage; - -class FormType extends BaseType -{ - private $dataMapper; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->dataMapper = new DataMapper(new ChainAccessor([ - new CallbackAccessor(), - new PropertyPathAccessor($propertyAccessor ?? PropertyAccess::createPropertyAccessor()), - ])); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - parent::buildForm($builder, $options); - - $isDataOptionSet = \array_key_exists('data', $options); - - $builder - ->setRequired($options['required']) - ->setErrorBubbling($options['error_bubbling']) - ->setEmptyData($options['empty_data']) - ->setPropertyPath($options['property_path']) - ->setMapped($options['mapped']) - ->setByReference($options['by_reference']) - ->setInheritData($options['inherit_data']) - ->setCompound($options['compound']) - ->setData($isDataOptionSet ? $options['data'] : null) - ->setDataLocked($isDataOptionSet) - ->setDataMapper($options['compound'] ? $this->dataMapper : null) - ->setMethod($options['method']) - ->setAction($options['action']); - - if ($options['trim']) { - $builder->addEventSubscriber(new TrimListener()); - } - - if (!method_exists($builder, 'setIsEmptyCallback')) { - trigger_deprecation('symfony/form', '5.1', 'Not implementing the "%s::setIsEmptyCallback()" method in "%s" is deprecated.', FormConfigBuilderInterface::class, get_debug_type($builder)); - - return; - } - - $builder->setIsEmptyCallback($options['is_empty_callback']); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - parent::buildView($view, $form, $options); - - $name = $form->getName(); - $helpTranslationParameters = $options['help_translation_parameters']; - - if ($view->parent) { - if ('' === $name) { - throw new LogicException('Form node with empty name can be used only as root form node.'); - } - - // Complex fields are read-only if they themselves or their parents are. - if (!isset($view->vars['attr']['readonly']) && isset($view->parent->vars['attr']['readonly']) && false !== $view->parent->vars['attr']['readonly']) { - $view->vars['attr']['readonly'] = true; - } - - $helpTranslationParameters = array_merge($view->parent->vars['help_translation_parameters'], $helpTranslationParameters); - - $rootFormAttrOption = $form->getRoot()->getConfig()->getOption('form_attr'); - if ($options['form_attr'] || $rootFormAttrOption) { - $view->vars['attr']['form'] = \is_string($rootFormAttrOption) ? $rootFormAttrOption : $form->getRoot()->getName(); - if (empty($view->vars['attr']['form'])) { - throw new LogicException('"form_attr" option must be a string identifier on root form when it has no id.'); - } - } - } elseif (\is_string($options['form_attr'])) { - $view->vars['id'] = $options['form_attr']; - } - - $formConfig = $form->getConfig(); - $view->vars = array_replace($view->vars, [ - 'errors' => $form->getErrors(), - 'valid' => $form->isSubmitted() ? $form->isValid() : true, - 'value' => $form->getViewData(), - 'data' => $form->getNormData(), - 'required' => $form->isRequired(), - 'size' => null, - 'label_attr' => $options['label_attr'], - 'help' => $options['help'], - 'help_attr' => $options['help_attr'], - 'help_html' => $options['help_html'], - 'help_translation_parameters' => $helpTranslationParameters, - 'compound' => $formConfig->getCompound(), - 'method' => $formConfig->getMethod(), - 'action' => $formConfig->getAction(), - 'submitted' => $form->isSubmitted(), - ]); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $multipart = false; - - foreach ($view->children as $child) { - if ($child->vars['multipart']) { - $multipart = true; - break; - } - } - - $view->vars['multipart'] = $multipart; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - // Derive "data_class" option from passed "data" object - $dataClass = function (Options $options) { - return isset($options['data']) && \is_object($options['data']) ? \get_class($options['data']) : null; - }; - - // Derive "empty_data" closure from "data_class" option - $emptyData = function (Options $options) { - $class = $options['data_class']; - - if (null !== $class) { - return function (FormInterface $form) use ($class) { - return $form->isEmpty() && !$form->isRequired() ? null : new $class(); - }; - } - - return function (FormInterface $form) { - return $form->getConfig()->getCompound() ? [] : ''; - }; - }; - - // Wrap "post_max_size_message" in a closure to translate it lazily - $uploadMaxSizeMessage = function (Options $options) { - return function () use ($options) { - return $options['post_max_size_message']; - }; - }; - - // For any form that is not represented by a single HTML control, - // errors should bubble up by default - $errorBubbling = function (Options $options) { - return $options['compound'] && !$options['inherit_data']; - }; - - // If data is given, the form is locked to that data - // (independent of its value) - $resolver->setDefined([ - 'data', - ]); - - $resolver->setDefaults([ - 'data_class' => $dataClass, - 'empty_data' => $emptyData, - 'trim' => true, - 'required' => true, - 'property_path' => null, - 'mapped' => true, - 'by_reference' => true, - 'error_bubbling' => $errorBubbling, - 'label_attr' => [], - 'inherit_data' => false, - 'compound' => true, - 'method' => 'POST', - // According to RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) - // section 4.2., empty URIs are considered same-document references - 'action' => '', - 'attr' => [], - 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', - 'upload_max_size_message' => $uploadMaxSizeMessage, // internal - 'allow_file_upload' => false, - 'help' => null, - 'help_attr' => [], - 'help_html' => false, - 'help_translation_parameters' => [], - 'invalid_message' => 'This value is not valid.', - 'invalid_message_parameters' => [], - 'is_empty_callback' => null, - 'getter' => null, - 'setter' => null, - 'form_attr' => false, - ]); - - $resolver->setAllowedTypes('label_attr', 'array'); - $resolver->setAllowedTypes('action', 'string'); - $resolver->setAllowedTypes('upload_max_size_message', ['callable']); - $resolver->setAllowedTypes('help', ['string', 'null', TranslatableMessage::class]); - $resolver->setAllowedTypes('help_attr', 'array'); - $resolver->setAllowedTypes('help_html', 'bool'); - $resolver->setAllowedTypes('is_empty_callback', ['null', 'callable']); - $resolver->setAllowedTypes('getter', ['null', 'callable']); - $resolver->setAllowedTypes('setter', ['null', 'callable']); - $resolver->setAllowedTypes('form_attr', ['bool', 'string']); - - $resolver->setInfo('getter', 'A callable that accepts two arguments (the view data and the current form field) and must return a value.'); - $resolver->setInfo('setter', 'A callable that accepts three arguments (a reference to the view data, the submitted value and the current form field).'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'form'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/HiddenType.php b/vendor/symfony/form/Extension/Core/Type/HiddenType.php deleted file mode 100644 index f4258ec..0000000 --- a/vendor/symfony/form/Extension/Core/Type/HiddenType.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class HiddenType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - // hidden fields cannot have a required attribute - 'required' => false, - // Pass errors to the parent - 'error_bubbling' => true, - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The hidden field is invalid.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'hidden'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/IntegerType.php b/vendor/symfony/form/Extension/Core/Type/IntegerType.php deleted file mode 100644 index a1cd058..0000000 --- a/vendor/symfony/form/Extension/Core/Type/IntegerType.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class IntegerType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new IntegerToLocalizedStringTransformer($options['grouping'], $options['rounding_mode'], !$options['grouping'] ? 'en' : null)); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['grouping']) { - $view->vars['type'] = 'text'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'grouping' => false, - // Integer cast rounds towards 0, so do the same when displaying fractions - 'rounding_mode' => \NumberFormatter::ROUND_DOWN, - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter an integer.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'integer'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/LanguageType.php b/vendor/symfony/form/Extension/Core/Type/LanguageType.php deleted file mode 100644 index 7bcbda2..0000000 --- a/vendor/symfony/form/Extension/Core/Type/LanguageType.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Exception\MissingResourceException; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Languages; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class LanguageType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - $choiceTranslationLocale = $options['choice_translation_locale']; - $useAlpha3Codes = $options['alpha3']; - $choiceSelfTranslation = $options['choice_self_translation']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale, $useAlpha3Codes, $choiceSelfTranslation) { - if (true === $choiceSelfTranslation) { - foreach (Languages::getLanguageCodes() as $alpha2Code) { - try { - $languageCode = $useAlpha3Codes ? Languages::getAlpha3Code($alpha2Code) : $alpha2Code; - $languagesList[$languageCode] = Languages::getName($alpha2Code, $alpha2Code); - } catch (MissingResourceException $e) { - // ignore errors like "Couldn't read the indices for the locale 'meta'" - } - } - } else { - $languagesList = $useAlpha3Codes ? Languages::getAlpha3Names($choiceTranslationLocale) : Languages::getNames($choiceTranslationLocale); - } - - return array_flip($languagesList); - }), [$choiceTranslationLocale, $useAlpha3Codes, $choiceSelfTranslation]); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'alpha3' => false, - 'choice_self_translation' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid language.'; - }, - ]); - - $resolver->setAllowedTypes('choice_self_translation', ['bool']); - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setAllowedTypes('alpha3', 'bool'); - - $resolver->setNormalizer('choice_self_translation', function (Options $options, $value) { - if (true === $value && $options['choice_translation_locale']) { - throw new LogicException('Cannot use the "choice_self_translation" and "choice_translation_locale" options at the same time. Remove one of them.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'language'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/LocaleType.php b/vendor/symfony/form/Extension/Core/Type/LocaleType.php deleted file mode 100644 index 14113e4..0000000 --- a/vendor/symfony/form/Extension/Core/Type/LocaleType.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Locales; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class LocaleType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'choice_loader' => function (Options $options) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($choiceTranslationLocale) { - return array_flip(Locales::getNames($choiceTranslationLocale)); - }), $choiceTranslationLocale); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid locale.'; - }, - ]); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'locale'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/MoneyType.php b/vendor/symfony/form/Extension/Core/Type/MoneyType.php deleted file mode 100644 index 6bf7a20..0000000 --- a/vendor/symfony/form/Extension/Core/Type/MoneyType.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\MoneyToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class MoneyType extends AbstractType -{ - protected static $patterns = []; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Values used in HTML5 number inputs should be formatted as in "1234.5", ie. 'en' format without grouping, - // according to https://www.w3.org/TR/html51/sec-forms.html#date-time-and-number-formats - $builder - ->addViewTransformer(new MoneyToLocalizedStringTransformer( - $options['scale'], - $options['grouping'], - $options['rounding_mode'], - $options['divisor'], - $options['html5'] ? 'en' : null - )) - ; - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['money_pattern'] = self::getPattern($options['currency']); - - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'scale' => 2, - 'grouping' => false, - 'rounding_mode' => \NumberFormatter::ROUND_HALFUP, - 'divisor' => 1, - 'currency' => 'EUR', - 'compound' => false, - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid money amount.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - - $resolver->setAllowedTypes('scale', 'int'); - - $resolver->setAllowedTypes('html5', 'bool'); - - $resolver->setNormalizer('grouping', function (Options $options, $value) { - if ($value && $options['html5']) { - throw new LogicException('Cannot use the "grouping" option when the "html5" option is enabled.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'money'; - } - - /** - * Returns the pattern for this locale in UTF-8. - * - * The pattern contains the placeholder "{{ widget }}" where the HTML tag should - * be inserted - */ - protected static function getPattern(?string $currency) - { - if (!$currency) { - return '{{ widget }}'; - } - - $locale = \Locale::getDefault(); - - if (!isset(self::$patterns[$locale])) { - self::$patterns[$locale] = []; - } - - if (!isset(self::$patterns[$locale][$currency])) { - $format = new \NumberFormatter($locale, \NumberFormatter::CURRENCY); - $pattern = $format->formatCurrency('123', $currency); - - // the spacings between currency symbol and number are ignored, because - // a single space leads to better readability in combination with input - // fields - - // the regex also considers non-break spaces (0xC2 or 0xA0 in UTF-8) - - preg_match('/^([^\s\xc2\xa0]*)[\s\xc2\xa0]*123(?:[,.]0+)?[\s\xc2\xa0]*([^\s\xc2\xa0]*)$/u', $pattern, $matches); - - if (!empty($matches[1])) { - self::$patterns[$locale][$currency] = $matches[1].' {{ widget }}'; - } elseif (!empty($matches[2])) { - self::$patterns[$locale][$currency] = '{{ widget }} '.$matches[2]; - } else { - self::$patterns[$locale][$currency] = '{{ widget }}'; - } - } - - return self::$patterns[$locale][$currency]; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/NumberType.php b/vendor/symfony/form/Extension/Core/Type/NumberType.php deleted file mode 100644 index 2f6ac6c..0000000 --- a/vendor/symfony/form/Extension/Core/Type/NumberType.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\StringToFloatTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class NumberType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new NumberToLocalizedStringTransformer( - $options['scale'], - $options['grouping'], - $options['rounding_mode'], - $options['html5'] ? 'en' : null - )); - - if ('string' === $options['input']) { - $builder->addModelTransformer(new StringToFloatTransformer($options['scale'])); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - // default scale is locale specific (usually around 3) - 'scale' => null, - 'grouping' => false, - 'rounding_mode' => \NumberFormatter::ROUND_HALFUP, - 'compound' => false, - 'input' => 'number', - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a number.'; - }, - ]); - - $resolver->setAllowedValues('rounding_mode', [ - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - $resolver->setAllowedValues('input', ['number', 'string']); - $resolver->setAllowedTypes('scale', ['null', 'int']); - $resolver->setAllowedTypes('html5', 'bool'); - - $resolver->setNormalizer('grouping', function (Options $options, $value) { - if (true === $value && $options['html5']) { - throw new LogicException('Cannot use the "grouping" option when the "html5" option is enabled.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'number'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/PasswordType.php b/vendor/symfony/form/Extension/Core/Type/PasswordType.php deleted file mode 100644 index 779f94d..0000000 --- a/vendor/symfony/form/Extension/Core/Type/PasswordType.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class PasswordType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['always_empty'] || !$form->isSubmitted()) { - $view->vars['value'] = ''; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'always_empty' => true, - 'trim' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The password is invalid.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'password'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/PercentType.php b/vendor/symfony/form/Extension/Core/Type/PercentType.php deleted file mode 100644 index 90e8fa6..0000000 --- a/vendor/symfony/form/Extension/Core/Type/PercentType.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\PercentToLocalizedStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class PercentType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addViewTransformer(new PercentToLocalizedStringTransformer( - $options['scale'], - $options['type'], - $options['rounding_mode'], - $options['html5'] - )); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['symbol'] = $options['symbol']; - - if ($options['html5']) { - $view->vars['type'] = 'number'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'scale' => 0, - 'rounding_mode' => function (Options $options) { - trigger_deprecation('symfony/form', '5.1', 'Not configuring the "rounding_mode" option is deprecated. It will default to "\NumberFormatter::ROUND_HALFUP" in Symfony 6.0.'); - - return null; - }, - 'symbol' => '%', - 'type' => 'fractional', - 'compound' => false, - 'html5' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a percentage value.'; - }, - ]); - - $resolver->setAllowedValues('type', [ - 'fractional', - 'integer', - ]); - $resolver->setAllowedValues('rounding_mode', [ - null, - \NumberFormatter::ROUND_FLOOR, - \NumberFormatter::ROUND_DOWN, - \NumberFormatter::ROUND_HALFDOWN, - \NumberFormatter::ROUND_HALFEVEN, - \NumberFormatter::ROUND_HALFUP, - \NumberFormatter::ROUND_UP, - \NumberFormatter::ROUND_CEILING, - ]); - $resolver->setAllowedTypes('scale', 'int'); - $resolver->setAllowedTypes('symbol', ['bool', 'string']); - $resolver->setDeprecated('rounding_mode', 'symfony/form', '5.1', function (Options $options, $roundingMode) { - if (null === $roundingMode) { - return 'Not configuring the "rounding_mode" option is deprecated. It will default to "\NumberFormatter::ROUND_HALFUP" in Symfony 6.0.'; - } - - return ''; - }); - $resolver->setAllowedTypes('html5', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'percent'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/RadioType.php b/vendor/symfony/form/Extension/Core/Type/RadioType.php deleted file mode 100644 index ed999f5..0000000 --- a/vendor/symfony/form/Extension/Core/Type/RadioType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RadioType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid option.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return CheckboxType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'radio'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/RangeType.php b/vendor/symfony/form/Extension/Core/Type/RangeType.php deleted file mode 100644 index 73ec6e1..0000000 --- a/vendor/symfony/form/Extension/Core/Type/RangeType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RangeType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please choose a valid range.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'range'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/RepeatedType.php b/vendor/symfony/form/Extension/Core/Type/RepeatedType.php deleted file mode 100644 index 16fa1a7..0000000 --- a/vendor/symfony/form/Extension/Core/Type/RepeatedType.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\ValueToDuplicatesTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class RepeatedType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // Overwrite required option for child fields - $options['first_options']['required'] = $options['required']; - $options['second_options']['required'] = $options['required']; - - if (!isset($options['options']['error_bubbling'])) { - $options['options']['error_bubbling'] = $options['error_bubbling']; - } - - // children fields must always be mapped - $defaultOptions = ['mapped' => true]; - - $builder - ->addViewTransformer(new ValueToDuplicatesTransformer([ - $options['first_name'], - $options['second_name'], - ])) - ->add($options['first_name'], $options['type'], array_merge($options['options'], $options['first_options'], $defaultOptions)) - ->add($options['second_name'], $options['type'], array_merge($options['options'], $options['second_options'], $defaultOptions)) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'type' => TextType::class, - 'options' => [], - 'first_options' => [], - 'second_options' => [], - 'first_name' => 'first', - 'second_name' => 'second', - 'error_bubbling' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'The values do not match.'; - }, - ]); - - $resolver->setAllowedTypes('options', 'array'); - $resolver->setAllowedTypes('first_options', 'array'); - $resolver->setAllowedTypes('second_options', 'array'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'repeated'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/ResetType.php b/vendor/symfony/form/Extension/Core/Type/ResetType.php deleted file mode 100644 index ce8013d..0000000 --- a/vendor/symfony/form/Extension/Core/Type/ResetType.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ButtonTypeInterface; - -/** - * A reset button. - * - * @author Bernhard Schussek - */ -class ResetType extends AbstractType implements ButtonTypeInterface -{ - /** - * {@inheritdoc} - */ - public function getParent() - { - return ButtonType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'reset'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/SearchType.php b/vendor/symfony/form/Extension/Core/Type/SearchType.php deleted file mode 100644 index 682277e..0000000 --- a/vendor/symfony/form/Extension/Core/Type/SearchType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class SearchType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid search term.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'search'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/SubmitType.php b/vendor/symfony/form/Extension/Core/Type/SubmitType.php deleted file mode 100644 index 945156e..0000000 --- a/vendor/symfony/form/Extension/Core/Type/SubmitType.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\SubmitButtonTypeInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A submit button. - * - * @author Bernhard Schussek - */ -class SubmitType extends AbstractType implements SubmitButtonTypeInterface -{ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['clicked'] = $form->isClicked(); - - if (!$options['validate']) { - $view->vars['attr']['formnovalidate'] = true; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefault('validate', true); - $resolver->setAllowedTypes('validate', 'bool'); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ButtonType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'submit'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TelType.php b/vendor/symfony/form/Extension/Core/Type/TelType.php deleted file mode 100644 index bc25fd9..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TelType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TelType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please provide a valid phone number.'; - }, - ]); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'tel'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TextType.php b/vendor/symfony/form/Extension/Core/Type/TextType.php deleted file mode 100644 index 72d21c3..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TextType.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\DataTransformerInterface; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TextType extends AbstractType implements DataTransformerInterface -{ - public function buildForm(FormBuilderInterface $builder, array $options) - { - // When empty_data is explicitly set to an empty string, - // a string should always be returned when NULL is submitted - // This gives more control and thus helps preventing some issues - // with PHP 7 which allows type hinting strings in functions - // See https://github.com/symfony/symfony/issues/5906#issuecomment-203189375 - if ('' === $options['empty_data']) { - $builder->addViewTransformer($this); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - ]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'text'; - } - - /** - * {@inheritdoc} - */ - public function transform($data) - { - // Model data should not be transformed - return $data; - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($data) - { - return $data ?? ''; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TextareaType.php b/vendor/symfony/form/Extension/Core/Type/TextareaType.php deleted file mode 100644 index 173b7ef..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TextareaType.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; - -class TextareaType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['pattern'] = null; - unset($view->vars['attr']['pattern']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'textarea'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TimeType.php b/vendor/symfony/form/Extension/Core/Type/TimeType.php deleted file mode 100644 index c4df4a1..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TimeType.php +++ /dev/null @@ -1,386 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\InvalidConfigurationException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDateTimeTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TimeType extends AbstractType -{ - private const WIDGETS = [ - 'text' => TextType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $parts = ['hour']; - $format = 'H'; - - if ($options['with_seconds'] && !$options['with_minutes']) { - throw new InvalidConfigurationException('You cannot disable minutes if you have enabled seconds.'); - } - - if (null !== $options['reference_date'] && $options['reference_date']->getTimezone()->getName() !== $options['model_timezone']) { - throw new InvalidConfigurationException(sprintf('The configured "model_timezone" (%s) must match the timezone of the "reference_date" (%s).', $options['model_timezone'], $options['reference_date']->getTimezone()->getName())); - } - - if ($options['with_minutes']) { - $format .= ':i'; - $parts[] = 'minute'; - } - - if ($options['with_seconds']) { - $format .= ':s'; - $parts[] = 'second'; - } - - if ('single_text' === $options['widget']) { - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $e) use ($options) { - $data = $e->getData(); - if ($data && preg_match('/^(?P\d{2}):(?P\d{2})(?::(?P\d{2})(?:\.\d+)?)?$/', $data, $matches)) { - if ($options['with_seconds']) { - // handle seconds ignored by user's browser when with_seconds enabled - // https://codereview.chromium.org/450533009/ - $e->setData(sprintf('%s:%s:%s', $matches['hours'], $matches['minutes'], $matches['seconds'] ?? '00')); - } else { - $e->setData(sprintf('%s:%s', $matches['hours'], $matches['minutes'])); - } - } - }); - - if (null !== $options['reference_date']) { - $format = 'Y-m-d '.$format; - - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { - $data = $event->getData(); - - if (preg_match('/^\d{2}:\d{2}(:\d{2})?$/', $data)) { - $event->setData($options['reference_date']->format('Y-m-d ').$data); - } - }); - } - - $builder->addViewTransformer(new DateTimeToStringTransformer($options['model_timezone'], $options['view_timezone'], $format)); - } else { - $hourOptions = $minuteOptions = $secondOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - if ($emptyData instanceof \Closure) { - $lazyEmptyData = static function ($option) use ($emptyData) { - return static function (FormInterface $form) use ($emptyData, $option) { - $emptyData = $emptyData($form->getParent()); - - return $emptyData[$option] ?? ''; - }; - }; - - $hourOptions['empty_data'] = $lazyEmptyData('hour'); - } elseif (isset($emptyData['hour'])) { - $hourOptions['empty_data'] = $emptyData['hour']; - } - - if (isset($options['invalid_message'])) { - $hourOptions['invalid_message'] = $options['invalid_message']; - $minuteOptions['invalid_message'] = $options['invalid_message']; - $secondOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $hourOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $minuteOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $secondOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - if ('choice' === $options['widget']) { - $hours = $minutes = []; - - foreach ($options['hours'] as $hour) { - $hours[str_pad($hour, 2, '0', \STR_PAD_LEFT)] = $hour; - } - - // Only pass a subset of the options to children - $hourOptions['choices'] = $hours; - $hourOptions['placeholder'] = $options['placeholder']['hour']; - $hourOptions['choice_translation_domain'] = $options['choice_translation_domain']['hour']; - - if ($options['with_minutes']) { - foreach ($options['minutes'] as $minute) { - $minutes[str_pad($minute, 2, '0', \STR_PAD_LEFT)] = $minute; - } - - $minuteOptions['choices'] = $minutes; - $minuteOptions['placeholder'] = $options['placeholder']['minute']; - $minuteOptions['choice_translation_domain'] = $options['choice_translation_domain']['minute']; - } - - if ($options['with_seconds']) { - $seconds = []; - - foreach ($options['seconds'] as $second) { - $seconds[str_pad($second, 2, '0', \STR_PAD_LEFT)] = $second; - } - - $secondOptions['choices'] = $seconds; - $secondOptions['placeholder'] = $options['placeholder']['second']; - $secondOptions['choice_translation_domain'] = $options['choice_translation_domain']['second']; - } - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $hourOptions[$passOpt] = $options[$passOpt]; - - if ($options['with_minutes']) { - $minuteOptions[$passOpt] = $options[$passOpt]; - } - - if ($options['with_seconds']) { - $secondOptions[$passOpt] = $options[$passOpt]; - } - } - } - - $builder->add('hour', self::WIDGETS[$options['widget']], $hourOptions); - - if ($options['with_minutes']) { - if ($emptyData instanceof \Closure) { - $minuteOptions['empty_data'] = $lazyEmptyData('minute'); - } elseif (isset($emptyData['minute'])) { - $minuteOptions['empty_data'] = $emptyData['minute']; - } - $builder->add('minute', self::WIDGETS[$options['widget']], $minuteOptions); - } - - if ($options['with_seconds']) { - if ($emptyData instanceof \Closure) { - $secondOptions['empty_data'] = $lazyEmptyData('second'); - } elseif (isset($emptyData['second'])) { - $secondOptions['empty_data'] = $emptyData['second']; - } - $builder->add('second', self::WIDGETS[$options['widget']], $secondOptions); - } - - $builder->addViewTransformer(new DateTimeToArrayTransformer($options['model_timezone'], $options['view_timezone'], $parts, 'text' === $options['widget'], $options['reference_date'])); - } - - if ('datetime_immutable' === $options['input']) { - $builder->addModelTransformer(new DateTimeImmutableToDateTimeTransformer()); - } elseif ('string' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToStringTransformer($options['model_timezone'], $options['model_timezone'], $options['input_format']) - )); - } elseif ('timestamp' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToTimestampTransformer($options['model_timezone'], $options['model_timezone']) - )); - } elseif ('array' === $options['input']) { - $builder->addModelTransformer(new ReversedTransformer( - new DateTimeToArrayTransformer($options['model_timezone'], $options['model_timezone'], $parts, 'text' === $options['widget'], $options['reference_date']) - )); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars = array_replace($view->vars, [ - 'widget' => $options['widget'], - 'with_minutes' => $options['with_minutes'], - 'with_seconds' => $options['with_seconds'], - ]); - - // Change the input to an HTML5 time input if - // * the widget is set to "single_text" - // * the html5 is set to true - if ($options['html5'] && 'single_text' === $options['widget']) { - $view->vars['type'] = 'time'; - - // we need to force the browser to display the seconds by - // adding the HTML attribute step if not already defined. - // Otherwise the browser will not display and so not send the seconds - // therefore the value will always be considered as invalid. - if ($options['with_seconds'] && !isset($view->vars['attr']['step'])) { - $view->vars['attr']['step'] = 1; - } - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['hour' => $default, 'minute' => $default, 'second' => $default], - $placeholder - ); - } - - return [ - 'hour' => $placeholder, - 'minute' => $placeholder, - 'second' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['hour' => $default, 'minute' => $default, 'second' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'hour' => $choiceTranslationDomain, - 'minute' => $choiceTranslationDomain, - 'second' => $choiceTranslationDomain, - ]; - }; - - $modelTimezone = static function (Options $options, $value): ?string { - if (null !== $value) { - return $value; - } - - if (null !== $options['reference_date']) { - return $options['reference_date']->getTimezone()->getName(); - } - - return null; - }; - - $viewTimezone = static function (Options $options, $value): ?string { - if (null !== $value) { - return $value; - } - - if (null !== $options['model_timezone'] && null === $options['reference_date']) { - return $options['model_timezone']; - } - - return null; - }; - - $resolver->setDefaults([ - 'hours' => range(0, 23), - 'minutes' => range(0, 59), - 'seconds' => range(0, 59), - 'widget' => 'choice', - 'input' => 'datetime', - 'input_format' => 'H:i:s', - 'with_minutes' => true, - 'with_seconds' => false, - 'model_timezone' => $modelTimezone, - 'view_timezone' => $viewTimezone, - 'reference_date' => null, - 'placeholder' => $placeholderDefault, - 'html5' => true, - // Don't modify \DateTime classes by reference, we treat - // them like immutable value objects - 'by_reference' => false, - 'error_bubbling' => false, - // If initialized with a \DateTime object, FormType initializes - // this option to "\DateTime". Since the internal, normalized - // representation is not \DateTime, but an array, we need to unset - // this option. - 'data_class' => null, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'compound' => $compound, - 'choice_translation_domain' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid time.'; - }, - ]); - - $resolver->setNormalizer('view_timezone', function (Options $options, $viewTimezone): ?string { - if (null !== $options['model_timezone'] && $viewTimezone !== $options['model_timezone'] && null === $options['reference_date']) { - throw new LogicException('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported.'); - } - - return $viewTimezone; - }); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - - $resolver->setAllowedValues('input', [ - 'datetime', - 'datetime_immutable', - 'string', - 'timestamp', - 'array', - ]); - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('hours', 'array'); - $resolver->setAllowedTypes('minutes', 'array'); - $resolver->setAllowedTypes('seconds', 'array'); - $resolver->setAllowedTypes('input_format', 'string'); - $resolver->setAllowedTypes('model_timezone', ['null', 'string']); - $resolver->setAllowedTypes('view_timezone', ['null', 'string']); - $resolver->setAllowedTypes('reference_date', ['null', \DateTimeInterface::class]); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'time'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TimezoneType.php b/vendor/symfony/form/Extension/Core/Type/TimezoneType.php deleted file mode 100644 index 31b5df5..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TimezoneType.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\ChoiceList\ChoiceList; -use Symfony\Component\Form\ChoiceList\Loader\IntlCallbackChoiceLoader; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeZoneToStringTransformer; -use Symfony\Component\Form\Extension\Core\DataTransformer\IntlTimeZoneToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Timezones; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class TimezoneType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ('datetimezone' === $options['input']) { - $builder->addModelTransformer(new DateTimeZoneToStringTransformer($options['multiple'])); - } elseif ('intltimezone' === $options['input']) { - $builder->addModelTransformer(new IntlTimeZoneToStringTransformer($options['multiple'])); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'intl' => false, - 'choice_loader' => function (Options $options) { - $input = $options['input']; - - if ($options['intl']) { - if (!class_exists(Intl::class)) { - throw new LogicException(sprintf('The "symfony/intl" component is required to use "%s" with option "intl=true". Try running "composer require symfony/intl".', static::class)); - } - - $choiceTranslationLocale = $options['choice_translation_locale']; - - return ChoiceList::loader($this, new IntlCallbackChoiceLoader(function () use ($input, $choiceTranslationLocale) { - return self::getIntlTimezones($input, $choiceTranslationLocale); - }), [$input, $choiceTranslationLocale]); - } - - return ChoiceList::lazy($this, function () use ($input) { - return self::getPhpTimezones($input); - }, $input); - }, - 'choice_translation_domain' => false, - 'choice_translation_locale' => null, - 'input' => 'string', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please select a valid timezone.'; - }, - 'regions' => \DateTimeZone::ALL, - ]); - - $resolver->setAllowedTypes('intl', ['bool']); - - $resolver->setAllowedTypes('choice_translation_locale', ['null', 'string']); - $resolver->setNormalizer('choice_translation_locale', function (Options $options, $value) { - if (null !== $value && !$options['intl']) { - throw new LogicException('The "choice_translation_locale" option can only be used if the "intl" option is set to true.'); - } - - return $value; - }); - - $resolver->setAllowedValues('input', ['string', 'datetimezone', 'intltimezone']); - $resolver->setNormalizer('input', function (Options $options, $value) { - if ('intltimezone' === $value && !class_exists(\IntlTimeZone::class)) { - throw new LogicException('Cannot use "intltimezone" input because the PHP intl extension is not available.'); - } - - return $value; - }); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return ChoiceType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'timezone'; - } - - private static function getPhpTimezones(string $input): array - { - $timezones = []; - - foreach (\DateTimeZone::listIdentifiers(\DateTimeZone::ALL) as $timezone) { - if ('intltimezone' === $input && 'Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { - continue; - } - - $timezones[str_replace(['/', '_'], [' / ', ' '], $timezone)] = $timezone; - } - - return $timezones; - } - - private static function getIntlTimezones(string $input, string $locale = null): array - { - $timezones = array_flip(Timezones::getNames($locale)); - - if ('intltimezone' === $input) { - foreach ($timezones as $name => $timezone) { - if ('Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { - unset($timezones[$name]); - } - } - } - - return $timezones; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/TransformationFailureExtension.php b/vendor/symfony/form/Extension/Core/Type/TransformationFailureExtension.php deleted file mode 100644 index f766633..0000000 --- a/vendor/symfony/form/Extension/Core/Type/TransformationFailureExtension.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\EventListener\TransformationFailureListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Christian Flothmann - */ -class TransformationFailureExtension extends AbstractTypeExtension -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!isset($options['constraints'])) { - $builder->addEventSubscriber(new TransformationFailureListener($this->translator)); - } - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/UlidType.php b/vendor/symfony/form/Extension/Core/Type/UlidType.php deleted file mode 100644 index 640d38f..0000000 --- a/vendor/symfony/form/Extension/Core/Type/UlidType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\UlidToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Pavel Dyakonov - */ -class UlidType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder - ->addViewTransformer(new UlidToStringTransformer()) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid ULID.'; - }, - ]); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/UrlType.php b/vendor/symfony/form/Extension/Core/Type/UrlType.php deleted file mode 100644 index f294a10..0000000 --- a/vendor/symfony/form/Extension/Core/Type/UrlType.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class UrlType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (null !== $options['default_protocol']) { - $builder->addEventSubscriber(new FixUrlProtocolListener($options['default_protocol'])); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if ($options['default_protocol']) { - $view->vars['attr']['inputmode'] = 'url'; - $view->vars['type'] = 'text'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'default_protocol' => 'http', - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid URL.'; - }, - ]); - - $resolver->setAllowedTypes('default_protocol', ['null', 'string']); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return TextType::class; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'url'; - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/UuidType.php b/vendor/symfony/form/Extension/Core/Type/UuidType.php deleted file mode 100644 index 0c27802..0000000 --- a/vendor/symfony/form/Extension/Core/Type/UuidType.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\DataTransformer\UuidToStringTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Pavel Dyakonov - */ -class UuidType extends AbstractType -{ - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder - ->addViewTransformer(new UuidToStringTransformer()) - ; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'compound' => false, - 'invalid_message' => function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) - ? $previousValue - : 'Please enter a valid UUID.'; - }, - ]); - } -} diff --git a/vendor/symfony/form/Extension/Core/Type/WeekType.php b/vendor/symfony/form/Extension/Core/Type/WeekType.php deleted file mode 100644 index b7f8887..0000000 --- a/vendor/symfony/form/Extension/Core/Type/WeekType.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Extension\Core\DataTransformer\WeekToArrayTransformer; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ReversedTransformer; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class WeekType extends AbstractType -{ - private const WIDGETS = [ - 'text' => IntegerType::class, - 'choice' => ChoiceType::class, - ]; - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if ('string' === $options['input']) { - $builder->addModelTransformer(new WeekToArrayTransformer()); - } - - if ('single_text' === $options['widget']) { - $builder->addViewTransformer(new ReversedTransformer(new WeekToArrayTransformer())); - } else { - $yearOptions = $weekOptions = [ - 'error_bubbling' => true, - 'empty_data' => '', - ]; - // when the form is compound the entries of the array are ignored in favor of children data - // so we need to handle the cascade setting here - $emptyData = $builder->getEmptyData() ?: []; - - $yearOptions['empty_data'] = $emptyData['year'] ?? ''; - $weekOptions['empty_data'] = $emptyData['week'] ?? ''; - - if (isset($options['invalid_message'])) { - $yearOptions['invalid_message'] = $options['invalid_message']; - $weekOptions['invalid_message'] = $options['invalid_message']; - } - - if (isset($options['invalid_message_parameters'])) { - $yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - $weekOptions['invalid_message_parameters'] = $options['invalid_message_parameters']; - } - - if ('choice' === $options['widget']) { - // Only pass a subset of the options to children - $yearOptions['choices'] = array_combine($options['years'], $options['years']); - $yearOptions['placeholder'] = $options['placeholder']['year']; - $yearOptions['choice_translation_domain'] = $options['choice_translation_domain']['year']; - - $weekOptions['choices'] = array_combine($options['weeks'], $options['weeks']); - $weekOptions['placeholder'] = $options['placeholder']['week']; - $weekOptions['choice_translation_domain'] = $options['choice_translation_domain']['week']; - - // Append generic carry-along options - foreach (['required', 'translation_domain'] as $passOpt) { - $yearOptions[$passOpt] = $options[$passOpt]; - $weekOptions[$passOpt] = $options[$passOpt]; - } - } - - $builder->add('year', self::WIDGETS[$options['widget']], $yearOptions); - $builder->add('week', self::WIDGETS[$options['widget']], $weekOptions); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $view->vars['widget'] = $options['widget']; - - if ($options['html5']) { - $view->vars['type'] = 'week'; - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $compound = function (Options $options) { - return 'single_text' !== $options['widget']; - }; - - $placeholderDefault = function (Options $options) { - return $options['required'] ? null : ''; - }; - - $placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) { - if (\is_array($placeholder)) { - $default = $placeholderDefault($options); - - return array_merge( - ['year' => $default, 'week' => $default], - $placeholder - ); - } - - return [ - 'year' => $placeholder, - 'week' => $placeholder, - ]; - }; - - $choiceTranslationDomainNormalizer = function (Options $options, $choiceTranslationDomain) { - if (\is_array($choiceTranslationDomain)) { - $default = false; - - return array_replace( - ['year' => $default, 'week' => $default], - $choiceTranslationDomain - ); - } - - return [ - 'year' => $choiceTranslationDomain, - 'week' => $choiceTranslationDomain, - ]; - }; - - $resolver->setDefaults([ - 'years' => range(date('Y') - 10, date('Y') + 10), - 'weeks' => array_combine(range(1, 53), range(1, 53)), - 'widget' => 'single_text', - 'input' => 'array', - 'placeholder' => $placeholderDefault, - 'html5' => static function (Options $options) { - return 'single_text' === $options['widget']; - }, - 'error_bubbling' => false, - 'empty_data' => function (Options $options) { - return $options['compound'] ? [] : ''; - }, - 'compound' => $compound, - 'choice_translation_domain' => false, - 'invalid_message' => static function (Options $options, $previousValue) { - return ($options['legacy_error_messages'] ?? true) ? $previousValue : 'Please enter a valid week.'; - }, - ]); - - $resolver->setNormalizer('placeholder', $placeholderNormalizer); - $resolver->setNormalizer('choice_translation_domain', $choiceTranslationDomainNormalizer); - $resolver->setNormalizer('html5', function (Options $options, $html5) { - if ($html5 && 'single_text' !== $options['widget']) { - throw new LogicException(sprintf('The "widget" option of "%s" must be set to "single_text" when the "html5" option is enabled.', self::class)); - } - - return $html5; - }); - - $resolver->setAllowedValues('input', [ - 'string', - 'array', - ]); - - $resolver->setAllowedValues('widget', [ - 'single_text', - 'text', - 'choice', - ]); - - $resolver->setAllowedTypes('years', 'int[]'); - $resolver->setAllowedTypes('weeks', 'int[]'); - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return 'week'; - } -} diff --git a/vendor/symfony/form/Extension/Csrf/CsrfExtension.php b/vendor/symfony/form/Extension/Csrf/CsrfExtension.php deleted file mode 100644 index 609a371..0000000 --- a/vendor/symfony/form/Extension/Csrf/CsrfExtension.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * This extension protects forms by using a CSRF token. - * - * @author Bernhard Schussek - */ -class CsrfExtension extends AbstractExtension -{ - private $tokenManager; - private $translator; - private $translationDomain; - - public function __construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, string $translationDomain = null) - { - $this->tokenManager = $tokenManager; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - } - - /** - * {@inheritdoc} - */ - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeCsrfExtension($this->tokenManager, true, '_token', $this->translator, $this->translationDomain), - ]; - } -} diff --git a/vendor/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php b/vendor/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php deleted file mode 100644 index 37548ef..0000000 --- a/vendor/symfony/form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class CsrfValidationListener implements EventSubscriberInterface -{ - private $fieldName; - private $tokenManager; - private $tokenId; - private $errorMessage; - private $translator; - private $translationDomain; - private $serverParams; - - public static function getSubscribedEvents() - { - return [ - FormEvents::PRE_SUBMIT => 'preSubmit', - ]; - } - - public function __construct(string $fieldName, CsrfTokenManagerInterface $tokenManager, string $tokenId, string $errorMessage, TranslatorInterface $translator = null, string $translationDomain = null, ServerParams $serverParams = null) - { - $this->fieldName = $fieldName; - $this->tokenManager = $tokenManager; - $this->tokenId = $tokenId; - $this->errorMessage = $errorMessage; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->serverParams = $serverParams ?? new ServerParams(); - } - - public function preSubmit(FormEvent $event) - { - $form = $event->getForm(); - $postRequestSizeExceeded = 'POST' === $form->getConfig()->getMethod() && $this->serverParams->hasPostMaxSizeBeenExceeded(); - - if ($form->isRoot() && $form->getConfig()->getOption('compound') && !$postRequestSizeExceeded) { - $data = $event->getData(); - - $csrfValue = \is_string($data[$this->fieldName] ?? null) ? $data[$this->fieldName] : null; - $csrfToken = new CsrfToken($this->tokenId, $csrfValue); - - if (null === $csrfValue || !$this->tokenManager->isTokenValid($csrfToken)) { - $errorMessage = $this->errorMessage; - - if (null !== $this->translator) { - $errorMessage = $this->translator->trans($errorMessage, [], $this->translationDomain); - } - - $form->addError(new FormError($errorMessage, $errorMessage, [], null, $csrfToken)); - } - - if (\is_array($data)) { - unset($data[$this->fieldName]); - $event->setData($data); - } - } - } -} diff --git a/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php deleted file mode 100644 index cd17b8e..0000000 --- a/vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Csrf\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\HiddenType; -use Symfony\Component\Form\Extension\Csrf\EventListener\CsrfValidationListener; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeCsrfExtension extends AbstractTypeExtension -{ - private $defaultTokenManager; - private $defaultEnabled; - private $defaultFieldName; - private $translator; - private $translationDomain; - private $serverParams; - - public function __construct(CsrfTokenManagerInterface $defaultTokenManager, bool $defaultEnabled = true, string $defaultFieldName = '_token', TranslatorInterface $translator = null, string $translationDomain = null, ServerParams $serverParams = null) - { - $this->defaultTokenManager = $defaultTokenManager; - $this->defaultEnabled = $defaultEnabled; - $this->defaultFieldName = $defaultFieldName; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->serverParams = $serverParams; - } - - /** - * Adds a CSRF field to the form when the CSRF protection is enabled. - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (!$options['csrf_protection']) { - return; - } - - $builder - ->addEventSubscriber(new CsrfValidationListener( - $options['csrf_field_name'], - $options['csrf_token_manager'], - $options['csrf_token_id'] ?: ($builder->getName() ?: \get_class($builder->getType()->getInnerType())), - $options['csrf_message'], - $this->translator, - $this->translationDomain, - $this->serverParams - )) - ; - } - - /** - * Adds a CSRF field to the root form view. - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if ($options['csrf_protection'] && !$view->parent && $options['compound']) { - $factory = $form->getConfig()->getFormFactory(); - $tokenId = $options['csrf_token_id'] ?: ($form->getName() ?: \get_class($form->getConfig()->getType()->getInnerType())); - $data = (string) $options['csrf_token_manager']->getToken($tokenId); - - $csrfForm = $factory->createNamed($options['csrf_field_name'], HiddenType::class, $data, [ - 'block_prefix' => 'csrf_token', - 'mapped' => false, - ]); - - $view->children[$options['csrf_field_name']] = $csrfForm->createView($view); - } - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'csrf_protection' => $this->defaultEnabled, - 'csrf_field_name' => $this->defaultFieldName, - 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', - 'csrf_token_manager' => $this->defaultTokenManager, - 'csrf_token_id' => null, - ]); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/DataCollectorExtension.php b/vendor/symfony/form/Extension/DataCollector/DataCollectorExtension.php deleted file mode 100644 index 4b23513..0000000 --- a/vendor/symfony/form/Extension/DataCollector/DataCollectorExtension.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\AbstractExtension; - -/** - * Extension for collecting data of the forms on a page. - * - * @author Robert Schönthal - * @author Bernhard Schussek - */ -class DataCollectorExtension extends AbstractExtension -{ - private $dataCollector; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - protected function loadTypeExtensions() - { - return [ - new Type\DataCollectorTypeExtension($this->dataCollector), - ]; - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php b/vendor/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php deleted file mode 100644 index 77595ab..0000000 --- a/vendor/symfony/form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; - -/** - * Listener that invokes a data collector for the {@link FormEvents::POST_SET_DATA} - * and {@link FormEvents::POST_SUBMIT} events. - * - * @author Bernhard Schussek - */ -class DataCollectorListener implements EventSubscriberInterface -{ - private $dataCollector; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - // High priority in order to be called as soon as possible - FormEvents::POST_SET_DATA => ['postSetData', 255], - // Low priority in order to be called as late as possible - FormEvents::POST_SUBMIT => ['postSubmit', -255], - ]; - } - - /** - * Listener for the {@link FormEvents::POST_SET_DATA} event. - */ - public function postSetData(FormEvent $event) - { - if ($event->getForm()->isRoot()) { - // Collect basic information about each form - $this->dataCollector->collectConfiguration($event->getForm()); - - // Collect the default data - $this->dataCollector->collectDefaultData($event->getForm()); - } - } - - /** - * Listener for the {@link FormEvents::POST_SUBMIT} event. - */ - public function postSubmit(FormEvent $event) - { - if ($event->getForm()->isRoot()) { - // Collect the submitted data of each form - $this->dataCollector->collectSubmittedData($event->getForm()); - - // Assemble a form tree - // This is done again after the view is built, but we need it here as the view is not always created. - $this->dataCollector->buildPreliminaryFormTree($event->getForm()); - } - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/FormDataCollector.php b/vendor/symfony/form/Extension/DataCollector/FormDataCollector.php deleted file mode 100644 index 2fe2fbe..0000000 --- a/vendor/symfony/form/Extension/DataCollector/FormDataCollector.php +++ /dev/null @@ -1,343 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\Validator\ConstraintViolationInterface; -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Caster\ClassStub; -use Symfony\Component\VarDumper\Caster\StubCaster; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Data collector for {@link FormInterface} instances. - * - * @author Robert Schönthal - * @author Bernhard Schussek - * - * @final - */ -class FormDataCollector extends DataCollector implements FormDataCollectorInterface -{ - private $dataExtractor; - - /** - * Stores the collected data per {@link FormInterface} instance. - * - * Uses the hashes of the forms as keys. This is preferable over using - * {@link \SplObjectStorage}, because in this way no references are kept - * to the {@link FormInterface} instances. - * - * @var array - */ - private $dataByForm; - - /** - * Stores the collected data per {@link FormView} instance. - * - * Uses the hashes of the views as keys. This is preferable over using - * {@link \SplObjectStorage}, because in this way no references are kept - * to the {@link FormView} instances. - * - * @var array - */ - private $dataByView; - - /** - * Connects {@link FormView} with {@link FormInterface} instances. - * - * Uses the hashes of the views as keys and the hashes of the forms as - * values. This is preferable over storing the objects directly, because - * this way they can safely be discarded by the GC. - * - * @var array - */ - private $formsByView; - - public function __construct(FormDataExtractorInterface $dataExtractor) - { - if (!class_exists(ClassStub::class)) { - throw new \LogicException(sprintf('The VarDumper component is needed for using the "%s" class. Install symfony/var-dumper version 3.4 or above.', __CLASS__)); - } - - $this->dataExtractor = $dataExtractor; - - $this->reset(); - } - - /** - * Does nothing. The data is collected during the form event listeners. - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - } - - public function reset() - { - $this->data = [ - 'forms' => [], - 'forms_by_hash' => [], - 'nb_errors' => 0, - ]; - } - - /** - * {@inheritdoc} - */ - public function associateFormWithView(FormInterface $form, FormView $view) - { - $this->formsByView[spl_object_hash($view)] = spl_object_hash($form); - } - - /** - * {@inheritdoc} - */ - public function collectConfiguration(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - $this->dataByForm[$hash] = []; - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractConfiguration($form) - ); - - foreach ($form as $child) { - $this->collectConfiguration($child); - } - } - - /** - * {@inheritdoc} - */ - public function collectDefaultData(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - // field was created by form event - $this->collectConfiguration($form); - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractDefaultData($form) - ); - - foreach ($form as $child) { - $this->collectDefaultData($child); - } - } - - /** - * {@inheritdoc} - */ - public function collectSubmittedData(FormInterface $form) - { - $hash = spl_object_hash($form); - - if (!isset($this->dataByForm[$hash])) { - // field was created by form event - $this->collectConfiguration($form); - $this->collectDefaultData($form); - } - - $this->dataByForm[$hash] = array_replace( - $this->dataByForm[$hash], - $this->dataExtractor->extractSubmittedData($form) - ); - - // Count errors - if (isset($this->dataByForm[$hash]['errors'])) { - $this->data['nb_errors'] += \count($this->dataByForm[$hash]['errors']); - } - - foreach ($form as $child) { - $this->collectSubmittedData($child); - - // Expand current form if there are children with errors - if (empty($this->dataByForm[$hash]['has_children_error'])) { - $childData = $this->dataByForm[spl_object_hash($child)]; - $this->dataByForm[$hash]['has_children_error'] = !empty($childData['has_children_error']) || !empty($childData['errors']); - } - } - } - - /** - * {@inheritdoc} - */ - public function collectViewVariables(FormView $view) - { - $hash = spl_object_hash($view); - - if (!isset($this->dataByView[$hash])) { - $this->dataByView[$hash] = []; - } - - $this->dataByView[$hash] = array_replace( - $this->dataByView[$hash], - $this->dataExtractor->extractViewVariables($view) - ); - - foreach ($view->children as $child) { - $this->collectViewVariables($child); - } - } - - /** - * {@inheritdoc} - */ - public function buildPreliminaryFormTree(FormInterface $form) - { - $this->data['forms'][$form->getName()] = &$this->recursiveBuildPreliminaryFormTree($form, $this->data['forms_by_hash']); - } - - /** - * {@inheritdoc} - */ - public function buildFinalFormTree(FormInterface $form, FormView $view) - { - $this->data['forms'][$form->getName()] = &$this->recursiveBuildFinalFormTree($form, $view, $this->data['forms_by_hash']); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'form'; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - return $this->data; - } - - /** - * @internal - */ - public function __sleep(): array - { - foreach ($this->data['forms_by_hash'] as &$form) { - if (isset($form['type_class']) && !$form['type_class'] instanceof ClassStub) { - $form['type_class'] = new ClassStub($form['type_class']); - } - } - - $this->data = $this->cloneVar($this->data); - - return parent::__sleep(); - } - - /** - * {@inheritdoc} - */ - protected function getCasters(): array - { - return parent::getCasters() + [ - \Exception::class => function (\Exception $e, array $a, Stub $s) { - foreach (["\0Exception\0previous", "\0Exception\0trace"] as $k) { - if (isset($a[$k])) { - unset($a[$k]); - ++$s->cut; - } - } - - return $a; - }, - FormInterface::class => function (FormInterface $f, array $a) { - return [ - Caster::PREFIX_VIRTUAL.'name' => $f->getName(), - Caster::PREFIX_VIRTUAL.'type_class' => new ClassStub(\get_class($f->getConfig()->getType()->getInnerType())), - ]; - }, - FormView::class => [StubCaster::class, 'cutInternals'], - ConstraintViolationInterface::class => function (ConstraintViolationInterface $v, array $a) { - return [ - Caster::PREFIX_VIRTUAL.'root' => $v->getRoot(), - Caster::PREFIX_VIRTUAL.'path' => $v->getPropertyPath(), - Caster::PREFIX_VIRTUAL.'value' => $v->getInvalidValue(), - ]; - }, - ]; - } - - private function &recursiveBuildPreliminaryFormTree(FormInterface $form, array &$outputByHash) - { - $hash = spl_object_hash($form); - - $output = &$outputByHash[$hash]; - $output = $this->dataByForm[$hash] - ?? []; - - $output['children'] = []; - - foreach ($form as $name => $child) { - $output['children'][$name] = &$this->recursiveBuildPreliminaryFormTree($child, $outputByHash); - } - - return $output; - } - - private function &recursiveBuildFinalFormTree(FormInterface $form = null, FormView $view, array &$outputByHash) - { - $viewHash = spl_object_hash($view); - $formHash = null; - - if (null !== $form) { - $formHash = spl_object_hash($form); - } elseif (isset($this->formsByView[$viewHash])) { - // The FormInterface instance of the CSRF token is never contained in - // the FormInterface tree of the form, so we need to get the - // corresponding FormInterface instance for its view in a different way - $formHash = $this->formsByView[$viewHash]; - } - if (null !== $formHash) { - $output = &$outputByHash[$formHash]; - } - - $output = $this->dataByView[$viewHash] - ?? []; - - if (null !== $formHash) { - $output = array_replace( - $output, - $this->dataByForm[$formHash] - ?? [] - ); - } - - $output['children'] = []; - - foreach ($view->children as $name => $childView) { - // The CSRF token, for example, is never added to the form tree. - // It is only present in the view. - $childForm = null !== $form && $form->has($name) - ? $form->get($name) - : null; - - $output['children'][$name] = &$this->recursiveBuildFinalFormTree($childForm, $childView, $outputByHash); - } - - return $output; - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php b/vendor/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php deleted file mode 100644 index 64b8f83..0000000 --- a/vendor/symfony/form/Extension/DataCollector/FormDataCollectorInterface.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * Collects and structures information about forms. - * - * @author Bernhard Schussek - */ -interface FormDataCollectorInterface extends DataCollectorInterface -{ - /** - * Stores configuration data of the given form and its children. - */ - public function collectConfiguration(FormInterface $form); - - /** - * Stores the default data of the given form and its children. - */ - public function collectDefaultData(FormInterface $form); - - /** - * Stores the submitted data of the given form and its children. - */ - public function collectSubmittedData(FormInterface $form); - - /** - * Stores the view variables of the given form view and its children. - */ - public function collectViewVariables(FormView $view); - - /** - * Specifies that the given objects represent the same conceptual form. - */ - public function associateFormWithView(FormInterface $form, FormView $view); - - /** - * Assembles the data collected about the given form and its children as - * a tree-like data structure. - * - * The result can be queried using {@link getData()}. - */ - public function buildPreliminaryFormTree(FormInterface $form); - - /** - * Assembles the data collected about the given form and its children as - * a tree-like data structure. - * - * The result can be queried using {@link getData()}. - * - * Contrary to {@link buildPreliminaryFormTree()}, a {@link FormView} - * object has to be passed. The tree structure of this view object will be - * used for structuring the resulting data. That means, if a child is - * present in the view, but not in the form, it will be present in the final - * data array anyway. - * - * When {@link FormView} instances are present in the view tree, for which - * no corresponding {@link FormInterface} objects can be found in the form - * tree, only the view data will be included in the result. If a - * corresponding {@link FormInterface} exists otherwise, call - * {@link associateFormWithView()} before calling this method. - */ - public function buildFinalFormTree(FormInterface $form, FormView $view); - - /** - * Returns all collected data. - * - * @return array|Data - */ - public function getData(); -} diff --git a/vendor/symfony/form/Extension/DataCollector/FormDataExtractor.php b/vendor/symfony/form/Extension/DataCollector/FormDataExtractor.php deleted file mode 100644 index 9cecc72..0000000 --- a/vendor/symfony/form/Extension/DataCollector/FormDataExtractor.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Validator\ConstraintViolationInterface; - -/** - * Default implementation of {@link FormDataExtractorInterface}. - * - * @author Bernhard Schussek - */ -class FormDataExtractor implements FormDataExtractorInterface -{ - /** - * {@inheritdoc} - */ - public function extractConfiguration(FormInterface $form) - { - $data = [ - 'id' => $this->buildId($form), - 'name' => $form->getName(), - 'type_class' => \get_class($form->getConfig()->getType()->getInnerType()), - 'synchronized' => $form->isSynchronized(), - 'passed_options' => [], - 'resolved_options' => [], - ]; - - foreach ($form->getConfig()->getAttribute('data_collector/passed_options', []) as $option => $value) { - $data['passed_options'][$option] = $value; - } - - foreach ($form->getConfig()->getOptions() as $option => $value) { - $data['resolved_options'][$option] = $value; - } - - ksort($data['passed_options']); - ksort($data['resolved_options']); - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractDefaultData(FormInterface $form) - { - $data = [ - 'default_data' => [ - 'norm' => $form->getNormData(), - ], - 'submitted_data' => [], - ]; - - if ($form->getData() !== $form->getNormData()) { - $data['default_data']['model'] = $form->getData(); - } - - if ($form->getViewData() !== $form->getNormData()) { - $data['default_data']['view'] = $form->getViewData(); - } - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractSubmittedData(FormInterface $form) - { - $data = [ - 'submitted_data' => [ - 'norm' => $form->getNormData(), - ], - 'errors' => [], - ]; - - if ($form->getViewData() !== $form->getNormData()) { - $data['submitted_data']['view'] = $form->getViewData(); - } - - if ($form->getData() !== $form->getNormData()) { - $data['submitted_data']['model'] = $form->getData(); - } - - foreach ($form->getErrors() as $error) { - $errorData = [ - 'message' => $error->getMessage(), - 'origin' => \is_object($error->getOrigin()) - ? spl_object_hash($error->getOrigin()) - : null, - 'trace' => [], - ]; - - $cause = $error->getCause(); - - while (null !== $cause) { - if ($cause instanceof ConstraintViolationInterface) { - $errorData['trace'][] = $cause; - $cause = method_exists($cause, 'getCause') ? $cause->getCause() : null; - - continue; - } - - if ($cause instanceof \Exception) { - $errorData['trace'][] = $cause; - $cause = $cause->getPrevious(); - - continue; - } - - $errorData['trace'][] = $cause; - - break; - } - - $data['errors'][] = $errorData; - } - - $data['synchronized'] = $form->isSynchronized(); - - return $data; - } - - /** - * {@inheritdoc} - */ - public function extractViewVariables(FormView $view) - { - $data = [ - 'id' => $view->vars['id'] ?? null, - 'name' => $view->vars['name'] ?? null, - 'view_vars' => [], - ]; - - foreach ($view->vars as $varName => $value) { - $data['view_vars'][$varName] = $value; - } - - ksort($data['view_vars']); - - return $data; - } - - /** - * Recursively builds an HTML ID for a form. - */ - private function buildId(FormInterface $form): string - { - $id = $form->getName(); - - if (null !== $form->getParent()) { - $id = $this->buildId($form->getParent()).'_'.$id; - } - - return $id; - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php b/vendor/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php deleted file mode 100644 index 7e82286..0000000 --- a/vendor/symfony/form/Extension/DataCollector/FormDataExtractorInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; - -/** - * Extracts arrays of information out of forms. - * - * @author Bernhard Schussek - */ -interface FormDataExtractorInterface -{ - /** - * Extracts the configuration data of a form. - * - * @return array - */ - public function extractConfiguration(FormInterface $form); - - /** - * Extracts the default data of a form. - * - * @return array - */ - public function extractDefaultData(FormInterface $form); - - /** - * Extracts the submitted data of a form. - * - * @return array - */ - public function extractSubmittedData(FormInterface $form); - - /** - * Extracts the view variables of a form. - * - * @return array - */ - public function extractViewVariables(FormView $view); -} diff --git a/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php deleted file mode 100644 index 54358d5..0000000 --- a/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Proxy; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\Form\ResolvedFormTypeInterface; - -/** - * Proxy that invokes a data collector when creating a form and its view. - * - * @author Bernhard Schussek - */ -class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface -{ - private $proxiedType; - private $dataCollector; - - public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataCollectorInterface $dataCollector) - { - $this->proxiedType = $proxiedType; - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return $this->proxiedType->getBlockPrefix(); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->proxiedType->getParent(); - } - - /** - * {@inheritdoc} - */ - public function getInnerType() - { - return $this->proxiedType->getInnerType(); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions() - { - return $this->proxiedType->getTypeExtensions(); - } - - /** - * {@inheritdoc} - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []) - { - $builder = $this->proxiedType->createBuilder($factory, $name, $options); - - $builder->setAttribute('data_collector/passed_options', $options); - $builder->setType($this); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createView(FormInterface $form, FormView $parent = null) - { - return $this->proxiedType->createView($form, $parent); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $this->proxiedType->buildForm($builder, $options); - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - $this->proxiedType->buildView($view, $form, $options); - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - $this->proxiedType->finishView($view, $form, $options); - - // Remember which view belongs to which form instance, so that we can - // get the collected data for a view when its form instance is not - // available (e.g. CSRF token) - $this->dataCollector->associateFormWithView($form, $view); - - // Since the CSRF token is only present in the FormView tree, we also - // need to check the FormView tree instead of calling isRoot() on the - // FormInterface tree - if (null === $view->parent) { - $this->dataCollector->collectViewVariables($view); - - // Re-assemble data, in case FormView instances were added, for - // which no FormInterface instances were present (e.g. CSRF token). - // Since finishView() is called after finishing the views of all - // children, we can safely assume that information has been - // collected about the complete form tree. - $this->dataCollector->buildFinalFormTree($form, $view); - } - } - - /** - * {@inheritdoc} - */ - public function getOptionsResolver() - { - return $this->proxiedType->getOptionsResolver(); - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php b/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php deleted file mode 100644 index 068d5cc..0000000 --- a/vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Proxy; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\Form\ResolvedFormTypeFactoryInterface; -use Symfony\Component\Form\ResolvedFormTypeInterface; - -/** - * Proxy that wraps resolved types into {@link ResolvedTypeDataCollectorProxy} - * instances. - * - * @author Bernhard Schussek - */ -class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface -{ - private $proxiedFactory; - private $dataCollector; - - public function __construct(ResolvedFormTypeFactoryInterface $proxiedFactory, FormDataCollectorInterface $dataCollector) - { - $this->proxiedFactory = $proxiedFactory; - $this->dataCollector = $dataCollector; - } - - /** - * {@inheritdoc} - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null) - { - return new ResolvedTypeDataCollectorProxy( - $this->proxiedFactory->createResolvedType($type, $typeExtensions, $parent), - $this->dataCollector - ); - } -} diff --git a/vendor/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php b/vendor/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php deleted file mode 100644 index d25fd13..0000000 --- a/vendor/symfony/form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DataCollector\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener; -use Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface; -use Symfony\Component\Form\FormBuilderInterface; - -/** - * Type extension for collecting data of a form with this type. - * - * @author Robert Schönthal - * @author Bernhard Schussek - */ -class DataCollectorTypeExtension extends AbstractTypeExtension -{ - /** - * @var DataCollectorListener - */ - private $listener; - - public function __construct(FormDataCollectorInterface $dataCollector) - { - $this->listener = new DataCollectorListener($dataCollector); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addEventSubscriber($this->listener); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php b/vendor/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php deleted file mode 100644 index 5d61a06..0000000 --- a/vendor/symfony/form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\FormExtensionInterface; -use Symfony\Component\Form\FormTypeGuesserChain; - -class DependencyInjectionExtension implements FormExtensionInterface -{ - private $guesser; - private $guesserLoaded = false; - private $typeContainer; - private $typeExtensionServices; - private $guesserServices; - - /** - * @param iterable[] $typeExtensionServices - */ - public function __construct(ContainerInterface $typeContainer, array $typeExtensionServices, iterable $guesserServices) - { - $this->typeContainer = $typeContainer; - $this->typeExtensionServices = $typeExtensionServices; - $this->guesserServices = $guesserServices; - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!$this->typeContainer->has($name)) { - throw new InvalidArgumentException(sprintf('The field type "%s" is not registered in the service container.', $name)); - } - - return $this->typeContainer->get($name); - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - return $this->typeContainer->has($name); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - $extensions = []; - - if (isset($this->typeExtensionServices[$name])) { - foreach ($this->typeExtensionServices[$name] as $extension) { - $extensions[] = $extension; - - $extendedTypes = []; - foreach ($extension::getExtendedTypes() as $extendedType) { - $extendedTypes[] = $extendedType; - } - - // validate the result of getExtendedTypes() to ensure it is consistent with the service definition - if (!\in_array($name, $extendedTypes, true)) { - throw new InvalidArgumentException(sprintf('The extended type "%s" specified for the type extension class "%s" does not match any of the actual extended types (["%s"]).', $name, \get_class($extension), implode('", "', $extendedTypes))); - } - } - } - - return $extensions; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - return isset($this->typeExtensionServices[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (!$this->guesserLoaded) { - $this->guesserLoaded = true; - $guessers = []; - - foreach ($this->guesserServices as $serviceId => $service) { - $guessers[] = $service; - } - - if ($guessers) { - $this->guesser = new FormTypeGuesserChain($guessers); - } - } - - return $this->guesser; - } -} diff --git a/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php b/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php deleted file mode 100644 index 27305ad..0000000 --- a/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationExtension.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation; - -use Symfony\Component\Form\AbstractExtension; - -/** - * Integrates the HttpFoundation component with the Form library. - * - * @author Bernhard Schussek - */ -class HttpFoundationExtension extends AbstractExtension -{ - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeHttpFoundationExtension(), - ]; - } -} diff --git a/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php deleted file mode 100644 index 05503ff..0000000 --- a/vendor/symfony/form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\RequestHandlerInterface; -use Symfony\Component\Form\Util\ServerParams; -use Symfony\Component\HttpFoundation\File\File; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\Request; - -/** - * A request processor using the {@link Request} class of the HttpFoundation - * component. - * - * @author Bernhard Schussek - */ -class HttpFoundationRequestHandler implements RequestHandlerInterface -{ - private $serverParams; - - public function __construct(ServerParams $serverParams = null) - { - $this->serverParams = $serverParams ?? new ServerParams(); - } - - /** - * {@inheritdoc} - */ - public function handleRequest(FormInterface $form, $request = null) - { - if (!$request instanceof Request) { - throw new UnexpectedTypeException($request, 'Symfony\Component\HttpFoundation\Request'); - } - - $name = $form->getName(); - $method = $form->getConfig()->getMethod(); - - if ($method !== $request->getMethod()) { - return; - } - - // For request methods that must not have a request body we fetch data - // from the query string. Otherwise we look for data in the request body. - if ('GET' === $method || 'HEAD' === $method || 'TRACE' === $method) { - if ('' === $name) { - $data = $request->query->all(); - } else { - // Don't submit GET requests if the form's name does not exist - // in the request - if (!$request->query->has($name)) { - return; - } - - $data = $request->query->all()[$name]; - } - } else { - // Mark the form with an error if the uploaded size was too large - // This is done here and not in FormValidator because $_POST is - // empty when that error occurs. Hence the form is never submitted. - if ($this->serverParams->hasPostMaxSizeBeenExceeded()) { - // Submit the form, but don't clear the default values - $form->submit(null, false); - - $form->addError(new FormError( - $form->getConfig()->getOption('upload_max_size_message')(), - null, - ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] - )); - - return; - } - - if ('' === $name) { - $params = $request->request->all(); - $files = $request->files->all(); - } elseif ($request->request->has($name) || $request->files->has($name)) { - $default = $form->getConfig()->getCompound() ? [] : null; - $params = $request->request->all()[$name] ?? $default; - $files = $request->files->get($name, $default); - } else { - // Don't submit the form if it is not present in the request - return; - } - - if (\is_array($params) && \is_array($files)) { - $data = array_replace_recursive($params, $files); - } else { - $data = $params ?: $files; - } - } - - // Don't auto-submit the form unless at least one field is present. - if ('' === $name && \count(array_intersect_key($data, $form->all())) <= 0) { - return; - } - - $form->submit($data, 'PATCH' !== $method); - } - - /** - * {@inheritdoc} - */ - public function isFileUpload($data) - { - return $data instanceof File; - } - - /** - * @return int|null - */ - public function getUploadFileError($data) - { - if (!$data instanceof UploadedFile || $data->isValid()) { - return null; - } - - return $data->getError(); - } -} diff --git a/vendor/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php b/vendor/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php deleted file mode 100644 index 0d77f06..0000000 --- a/vendor/symfony/form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\HttpFoundation\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\RequestHandlerInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeHttpFoundationExtension extends AbstractTypeExtension -{ - private $requestHandler; - - public function __construct(RequestHandlerInterface $requestHandler = null) - { - $this->requestHandler = $requestHandler ?? new HttpFoundationRequestHandler(); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->setRequestHandler($this->requestHandler); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Constraints/Form.php b/vendor/symfony/form/Extension/Validator/Constraints/Form.php deleted file mode 100644 index 49291e6..0000000 --- a/vendor/symfony/form/Extension/Validator/Constraints/Form.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @author Bernhard Schussek - */ -class Form extends Constraint -{ - public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca'; - public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854'; - - protected static $errorNames = [ - self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', - self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', - ]; - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return self::CLASS_CONSTRAINT; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Constraints/FormValidator.php b/vendor/symfony/form/Extension/Validator/Constraints/FormValidator.php deleted file mode 100644 index eb18ba2..0000000 --- a/vendor/symfony/form/Extension/Validator/Constraints/FormValidator.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Constraints; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Composite; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class FormValidator extends ConstraintValidator -{ - /** - * @var \SplObjectStorage> - */ - private $resolvedGroups; - - /** - * {@inheritdoc} - */ - public function validate($form, Constraint $formConstraint) - { - if (!$formConstraint instanceof Form) { - throw new UnexpectedTypeException($formConstraint, Form::class); - } - - if (!$form instanceof FormInterface) { - return; - } - - /* @var FormInterface $form */ - $config = $form->getConfig(); - - $validator = $this->context->getValidator()->inContext($this->context); - - if ($form->isSubmitted() && $form->isSynchronized()) { - // Validate the form data only if transformation succeeded - $groups = $this->getValidationGroups($form); - - if (!$groups) { - return; - } - - $data = $form->getData(); - // Validate the data against its own constraints - $validateDataGraph = $form->isRoot() - && (\is_object($data) || \is_array($data)) - && (($groups && \is_array($groups)) || ($groups instanceof GroupSequence && $groups->groups)) - ; - - // Validate the data against the constraints defined in the form - /** @var Constraint[] $constraints */ - $constraints = $config->getOption('constraints', []); - - $hasChildren = $form->count() > 0; - - if ($hasChildren && $form->isRoot()) { - $this->resolvedGroups = new \SplObjectStorage(); - } - - if ($groups instanceof GroupSequence) { - // Validate the data, the form AND nested fields in sequence - $violationsCount = $this->context->getViolations()->count(); - - foreach ($groups->groups as $group) { - if ($validateDataGraph) { - $validator->atPath('data')->validate($data, null, $group); - } - - if ($groupedConstraints = self::getConstraintsInGroups($constraints, $group)) { - $validator->atPath('data')->validate($data, $groupedConstraints, $group); - } - - foreach ($form->all() as $field) { - if ($field->isSubmitted()) { - // remember to validate this field in one group only - // otherwise resolving the groups would reuse the same - // sequence recursively, thus some fields could fail - // in different steps without breaking early enough - $this->resolvedGroups[$field] = (array) $group; - $fieldFormConstraint = new Form(); - $fieldFormConstraint->groups = $group; - $this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $fieldFormConstraint, $group); - } - } - - if ($violationsCount < $this->context->getViolations()->count()) { - break; - } - } - } else { - if ($validateDataGraph) { - $validator->atPath('data')->validate($data, null, $groups); - } - - $groupedConstraints = []; - - foreach ($constraints as $constraint) { - // For the "Valid" constraint, validate the data in all groups - if ($constraint instanceof Valid) { - if (\is_object($data) || \is_array($data)) { - $validator->atPath('data')->validate($data, $constraint, $groups); - } - - continue; - } - - // Otherwise validate a constraint only once for the first - // matching group - foreach ($groups as $group) { - if (\in_array($group, $constraint->groups)) { - $groupedConstraints[$group][] = $constraint; - - // Prevent duplicate validation - if (!$constraint instanceof Composite) { - continue 2; - } - } - } - } - - foreach ($groupedConstraints as $group => $constraint) { - $validator->atPath('data')->validate($data, $constraint, $group); - } - - foreach ($form->all() as $field) { - if ($field->isSubmitted()) { - $this->resolvedGroups[$field] = $groups; - $this->context->setNode($this->context->getValue(), $field, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $field->getName()))->validate($field, $formConstraint); - } - } - } - - if ($hasChildren && $form->isRoot()) { - // destroy storage to avoid memory leaks - $this->resolvedGroups = new \SplObjectStorage(); - } - } elseif (!$form->isSynchronized()) { - $childrenSynchronized = true; - - /** @var FormInterface $child */ - foreach ($form as $child) { - if (!$child->isSynchronized()) { - $childrenSynchronized = false; - $this->context->setNode($this->context->getValue(), $child, $this->context->getMetadata(), $this->context->getPropertyPath()); - $validator->atPath(sprintf('children[%s]', $child->getName()))->validate($child, $formConstraint); - } - } - - // Mark the form with an error if it is not synchronized BUT all - // of its children are synchronized. If any child is not - // synchronized, an error is displayed there already and showing - // a second error in its parent form is pointless, or worse, may - // lead to duplicate errors if error bubbling is enabled on the - // child. - // See also https://github.com/symfony/symfony/issues/4359 - if ($childrenSynchronized) { - $clientDataAsString = is_scalar($form->getViewData()) - ? (string) $form->getViewData() - : get_debug_type($form->getViewData()); - - $failure = $form->getTransformationFailure(); - - $this->context->setConstraint($formConstraint); - $this->context->buildViolation($failure->getInvalidMessage() ?? $config->getOption('invalid_message')) - ->setParameters(array_replace( - ['{{ value }}' => $clientDataAsString], - $config->getOption('invalid_message_parameters'), - $failure->getInvalidMessageParameters() - )) - ->setInvalidValue($form->getViewData()) - ->setCode(Form::NOT_SYNCHRONIZED_ERROR) - ->setCause($failure) - ->addViolation(); - } - } - - // Mark the form with an error if it contains extra fields - if (!$config->getOption('allow_extra_fields') && \count($form->getExtraData()) > 0) { - $this->context->setConstraint($formConstraint); - $this->context->buildViolation($config->getOption('extra_fields_message', '')) - ->setParameter('{{ extra_fields }}', '"'.implode('", "', array_keys($form->getExtraData())).'"') - ->setPlural(\count($form->getExtraData())) - ->setInvalidValue($form->getExtraData()) - ->setCode(Form::NO_SUCH_FIELD_ERROR) - ->addViolation(); - } - } - - /** - * Returns the validation groups of the given form. - * - * @return string|GroupSequence|array - */ - private function getValidationGroups(FormInterface $form) - { - // Determine the clicked button of the complete form tree - $clickedButton = null; - - if (method_exists($form, 'getClickedButton')) { - $clickedButton = $form->getClickedButton(); - } - - if (null !== $clickedButton) { - $groups = $clickedButton->getConfig()->getOption('validation_groups'); - - if (null !== $groups) { - return self::resolveValidationGroups($groups, $form); - } - } - - do { - $groups = $form->getConfig()->getOption('validation_groups'); - - if (null !== $groups) { - return self::resolveValidationGroups($groups, $form); - } - - if (isset($this->resolvedGroups[$form])) { - return $this->resolvedGroups[$form]; - } - - $form = $form->getParent(); - } while (null !== $form); - - return [Constraint::DEFAULT_GROUP]; - } - - /** - * Post-processes the validation groups option for a given form. - * - * @param string|GroupSequence|array|callable $groups The validation groups - * - * @return GroupSequence|array - */ - private static function resolveValidationGroups($groups, FormInterface $form) - { - if (!\is_string($groups) && \is_callable($groups)) { - $groups = $groups($form); - } - - if ($groups instanceof GroupSequence) { - return $groups; - } - - return (array) $groups; - } - - private static function getConstraintsInGroups($constraints, $group) - { - $groups = (array) $group; - - return array_filter($constraints, static function (Constraint $constraint) use ($groups) { - foreach ($groups as $group) { - if (\in_array($group, $constraint->groups, true)) { - return true; - } - } - - return false; - }); - } -} diff --git a/vendor/symfony/form/Extension/Validator/EventListener/ValidationListener.php b/vendor/symfony/form/Extension/Validator/EventListener/ValidationListener.php deleted file mode 100644 index 867a576..0000000 --- a/vendor/symfony/form/Extension/Validator/EventListener/ValidationListener.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Form\Extension\Validator\Constraints\Form; -use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface; -use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Validator\Validator\ValidatorInterface; - -/** - * @author Bernhard Schussek - */ -class ValidationListener implements EventSubscriberInterface -{ - private $validator; - - private $violationMapper; - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [FormEvents::POST_SUBMIT => 'validateForm']; - } - - public function __construct(ValidatorInterface $validator, ViolationMapperInterface $violationMapper) - { - $this->validator = $validator; - $this->violationMapper = $violationMapper; - } - - public function validateForm(FormEvent $event) - { - $form = $event->getForm(); - - if ($form->isRoot()) { - // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator. - foreach ($this->validator->validate($form) as $violation) { - // Allow the "invalid" constraint to be put onto - // non-synchronized forms - $allowNonSynchronized = $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode(); - - $this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized); - } - } - } -} diff --git a/vendor/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php b/vendor/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php deleted file mode 100644 index 0e9e2a9..0000000 --- a/vendor/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraints\GroupSequence; - -/** - * Encapsulates common logic of {@link FormTypeValidatorExtension} and - * {@link SubmitTypeValidatorExtension}. - * - * @author Bernhard Schussek - */ -abstract class BaseValidatorExtension extends AbstractTypeExtension -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - // Make sure that validation groups end up as null, closure or array - $validationGroupsNormalizer = function (Options $options, $groups) { - if (false === $groups) { - return []; - } - - if (empty($groups)) { - return null; - } - - if (\is_callable($groups)) { - return $groups; - } - - if ($groups instanceof GroupSequence) { - return $groups; - } - - return (array) $groups; - }; - - $resolver->setDefaults([ - 'validation_groups' => null, - ]); - - $resolver->setNormalizer('validation_groups', $validationGroupsNormalizer); - } -} diff --git a/vendor/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php b/vendor/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php deleted file mode 100644 index d4c520c..0000000 --- a/vendor/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; -use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class FormTypeValidatorExtension extends BaseValidatorExtension -{ - private $validator; - private $violationMapper; - private $legacyErrorMessages; - - public function __construct(ValidatorInterface $validator, bool $legacyErrorMessages = true, FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->validator = $validator; - $this->violationMapper = new ViolationMapper($formRenderer, $translator); - $this->legacyErrorMessages = $legacyErrorMessages; - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder->addEventSubscriber(new ValidationListener($this->validator, $this->violationMapper)); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - parent::configureOptions($resolver); - - // Constraint should always be converted to an array - $constraintsNormalizer = function (Options $options, $constraints) { - return \is_object($constraints) ? [$constraints] : (array) $constraints; - }; - - $resolver->setDefaults([ - 'error_mapping' => [], - 'constraints' => [], - 'invalid_message' => 'This value is not valid.', - 'invalid_message_parameters' => [], - 'legacy_error_messages' => $this->legacyErrorMessages, - 'allow_extra_fields' => false, - 'extra_fields_message' => 'This form should not contain extra fields.', - ]); - $resolver->setAllowedTypes('constraints', [Constraint::class, Constraint::class.'[]']); - $resolver->setAllowedTypes('legacy_error_messages', 'bool'); - $resolver->setDeprecated('legacy_error_messages', 'symfony/form', '5.2', function (Options $options, $value) { - if (true === $value) { - return 'Setting the "legacy_error_messages" option to "true" is deprecated. It will be disabled in Symfony 6.0.'; - } - - return ''; - }); - - $resolver->setNormalizer('constraints', $constraintsNormalizer); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php b/vendor/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php deleted file mode 100644 index 4bda0b2..0000000 --- a/vendor/symfony/form/Extension/Validator/Type/RepeatedTypeValidatorExtension.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\RepeatedType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -class RepeatedTypeValidatorExtension extends AbstractTypeExtension -{ - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - // Map errors to the first field - $errorMapping = function (Options $options) { - return ['.' => $options['first_name']]; - }; - - $resolver->setDefaults([ - 'error_mapping' => $errorMapping, - ]); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [RepeatedType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php b/vendor/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php deleted file mode 100644 index ea273d0..0000000 --- a/vendor/symfony/form/Extension/Validator/Type/SubmitTypeValidatorExtension.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\Extension\Core\Type\SubmitType; - -/** - * @author Bernhard Schussek - */ -class SubmitTypeValidatorExtension extends BaseValidatorExtension -{ - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [SubmitType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php b/vendor/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php deleted file mode 100644 index 21e4fe2..0000000 --- a/vendor/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Type; - -use Symfony\Component\Form\AbstractTypeExtension; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad - * @author David Badura - */ -class UploadValidatorExtension extends AbstractTypeExtension -{ - private $translator; - private $translationDomain; - - public function __construct(TranslatorInterface $translator, string $translationDomain = null) - { - $this->translator = $translator; - $this->translationDomain = $translationDomain; - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $translator = $this->translator; - $translationDomain = $this->translationDomain; - $resolver->setNormalizer('upload_max_size_message', function (Options $options, $message) use ($translator, $translationDomain) { - return function () use ($translator, $translationDomain, $message) { - return $translator->trans($message(), [], $translationDomain); - }; - }); - } - - /** - * {@inheritdoc} - */ - public static function getExtendedTypes(): iterable - { - return [FormType::class]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/Util/ServerParams.php b/vendor/symfony/form/Extension/Validator/Util/ServerParams.php deleted file mode 100644 index 98e9f0c..0000000 --- a/vendor/symfony/form/Extension/Validator/Util/ServerParams.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\Util; - -use Symfony\Component\Form\Util\ServerParams as BaseServerParams; - -trigger_deprecation('symfony/form', '5.1', 'The "%s" class is deprecated. Use "%s" instead.', ServerParams::class, BaseServerParams::class); - -/** - * @author Bernhard Schussek - * - * @deprecated since Symfony 5.1. Use {@see BaseServerParams} instead. - */ -class ServerParams extends BaseServerParams -{ -} diff --git a/vendor/symfony/form/Extension/Validator/ValidatorExtension.php b/vendor/symfony/form/Extension/Validator/ValidatorExtension.php deleted file mode 100644 index 3a5728a..0000000 --- a/vendor/symfony/form/Extension/Validator/ValidatorExtension.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator; - -use Symfony\Component\Form\AbstractExtension; -use Symfony\Component\Form\Extension\Validator\Constraints\Form; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\Validator\Constraints\Traverse; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Extension supporting the Symfony Validator component in forms. - * - * @author Bernhard Schussek - */ -class ValidatorExtension extends AbstractExtension -{ - private $validator; - private $formRenderer; - private $translator; - private $legacyErrorMessages; - - public function __construct(ValidatorInterface $validator, bool $legacyErrorMessages = true, FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->legacyErrorMessages = $legacyErrorMessages; - - $metadata = $validator->getMetadataFor('Symfony\Component\Form\Form'); - - // Register the form constraints in the validator programmatically. - // This functionality is required when using the Form component without - // the DIC, where the XML file is loaded automatically. Thus the following - // code must be kept synchronized with validation.xml - - /* @var $metadata ClassMetadata */ - $metadata->addConstraint(new Form()); - $metadata->addConstraint(new Traverse(false)); - - $this->validator = $validator; - $this->formRenderer = $formRenderer; - $this->translator = $translator; - } - - public function loadTypeGuesser() - { - return new ValidatorTypeGuesser($this->validator); - } - - protected function loadTypeExtensions() - { - return [ - new Type\FormTypeValidatorExtension($this->validator, $this->legacyErrorMessages, $this->formRenderer, $this->translator), - new Type\RepeatedTypeValidatorExtension(), - new Type\SubmitTypeValidatorExtension(), - ]; - } -} diff --git a/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php b/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php deleted file mode 100644 index 24470ba..0000000 --- a/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator; - -use Symfony\Component\Form\FormTypeGuesserInterface; -use Symfony\Component\Form\Guess\Guess; -use Symfony\Component\Form\Guess\TypeGuess; -use Symfony\Component\Form\Guess\ValueGuess; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; - -class ValidatorTypeGuesser implements FormTypeGuesserInterface -{ - private $metadataFactory; - - public function __construct(MetadataFactoryInterface $metadataFactory) - { - $this->metadataFactory = $metadataFactory; - } - - /** - * {@inheritdoc} - */ - public function guessType(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessTypeForConstraint($constraint); - }); - } - - /** - * {@inheritdoc} - */ - public function guessRequired(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessRequiredForConstraint($constraint); - // If we don't find any constraint telling otherwise, we can assume - // that a field is not required (with LOW_CONFIDENCE) - }, false); - } - - /** - * {@inheritdoc} - */ - public function guessMaxLength(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessMaxLengthForConstraint($constraint); - }); - } - - /** - * {@inheritdoc} - */ - public function guessPattern(string $class, string $property) - { - return $this->guess($class, $property, function (Constraint $constraint) { - return $this->guessPatternForConstraint($constraint); - }); - } - - /** - * Guesses a field class name for a given constraint. - * - * @return TypeGuess|null - */ - public function guessTypeForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Type': - switch ($constraint->type) { - case 'array': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::MEDIUM_CONFIDENCE); - case 'boolean': - case 'bool': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); - - case 'double': - case 'float': - case 'numeric': - case 'real': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::MEDIUM_CONFIDENCE); - - case 'integer': - case 'int': - case 'long': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\IntegerType', [], Guess::MEDIUM_CONFIDENCE); - - case \DateTime::class: - case '\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', [], Guess::MEDIUM_CONFIDENCE); - - case 'string': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Country': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CountryType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Currency': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CurrencyType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Date': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\DateTime': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\DateTimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Email': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\EmailType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\File': - case 'Symfony\Component\Validator\Constraints\Image': - $options = []; - if ($constraint->mimeTypes) { - $options = ['attr' => ['accept' => implode(',', (array) $constraint->mimeTypes)]]; - } - - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\FileType', $options, Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Language': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LanguageType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Locale': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\LocaleType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Time': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TimeType', ['input' => 'string'], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Url': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\UrlType', [], Guess::HIGH_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Ip': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::MEDIUM_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Length': - case 'Symfony\Component\Validator\Constraints\Regex': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Range': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\NumberType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\Count': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', [], Guess::LOW_CONFIDENCE); - - case 'Symfony\Component\Validator\Constraints\IsTrue': - case 'Symfony\Component\Validator\Constraints\IsFalse': - return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', [], Guess::MEDIUM_CONFIDENCE); - } - - return null; - } - - /** - * Guesses whether a field is required based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessRequiredForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\NotNull': - case 'Symfony\Component\Validator\Constraints\NotBlank': - case 'Symfony\Component\Validator\Constraints\IsTrue': - return new ValueGuess(true, Guess::HIGH_CONFIDENCE); - } - - return null; - } - - /** - * Guesses a field's maximum length based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessMaxLengthForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Length': - if (is_numeric($constraint->max)) { - return new ValueGuess($constraint->max, Guess::HIGH_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { - return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Range': - if (is_numeric($constraint->max)) { - return new ValueGuess(\strlen((string) $constraint->max), Guess::LOW_CONFIDENCE); - } - break; - } - - return null; - } - - /** - * Guesses a field's pattern based on the given constraint. - * - * @return ValueGuess|null - */ - public function guessPatternForConstraint(Constraint $constraint) - { - switch (\get_class($constraint)) { - case 'Symfony\Component\Validator\Constraints\Length': - if (is_numeric($constraint->min)) { - return new ValueGuess(sprintf('.{%s,}', (string) $constraint->min), Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Regex': - $htmlPattern = $constraint->getHtmlPattern(); - - if (null !== $htmlPattern) { - return new ValueGuess($htmlPattern, Guess::HIGH_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Range': - if (is_numeric($constraint->min)) { - return new ValueGuess(sprintf('.{%s,}', \strlen((string) $constraint->min)), Guess::LOW_CONFIDENCE); - } - break; - - case 'Symfony\Component\Validator\Constraints\Type': - if (\in_array($constraint->type, ['double', 'float', 'numeric', 'real'])) { - return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE); - } - break; - } - - return null; - } - - /** - * Iterates over the constraints of a property, executes a constraints on - * them and returns the best guess. - * - * @param \Closure $closure The closure that returns a guess - * for a given constraint - * @param mixed $defaultValue The default value assumed if no other value - * can be guessed - * - * @return Guess|null - */ - protected function guess(string $class, string $property, \Closure $closure, $defaultValue = null) - { - $guesses = []; - $classMetadata = $this->metadataFactory->getMetadataFor($class); - - if ($classMetadata instanceof ClassMetadataInterface && $classMetadata->hasPropertyMetadata($property)) { - foreach ($classMetadata->getPropertyMetadata($property) as $memberMetadata) { - foreach ($memberMetadata->getConstraints() as $constraint) { - if ($guess = $closure($constraint)) { - $guesses[] = $guess; - } - } - } - } - - if (null !== $defaultValue) { - $guesses[] = new ValueGuess($defaultValue, Guess::LOW_CONFIDENCE); - } - - return Guess::getBestGuess($guesses); - } -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php deleted file mode 100644 index d9342de..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/MappingRule.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\Exception\ErrorMappingException; -use Symfony\Component\Form\FormInterface; - -/** - * @author Bernhard Schussek - */ -class MappingRule -{ - private $origin; - private $propertyPath; - private $targetPath; - - public function __construct(FormInterface $origin, string $propertyPath, string $targetPath) - { - $this->origin = $origin; - $this->propertyPath = $propertyPath; - $this->targetPath = $targetPath; - } - - /** - * @return FormInterface - */ - public function getOrigin() - { - return $this->origin; - } - - /** - * Matches a property path against the rule path. - * - * If the rule matches, the form mapped by the rule is returned. - * Otherwise this method returns false. - * - * @return FormInterface|null - */ - public function match(string $propertyPath) - { - return $propertyPath === $this->propertyPath ? $this->getTarget() : null; - } - - /** - * Matches a property path against a prefix of the rule path. - * - * @return bool - */ - public function isPrefix(string $propertyPath) - { - $length = \strlen($propertyPath); - $prefix = substr($this->propertyPath, 0, $length); - $next = $this->propertyPath[$length] ?? null; - - return $prefix === $propertyPath && ('[' === $next || '.' === $next); - } - - /** - * @return FormInterface - * - * @throws ErrorMappingException - */ - public function getTarget() - { - $childNames = explode('.', $this->targetPath); - $target = $this->origin; - - foreach ($childNames as $childName) { - if (!$target->has($childName)) { - throw new ErrorMappingException(sprintf('The child "%s" of "%s" mapped by the rule "%s" in "%s" does not exist.', $childName, $target->getName(), $this->targetPath, $this->origin->getName())); - } - $target = $target->get($childName); - } - - return $target; - } -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php deleted file mode 100644 index 0efd168..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/RelativePath.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\PropertyAccess\PropertyPath; - -/** - * @author Bernhard Schussek - */ -class RelativePath extends PropertyPath -{ - private $root; - - public function __construct(FormInterface $root, string $propertyPath) - { - parent::__construct($propertyPath); - - $this->root = $root; - } - - /** - * @return FormInterface - */ - public function getRoot() - { - return $this->root; - } -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php deleted file mode 100644 index 1fb1d1f..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ /dev/null @@ -1,343 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FileUploadError; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormRendererInterface; -use Symfony\Component\Form\Util\InheritDataAwareIterator; -use Symfony\Component\PropertyAccess\PropertyPathBuilder; -use Symfony\Component\PropertyAccess\PropertyPathIterator; -use Symfony\Component\PropertyAccess\PropertyPathIteratorInterface; -use Symfony\Component\Validator\Constraints\File; -use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Bernhard Schussek - */ -class ViolationMapper implements ViolationMapperInterface -{ - private $formRenderer; - private $translator; - private $allowNonSynchronized = false; - - public function __construct(FormRendererInterface $formRenderer = null, TranslatorInterface $translator = null) - { - $this->formRenderer = $formRenderer; - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false) - { - $this->allowNonSynchronized = $allowNonSynchronized; - - // The scope is the currently found most specific form that - // an error should be mapped to. After setting the scope, the - // mapper will try to continue to find more specific matches in - // the children of scope. If it cannot, the error will be - // mapped to this scope. - $scope = null; - - $violationPath = null; - $relativePath = null; - $match = false; - - // Don't create a ViolationPath instance for empty property paths - if ('' !== $violation->getPropertyPath()) { - $violationPath = new ViolationPath($violation->getPropertyPath()); - $relativePath = $this->reconstructPath($violationPath, $form); - } - - // This case happens if the violation path is empty and thus - // the violation should be mapped to the root form - if (null === $violationPath) { - $scope = $form; - } - - // In general, mapping happens from the root form to the leaf forms - // First, the rules of the root form are applied to determine - // the subsequent descendant. The rules of this descendant are then - // applied to find the next and so on, until we have found the - // most specific form that matches the violation. - - // If any of the forms found in this process is not synchronized, - // mapping is aborted. Non-synchronized forms could not reverse - // transform the value entered by the user, thus any further violations - // caused by the (invalid) reverse transformed value should be - // ignored. - - if (null !== $relativePath) { - // Set the scope to the root of the relative path - // This root will usually be $form. If the path contains - // an unmapped form though, the last unmapped form found - // will be the root of the path. - $scope = $relativePath->getRoot(); - $it = new PropertyPathIterator($relativePath); - - while ($this->acceptsErrors($scope) && null !== ($child = $this->matchChild($scope, $it))) { - $scope = $child; - $it->next(); - $match = true; - } - } - - // This case happens if an error happened in the data under a - // form inheriting its parent data that does not match any of the - // children of that form. - if (null !== $violationPath && !$match) { - // If we could not map the error to anything more specific - // than the root element, map it to the innermost directly - // mapped form of the violation path - // e.g. "children[foo].children[bar].data.baz" - // Here the innermost directly mapped child is "bar" - - $scope = $form; - $it = new ViolationPathIterator($violationPath); - - // Note: acceptsErrors() will always return true for forms inheriting - // their parent data, because these forms can never be non-synchronized - // (they don't do any data transformation on their own) - while ($this->acceptsErrors($scope) && $it->valid() && $it->mapsForm()) { - if (!$scope->has($it->current())) { - // Break if we find a reference to a non-existing child - break; - } - - $scope = $scope->get($it->current()); - $it->next(); - } - } - - // Follow dot rules until we have the final target - $mapping = $scope->getConfig()->getOption('error_mapping'); - - while ($this->acceptsErrors($scope) && isset($mapping['.'])) { - $dotRule = new MappingRule($scope, '.', $mapping['.']); - $scope = $dotRule->getTarget(); - $mapping = $scope->getConfig()->getOption('error_mapping'); - } - - // Only add the error if the form is synchronized - if ($this->acceptsErrors($scope)) { - if ($violation->getConstraint() instanceof File && (string) \UPLOAD_ERR_INI_SIZE === $violation->getCode()) { - $errorsTarget = $scope; - - while (null !== $errorsTarget->getParent() && $errorsTarget->getConfig()->getErrorBubbling()) { - $errorsTarget = $errorsTarget->getParent(); - } - - $errors = $errorsTarget->getErrors(); - $errorsTarget->clearErrors(); - - foreach ($errors as $error) { - if (!$error instanceof FileUploadError) { - $errorsTarget->addError($error); - } - } - } - - $message = $violation->getMessage(); - $messageTemplate = $violation->getMessageTemplate(); - - if (false !== strpos($message, '{{ label }}') || false !== strpos($messageTemplate, '{{ label }}')) { - $form = $scope; - - do { - $labelFormat = $form->getConfig()->getOption('label_format'); - } while (null === $labelFormat && null !== $form = $form->getParent()); - - if (null !== $labelFormat) { - $label = str_replace( - [ - '%name%', - '%id%', - ], - [ - $scope->getName(), - (string) $scope->getPropertyPath(), - ], - $labelFormat - ); - } else { - $label = $scope->getConfig()->getOption('label'); - } - - if (false !== $label) { - if (null === $label && null !== $this->formRenderer) { - $label = $this->formRenderer->humanize($scope->getName()); - } elseif (null === $label) { - $label = $scope->getName(); - } - - if (null !== $this->translator) { - $form = $scope; - $translationParameters[] = $form->getConfig()->getOption('label_translation_parameters', []); - - do { - $translationDomain = $form->getConfig()->getOption('translation_domain'); - array_unshift( - $translationParameters, - $form->getConfig()->getOption('label_translation_parameters', []) - ); - } while (null === $translationDomain && null !== $form = $form->getParent()); - - $translationParameters = array_merge([], ...$translationParameters); - - $label = $this->translator->trans( - $label, - $translationParameters, - $translationDomain - ); - } - - $message = str_replace('{{ label }}', $label, $message); - $messageTemplate = str_replace('{{ label }}', $label, $messageTemplate); - } - } - - $scope->addError(new FormError( - $message, - $messageTemplate, - $violation->getParameters(), - $violation->getPlural(), - $violation - )); - } - } - - /** - * Tries to match the beginning of the property path at the - * current position against the children of the scope. - * - * If a matching child is found, it is returned. Otherwise - * null is returned. - */ - private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it): ?FormInterface - { - $target = null; - $chunk = ''; - $foundAtIndex = null; - - // Construct mapping rules for the given form - $rules = []; - - foreach ($form->getConfig()->getOption('error_mapping') as $propertyPath => $targetPath) { - // Dot rules are considered at the very end - if ('.' !== $propertyPath) { - $rules[] = new MappingRule($form, $propertyPath, $targetPath); - } - } - - $children = iterator_to_array(new \RecursiveIteratorIterator(new InheritDataAwareIterator($form)), false); - - while ($it->valid()) { - if ($it->isIndex()) { - $chunk .= '['.$it->current().']'; - } else { - $chunk .= ('' === $chunk ? '' : '.').$it->current(); - } - - // Test mapping rules as long as we have any - foreach ($rules as $key => $rule) { - /* @var MappingRule $rule */ - - // Mapping rule matches completely, terminate. - if (null !== ($form = $rule->match($chunk))) { - return $form; - } - - // Keep only rules that have $chunk as prefix - if (!$rule->isPrefix($chunk)) { - unset($rules[$key]); - } - } - - /** @var FormInterface $child */ - foreach ($children as $i => $child) { - $childPath = (string) $child->getPropertyPath(); - if ($childPath === $chunk) { - $target = $child; - $foundAtIndex = $it->key(); - } elseif (str_starts_with($childPath, $chunk)) { - continue; - } - - unset($children[$i]); - } - - $it->next(); - } - - if (null !== $foundAtIndex) { - $it->seek($foundAtIndex); - } - - return $target; - } - - /** - * Reconstructs a property path from a violation path and a form tree. - */ - private function reconstructPath(ViolationPath $violationPath, FormInterface $origin): ?RelativePath - { - $propertyPathBuilder = new PropertyPathBuilder($violationPath); - $it = $violationPath->getIterator(); - $scope = $origin; - - // Remember the current index in the builder - $i = 0; - - // Expand elements that map to a form (like "children[address]") - for ($it->rewind(); $it->valid() && $it->mapsForm(); $it->next()) { - if (!$scope->has($it->current())) { - // Scope relates to a form that does not exist - // Bail out - break; - } - - // Process child form - $scope = $scope->get($it->current()); - - if ($scope->getConfig()->getInheritData()) { - // Form inherits its parent data - // Cut the piece out of the property path and proceed - $propertyPathBuilder->remove($i); - } else { - /* @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */ - $propertyPath = $scope->getPropertyPath(); - - if (null === $propertyPath) { - // Property path of a mapped form is null - // Should not happen, bail out - break; - } - - $propertyPathBuilder->replace($i, 1, $propertyPath); - $i += $propertyPath->getLength(); - } - } - - $finalPath = $propertyPathBuilder->getPropertyPath(); - - return null !== $finalPath ? new RelativePath($origin, $finalPath) : null; - } - - private function acceptsErrors(FormInterface $form): bool - { - return $this->allowNonSynchronized || $form->isSynchronized(); - } -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php deleted file mode 100644 index 57ed1c8..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapperInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Validator\ConstraintViolation; - -/** - * @author Bernhard Schussek - */ -interface ViolationMapperInterface -{ - /** - * Maps a constraint violation to a form in the form tree under - * the given form. - * - * @param bool $allowNonSynchronized Whether to allow mapping to non-synchronized forms - */ - public function mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false); -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php deleted file mode 100644 index 625c0b9..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPath.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ViolationPath implements \IteratorAggregate, PropertyPathInterface -{ - /** - * @var list - */ - private $elements = []; - - /** - * @var array - */ - private $isIndex = []; - - /** - * @var array - */ - private $mapsForm = []; - - /** - * @var string - */ - private $pathAsString = ''; - - /** - * @var int - */ - private $length = 0; - - /** - * Creates a new violation path from a string. - * - * @param string $violationPath The property path of a {@link \Symfony\Component\Validator\ConstraintViolation} object - */ - public function __construct(string $violationPath) - { - $path = new PropertyPath($violationPath); - $elements = $path->getElements(); - $data = false; - - for ($i = 0, $l = \count($elements); $i < $l; ++$i) { - if (!$data) { - // The element "data" has not yet been passed - if ('children' === $elements[$i] && $path->isProperty($i)) { - // Skip element "children" - ++$i; - - // Next element must exist and must be an index - // Otherwise consider this the end of the path - if ($i >= $l || !$path->isIndex($i)) { - break; - } - - // All the following index items (regardless if .children is - // explicitly used) are children and grand-children - for (; $i < $l && $path->isIndex($i); ++$i) { - $this->elements[] = $elements[$i]; - $this->isIndex[] = true; - $this->mapsForm[] = true; - } - - // Rewind the pointer as the last element above didn't match - // (even if the pointer was moved forward) - --$i; - } elseif ('data' === $elements[$i] && $path->isProperty($i)) { - // Skip element "data" - ++$i; - - // End of path - if ($i >= $l) { - break; - } - - $this->elements[] = $elements[$i]; - $this->isIndex[] = $path->isIndex($i); - $this->mapsForm[] = false; - $data = true; - } else { - // Neither "children" nor "data" property found - // Consider this the end of the path - break; - } - } else { - // Already after the "data" element - // Pick everything as is - $this->elements[] = $elements[$i]; - $this->isIndex[] = $path->isIndex($i); - $this->mapsForm[] = false; - } - } - - $this->length = \count($this->elements); - - $this->buildString(); - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->pathAsString; - } - - /** - * {@inheritdoc} - */ - public function getLength() - { - return $this->length; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - if ($this->length <= 1) { - return null; - } - - $parent = clone $this; - - --$parent->length; - array_pop($parent->elements); - array_pop($parent->isIndex); - array_pop($parent->mapsForm); - - $parent->buildString(); - - return $parent; - } - - /** - * {@inheritdoc} - */ - public function getElements() - { - return $this->elements; - } - - /** - * {@inheritdoc} - */ - public function getElement(int $index) - { - if (!isset($this->elements[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->elements[$index]; - } - - /** - * {@inheritdoc} - */ - public function isProperty(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return !$this->isIndex[$index]; - } - - /** - * {@inheritdoc} - */ - public function isIndex(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->isIndex[$index]; - } - - /** - * Returns whether an element maps directly to a form. - * - * Consider the following violation path: - * - * children[address].children[office].data.street - * - * In this example, "address" and "office" map to forms, while - * "street does not. - * - * @return bool - * - * @throws OutOfBoundsException if the offset is invalid - */ - public function mapsForm(int $index) - { - if (!isset($this->mapsForm[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the violation path.', $index)); - } - - return $this->mapsForm[$index]; - } - - /** - * Returns a new iterator for this path. - * - * @return ViolationPathIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new ViolationPathIterator($this); - } - - /** - * Builds the string representation from the elements. - */ - private function buildString() - { - $this->pathAsString = ''; - $data = false; - - foreach ($this->elements as $index => $element) { - if ($this->mapsForm[$index]) { - $this->pathAsString .= ".children[$element]"; - } elseif (!$data) { - $this->pathAsString .= '.data'.($this->isIndex[$index] ? "[$element]" : ".$element"); - $data = true; - } else { - $this->pathAsString .= $this->isIndex[$index] ? "[$element]" : ".$element"; - } - } - - if ('' !== $this->pathAsString) { - // remove leading dot - $this->pathAsString = substr($this->pathAsString, 1); - } - } -} diff --git a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php b/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php deleted file mode 100644 index 50baa45..0000000 --- a/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationPathIterator.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Validator\ViolationMapper; - -use Symfony\Component\PropertyAccess\PropertyPathIterator; - -/** - * @author Bernhard Schussek - */ -class ViolationPathIterator extends PropertyPathIterator -{ - public function __construct(ViolationPath $violationPath) - { - parent::__construct($violationPath); - } - - public function mapsForm() - { - return $this->path->mapsForm($this->key()); - } -} diff --git a/vendor/symfony/form/FileUploadError.php b/vendor/symfony/form/FileUploadError.php deleted file mode 100644 index 20142b2..0000000 --- a/vendor/symfony/form/FileUploadError.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @internal - */ -class FileUploadError extends FormError -{ -} diff --git a/vendor/symfony/form/Form.php b/vendor/symfony/form/Form.php deleted file mode 100644 index 1f02ea8..0000000 --- a/vendor/symfony/form/Form.php +++ /dev/null @@ -1,1194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Event\PostSetDataEvent; -use Symfony\Component\Form\Event\PostSubmitEvent; -use Symfony\Component\Form\Event\PreSetDataEvent; -use Symfony\Component\Form\Event\PreSubmitEvent; -use Symfony\Component\Form\Event\SubmitEvent; -use Symfony\Component\Form\Exception\AlreadySubmittedException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\Form\Exception\RuntimeException; -use Symfony\Component\Form\Exception\TransformationFailedException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\Type\TextType; -use Symfony\Component\Form\Util\FormUtil; -use Symfony\Component\Form\Util\InheritDataAwareIterator; -use Symfony\Component\Form\Util\OrderedHashMap; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Form represents a form. - * - * To implement your own form fields, you need to have a thorough understanding - * of the data flow within a form. A form stores its data in three different - * representations: - * - * (1) the "model" format required by the form's object - * (2) the "normalized" format for internal processing - * (3) the "view" format used for display simple fields - * or map children model data for compound fields - * - * A date field, for example, may store a date as "Y-m-d" string (1) in the - * object. To facilitate processing in the field, this value is normalized - * to a DateTime object (2). In the HTML representation of your form, a - * localized string (3) may be presented to and modified by the user, or it could be an array of values - * to be mapped to choices fields. - * - * In most cases, format (1) and format (2) will be the same. For example, - * a checkbox field uses a Boolean value for both internal processing and - * storage in the object. In these cases you need to set a view transformer - * to convert between formats (2) and (3). You can do this by calling - * addViewTransformer(). - * - * In some cases though it makes sense to make format (1) configurable. To - * demonstrate this, let's extend our above date field to store the value - * either as "Y-m-d" string or as timestamp. Internally we still want to - * use a DateTime object for processing. To convert the data from string/integer - * to DateTime you can set a model transformer by calling - * addModelTransformer(). The normalized data is then converted to the displayed - * data as described before. - * - * The conversions (1) -> (2) -> (3) use the transform methods of the transformers. - * The conversions (3) -> (2) -> (1) use the reverseTransform methods of the transformers. - * - * @author Fabien Potencier - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterface -{ - /** - * @var FormConfigInterface - */ - private $config; - - /** - * @var FormInterface|null - */ - private $parent; - - /** - * A map of FormInterface instances. - * - * @var OrderedHashMap - */ - private $children; - - /** - * @var FormError[] - */ - private $errors = []; - - /** - * @var bool - */ - private $submitted = false; - - /** - * The button that was used to submit the form. - * - * @var FormInterface|ClickableInterface|null - */ - private $clickedButton; - - /** - * @var mixed - */ - private $modelData; - - /** - * @var mixed - */ - private $normData; - - /** - * @var mixed - */ - private $viewData; - - /** - * The submitted values that don't belong to any children. - * - * @var array - */ - private $extraData = []; - - /** - * The transformation failure generated during submission, if any. - * - * @var TransformationFailedException|null - */ - private $transformationFailure; - - /** - * Whether the form's data has been initialized. - * - * When the data is initialized with its default value, that default value - * is passed through the transformer chain in order to synchronize the - * model, normalized and view format for the first time. This is done - * lazily in order to save performance when {@link setData()} is called - * manually, making the initialization with the configured default value - * superfluous. - * - * @var bool - */ - private $defaultDataSet = false; - - /** - * Whether setData() is currently being called. - * - * @var bool - */ - private $lockSetData = false; - - /** - * @var string - */ - private $name = ''; - - /** - * Whether the form inherits its underlying data from its parent. - * - * @var bool - */ - private $inheritData; - - /** - * @var PropertyPathInterface|null - */ - private $propertyPath; - - /** - * @throws LogicException if a data mapper is not provided for a compound form - */ - public function __construct(FormConfigInterface $config) - { - // Compound forms always need a data mapper, otherwise calls to - // `setData` and `add` will not lead to the correct population of - // the child forms. - if ($config->getCompound() && !$config->getDataMapper()) { - throw new LogicException('Compound forms need a data mapper.'); - } - - // If the form inherits the data from its parent, it is not necessary - // to call setData() with the default data. - if ($this->inheritData = $config->getInheritData()) { - $this->defaultDataSet = true; - } - - $this->config = $config; - $this->children = new OrderedHashMap(); - $this->name = $config->getName(); - } - - public function __clone() - { - $this->children = clone $this->children; - - foreach ($this->children as $key => $child) { - $this->children[$key] = clone $child; - } - } - - /** - * {@inheritdoc} - */ - public function getConfig() - { - return $this->config; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath() - { - if ($this->propertyPath || $this->propertyPath = $this->config->getPropertyPath()) { - return $this->propertyPath; - } - - if ('' === $this->name) { - return null; - } - - $parent = $this->parent; - - while ($parent && $parent->getConfig()->getInheritData()) { - $parent = $parent->getParent(); - } - - if ($parent && null === $parent->getConfig()->getDataClass()) { - $this->propertyPath = new PropertyPath('['.$this->name.']'); - } else { - $this->propertyPath = new PropertyPath($this->name); - } - - return $this->propertyPath; - } - - /** - * {@inheritdoc} - */ - public function isRequired() - { - if (null === $this->parent || $this->parent->isRequired()) { - return $this->config->getRequired(); - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function isDisabled() - { - if (null === $this->parent || !$this->parent->isDisabled()) { - return $this->config->getDisabled(); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function setParent(FormInterface $parent = null) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot set the parent of a submitted form.'); - } - - if (null !== $parent && '' === $this->name) { - throw new LogicException('A form with an empty name cannot have a parent form.'); - } - - $this->parent = $parent; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->parent ? $this->parent->getRoot() : $this; - } - - /** - * {@inheritdoc} - */ - public function isRoot() - { - return null === $this->parent; - } - - /** - * {@inheritdoc} - */ - public function setData($modelData) - { - // If the form is submitted while disabled, it is set to submitted, but the data is not - // changed. In such cases (i.e. when the form is not initialized yet) don't - // abort this method. - if ($this->submitted && $this->defaultDataSet) { - throw new AlreadySubmittedException('You cannot change the data of a submitted form.'); - } - - // If the form inherits its parent's data, disallow data setting to - // prevent merge conflicts - if ($this->inheritData) { - throw new RuntimeException('You cannot change the data of a form inheriting its parent data.'); - } - - // Don't allow modifications of the configured data if the data is locked - if ($this->config->getDataLocked() && $modelData !== $this->config->getData()) { - return $this; - } - - if (\is_object($modelData) && !$this->config->getByReference()) { - $modelData = clone $modelData; - } - - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call setData(). You should call setData() on the FormEvent object instead.'); - } - - $this->lockSetData = true; - $dispatcher = $this->config->getEventDispatcher(); - - // Hook to change content of the model data before transformation and mapping children - if ($dispatcher->hasListeners(FormEvents::PRE_SET_DATA)) { - $event = new PreSetDataEvent($this, $modelData); - $dispatcher->dispatch($event, FormEvents::PRE_SET_DATA); - $modelData = $event->getData(); - } - - // Treat data as strings unless a transformer exists - if (is_scalar($modelData) && !$this->config->getViewTransformers() && !$this->config->getModelTransformers()) { - $modelData = (string) $modelData; - } - - // Synchronize representations - must not change the content! - // Transformation exceptions are not caught on initialization - $normData = $this->modelToNorm($modelData); - $viewData = $this->normToView($normData); - - // Validate if view data matches data class (unless empty) - if (!FormUtil::isEmpty($viewData)) { - $dataClass = $this->config->getDataClass(); - - if (null !== $dataClass && !$viewData instanceof $dataClass) { - $actualType = get_debug_type($viewData); - - throw new LogicException('The form\'s view data is expected to be a "'.$dataClass.'", but it is a "'.$actualType.'". You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms "'.$actualType.'" to an instance of "'.$dataClass.'".'); - } - } - - $this->modelData = $modelData; - $this->normData = $normData; - $this->viewData = $viewData; - $this->defaultDataSet = true; - $this->lockSetData = false; - - // Compound forms don't need to invoke this method if they don't have children - if (\count($this->children) > 0) { - // Update child forms from the data (unless their config data is locked) - $this->config->getDataMapper()->mapDataToForms($viewData, new \RecursiveIteratorIterator(new InheritDataAwareIterator($this->children))); - } - - if ($dispatcher->hasListeners(FormEvents::POST_SET_DATA)) { - $event = new PostSetDataEvent($this, $modelData); - $dispatcher->dispatch($event, FormEvents::POST_SET_DATA); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getData() if the form data has not already been set. You should call getData() on the FormEvent object instead.'); - } - - $this->setData($this->config->getData()); - } - - return $this->modelData; - } - - /** - * {@inheritdoc} - */ - public function getNormData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getNormData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getNormData() if the form data has not already been set.'); - } - - $this->setData($this->config->getData()); - } - - return $this->normData; - } - - /** - * {@inheritdoc} - */ - public function getViewData() - { - if ($this->inheritData) { - if (!$this->parent) { - throw new RuntimeException('The form is configured to inherit its parent\'s data, but does not have a parent.'); - } - - return $this->parent->getViewData(); - } - - if (!$this->defaultDataSet) { - if ($this->lockSetData) { - throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call getViewData() if the form data has not already been set.'); - } - - $this->setData($this->config->getData()); - } - - return $this->viewData; - } - - /** - * {@inheritdoc} - */ - public function getExtraData() - { - return $this->extraData; - } - - /** - * {@inheritdoc} - */ - public function initialize() - { - if (null !== $this->parent) { - throw new RuntimeException('Only root forms should be initialized.'); - } - - // Guarantee that the *_SET_DATA events have been triggered once the - // form is initialized. This makes sure that dynamically added or - // removed fields are already visible after initialization. - if (!$this->defaultDataSet) { - $this->setData($this->config->getData()); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function handleRequest($request = null) - { - $this->config->getRequestHandler()->handleRequest($this, $request); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->submitted) { - throw new AlreadySubmittedException('A form can only be submitted once.'); - } - - // Initialize errors in the very beginning so we're sure - // they are collectable during submission only - $this->errors = []; - - // Obviously, a disabled form should not change its data upon submission. - if ($this->isDisabled()) { - $this->submitted = true; - - return $this; - } - - // The data must be initialized if it was not initialized yet. - // This is necessary to guarantee that the *_SET_DATA listeners - // are always invoked before submit() takes place. - if (!$this->defaultDataSet) { - $this->setData($this->config->getData()); - } - - // Treat false as NULL to support binding false to checkboxes. - // Don't convert NULL to a string here in order to determine later - // whether an empty value has been submitted or whether no value has - // been submitted at all. This is important for processing checkboxes - // and radio buttons with empty values. - if (false === $submittedData) { - $submittedData = null; - } elseif (is_scalar($submittedData)) { - $submittedData = (string) $submittedData; - } elseif ($this->config->getRequestHandler()->isFileUpload($submittedData)) { - if (!$this->config->getOption('allow_file_upload')) { - $submittedData = null; - $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, file upload given.'); - } - } elseif (\is_array($submittedData) && !$this->config->getCompound() && !$this->config->hasOption('multiple')) { - $submittedData = null; - $this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, array given.'); - } - - $dispatcher = $this->config->getEventDispatcher(); - - $modelData = null; - $normData = null; - $viewData = null; - - try { - if (null !== $this->transformationFailure) { - throw $this->transformationFailure; - } - - // Hook to change content of the data submitted by the browser - if ($dispatcher->hasListeners(FormEvents::PRE_SUBMIT)) { - $event = new PreSubmitEvent($this, $submittedData); - $dispatcher->dispatch($event, FormEvents::PRE_SUBMIT); - $submittedData = $event->getData(); - } - - // Check whether the form is compound. - // This check is preferable over checking the number of children, - // since forms without children may also be compound. - // (think of empty collection forms) - if ($this->config->getCompound()) { - if (null === $submittedData) { - $submittedData = []; - } - - if (!\is_array($submittedData)) { - throw new TransformationFailedException('Compound forms expect an array or NULL on submission.'); - } - - foreach ($this->children as $name => $child) { - $isSubmitted = \array_key_exists($name, $submittedData); - - if ($isSubmitted || $clearMissing) { - $child->submit($isSubmitted ? $submittedData[$name] : null, $clearMissing); - unset($submittedData[$name]); - - if (null !== $this->clickedButton) { - continue; - } - - if ($child instanceof ClickableInterface && $child->isClicked()) { - $this->clickedButton = $child; - - continue; - } - - if (method_exists($child, 'getClickedButton') && null !== $child->getClickedButton()) { - $this->clickedButton = $child->getClickedButton(); - } - } - } - - $this->extraData = $submittedData; - } - - // Forms that inherit their parents' data also are not processed, - // because then it would be too difficult to merge the changes in - // the child and the parent form. Instead, the parent form also takes - // changes in the grandchildren (i.e. children of the form that inherits - // its parent's data) into account. - // (see InheritDataAwareIterator below) - if (!$this->inheritData) { - // If the form is compound, the view data is merged with the data - // of the children using the data mapper. - // If the form is not compound, the view data is assigned to the submitted data. - $viewData = $this->config->getCompound() ? $this->viewData : $submittedData; - - if (FormUtil::isEmpty($viewData)) { - $emptyData = $this->config->getEmptyData(); - - if ($emptyData instanceof \Closure) { - $emptyData = $emptyData($this, $viewData); - } - - $viewData = $emptyData; - } - - // Merge form data from children into existing view data - // It is not necessary to invoke this method if the form has no children, - // even if it is compound. - if (\count($this->children) > 0) { - // Use InheritDataAwareIterator to process children of - // descendants that inherit this form's data. - // These descendants will not be submitted normally (see the check - // for $this->config->getInheritData() above) - $this->config->getDataMapper()->mapFormsToData( - new \RecursiveIteratorIterator(new InheritDataAwareIterator($this->children)), - $viewData - ); - } - - // Normalize data to unified representation - $normData = $this->viewToNorm($viewData); - - // Hook to change content of the data in the normalized - // representation - if ($dispatcher->hasListeners(FormEvents::SUBMIT)) { - $event = new SubmitEvent($this, $normData); - $dispatcher->dispatch($event, FormEvents::SUBMIT); - $normData = $event->getData(); - } - - // Synchronize representations - must not change the content! - $modelData = $this->normToModel($normData); - $viewData = $this->normToView($normData); - } - } catch (TransformationFailedException $e) { - $this->transformationFailure = $e; - - // If $viewData was not yet set, set it to $submittedData so that - // the erroneous data is accessible on the form. - // Forms that inherit data never set any data, because the getters - // forward to the parent form's getters anyway. - if (null === $viewData && !$this->inheritData) { - $viewData = $submittedData; - } - } - - $this->submitted = true; - $this->modelData = $modelData; - $this->normData = $normData; - $this->viewData = $viewData; - - if ($dispatcher->hasListeners(FormEvents::POST_SUBMIT)) { - $event = new PostSubmitEvent($this, $viewData); - $dispatcher->dispatch($event, FormEvents::POST_SUBMIT); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addError(FormError $error) - { - if (null === $error->getOrigin()) { - $error->setOrigin($this); - } - - if ($this->parent && $this->config->getErrorBubbling()) { - $this->parent->addError($error); - } else { - $this->errors[] = $error; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function isSubmitted() - { - return $this->submitted; - } - - /** - * {@inheritdoc} - */ - public function isSynchronized() - { - return null === $this->transformationFailure; - } - - /** - * {@inheritdoc} - */ - public function getTransformationFailure() - { - return $this->transformationFailure; - } - - /** - * {@inheritdoc} - */ - public function isEmpty() - { - foreach ($this->children as $child) { - if (!$child->isEmpty()) { - return false; - } - } - - if (!method_exists($this->config, 'getIsEmptyCallback')) { - trigger_deprecation('symfony/form', '5.1', 'Not implementing the "%s::getIsEmptyCallback()" method in "%s" is deprecated.', FormConfigInterface::class, \get_class($this->config)); - - $isEmptyCallback = null; - } else { - $isEmptyCallback = $this->config->getIsEmptyCallback(); - } - - if (null !== $isEmptyCallback) { - return $isEmptyCallback($this->modelData); - } - - return FormUtil::isEmpty($this->modelData) || - // arrays, countables - ((\is_array($this->modelData) || $this->modelData instanceof \Countable) && 0 === \count($this->modelData)) || - // traversables that are not countable - ($this->modelData instanceof \Traversable && 0 === iterator_count($this->modelData)); - } - - /** - * {@inheritdoc} - */ - public function isValid() - { - if (!$this->submitted) { - throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'); - } - - if ($this->isDisabled()) { - return true; - } - - return 0 === \count($this->getErrors(true)); - } - - /** - * Returns the button that was used to submit the form. - * - * @return FormInterface|ClickableInterface|null - */ - public function getClickedButton() - { - if ($this->clickedButton) { - return $this->clickedButton; - } - - return $this->parent && method_exists($this->parent, 'getClickedButton') ? $this->parent->getClickedButton() : null; - } - - /** - * {@inheritdoc} - */ - public function getErrors(bool $deep = false, bool $flatten = true) - { - $errors = $this->errors; - - // Copy the errors of nested forms to the $errors array - if ($deep) { - foreach ($this as $child) { - /** @var FormInterface $child */ - if ($child->isSubmitted() && $child->isValid()) { - continue; - } - - $iterator = $child->getErrors(true, $flatten); - - if (0 === \count($iterator)) { - continue; - } - - if ($flatten) { - foreach ($iterator as $error) { - $errors[] = $error; - } - } else { - $errors[] = $iterator; - } - } - } - - return new FormErrorIterator($this, $errors); - } - - /** - * {@inheritdoc} - */ - public function clearErrors(bool $deep = false): self - { - $this->errors = []; - - if ($deep) { - // Clear errors from children - foreach ($this as $child) { - if ($child instanceof ClearableErrorsInterface) { - $child->clearErrors(true); - } - } - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return iterator_to_array($this->children); - } - - /** - * {@inheritdoc} - */ - public function add($child, string $type = null, array $options = []) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot add children to a submitted form.'); - } - - if (!$this->config->getCompound()) { - throw new LogicException('You cannot add children to a simple form. Maybe you should set the option "compound" to true?'); - } - - if (!$child instanceof FormInterface) { - if (!\is_string($child) && !\is_int($child)) { - throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormInterface'); - } - - $child = (string) $child; - - if (null !== $type && !\is_string($type)) { - throw new UnexpectedTypeException($type, 'string or null'); - } - - // Never initialize child forms automatically - $options['auto_initialize'] = false; - - if (null === $type && null === $this->config->getDataClass()) { - $type = TextType::class; - } - - if (null === $type) { - $child = $this->config->getFormFactory()->createForProperty($this->config->getDataClass(), $child, null, $options); - } else { - $child = $this->config->getFormFactory()->createNamed($child, $type, null, $options); - } - } elseif ($child->getConfig()->getAutoInitialize()) { - throw new RuntimeException(sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".', $child->getName())); - } - - $this->children[$child->getName()] = $child; - - $child->setParent($this); - - // If setData() is currently being called, there is no need to call - // mapDataToForms() here, as mapDataToForms() is called at the end - // of setData() anyway. Not doing this check leads to an endless - // recursion when initializing the form lazily and an event listener - // (such as ResizeFormListener) adds fields depending on the data: - // - // * setData() is called, the form is not initialized yet - // * add() is called by the listener (setData() is not complete, so - // the form is still not initialized) - // * getViewData() is called - // * setData() is called since the form is not initialized yet - // * ... endless recursion ... - // - // Also skip data mapping if setData() has not been called yet. - // setData() will be called upon form initialization and data mapping - // will take place by then. - if (!$this->lockSetData && $this->defaultDataSet && !$this->inheritData) { - $viewData = $this->getViewData(); - $this->config->getDataMapper()->mapDataToForms( - $viewData, - new \RecursiveIteratorIterator(new InheritDataAwareIterator(new \ArrayIterator([$child->getName() => $child]))) - ); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - if ($this->submitted) { - throw new AlreadySubmittedException('You cannot remove children from a submitted form.'); - } - - if (isset($this->children[$name])) { - if (!$this->children[$name]->isSubmitted()) { - $this->children[$name]->setParent(null); - } - - unset($this->children[$name]); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return isset($this->children[$name]); - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - if (isset($this->children[$name])) { - return $this->children[$name]; - } - - throw new OutOfBoundsException(sprintf('Child "%s" does not exist.', $name)); - } - - /** - * Returns whether a child with the given name exists (implements the \ArrayAccess interface). - * - * @param string $name The name of the child - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($name) - { - return $this->has($name); - } - - /** - * Returns the child with the given name (implements the \ArrayAccess interface). - * - * @param string $name The name of the child - * - * @return FormInterface - * - * @throws OutOfBoundsException if the named child does not exist - */ - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->get($name); - } - - /** - * Adds a child to the form (implements the \ArrayAccess interface). - * - * @param string $name Ignored. The name of the child is used - * @param FormInterface $child The child to be added - * - * @return void - * - * @throws AlreadySubmittedException if the form has already been submitted - * @throws LogicException when trying to add a child to a non-compound form - * - * @see self::add() - */ - #[\ReturnTypeWillChange] - public function offsetSet($name, $child) - { - $this->add($child); - } - - /** - * Removes the child with the given name from the form (implements the \ArrayAccess interface). - * - * @param string $name The name of the child to remove - * - * @return void - * - * @throws AlreadySubmittedException if the form has already been submitted - */ - #[\ReturnTypeWillChange] - public function offsetUnset($name) - { - $this->remove($name); - } - - /** - * Returns the iterator for this group. - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return $this->children; - } - - /** - * Returns the number of form children (implements the \Countable interface). - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->children); - } - - /** - * {@inheritdoc} - */ - public function createView(FormView $parent = null) - { - if (null === $parent && $this->parent) { - $parent = $this->parent->createView(); - } - - $type = $this->config->getType(); - $options = $this->config->getOptions(); - - // The methods createView(), buildView() and finishView() are called - // explicitly here in order to be able to override either of them - // in a custom resolved form type. - $view = $type->createView($this, $parent); - - $type->buildView($view, $this, $options); - - foreach ($this->children as $name => $child) { - $view->children[$name] = $child->createView($view); - } - - $this->sort($view->children); - - $type->finishView($view, $this, $options); - - return $view; - } - - /** - * Sorts view fields based on their priority value. - */ - private function sort(array &$children): void - { - $c = []; - $i = 0; - $needsSorting = false; - foreach ($children as $name => $child) { - $c[$name] = ['p' => $child->vars['priority'] ?? 0, 'i' => $i++]; - - if (0 !== $c[$name]['p']) { - $needsSorting = true; - } - } - - if (!$needsSorting) { - return; - } - - uksort($children, static function ($a, $b) use ($c): int { - return [$c[$b]['p'], $c[$a]['i']] <=> [$c[$a]['p'], $c[$b]['i']]; - }); - } - - /** - * Normalizes the underlying data if a model transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the underlying data cannot be transformed to "normalized" format - */ - private function modelToNorm($value) - { - try { - foreach ($this->config->getModelTransformers() as $transformer) { - $value = $transformer->transform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to transform data for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Reverse transforms a value if a model transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the value cannot be transformed to "model" format - */ - private function normToModel($value) - { - try { - $transformers = $this->config->getModelTransformers(); - - for ($i = \count($transformers) - 1; $i >= 0; --$i) { - $value = $transformers[$i]->reverseTransform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Transforms the value if a view transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the normalized value cannot be transformed to "view" format - */ - private function normToView($value) - { - // Scalar values should be converted to strings to - // facilitate differentiation between empty ("") and zero (0). - // Only do this for simple forms, as the resulting value in - // compound forms is passed to the data mapper and thus should - // not be converted to a string before. - if (!($transformers = $this->config->getViewTransformers()) && !$this->config->getCompound()) { - return null === $value || is_scalar($value) ? (string) $value : $value; - } - - try { - foreach ($transformers as $transformer) { - $value = $transformer->transform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to transform value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } - - /** - * Reverse transforms a value if a view transformer is set. - * - * @return mixed - * - * @throws TransformationFailedException If the submitted value cannot be transformed to "normalized" format - */ - private function viewToNorm($value) - { - if (!$transformers = $this->config->getViewTransformers()) { - return '' === $value ? null : $value; - } - - try { - for ($i = \count($transformers) - 1; $i >= 0; --$i) { - $value = $transformers[$i]->reverseTransform($value); - } - } catch (TransformationFailedException $exception) { - throw new TransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters()); - } - - return $value; - } -} diff --git a/vendor/symfony/form/FormBuilder.php b/vendor/symfony/form/FormBuilder.php deleted file mode 100644 index 37fca95..0000000 --- a/vendor/symfony/form/FormBuilder.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Core\Type\TextType; - -/** - * A builder for creating {@link Form} instances. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormBuilderInterface -{ - /** - * The children of the form builder. - * - * @var FormBuilderInterface[] - */ - private $children = []; - - /** - * The data of children who haven't been converted to form builders yet. - * - * @var array - */ - private $unresolvedChildren = []; - - public function __construct(?string $name, ?string $dataClass, EventDispatcherInterface $dispatcher, FormFactoryInterface $factory, array $options = []) - { - parent::__construct($name, $dataClass, $dispatcher, $options); - - $this->setFormFactory($factory); - } - - /** - * {@inheritdoc} - */ - public function add($child, string $type = null, array $options = []) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($child instanceof FormBuilderInterface) { - $this->children[$child->getName()] = $child; - - // In case an unresolved child with the same name exists - unset($this->unresolvedChildren[$child->getName()]); - - return $this; - } - - if (!\is_string($child) && !\is_int($child)) { - throw new UnexpectedTypeException($child, 'string or Symfony\Component\Form\FormBuilderInterface'); - } - - if (null !== $type && !\is_string($type)) { - throw new UnexpectedTypeException($type, 'string or null'); - } - - // Add to "children" to maintain order - $this->children[$child] = null; - $this->unresolvedChildren[$child] = [$type, $options]; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function create($name, string $type = null, array $options = []) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (null === $type && null === $this->getDataClass()) { - $type = TextType::class; - } - - if (null !== $type) { - return $this->getFormFactory()->createNamedBuilder($name, $type, null, $options); - } - - return $this->getFormFactory()->createBuilderForProperty($this->getDataClass(), $name, null, $options); - } - - /** - * {@inheritdoc} - */ - public function get($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (isset($this->unresolvedChildren[$name])) { - return $this->resolveChild($name); - } - - if (isset($this->children[$name])) { - return $this->children[$name]; - } - - throw new InvalidArgumentException(sprintf('The child with the name "%s" does not exist.', $name)); - } - - /** - * {@inheritdoc} - */ - public function remove($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - unset($this->unresolvedChildren[$name], $this->children[$name]); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function has($name) - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return isset($this->unresolvedChildren[$name]) || isset($this->children[$name]); - } - - /** - * {@inheritdoc} - */ - public function all() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->resolveChildren(); - - return $this->children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return \count($this->children); - } - - /** - * {@inheritdoc} - */ - public function getFormConfig() - { - /** @var $config self */ - $config = parent::getFormConfig(); - - $config->children = []; - $config->unresolvedChildren = []; - - return $config; - } - - /** - * {@inheritdoc} - */ - public function getForm() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->resolveChildren(); - - $form = new Form($this->getFormConfig()); - - foreach ($this->children as $child) { - // Automatic initialization is only supported on root forms - $form->add($child->setAutoInitialize(false)->getForm()); - } - - if ($this->getAutoInitialize()) { - // Automatically initialize the form if it is configured so - $form->initialize(); - } - - return $form; - } - - /** - * {@inheritdoc} - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if ($this->locked) { - throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - return new \ArrayIterator($this->all()); - } - - /** - * Converts an unresolved child into a {@link FormBuilderInterface} instance. - */ - private function resolveChild(string $name): FormBuilderInterface - { - [$type, $options] = $this->unresolvedChildren[$name]; - - unset($this->unresolvedChildren[$name]); - - return $this->children[$name] = $this->create($name, $type, $options); - } - - /** - * Converts all unresolved children into {@link FormBuilder} instances. - */ - private function resolveChildren() - { - foreach ($this->unresolvedChildren as $name => $info) { - $this->children[$name] = $this->create($name, $info[0], $info[1]); - } - - $this->unresolvedChildren = []; - } -} diff --git a/vendor/symfony/form/FormBuilderInterface.php b/vendor/symfony/form/FormBuilderInterface.php deleted file mode 100644 index 52bf5b6..0000000 --- a/vendor/symfony/form/FormBuilderInterface.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - * - * @extends \Traversable - */ -interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface -{ - /** - * Adds a new field to this group. A field must have a unique name within - * the group. Otherwise the existing field is overwritten. - * - * If you add a nested group, this group should also be represented in the - * object hierarchy. - * - * @param string|FormBuilderInterface $child - * @param array $options - * - * @return static - */ - public function add($child, string $type = null, array $options = []); - - /** - * Creates a form builder. - * - * @param string $name The name of the form or the name of the property - * @param string|null $type The type of the form or null if name is a property - * @param array $options - * - * @return self - */ - public function create(string $name, string $type = null, array $options = []); - - /** - * Returns a child by name. - * - * @return self - * - * @throws Exception\InvalidArgumentException if the given child does not exist - */ - public function get(string $name); - - /** - * Removes the field with the given name. - * - * @return static - */ - public function remove(string $name); - - /** - * Returns whether a field with the given name exists. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns the children. - * - * @return array - */ - public function all(); - - /** - * Creates the form. - * - * @return FormInterface - */ - public function getForm(); -} diff --git a/vendor/symfony/form/FormConfigBuilder.php b/vendor/symfony/form/FormConfigBuilder.php deleted file mode 100644 index b511c2f..0000000 --- a/vendor/symfony/form/FormConfigBuilder.php +++ /dev/null @@ -1,811 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\ImmutableEventDispatcher; -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * A basic form configuration. - * - * @author Bernhard Schussek - */ -class FormConfigBuilder implements FormConfigBuilderInterface -{ - /** - * Caches a globally unique {@link NativeRequestHandler} instance. - * - * @var NativeRequestHandler - */ - private static $nativeRequestHandler; - - protected $locked = false; - private $dispatcher; - private $name; - - /** - * @var PropertyPathInterface|string|null - */ - private $propertyPath; - - private $mapped = true; - private $byReference = true; - private $inheritData = false; - private $compound = false; - - /** - * @var ResolvedFormTypeInterface - */ - private $type; - - private $viewTransformers = []; - private $modelTransformers = []; - - /** - * @var DataMapperInterface|null - */ - private $dataMapper; - - private $required = true; - private $disabled = false; - private $errorBubbling = false; - - /** - * @var mixed - */ - private $emptyData; - - private $attributes = []; - - /** - * @var mixed - */ - private $data; - - /** - * @var string|null - */ - private $dataClass; - - private $dataLocked = false; - - /** - * @var FormFactoryInterface|null - */ - private $formFactory; - - private $action = ''; - private $method = 'POST'; - - /** - * @var RequestHandlerInterface|null - */ - private $requestHandler; - - private $autoInitialize = false; - private $options; - private $isEmptyCallback; - - /** - * Creates an empty form configuration. - * - * @param string|null $name The form name - * @param string|null $dataClass The class of the form's data - * - * @throws InvalidArgumentException if the data class is not a valid class or if - * the name contains invalid characters - */ - public function __construct(?string $name, ?string $dataClass, EventDispatcherInterface $dispatcher, array $options = []) - { - self::validateName($name); - - if (null !== $dataClass && !class_exists($dataClass) && !interface_exists($dataClass, false)) { - throw new InvalidArgumentException(sprintf('Class "%s" not found. Is the "data_class" form option set correctly?', $dataClass)); - } - - $this->name = (string) $name; - $this->dataClass = $dataClass; - $this->dispatcher = $dispatcher; - $this->options = $options; - } - - /** - * {@inheritdoc} - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dispatcher->addListener($eventName, $listener, $priority); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dispatcher->addSubscriber($subscriber); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($forcePrepend) { - array_unshift($this->viewTransformers, $viewTransformer); - } else { - $this->viewTransformers[] = $viewTransformer; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function resetViewTransformers() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->viewTransformers = []; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if ($forceAppend) { - $this->modelTransformers[] = $modelTransformer; - } else { - array_unshift($this->modelTransformers, $modelTransformer); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function resetModelTransformers() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->modelTransformers = []; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getEventDispatcher() - { - if ($this->locked && !$this->dispatcher instanceof ImmutableEventDispatcher) { - $this->dispatcher = new ImmutableEventDispatcher($this->dispatcher); - } - - return $this->dispatcher; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath() - { - return $this->propertyPath; - } - - /** - * {@inheritdoc} - */ - public function getMapped() - { - return $this->mapped; - } - - /** - * {@inheritdoc} - */ - public function getByReference() - { - return $this->byReference; - } - - /** - * {@inheritdoc} - */ - public function getInheritData() - { - return $this->inheritData; - } - - /** - * {@inheritdoc} - */ - public function getCompound() - { - return $this->compound; - } - - /** - * {@inheritdoc} - */ - public function getType() - { - return $this->type; - } - - /** - * {@inheritdoc} - */ - public function getViewTransformers() - { - return $this->viewTransformers; - } - - /** - * {@inheritdoc} - */ - public function getModelTransformers() - { - return $this->modelTransformers; - } - - /** - * {@inheritdoc} - */ - public function getDataMapper() - { - return $this->dataMapper; - } - - /** - * {@inheritdoc} - */ - public function getRequired() - { - return $this->required; - } - - /** - * {@inheritdoc} - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * {@inheritdoc} - */ - public function getErrorBubbling() - { - return $this->errorBubbling; - } - - /** - * {@inheritdoc} - */ - public function getEmptyData() - { - return $this->emptyData; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function hasAttribute(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function getAttribute(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function getData() - { - return $this->data; - } - - /** - * {@inheritdoc} - */ - public function getDataClass() - { - return $this->dataClass; - } - - /** - * {@inheritdoc} - */ - public function getDataLocked() - { - return $this->dataLocked; - } - - /** - * {@inheritdoc} - */ - public function getFormFactory() - { - if (!isset($this->formFactory)) { - throw new BadMethodCallException('The form factory must be set before retrieving it.'); - } - - return $this->formFactory; - } - - /** - * {@inheritdoc} - */ - public function getAction() - { - return $this->action; - } - - /** - * {@inheritdoc} - */ - public function getMethod() - { - return $this->method; - } - - /** - * {@inheritdoc} - */ - public function getRequestHandler() - { - if (null === $this->requestHandler) { - if (null === self::$nativeRequestHandler) { - self::$nativeRequestHandler = new NativeRequestHandler(); - } - $this->requestHandler = self::$nativeRequestHandler; - } - - return $this->requestHandler; - } - - /** - * {@inheritdoc} - */ - public function getAutoInitialize() - { - return $this->autoInitialize; - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - return $this->options; - } - - /** - * {@inheritdoc} - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * {@inheritdoc} - */ - public function getOption(string $name, $default = null) - { - return \array_key_exists($name, $this->options) ? $this->options[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function getIsEmptyCallback(): ?callable - { - return $this->isEmptyCallback; - } - - /** - * {@inheritdoc} - */ - public function setAttribute(string $name, $value) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->attributes[$name] = $value; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAttributes(array $attributes) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->attributes = $attributes; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDataMapper(DataMapperInterface $dataMapper = null) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dataMapper = $dataMapper; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDisabled(bool $disabled) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->disabled = $disabled; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setEmptyData($emptyData) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->emptyData = $emptyData; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setErrorBubbling(bool $errorBubbling) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->errorBubbling = $errorBubbling; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setRequired(bool $required) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->required = $required; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setPropertyPath($propertyPath) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) { - $propertyPath = new PropertyPath($propertyPath); - } - - $this->propertyPath = $propertyPath; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMapped(bool $mapped) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->mapped = $mapped; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setByReference(bool $byReference) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->byReference = $byReference; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setInheritData(bool $inheritData) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->inheritData = $inheritData; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setCompound(bool $compound) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->compound = $compound; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setType(ResolvedFormTypeInterface $type) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->type = $type; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setData($data) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->data = $data; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDataLocked(bool $locked) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->dataLocked = $locked; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setFormFactory(FormFactoryInterface $formFactory) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->formFactory = $formFactory; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAction(string $action) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->action = $action; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMethod(string $method) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->method = strtoupper($method); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler) - { - if ($this->locked) { - throw new BadMethodCallException('The config builder cannot be modified anymore.'); - } - - $this->requestHandler = $requestHandler; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setAutoInitialize(bool $initialize) - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - $this->autoInitialize = $initialize; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormConfig() - { - if ($this->locked) { - throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); - } - - // This method should be idempotent, so clone the builder - $config = clone $this; - $config->locked = true; - - return $config; - } - - /** - * {@inheritdoc} - */ - public function setIsEmptyCallback(?callable $isEmptyCallback) - { - $this->isEmptyCallback = $isEmptyCallback; - - return $this; - } - - /** - * Validates whether the given variable is a valid form name. - * - * @throws InvalidArgumentException if the name contains invalid characters - * - * @internal - */ - final public static function validateName(?string $name) - { - if (!self::isValidName($name)) { - throw new InvalidArgumentException(sprintf('The name "%s" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").', $name)); - } - } - - /** - * Returns whether the given variable contains a valid form name. - * - * A name is accepted if it - * - * * is empty - * * starts with a letter, digit or underscore - * * contains only letters, digits, numbers, underscores ("_"), - * hyphens ("-") and colons (":") - */ - final public static function isValidName(?string $name): bool - { - return '' === $name || null === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\-:]*$/D', $name); - } -} diff --git a/vendor/symfony/form/FormConfigBuilderInterface.php b/vendor/symfony/form/FormConfigBuilderInterface.php deleted file mode 100644 index 757fa25..0000000 --- a/vendor/symfony/form/FormConfigBuilderInterface.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * @author Bernhard Schussek - * - * @method $this setIsEmptyCallback(callable|null $isEmptyCallback) Sets the callback that will be called to determine if the model data of the form is empty or not - not implementing it is deprecated since Symfony 5.1 - */ -interface FormConfigBuilderInterface extends FormConfigInterface -{ - /** - * Adds an event listener to an event on this form. - * - * @param int $priority The priority of the listener. Listeners - * with a higher priority are called before - * listeners with a lower priority. - * - * @return $this - */ - public function addEventListener(string $eventName, callable $listener, int $priority = 0); - - /** - * Adds an event subscriber for events on this form. - * - * @return $this - */ - public function addEventSubscriber(EventSubscriberInterface $subscriber); - - /** - * Appends / prepends a transformer to the view transformer chain. - * - * The transform method of the transformer is used to convert data from the - * normalized to the view format. - * The reverseTransform method of the transformer is used to convert from the - * view to the normalized format. - * - * @param bool $forcePrepend If set to true, prepend instead of appending - * - * @return $this - */ - public function addViewTransformer(DataTransformerInterface $viewTransformer, bool $forcePrepend = false); - - /** - * Clears the view transformers. - * - * @return $this - */ - public function resetViewTransformers(); - - /** - * Prepends / appends a transformer to the normalization transformer chain. - * - * The transform method of the transformer is used to convert data from the - * model to the normalized format. - * The reverseTransform method of the transformer is used to convert from the - * normalized to the model format. - * - * @param bool $forceAppend If set to true, append instead of prepending - * - * @return $this - */ - public function addModelTransformer(DataTransformerInterface $modelTransformer, bool $forceAppend = false); - - /** - * Clears the normalization transformers. - * - * @return $this - */ - public function resetModelTransformers(); - - /** - * Sets the value for an attribute. - * - * @param mixed $value The value of the attribute - * - * @return $this - */ - public function setAttribute(string $name, $value); - - /** - * Sets the attributes. - * - * @return $this - */ - public function setAttributes(array $attributes); - - /** - * Sets the data mapper used by the form. - * - * @return $this - */ - public function setDataMapper(DataMapperInterface $dataMapper = null); - - /** - * Sets whether the form is disabled. - * - * @return $this - */ - public function setDisabled(bool $disabled); - - /** - * Sets the data used for the client data when no value is submitted. - * - * @param mixed $emptyData The empty data - * - * @return $this - */ - public function setEmptyData($emptyData); - - /** - * Sets whether errors bubble up to the parent. - * - * @return $this - */ - public function setErrorBubbling(bool $errorBubbling); - - /** - * Sets whether this field is required to be filled out when submitted. - * - * @return $this - */ - public function setRequired(bool $required); - - /** - * Sets the property path that the form should be mapped to. - * - * @param string|PropertyPathInterface|null $propertyPath The property path or null if the path should be set - * automatically based on the form's name - * - * @return $this - */ - public function setPropertyPath($propertyPath); - - /** - * Sets whether the form should be mapped to an element of its - * parent's data. - * - * @return $this - */ - public function setMapped(bool $mapped); - - /** - * Sets whether the form's data should be modified by reference. - * - * @return $this - */ - public function setByReference(bool $byReference); - - /** - * Sets whether the form should read and write the data of its parent. - * - * @return $this - */ - public function setInheritData(bool $inheritData); - - /** - * Sets whether the form should be compound. - * - * @return $this - * - * @see FormConfigInterface::getCompound() - */ - public function setCompound(bool $compound); - - /** - * Sets the resolved type. - * - * @return $this - */ - public function setType(ResolvedFormTypeInterface $type); - - /** - * Sets the initial data of the form. - * - * @param mixed $data The data of the form in model format - * - * @return $this - */ - public function setData($data); - - /** - * Locks the form's data to the data passed in the configuration. - * - * A form with locked data is restricted to the data passed in - * this configuration. The data can only be modified then by - * submitting the form or using PRE_SET_DATA event. - * - * It means data passed to a factory method or mapped from the - * parent will be ignored. - * - * @return $this - */ - public function setDataLocked(bool $locked); - - /** - * Sets the form factory used for creating new forms. - */ - public function setFormFactory(FormFactoryInterface $formFactory); - - /** - * Sets the target URL of the form. - * - * @return $this - */ - public function setAction(string $action); - - /** - * Sets the HTTP method used by the form. - * - * @return $this - */ - public function setMethod(string $method); - - /** - * Sets the request handler used by the form. - * - * @return $this - */ - public function setRequestHandler(RequestHandlerInterface $requestHandler); - - /** - * Sets whether the form should be initialized automatically. - * - * Should be set to true only for root forms. - * - * @param bool $initialize True to initialize the form automatically, - * false to suppress automatic initialization. - * In the second case, you need to call - * {@link FormInterface::initialize()} manually. - * - * @return $this - */ - public function setAutoInitialize(bool $initialize); - - /** - * Builds and returns the form configuration. - * - * @return FormConfigInterface - */ - public function getFormConfig(); -} diff --git a/vendor/symfony/form/FormConfigInterface.php b/vendor/symfony/form/FormConfigInterface.php deleted file mode 100644 index e332feb..0000000 --- a/vendor/symfony/form/FormConfigInterface.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * The configuration of a {@link Form} object. - * - * @author Bernhard Schussek - * - * @method callable|null getIsEmptyCallback() Returns a callable that takes the model data as argument and that returns if it is empty or not - not implementing it is deprecated since Symfony 5.1 - */ -interface FormConfigInterface -{ - /** - * Returns the event dispatcher used to dispatch form events. - * - * @return EventDispatcherInterface - */ - public function getEventDispatcher(); - - /** - * Returns the name of the form used as HTTP parameter. - * - * @return string - */ - public function getName(); - - /** - * Returns the property path that the form should be mapped to. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath(); - - /** - * Returns whether the form should be mapped to an element of its - * parent's data. - * - * @return bool - */ - public function getMapped(); - - /** - * Returns whether the form's data should be modified by reference. - * - * @return bool - */ - public function getByReference(); - - /** - * Returns whether the form should read and write the data of its parent. - * - * @return bool - */ - public function getInheritData(); - - /** - * Returns whether the form is compound. - * - * This property is independent of whether the form actually has - * children. A form can be compound and have no children at all, like - * for example an empty collection form. - * The contrary is not possible, a form which is not compound - * cannot have any children. - * - * @return bool - */ - public function getCompound(); - - /** - * Returns the resolved form type used to construct the form. - * - * @return ResolvedFormTypeInterface - */ - public function getType(); - - /** - * Returns the view transformers of the form. - * - * @return DataTransformerInterface[] - */ - public function getViewTransformers(); - - /** - * Returns the model transformers of the form. - * - * @return DataTransformerInterface[] - */ - public function getModelTransformers(); - - /** - * Returns the data mapper of the compound form or null for a simple form. - * - * @return DataMapperInterface|null - */ - public function getDataMapper(); - - /** - * Returns whether the form is required. - * - * @return bool - */ - public function getRequired(); - - /** - * Returns whether the form is disabled. - * - * @return bool - */ - public function getDisabled(); - - /** - * Returns whether errors attached to the form will bubble to its parent. - * - * @return bool - */ - public function getErrorBubbling(); - - /** - * Used when the view data is empty on submission. - * - * When the form is compound it will also be used to map the - * children data. - * - * The empty data must match the view format as it will passed to the first view transformer's - * "reverseTransform" method. - * - * @return mixed - */ - public function getEmptyData(); - - /** - * Returns additional attributes of the form. - * - * @return array - */ - public function getAttributes(); - - /** - * Returns whether the attribute with the given name exists. - * - * @return bool - */ - public function hasAttribute(string $name); - - /** - * Returns the value of the given attribute. - * - * @param mixed $default The value returned if the attribute does not exist - * - * @return mixed - */ - public function getAttribute(string $name, $default = null); - - /** - * Returns the initial data of the form. - * - * @return mixed - */ - public function getData(); - - /** - * Returns the class of the view data or null if the data is scalar or an array. - * - * @return string|null - */ - public function getDataClass(); - - /** - * Returns whether the form's data is locked. - * - * A form with locked data is restricted to the data passed in - * this configuration. The data can only be modified then by - * submitting the form. - * - * @return bool - */ - public function getDataLocked(); - - /** - * Returns the form factory used for creating new forms. - * - * @return FormFactoryInterface - */ - public function getFormFactory(); - - /** - * Returns the target URL of the form. - * - * @return string - */ - public function getAction(); - - /** - * Returns the HTTP method used by the form. - * - * @return string - */ - public function getMethod(); - - /** - * Returns the request handler used by the form. - * - * @return RequestHandlerInterface - */ - public function getRequestHandler(); - - /** - * Returns whether the form should be initialized upon creation. - * - * @return bool - */ - public function getAutoInitialize(); - - /** - * Returns all options passed during the construction of the form. - * - * @return array The passed options - */ - public function getOptions(); - - /** - * Returns whether a specific option exists. - * - * @return bool - */ - public function hasOption(string $name); - - /** - * Returns the value of a specific option. - * - * @param mixed $default The value returned if the option does not exist - * - * @return mixed - */ - public function getOption(string $name, $default = null); -} diff --git a/vendor/symfony/form/FormError.php b/vendor/symfony/form/FormError.php deleted file mode 100644 index e03f3ee..0000000 --- a/vendor/symfony/form/FormError.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * Wraps errors in forms. - * - * @author Bernhard Schussek - */ -class FormError -{ - protected $messageTemplate; - protected $messageParameters; - protected $messagePluralization; - - private $message; - private $cause; - - /** - * The form that spawned this error. - * - * @var FormInterface - */ - private $origin; - - /** - * Any array key in $messageParameters will be used as a placeholder in - * $messageTemplate. - * - * @param string $message The translated error message - * @param string|null $messageTemplate The template for the error message - * @param array $messageParameters The parameters that should be - * substituted in the message template - * @param int|null $messagePluralization The value for error message pluralization - * @param mixed $cause The cause of the error - * - * @see \Symfony\Component\Translation\Translator - */ - public function __construct(string $message, string $messageTemplate = null, array $messageParameters = [], int $messagePluralization = null, $cause = null) - { - $this->message = $message; - $this->messageTemplate = $messageTemplate ?: $message; - $this->messageParameters = $messageParameters; - $this->messagePluralization = $messagePluralization; - $this->cause = $cause; - } - - /** - * Returns the error message. - * - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Returns the error message template. - * - * @return string - */ - public function getMessageTemplate() - { - return $this->messageTemplate; - } - - /** - * Returns the parameters to be inserted in the message template. - * - * @return array - */ - public function getMessageParameters() - { - return $this->messageParameters; - } - - /** - * Returns the value for error message pluralization. - * - * @return int|null - */ - public function getMessagePluralization() - { - return $this->messagePluralization; - } - - /** - * Returns the cause of this error. - * - * @return mixed - */ - public function getCause() - { - return $this->cause; - } - - /** - * Sets the form that caused this error. - * - * This method must only be called once. - * - * @throws BadMethodCallException If the method is called more than once - */ - public function setOrigin(FormInterface $origin) - { - if (null !== $this->origin) { - throw new BadMethodCallException('setOrigin() must only be called once.'); - } - - $this->origin = $origin; - } - - /** - * Returns the form that caused this error. - * - * @return FormInterface|null - */ - public function getOrigin() - { - return $this->origin; - } -} diff --git a/vendor/symfony/form/FormErrorIterator.php b/vendor/symfony/form/FormErrorIterator.php deleted file mode 100644 index 9ee2f0e..0000000 --- a/vendor/symfony/form/FormErrorIterator.php +++ /dev/null @@ -1,316 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\OutOfBoundsException; -use Symfony\Component\Validator\ConstraintViolation; - -/** - * Iterates over the errors of a form. - * - * This class supports recursive iteration. In order to iterate recursively, - * pass a structure of {@link FormError} and {@link FormErrorIterator} objects - * to the $errors constructor argument. - * - * You can also wrap the iterator into a {@link \RecursiveIteratorIterator} to - * flatten the recursive structure into a flat list of errors. - * - * @author Bernhard Schussek - * - * @template T of FormError|FormErrorIterator - * - * @implements \ArrayAccess - * @implements \RecursiveIterator - * @implements \SeekableIterator - */ -class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \ArrayAccess, \Countable -{ - /** - * The prefix used for indenting nested error messages. - */ - public const INDENTATION = ' '; - - private $form; - - /** - * @var list - */ - private $errors; - - /** - * @param list $errors - * - * @throws InvalidArgumentException If the errors are invalid - */ - public function __construct(FormInterface $form, array $errors) - { - foreach ($errors as $error) { - if (!($error instanceof FormError || $error instanceof self)) { - throw new InvalidArgumentException(sprintf('The errors must be instances of "Symfony\Component\Form\FormError" or "%s". Got: "%s".', __CLASS__, get_debug_type($error))); - } - } - - $this->form = $form; - $this->errors = $errors; - } - - /** - * Returns all iterated error messages as string. - * - * @return string - */ - public function __toString() - { - $string = ''; - - foreach ($this->errors as $error) { - if ($error instanceof FormError) { - $string .= 'ERROR: '.$error->getMessage()."\n"; - } else { - /* @var self $error */ - $string .= $error->getForm()->getName().":\n"; - $string .= self::indent((string) $error); - } - } - - return $string; - } - - /** - * Returns the iterated form. - * - * @return FormInterface - */ - public function getForm() - { - return $this->form; - } - - /** - * Returns the current element of the iterator. - * - * @return T An error or an iterator containing nested errors - */ - #[\ReturnTypeWillChange] - public function current() - { - return current($this->errors); - } - - /** - * Advances the iterator to the next position. - */ - #[\ReturnTypeWillChange] - public function next() - { - next($this->errors); - } - - /** - * Returns the current position of the iterator. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function key() - { - return key($this->errors); - } - - /** - * Returns whether the iterator's position is valid. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function valid() - { - return null !== key($this->errors); - } - - /** - * Sets the iterator's position to the beginning. - * - * This method detects if errors have been added to the form since the - * construction of the iterator. - */ - #[\ReturnTypeWillChange] - public function rewind() - { - reset($this->errors); - } - - /** - * Returns whether a position exists in the iterator. - * - * @param int $position The position - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($position) - { - return isset($this->errors[$position]); - } - - /** - * Returns the element at a position in the iterator. - * - * @param int $position The position - * - * @return T - * - * @throws OutOfBoundsException If the given position does not exist - */ - #[\ReturnTypeWillChange] - public function offsetGet($position) - { - if (!isset($this->errors[$position])) { - throw new OutOfBoundsException('The offset '.$position.' does not exist.'); - } - - return $this->errors[$position]; - } - - /** - * Unsupported method. - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetSet($position, $value) - { - throw new BadMethodCallException('The iterator doesn\'t support modification of elements.'); - } - - /** - * Unsupported method. - * - * @return void - * - * @throws BadMethodCallException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($position) - { - throw new BadMethodCallException('The iterator doesn\'t support modification of elements.'); - } - - /** - * Returns whether the current element of the iterator can be recursed - * into. - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return current($this->errors) instanceof self; - } - - /** - * @return self - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - if (!$this->hasChildren()) { - trigger_deprecation('symfony/form', '5.4', 'Calling "%s()" if the current element is not iterable is deprecated, call "%s" to get the current element.', __METHOD__, self::class.'::current()'); - // throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()')); - } - - /** @var self $children */ - $children = current($this->errors); - - return $children; - } - - /** - * Returns the number of elements in the iterator. - * - * Note that this is not the total number of errors, if the constructor - * parameter $deep was set to true! In that case, you should wrap the - * iterator into a {@link \RecursiveIteratorIterator} with the standard mode - * {@link \RecursiveIteratorIterator::LEAVES_ONLY} and count the result. - * - * $iterator = new \RecursiveIteratorIterator($form->getErrors(true)); - * $count = count(iterator_to_array($iterator)); - * - * Alternatively, set the constructor argument $flatten to true as well. - * - * $count = count($form->getErrors(true, true)); - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->errors); - } - - /** - * Sets the position of the iterator. - * - * @param int $position The new position - * - * @return void - * - * @throws OutOfBoundsException If the position is invalid - */ - #[\ReturnTypeWillChange] - public function seek($position) - { - if (!isset($this->errors[$position])) { - throw new OutOfBoundsException('The offset '.$position.' does not exist.'); - } - - reset($this->errors); - - while ($position !== key($this->errors)) { - next($this->errors); - } - } - - /** - * Creates iterator for errors with specific codes. - * - * @param string|string[] $codes The codes to find - * - * @return static - */ - public function findByCodes($codes) - { - $codes = (array) $codes; - $errors = []; - foreach ($this as $error) { - $cause = $error->getCause(); - if ($cause instanceof ConstraintViolation && \in_array($cause->getCode(), $codes, true)) { - $errors[] = $error; - } - } - - return new static($this->form, $errors); - } - - /** - * Utility function for indenting multi-line strings. - */ - private static function indent(string $string): string - { - return rtrim(self::INDENTATION.str_replace("\n", "\n".self::INDENTATION, $string), ' '); - } -} diff --git a/vendor/symfony/form/FormEvent.php b/vendor/symfony/form/FormEvent.php deleted file mode 100644 index c466faf..0000000 --- a/vendor/symfony/form/FormEvent.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Contracts\EventDispatcher\Event; - -/** - * @author Bernhard Schussek - */ -class FormEvent extends Event -{ - private $form; - protected $data; - - /** - * @param mixed $data The data - */ - public function __construct(FormInterface $form, $data) - { - $this->form = $form; - $this->data = $data; - } - - /** - * Returns the form at the source of the event. - * - * @return FormInterface - */ - public function getForm() - { - return $this->form; - } - - /** - * Returns the data associated with this event. - * - * @return mixed - */ - public function getData() - { - return $this->data; - } - - /** - * Allows updating with some filtered data. - * - * @param mixed $data - */ - public function setData($data) - { - $this->data = $data; - } -} diff --git a/vendor/symfony/form/FormEvents.php b/vendor/symfony/form/FormEvents.php deleted file mode 100644 index cf4d97f..0000000 --- a/vendor/symfony/form/FormEvents.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Event\PostSetDataEvent; -use Symfony\Component\Form\Event\PostSubmitEvent; -use Symfony\Component\Form\Event\PreSetDataEvent; -use Symfony\Component\Form\Event\PreSubmitEvent; -use Symfony\Component\Form\Event\SubmitEvent; - -/** - * To learn more about how form events work check the documentation - * entry at {@link https://symfony.com/doc/any/components/form/form_events.html}. - * - * To learn how to dynamically modify forms using events check the cookbook - * entry at {@link https://symfony.com/doc/any/cookbook/form/dynamic_form_modification.html}. - * - * @author Bernhard Schussek - */ -final class FormEvents -{ - /** - * The PRE_SUBMIT event is dispatched at the beginning of the Form::submit() method. - * - * It can be used to: - * - Change data from the request, before submitting the data to the form. - * - Add or remove form fields, before submitting the data to the form. - * - * @Event("Symfony\Component\Form\Event\PreSubmitEvent") - */ - public const PRE_SUBMIT = 'form.pre_submit'; - - /** - * The SUBMIT event is dispatched after the Form::submit() method - * has changed the view data by the request data, or submitted and mapped - * the children if the form is compound, and after reverse transformation - * to normalized representation. - * - * It's also dispatched just before the Form::submit() method transforms back - * the normalized data to the model and view data. - * - * So at this stage children of compound forms are submitted and synchronized, unless - * their transformation failed, but a parent would still be at the PRE_SUBMIT level. - * - * Since the current form is not synchronized yet, it is still possible to add and - * remove fields. - * - * @Event("Symfony\Component\Form\Event\SubmitEvent") - */ - public const SUBMIT = 'form.submit'; - - /** - * The FormEvents::POST_SUBMIT event is dispatched at the very end of the Form::submit(). - * - * It this stage the model and view data may have been denormalized. Otherwise the form - * is desynchronized because transformation failed during submission. - * - * It can be used to fetch data after denormalization. - * - * The event attaches the current view data. To know whether this is the renormalized data - * or the invalid request data, call Form::isSynchronized() first. - * - * @Event("Symfony\Component\Form\Event\PostSubmitEvent") - */ - public const POST_SUBMIT = 'form.post_submit'; - - /** - * The FormEvents::PRE_SET_DATA event is dispatched at the beginning of the Form::setData() method. - * - * It can be used to: - * - Modify the data given during pre-population; - * - Keep synchronized the form depending on the data (adding or removing fields dynamically). - * - * @Event("Symfony\Component\Form\Event\PreSetDataEvent") - */ - public const PRE_SET_DATA = 'form.pre_set_data'; - - /** - * The FormEvents::POST_SET_DATA event is dispatched at the end of the Form::setData() method. - * - * This event can be used to modify the form depending on the final state of the underlying data - * accessible in every representation: model, normalized and view. - * - * @Event("Symfony\Component\Form\Event\PostSetDataEvent") - */ - public const POST_SET_DATA = 'form.post_set_data'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - PreSubmitEvent::class => self::PRE_SUBMIT, - SubmitEvent::class => self::SUBMIT, - PostSubmitEvent::class => self::POST_SUBMIT, - PreSetDataEvent::class => self::PRE_SET_DATA, - PostSetDataEvent::class => self::POST_SET_DATA, - ]; - - private function __construct() - { - } -} diff --git a/vendor/symfony/form/FormExtensionInterface.php b/vendor/symfony/form/FormExtensionInterface.php deleted file mode 100644 index 8fafcee..0000000 --- a/vendor/symfony/form/FormExtensionInterface.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Interface for extensions which provide types, type extensions and a guesser. - */ -interface FormExtensionInterface -{ - /** - * Returns a type by name. - * - * @param string $name The name of the type - * - * @return FormTypeInterface - * - * @throws Exception\InvalidArgumentException if the given type is not supported by this extension - */ - public function getType(string $name); - - /** - * Returns whether the given type is supported. - * - * @param string $name The name of the type - * - * @return bool - */ - public function hasType(string $name); - - /** - * Returns the extensions for the given type. - * - * @param string $name The name of the type - * - * @return FormTypeExtensionInterface[] - */ - public function getTypeExtensions(string $name); - - /** - * Returns whether this extension provides type extensions for the given type. - * - * @param string $name The name of the type - * - * @return bool - */ - public function hasTypeExtensions(string $name); - - /** - * Returns the type guesser provided by this extension. - * - * @return FormTypeGuesserInterface|null - */ - public function getTypeGuesser(); -} diff --git a/vendor/symfony/form/FormFactory.php b/vendor/symfony/form/FormFactory.php deleted file mode 100644 index b3185d1..0000000 --- a/vendor/symfony/form/FormFactory.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\TextType; - -class FormFactory implements FormFactoryInterface -{ - private $registry; - - public function __construct(FormRegistryInterface $registry) - { - $this->registry = $registry; - } - - /** - * {@inheritdoc} - */ - public function create(string $type = FormType::class, $data = null, array $options = []) - { - return $this->createBuilder($type, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createNamed(string $name, string $type = FormType::class, $data = null, array $options = []) - { - return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createForProperty(string $class, string $property, $data = null, array $options = []) - { - return $this->createBuilderForProperty($class, $property, $data, $options)->getForm(); - } - - /** - * {@inheritdoc} - */ - public function createBuilder(string $type = FormType::class, $data = null, array $options = []) - { - return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options); - } - - /** - * {@inheritdoc} - */ - public function createNamedBuilder(string $name, string $type = FormType::class, $data = null, array $options = []) - { - if (null !== $data && !\array_key_exists('data', $options)) { - $options['data'] = $data; - } - - $type = $this->registry->getType($type); - - $builder = $type->createBuilder($this, $name, $options); - - // Explicitly call buildForm() in order to be able to override either - // createBuilder() or buildForm() in the resolved form type - $type->buildForm($builder, $builder->getOptions()); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createBuilderForProperty(string $class, string $property, $data = null, array $options = []) - { - if (null === $guesser = $this->registry->getTypeGuesser()) { - return $this->createNamedBuilder($property, TextType::class, $data, $options); - } - - $typeGuess = $guesser->guessType($class, $property); - $maxLengthGuess = $guesser->guessMaxLength($class, $property); - $requiredGuess = $guesser->guessRequired($class, $property); - $patternGuess = $guesser->guessPattern($class, $property); - - $type = $typeGuess ? $typeGuess->getType() : TextType::class; - - $maxLength = $maxLengthGuess ? $maxLengthGuess->getValue() : null; - $pattern = $patternGuess ? $patternGuess->getValue() : null; - - if (null !== $pattern) { - $options = array_replace_recursive(['attr' => ['pattern' => $pattern]], $options); - } - - if (null !== $maxLength) { - $options = array_replace_recursive(['attr' => ['maxlength' => $maxLength]], $options); - } - - if ($requiredGuess) { - $options = array_merge(['required' => $requiredGuess->getValue()], $options); - } - - // user options may override guessed options - if ($typeGuess) { - $attrs = []; - $typeGuessOptions = $typeGuess->getOptions(); - if (isset($typeGuessOptions['attr']) && isset($options['attr'])) { - $attrs = ['attr' => array_merge($typeGuessOptions['attr'], $options['attr'])]; - } - - $options = array_merge($typeGuessOptions, $options, $attrs); - } - - return $this->createNamedBuilder($property, $type, $data, $options); - } -} diff --git a/vendor/symfony/form/FormFactoryBuilder.php b/vendor/symfony/form/FormFactoryBuilder.php deleted file mode 100644 index 735a17e..0000000 --- a/vendor/symfony/form/FormFactoryBuilder.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\CoreExtension; - -/** - * The default implementation of FormFactoryBuilderInterface. - * - * @author Bernhard Schussek - */ -class FormFactoryBuilder implements FormFactoryBuilderInterface -{ - private $forceCoreExtension; - - /** - * @var ResolvedFormTypeFactoryInterface - */ - private $resolvedTypeFactory; - - /** - * @var FormExtensionInterface[] - */ - private $extensions = []; - - /** - * @var FormTypeInterface[] - */ - private $types = []; - - /** - * @var FormTypeExtensionInterface[][] - */ - private $typeExtensions = []; - - /** - * @var FormTypeGuesserInterface[] - */ - private $typeGuessers = []; - - public function __construct(bool $forceCoreExtension = false) - { - $this->forceCoreExtension = $forceCoreExtension; - } - - /** - * {@inheritdoc} - */ - public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory) - { - $this->resolvedTypeFactory = $resolvedTypeFactory; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addExtension(FormExtensionInterface $extension) - { - $this->extensions[] = $extension; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addExtensions(array $extensions) - { - $this->extensions = array_merge($this->extensions, $extensions); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addType(FormTypeInterface $type) - { - $this->types[] = $type; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypes(array $types) - { - foreach ($types as $type) { - $this->types[] = $type; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeExtension(FormTypeExtensionInterface $typeExtension) - { - foreach ($typeExtension::getExtendedTypes() as $extendedType) { - $this->typeExtensions[$extendedType][] = $typeExtension; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeExtensions(array $typeExtensions) - { - foreach ($typeExtensions as $typeExtension) { - $this->addTypeExtension($typeExtension); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser) - { - $this->typeGuessers[] = $typeGuesser; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addTypeGuessers(array $typeGuessers) - { - $this->typeGuessers = array_merge($this->typeGuessers, $typeGuessers); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getFormFactory() - { - $extensions = $this->extensions; - - if ($this->forceCoreExtension) { - $hasCoreExtension = false; - - foreach ($extensions as $extension) { - if ($extension instanceof CoreExtension) { - $hasCoreExtension = true; - break; - } - } - - if (!$hasCoreExtension) { - array_unshift($extensions, new CoreExtension()); - } - } - - if (\count($this->types) > 0 || \count($this->typeExtensions) > 0 || \count($this->typeGuessers) > 0) { - if (\count($this->typeGuessers) > 1) { - $typeGuesser = new FormTypeGuesserChain($this->typeGuessers); - } else { - $typeGuesser = $this->typeGuessers[0] ?? null; - } - - $extensions[] = new PreloadedExtension($this->types, $this->typeExtensions, $typeGuesser); - } - - $registry = new FormRegistry($extensions, $this->resolvedTypeFactory ?? new ResolvedFormTypeFactory()); - - return new FormFactory($registry); - } -} diff --git a/vendor/symfony/form/FormFactoryBuilderInterface.php b/vendor/symfony/form/FormFactoryBuilderInterface.php deleted file mode 100644 index e3b0a7b..0000000 --- a/vendor/symfony/form/FormFactoryBuilderInterface.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A builder for FormFactoryInterface objects. - * - * @author Bernhard Schussek - */ -interface FormFactoryBuilderInterface -{ - /** - * Sets the factory for creating ResolvedFormTypeInterface instances. - * - * @return $this - */ - public function setResolvedTypeFactory(ResolvedFormTypeFactoryInterface $resolvedTypeFactory); - - /** - * Adds an extension to be loaded by the factory. - * - * @return $this - */ - public function addExtension(FormExtensionInterface $extension); - - /** - * Adds a list of extensions to be loaded by the factory. - * - * @param FormExtensionInterface[] $extensions The extensions - * - * @return $this - */ - public function addExtensions(array $extensions); - - /** - * Adds a form type to the factory. - * - * @return $this - */ - public function addType(FormTypeInterface $type); - - /** - * Adds a list of form types to the factory. - * - * @param FormTypeInterface[] $types The form types - * - * @return $this - */ - public function addTypes(array $types); - - /** - * Adds a form type extension to the factory. - * - * @return $this - */ - public function addTypeExtension(FormTypeExtensionInterface $typeExtension); - - /** - * Adds a list of form type extensions to the factory. - * - * @param FormTypeExtensionInterface[] $typeExtensions The form type extensions - * - * @return $this - */ - public function addTypeExtensions(array $typeExtensions); - - /** - * Adds a type guesser to the factory. - * - * @return $this - */ - public function addTypeGuesser(FormTypeGuesserInterface $typeGuesser); - - /** - * Adds a list of type guessers to the factory. - * - * @param FormTypeGuesserInterface[] $typeGuessers The type guessers - * - * @return $this - */ - public function addTypeGuessers(array $typeGuessers); - - /** - * Builds and returns the factory. - * - * @return FormFactoryInterface - */ - public function getFormFactory(); -} diff --git a/vendor/symfony/form/FormFactoryInterface.php b/vendor/symfony/form/FormFactoryInterface.php deleted file mode 100644 index c5f2485..0000000 --- a/vendor/symfony/form/FormFactoryInterface.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; - -/** - * Allows creating a form based on a name, a class or a property. - * - * @author Bernhard Schussek - */ -interface FormFactoryInterface -{ - /** - * Returns a form. - * - * @see createBuilder() - * - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function create(string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form. - * - * @see createNamedBuilder() - * - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createNamed(string $name, string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form for a property of a class. - * - * @see createBuilderForProperty() - * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * @param mixed $data The initial data - * - * @return FormInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the form type - */ - public function createForProperty(string $class, string $property, $data = null, array $options = []); - - /** - * Returns a form builder. - * - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createBuilder(string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form builder. - * - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the given type - */ - public function createNamedBuilder(string $name, string $type = FormType::class, $data = null, array $options = []); - - /** - * Returns a form builder for a property of a class. - * - * If any of the 'required' and type options can be guessed, - * and are not provided in the options argument, the guessed value is used. - * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * @param mixed $data The initial data - * - * @return FormBuilderInterface - * - * @throws InvalidOptionsException if any given option is not applicable to the form type - */ - public function createBuilderForProperty(string $class, string $property, $data = null, array $options = []); -} diff --git a/vendor/symfony/form/FormInterface.php b/vendor/symfony/form/FormInterface.php deleted file mode 100644 index 6cc6b4e..0000000 --- a/vendor/symfony/form/FormInterface.php +++ /dev/null @@ -1,328 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * A form group bundling multiple forms in a hierarchical structure. - * - * @author Bernhard Schussek - * - * @extends \ArrayAccess - * @extends \Traversable - */ -interface FormInterface extends \ArrayAccess, \Traversable, \Countable -{ - /** - * Sets the parent form. - * - * @param FormInterface|null $parent The parent form or null if it's the root - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - * @throws Exception\LogicException when trying to set a parent for a form with - * an empty name - */ - public function setParent(self $parent = null); - - /** - * Returns the parent form. - * - * @return self|null - */ - public function getParent(); - - /** - * Adds or replaces a child to the form. - * - * @param FormInterface|string $child The FormInterface instance or the name of the child - * @param string|null $type The child's type, if a name was passed - * @param array $options The child's options, if a name was passed - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - * @throws Exception\LogicException when trying to add a child to a non-compound form - * @throws Exception\UnexpectedTypeException if $child or $type has an unexpected type - */ - public function add($child, string $type = null, array $options = []); - - /** - * Returns the child with the given name. - * - * @return self - * - * @throws Exception\OutOfBoundsException if the named child does not exist - */ - public function get(string $name); - - /** - * Returns whether a child with the given name exists. - * - * @return bool - */ - public function has(string $name); - - /** - * Removes a child from the form. - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function remove(string $name); - - /** - * Returns all children in this group. - * - * @return self[] - */ - public function all(); - - /** - * Returns the errors of this form. - * - * @param bool $deep Whether to include errors of child forms as well - * @param bool $flatten Whether to flatten the list of errors in case - * $deep is set to true - * - * @return FormErrorIterator - */ - public function getErrors(bool $deep = false, bool $flatten = true); - - /** - * Updates the form with default model data. - * - * @param mixed $modelData The data formatted as expected for the underlying object - * - * @return $this - * - * @throws Exception\AlreadySubmittedException If the form has already been submitted - * @throws Exception\LogicException if the view data does not match the expected type - * according to {@link FormConfigInterface::getDataClass} - * @throws Exception\RuntimeException If listeners try to call setData in a cycle or if - * the form inherits data from its parent - * @throws Exception\TransformationFailedException if the synchronization failed - */ - public function setData($modelData); - - /** - * Returns the model data in the format needed for the underlying object. - * - * @return mixed When the field is not submitted, the default data is returned. - * When the field is submitted, the default data has been bound - * to the submitted view data. - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getData(); - - /** - * Returns the normalized data of the field, used as internal bridge - * between model data and view data. - * - * @return mixed When the field is not submitted, the default data is returned. - * When the field is submitted, the normalized submitted data - * is returned if the field is synchronized with the view data, - * null otherwise. - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getNormData(); - - /** - * Returns the view data of the field. - * - * It may be defined by {@link FormConfigInterface::getDataClass}. - * - * There are two cases: - * - * - When the form is compound the view data is mapped to the children. - * Each child will use its mapped data as model data. - * It can be an array, an object or null. - * - * - When the form is simple its view data is used to be bound - * to the submitted data. - * It can be a string or an array. - * - * In both cases the view data is the actual altered data on submission. - * - * @return mixed - * - * @throws Exception\RuntimeException If the form inherits data but has no parent - */ - public function getViewData(); - - /** - * Returns the extra submitted data. - * - * @return array The submitted data which do not belong to a child - */ - public function getExtraData(); - - /** - * Returns the form's configuration. - * - * @return FormConfigInterface - */ - public function getConfig(); - - /** - * Returns whether the form is submitted. - * - * @return bool - */ - public function isSubmitted(); - - /** - * Returns the name by which the form is identified in forms. - * - * Only root forms are allowed to have an empty name. - * - * @return string - */ - public function getName(); - - /** - * Returns the property path that the form is mapped to. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath(); - - /** - * Adds an error to this form. - * - * @return $this - */ - public function addError(FormError $error); - - /** - * Returns whether the form and all children are valid. - * - * @throws Exception\LogicException if the form is not submitted - * - * @return bool - */ - public function isValid(); - - /** - * Returns whether the form is required to be filled out. - * - * If the form has a parent and the parent is not required, this method - * will always return false. Otherwise the value set with setRequired() - * is returned. - * - * @return bool - */ - public function isRequired(); - - /** - * Returns whether this form is disabled. - * - * The content of a disabled form is displayed, but not allowed to be - * modified. The validation of modified disabled forms should fail. - * - * Forms whose parents are disabled are considered disabled regardless of - * their own state. - * - * @return bool - */ - public function isDisabled(); - - /** - * Returns whether the form is empty. - * - * @return bool - */ - public function isEmpty(); - - /** - * Returns whether the data in the different formats is synchronized. - * - * If the data is not synchronized, you can get the transformation failure - * by calling {@link getTransformationFailure()}. - * - * If the form is not submitted, this method always returns true. - * - * @return bool - */ - public function isSynchronized(); - - /** - * Returns the data transformation failure, if any, during submission. - * - * @return Exception\TransformationFailedException|null - */ - public function getTransformationFailure(); - - /** - * Initializes the form tree. - * - * Should be called on the root form after constructing the tree. - * - * @return $this - * - * @throws Exception\RuntimeException If the form is not the root - */ - public function initialize(); - - /** - * Inspects the given request and calls {@link submit()} if the form was - * submitted. - * - * Internally, the request is forwarded to the configured - * {@link RequestHandlerInterface} instance, which determines whether to - * submit the form or not. - * - * @param mixed $request The request to handle - * - * @return $this - */ - public function handleRequest($request = null); - - /** - * Submits data to the form. - * - * @param string|array|null $submittedData The submitted data - * @param bool $clearMissing Whether to set fields to NULL - * when they are missing in the - * submitted data. This argument - * is only used in compound form - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true); - - /** - * Returns the root of the form tree. - * - * @return self - */ - public function getRoot(); - - /** - * Returns whether the field is the root of the form tree. - * - * @return bool - */ - public function isRoot(); - - /** - * @return FormView - */ - public function createView(FormView $parent = null); -} diff --git a/vendor/symfony/form/FormRegistry.php b/vendor/symfony/form/FormRegistry.php deleted file mode 100644 index 90087a6..0000000 --- a/vendor/symfony/form/FormRegistry.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\ExceptionInterface; -use Symfony\Component\Form\Exception\InvalidArgumentException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Form\Exception\UnexpectedTypeException; - -/** - * The central registry of the Form component. - * - * @author Bernhard Schussek - */ -class FormRegistry implements FormRegistryInterface -{ - /** - * @var FormExtensionInterface[] - */ - private $extensions = []; - - /** - * @var ResolvedFormTypeInterface[] - */ - private $types = []; - - /** - * @var FormTypeGuesserInterface|false|null - */ - private $guesser = false; - - /** - * @var ResolvedFormTypeFactoryInterface - */ - private $resolvedTypeFactory; - - private $checkedTypes = []; - - /** - * @param FormExtensionInterface[] $extensions - * - * @throws UnexpectedTypeException if any extension does not implement FormExtensionInterface - */ - public function __construct(array $extensions, ResolvedFormTypeFactoryInterface $resolvedTypeFactory) - { - foreach ($extensions as $extension) { - if (!$extension instanceof FormExtensionInterface) { - throw new UnexpectedTypeException($extension, FormExtensionInterface::class); - } - } - - $this->extensions = $extensions; - $this->resolvedTypeFactory = $resolvedTypeFactory; - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!isset($this->types[$name])) { - $type = null; - - foreach ($this->extensions as $extension) { - if ($extension->hasType($name)) { - $type = $extension->getType($name); - break; - } - } - - if (!$type) { - // Support fully-qualified class names - if (!class_exists($name)) { - throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not exist.', $name)); - } - if (!is_subclass_of($name, FormTypeInterface::class)) { - throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not implement "Symfony\Component\Form\FormTypeInterface".', $name)); - } - - $type = new $name(); - } - - $this->types[$name] = $this->resolveType($type); - } - - return $this->types[$name]; - } - - /** - * Wraps a type into a ResolvedFormTypeInterface implementation and connects it with its parent type. - */ - private function resolveType(FormTypeInterface $type): ResolvedFormTypeInterface - { - $parentType = $type->getParent(); - $fqcn = \get_class($type); - - if (isset($this->checkedTypes[$fqcn])) { - $types = implode(' > ', array_merge(array_keys($this->checkedTypes), [$fqcn])); - throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn, $types)); - } - - $this->checkedTypes[$fqcn] = true; - - $typeExtensions = []; - try { - foreach ($this->extensions as $extension) { - $typeExtensions[] = $extension->getTypeExtensions($fqcn); - } - - return $this->resolvedTypeFactory->createResolvedType( - $type, - array_merge([], ...$typeExtensions), - $parentType ? $this->getType($parentType) : null - ); - } finally { - unset($this->checkedTypes[$fqcn]); - } - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - if (isset($this->types[$name])) { - return true; - } - - try { - $this->getType($name); - } catch (ExceptionInterface $e) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - if (false === $this->guesser) { - $guessers = []; - - foreach ($this->extensions as $extension) { - $guesser = $extension->getTypeGuesser(); - - if ($guesser) { - $guessers[] = $guesser; - } - } - - $this->guesser = !empty($guessers) ? new FormTypeGuesserChain($guessers) : null; - } - - return $this->guesser; - } - - /** - * {@inheritdoc} - */ - public function getExtensions() - { - return $this->extensions; - } -} diff --git a/vendor/symfony/form/FormRegistryInterface.php b/vendor/symfony/form/FormRegistryInterface.php deleted file mode 100644 index f39174b..0000000 --- a/vendor/symfony/form/FormRegistryInterface.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * The central registry of the Form component. - * - * @author Bernhard Schussek - */ -interface FormRegistryInterface -{ - /** - * Returns a form type by name. - * - * This methods registers the type extensions from the form extensions. - * - * @return ResolvedFormTypeInterface - * - * @throws Exception\InvalidArgumentException if the type cannot be retrieved from any extension - */ - public function getType(string $name); - - /** - * Returns whether the given form type is supported. - * - * @return bool - */ - public function hasType(string $name); - - /** - * Returns the guesser responsible for guessing types. - * - * @return FormTypeGuesserInterface|null - */ - public function getTypeGuesser(); - - /** - * Returns the extensions loaded by the framework. - * - * @return FormExtensionInterface[] - */ - public function getExtensions(); -} diff --git a/vendor/symfony/form/FormRenderer.php b/vendor/symfony/form/FormRenderer.php deleted file mode 100644 index 2f8f351..0000000 --- a/vendor/symfony/form/FormRenderer.php +++ /dev/null @@ -1,303 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; -use Symfony\Component\Form\Exception\LogicException; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Twig\Environment; - -/** - * Renders a form into HTML using a rendering engine. - * - * @author Bernhard Schussek - */ -class FormRenderer implements FormRendererInterface -{ - public const CACHE_KEY_VAR = 'unique_block_prefix'; - - private $engine; - private $csrfTokenManager; - private $blockNameHierarchyMap = []; - private $hierarchyLevelMap = []; - private $variableStack = []; - - public function __construct(FormRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null) - { - $this->engine = $engine; - $this->csrfTokenManager = $csrfTokenManager; - } - - /** - * {@inheritdoc} - */ - public function getEngine() - { - return $this->engine; - } - - /** - * {@inheritdoc} - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true) - { - $this->engine->setTheme($view, $themes, $useDefaultThemes); - } - - /** - * {@inheritdoc} - */ - public function renderCsrfToken(string $tokenId) - { - if (null === $this->csrfTokenManager) { - throw new BadMethodCallException('CSRF tokens can only be generated if a CsrfTokenManagerInterface is injected in FormRenderer::__construct(). Try running "composer require symfony/security-csrf".'); - } - - return $this->csrfTokenManager->getToken($tokenId)->getValue(); - } - - /** - * {@inheritdoc} - */ - public function renderBlock(FormView $view, string $blockName, array $variables = []) - { - $resource = $this->engine->getResourceForBlockName($view, $blockName); - - if (!$resource) { - throw new LogicException(sprintf('No block "%s" found while rendering the form.', $blockName)); - } - - $viewCacheKey = $view->vars[self::CACHE_KEY_VAR]; - - // The variables are cached globally for a view (instead of for the - // current suffix) - if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = []; - - // The default variable scope contains all view variables, merged with - // the variables passed explicitly to the helper - $scopeVariables = $view->vars; - - $varInit = true; - } else { - // Reuse the current scope and merge it with the explicitly passed variables - $scopeVariables = end($this->variableStack[$viewCacheKey]); - - $varInit = false; - } - - // Merge the passed with the existing attributes - if (isset($variables['attr']) && isset($scopeVariables['attr'])) { - $variables['attr'] = array_replace($scopeVariables['attr'], $variables['attr']); - } - - // Merge the passed with the exist *label* attributes - if (isset($variables['label_attr']) && isset($scopeVariables['label_attr'])) { - $variables['label_attr'] = array_replace($scopeVariables['label_attr'], $variables['label_attr']); - } - - // Do not use array_replace_recursive(), otherwise array variables - // cannot be overwritten - $variables = array_replace($scopeVariables, $variables); - - $this->variableStack[$viewCacheKey][] = $variables; - - // Do the rendering - $html = $this->engine->renderBlock($view, $resource, $blockName, $variables); - - // Clear the stack - array_pop($this->variableStack[$viewCacheKey]); - - if ($varInit) { - unset($this->variableStack[$viewCacheKey]); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, array $variables = []) - { - $renderOnlyOnce = 'row' === $blockNameSuffix || 'widget' === $blockNameSuffix; - - if ($renderOnlyOnce && $view->isRendered()) { - // This is not allowed, because it would result in rendering same IDs multiple times, which is not valid. - throw new BadMethodCallException(sprintf('Field "%s" has already been rendered, save the result of previous render call to a variable and output that instead.', $view->vars['name'])); - } - - // The cache key for storing the variables and types - $viewCacheKey = $view->vars[self::CACHE_KEY_VAR]; - $viewAndSuffixCacheKey = $viewCacheKey.$blockNameSuffix; - - // In templates, we have to deal with two kinds of block hierarchies: - // - // +---------+ +---------+ - // | Theme B | -------> | Theme A | - // +---------+ +---------+ - // - // form_widget -------> form_widget - // ^ - // | - // choice_widget -----> choice_widget - // - // The first kind of hierarchy is the theme hierarchy. This allows to - // override the block "choice_widget" from Theme A in the extending - // Theme B. This kind of inheritance needs to be supported by the - // template engine and, for example, offers "parent()" or similar - // functions to fall back from the custom to the parent implementation. - // - // The second kind of hierarchy is the form type hierarchy. This allows - // to implement a custom "choice_widget" block (no matter in which theme), - // or to fallback to the block of the parent type, which would be - // "form_widget" in this example (again, no matter in which theme). - // If the designer wants to explicitly fallback to "form_widget" in their - // custom "choice_widget", for example because they only want to wrap - // a
    around the original implementation, they can call the - // widget() function again to render the block for the parent type. - // - // The second kind is implemented in the following blocks. - if (!isset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey])) { - // INITIAL CALL - // Calculate the hierarchy of template blocks and start on - // the bottom level of the hierarchy (= "__
    " block) - $blockNameHierarchy = []; - foreach ($view->vars['block_prefixes'] as $blockNamePrefix) { - $blockNameHierarchy[] = $blockNamePrefix.'_'.$blockNameSuffix; - } - $hierarchyLevel = \count($blockNameHierarchy) - 1; - - $hierarchyInit = true; - } else { - // RECURSIVE CALL - // If a block recursively calls searchAndRenderBlock() again, resume rendering - // using the parent type in the hierarchy. - $blockNameHierarchy = $this->blockNameHierarchyMap[$viewAndSuffixCacheKey]; - $hierarchyLevel = $this->hierarchyLevelMap[$viewAndSuffixCacheKey] - 1; - - $hierarchyInit = false; - } - - // The variables are cached globally for a view (instead of for the - // current suffix) - if (!isset($this->variableStack[$viewCacheKey])) { - $this->variableStack[$viewCacheKey] = []; - - // The default variable scope contains all view variables, merged with - // the variables passed explicitly to the helper - $scopeVariables = $view->vars; - - $varInit = true; - } else { - // Reuse the current scope and merge it with the explicitly passed variables - $scopeVariables = end($this->variableStack[$viewCacheKey]); - - $varInit = false; - } - - // Load the resource where this block can be found - $resource = $this->engine->getResourceForBlockNameHierarchy($view, $blockNameHierarchy, $hierarchyLevel); - - // Update the current hierarchy level to the one at which the resource was - // found. For example, if looking for "choice_widget", but only a resource - // is found for its parent "form_widget", then the level is updated here - // to the parent level. - $hierarchyLevel = $this->engine->getResourceHierarchyLevel($view, $blockNameHierarchy, $hierarchyLevel); - - // The actually existing block name in $resource - $blockName = $blockNameHierarchy[$hierarchyLevel]; - - // Escape if no resource exists for this block - if (!$resource) { - if (\count($blockNameHierarchy) !== \count(array_unique($blockNameHierarchy))) { - throw new LogicException(sprintf('Unable to render the form because the block names array contains duplicates: "%s".', implode('", "', array_reverse($blockNameHierarchy)))); - } - - throw new LogicException(sprintf('Unable to render the form as none of the following blocks exist: "%s".', implode('", "', array_reverse($blockNameHierarchy)))); - } - - // Merge the passed with the existing attributes - if (isset($variables['attr']) && isset($scopeVariables['attr'])) { - $variables['attr'] = array_replace($scopeVariables['attr'], $variables['attr']); - } - - // Merge the passed with the exist *label* attributes - if (isset($variables['label_attr']) && isset($scopeVariables['label_attr'])) { - $variables['label_attr'] = array_replace($scopeVariables['label_attr'], $variables['label_attr']); - } - - // Do not use array_replace_recursive(), otherwise array variables - // cannot be overwritten - $variables = array_replace($scopeVariables, $variables); - - // In order to make recursive calls possible, we need to store the block hierarchy, - // the current level of the hierarchy and the variables so that this method can - // resume rendering one level higher of the hierarchy when it is called recursively. - // - // We need to store these values in maps (associative arrays) because within a - // call to widget() another call to widget() can be made, but for a different view - // object. These nested calls should not override each other. - $this->blockNameHierarchyMap[$viewAndSuffixCacheKey] = $blockNameHierarchy; - $this->hierarchyLevelMap[$viewAndSuffixCacheKey] = $hierarchyLevel; - - // We also need to store the variables for the view so that we can render other - // blocks for the same view using the same variables as in the outer block. - $this->variableStack[$viewCacheKey][] = $variables; - - // Do the rendering - $html = $this->engine->renderBlock($view, $resource, $blockName, $variables); - - // Clear the stack - array_pop($this->variableStack[$viewCacheKey]); - - // Clear the caches if they were filled for the first time within - // this function call - if ($hierarchyInit) { - unset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey], $this->hierarchyLevelMap[$viewAndSuffixCacheKey]); - } - - if ($varInit) { - unset($this->variableStack[$viewCacheKey]); - } - - if ($renderOnlyOnce) { - $view->setRendered(); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function humanize(string $text) - { - return ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))); - } - - /** - * @internal - */ - public function encodeCurrency(Environment $environment, string $text, string $widget = ''): string - { - if ('UTF-8' === $charset = $environment->getCharset()) { - $text = htmlspecialchars($text, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - } else { - $text = htmlentities($text, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - $text = iconv('UTF-8', $charset, $text); - $widget = iconv('UTF-8', $charset, $widget); - } - - return str_replace('{{ widget }}', $widget, $text); - } -} diff --git a/vendor/symfony/form/FormRendererEngineInterface.php b/vendor/symfony/form/FormRendererEngineInterface.php deleted file mode 100644 index 67b88c9..0000000 --- a/vendor/symfony/form/FormRendererEngineInterface.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Adapter for rendering form templates with a specific templating engine. - * - * @author Bernhard Schussek - */ -interface FormRendererEngineInterface -{ - /** - * Sets the theme(s) to be used for rendering a view and its children. - * - * @param FormView $view The view to assign the theme(s) to - * @param mixed $themes The theme(s). The type of these themes - * is open to the implementation. - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true); - - /** - * Returns the resource for a block name. - * - * The resource is first searched in the themes attached to $view, then - * in the themes of its parent view and so on, until a resource was found. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to the - * view with {@link setTheme()} are considered, - * then the ones of its parent etc. - * - * @return mixed the renderer resource or false, if none was found - */ - public function getResourceForBlockName(FormView $view, string $blockName); - - /** - * Returns the resource for a block hierarchy. - * - * A block hierarchy is an array which starts with the root of the hierarchy - * and continues with the child of that root, the child of that child etc. - * The following is an example for a block hierarchy: - * - * form_widget - * text_widget - * url_widget - * - * In this example, "url_widget" is the most specific block, while the other - * blocks are its ancestors in the hierarchy. - * - * The second parameter $hierarchyLevel determines the level of the hierarchy - * that should be rendered. For example, if $hierarchyLevel is 2 for the - * above hierarchy, the engine will first look for the block "url_widget", - * then, if that does not exist, for the block "text_widget" etc. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to - * the view with {@link setTheme()} are - * considered, then the ones of its parent etc. - * @param string[] $blockNameHierarchy The block name hierarchy, with the root block - * at the beginning - * @param int $hierarchyLevel The level in the hierarchy at which to start - * looking. Level 0 indicates the root block, i.e. - * the first element of $blockNameHierarchy. - * - * @return mixed The renderer resource or false, if none was found - */ - public function getResourceForBlockNameHierarchy(FormView $view, array $blockNameHierarchy, int $hierarchyLevel); - - /** - * Returns the hierarchy level at which a resource can be found. - * - * A block hierarchy is an array which starts with the root of the hierarchy - * and continues with the child of that root, the child of that child etc. - * The following is an example for a block hierarchy: - * - * form_widget - * text_widget - * url_widget - * - * The second parameter $hierarchyLevel determines the level of the hierarchy - * that should be rendered. - * - * If we call this method with the hierarchy level 2, the engine will first - * look for a resource for block "url_widget". If such a resource exists, - * the method returns 2. Otherwise it tries to find a resource for block - * "text_widget" (at level 1) and, again, returns 1 if a resource was found. - * The method continues to look for resources until the root level was - * reached and nothing was found. In this case false is returned. - * - * The type of the resource is decided by the implementation. The resource - * is later passed to {@link renderBlock()} by the rendering algorithm. - * - * @param FormView $view The view for determining the used themes. - * First the themes attached directly to - * the view with {@link setTheme()} are - * considered, then the ones of its parent etc. - * @param string[] $blockNameHierarchy The block name hierarchy, with the root block - * at the beginning - * @param int $hierarchyLevel The level in the hierarchy at which to start - * looking. Level 0 indicates the root block, i.e. - * the first element of $blockNameHierarchy. - * - * @return int|false - */ - public function getResourceHierarchyLevel(FormView $view, array $blockNameHierarchy, int $hierarchyLevel); - - /** - * Renders a block in the given renderer resource. - * - * The resource can be obtained by calling {@link getResourceForBlock()} - * or {@link getResourceForBlockHierarchy()}. The type of the resource is - * decided by the implementation. - * - * @param FormView $view The view to render - * @param mixed $resource The renderer resource - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function renderBlock(FormView $view, $resource, string $blockName, array $variables = []); -} diff --git a/vendor/symfony/form/FormRendererInterface.php b/vendor/symfony/form/FormRendererInterface.php deleted file mode 100644 index 04af58b..0000000 --- a/vendor/symfony/form/FormRendererInterface.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Renders a form into HTML. - * - * @author Bernhard Schussek - */ -interface FormRendererInterface -{ - /** - * Returns the engine used by this renderer. - * - * @return FormRendererEngineInterface - */ - public function getEngine(); - - /** - * Sets the theme(s) to be used for rendering a view and its children. - * - * @param FormView $view The view to assign the theme(s) to - * @param mixed $themes The theme(s). The type of these themes - * is open to the implementation. - * @param bool $useDefaultThemes If true, will use default themes specified - * in the renderer - */ - public function setTheme(FormView $view, $themes, bool $useDefaultThemes = true); - - /** - * Renders a named block of the form theme. - * - * @param FormView $view The view for which to render the block - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function renderBlock(FormView $view, string $blockName, array $variables = []); - - /** - * Searches and renders a block for a given name suffix. - * - * The block is searched by combining the block names stored in the - * form view with the given suffix. If a block name is found, that - * block is rendered. - * - * If this method is called recursively, the block search is continued - * where a block was found before. - * - * @param FormView $view The view for which to render the block - * @param array $variables The variables to pass to the template - * - * @return string - */ - public function searchAndRenderBlock(FormView $view, string $blockNameSuffix, array $variables = []); - - /** - * Renders a CSRF token. - * - * Use this helper for CSRF protection without the overhead of creating a - * form. - * - * - * - * Check the token in your action using the same token ID. - * - * // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * - * @return string - */ - public function renderCsrfToken(string $tokenId); - - /** - * Makes a technical name human readable. - * - * Sequences of underscores are replaced by single spaces. The first letter - * of the resulting string is capitalized, while all other letters are - * turned to lowercase. - * - * @return string - */ - public function humanize(string $text); -} diff --git a/vendor/symfony/form/FormTypeExtensionInterface.php b/vendor/symfony/form/FormTypeExtensionInterface.php deleted file mode 100644 index 6810f0a..0000000 --- a/vendor/symfony/form/FormTypeExtensionInterface.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -interface FormTypeExtensionInterface -{ - /** - * Builds the form. - * - * This method is called after the extended type has built the form to - * further modify it. - * - * @see FormTypeInterface::buildForm() - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Builds the view. - * - * This method is called after the extended type has built the view to - * further modify it. - * - * @see FormTypeInterface::buildView() - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes the view. - * - * This method is called after the extended type has finished the view to - * further modify it. - * - * @see FormTypeInterface::finishView() - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - public function configureOptions(OptionsResolver $resolver); - - /** - * Gets the extended types. - * - * @return string[] - */ - public static function getExtendedTypes(): iterable; -} diff --git a/vendor/symfony/form/FormTypeGuesserChain.php b/vendor/symfony/form/FormTypeGuesserChain.php deleted file mode 100644 index 2763d90..0000000 --- a/vendor/symfony/form/FormTypeGuesserChain.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Guess\Guess; - -class FormTypeGuesserChain implements FormTypeGuesserInterface -{ - private $guessers = []; - - /** - * @param FormTypeGuesserInterface[] $guessers - * - * @throws UnexpectedTypeException if any guesser does not implement FormTypeGuesserInterface - */ - public function __construct(iterable $guessers) - { - $tmpGuessers = []; - foreach ($guessers as $guesser) { - if (!$guesser instanceof FormTypeGuesserInterface) { - throw new UnexpectedTypeException($guesser, FormTypeGuesserInterface::class); - } - - if ($guesser instanceof self) { - $tmpGuessers[] = $guesser->guessers; - } else { - $tmpGuessers[] = [$guesser]; - } - } - - $this->guessers = array_merge([], ...$tmpGuessers); - } - - /** - * {@inheritdoc} - */ - public function guessType(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessType($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessRequired(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessRequired($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessMaxLength(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessMaxLength($class, $property); - }); - } - - /** - * {@inheritdoc} - */ - public function guessPattern(string $class, string $property) - { - return $this->guess(function ($guesser) use ($class, $property) { - return $guesser->guessPattern($class, $property); - }); - } - - /** - * Executes a closure for each guesser and returns the best guess from the - * return values. - * - * @param \Closure $closure The closure to execute. Accepts a guesser - * as argument and should return a Guess instance - */ - private function guess(\Closure $closure): ?Guess - { - $guesses = []; - - foreach ($this->guessers as $guesser) { - if ($guess = $closure($guesser)) { - $guesses[] = $guess; - } - } - - return Guess::getBestGuess($guesses); - } -} diff --git a/vendor/symfony/form/FormTypeGuesserInterface.php b/vendor/symfony/form/FormTypeGuesserInterface.php deleted file mode 100644 index 61e2c5f..0000000 --- a/vendor/symfony/form/FormTypeGuesserInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -interface FormTypeGuesserInterface -{ - /** - * Returns a field guess for a property name of a class. - * - * @return Guess\TypeGuess|null - */ - public function guessType(string $class, string $property); - - /** - * Returns a guess whether a property of a class is required. - * - * @return Guess\ValueGuess|null - */ - public function guessRequired(string $class, string $property); - - /** - * Returns a guess about the field's maximum length. - * - * @return Guess\ValueGuess|null - */ - public function guessMaxLength(string $class, string $property); - - /** - * Returns a guess about the field's pattern. - * - * - When you have a min value, you guess a min length of this min (LOW_CONFIDENCE) - * - Then line below, if this value is a float type, this is wrong so you guess null with MEDIUM_CONFIDENCE to override the previous guess. - * Example: - * You want a float greater than 5, 4.512313 is not valid but length(4.512314) > length(5) - * - * @see https://github.com/symfony/symfony/pull/3927 - * - * @return Guess\ValueGuess|null - */ - public function guessPattern(string $class, string $property); -} diff --git a/vendor/symfony/form/FormTypeInterface.php b/vendor/symfony/form/FormTypeInterface.php deleted file mode 100644 index 2b9066a..0000000 --- a/vendor/symfony/form/FormTypeInterface.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Bernhard Schussek - */ -interface FormTypeInterface -{ - /** - * Builds the form. - * - * This method is called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the form. - * - * @param array $options - * - * @see FormTypeExtensionInterface::buildForm() - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Builds the form view. - * - * This method is called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the view. - * - * A view of a form is built before the views of the child forms are built. - * This means that you cannot access child views in this method. If you need - * to do so, move your logic to {@link finishView()} instead. - * - * @param array $options - * - * @see FormTypeExtensionInterface::buildView() - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes the form view. - * - * This method gets called for each type in the hierarchy starting from the - * top most type. Type extensions can further modify the view. - * - * When this method is called, views of the form's children have already - * been built and finished and can be accessed. You should only implement - * such logic in this method that actually accesses child views. For everything - * else you are recommended to implement {@link buildView()} instead. - * - * @param array $options - * - * @see FormTypeExtensionInterface::finishView() - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - /** - * Configures the options for this type. - */ - public function configureOptions(OptionsResolver $resolver); - - /** - * Returns the prefix of the template block name for this type. - * - * The block prefix defaults to the underscored short class name with - * the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). - * - * @return string - */ - public function getBlockPrefix(); - - /** - * Returns the name of the parent type. - * - * @return string|null - */ - public function getParent(); -} diff --git a/vendor/symfony/form/FormView.php b/vendor/symfony/form/FormView.php deleted file mode 100644 index 0162208..0000000 --- a/vendor/symfony/form/FormView.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\BadMethodCallException; - -/** - * @author Bernhard Schussek - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class FormView implements \ArrayAccess, \IteratorAggregate, \Countable -{ - /** - * The variables assigned to this view. - */ - public $vars = [ - 'value' => null, - 'attr' => [], - ]; - - /** - * The parent view. - */ - public $parent; - - /** - * The child views. - * - * @var array - */ - public $children = []; - - /** - * Is the form attached to this renderer rendered? - * - * Rendering happens when either the widget or the row method was called. - * Row implicitly includes widget, however certain rendering mechanisms - * have to skip widget rendering when a row is rendered. - * - * @var bool - */ - private $rendered = false; - - private $methodRendered = false; - - public function __construct(self $parent = null) - { - $this->parent = $parent; - } - - /** - * Returns whether the view was already rendered. - * - * @return bool - */ - public function isRendered() - { - if (true === $this->rendered || 0 === \count($this->children)) { - return $this->rendered; - } - - foreach ($this->children as $child) { - if (!$child->isRendered()) { - return false; - } - } - - return $this->rendered = true; - } - - /** - * Marks the view as rendered. - * - * @return $this - */ - public function setRendered() - { - $this->rendered = true; - - return $this; - } - - /** - * @return bool - */ - public function isMethodRendered() - { - return $this->methodRendered; - } - - public function setMethodRendered() - { - $this->methodRendered = true; - } - - /** - * Returns a child by name (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return self - */ - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->children[$name]; - } - - /** - * Returns whether the given child exists (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($name) - { - return isset($this->children[$name]); - } - - /** - * Implements \ArrayAccess. - * - * @return void - * - * @throws BadMethodCallException always as setting a child by name is not allowed - */ - #[\ReturnTypeWillChange] - public function offsetSet($name, $value) - { - throw new BadMethodCallException('Not supported.'); - } - - /** - * Removes a child (implements \ArrayAccess). - * - * @param int|string $name The child name - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($name) - { - unset($this->children[$name]); - } - - /** - * Returns an iterator to iterate over children (implements \IteratorAggregate). - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->children); - } - - /** - * Implements \Countable. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->children); - } -} diff --git a/vendor/symfony/form/Forms.php b/vendor/symfony/form/Forms.php deleted file mode 100644 index 020e75e..0000000 --- a/vendor/symfony/form/Forms.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Entry point of the Form component. - * - * Use this class to conveniently create new form factories: - * - * use Symfony\Component\Form\Forms; - * - * $formFactory = Forms::createFormFactory(); - * - * $form = $formFactory->createBuilder() - * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') - * ->add('color', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', [ - * 'choices' => ['Red' => 'r', 'Blue' => 'b'], - * ]) - * ->getForm(); - * - * You can also add custom extensions to the form factory: - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new AcmeExtension()) - * ->getFormFactory(); - * - * If you create custom form types or type extensions, it is - * generally recommended to create your own extensions that lazily - * load these types and type extensions. In projects where performance - * does not matter that much, you can also pass them directly to the - * form factory: - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addType(new PersonType()) - * ->addType(new PhoneNumberType()) - * ->addTypeExtension(new FormTypeHelpTextExtension()) - * ->getFormFactory(); - * - * Support for the Validator component is provided by ValidatorExtension. - * This extension needs a validator object to function properly: - * - * use Symfony\Component\Validator\Validation; - * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; - * - * $validator = Validation::createValidator(); - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new ValidatorExtension($validator)) - * ->getFormFactory(); - * - * @author Bernhard Schussek - */ -final class Forms -{ - /** - * Creates a form factory with the default configuration. - */ - public static function createFormFactory(): FormFactoryInterface - { - return self::createFormFactoryBuilder()->getFormFactory(); - } - - /** - * Creates a form factory builder with the default configuration. - */ - public static function createFormFactoryBuilder(): FormFactoryBuilderInterface - { - return new FormFactoryBuilder(true); - } - - /** - * This class cannot be instantiated. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/form/Guess/Guess.php b/vendor/symfony/form/Guess/Guess.php deleted file mode 100644 index 935bbfe..0000000 --- a/vendor/symfony/form/Guess/Guess.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * Base class for guesses made by TypeGuesserInterface implementation. - * - * Each instance contains a confidence value about the correctness of the guess. - * Thus an instance with confidence HIGH_CONFIDENCE is more likely to be - * correct than an instance with confidence LOW_CONFIDENCE. - * - * @author Bernhard Schussek - */ -abstract class Guess -{ - /** - * Marks an instance with a value that is extremely likely to be correct. - */ - public const VERY_HIGH_CONFIDENCE = 3; - - /** - * Marks an instance with a value that is very likely to be correct. - */ - public const HIGH_CONFIDENCE = 2; - - /** - * Marks an instance with a value that is likely to be correct. - */ - public const MEDIUM_CONFIDENCE = 1; - - /** - * Marks an instance with a value that may be correct. - */ - public const LOW_CONFIDENCE = 0; - - /** - * The confidence about the correctness of the value. - * - * One of VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, MEDIUM_CONFIDENCE - * and LOW_CONFIDENCE. - * - * @var int - */ - private $confidence; - - /** - * Returns the guess most likely to be correct from a list of guesses. - * - * If there are multiple guesses with the same, highest confidence, the - * returned guess is any of them. - * - * @param static[] $guesses An array of guesses - * - * @return static|null - */ - public static function getBestGuess(array $guesses) - { - $result = null; - $maxConfidence = -1; - - foreach ($guesses as $guess) { - if ($maxConfidence < $confidence = $guess->getConfidence()) { - $maxConfidence = $confidence; - $result = $guess; - } - } - - return $result; - } - - /** - * @throws InvalidArgumentException if the given value of confidence is unknown - */ - public function __construct(int $confidence) - { - if (self::VERY_HIGH_CONFIDENCE !== $confidence && self::HIGH_CONFIDENCE !== $confidence && - self::MEDIUM_CONFIDENCE !== $confidence && self::LOW_CONFIDENCE !== $confidence) { - throw new InvalidArgumentException('The confidence should be one of the constants defined in Guess.'); - } - - $this->confidence = $confidence; - } - - /** - * Returns the confidence that the guessed value is correct. - * - * @return int One of the constants VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, - * MEDIUM_CONFIDENCE and LOW_CONFIDENCE - */ - public function getConfidence() - { - return $this->confidence; - } -} diff --git a/vendor/symfony/form/Guess/TypeGuess.php b/vendor/symfony/form/Guess/TypeGuess.php deleted file mode 100644 index ff0c6a7..0000000 --- a/vendor/symfony/form/Guess/TypeGuess.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -/** - * Contains a guessed class name and a list of options for creating an instance - * of that class. - * - * @author Bernhard Schussek - */ -class TypeGuess extends Guess -{ - private $type; - private $options; - - /** - * @param string $type The guessed field type - * @param array $options The options for creating instances of the - * guessed class - * @param int $confidence The confidence that the guessed class name - * is correct - */ - public function __construct(string $type, array $options, int $confidence) - { - parent::__construct($confidence); - - $this->type = $type; - $this->options = $options; - } - - /** - * Returns the guessed field type. - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Returns the guessed options for creating instances of the guessed type. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } -} diff --git a/vendor/symfony/form/Guess/ValueGuess.php b/vendor/symfony/form/Guess/ValueGuess.php deleted file mode 100644 index fe19dfe..0000000 --- a/vendor/symfony/form/Guess/ValueGuess.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Guess; - -/** - * Contains a guessed value. - * - * @author Bernhard Schussek - */ -class ValueGuess extends Guess -{ - private $value; - - /** - * @param string|int|bool|null $value The guessed value - * @param int $confidence The confidence that the guessed class name - * is correct - */ - public function __construct($value, int $confidence) - { - parent::__construct($confidence); - - $this->value = $value; - } - - /** - * Returns the guessed value. - * - * @return string|int|bool|null - */ - public function getValue() - { - return $this->value; - } -} diff --git a/vendor/symfony/form/LICENSE b/vendor/symfony/form/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/form/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/form/NativeRequestHandler.php b/vendor/symfony/form/NativeRequestHandler.php deleted file mode 100644 index 7b39ad3..0000000 --- a/vendor/symfony/form/NativeRequestHandler.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Util\ServerParams; - -/** - * A request handler using PHP super globals $_GET, $_POST and $_SERVER. - * - * @author Bernhard Schussek - */ -class NativeRequestHandler implements RequestHandlerInterface -{ - private $serverParams; - - /** - * The allowed keys of the $_FILES array. - */ - private const FILE_KEYS = [ - 'error', - 'name', - 'size', - 'tmp_name', - 'type', - ]; - - public function __construct(ServerParams $params = null) - { - $this->serverParams = $params ?? new ServerParams(); - } - - /** - * {@inheritdoc} - * - * @throws Exception\UnexpectedTypeException If the $request is not null - */ - public function handleRequest(FormInterface $form, $request = null) - { - if (null !== $request) { - throw new UnexpectedTypeException($request, 'null'); - } - - $name = $form->getName(); - $method = $form->getConfig()->getMethod(); - - if ($method !== self::getRequestMethod()) { - return; - } - - // For request methods that must not have a request body we fetch data - // from the query string. Otherwise we look for data in the request body. - if ('GET' === $method || 'HEAD' === $method || 'TRACE' === $method) { - if ('' === $name) { - $data = $_GET; - } else { - // Don't submit GET requests if the form's name does not exist - // in the request - if (!isset($_GET[$name])) { - return; - } - - $data = $_GET[$name]; - } - } else { - // Mark the form with an error if the uploaded size was too large - // This is done here and not in FormValidator because $_POST is - // empty when that error occurs. Hence the form is never submitted. - if ($this->serverParams->hasPostMaxSizeBeenExceeded()) { - // Submit the form, but don't clear the default values - $form->submit(null, false); - - $form->addError(new FormError( - $form->getConfig()->getOption('upload_max_size_message')(), - null, - ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()] - )); - - return; - } - - $fixedFiles = []; - foreach ($_FILES as $fileKey => $file) { - $fixedFiles[$fileKey] = self::stripEmptyFiles(self::fixPhpFilesArray($file)); - } - - if ('' === $name) { - $params = $_POST; - $files = $fixedFiles; - } elseif (\array_key_exists($name, $_POST) || \array_key_exists($name, $fixedFiles)) { - $default = $form->getConfig()->getCompound() ? [] : null; - $params = \array_key_exists($name, $_POST) ? $_POST[$name] : $default; - $files = \array_key_exists($name, $fixedFiles) ? $fixedFiles[$name] : $default; - } else { - // Don't submit the form if it is not present in the request - return; - } - - if (\is_array($params) && \is_array($files)) { - $data = array_replace_recursive($params, $files); - } else { - $data = $params ?: $files; - } - } - - // Don't auto-submit the form unless at least one field is present. - if ('' === $name && \count(array_intersect_key($data, $form->all())) <= 0) { - return; - } - - if (\is_array($data) && \array_key_exists('_method', $data) && $method === $data['_method'] && !$form->has('_method')) { - unset($data['_method']); - } - - $form->submit($data, 'PATCH' !== $method); - } - - /** - * {@inheritdoc} - */ - public function isFileUpload($data) - { - // POST data will always be strings or arrays of strings. Thus, we can be sure - // that the submitted data is a file upload if the "error" value is an integer - // (this value must have been injected by PHP itself). - return \is_array($data) && isset($data['error']) && \is_int($data['error']); - } - - /** - * @return int|null - */ - public function getUploadFileError($data) - { - if (!\is_array($data)) { - return null; - } - - if (!isset($data['error'])) { - return null; - } - - if (!\is_int($data['error'])) { - return null; - } - - if (\UPLOAD_ERR_OK === $data['error']) { - return null; - } - - return $data['error']; - } - - /** - * Returns the method used to submit the request to the server. - */ - private static function getRequestMethod(): string - { - $method = isset($_SERVER['REQUEST_METHOD']) - ? strtoupper($_SERVER['REQUEST_METHOD']) - : 'GET'; - - if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { - $method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']); - } - - return $method; - } - - /** - * Fixes a malformed PHP $_FILES array. - * - * PHP has a bug that the format of the $_FILES array differs, depending on - * whether the uploaded file fields had normal field names or array-like - * field names ("normal" vs. "parent[child]"). - * - * This method fixes the array to look like the "normal" $_FILES array. - * - * It's safe to pass an already converted array, in which case this method - * just returns the original array unmodified. - * - * This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray} - * and should be kept as such in order to port fixes quickly and easily. - * - * @return mixed - */ - private static function fixPhpFilesArray($data) - { - if (!\is_array($data)) { - return $data; - } - - // Remove extra key added by PHP 8.1. - unset($data['full_path']); - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS !== $keys || !isset($data['name']) || !\is_array($data['name'])) { - return $data; - } - - $files = $data; - foreach (self::FILE_KEYS as $k) { - unset($files[$k]); - } - - foreach ($data['name'] as $key => $name) { - $files[$key] = self::fixPhpFilesArray([ - 'error' => $data['error'][$key], - 'name' => $name, - 'type' => $data['type'][$key], - 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], - ]); - } - - return $files; - } - - /** - * Sets empty uploaded files to NULL in the given uploaded files array. - * - * @return mixed - */ - private static function stripEmptyFiles($data) - { - if (!\is_array($data)) { - return $data; - } - - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS === $keys) { - if (\UPLOAD_ERR_NO_FILE === $data['error']) { - return null; - } - - return $data; - } - - foreach ($data as $key => $value) { - $data[$key] = self::stripEmptyFiles($value); - } - - return $data; - } -} diff --git a/vendor/symfony/form/PreloadedExtension.php b/vendor/symfony/form/PreloadedExtension.php deleted file mode 100644 index c6767dc..0000000 --- a/vendor/symfony/form/PreloadedExtension.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\Form\Exception\InvalidArgumentException; - -/** - * A form extension with preloaded types, type extensions and type guessers. - * - * @author Bernhard Schussek - */ -class PreloadedExtension implements FormExtensionInterface -{ - private $types = []; - private $typeExtensions = []; - private $typeGuesser; - - /** - * Creates a new preloaded extension. - * - * @param FormTypeInterface[] $types The types that the extension should support - * @param FormTypeExtensionInterface[][] $typeExtensions The type extensions that the extension should support - */ - public function __construct(array $types, array $typeExtensions, FormTypeGuesserInterface $typeGuesser = null) - { - $this->typeExtensions = $typeExtensions; - $this->typeGuesser = $typeGuesser; - - foreach ($types as $type) { - $this->types[\get_class($type)] = $type; - } - } - - /** - * {@inheritdoc} - */ - public function getType(string $name) - { - if (!isset($this->types[$name])) { - throw new InvalidArgumentException(sprintf('The type "%s" cannot be loaded by this extension.', $name)); - } - - return $this->types[$name]; - } - - /** - * {@inheritdoc} - */ - public function hasType(string $name) - { - return isset($this->types[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions(string $name) - { - return $this->typeExtensions[$name] - ?? []; - } - - /** - * {@inheritdoc} - */ - public function hasTypeExtensions(string $name) - { - return !empty($this->typeExtensions[$name]); - } - - /** - * {@inheritdoc} - */ - public function getTypeGuesser() - { - return $this->typeGuesser; - } -} diff --git a/vendor/symfony/form/README.md b/vendor/symfony/form/README.md deleted file mode 100644 index 0cda654..0000000 --- a/vendor/symfony/form/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Form Component -============== - -The Form component allows you to easily create, process and reuse HTML forms. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/form.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/form/RequestHandlerInterface.php b/vendor/symfony/form/RequestHandlerInterface.php deleted file mode 100644 index 65d86e2..0000000 --- a/vendor/symfony/form/RequestHandlerInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Submits forms if they were submitted. - * - * @author Bernhard Schussek - */ -interface RequestHandlerInterface -{ - /** - * Submits a form if it was submitted. - * - * @param mixed $request The current request - */ - public function handleRequest(FormInterface $form, $request = null); - - /** - * Returns true if the given data is a file upload. - * - * @param mixed $data The form field data - * - * @return bool - */ - public function isFileUpload($data); -} diff --git a/vendor/symfony/form/ResolvedFormType.php b/vendor/symfony/form/ResolvedFormType.php deleted file mode 100644 index b484c91..0000000 --- a/vendor/symfony/form/ResolvedFormType.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\OptionsResolver\Exception\ExceptionInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A wrapper for a form type and its extensions. - * - * @author Bernhard Schussek - */ -class ResolvedFormType implements ResolvedFormTypeInterface -{ - /** - * @var FormTypeInterface - */ - private $innerType; - - /** - * @var FormTypeExtensionInterface[] - */ - private $typeExtensions; - - /** - * @var ResolvedFormTypeInterface|null - */ - private $parent; - - /** - * @var OptionsResolver - */ - private $optionsResolver; - - /** - * @param FormTypeExtensionInterface[] $typeExtensions - */ - public function __construct(FormTypeInterface $innerType, array $typeExtensions = [], ResolvedFormTypeInterface $parent = null) - { - foreach ($typeExtensions as $extension) { - if (!$extension instanceof FormTypeExtensionInterface) { - throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::class); - } - } - - $this->innerType = $innerType; - $this->typeExtensions = $typeExtensions; - $this->parent = $parent; - } - - /** - * {@inheritdoc} - */ - public function getBlockPrefix() - { - return $this->innerType->getBlockPrefix(); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return $this->parent; - } - - /** - * {@inheritdoc} - */ - public function getInnerType() - { - return $this->innerType; - } - - /** - * {@inheritdoc} - */ - public function getTypeExtensions() - { - return $this->typeExtensions; - } - - /** - * {@inheritdoc} - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []) - { - try { - $options = $this->getOptionsResolver()->resolve($options); - } catch (ExceptionInterface $e) { - throw new $e(sprintf('An error has occurred resolving the options of the form "%s": ', get_debug_type($this->getInnerType())).$e->getMessage(), $e->getCode(), $e); - } - - // Should be decoupled from the specific option at some point - $dataClass = $options['data_class'] ?? null; - - $builder = $this->newBuilder($name, $dataClass, $factory, $options); - $builder->setType($this); - - return $builder; - } - - /** - * {@inheritdoc} - */ - public function createView(FormInterface $form, FormView $parent = null) - { - return $this->newView($parent); - } - - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options) - { - if (null !== $this->parent) { - $this->parent->buildForm($builder, $options); - } - - $this->innerType->buildForm($builder, $options); - - foreach ($this->typeExtensions as $extension) { - $extension->buildForm($builder, $options); - } - } - - /** - * {@inheritdoc} - */ - public function buildView(FormView $view, FormInterface $form, array $options) - { - if (null !== $this->parent) { - $this->parent->buildView($view, $form, $options); - } - - $this->innerType->buildView($view, $form, $options); - - foreach ($this->typeExtensions as $extension) { - $extension->buildView($view, $form, $options); - } - } - - /** - * {@inheritdoc} - */ - public function finishView(FormView $view, FormInterface $form, array $options) - { - if (null !== $this->parent) { - $this->parent->finishView($view, $form, $options); - } - - $this->innerType->finishView($view, $form, $options); - - foreach ($this->typeExtensions as $extension) { - /* @var FormTypeExtensionInterface $extension */ - $extension->finishView($view, $form, $options); - } - } - - /** - * {@inheritdoc} - */ - public function getOptionsResolver() - { - if (null === $this->optionsResolver) { - if (null !== $this->parent) { - $this->optionsResolver = clone $this->parent->getOptionsResolver(); - } else { - $this->optionsResolver = new OptionsResolver(); - } - - $this->innerType->configureOptions($this->optionsResolver); - - foreach ($this->typeExtensions as $extension) { - $extension->configureOptions($this->optionsResolver); - } - } - - return $this->optionsResolver; - } - - /** - * Creates a new builder instance. - * - * Override this method if you want to customize the builder class. - * - * @return FormBuilderInterface - */ - protected function newBuilder(string $name, ?string $dataClass, FormFactoryInterface $factory, array $options) - { - if ($this->innerType instanceof ButtonTypeInterface) { - return new ButtonBuilder($name, $options); - } - - if ($this->innerType instanceof SubmitButtonTypeInterface) { - return new SubmitButtonBuilder($name, $options); - } - - return new FormBuilder($name, $dataClass, new EventDispatcher(), $factory, $options); - } - - /** - * Creates a new view instance. - * - * Override this method if you want to customize the view class. - * - * @return FormView - */ - protected function newView(FormView $parent = null) - { - return new FormView($parent); - } -} diff --git a/vendor/symfony/form/ResolvedFormTypeFactory.php b/vendor/symfony/form/ResolvedFormTypeFactory.php deleted file mode 100644 index d93d1c0..0000000 --- a/vendor/symfony/form/ResolvedFormTypeFactory.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * @author Bernhard Schussek - */ -class ResolvedFormTypeFactory implements ResolvedFormTypeFactoryInterface -{ - /** - * {@inheritdoc} - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null) - { - return new ResolvedFormType($type, $typeExtensions, $parent); - } -} diff --git a/vendor/symfony/form/ResolvedFormTypeFactoryInterface.php b/vendor/symfony/form/ResolvedFormTypeFactoryInterface.php deleted file mode 100644 index 4f133e0..0000000 --- a/vendor/symfony/form/ResolvedFormTypeFactoryInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Creates ResolvedFormTypeInterface instances. - * - * This interface allows you to use your custom ResolvedFormTypeInterface - * implementation, within which you can customize the concrete FormBuilderInterface - * implementations or FormView subclasses that are used by the framework. - * - * @author Bernhard Schussek - */ -interface ResolvedFormTypeFactoryInterface -{ - /** - * Resolves a form type. - * - * @param FormTypeExtensionInterface[] $typeExtensions - * - * @return ResolvedFormTypeInterface - * - * @throws Exception\UnexpectedTypeException if the types parent {@link FormTypeInterface::getParent()} is not a string - * @throws Exception\InvalidArgumentException if the types parent cannot be retrieved from any extension - */ - public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null); -} diff --git a/vendor/symfony/form/ResolvedFormTypeInterface.php b/vendor/symfony/form/ResolvedFormTypeInterface.php deleted file mode 100644 index 6074af9..0000000 --- a/vendor/symfony/form/ResolvedFormTypeInterface.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * A wrapper for a form type and its extensions. - * - * @author Bernhard Schussek - */ -interface ResolvedFormTypeInterface -{ - /** - * Returns the prefix of the template block name for this type. - * - * @return string - */ - public function getBlockPrefix(); - - /** - * Returns the parent type. - * - * @return self|null - */ - public function getParent(); - - /** - * Returns the wrapped form type. - * - * @return FormTypeInterface - */ - public function getInnerType(); - - /** - * Returns the extensions of the wrapped form type. - * - * @return FormTypeExtensionInterface[] - */ - public function getTypeExtensions(); - - /** - * Creates a new form builder for this type. - * - * @param string $name The name for the builder - * - * @return FormBuilderInterface - */ - public function createBuilder(FormFactoryInterface $factory, string $name, array $options = []); - - /** - * Creates a new form view for a form of this type. - * - * @return FormView - */ - public function createView(FormInterface $form, FormView $parent = null); - - /** - * Configures a form builder for the type hierarchy. - */ - public function buildForm(FormBuilderInterface $builder, array $options); - - /** - * Configures a form view for the type hierarchy. - * - * It is called before the children of the view are built. - */ - public function buildView(FormView $view, FormInterface $form, array $options); - - /** - * Finishes a form view for the type hierarchy. - * - * It is called after the children of the view have been built. - */ - public function finishView(FormView $view, FormInterface $form, array $options); - - /** - * Returns the configured options resolver used for this type. - * - * @return OptionsResolver - */ - public function getOptionsResolver(); -} diff --git a/vendor/symfony/form/Resources/config/validation.xml b/vendor/symfony/form/Resources/config/validation.xml deleted file mode 100644 index 918f101..0000000 --- a/vendor/symfony/form/Resources/config/validation.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.af.xlf b/vendor/symfony/form/Resources/translations/validators.af.xlf deleted file mode 100644 index 58cd939..0000000 --- a/vendor/symfony/form/Resources/translations/validators.af.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Hierdie vorm moet nie ekstra velde bevat nie. - - - The uploaded file was too large. Please try to upload a smaller file. - Die opgelaaide lêer was te groot. Probeer asseblief 'n kleiner lêer. - - - The CSRF token is invalid. Please try to resubmit the form. - Die CSRF-teken is ongeldig. Probeer asseblief om die vorm weer in te dien. - - - This value is not a valid HTML5 color. - Hierdie waarde is nie 'n geldige HTML5 kleur nie. - - - Please enter a valid birthdate. - Voer asseblief 'n geldige geboortedatum in. - - - The selected choice is invalid. - Die gekiesde opsie is nie geldig nie. - - - The collection is invalid. - Die versameling is nie geldig nie. - - - Please select a valid color. - Kies asseblief 'n geldige kleur. - - - Please select a valid country. - Kies asseblief 'n geldige land. - - - Please select a valid currency. - Kies asseblief 'n geldige geldeenheid. - - - Please choose a valid date interval. - Kies asseblief 'n geldige datum interval. - - - Please enter a valid date and time. - Voer asseblilef 'n geldige datum en tyd in. - - - Please enter a valid date. - Voer asseblief 'n geldige datum in. - - - Please select a valid file. - Kies asseblief 'n geldige lêer. - - - The hidden field is invalid. - Die versteekte veld is nie geldig nie. - - - Please enter an integer. - Voer asseblief 'n geldige heeltal in. - - - Please select a valid language. - Kies assblief 'n geldige taal. - - - Please select a valid locale. - Voer assebliefn 'n geldige locale in. - - - Please enter a valid money amount. - Voer asseblief 'n geldige bedrag in. - - - Please enter a number. - Voer asseblief 'n nommer in. - - - The password is invalid. - Die wagwoord is ongeldig. - - - Please enter a percentage value. - Voer asseblief 'n geldige persentasie waarde in. - - - The values do not match. - Die waardes is nie dieselfde nie. - - - Please enter a valid time. - Voer asseblief 'n geldige tyd in time. - - - Please select a valid timezone. - Kies asseblief 'n geldige tydsone. - - - Please enter a valid URL. - Voer asseblief 'n geldige URL in. - - - Please enter a valid search term. - Voer asseblief 'n geldige soek term in. - - - Please provide a valid phone number. - Verskaf asseblief 'n geldige telefoonnommer. - - - The checkbox has an invalid value. - Die blokkie het 'n ongeldige waarde. - - - Please enter a valid email address. - Voer asseblief 'n geldige e-pos adres in. - - - Please select a valid option. - Kies asseblief 'n geldige opsie. - - - Please select a valid range. - Kies asseblief 'n geldige reeks. - - - Please enter a valid week. - Voer assblief 'n geldige week in. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.ar.xlf b/vendor/symfony/form/Resources/translations/validators.ar.xlf deleted file mode 100644 index e30daaf..0000000 --- a/vendor/symfony/form/Resources/translations/validators.ar.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - هذا النموذج يجب الا يحتوى على اى حقول اضافية. - - - The uploaded file was too large. Please try to upload a smaller file. - مساحة الملف المرسل كبيرة. من فضلك حاول ارسال ملف اصغر. - - - The CSRF token is invalid. Please try to resubmit the form. - قيمة رمز الموقع غير صحيحة. من فضلك اعد ارسال النموذج. - - - This value is not a valid HTML5 color. - هذه القيمة ليست لون HTML5 صالحًا. - - - Please enter a valid birthdate. - الرجاء ادخال تاريخ ميلاد صالح. - - - The selected choice is invalid. - الاختيار المحدد غير صالح. - - - The collection is invalid. - المجموعة غير صالحة. - - - Please select a valid color. - الرجاء اختيار لون صالح. - - - Please select a valid country. - الرجاء اختيار بلد صالح. - - - Please select a valid currency. - الرجاء اختيار عملة صالحة. - - - Please choose a valid date interval. - الرجاء اختيار فاصل زمني صالح. - - - Please enter a valid date and time. - الرجاء إدخال تاريخ ووقت صالحين. - - - Please enter a valid date. - الرجاء إدخال تاريخ صالح. - - - Please select a valid file. - الرجاء اختيار ملف صالح. - - - The hidden field is invalid. - الحقل المخفي غير صالح. - - - Please enter an integer. - الرجاء إدخال عدد صحيح. - - - Please select a valid language. - الرجاء اختيار لغة صالحة. - - - Please select a valid locale. - الرجاء اختيار لغة صالحة. - - - Please enter a valid money amount. - الرجاء إدخال مبلغ مالي صالح. - - - Please enter a number. - الرجاء إدخال رقم. - - - The password is invalid. - كلمة المرور غير صحيحة. - - - Please enter a percentage value. - الرجاء إدخال قيمة النسبة المئوية. - - - The values do not match. - القيم لا تتطابق. - - - Please enter a valid time. - الرجاء إدخال وقت صالح. - - - Please select a valid timezone. - الرجاء تحديد منطقة زمنية صالحة. - - - Please enter a valid URL. - أدخل عنوان الرابط صحيح من فضلك. - - - Please enter a valid search term. - الرجاء إدخال مصطلح البحث ساري المفعول. - - - Please provide a valid phone number. - يرجى تقديم رقم هاتف صالح. - - - The checkbox has an invalid value. - خانة الاختيار لها قيمة غير صالحة. - - - Please enter a valid email address. - رجاء قم بإدخال بريد الكتروني صحيح - - - Please select a valid option. - الرجاء تحديد خيار صالح. - - - Please select a valid range. - يرجى تحديد نطاق صالح. - - - Please enter a valid week. - الرجاء إدخال أسبوع صالح. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.az.xlf b/vendor/symfony/form/Resources/translations/validators.az.xlf deleted file mode 100644 index b926970..0000000 --- a/vendor/symfony/form/Resources/translations/validators.az.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Bu formada əlavə sahə olmamalıdır. - - - The uploaded file was too large. Please try to upload a smaller file. - Yüklənən fayl çox böyükdür. Lütfən daha kiçik fayl yükləyin. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF nişanı yanlışdır. Lütfen formanı yenidən göndərin. - - - This value is not a valid HTML5 color. - Bu dəyər doğru bir HTML5 rəngi deyil. - - - Please enter a valid birthdate. - Zəhmət olmasa doğru bir doğum günü daxil edin. - - - The selected choice is invalid. - Seçilmiş seçim doğru deyil. - - - The collection is invalid. - Kolleksiya doğru deyil. - - - Please select a valid color. - Zəhmət olmasa doğru bir rəng seçin. - - - Please select a valid country. - Zəhmət olmasa doğru bir ölkə seçin. - - - Please select a valid currency. - Zəhmət olmasa doğru bir valyuta seçin. - - - Please choose a valid date interval. - Zəhmət olmasa doğru bir tarix aralığı seçin. - - - Please enter a valid date and time. - Zəhmət olmasa doğru bir tarix ve saat daxil edin. - - - Please enter a valid date. - Zəhmət olmasa doğru bir tarix daxil edin. - - - Please select a valid file. - Zəhmət olmasa doğru bir fayl seçin. - - - The hidden field is invalid. - Gizli sahə doğru deyil. - - - Please enter an integer. - Zəhmət olmasa bir tam ədəd daxil edin. - - - Please select a valid language. - Zəhmət olmasa doğru bir dil seçin. - - - Please select a valid locale. - Zəhmət olmasa doğru bir yer seçin. - - - Please enter a valid money amount. - Zəhmət olmasa doğru bir pul miqdarı daxil edin. - - - Please enter a number. - Zəhmət olmasa doğru bir rəqəm daxil edin. - - - The password is invalid. - Parol doğru deyil. - - - Please enter a percentage value. - Zəhmət olmasa doğru bir faiz dəyəri daxil edin. - - - The values do not match. - Dəyərlər örtüşmür. - - - Please enter a valid time. - Zəhmət olmasa doğru bir saat daxil edin. - - - Please select a valid timezone. - Zəhmət olmasa doğru bir saat qurşağı seçin. - - - Please enter a valid URL. - Zəhmət olmasa doğru bir URL daxil edin. - - - Please enter a valid search term. - Zəhmət olmasa doğru bir axtarış termini daxil edin. - - - Please provide a valid phone number. - Zəhmət olmasa doğru bir telefon nömrəsi seçin. - - - The checkbox has an invalid value. - Seçim qutusunda doğru olmayan dəyər var. - - - Please enter a valid email address. - Zəhmət olmasa doğru bir e-poçt seçin. - - - Please select a valid option. - Zəhmət olmasa doğru bir variant seçin. - - - Please select a valid range. - Zəhmət olmasa doğru bir aralıq seçin. - - - Please enter a valid week. - Zəhmət olmasa doğru bir həftə seçin. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.be.xlf b/vendor/symfony/form/Resources/translations/validators.be.xlf deleted file mode 100644 index 0513ca1..0000000 --- a/vendor/symfony/form/Resources/translations/validators.be.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Гэта форма не павінна мець дадатковых палей. - - - The uploaded file was too large. Please try to upload a smaller file. - Запампаваны файл быў занадта вялікім. Калі ласка, паспрабуйце запампаваць файл меншага памеру. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-токен не сапраўдны. Калі ласка, паспрабуйце яшчэ раз адправіць форму. - - - This value is not a valid HTML5 color. - Значэнне не з'яўляецца карэктным HTML5 колерам. - - - Please enter a valid birthdate. - Калі ласка, увядзіце карэктную дату нараджэння. - - - The selected choice is invalid. - Выбраны варыянт некарэктны. - - - The collection is invalid. - Калекцыя некарэктна. - - - Please select a valid color. - Калі ласка, выберыце карэктны колер. - - - Please select a valid country. - Калі ласка, выберыце карэктную краіну. - - - Please select a valid currency. - Калі ласка, выберыце карэктную валюту. - - - Please choose a valid date interval. - Калі ласка, выберыце карэктны інтэрвал дат. - - - Please enter a valid date and time. - Калі ласка, увядзіце карэктныя дату і час. - - - Please enter a valid date. - Калі ласка, увядзіце карэктную дату. - - - Please select a valid file. - Калі ласка, выберыце карэктны файл. - - - The hidden field is invalid. - Значэнне схаванага поля некарэктна. - - - Please enter an integer. - Калі ласка, увядзіце цэлы лік. - - - Please select a valid language. - Калі ласка, выберыце карэктную мову. - - - Please select a valid locale. - Калі ласка, выберыце карэктную лакаль. - - - Please enter a valid money amount. - Калі ласка, увядзіце карэктную колькасць грошай. - - - Please enter a number. - Калі ласка, увядзіце нумар. - - - The password is invalid. - Няправільны пароль. - - - Please enter a percentage value. - Калі ласка, увядзіце працэнтнае значэнне. - - - The values do not match. - Значэнні не супадаюць. - - - Please enter a valid time. - Калі ласка, увядзіце карэктны час. - - - Please select a valid timezone. - Калі ласка, выберыце карэктны гадзінны пояс. - - - Please enter a valid URL. - Калі ласка, увядзіце карэктны URL. - - - Please enter a valid search term. - Калі ласка, увядзіце карэктны пошукавы запыт. - - - Please provide a valid phone number. - Калі ласка, увядзіце карэктны нумар тэлефона. - - - The checkbox has an invalid value. - Флажок мае некарэктнае значэнне. - - - Please enter a valid email address. - Калі ласка, увядзіце карэктны адрас электроннай пошты. - - - Please select a valid option. - Калі ласка, выберыце карэктны варыянт. - - - Please select a valid range. - Калі ласка, выберыце карэктны дыяпазон. - - - Please enter a valid week. - Калі ласка, увядзіце карэктны тыдзень. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.bg.xlf b/vendor/symfony/form/Resources/translations/validators.bg.xlf deleted file mode 100644 index 32fa943..0000000 --- a/vendor/symfony/form/Resources/translations/validators.bg.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Тази форма не трябва да съдържа допълнителни полета. - - - The uploaded file was too large. Please try to upload a smaller file. - Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл. - - - The CSRF token is invalid. Please try to resubmit the form. - Невалиден CSRF токен. Моля, опитайте да изпратите формата отново. - - - This value is not a valid HTML5 color. - Стойността не е валиден HTML5 цвят. - - - Please enter a valid birthdate. - Моля въведете валидна дата на раждане. - - - The selected choice is invalid. - Избраните стойности не са валидни. - - - The collection is invalid. - Колекцията не е валидна. - - - Please select a valid color. - Моля изберете валиден цвят. - - - Please select a valid country. - Моля изберете валидна държава. - - - Please select a valid currency. - Моля изберете валидна валута. - - - Please choose a valid date interval. - Моля изберете валиден интервал от дати. - - - Please enter a valid date and time. - Моля въведете валидни дата и час. - - - Please enter a valid date. - Моля въведете валидна дата. - - - Please select a valid file. - Моля изберете валиден файл. - - - The hidden field is invalid. - Скритото поле е невалидно. - - - Please enter an integer. - Моля попълнете цяло число. - - - Please select a valid language. - Моля изберете валиден език. - - - Please select a valid locale. - Моля изберете валиден език. - - - Please enter a valid money amount. - Моля въведете валидна парична сума. - - - Please enter a number. - Моля въведете число. - - - The password is invalid. - Паролата е невалидна. - - - Please enter a percentage value. - Моля въведете процентна стойност. - - - The values do not match. - Стойностите не съвпадат. - - - Please enter a valid time. - Моля въведете валидно време. - - - Please select a valid timezone. - Моля изберете валидна часова зона. - - - Please enter a valid URL. - Моля въведете валиден URL. - - - Please enter a valid search term. - Моля въведете валидно търсене. - - - Please provide a valid phone number. - Моля осигурете валиден телефонен номер. - - - The checkbox has an invalid value. - Отметката има невалидна стойност. - - - Please enter a valid email address. - Моля въведете валидна ел. поща. - - - Please select a valid option. - Моля изберете валидна опция. - - - Please select a valid range. - Моля изберете валиден обхват. - - - Please enter a valid week. - Моля въведете валидна седмица. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.bs.xlf b/vendor/symfony/form/Resources/translations/validators.bs.xlf deleted file mode 100644 index 319f915..0000000 --- a/vendor/symfony/form/Resources/translations/validators.bs.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj obrazac ne bi trebalo da sadrži dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Prenijeta (uploaded) datoteka je prevelika. Molim pokušajte prenijeti manju datoteku. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrijednost nije ispravna. Molim pokušajte ponovo da pošaljete obrazac. - - - This value is not a valid HTML5 color. - Ova vrijednost nije važeća HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Ova kolekcija nije ispravna. - - - Please select a valid color. - Molim izaberite ispravnu boju. - - - Please select a valid country. - Molim izaberite ispravnu državu. - - - Please select a valid currency. - Molim izaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim izaberite ispravan datumski interval. - - - Please enter a valid date and time. - Molim upišite ispravan datum i vrijeme. - - - Please enter a valid date. - Molim upišite ispravan datum. - - - Please select a valid file. - Molim izaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim upišite cijeli broj (integer). - - - Please select a valid language. - Molim izaberite ispravan jezik. - - - Please select a valid locale. - Molim izaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim upišite ispravnu količinu novca. - - - Please enter a number. - Molim upišite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim upišite procentualnu vrijednost. - - - The values do not match. - Date vrijednosti se ne poklapaju. - - - Please enter a valid time. - Molim upišite ispravno vrijeme. - - - Please select a valid timezone. - Molim izaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim upišite ispravan URL. - - - Please enter a valid search term. - Molim upišite ispravan termin za pretragu. - - - Please provide a valid phone number. - Molim navedite ispravan broj telefona. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrijednost. - - - Please enter a valid email address. - Molim upišite ispravnu email adresu. - - - Please select a valid option. - Molim izaberite ispravnu opciju. - - - Please select a valid range. - Molim izaberite ispravan opseg. - - - Please enter a valid week. - Molim upišite ispravnu sedmicu. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.ca.xlf b/vendor/symfony/form/Resources/translations/validators.ca.xlf deleted file mode 100644 index 6937960..0000000 --- a/vendor/symfony/form/Resources/translations/validators.ca.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Aquest formulari no hauria de contenir camps addicionals. - - - The uploaded file was too large. Please try to upload a smaller file. - L'arxiu pujat és massa gran. Per favor, pugi un arxiu més petit. - - - The CSRF token is invalid. Please try to resubmit the form. - El token CSRF no és vàlid. Per favor, provi d'enviar novament el formulari. - - - This value is not a valid HTML5 color. - Aquest valor no és un color HTML5 valid. - - - Please enter a valid birthdate. - Per favor introdueix una data d'aniversari valida. - - - The selected choice is invalid. - L'opció escollida és invalida. - - - The collection is invalid. - La col·lecció és invalida. - - - Please select a valid color. - Per favor selecciona un color vàlid. - - - Please select a valid country. - Per favor selecciona una ciutat vàlida. - - - Please select a valid currency. - Per favor selecciona una moneda vàlida. - - - Please choose a valid date interval. - Per favor escull un interval de dates vàlides. - - - Please enter a valid date and time. - Per favor introdueix una data i temps vàlid. - - - Please enter a valid date. - Per favor introdueix una data vàlida. - - - Please select a valid file. - Per favor selecciona un arxiu vàlid. - - - The hidden field is invalid. - El camp ocult és invàlid. - - - Please enter an integer. - Per favor introdueix un enter. - - - Please select a valid language. - Per favor selecciona un idioma vàlid. - - - Please select a valid locale. - Per favor seleccioneu una configuració regional vàlida - - - Please enter a valid money amount. - Per favor introdueix una quantitat de diners vàlids. - - - Please enter a number. - Per favor introdueix un número. - - - The password is invalid. - La contrasenya es invàlida. - - - Please enter a percentage value. - Per favor introdueix un valor percentual. - - - The values do not match. - Els valors no coincideixen. - - - Please enter a valid time. - Per favor introdueix un temps vàlid. - - - Please select a valid timezone. - Per favor selecciona una zona horària vàlida. - - - Please enter a valid URL. - Per favor introdueix una URL vàlida. - - - Please enter a valid search term. - Per favor introdueix un concepte de cerca vàlid. - - - Please provide a valid phone number. - Per favor introdueix un número de telèfon vàlid. - - - The checkbox has an invalid value. - La casella de selecció te un valor invàlid. - - - Please enter a valid email address. - Per favor introdueix un correu electrònic vàlid. - - - Please select a valid option. - Per favor selecciona una opció vàlida. - - - Please select a valid range. - Per favor selecciona un rang vàlid. - - - Please enter a valid week. - Per favor introdueix una setmana vàlida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.cs.xlf b/vendor/symfony/form/Resources/translations/validators.cs.xlf deleted file mode 100644 index 3c4052b..0000000 --- a/vendor/symfony/form/Resources/translations/validators.cs.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Tato skupina polí nesmí obsahovat další pole. - - - The uploaded file was too large. Please try to upload a smaller file. - Nahraný soubor je příliš velký. Nahrajte prosím menší soubor. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token je neplatný. Zkuste prosím znovu odeslat formulář. - - - This value is not a valid HTML5 color. - Tato hodnota není platná HTML5 barva. - - - Please enter a valid birthdate. - Prosím zadejte platný datum narození. - - - The selected choice is invalid. - Vybraná možnost není platná. - - - The collection is invalid. - Kolekce není platná. - - - Please select a valid color. - Prosím vyberte platnou barvu. - - - Please select a valid country. - Prosím vyberte platnou zemi. - - - Please select a valid currency. - Prosím vyberte platnou měnu. - - - Please choose a valid date interval. - Prosím vyberte platné rozpětí dat. - - - Please enter a valid date and time. - Prosím zadejte platný datum a čas. - - - Please enter a valid date. - Prosím zadejte platný datum. - - - Please select a valid file. - Prosím vyberte platný soubor. - - - The hidden field is invalid. - Skryté pole není platné. - - - Please enter an integer. - Prosím zadejte číslo. - - - Please select a valid language. - Prosím zadejte platný jazyk. - - - Please select a valid locale. - Prosím zadejte platný jazyk. - - - Please enter a valid money amount. - Prosím zadejte platnou částku. - - - Please enter a number. - Prosím zadejte číslo. - - - The password is invalid. - Heslo není platné. - - - Please enter a percentage value. - Prosím zadejte procentuální hodnotu. - - - The values do not match. - Hodnoty se neshodují. - - - Please enter a valid time. - Prosím zadejte platný čas. - - - Please select a valid timezone. - Prosím vyberte platné časové pásmo. - - - Please enter a valid URL. - Prosím zadejte platnou URL. - - - Please enter a valid search term. - Prosím zadejte platný výraz k vyhledání. - - - Please provide a valid phone number. - Prosím zadejte platné telefonní číslo. - - - The checkbox has an invalid value. - Zaškrtávací políčko má neplatnou hodnotu. - - - Please enter a valid email address. - Prosím zadejte platnou emailovou adresu. - - - Please select a valid option. - Prosím vyberte platnou možnost. - - - Please select a valid range. - Prosím vyberte platný rozsah. - - - Please enter a valid week. - Prosím zadejte platný týden. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.da.xlf b/vendor/symfony/form/Resources/translations/validators.da.xlf deleted file mode 100644 index b4f078f..0000000 --- a/vendor/symfony/form/Resources/translations/validators.da.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke indeholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den uploadede fil var for stor. Upload venligst en mindre fil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-token er ugyldig. Prøv venligst at genindsende. - - - This value is not a valid HTML5 color. - Værdien er ikke en gyldig HTML5 farve. - - - Please enter a valid birthdate. - Indtast venligst en gyldig fødselsdato. - - - The selected choice is invalid. - Den valgte mulighed er ugyldig . - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Vælg venligst en gyldig farve. - - - Please select a valid country. - Vælg venligst et gyldigt land. - - - Please select a valid currency. - Vælg venligst en gyldig valuta. - - - Please choose a valid date interval. - Vælg venligst et gyldigt datointerval. - - - Please enter a valid date and time. - Vælg venligst en gyldig dato og tid. - - - Please enter a valid date. - Vælg venligst en gyldig dato. - - - Please select a valid file. - Vælg venligst en gyldig fil. - - - The hidden field is invalid. - Det skjulte felt er ugyldigt. - - - Please enter an integer. - Indsæt veligst et heltal. - - - Please select a valid language. - Vælg venligst et gyldigt sprog. - - - Please select a valid locale. - Vælg venligst en gyldigt sprogkode. - - - Please enter a valid money amount. - Vælg venligst et gyldigt beløb. - - - Please enter a number. - Indtast venligst et nummer. - - - The password is invalid. - Passwordet er ugyldigt. - - - Please enter a percentage value. - Indtast venligst en procentværdi. - - - The values do not match. - Værdierne er ikke ens. - - - Please enter a valid time. - Indtast venligst en gyldig tid. - - - Please select a valid timezone. - Vælg venligst en gyldig tidszone. - - - Please enter a valid URL. - Indtast venligst en gyldig URL. - - - Please enter a valid search term. - Indtast venligst et gyldigt søgeord. - - - Please provide a valid phone number. - Giv venligst et gyldigt telefonnummer. - - - The checkbox has an invalid value. - Checkboxen har en ugyldigt værdi. - - - Please enter a valid email address. - Indtast venligst en gyldig e-mailadresse. - - - Please select a valid option. - Vælg venligst en gyldig mulighed. - - - Please select a valid range. - Vælg venligst et gyldigt interval . - - - Please enter a valid week. - Indtast venligst en gyldig uge. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.de.xlf b/vendor/symfony/form/Resources/translations/validators.de.xlf deleted file mode 100644 index bc8e46d..0000000 --- a/vendor/symfony/form/Resources/translations/validators.de.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dieses Formular sollte keine zusätzlichen Felder enthalten. - - - The uploaded file was too large. Please try to upload a smaller file. - Die hochgeladene Datei ist zu groß. Versuchen Sie bitte eine kleinere Datei hochzuladen. - - - The CSRF token is invalid. Please try to resubmit the form. - Der CSRF-Token ist ungültig. Versuchen Sie bitte das Formular erneut zu senden. - - - This value is not a valid HTML5 color. - Dieser Wert ist keine gültige HTML5 Farbe. - - - Please enter a valid birthdate. - Bitte geben Sie ein gültiges Geburtsdatum ein. - - - The selected choice is invalid. - Die Auswahl ist ungültig. - - - The collection is invalid. - Diese Gruppe von Feldern ist ungültig. - - - Please select a valid color. - Bitte geben Sie eine gültige Farbe ein. - - - Please select a valid country. - Bitte wählen Sie ein gültiges Land aus. - - - Please select a valid currency. - Bitte wählen Sie eine gültige Währung aus. - - - Please choose a valid date interval. - Bitte wählen Sie ein gültiges Datumsintervall. - - - Please enter a valid date and time. - Bitte geben Sie ein gültiges Datum samt Uhrzeit ein. - - - Please enter a valid date. - Bitte geben Sie ein gültiges Datum ein. - - - Please select a valid file. - Bitte wählen Sie eine gültige Datei. - - - The hidden field is invalid. - Das versteckte Feld ist ungültig. - - - Please enter an integer. - Bitte geben Sie eine ganze Zahl ein. - - - Please select a valid language. - Bitte wählen Sie eine gültige Sprache. - - - Please select a valid locale. - Bitte wählen Sie eine gültige Locale-Einstellung aus. - - - Please enter a valid money amount. - Bitte geben Sie einen gültigen Geldbetrag ein. - - - Please enter a number. - Bitte geben Sie eine gültige Zahl ein. - - - The password is invalid. - Das Kennwort ist ungültig. - - - Please enter a percentage value. - Bitte geben Sie einen gültigen Prozentwert ein. - - - The values do not match. - Die Werte stimmen nicht überein. - - - Please enter a valid time. - Bitte geben Sie eine gültige Uhrzeit ein. - - - Please select a valid timezone. - Bitte wählen Sie eine gültige Zeitzone. - - - Please enter a valid URL. - Bitte geben Sie eine gültige URL ein. - - - Please enter a valid search term. - Bitte geben Sie einen gültigen Suchbegriff ein. - - - Please provide a valid phone number. - Bitte geben Sie eine gültige Telefonnummer ein. - - - The checkbox has an invalid value. - Das Kontrollkästchen hat einen ungültigen Wert. - - - Please enter a valid email address. - Bitte geben Sie eine gültige E-Mail-Adresse ein. - - - Please select a valid option. - Bitte wählen Sie eine gültige Option. - - - Please select a valid range. - Bitte wählen Sie einen gültigen Bereich. - - - Please enter a valid week. - Bitte geben Sie eine gültige Woche ein. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.el.xlf b/vendor/symfony/form/Resources/translations/validators.el.xlf deleted file mode 100644 index 595630e..0000000 --- a/vendor/symfony/form/Resources/translations/validators.el.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Αυτή η φόρμα δεν πρέπει να περιέχει επιπλέον πεδία. - - - The uploaded file was too large. Please try to upload a smaller file. - Το αρχείο είναι πολύ μεγάλο. Παρακαλούμε προσπαθήστε να ανεβάσετε ένα μικρότερο αρχείο. - - - The CSRF token is invalid. Please try to resubmit the form. - Το CSRF token δεν είναι έγκυρο. Παρακαλούμε δοκιμάστε να υποβάλετε τη φόρμα ξανά. - - - This value is not a valid HTML5 color. - Αυτή η τιμή δέν έναι έγκυρο χρώμα HTML5. - - - Please enter a valid birthdate. - Παρακαλόυμε ειχάγεται μία έγκυρη ημερομηνία γέννησης. - - - The selected choice is invalid. - Η επιλεγμένη επιλογή δέν είναι έγκυρη. - - - The collection is invalid. - Η συλλογή δέν είναι έγκυρη. - - - Please select a valid color. - Παρακαλούμε επιλέξτε ένα έγκυρο χρώμα. - - - Please select a valid country. - Παρακαλούμε επιλέξτε μία έγκυρη χώρα. - - - Please select a valid currency. - Παρακαλούμε επιλέξτε ένα έγυρο νόμισμα. - - - Please choose a valid date interval. - Παρακαλούμε επιλέξτε ένα έγκυρο διάστημα ημερομηνίας. - - - Please enter a valid date and time. - Παρακαλούμε εισαγάγετε μια έγκυρη ημερομηνία και ώρα. - - - Please enter a valid date. - Παρακαλούμε εισάγετε μία έγκυρη ημερομηνία. - - - Please select a valid file. - Παρακαλούμε επιλέξτε ένα έγκυρο αρχείο. - - - The hidden field is invalid. - Το κρυφό πεδίο δέν είναι έγκυρο. - - - Please enter an integer. - Παρακαλούμε εισάγετε έναν ακέραιο αριθμό. - - - Please select a valid language. - Παρακαλούμε επιλέξτε μία έγκυρη γλώσσα. - - - Please select a valid locale. - Παρακαλούμε επιλέξτε μία έγκυρη τοπικοποίηση. - - - Please enter a valid money amount. - Παρακαλούμε εισάγετε ένα έγκυρο χρηματικό ποσό. - - - Please enter a number. - Παρακαλούμε εισάγετε έναν αριθμό. - - - The password is invalid. - Ο κωδικός δέν είναι έγκυρος. - - - Please enter a percentage value. - Παρακαλούμε εισάγετε μία ποσοστιαία τιμή. - - - The values do not match. - Οι τιμές δέν ταιριάζουν. - - - Please enter a valid time. - Παρακαλούμε εισάγετε μία έγκυρη ώρα. - - - Please select a valid timezone. - Παρακαλούμε επιλέξτε μία έγυρη ζώνη ώρας. - - - Please enter a valid URL. - Παρακαλούμε εισάγετε μια έγκυρη διεύθυνση URL. - - - Please enter a valid search term. - Παρακαλούμε εισάγετε έναν έγκυρο όρο αναζήτησης. - - - Please provide a valid phone number. - Παρακαλούμε καταχωρίστε έναν έγκυρο αριθμό τηλεφώνου. - - - The checkbox has an invalid value. - Το πλαίσιο ελέγχου έχει μή έγκυρη τιμή. - - - Please enter a valid email address. - Παρακαλούμε εισάγετε μία έγκυρη ηλεκτρονική διεύθυνση. - - - Please select a valid option. - Παρακαλούμε επιλέξτε μία έγκυρη επιλογή. - - - Please select a valid range. - Παρακαλούμε επιλέξτε ένα έγυρο εύρος. - - - Please enter a valid week. - Παρακαλούμε εισάγετε μία έγκυρη εβδομάδα. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.en.xlf b/vendor/symfony/form/Resources/translations/validators.en.xlf deleted file mode 100644 index e556c40..0000000 --- a/vendor/symfony/form/Resources/translations/validators.en.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - This form should not contain extra fields. - - - The uploaded file was too large. Please try to upload a smaller file. - The uploaded file was too large. Please try to upload a smaller file. - - - The CSRF token is invalid. Please try to resubmit the form. - The CSRF token is invalid. Please try to resubmit the form. - - - This value is not a valid HTML5 color. - This value is not a valid HTML5 color. - - - Please enter a valid birthdate. - Please enter a valid birthdate. - - - The selected choice is invalid. - The selected choice is invalid. - - - The collection is invalid. - The collection is invalid. - - - Please select a valid color. - Please select a valid color. - - - Please select a valid country. - Please select a valid country. - - - Please select a valid currency. - Please select a valid currency. - - - Please choose a valid date interval. - Please choose a valid date interval. - - - Please enter a valid date and time. - Please enter a valid date and time. - - - Please enter a valid date. - Please enter a valid date. - - - Please select a valid file. - Please select a valid file. - - - The hidden field is invalid. - The hidden field is invalid. - - - Please enter an integer. - Please enter an integer. - - - Please select a valid language. - Please select a valid language. - - - Please select a valid locale. - Please select a valid locale. - - - Please enter a valid money amount. - Please enter a valid money amount. - - - Please enter a number. - Please enter a number. - - - The password is invalid. - The password is invalid. - - - Please enter a percentage value. - Please enter a percentage value. - - - The values do not match. - The values do not match. - - - Please enter a valid time. - Please enter a valid time. - - - Please select a valid timezone. - Please select a valid timezone. - - - Please enter a valid URL. - Please enter a valid URL. - - - Please enter a valid search term. - Please enter a valid search term. - - - Please provide a valid phone number. - Please provide a valid phone number. - - - The checkbox has an invalid value. - The checkbox has an invalid value. - - - Please enter a valid email address. - Please enter a valid email address. - - - Please select a valid option. - Please select a valid option. - - - Please select a valid range. - Please select a valid range. - - - Please enter a valid week. - Please enter a valid week. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.es.xlf b/vendor/symfony/form/Resources/translations/validators.es.xlf deleted file mode 100644 index c143e00..0000000 --- a/vendor/symfony/form/Resources/translations/validators.es.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulario no debería contener campos adicionales. - - - The uploaded file was too large. Please try to upload a smaller file. - El archivo subido es demasiado grande. Por favor, suba un archivo más pequeño. - - - The CSRF token is invalid. Please try to resubmit the form. - El token CSRF no es válido. Por favor, pruebe a enviar nuevamente el formulario. - - - This value is not a valid HTML5 color. - Este valor no es un color HTML5 válido. - - - Please enter a valid birthdate. - Por favor, ingrese una fecha de cumpleaños válida. - - - The selected choice is invalid. - La opción seleccionada no es válida. - - - The collection is invalid. - La colección no es válida. - - - Please select a valid color. - Por favor, seleccione un color válido. - - - Please select a valid country. - Por favor, seleccione un país válido. - - - Please select a valid currency. - Por favor, seleccione una moneda válida. - - - Please choose a valid date interval. - Por favor, elija un intervalo de fechas válido. - - - Please enter a valid date and time. - Por favor, ingrese una fecha y hora válidas. - - - Please enter a valid date. - Por favor, ingrese una fecha valida. - - - Please select a valid file. - Por favor, seleccione un archivo válido. - - - The hidden field is invalid. - El campo oculto no es válido. - - - Please enter an integer. - Por favor, ingrese un número entero. - - - Please select a valid language. - Por favor, seleccione un idioma válido. - - - Please select a valid locale. - Por favor, seleccione una configuración regional válida. - - - Please enter a valid money amount. - Por favor, ingrese una cantidad de dinero válida. - - - Please enter a number. - Por favor, ingrese un número. - - - The password is invalid. - La contraseña no es válida. - - - Please enter a percentage value. - Por favor, ingrese un valor porcentual. - - - The values do not match. - Los valores no coinciden. - - - Please enter a valid time. - Por favor, ingrese una hora válida. - - - Please select a valid timezone. - Por favor, seleccione una zona horaria válida. - - - Please enter a valid URL. - Por favor, ingrese una URL válida. - - - Please enter a valid search term. - Por favor, ingrese un término de búsqueda válido. - - - Please provide a valid phone number. - Por favor, proporcione un número de teléfono válido. - - - The checkbox has an invalid value. - La casilla de verificación tiene un valor inválido. - - - Please enter a valid email address. - Por favor, ingrese una dirección de correo electrónico válida. - - - Please select a valid option. - Por favor, seleccione una opción válida. - - - Please select a valid range. - Por favor, seleccione un rango válido. - - - Please enter a valid week. - Por favor, ingrese una semana válida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.et.xlf b/vendor/symfony/form/Resources/translations/validators.et.xlf deleted file mode 100644 index 6524c86..0000000 --- a/vendor/symfony/form/Resources/translations/validators.et.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Väljade grupp ei tohiks sisalda lisaväljasid. - - - The uploaded file was too large. Please try to upload a smaller file. - Üleslaaditud fail oli liiga suur. Palun proovi uuesti väiksema failiga. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-märgis on vigane. Palun proovi vormi uuesti esitada. - - - This value is not a valid HTML5 color. - See väärtus ei ole korrektne HTML5 värv. - - - Please enter a valid birthdate. - Palun sisesta korrektne sünnikuupäev. - - - The selected choice is invalid. - Tehtud valik on vigane. - - - The collection is invalid. - Kogum on vigane. - - - Please select a valid color. - Palun vali korrektne värv. - - - Please select a valid country. - Palun vali korrektne riik. - - - Please select a valid currency. - Palun vali korrektne valuuta. - - - Please choose a valid date interval. - Palun vali korrektne kuupäevade vahemik. - - - Please enter a valid date and time. - Palun sisesta korrektne kuupäev ja kellaaeg. - - - Please enter a valid date. - Palun sisesta korrektne kuupäev. - - - Please select a valid file. - Palun vali korrektne fail. - - - The hidden field is invalid. - Peidetud väli on vigane. - - - Please enter an integer. - Palun sisesta täisarv. - - - Please select a valid language. - Palun vali korrektne keel. - - - Please select a valid locale. - Palun vali korrektne keelekood. - - - Please enter a valid money amount. - Palun sisesta korrektne rahaline väärtus. - - - Please enter a number. - Palun sisesta number. - - - The password is invalid. - Vigane parool. - - - Please enter a percentage value. - Palun sisesta protsendiline väärtus. - - - The values do not match. - Väärtused ei klapi. - - - Please enter a valid time. - Palun sisesta korrektne aeg. - - - Please select a valid timezone. - Palun vali korrektne ajavöönd. - - - Please enter a valid URL. - Palun sisesta korrektne URL. - - - Please enter a valid search term. - Palun sisesta korrektne otsingutermin. - - - Please provide a valid phone number. - Palun sisesta korrektne telefoninumber. - - - The checkbox has an invalid value. - Märkeruudu väärtus on vigane. - - - Please enter a valid email address. - Palun sisesta korrektne e-posti aadress. - - - Please select a valid option. - Palun tee korrektne valik. - - - Please select a valid range. - Palun vali korrektne vahemik. - - - Please enter a valid week. - Palun sisesta korrektne nädal. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.eu.xlf b/vendor/symfony/form/Resources/translations/validators.eu.xlf deleted file mode 100644 index f43ab35..0000000 --- a/vendor/symfony/form/Resources/translations/validators.eu.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Formulario honek ez luke aparteko eremurik eduki behar. - - - The uploaded file was too large. Please try to upload a smaller file. - Igotako fitxategia handiegia da. Mesedez saiatu fitxategi txikiago bat igotzen. - - - The CSRF token is invalid. - CSRF tokena ez da egokia. - - - This value is not a valid HTML5 color. - Balio hori ez da HTML5 kolore onargarria. - - - Please enter a valid birthdate. - Mesedez, sartu baliozko urtebetetze-eguna. - - - The selected choice is invalid. - Hautatutako aukera ez da egokia. - - - The collection is invalid. - Bilduma ez da baliozkoa. - - - Please select a valid color. - Mesedez, hautatu baliozko kolore bat. - - - Please select a valid country. - Mesedez, hautatu baliozko herrialde bat. - - - Please select a valid currency. - Mesedez, hautatu baliozko moneta bat. - - - Please choose a valid date interval. - Mesedez, hautatu baliozko data-tarte bat. - - - Please enter a valid date and time. - Mesedez, sartu baliozko data eta ordua. - - - Please enter a valid date. - Mesedez, sartu baliozko data bat. - - - Please select a valid file. - Mesedez, hautatu baliozko fitxategi bat. - - - The hidden field is invalid. - Eremu ezkutua ez da baliozkoa. - - - Please enter an integer. - Mesedez, sartu zenbaki oso bat. - - - Please select a valid language. - Mesedez, hautatu baliozko hizkuntza bat. - - - Please select a valid locale. - Mesedez, hautatu baliozko eskualde-konfigurazio bat. - - - Please enter a valid money amount. - Mesedez, sartu baliozko diru-kopuru bat. - - - Please enter a number. - Mesedez, sartu zenbaki bat. - - - The password is invalid. - Pasahitza ez da zuzena. - - - Please enter a percentage value. - Mesedez, sartu portzentajezko balio bat. - - - The values do not match. - Balioak ez datoz bat. - - - Please enter a valid time. - Mesedez, sartu baliozko ordu bat. - - - Please select a valid timezone. - Mesedez, hautatu baliozko ordu-eremua. - - - Please enter a valid URL. - Mesedez, sartu baliozko URL bat. - - - Please enter a valid search term. - Mesedez, sartu bilaketa-termino onargarri bat. - - - Please provide a valid phone number. - Mesedez, eman baliozko telefono-zenbaki bat. - - - The checkbox has an invalid value. - Egiaztatze-laukiak balio baliogabea du. - - - Please enter a valid email address. - Mesedez, sartu baliozko helbide elektroniko bat. - - - Please select a valid option. - Mesedez, hautatu baliozko aukera bat. - - - Please select a valid range. - Mesedez, hautatu baliozko tarte bat. - - - Please enter a valid week. - Mesedez, sartu baliozko aste bat. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.fa.xlf b/vendor/symfony/form/Resources/translations/validators.fa.xlf deleted file mode 100644 index 4a98eea..0000000 --- a/vendor/symfony/form/Resources/translations/validators.fa.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - این فرم نباید شامل فیلدهای اضافی باشد. - - - The uploaded file was too large. Please try to upload a smaller file. - فایل بارگذاری‌شده بسیار بزرگ است. لطفاً فایل کوچک‌تری را بارگذاری نمایید. - - - The CSRF token is invalid. Please try to resubmit the form. - توکن CSRF نامعتبر است. لطفاً فرم را مجدداً ارسال نمایید. - - - This value is not a valid HTML5 color. - این مقدار یک رنگ معتبر HTML5 نیست. - - - Please enter a valid birthdate. - لطفاً یک تاریخ تولد معتبر وارد نمایید. - - - The selected choice is invalid. - گزینه‌ انتخاب‌ شده نامعتبر است. - - - The collection is invalid. - این مجموعه نامعتبر است. - - - Please select a valid color. - لطفاً یک رنگ معتبر انتخاب کنید. - - - Please select a valid country. - لطفاً یک کشور معتبر انتخاب کنید. - - - Please select a valid currency. - لطفاً یک واحد پول معتبر انتخاب کنید. - - - Please choose a valid date interval. - لطفاً یک بازه‌ زمانی معتبر انتخاب کنید. - - - Please enter a valid date and time. - لطفاً یک تاریخ و زمان معتبر وارد کنید. - - - Please enter a valid date. - لطفاً یک تاریخ معتبر وارد کنید. - - - Please select a valid file. - لطفاً یک فایل معتبر انتخاب کنید. - - - The hidden field is invalid. - فیلد مخفی نامعتبر است. - - - Please enter an integer. - لطفاً یک عدد صحیح وارد کنید. - - - Please select a valid language. - لطفاً یک زبان معتبر انتخاب کنید. - - - Please select a valid locale. - لطفاً یک منطقه‌جغرافیایی (locale) معتبر انتخاب کنید. - - - Please enter a valid money amount. - لطفاً یک مقدار پول معتبر وارد کنید. - - - Please enter a number. - لطفاً یک عدد وارد کنید. - - - The password is invalid. - رمزعبور نامعتبر است. - - - Please enter a percentage value. - لطفاً یک درصد معتبر وارد کنید. - - - The values do not match. - مقادیر تطابق ندارند. - - - Please enter a valid time. - لطفاً یک زمان معتبر وارد کنید. - - - Please select a valid timezone. - لطفاً یک منطقه‌زمانی معتبر وارد کنید. - - - Please enter a valid URL. - لطفاً یک URL معتبر وارد کنید. - - - Please enter a valid search term. - لطفاً یک عبارت جستجوی معتبر وارد کنید. - - - Please provide a valid phone number. - لطفاً یک شماره تلفن معتبر وارد کنید. - - - The checkbox has an invalid value. - کادر انتخاب (checkbox) دارای مقداری نامعتبر است. - - - Please enter a valid email address. - لطفاً یک آدرس رایانامه (ایمیل) معتبر وارد کنید. - - - Please select a valid option. - لطفاً یک گزینه‌ معتبر انتخاب کنید. - - - Please select a valid range. - لطفاً یک محدوده‌ معتبر انتخاب کنید. - - - Please enter a valid week. - لطفاً یک هفته‌ معتبر وارد کنید. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.fi.xlf b/vendor/symfony/form/Resources/translations/validators.fi.xlf deleted file mode 100644 index 7ad87b5..0000000 --- a/vendor/symfony/form/Resources/translations/validators.fi.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Tämä lomake ei voi sisältää ylimääräisiä kenttiä. - - - The uploaded file was too large. Please try to upload a smaller file. - Ladattu tiedosto on liian iso. Ole hyvä ja lataa pienempi tiedosto. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-tarkiste on virheellinen. Ole hyvä ja yritä lähettää lomake uudestaan. - - - This value is not a valid HTML5 color. - Tämä arvo ei ole kelvollinen HTML5-väri. - - - Please enter a valid birthdate. - Syötä kelvollinen syntymäaika. - - - The selected choice is invalid. - Valittu vaihtoehto ei kelpaa. - - - The collection is invalid. - Ryhmä ei kelpaa. - - - Please select a valid color. - Valitse kelvollinen väri. - - - Please select a valid country. - Valitse kelvollinen maa. - - - Please select a valid currency. - Valitse kelvollinen valuutta. - - - Please choose a valid date interval. - Valitse kelvollinen aikaväli. - - - Please enter a valid date and time. - Syötä kelvolliset päivä ja aika. - - - Please enter a valid date. - Syötä kelvollinen päivä. - - - Please select a valid file. - Valitse kelvollinen tiedosto. - - - The hidden field is invalid. - Piilotettu kenttä ei ole kelvollinen. - - - Please enter an integer. - Syötä kokonaisluku. - - - Please select a valid language. - Valitse kelvollinen kieli. - - - Please select a valid locale. - Valitse kelvollinen kielikoodi. - - - Please enter a valid money amount. - Syötä kelvollinen rahasumma. - - - Please enter a number. - Syötä numero. - - - The password is invalid. - Salasana ei kelpaa. - - - Please enter a percentage value. - Syötä prosenttiluku. - - - The values do not match. - Arvot eivät vastaa toisiaan. - - - Please enter a valid time. - Syötä kelvollinen kellonaika. - - - Please select a valid timezone. - Valitse kelvollinen aikavyöhyke. - - - Please enter a valid URL. - Syötä kelvollinen URL. - - - Please enter a valid search term. - Syötä kelvollinen hakusana. - - - Please provide a valid phone number. - Anna kelvollinen puhelinnumero. - - - The checkbox has an invalid value. - Valintaruudun arvo ei kelpaa. - - - Please enter a valid email address. - Syötä kelvollinen sähköpostiosoite. - - - Please select a valid option. - Valitse kelvollinen vaihtoehto. - - - Please select a valid range. - Valitse kelvollinen väli. - - - Please enter a valid week. - Syötä kelvollinen viikko. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.fr.xlf b/vendor/symfony/form/Resources/translations/validators.fr.xlf deleted file mode 100644 index d658264..0000000 --- a/vendor/symfony/form/Resources/translations/validators.fr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ce formulaire ne doit pas contenir de champs supplémentaires. - - - The uploaded file was too large. Please try to upload a smaller file. - Le fichier téléchargé est trop volumineux. Merci d'essayer d'envoyer un fichier plus petit. - - - The CSRF token is invalid. Please try to resubmit the form. - Le jeton CSRF est invalide. Veuillez renvoyer le formulaire. - - - This value is not a valid HTML5 color. - Cette valeur n'est pas une couleur HTML5 valide. - - - Please enter a valid birthdate. - Veuillez entrer une date de naissance valide. - - - The selected choice is invalid. - Le choix sélectionné est invalide. - - - The collection is invalid. - La collection est invalide. - - - Please select a valid color. - Veuillez sélectionner une couleur valide. - - - Please select a valid country. - Veuillez sélectionner un pays valide. - - - Please select a valid currency. - Veuillez sélectionner une devise valide. - - - Please choose a valid date interval. - Veuillez choisir un intervalle de dates valide. - - - Please enter a valid date and time. - Veuillez saisir une date et une heure valides. - - - Please enter a valid date. - Veuillez entrer une date valide. - - - Please select a valid file. - Veuillez sélectionner un fichier valide. - - - The hidden field is invalid. - Le champ masqué n'est pas valide. - - - Please enter an integer. - Veuillez saisir un entier. - - - Please select a valid language. - Veuillez sélectionner une langue valide. - - - Please select a valid locale. - Veuillez sélectionner une langue valide. - - - Please enter a valid money amount. - Veuillez saisir un montant valide. - - - Please enter a number. - Veuillez saisir un nombre. - - - The password is invalid. - Le mot de passe est invalide. - - - Please enter a percentage value. - Veuillez saisir un pourcentage valide. - - - The values do not match. - Les valeurs ne correspondent pas. - - - Please enter a valid time. - Veuillez saisir une heure valide. - - - Please select a valid timezone. - Veuillez sélectionner un fuseau horaire valide. - - - Please enter a valid URL. - Veuillez saisir une URL valide. - - - Please enter a valid search term. - Veuillez saisir un terme de recherche valide. - - - Please provide a valid phone number. - Veuillez fournir un numéro de téléphone valide. - - - The checkbox has an invalid value. - La case à cocher a une valeur non valide. - - - Please enter a valid email address. - Veuillez saisir une adresse email valide. - - - Please select a valid option. - Veuillez sélectionner une option valide. - - - Please select a valid range. - Veuillez sélectionner une plage valide. - - - Please enter a valid week. - Veuillez entrer une semaine valide. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.gl.xlf b/vendor/symfony/form/Resources/translations/validators.gl.xlf deleted file mode 100644 index 5ef404a..0000000 --- a/vendor/symfony/form/Resources/translations/validators.gl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulario non debería conter campos adicionais. - - - The uploaded file was too large. Please try to upload a smaller file. - O arquivo subido é demasiado grande. Por favor, suba un arquivo máis pequeno. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF non é válido. Por favor, probe a enviar novamente o formulario. - - - This value is not a valid HTML5 color. - Este valor non é unha cor HTML5 válida. - - - Please enter a valid birthdate. - Insire unha data de aniversario válida. - - - The selected choice is invalid. - A opción seleccionada non é válida. - - - The collection is invalid. - A colección non é válida. - - - Please select a valid color. - Por favor, seleccione unha cor válida. - - - Please select a valid country. - Por favor, seleccione un país válido. - - - Please select a valid currency. - Por favor, seleccione unha moeda válida. - - - Please choose a valid date interval. - Por favor, escolla un intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, introduza unha data e hora válidas. - - - Please enter a valid date. - Por favor, introduce unha data válida. - - - Please select a valid file. - Por favor, seleccione un ficheiro válido. - - - The hidden field is invalid. - O campo oculto non é válido. - - - Please enter an integer. - Por favor, introduza un número enteiro. - - - Please select a valid language. - Por favor, selecciona un idioma válido. - - - Please select a valid locale. - Por favor, seleccione unha configuración rexional válida. - - - Please enter a valid money amount. - Por favor, introduza unha cantidade de diñeiro válida. - - - Please enter a number. - Por favor, introduza un número. - - - The password is invalid. - O contrasinal non é válido. - - - Please enter a percentage value. - Por favor, introduza un valor porcentual. - - - The values do not match. - Os valores non coinciden. - - - Please enter a valid time. - Por favor, introduza unha hora válida. - - - Please select a valid timezone. - Por favor, selecciona unha zona horaria válida. - - - Please enter a valid URL. - Por favor, introduce un URL válido. - - - Please enter a valid search term. - Por favor, introduce un termo de busca válido. - - - Please provide a valid phone number. - Por favor, fornecer un número de teléfono válido. - - - The checkbox has an invalid value. - A caixa de verificación ten un valor non válido. - - - Please enter a valid email address. - Por favor, introduce un enderezo de correo electrónico válido. - - - Please select a valid option. - Por favor, seleccione unha opción válida. - - - Please select a valid range. - Por favor, seleccione un intervalo válido. - - - Please enter a valid week. - Por favor, introduce unha semana válida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.he.xlf b/vendor/symfony/form/Resources/translations/validators.he.xlf deleted file mode 100644 index efd68b8..0000000 --- a/vendor/symfony/form/Resources/translations/validators.he.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - הטופס לא צריך להכיל שדות נוספים. - - - The uploaded file was too large. Please try to upload a smaller file. - הקובץ שהועלה גדול מדי. נסה להעלות קובץ קטן יותר. - - - The CSRF token is invalid. Please try to resubmit the form. - אסימון CSRF אינו חוקי. אנא נסה לשלוח שוב את הטופס. - - - This value is not a valid HTML5 color. - ערך זה אינו צבע HTML5 חוקי. - - - Please enter a valid birthdate. - נא להזין את תאריך לידה תקני. - - - The selected choice is invalid. - הבחירה שנבחרה אינה חוקית. - - - The collection is invalid. - האוסף אינו חוקי. - - - Please select a valid color. - אנא בחר צבע חוקי. - - - Please select a valid country. - אנא בחר מדינה חוקית. - - - Please select a valid currency. - אנא בחר מטבע חוקי. - - - Please choose a valid date interval. - אנא בחר מרווח תאריכים חוקי. - - - Please enter a valid date and time. - אנא הזן תאריך ושעה תקנים. - - - Please enter a valid date. - נא להזין תאריך חוקי. - - - Please select a valid file. - אנא בחר קובץ חוקי. - - - The hidden field is invalid. - השדה הנסתר אינו חוקי. - - - Please enter an integer. - אנא הזן מספר שלם. - - - Please select a valid language. - אנא בחר שפה חוקי. - - - Please select a valid locale. - אנא בחר שפה מקומית. - - - Please enter a valid money amount. - אנא הזן סכום כסף חוקי. - - - Please enter a number. - אנא הזן מספר. - - - The password is invalid. - הסיסמה אינה חוקית. - - - Please enter a percentage value. - אנא הזן ערך באחוזים. - - - The values do not match. - הערכים אינם תואמים. - - - Please enter a valid time. - אנא הזן שעה חוקי. - - - Please select a valid timezone. - אנא בחר אזור זמן חוקי. - - - Please enter a valid URL. - נא להזין את כתובת אתר חוקית. - - - Please enter a valid search term. - אנא הזן מונח חיפוש חוקי. - - - Please provide a valid phone number. - אנא ספק מספר טלפון חוקי. - - - The checkbox has an invalid value. - לתיבת הסימון יש ערך לא חוקי. - - - Please enter a valid email address. - אנא הזן כתובת דוא"ל תקנית. - - - Please select a valid option. - אנא בחר אפשרות חוקית. - - - Please select a valid range. - אנא בחר טווח חוקי. - - - Please enter a valid week. - אנא הזן שבוע תקף. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.hr.xlf b/vendor/symfony/form/Resources/translations/validators.hr.xlf deleted file mode 100644 index 9f17b5e..0000000 --- a/vendor/symfony/form/Resources/translations/validators.hr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj obrazac ne smije sadržavati dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Prenesena datoteka je prevelika. Molim pokušajte prenijeti manju datoteku. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrijednost nije ispravna. Pokušajte ponovo poslati obrazac. - - - This value is not a valid HTML5 color. - Ova vrijednost nije važeća HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Kolekcija nije ispravna. - - - Please select a valid color. - Molim odaberite ispravnu boju. - - - Please select a valid country. - Molim odaberite ispravnu državu. - - - Please select a valid currency. - Molim odaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim odaberite ispravni vremenski interval. - - - Please enter a valid date and time. - Molim unesite ispravni datum i vrijeme. - - - Please enter a valid date. - Molim odaberite ispravan datum. - - - Please select a valid file. - Molim odaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim unesite cijeli broj. - - - Please select a valid language. - Molim odaberite ispravan jezik. - - - Please select a valid locale. - Molim odaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim unesite ispravan iznos novca. - - - Please enter a number. - Molim unesite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim unesite vrijednost postotka. - - - The values do not match. - Ove vrijednosti se ne poklapaju. - - - Please enter a valid time. - Molim unesite ispravno vrijeme. - - - Please select a valid timezone. - Molim odaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim unesite ispravan URL. - - - Please enter a valid search term. - Molim unesite ispravan pojam za pretraživanje. - - - Please provide a valid phone number. - Molim navedite ispravan telefonski broj. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrijednost. - - - Please enter a valid email address. - Molim unesite valjanu adresu elektronske pošte. - - - Please select a valid option. - Molim odaberite ispravnu opciju. - - - Please select a valid range. - Molim odaberite ispravan raspon. - - - Please enter a valid week. - Molim unesite ispravni tjedan. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.hu.xlf b/vendor/symfony/form/Resources/translations/validators.hu.xlf deleted file mode 100644 index 3b70461..0000000 --- a/vendor/symfony/form/Resources/translations/validators.hu.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ez a mezőcsoport nem tartalmazhat extra mezőket. - - - The uploaded file was too large. Please try to upload a smaller file. - A feltöltött fájl túl nagy. Kérem, próbáljon egy kisebb fájlt feltölteni. - - - The CSRF token is invalid. Please try to resubmit the form. - Érvénytelen CSRF token. Kérem, próbálja újra elküldeni az űrlapot. - - - This value is not a valid HTML5 color. - Ez az érték nem egy érvényes HTML5 szín. - - - Please enter a valid birthdate. - Kérjük, adjon meg egy valós születési dátumot. - - - The selected choice is invalid. - A kiválasztott opció érvénytelen. - - - The collection is invalid. - A gyűjtemény érvénytelen. - - - Please select a valid color. - Kérjük, válasszon egy érvényes színt. - - - Please select a valid country. - Kérjük, válasszon egy érvényes országot. - - - Please select a valid currency. - Kérjük, válasszon egy érvényes pénznemet. - - - Please choose a valid date interval. - Kérjük, válasszon egy érvényes dátumintervallumot. - - - Please enter a valid date and time. - Kérjük, adjon meg egy érvényes dátumot és időpontot. - - - Please enter a valid date. - Kérjük, adjon meg egy érvényes dátumot. - - - Please select a valid file. - Kérjük, válasszon egy érvényes fájlt. - - - The hidden field is invalid. - A rejtett mező érvénytelen. - - - Please enter an integer. - Kérjük, adjon meg egy egész számot. - - - Please select a valid language. - Kérjük, válasszon egy érvényes nyelvet. - - - Please select a valid locale. - Kérjük, válasszon egy érvényes területi beállítást. - - - Please enter a valid money amount. - Kérjük, adjon meg egy érvényes pénzösszeget. - - - Please enter a number. - Kérjük, adjon meg egy számot. - - - The password is invalid. - A jelszó érvénytelen. - - - Please enter a percentage value. - Kérjük, adjon meg egy százalékos értéket. - - - The values do not match. - Az értékek nem egyeznek. - - - Please enter a valid time. - Kérjük, adjon meg egy érvényes időpontot. - - - Please select a valid timezone. - Kérjük, válasszon érvényes időzónát. - - - Please enter a valid URL. - Kérjük, adjon meg egy érvényes URL-t. - - - Please enter a valid search term. - Kérjük, adjon meg egy érvényes keresési kifejezést. - - - Please provide a valid phone number. - Kérjük, adjon egy érvényes telefonszámot - - - The checkbox has an invalid value. - A jelölőnégyzet értéke érvénytelen. - - - Please enter a valid email address. - Kérjük valós e-mail címet adjon meg. - - - Please select a valid option. - Kérjük, válasszon egy érvényes beállítást. - - - Please select a valid range. - Kérjük, válasszon egy érvényes tartományt. - - - Please enter a valid week. - Kérjük, adjon meg egy érvényes hetet. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.hy.xlf b/vendor/symfony/form/Resources/translations/validators.hy.xlf deleted file mode 100644 index 10ac326..0000000 --- a/vendor/symfony/form/Resources/translations/validators.hy.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Այս ձևը չպետք է պարունակի լրացուցիչ տողեր։ - - - The uploaded file was too large. Please try to upload a smaller file. - Վերբեռնված ֆայլը չափազանց մեծ է. Խնդրվում է վերբեռնել ավելի փոքր չափսի ֆայլ։ - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF արժեքը անթույլատրելի է. Փորձեք նորից ուղարկել ձևը։ - - - This value is not a valid HTML5 color. - Այս արժեքը վավեր HTML5 գույն չէ։ - - - Please enter a valid birthdate. - Խնդրում ենք մուտքագրել վավեր ծննդյան ամսաթիվ։ - - - The selected choice is invalid. - Ընտրված ընտրությունն անվավեր է։ - - - The collection is invalid. - Համախումբն անվավեր է։ - - - Please select a valid color. - Խնդրում ենք ընտրել վավեր գույն։ - - - Please select a valid country. - Խնդրում ենք ընտրել վավեր երկիր։ - - - Please select a valid currency. - Խնդրում ենք ընտրել վավեր արժույթ։ - - - Please choose a valid date interval. - Խնդրում ենք ընտրել ճիշտ ամսաթվերի միջակայք։ - - - Please enter a valid date and time. - Խնդրում ենք մուտքագրել վավեր ամսաթիվ և ժամ։ - - - Please enter a valid date. - Խնդրում ենք մուտքագրել վավեր ամսաթիվ։ - - - Please select a valid file. - Խնդրում ենք ընտրել վավեր ֆայլ։ - - - The hidden field is invalid. - Թաքնված դաշտը անվավեր է։ - - - Please enter an integer. - Խնդրում ենք մուտքագրել ամբողջ թիվ։ - - - Please select a valid language. - Խնդրում ենք ընտրել վավեր լեզու։ - - - Please select a valid locale. - Խնդրում ենք ընտրել վավեր տեղայնացում։ - - - Please enter a valid money amount. - Խնդրում ենք մուտքագրել վավեր գումար։ - - - Please enter a number. - Խնդրում ենք մուտքագրել համար։ - - - The password is invalid. - Գաղտնաբառն անվավեր է։ - - - Please enter a percentage value. - Խնդրում ենք մուտքագրել տոկոսային արժեք։ - - - The values do not match. - Արժեքները չեն համընկնում։ - - - Please enter a valid time. - Մուտքագրեք վավեր ժամանակ։ - - - Please select a valid timezone. - Խնդրում ենք ընտրել վավեր ժամային գոտի։ - - - Please enter a valid URL. - Խնդրում ենք մուտքագրել վավեր URL։ - - - Please enter a valid search term. - Խնդրում ենք մուտքագրել վավեր որոնման տերմին։ - - - Please provide a valid phone number. - Խնդրում ենք տրամադրել վավեր հեռախոսահամար։ - - - The checkbox has an invalid value. - Նշման վանդակը անվավեր արժեք ունի։ - - - Please enter a valid email address. - Խնդրում ենք մուտքագրել վավեր էլ-հասցե։ - - - Please select a valid option. - Խնդրում ենք ընտրել ճիշտ տարբերակ։ - - - Please select a valid range. - Խնդրում ենք ընտրել վավեր տիրույթ։ - - - Please enter a valid week. - Մուտքագրեք վավեր շաբաթ։ - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.id.xlf b/vendor/symfony/form/Resources/translations/validators.id.xlf deleted file mode 100644 index 535f9e6..0000000 --- a/vendor/symfony/form/Resources/translations/validators.id.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Gabungan kolom tidak boleh mengandung kolom tambahan. - - - The uploaded file was too large. Please try to upload a smaller file. - Berkas yang di unggah terlalu besar. Silahkan coba unggah berkas yang lebih kecil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-Token tidak sah. Silahkan coba kirim ulang formulir. - - - This value is not a valid HTML5 color. - Nilai ini bukan merupakan HTML5 color yang sah. - - - Please enter a valid birthdate. - Silahkan masukkan tanggal lahir yang sah. - - - The selected choice is invalid. - Pilihan yang dipilih tidak sah. - - - The collection is invalid. - Koleksi tidak sah. - - - Please select a valid color. - Silahkan pilih warna yang sah. - - - Please select a valid country. - Silahkan pilih negara yang sah. - - - Please select a valid currency. - Silahkan pilih mata uang yang sah. - - - Please choose a valid date interval. - Silahkan pilih interval tanggal yang sah. - - - Please enter a valid date and time. - Silahkan masukkan tanggal dan waktu yang sah. - - - Please enter a valid date. - Silahkan masukkan tanggal yang sah. - - - Please select a valid file. - Silahkan pilih berkas yang sah. - - - The hidden field is invalid. - Ruas yang tersembunyi tidak sah. - - - Please enter an integer. - Silahkan masukkan angka. - - - Please select a valid language. - Silahlan pilih bahasa yang sah. - - - Please select a valid locale. - Silahkan pilih local yang sah. - - - Please enter a valid money amount. - Silahkan masukkan nilai uang yang sah. - - - Please enter a number. - Silahkan masukkan sebuah angka - - - The password is invalid. - Kata sandi tidak sah. - - - Please enter a percentage value. - Silahkan masukkan sebuah nilai persentase. - - - The values do not match. - Nilainya tidak cocok. - - - Please enter a valid time. - Silahkan masukkan waktu yang sah. - - - Please select a valid timezone. - Silahkan pilih zona waktu yang sah. - - - Please enter a valid URL. - Silahkan masukkan URL yang sah. - - - Please enter a valid search term. - Silahkan masukkan kata pencarian yang sah. - - - Please provide a valid phone number. - Silahkan sediakan nomor telepon yang sah. - - - The checkbox has an invalid value. - Nilai dari checkbox tidak sah. - - - Please enter a valid email address. - Silahkan masukkan alamat surel yang sah. - - - Please select a valid option. - Silahkan pilih opsi yang sah. - - - Please select a valid range. - Silahkan pilih rentang yang sah. - - - Please enter a valid week. - Silahkan masukkan minggu yang sah. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.it.xlf b/vendor/symfony/form/Resources/translations/validators.it.xlf deleted file mode 100644 index 8e4665c..0000000 --- a/vendor/symfony/form/Resources/translations/validators.it.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Questo form non dovrebbe contenere nessun campo extra. - - - The uploaded file was too large. Please try to upload a smaller file. - Il file caricato è troppo grande. Per favore, carica un file più piccolo. - - - The CSRF token is invalid. Please try to resubmit the form. - Il token CSRF non è valido. Prova a reinviare il form. - - - This value is not a valid HTML5 color. - Il valore non è un colore HTML5 valido. - - - Please enter a valid birthdate. - Per favore, inserisci una data di compleanno valida. - - - The selected choice is invalid. - La scelta selezionata non è valida. - - - The collection is invalid. - La collezione non è valida. - - - Please select a valid color. - Per favore, seleziona un colore valido. - - - Please select a valid country. - Per favore, seleziona un paese valido. - - - Please select a valid currency. - Per favore, seleziona una valuta valida. - - - Please choose a valid date interval. - Per favore, scegli a valid date interval. - - - Please enter a valid date and time. - Per favore, inserisci a valid date and time. - - - Please enter a valid date. - Per favore, inserisci a valid date. - - - Please select a valid file. - Per favore, seleziona un file valido. - - - The hidden field is invalid. - Il campo nascosto non è valido. - - - Please enter an integer. - Per favore, inserisci un numero intero. - - - Please select a valid language. - Per favore, seleziona una lingua valida. - - - Please select a valid locale. - Per favore, seleziona una lingua valida. - - - Please enter a valid money amount. - Per favore, inserisci un importo valido. - - - Please enter a number. - Per favore, inserisci un numero. - - - The password is invalid. - La password non è valida. - - - Please enter a percentage value. - Per favore, inserisci un valore percentuale. - - - The values do not match. - I valori non corrispondono. - - - Please enter a valid time. - Per favore, inserisci un orario valido. - - - Please select a valid timezone. - Per favore, seleziona un fuso orario valido. - - - Please enter a valid URL. - Per favore, inserisci un URL valido. - - - Please enter a valid search term. - Per favore, inserisci un termine di ricerca valido. - - - Please provide a valid phone number. - Per favore, indica un numero di telefono valido. - - - The checkbox has an invalid value. - La casella di selezione non ha un valore valido. - - - Please enter a valid email address. - Per favore, indica un indirizzo email valido. - - - Please select a valid option. - Per favore, seleziona un'opzione valida. - - - Please select a valid range. - Per favore, seleziona un intervallo valido. - - - Please enter a valid week. - Per favore, inserisci una settimana valida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.ja.xlf b/vendor/symfony/form/Resources/translations/validators.ja.xlf deleted file mode 100644 index ea2226c..0000000 --- a/vendor/symfony/form/Resources/translations/validators.ja.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - フィールドグループに追加のフィールドを含んではなりません。 - - - The uploaded file was too large. Please try to upload a smaller file. - アップロードされたファイルが大きすぎます。小さなファイルで再度アップロードしてください。 - - - The CSRF token is invalid. Please try to resubmit the form. - CSRFトークンが無効です、再送信してください。 - - - This value is not a valid HTML5 color. - 有効なHTML5の色ではありません。 - - - Please enter a valid birthdate. - 有効な生年月日を入力してください。 - - - The selected choice is invalid. - 選択した値は無効です。 - - - The collection is invalid. - コレクションは無効です。 - - - Please select a valid color. - 有効な色を選択してください。 - - - Please select a valid country. - 有効な国を選択してください。 - - - Please select a valid currency. - 有効な通貨を選択してください。 - - - Please choose a valid date interval. - 有効な日付間隔を選択してください。 - - - Please enter a valid date and time. - 有効な日時を入力してください。 - - - Please enter a valid date. - 有効な日付を入力してください。 - - - Please select a valid file. - 有効なファイルを選択してください。 - - - The hidden field is invalid. - 隠しフィールドが無効です。 - - - Please enter an integer. - 整数で入力してください。 - - - Please select a valid language. - 有効な言語を選択してください。 - - - Please select a valid locale. - 有効なロケールを選択してください。 - - - Please enter a valid money amount. - 有効な金額を入力してください。 - - - Please enter a number. - 数値で入力してください。 - - - The password is invalid. - パスワードが無効です。 - - - Please enter a percentage value. - パーセント値で入力してください。 - - - The values do not match. - 値が一致しません。 - - - Please enter a valid time. - 有効な時間を入力してください。 - - - Please select a valid timezone. - 有効なタイムゾーンを選択してください。 - - - Please enter a valid URL. - 有効なURLを入力してください。 - - - Please enter a valid search term. - 有効な検索語を入力してください。 - - - Please provide a valid phone number. - 有効な電話番号を入力してください。 - - - The checkbox has an invalid value. - チェックボックスの値が無効です。 - - - Please enter a valid email address. - 有効なメールアドレスを入力してください。 - - - Please select a valid option. - 有効な値を選択してください。 - - - Please select a valid range. - 有効な範囲を選択してください。 - - - Please enter a valid week. - 有効な週を入力してください。 - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.lb.xlf b/vendor/symfony/form/Resources/translations/validators.lb.xlf deleted file mode 100644 index e989264..0000000 --- a/vendor/symfony/form/Resources/translations/validators.lb.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dës Feldergrupp sollt keng zousätzlech Felder enthalen. - - - The uploaded file was too large. Please try to upload a smaller file. - De geschécktene Fichier ass ze grouss. Versicht wann ech gelift ee méi klenge Fichier eropzelueden. - - - The CSRF token is invalid. Please try to resubmit the form. - Den CSRF-Token ass ongëlteg. Versicht wann ech gelift de Formulaire nach eng Kéier ze schécken. - - - This value is not a valid HTML5 color. - Dëse Wäert ass keng gëlteg HTML5-Faarf. - - - Please enter a valid birthdate. - W.e.g. e gëltege Gebuertsdatum aginn. - - - The selected choice is invalid. - Den ausgewielte Choix ass ongëlteg. - - - The collection is invalid. - D'Kollektioun ass ongëlteg. - - - Please select a valid color. - W.e.g. eng gëlteg Faarf auswielen. - - - Please select a valid country. - W.e.g. e gëltegt Land auswielen. - - - Please select a valid currency. - W.e.g. eng gëlteg Wärung auswielen. - - - Please choose a valid date interval. - W.e.g. e gëltegen Datumsinterval aginn. - - - Please enter a valid date and time. - W.e.g. eng gëlteg Datum an Zäit aginn. - - - Please enter a valid date. - W.e.g. eng gëltegen Datum aginn. - - - Please select a valid file. - W.e.g. e gëltege Fichier auswielen. - - - The hidden field is invalid. - Dat verstoppte Feld ass ongëlteg. - - - Please enter an integer. - W.e.g. eng ganz Zuel aginn. - - - Please select a valid language. - W.e.g. e gëltegt Sprooch auswielen. - - - Please select a valid locale. - W.e.g. e gëltegt Regionalschema auswielen. - - - Please enter a valid money amount. - W.e.g. eng gëlteg Geldzomm aginn. - - - Please enter a number. - W.e.g. eng Zuel aginn. - - - The password is invalid. - D'Passwuert ass ongëlteg. - - - Please enter a percentage value. - W.e.g. e Prozentwäert aginn. - - - The values do not match. - D'Wäerter stëmmen net iwwereneen. - - - Please enter a valid time. - W.e.g. eng gëlteg Zäit aginn. - - - Please select a valid timezone. - W.e.g. eng gëlteg Zäitzon auswielen. - - - Please enter a valid URL. - W.e.g. eng gëlteg URL aginn. - - - Please enter a valid search term. - W.e.g. e gëltege Sichbegrëff aginn. - - - Please provide a valid phone number. - W.e.g. eng gëlteg Telefonsnummer uginn. - - - The checkbox has an invalid value. - D'Ukräizfeld huet en ongëltege Wäert. - - - Please enter a valid email address. - W.e.g. eng gëlteg E-Mail-Adress aginn. - - - Please select a valid option. - W.e.g. eng gëlteg Optioun auswielen. - - - Please select a valid range. - W.e.g. eng gëlteg Spannbreet auswielen. - - - Please enter a valid week. - W.e.g. eng gëlteg Woch aginn. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.lt.xlf b/vendor/symfony/form/Resources/translations/validators.lt.xlf deleted file mode 100644 index 5613c42..0000000 --- a/vendor/symfony/form/Resources/translations/validators.lt.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Forma negali turėti papildomų laukų. - - - The uploaded file was too large. Please try to upload a smaller file. - Įkelta byla yra per didelė. bandykite įkelti mažesnę. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF kodas nepriimtinas. Bandykite siųsti formos užklausą dar kartą. - - - This value is not a valid HTML5 color. - Ši reikšmė nėra HTML5 spalva. - - - Please enter a valid birthdate. - Prašome įvesti tinkamą gimimo datą. - - - The selected choice is invalid. - Pasirinktas pasirinkimas yra neteisingas. - - - The collection is invalid. - Neteisingas sąrašas. - - - Please select a valid color. - Prašome pasirinkti tinkamą spalvą. - - - Please select a valid country. - Prašome pasirinkti tinkamą šalį. - - - Please select a valid currency. - Prašome pasirinkti tinkamą valiutą. - - - Please choose a valid date interval. - Prašome pasirinkti tinkamą datos intervalą. - - - Please enter a valid date and time. - Prašome įvesti tinkamą datą ir laiką. - - - Please enter a valid date. - Prašome įvesti tinkamą datą. - - - Please select a valid file. - Prašome pasirinkti tinkamą bylą. - - - The hidden field is invalid. - Klaidingas paslėptasis laukas. - - - Please enter an integer. - Prašome įvesti sveiką skaičių. - - - Please select a valid language. - Prašome pasirinkti tinkamą kalbą. - - - Please select a valid locale. - Prašome pasirinkti tinkamą lokalę. - - - Please enter a valid money amount. - Prašome įvesti tinkamą pinigų sumą. - - - Please enter a number. - Prašome įvesti numerį. - - - The password is invalid. - Klaidingas slaptažodis. - - - Please enter a percentage value. - Prašome įvesti procentinę reikšmę. - - - The values do not match. - Reikšmės nesutampa. - - - Please enter a valid time. - Prašome įvesti tinkamą laiką. - - - Please select a valid timezone. - Prašome pasirinkti tinkamą laiko zoną. - - - Please enter a valid URL. - Prašome įvesti tinkamą URL. - - - Please enter a valid search term. - Prašome įvesti tinkamą paieškos terminą. - - - Please provide a valid phone number. - Prašome pateikti tinkamą telefono numerį. - - - The checkbox has an invalid value. - Klaidinga žymimajo langelio reikšmė. - - - Please enter a valid email address. - Prašome įvesti tinkamą el. pašto adresą. - - - Please select a valid option. - Prašome pasirinkti tinkamą parinktį. - - - Please select a valid range. - Prašome pasirinkti tinkamą diapozoną. - - - Please enter a valid week. - Prašome įvesti tinkamą savaitę. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.lv.xlf b/vendor/symfony/form/Resources/translations/validators.lv.xlf deleted file mode 100644 index e7c90c7..0000000 --- a/vendor/symfony/form/Resources/translations/validators.lv.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Šajā veidlapā nevajadzētu būt papildus ievades laukiem. - - - The uploaded file was too large. Please try to upload a smaller file. - Augšupielādētā faila izmērs bija par lielu. Lūdzu mēģiniet augšupielādēt mazāka izmēra failu. - - - The CSRF token is invalid. Please try to resubmit the form. - Dotais CSRF talons nav derīgs. Lūdzu mēģiniet vēlreiz iesniegt veidlapu. - - - This value is not a valid HTML5 color. - Šī vertība nav derīga HTML5 krāsa. - - - Please enter a valid birthdate. - Lūdzu, ievadiet derīgu dzimšanas datumu. - - - The selected choice is invalid. - Iezīmētā izvēle nav derīga. - - - The collection is invalid. - Kolekcija nav derīga. - - - Please select a valid color. - Lūdzu, izvēlieties derīgu krāsu. - - - Please select a valid country. - Lūdzu, izvēlieties derīgu valsti. - - - Please select a valid currency. - Lūdzu, izvēlieties derīgu valūtu. - - - Please choose a valid date interval. - Lūdzu, izvēlieties derīgu datumu intervālu. - - - Please enter a valid date and time. - Lūdzu, ievadiet derīgu datumu un laiku. - - - Please enter a valid date. - Lūdzu, ievadiet derīgu datumu. - - - Please select a valid file. - Lūdzu, izvēlieties derīgu failu. - - - The hidden field is invalid. - Slēptā lauka vērtība ir nederīga. - - - Please enter an integer. - Lūdzu, ievadiet veselu skaitli. - - - Please select a valid language. - Lūdzu, izvēlieties derīgu valodu. - - - Please select a valid locale. - Lūdzu, izvēlieties derīgu lokalizāciju. - - - Please enter a valid money amount. - Lūdzu, ievadiet derīgu naudas lielumu. - - - Please enter a number. - Lūdzu, ievadiet skaitli. - - - The password is invalid. - Parole ir nederīga. - - - Please enter a percentage value. - Lūdzu, ievadiet procentuālo lielumu. - - - The values do not match. - Vērtības nesakrīt. - - - Please enter a valid time. - Lūdzu, ievadiet derīgu laiku. - - - Please select a valid timezone. - Lūdzu, izvēlieties derīgu laika zonu. - - - Please enter a valid URL. - Lūdzu, ievadiet derīgu URL. - - - Please enter a valid search term. - Lūdzu, ievadiet derīgu meklēšanas nosacījumu. - - - Please provide a valid phone number. - Lūdzu, ievadiet derīgu tālruņa numuru. - - - The checkbox has an invalid value. - Izvēles rūtiņai ir nederīga vērtība. - - - Please enter a valid email address. - Lūdzu, ievadiet derīgu e-pasta adresi. - - - Please select a valid option. - Lūdzu, izvēlieties derīgu opciju. - - - Please select a valid range. - Lūdzu, izvēlieties derīgu diapazonu. - - - Please enter a valid week. - Lūdzu, ievadiet derīgu nedeļu. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.mn.xlf b/vendor/symfony/form/Resources/translations/validators.mn.xlf deleted file mode 100644 index 620112d..0000000 --- a/vendor/symfony/form/Resources/translations/validators.mn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Форм нэмэлт талбар багтаах боломжгүй. - - - The uploaded file was too large. Please try to upload a smaller file. - Upload хийсэн файл хэтэрхий том байна. Бага хэмжээтэй файл оруулна уу. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token буруу байна. Формоо дахин илгээнэ үү. - - - This value is not a valid HTML5 color. - Энэ утга зөв HTML5 өнгө биш байна. - - - Please enter a valid birthdate. - Зөв төрсөн он сар оруулна уу. - - - The selected choice is invalid. - Сонгосон утга буруу байна. - - - The collection is invalid. - Цуглуулга буруу байна. - - - Please select a valid color. - Үнэн зөв өнгө сонгоно уу. - - - Please select a valid country. - Үнэн зөв улс сонгоно уу. - - - Please select a valid currency. - Үнэн зөв мөнгөн тэмдэгт сонгоно уу. - - - Please choose a valid date interval. - Үнэн зөв цагын зай сонгоно уу. - - - Please enter a valid date and time. - Үнэн зөв он цаг оруулна уу. - - - Please enter a valid date. - Үнэн зөв он цаг өдөр оруулна уу. - - - Please select a valid file. - Үнэн зөв файл сонгоно уу. - - - The hidden field is invalid. - Нууц талбарын утга буруу байна. - - - Please enter an integer. - Бүхэл тоо оруулна уу. - - - Please select a valid language. - Үнэн зөв хэл сонгоно уу. - - - Please select a valid locale. - Үнэн зөв бүс сонгоно уу. - - - Please enter a valid money amount. - Үнэн зөв мөнгөний хэмжээ сонгоно уу. - - - Please enter a number. - Тоо оруулна уу. - - - The password is invalid. - Нууц үг буруу байна. - - - Please enter a percentage value. - Хувь утга оруулна уу. - - - The values do not match. - Утга хоорондоо таарахгүй байна. - - - Please enter a valid time. - Үнэн зөв цаг оруулна уу. - - - Please select a valid timezone. - Үнэн зөв цагын бүс оруулна уу. - - - Please enter a valid URL. - Үнэн зөв URL оруулна уу. - - - Please enter a valid search term. - Үнэн зөв хайх утга оруулна уу. - - - Please provide a valid phone number. - Үнэн зөв утасны дугаар оруулна уу. - - - The checkbox has an invalid value. - Сонгох хайрцаг буруу утгатай байна. - - - Please enter a valid email address. - Үнэн зөв и-мэйл хаяг оруулна уу. - - - Please select a valid option. - Үнэн зөв сонголт сонгоно уу. - - - Please select a valid range. - Үнэн зөв хязгаарын утга сонгоно уу. - - - Please enter a valid week. - Үнэн зөв долоо хоног сонгоно уу. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.my.xlf b/vendor/symfony/form/Resources/translations/validators.my.xlf deleted file mode 100644 index b0180c5..0000000 --- a/vendor/symfony/form/Resources/translations/validators.my.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - ဤ ဖောင်သည် field အပိုများ မပါ၀င်သင့်ပါ။ - - - The uploaded file was too large. Please try to upload a smaller file. - Upload တင်သောဖိုင်သည်အလွန်ကြီးလွန်းသည်။ ကျေးဇူးပြု၍ သေးငယ်သည့်ဖိုင်ကိုတင်ရန်ကြိုးစားပါ။ - - - The CSRF token is invalid. Please try to resubmit the form. - သင့်လျှော်သော် CSRF တိုကင် မဟုတ်ပါ။ ကျေးဇူးပြု၍ဖောင်ကိုပြန်တင်ပါ။ - - - This value is not a valid HTML5 color. - ဤတန်ဖိုးသည် သင့်လျှော်သော် HTML5 အရောင်မဟုတ်ပါ။ - - - Please enter a valid birthdate. - ကျေးဇူးပြု၍ မှန်ကန်သောမွေးနေ့ကိုထည့်ပါ။ - - - The selected choice is invalid. - သင့် ရွေးချယ်မှုသည်မမှန်ကန်ပါ။ - - - The collection is invalid. - ဤ collection သည်သင့်လျှော်သော် collection မဟုတ်ပါ။ - - - Please select a valid color. - ကျေးဇူးပြု၍ မှန်ကန်သောအရောင်ကိုရွေးပါ။ - - - Please select a valid country. - ကျေးဇူးပြု၍ မှန်ကန်သောနိုင်ငံကိုရွေးပါ။ - - - Please select a valid currency. - ကျေးဇူးပြု၍ မှန်ကန်သောငွေကြေးကိုရွေးပါ။ - - - Please choose a valid date interval. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲကိုရွေးပါ။ - - - Please enter a valid date and time. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲနှင့်အချိန် ကိုထည့်ပါ။ - - - Please enter a valid date. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ရက်စွဲကိုထည့်ပါ။ - - - Please select a valid file. - ကျေးဇူးပြု၍ မှန်ကန်သောနေ ဖိုင်ကိုရွေးချယ်ပါ။ - - - The hidden field is invalid. - မသင့် လျှော်သော် hidden field ဖြစ်နေသည်။ - - - Please enter an integer. - ကျေးဇူးပြု၍ Integer တန်ဖိုးသာထည့်ပါ။ - - - Please select a valid language. - ကျေးဇူးပြု၍ မှန်ကန်သော ဘာသာစကားကိုရွေးချယ်ပါ။ - - - Please select a valid locale. - ကျေးဇူးပြု၍ မှန်ကန်သော locale ကိုရွေးချယ်ပါ။ - - - Please enter a valid money amount. - ကျေးဇူးပြု၍ မှန်ကန်သော ပိုက်ဆံပမာဏ ကိုထည့်ပါ။ - - - Please enter a number. - ကျေးဇူးပြု၍ မှန်ကန်သော နံပါတ် ကိုရွေးချယ်ပါ။ - - - The password is invalid. - မှန်ကန်သောစကား၀ှက်မဟုတ်ပါ။ - - - Please enter a percentage value. - ကျေးဇူးပြု၍ ရာခိုင်နှုန်းတန်ဖိုးထည့်ပါ။ - - - The values do not match. - တန်ဖိုးများကိုက်ညီမှုမရှိပါ။ - - - Please enter a valid time. - ကျေးဇူးပြု၍ မှန်ကန်သောအချိန်ကိုထည့်ပါ။ - - - Please select a valid timezone. - ကျေးဇူးပြု၍ မှန်ကန်သောအချိန်ဇုန်ကိုရွေးပါ။ - - - Please enter a valid URL. - ကျေးဇူးပြု၍ သင့်လျှော်သော် URL ကိုရွေးပါ။ - - - Please enter a valid search term. - ကျေးဇူးပြု၍ သင့် လျှော်သော်ရှာဖွေမှု term များထည့်ပါ။ - - - Please provide a valid phone number. - ကျေးဇူးပြု၍ သင့် လျှော်သော်ရှာဖွေမှု ဖုန်းနံပါတ်ထည့်ပါ။ - - - The checkbox has an invalid value. - Checkbox တန်ဖိုးသည် မှန်ကန်မှုမရှိပါ။ - - - Please enter a valid email address. - ကျေးဇူးပြု၍ မှန်ကန်သော် email လိပ်စာထည့်ပါ။ - - - Please select a valid option. - ကျေးဇူးပြု၍ မှန်ကန်သော် ရွေးချယ်မှု ကိုရွေးပါ။ - - - Please select a valid range. - ကျေးဇူးပြု၍ မှန်ကန်သော အပိုင်းအခြား ကိုရွေးပါ။ - - - Please enter a valid week. - ကျေးဇူးပြု၍ မှန်ကန်သောရက်သတ္တပတ်ကိုထည့်ပါ။ - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.nb.xlf b/vendor/symfony/form/Resources/translations/validators.nb.xlf deleted file mode 100644 index 1d83850..0000000 --- a/vendor/symfony/form/Resources/translations/validators.nb.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke inneholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den opplastede filen var for stor. Vennligst last opp en mindre fil. - - - The CSRF token is invalid. - CSRF nøkkelen er ugyldig. - - - This value is not a valid HTML5 color. - Denne verdien er ikke en gyldig HTML5-farge. - - - Please enter a valid birthdate. - Vennligst oppgi gyldig fødselsdato. - - - The selected choice is invalid. - Det valgte valget er ugyldig. - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Velg en gyldig farge. - - - Please select a valid country. - Vennligst velg et gyldig land. - - - Please select a valid currency. - Vennligst velg en gyldig valuta. - - - Please choose a valid date interval. - Vennligst velg et gyldig datointervall. - - - Please enter a valid date and time. - Vennligst angi en gyldig dato og tid. - - - Please enter a valid date. - Vennligst oppgi en gyldig dato. - - - Please select a valid file. - Vennligst velg en gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ugyldig. - - - Please enter an integer. - Vennligst skriv inn et heltall. - - - Please select a valid language. - Vennligst velg et gyldig språk. - - - Please select a valid locale. - Vennligst velg et gyldig sted. - - - Please enter a valid money amount. - Vennligst angi et gyldig pengebeløp. - - - Please enter a number. - Vennligst skriv inn et nummer. - - - The password is invalid. - Passordet er ugyldig. - - - Please enter a percentage value. - Vennligst angi en prosentverdi. - - - The values do not match. - Verdiene stemmer ikke overens. - - - Please enter a valid time. - Vennligst angi et gyldig tidspunkt. - - - Please select a valid timezone. - Vennligst velg en gyldig tidssone. - - - Please enter a valid URL. - Vennligst skriv inn en gyldig URL. - - - Please enter a valid search term. - Vennligst angi et gyldig søketerm. - - - Please provide a valid phone number. - Vennligst oppgi et gyldig telefonnummer. - - - The checkbox has an invalid value. - Avkrysningsboksen har en ugyldig verdi. - - - Please enter a valid email address. - Vennligst skriv inn en gyldig e-post adresse. - - - Please select a valid option. - Vennligst velg et gyldig alternativ. - - - Please select a valid range. - Vennligst velg et gyldig område. - - - Please enter a valid week. - Vennligst skriv inn en gyldig uke. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.nl.xlf b/vendor/symfony/form/Resources/translations/validators.nl.xlf deleted file mode 100644 index 7aa56eb..0000000 --- a/vendor/symfony/form/Resources/translations/validators.nl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Dit formulier mag geen extra velden bevatten. - - - The uploaded file was too large. Please try to upload a smaller file. - Het geüploade bestand is te groot. Probeer een kleiner bestand te uploaden. - - - The CSRF token is invalid. Please try to resubmit the form. - De CSRF-token is ongeldig. Probeer het formulier opnieuw te versturen. - - - This value is not a valid HTML5 color. - Dit is geen geldige HTML5 kleur. - - - Please enter a valid birthdate. - Vul een geldige geboortedatum in. - - - The selected choice is invalid. - Deze keuze is ongeldig. - - - The collection is invalid. - Deze collectie is ongeldig. - - - Please select a valid color. - Kies een geldige kleur. - - - Please select a valid country. - Kies een geldige landnaam. - - - Please select a valid currency. - Kies een geldige valuta. - - - Please choose a valid date interval. - Kies een geldig tijdinterval. - - - Please enter a valid date and time. - Vul een geldige datum en tijd in. - - - Please enter a valid date. - Vul een geldige datum in. - - - Please select a valid file. - Kies een geldig bestand. - - - The hidden field is invalid. - Het verborgen veld is incorrect. - - - Please enter an integer. - Vul een geldig getal in. - - - Please select a valid language. - Kies een geldige taal. - - - Please select a valid locale. - Kies een geldige locale. - - - Please enter a valid money amount. - Vul een geldig bedrag in. - - - Please enter a number. - Vul een geldig getal in. - - - The password is invalid. - Het wachtwoord is incorrect. - - - Please enter a percentage value. - Vul een geldig percentage in. - - - The values do not match. - De waardes komen niet overeen. - - - Please enter a valid time. - Vul een geldige tijd in. - - - Please select a valid timezone. - Vul een geldige tijdzone in. - - - Please enter a valid URL. - Vul een geldige URL in. - - - Please enter a valid search term. - Vul een geldige zoekterm in. - - - Please provide a valid phone number. - Vul een geldig telefoonnummer in. - - - The checkbox has an invalid value. - De checkbox heeft een incorrecte waarde. - - - Please enter a valid email address. - Vul een geldig e-mailadres in. - - - Please select a valid option. - Kies een geldige optie. - - - Please select a valid range. - Kies een geldig bereik. - - - Please enter a valid week. - Vul een geldige week in. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.nn.xlf b/vendor/symfony/form/Resources/translations/validators.nn.xlf deleted file mode 100644 index 9fac1bf..0000000 --- a/vendor/symfony/form/Resources/translations/validators.nn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppa kan ikkje innehalde ekstra felt. - - - The uploaded file was too large. Please try to upload a smaller file. - Fila du lasta opp var for stor. Last opp ei mindre fil. - - - The CSRF token is invalid. - CSRF-nøkkelen er ikkje gyldig. - - - This value is not a valid HTML5 color. - Verdien er ikkje ein gyldig HTML5-farge. - - - Please enter a valid birthdate. - Gje opp ein gyldig fødselsdato. - - - The selected choice is invalid. - Valget du gjorde er ikkje gyldig. - - - The collection is invalid. - Samlinga er ikkje gyldig. - - - Please select a valid color. - Gje opp ein gyldig farge. - - - Please select a valid country. - Gje opp eit gyldig land. - - - Please select a valid currency. - Gje opp ein gyldig valuta. - - - Please choose a valid date interval. - Gje opp eit gyldig datointervall. - - - Please enter a valid date and time. - Gje opp ein gyldig dato og tid. - - - Please enter a valid date. - Gje opp ein gyldig dato. - - - Please select a valid file. - Velg ei gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ikkje gyldig. - - - Please enter an integer. - Gje opp eit heiltal. - - - Please select a valid language. - Gje opp eit gyldig språk. - - - Please select a valid locale. - Gje opp eit gyldig locale. - - - Please enter a valid money amount. - Gje opp ein gyldig sum pengar. - - - Please enter a number. - Gje opp eit nummer. - - - The password is invalid. - Passordet er ikkje gyldig. - - - Please enter a percentage value. - Gje opp ein prosentverdi. - - - The values do not match. - Verdiane er ikkje eins. - - - Please enter a valid time. - Gje opp ei gyldig tid. - - - Please select a valid timezone. - Gje opp ei gyldig tidssone. - - - Please enter a valid URL. - Gje opp ein gyldig URL. - - - Please enter a valid search term. - Gje opp gyldige søkjeord. - - - Please provide a valid phone number. - Gje opp eit gyldig telefonnummer. - - - The checkbox has an invalid value. - Sjekkboksen har ein ugyldig verdi. - - - Please enter a valid email address. - Gje opp ei gyldig e-postadresse. - - - Please select a valid option. - Velg eit gyldig vilkår. - - - Please select a valid range. - Velg eit gyldig spenn. - - - Please enter a valid week. - Gje opp ei gyldig veke. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.no.xlf b/vendor/symfony/form/Resources/translations/validators.no.xlf deleted file mode 100644 index 1d83850..0000000 --- a/vendor/symfony/form/Resources/translations/validators.no.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Feltgruppen må ikke inneholde ekstra felter. - - - The uploaded file was too large. Please try to upload a smaller file. - Den opplastede filen var for stor. Vennligst last opp en mindre fil. - - - The CSRF token is invalid. - CSRF nøkkelen er ugyldig. - - - This value is not a valid HTML5 color. - Denne verdien er ikke en gyldig HTML5-farge. - - - Please enter a valid birthdate. - Vennligst oppgi gyldig fødselsdato. - - - The selected choice is invalid. - Det valgte valget er ugyldig. - - - The collection is invalid. - Samlingen er ugyldig. - - - Please select a valid color. - Velg en gyldig farge. - - - Please select a valid country. - Vennligst velg et gyldig land. - - - Please select a valid currency. - Vennligst velg en gyldig valuta. - - - Please choose a valid date interval. - Vennligst velg et gyldig datointervall. - - - Please enter a valid date and time. - Vennligst angi en gyldig dato og tid. - - - Please enter a valid date. - Vennligst oppgi en gyldig dato. - - - Please select a valid file. - Vennligst velg en gyldig fil. - - - The hidden field is invalid. - Det skjulte feltet er ugyldig. - - - Please enter an integer. - Vennligst skriv inn et heltall. - - - Please select a valid language. - Vennligst velg et gyldig språk. - - - Please select a valid locale. - Vennligst velg et gyldig sted. - - - Please enter a valid money amount. - Vennligst angi et gyldig pengebeløp. - - - Please enter a number. - Vennligst skriv inn et nummer. - - - The password is invalid. - Passordet er ugyldig. - - - Please enter a percentage value. - Vennligst angi en prosentverdi. - - - The values do not match. - Verdiene stemmer ikke overens. - - - Please enter a valid time. - Vennligst angi et gyldig tidspunkt. - - - Please select a valid timezone. - Vennligst velg en gyldig tidssone. - - - Please enter a valid URL. - Vennligst skriv inn en gyldig URL. - - - Please enter a valid search term. - Vennligst angi et gyldig søketerm. - - - Please provide a valid phone number. - Vennligst oppgi et gyldig telefonnummer. - - - The checkbox has an invalid value. - Avkrysningsboksen har en ugyldig verdi. - - - Please enter a valid email address. - Vennligst skriv inn en gyldig e-post adresse. - - - Please select a valid option. - Vennligst velg et gyldig alternativ. - - - Please select a valid range. - Vennligst velg et gyldig område. - - - Please enter a valid week. - Vennligst skriv inn en gyldig uke. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.pl.xlf b/vendor/symfony/form/Resources/translations/validators.pl.xlf deleted file mode 100644 index d553f2a..0000000 --- a/vendor/symfony/form/Resources/translations/validators.pl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ten formularz nie powinien zawierać dodatkowych pól. - - - The uploaded file was too large. Please try to upload a smaller file. - Wgrany plik był za duży. Proszę spróbować wgrać mniejszy plik. - - - The CSRF token is invalid. Please try to resubmit the form. - Token CSRF jest nieprawidłowy. Proszę spróbować wysłać formularz ponownie. - - - This value is not a valid HTML5 color. - Ta wartość nie jest prawidłowym kolorem HTML5. - - - Please enter a valid birthdate. - Proszę wprowadzić prawidłową datę urodzenia. - - - The selected choice is invalid. - Wybrana wartość jest nieprawidłowa. - - - The collection is invalid. - Zbiór jest nieprawidłowy. - - - Please select a valid color. - Proszę wybrać prawidłowy kolor. - - - Please select a valid country. - Proszę wybrać prawidłowy kraj. - - - Please select a valid currency. - Proszę wybrać prawidłową walutę. - - - Please choose a valid date interval. - Proszę wybrać prawidłowy przedział czasowy. - - - Please enter a valid date and time. - Proszę wprowadzić prawidłową datę i czas. - - - Please enter a valid date. - Proszę wprowadzić prawidłową datę. - - - Please select a valid file. - Proszę wybrać prawidłowy plik. - - - The hidden field is invalid. - Ukryte pole jest nieprawidłowe. - - - Please enter an integer. - Proszę wprowadzić liczbę całkowitą. - - - Please select a valid language. - Proszę wybrać prawidłowy język. - - - Please select a valid locale. - Proszę wybrać prawidłową lokalizację. - - - Please enter a valid money amount. - Proszę wybrać prawidłową ilość pieniędzy. - - - Please enter a number. - Proszę wprowadzić liczbę. - - - The password is invalid. - Hasło jest nieprawidłowe. - - - Please enter a percentage value. - Proszę wprowadzić wartość procentową. - - - The values do not match. - Wartości się nie zgadzają. - - - Please enter a valid time. - Proszę wprowadzić prawidłowy czas. - - - Please select a valid timezone. - Proszę wybrać prawidłową strefę czasową. - - - Please enter a valid URL. - Proszę wprowadzić prawidłowy adres URL. - - - Please enter a valid search term. - Proszę wprowadzić prawidłowy termin wyszukiwania. - - - Please provide a valid phone number. - Proszę wprowadzić prawidłowy numer telefonu. - - - The checkbox has an invalid value. - Pole wyboru posiada nieprawidłową wartość. - - - Please enter a valid email address. - Proszę wprowadzić prawidłowy adres email. - - - Please select a valid option. - Proszę wybrać prawidłową opcję. - - - Please select a valid range. - Proszę wybrać prawidłowy zakres. - - - Please enter a valid week. - Proszę wybrać prawidłowy tydzień. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.pt.xlf b/vendor/symfony/form/Resources/translations/validators.pt.xlf deleted file mode 100644 index 6ce1c32..0000000 --- a/vendor/symfony/form/Resources/translations/validators.pt.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulário não deveria possuir mais campos. - - - The uploaded file was too large. Please try to upload a smaller file. - O ficheiro enviado é muito grande. Por favor, tente enviar um ficheiro menor. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF está inválido. Por favor, tente enviar o formulário novamente. - - - This value is not a valid HTML5 color. - Este valor não é uma cor HTML5 válida. - - - Please enter a valid birthdate. - Por favor, informe uma data de nascimento válida. - - - The selected choice is invalid. - A escolha seleccionada é inválida. - - - The collection is invalid. - A coleção é inválida. - - - Please select a valid color. - Por favor, selecione uma cor válida. - - - Please select a valid country. - Por favor, selecione um país válido. - - - Please select a valid currency. - Por favor, selecione uma moeda válida. - - - Please choose a valid date interval. - Por favor, escolha um intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, informe uma data e horário válidos. - - - Please enter a valid date. - Por favor, informe uma data válida. - - - Please select a valid file. - Por favor, selecione um ficheiro válido. - - - The hidden field is invalid. - O campo oculto é inválido. - - - Please enter an integer. - Por favor, informe um inteiro. - - - Please select a valid language. - Por favor selecione um idioma válido. - - - Please select a valid locale. - Por favor, selecione um locale válido. - - - Please enter a valid money amount. - Por favor, informe um valor monetário válido. - - - Please enter a number. - Por favor, informe um número. - - - The password is invalid. - A palavra-passe é inválida. - - - Please enter a percentage value. - Por favor, informe um valor percentual. - - - The values do not match. - Os valores não correspondem. - - - Please enter a valid time. - Por favor, informe uma hora válida. - - - Please select a valid timezone. - Por favor, selecione um fuso horário válido. - - - Please enter a valid URL. - Por favor, informe uma URL válida. - - - Please enter a valid search term. - Por favor, informe um termo de busca válido. - - - Please provide a valid phone number. - Por favor, infome um número de telefone válido. - - - The checkbox has an invalid value. - O checkbox possui um valor inválido. - - - Please enter a valid email address. - Por favor, informe um endereço de email válido. - - - Please select a valid option. - Por favor, selecione uma opção válida. - - - Please select a valid range. - Por favor, selecione um intervalo válido. - - - Please enter a valid week. - Por favor, selecione uma semana válida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf b/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf deleted file mode 100644 index 37717fe..0000000 --- a/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Este formulário não deve conter campos adicionais. - - - The uploaded file was too large. Please try to upload a smaller file. - O arquivo enviado é muito grande. Por favor, tente enviar um arquivo menor. - - - The CSRF token is invalid. Please try to resubmit the form. - O token CSRF é inválido. Por favor, tente reenviar o formulário. - - - This value is not a valid HTML5 color. - Este valor não é uma cor HTML5 válida. - - - Please enter a valid birthdate. - Por favor, informe uma data de nascimento válida. - - - The selected choice is invalid. - A escolha selecionada é inválida. - - - The collection is invalid. - A coleção é inválida. - - - Please select a valid color. - Por favor, selecione uma cor válida. - - - Please select a valid country. - Por favor, selecione um país válido. - - - Please select a valid currency. - Por favor, selecione uma moeda válida. - - - Please choose a valid date interval. - Por favor, escolha um intervalo de datas válido. - - - Please enter a valid date and time. - Por favor, informe uma data e horário válidos. - - - Please enter a valid date. - Por favor, informe uma data válida. - - - Please select a valid file. - Por favor, selecione um arquivo válido. - - - The hidden field is invalid. - O campo oculto é inválido. - - - Please enter an integer. - Por favor, informe um número inteiro. - - - Please select a valid language. - Por favor, selecione um idioma válido. - - - Please select a valid locale. - Por favor, selecione uma configuração de local válida. - - - Please enter a valid money amount. - Por favor, informe um valor monetário válido. - - - Please enter a number. - Por favor, informe um número. - - - The password is invalid. - A senha é inválida. - - - Please enter a percentage value. - Por favor, informe um valor percentual. - - - The values do not match. - Os valores não conferem. - - - Please enter a valid time. - Por favor, informe um horário válido. - - - Please select a valid timezone. - Por favor, selecione um fuso horário válido. - - - Please enter a valid URL. - Por favor, informe uma URL válida. - - - Please enter a valid search term. - Por favor, informe um termo de busca válido. - - - Please provide a valid phone number. - Por favor, informe um telefone válido. - - - The checkbox has an invalid value. - A caixa de seleção possui um valor inválido. - - - Please enter a valid email address. - Por favor, informe um endereço de e-mail válido. - - - Please select a valid option. - Por favor, selecione uma opção válida. - - - Please select a valid range. - Por favor, selecione um intervalo válido. - - - Please enter a valid week. - Por favor, informe uma semana válida. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.ro.xlf b/vendor/symfony/form/Resources/translations/validators.ro.xlf deleted file mode 100644 index a7dc62b..0000000 --- a/vendor/symfony/form/Resources/translations/validators.ro.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Acest formular nu ar trebui să conțină câmpuri suplimentare. - - - The uploaded file was too large. Please try to upload a smaller file. - Fișierul încărcat a fost prea mare. Vă rugăm sa încărcați un fișier mai mic. - - - The CSRF token is invalid. Please try to resubmit the form. - Token-ul CSRF este invalid. Vă rugăm să retrimiteți formularul. - - - This value is not a valid HTML5 color. - Această valoare nu este un cod de culoare HTML5 valid. - - - Please enter a valid birthdate. - Vă rugăm să introduceți o dată de naștere validă. - - - The selected choice is invalid. - Valoarea selectată este invalidă. - - - The collection is invalid. - Colecția nu este validă. - - - Please select a valid color. - Vă rugăm să selectați o culoare validă. - - - Please select a valid country. - Vă rugăm să selectați o țară validă. - - - Please select a valid currency. - Vă rugăm să selectați o monedă validă. - - - Please choose a valid date interval. - Vă rugăm să selectați un interval de zile valid. - - - Please enter a valid date and time. - Vă rugăm să introduceți o dată și o oră validă. - - - Please enter a valid date. - Vă rugăm să introduceți o dată validă. - - - Please select a valid file. - Vă rugăm să selectați un fișier valid. - - - The hidden field is invalid. - Câmpul ascuns este invalid. - - - Please enter an integer. - Vă rugăm să introduceți un număr întreg. - - - Please select a valid language. - Vă rugăm să selectați o limbă validă. - - - Please select a valid locale. - Vă rugăm să selectați o setare locală validă. - - - Please enter a valid money amount. - Vă rugăm să introduceți o valoare monetară corectă. - - - Please enter a number. - Vă rugăm să introduceți un număr. - - - The password is invalid. - Parola nu este validă. - - - Please enter a percentage value. - Vă rugăm să introduceți o valoare procentuală. - - - The values do not match. - Valorile nu coincid. - - - Please enter a valid time. - Vă rugăm să introduceți o oră validă. - - - Please select a valid timezone. - Vă rugăm să selectați un fus orar valid. - - - Please enter a valid URL. - Vă rugăm să introduceți un URL valid. - - - Please enter a valid search term. - Vă rugăm să introduceți un termen de căutare valid. - - - Please provide a valid phone number. - Vă rugăm să introduceți un număr de telefon valid. - - - The checkbox has an invalid value. - Bifa nu are o valoare validă. - - - Please enter a valid email address. - Vă rugăm să introduceți o adresă de email validă. - - - Please select a valid option. - Vă rugăm să selectați o opțiune validă. - - - Please select a valid range. - Vă rugăm să selectați un interval valid. - - - Please enter a valid week. - Vă rugăm să introduceți o săptămână validă. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.ru.xlf b/vendor/symfony/form/Resources/translations/validators.ru.xlf deleted file mode 100644 index b11b7ce..0000000 --- a/vendor/symfony/form/Resources/translations/validators.ru.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Эта форма не должна содержать дополнительных полей. - - - The uploaded file was too large. Please try to upload a smaller file. - Загруженный файл слишком большой. Пожалуйста, попробуйте загрузить файл меньшего размера. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF значение недопустимо. Пожалуйста, попробуйте повторить отправку формы. - - - This value is not a valid HTML5 color. - Значение не является допустимым HTML5 цветом. - - - Please enter a valid birthdate. - Пожалуйста, введите действительную дату рождения. - - - The selected choice is invalid. - Выбранный вариант недопустим. - - - The collection is invalid. - Коллекция недопустима. - - - Please select a valid color. - Пожалуйста, выберите допустимый цвет. - - - Please select a valid country. - Пожалуйста, выберите действительную страну. - - - Please select a valid currency. - Пожалуйста, выберите действительную валюту. - - - Please choose a valid date interval. - Пожалуйста, выберите действительный период. - - - Please enter a valid date and time. - Пожалуйста, введите действительные дату и время. - - - Please enter a valid date. - Пожалуйста, введите действительную дату. - - - Please select a valid file. - Пожалуйста, выберите допустимый файл. - - - The hidden field is invalid. - Значение скрытого поля недопустимо. - - - Please enter an integer. - Пожалуйста, введите целое число. - - - Please select a valid language. - Пожалуйста, выберите допустимый язык. - - - Please select a valid locale. - Пожалуйста, выберите допустимую локаль. - - - Please enter a valid money amount. - Пожалуйста, введите допустимое количество денег. - - - Please enter a number. - Пожалуйста, введите номер. - - - The password is invalid. - Пароль недействителен. - - - Please enter a percentage value. - Пожалуйста, введите процентное значение. - - - The values do not match. - Значения не совпадают. - - - Please enter a valid time. - Пожалуйста, введите действительное время. - - - Please select a valid timezone. - Пожалуйста, выберите действительный часовой пояс. - - - Please enter a valid URL. - Пожалуйста, введите действительный URL. - - - Please enter a valid search term. - Пожалуйста, введите действительный поисковый запрос. - - - Please provide a valid phone number. - Пожалуйста, введите действительный номер телефона. - - - The checkbox has an invalid value. - Флажок имеет недопустимое значение. - - - Please enter a valid email address. - Пожалуйста, введите допустимый email адрес. - - - Please select a valid option. - Пожалуйста, выберите допустимый вариант. - - - Please select a valid range. - Пожалуйста, выберите допустимый диапазон. - - - Please enter a valid week. - Пожалуйста, введите действительную неделю. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sk.xlf b/vendor/symfony/form/Resources/translations/validators.sk.xlf deleted file mode 100644 index 06b2bbd..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sk.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Polia by nemali obsahovať ďalšie prvky. - - - The uploaded file was too large. Please try to upload a smaller file. - Odoslaný súbor je príliš veľký. Prosím odošlite súbor s menšou veľkosťou. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token je neplatný. Prosím skúste znovu odoslať formulár. - - - This value is not a valid HTML5 color. - Táto hodnota nie je platná HTML5 farba. - - - Please enter a valid birthdate. - Prosím zadajte platný dátum narodenia. - - - The selected choice is invalid. - Vybraná možnosť je neplatná. - - - The collection is invalid. - Kolekcia je neplatná. - - - Please select a valid color. - Prosím vyberte platnú farbu. - - - Please select a valid country. - Prosím vyberte platnú krajinu. - - - Please select a valid currency. - Prosím vyberte platnú menu. - - - Please choose a valid date interval. - Prosím vyberte platný rozsah dát. - - - Please enter a valid date and time. - Prosím zadajte platný dátum a čas. - - - Please enter a valid date. - Prosím zadajte platný dátum. - - - Please select a valid file. - Prosím vyberte platný súbor. - - - The hidden field is invalid. - Skryté pole je neplatné. - - - Please enter an integer. - Prosím zadajte celé číslo. - - - Please select a valid language. - Prosím vyberte platný jazyk. - - - Please select a valid locale. - Prosím vyberte platné miestne nastavenia. - - - Please enter a valid money amount. - Prosím zadajte platnú čiastku. - - - Please enter a number. - Prosím zadajte číslo. - - - The password is invalid. - Heslo je neprávne. - - - Please enter a percentage value. - Prosím zadajte percentuálnu hodnotu. - - - The values do not match. - Hodnoty nie sú zhodné. - - - Please enter a valid time. - Prosím zadajte platný čas. - - - Please select a valid timezone. - Prosím vyberte platné časové pásmo. - - - Please enter a valid URL. - Prosím zadajte platnú URL. - - - Please enter a valid search term. - Prosím zadajte platný vyhľadávací výraz. - - - Please provide a valid phone number. - Prosím zadajte platné telefónne číslo. - - - The checkbox has an invalid value. - Zaškrtávacie políčko má neplatnú hodnotu. - - - Please enter a valid email address. - Prosím zadajte platnú emailovú adresu. - - - Please select a valid option. - Prosím vyberte platnú možnosť. - - - Please select a valid range. - Prosím vyberte platný rozsah. - - - Please enter a valid week. - Prosím zadajte platný týždeň. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sl.xlf b/vendor/symfony/form/Resources/translations/validators.sl.xlf deleted file mode 100644 index 7e6a3fb..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ta obrazec ne sme vsebovati dodatnih polj. - - - The uploaded file was too large. Please try to upload a smaller file. - Naložena datoteka je prevelika. Prosimo, poizkusite naložiti manjšo. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrednost je napačna. Prosimo, ponovno pošljite obrazec. - - - This value is not a valid HTML5 color. - Ta vrednost ni veljavna barva HTML5. - - - Please enter a valid birthdate. - Prosimo, vnesite veljaven rojstni datum. - - - The selected choice is invalid. - Izbira ni veljavna. - - - The collection is invalid. - Zbirka ni veljavna. - - - Please select a valid color. - Prosimo, izberite veljavno barvo. - - - Please select a valid country. - Prosimo, izberite veljavno državo. - - - Please select a valid currency. - Prosimo, izberite veljavno valuto. - - - Please choose a valid date interval. - Prosimo, izberite veljaven datumski interval. - - - Please enter a valid date and time. - Prosimo, vnesite veljaven datum in čas. - - - Please enter a valid date. - Prosimo, izberite veljaven datum. - - - Please select a valid file. - Prosimo, izberite veljavno datoteko. - - - The hidden field is invalid. - Skrito polje ni veljavno. - - - Please enter an integer. - Prosimo, vnesite celo število. - - - Please select a valid language. - Prosimo, izberite veljaven jezik. - - - Please select a valid locale. - Prosimo, izberite veljavne področne nastavitve. - - - Please enter a valid money amount. - Prosimo, vnesite veljaven denarni znesek. - - - Please enter a number. - Prosimo, vnesite številko. - - - The password is invalid. - Geslo ni veljavno. - - - Please enter a percentage value. - Prosimo, vnesite odstotno vrednost. - - - The values do not match. - Vrednosti se ne ujemajo. - - - Please enter a valid time. - Prosimo, vnesite veljaven čas. - - - Please select a valid timezone. - Prosimo, izberite veljaven časovni pas. - - - Please enter a valid URL. - Prosimo, vnesite veljaven URL. - - - Please enter a valid search term. - Prosimo, vnesite veljaven iskalni izraz. - - - Please provide a valid phone number. - Prosimo, podajte veljavno telefonsko številko. - - - The checkbox has an invalid value. - Potrditveno polje vsebuje neveljavno vrednost. - - - Please enter a valid email address. - Prosimo, vnesite veljaven e-poštni naslov. - - - Please select a valid option. - Prosimo, izberite veljavno možnost. - - - Please select a valid range. - Prosimo, izberite veljaven obseg. - - - Please enter a valid week. - Prosimo, vnesite veljaven teden. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sq.xlf b/vendor/symfony/form/Resources/translations/validators.sq.xlf deleted file mode 100644 index 3224f6e..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sq.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Kjo formë nuk duhet të përmbajë fusha shtesë. - - - The uploaded file was too large. Please try to upload a smaller file. - Skedari i ngarkuar ishte shumë i madh. Ju lutemi provoni të ngarkoni një skedar më të vogël. - - - The CSRF token is invalid. Please try to resubmit the form. - Vlera CSRF është e pavlefshme. Ju lutemi provoni të ridërgoni formën. - - - This value is not a valid HTML5 color. - Kjo vlerë nuk është një ngjyrë e vlefshme HTML5. - - - Please enter a valid birthdate. - Ju lutemi shkruani një datëlindje të vlefshme. - - - The selected choice is invalid. - Opsioni i zgjedhur është i pavlefshëm. - - - The collection is invalid. - Koleksioni është i pavlefshëm. - - - Please select a valid color. - Ju lutemi zgjidhni një ngjyrë të vlefshme. - - - Please select a valid country. - Ju lutemi zgjidhni një shtet të vlefshëm. - - - Please select a valid currency. - Ju lutemi zgjidhni një monedhë të vlefshme. - - - Please choose a valid date interval. - Ju lutemi zgjidhni një interval të vlefshëm të datës. - - - Please enter a valid date and time. - Ju lutemi shkruani një datë dhe orë të vlefshme. - - - Please enter a valid date. - Ju lutemi shkruani një datë të vlefshme. - - - Please select a valid file. - Ju lutemi zgjidhni një skedar të vlefshëm. - - - The hidden field is invalid. - Fusha e fshehur është e pavlefshme. - - - Please enter an integer. - Ju lutemi shkruani një numër të plotë. - - - Please select a valid language. - Please select a valid language. - - - Please select a valid locale. - Ju lutemi zgjidhni një lokale të vlefshme. - - - Please enter a valid money amount. - Ju lutemi shkruani një shumë të vlefshme parash. - - - Please enter a number. - Ju lutemi shkruani një numër. - - - The password is invalid. - Fjalëkalimi është i pavlefshëm. - - - Please enter a percentage value. - Ju lutemi shkruani një vlerë përqindjeje. - - - The values do not match. - Vlerat nuk përputhen. - - - Please enter a valid time. - Ju lutemi shkruani një kohë të vlefshme. - - - Please select a valid timezone. - Ju lutemi zgjidhni një zonë kohore të vlefshme. - - - Please enter a valid URL. - Ju lutemi shkruani një URL të vlefshme. - - - Please enter a valid search term. - Ju lutemi shkruani një term të vlefshëm kërkimi. - - - Please provide a valid phone number. - Ju lutemi jepni një numër telefoni të vlefshëm. - - - The checkbox has an invalid value. - Kutia e zgjedhjes ka një vlerë të pavlefshme. - - - Please enter a valid email address. - Ju lutemi shkruani një adresë të vlefshme emaili. - - - Please select a valid option. - Ju lutemi zgjidhni një opsion të vlefshëm. - - - Please select a valid range. - Ju lutemi zgjidhni një diapazon të vlefshëm. - - - Please enter a valid week. - Ju lutemi shkruani një javë të vlefshme. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf b/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf deleted file mode 100644 index a5610e0..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Овај формулар не треба да садржи додатна поља. - - - The uploaded file was too large. Please try to upload a smaller file. - Отпремљена датотека је била превелика. Молим покушајте отпремање мање датотеке. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF вредност није исправна. Покушајте поново. - - - This value is not a valid HTML5 color. - Ова вредност није исправна HTML5 боја. - - - Please enter a valid birthdate. - Молим упишите исправан датум рођења. - - - The selected choice is invalid. - Одабрани избор није исправан. - - - The collection is invalid. - Ова колекција није исправна. - - - Please select a valid color. - Молим изаберите исправну боју. - - - Please select a valid country. - Молим изаберите исправну државу. - - - Please select a valid currency. - Молим изаберите исправну валуту. - - - Please choose a valid date interval. - Молим изаберите исправан датумски интервал. - - - Please enter a valid date and time. - Молим упишите исправан датум и време. - - - Please enter a valid date. - Молим упишите исправан датум. - - - Please select a valid file. - Молим изаберите исправну датотеку. - - - The hidden field is invalid. - Скривено поље није исправно. - - - Please enter an integer. - Молим упишите цео број (integer). - - - Please select a valid language. - Молим изаберите исправан језик. - - - Please select a valid locale. - Молим изаберите исправну локализацију. - - - Please enter a valid money amount. - Молим упишите исправну количину новца. - - - Please enter a number. - Молим упишите број. - - - The password is invalid. - Ова лозинка није исправна. - - - Please enter a percentage value. - Молим упишите процентуалну вредност. - - - The values do not match. - Дате вредности се не поклапају. - - - Please enter a valid time. - Молим упишите исправно време. - - - Please select a valid timezone. - Молим изаберите исправну временску зону. - - - Please enter a valid URL. - Молим упишите исправан URL. - - - Please enter a valid search term. - Молим упишите исправан термин за претрагу. - - - Please provide a valid phone number. - Молим наведите исправан број телефона. - - - The checkbox has an invalid value. - Поље за потврду садржи неисправну вредност. - - - Please enter a valid email address. - Молим упишите исправну email адресу. - - - Please select a valid option. - Молим изаберите исправну опцију. - - - Please select a valid range. - Молим изаберите исправан опсег. - - - Please enter a valid week. - Молим упишите исправну седмицу. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf b/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf deleted file mode 100644 index 02fb5aa..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ovaj formular ne treba da sadrži dodatna polja. - - - The uploaded file was too large. Please try to upload a smaller file. - Otpremljena datoteka je bila prevelika. Molim pokušajte otpremanje manje datoteke. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF vrednost nije ispravna. Pokušajte ponovo. - - - This value is not a valid HTML5 color. - Ova vrednost nije ispravna HTML5 boja. - - - Please enter a valid birthdate. - Molim upišite ispravan datum rođenja. - - - The selected choice is invalid. - Odabrani izbor nije ispravan. - - - The collection is invalid. - Ova kolekcija nije ispravna. - - - Please select a valid color. - Molim izaberite ispravnu boju. - - - Please select a valid country. - Molim izaberite ispravnu državu. - - - Please select a valid currency. - Molim izaberite ispravnu valutu. - - - Please choose a valid date interval. - Molim izaberite ispravan datumski interval. - - - Please enter a valid date and time. - Molim upišite ispravan datum i vreme. - - - Please enter a valid date. - Molim upišite ispravan datum. - - - Please select a valid file. - Molim izaberite ispravnu datoteku. - - - The hidden field is invalid. - Skriveno polje nije ispravno. - - - Please enter an integer. - Molim upišite ceo broj (integer). - - - Please select a valid language. - Molim izaberite ispravan jezik. - - - Please select a valid locale. - Molim izaberite ispravnu lokalizaciju. - - - Please enter a valid money amount. - Molim upišite ispravnu količinu novca. - - - Please enter a number. - Molim upišite broj. - - - The password is invalid. - Ova lozinka nije ispravna. - - - Please enter a percentage value. - Molim upišite procentualnu vrednost. - - - The values do not match. - Date vrednosti se ne poklapaju. - - - Please enter a valid time. - Molim upišite ispravno vreme. - - - Please select a valid timezone. - Molim izaberite ispravnu vremensku zonu. - - - Please enter a valid URL. - Molim upišite ispravan URL. - - - Please enter a valid search term. - Molim upišite ispravan termin za pretragu. - - - Please provide a valid phone number. - Molim navedite ispravan broj telefona. - - - The checkbox has an invalid value. - Polje za potvrdu sadrži neispravnu vrednost. - - - Please enter a valid email address. - Molim upišite ispravnu email adresu. - - - Please select a valid option. - Molim izaberite ispravnu opciju. - - - Please select a valid range. - Molim izaberite ispravan opseg. - - - Please enter a valid week. - Molim upišite ispravnu sedmicu. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.sv.xlf b/vendor/symfony/form/Resources/translations/validators.sv.xlf deleted file mode 100644 index 43e9256..0000000 --- a/vendor/symfony/form/Resources/translations/validators.sv.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Formuläret kan inte innehålla extra fält. - - - The uploaded file was too large. Please try to upload a smaller file. - Den uppladdade filen var för stor. Försök ladda upp en mindre fil. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF-elementet är inte giltigt. Försök att skicka formuläret igen. - - - This value is not a valid HTML5 color. - Värdet är inte en giltig HTML5-färg. - - - Please enter a valid birthdate. - Ange ett giltigt födelsedatum. - - - The selected choice is invalid. - Det valda alternativet är ogiltigt. - - - The collection is invalid. - Den här samlingen är ogiltig. - - - Please select a valid color. - Välj en giltig färg. - - - Please select a valid country. - Välj ett land. - - - Please select a valid currency. - Välj en valuta. - - - Please choose a valid date interval. - Välj ett giltigt datumintervall. - - - Please enter a valid date and time. - Ange ett giltigt datum och tid. - - - Please enter a valid date. - Ange ett giltigt datum. - - - Please select a valid file. - Välj en fil. - - - The hidden field is invalid. - Det dolda fältet är ogiltigt. - - - Please enter an integer. - Ange ett heltal. - - - Please select a valid language. - Välj språk. - - - Please select a valid locale. - Välj plats. - - - Please enter a valid money amount. - Ange en giltig summa pengar. - - - Please enter a number. - Ange en siffra. - - - The password is invalid. - Lösenordet är ogiltigt. - - - Please enter a percentage value. - Ange ett procentuellt värde. - - - The values do not match. - De angivna värdena stämmer inte överens. - - - Please enter a valid time. - Ange en giltig tid. - - - Please select a valid timezone. - Välj en tidszon. - - - Please enter a valid URL. - Ange en giltig URL. - - - Please enter a valid search term. - Ange ett giltigt sökbegrepp. - - - Please provide a valid phone number. - Ange ett giltigt telefonnummer. - - - The checkbox has an invalid value. - Kryssrutan har ett ogiltigt värde. - - - Please enter a valid email address. - Ange en giltig e-postadress. - - - Please select a valid option. - Välj ett alternativ. - - - Please select a valid range. - Välj ett intervall. - - - Please enter a valid week. - Ange en giltig vecka. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.th.xlf b/vendor/symfony/form/Resources/translations/validators.th.xlf deleted file mode 100644 index 060dc9e..0000000 --- a/vendor/symfony/form/Resources/translations/validators.th.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - ฟอร์มนี้ไม่ควรมี extra fields - - - The uploaded file was too large. Please try to upload a smaller file. - ไฟล์ที่อัพโหลดมีขนาดใหญ่เกินไป กรุณาลองอัพโหลดใหม่อีกครั้งด้วยไฟล์ที่มีขนาดเล็กลง - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token ไม่ถูกต้อง กรุณาลองส่งแบบฟอร์มใหม่ - - - This value is not a valid HTML5 color. - ค่านี้ไม่ใช่ค่าที่ถูกต้องของค่าสี HTML5 - - - Please enter a valid birthdate. - กรุณากรอกวันเดือนปีเกิดที่ถูกต้อง - - - The selected choice is invalid. - ตัวเลือกที่เลิอกไม่ถูกต้อง - - - The collection is invalid. - คอเล็กชั่นไม่ถูกต้อง - - - Please select a valid color. - กรุณาเลือกค่าสีที่ถูกต้อง - - - Please select a valid country. - กรุณาเลือกประเทศที่ถูกต้อง - - - Please select a valid currency. - กรุุณาเลิอกค่าสกุลเงินที่ถูกต้อง - - - Please choose a valid date interval. - กรุณณากรอกช่วงวันที่ที่ถูกต้อง - - - Please enter a valid date and time. - กรุณณากรอกค่าเวลาและวันที่ที่ถูกต้อง - - - Please enter a valid date. - กรุณณากรอกค่าวันที่ที่ถูกต้อง - - - Please select a valid file. - กรุณาเลือกไฟล์ที่ถูกต้อง - - - The hidden field is invalid. - ค่า Hidden field ไม่ถูกต้อง - - - Please enter an integer. - กรุณากรอกตัวเลขจำนวนเต็ม - - - Please select a valid language. - กรุณาเลือกภาษาที่ถูกต้อง - - - Please select a valid locale. - กรุณาเลือกท้องถิ่นที่ถูกต้อง - - - Please enter a valid money amount. - กรุณากรอกจำนวนเงินที่ถูกต้อง - - - Please enter a number. - กรุณากรอกตัวเลข - - - The password is invalid. - รหัสผ่านไม่ถูกต้อง - - - Please enter a percentage value. - กรุณากรอกค่าเปอร์เซ็นต์ - - - The values do not match. - ค่าทั้งสองไม่ตรงกัน - - - Please enter a valid time. - กรุณากรอกค่าเวลาที่ถูกต้อง - - - Please select a valid timezone. - กรุณาเลือกค่าเขตเวลาที่ถูกต้อง - - - Please enter a valid URL. - กรุณากรอก URL ที่ถูกต้อง - - - Please enter a valid search term. - กรุณากรอกคำค้นหาที่ถูกต้อง - - - Please provide a valid phone number. - กรุณากรอกเบอร์โทรศัพท์ที่ถูกต้อง - - - The checkbox has an invalid value. - Checkbox มีค่าที่ไม่ถูกต้อง - - - Please enter a valid email address. - กรุณากรอกที่อยู่อีเมล์ที่ถูกต้อง - - - Please select a valid option. - กรุณาเลือกตัวเลือกที่ถูกต้อง - - - Please select a valid range. - กรุณาเลือกค่าช่วงที่ถูกต้อง - - - Please enter a valid week. - กรุณากรอกค่าสัปดาห์ที่ถูกต้อง - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.tl.xlf b/vendor/symfony/form/Resources/translations/validators.tl.xlf deleted file mode 100644 index 272e331..0000000 --- a/vendor/symfony/form/Resources/translations/validators.tl.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ang pormang itong ay hindi dapat magkarron ng dagdag na mga patlang. - - - The uploaded file was too large. Please try to upload a smaller file. - Ang ini-upload na file ay masyadong malaki. Pakiulit muling mag-upload ng mas maliit na file. - - - The CSRF token is invalid. Please try to resubmit the form. - Hindi balido ang CSRF token. Maagpasa muli ng isang pang porma. - - - This value is not a valid HTML5 color. - Ang halagang ito ay hindi wastong HTML5 color. - - - Please enter a valid birthdate. - Pakilagay ang tamang petsa ng kapanganakan. - - - The selected choice is invalid. - Ang pinagpiliang sagot ay hindi tama. - - - The collection is invalid. - Hindi balido ang koleksyon. - - - Please select a valid color. - Pakipiliin ang nararapat na kulay. - - - Please select a valid country. - Pakipiliin ang nararapat na bansa. - - - Please select a valid currency. - Pakipiliin ang tamang pananalapi. - - - Please choose a valid date interval. - Piliin ang wastong agwat ng petsa. - - - Please enter a valid date and time. - Piliin ang wastong petsa at oras. - - - Please enter a valid date. - Ilagay ang wastong petsa. - - - Please select a valid file. - Piliin ang balidong file. - - - The hidden field is invalid. - Hindi balido ang field na nakatago. - - - Please enter an integer. - Pakilagay ang integer. - - - Please select a valid language. - Piliin ang nararapat na lengguwahe. - - - Please select a valid locale. - Pakipili ang nararapat na locale. - - - Please enter a valid money amount. - Pakilagay ang tamang halaga ng pera. - - - Please enter a number. - Ilagay ang numero. - - - The password is invalid. - Hindi balido ang password. - - - Please enter a percentage value. - Pakilagay ang tamang porsyento ng halaga. - - - The values do not match. - Hindi tugma ang mga halaga. - - - Please enter a valid time. - Pakilagay ang tamang oras. - - - Please select a valid timezone. - Pakilagay ang tamang sona ng oras. - - - Please enter a valid URL. - Pakilagay ang balidong URL. - - - Please enter a valid search term. - Pakilagay ang balidong katagang sinasaliksik. - - - Please provide a valid phone number. - Pakilagay ang balidong numero ng telepono. - - - The checkbox has an invalid value. - Ang checkbox ay mayroon hindi balidong halaga. - - - Please enter a valid email address. - Pakilagay ang balidong email address. - - - Please select a valid option. - Pakipiliin ang balidong pagpipilian. - - - Please select a valid range. - Pakipilian ang balidong layo. - - - Please enter a valid week. - Pakilagay ang balidong linggo. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.tr.xlf b/vendor/symfony/form/Resources/translations/validators.tr.xlf deleted file mode 100644 index d1ddc1d..0000000 --- a/vendor/symfony/form/Resources/translations/validators.tr.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Form ekstra alanlar içeremez. - - - The uploaded file was too large. Please try to upload a smaller file. - Yüklenen dosya boyutu çok yüksek. Lütfen daha küçük bir dosya yüklemeyi deneyin. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF fişi geçersiz. Formu tekrar göndermeyi deneyin. - - - This value is not a valid HTML5 color. - Bu değer, geçerli bir HTML5 rengi değil. - - - Please enter a valid birthdate. - Lütfen geçerli bir doğum tarihi girin. - - - The selected choice is invalid. - Seçilen seçim geçersiz. - - - The collection is invalid. - Koleksiyon geçersiz. - - - Please select a valid color. - Lütfen geçerli bir renk seçin. - - - Please select a valid country. - Lütfen geçerli bir ülke seçin. - - - Please select a valid currency. - Lütfen geçerli bir para birimi seçin. - - - Please choose a valid date interval. - Lütfen geçerli bir tarih aralığı seçin. - - - Please enter a valid date and time. - Lütfen geçerli bir tarih ve saat girin. - - - Please enter a valid date. - Lütfen geçerli bir tarih giriniz. - - - Please select a valid file. - Lütfen geçerli bir dosya seçin. - - - The hidden field is invalid. - Gizli alan geçersiz. - - - Please enter an integer. - Lütfen bir tam sayı girin. - - - Please select a valid language. - Lütfen geçerli bir dil seçin. - - - Please select a valid locale. - Lütfen geçerli bir yerel ayar seçin. - - - Please enter a valid money amount. - Lütfen geçerli bir para tutarı girin. - - - Please enter a number. - Lütfen bir numara giriniz. - - - The password is invalid. - Şifre geçersiz. - - - Please enter a percentage value. - Lütfen bir yüzde değeri girin. - - - The values do not match. - Değerler eşleşmiyor. - - - Please enter a valid time. - Lütfen geçerli bir zaman girin. - - - Please select a valid timezone. - Lütfen geçerli bir saat dilimi seçin. - - - Please enter a valid URL. - Lütfen geçerli bir giriniz URL. - - - Please enter a valid search term. - Lütfen geçerli bir arama terimi girin. - - - Please provide a valid phone number. - lütfen geçerli bir telefon numarası sağlayın. - - - The checkbox has an invalid value. - Onay kutusunda geçersiz bir değer var. - - - Please enter a valid email address. - Lütfen geçerli bir e-posta adresi girin. - - - Please select a valid option. - Lütfen geçerli bir seçenek seçin. - - - Please select a valid range. - Lütfen geçerli bir aralık seçin. - - - Please enter a valid week. - Lütfen geçerli bir hafta girin. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.uk.xlf b/vendor/symfony/form/Resources/translations/validators.uk.xlf deleted file mode 100644 index ca707bc..0000000 --- a/vendor/symfony/form/Resources/translations/validators.uk.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ця форма не повинна містити додаткових полів. - - - The uploaded file was too large. Please try to upload a smaller file. - Завантажений файл занадто великий. Будь ласка, спробуйте завантажити файл меншого розміру. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF значення недопустиме. Будь ласка, спробуйте відправити форму знову. - - - This value is not a valid HTML5 color. - Це значення не є допустимим кольором HTML5. - - - Please enter a valid birthdate. - Будь ласка, введіть дійсну дату народження. - - - The selected choice is invalid. - Обраний варіант недійсний. - - - The collection is invalid. - Колекція недійсна. - - - Please select a valid color. - Будь ласка, оберіть дійсний колір. - - - Please select a valid country. - Будь ласка, оберіть дійсну країну. - - - Please select a valid currency. - Будь ласка, оберіть дійсну валюту. - - - Please choose a valid date interval. - Будь ласка, оберіть дійсний інтервал дати. - - - Please enter a valid date and time. - Будь ласка, введіть дійсну дату та час. - - - Please enter a valid date. - Будь ласка, введіть дійсну дату. - - - Please select a valid file. - Будь ласка, оберіть дійсний файл. - - - The hidden field is invalid. - Приховане поле недійсне. - - - Please enter an integer. - Будь ласка, введіть ціле число. - - - Please select a valid language. - Будь ласка, оберіть дійсну мову. - - - Please select a valid locale. - Будь ласка, оберіть дійсну локаль. - - - Please enter a valid money amount. - Будь ласка, введіть дійсну суму грошей. - - - Please enter a number. - Будь ласка, введіть число. - - - The password is invalid. - Пароль недійсний. - - - Please enter a percentage value. - Будь ласка, введіть процентне значення. - - - The values do not match. - Значення не збігаються. - - - Please enter a valid time. - Будь ласка, введіть дійсний час. - - - Please select a valid timezone. - Будь ласка, оберіть дійсний часовий пояс. - - - Please enter a valid URL. - Будь ласка, введіть дійсну URL-адресу. - - - Please enter a valid search term. - Будь ласка, введіть дійсний пошуковий термін. - - - Please provide a valid phone number. - Будь ласка, введіть дійсний номер телефону. - - - The checkbox has an invalid value. - Прапорець має недійсне значення. - - - Please enter a valid email address. - Будь ласка, введіть дійсну адресу електронної пошти. - - - Please select a valid option. - Будь ласка, оберіть дійсний варіант. - - - Please select a valid range. - Будь ласка, оберіть дійсний діапазон. - - - Please enter a valid week. - Будь ласка, введіть дійсний тиждень. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.uz.xlf b/vendor/symfony/form/Resources/translations/validators.uz.xlf deleted file mode 100644 index 58591d6..0000000 --- a/vendor/symfony/form/Resources/translations/validators.uz.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Ushbu fo'rmada qo'shimcha maydonlar bo'lmasligi kerak. - - - The uploaded file was too large. Please try to upload a smaller file. - Yuklab olingan fayl juda katta. Iltimos, kichikroq faylni yuklashga harakat qiling. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF qiymati yaroqsiz. Fo'rmani qayta yuborishga harakat qiling. - - - This value is not a valid HTML5 color. - Qiymat noto'g'ri, HTML5 rangi emas. - - - Please enter a valid birthdate. - Iltimos, tug'ilgan kuningizni to'g'ri kiriting. - - - The selected choice is invalid. - Tanlangan parametr noto'g'ri. - - - The collection is invalid. - Kolleksiya noto'g'ri - - - Please select a valid color. - Iltimos, to'g'ri rang tanlang. - - - Please select a valid country. - Iltimos, to'g'ri mamlakatni tanlang. - - - Please select a valid currency. - Iltimos, to'g'ri valyutani tanlang. - - - Please choose a valid date interval. - Iltimos, to'g'ri sana oralig'ini tanlang. - - - Please enter a valid date and time. - Iltimos, to'g'ri sana va vaqtni kiriting. - - - Please enter a valid date. - Iltimos, to'g'ri sanani kiriting. - - - Please select a valid file. - Iltimos, to'g'ri faylni tanlang. - - - The hidden field is invalid. - Yashirin maydon qiymati yaroqsiz. - - - Please enter an integer. - Iltimos, butun son kiriting. - - - Please select a valid language. - Iltimos, to'g'ri tilni tanlang. - - - Please select a valid locale. - Iltimos, to'g'ri localni tanlang. - - - Please enter a valid money amount. - Iltimos, tegishli miqdordagi pulni kiriting. - - - Please enter a number. - Iltimos, raqam kiriting. - - - The password is invalid. - Parol noto'g'ri. - - - Please enter a percentage value. - Iltimos, foyizli qiymat kiriting. - - - The values do not match. - Qiymatlar mos kelmaydi. - - - Please enter a valid time. - Iltimos, to'g'ri vaqtni tanlang. - - - Please select a valid timezone. - Iltimos, to'g'ri vaqt zonasini tanlang. - - - Please enter a valid URL. - Iltimos, to'g'ri URL kiriting. - - - Please enter a valid search term. - Iltimos, to'g'ri qidiruv so'zini kiriting. - - - Please provide a valid phone number. - Iltimos, to'g'ri telefon raqamini kiriting. - - - The checkbox has an invalid value. - Belgilash katagida yaroqsiz qiymat mavjud. - - - Please enter a valid email address. - Iltimos, to'g'ri email kiriting. - - - Please select a valid option. - Iltimos, yaroqli variantni tanlang. - - - Please select a valid range. - Iltimos, yaroqli oraliqni tanlang. - - - Please enter a valid week. - Iltimos, haqiqiy haftani kiriting. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.vi.xlf b/vendor/symfony/form/Resources/translations/validators.vi.xlf deleted file mode 100644 index 6a8f2bd..0000000 --- a/vendor/symfony/form/Resources/translations/validators.vi.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - Mẫu này không nên chứa trường mở rộng. - - - The uploaded file was too large. Please try to upload a smaller file. - Tập tin tải lên quá lớn. Vui lòng thử lại với tập tin nhỏ hơn. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF token không hợp lệ. Vui lòng thử lại. - - - This value is not a valid HTML5 color. - Giá trị này không phải là màu HTML5 hợp lệ. - - - Please enter a valid birthdate. - Vui lòng nhập ngày sinh hợp lệ. - - - The selected choice is invalid. - Lựa chọn không hợp lệ. - - - The collection is invalid. - Danh sách không hợp lệ. - - - Please select a valid color. - Vui lòng chọn một màu hợp lệ. - - - Please select a valid country. - Vui lòng chọn đất nước hợp lệ. - - - Please select a valid currency. - Vui lòng chọn tiền tệ hợp lệ. - - - Please choose a valid date interval. - Vui lòng chọn một khoảng thời gian hợp lệ. - - - Please enter a valid date and time. - Vui lòng nhập ngày và thời gian hợp lệ. - - - Please enter a valid date. - Vui lòng nhập ngày hợp lệ. - - - Please select a valid file. - Vui lòng chọn tệp hợp lệ. - - - The hidden field is invalid. - Phạm vi ẩn không hợp lệ. - - - Please enter an integer. - Vui lòng nhập một số nguyên. - - - Please select a valid language. - Vui lòng chọn ngôn ngữ hợp lệ. - - - Please select a valid locale. - Vui lòng chọn miền hợp lệ. - - - Please enter a valid money amount. - Vui lòng nhập một khoảng tiền hợp lệ. - - - Please enter a number. - Vui lòng nhập một con số. - - - The password is invalid. - Mật khẩu không hợp lệ. - - - Please enter a percentage value. - Vui lòng nhập một giá trị phần trăm. - - - The values do not match. - Các giá trị không phù hợp. - - - Please enter a valid time. - Vui lòng nhập thời gian hợp lệ. - - - Please select a valid timezone. - Vui lòng chọn múi giờ hợp lệ. - - - Please enter a valid URL. - Vui lòng nhập một URL hợp lệ. - - - Please enter a valid search term. - Vui lòng nhập chuỗi tìm kiếm hợp lệ. - - - Please provide a valid phone number. - Vui lòng cung cấp số điện thoại hợp lệ. - - - The checkbox has an invalid value. - Hộp kiểm có một giá trị không hợp lệ. - - - Please enter a valid email address. - Vui lòng nhập địa chỉ email hợp lệ. - - - Please select a valid option. - Vui lòng chọn một phương án hợp lệ. - - - Please select a valid range. - Vui lòng nhập một phạm vi hợp lệ. - - - Please enter a valid week. - Vui lòng nhập một tuần hợp lệ. - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf b/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf deleted file mode 100644 index 3106db2..0000000 --- a/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - 该表单中不可有额外字段. - - - The uploaded file was too large. Please try to upload a smaller file. - 上传文件太大, 请重新尝试上传一个较小的文件. - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF 验证符无效, 请重新提交. - - - This value is not a valid HTML5 color. - 该数值不是个有效的 HTML5 颜色。 - - - Please enter a valid birthdate. - 请输入有效的生日日期。 - - - The selected choice is invalid. - 所选的选项无效。 - - - The collection is invalid. - 集合无效。 - - - Please select a valid color. - 请选择有效的颜色。 - - - Please select a valid country. - 请选择有效的国家。 - - - Please select a valid currency. - 请选择有效的货币。 - - - Please choose a valid date interval. - 请选择有效的日期间隔。 - - - Please enter a valid date and time. - 请输入有效的日期与时间。 - - - Please enter a valid date. - 请输入有效的日期。 - - - Please select a valid file. - 请选择有效的文件。 - - - The hidden field is invalid. - 隐藏字段无效。 - - - Please enter an integer. - 请输入整数。 - - - Please select a valid language. - 请选择有效的语言。 - - - Please select a valid locale. - 请选择有效的语言环境。 - - - Please enter a valid money amount. - 请输入正确的金额。 - - - Please enter a number. - 请输入数字。 - - - The password is invalid. - 密码无效。 - - - Please enter a percentage value. - 请输入百分比值。 - - - The values do not match. - 数值不匹配。 - - - Please enter a valid time. - 请输入有效的时间。 - - - Please select a valid timezone. - 请选择有效的时区。 - - - Please enter a valid URL. - 请输入有效的网址。 - - - Please enter a valid search term. - 请输入有效的搜索词。 - - - Please provide a valid phone number. - 请提供有效的手机号码。 - - - The checkbox has an invalid value. - 无效的选框值。 - - - Please enter a valid email address. - 请输入有效的电子邮件地址。 - - - Please select a valid option. - 请选择有效的选项。 - - - Please select a valid range. - 请选择有效的范围。 - - - Please enter a valid week. - 请输入有效的星期。 - - - - diff --git a/vendor/symfony/form/Resources/translations/validators.zh_TW.xlf b/vendor/symfony/form/Resources/translations/validators.zh_TW.xlf deleted file mode 100644 index 858b9db..0000000 --- a/vendor/symfony/form/Resources/translations/validators.zh_TW.xlf +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - This form should not contain extra fields. - 該表單中不可有額外字段。 - - - The uploaded file was too large. Please try to upload a smaller file. - 上傳文件太大, 請重新嘗試上傳一個較小的文件。 - - - The CSRF token is invalid. Please try to resubmit the form. - CSRF 驗證符無效, 請重新提交。 - - - This value is not a valid HTML5 color. - 該數值不是個有效的 HTML5 顏色。 - - - Please enter a valid birthdate. - 請輸入有效的生日日期。 - - - The selected choice is invalid. - 所選的選項無效。 - - - The collection is invalid. - 集合無效。 - - - Please select a valid color. - 請選擇有效的顏色。 - - - Please select a valid country. - 請選擇有效的國家。 - - - Please select a valid currency. - 請選擇有效的貨幣。 - - - Please choose a valid date interval. - 請選擇有效的日期間隔。 - - - Please enter a valid date and time. - 請輸入有效的日期與時間。 - - - Please enter a valid date. - 請輸入有效的日期。 - - - Please select a valid file. - 請選擇有效的文件。 - - - The hidden field is invalid. - 隱藏字段無效。 - - - Please enter an integer. - 請輸入整數。 - - - Please select a valid language. - 請選擇有效的語言。 - - - Please select a valid locale. - 請選擇有效的語言環境。 - - - Please enter a valid money amount. - 請輸入正確的金額。 - - - Please enter a number. - 請輸入數字。 - - - The password is invalid. - 密碼無效。 - - - Please enter a percentage value. - 請輸入百分比值。 - - - The values do not match. - 數值不匹配。 - - - Please enter a valid time. - 請輸入有效的時間。 - - - Please select a valid timezone. - 請選擇有效的時區。 - - - Please enter a valid URL. - 請輸入有效的網址。 - - - Please enter a valid search term. - 請輸入有效的搜索詞。 - - - Please provide a valid phone number. - 請提供有效的手機號碼。 - - - The checkbox has an invalid value. - 無效的選框值。 - - - Please enter a valid email address. - 請輸入有效的電子郵件地址。 - - - Please select a valid option. - 請選擇有效的選項。 - - - Please select a valid range. - 請選擇有效的範圍。 - - - Please enter a valid week. - 請輸入有效的星期。 - - - - diff --git a/vendor/symfony/form/ReversedTransformer.php b/vendor/symfony/form/ReversedTransformer.php deleted file mode 100644 index 8089e47..0000000 --- a/vendor/symfony/form/ReversedTransformer.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * Reverses a transformer. - * - * When the transform() method is called, the reversed transformer's - * reverseTransform() method is called and vice versa. - * - * @author Bernhard Schussek - */ -class ReversedTransformer implements DataTransformerInterface -{ - protected $reversedTransformer; - - public function __construct(DataTransformerInterface $reversedTransformer) - { - $this->reversedTransformer = $reversedTransformer; - } - - /** - * {@inheritdoc} - */ - public function transform($value) - { - return $this->reversedTransformer->reverseTransform($value); - } - - /** - * {@inheritdoc} - */ - public function reverseTransform($value) - { - return $this->reversedTransformer->transform($value); - } -} diff --git a/vendor/symfony/form/SubmitButton.php b/vendor/symfony/form/SubmitButton.php deleted file mode 100644 index 520f223..0000000 --- a/vendor/symfony/form/SubmitButton.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A button that submits the form. - * - * @author Bernhard Schussek - */ -class SubmitButton extends Button implements ClickableInterface -{ - private $clicked = false; - - /** - * {@inheritdoc} - */ - public function isClicked() - { - return $this->clicked; - } - - /** - * Submits data to the button. - * - * @param array|string|null $submittedData The data - * @param bool $clearMissing Not used - * - * @return $this - * - * @throws Exception\AlreadySubmittedException if the form has already been submitted - */ - public function submit($submittedData, bool $clearMissing = true) - { - if ($this->getConfig()->getDisabled()) { - $this->clicked = false; - - return $this; - } - - parent::submit($submittedData, $clearMissing); - - $this->clicked = null !== $submittedData; - - return $this; - } -} diff --git a/vendor/symfony/form/SubmitButtonBuilder.php b/vendor/symfony/form/SubmitButtonBuilder.php deleted file mode 100644 index 3045e0d..0000000 --- a/vendor/symfony/form/SubmitButtonBuilder.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A builder for {@link SubmitButton} instances. - * - * @author Bernhard Schussek - */ -class SubmitButtonBuilder extends ButtonBuilder -{ - /** - * Creates the button. - * - * @return SubmitButton - */ - public function getForm() - { - return new SubmitButton($this->getFormConfig()); - } -} diff --git a/vendor/symfony/form/SubmitButtonTypeInterface.php b/vendor/symfony/form/SubmitButtonTypeInterface.php deleted file mode 100644 index f7ac13f..0000000 --- a/vendor/symfony/form/SubmitButtonTypeInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form; - -/** - * A type that should be converted into a {@link SubmitButton} instance. - * - * @author Bernhard Schussek - */ -interface SubmitButtonTypeInterface extends FormTypeInterface -{ -} diff --git a/vendor/symfony/form/Test/FormBuilderInterface.php b/vendor/symfony/form/Test/FormBuilderInterface.php deleted file mode 100644 index 185a8a1..0000000 --- a/vendor/symfony/form/Test/FormBuilderInterface.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\FormBuilderInterface as BaseFormBuilderInterface; - -interface FormBuilderInterface extends \Iterator, BaseFormBuilderInterface -{ -} diff --git a/vendor/symfony/form/Test/FormIntegrationTestCase.php b/vendor/symfony/form/Test/FormIntegrationTestCase.php deleted file mode 100644 index 4feb8df..0000000 --- a/vendor/symfony/form/Test/FormIntegrationTestCase.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\Forms; - -/** - * @author Bernhard Schussek - */ -abstract class FormIntegrationTestCase extends TestCase -{ - /** - * @var FormFactoryInterface - */ - protected $factory; - - protected function setUp(): void - { - $this->factory = Forms::createFormFactoryBuilder() - ->addExtensions($this->getExtensions()) - ->addTypeExtensions($this->getTypeExtensions()) - ->addTypes($this->getTypes()) - ->addTypeGuessers($this->getTypeGuessers()) - ->getFormFactory(); - } - - protected function getExtensions() - { - return []; - } - - protected function getTypeExtensions() - { - return []; - } - - protected function getTypes() - { - return []; - } - - protected function getTypeGuessers() - { - return []; - } -} diff --git a/vendor/symfony/form/Test/FormInterface.php b/vendor/symfony/form/Test/FormInterface.php deleted file mode 100644 index 4af4603..0000000 --- a/vendor/symfony/form/Test/FormInterface.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\FormInterface as BaseFormInterface; - -interface FormInterface extends \Iterator, BaseFormInterface -{ -} diff --git a/vendor/symfony/form/Test/FormPerformanceTestCase.php b/vendor/symfony/form/Test/FormPerformanceTestCase.php deleted file mode 100644 index 732f9ec..0000000 --- a/vendor/symfony/form/Test/FormPerformanceTestCase.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\Form\Tests\VersionAwareTest; - -/** - * Base class for performance tests. - * - * Copied from Doctrine 2's OrmPerformanceTestCase. - * - * @author robo - * @author Bernhard Schussek - */ -abstract class FormPerformanceTestCase extends FormIntegrationTestCase -{ - use VersionAwareTest; - - /** - * @var int - */ - protected $maxRunningTime = 0; - - /** - * {@inheritdoc} - */ - protected function runTest() - { - $s = microtime(true); - parent::runTest(); - $time = microtime(true) - $s; - - if (0 != $this->maxRunningTime && $time > $this->maxRunningTime) { - $this->fail(sprintf('expected running time: <= %s but was: %s', $this->maxRunningTime, $time)); - } - } - - /** - * @throws \InvalidArgumentException - */ - public function setMaxRunningTime(int $maxRunningTime) - { - if ($maxRunningTime < 0) { - throw new \InvalidArgumentException(); - } - - $this->maxRunningTime = $maxRunningTime; - } - - /** - * @return int - */ - public function getMaxRunningTime() - { - return $this->maxRunningTime; - } -} diff --git a/vendor/symfony/form/Test/Traits/ValidatorExtensionTrait.php b/vendor/symfony/form/Test/Traits/ValidatorExtensionTrait.php deleted file mode 100644 index b4b35fa..0000000 --- a/vendor/symfony/form/Test/Traits/ValidatorExtensionTrait.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test\Traits; - -use Symfony\Component\Form\Extension\Validator\ValidatorExtension; -use Symfony\Component\Form\Test\TypeTestCase; -use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Validator\ValidatorInterface; - -trait ValidatorExtensionTrait -{ - /** - * @var ValidatorInterface|null - */ - protected $validator; - - protected function getValidatorExtension(): ValidatorExtension - { - if (!interface_exists(ValidatorInterface::class)) { - throw new \Exception('In order to use the "ValidatorExtensionTrait", the symfony/validator component must be installed.'); - } - - if (!$this instanceof TypeTestCase) { - throw new \Exception(sprintf('The trait "ValidatorExtensionTrait" can only be added to a class that extends "%s".', TypeTestCase::class)); - } - - $this->validator = $this->createMock(ValidatorInterface::class); - $metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->setMethods(['addPropertyConstraint'])->getMock(); - $this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata)); - $this->validator->expects($this->any())->method('validate')->will($this->returnValue(new ConstraintViolationList())); - - return new ValidatorExtension($this->validator, false); - } -} diff --git a/vendor/symfony/form/Test/TypeTestCase.php b/vendor/symfony/form/Test/TypeTestCase.php deleted file mode 100644 index a925c55..0000000 --- a/vendor/symfony/form/Test/TypeTestCase.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Test; - -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Form\FormBuilder; -use Symfony\Component\Form\Test\Traits\ValidatorExtensionTrait; - -abstract class TypeTestCase extends FormIntegrationTestCase -{ - /** - * @var FormBuilder - */ - protected $builder; - - /** - * @var EventDispatcherInterface - */ - protected $dispatcher; - - protected function setUp(): void - { - parent::setUp(); - - $this->dispatcher = $this->createMock(EventDispatcherInterface::class); - $this->builder = new FormBuilder('', null, $this->dispatcher, $this->factory); - } - - protected function tearDown(): void - { - if (\in_array(ValidatorExtensionTrait::class, class_uses($this))) { - $this->validator = null; - } - } - - protected function getExtensions() - { - $extensions = []; - - if (\in_array(ValidatorExtensionTrait::class, class_uses($this))) { - $extensions[] = $this->getValidatorExtension(); - } - - return $extensions; - } - - public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual) - { - self::assertEquals($expected->format('c'), $actual->format('c')); - } - - public static function assertDateIntervalEquals(\DateInterval $expected, \DateInterval $actual) - { - self::assertEquals($expected->format('%RP%yY%mM%dDT%hH%iM%sS'), $actual->format('%RP%yY%mM%dDT%hH%iM%sS')); - } -} diff --git a/vendor/symfony/form/Util/FormUtil.php b/vendor/symfony/form/Util/FormUtil.php deleted file mode 100644 index fed96de..0000000 --- a/vendor/symfony/form/Util/FormUtil.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * @author Bernhard Schussek - */ -class FormUtil -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Returns whether the given data is empty. - * - * This logic is reused multiple times throughout the processing of - * a form and needs to be consistent. PHP keyword `empty` cannot - * be used as it also considers 0 and "0" to be empty. - * - * @param mixed $data - * - * @return bool - */ - public static function isEmpty($data) - { - // Should not do a check for [] === $data!!! - // This method is used in occurrences where arrays are - // not considered to be empty, ever. - return null === $data || '' === $data; - } -} diff --git a/vendor/symfony/form/Util/InheritDataAwareIterator.php b/vendor/symfony/form/Util/InheritDataAwareIterator.php deleted file mode 100644 index 7cba17d..0000000 --- a/vendor/symfony/form/Util/InheritDataAwareIterator.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * Iterator that traverses an array of forms. - * - * Contrary to \ArrayIterator, this iterator recognizes changes in the original - * array during iteration. - * - * You can wrap the iterator into a {@link \RecursiveIteratorIterator} in order to - * enter any child form that inherits its parent's data and iterate the children - * of that form as well. - * - * @author Bernhard Schussek - */ -class InheritDataAwareIterator extends \IteratorIterator implements \RecursiveIterator -{ - /** - * {@inheritdoc} - * - * @return static - */ - #[\ReturnTypeWillChange] - public function getChildren() - { - return new static($this->current()); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function hasChildren() - { - return (bool) $this->current()->getConfig()->getInheritData(); - } -} diff --git a/vendor/symfony/form/Util/OptionsResolverWrapper.php b/vendor/symfony/form/Util/OptionsResolverWrapper.php deleted file mode 100644 index 078f93d..0000000 --- a/vendor/symfony/form/Util/OptionsResolverWrapper.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -use Symfony\Component\OptionsResolver\Exception\AccessException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Yonel Ceruto - * - * @internal - */ -class OptionsResolverWrapper extends OptionsResolver -{ - private $undefined = []; - - /** - * @return $this - */ - public function setNormalizer(string $option, \Closure $normalizer): self - { - try { - parent::setNormalizer($option, $normalizer); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @return $this - */ - public function setAllowedValues(string $option, $allowedValues): self - { - try { - parent::setAllowedValues($option, $allowedValues); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @return $this - */ - public function addAllowedValues(string $option, $allowedValues): self - { - try { - parent::addAllowedValues($option, $allowedValues); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @param string|array $allowedTypes - * - * @return $this - */ - public function setAllowedTypes(string $option, $allowedTypes): self - { - try { - parent::setAllowedTypes($option, $allowedTypes); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - /** - * @param string|array $allowedTypes - * - * @return $this - */ - public function addAllowedTypes(string $option, $allowedTypes): self - { - try { - parent::addAllowedTypes($option, $allowedTypes); - } catch (UndefinedOptionsException $e) { - $this->undefined[$option] = true; - } - - return $this; - } - - public function resolve(array $options = []): array - { - throw new AccessException('Resolve options is not supported.'); - } - - public function getUndefinedOptions(): array - { - return array_keys($this->undefined); - } -} diff --git a/vendor/symfony/form/Util/OrderedHashMap.php b/vendor/symfony/form/Util/OrderedHashMap.php deleted file mode 100644 index 7d84cbe..0000000 --- a/vendor/symfony/form/Util/OrderedHashMap.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * A hash map which keeps track of deletions and additions. - * - * Like in associative arrays, elements can be mapped to integer or string keys. - * Unlike associative arrays, the map keeps track of the order in which keys - * were added and removed. This order is reflected during iteration. - * - * The map supports concurrent modification during iteration. That means that - * you can insert and remove elements from within a foreach loop and the - * iterator will reflect those changes accordingly. - * - * While elements that are added during the loop are recognized by the iterator, - * changed elements are not. Otherwise the loop could be infinite if each loop - * changes the current element: - * - * $map = new OrderedHashMap(); - * $map[1] = 1; - * $map[2] = 2; - * $map[3] = 3; - * - * foreach ($map as $index => $value) { - * echo "$index: $value\n" - * if (1 === $index) { - * $map[1] = 4; - * $map[] = 5; - * } - * } - * - * print_r(iterator_to_array($map)); - * - * // => 1: 1 - * // 2: 2 - * // 3: 3 - * // 4: 5 - * // Array - * // ( - * // [1] => 4 - * // [2] => 2 - * // [3] => 3 - * // [4] => 5 - * // ) - * - * The map also supports multiple parallel iterators. That means that you can - * nest foreach loops without affecting each other's iteration: - * - * foreach ($map as $index => $value) { - * foreach ($map as $index2 => $value2) { - * // ... - * } - * } - * - * @author Bernhard Schussek - * - * @template TKey of array-key - * @template TValue - * - * @implements \ArrayAccess - * @implements \IteratorAggregate - */ -class OrderedHashMap implements \ArrayAccess, \IteratorAggregate, \Countable -{ - /** - * The elements of the map, indexed by their keys. - * - * @var array - */ - private $elements = []; - - /** - * The keys of the map in the order in which they were inserted or changed. - * - * @var list - */ - private $orderedKeys = []; - - /** - * References to the cursors of all open iterators. - * - * @var array - */ - private $managedCursors = []; - - /** - * Creates a new map. - * - * @param array $elements The elements to insert initially - */ - public function __construct(array $elements = []) - { - $this->elements = $elements; - $this->orderedKeys = array_keys($elements); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return isset($this->elements[$key]); - } - - /** - * {@inheritdoc} - * - * @return TValue - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - if (!isset($this->elements[$key])) { - throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $key)); - } - - return $this->elements[$key]; - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - if (null === $key || !isset($this->elements[$key])) { - if (null === $key) { - $key = [] === $this->orderedKeys - // If the array is empty, use 0 as key - ? 0 - // Imitate PHP behavior of generating a key that equals - // the highest existing integer key + 1 - : 1 + (int) max($this->orderedKeys); - } - - $this->orderedKeys[] = (string) $key; - } - - $this->elements[$key] = $value; - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if (false !== ($position = array_search((string) $key, $this->orderedKeys))) { - array_splice($this->orderedKeys, $position, 1); - unset($this->elements[$key]); - - foreach ($this->managedCursors as $i => $cursor) { - if ($cursor >= $position) { - --$this->managedCursors[$i]; - } - } - } - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new OrderedHashMapIterator($this->elements, $this->orderedKeys, $this->managedCursors); - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->elements); - } -} diff --git a/vendor/symfony/form/Util/OrderedHashMapIterator.php b/vendor/symfony/form/Util/OrderedHashMapIterator.php deleted file mode 100644 index e91e333..0000000 --- a/vendor/symfony/form/Util/OrderedHashMapIterator.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * Iterator for {@link OrderedHashMap} objects. - * - * @author Bernhard Schussek - * - * @internal - * - * @template-covariant TKey of array-key - * @template-covariant TValue - * - * @implements \Iterator - */ -class OrderedHashMapIterator implements \Iterator -{ - /** - * @var array - */ - private $elements; - - /** - * @var list - */ - private $orderedKeys; - - /** - * @var int - */ - private $cursor = 0; - - /** - * @var int - */ - private $cursorId; - - /** - * @var array - */ - private $managedCursors; - - /** - * @var TKey|null - */ - private $key; - - /** - * @var TValue|null - */ - private $current; - - /** - * @param array $elements The elements of the map, indexed by their - * keys - * @param list $orderedKeys The keys of the map in the order in which - * they should be iterated - * @param array $managedCursors An array from which to reference the - * iterator's cursor as long as it is alive. - * This array is managed by the corresponding - * {@link OrderedHashMap} instance to support - * recognizing the deletion of elements. - */ - public function __construct(array &$elements, array &$orderedKeys, array &$managedCursors) - { - $this->elements = &$elements; - $this->orderedKeys = &$orderedKeys; - $this->managedCursors = &$managedCursors; - $this->cursorId = \count($managedCursors); - - $this->managedCursors[$this->cursorId] = &$this->cursor; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Removes the iterator's cursors from the managed cursors of the - * corresponding {@link OrderedHashMap} instance. - */ - public function __destruct() - { - // Use array_splice() instead of unset() to prevent holes in the - // array indices, which would break the initialization of $cursorId - array_splice($this->managedCursors, $this->cursorId, 1); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function current() - { - return $this->current; - } - - /** - * {@inheritdoc} - */ - public function next(): void - { - ++$this->cursor; - - if (isset($this->orderedKeys[$this->cursor])) { - $this->key = $this->orderedKeys[$this->cursor]; - $this->current = $this->elements[$this->key]; - } else { - $this->key = null; - $this->current = null; - } - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function key() - { - if (null === $this->key) { - return null; - } - - $array = [$this->key => null]; - - return key($array); - } - - /** - * {@inheritdoc} - */ - public function valid(): bool - { - return null !== $this->key; - } - - /** - * {@inheritdoc} - */ - public function rewind(): void - { - $this->cursor = 0; - - if (isset($this->orderedKeys[0])) { - $this->key = $this->orderedKeys[0]; - $this->current = $this->elements[$this->key]; - } else { - $this->key = null; - $this->current = null; - } - } -} diff --git a/vendor/symfony/form/Util/ServerParams.php b/vendor/symfony/form/Util/ServerParams.php deleted file mode 100644 index a88c526..0000000 --- a/vendor/symfony/form/Util/ServerParams.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -use Symfony\Component\HttpFoundation\RequestStack; - -/** - * @author Bernhard Schussek - */ -class ServerParams -{ - private $requestStack; - - public function __construct(RequestStack $requestStack = null) - { - $this->requestStack = $requestStack; - } - - /** - * Returns true if the POST max size has been exceeded in the request. - * - * @return bool - */ - public function hasPostMaxSizeBeenExceeded() - { - $contentLength = $this->getContentLength(); - $maxContentLength = $this->getPostMaxSize(); - - return $maxContentLength && $contentLength > $maxContentLength; - } - - /** - * Returns maximum post size in bytes. - * - * @return int|float|null - */ - public function getPostMaxSize() - { - $iniMax = strtolower($this->getNormalizedIniPostMaxSize()); - - if ('' === $iniMax) { - return null; - } - - $max = ltrim($iniMax, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($iniMax, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Returns the normalized "post_max_size" ini setting. - * - * @return string - */ - public function getNormalizedIniPostMaxSize() - { - return strtoupper(trim(ini_get('post_max_size'))); - } - - /** - * Returns the content length of the request. - * - * @return mixed - */ - public function getContentLength() - { - if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) { - return $request->server->get('CONTENT_LENGTH'); - } - - return isset($_SERVER['CONTENT_LENGTH']) - ? (int) $_SERVER['CONTENT_LENGTH'] - : null; - } -} diff --git a/vendor/symfony/form/Util/StringUtil.php b/vendor/symfony/form/Util/StringUtil.php deleted file mode 100644 index db60f95..0000000 --- a/vendor/symfony/form/Util/StringUtil.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Util; - -/** - * @author Issei Murasawa - * @author Bernhard Schussek - */ -class StringUtil -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Returns the trimmed data. - * - * @return string - */ - public static function trim(string $string) - { - if (null !== $result = @preg_replace('/^[\pZ\p{Cc}\p{Cf}]+|[\pZ\p{Cc}\p{Cf}]+$/u', '', $string)) { - return $result; - } - - return trim($string); - } - - /** - * Converts a fully-qualified class name to a block prefix. - * - * @param string $fqcn The fully-qualified class name - * - * @return string|null - */ - public static function fqcnToBlockPrefix(string $fqcn) - { - // Non-greedy ("+?") to match "type" suffix, if present - if (preg_match('~([^\\\\]+?)(type)?$~i', $fqcn, $matches)) { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $matches[1])); - } - - return null; - } -} diff --git a/vendor/symfony/form/composer.json b/vendor/symfony/form/composer.json deleted file mode 100644 index ff9e6b9..0000000 --- a/vendor/symfony/form/composer.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "symfony/form", - "type": "library", - "description": "Allows to easily create, process and reuse HTML forms", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/options-resolver": "^5.1|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.23", - "symfony/property-access": "^5.0.8|^6.0", - "symfony/service-contracts": "^1.1|^2|^3" - }, - "require-dev": { - "doctrine/collections": "~1.0", - "symfony/validator": "^4.4.17|^5.1.9|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<4.4", - "symfony/doctrine-bridge": "<4.4", - "symfony/error-handler": "<4.4.5", - "symfony/framework-bundle": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<4.4", - "symfony/translation-contracts": "<1.1.7", - "symfony/twig-bridge": "<4.4" - }, - "suggest": { - "symfony/validator": "For form validation.", - "symfony/security-csrf": "For protecting forms against CSRF attacks.", - "symfony/twig-bridge": "For templating with Twig." - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Form\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/framework-bundle/CHANGELOG.md b/vendor/symfony/framework-bundle/CHANGELOG.md deleted file mode 100644 index ea913ef..0000000 --- a/vendor/symfony/framework-bundle/CHANGELOG.md +++ /dev/null @@ -1,492 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `set_locale_from_accept_language` config option to automatically set the request locale based on the `Accept-Language` - HTTP request header and the `framework.enabled_locales` config option - * Add `set_content_language_from_locale` config option to automatically set the `Content-Language` HTTP response header based on the Request locale - * Deprecate the `framework.translator.enabled_locales`, use `framework.enabled_locales` instead - * Add autowiring alias for `HttpCache\StoreInterface` - * Add the ability to enable the profiler using a request query parameter, body parameter or attribute - * Deprecate the `AdapterInterface` autowiring alias, use `CacheItemPoolInterface` instead - * Deprecate the public `profiler` service to private - * Deprecate `get()`, `has()`, `getDoctrine()`, and `dispatchMessage()` in `AbstractController`, use method/constructor injection instead - * Deprecate the `cache.adapter.doctrine` service - * Add support for resetting container services after each messenger message - * Add `configureContainer()`, `configureRoutes()`, `getConfigDir()` and `getBundlesPath()` to `MicroKernelTrait` - * Add support for configuring log level, and status code by exception class - * Bind the `default_context` parameter onto serializer's encoders and normalizers - * Add support for `statusCode` default parameter when loading a template directly from route using the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller - * Deprecate `translation:update` command, use `translation:extract` instead - * Add `PhpStanExtractor` support for the PropertyInfo component - * Add `cache.adapter.doctrine_dbal` service to replace `cache.adapter.pdo` when a Doctrine DBAL connection is used. - -5.3 ---- - - * Deprecate the `session.storage` alias and `session.storage.*` services, use the `session.storage.factory` alias and `session.storage.factory.*` services instead - * Deprecate the `framework.session.storage_id` configuration option, use the `framework.session.storage_factory_id` configuration option instead - * Deprecate the `session` service and the `SessionInterface` alias, use the `Request::getSession()` or the new `RequestStack::getSession()` methods instead - * Add `AbstractController::renderForm()` to render a form and set the appropriate HTTP status code - * Add support for configuring PHP error level to log levels - * Add the `dispatcher` option to `debug:event-dispatcher` - * Add the `event_dispatcher.dispatcher` tag - * Add `assertResponseFormatSame()` in `BrowserKitAssertionsTrait` - * Add support for configuring UUID factory services - * Add tag `assets.package` to register asset packages - * Add support to use a PSR-6 compatible cache for Doctrine annotations - * Deprecate all other values than "none", "php_array" and "file" for `framework.annotation.cache` - * Add `KernelTestCase::getContainer()` as the best way to get a container in tests - * Rename the container parameter `profiler_listener.only_master_requests` to `profiler_listener.only_main_requests` - * Add service `fragment.uri_generator` to generate the URI of a fragment - * Deprecate registering workflow services as public - * Deprecate option `--xliff-version` of the `translation:update` command, use e.g. `--format=xlf20` instead - * Deprecate option `--output-format` of the `translation:update` command, use e.g. `--format=xlf20` instead - -5.2.0 ------ - - * Added `framework.http_cache` configuration tree - * Added `framework.trusted_proxies` and `framework.trusted_headers` configuration options - * Deprecated the public `form.factory`, `form.type.file`, `translator`, `security.csrf.token_manager`, `serializer`, - `cache_clearer`, `filesystem` and `validator` services to private. - * Added `TemplateAwareDataCollectorInterface` and `AbstractDataCollector` to simplify custom data collector creation and leverage autoconfiguration - * Add `cache.adapter.redis_tag_aware` tag to use `RedisCacheAwareAdapter` - * added `framework.http_client.retry_failing` configuration tree - * added `assertCheckboxChecked()` and `assertCheckboxNotChecked()` in `WebTestCase` - * added `assertFormValue()` and `assertNoFormValue()` in `WebTestCase` - * Added "--as-tree=3" option to `translation:update` command to dump messages as a tree-like structure. The given value defines the level where to switch to inline YAML - * Deprecated the `lock.RESOURCE_NAME` and `lock.RESOURCE_NAME.store` services and the `lock`, `LockInterface`, `lock.store` and `PersistingStoreInterface` aliases, use `lock.RESOURCE_NAME.factory`, `lock.factory` or `LockFactory` instead. - -5.1.0 ------ - * Removed `--no-backup` option from `translation:update` command (broken since `5.0.0`) - * Added link to source for controllers registered as named services - * Added link to source on controller on `router:match`/`debug:router` (when `framework.ide` is configured) - * Added the `framework.router.default_uri` configuration option to configure the default `RequestContext` - * Made `MicroKernelTrait::configureContainer()` compatible with `ContainerConfigurator` - * Added a new `mailer.message_bus` option to configure or disable the message bus to use to send mails. - * Added flex-compatible default implementation for `MicroKernelTrait::registerBundles()` - * Deprecated passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead - * The `TemplateController` now accepts context argument - * Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0 - * Added tag `routing.expression_language_function` to define functions available in route conditions - * Added `debug:container --deprecations` option to see compile-time deprecations. - * Made `BrowserKitAssertionsTrait` report the original error message in case of a failure - * Added ability for `config:dump-reference` and `debug:config` to dump and debug kernel container extension configuration. - * Deprecated `session.attribute_bag` service and `session.flash_bag` service. - -5.0.0 ------ - - * Removed support to load translation resources from the legacy directories `src/Resources/translations/` and `src/Resources//translations/` - * Removed `ControllerNameParser`. - * Removed `ResolveControllerNameSubscriber` - * Removed support for `bundle:controller:action` to reference controllers. Use `serviceOrFqcn::method` instead - * Removed support for PHP templating, use Twig instead - * Removed `Controller`, use `AbstractController` instead - * Removed `Client`, use `KernelBrowser` instead - * Removed `ContainerAwareCommand`, use dependency injection instead - * Removed the `validation.strict_email` option, use `validation.email_validation_mode` instead - * Removed the `cache.app.simple` service and its corresponding PSR-16 autowiring alias - * Removed cache-related compiler passes and `RequestDataCollector` - * Removed the `translator.selector` and `session.save_listener` services - * Removed `SecurityUserValueResolver`, use `UserValueResolver` instead - * Removed `routing.loader.service`. - * Service route loaders must be tagged with `routing.route_loader`. - * Added `slugger` service and `SluggerInterface` alias - * Removed the `lock.store.flock`, `lock.store.semaphore`, `lock.store.memcached.abstract` and `lock.store.redis.abstract` services. - * Removed the `router.cache_class_prefix` parameter. - -4.4.0 ------ - - * Added `lint:container` command to check that services wiring matches type declarations - * Added `MailerAssertionsTrait` - * Deprecated support for `templating` engine in `TemplateController`, use Twig instead - * Deprecated the `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()` - * Deprecated the `controller_name_converter` and `resolve_controller_name_subscriber` services - * The `ControllerResolver` and `DelegatingLoader` classes have been marked as `final` - * Added support for configuring chained cache pools - * Deprecated calling `WebTestCase::createClient()` while a kernel has been booted, ensure the kernel is shut down before calling the method - * Deprecated `routing.loader.service`, use `routing.loader.container` instead. - * Not tagging service route loaders with `routing.route_loader` has been deprecated. - * Overriding the methods `KernelTestCase::tearDown()` and `WebTestCase::tearDown()` without the `void` return-type is deprecated. - * Added new `error_controller` configuration to handle system exceptions - * Added sort option for `translation:update` command. - * [BC Break] The `framework.messenger.routing.senders` config key is not deeply merged anymore. - * Added `secrets:*` commands to deal with secrets seamlessly. - * Made `framework.session.handler_id` accept a DSN - * Marked the `RouterDataCollector` class as `@final`. - * [BC Break] The `framework.messenger.buses..middleware` config key is not deeply merged anymore. - * Moved `MailerAssertionsTrait` in `KernelTestCase` - -4.3.0 ------ - - * Deprecated the `framework.templating` option, configure the Twig bundle instead. - * Added `WebTestAssertionsTrait` (included by default in `WebTestCase`) - * Renamed `Client` to `KernelBrowser` - * Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will - be mandatory in 5.0. - * Deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead - * Added the ability to specify a custom `serializer` option for each - transport under`framework.messenger.transports`. - * Added the `RegisterLocaleAwareServicesPass` and configured the `LocaleAwareListener` - * [BC Break] When using Messenger, the default transport changed from - using Symfony's serializer service to use `PhpSerializer`, which uses - PHP's native `serialize()` and `unserialize()` functions. To use the - original serialization method, set the `framework.messenger.default_serializer` - config option to `messenger.transport.symfony_serializer`. Or set the - `serializer` option under one specific `transport`. - * [BC Break] The `framework.messenger.serializer` config key changed to - `framework.messenger.default_serializer`, which holds the string service - id and `framework.messenger.symfony_serializer`, which configures the - options if you're using Symfony's serializer. - * [BC Break] Removed the `framework.messenger.routing.send_and_handle` configuration. - Instead of setting it to true, configure a `SyncTransport` and route messages to it. - * Added information about deprecated aliases in `debug:autowiring` - * Added php ini session options `sid_length` and `sid_bits_per_character` - to the `session` section of the configuration - * Added support for Translator paths, Twig paths in translation commands. - * Added support for PHP files with translations in translation commands. - * Added support for boolean container parameters within routes. - * Added the `messenger:setup-transports` command to setup messenger transports - * Added a `InMemoryTransport` to Messenger. Use it with a DSN starting with `in-memory://`. - * Added `framework.property_access.throw_exception_on_invalid_property_path` config option. - * Added `cache:pool:list` command to list all available cache pools. - -4.2.0 ------ - - * Added a `AbstractController::addLink()` method to add Link headers to the current response - * Allowed configuring taggable cache pools via a new `framework.cache.pools.tags` option (bool|service-id) - * Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service - * Deprecated auto-injection of the container in AbstractController instances, register them as service subscribers instead - * Deprecated processing of services tagged `security.expression_language_provider` in favor of a new `AddExpressionLanguageProvidersPass` in SecurityBundle. - * Deprecated the `Symfony\Bundle\FrameworkBundle\Controller\Controller` class in favor of `Symfony\Bundle\FrameworkBundle\Controller\AbstractController`. - * Enabled autoconfiguration for `Psr\Log\LoggerAwareInterface` - * Added new "auto" mode for `framework.session.cookie_secure` to turn it on when HTTPS is used - * Removed the `framework.messenger.encoder` and `framework.messenger.decoder` options. Use the `framework.messenger.serializer.id` option to replace the Messenger serializer. - * Deprecated the `ContainerAwareCommand` class in favor of `Symfony\Component\Console\Command\Command` - * Made `debug:container` and `debug:autowiring` ignore backslashes in service ids - * Deprecated the `Templating\Helper\TranslatorHelper::transChoice()` method, use the `trans()` one instead with a `%count%` parameter - * Deprecated `CacheCollectorPass`. Use `Symfony\Component\Cache\DependencyInjection\CacheCollectorPass` instead. - * Deprecated `CachePoolClearerPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolClearerPass` instead. - * Deprecated `CachePoolPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolPass` instead. - * Deprecated `CachePoolPrunerPass`. Use `Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass` instead. - * Deprecated support for legacy translations directories `src/Resources/translations/` and `src/Resources//translations/`, use `translations/` instead. - * Deprecated support for the legacy directory structure in `translation:update` and `debug:translation` commands. - -4.1.0 ------ - - * Allowed to pass an optional `LoggerInterface $logger` instance to the `Router` - * Added a new `parameter_bag` service with related autowiring aliases to access parameters as-a-service - * Allowed the `Router` to work with any PSR-11 container - * Added option in workflow dump command to label graph with a custom label - * Using a `RouterInterface` that does not implement the `WarmableInterface` is deprecated. - * Warming up a router in `RouterCacheWarmer` that does not implement the `WarmableInterface` is deprecated and will not - be supported anymore in 5.0. - * The `RequestDataCollector` class has been deprecated. Use the `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector` class instead. - * The `RedirectController` class allows for 307/308 HTTP status codes - * Deprecated `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead where `serviceOrFqcn` - is either the service ID or the FQCN of the controller. - * Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser` - * The `container.service_locator` tag of `ServiceLocator`s is now autoconfigured. - * Add the ability to search a route in `debug:router`. - * Add the ability to use SameSite cookies for sessions. - -4.0.0 ------ - - * The default `type` option of the `framework.workflows.*` configuration entries is `state_machine` - * removed `AddConsoleCommandPass`, `AddConstraintValidatorsPass`, - `AddValidatorInitializersPass`, `CompilerDebugDumpPass`, `ConfigCachePass`, - `ControllerArgumentValueResolverPass`, `FormPass`, `PropertyInfoPass`, - `RoutingResolverPass`, `SerializerPass`, `ValidateWorkflowsPass` - * made `Translator::__construct()` `$defaultLocale` argument required - * removed `SessionListener`, `TestSessionListener` - * Removed `cache:clear` warmup part along with the `--no-optional-warmers` option - * Removed core form types services registration when unnecessary - * Removed `framework.serializer.cache` option and `serializer.mapping.cache.apc`, `serializer.mapping.cache.doctrine.apc` services - * Removed `ConstraintValidatorFactory` - * Removed class parameters related to routing - * Removed absolute template paths support in the template name parser - * Removed support of the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`. - * Removed the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods. - * Removed the "framework.validation.cache" configuration option. Configure the "cache.validator" service under "framework.cache.pools" instead. - * Removed `PhpStringTokenParser`, use `Symfony\Component\Translation\Extractor\PhpStringTokenParser` instead. - * Removed `PhpExtractor`, use `Symfony\Component\Translation\Extractor\PhpExtractor` instead. - * Removed the `use_strict_mode` session option, it's is now enabled by default - -3.4.0 ------ - - * Added `translator.default_path` option and parameter - * Session `use_strict_mode` is now enabled by default and the corresponding option has been deprecated - * Made the `cache:clear` command to *not* clear "app" PSR-6 cache pools anymore, - but to still clear "system" ones; use the `cache:pool:clear` command to clear "app" pools instead - * Always register a minimalist logger that writes in `stderr` - * Deprecated `profiler.matcher` option - * Added support for `EventSubscriberInterface` on `MicroKernelTrait` - * Removed `doctrine/cache` from the list of required dependencies in `composer.json` - * Deprecated `validator.mapping.cache.doctrine.apc` service - * The `symfony/stopwatch` dependency has been removed, require it via `composer - require symfony/stopwatch` in your `dev` environment. - * Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`. - * Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods. - * Deprecated `AddCacheClearerPass`, use tagged iterator arguments instead. - * Deprecated `AddCacheWarmerPass`, use tagged iterator arguments instead. - * Deprecated `TranslationDumperPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslationDumperPass` instead - * Deprecated `TranslationExtractorPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass` instead - * Deprecated `TranslatorPass`, use - `Symfony\Component\Translation\DependencyInjection\TranslatorPass` instead - * Added `command` attribute to the `console.command` tag which takes the command - name as value, using it makes the command lazy - * Added `cache:pool:prune` command to allow manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool - implementations - * Deprecated `Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader`, use - `Symfony\Component\Translation\Reader\TranslationReader` instead - * Deprecated `translation.loader` service, use `translation.reader` instead - * `AssetsInstallCommand::__construct()` now takes an instance of - `Symfony\Component\Filesystem\Filesystem` as first argument - * `CacheClearCommand::__construct()` now takes an instance of - `Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface` as - first argument - * `CachePoolClearCommand::__construct()` now takes an instance of - `Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer` as - first argument - * `EventDispatcherDebugCommand::__construct()` now takes an instance of - `Symfony\Component\EventDispatcher\EventDispatcherInterface` as - first argument - * `RouterDebugCommand::__construct()` now takes an instance of - `Symfony\Component\Routing\RouterInterface` as - first argument - * `RouterMatchCommand::__construct()` now takes an instance of - `Symfony\Component\Routing\RouterInterface` as - first argument - * `TranslationDebugCommand::__construct()` now takes an instance of - `Symfony\Component\Translation\TranslatorInterface` as - first argument - * `TranslationUpdateCommand::__construct()` now takes an instance of - `Symfony\Component\Translation\TranslatorInterface` as - first argument - * `AssetsInstallCommand`, `CacheClearCommand`, `CachePoolClearCommand`, - `EventDispatcherDebugCommand`, `RouterDebugCommand`, `RouterMatchCommand`, - `TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand` - and `YamlLintCommand` classes have been marked as final - * Added `asset.request_context.base_path` and `asset.request_context.secure` parameters - to provide a default request context in case the stack is empty (similar to `router.request_context.*` parameters) - * Display environment variables managed by `Dotenv` in `AboutCommand` - -3.3.0 ------ - - * Not defining the `type` option of the `framework.workflows.*` configuration entries is deprecated. - The default value will be `state_machine` in Symfony 4.0. - * Deprecated the `CompilerDebugDumpPass` class - * Deprecated the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter - * Added a new version strategy option called "json_manifest_path" - that allows you to use the `JsonManifestVersionStrategy`. - * Added `Symfony\Bundle\FrameworkBundle\Controller\AbstractController`. It provides - the same helpers as the `Controller` class, but does not allow accessing the dependency - injection container, in order to encourage explicit dependency declarations. - * Added support for the `controller.service_arguments` tag, for injecting services into controllers' actions - * Changed default configuration for - assets/forms/validation/translation/serialization/csrf from `canBeEnabled()` to - `canBeDisabled()` when Flex is used - * The server:* commands and their associated router files were moved to WebServerBundle - * Translation related services are not loaded anymore when the `framework.translator` option - is disabled. - * Added `GlobalVariables::getToken()` - * Deprecated `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass`. Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead. - * Added configurable paths for validation files - * Deprecated `SerializerPass`, use `Symfony\Component\Serializer\DependencyInjection\SerializerPass` instead - * Deprecated `FormPass`, use `Symfony\Component\Form\DependencyInjection\FormPass` instead - * Deprecated `SessionListener` - * Deprecated `TestSessionListener` - * Deprecated `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass`. - Use tagged iterator arguments instead. - * Deprecated `PropertyInfoPass`, use `Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass` instead - * Deprecated `ControllerArgumentValueResolverPass`. Use - `Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass` instead - * Deprecated `RoutingResolverPass`, use `Symfony\Component\Routing\DependencyInjection\RoutingResolverPass` instead - * [BC BREAK] The `server:run`, `server:start`, `server:stop` and - `server:status` console commands have been moved to a dedicated bundle. - Require `symfony/web-server-bundle` in your composer.json and register - `Symfony\Bundle\WebServerBundle\WebServerBundle` in your AppKernel to use them. - * Added `$defaultLocale` as 3rd argument of `Translator::__construct()` - making `Translator` works with any PSR-11 container - * Added `framework.serializer.mapping` config option allowing to define custom - serialization mapping files and directories - * Deprecated `AddValidatorInitializersPass`, use - `Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass` instead - * Deprecated `AddConstraintValidatorsPass`, use - `Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass` instead - * Deprecated `ValidateWorkflowsPass`, use - `Symfony\Component\Workflow\DependencyInjection\ValidateWorkflowsPass` instead - * Deprecated `ConstraintValidatorFactory`, use - `Symfony\Component\Validator\ContainerConstraintValidatorFactory` instead. - * Deprecated `PhpStringTokenParser`, use - `Symfony\Component\Translation\Extractor\PhpStringTokenParser` instead. - * Deprecated `PhpExtractor`, use - `Symfony\Component\Translation\Extractor\PhpExtractor` instead. - -3.2.0 ------ - - * Removed `doctrine/annotations` from the list of required dependencies in `composer.json` - * Removed `symfony/security-core` and `symfony/security-csrf` from the list of required dependencies in `composer.json` - * Removed `symfony/templating` from the list of required dependencies in `composer.json` - * Removed `symfony/translation` from the list of required dependencies in `composer.json` - * Removed `symfony/asset` from the list of required dependencies in `composer.json` - * The `Resources/public/images/*` files have been removed. - * The `Resources/public/css/*.css` files have been removed (they are now inlined in TwigBundle). - * Added possibility to prioritize form type extensions with `'priority'` attribute on tags `form.type_extension` - -3.1.0 ------ - - * Added `Controller::json` to simplify creating JSON responses when using the Serializer component - * Deprecated absolute template paths support in the template name parser - * Deprecated using core form types without dependencies as services - * Added `Symfony\Component\HttpHernel\DataCollector\RequestDataCollector::onKernelResponse()` - * Added `Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector` - * The `framework.serializer.cache` option and the service `serializer.mapping.cache.apc` have been - deprecated. APCu should now be automatically used when available. - -3.0.0 ------ - - * removed `validator.api` parameter - * removed `alias` option of the `form.type` tag - -2.8.0 ------ - - * Deprecated the `alias` option of the `form.type_extension` tag in favor of the - `extended_type`/`extended-type` option - * Deprecated the `alias` option of the `form.type` tag - * Deprecated the Shell - -2.7.0 ------ - - * Added possibility to extract translation messages from a file or files besides extracting from a directory - * Added `TranslationsCacheWarmer` to create catalogues at warmup - -2.6.0 ------ - - * Added helper commands (`server:start`, `server:stop` and `server:status`) to control the built-in web - server in the background - * Added `Controller::isCsrfTokenValid` helper - * Added configuration for the PropertyAccess component - * Added `Controller::redirectToRoute` helper - * Added `Controller::addFlash` helper - * Added `Controller::isGranted` helper - * Added `Controller::denyAccessUnlessGranted` helper - * Deprecated `app.security` in twig as `app.user` and `is_granted()` are already available - -2.5.0 ------ - - * Added `translation:debug` command - * Added `--no-backup` option to `translation:update` command - * Added `config:debug` command - * Added `yaml:lint` command - * Deprecated the `RouterApacheDumperCommand` which will be removed in Symfony 3.0. - -2.4.0 ------ - - * allowed multiple IP addresses in profiler matcher settings - * added stopwatch helper to time templates with the WebProfilerBundle - * added service definition for "security.secure_random" service - * added service definitions for the new Security CSRF sub-component - -2.3.0 ------ - - * [BC BREAK] added a way to disable the profiler (when disabling the profiler, it is now completely removed) - To get the same "disabled" behavior as before, set `enabled` to `true` and `collect` to `false` - * [BC BREAK] the `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass` was moved - to `Component\HttpKernel\DependencyInjection\RegisterListenersPass` - * added ControllerNameParser::build() which converts a controller short notation (a:b:c) to a class::method notation - * added possibility to run PHP built-in server in production environment - * added possibility to load the serializer component in the service container - * added route debug information when using the `router:match` command - * added `TimedPhpEngine` - * added `--clean` option to the `translation:update` command - * added `http_method_override` option - * added support for default templates per render tag - * added FormHelper::form(), FormHelper::start() and FormHelper::end() - * deprecated FormHelper::enctype() in favor of FormHelper::start() - * RedirectController actions now receive the Request instance via the method signature. - -2.2.0 ------ - - * added a new `uri_signer` service to help sign URIs - * deprecated `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` and `Symfony\Bundle\FrameworkBundle\HttpKernel::forward()` - * deprecated the `Symfony\Bundle\FrameworkBundle\HttpKernel` class in favor of `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` - * added support for adding new HTTP content rendering strategies (like ESI and Hinclude) - in the DIC via the `kernel.fragment_renderer` tag - * [BC BREAK] restricted the `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method to only accept URIs or ControllerReference instances - * `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument - must now be a URI or a ControllerReference instance (the `generateInternalUri()` method was removed) - * The internal routes (`Resources/config/routing/internal.xml`) have been removed and replaced with a listener (`Symfony\Component\HttpKernel\EventListener\FragmentListener`) - * The `render` method of the `actions` templating helper signature and arguments changed - * replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver - * replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher - * added Client::enableProfiler() - * a new parameter has been added to the DIC: `router.request_context.base_url` - You can customize it for your functional tests or for generating URLs with - the right base URL when your are in the CLI context. - * added support for default templates per render tag - -2.1.0 ------ - - * moved the translation files to the Form and Validator components - * changed the default extension for XLIFF files from .xliff to .xlf - * moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher - * moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher - * added a router:match command - * added a config:dump-reference command - * added a server:run command - * added kernel.event_subscriber tag - * added a way to create relative symlinks when running assets:install command (--relative option) - * added Controller::getUser() - * [BC BREAK] assets_base_urls and base_urls merging strategy has changed - * changed the default profiler storage to use the filesystem instead of SQLite - * added support for placeholders in route defaults and requirements (replaced - by the value set in the service container) - * added Filesystem component as a dependency - * added support for hinclude (use ``standalone: 'js'`` in render tag) - * session options: lifetime, path, domain, secure, httponly were deprecated. - Prefixed versions should now be used instead: cookie_lifetime, cookie_path, - cookie_domain, cookie_secure, cookie_httponly - * [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', - 'httponly' are now prefixed with cookie_ when dumped to the container - * Added `handler_id` configuration under `session` key to represent `session.handler` - service, defaults to `session.handler.native_file`. - * Added `gc_maxlifetime`, `gc_probability`, and `gc_divisor` to session - configuration. This means session garbage collection has a - `gc_probability`/`gc_divisor` chance of being run. The `gc_maxlifetime` defines - how long a session can idle for. It is different from cookie lifetime which - declares how long a cookie can be stored on the remote client. - * Removed 'auto_start' configuration parameter from session config. The session will - start on demand. - * [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated - parser: TemplateFilenameParser::parse(). - * [BC BREAK] Kernel parameters are replaced by their value wherever they appear - in Route patterns, requirements and defaults. Use '%%' as the escaped value for '%'. - * [BC BREAK] Switched behavior of flash messages to expire flash messages on retrieval - using Symfony\Component\HttpFoundation\Session\Flash\FlashBag as opposed to on - next pageload regardless of whether they are displayed or not. diff --git a/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php deleted file mode 100644 index 17e0660..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; - -abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface -{ - private $phpArrayFile; - - /** - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(string $phpArrayFile) - { - $this->phpArrayFile = $phpArrayFile; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - $arrayAdapter = new ArrayAdapter(); - - spl_autoload_register([ClassExistenceResource::class, 'throwOnRequiredClass']); - try { - if (!$this->doWarmUp($cacheDir, $arrayAdapter)) { - return []; - } - } finally { - spl_autoload_unregister([ClassExistenceResource::class, 'throwOnRequiredClass']); - } - - // the ArrayAdapter stores the values serialized - // to avoid mutation of the data after it was written to the cache - // so here we un-serialize the values first - $values = array_map(function ($val) { return null !== $val ? unserialize($val) : null; }, $arrayAdapter->getValues()); - - return $this->warmUpPhpArrayAdapter(new PhpArrayAdapter($this->phpArrayFile, new NullAdapter()), $values); - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - return (array) $phpArrayAdapter->warmUp($values); - } - - /** - * @internal - */ - final protected function ignoreAutoloadException(string $class, \Exception $exception): void - { - try { - ClassExistenceResource::throwOnRequiredClass($class, $exception); - } catch (\ReflectionException $e) { - } - } - - /** - * @return bool false if there is nothing to warm-up - */ - abstract protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter); -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php deleted file mode 100644 index 5504400..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/AnnotationsCacheWarmer.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -/** - * Warms up annotation caches for classes found in composer's autoload class map - * and declared in DI bundle extensions using the addAnnotatedClassesToCache method. - * - * @author Titouan Galopin - */ -class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $annotationReader; - private $excludeRegexp; - private $debug; - - /** - * @param string $phpArrayFile The PHP file where annotations are cached - */ - public function __construct(Reader $annotationReader, string $phpArrayFile, string $excludeRegexp = null, bool $debug = false) - { - parent::__construct($phpArrayFile); - $this->annotationReader = $annotationReader; - $this->excludeRegexp = $excludeRegexp; - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - $annotatedClassPatterns = $cacheDir.'/annotations.map'; - - if (!is_file($annotatedClassPatterns)) { - return true; - } - - $annotatedClasses = include $annotatedClassPatterns; - $reader = new PsrCachedReader($this->annotationReader, $arrayAdapter, $this->debug); - - foreach ($annotatedClasses as $class) { - if (null !== $this->excludeRegexp && preg_match($this->excludeRegexp, $class)) { - continue; - } - try { - $this->readAllComponents($reader, $class); - } catch (\Exception $e) { - $this->ignoreAutoloadException($class, $e); - } - } - - return true; - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - // make sure we don't cache null values - $values = array_filter($values, function ($val) { return null !== $val; }); - - return parent::warmUpPhpArrayAdapter($phpArrayAdapter, $values); - } - - private function readAllComponents(Reader $reader, string $class) - { - $reflectionClass = new \ReflectionClass($class); - - try { - $reader->getClassAnnotations($reflectionClass); - } catch (AnnotationException $e) { - /* - * Ignore any AnnotationException to not break the cache warming process if an Annotation is badly - * configured or could not be found / read / etc. - * - * In particular cases, an Annotation in your code can be used and defined only for a specific - * environment but is always added to the annotations.map file by some Symfony default behaviors, - * and you always end up with a not found Annotation. - */ - } - - foreach ($reflectionClass->getMethods() as $reflectionMethod) { - try { - $reader->getMethodAnnotations($reflectionMethod); - } catch (AnnotationException $e) { - } - } - - foreach ($reflectionClass->getProperties() as $reflectionProperty) { - try { - $reader->getPropertyAnnotations($reflectionProperty); - } catch (AnnotationException $e) { - } - } - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php deleted file mode 100644 index 79bca24..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/CachePoolClearerCacheWarmer.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; - -/** - * Clears the cache pools when warming up the cache. - * - * Do not use in production! - * - * @author Teoh Han Hui - * - * @internal - */ -final class CachePoolClearerCacheWarmer implements CacheWarmerInterface -{ - private $poolClearer; - private $pools; - - /** - * @param string[] $pools - */ - public function __construct(Psr6CacheClearer $poolClearer, array $pools = []) - { - $this->poolClearer = $poolClearer; - $this->pools = $pools; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDirectory): array - { - foreach ($this->pools as $pool) { - if ($this->poolClearer->hasPool($pool)) { - $this->poolClearer->clearPool($pool); - } - } - - return []; - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - // optional cache warmers are not run when handling the request - return false; - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php deleted file mode 100644 index ed20bbc..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Generate all config builders. - * - * @author Tobias Nyholm - */ -class ConfigBuilderCacheWarmer implements CacheWarmerInterface -{ - private $kernel; - private $logger; - - public function __construct(KernelInterface $kernel, LoggerInterface $logger = null) - { - $this->kernel = $kernel; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - $generator = new ConfigBuilderGenerator($cacheDir); - - foreach ($this->kernel->getBundles() as $bundle) { - $extension = $bundle->getContainerExtension(); - if (null === $extension) { - continue; - } - - try { - $this->dumpExtension($extension, $generator); - } catch (\Exception $e) { - if ($this->logger) { - $this->logger->warning('Failed to generate ConfigBuilder for extension {extensionClass}.', ['exception' => $e, 'extensionClass' => \get_class($extension)]); - } - } - } - - // No need to preload anything - return []; - } - - private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGeneratorInterface $generator): void - { - $configuration = null; - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } elseif ($extension instanceof ConfigurationExtensionInterface) { - $configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag())); - } - - if (!$configuration) { - return; - } - - $generator->build($configuration); - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php deleted file mode 100644 index 6cdf176..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/RouterCacheWarmer.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Routing\RouterInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * Generates the router matcher and generator classes. - * - * @author Fabien Potencier - * - * @final - */ -class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function warmUp(string $cacheDir): array - { - $router = $this->container->get('router'); - - if ($router instanceof WarmableInterface) { - return (array) $router->warmUp($cacheDir); - } - - throw new \LogicException(sprintf('The router "%s" cannot be warmed up because it does not implement "%s".', get_debug_type($router), WarmableInterface::class)); - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices(): array - { - return [ - 'router' => RouterInterface::class, - ]; - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php deleted file mode 100644 index 0ada0ff..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/SerializerCacheWarmer.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; -use Symfony\Component\Serializer\Mapping\Loader\LoaderInterface; -use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader; -use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader; - -/** - * Warms up XML and YAML serializer metadata. - * - * @author Titouan Galopin - */ -class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $loaders; - - /** - * @param LoaderInterface[] $loaders The serializer metadata loaders - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(array $loaders, string $phpArrayFile) - { - parent::__construct($phpArrayFile); - $this->loaders = $loaders; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) { - return false; - } - - $metadataFactory = new CacheClassMetadataFactory(new ClassMetadataFactory(new LoaderChain($this->loaders)), $arrayAdapter); - - foreach ($this->extractSupportedLoaders($this->loaders) as $loader) { - foreach ($loader->getMappedClasses() as $mappedClass) { - try { - $metadataFactory->getMetadataFor($mappedClass); - } catch (AnnotationException $e) { - // ignore failing annotations - } catch (\Exception $e) { - $this->ignoreAutoloadException($mappedClass, $e); - } - } - } - - return true; - } - - /** - * @param LoaderInterface[] $loaders - * - * @return XmlFileLoader[]|YamlFileLoader[] - */ - private function extractSupportedLoaders(array $loaders): array - { - $supportedLoaders = []; - - foreach ($loaders as $loader) { - if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { - $supportedLoaders[] = $loader; - } elseif ($loader instanceof LoaderChain) { - $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders())); - } - } - - return $supportedLoaders; - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php deleted file mode 100644 index e3efc80..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/TranslationsCacheWarmer.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Generates the catalogues for translations. - * - * @author Xavier Leune - */ -class TranslationsCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - private $translator; - - public function __construct(ContainerInterface $container) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - if (null === $this->translator) { - $this->translator = $this->container->get('translator'); - } - - if ($this->translator instanceof WarmableInterface) { - return (array) $this->translator->warmUp($cacheDir); - } - - return []; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'translator' => TranslatorInterface::class, - ]; - } -} diff --git a/vendor/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php b/vendor/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php deleted file mode 100644 index 3c6d582..0000000 --- a/vendor/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; - -use Doctrine\Common\Annotations\AnnotationException; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; -use Symfony\Component\Validator\Mapping\Loader\LoaderChain; -use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; -use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; -use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; -use Symfony\Component\Validator\ValidatorBuilder; - -/** - * Warms up XML and YAML validator metadata. - * - * @author Titouan Galopin - */ -class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer -{ - private $validatorBuilder; - - /** - * @param string $phpArrayFile The PHP file where metadata are cached - */ - public function __construct(ValidatorBuilder $validatorBuilder, string $phpArrayFile) - { - parent::__construct($phpArrayFile); - $this->validatorBuilder = $validatorBuilder; - } - - /** - * {@inheritdoc} - */ - protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) - { - if (!method_exists($this->validatorBuilder, 'getLoaders')) { - return false; - } - - $loaders = $this->validatorBuilder->getLoaders(); - $metadataFactory = new LazyLoadingMetadataFactory(new LoaderChain($loaders), $arrayAdapter); - - foreach ($this->extractSupportedLoaders($loaders) as $loader) { - foreach ($loader->getMappedClasses() as $mappedClass) { - try { - if ($metadataFactory->hasMetadataFor($mappedClass)) { - $metadataFactory->getMetadataFor($mappedClass); - } - } catch (AnnotationException $e) { - // ignore failing annotations - } catch (\Exception $e) { - $this->ignoreAutoloadException($mappedClass, $e); - } - } - } - - return true; - } - - /** - * @return string[] A list of classes to preload on PHP 7.4+ - */ - protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array $values) - { - // make sure we don't cache null values - $values = array_filter($values, function ($val) { return null !== $val; }); - - return parent::warmUpPhpArrayAdapter($phpArrayAdapter, $values); - } - - /** - * @param LoaderInterface[] $loaders - * - * @return XmlFileLoader[]|YamlFileLoader[] - */ - private function extractSupportedLoaders(array $loaders): array - { - $supportedLoaders = []; - - foreach ($loaders as $loader) { - if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) { - $supportedLoaders[] = $loader; - } elseif ($loader instanceof LoaderChain) { - $supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders())); - } - } - - return $supportedLoaders; - } -} diff --git a/vendor/symfony/framework-bundle/Command/AboutCommand.php b/vendor/symfony/framework-bundle/Command/AboutCommand.php deleted file mode 100644 index 05e7c3c..0000000 --- a/vendor/symfony/framework-bundle/Command/AboutCommand.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * A console command to display information about the current installation. - * - * @author Roland Franssen - * - * @final - */ -class AboutCommand extends Command -{ - protected static $defaultName = 'about'; - protected static $defaultDescription = 'Display information about the current project'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOT' -The %command.name% command displays information about the current Symfony project. - -The PHP section displays important configuration that could affect your application. The values might -be different between web and CLI. -EOT - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - if (method_exists($kernel, 'getBuildDir')) { - $buildDir = $kernel->getBuildDir(); - } else { - $buildDir = $kernel->getCacheDir(); - } - - $rows = [ - ['Symfony'], - new TableSeparator(), - ['Version', Kernel::VERSION], - ['Long-Term Support', 4 === Kernel::MINOR_VERSION ? 'Yes' : 'No'], - ['End of maintenance', Kernel::END_OF_MAINTENANCE.(self::isExpired(Kernel::END_OF_MAINTENANCE) ? ' Expired' : ' ('.self::daysBeforeExpiration(Kernel::END_OF_MAINTENANCE).')')], - ['End of life', Kernel::END_OF_LIFE.(self::isExpired(Kernel::END_OF_LIFE) ? ' Expired' : ' ('.self::daysBeforeExpiration(Kernel::END_OF_LIFE).')')], - new TableSeparator(), - ['Kernel'], - new TableSeparator(), - ['Type', \get_class($kernel)], - ['Environment', $kernel->getEnvironment()], - ['Debug', $kernel->isDebug() ? 'true' : 'false'], - ['Charset', $kernel->getCharset()], - ['Cache directory', self::formatPath($kernel->getCacheDir(), $kernel->getProjectDir()).' ('.self::formatFileSize($kernel->getCacheDir()).')'], - ['Build directory', self::formatPath($buildDir, $kernel->getProjectDir()).' ('.self::formatFileSize($buildDir).')'], - ['Log directory', self::formatPath($kernel->getLogDir(), $kernel->getProjectDir()).' ('.self::formatFileSize($kernel->getLogDir()).')'], - new TableSeparator(), - ['PHP'], - new TableSeparator(), - ['Version', \PHP_VERSION], - ['Architecture', (\PHP_INT_SIZE * 8).' bits'], - ['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'], - ['Timezone', date_default_timezone_get().' ('.(new \DateTime())->format(\DateTime::W3C).')'], - ['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], - ['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'], - ['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'], - ]; - - $io->table([], $rows); - - return 0; - } - - private static function formatPath(string $path, string $baseDir): string - { - return preg_replace('~^'.preg_quote($baseDir, '~').'~', '.', $path); - } - - private static function formatFileSize(string $path): string - { - if (is_file($path)) { - $size = filesize($path) ?: 0; - } else { - $size = 0; - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)) as $file) { - if ($file->isReadable()) { - $size += $file->getSize(); - } - } - } - - return Helper::formatMemory($size); - } - - private static function isExpired(string $date): bool - { - $date = \DateTime::createFromFormat('d/m/Y', '01/'.$date); - - return false !== $date && new \DateTime() > $date->modify('last day of this month 23:59:59'); - } - - private static function daysBeforeExpiration(string $date): string - { - $date = \DateTime::createFromFormat('d/m/Y', '01/'.$date); - - return (new \DateTime())->diff($date->modify('last day of this month 23:59:59'))->format('in %R%a days'); - } -} diff --git a/vendor/symfony/framework-bundle/Command/AbstractConfigCommand.php b/vendor/symfony/framework-bundle/Command/AbstractConfigCommand.php deleted file mode 100644 index e415cf2..0000000 --- a/vendor/symfony/framework-bundle/Command/AbstractConfigCommand.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\StyleInterface; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * A console command for dumping available configuration reference. - * - * @author Kevin Bond - * @author Wouter J - * @author Grégoire Pineau - */ -abstract class AbstractConfigCommand extends ContainerDebugCommand -{ - /** - * @param OutputInterface|StyleInterface $output - */ - protected function listBundles($output) - { - $title = 'Available registered bundles with their extension alias if available'; - $headers = ['Bundle name', 'Extension alias']; - $rows = []; - - $bundles = $this->getApplication()->getKernel()->getBundles(); - usort($bundles, function ($bundleA, $bundleB) { - return strcmp($bundleA->getName(), $bundleB->getName()); - }); - - foreach ($bundles as $bundle) { - $extension = $bundle->getContainerExtension(); - $rows[] = [$bundle->getName(), $extension ? $extension->getAlias() : '']; - } - - if ($output instanceof StyleInterface) { - $output->title($title); - $output->table($headers, $rows); - } else { - $output->writeln($title); - $table = new Table($output); - $table->setHeaders($headers)->setRows($rows)->render(); - } - } - - /** - * @return ExtensionInterface - */ - protected function findExtension(string $name) - { - $bundles = $this->initializeBundles(); - $minScore = \INF; - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface)) { - if ($name === $kernel->getAlias()) { - return $kernel; - } - - if ($kernel->getAlias()) { - $distance = levenshtein($name, $kernel->getAlias()); - - if ($distance < $minScore) { - $guess = $kernel->getAlias(); - $minScore = $distance; - } - } - } - - foreach ($bundles as $bundle) { - if ($name === $bundle->getName()) { - if (!$bundle->getContainerExtension()) { - throw new \LogicException(sprintf('Bundle "%s" does not have a container extension.', $name)); - } - - return $bundle->getContainerExtension(); - } - - $distance = levenshtein($name, $bundle->getName()); - - if ($distance < $minScore) { - $guess = $bundle->getName(); - $minScore = $distance; - } - - $extension = $bundle->getContainerExtension(); - - if ($extension) { - if ($name === $extension->getAlias()) { - return $extension; - } - - $distance = levenshtein($name, $extension->getAlias()); - - if ($distance < $minScore) { - $guess = $extension->getAlias(); - $minScore = $distance; - } - } - } - - if (!str_ends_with($name, 'Bundle')) { - $message = sprintf('No extensions with configuration available for "%s".', $name); - } else { - $message = sprintf('No extension with alias "%s" is enabled.', $name); - } - - if (isset($guess) && $minScore < 3) { - $message .= sprintf("\n\nDid you mean \"%s\"?", $guess); - } - - throw new LogicException($message); - } - - public function validateConfiguration(ExtensionInterface $extension, $configuration) - { - if (!$configuration) { - throw new \LogicException(sprintf('The extension with alias "%s" does not have its getConfiguration() method setup.', $extension->getAlias())); - } - - if (!$configuration instanceof ConfigurationInterface) { - throw new \LogicException(sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable.', get_debug_type($configuration))); - } - } - - private function initializeBundles() - { - // Re-build bundle manually to initialize DI extensions that can be extended by other bundles in their build() method - // as this method is not called when the container is loaded from the cache. - $kernel = $this->getApplication()->getKernel(); - $container = $this->getContainerBuilder($kernel); - $bundles = $kernel->getBundles(); - foreach ($bundles as $bundle) { - if ($extension = $bundle->getContainerExtension()) { - $container->registerExtension($extension); - } - } - - foreach ($bundles as $bundle) { - $bundle->build($container); - } - - return $bundles; - } -} diff --git a/vendor/symfony/framework-bundle/Command/AssetsInstallCommand.php b/vendor/symfony/framework-bundle/Command/AssetsInstallCommand.php deleted file mode 100644 index 870e686..0000000 --- a/vendor/symfony/framework-bundle/Command/AssetsInstallCommand.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Command that places bundle web assets into a given directory. - * - * @author Fabien Potencier - * @author Gábor Egyed - * - * @final - */ -class AssetsInstallCommand extends Command -{ - public const METHOD_COPY = 'copy'; - public const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink'; - public const METHOD_RELATIVE_SYMLINK = 'relative symlink'; - - protected static $defaultName = 'assets:install'; - protected static $defaultDescription = 'Install bundle\'s web assets under a public directory'; - - private $filesystem; - private $projectDir; - - public function __construct(Filesystem $filesystem, string $projectDir) - { - parent::__construct(); - - $this->filesystem = $filesystem; - $this->projectDir = $projectDir; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('target', InputArgument::OPTIONAL, 'The target directory', null), - ]) - ->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlink the assets instead of copying them') - ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') - ->addOption('no-cleanup', null, InputOption::VALUE_NONE, 'Do not remove the assets of the bundles that no longer exist') - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOT' -The %command.name% command installs bundle assets into a given -directory (e.g. the public directory). - - php %command.full_name% public - -A "bundles" directory will be created inside the target directory and the -"Resources/public" directory of each bundle will be copied into it. - -To create a symlink to each bundle instead of copying its assets, use the ---symlink option (will fall back to hard copies when symbolic links aren't possible: - - php %command.full_name% public --symlink - -To make symlink relative, add the --relative option: - - php %command.full_name% public --symlink --relative - -EOT - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - $targetArg = rtrim($input->getArgument('target') ?? '', '/'); - if (!$targetArg) { - $targetArg = $this->getPublicDirectory($kernel->getContainer()); - } - - if (!is_dir($targetArg)) { - $targetArg = $kernel->getProjectDir().'/'.$targetArg; - - if (!is_dir($targetArg)) { - throw new InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $targetArg)); - } - } - - $bundlesDir = $targetArg.'/bundles/'; - - $io = new SymfonyStyle($input, $output); - $io->newLine(); - - if ($input->getOption('relative')) { - $expectedMethod = self::METHOD_RELATIVE_SYMLINK; - $io->text('Trying to install assets as relative symbolic links.'); - } elseif ($input->getOption('symlink')) { - $expectedMethod = self::METHOD_ABSOLUTE_SYMLINK; - $io->text('Trying to install assets as absolute symbolic links.'); - } else { - $expectedMethod = self::METHOD_COPY; - $io->text('Installing assets as hard copies.'); - } - - $io->newLine(); - - $rows = []; - $copyUsed = false; - $exitCode = 0; - $validAssetDirs = []; - /** @var BundleInterface $bundle */ - foreach ($kernel->getBundles() as $bundle) { - if (!is_dir($originDir = $bundle->getPath().'/Resources/public') && !is_dir($originDir = $bundle->getPath().'/public')) { - continue; - } - - $assetDir = preg_replace('/bundle$/', '', strtolower($bundle->getName())); - $targetDir = $bundlesDir.$assetDir; - $validAssetDirs[] = $assetDir; - - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $message = sprintf("%s\n-> %s", $bundle->getName(), $targetDir); - } else { - $message = $bundle->getName(); - } - - try { - $this->filesystem->remove($targetDir); - - if (self::METHOD_RELATIVE_SYMLINK === $expectedMethod) { - $method = $this->relativeSymlinkWithFallback($originDir, $targetDir); - } elseif (self::METHOD_ABSOLUTE_SYMLINK === $expectedMethod) { - $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); - } else { - $method = $this->hardCopy($originDir, $targetDir); - } - - if (self::METHOD_COPY === $method) { - $copyUsed = true; - } - - if ($method === $expectedMethod) { - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method]; - } else { - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method]; - } - } catch (\Exception $e) { - $exitCode = 1; - $rows[] = [sprintf('%s', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage()]; - } - } - // remove the assets of the bundles that no longer exist - if (!$input->getOption('no-cleanup') && is_dir($bundlesDir)) { - $dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir); - $this->filesystem->remove($dirsToRemove); - } - - if ($rows) { - $io->table(['', 'Bundle', 'Method / Error'], $rows); - } - - if (0 !== $exitCode) { - $io->error('Some errors occurred while installing assets.'); - } else { - if ($copyUsed) { - $io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.'); - } - $io->success($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.'); - } - - return $exitCode; - } - - /** - * Try to create relative symlink. - * - * Falling back to absolute symlink and finally hard copy. - */ - private function relativeSymlinkWithFallback(string $originDir, string $targetDir): string - { - try { - $this->symlink($originDir, $targetDir, true); - $method = self::METHOD_RELATIVE_SYMLINK; - } catch (IOException $e) { - $method = $this->absoluteSymlinkWithFallback($originDir, $targetDir); - } - - return $method; - } - - /** - * Try to create absolute symlink. - * - * Falling back to hard copy. - */ - private function absoluteSymlinkWithFallback(string $originDir, string $targetDir): string - { - try { - $this->symlink($originDir, $targetDir); - $method = self::METHOD_ABSOLUTE_SYMLINK; - } catch (IOException $e) { - // fall back to copy - $method = $this->hardCopy($originDir, $targetDir); - } - - return $method; - } - - /** - * Creates symbolic link. - * - * @throws IOException if link cannot be created - */ - private function symlink(string $originDir, string $targetDir, bool $relative = false) - { - if ($relative) { - $this->filesystem->mkdir(\dirname($targetDir)); - $originDir = $this->filesystem->makePathRelative($originDir, realpath(\dirname($targetDir))); - } - $this->filesystem->symlink($originDir, $targetDir); - if (!file_exists($targetDir)) { - throw new IOException(sprintf('Symbolic link "%s" was created but appears to be broken.', $targetDir), 0, null, $targetDir); - } - } - - /** - * Copies origin to target. - */ - private function hardCopy(string $originDir, string $targetDir): string - { - $this->filesystem->mkdir($targetDir, 0777); - // We use a custom iterator to ignore VCS files - $this->filesystem->mirror($originDir, $targetDir, Finder::create()->ignoreDotFiles(false)->in($originDir)); - - return self::METHOD_COPY; - } - - private function getPublicDirectory(ContainerInterface $container): string - { - $defaultPublicDir = 'public'; - - if (null === $this->projectDir && !$container->hasParameter('kernel.project_dir')) { - return $defaultPublicDir; - } - - $composerFilePath = ($this->projectDir ?? $container->getParameter('kernel.project_dir')).'/composer.json'; - - if (!file_exists($composerFilePath)) { - return $defaultPublicDir; - } - - $composerConfig = json_decode(file_get_contents($composerFilePath), true); - - return $composerConfig['extra']['public-dir'] ?? $defaultPublicDir; - } -} diff --git a/vendor/symfony/framework-bundle/Command/BuildDebugContainerTrait.php b/vendor/symfony/framework-bundle/Command/BuildDebugContainerTrait.php deleted file mode 100644 index 785027d..0000000 --- a/vendor/symfony/framework-bundle/Command/BuildDebugContainerTrait.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * @internal - * - * @author Robin Chalas - * @author Nicolas Grekas - */ -trait BuildDebugContainerTrait -{ - protected $containerBuilder; - - /** - * Loads the ContainerBuilder from the cache. - * - * @throws \LogicException - */ - protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilder - { - if ($this->containerBuilder) { - return $this->containerBuilder; - } - - if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) { - $buildContainer = \Closure::bind(function () { - $this->initializeBundles(); - - return $this->buildContainer(); - }, $kernel, \get_class($kernel)); - $container = $buildContainer(); - $container->getCompilerPassConfig()->setRemovingPasses([]); - $container->getCompilerPassConfig()->setAfterRemovingPasses([]); - $container->compile(); - } else { - (new XmlFileLoader($container = new ContainerBuilder(), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump')); - $locatorPass = new ServiceLocatorTagPass(); - $locatorPass->process($container); - - $container->getCompilerPassConfig()->setBeforeOptimizationPasses([]); - $container->getCompilerPassConfig()->setOptimizationPasses([]); - $container->getCompilerPassConfig()->setBeforeRemovingPasses([]); - } - - return $this->containerBuilder = $container; - } -} diff --git a/vendor/symfony/framework-bundle/Command/CacheClearCommand.php b/vendor/symfony/framework-bundle/Command/CacheClearCommand.php deleted file mode 100644 index b0d5565..0000000 --- a/vendor/symfony/framework-bundle/Command/CacheClearCommand.php +++ /dev/null @@ -1,261 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface; -use Symfony\Component\HttpKernel\RebootableInterface; - -/** - * Clear and Warmup the cache. - * - * @author Francis Besset - * @author Fabien Potencier - * - * @final - */ -class CacheClearCommand extends Command -{ - protected static $defaultName = 'cache:clear'; - protected static $defaultDescription = 'Clear the cache'; - - private $cacheClearer; - private $filesystem; - - public function __construct(CacheClearerInterface $cacheClearer, Filesystem $filesystem = null) - { - parent::__construct(); - - $this->cacheClearer = $cacheClearer; - $this->filesystem = $filesystem ?? new Filesystem(); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputOption('no-warmup', '', InputOption::VALUE_NONE, 'Do not warm up the cache'), - new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command clears and warms up the application cache for a given environment -and debug mode: - - php %command.full_name% --env=dev - php %command.full_name% --env=prod --no-debug -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $fs = $this->filesystem; - $io = new SymfonyStyle($input, $output); - - $kernel = $this->getApplication()->getKernel(); - $realCacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir'); - $realBuildDir = $kernel->getContainer()->hasParameter('kernel.build_dir') ? $kernel->getContainer()->getParameter('kernel.build_dir') : $realCacheDir; - // the old cache dir name must not be longer than the real one to avoid exceeding - // the maximum length of a directory or file path within it (esp. Windows MAX_PATH) - $oldCacheDir = substr($realCacheDir, 0, -1).(str_ends_with($realCacheDir, '~') ? '+' : '~'); - $fs->remove($oldCacheDir); - - if (!is_writable($realCacheDir)) { - throw new RuntimeException(sprintf('Unable to write in the "%s" directory.', $realCacheDir)); - } - - $useBuildDir = $realBuildDir !== $realCacheDir; - $oldBuildDir = substr($realBuildDir, 0, -1).('~' === substr($realBuildDir, -1) ? '+' : '~'); - if ($useBuildDir) { - $fs->remove($oldBuildDir); - - if (!is_writable($realBuildDir)) { - throw new RuntimeException(sprintf('Unable to write in the "%s" directory.', $realBuildDir)); - } - - if ($this->isNfs($realCacheDir)) { - $fs->remove($realCacheDir); - } else { - $fs->rename($realCacheDir, $oldCacheDir); - } - $fs->mkdir($realCacheDir); - } - - $io->comment(sprintf('Clearing the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - if ($useBuildDir) { - $this->cacheClearer->clear($realBuildDir); - } - $this->cacheClearer->clear($realCacheDir); - - // The current event dispatcher is stale, let's not use it anymore - $this->getApplication()->setDispatcher(new EventDispatcher()); - - $containerFile = (new \ReflectionObject($kernel->getContainer()))->getFileName(); - $containerDir = basename(\dirname($containerFile)); - - // the warmup cache dir name must have the same length as the real one - // to avoid the many problems in serialized resources files - $warmupDir = substr($realBuildDir, 0, -1).('_' === substr($realBuildDir, -1) ? '-' : '_'); - - if ($output->isVerbose() && $fs->exists($warmupDir)) { - $io->comment('Clearing outdated warmup directory...'); - } - $fs->remove($warmupDir); - - if ($_SERVER['REQUEST_TIME'] <= filemtime($containerFile) && filemtime($containerFile) <= time()) { - if ($output->isVerbose()) { - $io->comment('Cache is fresh.'); - } - if (!$input->getOption('no-warmup') && !$input->getOption('no-optional-warmers')) { - if ($output->isVerbose()) { - $io->comment('Warming up optional cache...'); - } - $warmer = $kernel->getContainer()->get('cache_warmer'); - // non optional warmers already ran during container compilation - $warmer->enableOnlyOptionalWarmers(); - $preload = (array) $warmer->warmUp($realCacheDir); - - if ($preload && file_exists($preloadFile = $realCacheDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - } else { - $fs->mkdir($warmupDir); - - if (!$input->getOption('no-warmup')) { - if ($output->isVerbose()) { - $io->comment('Warming up cache...'); - } - $this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers')); - } - - if (!$fs->exists($warmupDir.'/'.$containerDir)) { - $fs->rename($realBuildDir.'/'.$containerDir, $warmupDir.'/'.$containerDir); - touch($warmupDir.'/'.$containerDir.'.legacy'); - } - - if ($this->isNfs($realBuildDir)) { - $io->note('For better performances, you should move the cache and log directories to a non-shared folder of the VM.'); - $fs->remove($realBuildDir); - } else { - $fs->rename($realBuildDir, $oldBuildDir); - } - - $fs->rename($warmupDir, $realBuildDir); - - if ($output->isVerbose()) { - $io->comment('Removing old build and cache directory...'); - } - - if ($useBuildDir) { - try { - $fs->remove($oldBuildDir); - } catch (IOException $e) { - if ($output->isVerbose()) { - $io->warning($e->getMessage()); - } - } - } - - try { - $fs->remove($oldCacheDir); - } catch (IOException $e) { - if ($output->isVerbose()) { - $io->warning($e->getMessage()); - } - } - } - - if ($output->isVerbose()) { - $io->comment('Finished'); - } - - $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - return 0; - } - - private function isNfs(string $dir): bool - { - static $mounts = null; - - if (null === $mounts) { - $mounts = []; - if ('/' === \DIRECTORY_SEPARATOR && $files = @file('/proc/mounts')) { - foreach ($files as $mount) { - $mount = \array_slice(explode(' ', $mount), 1, -3); - if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) { - continue; - } - $mounts[] = implode(' ', $mount).'/'; - } - } - } - foreach ($mounts as $mount) { - if (0 === strpos($dir, $mount)) { - return true; - } - } - - return false; - } - - private function warmup(string $warmupDir, string $realBuildDir, bool $enableOptionalWarmers = true) - { - // create a temporary kernel - $kernel = $this->getApplication()->getKernel(); - if (!$kernel instanceof RebootableInterface) { - throw new \LogicException('Calling "cache:clear" with a kernel that does not implement "Symfony\Component\HttpKernel\RebootableInterface" is not supported.'); - } - $kernel->reboot($warmupDir); - - // warmup temporary dir - if ($enableOptionalWarmers) { - $warmer = $kernel->getContainer()->get('cache_warmer'); - // non optional warmers already ran during container compilation - $warmer->enableOnlyOptionalWarmers(); - $preload = (array) $warmer->warmUp($warmupDir); - - if ($preload && file_exists($preloadFile = $warmupDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - - // fix references to cached files with the real cache directory name - $search = [$warmupDir, str_replace('\\', '\\\\', $warmupDir)]; - $replace = str_replace('\\', '/', $realBuildDir); - foreach (Finder::create()->files()->in($warmupDir) as $file) { - $content = str_replace($search, $replace, file_get_contents($file), $count); - if ($count) { - file_put_contents($file, $content); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/CachePoolClearCommand.php b/vendor/symfony/framework-bundle/Command/CachePoolClearCommand.php deleted file mode 100644 index b72924d..0000000 --- a/vendor/symfony/framework-bundle/Command/CachePoolClearCommand.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; - -/** - * Clear cache pools. - * - * @author Nicolas Grekas - */ -final class CachePoolClearCommand extends Command -{ - protected static $defaultName = 'cache:pool:clear'; - protected static $defaultDescription = 'Clear cache pools'; - - private $poolClearer; - private $poolNames; - - /** - * @param string[]|null $poolNames - */ - public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = null) - { - parent::__construct(); - - $this->poolClearer = $poolClearer; - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('pools', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of cache pools or cache pool clearers'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command clears the given cache pools or cache pool clearers. - - %command.full_name% [...] -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $kernel = $this->getApplication()->getKernel(); - $pools = []; - $clearers = []; - - foreach ($input->getArgument('pools') as $id) { - if ($this->poolClearer->hasPool($id)) { - $pools[$id] = $id; - } else { - $pool = $kernel->getContainer()->get($id); - - if ($pool instanceof CacheItemPoolInterface) { - $pools[$id] = $pool; - } elseif ($pool instanceof Psr6CacheClearer) { - $clearers[$id] = $pool; - } else { - throw new InvalidArgumentException(sprintf('"%s" is not a cache pool nor a cache clearer.', $id)); - } - } - } - - foreach ($clearers as $id => $clearer) { - $io->comment(sprintf('Calling cache clearer: %s', $id)); - $clearer->clear($kernel->getContainer()->getParameter('kernel.cache_dir')); - } - - $failure = false; - foreach ($pools as $id => $pool) { - $io->comment(sprintf('Clearing cache pool: %s', $id)); - - if ($pool instanceof CacheItemPoolInterface) { - if (!$pool->clear()) { - $io->warning(sprintf('Cache pool "%s" could not be cleared.', $pool)); - $failure = true; - } - } else { - if (false === $this->poolClearer->clearPool($id)) { - $io->warning(sprintf('Cache pool "%s" could not be cleared.', $pool)); - $failure = true; - } - } - } - - if ($failure) { - return 1; - } - - $io->success('Cache was successfully cleared.'); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (\is_array($this->poolNames) && $input->mustSuggestArgumentValuesFor('pools')) { - $suggestions->suggestValues($this->poolNames); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/CachePoolDeleteCommand.php b/vendor/symfony/framework-bundle/Command/CachePoolDeleteCommand.php deleted file mode 100644 index b36d48c..0000000 --- a/vendor/symfony/framework-bundle/Command/CachePoolDeleteCommand.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; - -/** - * Delete an item from a cache pool. - * - * @author Pierre du Plessis - */ -final class CachePoolDeleteCommand extends Command -{ - protected static $defaultName = 'cache:pool:delete'; - protected static $defaultDescription = 'Delete an item from a cache pool'; - - private $poolClearer; - private $poolNames; - - /** - * @param string[]|null $poolNames - */ - public function __construct(Psr6CacheClearer $poolClearer, array $poolNames = null) - { - parent::__construct(); - - $this->poolClearer = $poolClearer; - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('pool', InputArgument::REQUIRED, 'The cache pool from which to delete an item'), - new InputArgument('key', InputArgument::REQUIRED, 'The cache key to delete from the pool'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% deletes an item from a given cache pool. - - %command.full_name% -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $pool = $input->getArgument('pool'); - $key = $input->getArgument('key'); - $cachePool = $this->poolClearer->getPool($pool); - - if (!$cachePool->hasItem($key)) { - $io->note(sprintf('Cache item "%s" does not exist in cache pool "%s".', $key, $pool)); - - return 0; - } - - if (!$cachePool->deleteItem($key)) { - throw new \Exception(sprintf('Cache item "%s" could not be deleted.', $key)); - } - - $io->success(sprintf('Cache item "%s" was successfully deleted.', $key)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (\is_array($this->poolNames) && $input->mustSuggestArgumentValuesFor('pool')) { - $suggestions->suggestValues($this->poolNames); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/CachePoolListCommand.php b/vendor/symfony/framework-bundle/Command/CachePoolListCommand.php deleted file mode 100644 index 0ad3324..0000000 --- a/vendor/symfony/framework-bundle/Command/CachePoolListCommand.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * List available cache pools. - * - * @author Tobias Nyholm - */ -final class CachePoolListCommand extends Command -{ - protected static $defaultName = 'cache:pool:list'; - protected static $defaultDescription = 'List available cache pools'; - - private $poolNames; - - /** - * @param string[] $poolNames - */ - public function __construct(array $poolNames) - { - parent::__construct(); - - $this->poolNames = $poolNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command lists all available cache pools. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $io->table(['Pool name'], array_map(function ($pool) { - return [$pool]; - }, $this->poolNames)); - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/CachePoolPruneCommand.php b/vendor/symfony/framework-bundle/Command/CachePoolPruneCommand.php deleted file mode 100644 index 8d10352..0000000 --- a/vendor/symfony/framework-bundle/Command/CachePoolPruneCommand.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * Cache pool pruner command. - * - * @author Rob Frawley 2nd - */ -final class CachePoolPruneCommand extends Command -{ - protected static $defaultName = 'cache:pool:prune'; - protected static $defaultDescription = 'Prune cache pools'; - - private $pools; - - /** - * @param iterable $pools - */ - public function __construct(iterable $pools) - { - parent::__construct(); - - $this->pools = $pools; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command deletes all expired items from all pruneable pools. - - %command.full_name% -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - foreach ($this->pools as $name => $pool) { - $io->comment(sprintf('Pruning cache pool: %s', $name)); - $pool->prune(); - } - - $io->success('Successfully pruned cache pool(s).'); - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/CacheWarmupCommand.php b/vendor/symfony/framework-bundle/Command/CacheWarmupCommand.php deleted file mode 100644 index 3529c54..0000000 --- a/vendor/symfony/framework-bundle/Command/CacheWarmupCommand.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; - -/** - * Warmup the cache. - * - * @author Fabien Potencier - * - * @final - */ -class CacheWarmupCommand extends Command -{ - protected static $defaultName = 'cache:warmup'; - protected static $defaultDescription = 'Warm up an empty cache'; - - private $cacheWarmer; - - public function __construct(CacheWarmerAggregate $cacheWarmer) - { - parent::__construct(); - - $this->cacheWarmer = $cacheWarmer; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command warms up the cache. - -Before running this command, the cache must be empty. - -This command does not generate the classes cache (as when executing this -command, too many classes that should be part of the cache are already loaded -in memory). Use curl or any other similar tool to warm up -the classes cache if you want. - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $kernel = $this->getApplication()->getKernel(); - $io->comment(sprintf('Warming up the cache for the %s environment with debug %s', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - if (!$input->getOption('no-optional-warmers')) { - $this->cacheWarmer->enableOptionalWarmers(); - } - - $preload = $this->cacheWarmer->warmUp($cacheDir = $kernel->getContainer()->getParameter('kernel.cache_dir')); - - if ($preload && file_exists($preloadFile = $cacheDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - - $io->success(sprintf('Cache for the "%s" environment (debug=%s) was successfully warmed.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/ConfigDebugCommand.php b/vendor/symfony/framework-bundle/Command/ConfigDebugCommand.php deleted file mode 100644 index 8a8f235..0000000 --- a/vendor/symfony/framework-bundle/Command/ConfigDebugCommand.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Compiler\ValidateEnvPlaceholdersPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\Yaml\Yaml; - -/** - * A console command for dumping available configuration reference. - * - * @author Grégoire Pineau - * - * @final - */ -class ConfigDebugCommand extends AbstractConfigCommand -{ - protected static $defaultName = 'debug:config'; - protected static $defaultDescription = 'Dump the current configuration for an extension'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'), - new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the current configuration for an -extension/bundle. - -Either the extension alias or bundle name can be used: - - php %command.full_name% framework - php %command.full_name% FrameworkBundle - -For dumping a specific option, add its path as second argument: - - php %command.full_name% framework serializer.enabled - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - if (null === $name = $input->getArgument('name')) { - $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } - - $errorIo->comment('Provide the name of a bundle as the first argument of this command to dump its configuration. (e.g. debug:config FrameworkBundle)'); - $errorIo->comment('For dumping a specific option, add its path as the second argument of this command. (e.g. debug:config FrameworkBundle serializer to dump the framework.serializer configuration)'); - - return 0; - } - - $extension = $this->findExtension($name); - $extensionAlias = $extension->getAlias(); - $container = $this->compileContainer(); - - $config = $this->getConfig($extension, $container); - - if (null === $path = $input->getArgument('path')) { - $io->title( - sprintf('Current configuration for %s', ($name === $extensionAlias ? sprintf('extension with alias "%s"', $extensionAlias) : sprintf('"%s"', $name))) - ); - - $io->writeln(Yaml::dump([$extensionAlias => $config], 10)); - - return 0; - } - - try { - $config = $this->getConfigForPath($config, $path, $extensionAlias); - } catch (LogicException $e) { - $errorIo->error($e->getMessage()); - - return 1; - } - - $io->title(sprintf('Current configuration for "%s.%s"', $extensionAlias, $path)); - - $io->writeln(Yaml::dump($config, 10)); - - return 0; - } - - private function compileContainer(): ContainerBuilder - { - $kernel = clone $this->getApplication()->getKernel(); - $kernel->boot(); - - $method = new \ReflectionMethod($kernel, 'buildContainer'); - $method->setAccessible(true); - $container = $method->invoke($kernel); - $container->getCompiler()->compile($container); - - return $container; - } - - /** - * Iterate over configuration until the last step of the given path. - * - * @throws LogicException If the configuration does not exist - * - * @return mixed - */ - private function getConfigForPath(array $config, string $path, string $alias) - { - $steps = explode('.', $path); - - foreach ($steps as $step) { - if (!\array_key_exists($step, $config)) { - throw new LogicException(sprintf('Unable to find configuration for "%s.%s".', $alias, $path)); - } - - $config = $config[$step]; - } - - return $config; - } - - private function getConfigForExtension(ExtensionInterface $extension, ContainerBuilder $container): array - { - $extensionAlias = $extension->getAlias(); - - $extensionConfig = []; - foreach ($container->getCompilerPassConfig()->getPasses() as $pass) { - if ($pass instanceof ValidateEnvPlaceholdersPass) { - $extensionConfig = $pass->getExtensionConfig(); - break; - } - } - - if (isset($extensionConfig[$extensionAlias])) { - return $extensionConfig[$extensionAlias]; - } - - // Fall back to default config if the extension has one - - if (!$extension instanceof ConfigurationExtensionInterface) { - throw new \LogicException(sprintf('The extension with alias "%s" does not have configuration.', $extensionAlias)); - } - - $configs = $container->getExtensionConfig($extensionAlias); - $configuration = $extension->getConfiguration($configs, $container); - $this->validateConfiguration($extension, $configuration); - - return (new Processor())->processConfiguration($configuration, $configs); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->getAvailableBundles(!preg_match('/^[A-Z]/', $input->getCompletionValue()))); - - return; - } - - if ($input->mustSuggestArgumentValuesFor('path') && null !== $name = $input->getArgument('name')) { - try { - $config = $this->getConfig($this->findExtension($name), $this->compileContainer()); - $paths = array_keys(self::buildPathsCompletion($config)); - $suggestions->suggestValues($paths); - } catch (LogicException $e) { - } - } - } - - private function getAvailableBundles(bool $alias): array - { - $availableBundles = []; - foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { - $availableBundles[] = $alias ? $bundle->getContainerExtension()->getAlias() : $bundle->getName(); - } - - return $availableBundles; - } - - private function getConfig(ExtensionInterface $extension, ContainerBuilder $container) - { - return $container->resolveEnvPlaceholders( - $container->getParameterBag()->resolveValue( - $this->getConfigForExtension($extension, $container) - ) - ); - } - - private static function buildPathsCompletion(array $paths, string $prefix = ''): array - { - $completionPaths = []; - foreach ($paths as $key => $values) { - if (\is_array($values)) { - $completionPaths = $completionPaths + self::buildPathsCompletion($values, $prefix.$key.'.'); - } else { - $completionPaths[$prefix.$key] = null; - } - } - - return $completionPaths; - } -} diff --git a/vendor/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php b/vendor/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php deleted file mode 100644 index 7a56ec5..0000000 --- a/vendor/symfony/framework-bundle/Command/ConfigDumpReferenceCommand.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; -use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\Yaml\Yaml; - -/** - * A console command for dumping available configuration reference. - * - * @author Kevin Bond - * @author Wouter J - * @author Grégoire Pineau - * - * @final - */ -class ConfigDumpReferenceCommand extends AbstractConfigCommand -{ - protected static $defaultName = 'config:dump-reference'; - protected static $defaultDescription = 'Dump the default configuration for an extension'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'), - new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (yaml or xml)', 'yaml'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the default configuration for an -extension/bundle. - -Either the extension alias or bundle name can be used: - - php %command.full_name% framework - php %command.full_name% FrameworkBundle - -With the --format option specifies the format of the configuration, -this is either yaml or xml. -When the option is not provided, yaml is used. - - php %command.full_name% FrameworkBundle --format=xml - -For dumping a specific option, add its path as second argument (only available for the yaml format): - - php %command.full_name% framework profiler.matcher - -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - if (null === $name = $input->getArgument('name')) { - $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } - - $errorIo->comment([ - 'Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. config:dump-reference FrameworkBundle)', - 'For dumping a specific option, add its path as the second argument of this command. (e.g. config:dump-reference FrameworkBundle profiler.matcher to dump the framework.profiler.matcher configuration)', - ]); - - return 0; - } - - $extension = $this->findExtension($name); - - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } else { - $configuration = $extension->getConfiguration([], $this->getContainerBuilder($this->getApplication()->getKernel())); - } - - $this->validateConfiguration($extension, $configuration); - - $format = $input->getOption('format'); - - if ('yaml' === $format && !class_exists(Yaml::class)) { - $errorIo->error('Setting the "format" option to "yaml" requires the Symfony Yaml component. Try running "composer install symfony/yaml" or use "--format=xml" instead.'); - - return 1; - } - - $path = $input->getArgument('path'); - - if (null !== $path && 'yaml' !== $format) { - $errorIo->error('The "path" option is only available for the "yaml" format.'); - - return 1; - } - - if ($name === $extension->getAlias()) { - $message = sprintf('Default configuration for extension with alias: "%s"', $name); - } else { - $message = sprintf('Default configuration for "%s"', $name); - } - - if (null !== $path) { - $message .= sprintf(' at path "%s"', $path); - } - - switch ($format) { - case 'yaml': - $io->writeln(sprintf('# %s', $message)); - $dumper = new YamlReferenceDumper(); - break; - case 'xml': - $io->writeln(sprintf('', $message)); - $dumper = new XmlReferenceDumper(); - break; - default: - $io->writeln($message); - throw new InvalidArgumentException('Only the yaml and xml formats are supported.'); - } - - $io->writeln(null === $path ? $dumper->dump($configuration, $extension->getNamespace()) : $dumper->dumpAtPath($configuration, $path)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->getAvailableBundles()); - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues($this->getAvailableFormatOptions()); - } - } - - private function getAvailableBundles(): array - { - $bundles = []; - - foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { - $bundles[] = $bundle->getName(); - $bundles[] = $bundle->getContainerExtension()->getAlias(); - } - - return $bundles; - } - - private function getAvailableFormatOptions(): array - { - return ['yaml', 'xml']; - } -} diff --git a/vendor/symfony/framework-bundle/Command/ContainerDebugCommand.php b/vendor/symfony/framework-bundle/Command/ContainerDebugCommand.php deleted file mode 100644 index 8dfebe4..0000000 --- a/vendor/symfony/framework-bundle/Command/ContainerDebugCommand.php +++ /dev/null @@ -1,313 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; - -/** - * A console command for retrieving information about services. - * - * @author Ryan Weaver - * - * @internal - */ -class ContainerDebugCommand extends Command -{ - use BuildDebugContainerTrait; - - protected static $defaultName = 'debug:container'; - protected static $defaultDescription = 'Display current services for an application'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'), - new InputOption('show-arguments', null, InputOption::VALUE_NONE, 'Show arguments in services'), - new InputOption('show-hidden', null, InputOption::VALUE_NONE, 'Show hidden (internal) services'), - new InputOption('tag', null, InputOption::VALUE_REQUIRED, 'Show all services with a specific tag'), - new InputOption('tags', null, InputOption::VALUE_NONE, 'Display tagged services for an application'), - new InputOption('parameter', null, InputOption::VALUE_REQUIRED, 'Display a specific parameter for an application'), - new InputOption('parameters', null, InputOption::VALUE_NONE, 'Display parameters for an application'), - new InputOption('types', null, InputOption::VALUE_NONE, 'Display types (classes/interfaces) available in the container'), - new InputOption('env-var', null, InputOption::VALUE_REQUIRED, 'Display a specific environment variable used in the container'), - new InputOption('env-vars', null, InputOption::VALUE_NONE, 'Display environment variables used in the container'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), - new InputOption('deprecations', null, InputOption::VALUE_NONE, 'Display deprecations generated when compiling and warming up the container'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays all configured public services: - - php %command.full_name% - -To see deprecations generated during container compilation and cache warmup, use the --deprecations option: - - php %command.full_name% --deprecations - -To get specific information about a service, specify its name: - - php %command.full_name% validator - -To get specific information about a service including all its arguments, use the --show-arguments flag: - - php %command.full_name% validator --show-arguments - -To see available types that can be used for autowiring, use the --types flag: - - php %command.full_name% --types - -To see environment variables used by the container, use the --env-vars flag: - - php %command.full_name% --env-vars - -Display a specific environment variable by specifying its name with the --env-var option: - - php %command.full_name% --env-var=APP_ENV - -Use the --tags option to display tagged public services grouped by tag: - - php %command.full_name% --tags - -Find all services with a specific tag by specifying the tag name with the --tag option: - - php %command.full_name% --tag=form.type - -Use the --parameters option to display all parameters: - - php %command.full_name% --parameters - -Display a specific parameter by specifying its name with the --parameter option: - - php %command.full_name% --parameter=kernel.debug - -By default, internal services are hidden. You can display them -using the --show-hidden flag: - - php %command.full_name% --show-hidden - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - $this->validateInput($input); - $kernel = $this->getApplication()->getKernel(); - $object = $this->getContainerBuilder($kernel); - - if ($input->getOption('env-vars')) { - $options = ['env-vars' => true]; - } elseif ($envVar = $input->getOption('env-var')) { - $options = ['env-vars' => true, 'name' => $envVar]; - } elseif ($input->getOption('types')) { - $options = []; - $options['filter'] = [$this, 'filterToServiceTypes']; - } elseif ($input->getOption('parameters')) { - $parameters = []; - foreach ($object->getParameterBag()->all() as $k => $v) { - $parameters[$k] = $object->resolveEnvPlaceholders($v); - } - $object = new ParameterBag($parameters); - $options = []; - } elseif ($parameter = $input->getOption('parameter')) { - $options = ['parameter' => $parameter]; - } elseif ($input->getOption('tags')) { - $options = ['group_by' => 'tags']; - } elseif ($tag = $input->getOption('tag')) { - $options = ['tag' => $tag]; - } elseif ($name = $input->getArgument('name')) { - $name = $this->findProperServiceName($input, $errorIo, $object, $name, $input->getOption('show-hidden')); - $options = ['id' => $name]; - } elseif ($input->getOption('deprecations')) { - $options = ['deprecations' => true]; - } else { - $options = []; - } - - $helper = new DescriptorHelper(); - $options['format'] = $input->getOption('format'); - $options['show_arguments'] = $input->getOption('show-arguments'); - $options['show_hidden'] = $input->getOption('show-hidden'); - $options['raw_text'] = $input->getOption('raw'); - $options['output'] = $io; - $options['is_debug'] = $kernel->isDebug(); - - try { - $helper->describe($io, $object, $options); - - if (isset($options['id']) && isset($kernel->getContainer()->getRemovedIds()[$options['id']])) { - $errorIo->note(sprintf('The "%s" service or alias has been removed or inlined when the container was compiled.', $options['id'])); - } - } catch (ServiceNotFoundException $e) { - if ('' !== $e->getId() && '@' === $e->getId()[0]) { - throw new ServiceNotFoundException($e->getId(), $e->getSourceId(), null, [substr($e->getId(), 1)]); - } - - throw $e; - } - - if (!$input->getArgument('name') && !$input->getOption('tag') && !$input->getOption('parameter') && !$input->getOption('env-vars') && !$input->getOption('env-var') && $input->isInteractive()) { - if ($input->getOption('tags')) { - $errorIo->comment('To search for a specific tag, re-run this command with a search term. (e.g. debug:container --tag=form.type)'); - } elseif ($input->getOption('parameters')) { - $errorIo->comment('To search for a specific parameter, re-run this command with a search term. (e.g. debug:container --parameter=kernel.debug)'); - } elseif (!$input->getOption('deprecations')) { - $errorIo->comment('To search for a specific service, re-run this command with a search term. (e.g. debug:container log)'); - } - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - - return; - } - - $kernel = $this->getApplication()->getKernel(); - $object = $this->getContainerBuilder($kernel); - - if ($input->mustSuggestArgumentValuesFor('name') - && !$input->getOption('tag') && !$input->getOption('tags') - && !$input->getOption('parameter') && !$input->getOption('parameters') - && !$input->getOption('env-var') && !$input->getOption('env-vars') - && !$input->getOption('types') && !$input->getOption('deprecations') - ) { - $suggestions->suggestValues($this->findServiceIdsContaining( - $object, - $input->getCompletionValue(), - (bool) $input->getOption('show-hidden') - )); - - return; - } - - if ($input->mustSuggestOptionValuesFor('tag')) { - $suggestions->suggestValues($object->findTags()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('parameter')) { - $suggestions->suggestValues(array_keys($object->getParameterBag()->all())); - } - } - - /** - * Validates input arguments and options. - * - * @throws \InvalidArgumentException - */ - protected function validateInput(InputInterface $input) - { - $options = ['tags', 'tag', 'parameters', 'parameter']; - - $optionsCount = 0; - foreach ($options as $option) { - if ($input->getOption($option)) { - ++$optionsCount; - } - } - - $name = $input->getArgument('name'); - if ((null !== $name) && ($optionsCount > 0)) { - throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined with the service name argument.'); - } elseif ((null === $name) && $optionsCount > 1) { - throw new InvalidArgumentException('The options tags, tag, parameters & parameter cannot be combined together.'); - } - } - - private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $name, bool $showHidden): string - { - $name = ltrim($name, '\\'); - - if ($builder->has($name) || !$input->isInteractive()) { - return $name; - } - - $matchingServices = $this->findServiceIdsContaining($builder, $name, $showHidden); - if (empty($matchingServices)) { - throw new InvalidArgumentException(sprintf('No services found that match "%s".', $name)); - } - - if (1 === \count($matchingServices)) { - return $matchingServices[0]; - } - - return $io->choice('Select one of the following services to display its information', $matchingServices); - } - - private function findServiceIdsContaining(ContainerBuilder $builder, string $name, bool $showHidden): array - { - $serviceIds = $builder->getServiceIds(); - $foundServiceIds = $foundServiceIdsIgnoringBackslashes = []; - foreach ($serviceIds as $serviceId) { - if (!$showHidden && str_starts_with($serviceId, '.')) { - continue; - } - if (false !== stripos(str_replace('\\', '', $serviceId), $name)) { - $foundServiceIdsIgnoringBackslashes[] = $serviceId; - } - if ('' === $name || false !== stripos($serviceId, $name)) { - $foundServiceIds[] = $serviceId; - } - } - - return $foundServiceIds ?: $foundServiceIdsIgnoringBackslashes; - } - - /** - * @internal - */ - public function filterToServiceTypes(string $serviceId): bool - { - // filter out things that could not be valid class names - if (!preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))^(?&V)(?:\\\\(?&V))*+(?: \$(?&V))?$/', $serviceId)) { - return false; - } - - // if the id has a \, assume it is a class - if (str_contains($serviceId, '\\')) { - return true; - } - - return class_exists($serviceId) || interface_exists($serviceId, false); - } -} diff --git a/vendor/symfony/framework-bundle/Command/ContainerLintCommand.php b/vendor/symfony/framework-bundle/Command/ContainerLintCommand.php deleted file mode 100644 index 337f1f4..0000000 --- a/vendor/symfony/framework-bundle/Command/ContainerLintCommand.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\HttpKernel\Kernel; - -final class ContainerLintCommand extends Command -{ - protected static $defaultName = 'lint:container'; - protected static $defaultDescription = 'Ensure that arguments injected into services match type declarations'; - - /** - * @var ContainerBuilder - */ - private $containerBuilder; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp('This command parses service definitions and ensures that injected values match the type declarations of each services\' class.') - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - try { - $container = $this->getContainerBuilder(); - } catch (RuntimeException $e) { - $errorIo->error($e->getMessage()); - - return 2; - } - - $container->setParameter('container.build_time', time()); - - try { - $container->compile(); - } catch (InvalidArgumentException $e) { - $errorIo->error($e->getMessage()); - - return 1; - } - - $io->success('The container was linted successfully: all services are injected with values that are compatible with their type declarations.'); - - return 0; - } - - private function getContainerBuilder(): ContainerBuilder - { - if ($this->containerBuilder) { - return $this->containerBuilder; - } - - $kernel = $this->getApplication()->getKernel(); - $kernelContainer = $kernel->getContainer(); - - if (!$kernel->isDebug() || !(new ConfigCache($kernelContainer->getParameter('debug.container.dump'), true))->isFresh()) { - if (!$kernel instanceof Kernel) { - throw new RuntimeException(sprintf('This command does not support the application kernel: "%s" does not extend "%s".', get_debug_type($kernel), Kernel::class)); - } - - $buildContainer = \Closure::bind(function (): ContainerBuilder { - $this->initializeBundles(); - - return $this->buildContainer(); - }, $kernel, \get_class($kernel)); - $container = $buildContainer(); - - $skippedIds = []; - } else { - if (!$kernelContainer instanceof Container) { - throw new RuntimeException(sprintf('This command does not support the application container: "%s" does not extend "%s".', get_debug_type($kernelContainer), Container::class)); - } - - (new XmlFileLoader($container = new ContainerBuilder($parameterBag = new EnvPlaceholderParameterBag()), new FileLocator()))->load($kernelContainer->getParameter('debug.container.dump')); - - $refl = new \ReflectionProperty($parameterBag, 'resolved'); - $refl->setAccessible(true); - $refl->setValue($parameterBag, true); - - $skippedIds = []; - foreach ($container->getServiceIds() as $serviceId) { - if (str_starts_with($serviceId, '.errored.')) { - $skippedIds[$serviceId] = true; - } - } - - $container->getCompilerPassConfig()->setBeforeOptimizationPasses([]); - $container->getCompilerPassConfig()->setOptimizationPasses([]); - $container->getCompilerPassConfig()->setBeforeRemovingPasses([]); - } - - $container->setParameter('container.build_hash', 'lint_container'); - $container->setParameter('container.build_id', 'lint_container'); - - $container->addCompilerPass(new CheckTypeDeclarationsPass(true, $skippedIds), PassConfig::TYPE_AFTER_REMOVING, -100); - - return $this->containerBuilder = $container; - } -} diff --git a/vendor/symfony/framework-bundle/Command/DebugAutowiringCommand.php b/vendor/symfony/framework-bundle/Command/DebugAutowiringCommand.php deleted file mode 100644 index e1e3c95..0000000 --- a/vendor/symfony/framework-bundle/Command/DebugAutowiringCommand.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\Descriptor; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * A console command for autowiring information. - * - * @author Ryan Weaver - * - * @internal - */ -class DebugAutowiringCommand extends ContainerDebugCommand -{ - protected static $defaultName = 'debug:autowiring'; - protected static $defaultDescription = 'List classes/interfaces you can use for autowiring'; - - private $supportsHref; - private $fileLinkFormatter; - - public function __construct(string $name = null, FileLinkFormatter $fileLinkFormatter = null) - { - $this->supportsHref = method_exists(OutputFormatterStyle::class, 'setHref'); - $this->fileLinkFormatter = $fileLinkFormatter; - parent::__construct($name); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('search', InputArgument::OPTIONAL, 'A search filter'), - new InputOption('all', null, InputOption::VALUE_NONE, 'Show also services that are not aliased'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays the classes and interfaces that -you can use as type-hints for autowiring: - - php %command.full_name% - -You can also pass a search term to filter the list: - - php %command.full_name% log - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - $builder = $this->getContainerBuilder($this->getApplication()->getKernel()); - $serviceIds = $builder->getServiceIds(); - $serviceIds = array_filter($serviceIds, [$this, 'filterToServiceTypes']); - - if ($search = $input->getArgument('search')) { - $searchNormalized = preg_replace('/[^a-zA-Z0-9\x7f-\xff $]++/', '', $search); - - $serviceIds = array_filter($serviceIds, function ($serviceId) use ($searchNormalized) { - return false !== stripos(str_replace('\\', '', $serviceId), $searchNormalized) && !str_starts_with($serviceId, '.'); - }); - - if (empty($serviceIds)) { - $errorIo->error(sprintf('No autowirable classes or interfaces found matching "%s"', $search)); - - return 1; - } - } - - uasort($serviceIds, 'strnatcmp'); - - $io->title('Autowirable Types'); - $io->text('The following classes & interfaces can be used as type-hints when autowiring:'); - if ($search) { - $io->text(sprintf('(only showing classes/interfaces matching %s)', $search)); - } - $hasAlias = []; - $all = $input->getOption('all'); - $previousId = '-'; - $serviceIdsNb = 0; - foreach ($serviceIds as $serviceId) { - $text = []; - $resolvedServiceId = $serviceId; - if (!str_starts_with($serviceId, $previousId)) { - $text[] = ''; - if ('' !== $description = Descriptor::getClassDescription($serviceId, $resolvedServiceId)) { - if (isset($hasAlias[$serviceId])) { - continue; - } - $text[] = $description; - } - $previousId = $serviceId.' $'; - } - - $serviceLine = sprintf('%s', $serviceId); - if ($this->supportsHref && '' !== $fileLink = $this->getFileLink($serviceId)) { - $serviceLine = sprintf('%s', $fileLink, $serviceId); - } - - if ($builder->hasAlias($serviceId)) { - $hasAlias[$serviceId] = true; - $serviceAlias = $builder->getAlias($serviceId); - $serviceLine .= ' ('.$serviceAlias.')'; - - if ($serviceAlias->isDeprecated()) { - $serviceLine .= ' - deprecated'; - } - } elseif (!$all) { - ++$serviceIdsNb; - continue; - } - $text[] = $serviceLine; - $io->text($text); - } - - $io->newLine(); - - if (0 < $serviceIdsNb) { - $io->text(sprintf('%s more concrete service%s would be displayed when adding the "--all" option.', $serviceIdsNb, $serviceIdsNb > 1 ? 's' : '')); - } - if ($all) { - $io->text('Pro-tip: use interfaces in your type-hints instead of classes to benefit from the dependency inversion principle.'); - } - - $io->newLine(); - - return 0; - } - - private function getFileLink(string $class): string - { - if (null === $this->fileLinkFormatter - || (null === $r = $this->getContainerBuilder($this->getApplication()->getKernel())->getReflectionClass($class, false))) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('search')) { - $builder = $this->getContainerBuilder($this->getApplication()->getKernel()); - - $suggestions->suggestValues(array_filter($builder->getServiceIds(), [$this, 'filterToServiceTypes'])); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php b/vendor/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php deleted file mode 100644 index cfc9ae2..0000000 --- a/vendor/symfony/framework-bundle/Command/EventDispatcherDebugCommand.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * A console command for retrieving information about event dispatcher. - * - * @author Matthieu Auger - * - * @final - */ -class EventDispatcherDebugCommand extends Command -{ - private const DEFAULT_DISPATCHER = 'event_dispatcher'; - - protected static $defaultName = 'debug:event-dispatcher'; - protected static $defaultDescription = 'Display configured listeners for an application'; - private $dispatchers; - - public function __construct(ContainerInterface $dispatchers) - { - parent::__construct(); - - $this->dispatchers = $dispatchers; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('event', InputArgument::OPTIONAL, 'An event name or a part of the event name'), - new InputOption('dispatcher', null, InputOption::VALUE_REQUIRED, 'To view events of a specific event dispatcher', self::DEFAULT_DISPATCHER), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command displays all configured listeners: - - php %command.full_name% - -To get specific listeners for an event, specify its name: - - php %command.full_name% kernel.request -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $options = []; - $dispatcherServiceName = $input->getOption('dispatcher'); - if (!$this->dispatchers->has($dispatcherServiceName)) { - $io->getErrorStyle()->error(sprintf('Event dispatcher "%s" is not available.', $dispatcherServiceName)); - - return 1; - } - - $dispatcher = $this->dispatchers->get($dispatcherServiceName); - - if ($event = $input->getArgument('event')) { - if ($dispatcher->hasListeners($event)) { - $options = ['event' => $event]; - } else { - // if there is no direct match, try find partial matches - $events = $this->searchForEvent($dispatcher, $event); - if (0 === \count($events)) { - $io->getErrorStyle()->warning(sprintf('The event "%s" does not have any registered listeners.', $event)); - - return 0; - } elseif (1 === \count($events)) { - $options = ['event' => $events[array_key_first($events)]]; - } else { - $options = ['events' => $events]; - } - } - } - - $helper = new DescriptorHelper(); - - if (self::DEFAULT_DISPATCHER !== $dispatcherServiceName) { - $options['dispatcher_service_name'] = $dispatcherServiceName; - } - - $options['format'] = $input->getOption('format'); - $options['raw_text'] = $input->getOption('raw'); - $options['output'] = $io; - $helper->describe($io, $dispatcher, $options); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('event')) { - $dispatcherServiceName = $input->getOption('dispatcher'); - if ($this->dispatchers->has($dispatcherServiceName)) { - $dispatcher = $this->dispatchers->get($dispatcherServiceName); - $suggestions->suggestValues(array_keys($dispatcher->getListeners())); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('dispatcher')) { - if ($this->dispatchers instanceof ServiceProviderInterface) { - $suggestions->suggestValues(array_keys($this->dispatchers->getProvidedServices())); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues((new DescriptorHelper())->getFormats()); - } - } - - private function searchForEvent(EventDispatcherInterface $dispatcher, string $needle): array - { - $output = []; - $lcNeedle = strtolower($needle); - $allEvents = array_keys($dispatcher->getListeners()); - foreach ($allEvents as $event) { - if (str_contains(strtolower($event), $lcNeedle)) { - $output[] = $event; - } - } - - return $output; - } -} diff --git a/vendor/symfony/framework-bundle/Command/RouterDebugCommand.php b/vendor/symfony/framework-bundle/Command/RouterDebugCommand.php deleted file mode 100644 index 454d59c..0000000 --- a/vendor/symfony/framework-bundle/Command/RouterDebugCommand.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouterInterface; - -/** - * A console command for retrieving information about routes. - * - * @author Fabien Potencier - * @author Tobias Schultze - * - * @final - */ -class RouterDebugCommand extends Command -{ - use BuildDebugContainerTrait; - - protected static $defaultName = 'debug:router'; - protected static $defaultDescription = 'Display current routes for an application'; - private $router; - private $fileLinkFormatter; - - public function __construct(RouterInterface $router, FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->router = $router; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'A route name'), - new InputOption('show-controllers', null, InputOption::VALUE_NONE, 'Show assigned controllers in overview'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% displays the configured routes: - - php %command.full_name% - -EOF - ) - ; - } - - /** - * {@inheritdoc} - * - * @throws InvalidArgumentException When route does not exist - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $name = $input->getArgument('name'); - $helper = new DescriptorHelper($this->fileLinkFormatter); - $routes = $this->router->getRouteCollection(); - $container = null; - if ($this->fileLinkFormatter) { - $container = function () { - return $this->getContainerBuilder($this->getApplication()->getKernel()); - }; - } - - if ($name) { - if (!($route = $routes->get($name)) && $matchingRoutes = $this->findRouteNameContaining($name, $routes)) { - $default = 1 === \count($matchingRoutes) ? $matchingRoutes[0] : null; - $name = $io->choice('Select one of the matching routes', $matchingRoutes, $default); - $route = $routes->get($name); - } - - if (!$route) { - throw new InvalidArgumentException(sprintf('The route "%s" does not exist.', $name)); - } - - $helper->describe($io, $route, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'name' => $name, - 'output' => $io, - 'container' => $container, - ]); - } else { - $helper->describe($io, $routes, [ - 'format' => $input->getOption('format'), - 'raw_text' => $input->getOption('raw'), - 'show_controllers' => $input->getOption('show-controllers'), - 'output' => $io, - 'container' => $container, - ]); - } - - return 0; - } - - private function findRouteNameContaining(string $name, RouteCollection $routes): array - { - $foundRoutesNames = []; - foreach ($routes as $routeName => $route) { - if (false !== stripos($routeName, $name)) { - $foundRoutesNames[] = $routeName; - } - } - - return $foundRoutesNames; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->router->getRouteCollection()->all())); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $helper = new DescriptorHelper(); - $suggestions->suggestValues($helper->getFormats()); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/RouterMatchCommand.php b/vendor/symfony/framework-bundle/Command/RouterMatchCommand.php deleted file mode 100644 index 6cceb94..0000000 --- a/vendor/symfony/framework-bundle/Command/RouterMatchCommand.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; -use Symfony\Component\Routing\RouterInterface; - -/** - * A console command to test route matching. - * - * @author Fabien Potencier - * - * @final - */ -class RouterMatchCommand extends Command -{ - protected static $defaultName = 'router:match'; - protected static $defaultDescription = 'Help debug routes by simulating a path info match'; - - private $router; - private $expressionLanguageProviders; - - /** - * @param iterable $expressionLanguageProviders - */ - public function __construct(RouterInterface $router, iterable $expressionLanguageProviders = []) - { - parent::__construct(); - - $this->router = $router; - $this->expressionLanguageProviders = $expressionLanguageProviders; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'), - new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Set the HTTP method'), - new InputOption('scheme', null, InputOption::VALUE_REQUIRED, 'Set the URI scheme (usually http or https)'), - new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Set the URI host'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% shows which routes match a given request and which don't and for what reason: - - php %command.full_name% /foo - -or - - php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $context = $this->router->getContext(); - if (null !== $method = $input->getOption('method')) { - $context->setMethod($method); - } - if (null !== $scheme = $input->getOption('scheme')) { - $context->setScheme($scheme); - } - if (null !== $host = $input->getOption('host')) { - $context->setHost($host); - } - - $matcher = new TraceableUrlMatcher($this->router->getRouteCollection(), $context); - foreach ($this->expressionLanguageProviders as $provider) { - $matcher->addExpressionLanguageProvider($provider); - } - - $traces = $matcher->getTraces($input->getArgument('path_info')); - - $io->newLine(); - - $matches = false; - foreach ($traces as $trace) { - if (TraceableUrlMatcher::ROUTE_ALMOST_MATCHES == $trace['level']) { - $io->text(sprintf('Route "%s" almost matches but %s', $trace['name'], lcfirst($trace['log']))); - } elseif (TraceableUrlMatcher::ROUTE_MATCHES == $trace['level']) { - $io->success(sprintf('Route "%s" matches', $trace['name'])); - - $routerDebugCommand = $this->getApplication()->find('debug:router'); - $routerDebugCommand->run(new ArrayInput(['name' => $trace['name']]), $output); - - $matches = true; - } elseif ($input->getOption('verbose')) { - $io->text(sprintf('Route "%s" does not match: %s', $trace['name'], $trace['log'])); - } - } - - if (!$matches) { - $io->error(sprintf('None of the routes match the path "%s"', $input->getArgument('path_info'))); - - return 1; - } - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php b/vendor/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php deleted file mode 100644 index 0e07d88..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsDecryptToLocalCommand.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsDecryptToLocalCommand extends Command -{ - protected static $defaultName = 'secrets:decrypt-to-local'; - protected static $defaultDescription = 'Decrypt all secrets and stores them in the local vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('force', 'f', InputOption::VALUE_NONE, 'Force overriding of secrets that already exist in the local vault') - ->setHelp(<<<'EOF' -The %command.name% command decrypts all secrets and copies them in the local vault. - - %command.full_name% - -When the option --force is provided, secrets that already exist in the local vault are overriden. - - %command.full_name% --force -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - if (null === $this->localVault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - $secrets = $this->vault->list(true); - - $io->comment(sprintf('%d secret%s found in the vault.', \count($secrets), 1 !== \count($secrets) ? 's' : '')); - - $skipped = 0; - if (!$input->getOption('force')) { - foreach ($this->localVault->list() as $k => $v) { - if (isset($secrets[$k])) { - ++$skipped; - unset($secrets[$k]); - } - } - } - - if ($skipped > 0) { - $io->warning([ - sprintf('%d secret%s already overridden in the local vault and will be skipped.', $skipped, 1 !== $skipped ? 's are' : ' is'), - 'Use the --force flag to override these.', - ]); - } - - foreach ($secrets as $k => $v) { - if (null === $v) { - $io->error($this->vault->getLastMessage() ?? sprintf('Secret "%s" has been skipped as there was an error reading it.', $k)); - continue; - } - - $this->localVault->seal($k, $v); - $io->note($this->localVault->getLastMessage()); - } - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php b/vendor/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php deleted file mode 100644 index 79f51c5..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsEncryptFromLocalCommand.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsEncryptFromLocalCommand extends Command -{ - protected static $defaultName = 'secrets:encrypt-from-local'; - protected static $defaultDescription = 'Encrypt all local secrets to the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command encrypts all locally overridden secrets to the vault. - - %command.full_name% -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - if (null === $this->localVault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - foreach ($this->vault->list(true) as $name => $value) { - $localValue = $this->localVault->reveal($name); - - if (null !== $localValue && $value !== $localValue) { - $this->vault->seal($name, $localValue); - } elseif (null !== $message = $this->localVault->getLastMessage()) { - $io->error($message); - - return 1; - } - } - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php b/vendor/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php deleted file mode 100644 index a9440b4..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsGenerateKeysCommand.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsGenerateKeysCommand extends Command -{ - protected static $defaultName = 'secrets:generate-keys'; - protected static $defaultDescription = 'Generate new encryption keys'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->addOption('rotate', 'r', InputOption::VALUE_NONE, 'Re-encrypt existing secrets with the newly generated keys.') - ->setHelp(<<<'EOF' -The %command.name% command generates a new encryption key. - - %command.full_name% - -If encryption keys already exist, the command must be called with -the --rotate option in order to override those keys and re-encrypt -existing secrets. - - %command.full_name% --rotate -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->success('The local vault is disabled.'); - - return 1; - } - - if (!$input->getOption('rotate')) { - if ($vault->generateKeys()) { - $io->success($vault->getLastMessage()); - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - - return 0; - } - - $io->warning($vault->getLastMessage()); - - return 1; - } - - $secrets = []; - foreach ($vault->list(true) as $name => $value) { - if (null === $value) { - $io->error($vault->getLastMessage()); - - return 1; - } - - $secrets[$name] = $value; - } - - if (!$vault->generateKeys(true)) { - $io->warning($vault->getLastMessage()); - - return 1; - } - - $io->success($vault->getLastMessage()); - - if ($secrets) { - foreach ($secrets as $name => $value) { - $vault->seal($name, $value); - } - - $io->comment('Existing secrets have been rotated to the new keys.'); - } - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsListCommand.php b/vendor/symfony/framework-bundle/Command/SecretsListCommand.php deleted file mode 100644 index 0b13e0c..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsListCommand.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsListCommand extends Command -{ - protected static $defaultName = 'secrets:list'; - protected static $defaultDescription = 'List all secrets'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('reveal', 'r', InputOption::VALUE_NONE, 'Display decrypted values alongside names') - ->setHelp(<<<'EOF' -The %command.name% command list all stored secrets. - - %command.full_name% - -When the option --reveal is provided, the decrypted secrets are also displayed. - - %command.full_name% --reveal -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - - $io->comment('Use "%env()%" to reference a secret in a config file.'); - - if (!$reveal = $input->getOption('reveal')) { - $io->comment(sprintf('To reveal the secrets run php %s %s --reveal', $_SERVER['PHP_SELF'], $this->getName())); - } - - $secrets = $this->vault->list($reveal); - $localSecrets = null !== $this->localVault ? $this->localVault->list($reveal) : null; - - $rows = []; - - $dump = new Dumper($output); - $dump = static function (?string $v) use ($dump) { - return null === $v ? '******' : $dump($v); - }; - - foreach ($secrets as $name => $value) { - $rows[$name] = [$name, $dump($value)]; - } - - if (null !== $message = $this->vault->getLastMessage()) { - $io->comment($message); - } - - foreach ($localSecrets ?? [] as $name => $value) { - if (isset($rows[$name])) { - $rows[$name][] = $dump($value); - } - } - - if (null !== $this->localVault && null !== $message = $this->localVault->getLastMessage()) { - $io->comment($message); - } - - (new SymfonyStyle($input, $output)) - ->table(['Secret', 'Value'] + (null !== $localSecrets ? [2 => 'Local Value'] : []), $rows); - - $io->comment("Local values override secret values.\nUse secrets:set --local to define them."); - - return 0; - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsRemoveCommand.php b/vendor/symfony/framework-bundle/Command/SecretsRemoveCommand.php deleted file mode 100644 index 0451ef3..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsRemoveCommand.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsRemoveCommand extends Command -{ - protected static $defaultName = 'secrets:remove'; - protected static $defaultDescription = 'Remove a secret from the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret') - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->setHelp(<<<'EOF' -The %command.name% command removes a secret from the vault. - - %command.full_name% -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->success('The local vault is disabled.'); - - return 1; - } - - if ($vault->remove($name = $input->getArgument('name'))) { - $io->success($vault->getLastMessage() ?? 'Secret was removed from the vault.'); - } else { - $io->comment($vault->getLastMessage() ?? 'Secret was not found in the vault.'); - } - - if ($this->vault === $vault && null !== $this->localVault->reveal($name)) { - $io->comment('Note that this secret is overridden in the local vault.'); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if (!$input->mustSuggestArgumentValuesFor('name')) { - return; - } - - $vaultKeys = array_keys($this->vault->list(false)); - if ($input->getOption('local')) { - if (null === $this->localVault) { - return; - } - $vaultKeys = array_intersect($vaultKeys, array_keys($this->localVault->list(false))); - } - - $suggestions->suggestValues($vaultKeys); - } -} diff --git a/vendor/symfony/framework-bundle/Command/SecretsSetCommand.php b/vendor/symfony/framework-bundle/Command/SecretsSetCommand.php deleted file mode 100644 index 412247d..0000000 --- a/vendor/symfony/framework-bundle/Command/SecretsSetCommand.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Bundle\FrameworkBundle\Secrets\AbstractVault; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -final class SecretsSetCommand extends Command -{ - protected static $defaultName = 'secrets:set'; - protected static $defaultDescription = 'Set a secret in the vault'; - - private $vault; - private $localVault; - - public function __construct(AbstractVault $vault, AbstractVault $localVault = null) - { - $this->vault = $vault; - $this->localVault = $localVault; - - parent::__construct(); - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('name', InputArgument::REQUIRED, 'The name of the secret') - ->addArgument('file', InputArgument::OPTIONAL, 'A file where to read the secret from or "-" for reading from STDIN') - ->addOption('local', 'l', InputOption::VALUE_NONE, 'Update the local vault.') - ->addOption('random', 'r', InputOption::VALUE_OPTIONAL, 'Generate a random value.', false) - ->setHelp(<<<'EOF' -The %command.name% command stores a secret in the vault. - - %command.full_name% - -To reference secrets in services.yaml or any other config -files, use "%env()%". - -By default, the secret value should be entered interactively. -Alternatively, provide a file where to read the secret from: - - php %command.full_name% filename - -Use "-" as a file name to read from STDIN: - - cat filename | php %command.full_name% - - -Use --local to override secrets for local needs. -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output; - $io = new SymfonyStyle($input, $errOutput); - $name = $input->getArgument('name'); - $vault = $input->getOption('local') ? $this->localVault : $this->vault; - - if (null === $vault) { - $io->error('The local vault is disabled.'); - - return 1; - } - - if ($this->localVault === $vault && !\array_key_exists($name, $this->vault->list())) { - $io->error(sprintf('Secret "%s" does not exist in the vault, you cannot override it locally.', $name)); - - return 1; - } - - if (0 < $random = $input->getOption('random') ?? 16) { - $value = strtr(substr(base64_encode(random_bytes($random)), 0, $random), '+/', '-_'); - } elseif (!$file = $input->getArgument('file')) { - $value = $io->askHidden('Please type the secret value'); - - if (null === $value) { - $io->warning('No value provided: using empty string'); - $value = ''; - } - } elseif ('-' === $file) { - $value = file_get_contents('php://stdin'); - } elseif (is_file($file) && is_readable($file)) { - $value = file_get_contents($file); - } elseif (!is_file($file)) { - throw new \InvalidArgumentException(sprintf('File not found: "%s".', $file)); - } elseif (!is_readable($file)) { - throw new \InvalidArgumentException(sprintf('File is not readable: "%s".', $file)); - } - - if ($vault->generateKeys()) { - $io->success($vault->getLastMessage()); - - if ($this->vault === $vault) { - $io->caution('DO NOT COMMIT THE DECRYPTION KEY FOR THE PROD ENVIRONMENT⚠️'); - } - } - - $vault->seal($name, $value); - - $io->success($vault->getLastMessage() ?? 'Secret was successfully stored in the vault.'); - - if (0 < $random) { - $errOutput->write(' // The generated random value is: '); - $output->write($value); - $errOutput->writeln(''); - $io->newLine(); - } - - if ($this->vault === $vault && null !== $this->localVault->reveal($name)) { - $io->comment('Note that this secret is overridden in the local vault.'); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->vault->list(false))); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/TranslationDebugCommand.php b/vendor/symfony/framework-bundle/Command/TranslationDebugCommand.php deleted file mode 100644 index 006fd25..0000000 --- a/vendor/symfony/framework-bundle/Command/TranslationDebugCommand.php +++ /dev/null @@ -1,418 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Translation\Catalogue\MergeOperation; -use Symfony\Component\Translation\DataCollectorTranslator; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\LoggingTranslator; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Translator; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Helps finding unused or missing translation messages in a given locale - * and comparing them with the fallback ones. - * - * @author Florian Voutzinos - * - * @final - */ -class TranslationDebugCommand extends Command -{ - public const EXIT_CODE_GENERAL_ERROR = 64; - public const EXIT_CODE_MISSING = 65; - public const EXIT_CODE_UNUSED = 66; - public const EXIT_CODE_FALLBACK = 68; - public const MESSAGE_MISSING = 0; - public const MESSAGE_UNUSED = 1; - public const MESSAGE_EQUALS_FALLBACK = 2; - - protected static $defaultName = 'debug:translation'; - protected static $defaultDescription = 'Display translation messages information'; - - private $translator; - private $reader; - private $extractor; - private $defaultTransPath; - private $defaultViewsPath; - private $transPaths; - private $codePaths; - private $enabledLocales; - - public function __construct(TranslatorInterface $translator, TranslationReaderInterface $reader, ExtractorInterface $extractor, string $defaultTransPath = null, string $defaultViewsPath = null, array $transPaths = [], array $codePaths = [], array $enabledLocales = []) - { - parent::__construct(); - - $this->translator = $translator; - $this->reader = $reader; - $this->extractor = $extractor; - $this->defaultTransPath = $defaultTransPath; - $this->defaultViewsPath = $defaultViewsPath; - $this->transPaths = $transPaths; - $this->codePaths = $codePaths; - $this->enabledLocales = $enabledLocales; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), - new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'), - new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'), - new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Display only missing messages'), - new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Display only unused messages'), - new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command helps finding unused or missing translation -messages and comparing them with the fallback ones by inspecting the -templates and translation files of a given bundle or the default translations directory. - -You can display information about bundle translations in a specific locale: - - php %command.full_name% en AcmeDemoBundle - -You can also specify a translation domain for the search: - - php %command.full_name% --domain=messages en AcmeDemoBundle - -You can only display missing messages: - - php %command.full_name% --only-missing en AcmeDemoBundle - -You can only display unused messages: - - php %command.full_name% --only-unused en AcmeDemoBundle - -You can display information about application translations in a specific locale: - - php %command.full_name% en - -You can display information about translations in all registered bundles in a specific locale: - - php %command.full_name% --all en - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $locale = $input->getArgument('locale'); - $domain = $input->getOption('domain'); - - $exitCode = self::SUCCESS; - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - // Define Root Paths - $transPaths = $this->getRootTransPaths(); - $codePaths = $this->getRootCodePaths($kernel); - - // Override with provided Bundle info - if (null !== $input->getArgument('bundle')) { - try { - $bundle = $kernel->getBundle($input->getArgument('bundle')); - $bundleDir = $bundle->getPath(); - $transPaths = [is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundleDir.'/translations']; - $codePaths = [is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundleDir.'/templates']; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - } catch (\InvalidArgumentException $e) { - // such a bundle does not exist, so treat the argument as path - $path = $input->getArgument('bundle'); - - $transPaths = [$path.'/translations']; - $codePaths = [$path.'/templates']; - - if (!is_dir($transPaths[0])) { - throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); - } - } - } elseif ($input->getOption('all')) { - foreach ($kernel->getBundles() as $bundle) { - $bundleDir = $bundle->getPath(); - $transPaths[] = is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundle->getPath().'/translations'; - $codePaths[] = is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundle->getPath().'/templates'; - } - } - - // Extract used messages - $extractedCatalogue = $this->extractMessages($locale, $codePaths); - - // Load defined messages - $currentCatalogue = $this->loadCurrentMessages($locale, $transPaths); - - // Merge defined and extracted messages to get all message ids - $mergeOperation = new MergeOperation($extractedCatalogue, $currentCatalogue); - $allMessages = $mergeOperation->getResult()->all($domain); - if (null !== $domain) { - $allMessages = [$domain => $allMessages]; - } - - // No defined or extracted messages - if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { - $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); - - if (null !== $domain) { - $outputMessage .= sprintf(' and domain "%s"', $domain); - } - - $io->getErrorStyle()->warning($outputMessage); - - return self::EXIT_CODE_GENERAL_ERROR; - } - - // Load the fallback catalogues - $fallbackCatalogues = $this->loadFallbackCatalogues($locale, $transPaths); - - // Display header line - $headers = ['State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)]; - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); - } - $rows = []; - // Iterate all message ids and determine their state - foreach ($allMessages as $domain => $messages) { - foreach (array_keys($messages) as $messageId) { - $value = $currentCatalogue->get($messageId, $domain); - $states = []; - - if ($extractedCatalogue->defines($messageId, $domain)) { - if (!$currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_MISSING; - - if (!$input->getOption('only-unused')) { - $exitCode = $exitCode | self::EXIT_CODE_MISSING; - } - } - } elseif ($currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_UNUSED; - - if (!$input->getOption('only-missing')) { - $exitCode = $exitCode | self::EXIT_CODE_UNUSED; - } - } - - if (!\in_array(self::MESSAGE_UNUSED, $states) && $input->getOption('only-unused') - || !\in_array(self::MESSAGE_MISSING, $states) && $input->getOption('only-missing') - ) { - continue; - } - - foreach ($fallbackCatalogues as $fallbackCatalogue) { - if ($fallbackCatalogue->defines($messageId, $domain) && $value === $fallbackCatalogue->get($messageId, $domain)) { - $states[] = self::MESSAGE_EQUALS_FALLBACK; - - $exitCode = $exitCode | self::EXIT_CODE_FALLBACK; - - break; - } - } - - $row = [$this->formatStates($states), $domain, $this->formatId($messageId), $this->sanitizeString($value)]; - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $row[] = $this->sanitizeString($fallbackCatalogue->get($messageId, $domain)); - } - - $rows[] = $row; - } - } - - $io->table($headers, $rows); - - return $exitCode; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('locale')) { - $suggestions->suggestValues($this->enabledLocales); - - return; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - if ($input->mustSuggestArgumentValuesFor('bundle')) { - $availableBundles = []; - foreach ($kernel->getBundles() as $bundle) { - $availableBundles[] = $bundle->getName(); - - if ($extension = $bundle->getContainerExtension()) { - $availableBundles[] = $extension->getAlias(); - } - } - - $suggestions->suggestValues($availableBundles); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domain')) { - $locale = $input->getArgument('locale'); - - $mergeOperation = new MergeOperation( - $this->extractMessages($locale, $this->getRootCodePaths($kernel)), - $this->loadCurrentMessages($locale, $this->getRootTransPaths()) - ); - - $suggestions->suggestValues($mergeOperation->getDomains()); - } - } - - private function formatState(int $state): string - { - if (self::MESSAGE_MISSING === $state) { - return ' missing '; - } - - if (self::MESSAGE_UNUSED === $state) { - return ' unused '; - } - - if (self::MESSAGE_EQUALS_FALLBACK === $state) { - return ' fallback '; - } - - return $state; - } - - private function formatStates(array $states): string - { - $result = []; - foreach ($states as $state) { - $result[] = $this->formatState($state); - } - - return implode(' ', $result); - } - - private function formatId(string $id): string - { - return sprintf('%s', $id); - } - - private function sanitizeString(string $string, int $length = 40): string - { - $string = trim(preg_replace('/\s+/', ' ', $string)); - - if (false !== $encoding = mb_detect_encoding($string, null, true)) { - if (mb_strlen($string, $encoding) > $length) { - return mb_substr($string, 0, $length - 3, $encoding).'...'; - } - } elseif (\strlen($string) > $length) { - return substr($string, 0, $length - 3).'...'; - } - - return $string; - } - - private function extractMessages(string $locale, array $transPaths): MessageCatalogue - { - $extractedCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path) || is_file($path)) { - $this->extractor->extract($path, $extractedCatalogue); - } - } - - return $extractedCatalogue; - } - - private function loadCurrentMessages(string $locale, array $transPaths): MessageCatalogue - { - $currentCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $currentCatalogue); - } - } - - return $currentCatalogue; - } - - /** - * @return MessageCatalogue[] - */ - private function loadFallbackCatalogues(string $locale, array $transPaths): array - { - $fallbackCatalogues = []; - if ($this->translator instanceof Translator || $this->translator instanceof DataCollectorTranslator || $this->translator instanceof LoggingTranslator) { - foreach ($this->translator->getFallbackLocales() as $fallbackLocale) { - if ($fallbackLocale === $locale) { - continue; - } - - $fallbackCatalogue = new MessageCatalogue($fallbackLocale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $fallbackCatalogue); - } - } - $fallbackCatalogues[] = $fallbackCatalogue; - } - } - - return $fallbackCatalogues; - } - - private function getRootTransPaths(): array - { - $transPaths = $this->transPaths; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - - return $transPaths; - } - - private function getRootCodePaths(KernelInterface $kernel): array - { - $codePaths = $this->codePaths; - $codePaths[] = $kernel->getProjectDir().'/src'; - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - - return $codePaths; - } -} diff --git a/vendor/symfony/framework-bundle/Command/TranslationUpdateCommand.php b/vendor/symfony/framework-bundle/Command/TranslationUpdateCommand.php deleted file mode 100644 index de93326..0000000 --- a/vendor/symfony/framework-bundle/Command/TranslationUpdateCommand.php +++ /dev/null @@ -1,451 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Translation\Catalogue\MergeOperation; -use Symfony\Component\Translation\Catalogue\TargetOperation; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; - -/** - * A command that parses templates to extract translation messages and adds them - * into the translation files. - * - * @author Michel Salib - * - * @final - */ -class TranslationUpdateCommand extends Command -{ - private const ASC = 'asc'; - private const DESC = 'desc'; - private const SORT_ORDERS = [self::ASC, self::DESC]; - private const FORMATS = [ - 'xlf12' => ['xlf', '1.2'], - 'xlf20' => ['xlf', '2.0'], - ]; - - protected static $defaultName = 'translation:extract|translation:update'; - protected static $defaultDescription = 'Extract missing translations keys from code to translation files.'; - - private $writer; - private $reader; - private $extractor; - private $defaultLocale; - private $defaultTransPath; - private $defaultViewsPath; - private $transPaths; - private $codePaths; - private $enabledLocales; - - public function __construct(TranslationWriterInterface $writer, TranslationReaderInterface $reader, ExtractorInterface $extractor, string $defaultLocale, string $defaultTransPath = null, string $defaultViewsPath = null, array $transPaths = [], array $codePaths = [], array $enabledLocales = []) - { - parent::__construct(); - - $this->writer = $writer; - $this->reader = $reader; - $this->extractor = $extractor; - $this->defaultLocale = $defaultLocale; - $this->defaultTransPath = $defaultTransPath; - $this->defaultViewsPath = $defaultViewsPath; - $this->transPaths = $transPaths; - $this->codePaths = $codePaths; - $this->enabledLocales = $enabledLocales; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), - new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'), - new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'), - new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format (deprecated)'), - new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf12'), - new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'), - new InputOption('force', null, InputOption::VALUE_NONE, 'Should the extract be done'), - new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'), - new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'), - new InputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version (deprecated)'), - new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'), - new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command extracts translation strings from templates -of a given bundle or the default translations directory. It can display them or merge -the new ones into the translation files. - -When new translation strings are found it can automatically add a prefix to the translation -message. - -Example running against a Bundle (AcmeBundle) - - php %command.full_name% --dump-messages en AcmeBundle - php %command.full_name% --force --prefix="new_" fr AcmeBundle - -Example running against default messages directory - - php %command.full_name% --dump-messages en - php %command.full_name% --force --prefix="new_" fr - -You can sort the output with the --sort flag: - - php %command.full_name% --dump-messages --sort=asc en AcmeBundle - php %command.full_name% --dump-messages --sort=desc fr - -You can dump a tree-like structure using the yaml format with --as-tree flag: - - php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle - php %command.full_name% --force --format=yaml --sort=asc --as-tree=3 fr - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $output instanceof ConsoleOutputInterface ? new SymfonyStyle($input, $output->getErrorOutput()) : $io; - - if ('translation:update' === $input->getFirstArgument()) { - $errorIo->caution('Command "translation:update" is deprecated since version 5.4 and will be removed in Symfony 6.0. Use "translation:extract" instead.'); - } - - $io = new SymfonyStyle($input, $output); - $errorIo = $io->getErrorStyle(); - - // check presence of force or dump-message - if (true !== $input->getOption('force') && true !== $input->getOption('dump-messages')) { - $errorIo->error('You must choose one of --force or --dump-messages'); - - return 1; - } - - $format = $input->getOption('output-format') ?: $input->getOption('format'); - $xliffVersion = $input->getOption('xliff-version') ?? '1.2'; - - if ($input->getOption('xliff-version')) { - $errorIo->warning(sprintf('The "--xliff-version" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion)); - } - - if ($input->getOption('output-format')) { - $errorIo->warning(sprintf('The "--output-format" option is deprecated since version 5.3, use "--format=xlf%d" instead.', 10 * $xliffVersion)); - } - - if (\in_array($format, array_keys(self::FORMATS), true)) { - [$format, $xliffVersion] = self::FORMATS[$format]; - } - - // check format - $supportedFormats = $this->writer->getFormats(); - if (!\in_array($format, $supportedFormats, true)) { - $errorIo->error(['Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).', xlf12 and xlf20.']); - - return 1; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - - // Define Root Paths - $transPaths = $this->getRootTransPaths(); - $codePaths = $this->getRootCodePaths($kernel); - - $currentName = 'default directory'; - - // Override with provided Bundle info - if (null !== $input->getArgument('bundle')) { - try { - $foundBundle = $kernel->getBundle($input->getArgument('bundle')); - $bundleDir = $foundBundle->getPath(); - $transPaths = [is_dir($bundleDir.'/Resources/translations') ? $bundleDir.'/Resources/translations' : $bundleDir.'/translations']; - $codePaths = [is_dir($bundleDir.'/Resources/views') ? $bundleDir.'/Resources/views' : $bundleDir.'/templates']; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - $currentName = $foundBundle->getName(); - } catch (\InvalidArgumentException $e) { - // such a bundle does not exist, so treat the argument as path - $path = $input->getArgument('bundle'); - - $transPaths = [$path.'/translations']; - $codePaths = [$path.'/templates']; - - if (!is_dir($transPaths[0])) { - throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0])); - } - } - } - - $io->title('Translation Messages Extractor and Dumper'); - $io->comment(sprintf('Generating "%s" translation files for "%s"', $input->getArgument('locale'), $currentName)); - - $io->comment('Parsing templates...'); - $extractedCatalogue = $this->extractMessages($input->getArgument('locale'), $codePaths, $input->getOption('prefix')); - - $io->comment('Loading translation files...'); - $currentCatalogue = $this->loadCurrentMessages($input->getArgument('locale'), $transPaths); - - if (null !== $domain = $input->getOption('domain')) { - $currentCatalogue = $this->filterCatalogue($currentCatalogue, $domain); - $extractedCatalogue = $this->filterCatalogue($extractedCatalogue, $domain); - } - - // process catalogues - $operation = $input->getOption('clean') - ? new TargetOperation($currentCatalogue, $extractedCatalogue) - : new MergeOperation($currentCatalogue, $extractedCatalogue); - - // Exit if no messages found. - if (!\count($operation->getDomains())) { - $errorIo->warning('No translation messages were found.'); - - return 0; - } - - $resultMessage = 'Translation files were successfully updated'; - - $operation->moveMessagesToIntlDomainsIfPossible('new'); - - // show compiled list of messages - if (true === $input->getOption('dump-messages')) { - $extractedMessagesCount = 0; - $io->newLine(); - foreach ($operation->getDomains() as $domain) { - $newKeys = array_keys($operation->getNewMessages($domain)); - $allKeys = array_keys($operation->getMessages($domain)); - - $list = array_merge( - array_diff($allKeys, $newKeys), - array_map(function ($id) { - return sprintf('%s', $id); - }, $newKeys), - array_map(function ($id) { - return sprintf('%s', $id); - }, array_keys($operation->getObsoleteMessages($domain))) - ); - - $domainMessagesCount = \count($list); - - if ($sort = $input->getOption('sort')) { - $sort = strtolower($sort); - if (!\in_array($sort, self::SORT_ORDERS, true)) { - $errorIo->error(['Wrong sort order', 'Supported formats are: '.implode(', ', self::SORT_ORDERS).'.']); - - return 1; - } - - if (self::DESC === $sort) { - rsort($list); - } else { - sort($list); - } - } - - $io->section(sprintf('Messages extracted for domain "%s" (%d message%s)', $domain, $domainMessagesCount, $domainMessagesCount > 1 ? 's' : '')); - $io->listing($list); - - $extractedMessagesCount += $domainMessagesCount; - } - - if ('xlf' === $format) { - $io->comment(sprintf('Xliff output version is %s', $xliffVersion)); - } - - $resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was'); - } - - // save the files - if (true === $input->getOption('force')) { - $io->comment('Writing files...'); - - $bundleTransPath = false; - foreach ($transPaths as $path) { - if (is_dir($path)) { - $bundleTransPath = $path; - } - } - - if (!$bundleTransPath) { - $bundleTransPath = end($transPaths); - } - - $this->writer->write($operation->getResult(), $format, ['path' => $bundleTransPath, 'default_locale' => $this->defaultLocale, 'xliff_version' => $xliffVersion, 'as_tree' => $input->getOption('as-tree'), 'inline' => $input->getOption('as-tree') ?? 0]); - - if (true === $input->getOption('dump-messages')) { - $resultMessage .= ' and translation files were updated'; - } - } - - $io->success($resultMessage.'.'); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('locale')) { - $suggestions->suggestValues($this->enabledLocales); - - return; - } - - /** @var KernelInterface $kernel */ - $kernel = $this->getApplication()->getKernel(); - if ($input->mustSuggestArgumentValuesFor('bundle')) { - $bundles = []; - - foreach ($kernel->getBundles() as $bundle) { - $bundles[] = $bundle->getName(); - if ($bundle->getContainerExtension()) { - $bundles[] = $bundle->getContainerExtension()->getAlias(); - } - } - - $suggestions->suggestValues($bundles); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(array_merge( - $this->writer->getFormats(), - array_keys(self::FORMATS) - )); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domain') && $locale = $input->getArgument('locale')) { - $extractedCatalogue = $this->extractMessages($locale, $this->getRootCodePaths($kernel), $input->getOption('prefix')); - - $currentCatalogue = $this->loadCurrentMessages($locale, $this->getRootTransPaths()); - - // process catalogues - $operation = $input->getOption('clean') - ? new TargetOperation($currentCatalogue, $extractedCatalogue) - : new MergeOperation($currentCatalogue, $extractedCatalogue); - - $suggestions->suggestValues($operation->getDomains()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('sort')) { - $suggestions->suggestValues(self::SORT_ORDERS); - } - } - - private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue - { - $filteredCatalogue = new MessageCatalogue($catalogue->getLocale()); - - // extract intl-icu messages only - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - if ($intlMessages = $catalogue->all($intlDomain)) { - $filteredCatalogue->add($intlMessages, $intlDomain); - } - - // extract all messages and subtract intl-icu messages - if ($messages = array_diff($catalogue->all($domain), $intlMessages)) { - $filteredCatalogue->add($messages, $domain); - } - foreach ($catalogue->getResources() as $resource) { - $filteredCatalogue->addResource($resource); - } - - if ($metadata = $catalogue->getMetadata('', $intlDomain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $intlDomain); - } - } - - if ($metadata = $catalogue->getMetadata('', $domain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $domain); - } - } - - return $filteredCatalogue; - } - - private function extractMessages(string $locale, array $transPaths, string $prefix): MessageCatalogue - { - $extractedCatalogue = new MessageCatalogue($locale); - $this->extractor->setPrefix($prefix); - foreach ($transPaths as $path) { - if (is_dir($path) || is_file($path)) { - $this->extractor->extract($path, $extractedCatalogue); - } - } - - return $extractedCatalogue; - } - - private function loadCurrentMessages(string $locale, array $transPaths): MessageCatalogue - { - $currentCatalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - if (is_dir($path)) { - $this->reader->read($path, $currentCatalogue); - } - } - - return $currentCatalogue; - } - - private function getRootTransPaths(): array - { - $transPaths = $this->transPaths; - if ($this->defaultTransPath) { - $transPaths[] = $this->defaultTransPath; - } - - return $transPaths; - } - - private function getRootCodePaths(KernelInterface $kernel): array - { - $codePaths = $this->codePaths; - $codePaths[] = $kernel->getProjectDir().'/src'; - if ($this->defaultViewsPath) { - $codePaths[] = $this->defaultViewsPath; - } - - return $codePaths; - } -} diff --git a/vendor/symfony/framework-bundle/Command/WorkflowDumpCommand.php b/vendor/symfony/framework-bundle/Command/WorkflowDumpCommand.php deleted file mode 100644 index 89d29b9..0000000 --- a/vendor/symfony/framework-bundle/Command/WorkflowDumpCommand.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Workflow\Definition; -use Symfony\Component\Workflow\Dumper\GraphvizDumper; -use Symfony\Component\Workflow\Dumper\MermaidDumper; -use Symfony\Component\Workflow\Dumper\PlantUmlDumper; -use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper; -use Symfony\Component\Workflow\Marking; - -/** - * @author Grégoire Pineau - * - * @final - */ -class WorkflowDumpCommand extends Command -{ - protected static $defaultName = 'workflow:dump'; - protected static $defaultDescription = 'Dump a workflow'; - /** - * string is the service id. - * - * @var array - */ - private $workflows = []; - - private const DUMP_FORMAT_OPTIONS = [ - 'puml', - 'mermaid', - 'dot', - ]; - - public function __construct(array $workflows) - { - parent::__construct(); - - $this->workflows = $workflows; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'), - new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'), - new InputOption('label', 'l', InputOption::VALUE_REQUIRED, 'Label a graph'), - new InputOption('dump-format', null, InputOption::VALUE_REQUIRED, 'The dump format ['.implode('|', self::DUMP_FORMAT_OPTIONS).']', 'dot'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command dumps the graphical representation of a -workflow in different formats - -DOT: %command.full_name% | dot -Tpng > workflow.png -PUML: %command.full_name% --dump-format=puml | java -jar plantuml.jar -p > workflow.png -MERMAID: %command.full_name% --dump-format=mermaid | mmdc -o workflow.svg -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $workflowName = $input->getArgument('name'); - - $workflow = null; - - if (isset($this->workflows['workflow.'.$workflowName])) { - $workflow = $this->workflows['workflow.'.$workflowName]; - $type = 'workflow'; - } elseif (isset($this->workflows['state_machine.'.$workflowName])) { - $workflow = $this->workflows['state_machine.'.$workflowName]; - $type = 'state_machine'; - } - - if (null === $workflow) { - throw new InvalidArgumentException(sprintf('No service found for "workflow.%1$s" nor "state_machine.%1$s".', $workflowName)); - } - - switch ($input->getOption('dump-format')) { - case 'puml': - $transitionType = 'workflow' === $type ? PlantUmlDumper::WORKFLOW_TRANSITION : PlantUmlDumper::STATEMACHINE_TRANSITION; - $dumper = new PlantUmlDumper($transitionType); - break; - - case 'mermaid': - $transitionType = 'workflow' === $type ? MermaidDumper::TRANSITION_TYPE_WORKFLOW : MermaidDumper::TRANSITION_TYPE_STATEMACHINE; - $dumper = new MermaidDumper($transitionType); - break; - - case 'dot': - default: - $dumper = ('workflow' === $type) ? new GraphvizDumper() : new StateMachineGraphvizDumper(); - } - - $marking = new Marking(); - - foreach ($input->getArgument('marking') as $place) { - $marking->mark($place); - } - - $options = [ - 'name' => $workflowName, - 'nofooter' => true, - 'graph' => [ - 'label' => $input->getOption('label'), - ], - ]; - $output->writeln($dumper->dump($workflow, $marking, $options)); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->workflows)); - } - - if ($input->mustSuggestOptionValuesFor('dump-format')) { - $suggestions->suggestValues(self::DUMP_FORMAT_OPTIONS); - } - } -} diff --git a/vendor/symfony/framework-bundle/Command/XliffLintCommand.php b/vendor/symfony/framework-bundle/Command/XliffLintCommand.php deleted file mode 100644 index 9209d71..0000000 --- a/vendor/symfony/framework-bundle/Command/XliffLintCommand.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Translation\Command\XliffLintCommand as BaseLintCommand; - -/** - * Validates XLIFF files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - * @author Javier Eguiluz - * - * @final - */ -class XliffLintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:xliff'; - protected static $defaultDescription = 'Lints an XLIFF file and outputs encountered errors'; - - public function __construct() - { - $directoryIteratorProvider = function ($directory, $default) { - if (!is_dir($directory)) { - $directory = $this->getApplication()->getKernel()->locateResource($directory); - } - - return $default($directory); - }; - - $isReadableProvider = function ($fileOrDirectory, $default) { - return str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory); - }; - - parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this->setHelp($this->getHelp().<<<'EOF' - -Or find all files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ); - } -} diff --git a/vendor/symfony/framework-bundle/Command/YamlLintCommand.php b/vendor/symfony/framework-bundle/Command/YamlLintCommand.php deleted file mode 100644 index 3a432f2..0000000 --- a/vendor/symfony/framework-bundle/Command/YamlLintCommand.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Command; - -use Symfony\Component\Yaml\Command\LintCommand as BaseLintCommand; - -/** - * Validates YAML files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - * - * @final - */ -class YamlLintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:yaml'; - protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors'; - - public function __construct() - { - $directoryIteratorProvider = function ($directory, $default) { - if (!is_dir($directory)) { - $directory = $this->getApplication()->getKernel()->locateResource($directory); - } - - return $default($directory); - }; - - $isReadableProvider = function ($fileOrDirectory, $default) { - return str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory); - }; - - parent::__construct(null, $directoryIteratorProvider, $isReadableProvider); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this->setHelp($this->getHelp().<<<'EOF' - -Or find all files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ); - } -} diff --git a/vendor/symfony/framework-bundle/Console/Application.php b/vendor/symfony/framework-bundle/Console/Application.php deleted file mode 100644 index 55510b9..0000000 --- a/vendor/symfony/framework-bundle/Console/Application.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console; - -use Symfony\Component\Console\Application as BaseApplication; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\HttpKernel\Bundle\Bundle; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * @author Fabien Potencier - */ -class Application extends BaseApplication -{ - private $kernel; - private $commandsRegistered = false; - private $registrationErrors = []; - - public function __construct(KernelInterface $kernel) - { - $this->kernel = $kernel; - - parent::__construct('Symfony', Kernel::VERSION); - - $inputDefinition = $this->getDefinition(); - $inputDefinition->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment())); - $inputDefinition->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switch off debug mode.')); - } - - /** - * Gets the Kernel associated with this Console. - * - * @return KernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->kernel->getContainer()->has('services_resetter')) { - $this->kernel->getContainer()->get('services_resetter')->reset(); - } - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - $this->registerCommands(); - - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - } - - $this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher')); - - return parent::doRun($input, $output); - } - - /** - * {@inheritdoc} - */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) - { - if (!$command instanceof ListCommand) { - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - $this->registrationErrors = []; - } - - return parent::doRunCommand($command, $input, $output); - } - - $returnCode = parent::doRunCommand($command, $input, $output); - - if ($this->registrationErrors) { - $this->renderRegistrationErrors($input, $output); - $this->registrationErrors = []; - } - - return $returnCode; - } - - /** - * {@inheritdoc} - */ - public function find(string $name) - { - $this->registerCommands(); - - return parent::find($name); - } - - /** - * {@inheritdoc} - */ - public function get(string $name) - { - $this->registerCommands(); - - $command = parent::get($name); - - if ($command instanceof ContainerAwareInterface) { - $command->setContainer($this->kernel->getContainer()); - } - - return $command; - } - - /** - * {@inheritdoc} - */ - public function all(string $namespace = null) - { - $this->registerCommands(); - - return parent::all($namespace); - } - - /** - * {@inheritdoc} - */ - public function getLongVersion() - { - return parent::getLongVersion().sprintf(' (env: %s, debug: %s) #StandWithUkraine https://sf.to/ukraine', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false'); - } - - public function add(Command $command) - { - $this->registerCommands(); - - return parent::add($command); - } - - protected function registerCommands() - { - if ($this->commandsRegistered) { - return; - } - - $this->commandsRegistered = true; - - $this->kernel->boot(); - - $container = $this->kernel->getContainer(); - - foreach ($this->kernel->getBundles() as $bundle) { - if ($bundle instanceof Bundle) { - try { - $bundle->registerCommands($this); - } catch (\Throwable $e) { - $this->registrationErrors[] = $e; - } - } - } - - if ($container->has('console.command_loader')) { - $this->setCommandLoader($container->get('console.command_loader')); - } - - if ($container->hasParameter('console.command.ids')) { - $lazyCommandIds = $container->hasParameter('console.lazy_command.ids') ? $container->getParameter('console.lazy_command.ids') : []; - foreach ($container->getParameter('console.command.ids') as $id) { - if (!isset($lazyCommandIds[$id])) { - try { - $this->add($container->get($id)); - } catch (\Throwable $e) { - $this->registrationErrors[] = $e; - } - } - } - } - } - - private function renderRegistrationErrors(InputInterface $input, OutputInterface $output) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - (new SymfonyStyle($input, $output))->warning('Some commands could not be registered:'); - - foreach ($this->registrationErrors as $error) { - $this->doRenderThrowable($error, $output); - } - } -} diff --git a/vendor/symfony/framework-bundle/Console/Descriptor/Descriptor.php b/vendor/symfony/framework-bundle/Console/Descriptor/Descriptor.php deleted file mode 100644 index 5f84631..0000000 --- a/vendor/symfony/framework-bundle/Console/Descriptor/Descriptor.php +++ /dev/null @@ -1,376 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -abstract class Descriptor implements DescriptorInterface -{ - /** - * @var OutputInterface - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function describe(OutputInterface $output, $object, array $options = []) - { - $this->output = $output; - - switch (true) { - case $object instanceof RouteCollection: - $this->describeRouteCollection($object, $options); - break; - case $object instanceof Route: - $this->describeRoute($object, $options); - break; - case $object instanceof ParameterBag: - $this->describeContainerParameters($object, $options); - break; - case $object instanceof ContainerBuilder && !empty($options['env-vars']): - $this->describeContainerEnvVars($this->getContainerEnvVars($object), $options); - break; - case $object instanceof ContainerBuilder && isset($options['group_by']) && 'tags' === $options['group_by']: - $this->describeContainerTags($object, $options); - break; - case $object instanceof ContainerBuilder && isset($options['id']): - $this->describeContainerService($this->resolveServiceDefinition($object, $options['id']), $options, $object); - break; - case $object instanceof ContainerBuilder && isset($options['parameter']): - $this->describeContainerParameter($object->resolveEnvPlaceholders($object->getParameter($options['parameter'])), $options); - break; - case $object instanceof ContainerBuilder && isset($options['deprecations']): - $this->describeContainerDeprecations($object, $options); - break; - case $object instanceof ContainerBuilder: - $this->describeContainerServices($object, $options); - break; - case $object instanceof Definition: - $this->describeContainerDefinition($object, $options); - break; - case $object instanceof Alias: - $this->describeContainerAlias($object, $options); - break; - case $object instanceof EventDispatcherInterface: - $this->describeEventDispatcherListeners($object, $options); - break; - case \is_callable($object): - $this->describeCallable($object, $options); - break; - default: - throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object))); - } - } - - protected function getOutput(): OutputInterface - { - return $this->output; - } - - protected function write(string $content, bool $decorated = false) - { - $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW); - } - - abstract protected function describeRouteCollection(RouteCollection $routes, array $options = []); - - abstract protected function describeRoute(Route $route, array $options = []); - - abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = []); - - abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = []); - - /** - * Describes a container service by its name. - * - * Common options are: - * * name: name of described service - * - * @param Definition|Alias|object $service - */ - abstract protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null); - - /** - * Describes container services. - * - * Common options are: - * * tag: filters described services by given tag - */ - abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = []); - - abstract protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void; - - abstract protected function describeContainerDefinition(Definition $definition, array $options = []); - - abstract protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null); - - abstract protected function describeContainerParameter($parameter, array $options = []); - - abstract protected function describeContainerEnvVars(array $envs, array $options = []); - - /** - * Describes event dispatcher listeners. - * - * Common options are: - * * name: name of listened event - */ - abstract protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []); - - /** - * Describes a callable. - * - * @param mixed $callable - */ - abstract protected function describeCallable($callable, array $options = []); - - /** - * Formats a value as string. - * - * @param mixed $value - */ - protected function formatValue($value): string - { - if (\is_object($value)) { - return sprintf('object(%s)', \get_class($value)); - } - - if (\is_string($value)) { - return $value; - } - - return preg_replace("/\n\s*/s", '', var_export($value, true)); - } - - /** - * Formats a parameter. - * - * @param mixed $value - */ - protected function formatParameter($value): string - { - if ($value instanceof \UnitEnum) { - return var_export($value, true); - } - - // Recursively search for enum values, so we can replace it - // before json_encode (which will not display anything for \UnitEnum otherwise) - if (\is_array($value)) { - array_walk_recursive($value, static function (&$value) { - if ($value instanceof \UnitEnum) { - $value = var_export($value, true); - } - }); - } - - if (\is_bool($value) || \is_array($value) || (null === $value)) { - $jsonString = json_encode($value); - - if (preg_match('/^(.{60})./us', $jsonString, $matches)) { - return $matches[1].'...'; - } - - return $jsonString; - } - - return (string) $value; - } - - /** - * @return mixed - */ - protected function resolveServiceDefinition(ContainerBuilder $builder, string $serviceId) - { - if ($builder->hasDefinition($serviceId)) { - return $builder->getDefinition($serviceId); - } - - // Some service IDs don't have a Definition, they're aliases - if ($builder->hasAlias($serviceId)) { - return $builder->getAlias($serviceId); - } - - if ('service_container' === $serviceId) { - return (new Definition(ContainerInterface::class))->setPublic(true)->setSynthetic(true); - } - - // the service has been injected in some special way, just return the service - return $builder->get($serviceId); - } - - protected function findDefinitionsByTag(ContainerBuilder $builder, bool $showHidden): array - { - $definitions = []; - $tags = $builder->findTags(); - asort($tags); - - foreach ($tags as $tag) { - foreach ($builder->findTaggedServiceIds($tag) as $serviceId => $attributes) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if (!isset($definitions[$tag])) { - $definitions[$tag] = []; - } - - $definitions[$tag][$serviceId] = $definition; - } - } - - return $definitions; - } - - protected function sortParameters(ParameterBag $parameters) - { - $parameters = $parameters->all(); - ksort($parameters); - - return $parameters; - } - - protected function sortServiceIds(array $serviceIds) - { - asort($serviceIds); - - return $serviceIds; - } - - protected function sortTaggedServicesByPriority(array $services): array - { - $maxPriority = []; - foreach ($services as $service => $tags) { - $maxPriority[$service] = \PHP_INT_MIN; - foreach ($tags as $tag) { - $currentPriority = $tag['priority'] ?? 0; - if ($maxPriority[$service] < $currentPriority) { - $maxPriority[$service] = $currentPriority; - } - } - } - uasort($maxPriority, function ($a, $b) { - return $b <=> $a; - }); - - return array_keys($maxPriority); - } - - protected function sortTagsByPriority(array $tags): array - { - $sortedTags = []; - foreach ($tags as $tagName => $tag) { - $sortedTags[$tagName] = $this->sortByPriority($tag); - } - - return $sortedTags; - } - - protected function sortByPriority(array $tag): array - { - usort($tag, function ($a, $b) { - return ($b['priority'] ?? 0) <=> ($a['priority'] ?? 0); - }); - - return $tag; - } - - public static function getClassDescription(string $class, string &$resolvedClass = null): string - { - $resolvedClass = $class; - try { - $resource = new ClassExistenceResource($class, false); - - // isFresh() will explode ONLY if a parent class/trait does not exist - $resource->isFresh(0); - - $r = new \ReflectionClass($class); - $resolvedClass = $r->name; - - if ($docComment = $r->getDocComment()) { - $docComment = preg_split('#\n\s*\*\s*[\n@]#', substr($docComment, 3, -2), 2)[0]; - - return trim(preg_replace('#\s*\n\s*\*\s*#', ' ', $docComment)); - } - } catch (\ReflectionException $e) { - } - - return ''; - } - - private function getContainerEnvVars(ContainerBuilder $container): array - { - if (!$container->hasParameter('debug.container.dump')) { - return []; - } - - if (!is_file($container->getParameter('debug.container.dump'))) { - return []; - } - - $file = file_get_contents($container->getParameter('debug.container.dump')); - preg_match_all('{%env\(((?:\w++:)*+\w++)\)%}', $file, $envVars); - $envVars = array_unique($envVars[1]); - - $bag = $container->getParameterBag(); - $getDefaultParameter = function (string $name) { - return parent::get($name); - }; - $getDefaultParameter = $getDefaultParameter->bindTo($bag, \get_class($bag)); - - $getEnvReflection = new \ReflectionMethod($container, 'getEnv'); - $getEnvReflection->setAccessible(true); - - $envs = []; - - foreach ($envVars as $env) { - $processor = 'string'; - if (false !== $i = strrpos($name = $env, ':')) { - $name = substr($env, $i + 1); - $processor = substr($env, 0, $i); - } - $defaultValue = ($hasDefault = $container->hasParameter("env($name)")) ? $getDefaultParameter("env($name)") : null; - if (false === ($runtimeValue = $_ENV[$name] ?? $_SERVER[$name] ?? getenv($name))) { - $runtimeValue = null; - } - $processedValue = ($hasRuntime = null !== $runtimeValue) || $hasDefault ? $getEnvReflection->invoke($container, $env) : null; - $envs["$name$processor"] = [ - 'name' => $name, - 'processor' => $processor, - 'default_available' => $hasDefault, - 'default_value' => $defaultValue, - 'runtime_available' => $hasRuntime, - 'runtime_value' => $runtimeValue, - 'processed_value' => $processedValue, - ]; - } - ksort($envs); - - return array_values($envs); - } -} diff --git a/vendor/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php b/vendor/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php deleted file mode 100644 index 6984c12..0000000 --- a/vendor/symfony/framework-bundle/Console/Descriptor/JsonDescriptor.php +++ /dev/null @@ -1,420 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class JsonDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $data = []; - foreach ($routes->all() as $name => $route) { - $data[$name] = $this->getRouteData($route); - } - - $this->writeData($data, $options); - } - - protected function describeRoute(Route $route, array $options = []) - { - $this->writeData($this->getRouteData($route), $options); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->writeData($this->sortParameters($parameters), $options); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $data = []; - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $data[$tag] = []; - foreach ($definitions as $definition) { - $data[$tag][] = $this->getContainerDefinitionData($definition, true); - } - } - - $this->writeData($data, $options); - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $options, $builder); - } elseif ($service instanceof Definition) { - $this->writeData($this->getContainerDefinitionData($service, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options); - } else { - $this->writeData(\get_class($service), $options); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $omitTags = isset($options['omit_tags']) && $options['omit_tags']; - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $data = ['definitions' => [], 'aliases' => [], 'services' => []]; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if ($service instanceof Alias) { - $data['aliases'][$serviceId] = $this->getContainerAliasData($service); - } elseif ($service instanceof Definition) { - $data['definitions'][$serviceId] = $this->getContainerDefinitionData($service, $omitTags, $showArguments); - } else { - $data['services'][$serviceId] = \get_class($service); - } - } - - $this->writeData($data, $options); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $this->writeData($this->getContainerDefinitionData($definition, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - if (!$builder) { - $this->writeData($this->getContainerAliasData($alias), $options); - - return; - } - - $this->writeData( - [$this->getContainerAliasData($alias), $this->getContainerDefinitionData($builder->getDefinition((string) $alias), isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'])], - array_merge($options, ['id' => (string) $alias]) - ); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $this->writeData($this->getEventDispatcherListenersData($eventDispatcher, $options), $options); - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeData($this->getCallableData($callable), $options); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $key = $options['parameter'] ?? ''; - - $this->writeData([$key => $parameter], $options); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the JSON format to debug environment variables is not supported.'); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = [ - 'message' => $log['message'], - 'file' => $log['file'], - 'line' => $log['line'], - 'count' => $log['count'], - ]; - $remainingCount += $log['count']; - } - - $this->writeData(['remainingCount' => $remainingCount, 'deprecations' => $formattedLogs], $options); - } - - private function writeData(array $data, array $options) - { - $flags = $options['json_encoding'] ?? 0; - - // Recursively search for enum values, so we can replace it - // before json_encode (which will not display anything for \UnitEnum otherwise) - array_walk_recursive($data, static function (&$value) { - if ($value instanceof \UnitEnum) { - $value = var_export($value, true); - } - }); - - $this->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n"); - } - - protected function getRouteData(Route $route): array - { - $data = [ - 'path' => $route->getPath(), - 'pathRegex' => $route->compile()->getRegex(), - 'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY', - 'hostRegex' => '' !== $route->getHost() ? $route->compile()->getHostRegex() : '', - 'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', - 'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - 'class' => \get_class($route), - 'defaults' => $route->getDefaults(), - 'requirements' => $route->getRequirements() ?: 'NO CUSTOM', - 'options' => $route->getOptions(), - ]; - - if ('' !== $route->getCondition()) { - $data['condition'] = $route->getCondition(); - } - - return $data; - } - - private function getContainerDefinitionData(Definition $definition, bool $omitTags = false, bool $showArguments = false): array - { - $data = [ - 'class' => (string) $definition->getClass(), - 'public' => $definition->isPublic() && !$definition->isPrivate(), - 'synthetic' => $definition->isSynthetic(), - 'lazy' => $definition->isLazy(), - 'shared' => $definition->isShared(), - 'abstract' => $definition->isAbstract(), - 'autowire' => $definition->isAutowired(), - 'autoconfigure' => $definition->isAutoconfigured(), - ]; - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $data['description'] = $classDescription; - } - - if ($showArguments) { - $data['arguments'] = $this->describeValue($definition->getArguments(), $omitTags, $showArguments); - } - - $data['file'] = $definition->getFile(); - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $data['factory_service'] = (string) $factory[0]; - } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); - } else { - $data['factory_class'] = $factory[0]; - } - $data['factory_method'] = $factory[1]; - } else { - $data['factory_function'] = $factory; - } - } - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $data['calls'] = []; - foreach ($calls as $callData) { - $data['calls'][] = $callData[0]; - } - } - - if (!$omitTags) { - $data['tags'] = []; - foreach ($this->sortTagsByPriority($definition->getTags()) as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $data['tags'][] = ['name' => $tagName, 'parameters' => $parameters]; - } - } - } - - return $data; - } - - private function getContainerAliasData(Alias $alias): array - { - return [ - 'service' => (string) $alias, - 'public' => $alias->isPublic() && !$alias->isPrivate(), - ]; - } - - private function getEventDispatcherListenersData(EventDispatcherInterface $eventDispatcher, array $options): array - { - $data = []; - $event = \array_key_exists('event', $options) ? $options['event'] : null; - - if (null !== $event) { - foreach ($eventDispatcher->getListeners($event) as $listener) { - $l = $this->getCallableData($listener); - $l['priority'] = $eventDispatcher->getListenerPriority($event, $listener); - $data[] = $l; - } - } else { - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - foreach ($eventListeners as $eventListener) { - $l = $this->getCallableData($eventListener); - $l['priority'] = $eventDispatcher->getListenerPriority($eventListened, $eventListener); - $data[$eventListened][] = $l; - } - } - } - - return $data; - } - - private function getCallableData($callable): array - { - $data = []; - - if (\is_array($callable)) { - $data['type'] = 'function'; - - if (\is_object($callable[0])) { - $data['name'] = $callable[1]; - $data['class'] = \get_class($callable[0]); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $data['name'] = $callable[1]; - $data['class'] = $callable[0]; - $data['static'] = true; - } else { - $data['name'] = substr($callable[1], 8); - $data['class'] = $callable[0]; - $data['static'] = true; - $data['parent'] = true; - } - } - - return $data; - } - - if (\is_string($callable)) { - $data['type'] = 'function'; - - if (!str_contains($callable, '::')) { - $data['name'] = $callable; - } else { - $callableParts = explode('::', $callable); - - $data['name'] = $callableParts[1]; - $data['class'] = $callableParts[0]; - $data['static'] = true; - } - - return $data; - } - - if ($callable instanceof \Closure) { - $data['type'] = 'closure'; - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $data; - } - $data['name'] = $r->name; - - if ($class = $r->getClosureScopeClass()) { - $data['class'] = $class->name; - if (!$r->getClosureThis()) { - $data['static'] = true; - } - } - - return $data; - } - - if (method_exists($callable, '__invoke')) { - $data['type'] = 'object'; - $data['name'] = \get_class($callable); - - return $data; - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function describeValue($value, bool $omitTags, bool $showArguments) - { - if (\is_array($value)) { - $data = []; - foreach ($value as $k => $v) { - $data[$k] = $this->describeValue($v, $omitTags, $showArguments); - } - - return $data; - } - - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - } - - if ($value instanceof Reference) { - return [ - 'type' => 'service', - 'id' => (string) $value, - ]; - } - - if ($value instanceof AbstractArgument) { - return ['type' => 'abstract', 'text' => $value->getText()]; - } - - if ($value instanceof ArgumentInterface) { - return $this->describeValue($value->getValues(), $omitTags, $showArguments); - } - - if ($value instanceof Definition) { - return $this->getContainerDefinitionData($value, $omitTags, $showArguments); - } - - return $value; - } -} diff --git a/vendor/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php deleted file mode 100644 index ad1a804..0000000 --- a/vendor/symfony/framework-bundle/Console/Descriptor/MarkdownDescriptor.php +++ /dev/null @@ -1,414 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class MarkdownDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $first = true; - foreach ($routes->all() as $name => $route) { - if ($first) { - $first = false; - } else { - $this->write("\n\n"); - } - $this->describeRoute($route, ['name' => $name]); - } - $this->write("\n"); - } - - protected function describeRoute(Route $route, array $options = []) - { - $output = '- Path: '.$route->getPath() - ."\n".'- Path Regex: '.$route->compile()->getRegex() - ."\n".'- Host: '.('' !== $route->getHost() ? $route->getHost() : 'ANY') - ."\n".'- Host Regex: '.('' !== $route->getHost() ? $route->compile()->getHostRegex() : '') - ."\n".'- Scheme: '.($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY') - ."\n".'- Method: '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY') - ."\n".'- Class: '.\get_class($route) - ."\n".'- Defaults: '.$this->formatRouterConfig($route->getDefaults()) - ."\n".'- Requirements: '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM') - ."\n".'- Options: '.$this->formatRouterConfig($route->getOptions()); - - if ('' !== $route->getCondition()) { - $output .= "\n".'- Condition: '.$route->getCondition(); - } - - $this->write(isset($options['name']) - ? $options['name']."\n".str_repeat('-', \strlen($options['name']))."\n\n".$output - : $output); - $this->write("\n"); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->write("Container parameters\n====================\n"); - foreach ($this->sortParameters($parameters) as $key => $value) { - $this->write(sprintf("\n- `%s`: `%s`", $key, $this->formatParameter($value))); - } - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $this->write("Container tags\n=============="); - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $this->write("\n\n".$tag."\n".str_repeat('-', \strlen($tag))); - foreach ($definitions as $serviceId => $definition) { - $this->write("\n\n"); - $this->describeContainerDefinition($definition, ['omit_tags' => true, 'id' => $serviceId]); - } - } - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - $childOptions = array_merge($options, ['id' => $options['id'], 'as_array' => true]); - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $childOptions, $builder); - } elseif ($service instanceof Definition) { - $this->describeContainerDefinition($service, $childOptions); - } else { - $this->write(sprintf('**`%s`:** `%s`', $options['id'], \get_class($service))); - } - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - if (0 === \count($logs)) { - $this->write("## There are no deprecations in the logs!\n"); - - return; - } - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = sprintf("- %sx: \"%s\" in %s:%s\n", $log['count'], $log['message'], $log['file'], $log['line']); - $remainingCount += $log['count']; - } - - $this->write(sprintf("## Remaining deprecations (%s)\n\n", $remainingCount)); - foreach ($formattedLogs as $formattedLog) { - $this->write($formattedLog); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - - $title = $showHidden ? 'Hidden services' : 'Services'; - if (isset($options['tag'])) { - $title .= ' with tag `'.$options['tag'].'`'; - } - $this->write($title."\n".str_repeat('=', \strlen($title))); - - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $services = ['definitions' => [], 'aliases' => [], 'services' => []]; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - if ($service instanceof Alias) { - $services['aliases'][$serviceId] = $service; - } elseif ($service instanceof Definition) { - $services['definitions'][$serviceId] = $service; - } else { - $services['services'][$serviceId] = $service; - } - } - - if (!empty($services['definitions'])) { - $this->write("\n\nDefinitions\n-----------\n"); - foreach ($services['definitions'] as $id => $service) { - $this->write("\n"); - $this->describeContainerDefinition($service, ['id' => $id, 'show_arguments' => $showArguments]); - } - } - - if (!empty($services['aliases'])) { - $this->write("\n\nAliases\n-------\n"); - foreach ($services['aliases'] as $id => $service) { - $this->write("\n"); - $this->describeContainerAlias($service, ['id' => $id]); - } - } - - if (!empty($services['services'])) { - $this->write("\n\nServices\n--------\n"); - foreach ($services['services'] as $id => $service) { - $this->write("\n"); - $this->write(sprintf('- `%s`: `%s`', $id, \get_class($service))); - } - } - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $output = ''; - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $output .= '- Description: `'.$classDescription.'`'."\n"; - } - - $output .= '- Class: `'.$definition->getClass().'`' - ."\n".'- Public: '.($definition->isPublic() && !$definition->isPrivate() ? 'yes' : 'no') - ."\n".'- Synthetic: '.($definition->isSynthetic() ? 'yes' : 'no') - ."\n".'- Lazy: '.($definition->isLazy() ? 'yes' : 'no') - ."\n".'- Shared: '.($definition->isShared() ? 'yes' : 'no') - ."\n".'- Abstract: '.($definition->isAbstract() ? 'yes' : 'no') - ."\n".'- Autowired: '.($definition->isAutowired() ? 'yes' : 'no') - ."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no') - ; - - if (isset($options['show_arguments']) && $options['show_arguments']) { - $output .= "\n".'- Arguments: '.($definition->getArguments() ? 'yes' : 'no'); - } - - if ($definition->getFile()) { - $output .= "\n".'- File: `'.$definition->getFile().'`'; - } - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $output .= "\n".'- Factory Service: `'.$factory[0].'`'; - } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); - } else { - $output .= "\n".'- Factory Class: `'.$factory[0].'`'; - } - $output .= "\n".'- Factory Method: `'.$factory[1].'`'; - } else { - $output .= "\n".'- Factory Function: `'.$factory.'`'; - } - } - - $calls = $definition->getMethodCalls(); - foreach ($calls as $callData) { - $output .= "\n".'- Call: `'.$callData[0].'`'; - } - - if (!(isset($options['omit_tags']) && $options['omit_tags'])) { - foreach ($this->sortTagsByPriority($definition->getTags()) as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $output .= "\n".'- Tag: `'.$tagName.'`'; - foreach ($parameters as $name => $value) { - $output .= "\n".' - '.ucfirst($name).': '.$value; - } - } - } - } - - $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - $output = '- Service: `'.$alias.'`' - ."\n".'- Public: '.($alias->isPublic() && !$alias->isPrivate() ? 'yes' : 'no'); - - if (!isset($options['id'])) { - $this->write($output); - - return; - } - - $this->write(sprintf("### %s\n\n%s\n", $options['id'], $output)); - - if (!$builder) { - return; - } - - $this->write("\n"); - $this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias])); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the markdown format to debug environment variables is not supported.'); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $event = $options['event'] ?? null; - $dispatcherServiceName = $options['dispatcher_service_name'] ?? null; - - $title = 'Registered listeners'; - - if (null !== $dispatcherServiceName) { - $title .= sprintf(' of event dispatcher "%s"', $dispatcherServiceName); - } - - if (null !== $event) { - $title .= sprintf(' for event `%s` ordered by descending priority', $event); - $registeredListeners = $eventDispatcher->getListeners($event); - } else { - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - } - - $this->write(sprintf('# %s', $title)."\n"); - - if (null !== $event) { - foreach ($registeredListeners as $order => $listener) { - $this->write("\n".sprintf('## Listener %d', $order + 1)."\n"); - $this->describeCallable($listener); - $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($event, $listener))."\n"); - } - } else { - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - $this->write("\n".sprintf('## %s', $eventListened)."\n"); - - foreach ($eventListeners as $order => $eventListener) { - $this->write("\n".sprintf('### Listener %d', $order + 1)."\n"); - $this->describeCallable($eventListener); - $this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($eventListened, $eventListener))."\n"); - } - } - } - } - - protected function describeCallable($callable, array $options = []) - { - $string = ''; - - if (\is_array($callable)) { - $string .= "\n- Type: `function`"; - - if (\is_object($callable[0])) { - $string .= "\n".sprintf('- Name: `%s`', $callable[1]); - $string .= "\n".sprintf('- Class: `%s`', \get_class($callable[0])); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $string .= "\n".sprintf('- Name: `%s`', $callable[1]); - $string .= "\n".sprintf('- Class: `%s`', $callable[0]); - $string .= "\n- Static: yes"; - } else { - $string .= "\n".sprintf('- Name: `%s`', substr($callable[1], 8)); - $string .= "\n".sprintf('- Class: `%s`', $callable[0]); - $string .= "\n- Static: yes"; - $string .= "\n- Parent: yes"; - } - } - - return $this->write($string."\n"); - } - - if (\is_string($callable)) { - $string .= "\n- Type: `function`"; - - if (!str_contains($callable, '::')) { - $string .= "\n".sprintf('- Name: `%s`', $callable); - } else { - $callableParts = explode('::', $callable); - - $string .= "\n".sprintf('- Name: `%s`', $callableParts[1]); - $string .= "\n".sprintf('- Class: `%s`', $callableParts[0]); - $string .= "\n- Static: yes"; - } - - return $this->write($string."\n"); - } - - if ($callable instanceof \Closure) { - $string .= "\n- Type: `closure`"; - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $this->write($string."\n"); - } - $string .= "\n".sprintf('- Name: `%s`', $r->name); - - if ($class = $r->getClosureScopeClass()) { - $string .= "\n".sprintf('- Class: `%s`', $class->name); - if (!$r->getClosureThis()) { - $string .= "\n- Static: yes"; - } - } - - return $this->write($string."\n"); - } - - if (method_exists($callable, '__invoke')) { - $string .= "\n- Type: `object`"; - $string .= "\n".sprintf('- Name: `%s`', \get_class($callable)); - - return $this->write($string."\n"); - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function formatRouterConfig(array $array): string - { - if (!$array) { - return 'NONE'; - } - - $string = ''; - ksort($array); - foreach ($array as $name => $value) { - $string .= "\n".' - `'.$name.'`: '.$this->formatValue($value); - } - - return $string; - } -} diff --git a/vendor/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php b/vendor/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php deleted file mode 100644 index 9f2b426..0000000 --- a/vendor/symfony/framework-bundle/Console/Descriptor/TextDescriptor.php +++ /dev/null @@ -1,638 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class TextDescriptor extends Descriptor -{ - private $fileLinkFormatter; - - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $showControllers = isset($options['show_controllers']) && $options['show_controllers']; - - $tableHeaders = ['Name', 'Method', 'Scheme', 'Host', 'Path']; - if ($showControllers) { - $tableHeaders[] = 'Controller'; - } - - $tableRows = []; - foreach ($routes->all() as $name => $route) { - $controller = $route->getDefault('_controller'); - - $row = [ - $name, - $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', - '' !== $route->getHost() ? $route->getHost() : 'ANY', - $this->formatControllerLink($controller, $route->getPath(), $options['container'] ?? null), - ]; - - if ($showControllers) { - $row[] = $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : ''; - } - - $tableRows[] = $row; - } - - if (isset($options['output'])) { - $options['output']->table($tableHeaders, $tableRows); - } else { - $table = new Table($this->getOutput()); - $table->setHeaders($tableHeaders)->setRows($tableRows); - $table->render(); - } - } - - protected function describeRoute(Route $route, array $options = []) - { - $defaults = $route->getDefaults(); - if (isset($defaults['_controller'])) { - $defaults['_controller'] = $this->formatControllerLink($defaults['_controller'], $this->formatCallable($defaults['_controller']), $options['container'] ?? null); - } - - $tableHeaders = ['Property', 'Value']; - $tableRows = [ - ['Route Name', $options['name'] ?? ''], - ['Path', $route->getPath()], - ['Path Regex', $route->compile()->getRegex()], - ['Host', ('' !== $route->getHost() ? $route->getHost() : 'ANY')], - ['Host Regex', ('' !== $route->getHost() ? $route->compile()->getHostRegex() : '')], - ['Scheme', ($route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY')], - ['Method', ($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY')], - ['Requirements', ($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM')], - ['Class', \get_class($route)], - ['Defaults', $this->formatRouterConfig($defaults)], - ['Options', $this->formatRouterConfig($route->getOptions())], - ]; - - if ('' !== $route->getCondition()) { - $tableRows[] = ['Condition', $route->getCondition()]; - } - - $table = new Table($this->getOutput()); - $table->setHeaders($tableHeaders)->setRows($tableRows); - $table->render(); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $tableHeaders = ['Parameter', 'Value']; - - $tableRows = []; - foreach ($this->sortParameters($parameters) as $parameter => $value) { - $tableRows[] = [$parameter, $this->formatParameter($value)]; - } - - $options['output']->title('Symfony Container Parameters'); - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - - if ($showHidden) { - $options['output']->title('Symfony Container Hidden Tags'); - } else { - $options['output']->title('Symfony Container Tags'); - } - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $options['output']->section(sprintf('"%s" tag', $tag)); - $options['output']->listing(array_keys($definitions)); - } - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - if ($service instanceof Alias) { - $this->describeContainerAlias($service, $options, $builder); - } elseif ($service instanceof Definition) { - $this->describeContainerDefinition($service, $options); - } else { - $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); - $options['output']->table( - ['Service ID', 'Class'], - [ - [$options['id'] ?? '-', \get_class($service)], - ] - ); - } - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $showHidden = isset($options['show_hidden']) && $options['show_hidden']; - $showTag = $options['tag'] ?? null; - - if ($showHidden) { - $title = 'Symfony Container Hidden Services'; - } else { - $title = 'Symfony Container Services'; - } - - if ($showTag) { - $title .= sprintf(' Tagged with "%s" Tag', $options['tag']); - } - - $options['output']->title($title); - - $serviceIds = isset($options['tag']) && $options['tag'] - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($options['tag'])) - : $this->sortServiceIds($builder->getServiceIds()); - $maxTags = []; - - if (isset($options['filter'])) { - $serviceIds = array_filter($serviceIds, $options['filter']); - } - - foreach ($serviceIds as $key => $serviceId) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - // filter out hidden services unless shown explicitly - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - unset($serviceIds[$key]); - continue; - } - - if ($definition instanceof Definition) { - if ($showTag) { - $tags = $definition->getTag($showTag); - foreach ($tags as $tag) { - foreach ($tag as $key => $value) { - if (!isset($maxTags[$key])) { - $maxTags[$key] = \strlen($key); - } - if (\strlen($value) > $maxTags[$key]) { - $maxTags[$key] = \strlen($value); - } - } - } - } - } - } - - $tagsCount = \count($maxTags); - $tagsNames = array_keys($maxTags); - - $tableHeaders = array_merge(['Service ID'], $tagsNames, ['Class name']); - $tableRows = []; - $rawOutput = isset($options['raw_text']) && $options['raw_text']; - foreach ($serviceIds as $serviceId) { - $definition = $this->resolveServiceDefinition($builder, $serviceId); - - $styledServiceId = $rawOutput ? $serviceId : sprintf('%s', OutputFormatter::escape($serviceId)); - if ($definition instanceof Definition) { - if ($showTag) { - foreach ($this->sortByPriority($definition->getTag($showTag)) as $key => $tag) { - $tagValues = []; - foreach ($tagsNames as $tagName) { - $tagValues[] = $tag[$tagName] ?? ''; - } - if (0 === $key) { - $tableRows[] = array_merge([$serviceId], $tagValues, [$definition->getClass()]); - } else { - $tableRows[] = array_merge([' (same service as previous, another tag)'], $tagValues, ['']); - } - } - } else { - $tableRows[] = [$styledServiceId, $definition->getClass()]; - } - } elseif ($definition instanceof Alias) { - $alias = $definition; - $tableRows[] = array_merge([$styledServiceId, sprintf('alias for "%s"', $alias)], $tagsCount ? array_fill(0, $tagsCount, '') : []); - } else { - $tableRows[] = array_merge([$styledServiceId, \get_class($definition)], $tagsCount ? array_fill(0, $tagsCount, '') : []); - } - } - - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - if (isset($options['id'])) { - $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); - } - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $options['output']->text($classDescription."\n"); - } - - $tableHeaders = ['Option', 'Value']; - - $tableRows[] = ['Service ID', $options['id'] ?? '-']; - $tableRows[] = ['Class', $definition->getClass() ?: '-']; - - $omitTags = isset($options['omit_tags']) && $options['omit_tags']; - if (!$omitTags && ($tags = $definition->getTags())) { - $tagInformation = []; - foreach ($tags as $tagName => $tagData) { - foreach ($tagData as $tagParameters) { - $parameters = array_map(function ($key, $value) { - return sprintf('%s: %s', $key, $value); - }, array_keys($tagParameters), array_values($tagParameters)); - $parameters = implode(', ', $parameters); - - if ('' === $parameters) { - $tagInformation[] = sprintf('%s', $tagName); - } else { - $tagInformation[] = sprintf('%s (%s)', $tagName, $parameters); - } - } - } - $tagInformation = implode("\n", $tagInformation); - } else { - $tagInformation = '-'; - } - $tableRows[] = ['Tags', $tagInformation]; - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $callInformation = []; - foreach ($calls as $call) { - $callInformation[] = $call[0]; - } - $tableRows[] = ['Calls', implode(', ', $callInformation)]; - } - - $tableRows[] = ['Public', $definition->isPublic() && !$definition->isPrivate() ? 'yes' : 'no']; - $tableRows[] = ['Synthetic', $definition->isSynthetic() ? 'yes' : 'no']; - $tableRows[] = ['Lazy', $definition->isLazy() ? 'yes' : 'no']; - $tableRows[] = ['Shared', $definition->isShared() ? 'yes' : 'no']; - $tableRows[] = ['Abstract', $definition->isAbstract() ? 'yes' : 'no']; - $tableRows[] = ['Autowired', $definition->isAutowired() ? 'yes' : 'no']; - $tableRows[] = ['Autoconfigured', $definition->isAutoconfigured() ? 'yes' : 'no']; - - if ($definition->getFile()) { - $tableRows[] = ['Required File', $definition->getFile() ?: '-']; - } - - if ($factory = $definition->getFactory()) { - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $tableRows[] = ['Factory Service', $factory[0]]; - } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); - } else { - $tableRows[] = ['Factory Class', $factory[0]]; - } - $tableRows[] = ['Factory Method', $factory[1]]; - } else { - $tableRows[] = ['Factory Function', $factory]; - } - } - - $showArguments = isset($options['show_arguments']) && $options['show_arguments']; - $argumentsInformation = []; - if ($showArguments && ($arguments = $definition->getArguments())) { - foreach ($arguments as $argument) { - if ($argument instanceof ServiceClosureArgument) { - $argument = $argument->getValues()[0]; - } - if ($argument instanceof Reference) { - $argumentsInformation[] = sprintf('Service(%s)', (string) $argument); - } elseif ($argument instanceof IteratorArgument) { - if ($argument instanceof TaggedIteratorArgument) { - $argumentsInformation[] = sprintf('Tagged Iterator for "%s"%s', $argument->getTag(), $options['is_debug'] ? '' : sprintf(' (%d element(s))', \count($argument->getValues()))); - } else { - $argumentsInformation[] = sprintf('Iterator (%d element(s))', \count($argument->getValues())); - } - - foreach ($argument->getValues() as $ref) { - $argumentsInformation[] = sprintf('- Service(%s)', $ref); - } - } elseif ($argument instanceof ServiceLocatorArgument) { - $argumentsInformation[] = sprintf('Service locator (%d element(s))', \count($argument->getValues())); - } elseif ($argument instanceof Definition) { - $argumentsInformation[] = 'Inlined Service'; - } elseif ($argument instanceof \UnitEnum) { - $argumentsInformation[] = var_export($argument, true); - } elseif ($argument instanceof AbstractArgument) { - $argumentsInformation[] = sprintf('Abstract argument (%s)', $argument->getText()); - } else { - $argumentsInformation[] = \is_array($argument) ? sprintf('Array (%d element(s))', \count($argument)) : $argument; - } - } - - $tableRows[] = ['Arguments', implode("\n", $argumentsInformation)]; - } - - $options['output']->table($tableHeaders, $tableRows); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - $options['output']->warning('The deprecation file does not exist, please try warming the cache first.'); - - return; - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - if (0 === \count($logs)) { - $options['output']->success('There are no deprecations in the logs!'); - - return; - } - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $formattedLogs[] = sprintf("%sx: %s\n in %s:%s", $log['count'], $log['message'], $log['file'], $log['line']); - $remainingCount += $log['count']; - } - $options['output']->title(sprintf('Remaining deprecations (%s)', $remainingCount)); - $options['output']->listing($formattedLogs); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - if ($alias->isPublic() && !$alias->isPrivate()) { - $options['output']->comment(sprintf('This service is a public alias for the service %s', (string) $alias)); - } else { - $options['output']->comment(sprintf('This service is a private alias for the service %s', (string) $alias)); - } - - if (!$builder) { - return; - } - - $this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias])); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $options['output']->table( - ['Parameter', 'Value'], - [ - [$options['parameter'], $this->formatParameter($parameter), - ], - ]); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - $dump = new Dumper($this->output); - $options['output']->title('Symfony Container Environment Variables'); - - if (null !== $name = $options['name'] ?? null) { - $options['output']->comment('Displaying detailed environment variable usage matching '.$name); - - $matches = false; - foreach ($envs as $env) { - if ($name === $env['name'] || false !== stripos($env['name'], $name)) { - $matches = true; - $options['output']->section('%env('.$env['processor'].':'.$env['name'].')%'); - $options['output']->table([], [ - ['Default value', $env['default_available'] ? $dump($env['default_value']) : 'n/a'], - ['Real value', $env['runtime_available'] ? $dump($env['runtime_value']) : 'n/a'], - ['Processed value', $env['default_available'] || $env['runtime_available'] ? $dump($env['processed_value']) : 'n/a'], - ]); - } - } - - if (!$matches) { - $options['output']->block('None of the environment variables match this name.'); - } else { - $options['output']->comment('Note real values might be different between web and CLI.'); - } - - return; - } - - if (!$envs) { - $options['output']->block('No environment variables are being used.'); - - return; - } - - $rows = []; - $missing = []; - foreach ($envs as $env) { - if (isset($rows[$env['name']])) { - continue; - } - - $rows[$env['name']] = [ - $env['name'], - $env['default_available'] ? $dump($env['default_value']) : 'n/a', - $env['runtime_available'] ? $dump($env['runtime_value']) : 'n/a', - ]; - if (!$env['default_available'] && !$env['runtime_available']) { - $missing[$env['name']] = true; - } - } - - $options['output']->table(['Name', 'Default value', 'Real value'], $rows); - $options['output']->comment('Note real values might be different between web and CLI.'); - - if ($missing) { - $options['output']->warning('The following variables are missing:'); - $options['output']->listing(array_keys($missing)); - } - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $event = $options['event'] ?? null; - $dispatcherServiceName = $options['dispatcher_service_name'] ?? null; - - $title = 'Registered Listeners'; - - if (null !== $dispatcherServiceName) { - $title .= sprintf(' of Event Dispatcher "%s"', $dispatcherServiceName); - } - - if (null !== $event) { - $title .= sprintf(' for "%s" Event', $event); - $registeredListeners = $eventDispatcher->getListeners($event); - } else { - $title .= ' Grouped by Event'; - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - } - - $options['output']->title($title); - if (null !== $event) { - $this->renderEventListenerTable($eventDispatcher, $event, $registeredListeners, $options['output']); - } else { - ksort($registeredListeners); - foreach ($registeredListeners as $eventListened => $eventListeners) { - $options['output']->section(sprintf('"%s" event', $eventListened)); - $this->renderEventListenerTable($eventDispatcher, $eventListened, $eventListeners, $options['output']); - } - } - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeText($this->formatCallable($callable), $options); - } - - private function renderEventListenerTable(EventDispatcherInterface $eventDispatcher, string $event, array $eventListeners, SymfonyStyle $io) - { - $tableHeaders = ['Order', 'Callable', 'Priority']; - $tableRows = []; - - foreach ($eventListeners as $order => $listener) { - $tableRows[] = [sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)]; - } - - $io->table($tableHeaders, $tableRows); - } - - private function formatRouterConfig(array $config): string - { - if (empty($config)) { - return 'NONE'; - } - - ksort($config); - - $configAsString = ''; - foreach ($config as $key => $value) { - $configAsString .= sprintf("\n%s: %s", $key, $this->formatValue($value)); - } - - return trim($configAsString); - } - - private function formatControllerLink($controller, string $anchorText, callable $getContainer = null): string - { - if (null === $this->fileLinkFormatter) { - return $anchorText; - } - - try { - if (null === $controller) { - return $anchorText; - } elseif (\is_array($controller)) { - $r = new \ReflectionMethod($controller[0], $controller[1]); - } elseif ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - } elseif (method_exists($controller, '__invoke')) { - $r = new \ReflectionMethod($controller, '__invoke'); - } elseif (!\is_string($controller)) { - return $anchorText; - } elseif (str_contains($controller, '::')) { - $r = new \ReflectionMethod($controller); - } else { - $r = new \ReflectionFunction($controller); - } - } catch (\ReflectionException $e) { - if (\is_array($controller)) { - $controller = implode('::', $controller); - } - - $id = $controller; - $method = '__invoke'; - - if ($pos = strpos($controller, '::')) { - $id = substr($controller, 0, $pos); - $method = substr($controller, $pos + 2); - } - - if (!$getContainer || !($container = $getContainer()) || !$container->has($id)) { - return $anchorText; - } - - try { - $r = new \ReflectionMethod($container->findDefinition($id)->getClass(), $method); - } catch (\ReflectionException $e) { - return $anchorText; - } - } - - $fileLink = $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine()); - if ($fileLink) { - return sprintf('%s', $fileLink, $anchorText); - } - - return $anchorText; - } - - private function formatCallable($callable): string - { - if (\is_array($callable)) { - if (\is_object($callable[0])) { - return sprintf('%s::%s()', \get_class($callable[0]), $callable[1]); - } - - return sprintf('%s::%s()', $callable[0], $callable[1]); - } - - if (\is_string($callable)) { - return sprintf('%s()', $callable); - } - - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return 'Closure()'; - } - if ($class = $r->getClosureScopeClass()) { - return sprintf('%s::%s()', $class->name, $r->name); - } - - return $r->name.'()'; - } - - if (method_exists($callable, '__invoke')) { - return sprintf('%s::__invoke()', \get_class($callable)); - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function writeText(string $content, array $options = []) - { - $this->write( - isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, - isset($options['raw_output']) ? !$options['raw_output'] : true - ); - } -} diff --git a/vendor/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php b/vendor/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php deleted file mode 100644 index e9db8c4..0000000 --- a/vendor/symfony/framework-bundle/Console/Descriptor/XmlDescriptor.php +++ /dev/null @@ -1,570 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; - -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Jean-François Simon - * - * @internal - */ -class XmlDescriptor extends Descriptor -{ - protected function describeRouteCollection(RouteCollection $routes, array $options = []) - { - $this->writeDocument($this->getRouteCollectionDocument($routes)); - } - - protected function describeRoute(Route $route, array $options = []) - { - $this->writeDocument($this->getRouteDocument($route, $options['name'] ?? null)); - } - - protected function describeContainerParameters(ParameterBag $parameters, array $options = []) - { - $this->writeDocument($this->getContainerParametersDocument($parameters)); - } - - protected function describeContainerTags(ContainerBuilder $builder, array $options = []) - { - $this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_hidden']) && $options['show_hidden'])); - } - - protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null) - { - if (!isset($options['id'])) { - throw new \InvalidArgumentException('An "id" option must be provided.'); - } - - $this->writeDocument($this->getContainerServiceDocument($service, $options['id'], $builder, isset($options['show_arguments']) && $options['show_arguments'])); - } - - protected function describeContainerServices(ContainerBuilder $builder, array $options = []) - { - $this->writeDocument($this->getContainerServicesDocument($builder, $options['tag'] ?? null, isset($options['show_hidden']) && $options['show_hidden'], isset($options['show_arguments']) && $options['show_arguments'], $options['filter'] ?? null)); - } - - protected function describeContainerDefinition(Definition $definition, array $options = []) - { - $this->writeDocument($this->getContainerDefinitionDocument($definition, $options['id'] ?? null, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'])); - } - - protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($dom->importNode($this->getContainerAliasDocument($alias, $options['id'] ?? null)->childNodes->item(0), true)); - - if (!$builder) { - $this->writeDocument($dom); - - return; - } - - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($builder->getDefinition((string) $alias), (string) $alias)->childNodes->item(0), true)); - - $this->writeDocument($dom); - } - - protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) - { - $this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, $options)); - } - - protected function describeCallable($callable, array $options = []) - { - $this->writeDocument($this->getCallableDocument($callable)); - } - - protected function describeContainerParameter($parameter, array $options = []) - { - $this->writeDocument($this->getContainerParameterDocument($parameter, $options)); - } - - protected function describeContainerEnvVars(array $envs, array $options = []) - { - throw new LogicException('Using the XML format to debug environment variables is not supported.'); - } - - protected function describeContainerDeprecations(ContainerBuilder $builder, array $options = []): void - { - $containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $builder->getParameter('kernel.build_dir'), $builder->getParameter('kernel.container_class')); - if (!file_exists($containerDeprecationFilePath)) { - throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.'); - } - - $logs = unserialize(file_get_contents($containerDeprecationFilePath)); - - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($deprecationsXML = $dom->createElement('deprecations')); - - $formattedLogs = []; - $remainingCount = 0; - foreach ($logs as $log) { - $deprecationsXML->appendChild($deprecationXML = $dom->createElement('deprecation')); - $deprecationXML->setAttribute('count', $log['count']); - $deprecationXML->appendChild($dom->createElement('message', $log['message'])); - $deprecationXML->appendChild($dom->createElement('file', $log['file'])); - $deprecationXML->appendChild($dom->createElement('line', $log['line'])); - $remainingCount += $log['count']; - } - - $deprecationsXML->setAttribute('remainingCount', $remainingCount); - - $this->writeDocument($dom); - } - - private function writeDocument(\DOMDocument $dom) - { - $dom->formatOutput = true; - $this->write($dom->saveXML()); - } - - private function getRouteCollectionDocument(RouteCollection $routes): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($routesXML = $dom->createElement('routes')); - - foreach ($routes->all() as $name => $route) { - $routeXML = $this->getRouteDocument($route, $name); - $routesXML->appendChild($routesXML->ownerDocument->importNode($routeXML->childNodes->item(0), true)); - } - - return $dom; - } - - private function getRouteDocument(Route $route, string $name = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($routeXML = $dom->createElement('route')); - - if ($name) { - $routeXML->setAttribute('name', $name); - } - - $routeXML->setAttribute('class', \get_class($route)); - - $routeXML->appendChild($pathXML = $dom->createElement('path')); - $pathXML->setAttribute('regex', $route->compile()->getRegex()); - $pathXML->appendChild(new \DOMText($route->getPath())); - - if ('' !== $route->getHost()) { - $routeXML->appendChild($hostXML = $dom->createElement('host')); - $hostXML->setAttribute('regex', $route->compile()->getHostRegex()); - $hostXML->appendChild(new \DOMText($route->getHost())); - } - - foreach ($route->getSchemes() as $scheme) { - $routeXML->appendChild($schemeXML = $dom->createElement('scheme')); - $schemeXML->appendChild(new \DOMText($scheme)); - } - - foreach ($route->getMethods() as $method) { - $routeXML->appendChild($methodXML = $dom->createElement('method')); - $methodXML->appendChild(new \DOMText($method)); - } - - if ($route->getDefaults()) { - $routeXML->appendChild($defaultsXML = $dom->createElement('defaults')); - foreach ($route->getDefaults() as $attribute => $value) { - $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); - $defaultXML->setAttribute('key', $attribute); - $defaultXML->appendChild(new \DOMText($this->formatValue($value))); - } - } - - $originRequirements = $requirements = $route->getRequirements(); - unset($requirements['_scheme'], $requirements['_method']); - if ($requirements) { - $routeXML->appendChild($requirementsXML = $dom->createElement('requirements')); - foreach ($originRequirements as $attribute => $pattern) { - $requirementsXML->appendChild($requirementXML = $dom->createElement('requirement')); - $requirementXML->setAttribute('key', $attribute); - $requirementXML->appendChild(new \DOMText($pattern)); - } - } - - if ($route->getOptions()) { - $routeXML->appendChild($optionsXML = $dom->createElement('options')); - foreach ($route->getOptions() as $name => $value) { - $optionsXML->appendChild($optionXML = $dom->createElement('option')); - $optionXML->setAttribute('key', $name); - $optionXML->appendChild(new \DOMText($this->formatValue($value))); - } - } - - if ('' !== $route->getCondition()) { - $routeXML->appendChild($conditionXML = $dom->createElement('condition')); - $conditionXML->appendChild(new \DOMText($route->getCondition())); - } - - return $dom; - } - - private function getContainerParametersDocument(ParameterBag $parameters): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($parametersXML = $dom->createElement('parameters')); - - foreach ($this->sortParameters($parameters) as $key => $value) { - $parametersXML->appendChild($parameterXML = $dom->createElement('parameter')); - $parameterXML->setAttribute('key', $key); - $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); - } - - return $dom; - } - - private function getContainerTagsDocument(ContainerBuilder $builder, bool $showHidden = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($containerXML = $dom->createElement('container')); - - foreach ($this->findDefinitionsByTag($builder, $showHidden) as $tag => $definitions) { - $containerXML->appendChild($tagXML = $dom->createElement('tag')); - $tagXML->setAttribute('name', $tag); - - foreach ($definitions as $serviceId => $definition) { - $definitionXML = $this->getContainerDefinitionDocument($definition, $serviceId, true); - $tagXML->appendChild($dom->importNode($definitionXML->childNodes->item(0), true)); - } - } - - return $dom; - } - - private function getContainerServiceDocument(object $service, string $id, ContainerBuilder $builder = null, bool $showArguments = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - - if ($service instanceof Alias) { - $dom->appendChild($dom->importNode($this->getContainerAliasDocument($service, $id)->childNodes->item(0), true)); - if ($builder) { - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($builder->getDefinition((string) $service), (string) $service, false, $showArguments)->childNodes->item(0), true)); - } - } elseif ($service instanceof Definition) { - $dom->appendChild($dom->importNode($this->getContainerDefinitionDocument($service, $id, false, $showArguments)->childNodes->item(0), true)); - } else { - $dom->appendChild($serviceXML = $dom->createElement('service')); - $serviceXML->setAttribute('id', $id); - $serviceXML->setAttribute('class', \get_class($service)); - } - - return $dom; - } - - private function getContainerServicesDocument(ContainerBuilder $builder, string $tag = null, bool $showHidden = false, bool $showArguments = false, callable $filter = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($containerXML = $dom->createElement('container')); - - $serviceIds = $tag - ? $this->sortTaggedServicesByPriority($builder->findTaggedServiceIds($tag)) - : $this->sortServiceIds($builder->getServiceIds()); - if ($filter) { - $serviceIds = array_filter($serviceIds, $filter); - } - - foreach ($serviceIds as $serviceId) { - $service = $this->resolveServiceDefinition($builder, $serviceId); - - if ($showHidden xor '.' === ($serviceId[0] ?? null)) { - continue; - } - - $serviceXML = $this->getContainerServiceDocument($service, $serviceId, null, $showArguments); - $containerXML->appendChild($containerXML->ownerDocument->importNode($serviceXML->childNodes->item(0), true)); - } - - return $dom; - } - - private function getContainerDefinitionDocument(Definition $definition, string $id = null, bool $omitTags = false, bool $showArguments = false): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($serviceXML = $dom->createElement('definition')); - - if ($id) { - $serviceXML->setAttribute('id', $id); - } - - if ('' !== $classDescription = $this->getClassDescription((string) $definition->getClass())) { - $serviceXML->appendChild($descriptionXML = $dom->createElement('description')); - $descriptionXML->appendChild($dom->createCDATASection($classDescription)); - } - - $serviceXML->setAttribute('class', $definition->getClass() ?? ''); - - if ($factory = $definition->getFactory()) { - $serviceXML->appendChild($factoryXML = $dom->createElement('factory')); - - if (\is_array($factory)) { - if ($factory[0] instanceof Reference) { - $factoryXML->setAttribute('service', (string) $factory[0]); - } elseif ($factory[0] instanceof Definition) { - throw new \InvalidArgumentException('Factory is not describable.'); - } else { - $factoryXML->setAttribute('class', $factory[0]); - } - $factoryXML->setAttribute('method', $factory[1]); - } else { - $factoryXML->setAttribute('function', $factory); - } - } - - $serviceXML->setAttribute('public', $definition->isPublic() && !$definition->isPrivate() ? 'true' : 'false'); - $serviceXML->setAttribute('synthetic', $definition->isSynthetic() ? 'true' : 'false'); - $serviceXML->setAttribute('lazy', $definition->isLazy() ? 'true' : 'false'); - $serviceXML->setAttribute('shared', $definition->isShared() ? 'true' : 'false'); - $serviceXML->setAttribute('abstract', $definition->isAbstract() ? 'true' : 'false'); - $serviceXML->setAttribute('autowired', $definition->isAutowired() ? 'true' : 'false'); - $serviceXML->setAttribute('autoconfigured', $definition->isAutoconfigured() ? 'true' : 'false'); - $serviceXML->setAttribute('file', $definition->getFile() ?? ''); - - $calls = $definition->getMethodCalls(); - if (\count($calls) > 0) { - $serviceXML->appendChild($callsXML = $dom->createElement('calls')); - foreach ($calls as $callData) { - $callsXML->appendChild($callXML = $dom->createElement('call')); - $callXML->setAttribute('method', $callData[0]); - if ($callData[2] ?? false) { - $callXML->setAttribute('returns-clone', 'true'); - } - } - } - - if ($showArguments) { - foreach ($this->getArgumentNodes($definition->getArguments(), $dom) as $node) { - $serviceXML->appendChild($node); - } - } - - if (!$omitTags) { - if ($tags = $this->sortTagsByPriority($definition->getTags())) { - $serviceXML->appendChild($tagsXML = $dom->createElement('tags')); - foreach ($tags as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $tagsXML->appendChild($tagXML = $dom->createElement('tag')); - $tagXML->setAttribute('name', $tagName); - foreach ($parameters as $name => $value) { - $tagXML->appendChild($parameterXML = $dom->createElement('parameter')); - $parameterXML->setAttribute('name', $name); - $parameterXML->appendChild(new \DOMText($this->formatParameter($value))); - } - } - } - } - } - - return $dom; - } - - /** - * @return \DOMNode[] - */ - private function getArgumentNodes(array $arguments, \DOMDocument $dom): array - { - $nodes = []; - - foreach ($arguments as $argumentKey => $argument) { - $argumentXML = $dom->createElement('argument'); - - if (\is_string($argumentKey)) { - $argumentXML->setAttribute('key', $argumentKey); - } - - if ($argument instanceof ServiceClosureArgument) { - $argument = $argument->getValues()[0]; - } - - if ($argument instanceof Reference) { - $argumentXML->setAttribute('type', 'service'); - $argumentXML->setAttribute('id', (string) $argument); - } elseif ($argument instanceof IteratorArgument || $argument instanceof ServiceLocatorArgument) { - $argumentXML->setAttribute('type', $argument instanceof IteratorArgument ? 'iterator' : 'service_locator'); - - foreach ($this->getArgumentNodes($argument->getValues(), $dom) as $childArgumentXML) { - $argumentXML->appendChild($childArgumentXML); - } - } elseif ($argument instanceof Definition) { - $argumentXML->appendChild($dom->importNode($this->getContainerDefinitionDocument($argument, null, false, true)->childNodes->item(0), true)); - } elseif ($argument instanceof AbstractArgument) { - $argumentXML->setAttribute('type', 'abstract'); - $argumentXML->appendChild(new \DOMText($argument->getText())); - } elseif (\is_array($argument)) { - $argumentXML->setAttribute('type', 'collection'); - - foreach ($this->getArgumentNodes($argument, $dom) as $childArgumentXML) { - $argumentXML->appendChild($childArgumentXML); - } - } elseif ($argument instanceof \UnitEnum) { - $argumentXML->setAttribute('type', 'constant'); - $argumentXML->appendChild(new \DOMText(var_export($argument, true))); - } else { - $argumentXML->appendChild(new \DOMText($argument)); - } - - $nodes[] = $argumentXML; - } - - return $nodes; - } - - private function getContainerAliasDocument(Alias $alias, string $id = null): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($aliasXML = $dom->createElement('alias')); - - if ($id) { - $aliasXML->setAttribute('id', $id); - } - - $aliasXML->setAttribute('service', (string) $alias); - $aliasXML->setAttribute('public', $alias->isPublic() && !$alias->isPrivate() ? 'true' : 'false'); - - return $dom; - } - - private function getContainerParameterDocument($parameter, array $options = []): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($parameterXML = $dom->createElement('parameter')); - - if (isset($options['parameter'])) { - $parameterXML->setAttribute('key', $options['parameter']); - } - - $parameterXML->appendChild(new \DOMText($this->formatParameter($parameter))); - - return $dom; - } - - private function getEventDispatcherListenersDocument(EventDispatcherInterface $eventDispatcher, array $options): \DOMDocument - { - $event = \array_key_exists('event', $options) ? $options['event'] : null; - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($eventDispatcherXML = $dom->createElement('event-dispatcher')); - - if (null !== $event) { - $registeredListeners = $eventDispatcher->getListeners($event); - $this->appendEventListenerDocument($eventDispatcher, $event, $eventDispatcherXML, $registeredListeners); - } else { - // Try to see if "events" exists - $registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(function ($event) use ($eventDispatcher) { return $eventDispatcher->getListeners($event); }, $options['events'])) : $eventDispatcher->getListeners(); - ksort($registeredListeners); - - foreach ($registeredListeners as $eventListened => $eventListeners) { - $eventDispatcherXML->appendChild($eventXML = $dom->createElement('event')); - $eventXML->setAttribute('name', $eventListened); - - $this->appendEventListenerDocument($eventDispatcher, $eventListened, $eventXML, $eventListeners); - } - } - - return $dom; - } - - private function appendEventListenerDocument(EventDispatcherInterface $eventDispatcher, string $event, \DOMElement $element, array $eventListeners) - { - foreach ($eventListeners as $listener) { - $callableXML = $this->getCallableDocument($listener); - $callableXML->childNodes->item(0)->setAttribute('priority', $eventDispatcher->getListenerPriority($event, $listener)); - - $element->appendChild($element->ownerDocument->importNode($callableXML->childNodes->item(0), true)); - } - } - - private function getCallableDocument($callable): \DOMDocument - { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($callableXML = $dom->createElement('callable')); - - if (\is_array($callable)) { - $callableXML->setAttribute('type', 'function'); - - if (\is_object($callable[0])) { - $callableXML->setAttribute('name', $callable[1]); - $callableXML->setAttribute('class', \get_class($callable[0])); - } else { - if (!str_starts_with($callable[1], 'parent::')) { - $callableXML->setAttribute('name', $callable[1]); - $callableXML->setAttribute('class', $callable[0]); - $callableXML->setAttribute('static', 'true'); - } else { - $callableXML->setAttribute('name', substr($callable[1], 8)); - $callableXML->setAttribute('class', $callable[0]); - $callableXML->setAttribute('static', 'true'); - $callableXML->setAttribute('parent', 'true'); - } - } - - return $dom; - } - - if (\is_string($callable)) { - $callableXML->setAttribute('type', 'function'); - - if (!str_contains($callable, '::')) { - $callableXML->setAttribute('name', $callable); - } else { - $callableParts = explode('::', $callable); - - $callableXML->setAttribute('name', $callableParts[1]); - $callableXML->setAttribute('class', $callableParts[0]); - $callableXML->setAttribute('static', 'true'); - } - - return $dom; - } - - if ($callable instanceof \Closure) { - $callableXML->setAttribute('type', 'closure'); - - $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { - return $dom; - } - $callableXML->setAttribute('name', $r->name); - - if ($class = $r->getClosureScopeClass()) { - $callableXML->setAttribute('class', $class->name); - if (!$r->getClosureThis()) { - $callableXML->setAttribute('static', 'true'); - } - } - - return $dom; - } - - if (method_exists($callable, '__invoke')) { - $callableXML->setAttribute('type', 'object'); - $callableXML->setAttribute('name', \get_class($callable)); - - return $dom; - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } -} diff --git a/vendor/symfony/framework-bundle/Console/Helper/DescriptorHelper.php b/vendor/symfony/framework-bundle/Console/Helper/DescriptorHelper.php deleted file mode 100644 index 1f17c99..0000000 --- a/vendor/symfony/framework-bundle/Console/Helper/DescriptorHelper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Console\Helper; - -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\JsonDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\MarkdownDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor; -use Symfony\Bundle\FrameworkBundle\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; - -/** - * @author Jean-François Simon - * - * @internal - */ -class DescriptorHelper extends BaseDescriptorHelper -{ - public function __construct(FileLinkFormatter $fileLinkFormatter = null) - { - $this - ->register('txt', new TextDescriptor($fileLinkFormatter)) - ->register('xml', new XmlDescriptor()) - ->register('json', new JsonDescriptor()) - ->register('md', new MarkdownDescriptor()) - ; - } -} diff --git a/vendor/symfony/framework-bundle/Controller/AbstractController.php b/vendor/symfony/framework-bundle/Controller/AbstractController.php deleted file mode 100644 index f6eff3f..0000000 --- a/vendor/symfony/framework-bundle/Controller/AbstractController.php +++ /dev/null @@ -1,476 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Doctrine\Persistence\ManagerRegistry; -use Psr\Container\ContainerInterface; -use Psr\Link\LinkInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; -use Symfony\Component\HttpFoundation\BinaryFileResponse; -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Messenger\Envelope; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\RouterInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Serializer\SerializerInterface; -use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; -use Symfony\Component\WebLink\GenericLinkProvider; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Twig\Environment; - -/** - * Provides shortcuts for HTTP-related features in controllers. - * - * @author Fabien Potencier - */ -abstract class AbstractController implements ServiceSubscriberInterface -{ - /** - * @var ContainerInterface - */ - protected $container; - - /** - * @required - */ - public function setContainer(ContainerInterface $container): ?ContainerInterface - { - $previous = $this->container; - $this->container = $container; - - return $previous; - } - - /** - * Gets a container parameter by its name. - * - * @return array|bool|float|int|string|\UnitEnum|null - */ - protected function getParameter(string $name) - { - if (!$this->container->has('parameter_bag')) { - throw new ServiceNotFoundException('parameter_bag.', null, null, [], sprintf('The "%s::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.', static::class)); - } - - return $this->container->get('parameter_bag')->get($name); - } - - public static function getSubscribedServices() - { - return [ - 'router' => '?'.RouterInterface::class, - 'request_stack' => '?'.RequestStack::class, - 'http_kernel' => '?'.HttpKernelInterface::class, - 'serializer' => '?'.SerializerInterface::class, - 'session' => '?'.SessionInterface::class, - 'security.authorization_checker' => '?'.AuthorizationCheckerInterface::class, - 'twig' => '?'.Environment::class, - 'doctrine' => '?'.ManagerRegistry::class, // to be removed in 6.0 - 'form.factory' => '?'.FormFactoryInterface::class, - 'security.token_storage' => '?'.TokenStorageInterface::class, - 'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class, - 'parameter_bag' => '?'.ContainerBagInterface::class, - 'message_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0 - 'messenger.default_bus' => '?'.MessageBusInterface::class, // to be removed in 6.0 - ]; - } - - /** - * Returns true if the service id is defined. - * - * @deprecated since Symfony 5.4, use method or constructor injection in your controller instead - */ - protected function has(string $id): bool - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__); - - return $this->container->has($id); - } - - /** - * Gets a container service by its id. - * - * @return object The service - * - * @deprecated since Symfony 5.4, use method or constructor injection in your controller instead - */ - protected function get(string $id): object - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, use method or constructor injection in your controller instead.', __METHOD__); - - return $this->container->get($id); - } - - /** - * Generates a URL from the given parameters. - * - * @see UrlGeneratorInterface - */ - protected function generateUrl(string $route, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string - { - return $this->container->get('router')->generate($route, $parameters, $referenceType); - } - - /** - * Forwards the request to another controller. - * - * @param string $controller The controller name (a string like Bundle\BlogBundle\Controller\PostController::indexAction) - */ - protected function forward(string $controller, array $path = [], array $query = []): Response - { - $request = $this->container->get('request_stack')->getCurrentRequest(); - $path['_controller'] = $controller; - $subRequest = $request->duplicate($query, null, $path); - - return $this->container->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - } - - /** - * Returns a RedirectResponse to the given URL. - */ - protected function redirect(string $url, int $status = 302): RedirectResponse - { - return new RedirectResponse($url, $status); - } - - /** - * Returns a RedirectResponse to the given route with the given parameters. - */ - protected function redirectToRoute(string $route, array $parameters = [], int $status = 302): RedirectResponse - { - return $this->redirect($this->generateUrl($route, $parameters), $status); - } - - /** - * Returns a JsonResponse that uses the serializer component if enabled, or json_encode. - */ - protected function json($data, int $status = 200, array $headers = [], array $context = []): JsonResponse - { - if ($this->container->has('serializer')) { - $json = $this->container->get('serializer')->serialize($data, 'json', array_merge([ - 'json_encode_options' => JsonResponse::DEFAULT_ENCODING_OPTIONS, - ], $context)); - - return new JsonResponse($json, $status, $headers, true); - } - - return new JsonResponse($data, $status, $headers); - } - - /** - * Returns a BinaryFileResponse object with original or customized file name and disposition header. - * - * @param \SplFileInfo|string $file File object or path to file to be sent as response - */ - protected function file($file, string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse - { - $response = new BinaryFileResponse($file); - $response->setContentDisposition($disposition, null === $fileName ? $response->getFile()->getFilename() : $fileName); - - return $response; - } - - /** - * Adds a flash message to the current session for type. - * - * @throws \LogicException - */ - protected function addFlash(string $type, $message): void - { - try { - $this->container->get('request_stack')->getSession()->getFlashBag()->add($type, $message); - } catch (SessionNotFoundException $e) { - throw new \LogicException('You cannot use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".', 0, $e); - } - } - - /** - * Checks if the attribute is granted against the current authentication token and optionally supplied subject. - * - * @throws \LogicException - */ - protected function isGranted($attribute, $subject = null): bool - { - if (!$this->container->has('security.authorization_checker')) { - throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); - } - - return $this->container->get('security.authorization_checker')->isGranted($attribute, $subject); - } - - /** - * Throws an exception unless the attribute is granted against the current authentication token and optionally - * supplied subject. - * - * @throws AccessDeniedException - */ - protected function denyAccessUnlessGranted($attribute, $subject = null, string $message = 'Access Denied.'): void - { - if (!$this->isGranted($attribute, $subject)) { - $exception = $this->createAccessDeniedException($message); - $exception->setAttributes($attribute); - $exception->setSubject($subject); - - throw $exception; - } - } - - /** - * Returns a rendered view. - */ - protected function renderView(string $view, array $parameters = []): string - { - if (!$this->container->has('twig')) { - throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".'); - } - - return $this->container->get('twig')->render($view, $parameters); - } - - /** - * Renders a view. - */ - protected function render(string $view, array $parameters = [], Response $response = null): Response - { - $content = $this->renderView($view, $parameters); - - if (null === $response) { - $response = new Response(); - } - - $response->setContent($content); - - return $response; - } - - /** - * Renders a view and sets the appropriate status code when a form is listed in parameters. - * - * If an invalid form is found in the list of parameters, a 422 status code is returned. - */ - protected function renderForm(string $view, array $parameters = [], Response $response = null): Response - { - if (null === $response) { - $response = new Response(); - } - - foreach ($parameters as $k => $v) { - if ($v instanceof FormView) { - throw new \LogicException(sprintf('Passing a FormView to "%s::renderForm()" is not supported, pass directly the form instead for parameter "%s".', get_debug_type($this), $k)); - } - - if (!$v instanceof FormInterface) { - continue; - } - - $parameters[$k] = $v->createView(); - - if (200 === $response->getStatusCode() && $v->isSubmitted() && !$v->isValid()) { - $response->setStatusCode(422); - } - } - - return $this->render($view, $parameters, $response); - } - - /** - * Streams a view. - */ - protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse - { - if (!$this->container->has('twig')) { - throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".'); - } - - $twig = $this->container->get('twig'); - - $callback = function () use ($twig, $view, $parameters) { - $twig->display($view, $parameters); - }; - - if (null === $response) { - return new StreamedResponse($callback); - } - - $response->setCallback($callback); - - return $response; - } - - /** - * Returns a NotFoundHttpException. - * - * This will result in a 404 response code. Usage example: - * - * throw $this->createNotFoundException('Page not found!'); - */ - protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException - { - return new NotFoundHttpException($message, $previous); - } - - /** - * Returns an AccessDeniedException. - * - * This will result in a 403 response code. Usage example: - * - * throw $this->createAccessDeniedException('Unable to access this page!'); - * - * @throws \LogicException If the Security component is not available - */ - protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException - { - if (!class_exists(AccessDeniedException::class)) { - throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".'); - } - - return new AccessDeniedException($message, $previous); - } - - /** - * Creates and returns a Form instance from the type of the form. - */ - protected function createForm(string $type, $data = null, array $options = []): FormInterface - { - return $this->container->get('form.factory')->create($type, $data, $options); - } - - /** - * Creates and returns a form builder instance. - */ - protected function createFormBuilder($data = null, array $options = []): FormBuilderInterface - { - return $this->container->get('form.factory')->createBuilder(FormType::class, $data, $options); - } - - /** - * Shortcut to return the Doctrine Registry service. - * - * @throws \LogicException If DoctrineBundle is not available - * - * @deprecated since Symfony 5.4, inject an instance of ManagerRegistry in your controller instead - */ - protected function getDoctrine(): ManagerRegistry - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of ManagerRegistry in your controller instead.', __METHOD__); - - if (!$this->container->has('doctrine')) { - throw new \LogicException('The DoctrineBundle is not registered in your application. Try running "composer require symfony/orm-pack".'); - } - - return $this->container->get('doctrine'); - } - - /** - * Get a user from the Security Token Storage. - * - * @return UserInterface|null - * - * @throws \LogicException If SecurityBundle is not available - * - * @see TokenInterface::getUser() - */ - protected function getUser() - { - if (!$this->container->has('security.token_storage')) { - throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); - } - - if (null === $token = $this->container->get('security.token_storage')->getToken()) { - return null; - } - - // @deprecated since 5.4, $user will always be a UserInterface instance - if (!\is_object($user = $token->getUser())) { - // e.g. anonymous authentication - return null; - } - - return $user; - } - - /** - * Checks the validity of a CSRF token. - * - * @param string $id The id used when generating the token - * @param string|null $token The actual token sent with the request that should be validated - */ - protected function isCsrfTokenValid(string $id, ?string $token): bool - { - if (!$this->container->has('security.csrf.token_manager')) { - throw new \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml".'); - } - - return $this->container->get('security.csrf.token_manager')->isTokenValid(new CsrfToken($id, $token)); - } - - /** - * Dispatches a message to the bus. - * - * @param object|Envelope $message The message or the message pre-wrapped in an envelope - * - * @deprecated since Symfony 5.4, inject an instance of MessageBusInterface in your controller instead - */ - protected function dispatchMessage(object $message, array $stamps = []): Envelope - { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Method "%s()" is deprecated, inject an instance of MessageBusInterface in your controller instead.', __METHOD__); - - if (!$this->container->has('messenger.default_bus')) { - $message = class_exists(Envelope::class) ? 'You need to define the "messenger.default_bus" configuration option.' : 'Try running "composer require symfony/messenger".'; - throw new \LogicException('The message bus is not enabled in your application. '.$message); - } - - return $this->container->get('messenger.default_bus')->dispatch($message, $stamps); - } - - /** - * Adds a Link HTTP header to the current response. - * - * @see https://tools.ietf.org/html/rfc5988 - */ - protected function addLink(Request $request, LinkInterface $link): void - { - if (!class_exists(AddLinkHeaderListener::class)) { - throw new \LogicException('You cannot use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".'); - } - - if (null === $linkProvider = $request->attributes->get('_links')) { - $request->attributes->set('_links', new GenericLinkProvider([$link])); - - return; - } - - $request->attributes->set('_links', $linkProvider->withLink($link)); - } -} diff --git a/vendor/symfony/framework-bundle/Controller/ControllerResolver.php b/vendor/symfony/framework-bundle/Controller/ControllerResolver.php deleted file mode 100644 index 0539c1e..0000000 --- a/vendor/symfony/framework-bundle/Controller/ControllerResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver; - -/** - * @author Fabien Potencier - * - * @final - */ -class ControllerResolver extends ContainerControllerResolver -{ - /** - * {@inheritdoc} - */ - protected function instantiateController(string $class): object - { - $controller = parent::instantiateController($class); - - if ($controller instanceof ContainerAwareInterface) { - $controller->setContainer($this->container); - } - if ($controller instanceof AbstractController) { - if (null === $previousContainer = $controller->setContainer($this->container)) { - throw new \LogicException(sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class)); - } else { - $controller->setContainer($previousContainer); - } - } - - return $controller; - } -} diff --git a/vendor/symfony/framework-bundle/Controller/RedirectController.php b/vendor/symfony/framework-bundle/Controller/RedirectController.php deleted file mode 100644 index 6a0fed6..0000000 --- a/vendor/symfony/framework-bundle/Controller/RedirectController.php +++ /dev/null @@ -1,189 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\HttpFoundation\HeaderUtils; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - -/** - * Redirects a request to another URL. - * - * @author Fabien Potencier - * - * @final - */ -class RedirectController -{ - private $router; - private $httpPort; - private $httpsPort; - - public function __construct(UrlGeneratorInterface $router = null, int $httpPort = null, int $httpsPort = null) - { - $this->router = $router; - $this->httpPort = $httpPort; - $this->httpsPort = $httpsPort; - } - - /** - * Redirects to another route with the given name. - * - * The response status code is 302 if the permanent parameter is false (default), - * and 301 if the redirection is permanent. - * - * In case the route name is empty, the status code will be 404 when permanent is false - * and 410 otherwise. - * - * @param string $route The route name to redirect to - * @param bool $permanent Whether the redirection is permanent - * @param bool|array $ignoreAttributes Whether to ignore attributes or an array of attributes to ignore - * @param bool $keepRequestMethod Whether redirect action should keep HTTP request method - * - * @throws HttpException In case the route name is empty - */ - public function redirectAction(Request $request, string $route, bool $permanent = false, $ignoreAttributes = false, bool $keepRequestMethod = false, bool $keepQueryParams = false): Response - { - if ('' == $route) { - throw new HttpException($permanent ? 410 : 404); - } - - $attributes = []; - if (false === $ignoreAttributes || \is_array($ignoreAttributes)) { - $attributes = $request->attributes->get('_route_params'); - - if ($keepQueryParams) { - if ($query = $request->server->get('QUERY_STRING')) { - $query = HeaderUtils::parseQuery($query); - } else { - $query = $request->query->all(); - } - - $attributes = array_merge($query, $attributes); - } - - unset($attributes['route'], $attributes['permanent'], $attributes['ignoreAttributes'], $attributes['keepRequestMethod'], $attributes['keepQueryParams']); - if ($ignoreAttributes) { - $attributes = array_diff_key($attributes, array_flip($ignoreAttributes)); - } - } - - if ($keepRequestMethod) { - $statusCode = $permanent ? 308 : 307; - } else { - $statusCode = $permanent ? 301 : 302; - } - - return new RedirectResponse($this->router->generate($route, $attributes, UrlGeneratorInterface::ABSOLUTE_URL), $statusCode); - } - - /** - * Redirects to a URL. - * - * The response status code is 302 if the permanent parameter is false (default), - * and 301 if the redirection is permanent. - * - * In case the path is empty, the status code will be 404 when permanent is false - * and 410 otherwise. - * - * @param string $path The absolute path or URL to redirect to - * @param bool $permanent Whether the redirect is permanent or not - * @param string|null $scheme The URL scheme (null to keep the current one) - * @param int|null $httpPort The HTTP port (null to keep the current one for the same scheme or the default configured port) - * @param int|null $httpsPort The HTTPS port (null to keep the current one for the same scheme or the default configured port) - * @param bool $keepRequestMethod Whether redirect action should keep HTTP request method - * - * @throws HttpException In case the path is empty - */ - public function urlRedirectAction(Request $request, string $path, bool $permanent = false, string $scheme = null, int $httpPort = null, int $httpsPort = null, bool $keepRequestMethod = false): Response - { - if ('' == $path) { - throw new HttpException($permanent ? 410 : 404); - } - - if ($keepRequestMethod) { - $statusCode = $permanent ? 308 : 307; - } else { - $statusCode = $permanent ? 301 : 302; - } - - // redirect if the path is a full URL - if (parse_url($path, \PHP_URL_SCHEME)) { - return new RedirectResponse($path, $statusCode); - } - - if (null === $scheme) { - $scheme = $request->getScheme(); - } - - if ($qs = $request->server->get('QUERY_STRING') ?: $request->getQueryString()) { - if (!str_contains($path, '?')) { - $qs = '?'.$qs; - } else { - $qs = '&'.$qs; - } - } - - $port = ''; - if ('http' === $scheme) { - if (null === $httpPort) { - if ('http' === $request->getScheme()) { - $httpPort = $request->getPort(); - } else { - $httpPort = $this->httpPort; - } - } - - if (null !== $httpPort && 80 != $httpPort) { - $port = ":$httpPort"; - } - } elseif ('https' === $scheme) { - if (null === $httpsPort) { - if ('https' === $request->getScheme()) { - $httpsPort = $request->getPort(); - } else { - $httpsPort = $this->httpsPort; - } - } - - if (null !== $httpsPort && 443 != $httpsPort) { - $port = ":$httpsPort"; - } - } - - $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$path.$qs; - - return new RedirectResponse($url, $statusCode); - } - - public function __invoke(Request $request): Response - { - $p = $request->attributes->get('_route_params', []); - - if (\array_key_exists('route', $p)) { - if (\array_key_exists('path', $p)) { - throw new \RuntimeException(sprintf('Ambiguous redirection settings, use the "path" or "route" parameter, not both: "%s" and "%s" found respectively in "%s" routing configuration.', $p['path'], $p['route'], $request->attributes->get('_route'))); - } - - return $this->redirectAction($request, $p['route'], $p['permanent'] ?? false, $p['ignoreAttributes'] ?? false, $p['keepRequestMethod'] ?? false, $p['keepQueryParams'] ?? false); - } - - if (\array_key_exists('path', $p)) { - return $this->urlRedirectAction($request, $p['path'], $p['permanent'] ?? false, $p['scheme'] ?? null, $p['httpPort'] ?? null, $p['httpsPort'] ?? null, $p['keepRequestMethod'] ?? false); - } - - throw new \RuntimeException(sprintf('The parameter "path" or "route" is required to configure the redirect action in "%s" routing configuration.', $request->attributes->get('_route'))); - } -} diff --git a/vendor/symfony/framework-bundle/Controller/TemplateController.php b/vendor/symfony/framework-bundle/Controller/TemplateController.php deleted file mode 100644 index 2283dbc..0000000 --- a/vendor/symfony/framework-bundle/Controller/TemplateController.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Controller; - -use Symfony\Component\HttpFoundation\Response; -use Twig\Environment; - -/** - * TemplateController. - * - * @author Fabien Potencier - * - * @final - */ -class TemplateController -{ - private $twig; - - public function __construct(Environment $twig = null) - { - $this->twig = $twig; - } - - /** - * Renders a template. - * - * @param string $template The template name - * @param int|null $maxAge Max age for client caching - * @param int|null $sharedAge Max age for shared (proxy) caching - * @param bool|null $private Whether or not caching should apply for client caches only - * @param array $context The context (arguments) of the template - * @param int $statusCode The HTTP status code to return with the response. Defaults to 200 - */ - public function templateAction(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response - { - if (null === $this->twig) { - throw new \LogicException('You cannot use the TemplateController if the Twig Bundle is not available.'); - } - - $response = new Response($this->twig->render($template, $context), $statusCode); - - if ($maxAge) { - $response->setMaxAge($maxAge); - } - - if (null !== $sharedAge) { - $response->setSharedMaxAge($sharedAge); - } - - if ($private) { - $response->setPrivate(); - } elseif (false === $private || (null === $private && (null !== $maxAge || null !== $sharedAge))) { - $response->setPublic(); - } - - return $response; - } - - public function __invoke(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response - { - return $this->templateAction($template, $maxAge, $sharedAge, $private, $context, $statusCode); - } -} diff --git a/vendor/symfony/framework-bundle/DataCollector/AbstractDataCollector.php b/vendor/symfony/framework-bundle/DataCollector/AbstractDataCollector.php deleted file mode 100644 index 7fa1ee2..0000000 --- a/vendor/symfony/framework-bundle/DataCollector/AbstractDataCollector.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\DataCollector; - -/** - * @author Laurent VOULLEMIER - */ -abstract class AbstractDataCollector extends DataCollector implements TemplateAwareDataCollectorInterface -{ - public function getName(): string - { - return static::class; - } - - public function reset(): void - { - $this->data = []; - } - - public static function getTemplate(): ?string - { - return null; - } -} diff --git a/vendor/symfony/framework-bundle/DataCollector/RouterDataCollector.php b/vendor/symfony/framework-bundle/DataCollector/RouterDataCollector.php deleted file mode 100644 index c5d0673..0000000 --- a/vendor/symfony/framework-bundle/DataCollector/RouterDataCollector.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouterDataCollector; - -/** - * @author Fabien Potencier - * - * @final - */ -class RouterDataCollector extends BaseRouterDataCollector -{ - public function guessRoute(Request $request, $controller) - { - if (\is_array($controller)) { - $controller = $controller[0]; - } - - if ($controller instanceof RedirectController) { - return $request->attributes->get('_route'); - } - - return parent::guessRoute($request, $controller); - } -} diff --git a/vendor/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php b/vendor/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php deleted file mode 100644 index 5ef17ab..0000000 --- a/vendor/symfony/framework-bundle/DataCollector/TemplateAwareDataCollectorInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; - -/** - * @author Laurent VOULLEMIER - */ -interface TemplateAwareDataCollectorInterface extends DataCollectorInterface -{ - public static function getTemplate(): ?string; -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php deleted file mode 100644 index a0581ff..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @internal - */ -class AddAnnotationsCachedReaderPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - // "annotations.cached_reader" is wired late so that any passes using - // "annotation_reader" at build time don't get any cache - foreach ($container->findTaggedServiceIds('annotations.cached_reader') as $id => $tags) { - $reader = $container->getDefinition($id); - $reader->setPublic(false); - $properties = $reader->getProperties(); - - if (isset($properties['cacheProviderBackup'])) { - $provider = $properties['cacheProviderBackup']->getValues()[0]; - unset($properties['cacheProviderBackup']); - $reader->setProperties($properties); - $reader->replaceArgument(1, $provider); - } elseif (4 <= \count($arguments = $reader->getArguments()) && $arguments[3] instanceof ServiceClosureArgument) { - $arguments[1] = $arguments[3]->getValues()[0]; - unset($arguments[3]); - $reader->setArguments($arguments); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php deleted file mode 100644 index 51b2975..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddDebugLogProcessorPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -class AddDebugLogProcessorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('profiler')) { - return; - } - if (!$container->hasDefinition('monolog.logger_prototype')) { - return; - } - if (!$container->hasDefinition('debug.log_processor')) { - return; - } - - $definition = $container->getDefinition('monolog.logger_prototype'); - $definition->setConfigurator([__CLASS__, 'configureLogger']); - $definition->addMethodCall('pushProcessor', [new Reference('debug.log_processor')]); - } - - public static function configureLogger($logger) - { - if (\is_object($logger) && method_exists($logger, 'removeDebugLogger') && \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - $logger->removeDebugLogger(); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php deleted file mode 100644 index 3e2f276..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Registers the expression language providers. - * - * @author Fabien Potencier - */ -class AddExpressionLanguageProvidersPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - // routing - if ($container->has('router.default')) { - $definition = $container->findDefinition('router.default'); - foreach ($container->findTaggedServiceIds('routing.expression_language_provider', true) as $id => $attributes) { - $definition->addMethodCall('addExpressionLanguageProvider', [new Reference($id)]); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php deleted file mode 100644 index 3fc79f0..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/AssetsContextPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -class AssetsContextPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('assets.context')) { - return; - } - - if (!$container->hasDefinition('router.request_context')) { - $container->setParameter('asset.request_context.base_path', $container->getParameter('asset.request_context.base_path') ?? ''); - $container->setParameter('asset.request_context.secure', $container->getParameter('asset.request_context.secure') ?? false); - - return; - } - - $context = $container->getDefinition('assets.context'); - - if (null === $container->getParameter('asset.request_context.base_path')) { - $context->replaceArgument(1, (new Definition('string'))->setFactory([new Reference('router.request_context'), 'getBaseUrl'])); - } - - if (null === $container->getParameter('asset.request_context.secure')) { - $context->replaceArgument(2, (new Definition('bool'))->setFactory([new Reference('router.request_context'), 'isSecure'])); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php deleted file mode 100644 index 0df5420..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Dumper\XmlDumper; - -/** - * Dumps the ContainerBuilder to a cache file so that it can be used by - * debugging tools such as the debug:container console command. - * - * @author Ryan Weaver - * @author Fabien Potencier - */ -class ContainerBuilderDebugDumpPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - $cache = new ConfigCache($container->getParameter('debug.container.dump'), true); - if (!$cache->isFresh()) { - $cache->write((new XmlDumper($container))->dump(), $container->getResources()); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php deleted file mode 100644 index ee2bbb6..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Christian Flothmann - */ -class DataCollectorTranslatorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->has('translator')) { - return; - } - - $translatorClass = $container->getParameterBag()->resolveValue($container->findDefinition('translator')->getClass()); - - if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) { - $container->removeDefinition('translator.data_collector'); - $container->removeDefinition('data_collector.translation'); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php deleted file mode 100644 index 80cbe52..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/LoggingTranslatorPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\Translation\TranslatorBagInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad - */ -class LoggingTranslatorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasAlias('logger') || !$container->hasAlias('translator')) { - return; - } - - if ($container->hasParameter('translator.logging') && $container->getParameter('translator.logging')) { - $translatorAlias = $container->getAlias('translator'); - $definition = $container->getDefinition((string) $translatorAlias); - $class = $container->getParameterBag()->resolveValue($definition->getClass()); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias)); - } - if ($r->isSubclassOf(TranslatorInterface::class) && $r->isSubclassOf(TranslatorBagInterface::class)) { - $container->getDefinition('translator.logging')->setDecoratedService('translator'); - $warmer = $container->getDefinition('translation.warmer'); - $subscriberAttributes = $warmer->getTag('container.service_subscriber'); - $warmer->clearTag('container.service_subscriber'); - - foreach ($subscriberAttributes as $k => $v) { - if ((!isset($v['id']) || 'translator' !== $v['id']) && (!isset($v['key']) || 'translator' !== $v['key'])) { - $warmer->addTag('container.service_subscriber', $v); - } - } - $warmer->addTag('container.service_subscriber', ['key' => 'translator', 'id' => 'translator.logging.inner']); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php deleted file mode 100644 index 7200b12..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ProfilerPass.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Bundle\FrameworkBundle\DataCollector\TemplateAwareDataCollectorInterface; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged data_collector services to profiler service. - * - * @author Fabien Potencier - */ -class ProfilerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('profiler')) { - return; - } - - $definition = $container->getDefinition('profiler'); - - $collectors = new \SplPriorityQueue(); - $order = \PHP_INT_MAX; - foreach ($container->findTaggedServiceIds('data_collector', true) as $id => $attributes) { - $priority = $attributes[0]['priority'] ?? 0; - $template = null; - - $collectorClass = $container->findDefinition($id)->getClass(); - $isTemplateAware = is_subclass_of($collectorClass, TemplateAwareDataCollectorInterface::class); - if (isset($attributes[0]['template']) || $isTemplateAware) { - $idForTemplate = $attributes[0]['id'] ?? $collectorClass; - if (!$idForTemplate) { - throw new InvalidArgumentException(sprintf('Data collector service "%s" must have an id attribute in order to specify a template.', $id)); - } - $template = [$idForTemplate, $attributes[0]['template'] ?? $collectorClass::getTemplate()]; - } - - $collectors->insert([$id, $template], [$priority, --$order]); - } - - $templates = []; - foreach ($collectors as $collector) { - $definition->addMethodCall('add', [new Reference($collector[0])]); - $templates[$collector[0]] = $collector[1]; - } - - $container->setParameter('data_collector.templates', $templates); - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php deleted file mode 100644 index 8b6479c..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/RemoveUnusedSessionMarshallingHandlerPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Ahmed TAILOULOUTE - */ -class RemoveUnusedSessionMarshallingHandlerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('session.marshalling_handler')) { - return; - } - - $isMarshallerDecorated = false; - - foreach ($container->getDefinitions() as $definition) { - $decorated = $definition->getDecoratedService(); - if (null !== $decorated && 'session.marshaller' === $decorated[0]) { - $isMarshallerDecorated = true; - - break; - } - } - - if (!$isMarshallerDecorated) { - $container->removeDefinition('session.marshalling_handler'); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php deleted file mode 100644 index 7230fc9..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/SessionPass.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @internal to be removed in 6.0 - */ -class SessionPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->has('session.factory')) { - return; - } - - // BC layer: Make "session" an alias of ".session.do-not-use" when not overridden by the user - if (!$container->has('session')) { - $alias = $container->setAlias('session', '.session.do-not-use'); - $alias->setDeprecated('symfony/framework-bundle', '5.3', 'The "%alias_id%" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - // restore previous behavior - $alias->setPublic(true); - - return; - } - - if ($container->hasDefinition('session')) { - $definition = $container->getDefinition('session'); - $definition->setDeprecated('symfony/framework-bundle', '5.3', 'The "%service_id%" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - } else { - $alias = $container->getAlias('session'); - $alias->setDeprecated('symfony/framework-bundle', '5.3', 'The "%alias_id%" and "SessionInterface" aliases are deprecated, use "$requestStack->getSession()" instead.'); - $definition = $container->findDefinition('session'); - } - - // Convert internal service `.session.do-not-use` into alias of `session`. - $container->setAlias('.session.do-not-use', 'session'); - - $bags = [ - 'session.flash_bag' => $container->hasDefinition('session.flash_bag') ? $container->getDefinition('session.flash_bag') : null, - 'session.attribute_bag' => $container->hasDefinition('session.attribute_bag') ? $container->getDefinition('session.attribute_bag') : null, - ]; - - foreach ($definition->getArguments() as $v) { - if (!$v instanceof Reference || !isset($bags[$bag = (string) $v]) || !\is_array($factory = $bags[$bag]->getFactory())) { - continue; - } - - if ([0, 1] !== array_keys($factory) || !$factory[0] instanceof Reference || !\in_array((string) $factory[0], ['session', '.session.do-not-use'], true)) { - continue; - } - - if ('get'.ucfirst(substr($bag, 8, -4)).'Bag' !== $factory[1]) { - continue; - } - - $bags[$bag]->setFactory(null); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php deleted file mode 100644 index 222b5c7..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerRealRefPass.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class TestServiceContainerRealRefPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('test.private_services_locator')) { - return; - } - - $privateContainer = $container->getDefinition('test.private_services_locator'); - $definitions = $container->getDefinitions(); - $privateServices = $privateContainer->getArgument(0); - - foreach ($privateServices as $id => $argument) { - if (isset($definitions[$target = (string) $argument->getValues()[0]])) { - $argument->setValues([new Reference($target)]); - } else { - unset($privateServices[$id]); - } - } - - $privateContainer->replaceArgument(0, $privateServices); - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php deleted file mode 100644 index bc1e5a9..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/TestServiceContainerWeakRefPass.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class TestServiceContainerWeakRefPass implements CompilerPassInterface -{ - private $privateTagName; - - public function __construct(string $privateTagName = 'container.private') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->privateTagName = $privateTagName; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('test.private_services_locator')) { - return; - } - - $privateServices = []; - $definitions = $container->getDefinitions(); - $hasErrors = method_exists(Definition::class, 'hasErrors') ? 'hasErrors' : 'getErrors'; - - foreach ($definitions as $id => $definition) { - if ($id && '.' !== $id[0] && (!$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) && !$definition->$hasErrors() && !$definition->isAbstract()) { - $privateServices[$id] = new Reference($id, ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - } - - $aliases = $container->getAliases(); - - foreach ($aliases as $id => $alias) { - if ($id && '.' !== $id[0] && (!$alias->isPublic() || $alias->isPrivate())) { - while (isset($aliases[$target = (string) $alias])) { - $alias = $aliases[$target]; - } - if (isset($definitions[$target]) && !$definitions[$target]->$hasErrors() && !$definitions[$target]->isAbstract()) { - $privateServices[$id] = new Reference($target, ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - } - } - - if ($privateServices) { - $id = (string) ServiceLocatorTagPass::register($container, $privateServices); - $container->setDefinition('test.private_services_locator', $container->getDefinition($id))->setPublic(true); - $container->removeDefinition($id); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php deleted file mode 100644 index a556599..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/UnusedTagsPass.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Find all service tags which are defined, but not used and yield a warning log message. - * - * @author Florian Pfitzer - */ -class UnusedTagsPass implements CompilerPassInterface -{ - private const KNOWN_TAGS = [ - 'annotations.cached_reader', - 'assets.package', - 'auto_alias', - 'cache.pool', - 'cache.pool.clearer', - 'chatter.transport_factory', - 'config_cache.resource_checker', - 'console.command', - 'container.env_var_loader', - 'container.env_var_processor', - 'container.hot_path', - 'container.no_preload', - 'container.preload', - 'container.private', - 'container.reversible', - 'container.service_locator', - 'container.service_locator_context', - 'container.service_subscriber', - 'container.stack', - 'controller.argument_value_resolver', - 'controller.service_arguments', - 'data_collector', - 'event_dispatcher.dispatcher', - 'form.type', - 'form.type_extension', - 'form.type_guesser', - 'http_client.client', - 'kernel.cache_clearer', - 'kernel.cache_warmer', - 'kernel.event_listener', - 'kernel.event_subscriber', - 'kernel.fragment_renderer', - 'kernel.locale_aware', - 'kernel.reset', - 'ldap', - 'mailer.transport_factory', - 'messenger.bus', - 'messenger.message_handler', - 'messenger.receiver', - 'messenger.transport_factory', - 'mime.mime_type_guesser', - 'monolog.logger', - 'notifier.channel', - 'property_info.access_extractor', - 'property_info.initializable_extractor', - 'property_info.list_extractor', - 'property_info.type_extractor', - 'proxy', - 'routing.expression_language_function', - 'routing.expression_language_provider', - 'routing.loader', - 'routing.route_loader', - 'security.authenticator.login_linker', - 'security.expression_language_provider', - 'security.remember_me_aware', - 'security.remember_me_handler', - 'security.voter', - 'serializer.encoder', - 'serializer.normalizer', - 'texter.transport_factory', - 'translation.dumper', - 'translation.extractor', - 'translation.loader', - 'translation.provider_factory', - 'twig.extension', - 'twig.loader', - 'twig.runtime', - 'validator.auto_mapper', - 'validator.constraint_validator', - 'validator.initializer', - ]; - - public function process(ContainerBuilder $container) - { - $tags = array_unique(array_merge($container->findTags(), self::KNOWN_TAGS)); - - foreach ($container->findUnusedTags() as $tag) { - // skip known tags - if (\in_array($tag, self::KNOWN_TAGS)) { - continue; - } - - // check for typos - $candidates = []; - foreach ($tags as $definedTag) { - if ($definedTag === $tag) { - continue; - } - - if (str_contains($definedTag, $tag) || levenshtein($tag, $definedTag) <= \strlen($tag) / 3) { - $candidates[] = $definedTag; - } - } - - $services = array_keys($container->findTaggedServiceIds($tag)); - $message = sprintf('Tag "%s" was defined on service(s) "%s", but was never used.', $tag, implode('", "', $services)); - if (!empty($candidates)) { - $message .= sprintf(' Did you mean "%s"?', implode('", "', $candidates)); - } - - $container->log($this, $message); - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php b/vendor/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php deleted file mode 100644 index ad62e19..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * @author Christian Flothmann - * @author Grégoire Pineau - */ -class WorkflowGuardListenerPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasParameter('workflow.has_guard_listeners')) { - return; - } - - $container->getParameterBag()->remove('workflow.has_guard_listeners'); - - $servicesNeeded = [ - 'security.token_storage', - 'security.authorization_checker', - 'security.authentication.trust_resolver', - 'security.role_hierarchy', - ]; - - foreach ($servicesNeeded as $service) { - if (!$container->has($service)) { - throw new LogicException(sprintf('The "%s" service is needed to be able to use the workflow guard listener.', $service)); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/Configuration.php b/vendor/symfony/framework-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index f09893c..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,2072 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; - -use Doctrine\Common\Annotations\Annotation; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Cache\Cache; -use Doctrine\DBAL\Connection; -use Psr\Log\LogLevel; -use Symfony\Bundle\FullStack; -use Symfony\Component\Asset\Package; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\NodeBuilder; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\Form\Form; -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\Lock\Lock; -use Symfony\Component\Lock\Store\SemaphoreStore; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\RateLimiter\Policy\TokenBucketLimiter; -use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Translation\Translator; -use Symfony\Component\Uid\Factory\UuidFactory; -use Symfony\Component\Validator\Validation; -use Symfony\Component\WebLink\HttpHeaderSerializer; -use Symfony\Component\Workflow\WorkflowEvents; - -/** - * FrameworkExtension configuration structure. - */ -class Configuration implements ConfigurationInterface -{ - private $debug; - - /** - * @param bool $debug Whether debugging is enabled or not - */ - public function __construct(bool $debug) - { - $this->debug = $debug; - } - - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('framework'); - $rootNode = $treeBuilder->getRootNode(); - - $rootNode - ->beforeNormalization() - ->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']) && class_exists(Package::class); }) - ->then(function ($v) { - $v['assets'] = []; - - return $v; - }) - ->end() - ->fixXmlConfig('enabled_locale') - ->children() - ->scalarNode('secret')->end() - ->scalarNode('http_method_override') - ->info("Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. Note: When using the HttpCache, you need to call the method in your front controller instead") - ->defaultTrue() - ->end() - ->scalarNode('ide')->defaultNull()->end() - ->booleanNode('test')->end() - ->scalarNode('default_locale')->defaultValue('en')->end() - ->booleanNode('set_locale_from_accept_language') - ->info('Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed).') - ->defaultFalse() - ->end() - ->booleanNode('set_content_language_from_locale') - ->info('Whether to set the Content-Language HTTP header on the Response using the Request locale.') - ->defaultFalse() - ->end() - ->arrayNode('enabled_locales') - ->info('Defines the possible locales for the application. This list is used for generating translations files, but also to restrict which locales are allowed when it is set from Accept-Language header (using "set_locale_from_accept_language").') - ->prototype('scalar')->end() - ->end() - ->arrayNode('trusted_hosts') - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->scalarNode('trusted_proxies')->end() - ->arrayNode('trusted_headers') - ->fixXmlConfig('trusted_header') - ->performNoDeepMerging() - ->defaultValue(['x-forwarded-for', 'x-forwarded-port', 'x-forwarded-proto']) - ->beforeNormalization()->ifString()->then(function ($v) { return $v ? array_map('trim', explode(',', $v)) : []; })->end() - ->enumPrototype() - ->values([ - 'forwarded', - 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix', - ]) - ->end() - ->end() - ->scalarNode('error_controller') - ->defaultValue('error_controller') - ->end() - ->end() - ; - - $willBeAvailable = static function (string $package, string $class, string $parentPackage = null) { - $parentPackages = (array) $parentPackage; - $parentPackages[] = 'symfony/framework-bundle'; - - return ContainerBuilder::willBeAvailable($package, $class, $parentPackages, true); - }; - - $enableIfStandalone = static function (string $package, string $class) use ($willBeAvailable) { - return !class_exists(FullStack::class) && $willBeAvailable($package, $class) ? 'canBeDisabled' : 'canBeEnabled'; - }; - - $this->addCsrfSection($rootNode); - $this->addFormSection($rootNode, $enableIfStandalone); - $this->addHttpCacheSection($rootNode); - $this->addEsiSection($rootNode); - $this->addSsiSection($rootNode); - $this->addFragmentsSection($rootNode); - $this->addProfilerSection($rootNode); - $this->addWorkflowSection($rootNode); - $this->addRouterSection($rootNode); - $this->addSessionSection($rootNode); - $this->addRequestSection($rootNode); - $this->addAssetsSection($rootNode, $enableIfStandalone); - $this->addTranslatorSection($rootNode, $enableIfStandalone); - $this->addValidationSection($rootNode, $enableIfStandalone, $willBeAvailable); - $this->addAnnotationsSection($rootNode, $willBeAvailable); - $this->addSerializerSection($rootNode, $enableIfStandalone, $willBeAvailable); - $this->addPropertyAccessSection($rootNode, $willBeAvailable); - $this->addPropertyInfoSection($rootNode, $enableIfStandalone); - $this->addCacheSection($rootNode, $willBeAvailable); - $this->addPhpErrorsSection($rootNode); - $this->addExceptionsSection($rootNode); - $this->addWebLinkSection($rootNode, $enableIfStandalone); - $this->addLockSection($rootNode, $enableIfStandalone); - $this->addMessengerSection($rootNode, $enableIfStandalone); - $this->addRobotsIndexSection($rootNode); - $this->addHttpClientSection($rootNode, $enableIfStandalone); - $this->addMailerSection($rootNode, $enableIfStandalone); - $this->addSecretsSection($rootNode); - $this->addNotifierSection($rootNode, $enableIfStandalone); - $this->addRateLimiterSection($rootNode, $enableIfStandalone); - $this->addUidSection($rootNode, $enableIfStandalone); - - return $treeBuilder; - } - - private function addSecretsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('secrets') - ->canBeDisabled() - ->children() - ->scalarNode('vault_directory')->defaultValue('%kernel.project_dir%/config/secrets/%kernel.runtime_environment%')->cannotBeEmpty()->end() - ->scalarNode('local_dotenv_file')->defaultValue('%kernel.project_dir%/.env.%kernel.environment%.local')->end() - ->scalarNode('decryption_env_var')->defaultValue('base64:default::SYMFONY_DECRYPTION_SECRET')->end() - ->end() - ->end() - ->end() - ; - } - - private function addCsrfSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('csrf_protection') - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->addDefaultsIfNotSet() - ->children() - // defaults to framework.session.enabled && !class_exists(FullStack::class) && interface_exists(CsrfTokenManagerInterface::class) - ->booleanNode('enabled')->defaultNull()->end() - ->end() - ->end() - ->end() - ; - } - - private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('form') - ->info('form configuration') - ->{$enableIfStandalone('symfony/form', Form::class)}() - ->children() - ->arrayNode('csrf_protection') - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->addDefaultsIfNotSet() - ->children() - ->booleanNode('enabled')->defaultNull()->end() // defaults to framework.csrf_protection.enabled - ->scalarNode('field_name')->defaultValue('_token')->end() - ->end() - ->end() - // to be set to false in Symfony 6.0 - ->booleanNode('legacy_error_messages') - ->defaultTrue() - ->validate() - ->ifTrue() - ->then(function ($v) { - trigger_deprecation('symfony/framework-bundle', '5.2', 'Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.'); - - return $v; - }) - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addHttpCacheSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('http_cache') - ->info('HTTP cache configuration') - ->canBeEnabled() - ->fixXmlConfig('private_header') - ->children() - ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() - ->enumNode('trace_level') - ->values(['none', 'short', 'full']) - ->end() - ->scalarNode('trace_header')->end() - ->integerNode('default_ttl')->end() - ->arrayNode('private_headers') - ->performNoDeepMerging() - ->scalarPrototype()->end() - ->end() - ->booleanNode('allow_reload')->end() - ->booleanNode('allow_revalidate')->end() - ->integerNode('stale_while_revalidate')->end() - ->integerNode('stale_if_error')->end() - ->end() - ->end() - ->end() - ; - } - - private function addEsiSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('esi') - ->info('esi configuration') - ->canBeEnabled() - ->end() - ->end() - ; - } - - private function addSsiSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('ssi') - ->info('ssi configuration') - ->canBeEnabled() - ->end() - ->end(); - } - - private function addFragmentsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('fragments') - ->info('fragments configuration') - ->canBeEnabled() - ->children() - ->scalarNode('hinclude_default_template')->defaultNull()->end() - ->scalarNode('path')->defaultValue('/_fragment')->end() - ->end() - ->end() - ->end() - ; - } - - private function addProfilerSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('profiler') - ->info('profiler configuration') - ->canBeEnabled() - ->children() - ->booleanNode('collect')->defaultTrue()->end() - ->scalarNode('collect_parameter')->defaultNull()->info('The name of the parameter to use to enable or disable collection on a per request basis')->end() - ->booleanNode('only_exceptions')->defaultFalse()->end() - ->booleanNode('only_main_requests')->defaultFalse()->end() - ->booleanNode('only_master_requests')->setDeprecated('symfony/framework-bundle', '5.3', 'Option "%node%" at "%path%" is deprecated, use "only_main_requests" instead.')->defaultFalse()->end() - ->scalarNode('dsn')->defaultValue('file:%kernel.cache_dir%/profiler')->end() - ->end() - ->end() - ->end() - ; - } - - private function addWorkflowSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('workflow') - ->children() - ->arrayNode('workflows') - ->canBeEnabled() - ->beforeNormalization() - ->always(function ($v) { - if (\is_array($v) && true === $v['enabled']) { - $workflows = $v; - unset($workflows['enabled']); - - if (1 === \count($workflows) && isset($workflows[0]['enabled']) && 1 === \count($workflows[0])) { - $workflows = []; - } - - if (1 === \count($workflows) && isset($workflows['workflows']) && !array_is_list($workflows['workflows']) && !empty(array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions']))) { - $workflows = $workflows['workflows']; - } - - foreach ($workflows as $key => $workflow) { - if (isset($workflow['enabled']) && false === $workflow['enabled']) { - throw new LogicException(sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $workflow['name'])); - } - - unset($workflows[$key]['enabled']); - } - - $v = [ - 'enabled' => true, - 'workflows' => $workflows, - ]; - } - - return $v; - }) - ->end() - ->children() - ->arrayNode('workflows') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('support') - ->fixXmlConfig('place') - ->fixXmlConfig('transition') - ->fixXmlConfig('event_to_dispatch', 'events_to_dispatch') - ->children() - ->arrayNode('audit_trail') - ->canBeEnabled() - ->end() - ->enumNode('type') - ->values(['workflow', 'state_machine']) - ->defaultValue('state_machine') - ->end() - ->arrayNode('marking_store') - ->children() - ->enumNode('type') - ->values(['method']) - ->end() - ->scalarNode('property') - ->defaultValue('marking') - ->end() - ->scalarNode('service') - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->arrayNode('supports') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->prototype('scalar') - ->cannotBeEmpty() - ->validate() - ->ifTrue(function ($v) { return !class_exists($v) && !interface_exists($v, false); }) - ->thenInvalid('The supported class or interface "%s" does not exist.') - ->end() - ->end() - ->end() - ->scalarNode('support_strategy') - ->cannotBeEmpty() - ->end() - ->arrayNode('initial_marking') - ->beforeNormalization()->castToArray()->end() - ->defaultValue([]) - ->prototype('scalar')->end() - ->end() - ->variableNode('events_to_dispatch') - ->defaultValue(null) - ->validate() - ->ifTrue(function ($v) { - if (null === $v) { - return false; - } - if (!\is_array($v)) { - return true; - } - - foreach ($v as $value) { - if (!\is_string($value)) { - return true; - } - if (class_exists(WorkflowEvents::class) && !\in_array($value, WorkflowEvents::ALIASES)) { - return true; - } - } - - return false; - }) - ->thenInvalid('The value must be "null" or an array of workflow events (like ["workflow.enter"]).') - ->end() - ->info('Select which Transition events should be dispatched for this Workflow') - ->example(['workflow.enter', 'workflow.transition']) - ->end() - ->arrayNode('places') - ->beforeNormalization() - ->always() - ->then(function ($places) { - // It's an indexed array of shape ['place1', 'place2'] - if (isset($places[0]) && \is_string($places[0])) { - return array_map(function (string $place) { - return ['name' => $place]; - }, $places); - } - - // It's an indexed array, we let the validation occur - if (isset($places[0]) && \is_array($places[0])) { - return $places; - } - - foreach ($places as $name => $place) { - if (\is_array($place) && \array_key_exists('name', $place)) { - continue; - } - $place['name'] = $name; - $places[$name] = $place; - } - - return array_values($places); - }) - ->end() - ->isRequired() - ->requiresAtLeastOneElement() - ->prototype('array') - ->children() - ->scalarNode('name') - ->isRequired() - ->cannotBeEmpty() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('transitions') - ->beforeNormalization() - ->always() - ->then(function ($transitions) { - // It's an indexed array, we let the validation occur - if (isset($transitions[0]) && \is_array($transitions[0])) { - return $transitions; - } - - foreach ($transitions as $name => $transition) { - if (\is_array($transition) && \array_key_exists('name', $transition)) { - continue; - } - $transition['name'] = $name; - $transitions[$name] = $transition; - } - - return $transitions; - }) - ->end() - ->isRequired() - ->requiresAtLeastOneElement() - ->prototype('array') - ->children() - ->scalarNode('name') - ->isRequired() - ->cannotBeEmpty() - ->end() - ->scalarNode('guard') - ->cannotBeEmpty() - ->info('An expression to block the transition') - ->example('is_fully_authenticated() and is_granted(\'ROLE_JOURNALIST\') and subject.getTitle() == \'My first article\'') - ->end() - ->arrayNode('from') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->requiresAtLeastOneElement() - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->arrayNode('to') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return [$v]; }) - ->end() - ->requiresAtLeastOneElement() - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('metadata') - ->normalizeKeys(false) - ->defaultValue([]) - ->example(['color' => 'blue', 'description' => 'Workflow to manage article.']) - ->prototype('variable') - ->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return $v['supports'] && isset($v['support_strategy']); - }) - ->thenInvalid('"supports" and "support_strategy" cannot be used together.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return !$v['supports'] && !isset($v['support_strategy']); - }) - ->thenInvalid('"supports" or "support_strategy" should be configured.') - ->end() - ->beforeNormalization() - ->always() - ->then(function ($values) { - // Special case to deal with XML when the user wants an empty array - if (\array_key_exists('event_to_dispatch', $values) && null === $values['event_to_dispatch']) { - $values['events_to_dispatch'] = []; - unset($values['event_to_dispatch']); - } - - return $values; - }) - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRouterSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('router') - ->info('router configuration') - ->canBeEnabled() - ->children() - ->scalarNode('resource')->isRequired()->end() - ->scalarNode('type')->end() - ->scalarNode('default_uri') - ->info('The default URI used to generate URLs in a non-HTTP context') - ->defaultNull() - ->end() - ->scalarNode('http_port')->defaultValue(80)->end() - ->scalarNode('https_port')->defaultValue(443)->end() - ->scalarNode('strict_requirements') - ->info( - "set to true to throw an exception when a parameter does not match the requirements\n". - "set to false to disable exceptions when a parameter does not match the requirements (and return null instead)\n". - "set to null to disable parameter checks against requirements\n". - "'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production" - ) - ->defaultTrue() - ->end() - ->booleanNode('utf8')->defaultNull()->end() - ->end() - ->end() - ->end() - ; - } - - private function addSessionSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('session') - ->info('session configuration') - ->canBeEnabled() - ->beforeNormalization() - ->ifTrue(function ($v) { - return \is_array($v) && isset($v['storage_id']) && isset($v['storage_factory_id']); - }) - ->thenInvalid('You cannot use both "storage_id" and "storage_factory_id" at the same time under "framework.session"') - ->end() - ->children() - ->scalarNode('storage_id')->defaultValue('session.storage.native')->end() - ->scalarNode('storage_factory_id')->defaultNull()->end() - ->scalarNode('handler_id')->defaultValue('session.handler.native_file')->end() - ->scalarNode('name') - ->validate() - ->ifTrue(function ($v) { - parse_str($v, $parsed); - - return implode('&', array_keys($parsed)) !== (string) $v; - }) - ->thenInvalid('Session name %s contains illegal character(s)') - ->end() - ->end() - ->scalarNode('cookie_lifetime')->end() - ->scalarNode('cookie_path')->end() - ->scalarNode('cookie_domain')->end() - ->enumNode('cookie_secure')->values([true, false, 'auto'])->end() - ->booleanNode('cookie_httponly')->defaultTrue()->end() - ->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultNull()->end() - ->booleanNode('use_cookies')->end() - ->scalarNode('gc_divisor')->end() - ->scalarNode('gc_probability')->defaultValue(1)->end() - ->scalarNode('gc_maxlifetime')->end() - ->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end() - ->integerNode('metadata_update_threshold') - ->defaultValue(0) - ->info('seconds to wait between 2 session metadata updates') - ->end() - ->integerNode('sid_length') - ->min(22) - ->max(256) - ->end() - ->integerNode('sid_bits_per_character') - ->min(4) - ->max(6) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRequestSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('request') - ->info('request configuration') - ->canBeEnabled() - ->fixXmlConfig('format') - ->children() - ->arrayNode('formats') - ->useAttributeAsKey('name') - ->prototype('array') - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && isset($v['mime_type']); }) - ->then(function ($v) { return $v['mime_type']; }) - ->end() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addAssetsSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('assets') - ->info('assets configuration') - ->{$enableIfStandalone('symfony/asset', Package::class)}() - ->fixXmlConfig('base_url') - ->children() - ->booleanNode('strict_mode') - ->info('Throw an exception if an entry is missing from the manifest.json') - ->defaultFalse() - ->end() - ->scalarNode('version_strategy')->defaultNull()->end() - ->scalarNode('version')->defaultNull()->end() - ->scalarNode('version_format')->defaultValue('%%s?%%s')->end() - ->scalarNode('json_manifest_path')->defaultNull()->end() - ->scalarNode('base_path')->defaultValue('')->end() - ->arrayNode('base_urls') - ->requiresAtLeastOneElement() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['version']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets".') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets".') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets".') - ->end() - ->fixXmlConfig('package') - ->children() - ->arrayNode('packages') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('base_url') - ->children() - ->booleanNode('strict_mode') - ->info('Throw an exception if an entry is missing from the manifest.json') - ->defaultFalse() - ->end() - ->scalarNode('version_strategy')->defaultNull()->end() - ->scalarNode('version') - ->beforeNormalization() - ->ifTrue(function ($v) { return '' === $v; }) - ->then(function ($v) { return; }) - ->end() - ->end() - ->scalarNode('version_format')->defaultNull()->end() - ->scalarNode('json_manifest_path')->defaultNull()->end() - ->scalarNode('base_path')->defaultValue('')->end() - ->arrayNode('base_urls') - ->requiresAtLeastOneElement() - ->beforeNormalization()->castToArray()->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['version']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets" packages.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version_strategy']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets" packages.') - ->end() - ->validate() - ->ifTrue(function ($v) { - return isset($v['version']) && isset($v['json_manifest_path']); - }) - ->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addTranslatorSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('translator') - ->info('translator configuration') - ->{$enableIfStandalone('symfony/translation', Translator::class)}() - ->fixXmlConfig('fallback') - ->fixXmlConfig('path') - ->fixXmlConfig('enabled_locale') - ->fixXmlConfig('provider') - ->children() - ->arrayNode('fallbacks') - ->info('Defaults to the value of "default_locale".') - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->booleanNode('logging')->defaultValue(false)->end() - ->scalarNode('formatter')->defaultValue('translator.formatter.default')->end() - ->scalarNode('cache_dir')->defaultValue('%kernel.cache_dir%/translations')->end() - ->scalarNode('default_path') - ->info('The default path used to load translations') - ->defaultValue('%kernel.project_dir%/translations') - ->end() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->arrayNode('enabled_locales') - ->setDeprecated('symfony/framework-bundle', '5.3', 'Option "%node%" at "%path%" is deprecated, set the "framework.enabled_locales" option instead.') - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->arrayNode('pseudo_localization') - ->canBeEnabled() - ->fixXmlConfig('localizable_html_attribute') - ->children() - ->booleanNode('accents')->defaultTrue()->end() - ->floatNode('expansion_factor') - ->min(1.0) - ->defaultValue(1.0) - ->end() - ->booleanNode('brackets')->defaultTrue()->end() - ->booleanNode('parse_html')->defaultFalse()->end() - ->arrayNode('localizable_html_attributes') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('providers') - ->info('Translation providers you can read/write your translations from') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('domain') - ->fixXmlConfig('locale') - ->children() - ->scalarNode('dsn')->end() - ->arrayNode('domains') - ->prototype('scalar')->end() - ->defaultValue([]) - ->end() - ->arrayNode('locales') - ->prototype('scalar')->end() - ->defaultValue([]) - ->info('If not set, all locales listed under framework.enabled_locales are used.') - ->end() - ->end() - ->end() - ->defaultValue([]) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addValidationSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('validation') - ->info('validation configuration') - ->{$enableIfStandalone('symfony/validator', Validation::class)}() - ->children() - ->scalarNode('cache')->end() - ->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && (\PHP_VERSION_ID >= 80000 || $willBeAvailable('doctrine/annotations', Annotation::class, 'symfony/validator')) ? 'defaultTrue' : 'defaultFalse'}()->end() - ->arrayNode('static_method') - ->defaultValue(['loadValidatorMetadata']) - ->prototype('scalar')->end() - ->treatFalseLike([]) - ->validate()->castToArray()->end() - ->end() - ->scalarNode('translation_domain')->defaultValue('validators')->end() - ->enumNode('email_validation_mode')->values(['html5', 'loose', 'strict'])->end() - ->arrayNode('mapping') - ->addDefaultsIfNotSet() - ->fixXmlConfig('path') - ->children() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('not_compromised_password') - ->canBeDisabled() - ->children() - ->booleanNode('enabled') - ->defaultTrue() - ->info('When disabled, compromised passwords will be accepted as valid.') - ->end() - ->scalarNode('endpoint') - ->defaultNull() - ->info('API endpoint for the NotCompromisedPassword Validator.') - ->end() - ->end() - ->end() - ->arrayNode('auto_mapping') - ->info('A collection of namespaces for which auto-mapping will be enabled by default, or null to opt-in with the EnableAutoMapping constraint.') - ->example([ - 'App\\Entity\\' => [], - 'App\\WithSpecificLoaders\\' => ['validator.property_info_loader'], - ]) - ->useAttributeAsKey('namespace') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifArray() - ->then(function (array $values): array { - foreach ($values as $k => $v) { - if (isset($v['service'])) { - continue; - } - - if (isset($v['namespace'])) { - $values[$k]['services'] = []; - continue; - } - - if (!\is_array($v)) { - $values[$v]['services'] = []; - unset($values[$k]); - continue; - } - - $tmp = $v; - unset($values[$k]); - $values[$k]['services'] = $tmp; - } - - return $values; - }) - ->end() - ->arrayPrototype() - ->fixXmlConfig('service') - ->children() - ->arrayNode('services') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addAnnotationsSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $doctrineCache = $willBeAvailable('doctrine/cache', Cache::class, 'doctrine/annotations'); - $psr6Cache = $willBeAvailable('symfony/cache', PsrCachedReader::class, 'doctrine/annotations'); - - $rootNode - ->children() - ->arrayNode('annotations') - ->info('annotation configuration') - ->{$willBeAvailable('doctrine/annotations', Annotation::class) ? 'canBeDisabled' : 'canBeEnabled'}() - ->children() - ->scalarNode('cache')->defaultValue(($doctrineCache || $psr6Cache) ? 'php_array' : 'none')->end() - ->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end() - ->booleanNode('debug')->defaultValue($this->debug)->end() - ->end() - ->end() - ->end() - ; - } - - private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('serializer') - ->info('serializer configuration') - ->{$enableIfStandalone('symfony/serializer', Serializer::class)}() - ->children() - ->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && (\PHP_VERSION_ID >= 80000 || $willBeAvailable('doctrine/annotations', Annotation::class, 'symfony/serializer')) ? 'defaultTrue' : 'defaultFalse'}()->end() - ->scalarNode('name_converter')->end() - ->scalarNode('circular_reference_handler')->end() - ->scalarNode('max_depth_handler')->end() - ->arrayNode('mapping') - ->addDefaultsIfNotSet() - ->fixXmlConfig('path') - ->children() - ->arrayNode('paths') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('default_context') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->defaultValue([]) - ->prototype('variable')->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addPropertyAccessSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('property_access') - ->addDefaultsIfNotSet() - ->info('Property access configuration') - ->{$willBeAvailable('symfony/property-access', PropertyAccessor::class) ? 'canBeDisabled' : 'canBeEnabled'}() - ->children() - ->booleanNode('magic_call')->defaultFalse()->end() - ->booleanNode('magic_get')->defaultTrue()->end() - ->booleanNode('magic_set')->defaultTrue()->end() - ->booleanNode('throw_exception_on_invalid_index')->defaultFalse()->end() - ->booleanNode('throw_exception_on_invalid_property_path')->defaultTrue()->end() - ->end() - ->end() - ->end() - ; - } - - private function addPropertyInfoSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('property_info') - ->info('Property info configuration') - ->{$enableIfStandalone('symfony/property-info', PropertyInfoExtractorInterface::class)}() - ->end() - ->end() - ; - } - - private function addCacheSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable) - { - $rootNode - ->children() - ->arrayNode('cache') - ->info('Cache configuration') - ->addDefaultsIfNotSet() - ->fixXmlConfig('pool') - ->children() - ->scalarNode('prefix_seed') - ->info('Used to namespace cache keys when using several apps with the same shared backend') - ->defaultValue('_%kernel.project_dir%.%kernel.container_class%') - ->example('my-application-name/%kernel.environment%') - ->end() - ->scalarNode('app') - ->info('App related cache pools configuration') - ->defaultValue('cache.adapter.filesystem') - ->end() - ->scalarNode('system') - ->info('System related cache pools configuration') - ->defaultValue('cache.adapter.system') - ->end() - ->scalarNode('directory')->defaultValue('%kernel.cache_dir%/pools/app')->end() - ->scalarNode('default_doctrine_provider')->end() - ->scalarNode('default_psr6_provider')->end() - ->scalarNode('default_redis_provider')->defaultValue('redis://localhost')->end() - ->scalarNode('default_memcached_provider')->defaultValue('memcached://localhost')->end() - ->scalarNode('default_doctrine_dbal_provider')->defaultValue('database_connection')->end() - ->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) && class_exists(DoctrineAdapter::class) ? 'database_connection' : null)->end() - ->arrayNode('pools') - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('adapter') - ->beforeNormalization() - ->ifTrue(function ($v) { return isset($v['provider']) && \is_array($v['adapters'] ?? $v['adapter'] ?? null) && 1 < \count($v['adapters'] ?? $v['adapter']); }) - ->thenInvalid('Pool cannot have a "provider" while more than one adapter is defined') - ->end() - ->children() - ->arrayNode('adapters') - ->performNoDeepMerging() - ->info('One or more adapters to chain for creating the pool, defaults to "cache.app".') - ->beforeNormalization()->castToArray()->end() - ->beforeNormalization() - ->always()->then(function ($values) { - if ([0] === array_keys($values) && \is_array($values[0])) { - return $values[0]; - } - $adapters = []; - - foreach ($values as $k => $v) { - if (\is_int($k) && \is_string($v)) { - $adapters[] = $v; - } elseif (!\is_array($v)) { - $adapters[$k] = $v; - } elseif (isset($v['provider'])) { - $adapters[$v['provider']] = $v['name'] ?? $v; - } else { - $adapters[] = $v['name'] ?? $v; - } - } - - return $adapters; - }) - ->end() - ->prototype('scalar')->end() - ->end() - ->scalarNode('tags')->defaultNull()->end() - ->booleanNode('public')->defaultFalse()->end() - ->scalarNode('default_lifetime') - ->info('Default lifetime of the pool') - ->example('"600" for 5 minutes expressed in seconds, "PT5M" for five minutes expressed as ISO 8601 time interval, or "5 minutes" as a date expression') - ->end() - ->scalarNode('provider') - ->info('Overwrite the setting from the default provider for this adapter.') - ->end() - ->scalarNode('early_expiration_message_bus') - ->example('"messenger.default_bus" to send early expiration events to the default Messenger bus.') - ->end() - ->scalarNode('clearer')->end() - ->end() - ->end() - ->validate() - ->ifTrue(function ($v) { return isset($v['cache.app']) || isset($v['cache.system']); }) - ->thenInvalid('"cache.app" and "cache.system" are reserved names') - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addPhpErrorsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('php_errors') - ->info('PHP errors handling configuration') - ->addDefaultsIfNotSet() - ->children() - ->variableNode('log') - ->info('Use the application logger instead of the PHP logger for logging PHP errors.') - ->example('"true" to use the default configuration: log all errors. "false" to disable. An integer bit field of E_* constants, or an array mapping E_* constants to log levels.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->beforeNormalization() - ->ifArray() - ->then(function (array $v): array { - if (!($v[0]['type'] ?? false)) { - return $v; - } - - // Fix XML normalization - - $ret = []; - foreach ($v as ['type' => $type, 'logLevel' => $logLevel]) { - $ret[$type] = $logLevel; - } - - return $ret; - }) - ->end() - ->validate() - ->ifTrue(function ($v) { return !(\is_int($v) || \is_bool($v) || \is_array($v)); }) - ->thenInvalid('The "php_errors.log" parameter should be either an integer, a boolean, or an array') - ->end() - ->end() - ->booleanNode('throw') - ->info('Throw PHP errors as \ErrorException instances.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addExceptionsSection(ArrayNodeDefinition $rootNode) - { - $logLevels = (new \ReflectionClass(LogLevel::class))->getConstants(); - - $rootNode - ->children() - ->arrayNode('exceptions') - ->info('Exception handling configuration') - ->beforeNormalization() - ->ifArray() - ->then(function (array $v): array { - if (!\array_key_exists('exception', $v)) { - return $v; - } - - // Fix XML normalization - $data = isset($v['exception'][0]) ? $v['exception'] : [$v['exception']]; - $exceptions = []; - foreach ($data as $exception) { - $config = []; - if (\array_key_exists('log-level', $exception)) { - $config['log_level'] = $exception['log-level']; - } - if (\array_key_exists('status-code', $exception)) { - $config['status_code'] = $exception['status-code']; - } - $exceptions[$exception['name']] = $config; - } - - return $exceptions; - }) - ->end() - ->prototype('array') - ->fixXmlConfig('exception') - ->children() - ->scalarNode('log_level') - ->info('The level of log message. Null to let Symfony decide.') - ->validate() - ->ifTrue(function ($v) use ($logLevels) { return !\in_array($v, $logLevels); }) - ->thenInvalid(sprintf('The log level is not valid. Pick one among "%s".', implode('", "', $logLevels))) - ->end() - ->defaultNull() - ->end() - ->scalarNode('status_code') - ->info('The status code of the response. Null to let Symfony decide.') - ->validate() - ->ifTrue(function ($v) { return $v < 100 || $v > 599; }) - ->thenInvalid('The log level is not valid. Pick a value between 100 and 599.') - ->end() - ->defaultNull() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addLockSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('lock') - ->info('Lock configuration') - ->{$enableIfStandalone('symfony/lock', Lock::class)}() - ->beforeNormalization() - ->ifString()->then(function ($v) { return ['enabled' => true, 'resources' => $v]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['enabled']); }) - ->then(function ($v) { return $v + ['enabled' => true]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['resources']) && !isset($v['resource']); }) - ->then(function ($v) { - $e = $v['enabled']; - unset($v['enabled']); - - return ['enabled' => $e, 'resources' => $v]; - }) - ->end() - ->addDefaultsIfNotSet() - ->fixXmlConfig('resource') - ->children() - ->arrayNode('resources') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->requiresAtLeastOneElement() - ->defaultValue(['default' => [class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphore' : 'flock']]) - ->beforeNormalization() - ->ifString()->then(function ($v) { return ['default' => $v]; }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && array_is_list($v); }) - ->then(function ($v) { - $resources = []; - foreach ($v as $resource) { - $resources[] = \is_array($resource) && isset($resource['name']) - ? [$resource['name'] => $resource['value']] - : ['default' => $resource] - ; - } - - return array_merge_recursive([], ...$resources); - }) - ->end() - ->prototype('array') - ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addWebLinkSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('web_link') - ->info('web links configuration') - ->{$enableIfStandalone('symfony/weblink', HttpHeaderSerializer::class)}() - ->end() - ->end() - ; - } - - private function addMessengerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('messenger') - ->info('Messenger configuration') - ->{$enableIfStandalone('symfony/messenger', MessageBusInterface::class)}() - ->fixXmlConfig('transport') - ->fixXmlConfig('bus', 'buses') - ->validate() - ->ifTrue(function ($v) { return isset($v['buses']) && \count($v['buses']) > 1 && null === $v['default_bus']; }) - ->thenInvalid('You must specify the "default_bus" if you define more than one bus.') - ->end() - ->validate() - ->ifTrue(static function ($v): bool { return isset($v['buses']) && null !== $v['default_bus'] && !isset($v['buses'][$v['default_bus']]); }) - ->then(static function (array $v): void { throw new InvalidConfigurationException(sprintf('The specified default bus "%s" is not configured. Available buses are "%s".', $v['default_bus'], implode('", "', array_keys($v['buses'])))); }) - ->end() - ->children() - ->arrayNode('routing') - ->normalizeKeys(false) - ->useAttributeAsKey('message_class') - ->beforeNormalization() - ->always() - ->then(function ($config) { - if (!\is_array($config)) { - return []; - } - // If XML config with only one routing attribute - if (2 === \count($config) && isset($config['message-class']) && isset($config['sender'])) { - $config = [0 => $config]; - } - - $newConfig = []; - foreach ($config as $k => $v) { - if (!\is_int($k)) { - $newConfig[$k] = [ - 'senders' => $v['senders'] ?? (\is_array($v) ? array_values($v) : [$v]), - ]; - } else { - $newConfig[$v['message-class']]['senders'] = array_map( - function ($a) { - return \is_string($a) ? $a : $a['service']; - }, - array_values($v['sender']) - ); - } - } - - return $newConfig; - }) - ->end() - ->prototype('array') - ->performNoDeepMerging() - ->children() - ->arrayNode('senders') - ->requiresAtLeastOneElement() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('serializer') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('default_serializer') - ->defaultValue('messenger.transport.native_php_serializer') - ->info('Service id to use as the default serializer for the transports.') - ->end() - ->arrayNode('symfony_serializer') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('format')->defaultValue('json')->info('Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default).')->end() - ->arrayNode('context') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->defaultValue([]) - ->info('Context array for the messenger.transport.symfony_serializer service (which is not the serializer used by default).') - ->prototype('variable')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('transports') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->arrayPrototype() - ->beforeNormalization() - ->ifString() - ->then(function (string $dsn) { - return ['dsn' => $dsn]; - }) - ->end() - ->fixXmlConfig('option') - ->children() - ->scalarNode('dsn')->end() - ->scalarNode('serializer')->defaultNull()->info('Service id of a custom serializer to use.')->end() - ->arrayNode('options') - ->normalizeKeys(false) - ->defaultValue([]) - ->prototype('variable') - ->end() - ->end() - ->scalarNode('failure_transport') - ->defaultNull() - ->info('Transport name to send failed messages to (after all retries have failed).') - ->end() - ->arrayNode('retry_strategy') - ->addDefaultsIfNotSet() - ->beforeNormalization() - ->always(function ($v) { - if (isset($v['service']) && (isset($v['max_retries']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay']))) { - throw new \InvalidArgumentException('The "service" cannot be used along with the other "retry_strategy" options.'); - } - - return $v; - }) - ->end() - ->children() - ->scalarNode('service')->defaultNull()->info('Service id to override the retry strategy entirely')->end() - ->integerNode('max_retries')->defaultValue(3)->min(0)->end() - ->integerNode('delay')->defaultValue(1000)->min(0)->info('Time in ms to delay (or the initial value when multiplier is used)')->end() - ->floatNode('multiplier')->defaultValue(2)->min(1)->info('If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries))')->end() - ->integerNode('max_delay')->defaultValue(0)->min(0)->info('Max time in ms that a retry should ever be delayed (0 = infinite)')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->scalarNode('failure_transport') - ->defaultNull() - ->info('Transport name to send failed messages to (after all retries have failed).') - ->end() - ->booleanNode('reset_on_message') - ->defaultNull() - ->info('Reset container services after each message.') - ->end() - ->scalarNode('default_bus')->defaultNull()->end() - ->arrayNode('buses') - ->defaultValue(['messenger.bus.default' => ['default_middleware' => true, 'middleware' => []]]) - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->arrayPrototype() - ->addDefaultsIfNotSet() - ->children() - ->enumNode('default_middleware') - ->values([true, false, 'allow_no_handlers']) - ->defaultTrue() - ->end() - ->arrayNode('middleware') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_string($v) || (\is_array($v) && !\is_int(key($v))); }) - ->then(function ($v) { return [$v]; }) - ->end() - ->defaultValue([]) - ->arrayPrototype() - ->beforeNormalization() - ->always() - ->then(function ($middleware): array { - if (!\is_array($middleware)) { - return ['id' => $middleware]; - } - if (isset($middleware['id'])) { - return $middleware; - } - if (1 < \count($middleware)) { - throw new \InvalidArgumentException('Invalid middleware at path "framework.messenger": a map with a single factory id as key and its arguments as value was expected, '.json_encode($middleware).' given.'); - } - - return [ - 'id' => key($middleware), - 'arguments' => current($middleware), - ]; - }) - ->end() - ->fixXmlConfig('argument') - ->children() - ->scalarNode('id')->isRequired()->cannotBeEmpty()->end() - ->arrayNode('arguments') - ->normalizeKeys(false) - ->defaultValue([]) - ->prototype('variable') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRobotsIndexSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->booleanNode('disallow_search_engine_index') - ->info('Enabled by default when debug is enabled.') - ->defaultValue($this->debug) - ->treatNullLike($this->debug) - ->end() - ->end() - ; - } - - private function addHttpClientSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('http_client') - ->info('HTTP Client configuration') - ->{$enableIfStandalone('symfony/http-client', HttpClient::class)}() - ->fixXmlConfig('scoped_client') - ->beforeNormalization() - ->always(function ($config) { - if (empty($config['scoped_clients']) || !\is_array($config['default_options']['retry_failed'] ?? null)) { - return $config; - } - - foreach ($config['scoped_clients'] as &$scopedConfig) { - if (!isset($scopedConfig['retry_failed']) || true === $scopedConfig['retry_failed']) { - $scopedConfig['retry_failed'] = $config['default_options']['retry_failed']; - continue; - } - if (\is_array($scopedConfig['retry_failed'])) { - $scopedConfig['retry_failed'] = $scopedConfig['retry_failed'] + $config['default_options']['retry_failed']; - } - } - - return $config; - }) - ->end() - ->children() - ->integerNode('max_host_connections') - ->info('The maximum number of connections to a single host.') - ->end() - ->arrayNode('default_options') - ->fixXmlConfig('header') - ->children() - ->arrayNode('headers') - ->info('Associative array: header => value(s).') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->variablePrototype()->end() - ->end() - ->integerNode('max_redirects') - ->info('The maximum number of redirects to follow.') - ->end() - ->scalarNode('http_version') - ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.') - ->end() - ->arrayNode('resolve') - ->info('Associative array: domain => IP.') - ->useAttributeAsKey('host') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['host'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['host'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->scalarNode('proxy') - ->info('The URL of the proxy to pass requests through or null for automatic detection.') - ->end() - ->scalarNode('no_proxy') - ->info('A comma separated list of hosts that do not require a proxy to be reached.') - ->end() - ->floatNode('timeout') - ->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.') - ->end() - ->floatNode('max_duration') - ->info('The maximum execution time for the request+response as a whole.') - ->end() - ->scalarNode('bindto') - ->info('A network interface name, IP address, a host name or a UNIX socket to bind to.') - ->end() - ->booleanNode('verify_peer') - ->info('Indicates if the peer should be verified in an SSL/TLS context.') - ->end() - ->booleanNode('verify_host') - ->info('Indicates if the host should exist as a certificate common name.') - ->end() - ->scalarNode('cafile') - ->info('A certificate authority file.') - ->end() - ->scalarNode('capath') - ->info('A directory that contains multiple certificate authority files.') - ->end() - ->scalarNode('local_cert') - ->info('A PEM formatted certificate file.') - ->end() - ->scalarNode('local_pk') - ->info('A private key file.') - ->end() - ->scalarNode('passphrase') - ->info('The passphrase used to encrypt the "local_pk" file.') - ->end() - ->scalarNode('ciphers') - ->info('A list of SSL/TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...)') - ->end() - ->arrayNode('peer_fingerprint') - ->info('Associative array: hashing algorithm => hash(es).') - ->normalizeKeys(false) - ->children() - ->variableNode('sha1')->end() - ->variableNode('pin-sha256')->end() - ->variableNode('md5')->end() - ->end() - ->end() - ->append($this->addHttpClientRetrySection()) - ->end() - ->end() - ->scalarNode('mock_response_factory') - ->info('The id of the service that should generate mock responses. It should be either an invokable or an iterable.') - ->end() - ->arrayNode('scoped_clients') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->arrayPrototype() - ->fixXmlConfig('header') - ->beforeNormalization() - ->always() - ->then(function ($config) { - if (!class_exists(HttpClient::class)) { - throw new LogicException('HttpClient support cannot be enabled as the component is not installed. Try running "composer require symfony/http-client".'); - } - - return \is_array($config) ? $config : ['base_uri' => $config]; - }) - ->end() - ->validate() - ->ifTrue(function ($v) { return !isset($v['scope']) && !isset($v['base_uri']); }) - ->thenInvalid('Either "scope" or "base_uri" should be defined.') - ->end() - ->validate() - ->ifTrue(function ($v) { return !empty($v['query']) && !isset($v['base_uri']); }) - ->thenInvalid('"query" applies to "base_uri" but no base URI is defined.') - ->end() - ->children() - ->scalarNode('scope') - ->info('The regular expression that the request URL must match before adding the other options. When none is provided, the base URI is used instead.') - ->cannotBeEmpty() - ->end() - ->scalarNode('base_uri') - ->info('The URI to resolve relative URLs, following rules in RFC 3985, section 2.') - ->cannotBeEmpty() - ->end() - ->scalarNode('auth_basic') - ->info('An HTTP Basic authentication "username:password".') - ->end() - ->scalarNode('auth_bearer') - ->info('A token enabling HTTP Bearer authorization.') - ->end() - ->scalarNode('auth_ntlm') - ->info('A "username:password" pair to use Microsoft NTLM authentication (requires the cURL extension).') - ->end() - ->arrayNode('query') - ->info('Associative array of query string values merged with the base URI.') - ->useAttributeAsKey('key') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['key'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['key'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->arrayNode('headers') - ->info('Associative array: header => value(s).') - ->useAttributeAsKey('name') - ->normalizeKeys(false) - ->variablePrototype()->end() - ->end() - ->integerNode('max_redirects') - ->info('The maximum number of redirects to follow.') - ->end() - ->scalarNode('http_version') - ->info('The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.') - ->end() - ->arrayNode('resolve') - ->info('Associative array: domain => IP.') - ->useAttributeAsKey('host') - ->beforeNormalization() - ->always(function ($config) { - if (!\is_array($config)) { - return []; - } - if (!isset($config['host'], $config['value']) || \count($config) > 2) { - return $config; - } - - return [$config['host'] => $config['value']]; - }) - ->end() - ->normalizeKeys(false) - ->scalarPrototype()->end() - ->end() - ->scalarNode('proxy') - ->info('The URL of the proxy to pass requests through or null for automatic detection.') - ->end() - ->scalarNode('no_proxy') - ->info('A comma separated list of hosts that do not require a proxy to be reached.') - ->end() - ->floatNode('timeout') - ->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.') - ->end() - ->floatNode('max_duration') - ->info('The maximum execution time for the request+response as a whole.') - ->end() - ->scalarNode('bindto') - ->info('A network interface name, IP address, a host name or a UNIX socket to bind to.') - ->end() - ->booleanNode('verify_peer') - ->info('Indicates if the peer should be verified in an SSL/TLS context.') - ->end() - ->booleanNode('verify_host') - ->info('Indicates if the host should exist as a certificate common name.') - ->end() - ->scalarNode('cafile') - ->info('A certificate authority file.') - ->end() - ->scalarNode('capath') - ->info('A directory that contains multiple certificate authority files.') - ->end() - ->scalarNode('local_cert') - ->info('A PEM formatted certificate file.') - ->end() - ->scalarNode('local_pk') - ->info('A private key file.') - ->end() - ->scalarNode('passphrase') - ->info('The passphrase used to encrypt the "local_pk" file.') - ->end() - ->scalarNode('ciphers') - ->info('A list of SSL/TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...)') - ->end() - ->arrayNode('peer_fingerprint') - ->info('Associative array: hashing algorithm => hash(es).') - ->normalizeKeys(false) - ->children() - ->variableNode('sha1')->end() - ->variableNode('pin-sha256')->end() - ->variableNode('md5')->end() - ->end() - ->end() - ->append($this->addHttpClientRetrySection()) - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addHttpClientRetrySection() - { - $root = new NodeBuilder(); - - return $root - ->arrayNode('retry_failed') - ->fixXmlConfig('http_code') - ->canBeEnabled() - ->addDefaultsIfNotSet() - ->beforeNormalization() - ->always(function ($v) { - if (isset($v['retry_strategy']) && (isset($v['http_codes']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay']) || isset($v['jitter']))) { - throw new \InvalidArgumentException('The "retry_strategy" option cannot be used along with the "http_codes", "delay", "multiplier", "max_delay" or "jitter" options.'); - } - - return $v; - }) - ->end() - ->children() - ->scalarNode('retry_strategy')->defaultNull()->info('service id to override the retry strategy')->end() - ->arrayNode('http_codes') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifArray() - ->then(static function ($v) { - $list = []; - foreach ($v as $key => $val) { - if (is_numeric($val)) { - $list[] = ['code' => $val]; - } elseif (\is_array($val)) { - if (isset($val['code']) || isset($val['methods'])) { - $list[] = $val; - } else { - $list[] = ['code' => $key, 'methods' => $val]; - } - } elseif (true === $val || null === $val) { - $list[] = ['code' => $key]; - } - } - - return $list; - }) - ->end() - ->useAttributeAsKey('code') - ->arrayPrototype() - ->fixXmlConfig('method') - ->children() - ->integerNode('code')->end() - ->arrayNode('methods') - ->beforeNormalization() - ->ifArray() - ->then(function ($v) { - return array_map('strtoupper', $v); - }) - ->end() - ->prototype('scalar')->end() - ->info('A list of HTTP methods that triggers a retry for this status code. When empty, all methods are retried') - ->end() - ->end() - ->end() - ->info('A list of HTTP status code that triggers a retry') - ->end() - ->integerNode('max_retries')->defaultValue(3)->min(0)->end() - ->integerNode('delay')->defaultValue(1000)->min(0)->info('Time in ms to delay (or the initial value when multiplier is used)')->end() - ->floatNode('multiplier')->defaultValue(2)->min(1)->info('If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries)')->end() - ->integerNode('max_delay')->defaultValue(0)->min(0)->info('Max time in ms that a retry should ever be delayed (0 = infinite)')->end() - ->floatNode('jitter')->defaultValue(0.1)->min(0)->max(1)->info('Randomness in percent (between 0 and 1) to apply to the delay')->end() - ->end() - ; - } - - private function addMailerSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('mailer') - ->info('Mailer configuration') - ->{$enableIfStandalone('symfony/mailer', Mailer::class)}() - ->validate() - ->ifTrue(function ($v) { return isset($v['dsn']) && \count($v['transports']); }) - ->thenInvalid('"dsn" and "transports" cannot be used together.') - ->end() - ->fixXmlConfig('transport') - ->fixXmlConfig('header') - ->children() - ->scalarNode('message_bus')->defaultNull()->info('The message bus to use. Defaults to the default bus if the Messenger component is installed.')->end() - ->scalarNode('dsn')->defaultNull()->end() - ->arrayNode('transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->arrayNode('envelope') - ->info('Mailer Envelope configuration') - ->children() - ->scalarNode('sender')->end() - ->arrayNode('recipients') - ->performNoDeepMerging() - ->beforeNormalization() - ->ifArray() - ->then(function ($v) { - return array_filter(array_values($v)); - }) - ->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->arrayNode('headers') - ->normalizeKeys(false) - ->useAttributeAsKey('name') - ->prototype('array') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifTrue(function ($v) { return !\is_array($v) || array_keys($v) !== ['value']; }) - ->then(function ($v) { return ['value' => $v]; }) - ->end() - ->children() - ->variableNode('value')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addNotifierSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('notifier') - ->info('Notifier configuration') - ->{$enableIfStandalone('symfony/notifier', Notifier::class)}() - ->fixXmlConfig('chatter_transport') - ->children() - ->arrayNode('chatter_transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->end() - ->fixXmlConfig('texter_transport') - ->children() - ->arrayNode('texter_transports') - ->useAttributeAsKey('name') - ->prototype('scalar')->end() - ->end() - ->end() - ->children() - ->booleanNode('notification_on_failed_messages')->defaultFalse()->end() - ->end() - ->children() - ->arrayNode('channel_policy') - ->useAttributeAsKey('name') - ->prototype('array') - ->beforeNormalization()->ifString()->then(function (string $v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->fixXmlConfig('admin_recipient') - ->children() - ->arrayNode('admin_recipients') - ->prototype('array') - ->children() - ->scalarNode('email')->cannotBeEmpty()->end() - ->scalarNode('phone')->defaultValue('')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addRateLimiterSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('rate_limiter') - ->info('Rate limiter configuration') - ->{$enableIfStandalone('symfony/rate-limiter', TokenBucketLimiter::class)}() - ->fixXmlConfig('limiter') - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && !isset($v['limiters']) && !isset($v['limiter']); }) - ->then(function (array $v) { - $newV = [ - 'enabled' => $v['enabled'] ?? true, - ]; - unset($v['enabled']); - - $newV['limiters'] = $v; - - return $newV; - }) - ->end() - ->children() - ->arrayNode('limiters') - ->useAttributeAsKey('name') - ->arrayPrototype() - ->children() - ->scalarNode('lock_factory') - ->info('The service ID of the lock factory used by this limiter (or null to disable locking)') - ->defaultValue('lock.factory') - ->end() - ->scalarNode('cache_pool') - ->info('The cache pool to use for storing the current limiter state') - ->defaultValue('cache.rate_limiter') - ->end() - ->scalarNode('storage_service') - ->info('The service ID of a custom storage implementation, this precedes any configured "cache_pool"') - ->defaultNull() - ->end() - ->enumNode('policy') - ->info('The algorithm to be used by this limiter') - ->isRequired() - ->values(['fixed_window', 'token_bucket', 'sliding_window', 'no_limit']) - ->end() - ->integerNode('limit') - ->info('The maximum allowed hits in a fixed interval or burst') - ->isRequired() - ->end() - ->scalarNode('interval') - ->info('Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).') - ->end() - ->arrayNode('rate') - ->info('Configures the fill rate if "policy" is set to "token_bucket"') - ->children() - ->scalarNode('interval') - ->info('Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).') - ->end() - ->integerNode('amount')->info('Amount of tokens to add each interval')->defaultValue(1)->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addUidSection(ArrayNodeDefinition $rootNode, callable $enableIfStandalone) - { - $rootNode - ->children() - ->arrayNode('uid') - ->info('Uid configuration') - ->{$enableIfStandalone('symfony/uid', UuidFactory::class)}() - ->addDefaultsIfNotSet() - ->children() - ->enumNode('default_uuid_version') - ->defaultValue(6) - ->values([6, 4, 1]) - ->end() - ->enumNode('name_based_uuid_version') - ->defaultValue(5) - ->values([5, 3]) - ->end() - ->scalarNode('name_based_uuid_namespace') - ->cannotBeEmpty() - ->end() - ->enumNode('time_based_uuid_version') - ->defaultValue(6) - ->values([6, 1]) - ->end() - ->scalarNode('time_based_uuid_node') - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->end() - ; - } -} diff --git a/vendor/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php b/vendor/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php deleted file mode 100644 index f174c4c..0000000 --- a/vendor/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php +++ /dev/null @@ -1,2702 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; - -use Composer\InstalledVersions; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\Reader; -use Http\Client\HttpClient; -use phpDocumentor\Reflection\DocBlockFactoryInterface; -use phpDocumentor\Reflection\Types\ContextFactory; -use PHPStan\PhpDocParser\Parser\PhpDocParser; -use Psr\Cache\CacheItemPoolInterface; -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; -use Psr\Http\Client\ClientInterface; -use Psr\Log\LoggerAwareInterface; -use Symfony\Bridge\Monolog\Processor\DebugProcessor; -use Symfony\Bridge\Twig\Extension\CsrfExtension; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader; -use Symfony\Bundle\FrameworkBundle\Routing\RouteLoaderInterface; -use Symfony\Bundle\FullStack; -use Symfony\Bundle\MercureBundle\MercureBundle; -use Symfony\Component\Asset\PackageInterface; -use Symfony\Component\BrowserKit\AbstractBrowser; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\DependencyInjection\CachePoolPass; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\ResourceCheckerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\EnvVarLoaderInterface; -use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Dotenv\Command\DebugCommand; -use Symfony\Component\EventDispatcher\Attribute\AsEventListener; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\Form; -use Symfony\Component\Form\FormTypeExtensionInterface; -use Symfony\Component\Form\FormTypeGuesserInterface; -use Symfony\Component\Form\FormTypeInterface; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; -use Symfony\Component\HttpClient\RetryableHttpClient; -use Symfony\Component\HttpClient\ScopingHttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; -use Symfony\Component\HttpKernel\Attribute\AsController; -use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\Lock\Lock; -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\LockInterface; -use Symfony\Component\Lock\PersistingStoreInterface; -use Symfony\Component\Lock\Store\StoreFactory; -use Symfony\Component\Lock\StoreInterface; -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; -use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory; -use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory; -use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Mercure\HubRegistry; -use Symfony\Component\Messenger\Attribute\AsMessageHandler; -use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory; -use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory; -use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory; -use Symfony\Component\Messenger\Handler\BatchHandlerInterface; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; -use Symfony\Component\Messenger\MessageBus; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; -use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; -use Symfony\Component\Messenger\Transport\TransportFactoryInterface; -use Symfony\Component\Messenger\Transport\TransportInterface; -use Symfony\Component\Mime\Header\Headers; -use Symfony\Component\Mime\MimeTypeGuesserInterface; -use Symfony\Component\Mime\MimeTypes; -use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; -use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; -use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; -use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; -use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory; -use Symfony\Component\Notifier\Bridge\Expo\ExpoTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransportFactory; -use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory; -use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory; -use Symfony\Component\Notifier\Bridge\Gitter\GitterTransportFactory; -use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory; -use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory; -use Symfony\Component\Notifier\Bridge\Mailjet\MailjetTransportFactory as MailjetNotifierTransportFactory; -use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; -use Symfony\Component\Notifier\Bridge\Mercure\MercureTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransport; -use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory; -use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; -use Symfony\Component\Notifier\Bridge\Mobyt\MobytTransportFactory; -use Symfony\Component\Notifier\Bridge\Nexmo\NexmoTransportFactory; -use Symfony\Component\Notifier\Bridge\Octopush\OctopushTransportFactory; -use Symfony\Component\Notifier\Bridge\OneSignal\OneSignalTransportFactory; -use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory; -use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory as SendinblueNotifierTransportFactory; -use Symfony\Component\Notifier\Bridge\Sinch\SinchTransportFactory; -use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; -use Symfony\Component\Notifier\Bridge\Sms77\Sms77TransportFactory; -use Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory; -use Symfony\Component\Notifier\Bridge\SmsBiuras\SmsBiurasTransportFactory; -use Symfony\Component\Notifier\Bridge\Smsc\SmscTransportFactory; -use Symfony\Component\Notifier\Bridge\SpotHit\SpotHitTransportFactory; -use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; -use Symfony\Component\Notifier\Bridge\Telnyx\TelnyxTransportFactory; -use Symfony\Component\Notifier\Bridge\TurboSms\TurboSmsTransport; -use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory; -use Symfony\Component\Notifier\Bridge\Vonage\VonageTransportFactory; -use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory; -use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\Notifier\Recipient\Recipient; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface as NotifierTransportFactoryInterface; -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; -use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\RateLimiterFactory; -use Symfony\Component\RateLimiter\Storage\CacheStorage; -use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; -use Symfony\Component\Routing\Loader\AnnotationFileLoader; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Serializer\Encoder\DecoderInterface; -use Symfony\Component\Serializer\Encoder\EncoderInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\String\LazyString; -use Symfony\Component\String\Slugger\SluggerInterface; -use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory; -use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory; -use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory; -use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand; -use Symfony\Component\Translation\PseudoLocalizationTranslator; -use Symfony\Component\Translation\Translator; -use Symfony\Component\Uid\Factory\UuidFactory; -use Symfony\Component\Uid\UuidV4; -use Symfony\Component\Validator\ConstraintValidatorInterface; -use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; -use Symfony\Component\Validator\ObjectInitializerInterface; -use Symfony\Component\Validator\Validation; -use Symfony\Component\WebLink\HttpHeaderSerializer; -use Symfony\Component\Workflow; -use Symfony\Component\Workflow\WorkflowInterface; -use Symfony\Component\Yaml\Command\LintCommand as BaseYamlLintCommand; -use Symfony\Component\Yaml\Yaml; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\CallbackInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\Service\ResetInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -/** - * Process the configuration and prepare the dependency injection container with - * parameters and services. - */ -class FrameworkExtension extends Extension -{ - private $formConfigEnabled = false; - private $translationConfigEnabled = false; - private $sessionConfigEnabled = false; - private $annotationsConfigEnabled = false; - private $validatorConfigEnabled = false; - private $messengerConfigEnabled = false; - private $mailerConfigEnabled = false; - private $httpClientConfigEnabled = false; - private $notifierConfigEnabled = false; - private $propertyAccessConfigEnabled = false; - private static $lockConfigEnabled = false; - - /** - * Responds to the app.config configuration parameter. - * - * @throws LogicException - */ - public function load(array $configs, ContainerBuilder $container) - { - if (!class_exists(InstalledVersions::class)) { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Configuring Symfony without the Composer Runtime API is deprecated. Consider upgrading to Composer 2.1 or later.'); - } - - $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); - - $loader->load('web.php'); - $loader->load('services.php'); - $loader->load('fragment_renderer.php'); - $loader->load('error_renderer.php'); - - if (ContainerBuilder::willBeAvailable('psr/event-dispatcher', PsrEventDispatcherInterface::class, ['symfony/framework-bundle'], true)) { - $container->setAlias(PsrEventDispatcherInterface::class, 'event_dispatcher'); - } - - $container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class); - - if ($this->hasConsole()) { - $loader->load('console.php'); - - if (!class_exists(BaseXliffLintCommand::class)) { - $container->removeDefinition('console.command.xliff_lint'); - } - if (!class_exists(BaseYamlLintCommand::class)) { - $container->removeDefinition('console.command.yaml_lint'); - } - - if (!class_exists(DebugCommand::class)) { - $container->removeDefinition('console.command.dotenv_debug'); - } - } - - // Load Cache configuration first as it is used by other components - $loader->load('cache.php'); - - $configuration = $this->getConfiguration($configs, $container); - $config = $this->processConfiguration($configuration, $configs); - - $this->annotationsConfigEnabled = $this->isConfigEnabled($container, $config['annotations']); - $this->translationConfigEnabled = $this->isConfigEnabled($container, $config['translator']); - - // A translator must always be registered (as support is included by - // default in the Form and Validator component). If disabled, an identity - // translator will be used and everything will still work as expected. - if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) { - if (!class_exists(Translator::class) && $this->isConfigEnabled($container, $config['translator'])) { - throw new LogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".'); - } - - if (class_exists(Translator::class)) { - $loader->load('identity_translator.php'); - } - } - - $container->getDefinition('locale_listener')->replaceArgument(3, $config['set_locale_from_accept_language']); - $container->getDefinition('response_listener')->replaceArgument(1, $config['set_content_language_from_locale']); - - // If the slugger is used but the String component is not available, we should throw an error - if (!ContainerBuilder::willBeAvailable('symfony/string', SluggerInterface::class, ['symfony/framework-bundle'], true)) { - $container->register('slugger', 'stdClass') - ->addError('You cannot use the "slugger" service since the String component is not installed. Try running "composer require symfony/string".'); - } else { - if (!ContainerBuilder::willBeAvailable('symfony/translation', LocaleAwareInterface::class, ['symfony/framework-bundle'], true)) { - $container->register('slugger', 'stdClass') - ->addError('You cannot use the "slugger" service since the Translation contracts are not installed. Try running "composer require symfony/translation".'); - } - - if (!\extension_loaded('intl') && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - trigger_deprecation('', '', 'Please install the "intl" PHP extension for best performance.'); - } - } - - if (isset($config['secret'])) { - $container->setParameter('kernel.secret', $config['secret']); - } - - $container->setParameter('kernel.http_method_override', $config['http_method_override']); - $container->setParameter('kernel.trusted_hosts', $config['trusted_hosts']); - $container->setParameter('kernel.default_locale', $config['default_locale']); - $container->setParameter('kernel.enabled_locales', $config['enabled_locales']); - $container->setParameter('kernel.error_controller', $config['error_controller']); - - if (($config['trusted_proxies'] ?? false) && ($config['trusted_headers'] ?? false)) { - $container->setParameter('kernel.trusted_proxies', $config['trusted_proxies']); - $container->setParameter('kernel.trusted_headers', $this->resolveTrustedHeaders($config['trusted_headers'])); - } - - if (!$container->hasParameter('debug.file_link_format')) { - $container->setParameter('debug.file_link_format', $config['ide']); - } - - if (!empty($config['test'])) { - $loader->load('test.php'); - - if (!class_exists(AbstractBrowser::class)) { - $container->removeDefinition('test.client'); - } - } - - if ($this->isConfigEnabled($container, $config['request'])) { - $this->registerRequestConfiguration($config['request'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['assets'])) { - if (!class_exists(\Symfony\Component\Asset\Package::class)) { - throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".'); - } - - $this->registerAssetsConfiguration($config['assets'], $container, $loader); - } - - if ($this->httpClientConfigEnabled = $this->isConfigEnabled($container, $config['http_client'])) { - $this->registerHttpClientConfiguration($config['http_client'], $container, $loader, $config['profiler']); - } - - if ($this->mailerConfigEnabled = $this->isConfigEnabled($container, $config['mailer'])) { - $this->registerMailerConfiguration($config['mailer'], $container, $loader); - } - - $propertyInfoEnabled = $this->isConfigEnabled($container, $config['property_info']); - $this->registerHttpCacheConfiguration($config['http_cache'], $container, $config['http_method_override']); - $this->registerEsiConfiguration($config['esi'], $container, $loader); - $this->registerSsiConfiguration($config['ssi'], $container, $loader); - $this->registerFragmentsConfiguration($config['fragments'], $container, $loader); - $this->registerTranslatorConfiguration($config['translator'], $container, $loader, $config['default_locale'], $config['enabled_locales']); - $this->registerWorkflowConfiguration($config['workflows'], $container, $loader); - $this->registerDebugConfiguration($config['php_errors'], $container, $loader); - // @deprecated since Symfony 5.4, in 6.0 change to: - // $this->registerRouterConfiguration($config['router'], $container, $loader, $config['enabled_locales']); - $this->registerRouterConfiguration($config['router'], $container, $loader, $config['translator']['enabled_locales'] ?: $config['enabled_locales']); - $this->registerAnnotationsConfiguration($config['annotations'], $container, $loader); - $this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader); - $this->registerSecretsConfiguration($config['secrets'], $container, $loader); - - $container->getDefinition('exception_listener')->replaceArgument(3, $config['exceptions']); - - if ($this->isConfigEnabled($container, $config['serializer'])) { - if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) { - throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".'); - } - - $this->registerSerializerConfiguration($config['serializer'], $container, $loader); - } - - if ($propertyInfoEnabled) { - $this->registerPropertyInfoConfiguration($container, $loader); - } - - if (self::$lockConfigEnabled = $this->isConfigEnabled($container, $config['lock'])) { - $this->registerLockConfiguration($config['lock'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['rate_limiter'])) { - if (!interface_exists(LimiterInterface::class)) { - throw new LogicException('Rate limiter support cannot be enabled as the RateLimiter component is not installed. Try running "composer require symfony/rate-limiter".'); - } - - $this->registerRateLimiterConfiguration($config['rate_limiter'], $container, $loader); - } - - if ($this->isConfigEnabled($container, $config['web_link'])) { - if (!class_exists(HttpHeaderSerializer::class)) { - throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".'); - } - - $loader->load('web_link.php'); - } - - if ($this->isConfigEnabled($container, $config['uid'])) { - if (!class_exists(UuidFactory::class)) { - throw new LogicException('Uid support cannot be enabled as the Uid component is not installed. Try running "composer require symfony/uid".'); - } - - $this->registerUidConfiguration($config['uid'], $container, $loader); - } - - // register cache before session so both can share the connection services - $this->registerCacheConfiguration($config['cache'], $container); - - if ($this->isConfigEnabled($container, $config['session'])) { - if (!\extension_loaded('session')) { - throw new LogicException('Session support cannot be enabled as the session extension is not installed. See https://php.net/session.installation for instructions.'); - } - - $this->sessionConfigEnabled = true; - $this->registerSessionConfiguration($config['session'], $container, $loader); - if (!empty($config['test'])) { - // test listener will replace the existing session listener - // as we are aliasing to avoid duplicated registered events - $container->setAlias('session_listener', 'test.session.listener'); - } - } elseif (!empty($config['test'])) { - $container->removeDefinition('test.session.listener'); - } - - // csrf depends on session being registered - if (null === $config['csrf_protection']['enabled']) { - $config['csrf_protection']['enabled'] = $this->sessionConfigEnabled && !class_exists(FullStack::class) && ContainerBuilder::willBeAvailable('symfony/security-csrf', CsrfTokenManagerInterface::class, ['symfony/framework-bundle'], true); - } - $this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader); - - // form depends on csrf being registered - if ($this->isConfigEnabled($container, $config['form'])) { - if (!class_exists(Form::class)) { - throw new LogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".'); - } - - $this->formConfigEnabled = true; - $this->registerFormConfiguration($config, $container, $loader); - - if (ContainerBuilder::willBeAvailable('symfony/validator', Validation::class, ['symfony/framework-bundle', 'symfony/form'], true)) { - $config['validation']['enabled'] = true; - } else { - $container->setParameter('validator.translation_domain', 'validators'); - - $container->removeDefinition('form.type_extension.form.validator'); - $container->removeDefinition('form.type_guesser.validator'); - } - } else { - $container->removeDefinition('console.command.form_debug'); - } - - // validation depends on form, annotations being registered - $this->registerValidationConfiguration($config['validation'], $container, $loader, $propertyInfoEnabled); - - // messenger depends on validation being registered - if ($this->messengerConfigEnabled = $this->isConfigEnabled($container, $config['messenger'])) { - $this->registerMessengerConfiguration($config['messenger'], $container, $loader, $config['validation']); - } else { - $container->removeDefinition('console.command.messenger_consume_messages'); - $container->removeDefinition('console.command.messenger_debug'); - $container->removeDefinition('console.command.messenger_stop_workers'); - $container->removeDefinition('console.command.messenger_setup_transports'); - $container->removeDefinition('console.command.messenger_failed_messages_retry'); - $container->removeDefinition('console.command.messenger_failed_messages_show'); - $container->removeDefinition('console.command.messenger_failed_messages_remove'); - $container->removeDefinition('cache.messenger.restart_workers_signal'); - - if ($container->hasDefinition('messenger.transport.amqp.factory') && !class_exists(AmqpTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class)) { - $container->getDefinition('messenger.transport.amqp.factory') - ->setClass(\Symfony\Component\Messenger\Transport\AmqpExt\AmqpTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.amqp.factory'); - } - } - - if ($container->hasDefinition('messenger.transport.redis.factory') && !class_exists(RedisTransportFactory::class)) { - if (class_exists(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class)) { - $container->getDefinition('messenger.transport.redis.factory') - ->setClass(\Symfony\Component\Messenger\Transport\RedisExt\RedisTransportFactory::class) - ->addTag('messenger.transport_factory'); - } else { - $container->removeDefinition('messenger.transport.redis.factory'); - } - } - } - - // notifier depends on messenger, mailer being registered - if ($this->notifierConfigEnabled = $this->isConfigEnabled($container, $config['notifier'])) { - $this->registerNotifierConfiguration($config['notifier'], $container, $loader); - } - - // profiler depends on form, validation, translation, messenger, mailer, http-client, notifier being registered - $this->registerProfilerConfiguration($config['profiler'], $container, $loader); - - $this->addAnnotatedClassesToCompile([ - '**\\Controller\\', - '**\\Entity\\', - - // Added explicitly so that we don't rely on the class map being dumped to make it work - 'Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController', - ]); - - if (ContainerBuilder::willBeAvailable('symfony/mime', MimeTypes::class, ['symfony/framework-bundle'], true)) { - $loader->load('mime_type.php'); - } - - $container->registerForAutoconfiguration(PackageInterface::class) - ->addTag('assets.package'); - $container->registerForAutoconfiguration(Command::class) - ->addTag('console.command'); - $container->registerForAutoconfiguration(ResourceCheckerInterface::class) - ->addTag('config_cache.resource_checker'); - $container->registerForAutoconfiguration(EnvVarLoaderInterface::class) - ->addTag('container.env_var_loader'); - $container->registerForAutoconfiguration(EnvVarProcessorInterface::class) - ->addTag('container.env_var_processor'); - $container->registerForAutoconfiguration(CallbackInterface::class) - ->addTag('container.reversible'); - $container->registerForAutoconfiguration(ServiceLocator::class) - ->addTag('container.service_locator'); - $container->registerForAutoconfiguration(ServiceSubscriberInterface::class) - ->addTag('container.service_subscriber'); - $container->registerForAutoconfiguration(ArgumentValueResolverInterface::class) - ->addTag('controller.argument_value_resolver'); - $container->registerForAutoconfiguration(AbstractController::class) - ->addTag('controller.service_arguments'); - $container->registerForAutoconfiguration(DataCollectorInterface::class) - ->addTag('data_collector'); - $container->registerForAutoconfiguration(FormTypeInterface::class) - ->addTag('form.type'); - $container->registerForAutoconfiguration(FormTypeGuesserInterface::class) - ->addTag('form.type_guesser'); - $container->registerForAutoconfiguration(FormTypeExtensionInterface::class) - ->addTag('form.type_extension'); - $container->registerForAutoconfiguration(CacheClearerInterface::class) - ->addTag('kernel.cache_clearer'); - $container->registerForAutoconfiguration(CacheWarmerInterface::class) - ->addTag('kernel.cache_warmer'); - $container->registerForAutoconfiguration(EventDispatcherInterface::class) - ->addTag('event_dispatcher.dispatcher'); - $container->registerForAutoconfiguration(EventSubscriberInterface::class) - ->addTag('kernel.event_subscriber'); - $container->registerForAutoconfiguration(LocaleAwareInterface::class) - ->addTag('kernel.locale_aware'); - $container->registerForAutoconfiguration(ResetInterface::class) - ->addTag('kernel.reset', ['method' => 'reset']); - - if (!interface_exists(MarshallerInterface::class)) { - $container->registerForAutoconfiguration(ResettableInterface::class) - ->addTag('kernel.reset', ['method' => 'reset']); - } - - $container->registerForAutoconfiguration(PropertyListExtractorInterface::class) - ->addTag('property_info.list_extractor'); - $container->registerForAutoconfiguration(PropertyTypeExtractorInterface::class) - ->addTag('property_info.type_extractor'); - $container->registerForAutoconfiguration(PropertyDescriptionExtractorInterface::class) - ->addTag('property_info.description_extractor'); - $container->registerForAutoconfiguration(PropertyAccessExtractorInterface::class) - ->addTag('property_info.access_extractor'); - $container->registerForAutoconfiguration(PropertyInitializableExtractorInterface::class) - ->addTag('property_info.initializable_extractor'); - $container->registerForAutoconfiguration(EncoderInterface::class) - ->addTag('serializer.encoder'); - $container->registerForAutoconfiguration(DecoderInterface::class) - ->addTag('serializer.encoder'); - $container->registerForAutoconfiguration(NormalizerInterface::class) - ->addTag('serializer.normalizer'); - $container->registerForAutoconfiguration(DenormalizerInterface::class) - ->addTag('serializer.normalizer'); - $container->registerForAutoconfiguration(ConstraintValidatorInterface::class) - ->addTag('validator.constraint_validator'); - $container->registerForAutoconfiguration(ObjectInitializerInterface::class) - ->addTag('validator.initializer'); - $container->registerForAutoconfiguration(MessageHandlerInterface::class) - ->addTag('messenger.message_handler'); - $container->registerForAutoconfiguration(BatchHandlerInterface::class) - ->addTag('messenger.message_handler'); - $container->registerForAutoconfiguration(TransportFactoryInterface::class) - ->addTag('messenger.transport_factory'); - $container->registerForAutoconfiguration(MimeTypeGuesserInterface::class) - ->addTag('mime.mime_type_guesser'); - $container->registerForAutoconfiguration(LoggerAwareInterface::class) - ->addMethodCall('setLogger', [new Reference('logger')]); - - $container->registerAttributeForAutoconfiguration(AsEventListener::class, static function (ChildDefinition $definition, AsEventListener $attribute, \Reflector $reflector) { - $tagAttributes = get_object_vars($attribute); - if ($reflector instanceof \ReflectionMethod) { - if (isset($tagAttributes['method'])) { - throw new LogicException(sprintf('AsEventListener attribute cannot declare a method on "%s::%s()".', $reflector->class, $reflector->name)); - } - $tagAttributes['method'] = $reflector->getName(); - } - $definition->addTag('kernel.event_listener', $tagAttributes); - }); - $container->registerAttributeForAutoconfiguration(AsController::class, static function (ChildDefinition $definition, AsController $attribute): void { - $definition->addTag('controller.service_arguments'); - }); - $container->registerAttributeForAutoconfiguration(AsMessageHandler::class, static function (ChildDefinition $definition, AsMessageHandler $attribute): void { - $tagAttributes = get_object_vars($attribute); - $tagAttributes['from_transport'] = $tagAttributes['fromTransport']; - unset($tagAttributes['fromTransport']); - - $definition->addTag('messenger.message_handler', $tagAttributes); - }); - - if (!$container->getParameter('kernel.debug')) { - // remove tagged iterator argument for resource checkers - $container->getDefinition('config_cache_factory')->setArguments([]); - } - - if (!$config['disallow_search_engine_index'] ?? false) { - $container->removeDefinition('disallow_search_engine_index_response_listener'); - } - - $container->registerForAutoconfiguration(RouteLoaderInterface::class) - ->addTag('routing.route_loader'); - - $container->setParameter('container.behavior_describing_tags', [ - 'container.service_locator', - 'container.service_subscriber', - 'kernel.event_subscriber', - 'kernel.event_listener', - 'kernel.locale_aware', - 'kernel.reset', - ]); - } - - /** - * {@inheritdoc} - */ - public function getConfiguration(array $config, ContainerBuilder $container) - { - return new Configuration($container->getParameter('kernel.debug')); - } - - protected function hasConsole(): bool - { - return class_exists(Application::class); - } - - private function registerFormConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('form.php'); - - $container->getDefinition('form.type_extension.form.validator')->setArgument(1, $config['form']['legacy_error_messages']); - - if (null === $config['form']['csrf_protection']['enabled']) { - $config['form']['csrf_protection']['enabled'] = $config['csrf_protection']['enabled']; - } - - if ($this->isConfigEnabled($container, $config['form']['csrf_protection'])) { - $loader->load('form_csrf.php'); - - $container->setParameter('form.type_extension.csrf.enabled', true); - $container->setParameter('form.type_extension.csrf.field_name', $config['form']['csrf_protection']['field_name']); - } else { - $container->setParameter('form.type_extension.csrf.enabled', false); - } - - if (!ContainerBuilder::willBeAvailable('symfony/translation', Translator::class, ['symfony/framework-bundle', 'symfony/form'], true)) { - $container->removeDefinition('form.type_extension.upload.validator'); - } - if (!method_exists(CachingFactoryDecorator::class, 'reset')) { - $container->getDefinition('form.choice_list_factory.cached') - ->clearTag('kernel.reset') - ; - } - } - - private function registerHttpCacheConfiguration(array $config, ContainerBuilder $container, bool $httpMethodOverride) - { - $options = $config; - unset($options['enabled']); - - if (!$options['private_headers']) { - unset($options['private_headers']); - } - - $container->getDefinition('http_cache') - ->setPublic($config['enabled']) - ->replaceArgument(3, $options); - - if ($httpMethodOverride) { - $container->getDefinition('http_cache') - ->addArgument((new Definition('void')) - ->setFactory([Request::class, 'enableHttpMethodParameterOverride']) - ); - } - } - - private function registerEsiConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.esi'); - - return; - } - - $loader->load('esi.php'); - } - - private function registerSsiConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.ssi'); - - return; - } - - $loader->load('ssi.php'); - } - - private function registerFragmentsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('fragment.renderer.hinclude'); - - return; - } - - $container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']); - - $loader->load('fragment_listener.php'); - $container->setParameter('fragment.path', $config['path']); - } - - private function registerProfilerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - // this is needed for the WebProfiler to work even if the profiler is disabled - $container->setParameter('data_collector.templates', []); - - return; - } - - $loader->load('profiling.php'); - $loader->load('collectors.php'); - $loader->load('cache_debug.php'); - - if ($this->formConfigEnabled) { - $loader->load('form_debug.php'); - } - - if ($this->validatorConfigEnabled) { - $loader->load('validator_debug.php'); - } - - if ($this->translationConfigEnabled) { - $loader->load('translation_debug.php'); - - $container->getDefinition('translator.data_collector')->setDecoratedService('translator'); - } - - if ($this->messengerConfigEnabled) { - $loader->load('messenger_debug.php'); - } - - if ($this->mailerConfigEnabled) { - $loader->load('mailer_debug.php'); - } - - if ($this->httpClientConfigEnabled) { - $loader->load('http_client_debug.php'); - } - - if ($this->notifierConfigEnabled) { - $loader->load('notifier_debug.php'); - } - - $container->setParameter('profiler_listener.only_exceptions', $config['only_exceptions']); - $container->setParameter('profiler_listener.only_main_requests', $config['only_main_requests'] || $config['only_master_requests']); - - // Choose storage class based on the DSN - [$class] = explode(':', $config['dsn'], 2); - if ('file' !== $class) { - throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class)); - } - - $container->setParameter('profiler.storage.dsn', $config['dsn']); - - $container->getDefinition('profiler') - ->addArgument($config['collect']) - ->addTag('kernel.reset', ['method' => 'reset']); - - $container->getDefinition('profiler_listener') - ->addArgument($config['collect_parameter']); - } - - private function registerWorkflowConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$config['enabled']) { - $container->removeDefinition('console.command.workflow_dump'); - - return; - } - - if (!class_exists(Workflow\Workflow::class)) { - throw new LogicException('Workflow support cannot be enabled as the Workflow component is not installed. Try running "composer require symfony/workflow".'); - } - - $loader->load('workflow.php'); - - $registryDefinition = $container->getDefinition('workflow.registry'); - - $workflows = []; - - foreach ($config['workflows'] as $name => $workflow) { - $type = $workflow['type']; - $workflowId = sprintf('%s.%s', $type, $name); - - // Process Metadata (workflow + places (transition is done in the "create transition" block)) - $metadataStoreDefinition = new Definition(Workflow\Metadata\InMemoryMetadataStore::class, [[], [], null]); - if ($workflow['metadata']) { - $metadataStoreDefinition->replaceArgument(0, $workflow['metadata']); - } - $placesMetadata = []; - foreach ($workflow['places'] as $place) { - if ($place['metadata']) { - $placesMetadata[$place['name']] = $place['metadata']; - } - } - if ($placesMetadata) { - $metadataStoreDefinition->replaceArgument(1, $placesMetadata); - } - - // Create transitions - $transitions = []; - $guardsConfiguration = []; - $transitionsMetadataDefinition = new Definition(\SplObjectStorage::class); - // Global transition counter per workflow - $transitionCounter = 0; - foreach ($workflow['transitions'] as $transition) { - if ('workflow' === $type) { - $transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $transition['from'], $transition['to']]); - $transitionDefinition->setPublic(false); - $transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++); - $container->setDefinition($transitionId, $transitionDefinition); - $transitions[] = new Reference($transitionId); - if (isset($transition['guard'])) { - $configuration = new Definition(Workflow\EventListener\GuardExpression::class); - $configuration->addArgument(new Reference($transitionId)); - $configuration->addArgument($transition['guard']); - $configuration->setPublic(false); - $eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']); - $guardsConfiguration[$eventName][] = $configuration; - } - if ($transition['metadata']) { - $transitionsMetadataDefinition->addMethodCall('attach', [ - new Reference($transitionId), - $transition['metadata'], - ]); - } - } elseif ('state_machine' === $type) { - foreach ($transition['from'] as $from) { - foreach ($transition['to'] as $to) { - $transitionDefinition = new Definition(Workflow\Transition::class, [$transition['name'], $from, $to]); - $transitionDefinition->setPublic(false); - $transitionId = sprintf('.%s.transition.%s', $workflowId, $transitionCounter++); - $container->setDefinition($transitionId, $transitionDefinition); - $transitions[] = new Reference($transitionId); - if (isset($transition['guard'])) { - $configuration = new Definition(Workflow\EventListener\GuardExpression::class); - $configuration->addArgument(new Reference($transitionId)); - $configuration->addArgument($transition['guard']); - $configuration->setPublic(false); - $eventName = sprintf('workflow.%s.guard.%s', $name, $transition['name']); - $guardsConfiguration[$eventName][] = $configuration; - } - if ($transition['metadata']) { - $transitionsMetadataDefinition->addMethodCall('attach', [ - new Reference($transitionId), - $transition['metadata'], - ]); - } - } - } - } - } - $metadataStoreDefinition->replaceArgument(2, $transitionsMetadataDefinition); - $container->setDefinition(sprintf('%s.metadata_store', $workflowId), $metadataStoreDefinition); - - // Create places - $places = array_column($workflow['places'], 'name'); - $initialMarking = $workflow['initial_marking'] ?? []; - - // Create a Definition - $definitionDefinition = new Definition(Workflow\Definition::class); - $definitionDefinition->setPublic(false); - $definitionDefinition->addArgument($places); - $definitionDefinition->addArgument($transitions); - $definitionDefinition->addArgument($initialMarking); - $definitionDefinition->addArgument(new Reference(sprintf('%s.metadata_store', $workflowId))); - - $workflows[$workflowId] = $definitionDefinition; - - // Create MarkingStore - if (isset($workflow['marking_store']['type'])) { - $markingStoreDefinition = new ChildDefinition('workflow.marking_store.method'); - $markingStoreDefinition->setArguments([ - 'state_machine' === $type, //single state - $workflow['marking_store']['property'], - ]); - } elseif (isset($workflow['marking_store']['service'])) { - $markingStoreDefinition = new Reference($workflow['marking_store']['service']); - } - - // Create Workflow - $workflowDefinition = new ChildDefinition(sprintf('%s.abstract', $type)); - $workflowDefinition->replaceArgument(0, new Reference(sprintf('%s.definition', $workflowId))); - $workflowDefinition->replaceArgument(1, $markingStoreDefinition ?? null); - $workflowDefinition->replaceArgument(3, $name); - $workflowDefinition->replaceArgument(4, $workflow['events_to_dispatch']); - $workflowDefinition->addTag('container.private', [ - 'package' => 'symfony/framework-bundle', - 'version' => '5.3', - ]); - - // Store to container - $container->setDefinition($workflowId, $workflowDefinition); - $container->setDefinition(sprintf('%s.definition', $workflowId), $definitionDefinition); - $container->registerAliasForArgument($workflowId, WorkflowInterface::class, $name.'.'.$type); - - // Validate Workflow - if ('state_machine' === $workflow['type']) { - $validator = new Workflow\Validator\StateMachineValidator(); - } else { - $validator = new Workflow\Validator\WorkflowValidator(); - } - - $trs = array_map(function (Reference $ref) use ($container): Workflow\Transition { - return $container->get((string) $ref); - }, $transitions); - $realDefinition = new Workflow\Definition($places, $trs, $initialMarking); - $validator->validate($realDefinition, $name); - - // Add workflow to Registry - if ($workflow['supports']) { - foreach ($workflow['supports'] as $supportedClassName) { - $strategyDefinition = new Definition(Workflow\SupportStrategy\InstanceOfSupportStrategy::class, [$supportedClassName]); - $strategyDefinition->setPublic(false); - $registryDefinition->addMethodCall('addWorkflow', [new Reference($workflowId), $strategyDefinition]); - } - } elseif (isset($workflow['support_strategy'])) { - $registryDefinition->addMethodCall('addWorkflow', [new Reference($workflowId), new Reference($workflow['support_strategy'])]); - } - - // Enable the AuditTrail - if ($workflow['audit_trail']['enabled']) { - $listener = new Definition(Workflow\EventListener\AuditTrailListener::class); - $listener->addTag('monolog.logger', ['channel' => 'workflow']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.leave', $name), 'method' => 'onLeave']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.transition', $name), 'method' => 'onTransition']); - $listener->addTag('kernel.event_listener', ['event' => sprintf('workflow.%s.enter', $name), 'method' => 'onEnter']); - $listener->addArgument(new Reference('logger')); - $container->setDefinition(sprintf('.%s.listener.audit_trail', $workflowId), $listener); - } - - // Add Guard Listener - if ($guardsConfiguration) { - if (!class_exists(ExpressionLanguage::class)) { - throw new LogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - - if (!class_exists(Security::class)) { - throw new LogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security-core".'); - } - - $guard = new Definition(Workflow\EventListener\GuardListener::class); - - $guard->setArguments([ - $guardsConfiguration, - new Reference('workflow.security.expression_language'), - new Reference('security.token_storage'), - new Reference('security.authorization_checker'), - new Reference('security.authentication.trust_resolver'), - new Reference('security.role_hierarchy'), - new Reference('validator', ContainerInterface::NULL_ON_INVALID_REFERENCE), - ]); - foreach ($guardsConfiguration as $eventName => $config) { - $guard->addTag('kernel.event_listener', ['event' => $eventName, 'method' => 'onTransition']); - } - - $container->setDefinition(sprintf('.%s.listener.guard', $workflowId), $guard); - $container->setParameter('workflow.has_guard_listeners', true); - } - } - - $commandDumpDefinition = $container->getDefinition('console.command.workflow_dump'); - $commandDumpDefinition->setArgument(0, $workflows); - } - - private function registerDebugConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('debug_prod.php'); - - if (class_exists(Stopwatch::class)) { - $container->register('debug.stopwatch', Stopwatch::class) - ->addArgument(true) - ->addTag('kernel.reset', ['method' => 'reset']); - $container->setAlias(Stopwatch::class, new Alias('debug.stopwatch', false)); - } - - $debug = $container->getParameter('kernel.debug'); - - if ($debug) { - $container->setParameter('debug.container.dump', '%kernel.build_dir%/%kernel.container_class%.xml'); - } - - if ($debug && class_exists(Stopwatch::class)) { - $loader->load('debug.php'); - } - - $definition = $container->findDefinition('debug.debug_handlers_listener'); - - if (false === $config['log']) { - $definition->replaceArgument(1, null); - } elseif (true !== $config['log']) { - $definition->replaceArgument(2, $config['log']); - } - - if (!$config['throw']) { - $container->setParameter('debug.error_handler.throw_at', 0); - } - - if ($debug && class_exists(DebugProcessor::class)) { - $definition = new Definition(DebugProcessor::class); - $definition->setPublic(false); - $definition->addArgument(new Reference('request_stack')); - $container->setDefinition('debug.log_processor', $definition); - } - } - - private function registerRouterConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $enabledLocales = []) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.router_debug'); - $container->removeDefinition('console.command.router_match'); - $container->removeDefinition('messenger.middleware.router_context'); - - return; - } - if (!class_exists(RouterContextMiddleware::class)) { - $container->removeDefinition('messenger.middleware.router_context'); - } - - $loader->load('routing.php'); - - if (null === $config['utf8']) { - trigger_deprecation('symfony/framework-bundle', '5.1', 'Not setting the "framework.router.utf8" configuration option is deprecated, it will default to "true" in version 6.0.'); - } - - if ($config['utf8']) { - $container->getDefinition('routing.loader')->replaceArgument(1, ['utf8' => true]); - } - - if ($enabledLocales) { - $enabledLocales = implode('|', array_map('preg_quote', $enabledLocales)); - $container->getDefinition('routing.loader')->replaceArgument(2, ['_locale' => $enabledLocales]); - } - - if (!ContainerBuilder::willBeAvailable('symfony/expression-language', ExpressionLanguage::class, ['symfony/framework-bundle', 'symfony/routing'], true)) { - $container->removeDefinition('router.expression_language_provider'); - } - - $container->setParameter('router.resource', $config['resource']); - $router = $container->findDefinition('router.default'); - $argument = $router->getArgument(2); - $argument['strict_requirements'] = $config['strict_requirements']; - if (isset($config['type'])) { - $argument['resource_type'] = $config['type']; - } - $router->replaceArgument(2, $argument); - - $container->setParameter('request_listener.http_port', $config['http_port']); - $container->setParameter('request_listener.https_port', $config['https_port']); - - if (null !== $config['default_uri']) { - $container->getDefinition('router.request_context') - ->replaceArgument(0, $config['default_uri']); - } - - if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) { - return; - } - - $container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE), - '%kernel.environment%', - ]); - - $container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('file_locator'), - new Reference('routing.loader.annotation'), - ]); - - $container->register('routing.loader.annotation.file', AnnotationFileLoader::class) - ->setPublic(false) - ->addTag('routing.loader', ['priority' => -10]) - ->setArguments([ - new Reference('file_locator'), - new Reference('routing.loader.annotation'), - ]); - } - - private function registerSessionConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('session.php'); - - // session storage - if (null === $config['storage_factory_id']) { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Not setting the "framework.session.storage_factory_id" configuration option is deprecated, it will default to "session.storage.factory.native" and will replace the "framework.session.storage_id" configuration option in version 6.0.'); - $container->setAlias('session.storage', $config['storage_id']); - $container->setAlias('session.storage.factory', 'session.storage.factory.service'); - } else { - $container->setAlias('session.storage.factory', $config['storage_factory_id']); - - $container->removeAlias(SessionStorageInterface::class); - $container->removeDefinition('session.storage.metadata_bag'); - $container->removeDefinition('session.storage.native'); - $container->removeDefinition('session.storage.php_bridge'); - $container->removeDefinition('session.storage.mock_file'); - $container->removeAlias('session.storage.filesystem'); - } - - $options = ['cache_limiter' => '0']; - foreach (['name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'cookie_samesite', 'use_cookies', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'sid_length', 'sid_bits_per_character'] as $key) { - if (isset($config[$key])) { - $options[$key] = $config[$key]; - } - } - - if ('auto' === ($options['cookie_secure'] ?? null)) { - if (null === $config['storage_factory_id']) { - $locator = $container->getDefinition('session_listener')->getArgument(0); - $locator->setValues($locator->getValues() + [ - 'session_storage' => new Reference('session.storage', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), - 'request_stack' => new Reference('request_stack'), - ]); - } else { - $container->getDefinition('session.storage.factory.native')->replaceArgument(3, true); - $container->getDefinition('session.storage.factory.php_bridge')->replaceArgument(2, true); - } - } - - $container->setParameter('session.storage.options', $options); - - // session handler (the internal callback registered with PHP session management) - if (null === $config['handler_id']) { - // Set the handler class to be null - if ($container->hasDefinition('session.storage.native')) { - $container->getDefinition('session.storage.native')->replaceArgument(1, null); - $container->getDefinition('session.storage.php_bridge')->replaceArgument(0, null); - } else { - $container->getDefinition('session.storage.factory.native')->replaceArgument(1, null); - $container->getDefinition('session.storage.factory.php_bridge')->replaceArgument(0, null); - } - - $container->setAlias('session.handler', 'session.handler.native_file'); - } else { - $container->resolveEnvPlaceholders($config['handler_id'], null, $usedEnvs); - - if ($usedEnvs || preg_match('#^[a-z]++://#', $config['handler_id'])) { - $id = '.cache_connection.'.ContainerBuilder::hash($config['handler_id']); - - $container->getDefinition('session.abstract_handler') - ->replaceArgument(0, $container->hasDefinition($id) ? new Reference($id) : $config['handler_id']); - - $container->setAlias('session.handler', 'session.abstract_handler'); - } else { - $container->setAlias('session.handler', $config['handler_id']); - } - } - - $container->setParameter('session.save_path', $config['save_path']); - - $container->setParameter('session.metadata.update_threshold', $config['metadata_update_threshold']); - } - - private function registerRequestConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if ($config['formats']) { - $loader->load('request.php'); - - $listener = $container->getDefinition('request.add_request_formats_listener'); - $listener->replaceArgument(0, $config['formats']); - } - } - - private function registerAssetsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('assets.php'); - - if ($config['version_strategy']) { - $defaultVersion = new Reference($config['version_strategy']); - } else { - $defaultVersion = $this->createVersion($container, $config['version'], $config['version_format'], $config['json_manifest_path'], '_default', $config['strict_mode']); - } - - $defaultPackage = $this->createPackageDefinition($config['base_path'], $config['base_urls'], $defaultVersion); - $container->setDefinition('assets._default_package', $defaultPackage); - - foreach ($config['packages'] as $name => $package) { - if (null !== $package['version_strategy']) { - $version = new Reference($package['version_strategy']); - } elseif (!\array_key_exists('version', $package) && null === $package['json_manifest_path']) { - // if neither version nor json_manifest_path are specified, use the default - $version = $defaultVersion; - } else { - // let format fallback to main version_format - $format = $package['version_format'] ?: $config['version_format']; - $version = $package['version'] ?? null; - $version = $this->createVersion($container, $version, $format, $package['json_manifest_path'], $name, $package['strict_mode']); - } - - $packageDefinition = $this->createPackageDefinition($package['base_path'], $package['base_urls'], $version) - ->addTag('assets.package', ['package' => $name]); - $container->setDefinition('assets._package_'.$name, $packageDefinition); - $container->registerAliasForArgument('assets._package_'.$name, PackageInterface::class, $name.'.package'); - } - } - - /** - * Returns a definition for an asset package. - */ - private function createPackageDefinition(?string $basePath, array $baseUrls, Reference $version): Definition - { - if ($basePath && $baseUrls) { - throw new \LogicException('An asset package cannot have base URLs and base paths.'); - } - - $package = new ChildDefinition($baseUrls ? 'assets.url_package' : 'assets.path_package'); - $package - ->setPublic(false) - ->replaceArgument(0, $baseUrls ?: $basePath) - ->replaceArgument(1, $version) - ; - - return $package; - } - - private function createVersion(ContainerBuilder $container, ?string $version, ?string $format, ?string $jsonManifestPath, string $name, bool $strictMode): Reference - { - // Configuration prevents $version and $jsonManifestPath from being set - if (null !== $version) { - $def = new ChildDefinition('assets.static_version_strategy'); - $def - ->replaceArgument(0, $version) - ->replaceArgument(1, $format) - ; - $container->setDefinition('assets._version_'.$name, $def); - - return new Reference('assets._version_'.$name); - } - - if (null !== $jsonManifestPath) { - $def = new ChildDefinition('assets.json_manifest_version_strategy'); - $def->replaceArgument(0, $jsonManifestPath); - $def->replaceArgument(2, $strictMode); - $container->setDefinition('assets._version_'.$name, $def); - - return new Reference('assets._version_'.$name); - } - - return new Reference('assets.empty_version_strategy'); - } - - private function registerTranslatorConfiguration(array $config, ContainerBuilder $container, LoaderInterface $loader, string $defaultLocale, array $enabledLocales) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.translation_debug'); - $container->removeDefinition('console.command.translation_extract'); - $container->removeDefinition('console.command.translation_pull'); - $container->removeDefinition('console.command.translation_push'); - - return; - } - - $loader->load('translation.php'); - $loader->load('translation_providers.php'); - - // Use the "real" translator instead of the identity default - $container->setAlias('translator', 'translator.default')->setPublic(true); - $container->setAlias('translator.formatter', new Alias($config['formatter'], false)); - $translator = $container->findDefinition('translator.default'); - $translator->addMethodCall('setFallbackLocales', [$config['fallbacks'] ?: [$defaultLocale]]); - - $defaultOptions = $translator->getArgument(4); - $defaultOptions['cache_dir'] = $config['cache_dir']; - $translator->setArgument(4, $defaultOptions); - - // @deprecated since Symfony 5.4, in 6.0 change to: - // $translator->setArgument(5, $enabledLocales); - $translator->setArgument(5, $config['enabled_locales'] ?: $enabledLocales); - - $container->setParameter('translator.logging', $config['logging']); - $container->setParameter('translator.default_path', $config['default_path']); - - // Discover translation directories - $dirs = []; - $transPaths = []; - $nonExistingDirs = []; - if (ContainerBuilder::willBeAvailable('symfony/validator', Validation::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(Validation::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName()).'/Resources/translations'; - } - if (ContainerBuilder::willBeAvailable('symfony/form', Form::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(Form::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName()).'/Resources/translations'; - } - if (ContainerBuilder::willBeAvailable('symfony/security-core', AuthenticationException::class, ['symfony/framework-bundle', 'symfony/translation'], true)) { - $r = new \ReflectionClass(AuthenticationException::class); - - $dirs[] = $transPaths[] = \dirname($r->getFileName(), 2).'/Resources/translations'; - } - $defaultDir = $container->getParameterBag()->resolveValue($config['default_path']); - foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { - if ($container->fileExists($dir = $bundle['path'].'/Resources/translations') || $container->fileExists($dir = $bundle['path'].'/translations')) { - $dirs[] = $dir; - } else { - $nonExistingDirs[] = $dir; - } - } - - foreach ($config['paths'] as $dir) { - if ($container->fileExists($dir)) { - $dirs[] = $transPaths[] = $dir; - } else { - throw new \UnexpectedValueException(sprintf('"%s" defined in translator.paths does not exist or is not a directory.', $dir)); - } - } - - if ($container->hasDefinition('console.command.translation_debug')) { - $container->getDefinition('console.command.translation_debug')->replaceArgument(5, $transPaths); - } - - if ($container->hasDefinition('console.command.translation_extract')) { - $container->getDefinition('console.command.translation_extract')->replaceArgument(6, $transPaths); - } - - if (null === $defaultDir) { - // allow null - } elseif ($container->fileExists($defaultDir)) { - $dirs[] = $defaultDir; - } else { - $nonExistingDirs[] = $defaultDir; - } - - // Register translation resources - if ($dirs) { - $files = []; - - foreach ($dirs as $dir) { - $finder = Finder::create() - ->followLinks() - ->files() - ->filter(function (\SplFileInfo $file) { - return 2 <= substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename()); - }) - ->in($dir) - ->sortByName() - ; - foreach ($finder as $file) { - $fileNameParts = explode('.', basename($file)); - $locale = $fileNameParts[\count($fileNameParts) - 2]; - if (!isset($files[$locale])) { - $files[$locale] = []; - } - - $files[$locale][] = (string) $file; - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - - $options = array_merge( - $translator->getArgument(4), - [ - 'resource_files' => $files, - 'scanned_directories' => $scannedDirectories = array_merge($dirs, $nonExistingDirs), - 'cache_vary' => [ - 'scanned_directories' => array_map(static function (string $dir) use ($projectDir): string { - return str_starts_with($dir, $projectDir.'/') ? substr($dir, 1 + \strlen($projectDir)) : $dir; - }, $scannedDirectories), - ], - ] - ); - - $translator->replaceArgument(4, $options); - } - - if ($config['pseudo_localization']['enabled']) { - $options = $config['pseudo_localization']; - unset($options['enabled']); - - $container - ->register('translator.pseudo', PseudoLocalizationTranslator::class) - ->setDecoratedService('translator', null, -1) // Lower priority than "translator.data_collector" - ->setArguments([ - new Reference('translator.pseudo.inner'), - $options, - ]); - } - - $classToServices = [ - CrowdinProviderFactory::class => 'translation.provider_factory.crowdin', - LocoProviderFactory::class => 'translation.provider_factory.loco', - LokaliseProviderFactory::class => 'translation.provider_factory.lokalise', - ]; - - $parentPackages = ['symfony/framework-bundle', 'symfony/translation', 'symfony/http-client']; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('translation.provider_factory.')); - - if (!$container->hasDefinition('http_client') || !ContainerBuilder::willBeAvailable(sprintf('symfony/%s-translation-provider', $package), $class, $parentPackages, true)) { - $container->removeDefinition($service); - } - } - - if (!$config['providers']) { - return; - } - - // @deprecated since Symfony 5.4, in 6.0 change to: - // $locales = $enabledLocales; - $locales = $config['enabled_locales'] ?: $enabledLocales; - - foreach ($config['providers'] as $provider) { - if ($provider['locales']) { - $locales += $provider['locales']; - } - } - - $locales = array_unique($locales); - - $container->getDefinition('console.command.translation_pull') - ->replaceArgument(4, array_merge($transPaths, [$config['default_path']])) - ->replaceArgument(5, $locales) - ; - - $container->getDefinition('console.command.translation_push') - ->replaceArgument(2, array_merge($transPaths, [$config['default_path']])) - ->replaceArgument(3, $locales) - ; - - $container->getDefinition('translation.provider_collection_factory') - ->replaceArgument(1, $locales) - ; - - $container->getDefinition('translation.provider_collection')->setArgument(0, $config['providers']); - } - - private function registerValidationConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, bool $propertyInfoEnabled) - { - if (!$this->validatorConfigEnabled = $this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.validator_debug'); - - return; - } - - if (!class_exists(Validation::class)) { - throw new LogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".'); - } - - if (!isset($config['email_validation_mode'])) { - $config['email_validation_mode'] = 'loose'; - } - - $loader->load('validator.php'); - - $validatorBuilder = $container->getDefinition('validator.builder'); - - $container->setParameter('validator.translation_domain', $config['translation_domain']); - - $files = ['xml' => [], 'yml' => []]; - $this->registerValidatorMapping($container, $config, $files); - - if (!empty($files['xml'])) { - $validatorBuilder->addMethodCall('addXmlMappings', [$files['xml']]); - } - - if (!empty($files['yml'])) { - $validatorBuilder->addMethodCall('addYamlMappings', [$files['yml']]); - } - - $definition = $container->findDefinition('validator.email'); - $definition->replaceArgument(0, $config['email_validation_mode']); - - if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) { - if (!$this->annotationsConfigEnabled && \PHP_VERSION_ID < 80000) { - throw new \LogicException('"enable_annotations" on the validator cannot be set as the PHP version is lower than 8 and Doctrine Annotations support is disabled. Consider upgrading PHP.'); - } - - $validatorBuilder->addMethodCall('enableAnnotationMapping', [true]); - if ($this->annotationsConfigEnabled) { - $validatorBuilder->addMethodCall('setDoctrineAnnotationReader', [new Reference('annotation_reader')]); - } - } - - if (\array_key_exists('static_method', $config) && $config['static_method']) { - foreach ($config['static_method'] as $methodName) { - $validatorBuilder->addMethodCall('addMethodMapping', [$methodName]); - } - } - - if (!$container->getParameter('kernel.debug')) { - $validatorBuilder->addMethodCall('setMappingCache', [new Reference('validator.mapping.cache.adapter')]); - } - - $container->setParameter('validator.auto_mapping', $config['auto_mapping']); - if (!$propertyInfoEnabled || !class_exists(PropertyInfoLoader::class)) { - $container->removeDefinition('validator.property_info_loader'); - } - - $container - ->getDefinition('validator.not_compromised_password') - ->setArgument(2, $config['not_compromised_password']['enabled']) - ->setArgument(3, $config['not_compromised_password']['endpoint']) - ; - - if (!class_exists(ExpressionLanguage::class)) { - $container->removeDefinition('validator.expression_language'); - } - } - - private function registerValidatorMapping(ContainerBuilder $container, array $config, array &$files) - { - $fileRecorder = function ($extension, $path) use (&$files) { - $files['yaml' === $extension ? 'yml' : $extension][] = $path; - }; - - if (ContainerBuilder::willBeAvailable('symfony/form', Form::class, ['symfony/framework-bundle', 'symfony/validator'], true)) { - $reflClass = new \ReflectionClass(Form::class); - $fileRecorder('xml', \dirname($reflClass->getFileName()).'/Resources/config/validation.xml'); - } - - foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { - $configDir = is_dir($bundle['path'].'/Resources/config') ? $bundle['path'].'/Resources/config' : $bundle['path'].'/config'; - - if ( - $container->fileExists($file = $configDir.'/validation.yaml', false) || - $container->fileExists($file = $configDir.'/validation.yml', false) - ) { - $fileRecorder('yml', $file); - } - - if ($container->fileExists($file = $configDir.'/validation.xml', false)) { - $fileRecorder('xml', $file); - } - - if ($container->fileExists($dir = $configDir.'/validation', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - if ($container->fileExists($dir = $projectDir.'/config/validator', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - - $this->registerMappingFilesFromConfig($container, $config, $fileRecorder); - } - - private function registerMappingFilesFromDir(string $dir, callable $fileRecorder) - { - foreach (Finder::create()->followLinks()->files()->in($dir)->name('/\.(xml|ya?ml)$/')->sortByName() as $file) { - $fileRecorder($file->getExtension(), $file->getRealPath()); - } - } - - private function registerMappingFilesFromConfig(ContainerBuilder $container, array $config, callable $fileRecorder) - { - foreach ($config['mapping']['paths'] as $path) { - if (is_dir($path)) { - $this->registerMappingFilesFromDir($path, $fileRecorder); - $container->addResource(new DirectoryResource($path, '/^$/')); - } elseif ($container->fileExists($path, false)) { - if (!preg_match('/\.(xml|ya?ml)$/', $path, $matches)) { - throw new \RuntimeException(sprintf('Unsupported mapping type in "%s", supported types are XML & Yaml.', $path)); - } - $fileRecorder($matches[1], $path); - } else { - throw new \RuntimeException(sprintf('Could not open file or directory "%s".', $path)); - } - } - } - - private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, LoaderInterface $loader) - { - if (!$this->annotationsConfigEnabled) { - return; - } - - if (!class_exists(\Doctrine\Common\Annotations\Annotation::class)) { - throw new LogicException('Annotations cannot be enabled as the Doctrine Annotation library is not installed. Try running "composer require doctrine/annotations".'); - } - - $loader->load('annotations.php'); - - if (!method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) { - $container->getDefinition('annotations.dummy_registry') - ->setMethodCalls([['registerLoader', ['class_exists']]]); - } - - if ('none' === $config['cache']) { - $container->removeDefinition('annotations.cached_reader'); - - return; - } - - $cacheService = $config['cache']; - if (\in_array($config['cache'], ['php_array', 'file'])) { - if ('php_array' === $config['cache']) { - $cacheService = 'annotations.cache_adapter'; - - // Enable warmer only if PHP array is used for cache - $definition = $container->findDefinition('annotations.cache_warmer'); - $definition->addTag('kernel.cache_warmer'); - } elseif ('file' === $config['cache']) { - $cacheService = 'annotations.filesystem_cache_adapter'; - $cacheDir = $container->getParameterBag()->resolveValue($config['file_cache_dir']); - - if (!is_dir($cacheDir) && false === @mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { - throw new \RuntimeException(sprintf('Could not create cache directory "%s".', $cacheDir)); - } - - $container - ->getDefinition('annotations.filesystem_cache_adapter') - ->replaceArgument(2, $cacheDir) - ; - } - } else { - trigger_deprecation('symfony/framework-bundle', '5.3', 'Using a custom service for "framework.annotation.cache" is deprecated, only values "none", "php_array" and "file" are valid in version 6.0.'); - } - - $container - ->getDefinition('annotations.cached_reader') - ->setPublic(true) // set to false in AddAnnotationsCachedReaderPass - ->replaceArgument(2, $config['debug']) - // reference the cache provider without using it until AddAnnotationsCachedReaderPass runs - ->addArgument(new ServiceClosureArgument(new Reference($cacheService))) - ->addTag('annotations.cached_reader') - ; - - $container->setAlias('annotation_reader', 'annotations.cached_reader'); - $container->setAlias(Reader::class, new Alias('annotations.cached_reader', false)); - $container->removeDefinition('annotations.psr_cached_reader'); - } - - private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->propertyAccessConfigEnabled = $this->isConfigEnabled($container, $config)) { - return; - } - - $loader->load('property_access.php'); - - $magicMethods = PropertyAccessor::DISALLOW_MAGIC_METHODS; - $magicMethods |= $config['magic_call'] ? PropertyAccessor::MAGIC_CALL : 0; - $magicMethods |= $config['magic_get'] ? PropertyAccessor::MAGIC_GET : 0; - $magicMethods |= $config['magic_set'] ? PropertyAccessor::MAGIC_SET : 0; - - $throw = PropertyAccessor::DO_NOT_THROW; - $throw |= $config['throw_exception_on_invalid_index'] ? PropertyAccessor::THROW_ON_INVALID_INDEX : 0; - $throw |= $config['throw_exception_on_invalid_property_path'] ? PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH : 0; - - $container - ->getDefinition('property_accessor') - ->replaceArgument(0, $magicMethods) - ->replaceArgument(1, $throw) - ->replaceArgument(3, new Reference(PropertyReadInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ->replaceArgument(4, new Reference(PropertyWriteInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ; - } - - private function registerSecretsConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - $container->removeDefinition('console.command.secrets_set'); - $container->removeDefinition('console.command.secrets_list'); - $container->removeDefinition('console.command.secrets_remove'); - $container->removeDefinition('console.command.secrets_generate_key'); - $container->removeDefinition('console.command.secrets_decrypt_to_local'); - $container->removeDefinition('console.command.secrets_encrypt_from_local'); - - return; - } - - $loader->load('secrets.php'); - - $container->getDefinition('secrets.vault')->replaceArgument(0, $config['vault_directory']); - - if ($config['local_dotenv_file']) { - $container->getDefinition('secrets.local_vault')->replaceArgument(0, $config['local_dotenv_file']); - } else { - $container->removeDefinition('secrets.local_vault'); - } - - if ($config['decryption_env_var']) { - if (!preg_match('/^(?:[-.\w]*+:)*+\w++$/', $config['decryption_env_var'])) { - throw new InvalidArgumentException(sprintf('Invalid value "%s" set as "decryption_env_var": only "word" characters are allowed.', $config['decryption_env_var'])); - } - - if (ContainerBuilder::willBeAvailable('symfony/string', LazyString::class, ['symfony/framework-bundle'], true)) { - $container->getDefinition('secrets.decryption_key')->replaceArgument(1, $config['decryption_env_var']); - } else { - $container->getDefinition('secrets.vault')->replaceArgument(1, "%env({$config['decryption_env_var']})%"); - $container->removeDefinition('secrets.decryption_key'); - } - } else { - $container->getDefinition('secrets.vault')->replaceArgument(1, null); - $container->removeDefinition('secrets.decryption_key'); - } - } - - private function registerSecurityCsrfConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!$this->isConfigEnabled($container, $config)) { - return; - } - - if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) { - throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".'); - } - - if (!$this->sessionConfigEnabled) { - throw new \LogicException('CSRF protection needs sessions to be enabled.'); - } - - // Enable services for CSRF protection (even without forms) - $loader->load('security_csrf.php'); - - if (!class_exists(CsrfExtension::class)) { - $container->removeDefinition('twig.extension.security_csrf'); - } - } - - private function registerSerializerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('serializer.php'); - if ($container->getParameter('kernel.debug')) { - $container->removeDefinition('serializer.mapping.cache_class_metadata_factory'); - } - - $chainLoader = $container->getDefinition('serializer.mapping.chain_loader'); - - if (!$this->propertyAccessConfigEnabled) { - $container->removeAlias('serializer.property_accessor'); - $container->removeDefinition('serializer.normalizer.object'); - } - - if (!class_exists(Yaml::class)) { - $container->removeDefinition('serializer.encoder.yaml'); - } - - if (!class_exists(UnwrappingDenormalizer::class) || !$this->propertyAccessConfigEnabled) { - $container->removeDefinition('serializer.denormalizer.unwrapping'); - } - - if (!class_exists(Headers::class)) { - $container->removeDefinition('serializer.normalizer.mime_message'); - } - - $serializerLoaders = []; - if (isset($config['enable_annotations']) && $config['enable_annotations']) { - if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) { - throw new \LogicException('"enable_annotations" on the serializer cannot be set as the PHP version is lower than 8 and Annotations support is disabled. Consider upgrading PHP.'); - } - - $annotationLoader = new Definition( - 'Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', - [new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE)] - ); - $annotationLoader->setPublic(false); - - $serializerLoaders[] = $annotationLoader; - } - - $fileRecorder = function ($extension, $path) use (&$serializerLoaders) { - $definition = new Definition(\in_array($extension, ['yaml', 'yml']) ? 'Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader' : 'Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', [$path]); - $definition->setPublic(false); - $serializerLoaders[] = $definition; - }; - - foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) { - $configDir = is_dir($bundle['path'].'/Resources/config') ? $bundle['path'].'/Resources/config' : $bundle['path'].'/config'; - - if ($container->fileExists($file = $configDir.'/serialization.xml', false)) { - $fileRecorder('xml', $file); - } - - if ( - $container->fileExists($file = $configDir.'/serialization.yaml', false) || - $container->fileExists($file = $configDir.'/serialization.yml', false) - ) { - $fileRecorder('yml', $file); - } - - if ($container->fileExists($dir = $configDir.'/serialization', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - } - - $projectDir = $container->getParameter('kernel.project_dir'); - if ($container->fileExists($dir = $projectDir.'/config/serializer', '/^$/')) { - $this->registerMappingFilesFromDir($dir, $fileRecorder); - } - - $this->registerMappingFilesFromConfig($container, $config, $fileRecorder); - - $chainLoader->replaceArgument(0, $serializerLoaders); - $container->getDefinition('serializer.mapping.cache_warmer')->replaceArgument(0, $serializerLoaders); - - if (isset($config['name_converter']) && $config['name_converter']) { - $container->getDefinition('serializer.name_converter.metadata_aware')->setArgument(1, new Reference($config['name_converter'])); - } - - if (isset($config['circular_reference_handler']) && $config['circular_reference_handler']) { - $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); - $context = ($arguments[6] ?? []) + ['circular_reference_handler' => new Reference($config['circular_reference_handler'])]; - $container->getDefinition('serializer.normalizer.object')->setArgument(5, null); - $container->getDefinition('serializer.normalizer.object')->setArgument(6, $context); - } - - if ($config['max_depth_handler'] ?? false) { - $defaultContext = $container->getDefinition('serializer.normalizer.object')->getArgument(6); - $defaultContext += ['max_depth_handler' => new Reference($config['max_depth_handler'])]; - $container->getDefinition('serializer.normalizer.object')->replaceArgument(6, $defaultContext); - } - - if (isset($config['default_context']) && $config['default_context']) { - $container->setParameter('serializer.default_context', $config['default_context']); - } - } - - private function registerPropertyInfoConfiguration(ContainerBuilder $container, PhpFileLoader $loader) - { - if (!interface_exists(PropertyInfoExtractorInterface::class)) { - throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".'); - } - - $loader->load('property_info.php'); - - if ( - ContainerBuilder::willBeAvailable('phpstan/phpdoc-parser', PhpDocParser::class, ['symfony/framework-bundle', 'symfony/property-info'], true) - && ContainerBuilder::willBeAvailable('phpdocumentor/type-resolver', ContextFactory::class, ['symfony/framework-bundle', 'symfony/property-info'], true) - ) { - $definition = $container->register('property_info.phpstan_extractor', PhpStanExtractor::class); - $definition->addTag('property_info.type_extractor', ['priority' => -1000]); - } - - if (ContainerBuilder::willBeAvailable('phpdocumentor/reflection-docblock', DocBlockFactoryInterface::class, ['symfony/framework-bundle', 'symfony/property-info'], true)) { - $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'); - $definition->addTag('property_info.description_extractor', ['priority' => -1000]); - $definition->addTag('property_info.type_extractor', ['priority' => -1001]); - } - - if ($container->getParameter('kernel.debug')) { - $container->removeDefinition('property_info.cache'); - } - } - - private function registerLockConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('lock.php'); - - foreach ($config['resources'] as $resourceName => $resourceStores) { - if (0 === \count($resourceStores)) { - continue; - } - - // Generate stores - $storeDefinitions = []; - foreach ($resourceStores as $storeDsn) { - $storeDsn = $container->resolveEnvPlaceholders($storeDsn, null, $usedEnvs); - $storeDefinition = new Definition(interface_exists(StoreInterface::class) ? StoreInterface::class : PersistingStoreInterface::class); - $storeDefinition->setFactory([StoreFactory::class, 'createStore']); - $storeDefinition->setArguments([$storeDsn]); - - $container->setDefinition($storeDefinitionId = '.lock.'.$resourceName.'.store.'.$container->hash($storeDsn), $storeDefinition); - - $storeDefinition = new Reference($storeDefinitionId); - - $storeDefinitions[] = $storeDefinition; - } - - // Wrap array of stores with CombinedStore - if (\count($storeDefinitions) > 1) { - $combinedDefinition = new ChildDefinition('lock.store.combined.abstract'); - $combinedDefinition->replaceArgument(0, $storeDefinitions); - $container->setDefinition('lock.'.$resourceName.'.store', $combinedDefinition)->setDeprecated('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "lock.'.$resourceName.'.factory" instead.'); - $container->setDefinition($storeDefinitionId = '.lock.'.$resourceName.'.store.'.$container->hash($resourceStores), $combinedDefinition); - } else { - $container->setAlias('lock.'.$resourceName.'.store', (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.'.$resourceName.'.factory" instead.')); - } - - // Generate factories for each resource - $factoryDefinition = new ChildDefinition('lock.factory.abstract'); - $factoryDefinition->replaceArgument(0, new Reference($storeDefinitionId)); - $container->setDefinition('lock.'.$resourceName.'.factory', $factoryDefinition); - - // Generate services for lock instances - $lockDefinition = new Definition(Lock::class); - $lockDefinition->setPublic(false); - $lockDefinition->setFactory([new Reference('lock.'.$resourceName.'.factory'), 'createLock']); - $lockDefinition->setArguments([$resourceName]); - $container->setDefinition('lock.'.$resourceName, $lockDefinition)->setDeprecated('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "lock.'.$resourceName.'.factory" instead.'); - - // provide alias for default resource - if ('default' === $resourceName) { - $container->setAlias('lock.store', (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.factory" instead.')); - $container->setAlias('lock.factory', new Alias('lock.'.$resourceName.'.factory', false)); - $container->setAlias('lock', (new Alias('lock.'.$resourceName, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "lock.factory" instead.')); - $container->setAlias(PersistingStoreInterface::class, (new Alias($storeDefinitionId, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.'" instead.')); - $container->setAlias(LockFactory::class, new Alias('lock.factory', false)); - $container->setAlias(LockInterface::class, (new Alias('lock.'.$resourceName, false))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.'" instead.')); - } else { - $container->registerAliasForArgument($storeDefinitionId, PersistingStoreInterface::class, $resourceName.'.lock.store')->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.' '.$resourceName.'LockFactory" instead.'); - $container->registerAliasForArgument('lock.'.$resourceName.'.factory', LockFactory::class, $resourceName.'.lock.factory'); - $container->registerAliasForArgument('lock.'.$resourceName, LockInterface::class, $resourceName.'.lock')->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "'.LockFactory::class.' $'.$resourceName.'LockFactory" instead.'); - } - } - } - - private function registerMessengerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $validationConfig) - { - if (!interface_exists(MessageBusInterface::class)) { - throw new LogicException('Messenger support cannot be enabled as the Messenger component is not installed. Try running "composer require symfony/messenger".'); - } - - $loader->load('messenger.php'); - - if (!interface_exists(DenormalizerInterface::class)) { - $container->removeDefinition('serializer.normalizer.flatten_exception'); - } - - if (ContainerBuilder::willBeAvailable('symfony/amqp-messenger', AmqpTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.amqp.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/redis-messenger', RedisTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.redis.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/amazon-sqs-messenger', AmazonSqsTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.sqs.factory')->addTag('messenger.transport_factory'); - } - - if (ContainerBuilder::willBeAvailable('symfony/beanstalkd-messenger', BeanstalkdTransportFactory::class, ['symfony/framework-bundle', 'symfony/messenger'], true)) { - $container->getDefinition('messenger.transport.beanstalkd.factory')->addTag('messenger.transport_factory'); - } - - if (null === $config['default_bus'] && 1 === \count($config['buses'])) { - $config['default_bus'] = key($config['buses']); - } - - $defaultMiddleware = [ - 'before' => [ - ['id' => 'add_bus_name_stamp_middleware'], - ['id' => 'reject_redelivered_message_middleware'], - ['id' => 'dispatch_after_current_bus'], - ['id' => 'failed_message_processing_middleware'], - ], - 'after' => [ - ['id' => 'send_message'], - ['id' => 'handle_message'], - ], - ]; - foreach ($config['buses'] as $busId => $bus) { - $middleware = $bus['middleware']; - - if ($bus['default_middleware']) { - if ('allow_no_handlers' === $bus['default_middleware']) { - $defaultMiddleware['after'][1]['arguments'] = [true]; - } else { - unset($defaultMiddleware['after'][1]['arguments']); - } - - // argument to add_bus_name_stamp_middleware - $defaultMiddleware['before'][0]['arguments'] = [$busId]; - - $middleware = array_merge($defaultMiddleware['before'], $middleware, $defaultMiddleware['after']); - } - - foreach ($middleware as $middlewareItem) { - if (!$validationConfig['enabled'] && \in_array($middlewareItem['id'], ['validation', 'messenger.middleware.validation'], true)) { - throw new LogicException('The Validation middleware is only available when the Validator component is installed and enabled. Try running "composer require symfony/validator".'); - } - } - - if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class)) { - array_unshift($middleware, ['id' => 'traceable', 'arguments' => [$busId]]); - } - - $container->setParameter($busId.'.middleware', $middleware); - $container->register($busId, MessageBus::class)->addArgument([])->addTag('messenger.bus'); - - if ($busId === $config['default_bus']) { - $container->setAlias('messenger.default_bus', $busId)->setPublic(true); - $container->setAlias(MessageBusInterface::class, $busId); - } else { - $container->registerAliasForArgument($busId, MessageBusInterface::class); - } - } - - if (empty($config['transports'])) { - $container->removeDefinition('messenger.transport.symfony_serializer'); - $container->removeDefinition('messenger.transport.amqp.factory'); - $container->removeDefinition('messenger.transport.redis.factory'); - $container->removeDefinition('messenger.transport.sqs.factory'); - $container->removeDefinition('messenger.transport.beanstalkd.factory'); - $container->removeAlias(SerializerInterface::class); - } else { - $container->getDefinition('messenger.transport.symfony_serializer') - ->replaceArgument(1, $config['serializer']['symfony_serializer']['format']) - ->replaceArgument(2, $config['serializer']['symfony_serializer']['context']); - $container->setAlias('messenger.default_serializer', $config['serializer']['default_serializer']); - } - - $failureTransports = []; - if ($config['failure_transport']) { - if (!isset($config['transports'][$config['failure_transport']])) { - throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $config['failure_transport'])); - } - - $container->setAlias('messenger.failure_transports.default', 'messenger.transport.'.$config['failure_transport']); - $failureTransports[] = $config['failure_transport']; - } - - $failureTransportsByName = []; - foreach ($config['transports'] as $name => $transport) { - if ($transport['failure_transport']) { - $failureTransports[] = $transport['failure_transport']; - $failureTransportsByName[$name] = $transport['failure_transport']; - } elseif ($config['failure_transport']) { - $failureTransportsByName[$name] = $config['failure_transport']; - } - } - - $senderAliases = []; - $transportRetryReferences = []; - foreach ($config['transports'] as $name => $transport) { - $serializerId = $transport['serializer'] ?? 'messenger.default_serializer'; - $transportDefinition = (new Definition(TransportInterface::class)) - ->setFactory([new Reference('messenger.transport_factory'), 'createTransport']) - ->setArguments([$transport['dsn'], $transport['options'] + ['transport_name' => $name], new Reference($serializerId)]) - ->addTag('messenger.receiver', [ - 'alias' => $name, - 'is_failure_transport' => \in_array($name, $failureTransports), - ] - ) - ; - $container->setDefinition($transportId = 'messenger.transport.'.$name, $transportDefinition); - $senderAliases[$name] = $transportId; - - if (null !== $transport['retry_strategy']['service']) { - $transportRetryReferences[$name] = new Reference($transport['retry_strategy']['service']); - } else { - $retryServiceId = sprintf('messenger.retry.multiplier_retry_strategy.%s', $name); - $retryDefinition = new ChildDefinition('messenger.retry.abstract_multiplier_retry_strategy'); - $retryDefinition - ->replaceArgument(0, $transport['retry_strategy']['max_retries']) - ->replaceArgument(1, $transport['retry_strategy']['delay']) - ->replaceArgument(2, $transport['retry_strategy']['multiplier']) - ->replaceArgument(3, $transport['retry_strategy']['max_delay']); - $container->setDefinition($retryServiceId, $retryDefinition); - - $transportRetryReferences[$name] = new Reference($retryServiceId); - } - } - - $senderReferences = []; - // alias => service_id - foreach ($senderAliases as $alias => $serviceId) { - $senderReferences[$alias] = new Reference($serviceId); - } - // service_id => service_id - foreach ($senderAliases as $serviceId) { - $senderReferences[$serviceId] = new Reference($serviceId); - } - - foreach ($config['transports'] as $name => $transport) { - if ($transport['failure_transport']) { - if (!isset($senderReferences[$transport['failure_transport']])) { - throw new LogicException(sprintf('Invalid Messenger configuration: the failure transport "%s" is not a valid transport or service id.', $transport['failure_transport'])); - } - } - } - - $failureTransportReferencesByTransportName = array_map(function ($failureTransportName) use ($senderReferences) { - return $senderReferences[$failureTransportName]; - }, $failureTransportsByName); - - $messageToSendersMapping = []; - foreach ($config['routing'] as $message => $messageConfiguration) { - if ('*' !== $message && !class_exists($message) && !interface_exists($message, false)) { - throw new LogicException(sprintf('Invalid Messenger routing configuration: class or interface "%s" not found.', $message)); - } - - // make sure senderAliases contains all senders - foreach ($messageConfiguration['senders'] as $sender) { - if (!isset($senderReferences[$sender])) { - throw new LogicException(sprintf('Invalid Messenger routing configuration: the "%s" class is being routed to a sender called "%s". This is not a valid transport or service id.', $message, $sender)); - } - } - - $messageToSendersMapping[$message] = $messageConfiguration['senders']; - } - - $sendersServiceLocator = ServiceLocatorTagPass::register($container, $senderReferences); - - $container->getDefinition('messenger.senders_locator') - ->replaceArgument(0, $messageToSendersMapping) - ->replaceArgument(1, $sendersServiceLocator) - ; - - $container->getDefinition('messenger.retry.send_failed_message_for_retry_listener') - ->replaceArgument(0, $sendersServiceLocator) - ; - - $container->getDefinition('messenger.retry_strategy_locator') - ->replaceArgument(0, $transportRetryReferences); - - if (\count($failureTransports) > 0) { - $container->getDefinition('console.command.messenger_failed_messages_retry') - ->replaceArgument(0, $config['failure_transport']); - $container->getDefinition('console.command.messenger_failed_messages_show') - ->replaceArgument(0, $config['failure_transport']); - $container->getDefinition('console.command.messenger_failed_messages_remove') - ->replaceArgument(0, $config['failure_transport']); - - $failureTransportsByTransportNameServiceLocator = ServiceLocatorTagPass::register($container, $failureTransportReferencesByTransportName); - $container->getDefinition('messenger.failure.send_failed_message_to_failure_transport_listener') - ->replaceArgument(0, $failureTransportsByTransportNameServiceLocator); - } else { - $container->removeDefinition('messenger.failure.send_failed_message_to_failure_transport_listener'); - $container->removeDefinition('console.command.messenger_failed_messages_retry'); - $container->removeDefinition('console.command.messenger_failed_messages_show'); - $container->removeDefinition('console.command.messenger_failed_messages_remove'); - } - - if (false === $config['reset_on_message']) { - throw new LogicException('The "framework.messenger.reset_on_message" configuration option can be set to "true" only. To prevent services resetting after each message you can set the "--no-reset" option in "messenger:consume" command.'); - } - - if (!$container->hasDefinition('console.command.messenger_consume_messages')) { - $container->removeDefinition('messenger.listener.reset_services'); - } elseif (null === $config['reset_on_message']) { - trigger_deprecation('symfony/framework-bundle', '5.4', 'Not setting the "framework.messenger.reset_on_message" configuration option is deprecated, it will default to "true" in version 6.0.'); - - $container->getDefinition('console.command.messenger_consume_messages')->replaceArgument(5, null); - $container->removeDefinition('messenger.listener.reset_services'); - } - } - - private function registerCacheConfiguration(array $config, ContainerBuilder $container) - { - if (!class_exists(DefaultMarshaller::class)) { - $container->removeDefinition('cache.default_marshaller'); - } - - if (!class_exists(DoctrineAdapter::class)) { - $container->removeDefinition('cache.adapter.doctrine'); - } - - if (!class_exists(DoctrineDbalAdapter::class)) { - $container->removeDefinition('cache.adapter.doctrine_dbal'); - } - - $version = new Parameter('container.build_id'); - $container->getDefinition('cache.adapter.apcu')->replaceArgument(2, $version); - $container->getDefinition('cache.adapter.system')->replaceArgument(2, $version); - $container->getDefinition('cache.adapter.filesystem')->replaceArgument(2, $config['directory']); - - if (isset($config['prefix_seed'])) { - $container->setParameter('cache.prefix.seed', $config['prefix_seed']); - } - if ($container->hasParameter('cache.prefix.seed')) { - // Inline any env vars referenced in the parameter - $container->setParameter('cache.prefix.seed', $container->resolveEnvPlaceholders($container->getParameter('cache.prefix.seed'), true)); - } - foreach (['doctrine', 'psr6', 'redis', 'memcached', 'doctrine_dbal', 'pdo'] as $name) { - if (isset($config[$name = 'default_'.$name.'_provider'])) { - $container->setAlias('cache.'.$name, new Alias(CachePoolPass::getServiceProvider($container, $config[$name]), false)); - } - } - foreach (['app', 'system'] as $name) { - $config['pools']['cache.'.$name] = [ - 'adapters' => [$config[$name]], - 'public' => true, - 'tags' => false, - ]; - } - foreach ($config['pools'] as $name => $pool) { - $pool['adapters'] = $pool['adapters'] ?: ['cache.app']; - - $isRedisTagAware = ['cache.adapter.redis_tag_aware'] === $pool['adapters']; - foreach ($pool['adapters'] as $provider => $adapter) { - if (($config['pools'][$adapter]['adapters'] ?? null) === ['cache.adapter.redis_tag_aware']) { - $isRedisTagAware = true; - } elseif ($config['pools'][$adapter]['tags'] ?? false) { - $pool['adapters'][$provider] = $adapter = '.'.$adapter.'.inner'; - } - } - - if (1 === \count($pool['adapters'])) { - if (!isset($pool['provider']) && !\is_int($provider)) { - $pool['provider'] = $provider; - } - $definition = new ChildDefinition($adapter); - } else { - $definition = new Definition(ChainAdapter::class, [$pool['adapters'], 0]); - $pool['reset'] = 'reset'; - } - - if ($isRedisTagAware && 'cache.app' === $name) { - $container->setAlias('cache.app.taggable', $name); - } elseif ($isRedisTagAware) { - $tagAwareId = $name; - $container->setAlias('.'.$name.'.inner', $name); - } elseif ($pool['tags']) { - if (true !== $pool['tags'] && ($config['pools'][$pool['tags']]['tags'] ?? false)) { - $pool['tags'] = '.'.$pool['tags'].'.inner'; - } - $container->register($name, TagAwareAdapter::class) - ->addArgument(new Reference('.'.$name.'.inner')) - ->addArgument(true !== $pool['tags'] ? new Reference($pool['tags']) : null) - ->setPublic($pool['public']) - ; - - if (method_exists(TagAwareAdapter::class, 'setLogger')) { - $container - ->getDefinition($name) - ->addMethodCall('setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) - ->addTag('monolog.logger', ['channel' => 'cache']); - } - - $pool['name'] = $tagAwareId = $name; - $pool['public'] = false; - $name = '.'.$name.'.inner'; - } elseif (!\in_array($name, ['cache.app', 'cache.system'], true)) { - $tagAwareId = '.'.$name.'.taggable'; - $container->register($tagAwareId, TagAwareAdapter::class) - ->addArgument(new Reference($name)) - ; - } - - if (!\in_array($name, ['cache.app', 'cache.system'], true)) { - $container->registerAliasForArgument($tagAwareId, TagAwareCacheInterface::class, $pool['name'] ?? $name); - $container->registerAliasForArgument($name, CacheInterface::class, $pool['name'] ?? $name); - $container->registerAliasForArgument($name, CacheItemPoolInterface::class, $pool['name'] ?? $name); - } - - $definition->setPublic($pool['public']); - unset($pool['adapters'], $pool['public'], $pool['tags']); - - $definition->addTag('cache.pool', $pool); - $container->setDefinition($name, $definition); - } - - if (method_exists(PropertyAccessor::class, 'createCache')) { - $propertyAccessDefinition = $container->register('cache.property_access', AdapterInterface::class); - $propertyAccessDefinition->setPublic(false); - - if (!$container->getParameter('kernel.debug')) { - $propertyAccessDefinition->setFactory([PropertyAccessor::class, 'createCache']); - $propertyAccessDefinition->setArguments(['', 0, $version, new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]); - $propertyAccessDefinition->addTag('cache.pool', ['clearer' => 'cache.system_clearer']); - $propertyAccessDefinition->addTag('monolog.logger', ['channel' => 'cache']); - } else { - $propertyAccessDefinition->setClass(ArrayAdapter::class); - $propertyAccessDefinition->setArguments([0, false]); - } - } - } - - private function registerHttpClientConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, array $profilerConfig) - { - $loader->load('http_client.php'); - - $options = $config['default_options'] ?? []; - $retryOptions = $options['retry_failed'] ?? ['enabled' => false]; - unset($options['retry_failed']); - $container->getDefinition('http_client')->setArguments([$options, $config['max_host_connections'] ?? 6]); - - if (!$hasPsr18 = ContainerBuilder::willBeAvailable('psr/http-client', ClientInterface::class, ['symfony/framework-bundle', 'symfony/http-client'], true)) { - $container->removeDefinition('psr18.http_client'); - $container->removeAlias(ClientInterface::class); - } - - if (!ContainerBuilder::willBeAvailable('php-http/httplug', HttpClient::class, ['symfony/framework-bundle', 'symfony/http-client'], true)) { - $container->removeDefinition(HttpClient::class); - } - - if ($this->isConfigEnabled($container, $retryOptions)) { - $this->registerRetryableHttpClient($retryOptions, 'http_client', $container); - } - - $httpClientId = ($retryOptions['enabled'] ?? false) ? 'http_client.retryable.inner' : ($this->isConfigEnabled($container, $profilerConfig) ? '.debug.http_client.inner' : 'http_client'); - foreach ($config['scoped_clients'] as $name => $scopeConfig) { - if ('http_client' === $name) { - throw new InvalidArgumentException(sprintf('Invalid scope name: "%s" is reserved.', $name)); - } - - $scope = $scopeConfig['scope'] ?? null; - unset($scopeConfig['scope']); - $retryOptions = $scopeConfig['retry_failed'] ?? ['enabled' => false]; - unset($scopeConfig['retry_failed']); - - if (null === $scope) { - $baseUri = $scopeConfig['base_uri']; - unset($scopeConfig['base_uri']); - - $container->register($name, ScopingHttpClient::class) - ->setFactory([ScopingHttpClient::class, 'forBaseUri']) - ->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig]) - ->addTag('http_client.client') - ; - } else { - $container->register($name, ScopingHttpClient::class) - ->setArguments([new Reference($httpClientId), [$scope => $scopeConfig], $scope]) - ->addTag('http_client.client') - ; - } - - if ($this->isConfigEnabled($container, $retryOptions)) { - $this->registerRetryableHttpClient($retryOptions, $name, $container); - } - - $container->registerAliasForArgument($name, HttpClientInterface::class); - - if ($hasPsr18) { - $container->setDefinition('psr18.'.$name, new ChildDefinition('psr18.http_client')) - ->replaceArgument(0, new Reference($name)); - - $container->registerAliasForArgument('psr18.'.$name, ClientInterface::class, $name); - } - } - - if ($responseFactoryId = $config['mock_response_factory'] ?? null) { - $container->register($httpClientId.'.mock_client', MockHttpClient::class) - ->setDecoratedService($httpClientId, null, -10) // lower priority than TraceableHttpClient - ->setArguments([new Reference($responseFactoryId)]); - } - } - - private function registerRetryableHttpClient(array $options, string $name, ContainerBuilder $container) - { - if (!class_exists(RetryableHttpClient::class)) { - throw new LogicException('Support for retrying failed requests requires symfony/http-client 5.2 or higher, try upgrading.'); - } - - if (null !== $options['retry_strategy']) { - $retryStrategy = new Reference($options['retry_strategy']); - } else { - $retryStrategy = new ChildDefinition('http_client.abstract_retry_strategy'); - $codes = []; - foreach ($options['http_codes'] as $code => $codeOptions) { - if ($codeOptions['methods']) { - $codes[$code] = $codeOptions['methods']; - } else { - $codes[] = $code; - } - } - - $retryStrategy - ->replaceArgument(0, $codes ?: GenericRetryStrategy::DEFAULT_RETRY_STATUS_CODES) - ->replaceArgument(1, $options['delay']) - ->replaceArgument(2, $options['multiplier']) - ->replaceArgument(3, $options['max_delay']) - ->replaceArgument(4, $options['jitter']); - $container->setDefinition($name.'.retry_strategy', $retryStrategy); - - $retryStrategy = new Reference($name.'.retry_strategy'); - } - - $container - ->register($name.'.retryable', RetryableHttpClient::class) - ->setDecoratedService($name, null, 10) // higher priority than TraceableHttpClient - ->setArguments([new Reference($name.'.retryable.inner'), $retryStrategy, $options['max_retries'], new Reference('logger')]) - ->addTag('monolog.logger', ['channel' => 'http_client']); - } - - private function registerMailerConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!class_exists(Mailer::class)) { - throw new LogicException('Mailer support cannot be enabled as the component is not installed. Try running "composer require symfony/mailer".'); - } - - $loader->load('mailer.php'); - $loader->load('mailer_transports.php'); - if (!\count($config['transports']) && null === $config['dsn']) { - $config['dsn'] = 'smtp://null'; - } - $transports = $config['dsn'] ? ['main' => $config['dsn']] : $config['transports']; - $container->getDefinition('mailer.transports')->setArgument(0, $transports); - $container->getDefinition('mailer.default_transport')->setArgument(0, current($transports)); - - $container->removeDefinition('mailer.logger_message_listener'); - $container->setAlias('mailer.logger_message_listener', (new Alias('mailer.message_logger_listener'))->setDeprecated('symfony/framework-bundle', '5.2', 'The "%alias_id%" alias is deprecated, use "mailer.message_logger_listener" instead.')); - - $mailer = $container->getDefinition('mailer.mailer'); - if (false === $messageBus = $config['message_bus']) { - $mailer->replaceArgument(1, null); - } else { - $mailer->replaceArgument(1, $messageBus ? new Reference($messageBus) : new Reference('messenger.default_bus', ContainerInterface::NULL_ON_INVALID_REFERENCE)); - } - - $classToServices = [ - GmailTransportFactory::class => 'mailer.transport_factory.gmail', - MailgunTransportFactory::class => 'mailer.transport_factory.mailgun', - MailjetTransportFactory::class => 'mailer.transport_factory.mailjet', - MandrillTransportFactory::class => 'mailer.transport_factory.mailchimp', - PostmarkTransportFactory::class => 'mailer.transport_factory.postmark', - SendgridTransportFactory::class => 'mailer.transport_factory.sendgrid', - SendinblueTransportFactory::class => 'mailer.transport_factory.sendinblue', - SesTransportFactory::class => 'mailer.transport_factory.amazon', - OhMySmtpTransportFactory::class => 'mailer.transport_factory.ohmysmtp', - ]; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('mailer.transport_factory.')); - - if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'], true)) { - $container->removeDefinition($service); - } - } - - $envelopeListener = $container->getDefinition('mailer.envelope_listener'); - $envelopeListener->setArgument(0, $config['envelope']['sender'] ?? null); - $envelopeListener->setArgument(1, $config['envelope']['recipients'] ?? null); - - if ($config['headers']) { - $headers = new Definition(Headers::class); - foreach ($config['headers'] as $name => $data) { - $value = $data['value']; - if (\in_array(strtolower($name), ['from', 'to', 'cc', 'bcc', 'reply-to'])) { - $value = (array) $value; - } - $headers->addMethodCall('addHeader', [$name, $value]); - } - $messageListener = $container->getDefinition('mailer.message_listener'); - $messageListener->setArgument(0, $headers); - } else { - $container->removeDefinition('mailer.message_listener'); - } - } - - private function registerNotifierConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - if (!class_exists(Notifier::class)) { - throw new LogicException('Notifier support cannot be enabled as the component is not installed. Try running "composer require symfony/notifier".'); - } - - $loader->load('notifier.php'); - $loader->load('notifier_transports.php'); - - if ($config['chatter_transports']) { - $container->getDefinition('chatter.transports')->setArgument(0, $config['chatter_transports']); - } else { - $container->removeDefinition('chatter'); - } - if ($config['texter_transports']) { - $container->getDefinition('texter.transports')->setArgument(0, $config['texter_transports']); - } else { - $container->removeDefinition('texter'); - } - - if ($this->mailerConfigEnabled) { - $sender = $container->getDefinition('mailer.envelope_listener')->getArgument(0); - $container->getDefinition('notifier.channel.email')->setArgument(2, $sender); - } else { - $container->removeDefinition('notifier.channel.email'); - } - - if ($this->messengerConfigEnabled) { - if ($config['notification_on_failed_messages']) { - $container->getDefinition('notifier.failed_message_listener')->addTag('kernel.event_subscriber'); - } - - // as we have a bus, the channels don't need the transports - $container->getDefinition('notifier.channel.chat')->setArgument(0, null); - if ($container->hasDefinition('notifier.channel.email')) { - $container->getDefinition('notifier.channel.email')->setArgument(0, null); - } - $container->getDefinition('notifier.channel.sms')->setArgument(0, null); - $container->getDefinition('notifier.channel.push')->setArgument(0, null); - } - - $container->getDefinition('notifier.channel_policy')->setArgument(0, $config['channel_policy']); - - $container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class) - ->addTag('chatter.transport_factory'); - - $container->registerForAutoconfiguration(NotifierTransportFactoryInterface::class) - ->addTag('texter.transport_factory'); - - $classToServices = [ - AllMySmsTransportFactory::class => 'notifier.transport_factory.all-my-sms', - AmazonSnsTransportFactory::class => 'notifier.transport_factory.amazon-sns', - ClickatellTransportFactory::class => 'notifier.transport_factory.clickatell', - DiscordTransportFactory::class => 'notifier.transport_factory.discord', - EsendexTransportFactory::class => 'notifier.transport_factory.esendex', - ExpoTransportFactory::class => 'notifier.transport_factory.expo', - FakeChatTransportFactory::class => 'notifier.transport_factory.fake-chat', - FakeSmsTransportFactory::class => 'notifier.transport_factory.fake-sms', - FirebaseTransportFactory::class => 'notifier.transport_factory.firebase', - FreeMobileTransportFactory::class => 'notifier.transport_factory.free-mobile', - GatewayApiTransportFactory::class => 'notifier.transport_factory.gateway-api', - GitterTransportFactory::class => 'notifier.transport_factory.gitter', - GoogleChatTransportFactory::class => 'notifier.transport_factory.google-chat', - InfobipTransportFactory::class => 'notifier.transport_factory.infobip', - IqsmsTransportFactory::class => 'notifier.transport_factory.iqsms', - LightSmsTransportFactory::class => 'notifier.transport_factory.light-sms', - LinkedInTransportFactory::class => 'notifier.transport_factory.linked-in', - MailjetNotifierTransportFactory::class => 'notifier.transport_factory.mailjet', - MattermostTransportFactory::class => 'notifier.transport_factory.mattermost', - MercureTransportFactory::class => 'notifier.transport_factory.mercure', - MessageBirdTransport::class => 'notifier.transport_factory.message-bird', - MessageMediaTransportFactory::class => 'notifier.transport_factory.message-media', - MicrosoftTeamsTransportFactory::class => 'notifier.transport_factory.microsoft-teams', - MobytTransportFactory::class => 'notifier.transport_factory.mobyt', - NexmoTransportFactory::class => 'notifier.transport_factory.nexmo', - OctopushTransportFactory::class => 'notifier.transport_factory.octopush', - OneSignalTransportFactory::class => 'notifier.transport_factory.one-signal', - OvhCloudTransportFactory::class => 'notifier.transport_factory.ovh-cloud', - RocketChatTransportFactory::class => 'notifier.transport_factory.rocket-chat', - SendinblueNotifierTransportFactory::class => 'notifier.transport_factory.sendinblue', - SinchTransportFactory::class => 'notifier.transport_factory.sinch', - SlackTransportFactory::class => 'notifier.transport_factory.slack', - Sms77TransportFactory::class => 'notifier.transport_factory.sms77', - SmsapiTransportFactory::class => 'notifier.transport_factory.smsapi', - SmsBiurasTransportFactory::class => 'notifier.transport_factory.sms-biuras', - SmscTransportFactory::class => 'notifier.transport_factory.smsc', - SpotHitTransportFactory::class => 'notifier.transport_factory.spot-hit', - TelegramTransportFactory::class => 'notifier.transport_factory.telegram', - TelnyxTransportFactory::class => 'notifier.transport_factory.telnyx', - TurboSmsTransport::class => 'notifier.transport_factory.turbo-sms', - TwilioTransportFactory::class => 'notifier.transport_factory.twilio', - VonageTransportFactory::class => 'notifier.transport_factory.vonage', - YunpianTransportFactory::class => 'notifier.transport_factory.yunpian', - ZulipTransportFactory::class => 'notifier.transport_factory.zulip', - ]; - - $parentPackages = ['symfony/framework-bundle', 'symfony/notifier']; - - foreach ($classToServices as $class => $service) { - $package = substr($service, \strlen('notifier.transport_factory.')); - - if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, $parentPackages, true)) { - $container->removeDefinition($service); - $container->removeAlias(str_replace('-', '', $service)); // @deprecated to be removed in 6.0 - } - } - - if (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages, true) && ContainerBuilder::willBeAvailable('symfony/mercure-bundle', MercureBundle::class, $parentPackages, true)) { - $container->getDefinition($classToServices[MercureTransportFactory::class]) - ->replaceArgument('$registry', new Reference(HubRegistry::class)); - } elseif (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages, true)) { - $container->removeDefinition($classToServices[MercureTransportFactory::class]); - } - - if (ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeChatTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'], true)) { - $container->getDefinition($classToServices[FakeChatTransportFactory::class]) - ->replaceArgument('$mailer', new Reference('mailer')) - ->replaceArgument('$logger', new Reference('logger')); - } - - if (ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'], true)) { - $container->getDefinition($classToServices[FakeSmsTransportFactory::class]) - ->replaceArgument('$mailer', new Reference('mailer')) - ->replaceArgument('$logger', new Reference('logger')); - } - - if (isset($config['admin_recipients'])) { - $notifier = $container->getDefinition('notifier'); - foreach ($config['admin_recipients'] as $i => $recipient) { - $id = 'notifier.admin_recipient.'.$i; - $container->setDefinition($id, new Definition(Recipient::class, [$recipient['email'], $recipient['phone']])); - $notifier->addMethodCall('addAdminRecipient', [new Reference($id)]); - } - } - } - - private function registerRateLimiterConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('rate_limiter.php'); - - foreach ($config['limiters'] as $name => $limiterConfig) { - self::registerRateLimiter($container, $name, $limiterConfig); - } - } - - public static function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig) - { - // default configuration (when used by other DI extensions) - $limiterConfig += ['lock_factory' => 'lock.factory', 'cache_pool' => 'cache.rate_limiter']; - - $limiter = $container->setDefinition($limiterId = 'limiter.'.$name, new ChildDefinition('limiter')); - - if (null !== $limiterConfig['lock_factory']) { - if (!self::$lockConfigEnabled) { - throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed and configured.', $name)); - } - - $limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory'])); - } - unset($limiterConfig['lock_factory']); - - $storageId = $limiterConfig['storage_service'] ?? null; - if (null === $storageId) { - $container->register($storageId = 'limiter.storage.'.$name, CacheStorage::class)->addArgument(new Reference($limiterConfig['cache_pool'])); - } - - $limiter->replaceArgument(1, new Reference($storageId)); - unset($limiterConfig['storage_service']); - unset($limiterConfig['cache_pool']); - - $limiterConfig['id'] = $name; - $limiter->replaceArgument(0, $limiterConfig); - - $container->registerAliasForArgument($limiterId, RateLimiterFactory::class, $name.'.limiter'); - } - - private function registerUidConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader) - { - $loader->load('uid.php'); - - $container->getDefinition('uuid.factory') - ->setArguments([ - $config['default_uuid_version'], - $config['time_based_uuid_version'], - $config['name_based_uuid_version'], - UuidV4::class, - $config['time_based_uuid_node'] ?? null, - $config['name_based_uuid_namespace'] ?? null, - ]) - ; - - if (isset($config['name_based_uuid_namespace'])) { - $container->getDefinition('name_based_uuid.factory') - ->setArguments([$config['name_based_uuid_namespace']]); - } - } - - private function resolveTrustedHeaders(array $headers): int - { - $trustedHeaders = 0; - - foreach ($headers as $h) { - switch ($h) { - case 'forwarded': $trustedHeaders |= Request::HEADER_FORWARDED; break; - case 'x-forwarded-for': $trustedHeaders |= Request::HEADER_X_FORWARDED_FOR; break; - case 'x-forwarded-host': $trustedHeaders |= Request::HEADER_X_FORWARDED_HOST; break; - case 'x-forwarded-proto': $trustedHeaders |= Request::HEADER_X_FORWARDED_PROTO; break; - case 'x-forwarded-port': $trustedHeaders |= Request::HEADER_X_FORWARDED_PORT; break; - case 'x-forwarded-prefix': $trustedHeaders |= Request::HEADER_X_FORWARDED_PREFIX; break; - } - } - - return $trustedHeaders; - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return \dirname(__DIR__).'/Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/symfony'; - } -} diff --git a/vendor/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php b/vendor/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php deleted file mode 100644 index 53cae12..0000000 --- a/vendor/symfony/framework-bundle/EventListener/SuggestMissingPackageSubscriber.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\EventListener; - -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -/** - * Suggests a package, that should be installed (via composer), - * if the package is missing, and the input command namespace can be mapped to a Symfony bundle. - * - * @author Przemysław Bogusz - * - * @internal - */ -final class SuggestMissingPackageSubscriber implements EventSubscriberInterface -{ - private const PACKAGES = [ - 'doctrine' => [ - 'fixtures' => ['DoctrineFixturesBundle', 'doctrine/doctrine-fixtures-bundle --dev'], - 'mongodb' => ['DoctrineMongoDBBundle', 'doctrine/mongodb-odm-bundle'], - '_default' => ['Doctrine ORM', 'symfony/orm-pack'], - ], - 'generate' => [ - '_default' => ['SensioGeneratorBundle', 'sensio/generator-bundle'], - ], - 'make' => [ - '_default' => ['MakerBundle', 'symfony/maker-bundle --dev'], - ], - 'server' => [ - '_default' => ['Debug Bundle', 'symfony/debug-bundle --dev'], - ], - ]; - - public function onConsoleError(ConsoleErrorEvent $event): void - { - if (!$event->getError() instanceof CommandNotFoundException) { - return; - } - - [$namespace, $command] = explode(':', $event->getInput()->getFirstArgument()) + [1 => '']; - - if (!isset(self::PACKAGES[$namespace])) { - return; - } - - if (isset(self::PACKAGES[$namespace][$command])) { - $suggestion = self::PACKAGES[$namespace][$command]; - $exact = true; - } else { - $suggestion = self::PACKAGES[$namespace]['_default']; - $exact = false; - } - - $error = $event->getError(); - - if ($error->getAlternatives() && !$exact) { - return; - } - - $message = sprintf("%s\n\nYou may be looking for a command provided by the \"%s\" which is currently not installed. Try running \"composer require %s\".", $error->getMessage(), $suggestion[0], $suggestion[1]); - $event->setError(new CommandNotFoundException($message)); - } - - public static function getSubscribedEvents(): array - { - return [ - ConsoleEvents::ERROR => ['onConsoleError', 0], - ]; - } -} diff --git a/vendor/symfony/framework-bundle/FrameworkBundle.php b/vendor/symfony/framework-bundle/FrameworkBundle.php deleted file mode 100644 index 4ec54ec..0000000 --- a/vendor/symfony/framework-bundle/FrameworkBundle.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle; - -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AssetsContextPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RemoveUnusedSessionMarshallingHandlerPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerRealRefPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerWeakRefPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\Cache\Adapter\PhpFilesAdapter; -use Symfony\Component\Cache\DependencyInjection\CacheCollectorPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolClearerPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolPass; -use Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Compiler\RegisterReverseContainerPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\Dotenv\Dotenv; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; -use Symfony\Component\Form\DependencyInjection\FormPass; -use Symfony\Component\HttpClient\DependencyInjection\HttpClientPass; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Bundle\Bundle; -use Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass; -use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass; -use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass; -use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass; -use Symfony\Component\HttpKernel\DependencyInjection\RegisterLocaleAwareServicesPass; -use Symfony\Component\HttpKernel\DependencyInjection\RemoveEmptyControllerArgumentLocatorsPass; -use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Messenger\DependencyInjection\MessengerPass; -use Symfony\Component\Mime\DependencyInjection\AddMimeTypeGuesserPass; -use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass; -use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass; -use Symfony\Component\Serializer\DependencyInjection\SerializerPass; -use Symfony\Component\Translation\DependencyInjection\TranslationDumperPass; -use Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass; -use Symfony\Component\Translation\DependencyInjection\TranslatorPass; -use Symfony\Component\Translation\DependencyInjection\TranslatorPathsPass; -use Symfony\Component\Validator\DependencyInjection\AddAutoMappingConfigurationPass; -use Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass; -use Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; - -// Help opcache.preload discover always-needed symbols -class_exists(ApcuAdapter::class); -class_exists(ArrayAdapter::class); -class_exists(ChainAdapter::class); -class_exists(PhpArrayAdapter::class); -class_exists(PhpFilesAdapter::class); -class_exists(Dotenv::class); -class_exists(ErrorHandler::class); -class_exists(Hydrator::class); -class_exists(Registry::class); - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class FrameworkBundle extends Bundle -{ - public function boot() - { - ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true); - - if ($this->container->getParameter('kernel.http_method_override')) { - Request::enableHttpMethodParameterOverride(); - } - } - - public function build(ContainerBuilder $container) - { - parent::build($container); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->setHotPathEvents([ - KernelEvents::REQUEST, - KernelEvents::CONTROLLER, - KernelEvents::CONTROLLER_ARGUMENTS, - KernelEvents::RESPONSE, - KernelEvents::FINISH_REQUEST, - ]); - if (class_exists(ConsoleEvents::class)) { - $registerListenersPass->setNoPreloadEvents([ - ConsoleEvents::COMMAND, - ConsoleEvents::TERMINATE, - ConsoleEvents::ERROR, - ]); - } - - $container->addCompilerPass(new AssetsContextPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION); - $container->addCompilerPass(new LoggerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $container->addCompilerPass(new RegisterControllerArgumentLocatorsPass()); - $container->addCompilerPass(new RemoveEmptyControllerArgumentLocatorsPass(), PassConfig::TYPE_BEFORE_REMOVING); - $container->addCompilerPass(new RoutingResolverPass()); - $container->addCompilerPass(new DataCollectorTranslatorPass()); - $container->addCompilerPass(new ProfilerPass()); - // must be registered before removing private services as some might be listeners/subscribers - // but as late as possible to get resolved parameters - $container->addCompilerPass($registerListenersPass, PassConfig::TYPE_BEFORE_REMOVING); - $this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class); - $container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255); - $this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class); - $this->addCompilerPassIfExists($container, AddConsoleCommandPass::class, PassConfig::TYPE_BEFORE_REMOVING); - // must be registered as late as possible to get access to all Twig paths registered in - // twig.template_iterator definition - $this->addCompilerPassIfExists($container, TranslatorPass::class, PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $this->addCompilerPassIfExists($container, TranslatorPathsPass::class, PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new LoggingTranslatorPass()); - $container->addCompilerPass(new AddExpressionLanguageProvidersPass(false)); - $this->addCompilerPassIfExists($container, TranslationExtractorPass::class); - $this->addCompilerPassIfExists($container, TranslationDumperPass::class); - $container->addCompilerPass(new FragmentRendererPass()); - $this->addCompilerPassIfExists($container, SerializerPass::class); - $this->addCompilerPassIfExists($container, PropertyInfoPass::class); - $container->addCompilerPass(new ControllerArgumentValueResolverPass()); - $container->addCompilerPass(new CachePoolPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 32); - $container->addCompilerPass(new CachePoolClearerPass(), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new CachePoolPrunerPass(), PassConfig::TYPE_AFTER_REMOVING); - $this->addCompilerPassIfExists($container, FormPass::class); - $container->addCompilerPass(new WorkflowGuardListenerPass()); - $container->addCompilerPass(new ResettableServicePass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32); - $container->addCompilerPass(new RegisterLocaleAwareServicesPass()); - $container->addCompilerPass(new TestServiceContainerWeakRefPass(), PassConfig::TYPE_BEFORE_REMOVING, -32); - $container->addCompilerPass(new TestServiceContainerRealRefPass(), PassConfig::TYPE_AFTER_REMOVING); - $this->addCompilerPassIfExists($container, AddMimeTypeGuesserPass::class); - $this->addCompilerPassIfExists($container, MessengerPass::class); - $this->addCompilerPassIfExists($container, HttpClientPass::class); - $this->addCompilerPassIfExists($container, AddAutoMappingConfigurationPass::class); - $container->addCompilerPass(new RegisterReverseContainerPass(true)); - $container->addCompilerPass(new RegisterReverseContainerPass(false), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new RemoveUnusedSessionMarshallingHandlerPass()); - $container->addCompilerPass(new SessionPass()); - - if ($container->getParameter('kernel.debug')) { - $container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 2); - $container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING); - $container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_BEFORE_REMOVING, -255); - $container->addCompilerPass(new CacheCollectorPass(), PassConfig::TYPE_BEFORE_REMOVING); - } - } - - private function addCompilerPassIfExists(ContainerBuilder $container, string $class, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) - { - $container->addResource(new ClassExistenceResource($class)); - - if (class_exists($class)) { - $container->addCompilerPass(new $class(), $type, $priority); - } - } -} diff --git a/vendor/symfony/framework-bundle/HttpCache/HttpCache.php b/vendor/symfony/framework-bundle/HttpCache/HttpCache.php deleted file mode 100644 index fe38c4a..0000000 --- a/vendor/symfony/framework-bundle/HttpCache/HttpCache.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpCache\Esi; -use Symfony\Component\HttpKernel\HttpCache\HttpCache as BaseHttpCache; -use Symfony\Component\HttpKernel\HttpCache\Store; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Manages HTTP cache objects in a Container. - * - * @author Fabien Potencier - */ -class HttpCache extends BaseHttpCache -{ - protected $cacheDir; - protected $kernel; - - private $store; - private $surrogate; - private $options; - - /** - * @param string|StoreInterface $cache The cache directory (default used if null) or the storage instance - */ - public function __construct(KernelInterface $kernel, $cache = null, SurrogateInterface $surrogate = null, array $options = null) - { - $this->kernel = $kernel; - $this->surrogate = $surrogate; - $this->options = $options ?? []; - - if ($cache instanceof StoreInterface) { - $this->store = $cache; - } elseif (null !== $cache && !\is_string($cache)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a string or a SurrogateInterface, "%s" given.', __METHOD__, get_debug_type($cache))); - } else { - $this->cacheDir = $cache; - } - - if (null === $options && $kernel->isDebug()) { - $this->options = ['debug' => true]; - } - - if ($this->options['debug'] ?? false) { - $this->options += ['stale_if_error' => 0]; - } - - parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($this->options, $this->getOptions())); - } - - /** - * {@inheritdoc} - */ - protected function forward(Request $request, bool $catch = false, Response $entry = null) - { - $this->getKernel()->boot(); - $this->getKernel()->getContainer()->set('cache', $this); - - return parent::forward($request, $catch, $entry); - } - - /** - * Returns an array of options to customize the Cache configuration. - * - * @return array - */ - protected function getOptions() - { - return []; - } - - /** - * @return SurrogateInterface - */ - protected function createSurrogate() - { - return $this->surrogate ?? new Esi(); - } - - /** - * @return StoreInterface - */ - protected function createStore() - { - return $this->store ?? new Store($this->cacheDir ?: $this->kernel->getCacheDir().'/http_cache'); - } -} diff --git a/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php b/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php deleted file mode 100644 index c25f90d..0000000 --- a/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Kernel; - -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader as ContainerPhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\Loader\PhpFileLoader as RoutingPhpFileLoader; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouteCollectionBuilder; - -/** - * A Kernel that provides configuration hooks. - * - * @author Ryan Weaver - * @author Fabien Potencier - */ -trait MicroKernelTrait -{ - /** - * Configures the container. - * - * You can register extensions: - * - * $container->extension('framework', [ - * 'secret' => '%secret%' - * ]); - * - * Or services: - * - * $container->services()->set('halloween', 'FooBundle\HalloweenProvider'); - * - * Or parameters: - * - * $container->parameters()->set('halloween', 'lot of fun'); - */ - private function configureContainer(ContainerConfigurator $container, LoaderInterface $loader, ContainerBuilder $builder): void - { - $configDir = $this->getConfigDir(); - - $container->import($configDir.'/{packages}/*.yaml'); - $container->import($configDir.'/{packages}/'.$this->environment.'/*.yaml'); - - if (is_file($configDir.'/services.yaml')) { - $container->import($configDir.'/services.yaml'); - $container->import($configDir.'/{services}_'.$this->environment.'.yaml'); - } else { - $container->import($configDir.'/{services}.php'); - } - } - - /** - * Adds or imports routes into your application. - * - * $routes->import($this->getConfigDir().'/*.{yaml,php}'); - * $routes - * ->add('admin_dashboard', '/admin') - * ->controller('App\Controller\AdminController::dashboard') - * ; - */ - private function configureRoutes(RoutingConfigurator $routes): void - { - $configDir = $this->getConfigDir(); - - $routes->import($configDir.'/{routes}/'.$this->environment.'/*.yaml'); - $routes->import($configDir.'/{routes}/*.yaml'); - - if (is_file($configDir.'/routes.yaml')) { - $routes->import($configDir.'/routes.yaml'); - } else { - $routes->import($configDir.'/{routes}.php'); - } - } - - /** - * Gets the path to the configuration directory. - */ - private function getConfigDir(): string - { - return $this->getProjectDir().'/config'; - } - - /** - * Gets the path to the bundles configuration file. - */ - private function getBundlesPath(): string - { - return $this->getConfigDir().'/bundles.php'; - } - - /** - * {@inheritdoc} - */ - public function getCacheDir(): string - { - if (isset($_SERVER['APP_CACHE_DIR'])) { - return $_SERVER['APP_CACHE_DIR'].'/'.$this->environment; - } - - return parent::getCacheDir(); - } - - /** - * {@inheritdoc} - */ - public function getLogDir(): string - { - return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir(); - } - - /** - * {@inheritdoc} - */ - public function registerBundles(): iterable - { - $contents = require $this->getBundlesPath(); - foreach ($contents as $class => $envs) { - if ($envs[$this->environment] ?? $envs['all'] ?? false) { - yield new $class(); - } - } - } - - /** - * {@inheritdoc} - */ - public function registerContainerConfiguration(LoaderInterface $loader) - { - $loader->load(function (ContainerBuilder $container) use ($loader) { - $container->loadFromExtension('framework', [ - 'router' => [ - 'resource' => 'kernel::loadRoutes', - 'type' => 'service', - ], - ]); - - $kernelClass = false !== strpos(static::class, "@anonymous\0") ? parent::class : static::class; - - if (!$container->hasDefinition('kernel')) { - $container->register('kernel', $kernelClass) - ->addTag('controller.service_arguments') - ->setAutoconfigured(true) - ->setSynthetic(true) - ->setPublic(true) - ; - } - - $kernelDefinition = $container->getDefinition('kernel'); - $kernelDefinition->addTag('routing.route_loader'); - - $container->addObjectResource($this); - $container->fileExists($this->getBundlesPath()); - - $configureContainer = new \ReflectionMethod($this, 'configureContainer'); - $configuratorClass = $configureContainer->getNumberOfParameters() > 0 && ($type = $configureContainer->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null; - - if ($configuratorClass && !is_a(ContainerConfigurator::class, $configuratorClass, true)) { - $configureContainer->getClosure($this)($container, $loader); - - return; - } - - $file = (new \ReflectionObject($this))->getFileName(); - /* @var ContainerPhpFileLoader $kernelLoader */ - $kernelLoader = $loader->getResolver()->resolve($file); - $kernelLoader->setCurrentDir(\dirname($file)); - $instanceof = &\Closure::bind(function &() { return $this->instanceof; }, $kernelLoader, $kernelLoader)(); - - $valuePreProcessor = AbstractConfigurator::$valuePreProcessor; - AbstractConfigurator::$valuePreProcessor = function ($value) { - return $this === $value ? new Reference('kernel') : $value; - }; - - try { - $configureContainer->getClosure($this)(new ContainerConfigurator($container, $kernelLoader, $instanceof, $file, $file, $this->getEnvironment()), $loader, $container); - } finally { - $instanceof = []; - $kernelLoader->registerAliasesForSinglyImplementedInterfaces(); - AbstractConfigurator::$valuePreProcessor = $valuePreProcessor; - } - - $container->setAlias($kernelClass, 'kernel')->setPublic(true); - }); - } - - /** - * @internal - */ - public function loadRoutes(LoaderInterface $loader): RouteCollection - { - $file = (new \ReflectionObject($this))->getFileName(); - /* @var RoutingPhpFileLoader $kernelLoader */ - $kernelLoader = $loader->getResolver()->resolve($file, 'php'); - $kernelLoader->setCurrentDir(\dirname($file)); - $collection = new RouteCollection(); - - $configureRoutes = new \ReflectionMethod($this, 'configureRoutes'); - $configuratorClass = $configureRoutes->getNumberOfParameters() > 0 && ($type = $configureRoutes->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null; - - if ($configuratorClass && !is_a(RoutingConfigurator::class, $configuratorClass, true)) { - trigger_deprecation('symfony/framework-bundle', '5.1', 'Using type "%s" for argument 1 of method "%s:configureRoutes()" is deprecated, use "%s" instead.', RouteCollectionBuilder::class, self::class, RoutingConfigurator::class); - - $routes = new RouteCollectionBuilder($loader); - $this->configureRoutes($routes); - - return $routes->build(); - } - - $configureRoutes->getClosure($this)(new RoutingConfigurator($collection, $kernelLoader, $file, $file, $this->getEnvironment())); - - foreach ($collection as $route) { - $controller = $route->getDefault('_controller'); - - if (\is_array($controller) && [0, 1] === array_keys($controller) && $this === $controller[0]) { - $route->setDefault('_controller', ['kernel', $controller[1]]); - } - } - - return $collection; - } -} diff --git a/vendor/symfony/framework-bundle/KernelBrowser.php b/vendor/symfony/framework-bundle/KernelBrowser.php deleted file mode 100644 index a028530..0000000 --- a/vendor/symfony/framework-bundle/KernelBrowser.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle; - -use Symfony\Bundle\FrameworkBundle\Test\TestBrowserToken; -use Symfony\Component\BrowserKit\Cookie; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelBrowser; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Simulates a browser and makes requests to a Kernel object. - * - * @author Fabien Potencier - */ -class KernelBrowser extends HttpKernelBrowser -{ - private $hasPerformedRequest = false; - private $profiler = false; - private $reboot = true; - - /** - * {@inheritdoc} - */ - public function __construct(KernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) - { - parent::__construct($kernel, $server, $history, $cookieJar); - } - - /** - * Returns the container. - * - * @return ContainerInterface - */ - public function getContainer() - { - $container = $this->kernel->getContainer(); - - return $container->has('test.service_container') ? $container->get('test.service_container') : $container; - } - - /** - * Returns the kernel. - * - * @return KernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Gets the profile associated with the current Response. - * - * @return HttpProfile|false|null - */ - public function getProfile() - { - if (null === $this->response || !$this->getContainer()->has('profiler')) { - return false; - } - - return $this->getContainer()->get('profiler')->loadProfileFromResponse($this->response); - } - - /** - * Enables the profiler for the very next request. - * - * If the profiler is not enabled, the call to this method does nothing. - */ - public function enableProfiler() - { - if ($this->getContainer()->has('profiler')) { - $this->profiler = true; - } - } - - /** - * Disables kernel reboot between requests. - * - * By default, the Client reboots the Kernel for each request. This method - * allows to keep the same kernel across requests. - */ - public function disableReboot() - { - $this->reboot = false; - } - - /** - * Enables kernel reboot between requests. - */ - public function enableReboot() - { - $this->reboot = true; - } - - /** - * @param UserInterface $user - * - * @return $this - */ - public function loginUser(object $user, string $firewallContext = 'main'): self - { - if (!interface_exists(UserInterface::class)) { - throw new \LogicException(sprintf('"%s" requires symfony/security-core to be installed.', __METHOD__)); - } - - if (!$user instanceof UserInterface) { - throw new \LogicException(sprintf('The first argument of "%s" must be instance of "%s", "%s" provided.', __METHOD__, UserInterface::class, \is_object($user) ? \get_class($user) : \gettype($user))); - } - - $token = new TestBrowserToken($user->getRoles(), $user, $firewallContext); - // @deprecated since Symfony 5.4 - if (method_exists($token, 'setAuthenticated')) { - $token->setAuthenticated(true, false); - } - - $container = $this->getContainer(); - $container->get('security.untracked_token_storage')->setToken($token); - - if ($container->has('session.factory')) { - $session = $container->get('session.factory')->createSession(); - } elseif ($container->has('session')) { - $session = $container->get('session'); - } else { - return $this; - } - - $session->set('_security_'.$firewallContext, serialize($token)); - $session->save(); - - $domains = array_unique(array_map(function (Cookie $cookie) use ($session) { - return $cookie->getName() === $session->getName() ? $cookie->getDomain() : ''; - }, $this->getCookieJar()->all())) ?: ['']; - foreach ($domains as $domain) { - $cookie = new Cookie($session->getName(), $session->getId(), null, null, $domain); - $this->getCookieJar()->set($cookie); - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequest(object $request) - { - // avoid shutting down the Kernel if no request has been performed yet - // WebTestCase::createClient() boots the Kernel but do not handle a request - if ($this->hasPerformedRequest && $this->reboot) { - $this->kernel->boot(); - $this->kernel->shutdown(); - } else { - $this->hasPerformedRequest = true; - } - - if ($this->profiler) { - $this->profiler = false; - - $this->kernel->boot(); - $this->getContainer()->get('profiler')->enable(); - } - - return parent::doRequest($request); - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequestInProcess(object $request) - { - $response = parent::doRequestInProcess($request); - - $this->profiler = false; - - return $response; - } - - /** - * Returns the script to execute when the request must be insulated. - * - * It assumes that the autoloader is named 'autoload.php' and that it is - * stored in the same directory as the kernel (this is the case for the - * Symfony Standard Edition). If this is not your case, create your own - * client and override this method. - * - * @param Request $request - * - * @return string - */ - protected function getScript(object $request) - { - $kernel = var_export(serialize($this->kernel), true); - $request = var_export(serialize($request), true); - $errorReporting = error_reporting(); - - $requires = ''; - foreach (get_declared_classes() as $class) { - if (str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $file = \dirname($r->getFileName(), 2).'/autoload.php'; - if (is_file($file)) { - $requires .= 'require_once '.var_export($file, true).";\n"; - } - } - } - - if (!$requires) { - throw new \RuntimeException('Composer autoloader not found.'); - } - - $requires .= 'require_once '.var_export((new \ReflectionObject($this->kernel))->getFileName(), true).";\n"; - - $profilerCode = ''; - if ($this->profiler) { - $profilerCode = <<<'EOF' -$container = $kernel->getContainer(); -$container = $container->has('test.service_container') ? $container->get('test.service_container') : $container; -$container->get('profiler')->enable(); -EOF; - } - - $code = <<boot(); -$profilerCode - -\$request = unserialize($request); -EOF; - - return $code.$this->getHandleScript(); - } -} diff --git a/vendor/symfony/framework-bundle/LICENSE b/vendor/symfony/framework-bundle/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/framework-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/framework-bundle/README.md b/vendor/symfony/framework-bundle/README.md deleted file mode 100644 index 76c7700..0000000 --- a/vendor/symfony/framework-bundle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -FrameworkBundle -=============== - -FrameworkBundle provides a tight integration between Symfony components and the -Symfony full-stack framework. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php b/vendor/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php deleted file mode 100644 index 4920c43..0000000 --- a/vendor/symfony/framework-bundle/Resources/bin/check-unused-known-tags.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -require dirname(__DIR__, 6).'/vendor/autoload.php'; - -use Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\UnusedTagsPassUtils; - -$target = dirname(__DIR__, 2).'/DependencyInjection/Compiler/UnusedTagsPass.php'; -$contents = file_get_contents($target); -$contents = preg_replace('{private const KNOWN_TAGS = \[(.+?)\];}sm', "private const KNOWN_TAGS = [\n '".implode("',\n '", UnusedTagsPassUtils::getDefinedTags())."',\n ];", $contents); -file_put_contents($target, $contents); diff --git a/vendor/symfony/framework-bundle/Resources/config/annotations.php b/vendor/symfony/framework-bundle/Resources/config/annotations.php deleted file mode 100644 index a848125..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/annotations.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; -use Doctrine\Common\Cache\Psr6\DoctrineProvider; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('annotations.reader', AnnotationReader::class) - ->call('addGlobalIgnoredName', [ - 'required', - service('annotations.dummy_registry'), // dummy arg to register class_exists as annotation loader only when required - ]) - - ->set('annotations.dummy_registry', AnnotationRegistry::class) - ->call('registerUniqueLoader', ['class_exists']) - - ->set('annotations.cached_reader', PsrCachedReader::class) - ->args([ - service('annotations.reader'), - inline_service(ArrayAdapter::class), - abstract_arg('Debug-Flag'), - ]) - - ->set('annotations.filesystem_cache_adapter', FilesystemAdapter::class) - ->args([ - '', - 0, - abstract_arg('Cache-Directory'), - ]) - - ->set('annotations.filesystem_cache', DoctrineProvider::class) - ->factory([DoctrineProvider::class, 'wrap']) - ->args([ - service('annotations.filesystem_cache_adapter'), - ]) - ->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"') - - ->set('annotations.cache_warmer', AnnotationsCacheWarmer::class) - ->args([ - service('annotations.reader'), - param('kernel.cache_dir').'/annotations.php', - '#^Symfony\\\\(?:Component\\\\HttpKernel\\\\|Bundle\\\\FrameworkBundle\\\\Controller\\\\(?!.*Controller$))#', - param('kernel.debug'), - ]) - - ->set('annotations.cache_adapter', PhpArrayAdapter::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([ - param('kernel.cache_dir').'/annotations.php', - service('cache.annotations'), - ]) - ->tag('container.hot_path') - - ->set('annotations.cache', DoctrineProvider::class) - ->factory([DoctrineProvider::class, 'wrap']) - ->args([ - service('annotations.cache_adapter'), - ]) - ->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"') - - ->alias('annotation_reader', 'annotations.reader') - ->alias(Reader::class, 'annotation_reader'); -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/assets.php b/vendor/symfony/framework-bundle/Resources/config/assets.php deleted file mode 100644 index 1e250aa..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/assets.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Asset\Context\RequestStackContext; -use Symfony\Component\Asset\Package; -use Symfony\Component\Asset\Packages; -use Symfony\Component\Asset\PathPackage; -use Symfony\Component\Asset\UrlPackage; -use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\RemoteJsonManifestVersionStrategy; -use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('asset.request_context.base_path', null) - ->set('asset.request_context.secure', null) - ; - - $container->services() - ->set('assets.packages', Packages::class) - ->args([ - service('assets._default_package'), - tagged_iterator('assets.package', 'package'), - ]) - - ->alias(Packages::class, 'assets.packages') - - ->set('assets.empty_package', Package::class) - ->args([ - service('assets.empty_version_strategy'), - ]) - - ->alias('assets._default_package', 'assets.empty_package') - - ->set('assets.context', RequestStackContext::class) - ->args([ - service('request_stack'), - param('asset.request_context.base_path'), - param('asset.request_context.secure'), - ]) - - ->set('assets.path_package', PathPackage::class) - ->abstract() - ->args([ - abstract_arg('base path'), - abstract_arg('version strategy'), - service('assets.context'), - ]) - - ->set('assets.url_package', UrlPackage::class) - ->abstract() - ->args([ - abstract_arg('base URLs'), - abstract_arg('version strategy'), - service('assets.context'), - ]) - - ->set('assets.static_version_strategy', StaticVersionStrategy::class) - ->abstract() - ->args([ - abstract_arg('version'), - abstract_arg('format'), - ]) - - ->set('assets.empty_version_strategy', EmptyVersionStrategy::class) - - ->set('assets.json_manifest_version_strategy', JsonManifestVersionStrategy::class) - ->abstract() - ->args([ - abstract_arg('manifest path'), - service('http_client')->nullOnInvalid(), - false, - ]) - - ->set('assets.remote_json_manifest_version_strategy', RemoteJsonManifestVersionStrategy::class) - ->abstract() - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "assets.json_manifest_version_strategy" instead.') - ->args([ - abstract_arg('manifest url'), - service('http_client'), - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/cache.php b/vendor/symfony/framework-bundle/Resources/config/cache.php deleted file mode 100644 index e333e5f..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/cache.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\MemcachedAdapter; -use Symfony\Component\Cache\Adapter\PdoAdapter; -use Symfony\Component\Cache\Adapter\ProxyAdapter; -use Symfony\Component\Cache\Adapter\RedisAdapter; -use Symfony\Component\Cache\Adapter\RedisTagAwareAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Messenger\EarlyExpirationHandler; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('cache.app') - ->parent('cache.adapter.filesystem') - ->public() - ->tag('cache.pool', ['clearer' => 'cache.app_clearer']) - - ->set('cache.app.taggable', TagAwareAdapter::class) - ->args([service('cache.app')]) - - ->set('cache.system') - ->parent('cache.adapter.system') - ->public() - ->tag('cache.pool') - - ->set('cache.validator') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.serializer') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.annotations') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.property_info') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - ->set('cache.messenger.restart_workers_signal') - ->parent('cache.app') - ->private() - ->tag('cache.pool') - - ->set('cache.adapter.system', AdapterInterface::class) - ->abstract() - ->factory([AbstractAdapter::class, 'createSystemCache']) - ->args([ - '', // namespace - 0, // default lifetime - abstract_arg('version'), - sprintf('%s/pools/system', param('kernel.cache_dir')), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('cache.pool', ['clearer' => 'cache.system_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.apcu', ApcuAdapter::class) - ->abstract() - ->args([ - '', // namespace - 0, // default lifetime - abstract_arg('version'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.doctrine', DoctrineAdapter::class) - ->abstract() - ->args([ - abstract_arg('Doctrine provider service'), - '', // namespace - 0, // default lifetime - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_doctrine_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - ->deprecate('symfony/framework-bundle', '5.4', 'The "%service_id%" service inherits from "cache.adapter.doctrine" which is deprecated.') - - ->set('cache.adapter.filesystem', FilesystemAdapter::class) - ->abstract() - ->args([ - '', // namespace - 0, // default lifetime - sprintf('%s/pools/app', param('kernel.cache_dir')), - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.psr6', ProxyAdapter::class) - ->abstract() - ->args([ - abstract_arg('PSR-6 provider service'), - '', // namespace - 0, // default lifetime - ]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_psr6_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - - ->set('cache.adapter.redis', RedisAdapter::class) - ->abstract() - ->args([ - abstract_arg('Redis connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_redis_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.redis_tag_aware', RedisTagAwareAdapter::class) - ->abstract() - ->args([ - abstract_arg('Redis connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_redis_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.memcached', MemcachedAdapter::class) - ->abstract() - ->args([ - abstract_arg('Memcached connection service'), - '', // namespace - 0, // default lifetime - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_memcached_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.doctrine_dbal', DoctrineDbalAdapter::class) - ->abstract() - ->args([ - abstract_arg('DBAL connection service'), - '', // namespace - 0, // default lifetime - [], // table options - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_doctrine_dbal_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.pdo', PdoAdapter::class) - ->abstract() - ->args([ - abstract_arg('PDO connection service'), - '', // namespace - 0, // default lifetime - [], // table options - service('cache.default_marshaller')->ignoreOnInvalid(), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', [ - 'provider' => 'cache.default_pdo_provider', - 'clearer' => 'cache.default_clearer', - 'reset' => 'reset', - ]) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.adapter.array', ArrayAdapter::class) - ->abstract() - ->args([ - 0, // default lifetime - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset']) - ->tag('monolog.logger', ['channel' => 'cache']) - - ->set('cache.default_marshaller', DefaultMarshaller::class) - ->args([ - null, // use igbinary_serialize() when available - '%kernel.debug%', - ]) - - ->set('cache.early_expiration_handler', EarlyExpirationHandler::class) - ->args([ - service('reverse_container'), - ]) - ->tag('messenger.message_handler') - - ->set('cache.default_clearer', Psr6CacheClearer::class) - ->args([ - [], - ]) - - ->set('cache.system_clearer') - ->parent('cache.default_clearer') - ->public() - - ->set('cache.global_clearer') - ->parent('cache.default_clearer') - ->public() - - ->alias('cache.app_clearer', 'cache.default_clearer') - ->public() - - ->alias(CacheItemPoolInterface::class, 'cache.app') - - ->alias(AdapterInterface::class, 'cache.app') - ->deprecate('symfony/framework-bundle', '5.4', sprintf('The "%%alias_id%%" alias is deprecated, use "%s" instead.', CacheItemPoolInterface::class)) - - ->alias(CacheInterface::class, 'cache.app') - - ->alias(TagAwareCacheInterface::class, 'cache.app.taggable') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/cache_debug.php b/vendor/symfony/framework-bundle/Resources/config/cache_debug.php deleted file mode 100644 index 82461d9..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/cache_debug.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\CachePoolClearerCacheWarmer; -use Symfony\Component\Cache\DataCollector\CacheDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - // DataCollector (public to prevent inlining, made private in CacheCollectorPass) - ->set('data_collector.cache', CacheDataCollector::class) - ->public() - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/cache.html.twig', - 'id' => 'cache', - 'priority' => 275, - ]) - - // CacheWarmer used in dev to clear cache pool - ->set('cache_pool_clearer.cache_warmer', CachePoolClearerCacheWarmer::class) - ->args([ - service('cache.system_clearer'), - [ - 'cache.validator', - 'cache.serializer', - ], - ]) - ->tag('kernel.cache_warmer', ['priority' => 64]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/collectors.php b/vendor/symfony/framework-bundle/Resources/config/collectors.php deleted file mode 100644 index abf9ded..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/collectors.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector; -use Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector; -use Symfony\Component\HttpKernel\DataCollector\EventDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; -use Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector; -use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; -use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; -use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; -use Symfony\Component\HttpKernel\KernelEvents; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.config', ConfigDataCollector::class) - ->call('setKernel', [service('kernel')->ignoreOnInvalid()]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/config.html.twig', 'id' => 'config', 'priority' => -255]) - - ->set('data_collector.request', RequestDataCollector::class) - ->args([ - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('data_collector', ['template' => '@WebProfiler/Collector/request.html.twig', 'id' => 'request', 'priority' => 335]) - - ->set('data_collector.request.session_collector', \Closure::class) - ->factory([\Closure::class, 'fromCallable']) - ->args([[service('data_collector.request'), 'collectSessionUsage']]) - - ->set('data_collector.ajax', AjaxDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/ajax.html.twig', 'id' => 'ajax', 'priority' => 315]) - - ->set('data_collector.exception', ExceptionDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/exception.html.twig', 'id' => 'exception', 'priority' => 305]) - - ->set('data_collector.events', EventDataCollector::class) - ->args([ - service('debug.event_dispatcher')->ignoreOnInvalid(), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/events.html.twig', 'id' => 'events', 'priority' => 290]) - - ->set('data_collector.logger', LoggerDataCollector::class) - ->args([ - service('logger')->ignoreOnInvalid(), - sprintf('%s/%s', param('kernel.build_dir'), param('kernel.container_class')), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'profiler']) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/logger.html.twig', 'id' => 'logger', 'priority' => 300]) - - ->set('data_collector.time', TimeDataCollector::class) - ->args([ - service('kernel')->ignoreOnInvalid(), - service('debug.stopwatch')->ignoreOnInvalid(), - ]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/time.html.twig', 'id' => 'time', 'priority' => 330]) - - ->set('data_collector.memory', MemoryDataCollector::class) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/memory.html.twig', 'id' => 'memory', 'priority' => 325]) - - ->set('data_collector.router', RouterDataCollector::class) - ->tag('kernel.event_listener', ['event' => KernelEvents::CONTROLLER, 'method' => 'onKernelController']) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/router.html.twig', 'id' => 'router', 'priority' => 285]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/console.php b/vendor/symfony/framework-bundle/Resources/config/console.php deleted file mode 100644 index 610a83a..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/console.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Command\AboutCommand; -use Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand; -use Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolDeleteCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand; -use Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand; -use Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand; -use Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand; -use Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand; -use Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand; -use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsDecryptToLocalCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsEncryptFromLocalCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsGenerateKeysCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsListCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsRemoveCommand; -use Symfony\Bundle\FrameworkBundle\Command\SecretsSetCommand; -use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand; -use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand; -use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand; -use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand; -use Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber; -use Symfony\Component\Console\EventListener\ErrorListener; -use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand; -use Symfony\Component\Messenger\Command\ConsumeMessagesCommand; -use Symfony\Component\Messenger\Command\DebugCommand; -use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand; -use Symfony\Component\Messenger\Command\FailedMessagesRetryCommand; -use Symfony\Component\Messenger\Command\FailedMessagesShowCommand; -use Symfony\Component\Messenger\Command\SetupTransportsCommand; -use Symfony\Component\Messenger\Command\StopWorkersCommand; -use Symfony\Component\Translation\Command\TranslationPullCommand; -use Symfony\Component\Translation\Command\TranslationPushCommand; -use Symfony\Component\Translation\Command\XliffLintCommand; -use Symfony\Component\Validator\Command\DebugCommand as ValidatorDebugCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('console.error_listener', ErrorListener::class) - ->args([ - service('logger')->nullOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'console']) - - ->set('console.suggest_missing_package_subscriber', SuggestMissingPackageSubscriber::class) - ->tag('kernel.event_subscriber') - - ->set('console.command.about', AboutCommand::class) - ->tag('console.command') - - ->set('console.command.assets_install', AssetsInstallCommand::class) - ->args([ - service('filesystem'), - param('kernel.project_dir'), - ]) - ->tag('console.command') - - ->set('console.command.cache_clear', CacheClearCommand::class) - ->args([ - service('cache_clearer'), - service('filesystem'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_clear', CachePoolClearCommand::class) - ->args([ - service('cache.global_clearer'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_prune', CachePoolPruneCommand::class) - ->args([ - [], - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_delete', CachePoolDeleteCommand::class) - ->args([ - service('cache.global_clearer'), - ]) - ->tag('console.command') - - ->set('console.command.cache_pool_list', CachePoolListCommand::class) - ->args([ - null, - ]) - ->tag('console.command') - - ->set('console.command.cache_warmup', CacheWarmupCommand::class) - ->args([ - service('cache_warmer'), - ]) - ->tag('console.command') - - ->set('console.command.config_debug', ConfigDebugCommand::class) - ->tag('console.command') - - ->set('console.command.config_dump_reference', ConfigDumpReferenceCommand::class) - ->tag('console.command') - - ->set('console.command.container_debug', ContainerDebugCommand::class) - ->tag('console.command') - - ->set('console.command.container_lint', ContainerLintCommand::class) - ->tag('console.command') - - ->set('console.command.debug_autowiring', DebugAutowiringCommand::class) - ->args([ - null, - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.dotenv_debug', DotenvDebugCommand::class) - ->args([ - param('kernel.environment'), - param('kernel.project_dir'), - ]) - ->tag('console.command') - - ->set('console.command.event_dispatcher_debug', EventDispatcherDebugCommand::class) - ->args([ - tagged_locator('event_dispatcher.dispatcher', 'name'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_consume_messages', ConsumeMessagesCommand::class) - ->args([ - abstract_arg('Routable message bus'), - service('messenger.receiver_locator'), - service('event_dispatcher'), - service('logger')->nullOnInvalid(), - [], // Receiver names - service('messenger.listener.reset_services')->nullOnInvalid(), - [], // Bus names - ]) - ->tag('console.command') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('console.command.messenger_setup_transports', SetupTransportsCommand::class) - ->args([ - service('messenger.receiver_locator'), - [], // Receiver names - ]) - ->tag('console.command') - - ->set('console.command.messenger_debug', DebugCommand::class) - ->args([ - [], // Message to handlers mapping - ]) - ->tag('console.command') - - ->set('console.command.messenger_stop_workers', StopWorkersCommand::class) - ->args([ - service('cache.messenger.restart_workers_signal'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_retry', FailedMessagesRetryCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - service('messenger.routable_message_bus'), - service('event_dispatcher'), - service('logger'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_show', FailedMessagesShowCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - ]) - ->tag('console.command') - - ->set('console.command.messenger_failed_messages_remove', FailedMessagesRemoveCommand::class) - ->args([ - abstract_arg('Default failure receiver name'), - abstract_arg('Receivers'), - ]) - ->tag('console.command') - - ->set('console.command.router_debug', RouterDebugCommand::class) - ->args([ - service('router'), - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.router_match', RouterMatchCommand::class) - ->args([ - service('router'), - tagged_iterator('routing.expression_language_provider'), - ]) - ->tag('console.command') - - ->set('console.command.translation_debug', TranslationDebugCommand::class) - ->args([ - service('translator'), - service('translation.reader'), - service('translation.extractor'), - param('translator.default_path'), - null, // twig.default_path - [], // Translator paths - [], // Twig paths - param('kernel.enabled_locales'), - ]) - ->tag('console.command') - - ->set('console.command.translation_extract', TranslationUpdateCommand::class) - ->args([ - service('translation.writer'), - service('translation.reader'), - service('translation.extractor'), - param('kernel.default_locale'), - param('translator.default_path'), - null, // twig.default_path - [], // Translator paths - [], // Twig paths - param('kernel.enabled_locales'), - ]) - ->tag('console.command') - - ->set('console.command.validator_debug', ValidatorDebugCommand::class) - ->args([ - service('validator'), - ]) - ->tag('console.command') - - ->set('console.command.translation_pull', TranslationPullCommand::class) - ->args([ - service('translation.provider_collection'), - service('translation.writer'), - service('translation.reader'), - param('kernel.default_locale'), - [], // Translator paths - [], // Enabled locales - ]) - ->tag('console.command', ['command' => 'translation:pull']) - - ->set('console.command.translation_push', TranslationPushCommand::class) - ->args([ - service('translation.provider_collection'), - service('translation.reader'), - [], // Translator paths - [], // Enabled locales - ]) - ->tag('console.command', ['command' => 'translation:push']) - - ->set('console.command.workflow_dump', WorkflowDumpCommand::class) - ->tag('console.command') - - ->set('console.command.xliff_lint', XliffLintCommand::class) - ->tag('console.command') - - ->set('console.command.yaml_lint', YamlLintCommand::class) - ->tag('console.command') - - ->set('console.command.form_debug', \Symfony\Component\Form\Command\DebugCommand::class) - ->args([ - service('form.registry'), - [], // All form types namespaces are stored here by FormPass - [], // All services form types are stored here by FormPass - [], // All type extensions are stored here by FormPass - [], // All type guessers are stored here by FormPass - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_set', SecretsSetCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_remove', SecretsRemoveCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_generate_key', SecretsGenerateKeysCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_list', SecretsListCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_decrypt_to_local', SecretsDecryptToLocalCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - - ->set('console.command.secrets_encrypt_from_local', SecretsEncryptFromLocalCommand::class) - ->args([ - service('secrets.vault'), - service('secrets.local_vault')->ignoreOnInvalid(), - ]) - ->tag('console.command') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/debug.php b/vendor/symfony/framework-bundle/Resources/config/debug.php deleted file mode 100644 index cfaad8c..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/debug.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\NotTaggedControllerValueResolver; -use Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver; -use Symfony\Component\HttpKernel\Controller\TraceableControllerResolver; -use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('debug.event_dispatcher', TraceableEventDispatcher::class) - ->decorate('event_dispatcher') - ->args([ - service('debug.event_dispatcher.inner'), - service('debug.stopwatch'), - service('logger')->nullOnInvalid(), - service('request_stack')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'event']) - ->tag('kernel.reset', ['method' => 'reset']) - - ->set('debug.controller_resolver', TraceableControllerResolver::class) - ->decorate('controller_resolver') - ->args([ - service('debug.controller_resolver.inner'), - service('debug.stopwatch'), - ]) - - ->set('debug.argument_resolver', TraceableArgumentResolver::class) - ->decorate('argument_resolver') - ->args([ - service('debug.argument_resolver.inner'), - service('debug.stopwatch'), - ]) - - ->set('argument_resolver.not_tagged_controller', NotTaggedControllerValueResolver::class) - ->args([abstract_arg('Controller argument, set in FrameworkExtension')]) - ->tag('controller.argument_value_resolver', ['priority' => -200]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/debug_prod.php b/vendor/symfony/framework-bundle/Resources/config/debug_prod.php deleted file mode 100644 index f381b01..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/debug_prod.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('debug.error_handler.throw_at', -1); - - $container->services() - ->set('debug.debug_handlers_listener', DebugHandlersListener::class) - ->args([ - null, // Exception handler - service('monolog.logger.php')->nullOnInvalid(), - null, // Log levels map for enabled error levels - param('debug.error_handler.throw_at'), - param('kernel.debug'), - param('kernel.debug'), - service('monolog.logger.deprecation')->nullOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'php']) - - ->set('debug.file_link_formatter', FileLinkFormatter::class) - ->args([param('debug.file_link_format')]) - - ->alias(FileLinkFormatter::class, 'debug.file_link_formatter') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/error_renderer.php b/vendor/symfony/framework-bundle/Resources/config/error_renderer.php deleted file mode 100644 index 67f28ce..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/error_renderer.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('error_handler.error_renderer.html', HtmlErrorRenderer::class) - ->args([ - inline_service() - ->factory([HtmlErrorRenderer::class, 'isDebug']) - ->args([ - service('request_stack'), - param('kernel.debug'), - ]), - param('kernel.charset'), - service('debug.file_link_formatter')->nullOnInvalid(), - param('kernel.project_dir'), - inline_service() - ->factory([HtmlErrorRenderer::class, 'getAndCleanOutputBuffer']) - ->args([service('request_stack')]), - service('logger')->nullOnInvalid(), - ]) - - ->alias('error_renderer.html', 'error_handler.error_renderer.html') - ->alias('error_renderer', 'error_renderer.html') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/esi.php b/vendor/symfony/framework-bundle/Resources/config/esi.php deleted file mode 100644 index ca0362a..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/esi.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\SurrogateListener; -use Symfony\Component\HttpKernel\HttpCache\Esi; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('esi', Esi::class) - - ->set('esi_listener', SurrogateListener::class) - ->args([service('esi')->ignoreOnInvalid()]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/form.php b/vendor/symfony/framework-bundle/Resources/config/form.php deleted file mode 100644 index e4c0745..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/form.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator; -use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; -use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\ColorType; -use Symfony\Component\Form\Extension\Core\Type\FileType; -use Symfony\Component\Form\Extension\Core\Type\FormType; -use Symfony\Component\Form\Extension\Core\Type\SubmitType; -use Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension; -use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension; -use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; -use Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension; -use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\RepeatedTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\SubmitTypeValidatorExtension; -use Symfony\Component\Form\Extension\Validator\Type\UploadValidatorExtension; -use Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser; -use Symfony\Component\Form\FormFactory; -use Symfony\Component\Form\FormFactoryInterface; -use Symfony\Component\Form\FormRegistry; -use Symfony\Component\Form\FormRegistryInterface; -use Symfony\Component\Form\ResolvedFormTypeFactory; -use Symfony\Component\Form\ResolvedFormTypeFactoryInterface; -use Symfony\Component\Form\Util\ServerParams; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.resolved_type_factory', ResolvedFormTypeFactory::class) - - ->alias(ResolvedFormTypeFactoryInterface::class, 'form.resolved_type_factory') - - ->set('form.registry', FormRegistry::class) - ->args([ - [ - /* - * We don't need to be able to add more extensions. - * more types can be registered with the form.type tag - * more type extensions can be registered with the form.type_extension tag - * more type_guessers can be registered with the form.type_guesser tag - */ - service('form.extension'), - ], - service('form.resolved_type_factory'), - ]) - - ->alias(FormRegistryInterface::class, 'form.registry') - - ->set('form.factory', FormFactory::class) - ->public() - ->args([service('form.registry')]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(FormFactoryInterface::class, 'form.factory') - - ->set('form.extension', DependencyInjectionExtension::class) - ->args([ - abstract_arg('All services with tag "form.type" are stored in a service locator by FormPass'), - abstract_arg('All services with tag "form.type_extension" are stored here by FormPass'), - abstract_arg('All services with tag "form.type_guesser" are stored here by FormPass'), - ]) - - ->set('form.type_guesser.validator', ValidatorTypeGuesser::class) - ->args([service('validator.mapping.class_metadata_factory')]) - ->tag('form.type_guesser') - - ->alias('form.property_accessor', 'property_accessor') - - ->set('form.choice_list_factory.default', DefaultChoiceListFactory::class) - - ->set('form.choice_list_factory.property_access', PropertyAccessDecorator::class) - ->args([ - service('form.choice_list_factory.default'), - service('form.property_accessor'), - ]) - - ->set('form.choice_list_factory.cached', CachingFactoryDecorator::class) - ->args([service('form.choice_list_factory.property_access')]) - ->tag('kernel.reset', ['method' => 'reset']) - - ->alias('form.choice_list_factory', 'form.choice_list_factory.cached') - - ->set('form.type.form', FormType::class) - ->args([service('form.property_accessor')]) - ->tag('form.type') - - ->set('form.type.choice', ChoiceType::class) - ->args([ - service('form.choice_list_factory'), - service('translator')->ignoreOnInvalid(), - ]) - ->tag('form.type') - - ->set('form.type.file', FileType::class) - ->public() - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type') - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->set('form.type.color', ColorType::class) - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type') - - ->set('form.type_extension.form.transformation_failure_handling', TransformationFailureExtension::class) - ->args([service('translator')->ignoreOnInvalid()]) - ->tag('form.type_extension', ['extended-type' => FormType::class]) - - ->set('form.type_extension.form.http_foundation', FormTypeHttpFoundationExtension::class) - ->args([service('form.type_extension.form.request_handler')]) - ->tag('form.type_extension') - - ->set('form.type_extension.form.request_handler', HttpFoundationRequestHandler::class) - ->args([service('form.server_params')]) - - ->set('form.server_params', ServerParams::class) - ->args([service('request_stack')]) - - ->set('form.type_extension.form.validator', FormTypeValidatorExtension::class) - ->args([ - service('validator'), - true, - service('twig.form.renderer')->ignoreOnInvalid(), - service('translator')->ignoreOnInvalid(), - ]) - ->tag('form.type_extension', ['extended-type' => FormType::class]) - - ->set('form.type_extension.repeated.validator', RepeatedTypeValidatorExtension::class) - ->tag('form.type_extension') - - ->set('form.type_extension.submit.validator', SubmitTypeValidatorExtension::class) - ->tag('form.type_extension', ['extended-type' => SubmitType::class]) - - ->set('form.type_extension.upload.validator', UploadValidatorExtension::class) - ->args([ - service('translator'), - param('validator.translation_domain'), - ]) - ->tag('form.type_extension') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/form_csrf.php b/vendor/symfony/framework-bundle/Resources/config/form_csrf.php deleted file mode 100644 index c8e5e97..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/form_csrf.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.type_extension.csrf', FormTypeCsrfExtension::class) - ->args([ - service('security.csrf.token_manager'), - param('form.type_extension.csrf.enabled'), - param('form.type_extension.csrf.field_name'), - service('translator')->nullOnInvalid(), - param('validator.translation_domain'), - service('form.server_params'), - ]) - ->tag('form.type_extension') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/form_debug.php b/vendor/symfony/framework-bundle/Resources/config/form_debug.php deleted file mode 100644 index f5e2c3e..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/form_debug.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Form\Extension\DataCollector\FormDataCollector; -use Symfony\Component\Form\Extension\DataCollector\FormDataExtractor; -use Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeFactoryDataCollectorProxy; -use Symfony\Component\Form\Extension\DataCollector\Type\DataCollectorTypeExtension; -use Symfony\Component\Form\ResolvedFormTypeFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('form.resolved_type_factory', ResolvedTypeFactoryDataCollectorProxy::class) - ->args([ - inline_service(ResolvedFormTypeFactory::class), - service('data_collector.form'), - ]) - - ->set('form.type_extension.form.data_collector', DataCollectorTypeExtension::class) - ->args([service('data_collector.form')]) - ->tag('form.type_extension') - - ->set('data_collector.form.extractor', FormDataExtractor::class) - - ->set('data_collector.form', FormDataCollector::class) - ->args([service('data_collector.form.extractor')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/form.html.twig', 'id' => 'form', 'priority' => 310]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/fragment_listener.php b/vendor/symfony/framework-bundle/Resources/config/fragment_listener.php deleted file mode 100644 index 465c304..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/fragment_listener.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\FragmentListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('fragment.listener', FragmentListener::class) - ->args([service('uri_signer'), param('fragment.path')]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/fragment_renderer.php b/vendor/symfony/framework-bundle/Resources/config/fragment_renderer.php deleted file mode 100644 index 76f49c6..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/fragment_renderer.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; -use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGenerator; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; -use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer; -use Symfony\Component\HttpKernel\Fragment\SsiFragmentRenderer; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('fragment.renderer.hinclude.global_template', null) - ->set('fragment.path', '/_fragment') - ; - - $container->services() - ->set('fragment.handler', LazyLoadingFragmentHandler::class) - ->args([ - abstract_arg('fragment renderer locator'), - service('request_stack'), - param('kernel.debug'), - ]) - - ->set('fragment.uri_generator', FragmentUriGenerator::class) - ->args([param('fragment.path'), service('uri_signer'), service('request_stack')]) - ->alias(FragmentUriGeneratorInterface::class, 'fragment.uri_generator') - - ->set('fragment.renderer.inline', InlineFragmentRenderer::class) - ->args([service('http_kernel'), service('event_dispatcher')]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'inline']) - - ->set('fragment.renderer.hinclude', HIncludeFragmentRenderer::class) - ->args([ - service('twig')->nullOnInvalid(), - service('uri_signer'), - param('fragment.renderer.hinclude.global_template'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - - ->set('fragment.renderer.esi', EsiFragmentRenderer::class) - ->args([ - service('esi')->nullOnInvalid(), - service('fragment.renderer.inline'), - service('uri_signer'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'esi']) - - ->set('fragment.renderer.ssi', SsiFragmentRenderer::class) - ->args([ - service('ssi')->nullOnInvalid(), - service('fragment.renderer.inline'), - service('uri_signer'), - ]) - ->call('setFragmentPath', [param('fragment.path')]) - ->tag('kernel.fragment_renderer', ['alias' => 'ssi']) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/http_client.php b/vendor/symfony/framework-bundle/Resources/config/http_client.php deleted file mode 100644 index ba70b90..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/http_client.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Http\Client\ClientInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpClient\HttplugClient; -use Symfony\Component\HttpClient\Psr18Client; -use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('http_client', HttpClientInterface::class) - ->factory([HttpClient::class, 'create']) - ->args([ - [], // default options - abstract_arg('max host connections'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'http_client']) - ->tag('kernel.reset', ['method' => 'reset', 'on_invalid' => 'ignore']) - ->tag('http_client.client') - - ->alias(HttpClientInterface::class, 'http_client') - - ->set('psr18.http_client', Psr18Client::class) - ->args([ - service('http_client'), - service(ResponseFactoryInterface::class)->ignoreOnInvalid(), - service(StreamFactoryInterface::class)->ignoreOnInvalid(), - ]) - - ->alias(ClientInterface::class, 'psr18.http_client') - - ->set(\Http\Client\HttpClient::class, HttplugClient::class) - ->args([ - service('http_client'), - service(ResponseFactoryInterface::class)->ignoreOnInvalid(), - service(StreamFactoryInterface::class)->ignoreOnInvalid(), - ]) - - ->set('http_client.abstract_retry_strategy', GenericRetryStrategy::class) - ->abstract() - ->args([ - abstract_arg('http codes'), - abstract_arg('delay ms'), - abstract_arg('multiplier'), - abstract_arg('max delay ms'), - abstract_arg('jitter'), - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/http_client_debug.php b/vendor/symfony/framework-bundle/Resources/config/http_client_debug.php deleted file mode 100644 index 44031eb..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/http_client_debug.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.http_client', HttpClientDataCollector::class) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/http_client.html.twig', - 'id' => 'http_client', - 'priority' => 250, - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/identity_translator.php b/vendor/symfony/framework-bundle/Resources/config/identity_translator.php deleted file mode 100644 index a9066e1..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/identity_translator.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\IdentityTranslator; -use Symfony\Contracts\Translation\TranslatorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator', IdentityTranslator::class) - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(TranslatorInterface::class, 'translator') - - ->set('identity_translator', IdentityTranslator::class) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/lock.php b/vendor/symfony/framework-bundle/Resources/config/lock.php deleted file mode 100644 index 4e14636..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/lock.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Lock\LockFactory; -use Symfony\Component\Lock\Store\CombinedStore; -use Symfony\Component\Lock\Strategy\ConsensusStrategy; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('lock.store.combined.abstract', CombinedStore::class)->abstract() - ->args([abstract_arg('List of stores'), service('lock.strategy.majority')]) - - ->set('lock.strategy.majority', ConsensusStrategy::class) - - ->set('lock.factory.abstract', LockFactory::class)->abstract() - ->args([abstract_arg('Store')]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'lock']) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/mailer.php b/vendor/symfony/framework-bundle/Resources/config/mailer.php deleted file mode 100644 index b15b292..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/mailer.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\EventListener\EnvelopeListener; -use Symfony\Component\Mailer\EventListener\MessageListener; -use Symfony\Component\Mailer\EventListener\MessageLoggerListener; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mailer\Messenger\MessageHandler; -use Symfony\Component\Mailer\Transport; -use Symfony\Component\Mailer\Transport\TransportInterface; -use Symfony\Component\Mailer\Transport\Transports; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.mailer', Mailer::class) - ->args([ - service('mailer.transports'), - abstract_arg('message bus'), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - ->alias('mailer', 'mailer.mailer') - ->alias(MailerInterface::class, 'mailer.mailer') - - ->set('mailer.transports', Transports::class) - ->factory([service('mailer.transport_factory'), 'fromStrings']) - ->args([ - abstract_arg('transports'), - ]) - - ->set('mailer.transport_factory', Transport::class) - ->args([ - tagged_iterator('mailer.transport_factory'), - ]) - - ->set('mailer.default_transport', TransportInterface::class) - ->factory([service('mailer.transport_factory'), 'fromString']) - ->args([ - abstract_arg('env(MAILER_DSN)'), - ]) - ->alias(TransportInterface::class, 'mailer.default_transport') - - ->set('mailer.messenger.message_handler', MessageHandler::class) - ->args([ - service('mailer.transports'), - ]) - ->tag('messenger.message_handler') - - ->set('mailer.envelope_listener', EnvelopeListener::class) - ->args([ - abstract_arg('sender'), - abstract_arg('recipients'), - ]) - ->tag('kernel.event_subscriber') - - ->set('mailer.message_listener', MessageListener::class) - ->args([ - abstract_arg('headers'), - ]) - ->tag('kernel.event_subscriber') - - ->set('mailer.logger_message_listener', MessageLoggerListener::class) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - ->deprecate('symfony/framework-bundle', '5.2', 'The "%service_id%" service is deprecated, use "mailer.message_logger_listener" instead.') - - ->set('mailer.message_logger_listener', MessageLoggerListener::class) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/mailer_debug.php b/vendor/symfony/framework-bundle/Resources/config/mailer_debug.php deleted file mode 100644 index cdb2057..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/mailer_debug.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\DataCollector\MessageDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.data_collector', MessageDataCollector::class) - ->args([ - service('mailer.message_logger_listener'), - ]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/mailer.html.twig', - 'id' => 'mailer', - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/mailer_transports.php b/vendor/symfony/framework-bundle/Resources/config/mailer_transports.php deleted file mode 100644 index 7bddfa7..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/mailer_transports.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory; -use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory; -use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory; -use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpTransportFactory; -use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory; -use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory; -use Symfony\Component\Mailer\Transport\AbstractTransportFactory; -use Symfony\Component\Mailer\Transport\NativeTransportFactory; -use Symfony\Component\Mailer\Transport\NullTransportFactory; -use Symfony\Component\Mailer\Transport\SendmailTransportFactory; -use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mailer.transport_factory.abstract', AbstractTransportFactory::class) - ->abstract() - ->args([ - service('event_dispatcher'), - service('http_client')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'mailer']) - - ->set('mailer.transport_factory.amazon', SesTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.gmail', GmailTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailchimp', MandrillTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailjet', MailjetTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.mailgun', MailgunTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.postmark', PostmarkTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendgrid', SendgridTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.null', NullTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendmail', SendmailTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.sendinblue', SendinblueTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.ohmysmtp', OhMySmtpTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory') - - ->set('mailer.transport_factory.smtp', EsmtpTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory', ['priority' => -100]) - - ->set('mailer.transport_factory.native', NativeTransportFactory::class) - ->parent('mailer.transport_factory.abstract') - ->tag('mailer.transport_factory'); -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/messenger.php b/vendor/symfony/framework-bundle/Resources/config/messenger.php deleted file mode 100644 index 813d503..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/messenger.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory; -use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory; -use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory; -use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory; -use Symfony\Component\Messenger\EventListener\AddErrorDetailsStampListener; -use Symfony\Component\Messenger\EventListener\DispatchPcntlSignalListener; -use Symfony\Component\Messenger\EventListener\ResetServicesListener; -use Symfony\Component\Messenger\EventListener\SendFailedMessageForRetryListener; -use Symfony\Component\Messenger\EventListener\SendFailedMessageToFailureTransportListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnCustomStopExceptionListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnRestartSignalListener; -use Symfony\Component\Messenger\EventListener\StopWorkerOnSigtermSignalListener; -use Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware; -use Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware; -use Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware; -use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware; -use Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware; -use Symfony\Component\Messenger\Middleware\RouterContextMiddleware; -use Symfony\Component\Messenger\Middleware\SendMessageMiddleware; -use Symfony\Component\Messenger\Middleware\TraceableMiddleware; -use Symfony\Component\Messenger\Middleware\ValidationMiddleware; -use Symfony\Component\Messenger\Retry\MultiplierRetryStrategy; -use Symfony\Component\Messenger\RoutableMessageBus; -use Symfony\Component\Messenger\Transport\InMemoryTransportFactory; -use Symfony\Component\Messenger\Transport\Sender\SendersLocator; -use Symfony\Component\Messenger\Transport\Serialization\Normalizer\FlattenExceptionNormalizer; -use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer; -use Symfony\Component\Messenger\Transport\Serialization\Serializer; -use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface; -use Symfony\Component\Messenger\Transport\Sync\SyncTransportFactory; -use Symfony\Component\Messenger\Transport\TransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->alias(SerializerInterface::class, 'messenger.default_serializer') - - // Asynchronous - ->set('messenger.senders_locator', SendersLocator::class) - ->args([ - abstract_arg('per message senders map'), - abstract_arg('senders service locator'), - ]) - ->set('messenger.middleware.send_message', SendMessageMiddleware::class) - ->args([ - service('messenger.senders_locator'), - service('event_dispatcher'), - ]) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'messenger']) - - // Message encoding/decoding - ->set('messenger.transport.symfony_serializer', Serializer::class) - ->args([ - service('serializer'), - abstract_arg('format'), - abstract_arg('context'), - ]) - - ->set('serializer.normalizer.flatten_exception', FlattenExceptionNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -880]) - - ->set('messenger.transport.native_php_serializer', PhpSerializer::class) - - // Middleware - ->set('messenger.middleware.handle_message', HandleMessageMiddleware::class) - ->abstract() - ->args([ - abstract_arg('bus handler resolver'), - ]) - ->tag('monolog.logger', ['channel' => 'messenger']) - ->call('setLogger', [service('logger')->ignoreOnInvalid()]) - - ->set('messenger.middleware.add_bus_name_stamp_middleware', AddBusNameStampMiddleware::class) - ->abstract() - - ->set('messenger.middleware.dispatch_after_current_bus', DispatchAfterCurrentBusMiddleware::class) - - ->set('messenger.middleware.validation', ValidationMiddleware::class) - ->args([ - service('validator'), - ]) - - ->set('messenger.middleware.reject_redelivered_message_middleware', RejectRedeliveredMessageMiddleware::class) - - ->set('messenger.middleware.failed_message_processing_middleware', FailedMessageProcessingMiddleware::class) - - ->set('messenger.middleware.traceable', TraceableMiddleware::class) - ->abstract() - ->args([ - service('debug.stopwatch'), - ]) - - ->set('messenger.middleware.router_context', RouterContextMiddleware::class) - ->args([ - service('router'), - ]) - - // Discovery - ->set('messenger.receiver_locator', ServiceLocator::class) - ->args([ - [], - ]) - ->tag('container.service_locator') - - // Transports - ->set('messenger.transport_factory', TransportFactory::class) - ->args([ - tagged_iterator('messenger.transport_factory'), - ]) - - ->set('messenger.transport.amqp.factory', AmqpTransportFactory::class) - - ->set('messenger.transport.redis.factory', RedisTransportFactory::class) - - ->set('messenger.transport.sync.factory', SyncTransportFactory::class) - ->args([ - service('messenger.routable_message_bus'), - ]) - ->tag('messenger.transport_factory') - - ->set('messenger.transport.in_memory.factory', InMemoryTransportFactory::class) - ->tag('messenger.transport_factory') - ->tag('kernel.reset', ['method' => 'reset']) - - ->set('messenger.transport.sqs.factory', AmazonSqsTransportFactory::class) - ->args([ - service('logger')->ignoreOnInvalid(), - ]) - - ->set('messenger.transport.beanstalkd.factory', BeanstalkdTransportFactory::class) - - // retry - ->set('messenger.retry_strategy_locator', ServiceLocator::class) - ->args([ - [], - ]) - ->tag('container.service_locator') - - ->set('messenger.retry.abstract_multiplier_retry_strategy', MultiplierRetryStrategy::class) - ->abstract() - ->args([ - abstract_arg('max retries'), - abstract_arg('delay ms'), - abstract_arg('multiplier'), - abstract_arg('max delay ms'), - ]) - - // worker event listener - ->set('messenger.retry.send_failed_message_for_retry_listener', SendFailedMessageForRetryListener::class) - ->args([ - abstract_arg('senders service locator'), - service('messenger.retry_strategy_locator'), - service('logger')->ignoreOnInvalid(), - service('event_dispatcher'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.failure.add_error_details_stamp_listener', AddErrorDetailsStampListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.failure.send_failed_message_to_failure_transport_listener', SendFailedMessageToFailureTransportListener::class) - ->args([ - abstract_arg('failure transports'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.listener.dispatch_pcntl_signal_listener', DispatchPcntlSignalListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.stop_worker_on_restart_signal_listener', StopWorkerOnRestartSignalListener::class) - ->args([ - service('cache.messenger.restart_workers_signal'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'messenger']) - - ->set('messenger.listener.stop_worker_on_sigterm_signal_listener', StopWorkerOnSigtermSignalListener::class) - ->args([ - service('logger')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.stop_worker_on_stop_exception_listener', StopWorkerOnCustomStopExceptionListener::class) - ->tag('kernel.event_subscriber') - - ->set('messenger.listener.reset_services', ResetServicesListener::class) - ->args([ - service('services_resetter'), - ]) - - ->set('messenger.routable_message_bus', RoutableMessageBus::class) - ->args([ - abstract_arg('message bus locator'), - service('messenger.default_bus'), - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/messenger_debug.php b/vendor/symfony/framework-bundle/Resources/config/messenger_debug.php deleted file mode 100644 index 58f9be1..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/messenger_debug.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Messenger\DataCollector\MessengerDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.messenger', MessengerDataCollector::class) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/messenger.html.twig', - 'id' => 'messenger', - 'priority' => 100, - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/mime_type.php b/vendor/symfony/framework-bundle/Resources/config/mime_type.php deleted file mode 100644 index a7e9bbd..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/mime_type.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Mime\MimeTypeGuesserInterface; -use Symfony\Component\Mime\MimeTypes; -use Symfony\Component\Mime\MimeTypesInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('mime_types', MimeTypes::class) - ->call('setDefault', [service('mime_types')]) - - ->alias(MimeTypesInterface::class, 'mime_types') - ->alias(MimeTypeGuesserInterface::class, 'mime_types') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/notifier.php b/vendor/symfony/framework-bundle/Resources/config/notifier.php deleted file mode 100644 index 73beb2c..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/notifier.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Monolog\Handler\NotifierHandler; -use Symfony\Component\Notifier\Channel\BrowserChannel; -use Symfony\Component\Notifier\Channel\ChannelPolicy; -use Symfony\Component\Notifier\Channel\ChatChannel; -use Symfony\Component\Notifier\Channel\EmailChannel; -use Symfony\Component\Notifier\Channel\PushChannel; -use Symfony\Component\Notifier\Channel\SmsChannel; -use Symfony\Component\Notifier\Chatter; -use Symfony\Component\Notifier\ChatterInterface; -use Symfony\Component\Notifier\EventListener\NotificationLoggerListener; -use Symfony\Component\Notifier\EventListener\SendFailedMessageToNotifierListener; -use Symfony\Component\Notifier\Message\ChatMessage; -use Symfony\Component\Notifier\Message\PushMessage; -use Symfony\Component\Notifier\Message\SmsMessage; -use Symfony\Component\Notifier\Messenger\MessageHandler; -use Symfony\Component\Notifier\Notifier; -use Symfony\Component\Notifier\NotifierInterface; -use Symfony\Component\Notifier\Texter; -use Symfony\Component\Notifier\TexterInterface; -use Symfony\Component\Notifier\Transport; -use Symfony\Component\Notifier\Transport\Transports; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('notifier', Notifier::class) - ->args([tagged_locator('notifier.channel', 'channel'), service('notifier.channel_policy')->ignoreOnInvalid()]) - - ->alias(NotifierInterface::class, 'notifier') - - ->set('notifier.channel_policy', ChannelPolicy::class) - ->args([[]]) - - ->set('notifier.channel.browser', BrowserChannel::class) - ->args([service('request_stack')]) - ->tag('notifier.channel', ['channel' => 'browser']) - - ->set('notifier.channel.chat', ChatChannel::class) - ->args([service('chatter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'chat']) - - ->set('notifier.channel.sms', SmsChannel::class) - ->args([service('texter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'sms']) - - ->set('notifier.channel.email', EmailChannel::class) - ->args([service('mailer.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'email']) - - ->set('notifier.channel.push', PushChannel::class) - ->args([service('texter.transports'), service('messenger.default_bus')->ignoreOnInvalid()]) - ->tag('notifier.channel', ['channel' => 'push']) - - ->set('notifier.monolog_handler', NotifierHandler::class) - ->args([service('notifier')]) - - ->set('notifier.failed_message_listener', SendFailedMessageToNotifierListener::class) - ->args([service('notifier')]) - - ->set('chatter', Chatter::class) - ->args([ - service('chatter.transports'), - service('messenger.default_bus')->ignoreOnInvalid(), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - - ->alias(ChatterInterface::class, 'chatter') - - ->set('chatter.transports', Transports::class) - ->factory([service('chatter.transport_factory'), 'fromStrings']) - ->args([[]]) - - ->set('chatter.transport_factory', Transport::class) - ->args([tagged_iterator('chatter.transport_factory')]) - - ->set('chatter.messenger.chat_handler', MessageHandler::class) - ->args([service('chatter.transports')]) - ->tag('messenger.message_handler', ['handles' => ChatMessage::class]) - - ->set('texter', Texter::class) - ->args([ - service('texter.transports'), - service('messenger.default_bus')->ignoreOnInvalid(), - service('event_dispatcher')->ignoreOnInvalid(), - ]) - - ->alias(TexterInterface::class, 'texter') - - ->set('texter.transports', Transports::class) - ->factory([service('texter.transport_factory'), 'fromStrings']) - ->args([[]]) - - ->set('texter.transport_factory', Transport::class) - ->args([tagged_iterator('texter.transport_factory')]) - - ->set('texter.messenger.sms_handler', MessageHandler::class) - ->args([service('texter.transports')]) - ->tag('messenger.message_handler', ['handles' => SmsMessage::class]) - - ->set('texter.messenger.push_handler', MessageHandler::class) - ->args([service('texter.transports')]) - ->tag('messenger.message_handler', ['handles' => PushMessage::class]) - - ->set('notifier.logger_notification_listener', NotificationLoggerListener::class) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/notifier_debug.php b/vendor/symfony/framework-bundle/Resources/config/notifier_debug.php deleted file mode 100644 index 6147d34..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/notifier_debug.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Notifier\DataCollector\NotificationDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('notifier.data_collector', NotificationDataCollector::class) - ->args([service('notifier.logger_notification_listener')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/notifier.html.twig', 'id' => 'notifier']) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/notifier_transports.php b/vendor/symfony/framework-bundle/Resources/config/notifier_transports.php deleted file mode 100644 index c070288..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/notifier_transports.php +++ /dev/null @@ -1,277 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; -use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; -use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; -use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; -use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory; -use Symfony\Component\Notifier\Bridge\Expo\ExpoTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory; -use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransportFactory; -use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory; -use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory; -use Symfony\Component\Notifier\Bridge\Gitter\GitterTransportFactory; -use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory; -use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory; -use Symfony\Component\Notifier\Bridge\Mailjet\MailjetTransportFactory; -use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; -use Symfony\Component\Notifier\Bridge\Mercure\MercureTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransportFactory; -use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory; -use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; -use Symfony\Component\Notifier\Bridge\Mobyt\MobytTransportFactory; -use Symfony\Component\Notifier\Bridge\Nexmo\NexmoTransportFactory; -use Symfony\Component\Notifier\Bridge\Octopush\OctopushTransportFactory; -use Symfony\Component\Notifier\Bridge\OneSignal\OneSignalTransportFactory; -use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory; -use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; -use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory; -use Symfony\Component\Notifier\Bridge\Sinch\SinchTransportFactory; -use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; -use Symfony\Component\Notifier\Bridge\Sms77\Sms77TransportFactory; -use Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory; -use Symfony\Component\Notifier\Bridge\SmsBiuras\SmsBiurasTransportFactory; -use Symfony\Component\Notifier\Bridge\Smsc\SmscTransportFactory; -use Symfony\Component\Notifier\Bridge\SpotHit\SpotHitTransportFactory; -use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; -use Symfony\Component\Notifier\Bridge\Telnyx\TelnyxTransportFactory; -use Symfony\Component\Notifier\Bridge\TurboSms\TurboSmsTransportFactory; -use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory; -use Symfony\Component\Notifier\Bridge\Vonage\VonageTransportFactory; -use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory; -use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory; -use Symfony\Component\Notifier\Transport\AbstractTransportFactory; -use Symfony\Component\Notifier\Transport\NullTransportFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->alias('notifier.transport_factory.allmysms', 'notifier.transport_factory.all-my-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.all-my-sms" instead.') - ->alias('notifier.transport_factory.fakechat', 'notifier.transport_factory.fake-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.fake-chat" instead.') - ->alias('notifier.transport_factory.fakesms', 'notifier.transport_factory.fake-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.fake-sms" instead.') - ->alias('notifier.transport_factory.freemobile', 'notifier.transport_factory.free-mobile') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.free-mobile" instead.') - ->alias('notifier.transport_factory.gatewayapi', 'notifier.transport_factory.gateway-api') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.gateway-api" instead.') - ->alias('notifier.transport_factory.googlechat', 'notifier.transport_factory.google-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.google-chat" instead.') - ->alias('notifier.transport_factory.lightsms', 'notifier.transport_factory.light-sms') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.light-sms" instead.') - ->alias('notifier.transport_factory.linkedin', 'notifier.transport_factory.linked-in') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.linked-in" instead.') - ->alias('notifier.transport_factory.microsoftteams', 'notifier.transport_factory.microsoft-teams') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.microsoft-teams" instead.') - ->alias('notifier.transport_factory.onesignal', 'notifier.transport_factory.one-signal') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.one-signal" instead.') - ->alias('notifier.transport_factory.ovhcloud', 'notifier.transport_factory.ovh-cloud') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.ovh-cloud" instead.') - ->alias('notifier.transport_factory.rocketchat', 'notifier.transport_factory.rocket-chat') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.rocket-chat" instead.') - ->alias('notifier.transport_factory.spothit', 'notifier.transport_factory.spot-hit') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%alias_id% service is deprecated, use "notifier.transport_factory.spot-hit" instead.') - - ->set('notifier.transport_factory.abstract', AbstractTransportFactory::class) - ->abstract() - ->args([service('event_dispatcher'), service('http_client')->ignoreOnInvalid()]) - - ->set('notifier.transport_factory.slack', SlackTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.linked-in', LinkedInTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.telegram', TelegramTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.mattermost', MattermostTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.nexmo', NexmoTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ->deprecate('symfony/framework-bundle', '5.4', 'The "%service_id% service is deprecated, use "notifier.transport_factory.vonage" instead.') - - ->set('notifier.transport_factory.vonage', VonageTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.rocket-chat', RocketChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.google-chat', GoogleChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.twilio', TwilioTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.all-my-sms', AllMySmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.firebase', FirebaseTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.free-mobile', FreeMobileTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.spot-hit', SpotHitTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.fake-chat', FakeChatTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.fake-sms', FakeSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.ovh-cloud', OvhCloudTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sinch', SinchTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.zulip', ZulipTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.infobip', InfobipTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mobyt', MobytTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.smsapi', SmsapiTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.esendex', EsendexTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sendinblue', SendinblueTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.iqsms', IqsmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.octopush', OctopushTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.discord', DiscordTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.microsoft-teams', MicrosoftTeamsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.gateway-api', GatewayApiTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mercure', MercureTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.gitter', GitterTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.clickatell', ClickatellTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.amazon-sns', AmazonSnsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ->tag('chatter.transport_factory') - - ->set('notifier.transport_factory.null', NullTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('chatter.transport_factory') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.light-sms', LightSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sms-biuras', SmsBiurasTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.smsc', SmscTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.message-bird', MessageBirdTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.message-media', MessageMediaTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.telnyx', TelnyxTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.mailjet', MailjetTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.yunpian', YunpianTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.turbo-sms', TurboSmsTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.sms77', Sms77TransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.one-signal', OneSignalTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - - ->set('notifier.transport_factory.expo', ExpoTransportFactory::class) - ->parent('notifier.transport_factory.abstract') - ->tag('texter.transport_factory') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/profiling.php b/vendor/symfony/framework-bundle/Resources/config/profiling.php deleted file mode 100644 index 2212178..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/profiling.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\ProfilerListener; -use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('profiler', Profiler::class) - ->public() - ->args([service('profiler.storage'), service('logger')->nullOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'profiler']) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.4']) - - ->set('profiler.storage', FileProfilerStorage::class) - ->args([param('profiler.storage.dsn')]) - - ->set('profiler_listener', ProfilerListener::class) - ->args([ - service('profiler'), - service('request_stack'), - null, - param('profiler_listener.only_exceptions'), - param('profiler_listener.only_main_requests'), - ]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/property_access.php b/vendor/symfony/framework-bundle/Resources/config/property_access.php deleted file mode 100644 index 85ab9f1..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/property_access.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('property_accessor', PropertyAccessor::class) - ->args([ - abstract_arg('magic methods allowed, set by the extension'), - abstract_arg('throw exceptions, set by the extension'), - service('cache.property_access')->ignoreOnInvalid(), - abstract_arg('propertyReadInfoExtractor, set by the extension'), - abstract_arg('propertyWriteInfoExtractor, set by the extension'), - ]) - - ->alias(PropertyAccessorInterface::class, 'property_accessor') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/property_info.php b/vendor/symfony/framework-bundle/Resources/config/property_info.php deleted file mode 100644 index 9058783..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/property_info.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractor; -use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('property_info', PropertyInfoExtractor::class) - ->args([[], [], [], [], []]) - - ->alias(PropertyAccessExtractorInterface::class, 'property_info') - ->alias(PropertyDescriptionExtractorInterface::class, 'property_info') - ->alias(PropertyInfoExtractorInterface::class, 'property_info') - ->alias(PropertyTypeExtractorInterface::class, 'property_info') - ->alias(PropertyListExtractorInterface::class, 'property_info') - ->alias(PropertyInitializableExtractorInterface::class, 'property_info') - - ->set('property_info.cache', PropertyInfoCacheExtractor::class) - ->decorate('property_info') - ->args([service('property_info.cache.inner'), service('cache.property_info')]) - - // Extractor - ->set('property_info.reflection_extractor', ReflectionExtractor::class) - ->tag('property_info.list_extractor', ['priority' => -1000]) - ->tag('property_info.type_extractor', ['priority' => -1002]) - ->tag('property_info.access_extractor', ['priority' => -1000]) - ->tag('property_info.initializable_extractor', ['priority' => -1000]) - - ->alias(PropertyReadInfoExtractorInterface::class, 'property_info.reflection_extractor') - ->alias(PropertyWriteInfoExtractorInterface::class, 'property_info.reflection_extractor') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/rate_limiter.php b/vendor/symfony/framework-bundle/Resources/config/rate_limiter.php deleted file mode 100644 index 727a1f6..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/rate_limiter.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\RateLimiter\RateLimiterFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('cache.rate_limiter') - ->parent('cache.app') - ->tag('cache.pool') - - ->set('limiter', RateLimiterFactory::class) - ->abstract() - ->args([ - abstract_arg('config'), - abstract_arg('storage'), - null, - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/request.php b/vendor/symfony/framework-bundle/Resources/config/request.php deleted file mode 100644 index ef8fc9a..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/request.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('request.add_request_formats_listener', AddRequestFormatsListener::class) - ->args([abstract_arg('formats')]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/routing.php b/vendor/symfony/framework-bundle/Resources/config/routing.php deleted file mode 100644 index 09e340f..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/routing.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer; -use Symfony\Bundle\FrameworkBundle\Controller\RedirectController; -use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; -use Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader; -use Symfony\Bundle\FrameworkBundle\Routing\RedirectableCompiledUrlMatcher; -use Symfony\Bundle\FrameworkBundle\Routing\Router; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\HttpKernel\EventListener\RouterListener; -use Symfony\Component\Routing\Generator\CompiledUrlGenerator; -use Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Loader\ContainerLoader; -use Symfony\Component\Routing\Loader\DirectoryLoader; -use Symfony\Component\Routing\Loader\GlobFileLoader; -use Symfony\Component\Routing\Loader\PhpFileLoader; -use Symfony\Component\Routing\Loader\XmlFileLoader; -use Symfony\Component\Routing\Loader\YamlFileLoader; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; -use Symfony\Component\Routing\Matcher\ExpressionLanguageProvider; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RequestContextAwareInterface; -use Symfony\Component\Routing\RouterInterface; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('router.request_context.host', 'localhost') - ->set('router.request_context.scheme', 'http') - ->set('router.request_context.base_url', '') - ; - - $container->services() - ->set('routing.resolver', LoaderResolver::class) - - ->set('routing.loader.xml', XmlFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.yml', YamlFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.php', PhpFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.glob', GlobFileLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.directory', DirectoryLoader::class) - ->args([ - service('file_locator'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader.container', ContainerLoader::class) - ->args([ - tagged_locator('routing.route_loader'), - '%kernel.environment%', - ]) - ->tag('routing.loader') - - ->set('routing.loader', DelegatingLoader::class) - ->public() - ->args([ - service('routing.resolver'), - [], // Default options - [], // Default requirements - ]) - - ->set('router.default', Router::class) - ->args([ - service(ContainerInterface::class), - param('router.resource'), - [ - 'cache_dir' => param('kernel.cache_dir'), - 'debug' => param('kernel.debug'), - 'generator_class' => CompiledUrlGenerator::class, - 'generator_dumper_class' => CompiledUrlGeneratorDumper::class, - 'matcher_class' => RedirectableCompiledUrlMatcher::class, - 'matcher_dumper_class' => CompiledUrlMatcherDumper::class, - ], - service('router.request_context')->ignoreOnInvalid(), - service('parameter_bag')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - param('kernel.default_locale'), - ]) - ->call('setConfigCacheFactory', [ - service('config_cache_factory'), - ]) - ->tag('monolog.logger', ['channel' => 'router']) - ->tag('container.service_subscriber', ['id' => 'routing.loader']) - ->alias('router', 'router.default') - ->public() - ->alias(RouterInterface::class, 'router') - ->alias(UrlGeneratorInterface::class, 'router') - ->alias(UrlMatcherInterface::class, 'router') - ->alias(RequestContextAwareInterface::class, 'router') - - ->set('router.request_context', RequestContext::class) - ->factory([RequestContext::class, 'fromUri']) - ->args([ - param('router.request_context.base_url'), - param('router.request_context.host'), - param('router.request_context.scheme'), - param('request_listener.http_port'), - param('request_listener.https_port'), - ]) - ->call('setParameter', [ - '_functions', - service('router.expression_language_provider')->ignoreOnInvalid(), - ]) - ->alias(RequestContext::class, 'router.request_context') - - ->set('router.expression_language_provider', ExpressionLanguageProvider::class) - ->args([ - tagged_locator('routing.expression_language_function', 'function'), - ]) - ->tag('routing.expression_language_provider') - - ->set('router.cache_warmer', RouterCacheWarmer::class) - ->args([service(ContainerInterface::class)]) - ->tag('container.service_subscriber', ['id' => 'router']) - ->tag('kernel.cache_warmer') - - ->set('router_listener', RouterListener::class) - ->args([ - service('router'), - service('request_stack'), - service('router.request_context')->ignoreOnInvalid(), - service('logger')->ignoreOnInvalid(), - param('kernel.project_dir'), - param('kernel.debug'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'request']) - - ->set(RedirectController::class) - ->public() - ->args([ - service('router'), - inline_service('int') - ->factory([service('router.request_context'), 'getHttpPort']), - inline_service('int') - ->factory([service('router.request_context'), 'getHttpsPort']), - ]) - - ->set(TemplateController::class) - ->args([ - service('twig')->ignoreOnInvalid(), - ]) - ->public() - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/routing/errors.xml b/vendor/symfony/framework-bundle/Resources/config/routing/errors.xml deleted file mode 100644 index 13a9cc4..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/routing/errors.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - error_controller::preview - html - \d+ - - diff --git a/vendor/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd b/vendor/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd deleted file mode 100644 index dfbf3e5..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/schema/symfony-1.0.xsd +++ /dev/null @@ -1,806 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/framework-bundle/Resources/config/secrets.php b/vendor/symfony/framework-bundle/Resources/config/secrets.php deleted file mode 100644 index a21d282..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/secrets.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Secrets\DotenvVault; -use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('secrets.vault', SodiumVault::class) - ->args([ - abstract_arg('Secret dir, set in FrameworkExtension'), - service('secrets.decryption_key')->ignoreOnInvalid(), - ]) - ->tag('container.env_var_loader') - - ->set('secrets.decryption_key') - ->parent('container.env') - ->args([abstract_arg('Decryption env var, set in FrameworkExtension')]) - - ->set('secrets.local_vault', DotenvVault::class) - ->args([abstract_arg('.env file path, set in FrameworkExtension')]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/security_csrf.php b/vendor/symfony/framework-bundle/Resources/config/security_csrf.php deleted file mode 100644 index 9644d5b..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/security_csrf.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Extension\CsrfExtension; -use Symfony\Bridge\Twig\Extension\CsrfRuntime; -use Symfony\Component\Security\Csrf\CsrfTokenManager; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface; -use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; -use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage; -use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.csrf.token_generator', UriSafeTokenGenerator::class) - - ->alias(TokenGeneratorInterface::class, 'security.csrf.token_generator') - - ->set('security.csrf.token_storage', SessionTokenStorage::class) - ->args([service('request_stack')]) - - ->alias(TokenStorageInterface::class, 'security.csrf.token_storage') - - ->set('security.csrf.token_manager', CsrfTokenManager::class) - ->public() - ->args([ - service('security.csrf.token_generator'), - service('security.csrf.token_storage'), - service('request_stack')->ignoreOnInvalid(), - ]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(CsrfTokenManagerInterface::class, 'security.csrf.token_manager') - - ->set('twig.runtime.security_csrf', CsrfRuntime::class) - ->args([service('security.csrf.token_manager')]) - ->tag('twig.runtime') - - ->set('twig.extension.security_csrf', CsrfExtension::class) - ->tag('twig.extension') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/serializer.php b/vendor/symfony/framework-bundle/Resources/config/serializer.php deleted file mode 100644 index cb7d79d..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/serializer.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer; -use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor; -use Symfony\Component\Serializer\Encoder\CsvEncoder; -use Symfony\Component\Serializer\Encoder\DecoderInterface; -use Symfony\Component\Serializer\Encoder\EncoderInterface; -use Symfony\Component\Serializer\Encoder\JsonEncoder; -use Symfony\Component\Serializer\Encoder\XmlEncoder; -use Symfony\Component\Serializer\Encoder\YamlEncoder; -use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata; -use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; -use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; -use Symfony\Component\Serializer\Mapping\Loader\LoaderChain; -use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; -use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter; -use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; -use Symfony\Component\Serializer\Normalizer\BackedEnumNormalizer; -use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer; -use Symfony\Component\Serializer\Normalizer\DataUriNormalizer; -use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer; -use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; -use Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\FormErrorNormalizer; -use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer; -use Symfony\Component\Serializer\Normalizer\MimeMessageNormalizer; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; -use Symfony\Component\Serializer\Normalizer\ProblemNormalizer; -use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; -use Symfony\Component\Serializer\Normalizer\UidNormalizer; -use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer; -use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Serializer\SerializerInterface; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('serializer.mapping.cache.file', '%kernel.cache_dir%/serialization.php') - ; - - $container->services() - ->set('serializer', Serializer::class) - ->public() - ->args([[], []]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->alias(SerializerInterface::class, 'serializer') - ->alias(NormalizerInterface::class, 'serializer') - ->alias(DenormalizerInterface::class, 'serializer') - ->alias(EncoderInterface::class, 'serializer') - ->alias(DecoderInterface::class, 'serializer') - - ->alias('serializer.property_accessor', 'property_accessor') - - // Discriminator Map - ->set('serializer.mapping.class_discriminator_resolver', ClassDiscriminatorFromClassMetadata::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - - ->alias(ClassDiscriminatorResolverInterface::class, 'serializer.mapping.class_discriminator_resolver') - - // Normalizer - ->set('serializer.normalizer.constraint_violation_list', ConstraintViolationListNormalizer::class) - ->args([[], service('serializer.name_converter.metadata_aware')]) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.mime_message', MimeMessageNormalizer::class) - ->args([service('serializer.normalizer.property')]) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.datetimezone', DateTimeZoneNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.dateinterval', DateIntervalNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.data_uri', DataUriNormalizer::class) - ->args([service('mime_types')->nullOnInvalid()]) - ->tag('serializer.normalizer', ['priority' => -920]) - - ->set('serializer.normalizer.datetime', DateTimeNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -910]) - - ->set('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class) - ->args([null, null]) - ->tag('serializer.normalizer', ['priority' => -900]) - - ->set('serializer.normalizer.problem', ProblemNormalizer::class) - ->args([param('kernel.debug')]) - ->tag('serializer.normalizer', ['priority' => -890]) - - ->set('serializer.denormalizer.unwrapping', UnwrappingDenormalizer::class) - ->args([service('serializer.property_accessor')]) - ->tag('serializer.normalizer', ['priority' => 1000]) - - ->set('serializer.normalizer.uid', UidNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -890]) - - ->set('serializer.normalizer.form_error', FormErrorNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - - ->set('serializer.normalizer.object', ObjectNormalizer::class) - ->args([ - service('serializer.mapping.class_metadata_factory'), - service('serializer.name_converter.metadata_aware'), - service('serializer.property_accessor'), - service('property_info')->ignoreOnInvalid(), - service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), - null, - [], - ]) - ->tag('serializer.normalizer', ['priority' => -1000]) - - ->alias(ObjectNormalizer::class, 'serializer.normalizer.object') - - ->set('serializer.normalizer.property', PropertyNormalizer::class) - ->args([ - service('serializer.mapping.class_metadata_factory'), - service('serializer.name_converter.metadata_aware'), - service('property_info')->ignoreOnInvalid(), - service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), - null, - [], - ]) - - ->alias(PropertyNormalizer::class, 'serializer.normalizer.property') - - ->set('serializer.denormalizer.array', ArrayDenormalizer::class) - ->tag('serializer.normalizer', ['priority' => -990]) - - // Loader - ->set('serializer.mapping.chain_loader', LoaderChain::class) - ->args([[]]) - - // Class Metadata Factory - ->set('serializer.mapping.class_metadata_factory', ClassMetadataFactory::class) - ->args([service('serializer.mapping.chain_loader')]) - - ->alias(ClassMetadataFactoryInterface::class, 'serializer.mapping.class_metadata_factory') - - // Cache - ->set('serializer.mapping.cache_warmer', SerializerCacheWarmer::class) - ->args([abstract_arg('The serializer metadata loaders'), param('serializer.mapping.cache.file')]) - ->tag('kernel.cache_warmer') - - ->set('serializer.mapping.cache.symfony', CacheItemPoolInterface::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([param('serializer.mapping.cache.file'), service('cache.serializer')]) - - ->set('serializer.mapping.cache_class_metadata_factory', CacheClassMetadataFactory::class) - ->decorate('serializer.mapping.class_metadata_factory') - ->args([ - service('serializer.mapping.cache_class_metadata_factory.inner'), - service('serializer.mapping.cache.symfony'), - ]) - - // Encoders - ->set('serializer.encoder.xml', XmlEncoder::class) - ->tag('serializer.encoder') - - ->set('serializer.encoder.json', JsonEncoder::class) - ->tag('serializer.encoder') - - ->set('serializer.encoder.yaml', YamlEncoder::class) - ->args([null, null]) - ->tag('serializer.encoder') - - ->set('serializer.encoder.csv', CsvEncoder::class) - ->tag('serializer.encoder') - - // Name converter - ->set('serializer.name_converter.camel_case_to_snake_case', CamelCaseToSnakeCaseNameConverter::class) - - ->set('serializer.name_converter.metadata_aware', MetadataAwareNameConverter::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - - // PropertyInfo extractor - ->set('property_info.serializer_extractor', SerializerExtractor::class) - ->args([service('serializer.mapping.class_metadata_factory')]) - ->tag('property_info.list_extractor', ['priority' => -999]) - - // ErrorRenderer integration - ->alias('error_renderer', 'error_renderer.serializer') - ->alias('error_renderer.serializer', 'error_handler.error_renderer.serializer') - - ->set('error_handler.error_renderer.serializer', SerializerErrorRenderer::class) - ->args([ - service('serializer'), - inline_service() - ->factory([SerializerErrorRenderer::class, 'getPreferredFormat']) - ->args([service('request_stack')]), - service('error_renderer.html'), - inline_service() - ->factory([HtmlErrorRenderer::class, 'isDebug']) - ->args([service('request_stack'), param('kernel.debug')]), - ]) - ; - - if (interface_exists(\BackedEnum::class)) { - $container->services() - ->set('serializer.normalizer.backed_enum', BackedEnumNormalizer::class) - ->tag('serializer.normalizer', ['priority' => -915]) - ; - } -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/services.php b/vendor/symfony/framework-bundle/Resources/config/services.php deleted file mode 100644 index a26dfb5..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/services.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer; -use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; -use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; -use Symfony\Component\Config\ResourceCheckerConfigCacheFactory; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker; -use Symfony\Component\DependencyInjection\EnvVarProcessor; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag; -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcherInterfaceComponentAlias; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\UrlHelper; -use Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate; -use Symfony\Component\HttpKernel\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; -use Symfony\Component\HttpKernel\EventListener\LocaleAwareListener; -use Symfony\Component\HttpKernel\HttpCache\Store; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\HttpKernel\UriSigner; -use Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner; -use Symfony\Component\Runtime\Runner\Symfony\ResponseRunner; -use Symfony\Component\Runtime\SymfonyRuntime; -use Symfony\Component\String\LazyString; -use Symfony\Component\String\Slugger\AsciiSlugger; -use Symfony\Component\String\Slugger\SluggerInterface; -use Symfony\Component\Workflow\WorkflowEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -return static function (ContainerConfigurator $container) { - // this parameter is used at compile time in RegisterListenersPass - $container->parameters()->set('event_dispatcher.event_aliases', array_merge( - class_exists(ConsoleEvents::class) ? ConsoleEvents::ALIASES : [], - class_exists(FormEvents::class) ? FormEvents::ALIASES : [], - KernelEvents::ALIASES, - class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : [] - )); - - $container->services() - - ->set('parameter_bag', ContainerBag::class) - ->args([ - service('service_container'), - ]) - ->alias(ContainerBagInterface::class, 'parameter_bag') - ->alias(ParameterBagInterface::class, 'parameter_bag') - - ->set('event_dispatcher', EventDispatcher::class) - ->public() - ->tag('container.hot_path') - ->tag('event_dispatcher.dispatcher', ['name' => 'event_dispatcher']) - ->alias(EventDispatcherInterfaceComponentAlias::class, 'event_dispatcher') - ->alias(EventDispatcherInterface::class, 'event_dispatcher') - - ->set('http_kernel', HttpKernel::class) - ->public() - ->args([ - service('event_dispatcher'), - service('controller_resolver'), - service('request_stack'), - service('argument_resolver'), - ]) - ->tag('container.hot_path') - ->tag('container.preload', ['class' => HttpKernelRunner::class]) - ->tag('container.preload', ['class' => ResponseRunner::class]) - ->tag('container.preload', ['class' => SymfonyRuntime::class]) - ->alias(HttpKernelInterface::class, 'http_kernel') - - ->set('request_stack', RequestStack::class) - ->public() - ->alias(RequestStack::class, 'request_stack') - - ->set('http_cache', HttpCache::class) - ->args([ - service('kernel'), - service('http_cache.store'), - service('esi')->nullOnInvalid(), - abstract_arg('options'), - ]) - ->tag('container.hot_path') - - ->set('http_cache.store', Store::class) - ->args([ - param('kernel.cache_dir').'/http_cache', - ]) - ->alias(StoreInterface::class, 'http_cache.store') - - ->set('url_helper', UrlHelper::class) - ->args([ - service('request_stack'), - service('router.request_context')->ignoreOnInvalid(), - ]) - ->alias(UrlHelper::class, 'url_helper') - - ->set('cache_warmer', CacheWarmerAggregate::class) - ->public() - ->args([ - tagged_iterator('kernel.cache_warmer'), - param('kernel.debug'), - sprintf('%s/%sDeprecations.log', param('kernel.build_dir'), param('kernel.container_class')), - ]) - ->tag('container.no_preload') - - ->set('cache_clearer', ChainCacheClearer::class) - ->public() - ->args([ - tagged_iterator('kernel.cache_clearer'), - ]) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - - ->set('kernel') - ->synthetic() - ->public() - ->alias(KernelInterface::class, 'kernel') - - ->set('filesystem', Filesystem::class) - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(Filesystem::class, 'filesystem') - - ->set('file_locator', FileLocator::class) - ->args([ - service('kernel'), - ]) - ->alias(FileLocator::class, 'file_locator') - - ->set('uri_signer', UriSigner::class) - ->args([ - param('kernel.secret'), - ]) - ->alias(UriSigner::class, 'uri_signer') - - ->set('config_cache_factory', ResourceCheckerConfigCacheFactory::class) - ->args([ - tagged_iterator('config_cache.resource_checker'), - ]) - - ->set('dependency_injection.config.container_parameters_resource_checker', ContainerParametersResourceChecker::class) - ->args([ - service('service_container'), - ]) - ->tag('config_cache.resource_checker', ['priority' => -980]) - - ->set('config.resource.self_checking_resource_checker', SelfCheckingResourceChecker::class) - ->tag('config_cache.resource_checker', ['priority' => -990]) - - ->set('services_resetter', ServicesResetter::class) - ->public() - - ->set('reverse_container', ReverseContainer::class) - ->args([ - service('service_container'), - service_locator([]), - ]) - ->alias(ReverseContainer::class, 'reverse_container') - - ->set('locale_aware_listener', LocaleAwareListener::class) - ->args([ - [], // locale aware services - service('request_stack'), - ]) - ->tag('kernel.event_subscriber') - - ->set('container.env_var_processor', EnvVarProcessor::class) - ->args([ - service('service_container'), - tagged_iterator('container.env_var_loader'), - ]) - ->tag('container.env_var_processor') - - ->set('slugger', AsciiSlugger::class) - ->args([ - param('kernel.default_locale'), - ]) - ->tag('kernel.locale_aware') - ->alias(SluggerInterface::class, 'slugger') - - ->set('container.getenv', \Closure::class) - ->factory([\Closure::class, 'fromCallable']) - ->args([ - [service('service_container'), 'getEnv'], - ]) - ->tag('routing.expression_language_function', ['function' => 'env']) - - // inherit from this service to lazily access env vars - ->set('container.env', LazyString::class) - ->abstract() - ->factory([LazyString::class, 'fromCallable']) - ->args([ - service('container.getenv'), - ]) - ->set('config_builder.warmer', ConfigBuilderCacheWarmer::class) - ->args([service(KernelInterface::class), service('logger')->nullOnInvalid()]) - ->tag('kernel.cache_warmer') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/session.php b/vendor/symfony/framework-bundle/Resources/config/session.php deleted file mode 100644 index 43c0000..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/session.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Session\DeprecatedSessionFactory; -use Symfony\Bundle\FrameworkBundle\Session\ServiceSessionFactory; -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionFactory; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\IdentityMarshaller; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\MarshallingSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; -use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorageFactory; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; -use Symfony\Component\HttpKernel\EventListener\SessionListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('session.metadata.storage_key', '_sf2_meta'); - - $container->services() - ->set('.session.do-not-use', Session::class) // to be removed in 6.0 - ->factory([service('session.factory'), 'createSession']) - ->set('session.factory', SessionFactory::class) - ->args([ - service('request_stack'), - service('session.storage.factory'), - [service('session_listener'), 'onSessionUsage'], - ]) - - ->set('session.storage.factory.native', NativeSessionStorageFactory::class) - ->args([ - param('session.storage.options'), - service('session.handler'), - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - false, - ]) - ->set('session.storage.factory.php_bridge', PhpBridgeSessionStorageFactory::class) - ->args([ - service('session.handler'), - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - false, - ]) - ->set('session.storage.factory.mock_file', MockFileSessionStorageFactory::class) - ->args([ - param('kernel.cache_dir').'/sessions', - 'MOCKSESSID', - inline_service(MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]), - ]) - ->set('session.storage.factory.service', ServiceSessionFactory::class) - ->args([ - service('session.storage'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.native", "session.storage.factory.php_bridge" or "session.storage.factory.mock_file" instead.') - - ->set('.session.deprecated', SessionInterface::class) // to be removed in 6.0 - ->factory([inline_service(DeprecatedSessionFactory::class)->args([service('request_stack')]), 'getSession']) - ->alias(SessionInterface::class, '.session.do-not-use') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" and "SessionInterface" aliases are deprecated, use "$requestStack->getSession()" instead.') - ->alias(SessionStorageInterface::class, 'session.storage') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use "session.storage.factory" instead.') - ->alias(\SessionHandlerInterface::class, 'session.handler') - - ->set('session.storage.metadata_bag', MetadataBag::class) - ->args([ - param('session.metadata.storage_key'), - param('session.metadata.update_threshold'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, create your own "session.storage.factory" instead.') - - ->set('session.storage.native', NativeSessionStorage::class) - ->args([ - param('session.storage.options'), - service('session.handler'), - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.native" instead.') - - ->set('session.storage.php_bridge', PhpBridgeSessionStorage::class) - ->args([ - service('session.handler'), - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.php_bridge" instead.') - - ->set('session.flash_bag', FlashBag::class) - ->factory([service('.session.do-not-use'), 'getFlashBag']) - ->deprecate('symfony/framework-bundle', '5.1', 'The "%service_id%" service is deprecated, use "$session->getFlashBag()" instead.') - ->alias(FlashBagInterface::class, 'session.flash_bag') - - ->set('session.attribute_bag', AttributeBag::class) - ->factory([service('.session.do-not-use'), 'getBag']) - ->args(['attributes']) - ->deprecate('symfony/framework-bundle', '5.1', 'The "%service_id%" service is deprecated, use "$session->getAttributeBag()" instead.') - - ->set('session.storage.mock_file', MockFileSessionStorage::class) - ->args([ - param('kernel.cache_dir').'/sessions', - 'MOCKSESSID', - service('session.storage.metadata_bag'), - ]) - ->deprecate('symfony/framework-bundle', '5.3', 'The "%service_id%" service is deprecated, use "session.storage.factory.mock_file" instead.') - - ->set('session.handler.native_file', StrictSessionHandler::class) - ->args([ - inline_service(NativeFileSessionHandler::class) - ->args([param('session.save_path')]), - ]) - - ->set('session.abstract_handler', AbstractSessionHandler::class) - ->factory([SessionHandlerFactory::class, 'createHandler']) - ->args([abstract_arg('A string or a connection object')]) - - ->set('session_listener', SessionListener::class) - ->args([ - service_locator([ - 'session_factory' => service('session.factory')->ignoreOnInvalid(), - 'session' => service('.session.do-not-use')->ignoreOnInvalid(), - 'initialized_session' => service('.session.do-not-use')->ignoreOnUninitialized(), - 'logger' => service('logger')->ignoreOnInvalid(), - 'session_collector' => service('data_collector.request.session_collector')->ignoreOnInvalid(), - ]), - param('kernel.debug'), - param('session.storage.options'), - ]) - ->tag('kernel.event_subscriber') - ->tag('kernel.reset', ['method' => 'reset']) - - // for BC - ->alias('session.storage.filesystem', 'session.storage.mock_file') - ->deprecate('symfony/framework-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use "session.storage.factory.mock_file" instead.') - - ->set('session.marshaller', IdentityMarshaller::class) - - ->set('session.marshalling_handler', MarshallingSessionHandler::class) - ->decorate('session.handler') - ->args([ - service('session.marshalling_handler.inner'), - service('session.marshaller'), - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/ssi.php b/vendor/symfony/framework-bundle/Resources/config/ssi.php deleted file mode 100644 index d41aa74..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/ssi.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\HttpKernel\EventListener\SurrogateListener; -use Symfony\Component\HttpKernel\HttpCache\Ssi; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('ssi', Ssi::class) - - ->set('ssi_listener', SurrogateListener::class) - ->args([service('ssi')->ignoreOnInvalid()]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/test.php b/vendor/symfony/framework-bundle/Resources/config/test.php deleted file mode 100644 index 7670959..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/test.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\KernelBrowser; -use Symfony\Bundle\FrameworkBundle\Test\TestContainer; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\HttpKernel\EventListener\SessionListener; - -return static function (ContainerConfigurator $container) { - $container->parameters()->set('test.client.parameters', []); - - $container->services() - ->set('test.client', KernelBrowser::class) - ->args([ - service('kernel'), - param('test.client.parameters'), - service('test.client.history'), - service('test.client.cookiejar'), - ]) - ->share(false) - ->public() - - ->set('test.client.history', History::class)->share(false) - ->set('test.client.cookiejar', CookieJar::class)->share(false) - - ->set('test.session.listener', SessionListener::class) - ->args([ - service_locator([ - 'session' => service('.session.do-not-use')->ignoreOnInvalid(), - 'session_factory' => service('session.factory')->ignoreOnInvalid(), - ]), - param('kernel.debug'), - param('session.storage.options'), - ]) - ->tag('kernel.event_subscriber') - - ->set('test.service_container', TestContainer::class) - ->args([ - service('kernel'), - 'test.private_services_locator', - ]) - ->public() - - ->set('test.private_services_locator', ServiceLocator::class) - ->args([abstract_arg('callable collection')]) - ->public() - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/translation.php b/vendor/symfony/framework-bundle/Resources/config/translation.php deleted file mode 100644 index 706e492..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/translation.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer; -use Symfony\Bundle\FrameworkBundle\Translation\Translator; -use Symfony\Component\Translation\Dumper\CsvFileDumper; -use Symfony\Component\Translation\Dumper\IcuResFileDumper; -use Symfony\Component\Translation\Dumper\IniFileDumper; -use Symfony\Component\Translation\Dumper\JsonFileDumper; -use Symfony\Component\Translation\Dumper\MoFileDumper; -use Symfony\Component\Translation\Dumper\PhpFileDumper; -use Symfony\Component\Translation\Dumper\PoFileDumper; -use Symfony\Component\Translation\Dumper\QtFileDumper; -use Symfony\Component\Translation\Dumper\XliffFileDumper; -use Symfony\Component\Translation\Dumper\YamlFileDumper; -use Symfony\Component\Translation\Extractor\ChainExtractor; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\Extractor\PhpExtractor; -use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Loader\CsvFileLoader; -use Symfony\Component\Translation\Loader\IcuDatFileLoader; -use Symfony\Component\Translation\Loader\IcuResFileLoader; -use Symfony\Component\Translation\Loader\IniFileLoader; -use Symfony\Component\Translation\Loader\JsonFileLoader; -use Symfony\Component\Translation\Loader\MoFileLoader; -use Symfony\Component\Translation\Loader\PhpFileLoader; -use Symfony\Component\Translation\Loader\PoFileLoader; -use Symfony\Component\Translation\Loader\QtFileLoader; -use Symfony\Component\Translation\Loader\XliffFileLoader; -use Symfony\Component\Translation\Loader\YamlFileLoader; -use Symfony\Component\Translation\LoggingTranslator; -use Symfony\Component\Translation\Reader\TranslationReader; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriter; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator.default', Translator::class) - ->args([ - abstract_arg('translation loaders locator'), - service('translator.formatter'), - param('kernel.default_locale'), - abstract_arg('translation loaders ids'), - [ - 'cache_dir' => param('kernel.cache_dir').'/translations', - 'debug' => param('kernel.debug'), - ], - abstract_arg('enabled locales'), - ]) - ->call('setConfigCacheFactory', [service('config_cache_factory')]) - ->tag('kernel.locale_aware') - - ->alias(TranslatorInterface::class, 'translator') - - ->set('translator.logging', LoggingTranslator::class) - ->args([ - service('translator.logging.inner'), - service('logger'), - ]) - ->tag('monolog.logger', ['channel' => 'translation']) - - ->set('translator.formatter.default', MessageFormatter::class) - ->args([service('identity_translator')]) - - ->set('translation.loader.php', PhpFileLoader::class) - ->tag('translation.loader', ['alias' => 'php']) - - ->set('translation.loader.yml', YamlFileLoader::class) - ->tag('translation.loader', ['alias' => 'yaml', 'legacy-alias' => 'yml']) - - ->set('translation.loader.xliff', XliffFileLoader::class) - ->tag('translation.loader', ['alias' => 'xlf', 'legacy-alias' => 'xliff']) - - ->set('translation.loader.po', PoFileLoader::class) - ->tag('translation.loader', ['alias' => 'po']) - - ->set('translation.loader.mo', MoFileLoader::class) - ->tag('translation.loader', ['alias' => 'mo']) - - ->set('translation.loader.qt', QtFileLoader::class) - ->tag('translation.loader', ['alias' => 'ts']) - - ->set('translation.loader.csv', CsvFileLoader::class) - ->tag('translation.loader', ['alias' => 'csv']) - - ->set('translation.loader.res', IcuResFileLoader::class) - ->tag('translation.loader', ['alias' => 'res']) - - ->set('translation.loader.dat', IcuDatFileLoader::class) - ->tag('translation.loader', ['alias' => 'dat']) - - ->set('translation.loader.ini', IniFileLoader::class) - ->tag('translation.loader', ['alias' => 'ini']) - - ->set('translation.loader.json', JsonFileLoader::class) - ->tag('translation.loader', ['alias' => 'json']) - - ->set('translation.dumper.php', PhpFileDumper::class) - ->tag('translation.dumper', ['alias' => 'php']) - - ->set('translation.dumper.xliff', XliffFileDumper::class) - ->tag('translation.dumper', ['alias' => 'xlf']) - - ->set('translation.dumper.po', PoFileDumper::class) - ->tag('translation.dumper', ['alias' => 'po']) - - ->set('translation.dumper.mo', MoFileDumper::class) - ->tag('translation.dumper', ['alias' => 'mo']) - - ->set('translation.dumper.yml', YamlFileDumper::class) - ->tag('translation.dumper', ['alias' => 'yml']) - - ->set('translation.dumper.yaml', YamlFileDumper::class) - ->args(['yaml']) - ->tag('translation.dumper', ['alias' => 'yaml']) - - ->set('translation.dumper.qt', QtFileDumper::class) - ->tag('translation.dumper', ['alias' => 'ts']) - - ->set('translation.dumper.csv', CsvFileDumper::class) - ->tag('translation.dumper', ['alias' => 'csv']) - - ->set('translation.dumper.ini', IniFileDumper::class) - ->tag('translation.dumper', ['alias' => 'ini']) - - ->set('translation.dumper.json', JsonFileDumper::class) - ->tag('translation.dumper', ['alias' => 'json']) - - ->set('translation.dumper.res', IcuResFileDumper::class) - ->tag('translation.dumper', ['alias' => 'res']) - - ->set('translation.extractor.php', PhpExtractor::class) - ->tag('translation.extractor', ['alias' => 'php']) - - ->set('translation.reader', TranslationReader::class) - ->alias(TranslationReaderInterface::class, 'translation.reader') - - ->set('translation.extractor', ChainExtractor::class) - ->alias(ExtractorInterface::class, 'translation.extractor') - - ->set('translation.writer', TranslationWriter::class) - ->alias(TranslationWriterInterface::class, 'translation.writer') - - ->set('translation.warmer', TranslationsCacheWarmer::class) - ->args([service(ContainerInterface::class)]) - ->tag('container.service_subscriber', ['id' => 'translator']) - ->tag('kernel.cache_warmer') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/translation_debug.php b/vendor/symfony/framework-bundle/Resources/config/translation_debug.php deleted file mode 100644 index 7a83301..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/translation_debug.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\DataCollector\TranslationDataCollector; -use Symfony\Component\Translation\DataCollectorTranslator; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translator.data_collector', DataCollectorTranslator::class) - ->args([service('translator.data_collector.inner')]) - - ->set('data_collector.translation', TranslationDataCollector::class) - ->args([service('translator.data_collector')]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/translation.html.twig', - 'id' => 'translation', - 'priority' => 275, - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/translation_providers.php b/vendor/symfony/framework-bundle/Resources/config/translation_providers.php deleted file mode 100644 index cd140f0..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/translation_providers.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory; -use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory; -use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory; -use Symfony\Component\Translation\Provider\NullProviderFactory; -use Symfony\Component\Translation\Provider\TranslationProviderCollection; -use Symfony\Component\Translation\Provider\TranslationProviderCollectionFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('translation.provider_collection', TranslationProviderCollection::class) - ->factory([service('translation.provider_collection_factory'), 'fromConfig']) - ->args([ - [], // Providers - ]) - - ->set('translation.provider_collection_factory', TranslationProviderCollectionFactory::class) - ->args([ - tagged_iterator('translation.provider_factory'), - [], // Enabled locales - ]) - - ->set('translation.provider_factory.null', NullProviderFactory::class) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.crowdin', CrowdinProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - service('translation.dumper.xliff'), - ]) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.loco', LocoProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - ]) - ->tag('translation.provider_factory') - - ->set('translation.provider_factory.lokalise', LokaliseProviderFactory::class) - ->args([ - service('http_client'), - service('logger'), - param('kernel.default_locale'), - service('translation.loader.xliff'), - ]) - ->tag('translation.provider_factory') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/uid.php b/vendor/symfony/framework-bundle/Resources/config/uid.php deleted file mode 100644 index 840fb97..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/uid.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Uid\Factory\NameBasedUuidFactory; -use Symfony\Component\Uid\Factory\RandomBasedUuidFactory; -use Symfony\Component\Uid\Factory\TimeBasedUuidFactory; -use Symfony\Component\Uid\Factory\UlidFactory; -use Symfony\Component\Uid\Factory\UuidFactory; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('ulid.factory', UlidFactory::class) - ->alias(UlidFactory::class, 'ulid.factory') - - ->set('uuid.factory', UuidFactory::class) - ->alias(UuidFactory::class, 'uuid.factory') - - ->set('name_based_uuid.factory', NameBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'nameBased']) - ->args([abstract_arg('Please set the "framework.uid.name_based_uuid_namespace" configuration option to use the "name_based_uuid.factory" service')]) - ->alias(NameBasedUuidFactory::class, 'name_based_uuid.factory') - - ->set('random_based_uuid.factory', RandomBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'randomBased']) - ->alias(RandomBasedUuidFactory::class, 'random_based_uuid.factory') - - ->set('time_based_uuid.factory', TimeBasedUuidFactory::class) - ->factory([service('uuid.factory'), 'timeBased']) - ->alias(TimeBasedUuidFactory::class, 'time_based_uuid.factory') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/validator.php b/vendor/symfony/framework-bundle/Resources/config/validator.php deleted file mode 100644 index 75166bd..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/validator.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Validator\Constraints\EmailValidator; -use Symfony\Component\Validator\Constraints\ExpressionValidator; -use Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator; -use Symfony\Component\Validator\ContainerConstraintValidatorFactory; -use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; -use Symfony\Component\Validator\Validation; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Component\Validator\ValidatorBuilder; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('validator.mapping.cache.file', param('kernel.cache_dir').'/validation.php'); - - $container->services() - ->set('validator', ValidatorInterface::class) - ->public() - ->factory([service('validator.builder'), 'getValidator']) - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.2']) - ->alias(ValidatorInterface::class, 'validator') - - ->set('validator.builder', ValidatorBuilder::class) - ->factory([Validation::class, 'createValidatorBuilder']) - ->call('setConstraintValidatorFactory', [ - service('validator.validator_factory'), - ]) - ->call('setTranslator', [ - service('translator')->ignoreOnInvalid(), - ]) - ->call('setTranslationDomain', [ - param('validator.translation_domain'), - ]) - ->alias('validator.mapping.class_metadata_factory', 'validator') - - ->set('validator.mapping.cache_warmer', ValidatorCacheWarmer::class) - ->args([ - service('validator.builder'), - param('validator.mapping.cache.file'), - ]) - ->tag('kernel.cache_warmer') - - ->set('validator.mapping.cache.adapter', PhpArrayAdapter::class) - ->factory([PhpArrayAdapter::class, 'create']) - ->args([ - param('validator.mapping.cache.file'), - service('cache.validator'), - ]) - - ->set('validator.validator_factory', ContainerConstraintValidatorFactory::class) - ->args([ - abstract_arg('Constraint validators locator'), - ]) - - ->set('validator.expression', ExpressionValidator::class) - ->args([service('validator.expression_language')->nullOnInvalid()]) - ->tag('validator.constraint_validator', [ - 'alias' => 'validator.expression', - ]) - - ->set('validator.expression_language', ExpressionLanguage::class) - ->args([service('cache.validator_expression_language')->nullOnInvalid()]) - - ->set('cache.validator_expression_language') - ->parent('cache.system') - ->tag('cache.pool') - - ->set('validator.email', EmailValidator::class) - ->args([ - abstract_arg('Default mode'), - ]) - ->tag('validator.constraint_validator', [ - 'alias' => EmailValidator::class, - ]) - - ->set('validator.not_compromised_password', NotCompromisedPasswordValidator::class) - ->args([ - service('http_client')->nullOnInvalid(), - param('kernel.charset'), - false, - ]) - ->tag('validator.constraint_validator', [ - 'alias' => NotCompromisedPasswordValidator::class, - ]) - - ->set('validator.property_info_loader', PropertyInfoLoader::class) - ->args([ - service('property_info'), - service('property_info'), - service('property_info'), - ]) - ->tag('validator.auto_mapper') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/validator_debug.php b/vendor/symfony/framework-bundle/Resources/config/validator_debug.php deleted file mode 100644 index e9fe441..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/validator_debug.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Validator\DataCollector\ValidatorDataCollector; -use Symfony\Component\Validator\Validator\TraceableValidator; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('debug.validator', TraceableValidator::class) - ->decorate('validator', null, 255) - ->args([ - service('debug.validator.inner'), - ]) - ->tag('kernel.reset', [ - 'method' => 'reset', - ]) - - ->set('data_collector.validator', ValidatorDataCollector::class) - ->args([ - service('debug.validator'), - ]) - ->tag('data_collector', [ - 'template' => '@WebProfiler/Collector/validator.html.twig', - 'id' => 'validator', - 'priority' => 320, - ]) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/web.php b/vendor/symfony/framework-bundle/Resources/config/web.php deleted file mode 100644 index 53613d3..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/web.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; -use Symfony\Component\HttpKernel\Controller\ErrorController; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; -use Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener; -use Symfony\Component\HttpKernel\EventListener\ErrorListener; -use Symfony\Component\HttpKernel\EventListener\LocaleListener; -use Symfony\Component\HttpKernel\EventListener\ResponseListener; -use Symfony\Component\HttpKernel\EventListener\StreamedResponseListener; -use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('controller_resolver', ControllerResolver::class) - ->args([ - service('service_container'), - service('logger')->ignoreOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'request']) - - ->set('argument_metadata_factory', ArgumentMetadataFactory::class) - - ->set('argument_resolver', ArgumentResolver::class) - ->args([ - service('argument_metadata_factory'), - abstract_arg('argument value resolvers'), - ]) - - ->set('argument_resolver.request_attribute', RequestAttributeValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 100]) - - ->set('argument_resolver.request', RequestValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 50]) - - ->set('argument_resolver.session', SessionValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => 50]) - - ->set('argument_resolver.service', ServiceValueResolver::class) - ->args([ - abstract_arg('service locator, set in RegisterControllerArgumentLocatorsPass'), - ]) - ->tag('controller.argument_value_resolver', ['priority' => -50]) - - ->set('argument_resolver.default', DefaultValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => -100]) - - ->set('argument_resolver.variadic', VariadicValueResolver::class) - ->tag('controller.argument_value_resolver', ['priority' => -150]) - - ->set('response_listener', ResponseListener::class) - ->args([ - param('kernel.charset'), - abstract_arg('The "set_content_language_from_locale" config value'), - ]) - ->tag('kernel.event_subscriber') - - ->set('streamed_response_listener', StreamedResponseListener::class) - ->tag('kernel.event_subscriber') - - ->set('locale_listener', LocaleListener::class) - ->args([ - service('request_stack'), - param('kernel.default_locale'), - service('router')->ignoreOnInvalid(), - abstract_arg('The "set_locale_from_accept_language" config value'), - param('kernel.enabled_locales'), - ]) - ->tag('kernel.event_subscriber') - - ->set('validate_request_listener', ValidateRequestListener::class) - ->tag('kernel.event_subscriber') - - ->set('disallow_search_engine_index_response_listener', DisallowRobotsIndexingListener::class) - ->tag('kernel.event_subscriber') - - ->set('error_controller', ErrorController::class) - ->public() - ->args([ - service('http_kernel'), - param('kernel.error_controller'), - service('error_renderer'), - ]) - - ->set('exception_listener', ErrorListener::class) - ->args([ - param('kernel.error_controller'), - service('logger')->nullOnInvalid(), - param('kernel.debug'), - abstract_arg('an exceptions to log & status code mapping'), - ]) - ->tag('kernel.event_subscriber') - ->tag('monolog.logger', ['channel' => 'request']) - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/web_link.php b/vendor/symfony/framework-bundle/Resources/config/web_link.php deleted file mode 100644 index 0b0e79d..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/web_link.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('web_link.add_link_header_listener', AddLinkHeaderListener::class) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/framework-bundle/Resources/config/workflow.php b/vendor/symfony/framework-bundle/Resources/config/workflow.php deleted file mode 100644 index 909bb5a..0000000 --- a/vendor/symfony/framework-bundle/Resources/config/workflow.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Workflow\EventListener\ExpressionLanguage; -use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore; -use Symfony\Component\Workflow\Registry; -use Symfony\Component\Workflow\StateMachine; -use Symfony\Component\Workflow\Workflow; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('workflow.abstract', Workflow::class) - ->args([ - abstract_arg('workflow definition'), - abstract_arg('marking store'), - service('event_dispatcher')->ignoreOnInvalid(), - abstract_arg('workflow name'), - abstract_arg('events to dispatch'), - ]) - ->abstract() - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3']) - ->set('state_machine.abstract', StateMachine::class) - ->args([ - abstract_arg('workflow definition'), - abstract_arg('marking store'), - service('event_dispatcher')->ignoreOnInvalid(), - abstract_arg('workflow name'), - abstract_arg('events to dispatch'), - ]) - ->abstract() - ->public() - ->tag('container.private', ['package' => 'symfony/framework-bundle', 'version' => '5.3']) - ->set('workflow.marking_store.method', MethodMarkingStore::class) - ->abstract() - ->set('workflow.registry', Registry::class) - ->alias(Registry::class, 'workflow.registry') - ->set('workflow.security.expression_language', ExpressionLanguage::class) - ; -}; diff --git a/vendor/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php b/vendor/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php deleted file mode 100644 index 511e870..0000000 --- a/vendor/symfony/framework-bundle/Routing/AnnotatedRouteControllerLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Routing\Loader\AnnotationClassLoader; -use Symfony\Component\Routing\Route; - -/** - * AnnotatedRouteControllerLoader is an implementation of AnnotationClassLoader - * that sets the '_controller' default based on the class and method names. - * - * @author Fabien Potencier - */ -class AnnotatedRouteControllerLoader extends AnnotationClassLoader -{ - /** - * Configures the _controller default parameter of a given Route instance. - */ - protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot) - { - if ('__invoke' === $method->getName()) { - $route->setDefault('_controller', $class->getName()); - } else { - $route->setDefault('_controller', $class->getName().'::'.$method->getName()); - } - } - - /** - * Makes the default route name more sane by removing common keywords. - * - * @return string - */ - protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) - { - $name = preg_replace('/(bundle|controller)_/', '_', parent::getDefaultRouteName($class, $method)); - - if (str_ends_with($method->name, 'Action') || str_ends_with($method->name, '_action')) { - $name = preg_replace('/action(_\d+)?$/', '\\1', $name); - } - - return str_replace('__', '_', $name); - } -} diff --git a/vendor/symfony/framework-bundle/Routing/DelegatingLoader.php b/vendor/symfony/framework-bundle/Routing/DelegatingLoader.php deleted file mode 100644 index e130bd2..0000000 --- a/vendor/symfony/framework-bundle/Routing/DelegatingLoader.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolverInterface; -use Symfony\Component\Routing\RouteCollection; - -/** - * DelegatingLoader delegates route loading to other loaders using a loader resolver. - * - * This implementation resolves the _controller attribute from the short notation - * to the fully-qualified form (from a:b:c to class::method). - * - * @author Fabien Potencier - * - * @final - */ -class DelegatingLoader extends BaseDelegatingLoader -{ - private $loading = false; - private $defaultOptions; - private $defaultRequirements; - - public function __construct(LoaderResolverInterface $resolver, array $defaultOptions = [], array $defaultRequirements = []) - { - $this->defaultOptions = $defaultOptions; - $this->defaultRequirements = $defaultRequirements; - - parent::__construct($resolver); - } - - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null): RouteCollection - { - if ($this->loading) { - // This can happen if a fatal error occurs in parent::load(). - // Here is the scenario: - // - while routes are being loaded by parent::load() below, a fatal error - // occurs (e.g. parse error in a controller while loading annotations); - // - PHP abruptly empties the stack trace, bypassing all catch/finally blocks; - // it then calls the registered shutdown functions; - // - the ErrorHandler catches the fatal error and re-injects it for rendering - // thanks to HttpKernel->terminateWithException() (that calls handleException()); - // - at this stage, if we try to load the routes again, we must prevent - // the fatal error from occurring a second time, - // otherwise the PHP process would be killed immediately; - // - while rendering the exception page, the router can be required - // (by e.g. the web profiler that needs to generate an URL); - // - this handles the case and prevents the second fatal error - // by triggering an exception beforehand. - - throw new LoaderLoadException($resource, null, 0, null, $type); - } - $this->loading = true; - - try { - $collection = parent::load($resource, $type); - } finally { - $this->loading = false; - } - - foreach ($collection->all() as $route) { - if ($this->defaultOptions) { - $route->setOptions($route->getOptions() + $this->defaultOptions); - } - if ($this->defaultRequirements) { - $route->setRequirements($route->getRequirements() + $this->defaultRequirements); - } - if (!\is_string($controller = $route->getDefault('_controller'))) { - continue; - } - - if (str_contains($controller, '::')) { - continue; - } - - $route->setDefault('_controller', $controller); - } - - return $collection; - } -} diff --git a/vendor/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php b/vendor/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php deleted file mode 100644 index dba9d6d..0000000 --- a/vendor/symfony/framework-bundle/Routing/RedirectableCompiledUrlMatcher.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Symfony\Component\Routing\Matcher\CompiledUrlMatcher; -use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; - -/** - * @author Fabien Potencier - * - * @internal - */ -class RedirectableCompiledUrlMatcher extends CompiledUrlMatcher implements RedirectableUrlMatcherInterface -{ - /** - * {@inheritdoc} - */ - public function redirect(string $path, string $route, string $scheme = null): array - { - return [ - '_controller' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction', - 'path' => $path, - 'permanent' => true, - 'scheme' => $scheme, - 'httpPort' => $this->context->getHttpPort(), - 'httpsPort' => $this->context->getHttpsPort(), - '_route' => $route, - ]; - } -} diff --git a/vendor/symfony/framework-bundle/Routing/RouteLoaderInterface.php b/vendor/symfony/framework-bundle/Routing/RouteLoaderInterface.php deleted file mode 100644 index d1cb55a..0000000 --- a/vendor/symfony/framework-bundle/Routing/RouteLoaderInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -/** - * Marker interface for service route loaders. - */ -interface RouteLoaderInterface -{ -} diff --git a/vendor/symfony/framework-bundle/Routing/Router.php b/vendor/symfony/framework-bundle/Routing/Router.php deleted file mode 100644 index 585e6ee..0000000 --- a/vendor/symfony/framework-bundle/Routing/Router.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Routing; - -use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\DependencyInjection\Config\ContainerParametersResource; -use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Router as BaseRouter; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * This Router creates the Loader only when the cache is empty. - * - * @author Fabien Potencier - */ -class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberInterface -{ - private $container; - private $collectedParameters = []; - private $paramFetcher; - - /** - * @param mixed $resource The main resource to load - */ - public function __construct(ContainerInterface $container, $resource, array $options = [], RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->container = $container; - $this->resource = $resource; - $this->context = $context ?? new RequestContext(); - $this->logger = $logger; - $this->setOptions($options); - - if ($parameters) { - $this->paramFetcher = \Closure::fromCallable([$parameters, 'get']); - } elseif ($container instanceof SymfonyContainerInterface) { - $this->paramFetcher = \Closure::fromCallable([$container, 'getParameter']); - } else { - throw new \LogicException(sprintf('You should either pass a "%s" instance or provide the $parameters argument of the "%s" method.', SymfonyContainerInterface::class, __METHOD__)); - } - - $this->defaultLocale = $defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function getRouteCollection() - { - if (null === $this->collection) { - $this->collection = $this->container->get('routing.loader')->load($this->resource, $this->options['resource_type']); - $this->resolveParameters($this->collection); - $this->collection->addResource(new ContainerParametersResource($this->collectedParameters)); - - try { - $containerFile = ($this->paramFetcher)('kernel.cache_dir').'/'.($this->paramFetcher)('kernel.container_class').'.php'; - if (file_exists($containerFile)) { - $this->collection->addResource(new FileResource($containerFile)); - } else { - $this->collection->addResource(new FileExistenceResource($containerFile)); - } - } catch (ParameterNotFoundException $exception) { - } - } - - return $this->collection; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - $currentDir = $this->getOption('cache_dir'); - - // force cache generation - $this->setOption('cache_dir', $cacheDir); - $this->getMatcher(); - $this->getGenerator(); - - $this->setOption('cache_dir', $currentDir); - - return [ - $this->getOption('generator_class'), - $this->getOption('matcher_class'), - ]; - } - - /** - * Replaces placeholders with service container parameter values in: - * - the route defaults, - * - the route requirements, - * - the route path, - * - the route host, - * - the route schemes, - * - the route methods. - */ - private function resolveParameters(RouteCollection $collection) - { - foreach ($collection as $route) { - foreach ($route->getDefaults() as $name => $value) { - $route->setDefault($name, $this->resolve($value)); - } - - foreach ($route->getRequirements() as $name => $value) { - $route->setRequirement($name, $this->resolve($value)); - } - - $route->setPath($this->resolve($route->getPath())); - $route->setHost($this->resolve($route->getHost())); - - $schemes = []; - foreach ($route->getSchemes() as $scheme) { - $schemes[] = explode('|', $this->resolve($scheme)); - } - $route->setSchemes(array_merge([], ...$schemes)); - - $methods = []; - foreach ($route->getMethods() as $method) { - $methods[] = explode('|', $this->resolve($method)); - } - $route->setMethods(array_merge([], ...$methods)); - $route->setCondition($this->resolve($route->getCondition())); - } - } - - /** - * Recursively replaces placeholders with the service container parameters. - * - * @param mixed $value The source which might contain "%placeholders%" - * - * @return mixed The source with the placeholders replaced by the container - * parameters. Arrays are resolved recursively. - * - * @throws ParameterNotFoundException When a placeholder does not exist as a container parameter - * @throws RuntimeException When a container value is not a string or a numeric value - */ - private function resolve($value) - { - if (\is_array($value)) { - foreach ($value as $key => $val) { - $value[$key] = $this->resolve($val); - } - - return $value; - } - - if (!\is_string($value)) { - return $value; - } - - $escapedValue = preg_replace_callback('/%%|%([^%\s]++)%/', function ($match) use ($value) { - // skip %% - if (!isset($match[1])) { - return '%%'; - } - - if (preg_match('/^env\((?:\w++:)*+\w++\)$/', $match[1])) { - throw new RuntimeException(sprintf('Using "%%%s%%" is not allowed in routing configuration.', $match[1])); - } - - $resolved = ($this->paramFetcher)($match[1]); - - if (is_scalar($resolved)) { - $this->collectedParameters[$match[1]] = $resolved; - - if (\is_string($resolved)) { - $resolved = $this->resolve($resolved); - } - - if (is_scalar($resolved)) { - return false === $resolved ? '0' : (string) $resolved; - } - } - - throw new RuntimeException(sprintf('The container parameter "%s", used in the route configuration value "%s", must be a string or numeric, but it is of type "%s".', $match[1], $value, get_debug_type($resolved))); - }, $value); - - return str_replace('%%', '%', $escapedValue); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'routing.loader' => LoaderInterface::class, - ]; - } -} diff --git a/vendor/symfony/framework-bundle/Secrets/AbstractVault.php b/vendor/symfony/framework-bundle/Secrets/AbstractVault.php deleted file mode 100644 index eeecbbb..0000000 --- a/vendor/symfony/framework-bundle/Secrets/AbstractVault.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -/** - * @author Nicolas Grekas - * - * @internal - */ -abstract class AbstractVault -{ - protected $lastMessage; - - public function getLastMessage(): ?string - { - return $this->lastMessage; - } - - abstract public function generateKeys(bool $override = false): bool; - - abstract public function seal(string $name, string $value): void; - - abstract public function reveal(string $name): ?string; - - abstract public function remove(string $name): bool; - - abstract public function list(bool $reveal = false): array; - - protected function validateName(string $name): void - { - if (!preg_match('/^\w++$/D', $name)) { - throw new \LogicException(sprintf('Invalid secret name "%s": only "word" characters are allowed.', $name)); - } - } - - protected function getPrettyPath(string $path) - { - return str_replace(getcwd().\DIRECTORY_SEPARATOR, '', $path); - } -} diff --git a/vendor/symfony/framework-bundle/Secrets/DotenvVault.php b/vendor/symfony/framework-bundle/Secrets/DotenvVault.php deleted file mode 100644 index 7c6f698..0000000 --- a/vendor/symfony/framework-bundle/Secrets/DotenvVault.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class DotenvVault extends AbstractVault -{ - private $dotenvFile; - - public function __construct(string $dotenvFile) - { - $this->dotenvFile = strtr($dotenvFile, '/', \DIRECTORY_SEPARATOR); - } - - public function generateKeys(bool $override = false): bool - { - $this->lastMessage = 'The dotenv vault doesn\'t encrypt secrets thus doesn\'t need keys.'; - - return false; - } - - public function seal(string $name, string $value): void - { - $this->lastMessage = null; - $this->validateName($name); - $v = str_replace("'", "'\\''", $value); - - $content = is_file($this->dotenvFile) ? file_get_contents($this->dotenvFile) : ''; - $content = preg_replace("/^$name=((\\\\'|'[^']++')++|.*)/m", "$name='$v'", $content, -1, $count); - - if (!$count) { - $content .= "$name='$v'\n"; - } - - file_put_contents($this->dotenvFile, $content); - - $this->lastMessage = sprintf('Secret "%s" %s in "%s".', $name, $count ? 'added' : 'updated', $this->getPrettyPath($this->dotenvFile)); - } - - public function reveal(string $name): ?string - { - $this->lastMessage = null; - $this->validateName($name); - $v = \is_string($_SERVER[$name] ?? null) && !str_starts_with($name, 'HTTP_') ? $_SERVER[$name] : ($_ENV[$name] ?? null); - - if (null === $v) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return null; - } - - return $v; - } - - public function remove(string $name): bool - { - $this->lastMessage = null; - $this->validateName($name); - - $content = is_file($this->dotenvFile) ? file_get_contents($this->dotenvFile) : ''; - $content = preg_replace("/^$name=((\\\\'|'[^']++')++|.*)\n?/m", '', $content, -1, $count); - - if ($count) { - file_put_contents($this->dotenvFile, $content); - $this->lastMessage = sprintf('Secret "%s" removed from file "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return true; - } - - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath($this->dotenvFile)); - - return false; - } - - public function list(bool $reveal = false): array - { - $this->lastMessage = null; - $secrets = []; - - foreach ($_ENV as $k => $v) { - if (preg_match('/^\w+$/D', $k)) { - $secrets[$k] = $reveal ? $v : null; - } - } - - foreach ($_SERVER as $k => $v) { - if (\is_string($v) && preg_match('/^\w+$/D', $k)) { - $secrets[$k] = $reveal ? $v : null; - } - } - - return $secrets; - } -} diff --git a/vendor/symfony/framework-bundle/Secrets/SodiumVault.php b/vendor/symfony/framework-bundle/Secrets/SodiumVault.php deleted file mode 100644 index a9c86ab..0000000 --- a/vendor/symfony/framework-bundle/Secrets/SodiumVault.php +++ /dev/null @@ -1,233 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Secrets; - -use Symfony\Component\DependencyInjection\EnvVarLoaderInterface; -use Symfony\Component\VarExporter\VarExporter; - -/** - * @author Tobias Schultze - * @author Jérémy Derussé - * @author Nicolas Grekas - * - * @internal - */ -class SodiumVault extends AbstractVault implements EnvVarLoaderInterface -{ - private $encryptionKey; - private $decryptionKey; - private $pathPrefix; - private $secretsDir; - - /** - * @param string|\Stringable|null $decryptionKey A string or a stringable object that defines the private key to use to decrypt the vault - * or null to store generated keys in the provided $secretsDir - */ - public function __construct(string $secretsDir, $decryptionKey = null) - { - if (null !== $decryptionKey && !\is_string($decryptionKey) && !(\is_object($decryptionKey) && method_exists($decryptionKey, '__toString'))) { - throw new \TypeError(sprintf('Decryption key should be a string or an object that implements the __toString() method, "%s" given.', get_debug_type($decryptionKey))); - } - - $this->pathPrefix = rtrim(strtr($secretsDir, '/', \DIRECTORY_SEPARATOR), \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.basename($secretsDir).'.'; - $this->decryptionKey = $decryptionKey; - $this->secretsDir = $secretsDir; - } - - public function generateKeys(bool $override = false): bool - { - $this->lastMessage = null; - - if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) { - $this->lastMessage = 'Cannot generate keys when a decryption key has been provided while instantiating the vault.'; - - return false; - } - - try { - $this->loadKeys(); - } catch (\RuntimeException $e) { - // ignore failures to load keys - } - - if ('' !== $this->decryptionKey && !is_file($this->pathPrefix.'encrypt.public.php')) { - $this->export('encrypt.public', $this->encryptionKey); - } - - if (!$override && null !== $this->encryptionKey) { - $this->lastMessage = sprintf('Sodium keys already exist at "%s*.{public,private}" and won\'t be overridden.', $this->getPrettyPath($this->pathPrefix)); - - return false; - } - - $this->decryptionKey = sodium_crypto_box_keypair(); - $this->encryptionKey = sodium_crypto_box_publickey($this->decryptionKey); - - $this->export('encrypt.public', $this->encryptionKey); - $this->export('decrypt.private', $this->decryptionKey); - - $this->lastMessage = sprintf('Sodium keys have been generated at "%s*.public/private.php".', $this->getPrettyPath($this->pathPrefix)); - - return true; - } - - public function seal(string $name, string $value): void - { - $this->lastMessage = null; - $this->validateName($name); - $this->loadKeys(); - $filename = $this->getFilename($name); - $this->export($filename, sodium_crypto_box_seal($value, $this->encryptionKey ?? sodium_crypto_box_publickey($this->decryptionKey))); - - $list = $this->list(); - $list[$name] = null; - uksort($list, 'strnatcmp'); - file_put_contents($this->pathPrefix.'list.php', sprintf("lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - } - - public function reveal(string $name): ?string - { - $this->lastMessage = null; - $this->validateName($name); - - $filename = $this->getFilename($name); - if (!is_file($file = $this->pathPrefix.$filename.'.php')) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - if (!\function_exists('sodium_crypto_box_seal')) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as the "sodium" PHP extension missing. Try running "composer require paragonie/sodium_compat" if you cannot enable the extension."', $name); - - return null; - } - - $this->loadKeys(); - - if ('' === $this->decryptionKey) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as no decryption key was found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - if (false === $value = sodium_crypto_box_seal_open(include $file, $this->decryptionKey)) { - $this->lastMessage = sprintf('Secret "%s" cannot be revealed as the wrong decryption key was provided for "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return null; - } - - return $value; - } - - public function remove(string $name): bool - { - $this->lastMessage = null; - $this->validateName($name); - - $filename = $this->getFilename($name); - if (!is_file($file = $this->pathPrefix.$filename.'.php')) { - $this->lastMessage = sprintf('Secret "%s" not found in "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return false; - } - - $list = $this->list(); - unset($list[$name]); - file_put_contents($this->pathPrefix.'list.php', sprintf("lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR)); - - return @unlink($file) || !file_exists($file); - } - - public function list(bool $reveal = false): array - { - $this->lastMessage = null; - - if (!is_file($file = $this->pathPrefix.'list.php')) { - return []; - } - - $secrets = include $file; - - if (!$reveal) { - return $secrets; - } - - foreach ($secrets as $name => $value) { - $secrets[$name] = $this->reveal($name); - } - - return $secrets; - } - - public function loadEnvVars(): array - { - return $this->list(true); - } - - private function loadKeys(): void - { - if (!\function_exists('sodium_crypto_box_seal')) { - throw new \LogicException('The "sodium" PHP extension is required to deal with secrets. Alternatively, try running "composer require paragonie/sodium_compat" if you cannot enable the extension.".'); - } - - if (null !== $this->encryptionKey || '' !== $this->decryptionKey = (string) $this->decryptionKey) { - return; - } - - if (is_file($this->pathPrefix.'decrypt.private.php')) { - $this->decryptionKey = (string) include $this->pathPrefix.'decrypt.private.php'; - } - - if (is_file($this->pathPrefix.'encrypt.public.php')) { - $this->encryptionKey = (string) include $this->pathPrefix.'encrypt.public.php'; - } elseif ('' !== $this->decryptionKey) { - $this->encryptionKey = sodium_crypto_box_publickey($this->decryptionKey); - } else { - throw new \RuntimeException(sprintf('Encryption key not found in "%s".', \dirname($this->pathPrefix))); - } - } - - private function export(string $filename, string $data): void - { - $b64 = 'decrypt.private' === $filename ? '// SYMFONY_DECRYPTION_SECRET='.base64_encode($data)."\n" : ''; - $name = basename($this->pathPrefix.$filename); - $data = str_replace('%', '\x', rawurlencode($data)); - $data = sprintf("createSecretsDir(); - - if (false === file_put_contents($this->pathPrefix.$filename.'.php', $data, \LOCK_EX)) { - $e = error_get_last(); - throw new \ErrorException($e['message'] ?? 'Failed to write secrets data.', 0, $e['type'] ?? \E_USER_WARNING); - } - } - - private function createSecretsDir(): void - { - if ($this->secretsDir && !is_dir($this->secretsDir) && !@mkdir($this->secretsDir, 0777, true) && !is_dir($this->secretsDir)) { - throw new \RuntimeException(sprintf('Unable to create the secrets directory (%s).', $this->secretsDir)); - } - - $this->secretsDir = null; - } - - private function getFilename(string $name): string - { - // The MD5 hash allows making secrets case-sensitive. The filename is not enough on Windows. - return $name.'.'.substr(md5($name), 0, 6); - } -} diff --git a/vendor/symfony/framework-bundle/Session/DeprecatedSessionFactory.php b/vendor/symfony/framework-bundle/Session/DeprecatedSessionFactory.php deleted file mode 100644 index faa29a1..0000000 --- a/vendor/symfony/framework-bundle/Session/DeprecatedSessionFactory.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Session; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Provides session and trigger deprecation. - * - * Used by service that should trigger deprecation when accessed by the user. - * - * @author Jérémy Derussé - * - * @internal to be removed in 6.0 - */ -class DeprecatedSessionFactory -{ - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - public function getSession(): ?SessionInterface - { - trigger_deprecation('symfony/framework-bundle', '5.3', 'The "session" service and "SessionInterface" alias are deprecated, use "$requestStack->getSession()" instead.'); - - try { - return $this->requestStack->getSession(); - } catch (SessionNotFoundException $e) { - return null; - } - } -} diff --git a/vendor/symfony/framework-bundle/Session/ServiceSessionFactory.php b/vendor/symfony/framework-bundle/Session/ServiceSessionFactory.php deleted file mode 100644 index c057375..0000000 --- a/vendor/symfony/framework-bundle/Session/ServiceSessionFactory.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Session; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; - -/** - * @author Jérémy Derussé - * - * @internal to be removed in Symfony 6 - */ -final class ServiceSessionFactory implements SessionStorageFactoryInterface -{ - private $storage; - - public function __construct(SessionStorageInterface $storage) - { - $this->storage = $storage; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - if ($this->storage instanceof NativeSessionStorage && $request && $request->isSecure()) { - $this->storage->setOptions(['cookie_secure' => true]); - } - - return $this->storage; - } -} diff --git a/vendor/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php b/vendor/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php deleted file mode 100644 index 55b95f0..0000000 --- a/vendor/symfony/framework-bundle/Test/BrowserKitAssertionsTrait.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\ExpectationFailedException; -use Symfony\Component\BrowserKit\AbstractBrowser; -use Symfony\Component\BrowserKit\Test\Constraint as BrowserKitConstraint; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Test\Constraint as ResponseConstraint; - -/** - * Ideas borrowed from Laravel Dusk's assertions. - * - * @see https://laravel.com/docs/5.7/dusk#available-assertions - */ -trait BrowserKitAssertionsTrait -{ - public static function assertResponseIsSuccessful(string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful(), $message); - } - - public static function assertResponseStatusCodeSame(int $expectedCode, string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseStatusCodeSame($expectedCode), $message); - } - - public static function assertResponseFormatSame(?string $expectedFormat, string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseFormatSame(self::getRequest(), $expectedFormat), $message); - } - - public static function assertResponseRedirects(string $expectedLocation = null, int $expectedCode = null, string $message = ''): void - { - $constraint = new ResponseConstraint\ResponseIsRedirected(); - if ($expectedLocation) { - $constraint = LogicalAnd::fromConstraints($constraint, new ResponseConstraint\ResponseHeaderSame('Location', $expectedLocation)); - } - if ($expectedCode) { - $constraint = LogicalAnd::fromConstraints($constraint, new ResponseConstraint\ResponseStatusCodeSame($expectedCode)); - } - - self::assertThatForResponse($constraint, $message); - } - - public static function assertResponseHasHeader(string $headerName, string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseHasHeader($headerName), $message); - } - - public static function assertResponseNotHasHeader(string $headerName, string $message = ''): void - { - self::assertThatForResponse(new LogicalNot(new ResponseConstraint\ResponseHasHeader($headerName)), $message); - } - - public static function assertResponseHeaderSame(string $headerName, string $expectedValue, string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseHeaderSame($headerName, $expectedValue), $message); - } - - public static function assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = ''): void - { - self::assertThatForResponse(new LogicalNot(new ResponseConstraint\ResponseHeaderSame($headerName, $expectedValue)), $message); - } - - public static function assertResponseHasCookie(string $name, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseHasCookie($name, $path, $domain), $message); - } - - public static function assertResponseNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForResponse(new LogicalNot(new ResponseConstraint\ResponseHasCookie($name, $path, $domain)), $message); - } - - public static function assertResponseCookieValueSame(string $name, string $expectedValue, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForResponse(LogicalAnd::fromConstraints( - new ResponseConstraint\ResponseHasCookie($name, $path, $domain), - new ResponseConstraint\ResponseCookieValueSame($name, $expectedValue, $path, $domain) - ), $message); - } - - public static function assertResponseIsUnprocessable(string $message = ''): void - { - self::assertThatForResponse(new ResponseConstraint\ResponseIsUnprocessable(), $message); - } - - public static function assertBrowserHasCookie(string $name, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForClient(new BrowserKitConstraint\BrowserHasCookie($name, $path, $domain), $message); - } - - public static function assertBrowserNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForClient(new LogicalNot(new BrowserKitConstraint\BrowserHasCookie($name, $path, $domain)), $message); - } - - public static function assertBrowserCookieValueSame(string $name, string $expectedValue, bool $raw = false, string $path = '/', string $domain = null, string $message = ''): void - { - self::assertThatForClient(LogicalAnd::fromConstraints( - new BrowserKitConstraint\BrowserHasCookie($name, $path, $domain), - new BrowserKitConstraint\BrowserCookieValueSame($name, $expectedValue, $raw, $path, $domain) - ), $message); - } - - public static function assertRequestAttributeValueSame(string $name, string $expectedValue, string $message = ''): void - { - self::assertThat(self::getRequest(), new ResponseConstraint\RequestAttributeValueSame($name, $expectedValue), $message); - } - - public static function assertRouteSame(string $expectedRoute, array $parameters = [], string $message = ''): void - { - $constraint = new ResponseConstraint\RequestAttributeValueSame('_route', $expectedRoute); - $constraints = []; - foreach ($parameters as $key => $value) { - $constraints[] = new ResponseConstraint\RequestAttributeValueSame($key, $value); - } - if ($constraints) { - $constraint = LogicalAnd::fromConstraints($constraint, ...$constraints); - } - - self::assertThat(self::getRequest(), $constraint, $message); - } - - public static function assertThatForResponse(Constraint $constraint, string $message = ''): void - { - try { - self::assertThat(self::getResponse(), $constraint, $message); - } catch (ExpectationFailedException $exception) { - if (($serverExceptionMessage = self::getResponse()->headers->get('X-Debug-Exception')) - && ($serverExceptionFile = self::getResponse()->headers->get('X-Debug-Exception-File'))) { - $serverExceptionFile = explode(':', $serverExceptionFile); - $exception->__construct($exception->getMessage(), $exception->getComparisonFailure(), new \ErrorException(rawurldecode($serverExceptionMessage), 0, 1, rawurldecode($serverExceptionFile[0]), $serverExceptionFile[1]), $exception->getPrevious()); - } - - throw $exception; - } - } - - public static function assertThatForClient(Constraint $constraint, string $message = ''): void - { - self::assertThat(self::getClient(), $constraint, $message); - } - - private static function getClient(AbstractBrowser $newClient = null): ?AbstractBrowser - { - static $client; - - if (0 < \func_num_args()) { - return $client = $newClient; - } - - if (!$client instanceof AbstractBrowser) { - static::fail(sprintf('A client must be set to make assertions on it. Did you forget to call "%s::createClient()"?', __CLASS__)); - } - - return $client; - } - - private static function getResponse(): Response - { - if (!$response = self::getClient()->getResponse()) { - static::fail('A client must have an HTTP Response to make assertions. Did you forget to make an HTTP request?'); - } - - return $response; - } - - private static function getRequest(): Request - { - if (!$request = self::getClient()->getRequest()) { - static::fail('A client must have an HTTP Request to make assertions. Did you forget to make an HTTP request?'); - } - - return $request; - } -} diff --git a/vendor/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php b/vendor/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php deleted file mode 100644 index 2a692d6..0000000 --- a/vendor/symfony/framework-bundle/Test/DomCrawlerAssertionsTrait.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use Symfony\Component\DomCrawler\Crawler; -use Symfony\Component\DomCrawler\Test\Constraint as DomCrawlerConstraint; -use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorAttributeValueSame; -use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorExists; - -/** - * Ideas borrowed from Laravel Dusk's assertions. - * - * @see https://laravel.com/docs/5.7/dusk#available-assertions - */ -trait DomCrawlerAssertionsTrait -{ - public static function assertSelectorExists(string $selector, string $message = ''): void - { - self::assertThat(self::getCrawler(), new DomCrawlerConstraint\CrawlerSelectorExists($selector), $message); - } - - public static function assertSelectorNotExists(string $selector, string $message = ''): void - { - self::assertThat(self::getCrawler(), new LogicalNot(new DomCrawlerConstraint\CrawlerSelectorExists($selector)), $message); - } - - public static function assertSelectorTextContains(string $selector, string $text, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new DomCrawlerConstraint\CrawlerSelectorExists($selector), - new DomCrawlerConstraint\CrawlerSelectorTextContains($selector, $text) - ), $message); - } - - public static function assertSelectorTextSame(string $selector, string $text, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new DomCrawlerConstraint\CrawlerSelectorExists($selector), - new DomCrawlerConstraint\CrawlerSelectorTextSame($selector, $text) - ), $message); - } - - public static function assertSelectorTextNotContains(string $selector, string $text, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new DomCrawlerConstraint\CrawlerSelectorExists($selector), - new LogicalNot(new DomCrawlerConstraint\CrawlerSelectorTextContains($selector, $text)) - ), $message); - } - - public static function assertPageTitleSame(string $expectedTitle, string $message = ''): void - { - self::assertSelectorTextSame('title', $expectedTitle, $message); - } - - public static function assertPageTitleContains(string $expectedTitle, string $message = ''): void - { - self::assertSelectorTextContains('title', $expectedTitle, $message); - } - - public static function assertInputValueSame(string $fieldName, string $expectedValue, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new DomCrawlerConstraint\CrawlerSelectorExists("input[name=\"$fieldName\"]"), - new DomCrawlerConstraint\CrawlerSelectorAttributeValueSame("input[name=\"$fieldName\"]", 'value', $expectedValue) - ), $message); - } - - public static function assertInputValueNotSame(string $fieldName, string $expectedValue, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new DomCrawlerConstraint\CrawlerSelectorExists("input[name=\"$fieldName\"]"), - new LogicalNot(new DomCrawlerConstraint\CrawlerSelectorAttributeValueSame("input[name=\"$fieldName\"]", 'value', $expectedValue)) - ), $message); - } - - public static function assertCheckboxChecked(string $fieldName, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new CrawlerSelectorExists("input[name=\"$fieldName\"]"), - new CrawlerSelectorAttributeValueSame("input[name=\"$fieldName\"]", 'checked', 'checked') - ), $message); - } - - public static function assertCheckboxNotChecked(string $fieldName, string $message = ''): void - { - self::assertThat(self::getCrawler(), LogicalAnd::fromConstraints( - new CrawlerSelectorExists("input[name=\"$fieldName\"]"), - new LogicalNot(new CrawlerSelectorAttributeValueSame("input[name=\"$fieldName\"]", 'checked', 'checked')) - ), $message); - } - - public static function assertFormValue(string $formSelector, string $fieldName, string $value, string $message = ''): void - { - $node = self::getCrawler()->filter($formSelector); - self::assertNotEmpty($node, sprintf('Form "%s" not found.', $formSelector)); - $values = $node->form()->getValues(); - self::assertArrayHasKey($fieldName, $values, $message ?: sprintf('Field "%s" not found in form "%s".', $fieldName, $formSelector)); - self::assertSame($value, $values[$fieldName]); - } - - public static function assertNoFormValue(string $formSelector, string $fieldName, string $message = ''): void - { - $node = self::getCrawler()->filter($formSelector); - self::assertNotEmpty($node, sprintf('Form "%s" not found.', $formSelector)); - $values = $node->form()->getValues(); - self::assertArrayNotHasKey($fieldName, $values, $message ?: sprintf('Field "%s" has a value in form "%s".', $fieldName, $formSelector)); - } - - private static function getCrawler(): Crawler - { - if (!$crawler = self::getClient()->getCrawler()) { - static::fail('A client must have a crawler to make assertions. Did you forget to make an HTTP request?'); - } - - return $crawler; - } -} diff --git a/vendor/symfony/framework-bundle/Test/KernelTestCase.php b/vendor/symfony/framework-bundle/Test/KernelTestCase.php deleted file mode 100644 index 7950213..0000000 --- a/vendor/symfony/framework-bundle/Test/KernelTestCase.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * KernelTestCase is the base class for tests needing a Kernel. - * - * @author Fabien Potencier - */ -abstract class KernelTestCase extends TestCase -{ - use MailerAssertionsTrait; - - protected static $class; - - /** - * @var KernelInterface - */ - protected static $kernel; - - /** - * @var ContainerInterface - * - * @deprecated since Symfony 5.3, use static::getContainer() instead - */ - protected static $container; - - protected static $booted = false; - - protected function tearDown(): void - { - static::ensureKernelShutdown(); - static::$class = null; - static::$kernel = null; - static::$booted = false; - } - - /** - * @return string - * - * @throws \RuntimeException - * @throws \LogicException - */ - protected static function getKernelClass() - { - if (!isset($_SERVER['KERNEL_CLASS']) && !isset($_ENV['KERNEL_CLASS'])) { - throw new \LogicException(sprintf('You must set the KERNEL_CLASS environment variable to the fully-qualified class name of your Kernel in phpunit.xml / phpunit.xml.dist or override the "%1$s::createKernel()" or "%1$s::getKernelClass()" method.', static::class)); - } - - if (!class_exists($class = $_ENV['KERNEL_CLASS'] ?? $_SERVER['KERNEL_CLASS'])) { - throw new \RuntimeException(sprintf('Class "%s" doesn\'t exist or cannot be autoloaded. Check that the KERNEL_CLASS value in phpunit.xml matches the fully-qualified class name of your Kernel or override the "%s::createKernel()" method.', $class, static::class)); - } - - return $class; - } - - /** - * Boots the Kernel for this test. - * - * @return KernelInterface - */ - protected static function bootKernel(array $options = []) - { - static::ensureKernelShutdown(); - - $kernel = static::createKernel($options); - $kernel->boot(); - self::$kernel = $kernel; - static::$booted = true; - - $container = static::$kernel->getContainer(); - static::$container = $container->has('test.service_container') ? $container->get('test.service_container') : $container; - - return static::$kernel; - } - - /** - * Provides a dedicated test container with access to both public and private - * services. The container will not include private services that have been - * inlined or removed. Private services will be removed when they are not - * used by other services. - * - * Using this method is the best way to get a container from your test code. - */ - protected static function getContainer(): ContainerInterface - { - if (!static::$booted) { - static::bootKernel(); - } - - try { - return self::$kernel->getContainer()->get('test.service_container'); - } catch (ServiceNotFoundException $e) { - throw new \LogicException('Could not find service "test.service_container". Try updating the "framework.test" config to "true".', 0, $e); - } - } - - /** - * Creates a Kernel. - * - * Available options: - * - * * environment - * * debug - * - * @return KernelInterface - */ - protected static function createKernel(array $options = []) - { - if (null === static::$class) { - static::$class = static::getKernelClass(); - } - - if (isset($options['environment'])) { - $env = $options['environment']; - } elseif (isset($_ENV['APP_ENV'])) { - $env = $_ENV['APP_ENV']; - } elseif (isset($_SERVER['APP_ENV'])) { - $env = $_SERVER['APP_ENV']; - } else { - $env = 'test'; - } - - if (isset($options['debug'])) { - $debug = $options['debug']; - } elseif (isset($_ENV['APP_DEBUG'])) { - $debug = $_ENV['APP_DEBUG']; - } elseif (isset($_SERVER['APP_DEBUG'])) { - $debug = $_SERVER['APP_DEBUG']; - } else { - $debug = true; - } - - return new static::$class($env, $debug); - } - - /** - * Shuts the kernel down if it was used in the test - called by the tearDown method by default. - */ - protected static function ensureKernelShutdown() - { - if (null !== static::$kernel) { - static::$kernel->boot(); - $container = static::$kernel->getContainer(); - static::$kernel->shutdown(); - static::$booted = false; - - if ($container instanceof ResetInterface) { - $container->reset(); - } - } - - static::$container = null; - } -} diff --git a/vendor/symfony/framework-bundle/Test/MailerAssertionsTrait.php b/vendor/symfony/framework-bundle/Test/MailerAssertionsTrait.php deleted file mode 100644 index 875c84d..0000000 --- a/vendor/symfony/framework-bundle/Test/MailerAssertionsTrait.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use PHPUnit\Framework\Constraint\LogicalNot; -use Symfony\Component\Mailer\Event\MessageEvent; -use Symfony\Component\Mailer\Event\MessageEvents; -use Symfony\Component\Mailer\Test\Constraint as MailerConstraint; -use Symfony\Component\Mime\RawMessage; -use Symfony\Component\Mime\Test\Constraint as MimeConstraint; - -trait MailerAssertionsTrait -{ - public static function assertEmailCount(int $count, string $transport = null, string $message = ''): void - { - self::assertThat(self::getMessageMailerEvents(), new MailerConstraint\EmailCount($count, $transport), $message); - } - - public static function assertQueuedEmailCount(int $count, string $transport = null, string $message = ''): void - { - self::assertThat(self::getMessageMailerEvents(), new MailerConstraint\EmailCount($count, $transport, true), $message); - } - - public static function assertEmailIsQueued(MessageEvent $event, string $message = ''): void - { - self::assertThat($event, new MailerConstraint\EmailIsQueued(), $message); - } - - public static function assertEmailIsNotQueued(MessageEvent $event, string $message = ''): void - { - self::assertThat($event, new LogicalNot(new MailerConstraint\EmailIsQueued()), $message); - } - - public static function assertEmailAttachmentCount(RawMessage $email, int $count, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailAttachmentCount($count), $message); - } - - public static function assertEmailTextBodyContains(RawMessage $email, string $text, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailTextBodyContains($text), $message); - } - - public static function assertEmailTextBodyNotContains(RawMessage $email, string $text, string $message = ''): void - { - self::assertThat($email, new LogicalNot(new MimeConstraint\EmailTextBodyContains($text)), $message); - } - - public static function assertEmailHtmlBodyContains(RawMessage $email, string $text, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailHtmlBodyContains($text), $message); - } - - public static function assertEmailHtmlBodyNotContains(RawMessage $email, string $text, string $message = ''): void - { - self::assertThat($email, new LogicalNot(new MimeConstraint\EmailHtmlBodyContains($text)), $message); - } - - public static function assertEmailHasHeader(RawMessage $email, string $headerName, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailHasHeader($headerName), $message); - } - - public static function assertEmailNotHasHeader(RawMessage $email, string $headerName, string $message = ''): void - { - self::assertThat($email, new LogicalNot(new MimeConstraint\EmailHasHeader($headerName)), $message); - } - - public static function assertEmailHeaderSame(RawMessage $email, string $headerName, string $expectedValue, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailHeaderSame($headerName, $expectedValue), $message); - } - - public static function assertEmailHeaderNotSame(RawMessage $email, string $headerName, string $expectedValue, string $message = ''): void - { - self::assertThat($email, new LogicalNot(new MimeConstraint\EmailHeaderSame($headerName, $expectedValue)), $message); - } - - public static function assertEmailAddressContains(RawMessage $email, string $headerName, string $expectedValue, string $message = ''): void - { - self::assertThat($email, new MimeConstraint\EmailAddressContains($headerName, $expectedValue), $message); - } - - /** - * @return MessageEvents[] - */ - public static function getMailerEvents(string $transport = null): array - { - return self::getMessageMailerEvents()->getEvents($transport); - } - - public static function getMailerEvent(int $index = 0, string $transport = null): ?MessageEvent - { - return self::getMailerEvents($transport)[$index] ?? null; - } - - /** - * @return RawMessage[] - */ - public static function getMailerMessages(string $transport = null): array - { - return self::getMessageMailerEvents()->getMessages($transport); - } - - public static function getMailerMessage(int $index = 0, string $transport = null): ?RawMessage - { - return self::getMailerMessages($transport)[$index] ?? null; - } - - private static function getMessageMailerEvents(): MessageEvents - { - $container = static::getContainer(); - if ($container->has('mailer.message_logger_listener')) { - return $container->get('mailer.message_logger_listener')->getEvents(); - } - - if ($container->has('mailer.logger_message_listener')) { - return $container->get('mailer.logger_message_listener')->getEvents(); - } - - static::fail('A client must have Mailer enabled to make email assertions. Did you forget to require symfony/mailer?'); - } -} diff --git a/vendor/symfony/framework-bundle/Test/TestBrowserToken.php b/vendor/symfony/framework-bundle/Test/TestBrowserToken.php deleted file mode 100644 index 7580743..0000000 --- a/vendor/symfony/framework-bundle/Test/TestBrowserToken.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * A very limited token that is used to login in tests using the KernelBrowser. - * - * @author Wouter de Jong - */ -class TestBrowserToken extends AbstractToken -{ - private $firewallName; - - public function __construct(array $roles = [], UserInterface $user = null, string $firewallName = 'main') - { - parent::__construct($roles); - - if (null !== $user) { - $this->setUser($user); - } - - $this->firewallName = $firewallName; - } - - public function getFirewallName(): string - { - return $this->firewallName; - } - - public function getCredentials() - { - return null; - } - - public function __serialize(): array - { - return [$this->firewallName, parent::__serialize()]; - } - - public function __unserialize(array $data): void - { - [$this->firewallName, $parentData] = $data; - - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/framework-bundle/Test/TestContainer.php b/vendor/symfony/framework-bundle/Test/TestContainer.php deleted file mode 100644 index 7e2fa9a..0000000 --- a/vendor/symfony/framework-bundle/Test/TestContainer.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * A special container used in tests. This gives access to both public and - * private services. The container will not include private services that has - * been inlined or removed. Private services will be removed when they are not - * used by other services. - * - * @author Nicolas Grekas - * - * @internal - */ -class TestContainer extends Container -{ - private $kernel; - private $privateServicesLocatorId; - - public function __construct(KernelInterface $kernel, string $privateServicesLocatorId) - { - $this->kernel = $kernel; - $this->privateServicesLocatorId = $privateServicesLocatorId; - } - - /** - * {@inheritdoc} - */ - public function compile() - { - $this->getPublicContainer()->compile(); - } - - /** - * {@inheritdoc} - */ - public function isCompiled(): bool - { - return $this->getPublicContainer()->isCompiled(); - } - - /** - * {@inheritdoc} - */ - public function getParameterBag(): ParameterBagInterface - { - return $this->getPublicContainer()->getParameterBag(); - } - - /** - * {@inheritdoc} - * - * @return array|bool|float|int|string|\UnitEnum|null - */ - public function getParameter(string $name) - { - return $this->getPublicContainer()->getParameter($name); - } - - /** - * {@inheritdoc} - */ - public function hasParameter(string $name): bool - { - return $this->getPublicContainer()->hasParameter($name); - } - - /** - * {@inheritdoc} - */ - public function setParameter(string $name, $value) - { - $this->getPublicContainer()->setParameter($name, $value); - } - - /** - * {@inheritdoc} - */ - public function set(string $id, $service) - { - $this->getPublicContainer()->set($id, $service); - } - - /** - * {@inheritdoc} - */ - public function has(string $id): bool - { - return $this->getPublicContainer()->has($id) || $this->getPrivateContainer()->has($id); - } - - /** - * {@inheritdoc} - */ - public function get(string $id, int $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1): ?object - { - return $this->getPrivateContainer()->has($id) ? $this->getPrivateContainer()->get($id) : $this->getPublicContainer()->get($id, $invalidBehavior); - } - - /** - * {@inheritdoc} - */ - public function initialized(string $id): bool - { - return $this->getPublicContainer()->initialized($id); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - // ignore the call - } - - /** - * {@inheritdoc} - */ - public function getServiceIds(): array - { - return $this->getPublicContainer()->getServiceIds(); - } - - /** - * {@inheritdoc} - */ - public function getRemovedIds(): array - { - return $this->getPublicContainer()->getRemovedIds(); - } - - private function getPublicContainer(): Container - { - if (null === $container = $this->kernel->getContainer()) { - throw new \LogicException('Cannot access the container on a non-booted kernel. Did you forget to boot it?'); - } - - return $container; - } - - private function getPrivateContainer(): ContainerInterface - { - return $this->getPublicContainer()->get($this->privateServicesLocatorId); - } -} diff --git a/vendor/symfony/framework-bundle/Test/WebTestAssertionsTrait.php b/vendor/symfony/framework-bundle/Test/WebTestAssertionsTrait.php deleted file mode 100644 index 0f1742e..0000000 --- a/vendor/symfony/framework-bundle/Test/WebTestAssertionsTrait.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -trait WebTestAssertionsTrait -{ - use BrowserKitAssertionsTrait; - use DomCrawlerAssertionsTrait; -} diff --git a/vendor/symfony/framework-bundle/Test/WebTestCase.php b/vendor/symfony/framework-bundle/Test/WebTestCase.php deleted file mode 100644 index e1bceae..0000000 --- a/vendor/symfony/framework-bundle/Test/WebTestCase.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Test; - -use Symfony\Bundle\FrameworkBundle\KernelBrowser; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -/** - * WebTestCase is the base class for functional tests. - * - * @author Fabien Potencier - */ -abstract class WebTestCase extends KernelTestCase -{ - use WebTestAssertionsTrait; - - protected function tearDown(): void - { - parent::tearDown(); - self::getClient(null); - } - - /** - * Creates a KernelBrowser. - * - * @param array $options An array of options to pass to the createKernel method - * @param array $server An array of server parameters - * - * @return KernelBrowser - */ - protected static function createClient(array $options = [], array $server = []) - { - if (static::$booted) { - throw new \LogicException(sprintf('Booting the kernel before calling "%s()" is not supported, the kernel should only be booted once.', __METHOD__)); - } - - $kernel = static::bootKernel($options); - - try { - $client = $kernel->getContainer()->get('test.client'); - } catch (ServiceNotFoundException $e) { - if (class_exists(KernelBrowser::class)) { - throw new \LogicException('You cannot create the client used in functional tests if the "framework.test" config is not set to true.'); - } - throw new \LogicException('You cannot create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit".'); - } - - $client->setServerParameters($server); - - return self::getClient($client); - } -} diff --git a/vendor/symfony/framework-bundle/Translation/Translator.php b/vendor/symfony/framework-bundle/Translation/Translator.php deleted file mode 100644 index 5173f8a..0000000 --- a/vendor/symfony/framework-bundle/Translation/Translator.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\Translation; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; -use Symfony\Component\Translation\Translator as BaseTranslator; - -/** - * @author Fabien Potencier - */ -class Translator extends BaseTranslator implements WarmableInterface -{ - protected $container; - protected $loaderIds; - - protected $options = [ - 'cache_dir' => null, - 'debug' => false, - 'resource_files' => [], - 'scanned_directories' => [], - 'cache_vary' => [], - ]; - - /** - * @var list - */ - private $resourceLocales; - - /** - * Holds parameters from addResource() calls so we can defer the actual - * parent::addResource() calls until initialize() is executed. - * - * @var array[] - */ - private $resources = []; - - /** - * @var string[][] - */ - private $resourceFiles; - - /** - * @var string[] - */ - private $scannedDirectories; - - /** - * @var string[] - */ - private $enabledLocales; - - /** - * Constructor. - * - * Available options: - * - * * cache_dir: The cache directory (or null to disable caching) - * * debug: Whether to enable debugging or not (false by default) - * * resource_files: List of translation resources available grouped by locale. - * * cache_vary: An array of data that is serialized to generate the cached catalogue name. - * - * @throws InvalidArgumentException - */ - public function __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = [], array $options = [], array $enabledLocales = []) - { - $this->container = $container; - $this->loaderIds = $loaderIds; - $this->enabledLocales = $enabledLocales; - - // check option names - if ($diff = array_diff(array_keys($options), array_keys($this->options))) { - throw new InvalidArgumentException(sprintf('The Translator does not support the following options: \'%s\'.', implode('\', \'', $diff))); - } - - $this->options = array_merge($this->options, $options); - $this->resourceLocales = array_keys($this->options['resource_files']); - $this->resourceFiles = $this->options['resource_files']; - $this->scannedDirectories = $this->options['scanned_directories']; - - parent::__construct($defaultLocale, $formatter, $this->options['cache_dir'], $this->options['debug'], $this->options['cache_vary']); - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - // skip warmUp when translator doesn't use cache - if (null === $this->options['cache_dir']) { - return []; - } - - $localesToWarmUp = $this->enabledLocales ?: array_merge($this->getFallbackLocales(), [$this->getLocale()], $this->resourceLocales); - - foreach (array_unique($localesToWarmUp) as $locale) { - // reset catalogue in case it's already loaded during the dump of the other locales. - if (isset($this->catalogues[$locale])) { - unset($this->catalogues[$locale]); - } - - $this->loadCatalogue($locale); - } - - return []; - } - - public function addResource(string $format, $resource, string $locale, string $domain = null) - { - if ($this->resourceFiles) { - $this->addResourceFiles(); - } - $this->resources[] = [$format, $resource, $locale, $domain]; - } - - /** - * {@inheritdoc} - */ - protected function initializeCatalogue(string $locale) - { - $this->initialize(); - parent::initializeCatalogue($locale); - } - - /** - * @internal - */ - protected function doLoadCatalogue(string $locale): void - { - parent::doLoadCatalogue($locale); - - foreach ($this->scannedDirectories as $directory) { - $resourceClass = file_exists($directory) ? DirectoryResource::class : FileExistenceResource::class; - $this->catalogues[$locale]->addResource(new $resourceClass($directory)); - } - } - - protected function initialize() - { - if ($this->resourceFiles) { - $this->addResourceFiles(); - } - foreach ($this->resources as $params) { - [$format, $resource, $locale, $domain] = $params; - parent::addResource($format, $resource, $locale, $domain); - } - $this->resources = []; - - foreach ($this->loaderIds as $id => $aliases) { - foreach ($aliases as $alias) { - $this->addLoader($alias, $this->container->get($id)); - } - } - } - - private function addResourceFiles(): void - { - $filesByLocale = $this->resourceFiles; - $this->resourceFiles = []; - - foreach ($filesByLocale as $files) { - foreach ($files as $file) { - // filename is domain.locale.format - $fileNameParts = explode('.', basename($file)); - $format = array_pop($fileNameParts); - $locale = array_pop($fileNameParts); - $domain = implode('.', $fileNameParts); - $this->addResource($format, $file, $locale, $domain); - } - } - } -} diff --git a/vendor/symfony/framework-bundle/composer.json b/vendor/symfony/framework-bundle/composer.json deleted file mode 100644 index 467044d..0000000 --- a/vendor/symfony/framework-bundle/composer.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "symfony/framework-bundle", - "type": "symfony-bundle", - "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "ext-xml": "*", - "symfony/cache": "^5.2|^6.0", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^5.4.5|^6.0.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/error-handler": "^4.4.1|^5.0.1|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/routing": "^5.3|^6.0" - }, - "require-dev": { - "doctrine/annotations": "^1.13.1", - "doctrine/cache": "^1.11|^2.0", - "doctrine/persistence": "^1.3|^2.0", - "symfony/asset": "^5.3|^6.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/form": "^5.2|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/mailer": "^5.2|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/notifier": "^5.4|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/security-bundle": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/string": "^5.0|^6.0", - "symfony/translation": "^5.3|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", - "symfony/workflow": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/property-info": "^4.4|^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "twig/twig": "^2.10|^3.0" - }, - "conflict": { - "doctrine/annotations": "<1.13.1", - "doctrine/cache": "<1.11", - "doctrine/persistence": "<1.3", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "phpunit/phpunit": "<5.4.3", - "symfony/asset": "<5.3", - "symfony/console": "<5.2.5", - "symfony/dotenv": "<5.1", - "symfony/dom-crawler": "<4.4", - "symfony/http-client": "<4.4", - "symfony/form": "<5.2", - "symfony/lock": "<4.4", - "symfony/mailer": "<5.2", - "symfony/messenger": "<5.4", - "symfony/mime": "<4.4", - "symfony/property-info": "<4.4", - "symfony/property-access": "<5.3", - "symfony/serializer": "<5.2", - "symfony/service-contracts": ">=3.0", - "symfony/security-csrf": "<5.3", - "symfony/stopwatch": "<4.4", - "symfony/translation": "<5.3", - "symfony/twig-bridge": "<4.4", - "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", - "symfony/web-profiler-bundle": "<4.4", - "symfony/workflow": "<5.2" - }, - "suggest": { - "ext-apcu": "For best performance of the system caches", - "symfony/console": "For using the console commands", - "symfony/form": "For using forms", - "symfony/serializer": "For using the serializer service", - "symfony/validator": "For using validation", - "symfony/yaml": "For using the debug:config and lint:yaml commands", - "symfony/property-info": "For using the property_info service", - "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/http-client-contracts/.gitignore b/vendor/symfony/http-client-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/http-client-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/http-client-contracts/CHANGELOG.md b/vendor/symfony/http-client-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/http-client-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/http-client-contracts/ChunkInterface.php b/vendor/symfony/http-client-contracts/ChunkInterface.php deleted file mode 100644 index 0800cb3..0000000 --- a/vendor/symfony/http-client-contracts/ChunkInterface.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * The interface of chunks returned by ResponseStreamInterface::current(). - * - * When the chunk is first, last or timeout, the content MUST be empty. - * When an unchecked timeout or a network error occurs, a TransportExceptionInterface - * MUST be thrown by the destructor unless one was already thrown by another method. - * - * @author Nicolas Grekas - */ -interface ChunkInterface -{ - /** - * Tells when the idle timeout has been reached. - * - * @throws TransportExceptionInterface on a network error - */ - public function isTimeout(): bool; - - /** - * Tells when headers just arrived. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function isFirst(): bool; - - /** - * Tells when the body just completed. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function isLast(): bool; - - /** - * Returns a [status code, headers] tuple when a 1xx status code was just received. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function getInformationalStatus(): ?array; - - /** - * Returns the content of the response chunk. - * - * @throws TransportExceptionInterface on a network error or when the idle timeout is reached - */ - public function getContent(): string; - - /** - * Returns the offset of the chunk in the response body. - */ - public function getOffset(): int; - - /** - * In case of error, returns the message that describes it. - */ - public function getError(): ?string; -} diff --git a/vendor/symfony/http-client-contracts/Exception/ClientExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/ClientExceptionInterface.php deleted file mode 100644 index 22d2b45..0000000 --- a/vendor/symfony/http-client-contracts/Exception/ClientExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 4xx response is returned. - * - * @author Nicolas Grekas - */ -interface ClientExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php deleted file mode 100644 index 971a7a2..0000000 --- a/vendor/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a content-type cannot be decoded to the expected representation. - * - * @author Nicolas Grekas - */ -interface DecodingExceptionInterface extends ExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/ExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/ExceptionInterface.php deleted file mode 100644 index e553b47..0000000 --- a/vendor/symfony/http-client-contracts/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * The base interface for all exceptions in the contract. - * - * @author Nicolas Grekas - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/HttpExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/HttpExceptionInterface.php deleted file mode 100644 index 17865ed..0000000 --- a/vendor/symfony/http-client-contracts/Exception/HttpExceptionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * Base interface for HTTP-related exceptions. - * - * @author Anton Chernikov - */ -interface HttpExceptionInterface extends ExceptionInterface -{ - public function getResponse(): ResponseInterface; -} diff --git a/vendor/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php deleted file mode 100644 index edd9b8a..0000000 --- a/vendor/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 3xx response is returned and the "max_redirects" option has been reached. - * - * @author Nicolas Grekas - */ -interface RedirectionExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/ServerExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/ServerExceptionInterface.php deleted file mode 100644 index 9bfe135..0000000 --- a/vendor/symfony/http-client-contracts/Exception/ServerExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When a 5xx response is returned. - * - * @author Nicolas Grekas - */ -interface ServerExceptionInterface extends HttpExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php deleted file mode 100644 index 08acf9f..0000000 --- a/vendor/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When an idle timeout occurs. - * - * @author Nicolas Grekas - */ -interface TimeoutExceptionInterface extends TransportExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/Exception/TransportExceptionInterface.php b/vendor/symfony/http-client-contracts/Exception/TransportExceptionInterface.php deleted file mode 100644 index 0c8d131..0000000 --- a/vendor/symfony/http-client-contracts/Exception/TransportExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Exception; - -/** - * When any error happens at the transport level. - * - * @author Nicolas Grekas - */ -interface TransportExceptionInterface extends ExceptionInterface -{ -} diff --git a/vendor/symfony/http-client-contracts/HttpClientInterface.php b/vendor/symfony/http-client-contracts/HttpClientInterface.php deleted file mode 100644 index 158c1a7..0000000 --- a/vendor/symfony/http-client-contracts/HttpClientInterface.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\Test\HttpClientTestCase; - -/** - * Provides flexible methods for requesting HTTP resources synchronously or asynchronously. - * - * @see HttpClientTestCase for a reference test suite - * - * @method static withOptions(array $options) Returns a new instance of the client with new default options - * - * @author Nicolas Grekas - */ -interface HttpClientInterface -{ - public const OPTIONS_DEFAULTS = [ - 'auth_basic' => null, // array|string - an array containing the username as first value, and optionally the - // password as the second one; or string like username:password - enabling HTTP Basic - // authentication (RFC 7617) - 'auth_bearer' => null, // string - a token enabling HTTP Bearer authorization (RFC 6750) - 'query' => [], // string[] - associative array of query string values to merge with the request's URL - 'headers' => [], // iterable|string[]|string[][] - headers names provided as keys or as part of values - 'body' => '', // array|string|resource|\Traversable|\Closure - the callback SHOULD yield a string - // smaller than the amount requested as argument; the empty string signals EOF; if - // an array is passed, it is meant as a form payload of field names and values - 'json' => null, // mixed - if set, implementations MUST set the "body" option to the JSON-encoded - // value and set the "content-type" header to a JSON-compatible value if it is not - // explicitly defined in the headers option - typically "application/json" - 'user_data' => null, // mixed - any extra data to attach to the request (scalar, callable, object...) that - // MUST be available via $response->getInfo('user_data') - not used internally - 'max_redirects' => 20, // int - the maximum number of redirects to follow; a value lower than or equal to 0 - // means redirects should not be followed; "Authorization" and "Cookie" headers MUST - // NOT follow except for the initial host name - 'http_version' => null, // string - defaults to the best supported version, typically 1.1 or 2.0 - 'base_uri' => null, // string - the URI to resolve relative URLs, following rules in RFC 3986, section 2 - 'buffer' => true, // bool|resource|\Closure - whether the content of the response should be buffered or not, - // or a stream resource where the response body should be written, - // or a closure telling if/where the response should be buffered based on its headers - 'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info) - throwing any exceptions MUST abort - // the request; it MUST be called on DNS resolution, on arrival of headers and on - // completion; it SHOULD be called on upload/download of data and at least 1/s - 'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution - 'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored - 'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached - 'timeout' => null, // float - the idle timeout - defaults to ini_get('default_socket_timeout') - 'max_duration' => 0, // float - the maximum execution time for the request+response as a whole; - // a value lower than or equal to 0 means it is unlimited - 'bindto' => '0', // string - the interface or the local socket to bind to - 'verify_peer' => true, // see https://php.net/context.ssl for the following options - 'verify_host' => true, - 'cafile' => null, - 'capath' => null, - 'local_cert' => null, - 'local_pk' => null, - 'passphrase' => null, - 'ciphers' => null, - 'peer_fingerprint' => null, - 'capture_peer_cert_chain' => false, - 'extra' => [], // array - additional options that can be ignored if unsupported, unlike regular options - ]; - - /** - * Requests an HTTP resource. - * - * Responses MUST be lazy, but their status code MUST be - * checked even if none of their public methods are called. - * - * Implementations are not required to support all options described above; they can also - * support more custom options; but in any case, they MUST throw a TransportExceptionInterface - * when an unsupported option is passed. - * - * @throws TransportExceptionInterface When an unsupported option is passed - */ - public function request(string $method, string $url, array $options = []): ResponseInterface; - - /** - * Yields responses chunk by chunk as they complete. - * - * @param ResponseInterface|iterable $responses One or more responses created by the current HTTP client - * @param float|null $timeout The idle timeout before yielding timeout chunks - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface; -} diff --git a/vendor/symfony/http-client-contracts/LICENSE b/vendor/symfony/http-client-contracts/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/http-client-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/http-client-contracts/README.md b/vendor/symfony/http-client-contracts/README.md deleted file mode 100644 index 03b3a69..0000000 --- a/vendor/symfony/http-client-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony HttpClient Contracts -============================ - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/http-client-contracts/ResponseInterface.php b/vendor/symfony/http-client-contracts/ResponseInterface.php deleted file mode 100644 index df71488..0000000 --- a/vendor/symfony/http-client-contracts/ResponseInterface.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * A (lazily retrieved) HTTP response. - * - * @author Nicolas Grekas - */ -interface ResponseInterface -{ - /** - * Gets the HTTP status code of the response. - * - * @throws TransportExceptionInterface when a network error occurs - */ - public function getStatusCode(): int; - - /** - * Gets the HTTP headers of the response. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @return string[][] The headers of the response keyed by header names in lowercase - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function getHeaders(bool $throw = true): array; - - /** - * Gets the response body as a string. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function getContent(bool $throw = true): string; - - /** - * Gets the response body decoded as array, typically from a JSON payload. - * - * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes - * - * @throws DecodingExceptionInterface When the body cannot be decoded to an array - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function toArray(bool $throw = true): array; - - /** - * Closes the response stream and all related buffers. - * - * No further chunk will be yielded after this method has been called. - */ - public function cancel(): void; - - /** - * Returns info coming from the transport layer. - * - * This method SHOULD NOT throw any ExceptionInterface and SHOULD be non-blocking. - * The returned info is "live": it can be empty and can change from one call to - * another, as the request/response progresses. - * - * The following info MUST be returned: - * - canceled (bool) - true if the response was canceled using ResponseInterface::cancel(), false otherwise - * - error (string|null) - the error message when the transfer was aborted, null otherwise - * - http_code (int) - the last response code or 0 when it is not known yet - * - http_method (string) - the HTTP verb of the last request - * - redirect_count (int) - the number of redirects followed while executing the request - * - redirect_url (string|null) - the resolved location of redirect responses, null otherwise - * - response_headers (array) - an array modelled after the special $http_response_header variable - * - start_time (float) - the time when the request was sent or 0.0 when it's pending - * - url (string) - the last effective URL of the request - * - user_data (mixed) - the value of the "user_data" request option, null if not set - * - * When the "capture_peer_cert_chain" option is true, the "peer_certificate_chain" - * attribute SHOULD list the peer certificates as an array of OpenSSL X.509 resources. - * - * Other info SHOULD be named after curl_getinfo()'s associative return value. - * - * @return mixed An array of all available info, or one of them when $type is - * provided, or null when an unsupported type is requested - */ - public function getInfo(string $type = null); -} diff --git a/vendor/symfony/http-client-contracts/ResponseStreamInterface.php b/vendor/symfony/http-client-contracts/ResponseStreamInterface.php deleted file mode 100644 index fa3e5db..0000000 --- a/vendor/symfony/http-client-contracts/ResponseStreamInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient; - -/** - * Yields response chunks, returned by HttpClientInterface::stream(). - * - * @author Nicolas Grekas - * - * @extends \Iterator - */ -interface ResponseStreamInterface extends \Iterator -{ - public function key(): ResponseInterface; - - public function current(): ChunkInterface; -} diff --git a/vendor/symfony/http-client-contracts/Test/Fixtures/web/index.php b/vendor/symfony/http-client-contracts/Test/Fixtures/web/index.php deleted file mode 100644 index 30a7049..0000000 --- a/vendor/symfony/http-client-contracts/Test/Fixtures/web/index.php +++ /dev/null @@ -1,192 +0,0 @@ - $v) { - switch ($k) { - default: - if (0 !== strpos($k, 'HTTP_')) { - continue 2; - } - // no break - case 'SERVER_NAME': - case 'SERVER_PROTOCOL': - case 'REQUEST_URI': - case 'REQUEST_METHOD': - case 'PHP_AUTH_USER': - case 'PHP_AUTH_PW': - $vars[$k] = $v; - } -} - -$json = json_encode($vars, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE); - -switch ($vars['REQUEST_URI']) { - default: - exit; - - case '/head': - header('Content-Length: '.strlen($json), true); - break; - - case '/': - case '/?a=a&b=b': - case 'http://127.0.0.1:8057/': - case 'http://localhost:8057/': - ob_start('ob_gzhandler'); - break; - - case '/103': - header('HTTP/1.1 103 Early Hints'); - header('Link: ; rel=preload; as=style', false); - header('Link: ; rel=preload; as=script', false); - flush(); - usleep(1000); - echo "HTTP/1.1 200 OK\r\n"; - echo "Date: Fri, 26 May 2017 10:02:11 GMT\r\n"; - echo "Content-Length: 13\r\n"; - echo "\r\n"; - echo 'Here the body'; - exit; - - case '/404': - header('Content-Type: application/json', true, 404); - break; - - case '/404-gzipped': - header('Content-Type: text/plain', true, 404); - ob_start('ob_gzhandler'); - @ob_flush(); - flush(); - usleep(300000); - echo 'some text'; - exit; - - case '/301': - if ('Basic Zm9vOmJhcg==' === $vars['HTTP_AUTHORIZATION']) { - header('Location: http://127.0.0.1:8057/302', true, 301); - } - break; - - case '/301/bad-tld': - header('Location: http://foo.example.', true, 301); - break; - - case '/301/invalid': - header('Location: //?foo=bar', true, 301); - break; - - case '/302': - if (!isset($vars['HTTP_AUTHORIZATION'])) { - header('Location: http://localhost:8057/', true, 302); - } - break; - - case '/302/relative': - header('Location: ..', true, 302); - break; - - case '/304': - header('Content-Length: 10', true, 304); - echo '12345'; - - return; - - case '/307': - header('Location: http://localhost:8057/post', true, 307); - break; - - case '/length-broken': - header('Content-Length: 1000'); - break; - - case '/post': - $output = json_encode($_POST + ['REQUEST_METHOD' => $vars['REQUEST_METHOD']], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE); - header('Content-Type: application/json', true); - header('Content-Length: '.strlen($output)); - echo $output; - exit; - - case '/timeout-header': - usleep(300000); - break; - - case '/timeout-body': - echo '<1>'; - @ob_flush(); - flush(); - usleep(500000); - echo '<2>'; - exit; - - case '/timeout-long': - ignore_user_abort(false); - sleep(1); - while (true) { - echo '<1>'; - @ob_flush(); - flush(); - usleep(500); - } - exit; - - case '/chunked': - header('Transfer-Encoding: chunked'); - echo "8\r\nSymfony \r\n5\r\nis aw\r\n6\r\nesome!\r\n0\r\n\r\n"; - exit; - - case '/chunked-broken': - header('Transfer-Encoding: chunked'); - echo "8\r\nSymfony \r\n5\r\nis aw\r\n6\r\ne"; - exit; - - case '/gzip-broken': - header('Content-Encoding: gzip'); - echo str_repeat('-', 1000); - exit; - - case '/max-duration': - ignore_user_abort(false); - while (true) { - echo '<1>'; - @ob_flush(); - flush(); - usleep(500); - } - exit; - - case '/json': - header('Content-Type: application/json'); - echo json_encode([ - 'documents' => [ - ['id' => '/json/1'], - ['id' => '/json/2'], - ['id' => '/json/3'], - ], - ]); - exit; - - case '/json/1': - case '/json/2': - case '/json/3': - header('Content-Type: application/json'); - echo json_encode([ - 'title' => $vars['REQUEST_URI'], - ]); - - exit; -} - -header('Content-Type: application/json', true); - -echo $json; diff --git a/vendor/symfony/http-client-contracts/Test/HttpClientTestCase.php b/vendor/symfony/http-client-contracts/Test/HttpClientTestCase.php deleted file mode 100644 index efb57bc..0000000 --- a/vendor/symfony/http-client-contracts/Test/HttpClientTestCase.php +++ /dev/null @@ -1,1132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TimeoutExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A reference test suite for HttpClientInterface implementations. - */ -abstract class HttpClientTestCase extends TestCase -{ - public static function setUpBeforeClass(): void - { - TestHttpServer::start(); - } - - abstract protected function getHttpClient(string $testCase): HttpClientInterface; - - public function testGetRequest() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057', [ - 'headers' => ['Foo' => 'baR'], - 'user_data' => $data = new \stdClass(), - ]); - - $this->assertSame([], $response->getInfo('response_headers')); - $this->assertSame($data, $response->getInfo()['user_data']); - $this->assertSame(200, $response->getStatusCode()); - - $info = $response->getInfo(); - $this->assertNull($info['error']); - $this->assertSame(0, $info['redirect_count']); - $this->assertSame('HTTP/1.1 200 OK', $info['response_headers'][0]); - $this->assertSame('Host: localhost:8057', $info['response_headers'][1]); - $this->assertSame('http://localhost:8057/', $info['url']); - - $headers = $response->getHeaders(); - - $this->assertSame('localhost:8057', $headers['host'][0]); - $this->assertSame(['application/json'], $headers['content-type']); - - $body = json_decode($response->getContent(), true); - $this->assertSame($body, $response->toArray()); - - $this->assertSame('HTTP/1.1', $body['SERVER_PROTOCOL']); - $this->assertSame('/', $body['REQUEST_URI']); - $this->assertSame('GET', $body['REQUEST_METHOD']); - $this->assertSame('localhost:8057', $body['HTTP_HOST']); - $this->assertSame('baR', $body['HTTP_FOO']); - - $response = $client->request('GET', 'http://localhost:8057/length-broken'); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testHeadRequest() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('HEAD', 'http://localhost:8057/head', [ - 'headers' => ['Foo' => 'baR'], - 'user_data' => $data = new \stdClass(), - 'buffer' => false, - ]); - - $this->assertSame([], $response->getInfo('response_headers')); - $this->assertSame(200, $response->getStatusCode()); - - $info = $response->getInfo(); - $this->assertSame('HTTP/1.1 200 OK', $info['response_headers'][0]); - $this->assertSame('Host: localhost:8057', $info['response_headers'][1]); - - $headers = $response->getHeaders(); - - $this->assertSame('localhost:8057', $headers['host'][0]); - $this->assertSame(['application/json'], $headers['content-type']); - $this->assertTrue(0 < $headers['content-length'][0]); - - $this->assertSame('', $response->getContent()); - } - - public function testNonBufferedGetRequest() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057', [ - 'buffer' => false, - 'headers' => ['Foo' => 'baR'], - ]); - - $body = $response->toArray(); - $this->assertSame('baR', $body['HTTP_FOO']); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testBufferSink() - { - $sink = fopen('php://temp', 'w+'); - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057', [ - 'buffer' => $sink, - 'headers' => ['Foo' => 'baR'], - ]); - - $body = $response->toArray(); - $this->assertSame('baR', $body['HTTP_FOO']); - - rewind($sink); - $sink = stream_get_contents($sink); - $this->assertSame($sink, $response->getContent()); - } - - public function testConditionalBuffering() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057'); - $firstContent = $response->getContent(); - $secondContent = $response->getContent(); - - $this->assertSame($firstContent, $secondContent); - - $response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () { return false; }]); - $response->getContent(); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testReentrantBufferCallback() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () use (&$response) { - $response->cancel(); - - return true; - }]); - - $this->assertSame(200, $response->getStatusCode()); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testThrowingBufferCallback() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('GET', 'http://localhost:8057', ['buffer' => function () { - throw new \Exception('Boo.'); - }]); - - $this->assertSame(200, $response->getStatusCode()); - - $this->expectException(TransportExceptionInterface::class); - $this->expectExceptionMessage('Boo'); - $response->getContent(); - } - - public function testUnsupportedOption() - { - $client = $this->getHttpClient(__FUNCTION__); - - $this->expectException(\InvalidArgumentException::class); - $client->request('GET', 'http://localhost:8057', [ - 'capture_peer_cert' => 1.0, - ]); - } - - public function testHttpVersion() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057', [ - 'http_version' => 1.0, - ]); - - $this->assertSame(200, $response->getStatusCode()); - $this->assertSame('HTTP/1.0 200 OK', $response->getInfo('response_headers')[0]); - - $body = $response->toArray(); - - $this->assertSame('HTTP/1.0', $body['SERVER_PROTOCOL']); - $this->assertSame('GET', $body['REQUEST_METHOD']); - $this->assertSame('/', $body['REQUEST_URI']); - } - - public function testChunkedEncoding() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/chunked'); - - $this->assertSame(['chunked'], $response->getHeaders()['transfer-encoding']); - $this->assertSame('Symfony is awesome!', $response->getContent()); - - $response = $client->request('GET', 'http://localhost:8057/chunked-broken'); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testClientError() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/404'); - - $client->stream($response)->valid(); - - $this->assertSame(404, $response->getInfo('http_code')); - - try { - $response->getHeaders(); - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (ClientExceptionInterface $e) { - } - - try { - $response->getContent(); - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (ClientExceptionInterface $e) { - } - - $this->assertSame(404, $response->getStatusCode()); - $this->assertSame(['application/json'], $response->getHeaders(false)['content-type']); - $this->assertNotEmpty($response->getContent(false)); - - $response = $client->request('GET', 'http://localhost:8057/404'); - - try { - foreach ($client->stream($response) as $chunk) { - $this->assertTrue($chunk->isFirst()); - } - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (ClientExceptionInterface $e) { - } - } - - public function testIgnoreErrors() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/404'); - - $this->assertSame(404, $response->getStatusCode()); - } - - public function testDnsError() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/301/bad-tld'); - - try { - $response->getStatusCode(); - $this->fail(TransportExceptionInterface::class.' expected'); - } catch (TransportExceptionInterface $e) { - $this->addToAssertionCount(1); - } - - try { - $response->getStatusCode(); - $this->fail(TransportExceptionInterface::class.' still expected'); - } catch (TransportExceptionInterface $e) { - $this->addToAssertionCount(1); - } - - $response = $client->request('GET', 'http://localhost:8057/301/bad-tld'); - - try { - foreach ($client->stream($response) as $r => $chunk) { - } - $this->fail(TransportExceptionInterface::class.' expected'); - } catch (TransportExceptionInterface $e) { - $this->addToAssertionCount(1); - } - - $this->assertSame($response, $r); - $this->assertNotNull($chunk->getError()); - - $this->expectException(TransportExceptionInterface::class); - foreach ($client->stream($response) as $chunk) { - } - } - - public function testInlineAuth() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://foo:bar%3Dbar@localhost:8057'); - - $body = $response->toArray(); - - $this->assertSame('foo', $body['PHP_AUTH_USER']); - $this->assertSame('bar=bar', $body['PHP_AUTH_PW']); - } - - public function testBadRequestBody() - { - $client = $this->getHttpClient(__FUNCTION__); - - $this->expectException(TransportExceptionInterface::class); - - $response = $client->request('POST', 'http://localhost:8057/', [ - 'body' => function () { yield []; }, - ]); - - $response->getStatusCode(); - } - - public function test304() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/304', [ - 'headers' => ['If-Match' => '"abc"'], - 'buffer' => false, - ]); - - $this->assertSame(304, $response->getStatusCode()); - $this->assertSame('', $response->getContent(false)); - } - - public function testRedirects() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('POST', 'http://localhost:8057/301', [ - 'auth_basic' => 'foo:bar', - 'body' => function () { - yield 'foo=bar'; - }, - ]); - - $body = $response->toArray(); - $this->assertSame('GET', $body['REQUEST_METHOD']); - $this->assertSame('Basic Zm9vOmJhcg==', $body['HTTP_AUTHORIZATION']); - $this->assertSame('http://localhost:8057/', $response->getInfo('url')); - - $this->assertSame(2, $response->getInfo('redirect_count')); - $this->assertNull($response->getInfo('redirect_url')); - - $expected = [ - 'HTTP/1.1 301 Moved Permanently', - 'Location: http://127.0.0.1:8057/302', - 'Content-Type: application/json', - 'HTTP/1.1 302 Found', - 'Location: http://localhost:8057/', - 'Content-Type: application/json', - 'HTTP/1.1 200 OK', - 'Content-Type: application/json', - ]; - - $filteredHeaders = array_values(array_filter($response->getInfo('response_headers'), function ($h) { - return \in_array(substr($h, 0, 4), ['HTTP', 'Loca', 'Cont'], true) && 'Content-Encoding: gzip' !== $h; - })); - - $this->assertSame($expected, $filteredHeaders); - } - - public function testInvalidRedirect() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/301/invalid'); - - $this->assertSame(301, $response->getStatusCode()); - $this->assertSame(['//?foo=bar'], $response->getHeaders(false)['location']); - $this->assertSame(0, $response->getInfo('redirect_count')); - $this->assertNull($response->getInfo('redirect_url')); - - $this->expectException(RedirectionExceptionInterface::class); - $response->getHeaders(); - } - - public function testRelativeRedirects() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/302/relative'); - - $body = $response->toArray(); - - $this->assertSame('/', $body['REQUEST_URI']); - $this->assertNull($response->getInfo('redirect_url')); - - $response = $client->request('GET', 'http://localhost:8057/302/relative', [ - 'max_redirects' => 0, - ]); - - $this->assertSame(302, $response->getStatusCode()); - $this->assertSame('http://localhost:8057/', $response->getInfo('redirect_url')); - } - - public function testRedirect307() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('POST', 'http://localhost:8057/307', [ - 'body' => function () { - yield 'foo=bar'; - }, - 'max_redirects' => 0, - ]); - - $this->assertSame(307, $response->getStatusCode()); - - $response = $client->request('POST', 'http://localhost:8057/307', [ - 'body' => 'foo=bar', - ]); - - $body = $response->toArray(); - - $this->assertSame(['foo' => 'bar', 'REQUEST_METHOD' => 'POST'], $body); - } - - public function testMaxRedirects() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/301', [ - 'max_redirects' => 1, - 'auth_basic' => 'foo:bar', - ]); - - try { - $response->getHeaders(); - $this->fail(RedirectionExceptionInterface::class.' expected'); - } catch (RedirectionExceptionInterface $e) { - } - - $this->assertSame(302, $response->getStatusCode()); - $this->assertSame(1, $response->getInfo('redirect_count')); - $this->assertSame('http://localhost:8057/', $response->getInfo('redirect_url')); - - $expected = [ - 'HTTP/1.1 301 Moved Permanently', - 'Location: http://127.0.0.1:8057/302', - 'Content-Type: application/json', - 'HTTP/1.1 302 Found', - 'Location: http://localhost:8057/', - 'Content-Type: application/json', - ]; - - $filteredHeaders = array_values(array_filter($response->getInfo('response_headers'), function ($h) { - return \in_array(substr($h, 0, 4), ['HTTP', 'Loca', 'Cont'], true); - })); - - $this->assertSame($expected, $filteredHeaders); - } - - public function testStream() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('GET', 'http://localhost:8057'); - $chunks = $client->stream($response); - $result = []; - - foreach ($chunks as $r => $chunk) { - if ($chunk->isTimeout()) { - $result[] = 't'; - } elseif ($chunk->isLast()) { - $result[] = 'l'; - } elseif ($chunk->isFirst()) { - $result[] = 'f'; - } - } - - $this->assertSame($response, $r); - $this->assertSame(['f', 'l'], $result); - - $chunk = null; - $i = 0; - - foreach ($client->stream($response) as $chunk) { - ++$i; - } - - $this->assertSame(1, $i); - $this->assertTrue($chunk->isLast()); - } - - public function testAddToStream() - { - $client = $this->getHttpClient(__FUNCTION__); - - $r1 = $client->request('GET', 'http://localhost:8057'); - - $completed = []; - - $pool = [$r1]; - - while ($pool) { - $chunks = $client->stream($pool); - $pool = []; - - foreach ($chunks as $r => $chunk) { - if (!$chunk->isLast()) { - continue; - } - - if ($r1 === $r) { - $r2 = $client->request('GET', 'http://localhost:8057'); - $pool[] = $r2; - } - - $completed[] = $r; - } - } - - $this->assertSame([$r1, $r2], $completed); - } - - public function testCompleteTypeError() - { - $client = $this->getHttpClient(__FUNCTION__); - - $this->expectException(\TypeError::class); - $client->stream(123); - } - - public function testOnProgress() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('POST', 'http://localhost:8057/post', [ - 'headers' => ['Content-Length' => 14], - 'body' => 'foo=0123456789', - 'on_progress' => function (...$state) use (&$steps) { $steps[] = $state; }, - ]); - - $body = $response->toArray(); - - $this->assertSame(['foo' => '0123456789', 'REQUEST_METHOD' => 'POST'], $body); - $this->assertSame([0, 0], \array_slice($steps[0], 0, 2)); - $lastStep = \array_slice($steps, -1)[0]; - $this->assertSame([57, 57], \array_slice($lastStep, 0, 2)); - $this->assertSame('http://localhost:8057/post', $steps[0][2]['url']); - } - - public function testPostJson() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('POST', 'http://localhost:8057/post', [ - 'json' => ['foo' => 'bar'], - ]); - - $body = $response->toArray(); - - $this->assertStringContainsString('json', $body['content-type']); - unset($body['content-type']); - $this->assertSame(['foo' => 'bar', 'REQUEST_METHOD' => 'POST'], $body); - } - - public function testPostArray() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('POST', 'http://localhost:8057/post', [ - 'body' => ['foo' => 'bar'], - ]); - - $this->assertSame(['foo' => 'bar', 'REQUEST_METHOD' => 'POST'], $response->toArray()); - } - - public function testPostResource() - { - $client = $this->getHttpClient(__FUNCTION__); - - $h = fopen('php://temp', 'w+'); - fwrite($h, 'foo=0123456789'); - rewind($h); - - $response = $client->request('POST', 'http://localhost:8057/post', [ - 'body' => $h, - ]); - - $body = $response->toArray(); - - $this->assertSame(['foo' => '0123456789', 'REQUEST_METHOD' => 'POST'], $body); - } - - public function testPostCallback() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('POST', 'http://localhost:8057/post', [ - 'body' => function () { - yield 'foo'; - yield ''; - yield '='; - yield '0123456789'; - }, - ]); - - $this->assertSame(['foo' => '0123456789', 'REQUEST_METHOD' => 'POST'], $response->toArray()); - } - - public function testCancel() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-header'); - - $response->cancel(); - $this->expectException(TransportExceptionInterface::class); - $response->getHeaders(); - } - - public function testInfoOnCanceledResponse() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('GET', 'http://localhost:8057/timeout-header'); - - $this->assertFalse($response->getInfo('canceled')); - $response->cancel(); - $this->assertTrue($response->getInfo('canceled')); - } - - public function testCancelInStream() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/404'); - - foreach ($client->stream($response) as $chunk) { - $response->cancel(); - } - - $this->expectException(TransportExceptionInterface::class); - - foreach ($client->stream($response) as $chunk) { - } - } - - public function testOnProgressCancel() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-body', [ - 'on_progress' => function ($dlNow) { - if (0 < $dlNow) { - throw new \Exception('Aborting the request.'); - } - }, - ]); - - try { - foreach ($client->stream([$response]) as $chunk) { - } - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (TransportExceptionInterface $e) { - $this->assertSame('Aborting the request.', $e->getPrevious()->getMessage()); - } - - $this->assertNotNull($response->getInfo('error')); - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testOnProgressError() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-body', [ - 'on_progress' => function ($dlNow) { - if (0 < $dlNow) { - throw new \Error('BUG.'); - } - }, - ]); - - try { - foreach ($client->stream([$response]) as $chunk) { - } - $this->fail('Error expected'); - } catch (\Error $e) { - $this->assertSame('BUG.', $e->getMessage()); - } - - $this->assertNotNull($response->getInfo('error')); - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testResolve() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://symfony.com:8057/', [ - 'resolve' => ['symfony.com' => '127.0.0.1'], - ]); - - $this->assertSame(200, $response->getStatusCode()); - $this->assertSame(200, $client->request('GET', 'http://symfony.com:8057/')->getStatusCode()); - - $response = null; - $this->expectException(TransportExceptionInterface::class); - $client->request('GET', 'http://symfony.com:8057/', ['timeout' => 1]); - } - - public function testIdnResolve() - { - $client = $this->getHttpClient(__FUNCTION__); - - $response = $client->request('GET', 'http://0-------------------------------------------------------------0.com:8057/', [ - 'resolve' => ['0-------------------------------------------------------------0.com' => '127.0.0.1'], - ]); - - $this->assertSame(200, $response->getStatusCode()); - - $response = $client->request('GET', 'http://Bücher.example:8057/', [ - 'resolve' => ['xn--bcher-kva.example' => '127.0.0.1'], - ]); - - $this->assertSame(200, $response->getStatusCode()); - } - - public function testNotATimeout() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-header', [ - 'timeout' => 0.9, - ]); - sleep(1); - $this->assertSame(200, $response->getStatusCode()); - } - - public function testTimeoutOnAccess() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-header', [ - 'timeout' => 0.1, - ]); - - $this->expectException(TransportExceptionInterface::class); - $response->getHeaders(); - } - - public function testTimeoutIsNotAFatalError() - { - usleep(300000); // wait for the previous test to release the server - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-body', [ - 'timeout' => 0.25, - ]); - - try { - $response->getContent(); - $this->fail(TimeoutExceptionInterface::class.' expected'); - } catch (TimeoutExceptionInterface $e) { - } - - for ($i = 0; $i < 10; ++$i) { - try { - $this->assertSame('<1><2>', $response->getContent()); - break; - } catch (TimeoutExceptionInterface $e) { - } - } - - if (10 === $i) { - throw $e; - } - } - - public function testTimeoutOnStream() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-body'); - - $this->assertSame(200, $response->getStatusCode()); - $chunks = $client->stream([$response], 0.2); - - $result = []; - - foreach ($chunks as $r => $chunk) { - if ($chunk->isTimeout()) { - $result[] = 't'; - } else { - $result[] = $chunk->getContent(); - } - } - - $this->assertSame(['<1>', 't'], $result); - - $chunks = $client->stream([$response]); - - foreach ($chunks as $r => $chunk) { - $this->assertSame('<2>', $chunk->getContent()); - $this->assertSame('<1><2>', $r->getContent()); - - return; - } - - $this->fail('The response should have completed'); - } - - public function testUncheckedTimeoutThrows() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/timeout-body'); - $chunks = $client->stream([$response], 0.1); - - $this->expectException(TransportExceptionInterface::class); - - foreach ($chunks as $r => $chunk) { - } - } - - public function testTimeoutWithActiveConcurrentStream() - { - $p1 = TestHttpServer::start(8067); - $p2 = TestHttpServer::start(8077); - - $client = $this->getHttpClient(__FUNCTION__); - $streamingResponse = $client->request('GET', 'http://localhost:8067/max-duration'); - $blockingResponse = $client->request('GET', 'http://localhost:8077/timeout-body', [ - 'timeout' => 0.25, - ]); - - $this->assertSame(200, $streamingResponse->getStatusCode()); - $this->assertSame(200, $blockingResponse->getStatusCode()); - - $this->expectException(TransportExceptionInterface::class); - - try { - $blockingResponse->getContent(); - } finally { - $p1->stop(); - $p2->stop(); - } - } - - public function testTimeoutOnInitialize() - { - $p1 = TestHttpServer::start(8067); - $p2 = TestHttpServer::start(8077); - - $client = $this->getHttpClient(__FUNCTION__); - $start = microtime(true); - $responses = []; - - $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); - - try { - foreach ($responses as $response) { - try { - $response->getContent(); - $this->fail(TransportExceptionInterface::class.' expected'); - } catch (TransportExceptionInterface $e) { - } - } - $responses = []; - - $duration = microtime(true) - $start; - - $this->assertLessThan(1.0, $duration); - } finally { - $p1->stop(); - $p2->stop(); - } - } - - public function testTimeoutOnDestruct() - { - $p1 = TestHttpServer::start(8067); - $p2 = TestHttpServer::start(8077); - - $client = $this->getHttpClient(__FUNCTION__); - $start = microtime(true); - $responses = []; - - $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); - - try { - while ($response = array_shift($responses)) { - try { - unset($response); - $this->fail(TransportExceptionInterface::class.' expected'); - } catch (TransportExceptionInterface $e) { - } - } - - $duration = microtime(true) - $start; - - $this->assertLessThan(1.0, $duration); - } finally { - $p1->stop(); - $p2->stop(); - } - } - - public function testDestruct() - { - $client = $this->getHttpClient(__FUNCTION__); - - $start = microtime(true); - $client->request('GET', 'http://localhost:8057/timeout-long'); - $client = null; - $duration = microtime(true) - $start; - - $this->assertGreaterThan(1, $duration); - $this->assertLessThan(4, $duration); - } - - public function testGetContentAfterDestruct() - { - $client = $this->getHttpClient(__FUNCTION__); - - try { - $client->request('GET', 'http://localhost:8057/404'); - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (ClientExceptionInterface $e) { - $this->assertSame('GET', $e->getResponse()->toArray(false)['REQUEST_METHOD']); - } - } - - public function testGetEncodedContentAfterDestruct() - { - $client = $this->getHttpClient(__FUNCTION__); - - try { - $client->request('GET', 'http://localhost:8057/404-gzipped'); - $this->fail(ClientExceptionInterface::class.' expected'); - } catch (ClientExceptionInterface $e) { - $this->assertSame('some text', $e->getResponse()->getContent(false)); - } - } - - public function testProxy() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/', [ - 'proxy' => 'http://localhost:8057', - ]); - - $body = $response->toArray(); - $this->assertSame('localhost:8057', $body['HTTP_HOST']); - $this->assertMatchesRegularExpression('#^http://(localhost|127\.0\.0\.1):8057/$#', $body['REQUEST_URI']); - - $response = $client->request('GET', 'http://localhost:8057/', [ - 'proxy' => 'http://foo:b%3Dar@localhost:8057', - ]); - - $body = $response->toArray(); - $this->assertSame('Basic Zm9vOmI9YXI=', $body['HTTP_PROXY_AUTHORIZATION']); - - $_SERVER['http_proxy'] = 'http://localhost:8057'; - try { - $response = $client->request('GET', 'http://localhost:8057/'); - $body = $response->toArray(); - $this->assertSame('localhost:8057', $body['HTTP_HOST']); - $this->assertMatchesRegularExpression('#^http://(localhost|127\.0\.0\.1):8057/$#', $body['REQUEST_URI']); - } finally { - unset($_SERVER['http_proxy']); - } - } - - public function testNoProxy() - { - putenv('no_proxy='.$_SERVER['no_proxy'] = 'example.com, localhost'); - - try { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/', [ - 'proxy' => 'http://localhost:8057', - ]); - - $body = $response->toArray(); - - $this->assertSame('HTTP/1.1', $body['SERVER_PROTOCOL']); - $this->assertSame('/', $body['REQUEST_URI']); - $this->assertSame('GET', $body['REQUEST_METHOD']); - } finally { - putenv('no_proxy'); - unset($_SERVER['no_proxy']); - } - } - - /** - * @requires extension zlib - */ - public function testAutoEncodingRequest() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057'); - - $this->assertSame(200, $response->getStatusCode()); - - $headers = $response->getHeaders(); - - $this->assertSame(['Accept-Encoding'], $headers['vary']); - $this->assertStringContainsString('gzip', $headers['content-encoding'][0]); - - $body = $response->toArray(); - - $this->assertStringContainsString('gzip', $body['HTTP_ACCEPT_ENCODING']); - } - - public function testBaseUri() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', '../404', [ - 'base_uri' => 'http://localhost:8057/abc/', - ]); - - $this->assertSame(404, $response->getStatusCode()); - $this->assertSame(['application/json'], $response->getHeaders(false)['content-type']); - } - - public function testQuery() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/?a=a', [ - 'query' => ['b' => 'b'], - ]); - - $body = $response->toArray(); - $this->assertSame('GET', $body['REQUEST_METHOD']); - $this->assertSame('/?a=a&b=b', $body['REQUEST_URI']); - } - - public function testInformationalResponse() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/103'); - - $this->assertSame('Here the body', $response->getContent()); - $this->assertSame(200, $response->getStatusCode()); - } - - public function testInformationalResponseStream() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/103'); - - $chunks = []; - foreach ($client->stream($response) as $chunk) { - $chunks[] = $chunk; - } - - $this->assertSame(103, $chunks[0]->getInformationalStatus()[0]); - $this->assertSame(['; rel=preload; as=style', '; rel=preload; as=script'], $chunks[0]->getInformationalStatus()[1]['link']); - $this->assertTrue($chunks[1]->isFirst()); - $this->assertSame('Here the body', $chunks[2]->getContent()); - $this->assertTrue($chunks[3]->isLast()); - $this->assertNull($chunks[3]->getInformationalStatus()); - - $this->assertSame(['date', 'content-length'], array_keys($response->getHeaders())); - $this->assertContains('Link: ; rel=preload; as=style', $response->getInfo('response_headers')); - } - - /** - * @requires extension zlib - */ - public function testUserlandEncodingRequest() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057', [ - 'headers' => ['Accept-Encoding' => 'gzip'], - ]); - - $headers = $response->getHeaders(); - - $this->assertSame(['Accept-Encoding'], $headers['vary']); - $this->assertStringContainsString('gzip', $headers['content-encoding'][0]); - - $body = $response->getContent(); - $this->assertSame("\x1F", $body[0]); - - $body = json_decode(gzdecode($body), true); - $this->assertSame('gzip', $body['HTTP_ACCEPT_ENCODING']); - } - - /** - * @requires extension zlib - */ - public function testGzipBroken() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/gzip-broken'); - - $this->expectException(TransportExceptionInterface::class); - $response->getContent(); - } - - public function testMaxDuration() - { - $client = $this->getHttpClient(__FUNCTION__); - $response = $client->request('GET', 'http://localhost:8057/max-duration', [ - 'max_duration' => 0.1, - ]); - - $start = microtime(true); - - try { - $response->getContent(); - } catch (TransportExceptionInterface $e) { - $this->addToAssertionCount(1); - } - - $duration = microtime(true) - $start; - - $this->assertLessThan(10, $duration); - } - - public function testWithOptions() - { - $client = $this->getHttpClient(__FUNCTION__); - if (!method_exists($client, 'withOptions')) { - $this->markTestSkipped(sprintf('Not implementing "%s::withOptions()" is deprecated.', get_debug_type($client))); - } - - $client2 = $client->withOptions(['base_uri' => 'http://localhost:8057/']); - - $this->assertNotSame($client, $client2); - $this->assertSame(\get_class($client), \get_class($client2)); - - $response = $client2->request('GET', '/'); - $this->assertSame(200, $response->getStatusCode()); - } -} diff --git a/vendor/symfony/http-client-contracts/Test/TestHttpServer.php b/vendor/symfony/http-client-contracts/Test/TestHttpServer.php deleted file mode 100644 index 55a744a..0000000 --- a/vendor/symfony/http-client-contracts/Test/TestHttpServer.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\HttpClient\Test; - -use Symfony\Component\Process\PhpExecutableFinder; -use Symfony\Component\Process\Process; - -class TestHttpServer -{ - private static $process = []; - - /** - * @return Process - */ - public static function start(int $port = 8057) - { - if (isset(self::$process[$port])) { - self::$process[$port]->stop(); - } else { - register_shutdown_function(static function () use ($port) { - self::$process[$port]->stop(); - }); - } - - $finder = new PhpExecutableFinder(); - $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:'.$port])); - $process->setWorkingDirectory(__DIR__.'/Fixtures/web'); - $process->start(); - self::$process[$port] = $process; - - do { - usleep(50000); - } while (!@fopen('http://127.0.0.1:'.$port, 'r')); - - return $process; - } -} diff --git a/vendor/symfony/http-client-contracts/composer.json b/vendor/symfony/http-client-contracts/composer.json deleted file mode 100644 index b76cab8..0000000 --- a/vendor/symfony/http-client-contracts/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/http-client-contracts", - "type": "library", - "description": "Generic abstractions related to HTTP clients", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/http-client/AmpHttpClient.php b/vendor/symfony/http-client/AmpHttpClient.php deleted file mode 100644 index 96a5e0a..0000000 --- a/vendor/symfony/http-client/AmpHttpClient.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Amp\CancelledException; -use Amp\Http\Client\DelegateHttpClient; -use Amp\Http\Client\InterceptedHttpClient; -use Amp\Http\Client\PooledHttpClient; -use Amp\Http\Client\Request; -use Amp\Http\Tunnel\Http1TunnelConnector; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\AmpClientState; -use Symfony\Component\HttpClient\Response\AmpResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -if (!interface_exists(DelegateHttpClient::class)) { - throw new \LogicException('You cannot use "Symfony\Component\HttpClient\AmpHttpClient" as the "amphp/http-client" package is not installed. Try running "composer require amphp/http-client".'); -} - -/** - * A portable implementation of the HttpClientInterface contracts based on Amp's HTTP client. - * - * @author Nicolas Grekas - */ -final class AmpHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface -{ - use HttpClientTrait; - use LoggerAwareTrait; - - private $defaultOptions = self::OPTIONS_DEFAULTS; - private static $emptyDefaults = self::OPTIONS_DEFAULTS; - - /** @var AmpClientState */ - private $multi; - - /** - * @param array $defaultOptions Default requests' options - * @param callable $clientConfigurator A callable that builds a {@see DelegateHttpClient} from a {@see PooledHttpClient}; - * passing null builds an {@see InterceptedHttpClient} with 2 retries on failures - * @param int $maxHostConnections The maximum number of connections to a single host - * @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public function __construct(array $defaultOptions = [], callable $clientConfigurator = null, int $maxHostConnections = 6, int $maxPendingPushes = 50) - { - $this->defaultOptions['buffer'] = $this->defaultOptions['buffer'] ?? \Closure::fromCallable([__CLASS__, 'shouldBuffer']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - - $this->multi = new AmpClientState($clientConfigurator, $maxHostConnections, $maxPendingPushes, $this->logger); - } - - /** - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions); - - $options['proxy'] = self::getProxy($options['proxy'], $url, $options['no_proxy']); - - if (null !== $options['proxy'] && !class_exists(Http1TunnelConnector::class)) { - throw new \LogicException('You cannot use the "proxy" option as the "amphp/http-tunnel" package is not installed. Try running "composer require amphp/http-tunnel".'); - } - - if ($options['bindto']) { - if (0 === strpos($options['bindto'], 'if!')) { - throw new TransportException(__CLASS__.' cannot bind to network interfaces, use e.g. CurlHttpClient instead.'); - } - if (0 === strpos($options['bindto'], 'host!')) { - $options['bindto'] = substr($options['bindto'], 5); - } - } - - if (('' !== $options['body'] || 'POST' === $method || isset($options['normalized_headers']['content-length'])) && !isset($options['normalized_headers']['content-type'])) { - $options['headers'][] = 'Content-Type: application/x-www-form-urlencoded'; - } - - if (!isset($options['normalized_headers']['user-agent'])) { - $options['headers'][] = 'User-Agent: Symfony HttpClient/Amp'; - } - - if (0 < $options['max_duration']) { - $options['timeout'] = min($options['max_duration'], $options['timeout']); - } - - if ($options['resolve']) { - $this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache; - } - - if ($options['peer_fingerprint'] && !isset($options['peer_fingerprint']['pin-sha256'])) { - throw new TransportException(__CLASS__.' supports only "pin-sha256" fingerprints.'); - } - - $request = new Request(implode('', $url), $method); - - if ($options['http_version']) { - switch ((float) $options['http_version']) { - case 1.0: $request->setProtocolVersions(['1.0']); break; - case 1.1: $request->setProtocolVersions(['1.1', '1.0']); break; - default: $request->setProtocolVersions(['2', '1.1', '1.0']); break; - } - } - - foreach ($options['headers'] as $v) { - $h = explode(': ', $v, 2); - $request->addHeader($h[0], $h[1]); - } - - $request->setTcpConnectTimeout(1000 * $options['timeout']); - $request->setTlsHandshakeTimeout(1000 * $options['timeout']); - $request->setTransferTimeout(1000 * $options['max_duration']); - if (method_exists($request, 'setInactivityTimeout')) { - $request->setInactivityTimeout(0); - } - - if ('' !== $request->getUri()->getUserInfo() && !$request->hasHeader('authorization')) { - $auth = explode(':', $request->getUri()->getUserInfo(), 2); - $auth = array_map('rawurldecode', $auth) + [1 => '']; - $request->setHeader('Authorization', 'Basic '.base64_encode(implode(':', $auth))); - } - - return new AmpResponse($this->multi, $request, $options, $this->logger); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof AmpResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of AmpResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - return new ResponseStream(AmpResponse::stream($responses, $timeout)); - } - - public function reset() - { - $this->multi->dnsCache = []; - - foreach ($this->multi->pushedResponses as $authority => $pushedResponses) { - foreach ($pushedResponses as [$pushedUrl, $pushDeferred]) { - $pushDeferred->fail(new CancelledException()); - - if ($this->logger) { - $this->logger->debug(sprintf('Unused pushed response: "%s"', $pushedUrl)); - } - } - } - - $this->multi->pushedResponses = []; - } -} diff --git a/vendor/symfony/http-client/AsyncDecoratorTrait.php b/vendor/symfony/http-client/AsyncDecoratorTrait.php deleted file mode 100644 index aff402d..0000000 --- a/vendor/symfony/http-client/AsyncDecoratorTrait.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Response\AsyncResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * Eases with processing responses while streaming them. - * - * @author Nicolas Grekas - */ -trait AsyncDecoratorTrait -{ - use DecoratorTrait; - - /** - * {@inheritdoc} - * - * @return AsyncResponse - */ - abstract public function request(string $method, string $url, array $options = []): ResponseInterface; - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof AsyncResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of AsyncResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - return new ResponseStream(AsyncResponse::stream($responses, $timeout, static::class)); - } -} diff --git a/vendor/symfony/http-client/CHANGELOG.md b/vendor/symfony/http-client/CHANGELOG.md deleted file mode 100644 index 7c2fc22..0000000 --- a/vendor/symfony/http-client/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `MockHttpClient::setResponseFactory()` method to be able to set response factory after client creating - -5.3 ---- - - * Implement `HttpClientInterface::withOptions()` from `symfony/contracts` v2.4 - * Add `DecoratorTrait` to ease writing simple decorators - -5.2.0 ------ - - * added `AsyncDecoratorTrait` to ease processing responses without breaking async - * added support for pausing responses with a new `pause_handler` callable exposed as an info item - * added `StreamableInterface` to ease turning responses into PHP streams - * added `MockResponse::getRequestMethod()` and `getRequestUrl()` to allow inspecting which request has been sent - * added `EventSourceHttpClient` a Server-Sent events stream implementing the [EventSource specification](https://www.w3.org/TR/eventsource/#eventsource) - * added option "extra.curl" to allow setting additional curl options in `CurlHttpClient` - * added `RetryableHttpClient` to automatically retry failed HTTP requests. - * added `extra.trace_content` option to `TraceableHttpClient` to prevent it from keeping the content in memory - -5.1.0 ------ - - * added `NoPrivateNetworkHttpClient` decorator - * added `AmpHttpClient`, a portable HTTP/2 implementation based on Amp - * added `LoggerAwareInterface` to `ScopingHttpClient` and `TraceableHttpClient` - * made `HttpClient::create()` return an `AmpHttpClient` when `amphp/http-client` is found but curl is not or too old - -4.4.0 ------ - - * added `canceled` to `ResponseInterface::getInfo()` - * added `HttpClient::createForBaseUri()` - * added `HttplugClient` with support for sync and async requests - * added `max_duration` option - * added support for NTLM authentication - * added `StreamWrapper` to cast any `ResponseInterface` instances to PHP streams. - * added `$response->toStream()` to cast responses to regular PHP streams - * made `Psr18Client` implement relevant PSR-17 factories and have streaming responses - * added `TraceableHttpClient`, `HttpClientDataCollector` and `HttpClientPass` to integrate with the web profiler - * allow enabling buffering conditionally with a Closure - * allow option "buffer" to be a stream resource - * allow arbitrary values for the "json" option - -4.3.0 ------ - - * added the component diff --git a/vendor/symfony/http-client/CachingHttpClient.php b/vendor/symfony/http-client/CachingHttpClient.php deleted file mode 100644 index e1d7023..0000000 --- a/vendor/symfony/http-client/CachingHttpClient.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpCache\HttpCache; -use Symfony\Component\HttpKernel\HttpCache\StoreInterface; -use Symfony\Component\HttpKernel\HttpClientKernel; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Adds caching on top of an HTTP client. - * - * The implementation buffers responses in memory and doesn't stream directly from the network. - * You can disable/enable this layer by setting option "no_cache" under "extra" to true/false. - * By default, caching is enabled unless the "buffer" option is set to false. - * - * @author Nicolas Grekas - */ -class CachingHttpClient implements HttpClientInterface, ResetInterface -{ - use HttpClientTrait; - - private $client; - private $cache; - private $defaultOptions = self::OPTIONS_DEFAULTS; - - public function __construct(HttpClientInterface $client, StoreInterface $store, array $defaultOptions = []) - { - if (!class_exists(HttpClientKernel::class)) { - throw new \LogicException(sprintf('Using "%s" requires that the HttpKernel component version 4.3 or higher is installed, try running "composer require symfony/http-kernel:^5.4".', __CLASS__)); - } - - $this->client = $client; - $kernel = new HttpClientKernel($client); - $this->cache = new HttpCache($kernel, $store, null, $defaultOptions); - - unset($defaultOptions['debug']); - unset($defaultOptions['default_ttl']); - unset($defaultOptions['private_headers']); - unset($defaultOptions['allow_reload']); - unset($defaultOptions['allow_revalidate']); - unset($defaultOptions['stale_while_revalidate']); - unset($defaultOptions['stale_if_error']); - unset($defaultOptions['trace_level']); - unset($defaultOptions['trace_header']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); - $url = implode('', $url); - - if (!empty($options['body']) || !empty($options['extra']['no_cache']) || !\in_array($method, ['GET', 'HEAD', 'OPTIONS'])) { - return $this->client->request($method, $url, $options); - } - - $request = Request::create($url, $method); - $request->attributes->set('http_client_options', $options); - - foreach ($options['normalized_headers'] as $name => $values) { - if ('cookie' !== $name) { - foreach ($values as $value) { - $request->headers->set($name, substr($value, 2 + \strlen($name)), false); - } - - continue; - } - - foreach ($values as $cookies) { - foreach (explode('; ', substr($cookies, \strlen('Cookie: '))) as $cookie) { - if ('' !== $cookie) { - $cookie = explode('=', $cookie, 2); - $request->cookies->set($cookie[0], $cookie[1] ?? ''); - } - } - } - } - - $response = $this->cache->handle($request); - $response = new MockResponse($response->getContent(), [ - 'http_code' => $response->getStatusCode(), - 'response_headers' => $response->headers->allPreserveCase(), - ]); - - return MockResponse::fromRequest($method, $url, $options, $response); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof ResponseInterface) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of ResponseInterface objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - $mockResponses = []; - $clientResponses = []; - - foreach ($responses as $response) { - if ($response instanceof MockResponse) { - $mockResponses[] = $response; - } else { - $clientResponses[] = $response; - } - } - - if (!$mockResponses) { - return $this->client->stream($clientResponses, $timeout); - } - - if (!$clientResponses) { - return new ResponseStream(MockResponse::stream($mockResponses, $timeout)); - } - - return new ResponseStream((function () use ($mockResponses, $clientResponses, $timeout) { - yield from MockResponse::stream($mockResponses, $timeout); - yield $this->client->stream($clientResponses, $timeout); - })()); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } -} diff --git a/vendor/symfony/http-client/Chunk/DataChunk.php b/vendor/symfony/http-client/Chunk/DataChunk.php deleted file mode 100644 index 37ca848..0000000 --- a/vendor/symfony/http-client/Chunk/DataChunk.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -use Symfony\Contracts\HttpClient\ChunkInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class DataChunk implements ChunkInterface -{ - private $offset = 0; - private $content = ''; - - public function __construct(int $offset = 0, string $content = '') - { - $this->offset = $offset; - $this->content = $content; - } - - /** - * {@inheritdoc} - */ - public function isTimeout(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getContent(): string - { - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function getOffset(): int - { - return $this->offset; - } - - /** - * {@inheritdoc} - */ - public function getError(): ?string - { - return null; - } -} diff --git a/vendor/symfony/http-client/Chunk/ErrorChunk.php b/vendor/symfony/http-client/Chunk/ErrorChunk.php deleted file mode 100644 index a19f433..0000000 --- a/vendor/symfony/http-client/Chunk/ErrorChunk.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -use Symfony\Component\HttpClient\Exception\TimeoutException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Contracts\HttpClient\ChunkInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ErrorChunk implements ChunkInterface -{ - private $didThrow = false; - private $offset; - private $errorMessage; - private $error; - - /** - * @param \Throwable|string $error - */ - public function __construct(int $offset, $error) - { - $this->offset = $offset; - - if (\is_string($error)) { - $this->errorMessage = $error; - } else { - $this->error = $error; - $this->errorMessage = $error->getMessage(); - } - } - - /** - * {@inheritdoc} - */ - public function isTimeout(): bool - { - $this->didThrow = true; - - if (null !== $this->error) { - throw new TransportException($this->errorMessage, 0, $this->error); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - $this->didThrow = true; - throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); - } - - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - $this->didThrow = true; - throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - $this->didThrow = true; - throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); - } - - /** - * {@inheritdoc} - */ - public function getContent(): string - { - $this->didThrow = true; - throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); - } - - /** - * {@inheritdoc} - */ - public function getOffset(): int - { - return $this->offset; - } - - /** - * {@inheritdoc} - */ - public function getError(): ?string - { - return $this->errorMessage; - } - - /** - * @return bool Whether the wrapped error has been thrown or not - */ - public function didThrow(bool $didThrow = null): bool - { - if (null !== $didThrow && $this->didThrow !== $didThrow) { - return !$this->didThrow = $didThrow; - } - - return $this->didThrow; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (!$this->didThrow) { - $this->didThrow = true; - throw null !== $this->error ? new TransportException($this->errorMessage, 0, $this->error) : new TimeoutException($this->errorMessage); - } - } -} diff --git a/vendor/symfony/http-client/Chunk/FirstChunk.php b/vendor/symfony/http-client/Chunk/FirstChunk.php deleted file mode 100644 index d891ca8..0000000 --- a/vendor/symfony/http-client/Chunk/FirstChunk.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class FirstChunk extends DataChunk -{ - /** - * {@inheritdoc} - */ - public function isFirst(): bool - { - return true; - } -} diff --git a/vendor/symfony/http-client/Chunk/InformationalChunk.php b/vendor/symfony/http-client/Chunk/InformationalChunk.php deleted file mode 100644 index c4452f1..0000000 --- a/vendor/symfony/http-client/Chunk/InformationalChunk.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class InformationalChunk extends DataChunk -{ - private $status; - - public function __construct(int $statusCode, array $headers) - { - $this->status = [$statusCode, $headers]; - } - - /** - * {@inheritdoc} - */ - public function getInformationalStatus(): ?array - { - return $this->status; - } -} diff --git a/vendor/symfony/http-client/Chunk/LastChunk.php b/vendor/symfony/http-client/Chunk/LastChunk.php deleted file mode 100644 index 84095d3..0000000 --- a/vendor/symfony/http-client/Chunk/LastChunk.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class LastChunk extends DataChunk -{ - /** - * {@inheritdoc} - */ - public function isLast(): bool - { - return true; - } -} diff --git a/vendor/symfony/http-client/Chunk/ServerSentEvent.php b/vendor/symfony/http-client/Chunk/ServerSentEvent.php deleted file mode 100644 index f7ff4b9..0000000 --- a/vendor/symfony/http-client/Chunk/ServerSentEvent.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Chunk; - -use Symfony\Contracts\HttpClient\ChunkInterface; - -/** - * @author Antoine Bluchet - * @author Nicolas Grekas - */ -final class ServerSentEvent extends DataChunk implements ChunkInterface -{ - private $data = ''; - private $id = ''; - private $type = 'message'; - private $retry = 0; - - public function __construct(string $content) - { - parent::__construct(-1, $content); - - // remove BOM - if (0 === strpos($content, "\xEF\xBB\xBF")) { - $content = substr($content, 3); - } - - foreach (preg_split("/(?:\r\n|[\r\n])/", $content) as $line) { - if (0 === $i = strpos($line, ':')) { - continue; - } - - $i = false === $i ? \strlen($line) : $i; - $field = substr($line, 0, $i); - $i += 1 + (' ' === ($line[1 + $i] ?? '')); - - switch ($field) { - case 'id': $this->id = substr($line, $i); break; - case 'event': $this->type = substr($line, $i); break; - case 'data': $this->data .= ('' === $this->data ? '' : "\n").substr($line, $i); break; - case 'retry': - $retry = substr($line, $i); - - if ('' !== $retry && \strlen($retry) === strspn($retry, '0123456789')) { - $this->retry = $retry / 1000.0; - } - break; - } - } - } - - public function getId(): string - { - return $this->id; - } - - public function getType(): string - { - return $this->type; - } - - public function getData(): string - { - return $this->data; - } - - public function getRetry(): float - { - return $this->retry; - } -} diff --git a/vendor/symfony/http-client/CurlHttpClient.php b/vendor/symfony/http-client/CurlHttpClient.php deleted file mode 100644 index d50f324..0000000 --- a/vendor/symfony/http-client/CurlHttpClient.php +++ /dev/null @@ -1,551 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\CurlClientState; -use Symfony\Component\HttpClient\Internal\PushedResponse; -use Symfony\Component\HttpClient\Response\CurlResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * A performant implementation of the HttpClientInterface contracts based on the curl extension. - * - * This provides fully concurrent HTTP requests, with transparent - * HTTP/2 push when a curl version that supports it is installed. - * - * @author Nicolas Grekas - */ -final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface -{ - use HttpClientTrait; - - private $defaultOptions = self::OPTIONS_DEFAULTS + [ - 'auth_ntlm' => null, // array|string - an array containing the username as first value, and optionally the - // password as the second one; or string like username:password - enabling NTLM auth - 'extra' => [ - 'curl' => [], // A list of extra curl options indexed by their corresponding CURLOPT_* - ], - ]; - private static $emptyDefaults = self::OPTIONS_DEFAULTS + ['auth_ntlm' => null]; - - /** - * @var LoggerInterface|null - */ - private $logger; - - /** - * An internal object to share state between the client and its responses. - * - * @var CurlClientState - */ - private $multi; - - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to a single host - * @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50) - { - if (!\extension_loaded('curl')) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\CurlHttpClient" as the "curl" extension is not installed.'); - } - - $this->defaultOptions['buffer'] = $this->defaultOptions['buffer'] ?? \Closure::fromCallable([__CLASS__, 'shouldBuffer']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - - $this->multi = new CurlClientState($maxHostConnections, $maxPendingPushes); - } - - public function setLogger(LoggerInterface $logger): void - { - $this->logger = $this->multi->logger = $logger; - } - - /** - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions); - $scheme = $url['scheme']; - $authority = $url['authority']; - $host = parse_url($authority, \PHP_URL_HOST); - $proxy = $options['proxy'] - ?? ('https:' === $url['scheme'] ? $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? null : null) - // Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities - ?? $_SERVER['http_proxy'] ?? (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null; - $url = implode('', $url); - - if (!isset($options['normalized_headers']['user-agent'])) { - $options['headers'][] = 'User-Agent: Symfony HttpClient/Curl'; - } - - $curlopts = [ - \CURLOPT_URL => $url, - \CURLOPT_TCP_NODELAY => true, - \CURLOPT_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS, - \CURLOPT_REDIR_PROTOCOLS => \CURLPROTO_HTTP | \CURLPROTO_HTTPS, - \CURLOPT_FOLLOWLOCATION => true, - \CURLOPT_MAXREDIRS => 0 < $options['max_redirects'] ? $options['max_redirects'] : 0, - \CURLOPT_COOKIEFILE => '', // Keep track of cookies during redirects - \CURLOPT_TIMEOUT => 0, - \CURLOPT_PROXY => $proxy, - \CURLOPT_NOPROXY => $options['no_proxy'] ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '', - \CURLOPT_SSL_VERIFYPEER => $options['verify_peer'], - \CURLOPT_SSL_VERIFYHOST => $options['verify_host'] ? 2 : 0, - \CURLOPT_CAINFO => $options['cafile'], - \CURLOPT_CAPATH => $options['capath'], - \CURLOPT_SSL_CIPHER_LIST => $options['ciphers'], - \CURLOPT_SSLCERT => $options['local_cert'], - \CURLOPT_SSLKEY => $options['local_pk'], - \CURLOPT_KEYPASSWD => $options['passphrase'], - \CURLOPT_CERTINFO => $options['capture_peer_cert_chain'], - ]; - - if (1.0 === (float) $options['http_version']) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; - } elseif (1.1 === (float) $options['http_version']) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - } elseif (\defined('CURL_VERSION_HTTP2') && (\CURL_VERSION_HTTP2 & CurlClientState::$curlVersion['features']) && ('https:' === $scheme || 2.0 === (float) $options['http_version'])) { - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; - } - - if (isset($options['auth_ntlm'])) { - $curlopts[\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $curlopts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; - - if (\is_array($options['auth_ntlm'])) { - $count = \count($options['auth_ntlm']); - if ($count <= 0 || $count > 2) { - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must contain 1 or 2 elements, %d given.', $count)); - } - - $options['auth_ntlm'] = implode(':', $options['auth_ntlm']); - } - - if (!\is_string($options['auth_ntlm'])) { - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must be a string or an array, "%s" given.', get_debug_type($options['auth_ntlm']))); - } - - $curlopts[\CURLOPT_USERPWD] = $options['auth_ntlm']; - } - - if (!\ZEND_THREAD_SAFE) { - $curlopts[\CURLOPT_DNS_USE_GLOBAL_CACHE] = false; - } - - if (\defined('CURLOPT_HEADEROPT') && \defined('CURLHEADER_SEPARATE')) { - $curlopts[\CURLOPT_HEADEROPT] = \CURLHEADER_SEPARATE; - } - - // curl's resolve feature varies by host:port but ours varies by host only, let's handle this with our own DNS map - if (isset($this->multi->dnsCache->hostnames[$host])) { - $options['resolve'] += [$host => $this->multi->dnsCache->hostnames[$host]]; - } - - if ($options['resolve'] || $this->multi->dnsCache->evictions) { - // First reset any old DNS cache entries then add the new ones - $resolve = $this->multi->dnsCache->evictions; - $this->multi->dnsCache->evictions = []; - $port = parse_url($authority, \PHP_URL_PORT) ?: ('http:' === $scheme ? 80 : 443); - - if ($resolve && 0x072A00 > CurlClientState::$curlVersion['version_number']) { - // DNS cache removals require curl 7.42 or higher - $this->multi->reset(); - } - - foreach ($options['resolve'] as $host => $ip) { - $resolve[] = null === $ip ? "-$host:$port" : "$host:$port:$ip"; - $this->multi->dnsCache->hostnames[$host] = $ip; - $this->multi->dnsCache->removals["-$host:$port"] = "-$host:$port"; - } - - $curlopts[\CURLOPT_RESOLVE] = $resolve; - } - - if ('POST' === $method) { - // Use CURLOPT_POST to have browser-like POST-to-GET redirects for 301, 302 and 303 - $curlopts[\CURLOPT_POST] = true; - } elseif ('HEAD' === $method) { - $curlopts[\CURLOPT_NOBODY] = true; - } else { - $curlopts[\CURLOPT_CUSTOMREQUEST] = $method; - } - - if ('\\' !== \DIRECTORY_SEPARATOR && $options['timeout'] < 1) { - $curlopts[\CURLOPT_NOSIGNAL] = true; - } - - if (\extension_loaded('zlib') && !isset($options['normalized_headers']['accept-encoding'])) { - $options['headers'][] = 'Accept-Encoding: gzip'; // Expose only one encoding, some servers mess up when more are provided - } - - foreach ($options['headers'] as $header) { - if (':' === $header[-2] && \strlen($header) - 2 === strpos($header, ': ')) { - // curl requires a special syntax to send empty headers - $curlopts[\CURLOPT_HTTPHEADER][] = substr_replace($header, ';', -2); - } else { - $curlopts[\CURLOPT_HTTPHEADER][] = $header; - } - } - - // Prevent curl from sending its default Accept and Expect headers - foreach (['accept', 'expect'] as $header) { - if (!isset($options['normalized_headers'][$header][0])) { - $curlopts[\CURLOPT_HTTPHEADER][] = $header.':'; - } - } - - if (!\is_string($body = $options['body'])) { - if (\is_resource($body)) { - $curlopts[\CURLOPT_INFILE] = $body; - } else { - $eof = false; - $buffer = ''; - $curlopts[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body, &$buffer, &$eof) { - return self::readRequestBody($length, $body, $buffer, $eof); - }; - } - - if (isset($options['normalized_headers']['content-length'][0])) { - $curlopts[\CURLOPT_INFILESIZE] = substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: ')); - } elseif (!isset($options['normalized_headers']['transfer-encoding'])) { - $curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding: chunked'; // Enable chunked request bodies - } - - if ('POST' !== $method) { - $curlopts[\CURLOPT_UPLOAD] = true; - - if (!isset($options['normalized_headers']['content-type'])) { - $curlopts[\CURLOPT_HTTPHEADER][] = 'Content-Type: application/x-www-form-urlencoded'; - } - } - } elseif ('' !== $body || 'POST' === $method) { - $curlopts[\CURLOPT_POSTFIELDS] = $body; - } - - if ($options['peer_fingerprint']) { - if (!isset($options['peer_fingerprint']['pin-sha256'])) { - throw new TransportException(__CLASS__.' supports only "pin-sha256" fingerprints.'); - } - - $curlopts[\CURLOPT_PINNEDPUBLICKEY] = 'sha256//'.implode(';sha256//', $options['peer_fingerprint']['pin-sha256']); - } - - if ($options['bindto']) { - if (file_exists($options['bindto'])) { - $curlopts[\CURLOPT_UNIX_SOCKET_PATH] = $options['bindto']; - } elseif (!str_starts_with($options['bindto'], 'if!') && preg_match('/^(.*):(\d+)$/', $options['bindto'], $matches)) { - $curlopts[\CURLOPT_INTERFACE] = $matches[1]; - $curlopts[\CURLOPT_LOCALPORT] = $matches[2]; - } else { - $curlopts[\CURLOPT_INTERFACE] = $options['bindto']; - } - } - - if (0 < $options['max_duration']) { - $curlopts[\CURLOPT_TIMEOUT_MS] = 1000 * $options['max_duration']; - } - - if (!empty($options['extra']['curl']) && \is_array($options['extra']['curl'])) { - $this->validateExtraCurlOptions($options['extra']['curl']); - $curlopts += $options['extra']['curl']; - } - - if ($pushedResponse = $this->multi->pushedResponses[$url] ?? null) { - unset($this->multi->pushedResponses[$url]); - - if (self::acceptPushForRequest($method, $options, $pushedResponse)) { - $this->logger && $this->logger->debug(sprintf('Accepting pushed response: "%s %s"', $method, $url)); - - // Reinitialize the pushed response with request's options - $ch = $pushedResponse->handle; - $pushedResponse = $pushedResponse->response; - $pushedResponse->__construct($this->multi, $url, $options, $this->logger); - } else { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response: "%s"', $url)); - $pushedResponse = null; - } - } - - if (!$pushedResponse) { - $ch = curl_init(); - $this->logger && $this->logger->info(sprintf('Request: "%s %s"', $method, $url)); - $curlopts += [\CURLOPT_SHARE => $this->multi->share]; - } - - foreach ($curlopts as $opt => $value) { - if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt && (!\defined('CURLOPT_HEADEROPT') || \CURLOPT_HEADEROPT !== $opt)) { - $constantName = $this->findConstantName($opt); - throw new TransportException(sprintf('Curl option "%s" is not supported.', $constantName ?? $opt)); - } - } - - return $pushedResponse ?? new CurlResponse($this->multi, $ch, $options, $this->logger, $method, self::createRedirectResolver($options, $host), CurlClientState::$curlVersion['version_number']); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof CurlResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of CurlResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - if (\is_resource($this->multi->handle) || $this->multi->handle instanceof \CurlMultiHandle) { - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active)) { - } - } - - return new ResponseStream(CurlResponse::stream($responses, $timeout)); - } - - public function reset() - { - $this->multi->reset(); - } - - /** - * Accepts pushed responses only if their headers related to authentication match the request. - */ - private static function acceptPushForRequest(string $method, array $options, PushedResponse $pushedResponse): bool - { - if ('' !== $options['body'] || $method !== $pushedResponse->requestHeaders[':method'][0]) { - return false; - } - - foreach (['proxy', 'no_proxy', 'bindto', 'local_cert', 'local_pk'] as $k) { - if ($options[$k] !== $pushedResponse->parentOptions[$k]) { - return false; - } - } - - foreach (['authorization', 'cookie', 'range', 'proxy-authorization'] as $k) { - $normalizedHeaders = $options['normalized_headers'][$k] ?? []; - foreach ($normalizedHeaders as $i => $v) { - $normalizedHeaders[$i] = substr($v, \strlen($k) + 2); - } - - if (($pushedResponse->requestHeaders[$k] ?? []) !== $normalizedHeaders) { - return false; - } - } - - return true; - } - - /** - * Wraps the request's body callback to allow it to return strings longer than curl requested. - */ - private static function readRequestBody(int $length, \Closure $body, string &$buffer, bool &$eof): string - { - if (!$eof && \strlen($buffer) < $length) { - if (!\is_string($data = $body($length))) { - throw new TransportException(sprintf('The return value of the "body" option callback must be a string, "%s" returned.', get_debug_type($data))); - } - - $buffer .= $data; - $eof = '' === $data; - } - - $data = substr($buffer, 0, $length); - $buffer = substr($buffer, $length); - - return $data; - } - - /** - * Resolves relative URLs on redirects and deals with authentication headers. - * - * Work around CVE-2018-1000007: Authorization and Cookie headers should not follow redirects - fixed in Curl 7.64 - */ - private static function createRedirectResolver(array $options, string $host): \Closure - { - $redirectHeaders = []; - if (0 < $options['max_redirects']) { - $redirectHeaders['host'] = $host; - $redirectHeaders['with_auth'] = $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Host:'); - }); - - if (isset($options['normalized_headers']['authorization'][0]) || isset($options['normalized_headers']['cookie'][0])) { - $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Authorization:') && 0 !== stripos($h, 'Cookie:'); - }); - } - } - - return static function ($ch, string $location, bool $noContent) use (&$redirectHeaders) { - try { - $location = self::parseUrl($location); - } catch (InvalidArgumentException $e) { - return null; - } - - if ($noContent && $redirectHeaders) { - $filterContentHeaders = static function ($h) { - return 0 !== stripos($h, 'Content-Length:') && 0 !== stripos($h, 'Content-Type:') && 0 !== stripos($h, 'Transfer-Encoding:'); - }; - $redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], $filterContentHeaders); - $redirectHeaders['with_auth'] = array_filter($redirectHeaders['with_auth'], $filterContentHeaders); - } - - if ($redirectHeaders && $host = parse_url('http:'.$location['authority'], \PHP_URL_HOST)) { - $requestHeaders = $redirectHeaders['host'] === $host ? $redirectHeaders['with_auth'] : $redirectHeaders['no_auth']; - curl_setopt($ch, \CURLOPT_HTTPHEADER, $requestHeaders); - } elseif ($noContent && $redirectHeaders) { - curl_setopt($ch, \CURLOPT_HTTPHEADER, $redirectHeaders['with_auth']); - } - - $url = self::parseUrl(curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)); - $url = self::resolveUrl($location, $url); - - curl_setopt($ch, \CURLOPT_PROXY, $options['proxy'] - ?? ('https:' === $url['scheme'] ? $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? null : null) - // Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities - ?? $_SERVER['http_proxy'] ?? (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null - ); - - return implode('', $url); - }; - } - - private function findConstantName(int $opt): ?string - { - $constants = array_filter(get_defined_constants(), static function ($v, $k) use ($opt) { - return $v === $opt && 'C' === $k[0] && (str_starts_with($k, 'CURLOPT_') || str_starts_with($k, 'CURLINFO_')); - }, \ARRAY_FILTER_USE_BOTH); - - return key($constants); - } - - /** - * Prevents overriding options that are set internally throughout the request. - */ - private function validateExtraCurlOptions(array $options): void - { - $curloptsToConfig = [ - //options used in CurlHttpClient - \CURLOPT_HTTPAUTH => 'auth_ntlm', - \CURLOPT_USERPWD => 'auth_ntlm', - \CURLOPT_RESOLVE => 'resolve', - \CURLOPT_NOSIGNAL => 'timeout', - \CURLOPT_HTTPHEADER => 'headers', - \CURLOPT_INFILE => 'body', - \CURLOPT_READFUNCTION => 'body', - \CURLOPT_INFILESIZE => 'body', - \CURLOPT_POSTFIELDS => 'body', - \CURLOPT_UPLOAD => 'body', - \CURLOPT_INTERFACE => 'bindto', - \CURLOPT_TIMEOUT_MS => 'max_duration', - \CURLOPT_TIMEOUT => 'max_duration', - \CURLOPT_MAXREDIRS => 'max_redirects', - \CURLOPT_PROXY => 'proxy', - \CURLOPT_NOPROXY => 'no_proxy', - \CURLOPT_SSL_VERIFYPEER => 'verify_peer', - \CURLOPT_SSL_VERIFYHOST => 'verify_host', - \CURLOPT_CAINFO => 'cafile', - \CURLOPT_CAPATH => 'capath', - \CURLOPT_SSL_CIPHER_LIST => 'ciphers', - \CURLOPT_SSLCERT => 'local_cert', - \CURLOPT_SSLKEY => 'local_pk', - \CURLOPT_KEYPASSWD => 'passphrase', - \CURLOPT_CERTINFO => 'capture_peer_cert_chain', - \CURLOPT_USERAGENT => 'normalized_headers', - \CURLOPT_REFERER => 'headers', - //options used in CurlResponse - \CURLOPT_NOPROGRESS => 'on_progress', - \CURLOPT_PROGRESSFUNCTION => 'on_progress', - ]; - - if (\defined('CURLOPT_UNIX_SOCKET_PATH')) { - $curloptsToConfig[\CURLOPT_UNIX_SOCKET_PATH] = 'bindto'; - } - - if (\defined('CURLOPT_PINNEDPUBLICKEY')) { - $curloptsToConfig[\CURLOPT_PINNEDPUBLICKEY] = 'peer_fingerprint'; - } - - $curloptsToCheck = [ - \CURLOPT_PRIVATE, - \CURLOPT_HEADERFUNCTION, - \CURLOPT_WRITEFUNCTION, - \CURLOPT_VERBOSE, - \CURLOPT_STDERR, - \CURLOPT_RETURNTRANSFER, - \CURLOPT_URL, - \CURLOPT_FOLLOWLOCATION, - \CURLOPT_HEADER, - \CURLOPT_CONNECTTIMEOUT, - \CURLOPT_CONNECTTIMEOUT_MS, - \CURLOPT_HTTP_VERSION, - \CURLOPT_PORT, - \CURLOPT_DNS_USE_GLOBAL_CACHE, - \CURLOPT_PROTOCOLS, - \CURLOPT_REDIR_PROTOCOLS, - \CURLOPT_COOKIEFILE, - \CURLINFO_REDIRECT_COUNT, - ]; - - if (\defined('CURLOPT_HTTP09_ALLOWED')) { - $curloptsToCheck[] = \CURLOPT_HTTP09_ALLOWED; - } - - if (\defined('CURLOPT_HEADEROPT')) { - $curloptsToCheck[] = \CURLOPT_HEADEROPT; - } - - $methodOpts = [ - \CURLOPT_POST, - \CURLOPT_PUT, - \CURLOPT_CUSTOMREQUEST, - \CURLOPT_HTTPGET, - \CURLOPT_NOBODY, - ]; - - foreach ($options as $opt => $optValue) { - if (isset($curloptsToConfig[$opt])) { - $constName = $this->findConstantName($opt) ?? $opt; - throw new InvalidArgumentException(sprintf('Cannot set "%s" with "extra.curl", use option "%s" instead.', $constName, $curloptsToConfig[$opt])); - } - - if (\in_array($opt, $methodOpts)) { - throw new InvalidArgumentException('The HTTP method cannot be overridden using "extra.curl".'); - } - - if (\in_array($opt, $curloptsToCheck)) { - $constName = $this->findConstantName($opt) ?? $opt; - throw new InvalidArgumentException(sprintf('Cannot set "%s" with "extra.curl".', $constName)); - } - } - } -} diff --git a/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php b/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php deleted file mode 100644 index db8bbbd..0000000 --- a/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\DataCollector; - -use Symfony\Component\HttpClient\TraceableHttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Component\VarDumper\Caster\ImgStub; - -/** - * @author Jérémy Romey - */ -final class HttpClientDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var TraceableHttpClient[] - */ - private $clients = []; - - public function registerClient(string $name, TraceableHttpClient $client) - { - $this->clients[$name] = $client; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->reset(); - - foreach ($this->clients as $name => $client) { - [$errorCount, $traces] = $this->collectOnClient($client); - - $this->data['clients'][$name] = [ - 'traces' => $traces, - 'error_count' => $errorCount, - ]; - - $this->data['request_count'] += \count($traces); - $this->data['error_count'] += $errorCount; - } - } - - public function lateCollect() - { - foreach ($this->clients as $client) { - $client->reset(); - } - } - - public function getClients(): array - { - return $this->data['clients'] ?? []; - } - - public function getRequestCount(): int - { - return $this->data['request_count'] ?? 0; - } - - public function getErrorCount(): int - { - return $this->data['error_count'] ?? 0; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'http_client'; - } - - public function reset() - { - $this->data = [ - 'clients' => [], - 'request_count' => 0, - 'error_count' => 0, - ]; - } - - private function collectOnClient(TraceableHttpClient $client): array - { - $traces = $client->getTracedRequests(); - $errorCount = 0; - $baseInfo = [ - 'response_headers' => 1, - 'retry_count' => 1, - 'redirect_count' => 1, - 'redirect_url' => 1, - 'user_data' => 1, - 'error' => 1, - 'url' => 1, - ]; - - foreach ($traces as $i => $trace) { - if (400 <= ($trace['info']['http_code'] ?? 0)) { - ++$errorCount; - } - - $info = $trace['info']; - $traces[$i]['http_code'] = $info['http_code'] ?? 0; - - unset($info['filetime'], $info['http_code'], $info['ssl_verify_result'], $info['content_type']); - - if (($info['http_method'] ?? null) === $trace['method']) { - unset($info['http_method']); - } - - if (($info['url'] ?? null) === $trace['url']) { - unset($info['url']); - } - - foreach ($info as $k => $v) { - if (!$v || (is_numeric($v) && 0 > $v)) { - unset($info[$k]); - } - } - - if (\is_string($content = $trace['content'])) { - $contentType = 'application/octet-stream'; - - foreach ($info['response_headers'] ?? [] as $h) { - if (0 === stripos($h, 'content-type: ')) { - $contentType = substr($h, \strlen('content-type: ')); - break; - } - } - - if (0 === strpos($contentType, 'image/') && class_exists(ImgStub::class)) { - $content = new ImgStub($content, $contentType, ''); - } else { - $content = [$content]; - } - - $content = ['response_content' => $content]; - } elseif (\is_array($content)) { - $content = ['response_json' => $content]; - } else { - $content = []; - } - - if (isset($info['retry_count'])) { - $content['retries'] = $info['previous_info']; - unset($info['previous_info']); - } - - $debugInfo = array_diff_key($info, $baseInfo); - $info = ['info' => $debugInfo] + array_diff_key($info, $debugInfo) + $content; - unset($traces[$i]['info']); // break PHP reference used by TraceableHttpClient - $traces[$i]['info'] = $this->cloneVar($info); - $traces[$i]['options'] = $this->cloneVar($trace['options']); - } - - return [$errorCount, $traces]; - } -} diff --git a/vendor/symfony/http-client/DecoratorTrait.php b/vendor/symfony/http-client/DecoratorTrait.php deleted file mode 100644 index 790fc32..0000000 --- a/vendor/symfony/http-client/DecoratorTrait.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Eases with writing decorators. - * - * @author Nicolas Grekas - */ -trait DecoratorTrait -{ - private $client; - - public function __construct(HttpClientInterface $client = null) - { - $this->client = $client ?? HttpClient::create(); - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - return $this->client->request($method, $url, $options); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - return $this->client->stream($responses, $timeout); - } - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->client = $this->client->withOptions($options); - - return $clone; - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } -} diff --git a/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php b/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php deleted file mode 100644 index 73f8865..0000000 --- a/vendor/symfony/http-client/DependencyInjection/HttpClientPass.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpClient\TraceableHttpClient; - -final class HttpClientPass implements CompilerPassInterface -{ - private $clientTag; - - public function __construct(string $clientTag = 'http_client.client') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-client', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->clientTag = $clientTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('data_collector.http_client')) { - return; - } - - foreach ($container->findTaggedServiceIds($this->clientTag) as $id => $tags) { - $container->register('.debug.'.$id, TraceableHttpClient::class) - ->setArguments([new Reference('.debug.'.$id.'.inner'), new Reference('debug.stopwatch', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]) - ->addTag('kernel.reset', ['method' => 'reset']) - ->setDecoratedService($id); - $container->getDefinition('data_collector.http_client') - ->addMethodCall('registerClient', [$id, new Reference('.debug.'.$id)]); - } - } -} diff --git a/vendor/symfony/http-client/EventSourceHttpClient.php b/vendor/symfony/http-client/EventSourceHttpClient.php deleted file mode 100644 index 60e4e82..0000000 --- a/vendor/symfony/http-client/EventSourceHttpClient.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Chunk\ServerSentEvent; -use Symfony\Component\HttpClient\Exception\EventSourceException; -use Symfony\Component\HttpClient\Response\AsyncContext; -use Symfony\Component\HttpClient\Response\AsyncResponse; -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Antoine Bluchet - * @author Nicolas Grekas - */ -final class EventSourceHttpClient implements HttpClientInterface, ResetInterface -{ - use AsyncDecoratorTrait, HttpClientTrait { - AsyncDecoratorTrait::withOptions insteadof HttpClientTrait; - } - - private $reconnectionTime; - - public function __construct(HttpClientInterface $client = null, float $reconnectionTime = 10.0) - { - $this->client = $client ?? HttpClient::create(); - $this->reconnectionTime = $reconnectionTime; - } - - public function connect(string $url, array $options = []): ResponseInterface - { - return $this->request('GET', $url, self::mergeDefaultOptions($options, [ - 'buffer' => false, - 'headers' => [ - 'Accept' => 'text/event-stream', - 'Cache-Control' => 'no-cache', - ], - ], true)); - } - - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $state = new class() { - public $buffer = null; - public $lastEventId = null; - public $reconnectionTime; - public $lastError = null; - }; - $state->reconnectionTime = $this->reconnectionTime; - - if ($accept = self::normalizeHeaders($options['headers'] ?? [])['accept'] ?? []) { - $state->buffer = \in_array($accept, [['Accept: text/event-stream'], ['accept: text/event-stream']], true) ? '' : null; - - if (null !== $state->buffer) { - $options['extra']['trace_content'] = false; - } - } - - return new AsyncResponse($this->client, $method, $url, $options, static function (ChunkInterface $chunk, AsyncContext $context) use ($state, $method, $url, $options) { - if (null !== $state->buffer) { - $context->setInfo('reconnection_time', $state->reconnectionTime); - $isTimeout = false; - } - $lastError = $state->lastError; - $state->lastError = null; - - try { - $isTimeout = $chunk->isTimeout(); - - if (null !== $chunk->getInformationalStatus() || $context->getInfo('canceled')) { - yield $chunk; - - return; - } - } catch (TransportExceptionInterface $e) { - $state->lastError = $lastError ?? microtime(true); - - if (null === $state->buffer || ($isTimeout && microtime(true) - $state->lastError < $state->reconnectionTime)) { - yield $chunk; - } else { - $options['headers']['Last-Event-ID'] = $state->lastEventId; - $state->buffer = ''; - $state->lastError = microtime(true); - $context->getResponse()->cancel(); - $context->replaceRequest($method, $url, $options); - if ($isTimeout) { - yield $chunk; - } else { - $context->pause($state->reconnectionTime); - } - } - - return; - } - - if ($chunk->isFirst()) { - if (preg_match('/^text\/event-stream(;|$)/i', $context->getHeaders()['content-type'][0] ?? '')) { - $state->buffer = ''; - } elseif (null !== $lastError || (null !== $state->buffer && 200 === $context->getStatusCode())) { - throw new EventSourceException(sprintf('Response content-type is "%s" while "text/event-stream" was expected for "%s".', $context->getHeaders()['content-type'][0] ?? '', $context->getInfo('url'))); - } else { - $context->passthru(); - } - - if (null === $lastError) { - yield $chunk; - } - - return; - } - - $rx = '/((?:\r\n|[\r\n]){2,})/'; - $content = $state->buffer.$chunk->getContent(); - - if ($chunk->isLast()) { - $rx = substr_replace($rx, '|$', -2, 0); - } - $events = preg_split($rx, $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $state->buffer = array_pop($events); - - for ($i = 0; isset($events[$i]); $i += 2) { - $event = new ServerSentEvent($events[$i].$events[1 + $i]); - - if ('' !== $event->getId()) { - $context->setInfo('last_event_id', $state->lastEventId = $event->getId()); - } - - if ($event->getRetry()) { - $context->setInfo('reconnection_time', $state->reconnectionTime = $event->getRetry()); - } - - yield $event; - } - - if (preg_match('/^(?::[^\r\n]*+(?:\r\n|[\r\n]))+$/m', $state->buffer)) { - $content = $state->buffer; - $state->buffer = ''; - - yield $context->createChunk($content); - } - - if ($chunk->isLast()) { - yield $chunk; - } - }); - } -} diff --git a/vendor/symfony/http-client/Exception/ClientException.php b/vendor/symfony/http-client/Exception/ClientException.php deleted file mode 100644 index 4264534..0000000 --- a/vendor/symfony/http-client/Exception/ClientException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; - -/** - * Represents a 4xx response. - * - * @author Nicolas Grekas - */ -final class ClientException extends \RuntimeException implements ClientExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/vendor/symfony/http-client/Exception/EventSourceException.php b/vendor/symfony/http-client/Exception/EventSourceException.php deleted file mode 100644 index 30ab795..0000000 --- a/vendor/symfony/http-client/Exception/EventSourceException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; - -/** - * @author Nicolas Grekas - */ -final class EventSourceException extends \RuntimeException implements DecodingExceptionInterface -{ -} diff --git a/vendor/symfony/http-client/Exception/HttpExceptionTrait.php b/vendor/symfony/http-client/Exception/HttpExceptionTrait.php deleted file mode 100644 index 7ab2752..0000000 --- a/vendor/symfony/http-client/Exception/HttpExceptionTrait.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait HttpExceptionTrait -{ - private $response; - - public function __construct(ResponseInterface $response) - { - $this->response = $response; - $code = $response->getInfo('http_code'); - $url = $response->getInfo('url'); - $message = sprintf('HTTP %d returned for "%s".', $code, $url); - - $httpCodeFound = false; - $isJson = false; - foreach (array_reverse($response->getInfo('response_headers')) as $h) { - if (str_starts_with($h, 'HTTP/')) { - if ($httpCodeFound) { - break; - } - - $message = sprintf('%s returned for "%s".', $h, $url); - $httpCodeFound = true; - } - - if (0 === stripos($h, 'content-type:')) { - if (preg_match('/\bjson\b/i', $h)) { - $isJson = true; - } - - if ($httpCodeFound) { - break; - } - } - } - - // Try to guess a better error message using common API error formats - // The MIME type isn't explicitly checked because some formats inherit from others - // Ex: JSON:API follows RFC 7807 semantics, Hydra can be used in any JSON-LD-compatible format - if ($isJson && $body = json_decode($response->getContent(false), true)) { - if (isset($body['hydra:title']) || isset($body['hydra:description'])) { - // see http://www.hydra-cg.com/spec/latest/core/#description-of-http-status-codes-and-errors - $separator = isset($body['hydra:title'], $body['hydra:description']) ? "\n\n" : ''; - $message = ($body['hydra:title'] ?? '').$separator.($body['hydra:description'] ?? ''); - } elseif ((isset($body['title']) || isset($body['detail'])) - && (is_scalar($body['title'] ?? '') && is_scalar($body['detail'] ?? ''))) { - // see RFC 7807 and https://jsonapi.org/format/#error-objects - $separator = isset($body['title'], $body['detail']) ? "\n\n" : ''; - $message = ($body['title'] ?? '').$separator.($body['detail'] ?? ''); - } - } - - parent::__construct($message, $code); - } - - public function getResponse(): ResponseInterface - { - return $this->response; - } -} diff --git a/vendor/symfony/http-client/Exception/InvalidArgumentException.php b/vendor/symfony/http-client/Exception/InvalidArgumentException.php deleted file mode 100644 index 6c2fae7..0000000 --- a/vendor/symfony/http-client/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Nicolas Grekas - */ -final class InvalidArgumentException extends \InvalidArgumentException implements TransportExceptionInterface -{ -} diff --git a/vendor/symfony/http-client/Exception/JsonException.php b/vendor/symfony/http-client/Exception/JsonException.php deleted file mode 100644 index 54502e6..0000000 --- a/vendor/symfony/http-client/Exception/JsonException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; - -/** - * Thrown by responses' toArray() method when their content cannot be JSON-decoded. - * - * @author Nicolas Grekas - */ -final class JsonException extends \JsonException implements DecodingExceptionInterface -{ -} diff --git a/vendor/symfony/http-client/Exception/RedirectionException.php b/vendor/symfony/http-client/Exception/RedirectionException.php deleted file mode 100644 index 5b93670..0000000 --- a/vendor/symfony/http-client/Exception/RedirectionException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; - -/** - * Represents a 3xx response. - * - * @author Nicolas Grekas - */ -final class RedirectionException extends \RuntimeException implements RedirectionExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/vendor/symfony/http-client/Exception/ServerException.php b/vendor/symfony/http-client/Exception/ServerException.php deleted file mode 100644 index c6f8273..0000000 --- a/vendor/symfony/http-client/Exception/ServerException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; - -/** - * Represents a 5xx response. - * - * @author Nicolas Grekas - */ -final class ServerException extends \RuntimeException implements ServerExceptionInterface -{ - use HttpExceptionTrait; -} diff --git a/vendor/symfony/http-client/Exception/TimeoutException.php b/vendor/symfony/http-client/Exception/TimeoutException.php deleted file mode 100644 index a9155cc..0000000 --- a/vendor/symfony/http-client/Exception/TimeoutException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\TimeoutExceptionInterface; - -/** - * @author Nicolas Grekas - */ -final class TimeoutException extends TransportException implements TimeoutExceptionInterface -{ -} diff --git a/vendor/symfony/http-client/Exception/TransportException.php b/vendor/symfony/http-client/Exception/TransportException.php deleted file mode 100644 index a3a80c6..0000000 --- a/vendor/symfony/http-client/Exception/TransportException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Exception; - -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Nicolas Grekas - */ -class TransportException extends \RuntimeException implements TransportExceptionInterface -{ -} diff --git a/vendor/symfony/http-client/HttpClient.php b/vendor/symfony/http-client/HttpClient.php deleted file mode 100644 index ff00a29..0000000 --- a/vendor/symfony/http-client/HttpClient.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Amp\Http\Client\Connection\ConnectionLimitingPool; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A factory to instantiate the best possible HTTP client for the runtime. - * - * @author Nicolas Grekas - */ -final class HttpClient -{ - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to a single host - * @param int $maxPendingPushes The maximum number of pushed responses to accept in the queue - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public static function create(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface - { - if ($amp = class_exists(ConnectionLimitingPool::class)) { - if (!\extension_loaded('curl')) { - return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes); - } - - // Skip curl when HTTP/2 push is unsupported or buggy, see https://bugs.php.net/77535 - if (\PHP_VERSION_ID < 70217 || (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304) || !\defined('CURLMOPT_PUSHFUNCTION')) { - return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes); - } - - static $curlVersion = null; - $curlVersion = $curlVersion ?? curl_version(); - - // HTTP/2 push crashes before curl 7.61 - if (0x073D00 > $curlVersion['version_number'] || !(\CURL_VERSION_HTTP2 & $curlVersion['features'])) { - return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes); - } - } - - if (\extension_loaded('curl')) { - if ('\\' !== \DIRECTORY_SEPARATOR || isset($defaultOptions['cafile']) || isset($defaultOptions['capath']) || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) { - return new CurlHttpClient($defaultOptions, $maxHostConnections, $maxPendingPushes); - } - - @trigger_error('Configure the "curl.cainfo", "openssl.cafile" or "openssl.capath" php.ini setting to enable the CurlHttpClient', \E_USER_WARNING); - } - - if ($amp) { - return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes); - } - - @trigger_error((\extension_loaded('curl') ? 'Upgrade' : 'Install').' the curl extension or run "composer require amphp/http-client" to perform async HTTP operations, including full HTTP/2 support', \E_USER_NOTICE); - - return new NativeHttpClient($defaultOptions, $maxHostConnections); - } - - /** - * Creates a client that adds options (e.g. authentication headers) only when the request URL matches the provided base URI. - */ - public static function createForBaseUri(string $baseUri, array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface - { - $client = self::create([], $maxHostConnections, $maxPendingPushes); - - return ScopingHttpClient::forBaseUri($client, $baseUri, $defaultOptions); - } -} diff --git a/vendor/symfony/http-client/HttpClientTrait.php b/vendor/symfony/http-client/HttpClientTrait.php deleted file mode 100644 index 6c2375a..0000000 --- a/vendor/symfony/http-client/HttpClientTrait.php +++ /dev/null @@ -1,684 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; - -/** - * Provides the common logic from writing HttpClientInterface implementations. - * - * All private methods are static to prevent implementers from creating memory leaks via circular references. - * - * @author Nicolas Grekas - */ -trait HttpClientTrait -{ - private static $CHUNK_SIZE = 16372; - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions); - - return $clone; - } - - /** - * Validates and normalizes method, URL and options, and merges them with defaults. - * - * @throws InvalidArgumentException When a not-supported option is found - */ - private static function prepareRequest(?string $method, ?string $url, array $options, array $defaultOptions = [], bool $allowExtraOptions = false): array - { - if (null !== $method) { - if (\strlen($method) !== strspn($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) { - throw new InvalidArgumentException(sprintf('Invalid HTTP method "%s", only uppercase letters are accepted.', $method)); - } - if (!$method) { - throw new InvalidArgumentException('The HTTP method cannot be empty.'); - } - } - - $options = self::mergeDefaultOptions($options, $defaultOptions, $allowExtraOptions); - - $buffer = $options['buffer'] ?? true; - - if ($buffer instanceof \Closure) { - $options['buffer'] = static function (array $headers) use ($buffer) { - if (!\is_bool($buffer = $buffer($headers))) { - if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) { - throw new \LogicException(sprintf('The closure passed as option "buffer" must return bool or stream resource, got "%s".', get_debug_type($buffer))); - } - - if (false === strpbrk($bufferInfo['mode'], 'acew+')) { - throw new \LogicException(sprintf('The stream returned by the closure passed as option "buffer" must be writeable, got mode "%s".', $bufferInfo['mode'])); - } - } - - return $buffer; - }; - } elseif (!\is_bool($buffer)) { - if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) { - throw new InvalidArgumentException(sprintf('Option "buffer" must be bool, stream resource or Closure, "%s" given.', get_debug_type($buffer))); - } - - if (false === strpbrk($bufferInfo['mode'], 'acew+')) { - throw new InvalidArgumentException(sprintf('The stream in option "buffer" must be writeable, mode "%s" given.', $bufferInfo['mode'])); - } - } - - if (isset($options['json'])) { - if (isset($options['body']) && '' !== $options['body']) { - throw new InvalidArgumentException('Define either the "json" or the "body" option, setting both is not supported.'); - } - $options['body'] = self::jsonEncode($options['json']); - unset($options['json']); - - if (!isset($options['normalized_headers']['content-type'])) { - $options['normalized_headers']['content-type'] = ['Content-Type: application/json']; - } - } - - if (!isset($options['normalized_headers']['accept'])) { - $options['normalized_headers']['accept'] = ['Accept: */*']; - } - - if (isset($options['body'])) { - $options['body'] = self::normalizeBody($options['body']); - - if (\is_string($options['body']) - && (string) \strlen($options['body']) !== substr($h = $options['normalized_headers']['content-length'][0] ?? '', 16) - && ('' !== $h || '' !== $options['body']) - ) { - if ('chunked' === substr($options['normalized_headers']['transfer-encoding'][0] ?? '', \strlen('Transfer-Encoding: '))) { - unset($options['normalized_headers']['transfer-encoding']); - $options['body'] = self::dechunk($options['body']); - } - - $options['normalized_headers']['content-length'] = [substr_replace($h ?: 'Content-Length: ', \strlen($options['body']), 16)]; - } - } - - if (isset($options['peer_fingerprint'])) { - $options['peer_fingerprint'] = self::normalizePeerFingerprint($options['peer_fingerprint']); - } - - // Validate on_progress - if (!\is_callable($onProgress = $options['on_progress'] ?? 'var_dump')) { - throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', get_debug_type($onProgress))); - } - - if (\is_array($options['auth_basic'] ?? null)) { - $count = \count($options['auth_basic']); - if ($count <= 0 || $count > 2) { - throw new InvalidArgumentException(sprintf('Option "auth_basic" must contain 1 or 2 elements, "%s" given.', $count)); - } - - $options['auth_basic'] = implode(':', $options['auth_basic']); - } - - if (!\is_string($options['auth_basic'] ?? '')) { - throw new InvalidArgumentException(sprintf('Option "auth_basic" must be string or an array, "%s" given.', get_debug_type($options['auth_basic']))); - } - - if (isset($options['auth_bearer'])) { - if (!\is_string($options['auth_bearer'])) { - throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string, "%s" given.', get_debug_type($options['auth_bearer']))); - } - if (preg_match('{[^\x21-\x7E]}', $options['auth_bearer'])) { - throw new InvalidArgumentException('Invalid character found in option "auth_bearer": '.json_encode($options['auth_bearer']).'.'); - } - } - - if (isset($options['auth_basic'], $options['auth_bearer'])) { - throw new InvalidArgumentException('Define either the "auth_basic" or the "auth_bearer" option, setting both is not supported.'); - } - - if (null !== $url) { - // Merge auth with headers - if (($options['auth_basic'] ?? false) && !($options['normalized_headers']['authorization'] ?? false)) { - $options['normalized_headers']['authorization'] = ['Authorization: Basic '.base64_encode($options['auth_basic'])]; - } - // Merge bearer with headers - if (($options['auth_bearer'] ?? false) && !($options['normalized_headers']['authorization'] ?? false)) { - $options['normalized_headers']['authorization'] = ['Authorization: Bearer '.$options['auth_bearer']]; - } - - unset($options['auth_basic'], $options['auth_bearer']); - - // Parse base URI - if (\is_string($options['base_uri'])) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - - // Validate and resolve URL - $url = self::parseUrl($url, $options['query']); - $url = self::resolveUrl($url, $options['base_uri'], $defaultOptions['query'] ?? []); - } - - // Finalize normalization of options - $options['http_version'] = (string) ($options['http_version'] ?? '') ?: null; - if (0 > $options['timeout'] = (float) ($options['timeout'] ?? ini_get('default_socket_timeout'))) { - $options['timeout'] = 172800.0; // 2 days - } - - $options['max_duration'] = isset($options['max_duration']) ? (float) $options['max_duration'] : 0; - $options['headers'] = array_merge(...array_values($options['normalized_headers'])); - - return [$url, $options]; - } - - /** - * @throws InvalidArgumentException When an invalid option is found - */ - private static function mergeDefaultOptions(array $options, array $defaultOptions, bool $allowExtraOptions = false): array - { - $options['normalized_headers'] = self::normalizeHeaders($options['headers'] ?? []); - - if ($defaultOptions['headers'] ?? false) { - $options['normalized_headers'] += self::normalizeHeaders($defaultOptions['headers']); - } - - $options['headers'] = array_merge(...array_values($options['normalized_headers']) ?: [[]]); - - if ($resolve = $options['resolve'] ?? false) { - $options['resolve'] = []; - foreach ($resolve as $k => $v) { - $options['resolve'][substr(self::parseUrl('http://'.$k)['authority'], 2)] = (string) $v; - } - } - - // Option "query" is never inherited from defaults - $options['query'] = $options['query'] ?? []; - - $options += $defaultOptions; - - foreach (self::$emptyDefaults ?? [] as $k => $v) { - if (!isset($options[$k])) { - $options[$k] = $v; - } - } - - if (isset($defaultOptions['extra'])) { - $options['extra'] += $defaultOptions['extra']; - } - - if ($resolve = $defaultOptions['resolve'] ?? false) { - foreach ($resolve as $k => $v) { - $options['resolve'] += [substr(self::parseUrl('http://'.$k)['authority'], 2) => (string) $v]; - } - } - - if ($allowExtraOptions || !$defaultOptions) { - return $options; - } - - // Look for unsupported options - foreach ($options as $name => $v) { - if (\array_key_exists($name, $defaultOptions) || 'normalized_headers' === $name) { - continue; - } - - if ('auth_ntlm' === $name) { - if (!\extension_loaded('curl')) { - $msg = 'try installing the "curl" extension to use "%s" instead.'; - } else { - $msg = 'try using "%s" instead.'; - } - - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" is not supported by "%s", '.$msg, __CLASS__, CurlHttpClient::class)); - } - - $alternatives = []; - - foreach ($defaultOptions as $k => $v) { - if (levenshtein($name, $k) <= \strlen($name) / 3 || str_contains($k, $name)) { - $alternatives[] = $k; - } - } - - throw new InvalidArgumentException(sprintf('Unsupported option "%s" passed to "%s", did you mean "%s"?', $name, __CLASS__, implode('", "', $alternatives ?: array_keys($defaultOptions)))); - } - - return $options; - } - - /** - * @return string[][] - * - * @throws InvalidArgumentException When an invalid header is found - */ - private static function normalizeHeaders(array $headers): array - { - $normalizedHeaders = []; - - foreach ($headers as $name => $values) { - if (\is_object($values) && method_exists($values, '__toString')) { - $values = (string) $values; - } - - if (\is_int($name)) { - if (!\is_string($values)) { - throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values))); - } - [$name, $values] = explode(':', $values, 2); - $values = [ltrim($values)]; - } elseif (!is_iterable($values)) { - if (\is_object($values)) { - throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values))); - } - - $values = (array) $values; - } - - $lcName = strtolower($name); - $normalizedHeaders[$lcName] = []; - - foreach ($values as $value) { - $normalizedHeaders[$lcName][] = $value = $name.': '.$value; - - if (\strlen($value) !== strcspn($value, "\r\n\0")) { - throw new InvalidArgumentException(sprintf('Invalid header: CR/LF/NUL found in "%s".', $value)); - } - } - } - - return $normalizedHeaders; - } - - /** - * @param array|string|resource|\Traversable|\Closure $body - * - * @return string|resource|\Closure - * - * @throws InvalidArgumentException When an invalid body is passed - */ - private static function normalizeBody($body) - { - if (\is_array($body)) { - array_walk_recursive($body, $caster = static function (&$v) use (&$caster) { - if (\is_object($v)) { - if ($vars = get_object_vars($v)) { - array_walk_recursive($vars, $caster); - $v = $vars; - } elseif (method_exists($v, '__toString')) { - $v = (string) $v; - } - } - }); - - return http_build_query($body, '', '&'); - } - - if (\is_string($body)) { - return $body; - } - - $generatorToCallable = static function (\Generator $body): \Closure { - return static function () use ($body) { - while ($body->valid()) { - $chunk = $body->current(); - $body->next(); - - if ('' !== $chunk) { - return $chunk; - } - } - - return ''; - }; - }; - - if ($body instanceof \Generator) { - return $generatorToCallable($body); - } - - if ($body instanceof \Traversable) { - return $generatorToCallable((static function ($body) { yield from $body; })($body)); - } - - if ($body instanceof \Closure) { - $r = new \ReflectionFunction($body); - $body = $r->getClosure(); - - if ($r->isGenerator()) { - $body = $body(self::$CHUNK_SIZE); - - return $generatorToCallable($body); - } - - return $body; - } - - if (!\is_array(@stream_get_meta_data($body))) { - throw new InvalidArgumentException(sprintf('Option "body" must be string, stream resource, iterable or callable, "%s" given.', get_debug_type($body))); - } - - return $body; - } - - private static function dechunk(string $body): string - { - $h = fopen('php://temp', 'w+'); - stream_filter_append($h, 'dechunk', \STREAM_FILTER_WRITE); - fwrite($h, $body); - $body = stream_get_contents($h, -1, 0); - rewind($h); - ftruncate($h, 0); - - if (fwrite($h, '-') && '' !== stream_get_contents($h, -1, 0)) { - throw new TransportException('Request body has broken chunked encoding.'); - } - - return $body; - } - - /** - * @param string|string[] $fingerprint - * - * @throws InvalidArgumentException When an invalid fingerprint is passed - */ - private static function normalizePeerFingerprint($fingerprint): array - { - if (\is_string($fingerprint)) { - switch (\strlen($fingerprint = str_replace(':', '', $fingerprint))) { - case 32: $fingerprint = ['md5' => $fingerprint]; break; - case 40: $fingerprint = ['sha1' => $fingerprint]; break; - case 44: $fingerprint = ['pin-sha256' => [$fingerprint]]; break; - case 64: $fingerprint = ['sha256' => $fingerprint]; break; - default: throw new InvalidArgumentException(sprintf('Cannot auto-detect fingerprint algorithm for "%s".', $fingerprint)); - } - } elseif (\is_array($fingerprint)) { - foreach ($fingerprint as $algo => $hash) { - $fingerprint[$algo] = 'pin-sha256' === $algo ? (array) $hash : str_replace(':', '', $hash); - } - } else { - throw new InvalidArgumentException(sprintf('Option "peer_fingerprint" must be string or array, "%s" given.', get_debug_type($fingerprint))); - } - - return $fingerprint; - } - - /** - * @param mixed $value - * - * @throws InvalidArgumentException When the value cannot be json-encoded - */ - private static function jsonEncode($value, int $flags = null, int $maxDepth = 512): string - { - $flags = $flags ?? (\JSON_HEX_TAG | \JSON_HEX_APOS | \JSON_HEX_AMP | \JSON_HEX_QUOT | \JSON_PRESERVE_ZERO_FRACTION); - - try { - $value = json_encode($value, $flags | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0), $maxDepth); - } catch (\JsonException $e) { - throw new InvalidArgumentException('Invalid value for "json" option: '.$e->getMessage()); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error() && (false === $value || !($flags & \JSON_PARTIAL_OUTPUT_ON_ERROR))) { - throw new InvalidArgumentException('Invalid value for "json" option: '.json_last_error_msg()); - } - - return $value; - } - - /** - * Resolves a URL against a base URI. - * - * @see https://tools.ietf.org/html/rfc3986#section-5.2.2 - * - * @throws InvalidArgumentException When an invalid URL is passed - */ - private static function resolveUrl(array $url, ?array $base, array $queryDefaults = []): array - { - if (null !== $base && '' === ($base['scheme'] ?? '').($base['authority'] ?? '')) { - throw new InvalidArgumentException(sprintf('Invalid "base_uri" option: host or scheme is missing in "%s".', implode('', $base))); - } - - if (null === $url['scheme'] && (null === $base || null === $base['scheme'])) { - throw new InvalidArgumentException(sprintf('Invalid URL: scheme is missing in "%s". Did you forget to add "http(s)://"?', implode('', $base ?? $url))); - } - - if (null === $base && '' === $url['scheme'].$url['authority']) { - throw new InvalidArgumentException(sprintf('Invalid URL: no "base_uri" option was provided and host or scheme is missing in "%s".', implode('', $url))); - } - - if (null !== $url['scheme']) { - $url['path'] = self::removeDotSegments($url['path'] ?? ''); - } else { - if (null !== $url['authority']) { - $url['path'] = self::removeDotSegments($url['path'] ?? ''); - } else { - if (null === $url['path']) { - $url['path'] = $base['path']; - $url['query'] = $url['query'] ?? $base['query']; - } else { - if ('/' !== $url['path'][0]) { - if (null === $base['path']) { - $url['path'] = '/'.$url['path']; - } else { - $segments = explode('/', $base['path']); - array_splice($segments, -1, 1, [$url['path']]); - $url['path'] = implode('/', $segments); - } - } - - $url['path'] = self::removeDotSegments($url['path']); - } - - $url['authority'] = $base['authority']; - - if ($queryDefaults) { - $url['query'] = '?'.self::mergeQueryString(substr($url['query'] ?? '', 1), $queryDefaults, false); - } - } - - $url['scheme'] = $base['scheme']; - } - - if ('' === ($url['path'] ?? '')) { - $url['path'] = '/'; - } - - if ('?' === ($url['query'] ?? '')) { - $url['query'] = null; - } - - return $url; - } - - /** - * Parses a URL and fixes its encoding if needed. - * - * @throws InvalidArgumentException When an invalid URL is passed - */ - private static function parseUrl(string $url, array $query = [], array $allowedSchemes = ['http' => 80, 'https' => 443]): array - { - if (false === $parts = parse_url($url)) { - throw new InvalidArgumentException(sprintf('Malformed URL "%s".', $url)); - } - - if ($query) { - $parts['query'] = self::mergeQueryString($parts['query'] ?? null, $query, true); - } - - $port = $parts['port'] ?? 0; - - if (null !== $scheme = $parts['scheme'] ?? null) { - if (!isset($allowedSchemes[$scheme = strtolower($scheme)])) { - throw new InvalidArgumentException(sprintf('Unsupported scheme in "%s".', $url)); - } - - $port = $allowedSchemes[$scheme] === $port ? 0 : $port; - $scheme .= ':'; - } - - if (null !== $host = $parts['host'] ?? null) { - if (!\defined('INTL_IDNA_VARIANT_UTS46') && preg_match('/[\x80-\xFF]/', $host)) { - throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host)); - } - - $host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host); - $host .= $port ? ':'.$port : ''; - } - - foreach (['user', 'pass', 'path', 'query', 'fragment'] as $part) { - if (!isset($parts[$part])) { - continue; - } - - if (str_contains($parts[$part], '%')) { - // https://tools.ietf.org/html/rfc3986#section-2.3 - $parts[$part] = preg_replace_callback('/%(?:2[DE]|3[0-9]|[46][1-9A-F]|5F|[57][0-9A]|7E)++/i', function ($m) { return rawurldecode($m[0]); }, $parts[$part]); - } - - // https://tools.ietf.org/html/rfc3986#section-3.3 - $parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()*+,;=:@%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]); - } - - return [ - 'scheme' => $scheme, - 'authority' => null !== $host ? '//'.(isset($parts['user']) ? $parts['user'].(isset($parts['pass']) ? ':'.$parts['pass'] : '').'@' : '').$host : null, - 'path' => isset($parts['path'][0]) ? $parts['path'] : null, - 'query' => isset($parts['query']) ? '?'.$parts['query'] : null, - 'fragment' => isset($parts['fragment']) ? '#'.$parts['fragment'] : null, - ]; - } - - /** - * Removes dot-segments from a path. - * - * @see https://tools.ietf.org/html/rfc3986#section-5.2.4 - */ - private static function removeDotSegments(string $path) - { - $result = ''; - - while (!\in_array($path, ['', '.', '..'], true)) { - if ('.' === $path[0] && (str_starts_with($path, $p = '../') || str_starts_with($path, $p = './'))) { - $path = substr($path, \strlen($p)); - } elseif ('/.' === $path || str_starts_with($path, '/./')) { - $path = substr_replace($path, '/', 0, 3); - } elseif ('/..' === $path || str_starts_with($path, '/../')) { - $i = strrpos($result, '/'); - $result = $i ? substr($result, 0, $i) : ''; - $path = substr_replace($path, '/', 0, 4); - } else { - $i = strpos($path, '/', 1) ?: \strlen($path); - $result .= substr($path, 0, $i); - $path = substr($path, $i); - } - } - - return $result; - } - - /** - * Merges and encodes a query array with a query string. - * - * @throws InvalidArgumentException When an invalid query-string value is passed - */ - private static function mergeQueryString(?string $queryString, array $queryArray, bool $replace): ?string - { - if (!$queryArray) { - return $queryString; - } - - $query = []; - - if (null !== $queryString) { - foreach (explode('&', $queryString) as $v) { - if ('' !== $v) { - $k = urldecode(explode('=', $v, 2)[0]); - $query[$k] = (isset($query[$k]) ? $query[$k].'&' : '').$v; - } - } - } - - if ($replace) { - foreach ($queryArray as $k => $v) { - if (null === $v) { - unset($query[$k]); - } - } - } - - $queryString = http_build_query($queryArray, '', '&', \PHP_QUERY_RFC3986); - $queryArray = []; - - if ($queryString) { - foreach (explode('&', $queryString) as $v) { - $queryArray[rawurldecode(explode('=', $v, 2)[0])] = $v; - } - } - - return implode('&', $replace ? array_replace($query, $queryArray) : ($query + $queryArray)); - } - - /** - * Loads proxy configuration from the same environment variables as curl when no proxy is explicitly set. - */ - private static function getProxy(?string $proxy, array $url, ?string $noProxy): ?array - { - if (null === $proxy) { - // Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities - $proxy = $_SERVER['http_proxy'] ?? (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null; - - if ('https:' === $url['scheme']) { - $proxy = $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? $proxy; - } - } - - if (null === $proxy) { - return null; - } - - $proxy = (parse_url($proxy) ?: []) + ['scheme' => 'http']; - - if (!isset($proxy['host'])) { - throw new TransportException('Invalid HTTP proxy: host is missing.'); - } - - if ('http' === $proxy['scheme']) { - $proxyUrl = 'tcp://'.$proxy['host'].':'.($proxy['port'] ?? '80'); - } elseif ('https' === $proxy['scheme']) { - $proxyUrl = 'ssl://'.$proxy['host'].':'.($proxy['port'] ?? '443'); - } else { - throw new TransportException(sprintf('Unsupported proxy scheme "%s": "http" or "https" expected.', $proxy['scheme'])); - } - - $noProxy = $noProxy ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? ''; - $noProxy = $noProxy ? preg_split('/[\s,]+/', $noProxy) : []; - - return [ - 'url' => $proxyUrl, - 'auth' => isset($proxy['user']) ? 'Basic '.base64_encode(rawurldecode($proxy['user']).':'.rawurldecode($proxy['pass'] ?? '')) : null, - 'no_proxy' => $noProxy, - ]; - } - - private static function shouldBuffer(array $headers): bool - { - if (null === $contentType = $headers['content-type'][0] ?? null) { - return false; - } - - if (false !== $i = strpos($contentType, ';')) { - $contentType = substr($contentType, 0, $i); - } - - return $contentType && preg_match('#^(?:text/|application/(?:.+\+)?(?:json|xml)$)#i', $contentType); - } -} diff --git a/vendor/symfony/http-client/HttpOptions.php b/vendor/symfony/http-client/HttpOptions.php deleted file mode 100644 index 1638189..0000000 --- a/vendor/symfony/http-client/HttpOptions.php +++ /dev/null @@ -1,321 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A helper providing autocompletion for available options. - * - * @see HttpClientInterface for a description of each options. - * - * @author Nicolas Grekas - */ -class HttpOptions -{ - private $options = []; - - public function toArray(): array - { - return $this->options; - } - - /** - * @return $this - */ - public function setAuthBasic(string $user, string $password = '') - { - $this->options['auth_basic'] = $user; - - if ('' !== $password) { - $this->options['auth_basic'] .= ':'.$password; - } - - return $this; - } - - /** - * @return $this - */ - public function setAuthBearer(string $token) - { - $this->options['auth_bearer'] = $token; - - return $this; - } - - /** - * @return $this - */ - public function setQuery(array $query) - { - $this->options['query'] = $query; - - return $this; - } - - /** - * @return $this - */ - public function setHeaders(iterable $headers) - { - $this->options['headers'] = $headers; - - return $this; - } - - /** - * @param array|string|resource|\Traversable|\Closure $body - * - * @return $this - */ - public function setBody($body) - { - $this->options['body'] = $body; - - return $this; - } - - /** - * @param mixed $json - * - * @return $this - */ - public function setJson($json) - { - $this->options['json'] = $json; - - return $this; - } - - /** - * @return $this - */ - public function setUserData($data) - { - $this->options['user_data'] = $data; - - return $this; - } - - /** - * @return $this - */ - public function setMaxRedirects(int $max) - { - $this->options['max_redirects'] = $max; - - return $this; - } - - /** - * @return $this - */ - public function setHttpVersion(string $version) - { - $this->options['http_version'] = $version; - - return $this; - } - - /** - * @return $this - */ - public function setBaseUri(string $uri) - { - $this->options['base_uri'] = $uri; - - return $this; - } - - /** - * @return $this - */ - public function buffer(bool $buffer) - { - $this->options['buffer'] = $buffer; - - return $this; - } - - /** - * @return $this - */ - public function setOnProgress(callable $callback) - { - $this->options['on_progress'] = $callback; - - return $this; - } - - /** - * @return $this - */ - public function resolve(array $hostIps) - { - $this->options['resolve'] = $hostIps; - - return $this; - } - - /** - * @return $this - */ - public function setProxy(string $proxy) - { - $this->options['proxy'] = $proxy; - - return $this; - } - - /** - * @return $this - */ - public function setNoProxy(string $noProxy) - { - $this->options['no_proxy'] = $noProxy; - - return $this; - } - - /** - * @return $this - */ - public function setTimeout(float $timeout) - { - $this->options['timeout'] = $timeout; - - return $this; - } - - /** - * @return $this - */ - public function bindTo(string $bindto) - { - $this->options['bindto'] = $bindto; - - return $this; - } - - /** - * @return $this - */ - public function verifyPeer(bool $verify) - { - $this->options['verify_peer'] = $verify; - - return $this; - } - - /** - * @return $this - */ - public function verifyHost(bool $verify) - { - $this->options['verify_host'] = $verify; - - return $this; - } - - /** - * @return $this - */ - public function setCaFile(string $cafile) - { - $this->options['cafile'] = $cafile; - - return $this; - } - - /** - * @return $this - */ - public function setCaPath(string $capath) - { - $this->options['capath'] = $capath; - - return $this; - } - - /** - * @return $this - */ - public function setLocalCert(string $cert) - { - $this->options['local_cert'] = $cert; - - return $this; - } - - /** - * @return $this - */ - public function setLocalPk(string $pk) - { - $this->options['local_pk'] = $pk; - - return $this; - } - - /** - * @return $this - */ - public function setPassphrase(string $passphrase) - { - $this->options['passphrase'] = $passphrase; - - return $this; - } - - /** - * @return $this - */ - public function setCiphers(string $ciphers) - { - $this->options['ciphers'] = $ciphers; - - return $this; - } - - /** - * @param string|array $fingerprint - * - * @return $this - */ - public function setPeerFingerprint($fingerprint) - { - $this->options['peer_fingerprint'] = $fingerprint; - - return $this; - } - - /** - * @return $this - */ - public function capturePeerCertChain(bool $capture) - { - $this->options['capture_peer_cert_chain'] = $capture; - - return $this; - } - - /** - * @return $this - */ - public function setExtra(string $name, $value) - { - $this->options['extra'][$name] = $value; - - return $this; - } -} diff --git a/vendor/symfony/http-client/HttplugClient.php b/vendor/symfony/http-client/HttplugClient.php deleted file mode 100644 index ec3b01d..0000000 --- a/vendor/symfony/http-client/HttplugClient.php +++ /dev/null @@ -1,271 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use GuzzleHttp\Promise\Promise as GuzzlePromise; -use GuzzleHttp\Promise\RejectedPromise; -use GuzzleHttp\Promise\Utils; -use Http\Client\Exception\NetworkException; -use Http\Client\Exception\RequestException; -use Http\Client\HttpAsyncClient; -use Http\Client\HttpClient as HttplugInterface; -use Http\Discovery\Exception\NotFoundException; -use Http\Discovery\Psr17FactoryDiscovery; -use Http\Message\RequestFactory; -use Http\Message\StreamFactory; -use Http\Message\UriFactory; -use Http\Promise\Promise; -use Nyholm\Psr7\Factory\Psr17Factory; -use Nyholm\Psr7\Request; -use Nyholm\Psr7\Uri; -use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\StreamInterface; -use Psr\Http\Message\UriFactoryInterface; -use Psr\Http\Message\UriInterface; -use Symfony\Component\HttpClient\Internal\HttplugWaitLoop; -use Symfony\Component\HttpClient\Response\HttplugPromise; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\Service\ResetInterface; - -if (!interface_exists(HttplugInterface::class)) { - throw new \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/httplug" package is not installed. Try running "composer require php-http/httplug".'); -} - -if (!interface_exists(RequestFactory::class)) { - throw new \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/message-factory" package is not installed. Try running "composer require nyholm/psr7".'); -} - -/** - * An adapter to turn a Symfony HttpClientInterface into an Httplug client. - * - * Run "composer require nyholm/psr7" to install an efficient implementation of response - * and stream factories with flex-provided autowiring aliases. - * - * @author Nicolas Grekas - */ -final class HttplugClient implements HttplugInterface, HttpAsyncClient, RequestFactory, StreamFactory, UriFactory, ResetInterface -{ - private $client; - private $responseFactory; - private $streamFactory; - - /** - * @var \SplObjectStorage|null - */ - private $promisePool; - - private $waitLoop; - - public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) - { - $this->client = $client ?? HttpClient::create(); - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory ?? ($responseFactory instanceof StreamFactoryInterface ? $responseFactory : null); - $this->promisePool = class_exists(Utils::class) ? new \SplObjectStorage() : null; - - if (null === $this->responseFactory || null === $this->streamFactory) { - if (!class_exists(Psr17Factory::class) && !class_exists(Psr17FactoryDiscovery::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been provided. Try running "composer require nyholm/psr7".'); - } - - try { - $psr17Factory = class_exists(Psr17Factory::class, false) ? new Psr17Factory() : null; - $this->responseFactory = $this->responseFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findResponseFactory(); - $this->streamFactory = $this->streamFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findStreamFactory(); - } catch (NotFoundException $e) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been found. Try running "composer require nyholm/psr7".', 0, $e); - } - } - - $this->waitLoop = new HttplugWaitLoop($this->client, $this->promisePool, $this->responseFactory, $this->streamFactory); - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request): Psr7ResponseInterface - { - try { - return $this->waitLoop->createPsr7Response($this->sendPsr7Request($request)); - } catch (TransportExceptionInterface $e) { - throw new NetworkException($e->getMessage(), $request, $e); - } - } - - /** - * {@inheritdoc} - * - * @return HttplugPromise - */ - public function sendAsyncRequest(RequestInterface $request): Promise - { - if (!$promisePool = $this->promisePool) { - throw new \LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__)); - } - - try { - $response = $this->sendPsr7Request($request, true); - } catch (NetworkException $e) { - return new HttplugPromise(new RejectedPromise($e)); - } - - $waitLoop = $this->waitLoop; - - $promise = new GuzzlePromise(static function () use ($response, $waitLoop) { - $waitLoop->wait($response); - }, static function () use ($response, $promisePool) { - $response->cancel(); - unset($promisePool[$response]); - }); - - $promisePool[$response] = [$request, $promise]; - - return new HttplugPromise($promise); - } - - /** - * Resolves pending promises that complete before the timeouts are reached. - * - * When $maxDuration is null and $idleTimeout is reached, promises are rejected. - * - * @return int The number of remaining pending promises - */ - public function wait(float $maxDuration = null, float $idleTimeout = null): int - { - return $this->waitLoop->wait(null, $maxDuration, $idleTimeout); - } - - /** - * {@inheritdoc} - */ - public function createRequest($method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1'): RequestInterface - { - if ($this->responseFactory instanceof RequestFactoryInterface) { - $request = $this->responseFactory->createRequest($method, $uri); - } elseif (class_exists(Request::class)) { - $request = new Request($method, $uri); - } elseif (class_exists(Psr17FactoryDiscovery::class)) { - $request = Psr17FactoryDiscovery::findRequestFactory()->createRequest($method, $uri); - } else { - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - $request = $request - ->withProtocolVersion($protocolVersion) - ->withBody($this->createStream($body)) - ; - - foreach ($headers as $name => $value) { - $request = $request->withAddedHeader($name, $value); - } - - return $request; - } - - /** - * {@inheritdoc} - */ - public function createStream($body = null): StreamInterface - { - if ($body instanceof StreamInterface) { - return $body; - } - - if (\is_string($body ?? '')) { - $stream = $this->streamFactory->createStream($body ?? ''); - } elseif (\is_resource($body)) { - $stream = $this->streamFactory->createStreamFromResource($body); - } else { - throw new \InvalidArgumentException(sprintf('"%s()" expects string, resource or StreamInterface, "%s" given.', __METHOD__, get_debug_type($body))); - } - - if ($stream->isSeekable()) { - $stream->seek(0); - } - - return $stream; - } - - /** - * {@inheritdoc} - */ - public function createUri($uri): UriInterface - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if ($this->responseFactory instanceof UriFactoryInterface) { - return $this->responseFactory->createUri($uri); - } - - if (class_exists(Uri::class)) { - return new Uri($uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findUrlFactory()->createUri($uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->wait(); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } - - private function sendPsr7Request(RequestInterface $request, bool $buffer = null): ResponseInterface - { - try { - $body = $request->getBody(); - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $this->client->request($request->getMethod(), (string) $request->getUri(), [ - 'headers' => $request->getHeaders(), - 'body' => $body->getContents(), - 'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null, - 'buffer' => $buffer, - ]); - } catch (\InvalidArgumentException $e) { - throw new RequestException($e->getMessage(), $request, $e); - } catch (TransportExceptionInterface $e) { - throw new NetworkException($e->getMessage(), $request, $e); - } - } -} diff --git a/vendor/symfony/http-client/Internal/AmpBody.php b/vendor/symfony/http-client/Internal/AmpBody.php deleted file mode 100644 index b99742b..0000000 --- a/vendor/symfony/http-client/Internal/AmpBody.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Amp\ByteStream\InputStream; -use Amp\ByteStream\ResourceInputStream; -use Amp\Http\Client\RequestBody; -use Amp\Promise; -use Amp\Success; -use Symfony\Component\HttpClient\Exception\TransportException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class AmpBody implements RequestBody, InputStream -{ - private $body; - private $info; - private $onProgress; - private $offset = 0; - private $length = -1; - private $uploaded; - - public function __construct($body, &$info, \Closure $onProgress) - { - $this->body = $body; - $this->info = &$info; - $this->onProgress = $onProgress; - - if (\is_resource($body)) { - $this->offset = ftell($body); - $this->length = fstat($body)['size']; - $this->body = new ResourceInputStream($body); - } elseif (\is_string($body)) { - $this->length = \strlen($body); - } - } - - public function createBodyStream(): InputStream - { - if (null !== $this->uploaded) { - $this->uploaded = null; - - if (\is_string($this->body)) { - $this->offset = 0; - } elseif ($this->body instanceof ResourceInputStream) { - fseek($this->body->getResource(), $this->offset); - } - } - - return $this; - } - - public function getHeaders(): Promise - { - return new Success([]); - } - - public function getBodyLength(): Promise - { - return new Success($this->length - $this->offset); - } - - public function read(): Promise - { - $this->info['size_upload'] += $this->uploaded; - $this->uploaded = 0; - ($this->onProgress)(); - - $chunk = $this->doRead(); - $chunk->onResolve(function ($e, $data) { - if (null !== $data) { - $this->uploaded = \strlen($data); - } else { - $this->info['upload_content_length'] = $this->info['size_upload']; - } - }); - - return $chunk; - } - - public static function rewind(RequestBody $body): RequestBody - { - if (!$body instanceof self) { - return $body; - } - - $body->uploaded = null; - - if ($body->body instanceof ResourceInputStream) { - fseek($body->body->getResource(), $body->offset); - - return new $body($body->body, $body->info, $body->onProgress); - } - - if (\is_string($body->body)) { - $body->offset = 0; - } - - return $body; - } - - private function doRead(): Promise - { - if ($this->body instanceof ResourceInputStream) { - return $this->body->read(); - } - - if (null === $this->offset || !$this->length) { - return new Success(); - } - - if (\is_string($this->body)) { - $this->offset = null; - - return new Success($this->body); - } - - if ('' === $data = ($this->body)(16372)) { - $this->offset = null; - - return new Success(); - } - - if (!\is_string($data)) { - throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data))); - } - - return new Success($data); - } -} diff --git a/vendor/symfony/http-client/Internal/AmpClientState.php b/vendor/symfony/http-client/Internal/AmpClientState.php deleted file mode 100644 index 3061f08..0000000 --- a/vendor/symfony/http-client/Internal/AmpClientState.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Amp\CancellationToken; -use Amp\Deferred; -use Amp\Http\Client\Connection\ConnectionLimitingPool; -use Amp\Http\Client\Connection\DefaultConnectionFactory; -use Amp\Http\Client\InterceptedHttpClient; -use Amp\Http\Client\Interceptor\RetryRequests; -use Amp\Http\Client\PooledHttpClient; -use Amp\Http\Client\Request; -use Amp\Http\Client\Response; -use Amp\Http\Tunnel\Http1TunnelConnector; -use Amp\Http\Tunnel\Https1TunnelConnector; -use Amp\Promise; -use Amp\Socket\Certificate; -use Amp\Socket\ClientTlsContext; -use Amp\Socket\ConnectContext; -use Amp\Socket\Connector; -use Amp\Socket\DnsConnector; -use Amp\Socket\SocketAddress; -use Amp\Success; -use Psr\Log\LoggerInterface; - -/** - * Internal representation of the Amp client's state. - * - * @author Nicolas Grekas - * - * @internal - */ -final class AmpClientState extends ClientState -{ - public $dnsCache = []; - public $responseCount = 0; - public $pushedResponses = []; - - private $clients = []; - private $clientConfigurator; - private $maxHostConnections; - private $maxPendingPushes; - private $logger; - - public function __construct(?callable $clientConfigurator, int $maxHostConnections, int $maxPendingPushes, ?LoggerInterface &$logger) - { - $this->clientConfigurator = $clientConfigurator ?? static function (PooledHttpClient $client) { - return new InterceptedHttpClient($client, new RetryRequests(2)); - }; - $this->maxHostConnections = $maxHostConnections; - $this->maxPendingPushes = $maxPendingPushes; - $this->logger = &$logger; - } - - /** - * @return Promise - */ - public function request(array $options, Request $request, CancellationToken $cancellation, array &$info, \Closure $onProgress, &$handle): Promise - { - if ($options['proxy']) { - if ($request->hasHeader('proxy-authorization')) { - $options['proxy']['auth'] = $request->getHeader('proxy-authorization'); - } - - // Matching "no_proxy" should follow the behavior of curl - $host = $request->getUri()->getHost(); - foreach ($options['proxy']['no_proxy'] as $rule) { - $dotRule = '.'.ltrim($rule, '.'); - - if ('*' === $rule || $host === $rule || substr($host, -\strlen($dotRule)) === $dotRule) { - $options['proxy'] = null; - break; - } - } - } - - $request = clone $request; - - if ($request->hasHeader('proxy-authorization')) { - $request->removeHeader('proxy-authorization'); - } - - if ($options['capture_peer_cert_chain']) { - $info['peer_certificate_chain'] = []; - } - - $request->addEventListener(new AmpListener($info, $options['peer_fingerprint']['pin-sha256'] ?? [], $onProgress, $handle)); - $request->setPushHandler(function ($request, $response) use ($options): Promise { - return $this->handlePush($request, $response, $options); - }); - - ($request->hasHeader('content-length') ? new Success((int) $request->getHeader('content-length')) : $request->getBody()->getBodyLength()) - ->onResolve(static function ($e, $bodySize) use (&$info) { - if (null !== $bodySize && 0 <= $bodySize) { - $info['upload_content_length'] = ((1 + $info['upload_content_length']) ?? 1) - 1 + $bodySize; - } - }); - - [$client, $connector] = $this->getClient($options); - $response = $client->request($request, $cancellation); - $response->onResolve(static function ($e) use ($connector, &$handle) { - if (null === $e) { - $handle = $connector->handle; - } - }); - - return $response; - } - - private function getClient(array $options): array - { - $options = [ - 'bindto' => $options['bindto'] ?: '0', - 'verify_peer' => $options['verify_peer'], - 'capath' => $options['capath'], - 'cafile' => $options['cafile'], - 'local_cert' => $options['local_cert'], - 'local_pk' => $options['local_pk'], - 'ciphers' => $options['ciphers'], - 'capture_peer_cert_chain' => $options['capture_peer_cert_chain'] || $options['peer_fingerprint'], - 'proxy' => $options['proxy'], - ]; - - $key = md5(serialize($options)); - - if (isset($this->clients[$key])) { - return $this->clients[$key]; - } - - $context = new ClientTlsContext(''); - $options['verify_peer'] || $context = $context->withoutPeerVerification(); - $options['cafile'] && $context = $context->withCaFile($options['cafile']); - $options['capath'] && $context = $context->withCaPath($options['capath']); - $options['local_cert'] && $context = $context->withCertificate(new Certificate($options['local_cert'], $options['local_pk'])); - $options['ciphers'] && $context = $context->withCiphers($options['ciphers']); - $options['capture_peer_cert_chain'] && $context = $context->withPeerCapturing(); - - $connector = $handleConnector = new class() implements Connector { - public $connector; - public $uri; - public $handle; - - public function connect(string $uri, ConnectContext $context = null, CancellationToken $token = null): Promise - { - $result = $this->connector->connect($this->uri ?? $uri, $context, $token); - $result->onResolve(function ($e, $socket) { - $this->handle = null !== $socket ? $socket->getResource() : false; - }); - - return $result; - } - }; - $connector->connector = new DnsConnector(new AmpResolver($this->dnsCache)); - - $context = (new ConnectContext()) - ->withTcpNoDelay() - ->withTlsContext($context); - - if ($options['bindto']) { - if (file_exists($options['bindto'])) { - $connector->uri = 'unix://'.$options['bindto']; - } else { - $context = $context->withBindTo($options['bindto']); - } - } - - if ($options['proxy']) { - $proxyUrl = parse_url($options['proxy']['url']); - $proxySocket = new SocketAddress($proxyUrl['host'], $proxyUrl['port']); - $proxyHeaders = $options['proxy']['auth'] ? ['Proxy-Authorization' => $options['proxy']['auth']] : []; - - if ('ssl' === $proxyUrl['scheme']) { - $connector = new Https1TunnelConnector($proxySocket, $context->getTlsContext(), $proxyHeaders, $connector); - } else { - $connector = new Http1TunnelConnector($proxySocket, $proxyHeaders, $connector); - } - } - - $maxHostConnections = 0 < $this->maxHostConnections ? $this->maxHostConnections : \PHP_INT_MAX; - $pool = new DefaultConnectionFactory($connector, $context); - $pool = ConnectionLimitingPool::byAuthority($maxHostConnections, $pool); - - return $this->clients[$key] = [($this->clientConfigurator)(new PooledHttpClient($pool)), $handleConnector]; - } - - private function handlePush(Request $request, Promise $response, array $options): Promise - { - $deferred = new Deferred(); - $authority = $request->getUri()->getAuthority(); - - if ($this->maxPendingPushes <= \count($this->pushedResponses[$authority] ?? [])) { - $fifoUrl = key($this->pushedResponses[$authority]); - unset($this->pushedResponses[$authority][$fifoUrl]); - $this->logger && $this->logger->debug(sprintf('Evicting oldest pushed response: "%s"', $fifoUrl)); - } - - $url = (string) $request->getUri(); - $this->logger && $this->logger->debug(sprintf('Queueing pushed response: "%s"', $url)); - $this->pushedResponses[$authority][] = [$url, $deferred, $request, $response, [ - 'proxy' => $options['proxy'], - 'bindto' => $options['bindto'], - 'local_cert' => $options['local_cert'], - 'local_pk' => $options['local_pk'], - ]]; - - return $deferred->promise(); - } -} diff --git a/vendor/symfony/http-client/Internal/AmpListener.php b/vendor/symfony/http-client/Internal/AmpListener.php deleted file mode 100644 index cb3235b..0000000 --- a/vendor/symfony/http-client/Internal/AmpListener.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Amp\Http\Client\Connection\Stream; -use Amp\Http\Client\EventListener; -use Amp\Http\Client\Request; -use Amp\Promise; -use Amp\Success; -use Symfony\Component\HttpClient\Exception\TransportException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class AmpListener implements EventListener -{ - private $info; - private $pinSha256; - private $onProgress; - private $handle; - - public function __construct(array &$info, array $pinSha256, \Closure $onProgress, &$handle) - { - $info += [ - 'connect_time' => 0.0, - 'pretransfer_time' => 0.0, - 'starttransfer_time' => 0.0, - 'total_time' => 0.0, - 'namelookup_time' => 0.0, - 'primary_ip' => '', - 'primary_port' => 0, - ]; - - $this->info = &$info; - $this->pinSha256 = $pinSha256; - $this->onProgress = $onProgress; - $this->handle = &$handle; - } - - public function startRequest(Request $request): Promise - { - $this->info['start_time'] = $this->info['start_time'] ?? microtime(true); - ($this->onProgress)(); - - return new Success(); - } - - public function startDnsResolution(Request $request): Promise - { - ($this->onProgress)(); - - return new Success(); - } - - public function startConnectionCreation(Request $request): Promise - { - ($this->onProgress)(); - - return new Success(); - } - - public function startTlsNegotiation(Request $request): Promise - { - ($this->onProgress)(); - - return new Success(); - } - - public function startSendingRequest(Request $request, Stream $stream): Promise - { - $host = $stream->getRemoteAddress()->getHost(); - - if (false !== strpos($host, ':')) { - $host = '['.$host.']'; - } - - $this->info['primary_ip'] = $host; - $this->info['primary_port'] = $stream->getRemoteAddress()->getPort(); - $this->info['pretransfer_time'] = microtime(true) - $this->info['start_time']; - $this->info['debug'] .= sprintf("* Connected to %s (%s) port %d\n", $request->getUri()->getHost(), $host, $this->info['primary_port']); - - if ((isset($this->info['peer_certificate_chain']) || $this->pinSha256) && null !== $tlsInfo = $stream->getTlsInfo()) { - foreach ($tlsInfo->getPeerCertificates() as $cert) { - $this->info['peer_certificate_chain'][] = openssl_x509_read($cert->toPem()); - } - - if ($this->pinSha256) { - $pin = openssl_pkey_get_public($this->info['peer_certificate_chain'][0]); - $pin = openssl_pkey_get_details($pin)['key']; - $pin = \array_slice(explode("\n", $pin), 1, -2); - $pin = base64_decode(implode('', $pin)); - $pin = base64_encode(hash('sha256', $pin, true)); - - if (!\in_array($pin, $this->pinSha256, true)) { - throw new TransportException(sprintf('SSL public key does not match pinned public key for "%s".', $this->info['url'])); - } - } - } - ($this->onProgress)(); - - $uri = $request->getUri(); - $requestUri = $uri->getPath() ?: '/'; - - if ('' !== $query = $uri->getQuery()) { - $requestUri .= '?'.$query; - } - - if ('CONNECT' === $method = $request->getMethod()) { - $requestUri = $uri->getHost().': '.($uri->getPort() ?? ('https' === $uri->getScheme() ? 443 : 80)); - } - - $this->info['debug'] .= sprintf("> %s %s HTTP/%s \r\n", $method, $requestUri, $request->getProtocolVersions()[0]); - - foreach ($request->getRawHeaders() as [$name, $value]) { - $this->info['debug'] .= $name.': '.$value."\r\n"; - } - $this->info['debug'] .= "\r\n"; - - return new Success(); - } - - public function completeSendingRequest(Request $request, Stream $stream): Promise - { - ($this->onProgress)(); - - return new Success(); - } - - public function startReceivingResponse(Request $request, Stream $stream): Promise - { - $this->info['starttransfer_time'] = microtime(true) - $this->info['start_time']; - ($this->onProgress)(); - - return new Success(); - } - - public function completeReceivingResponse(Request $request, Stream $stream): Promise - { - $this->handle = null; - ($this->onProgress)(); - - return new Success(); - } - - public function completeDnsResolution(Request $request): Promise - { - $this->info['namelookup_time'] = microtime(true) - $this->info['start_time']; - ($this->onProgress)(); - - return new Success(); - } - - public function completeConnectionCreation(Request $request): Promise - { - $this->info['connect_time'] = microtime(true) - $this->info['start_time']; - ($this->onProgress)(); - - return new Success(); - } - - public function completeTlsNegotiation(Request $request): Promise - { - ($this->onProgress)(); - - return new Success(); - } - - public function abort(Request $request, \Throwable $cause): Promise - { - return new Success(); - } -} diff --git a/vendor/symfony/http-client/Internal/AmpResolver.php b/vendor/symfony/http-client/Internal/AmpResolver.php deleted file mode 100644 index d31476a..0000000 --- a/vendor/symfony/http-client/Internal/AmpResolver.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Amp\Dns; -use Amp\Dns\Record; -use Amp\Promise; -use Amp\Success; - -/** - * Handles local overrides for the DNS resolver. - * - * @author Nicolas Grekas - * - * @internal - */ -class AmpResolver implements Dns\Resolver -{ - private $dnsMap; - - public function __construct(array &$dnsMap) - { - $this->dnsMap = &$dnsMap; - } - - public function resolve(string $name, int $typeRestriction = null): Promise - { - if (!isset($this->dnsMap[$name]) || !\in_array($typeRestriction, [Record::A, null], true)) { - return Dns\resolver()->resolve($name, $typeRestriction); - } - - return new Success([new Record($this->dnsMap[$name], Record::A, null)]); - } - - public function query(string $name, int $type): Promise - { - if (!isset($this->dnsMap[$name]) || Record::A !== $type) { - return Dns\resolver()->query($name, $type); - } - - return new Success([new Record($this->dnsMap[$name], Record::A, null)]); - } -} diff --git a/vendor/symfony/http-client/Internal/Canary.php b/vendor/symfony/http-client/Internal/Canary.php deleted file mode 100644 index 3d14b5f..0000000 --- a/vendor/symfony/http-client/Internal/Canary.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class Canary -{ - private $canceller; - - public function __construct(\Closure $canceller) - { - $this->canceller = $canceller; - } - - public function cancel() - { - if (($canceller = $this->canceller) instanceof \Closure) { - $this->canceller = null; - $canceller(); - } - } - - public function __destruct() - { - $this->cancel(); - } -} diff --git a/vendor/symfony/http-client/Internal/ClientState.php b/vendor/symfony/http-client/Internal/ClientState.php deleted file mode 100644 index 52fe3c8..0000000 --- a/vendor/symfony/http-client/Internal/ClientState.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Internal representation of the client state. - * - * @author Alexander M. Turek - * - * @internal - */ -class ClientState -{ - public $handlesActivity = []; - public $openHandles = []; - public $lastTimeout; -} diff --git a/vendor/symfony/http-client/Internal/CurlClientState.php b/vendor/symfony/http-client/Internal/CurlClientState.php deleted file mode 100644 index 958a00a..0000000 --- a/vendor/symfony/http-client/Internal/CurlClientState.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Response\CurlResponse; - -/** - * Internal representation of the cURL client's state. - * - * @author Alexander M. Turek - * - * @internal - */ -final class CurlClientState extends ClientState -{ - /** @var \CurlMultiHandle|resource|null */ - public $handle; - /** @var \CurlShareHandle|resource|null */ - public $share; - /** @var PushedResponse[] */ - public $pushedResponses = []; - /** @var DnsCache */ - public $dnsCache; - /** @var float[] */ - public $pauseExpiries = []; - public $execCounter = \PHP_INT_MIN; - /** @var LoggerInterface|null */ - public $logger; - - public static $curlVersion; - - public function __construct(int $maxHostConnections, int $maxPendingPushes) - { - self::$curlVersion = self::$curlVersion ?? curl_version(); - - $this->handle = curl_multi_init(); - $this->dnsCache = new DnsCache(); - $this->reset(); - - // Don't enable HTTP/1.1 pipelining: it forces responses to be sent in order - if (\defined('CURLPIPE_MULTIPLEX')) { - curl_multi_setopt($this->handle, \CURLMOPT_PIPELINING, \CURLPIPE_MULTIPLEX); - } - if (\defined('CURLMOPT_MAX_HOST_CONNECTIONS')) { - $maxHostConnections = curl_multi_setopt($this->handle, \CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX) ? 0 : $maxHostConnections; - } - if (\defined('CURLMOPT_MAXCONNECTS') && 0 < $maxHostConnections) { - curl_multi_setopt($this->handle, \CURLMOPT_MAXCONNECTS, $maxHostConnections); - } - - // Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/77535 - if (0 >= $maxPendingPushes || \PHP_VERSION_ID < 70217 || (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304)) { - return; - } - - // HTTP/2 push crashes before curl 7.61 - if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073D00 > self::$curlVersion['version_number'] || !(\CURL_VERSION_HTTP2 & self::$curlVersion['features'])) { - return; - } - - // Clone to prevent a circular reference - $multi = clone $this; - $multi->handle = null; - $multi->share = null; - $multi->pushedResponses = &$this->pushedResponses; - $multi->logger = &$this->logger; - $multi->handlesActivity = &$this->handlesActivity; - $multi->openHandles = &$this->openHandles; - - curl_multi_setopt($this->handle, \CURLMOPT_PUSHFUNCTION, static function ($parent, $pushed, array $requestHeaders) use ($multi, $maxPendingPushes) { - return $multi->handlePush($parent, $pushed, $requestHeaders, $maxPendingPushes); - }); - } - - public function reset() - { - foreach ($this->pushedResponses as $url => $response) { - $this->logger && $this->logger->debug(sprintf('Unused pushed response: "%s"', $url)); - curl_multi_remove_handle($this->handle, $response->handle); - curl_close($response->handle); - } - - $this->pushedResponses = []; - $this->dnsCache->evictions = $this->dnsCache->evictions ?: $this->dnsCache->removals; - $this->dnsCache->removals = $this->dnsCache->hostnames = []; - - $this->share = curl_share_init(); - - curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_DNS); - curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_SSL_SESSION); - - if (\defined('CURL_LOCK_DATA_CONNECT')) { - curl_share_setopt($this->share, \CURLSHOPT_SHARE, \CURL_LOCK_DATA_CONNECT); - } - } - - private function handlePush($parent, $pushed, array $requestHeaders, int $maxPendingPushes): int - { - $headers = []; - $origin = curl_getinfo($parent, \CURLINFO_EFFECTIVE_URL); - - foreach ($requestHeaders as $h) { - if (false !== $i = strpos($h, ':', 1)) { - $headers[substr($h, 0, $i)][] = substr($h, 1 + $i); - } - } - - if (!isset($headers[':method']) || !isset($headers[':scheme']) || !isset($headers[':authority']) || !isset($headers[':path'])) { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response from "%s": pushed headers are invalid', $origin)); - - return \CURL_PUSH_DENY; - } - - $url = $headers[':scheme'][0].'://'.$headers[':authority'][0]; - - // curl before 7.65 doesn't validate the pushed ":authority" header, - // but this is a MUST in the HTTP/2 RFC; let's restrict pushes to the original host, - // ignoring domains mentioned as alt-name in the certificate for now (same as curl). - if (!str_starts_with($origin, $url.'/')) { - $this->logger && $this->logger->debug(sprintf('Rejecting pushed response from "%s": server is not authoritative for "%s"', $origin, $url)); - - return \CURL_PUSH_DENY; - } - - if ($maxPendingPushes <= \count($this->pushedResponses)) { - $fifoUrl = key($this->pushedResponses); - unset($this->pushedResponses[$fifoUrl]); - $this->logger && $this->logger->debug(sprintf('Evicting oldest pushed response: "%s"', $fifoUrl)); - } - - $url .= $headers[':path'][0]; - $this->logger && $this->logger->debug(sprintf('Queueing pushed response: "%s"', $url)); - - $this->pushedResponses[$url] = new PushedResponse(new CurlResponse($this, $pushed), $headers, $this->openHandles[(int) $parent][1] ?? [], $pushed); - - return \CURL_PUSH_OK; - } -} diff --git a/vendor/symfony/http-client/Internal/DnsCache.php b/vendor/symfony/http-client/Internal/DnsCache.php deleted file mode 100644 index bd23f77..0000000 --- a/vendor/symfony/http-client/Internal/DnsCache.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Cache for resolved DNS queries. - * - * @author Alexander M. Turek - * - * @internal - */ -final class DnsCache -{ - /** - * Resolved hostnames (hostname => IP address). - * - * @var string[] - */ - public $hostnames = []; - - /** - * @var string[] - */ - public $removals = []; - - /** - * @var string[] - */ - public $evictions = []; -} diff --git a/vendor/symfony/http-client/Internal/HttplugWaitLoop.php b/vendor/symfony/http-client/Internal/HttplugWaitLoop.php deleted file mode 100644 index 9f5658f..0000000 --- a/vendor/symfony/http-client/Internal/HttplugWaitLoop.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Http\Client\Exception\NetworkException; -use Http\Promise\Promise; -use Psr\Http\Message\RequestInterface as Psr7RequestInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Symfony\Component\HttpClient\Response\StreamableInterface; -use Symfony\Component\HttpClient\Response\StreamWrapper; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class HttplugWaitLoop -{ - private $client; - private $promisePool; - private $responseFactory; - private $streamFactory; - - /** - * @param \SplObjectStorage|null $promisePool - */ - public function __construct(HttpClientInterface $client, ?\SplObjectStorage $promisePool, ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory) - { - $this->client = $client; - $this->promisePool = $promisePool; - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory; - } - - public function wait(?ResponseInterface $pendingResponse, float $maxDuration = null, float $idleTimeout = null): int - { - if (!$this->promisePool) { - return 0; - } - - $guzzleQueue = \GuzzleHttp\Promise\Utils::queue(); - - if (0.0 === $remainingDuration = $maxDuration) { - $idleTimeout = 0.0; - } elseif (null !== $maxDuration) { - $startTime = microtime(true); - $idleTimeout = max(0.0, min($maxDuration / 5, $idleTimeout ?? $maxDuration)); - } - - do { - foreach ($this->client->stream($this->promisePool, $idleTimeout) as $response => $chunk) { - try { - if (null !== $maxDuration && $chunk->isTimeout()) { - goto check_duration; - } - - if ($chunk->isFirst()) { - // Deactivate throwing on 3/4/5xx - $response->getStatusCode(); - } - - if (!$chunk->isLast()) { - goto check_duration; - } - - if ([, $promise] = $this->promisePool[$response] ?? null) { - unset($this->promisePool[$response]); - $promise->resolve($this->createPsr7Response($response, true)); - } - } catch (\Exception $e) { - if ([$request, $promise] = $this->promisePool[$response] ?? null) { - unset($this->promisePool[$response]); - - if ($e instanceof TransportExceptionInterface) { - $e = new NetworkException($e->getMessage(), $request, $e); - } - - $promise->reject($e); - } - } - - $guzzleQueue->run(); - - if ($pendingResponse === $response) { - return $this->promisePool->count(); - } - - check_duration: - if (null !== $maxDuration && $idleTimeout && $idleTimeout > $remainingDuration = max(0.0, $maxDuration - microtime(true) + $startTime)) { - $idleTimeout = $remainingDuration / 5; - break; - } - } - - if (!$count = $this->promisePool->count()) { - return 0; - } - } while (null === $maxDuration || 0 < $remainingDuration); - - return $count; - } - - public function createPsr7Response(ResponseInterface $response, bool $buffer = false): Psr7ResponseInterface - { - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); - - foreach ($response->getHeaders(false) as $name => $values) { - foreach ($values as $value) { - $psrResponse = $psrResponse->withAddedHeader($name, $value); - } - } - - if ($response instanceof StreamableInterface) { - $body = $this->streamFactory->createStreamFromResource($response->toStream(false)); - } elseif (!$buffer) { - $body = $this->streamFactory->createStreamFromResource(StreamWrapper::createResource($response, $this->client)); - } else { - $body = $this->streamFactory->createStream($response->getContent(false)); - } - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $psrResponse->withBody($body); - } -} diff --git a/vendor/symfony/http-client/Internal/NativeClientState.php b/vendor/symfony/http-client/Internal/NativeClientState.php deleted file mode 100644 index 20b2727..0000000 --- a/vendor/symfony/http-client/Internal/NativeClientState.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -/** - * Internal representation of the native client's state. - * - * @author Alexander M. Turek - * - * @internal - */ -final class NativeClientState extends ClientState -{ - /** @var int */ - public $id; - /** @var int */ - public $maxHostConnections = \PHP_INT_MAX; - /** @var int */ - public $responseCount = 0; - /** @var string[] */ - public $dnsCache = []; - /** @var bool */ - public $sleep = false; - /** @var int[] */ - public $hosts = []; - - public function __construct() - { - $this->id = random_int(\PHP_INT_MIN, \PHP_INT_MAX); - } - - public function reset() - { - $this->responseCount = 0; - $this->dnsCache = []; - $this->hosts = []; - } -} diff --git a/vendor/symfony/http-client/Internal/PushedResponse.php b/vendor/symfony/http-client/Internal/PushedResponse.php deleted file mode 100644 index 08fca60..0000000 --- a/vendor/symfony/http-client/Internal/PushedResponse.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Internal; - -use Symfony\Component\HttpClient\Response\CurlResponse; - -/** - * A pushed response with its request headers. - * - * @author Alexander M. Turek - * - * @internal - */ -final class PushedResponse -{ - public $response; - - /** @var string[] */ - public $requestHeaders; - - public $parentOptions = []; - - public $handle; - - public function __construct(CurlResponse $response, array $requestHeaders, array $parentOptions, $handle) - { - $this->response = $response; - $this->requestHeaders = $requestHeaders; - $this->parentOptions = $parentOptions; - $this->handle = $handle; - } -} diff --git a/vendor/symfony/http-client/LICENSE b/vendor/symfony/http-client/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/http-client/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/http-client/MockHttpClient.php b/vendor/symfony/http-client/MockHttpClient.php deleted file mode 100644 index fecba0e..0000000 --- a/vendor/symfony/http-client/MockHttpClient.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * A test-friendly HttpClient that doesn't make actual HTTP requests. - * - * @author Nicolas Grekas - */ -class MockHttpClient implements HttpClientInterface, ResetInterface -{ - use HttpClientTrait; - - private $responseFactory; - private $requestsCount = 0; - private $defaultOptions = []; - - /** - * @param callable|callable[]|ResponseInterface|ResponseInterface[]|iterable|null $responseFactory - */ - public function __construct($responseFactory = null, ?string $baseUri = 'https://example.com') - { - $this->setResponseFactory($responseFactory); - $this->defaultOptions['base_uri'] = $baseUri; - } - - /** - * @param callable|callable[]|ResponseInterface|ResponseInterface[]|iterable|null $responseFactory - */ - public function setResponseFactory($responseFactory): void - { - if ($responseFactory instanceof ResponseInterface) { - $responseFactory = [$responseFactory]; - } - - if (!$responseFactory instanceof \Iterator && null !== $responseFactory && !\is_callable($responseFactory)) { - $responseFactory = (static function () use ($responseFactory) { - yield from $responseFactory; - })(); - } - - $this->responseFactory = $responseFactory; - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = $this->prepareRequest($method, $url, $options, $this->defaultOptions, true); - $url = implode('', $url); - - if (null === $this->responseFactory) { - $response = new MockResponse(); - } elseif (\is_callable($this->responseFactory)) { - $response = ($this->responseFactory)($method, $url, $options); - } elseif (!$this->responseFactory->valid()) { - throw new TransportException('The response factory iterator passed to MockHttpClient is empty.'); - } else { - $responseFactory = $this->responseFactory->current(); - $response = \is_callable($responseFactory) ? $responseFactory($method, $url, $options) : $responseFactory; - $this->responseFactory->next(); - } - ++$this->requestsCount; - - if (!$response instanceof ResponseInterface) { - throw new TransportException(sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', \is_object($response) ? \get_class($response) : \gettype($response))); - } - - return MockResponse::fromRequest($method, $url, $options, $response); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof ResponseInterface) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - return new ResponseStream(MockResponse::stream($responses, $timeout)); - } - - public function getRequestsCount(): int - { - return $this->requestsCount; - } - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions, true); - - return $clone; - } - - public function reset() - { - $this->requestsCount = 0; - } -} diff --git a/vendor/symfony/http-client/NativeHttpClient.php b/vendor/symfony/http-client/NativeHttpClient.php deleted file mode 100644 index 63fcc1c..0000000 --- a/vendor/symfony/http-client/NativeHttpClient.php +++ /dev/null @@ -1,468 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\NativeClientState; -use Symfony\Component\HttpClient\Response\NativeResponse; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * A portable implementation of the HttpClientInterface contracts based on PHP stream wrappers. - * - * PHP stream wrappers are able to fetch response bodies concurrently, - * but each request is opened synchronously. - * - * @author Nicolas Grekas - */ -final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface -{ - use HttpClientTrait; - use LoggerAwareTrait; - - private $defaultOptions = self::OPTIONS_DEFAULTS; - private static $emptyDefaults = self::OPTIONS_DEFAULTS; - - /** @var NativeClientState */ - private $multi; - - /** - * @param array $defaultOptions Default request's options - * @param int $maxHostConnections The maximum number of connections to open - * - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - */ - public function __construct(array $defaultOptions = [], int $maxHostConnections = 6) - { - $this->defaultOptions['buffer'] = $this->defaultOptions['buffer'] ?? \Closure::fromCallable([__CLASS__, 'shouldBuffer']); - - if ($defaultOptions) { - [, $this->defaultOptions] = self::prepareRequest(null, null, $defaultOptions, $this->defaultOptions); - } - - $this->multi = new NativeClientState(); - $this->multi->maxHostConnections = 0 < $maxHostConnections ? $maxHostConnections : \PHP_INT_MAX; - } - - /** - * @see HttpClientInterface::OPTIONS_DEFAULTS for available options - * - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - [$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions); - - if ($options['bindto']) { - if (file_exists($options['bindto'])) { - throw new TransportException(__CLASS__.' cannot bind to local Unix sockets, use e.g. CurlHttpClient instead.'); - } - if (str_starts_with($options['bindto'], 'if!')) { - throw new TransportException(__CLASS__.' cannot bind to network interfaces, use e.g. CurlHttpClient instead.'); - } - if (str_starts_with($options['bindto'], 'host!')) { - $options['bindto'] = substr($options['bindto'], 5); - } - } - - $hasContentLength = isset($options['normalized_headers']['content-length']); - $hasBody = '' !== $options['body'] || 'POST' === $method || $hasContentLength; - - $options['body'] = self::getBodyAsString($options['body']); - - if ('chunked' === substr($options['normalized_headers']['transfer-encoding'][0] ?? '', \strlen('Transfer-Encoding: '))) { - unset($options['normalized_headers']['transfer-encoding']); - $options['headers'] = array_merge(...array_values($options['normalized_headers'])); - $options['body'] = self::dechunk($options['body']); - } - if ('' === $options['body'] && $hasBody && !$hasContentLength) { - $options['headers'][] = 'Content-Length: 0'; - } - if ($hasBody && !isset($options['normalized_headers']['content-type'])) { - $options['headers'][] = 'Content-Type: application/x-www-form-urlencoded'; - } - - if (\extension_loaded('zlib') && !isset($options['normalized_headers']['accept-encoding'])) { - // gzip is the most widely available algo, no need to deal with deflate - $options['headers'][] = 'Accept-Encoding: gzip'; - } - - if ($options['peer_fingerprint']) { - if (isset($options['peer_fingerprint']['pin-sha256']) && 1 === \count($options['peer_fingerprint'])) { - throw new TransportException(__CLASS__.' cannot verify "pin-sha256" fingerprints, please provide a "sha256" one.'); - } - - unset($options['peer_fingerprint']['pin-sha256']); - } - - $info = [ - 'response_headers' => [], - 'url' => $url, - 'error' => null, - 'canceled' => false, - 'http_method' => $method, - 'http_code' => 0, - 'redirect_count' => 0, - 'start_time' => 0.0, - 'connect_time' => 0.0, - 'redirect_time' => 0.0, - 'pretransfer_time' => 0.0, - 'starttransfer_time' => 0.0, - 'total_time' => 0.0, - 'namelookup_time' => 0.0, - 'size_upload' => 0, - 'size_download' => 0, - 'size_body' => \strlen($options['body']), - 'primary_ip' => '', - 'primary_port' => 'http:' === $url['scheme'] ? 80 : 443, - 'debug' => \extension_loaded('curl') ? '' : "* Enable the curl extension for better performance\n", - ]; - - if ($onProgress = $options['on_progress']) { - // Memoize the last progress to ease calling the callback periodically when no network transfer happens - $lastProgress = [0, 0]; - $maxDuration = 0 < $options['max_duration'] ? $options['max_duration'] : \INF; - $onProgress = static function (...$progress) use ($onProgress, &$lastProgress, &$info, $maxDuration) { - if ($info['total_time'] >= $maxDuration) { - throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url']))); - } - - $progressInfo = $info; - $progressInfo['url'] = implode('', $info['url']); - unset($progressInfo['size_body']); - - if ($progress && -1 === $progress[0]) { - // Response completed - $lastProgress[0] = max($lastProgress); - } else { - $lastProgress = $progress ?: $lastProgress; - } - - $onProgress($lastProgress[0], $lastProgress[1], $progressInfo); - }; - } elseif (0 < $options['max_duration']) { - $maxDuration = $options['max_duration']; - $onProgress = static function () use (&$info, $maxDuration): void { - if ($info['total_time'] >= $maxDuration) { - throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url']))); - } - }; - } - - // Always register a notification callback to compute live stats about the response - $notification = static function (int $code, int $severity, ?string $msg, int $msgCode, int $dlNow, int $dlSize) use ($onProgress, &$info) { - $info['total_time'] = microtime(true) - $info['start_time']; - - if (\STREAM_NOTIFY_PROGRESS === $code) { - $info['starttransfer_time'] = $info['starttransfer_time'] ?: $info['total_time']; - $info['size_upload'] += $dlNow ? 0 : $info['size_body']; - $info['size_download'] = $dlNow; - } elseif (\STREAM_NOTIFY_CONNECT === $code) { - $info['connect_time'] = $info['total_time']; - $info['debug'] .= $info['request_header']; - unset($info['request_header']); - } else { - return; - } - - if ($onProgress) { - $onProgress($dlNow, $dlSize); - } - }; - - if ($options['resolve']) { - $this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache; - } - - $this->logger && $this->logger->info(sprintf('Request: "%s %s"', $method, implode('', $url))); - - if (!isset($options['normalized_headers']['user-agent'])) { - $options['headers'][] = 'User-Agent: Symfony HttpClient/Native'; - } - - if (0 < $options['max_duration']) { - $options['timeout'] = min($options['max_duration'], $options['timeout']); - } - - $bindto = $options['bindto']; - if (!$bindto && (70322 === \PHP_VERSION_ID || 70410 === \PHP_VERSION_ID)) { - $bindto = '0:0'; - } - - $context = [ - 'http' => [ - 'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'), - 'method' => $method, - 'content' => $options['body'], - 'ignore_errors' => true, - 'curl_verify_ssl_peer' => $options['verify_peer'], - 'curl_verify_ssl_host' => $options['verify_host'], - 'auto_decode' => false, // Disable dechunk filter, it's incompatible with stream_select() - 'timeout' => $options['timeout'], - 'follow_location' => false, // We follow redirects ourselves - the native logic is too limited - ], - 'ssl' => array_filter([ - 'verify_peer' => $options['verify_peer'], - 'verify_peer_name' => $options['verify_host'], - 'cafile' => $options['cafile'], - 'capath' => $options['capath'], - 'local_cert' => $options['local_cert'], - 'local_pk' => $options['local_pk'], - 'passphrase' => $options['passphrase'], - 'ciphers' => $options['ciphers'], - 'peer_fingerprint' => $options['peer_fingerprint'], - 'capture_peer_cert_chain' => $options['capture_peer_cert_chain'], - 'allow_self_signed' => (bool) $options['peer_fingerprint'], - 'SNI_enabled' => true, - 'disable_compression' => true, - ], static function ($v) { return null !== $v; }), - 'socket' => [ - 'bindto' => $bindto, - 'tcp_nodelay' => true, - ], - ]; - - $context = stream_context_create($context, ['notification' => $notification]); - - $resolver = static function ($multi) use ($context, $options, $url, &$info, $onProgress) { - [$host, $port] = self::parseHostPort($url, $info); - - if (!isset($options['normalized_headers']['host'])) { - $options['headers'][] = 'Host: '.$host.$port; - } - - $proxy = self::getProxy($options['proxy'], $url, $options['no_proxy']); - - if (!self::configureHeadersAndProxy($context, $host, $options['headers'], $proxy, 'https:' === $url['scheme'])) { - $ip = self::dnsResolve($host, $multi, $info, $onProgress); - $url['authority'] = substr_replace($url['authority'], $ip, -\strlen($host) - \strlen($port), \strlen($host)); - } - - return [self::createRedirectResolver($options, $host, $proxy, $info, $onProgress), implode('', $url)]; - }; - - return new NativeResponse($this->multi, $context, implode('', $url), $options, $info, $resolver, $onProgress, $this->logger); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof NativeResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of NativeResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - return new ResponseStream(NativeResponse::stream($responses, $timeout)); - } - - public function reset() - { - $this->multi->reset(); - } - - private static function getBodyAsString($body): string - { - if (\is_resource($body)) { - return stream_get_contents($body); - } - - if (!$body instanceof \Closure) { - return $body; - } - - $result = ''; - - while ('' !== $data = $body(self::$CHUNK_SIZE)) { - if (!\is_string($data)) { - throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data))); - } - - $result .= $data; - } - - return $result; - } - - /** - * Extracts the host and the port from the URL. - */ - private static function parseHostPort(array $url, array &$info): array - { - if ($port = parse_url($url['authority'], \PHP_URL_PORT) ?: '') { - $info['primary_port'] = $port; - $port = ':'.$port; - } else { - $info['primary_port'] = 'http:' === $url['scheme'] ? 80 : 443; - } - - return [parse_url($url['authority'], \PHP_URL_HOST), $port]; - } - - /** - * Resolves the IP of the host using the local DNS cache if possible. - */ - private static function dnsResolve($host, NativeClientState $multi, array &$info, ?\Closure $onProgress): string - { - if (null === $ip = $multi->dnsCache[$host] ?? null) { - $info['debug'] .= "* Hostname was NOT found in DNS cache\n"; - $now = microtime(true); - - if (!$ip = gethostbynamel($host)) { - throw new TransportException(sprintf('Could not resolve host "%s".', $host)); - } - - $info['namelookup_time'] = microtime(true) - ($info['start_time'] ?: $now); - $multi->dnsCache[$host] = $ip = $ip[0]; - $info['debug'] .= "* Added {$host}:0:{$ip} to DNS cache\n"; - } else { - $info['debug'] .= "* Hostname was found in DNS cache\n"; - } - - $info['primary_ip'] = $ip; - - if ($onProgress) { - // Notify DNS resolution - $onProgress(); - } - - return $ip; - } - - /** - * Handles redirects - the native logic is too buggy to be used. - */ - private static function createRedirectResolver(array $options, string $host, ?array $proxy, array &$info, ?\Closure $onProgress): \Closure - { - $redirectHeaders = []; - if (0 < $maxRedirects = $options['max_redirects']) { - $redirectHeaders = ['host' => $host]; - $redirectHeaders['with_auth'] = $redirectHeaders['no_auth'] = array_filter($options['headers'], static function ($h) { - return 0 !== stripos($h, 'Host:'); - }); - - if (isset($options['normalized_headers']['authorization']) || isset($options['normalized_headers']['cookie'])) { - $redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], static function ($h) { - return 0 !== stripos($h, 'Authorization:') && 0 !== stripos($h, 'Cookie:'); - }); - } - } - - return static function (NativeClientState $multi, ?string $location, $context) use (&$redirectHeaders, $proxy, &$info, $maxRedirects, $onProgress): ?string { - if (null === $location || $info['http_code'] < 300 || 400 <= $info['http_code']) { - $info['redirect_url'] = null; - - return null; - } - - try { - $url = self::parseUrl($location); - } catch (InvalidArgumentException $e) { - $info['redirect_url'] = null; - - return null; - } - - $url = self::resolveUrl($url, $info['url']); - $info['redirect_url'] = implode('', $url); - - if ($info['redirect_count'] >= $maxRedirects) { - return null; - } - - $info['url'] = $url; - ++$info['redirect_count']; - $info['redirect_time'] = microtime(true) - $info['start_time']; - - // Do like curl and browsers: turn POST to GET on 301, 302 and 303 - if (\in_array($info['http_code'], [301, 302, 303], true)) { - $options = stream_context_get_options($context)['http']; - - if ('POST' === $options['method'] || 303 === $info['http_code']) { - $info['http_method'] = $options['method'] = 'HEAD' === $options['method'] ? 'HEAD' : 'GET'; - $options['content'] = ''; - $filterContentHeaders = static function ($h) { - return 0 !== stripos($h, 'Content-Length:') && 0 !== stripos($h, 'Content-Type:') && 0 !== stripos($h, 'Transfer-Encoding:'); - }; - $options['header'] = array_filter($options['header'], $filterContentHeaders); - $redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], $filterContentHeaders); - $redirectHeaders['with_auth'] = array_filter($redirectHeaders['with_auth'], $filterContentHeaders); - - stream_context_set_option($context, ['http' => $options]); - } - } - - [$host, $port] = self::parseHostPort($url, $info); - - if (false !== (parse_url($location, \PHP_URL_HOST) ?? false)) { - // Authorization and Cookie headers MUST NOT follow except for the initial host name - $requestHeaders = $redirectHeaders['host'] === $host ? $redirectHeaders['with_auth'] : $redirectHeaders['no_auth']; - $requestHeaders[] = 'Host: '.$host.$port; - $dnsResolve = !self::configureHeadersAndProxy($context, $host, $requestHeaders, $proxy, 'https:' === $url['scheme']); - } else { - $dnsResolve = isset(stream_context_get_options($context)['ssl']['peer_name']); - } - - if ($dnsResolve) { - $ip = self::dnsResolve($host, $multi, $info, $onProgress); - $url['authority'] = substr_replace($url['authority'], $ip, -\strlen($host) - \strlen($port), \strlen($host)); - } - - return implode('', $url); - }; - } - - private static function configureHeadersAndProxy($context, string $host, array $requestHeaders, ?array $proxy, bool $isSsl): bool - { - if (null === $proxy) { - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', $host); - - return false; - } - - // Matching "no_proxy" should follow the behavior of curl - - foreach ($proxy['no_proxy'] as $rule) { - $dotRule = '.'.ltrim($rule, '.'); - - if ('*' === $rule || $host === $rule || str_ends_with($host, $dotRule)) { - stream_context_set_option($context, 'http', 'proxy', null); - stream_context_set_option($context, 'http', 'request_fulluri', false); - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', $host); - - return false; - } - } - - if (null !== $proxy['auth']) { - $requestHeaders[] = 'Proxy-Authorization: '.$proxy['auth']; - } - - stream_context_set_option($context, 'http', 'proxy', $proxy['url']); - stream_context_set_option($context, 'http', 'request_fulluri', !$isSsl); - stream_context_set_option($context, 'http', 'header', $requestHeaders); - stream_context_set_option($context, 'ssl', 'peer_name', null); - - return true; - } -} diff --git a/vendor/symfony/http-client/NoPrivateNetworkHttpClient.php b/vendor/symfony/http-client/NoPrivateNetworkHttpClient.php deleted file mode 100644 index 911cce9..0000000 --- a/vendor/symfony/http-client/NoPrivateNetworkHttpClient.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpFoundation\IpUtils; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Decorator that blocks requests to private networks by default. - * - * @author Hallison Boaventura - */ -final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface -{ - use HttpClientTrait; - - private const PRIVATE_SUBNETS = [ - '127.0.0.0/8', - '10.0.0.0/8', - '192.168.0.0/16', - '172.16.0.0/12', - '169.254.0.0/16', - '0.0.0.0/8', - '240.0.0.0/4', - '::1/128', - 'fc00::/7', - 'fe80::/10', - '::ffff:0:0/96', - '::/128', - ]; - - private $client; - private $subnets; - - /** - * @param string|array|null $subnets String or array of subnets using CIDR notation that will be used by IpUtils. - * If null is passed, the standard private subnets will be used. - */ - public function __construct(HttpClientInterface $client, $subnets = null) - { - if (!(\is_array($subnets) || \is_string($subnets) || null === $subnets)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be of the type array, string or null. "%s" given.', __METHOD__, get_debug_type($subnets))); - } - - if (!class_exists(IpUtils::class)) { - throw new \LogicException(sprintf('You cannot use "%s" if the HttpFoundation component is not installed. Try running "composer require symfony/http-foundation".', __CLASS__)); - } - - $this->client = $client; - $this->subnets = $subnets; - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $onProgress = $options['on_progress'] ?? null; - if (null !== $onProgress && !\is_callable($onProgress)) { - throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', get_debug_type($onProgress))); - } - - $subnets = $this->subnets; - $lastPrimaryIp = ''; - - $options['on_progress'] = function (int $dlNow, int $dlSize, array $info) use ($onProgress, $subnets, &$lastPrimaryIp): void { - if ($info['primary_ip'] !== $lastPrimaryIp) { - if ($info['primary_ip'] && IpUtils::checkIp($info['primary_ip'], $subnets ?? self::PRIVATE_SUBNETS)) { - throw new TransportException(sprintf('IP "%s" is blocked for "%s".', $info['primary_ip'], $info['url'])); - } - - $lastPrimaryIp = $info['primary_ip']; - } - - null !== $onProgress && $onProgress($dlNow, $dlSize, $info); - }; - - return $this->client->request($method, $url, $options); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - return $this->client->stream($responses, $timeout); - } - - /** - * {@inheritdoc} - */ - public function setLogger(LoggerInterface $logger): void - { - if ($this->client instanceof LoggerAwareInterface) { - $this->client->setLogger($logger); - } - } - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->client = $this->client->withOptions($options); - - return $clone; - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } -} diff --git a/vendor/symfony/http-client/Psr18Client.php b/vendor/symfony/http-client/Psr18Client.php deleted file mode 100644 index dbd8864..0000000 --- a/vendor/symfony/http-client/Psr18Client.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Http\Discovery\Exception\NotFoundException; -use Http\Discovery\Psr17FactoryDiscovery; -use Nyholm\Psr7\Factory\Psr17Factory; -use Nyholm\Psr7\Request; -use Nyholm\Psr7\Uri; -use Psr\Http\Client\ClientInterface; -use Psr\Http\Client\NetworkExceptionInterface; -use Psr\Http\Client\RequestExceptionInterface; -use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\StreamInterface; -use Psr\Http\Message\UriFactoryInterface; -use Psr\Http\Message\UriInterface; -use Symfony\Component\HttpClient\Response\StreamableInterface; -use Symfony\Component\HttpClient\Response\StreamWrapper; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\Service\ResetInterface; - -if (!interface_exists(RequestFactoryInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-factory" package is not installed. Try running "composer require nyholm/psr7".'); -} - -if (!interface_exists(ClientInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-client" package is not installed. Try running "composer require psr/http-client".'); -} - -/** - * An adapter to turn a Symfony HttpClientInterface into a PSR-18 ClientInterface. - * - * Run "composer require psr/http-client" to install the base ClientInterface. Run - * "composer require nyholm/psr7" to install an efficient implementation of response - * and stream factories with flex-provided autowiring aliases. - * - * @author Nicolas Grekas - */ -final class Psr18Client implements ClientInterface, RequestFactoryInterface, StreamFactoryInterface, UriFactoryInterface, ResetInterface -{ - private $client; - private $responseFactory; - private $streamFactory; - - public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) - { - $this->client = $client ?? HttpClient::create(); - $this->responseFactory = $responseFactory; - $this->streamFactory = $streamFactory ?? ($responseFactory instanceof StreamFactoryInterface ? $responseFactory : null); - - if (null !== $this->responseFactory && null !== $this->streamFactory) { - return; - } - - if (!class_exists(Psr17Factory::class) && !class_exists(Psr17FactoryDiscovery::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as no PSR-17 factories have been provided. Try running "composer require nyholm/psr7".'); - } - - try { - $psr17Factory = class_exists(Psr17Factory::class, false) ? new Psr17Factory() : null; - $this->responseFactory = $this->responseFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findResponseFactory(); - $this->streamFactory = $this->streamFactory ?? $psr17Factory ?? Psr17FactoryDiscovery::findStreamFactory(); - } catch (NotFoundException $e) { - throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been found. Try running "composer require nyholm/psr7".', 0, $e); - } - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request): ResponseInterface - { - try { - $body = $request->getBody(); - - if ($body->isSeekable()) { - $body->seek(0); - } - - $response = $this->client->request($request->getMethod(), (string) $request->getUri(), [ - 'headers' => $request->getHeaders(), - 'body' => $body->getContents(), - 'http_version' => '1.0' === $request->getProtocolVersion() ? '1.0' : null, - ]); - - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); - - foreach ($response->getHeaders(false) as $name => $values) { - foreach ($values as $value) { - $psrResponse = $psrResponse->withAddedHeader($name, $value); - } - } - - $body = $response instanceof StreamableInterface ? $response->toStream(false) : StreamWrapper::createResource($response, $this->client); - $body = $this->streamFactory->createStreamFromResource($body); - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $psrResponse->withBody($body); - } catch (TransportExceptionInterface $e) { - if ($e instanceof \InvalidArgumentException) { - throw new Psr18RequestException($e, $request); - } - - throw new Psr18NetworkException($e, $request); - } - } - - /** - * {@inheritdoc} - */ - public function createRequest(string $method, $uri): RequestInterface - { - if ($this->responseFactory instanceof RequestFactoryInterface) { - return $this->responseFactory->createRequest($method, $uri); - } - - if (class_exists(Request::class)) { - return new Request($method, $uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findRequestFactory()->createRequest($method, $uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - /** - * {@inheritdoc} - */ - public function createStream(string $content = ''): StreamInterface - { - $stream = $this->streamFactory->createStream($content); - - if ($stream->isSeekable()) { - $stream->seek(0); - } - - return $stream; - } - - /** - * {@inheritdoc} - */ - public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface - { - return $this->streamFactory->createStreamFromFile($filename, $mode); - } - - /** - * {@inheritdoc} - */ - public function createStreamFromResource($resource): StreamInterface - { - return $this->streamFactory->createStreamFromResource($resource); - } - - /** - * {@inheritdoc} - */ - public function createUri(string $uri = ''): UriInterface - { - if ($this->responseFactory instanceof UriFactoryInterface) { - return $this->responseFactory->createUri($uri); - } - - if (class_exists(Uri::class)) { - return new Uri($uri); - } - - if (class_exists(Psr17FactoryDiscovery::class)) { - return Psr17FactoryDiscovery::findUrlFactory()->createUri($uri); - } - - throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } -} - -/** - * @internal - */ -class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface -{ - private $request; - - public function __construct(TransportExceptionInterface $e, RequestInterface $request) - { - parent::__construct($e->getMessage(), 0, $e); - $this->request = $request; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } -} - -/** - * @internal - */ -class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface -{ - private $request; - - public function __construct(TransportExceptionInterface $e, RequestInterface $request) - { - parent::__construct($e->getMessage(), 0, $e); - $this->request = $request; - } - - public function getRequest(): RequestInterface - { - return $this->request; - } -} diff --git a/vendor/symfony/http-client/README.md b/vendor/symfony/http-client/README.md deleted file mode 100644 index 0c55ccc..0000000 --- a/vendor/symfony/http-client/README.md +++ /dev/null @@ -1,27 +0,0 @@ -HttpClient component -==================== - -The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously. - -Sponsor -------- - -The Httpclient component for Symfony 5.4/6.0 is [backed][1] by [Klaxoon][2]. - -Klaxoon is a platform that empowers organizations to run effective and -productive workshops easily in a hybrid environment. Anytime, Anywhere. - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_client.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://klaxoon.com -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/http-client/Response/AmpResponse.php b/vendor/symfony/http-client/Response/AmpResponse.php deleted file mode 100644 index 9015a06..0000000 --- a/vendor/symfony/http-client/Response/AmpResponse.php +++ /dev/null @@ -1,460 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Amp\ByteStream\StreamException; -use Amp\CancellationTokenSource; -use Amp\Coroutine; -use Amp\Deferred; -use Amp\Http\Client\HttpException; -use Amp\Http\Client\Request; -use Amp\Http\Client\Response; -use Amp\Loop; -use Amp\Promise; -use Amp\Success; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\InformationalChunk; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\HttpClientTrait; -use Symfony\Component\HttpClient\Internal\AmpBody; -use Symfony\Component\HttpClient\Internal\AmpClientState; -use Symfony\Component\HttpClient\Internal\Canary; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class AmpResponse implements ResponseInterface, StreamableInterface -{ - use CommonResponseTrait; - use TransportResponseTrait; - - private static $nextId = 'a'; - - private $multi; - private $options; - private $canceller; - private $onProgress; - - private static $delay; - - /** - * @internal - */ - public function __construct(AmpClientState $multi, Request $request, array $options, ?LoggerInterface $logger) - { - $this->multi = $multi; - $this->options = &$options; - $this->logger = $logger; - $this->timeout = $options['timeout']; - $this->shouldBuffer = $options['buffer']; - - if ($this->inflate = \extension_loaded('zlib') && !$request->hasHeader('accept-encoding')) { - $request->setHeader('Accept-Encoding', 'gzip'); - } - - $this->initializer = static function (self $response) { - return null !== $response->options; - }; - - $info = &$this->info; - $headers = &$this->headers; - $canceller = $this->canceller = new CancellationTokenSource(); - $handle = &$this->handle; - - $info['url'] = (string) $request->getUri(); - $info['http_method'] = $request->getMethod(); - $info['start_time'] = null; - $info['redirect_url'] = null; - $info['redirect_time'] = 0.0; - $info['redirect_count'] = 0; - $info['size_upload'] = 0.0; - $info['size_download'] = 0.0; - $info['upload_content_length'] = -1.0; - $info['download_content_length'] = -1.0; - $info['user_data'] = $options['user_data']; - $info['debug'] = ''; - - $onProgress = $options['on_progress'] ?? static function () {}; - $onProgress = $this->onProgress = static function () use (&$info, $onProgress) { - $info['total_time'] = microtime(true) - $info['start_time']; - $onProgress((int) $info['size_download'], ((int) (1 + $info['download_content_length']) ?: 1) - 1, (array) $info); - }; - - $pauseDeferred = new Deferred(); - $pause = new Success(); - - $throttleWatcher = null; - - $this->id = $id = self::$nextId++; - Loop::defer(static function () use ($request, $multi, &$id, &$info, &$headers, $canceller, &$options, $onProgress, &$handle, $logger, &$pause) { - return new Coroutine(self::generateResponse($request, $multi, $id, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause)); - }); - - $info['pause_handler'] = static function (float $duration) use (&$throttleWatcher, &$pauseDeferred, &$pause) { - if (null !== $throttleWatcher) { - Loop::cancel($throttleWatcher); - } - - $pause = $pauseDeferred->promise(); - - if ($duration <= 0) { - $deferred = $pauseDeferred; - $pauseDeferred = new Deferred(); - $deferred->resolve(); - } else { - $throttleWatcher = Loop::delay(ceil(1000 * $duration), static function () use (&$pauseDeferred) { - $deferred = $pauseDeferred; - $pauseDeferred = new Deferred(); - $deferred->resolve(); - }); - } - }; - - $multi->lastTimeout = null; - $multi->openHandles[$id] = $id; - ++$multi->responseCount; - - $this->canary = new Canary(static function () use ($canceller, $multi, $id) { - $canceller->cancel(); - unset($multi->openHandles[$id], $multi->handlesActivity[$id]); - }); - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - return null !== $type ? $this->info[$type] ?? null : $this->info; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - try { - $this->doDestruct(); - } finally { - // Clear the DNS cache when all requests completed - if (0 >= --$this->multi->responseCount) { - $this->multi->responseCount = 0; - $this->multi->dnsCache = []; - } - } - } - - /** - * {@inheritdoc} - */ - private static function schedule(self $response, array &$runningResponses): void - { - if (isset($runningResponses[0])) { - $runningResponses[0][1][$response->id] = $response; - } else { - $runningResponses[0] = [$response->multi, [$response->id => $response]]; - } - - if (!isset($response->multi->openHandles[$response->id])) { - $response->multi->handlesActivity[$response->id][] = null; - $response->multi->handlesActivity[$response->id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } - } - - /** - * {@inheritdoc} - * - * @param AmpClientState $multi - */ - private static function perform(ClientState $multi, array &$responses = null): void - { - if ($responses) { - foreach ($responses as $response) { - try { - if ($response->info['start_time']) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - ($response->onProgress)(); - } - } catch (\Throwable $e) { - $multi->handlesActivity[$response->id][] = null; - $multi->handlesActivity[$response->id][] = $e; - } - } - } - } - - /** - * {@inheritdoc} - * - * @param AmpClientState $multi - */ - private static function select(ClientState $multi, float $timeout): int - { - $timeout += microtime(true); - self::$delay = Loop::defer(static function () use ($timeout) { - if (0 < $timeout -= microtime(true)) { - self::$delay = Loop::delay(ceil(1000 * $timeout), [Loop::class, 'stop']); - } else { - Loop::stop(); - } - }); - - Loop::run(); - - return null === self::$delay ? 1 : 0; - } - - private static function generateResponse(Request $request, AmpClientState $multi, string $id, array &$info, array &$headers, CancellationTokenSource $canceller, array &$options, \Closure $onProgress, &$handle, ?LoggerInterface $logger, Promise &$pause) - { - $request->setInformationalResponseHandler(static function (Response $response) use ($multi, $id, &$info, &$headers) { - self::addResponseHeaders($response, $info, $headers); - $multi->handlesActivity[$id][] = new InformationalChunk($response->getStatus(), $response->getHeaders()); - self::stopLoop(); - }); - - try { - /* @var Response $response */ - if (null === $response = yield from self::getPushedResponse($request, $multi, $info, $headers, $options, $logger)) { - $logger && $logger->info(sprintf('Request: "%s %s"', $info['http_method'], $info['url'])); - - $response = yield from self::followRedirects($request, $multi, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause); - } - - $options = null; - - $multi->handlesActivity[$id][] = new FirstChunk(); - - if ('HEAD' === $response->getRequest()->getMethod() || \in_array($info['http_code'], [204, 304], true)) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null; - self::stopLoop(); - - return; - } - - if ($response->hasHeader('content-length')) { - $info['download_content_length'] = (float) $response->getHeader('content-length'); - } - - $body = $response->getBody(); - - while (true) { - self::stopLoop(); - - yield $pause; - - if (null === $data = yield $body->read()) { - break; - } - - $info['size_download'] += \strlen($data); - $multi->handlesActivity[$id][] = $data; - } - - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null; - } catch (\Throwable $e) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = $e; - } finally { - $info['download_content_length'] = $info['size_download']; - } - - self::stopLoop(); - } - - private static function followRedirects(Request $originRequest, AmpClientState $multi, array &$info, array &$headers, CancellationTokenSource $canceller, array $options, \Closure $onProgress, &$handle, ?LoggerInterface $logger, Promise &$pause) - { - yield $pause; - - $originRequest->setBody(new AmpBody($options['body'], $info, $onProgress)); - $response = yield $multi->request($options, $originRequest, $canceller->getToken(), $info, $onProgress, $handle); - $previousUrl = null; - - while (true) { - self::addResponseHeaders($response, $info, $headers); - $status = $response->getStatus(); - - if (!\in_array($status, [301, 302, 303, 307, 308], true) || null === $location = $response->getHeader('location')) { - return $response; - } - - $urlResolver = new class() { - use HttpClientTrait { - parseUrl as public; - resolveUrl as public; - } - }; - - try { - $previousUrl = $previousUrl ?? $urlResolver::parseUrl($info['url']); - $location = $urlResolver::parseUrl($location); - $location = $urlResolver::resolveUrl($location, $previousUrl); - $info['redirect_url'] = implode('', $location); - } catch (InvalidArgumentException $e) { - return $response; - } - - if (0 >= $options['max_redirects'] || $info['redirect_count'] >= $options['max_redirects']) { - return $response; - } - - $logger && $logger->info(sprintf('Redirecting: "%s %s"', $status, $info['url'])); - - try { - // Discard body of redirects - while (null !== yield $response->getBody()->read()) { - } - } catch (HttpException|StreamException $e) { - // Ignore streaming errors on previous responses - } - - ++$info['redirect_count']; - $info['url'] = $info['redirect_url']; - $info['redirect_url'] = null; - $previousUrl = $location; - - $request = new Request($info['url'], $info['http_method']); - $request->setProtocolVersions($originRequest->getProtocolVersions()); - $request->setTcpConnectTimeout($originRequest->getTcpConnectTimeout()); - $request->setTlsHandshakeTimeout($originRequest->getTlsHandshakeTimeout()); - $request->setTransferTimeout($originRequest->getTransferTimeout()); - - if (\in_array($status, [301, 302, 303], true)) { - $originRequest->removeHeader('transfer-encoding'); - $originRequest->removeHeader('content-length'); - $originRequest->removeHeader('content-type'); - - // Do like curl and browsers: turn POST to GET on 301, 302 and 303 - if ('POST' === $response->getRequest()->getMethod() || 303 === $status) { - $info['http_method'] = 'HEAD' === $response->getRequest()->getMethod() ? 'HEAD' : 'GET'; - $request->setMethod($info['http_method']); - } - } else { - $request->setBody(AmpBody::rewind($response->getRequest()->getBody())); - } - - foreach ($originRequest->getRawHeaders() as [$name, $value]) { - $request->setHeader($name, $value); - } - - if ($request->getUri()->getAuthority() !== $originRequest->getUri()->getAuthority()) { - $request->removeHeader('authorization'); - $request->removeHeader('cookie'); - $request->removeHeader('host'); - } - - yield $pause; - - $response = yield $multi->request($options, $request, $canceller->getToken(), $info, $onProgress, $handle); - $info['redirect_time'] = microtime(true) - $info['start_time']; - } - } - - private static function addResponseHeaders(Response $response, array &$info, array &$headers): void - { - $info['http_code'] = $response->getStatus(); - - if ($headers) { - $info['debug'] .= "< \r\n"; - $headers = []; - } - - $h = sprintf('HTTP/%s %s %s', $response->getProtocolVersion(), $response->getStatus(), $response->getReason()); - $info['debug'] .= "< {$h}\r\n"; - $info['response_headers'][] = $h; - - foreach ($response->getRawHeaders() as [$name, $value]) { - $headers[strtolower($name)][] = $value; - $h = $name.': '.$value; - $info['debug'] .= "< {$h}\r\n"; - $info['response_headers'][] = $h; - } - - $info['debug'] .= "< \r\n"; - } - - /** - * Accepts pushed responses only if their headers related to authentication match the request. - */ - private static function getPushedResponse(Request $request, AmpClientState $multi, array &$info, array &$headers, array $options, ?LoggerInterface $logger) - { - if ('' !== $options['body']) { - return null; - } - - $authority = $request->getUri()->getAuthority(); - - foreach ($multi->pushedResponses[$authority] ?? [] as $i => [$pushedUrl, $pushDeferred, $pushedRequest, $pushedResponse, $parentOptions]) { - if ($info['url'] !== $pushedUrl || $info['http_method'] !== $pushedRequest->getMethod()) { - continue; - } - - foreach ($parentOptions as $k => $v) { - if ($options[$k] !== $v) { - continue 2; - } - } - - foreach (['authorization', 'cookie', 'range', 'proxy-authorization'] as $k) { - if ($pushedRequest->getHeaderArray($k) !== $request->getHeaderArray($k)) { - continue 2; - } - } - - $response = yield $pushedResponse; - - foreach ($response->getHeaderArray('vary') as $vary) { - foreach (preg_split('/\s*+,\s*+/', $vary) as $v) { - if ('*' === $v || ($pushedRequest->getHeaderArray($v) !== $request->getHeaderArray($v) && 'accept-encoding' !== strtolower($v))) { - $logger && $logger->debug(sprintf('Skipping pushed response: "%s"', $info['url'])); - continue 3; - } - } - } - - $pushDeferred->resolve(); - $logger && $logger->debug(sprintf('Accepting pushed response: "%s %s"', $info['http_method'], $info['url'])); - self::addResponseHeaders($response, $info, $headers); - unset($multi->pushedResponses[$authority][$i]); - - if (!$multi->pushedResponses[$authority]) { - unset($multi->pushedResponses[$authority]); - } - - return $response; - } - } - - private static function stopLoop(): void - { - if (null !== self::$delay) { - Loop::cancel(self::$delay); - self::$delay = null; - } - - Loop::defer([Loop::class, 'stop']); - } -} diff --git a/vendor/symfony/http-client/Response/AsyncContext.php b/vendor/symfony/http-client/Response/AsyncContext.php deleted file mode 100644 index 1af8dbe..0000000 --- a/vendor/symfony/http-client/Response/AsyncContext.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\DataChunk; -use Symfony\Component\HttpClient\Chunk\LastChunk; -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * A DTO to work with AsyncResponse. - * - * @author Nicolas Grekas - */ -final class AsyncContext -{ - private $passthru; - private $client; - private $response; - private $info = []; - private $content; - private $offset; - - public function __construct(&$passthru, HttpClientInterface $client, ResponseInterface &$response, array &$info, $content, int $offset) - { - $this->passthru = &$passthru; - $this->client = $client; - $this->response = &$response; - $this->info = &$info; - $this->content = $content; - $this->offset = $offset; - } - - /** - * Returns the HTTP status without consuming the response. - */ - public function getStatusCode(): int - { - return $this->response->getInfo('http_code'); - } - - /** - * Returns the headers without consuming the response. - */ - public function getHeaders(): array - { - $headers = []; - - foreach ($this->response->getInfo('response_headers') as $h) { - if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? ([123456789]\d\d)(?: |$)#', $h, $m)) { - $headers = []; - } elseif (2 === \count($m = explode(':', $h, 2))) { - $headers[strtolower($m[0])][] = ltrim($m[1]); - } - } - - return $headers; - } - - /** - * @return resource|null The PHP stream resource where the content is buffered, if it is - */ - public function getContent() - { - return $this->content; - } - - /** - * Creates a new chunk of content. - */ - public function createChunk(string $data): ChunkInterface - { - return new DataChunk($this->offset, $data); - } - - /** - * Pauses the request for the given number of seconds. - */ - public function pause(float $duration): void - { - if (\is_callable($pause = $this->response->getInfo('pause_handler'))) { - $pause($duration); - } elseif (0 < $duration) { - usleep(1E6 * $duration); - } - } - - /** - * Cancels the request and returns the last chunk to yield. - */ - public function cancel(): ChunkInterface - { - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - $this->response->cancel(); - - return new LastChunk(); - } - - /** - * Returns the current info of the response. - */ - public function getInfo(string $type = null) - { - if (null !== $type) { - return $this->info[$type] ?? $this->response->getInfo($type); - } - - return $this->info + $this->response->getInfo(); - } - - /** - * Attaches an info to the response. - * - * @return $this - */ - public function setInfo(string $type, $value): self - { - if ('canceled' === $type && $value !== $this->info['canceled']) { - throw new \LogicException('You cannot set the "canceled" info directly.'); - } - - if (null === $value) { - unset($this->info[$type]); - } else { - $this->info[$type] = $value; - } - - return $this; - } - - /** - * Returns the currently processed response. - */ - public function getResponse(): ResponseInterface - { - return $this->response; - } - - /** - * Replaces the currently processed response by doing a new request. - */ - public function replaceRequest(string $method, string $url, array $options = []): ResponseInterface - { - $this->info['previous_info'][] = $this->response->getInfo(); - if (null !== $onProgress = $options['on_progress'] ?? null) { - $thisInfo = &$this->info; - $options['on_progress'] = static function (int $dlNow, int $dlSize, array $info) use (&$thisInfo, $onProgress) { - $onProgress($dlNow, $dlSize, $thisInfo + $info); - }; - } - - return $this->response = $this->client->request($method, $url, ['buffer' => false] + $options); - } - - /** - * Replaces the currently processed response by another one. - */ - public function replaceResponse(ResponseInterface $response): ResponseInterface - { - $this->info['previous_info'][] = $this->response->getInfo(); - - return $this->response = $response; - } - - /** - * Replaces or removes the chunk filter iterator. - */ - public function passthru(callable $passthru = null): void - { - $this->passthru = $passthru; - } -} diff --git a/vendor/symfony/http-client/Response/AsyncResponse.php b/vendor/symfony/http-client/Response/AsyncResponse.php deleted file mode 100644 index c164fad..0000000 --- a/vendor/symfony/http-client/Response/AsyncResponse.php +++ /dev/null @@ -1,475 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\LastChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * Provides a single extension point to process a response's content stream. - * - * @author Nicolas Grekas - */ -final class AsyncResponse implements ResponseInterface, StreamableInterface -{ - use CommonResponseTrait; - - private const FIRST_CHUNK_YIELDED = 1; - private const LAST_CHUNK_YIELDED = 2; - - private $client; - private $response; - private $info = ['canceled' => false]; - private $passthru; - private $stream; - private $yieldedState; - - /** - * @param ?callable(ChunkInterface, AsyncContext): ?\Iterator $passthru - */ - public function __construct(HttpClientInterface $client, string $method, string $url, array $options, callable $passthru = null) - { - $this->client = $client; - $this->shouldBuffer = $options['buffer'] ?? true; - - if (null !== $onProgress = $options['on_progress'] ?? null) { - $thisInfo = &$this->info; - $options['on_progress'] = static function (int $dlNow, int $dlSize, array $info) use (&$thisInfo, $onProgress) { - $onProgress($dlNow, $dlSize, $thisInfo + $info); - }; - } - $this->response = $client->request($method, $url, ['buffer' => false] + $options); - $this->passthru = $passthru; - $this->initializer = static function (self $response, float $timeout = null) { - if (null === $response->shouldBuffer) { - return false; - } - - while (true) { - foreach (self::stream([$response], $timeout) as $chunk) { - if ($chunk->isTimeout() && $response->passthru) { - foreach (self::passthru($response->client, $response, new ErrorChunk($response->offset, new TransportException($chunk->getError()))) as $chunk) { - if ($chunk->isFirst()) { - return false; - } - } - - continue 2; - } - - if ($chunk->isFirst()) { - return false; - } - } - - return false; - } - }; - if (\array_key_exists('user_data', $options)) { - $this->info['user_data'] = $options['user_data']; - } - } - - public function getStatusCode(): int - { - if ($this->initializer) { - self::initialize($this); - } - - return $this->response->getStatusCode(); - } - - public function getHeaders(bool $throw = true): array - { - if ($this->initializer) { - self::initialize($this); - } - - $headers = $this->response->getHeaders(false); - - if ($throw) { - $this->checkStatusCode(); - } - - return $headers; - } - - public function getInfo(string $type = null) - { - if (null !== $type) { - return $this->info[$type] ?? $this->response->getInfo($type); - } - - return $this->info + $this->response->getInfo(); - } - - /** - * {@inheritdoc} - */ - public function toStream(bool $throw = true) - { - if ($throw) { - // Ensure headers arrived - $this->getHeaders(true); - } - - $handle = function () { - $stream = $this->response instanceof StreamableInterface ? $this->response->toStream(false) : StreamWrapper::createResource($this->response); - - return stream_get_meta_data($stream)['wrapper_data']->stream_cast(\STREAM_CAST_FOR_SELECT); - }; - - $stream = StreamWrapper::createResource($this); - stream_get_meta_data($stream)['wrapper_data'] - ->bindHandles($handle, $this->content); - - return $stream; - } - - /** - * {@inheritdoc} - */ - public function cancel(): void - { - if ($this->info['canceled']) { - return; - } - - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - $this->close(); - $client = $this->client; - $this->client = null; - - if (!$this->passthru) { - return; - } - - try { - foreach (self::passthru($client, $this, new LastChunk()) as $chunk) { - // no-op - } - - $this->passthru = null; - } catch (ExceptionInterface $e) { - // ignore any errors when canceling - } - } - - public function __destruct() - { - $httpException = null; - - if ($this->initializer && null === $this->getInfo('error')) { - try { - self::initialize($this, -0.0); - $this->getHeaders(true); - } catch (HttpExceptionInterface $httpException) { - // no-op - } - } - - if ($this->passthru && null === $this->getInfo('error')) { - $this->info['canceled'] = true; - - try { - foreach (self::passthru($this->client, $this, new LastChunk()) as $chunk) { - // no-op - } - } catch (ExceptionInterface $e) { - // ignore any errors when destructing - } - } - - if (null !== $httpException) { - throw $httpException; - } - } - - /** - * @internal - */ - public static function stream(iterable $responses, float $timeout = null, string $class = null): \Generator - { - while ($responses) { - $wrappedResponses = []; - $asyncMap = new \SplObjectStorage(); - $client = null; - - foreach ($responses as $r) { - if (!$r instanceof self) { - throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of AsyncResponse objects, "%s" given.', $class ?? static::class, get_debug_type($r))); - } - - if (null !== $e = $r->info['error'] ?? null) { - yield $r => $chunk = new ErrorChunk($r->offset, new TransportException($e)); - $chunk->didThrow() ?: $chunk->getContent(); - continue; - } - - if (null === $client) { - $client = $r->client; - } elseif ($r->client !== $client) { - throw new TransportException('Cannot stream AsyncResponse objects with many clients.'); - } - - $asyncMap[$r->response] = $r; - $wrappedResponses[] = $r->response; - - if ($r->stream) { - yield from self::passthruStream($response = $r->response, $r, new FirstChunk(), $asyncMap); - - if (!isset($asyncMap[$response])) { - array_pop($wrappedResponses); - } - - if ($r->response !== $response && !isset($asyncMap[$r->response])) { - $asyncMap[$r->response] = $r; - $wrappedResponses[] = $r->response; - } - } - } - - if (!$client || !$wrappedResponses) { - return; - } - - foreach ($client->stream($wrappedResponses, $timeout) as $response => $chunk) { - $r = $asyncMap[$response]; - - if (null === $chunk->getError()) { - if ($chunk->isFirst()) { - // Ensure no exception is thrown on destruct for the wrapped response - $r->response->getStatusCode(); - } elseif (0 === $r->offset && null === $r->content && $chunk->isLast()) { - $r->content = fopen('php://memory', 'w+'); - } - } - - if (!$r->passthru) { - if (null !== $chunk->getError() || $chunk->isLast()) { - unset($asyncMap[$response]); - } elseif (null !== $r->content && '' !== ($content = $chunk->getContent()) && \strlen($content) !== fwrite($r->content, $content)) { - $chunk = new ErrorChunk($r->offset, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($content)))); - $r->info['error'] = $chunk->getError(); - $r->response->cancel(); - } - - yield $r => $chunk; - continue; - } - - if (null !== $chunk->getError()) { - // no-op - } elseif ($chunk->isFirst()) { - $r->yieldedState = self::FIRST_CHUNK_YIELDED; - } elseif (self::FIRST_CHUNK_YIELDED !== $r->yieldedState && null === $chunk->getInformationalStatus()) { - throw new \LogicException(sprintf('Instance of "%s" is already consumed and cannot be managed by "%s". A decorated client should not call any of the response\'s methods in its "request()" method.', get_debug_type($response), $class ?? static::class)); - } - - foreach (self::passthru($r->client, $r, $chunk, $asyncMap) as $chunk) { - yield $r => $chunk; - } - - if ($r->response !== $response && isset($asyncMap[$response])) { - break; - } - } - - if (null === $chunk->getError() && $chunk->isLast()) { - $r->yieldedState = self::LAST_CHUNK_YIELDED; - } - if (null === $chunk->getError() && self::LAST_CHUNK_YIELDED !== $r->yieldedState && $r->response === $response && null !== $r->client) { - throw new \LogicException('A chunk passthru must yield an "isLast()" chunk before ending a stream.'); - } - - $responses = []; - foreach ($asyncMap as $response) { - $r = $asyncMap[$response]; - - if (null !== $r->client) { - $responses[] = $asyncMap[$response]; - } - } - } - } - - /** - * @param \SplObjectStorage|null $asyncMap - */ - private static function passthru(HttpClientInterface $client, self $r, ChunkInterface $chunk, \SplObjectStorage $asyncMap = null): \Generator - { - $r->stream = null; - $response = $r->response; - $context = new AsyncContext($r->passthru, $client, $r->response, $r->info, $r->content, $r->offset); - if (null === $stream = ($r->passthru)($chunk, $context)) { - if ($r->response === $response && (null !== $chunk->getError() || $chunk->isLast())) { - throw new \LogicException('A chunk passthru cannot swallow the last chunk.'); - } - - return; - } - - if (!$stream instanceof \Iterator) { - throw new \LogicException(sprintf('A chunk passthru must return an "Iterator", "%s" returned.', get_debug_type($stream))); - } - $r->stream = $stream; - - yield from self::passthruStream($response, $r, null, $asyncMap); - } - - /** - * @param \SplObjectStorage|null $asyncMap - */ - private static function passthruStream(ResponseInterface $response, self $r, ?ChunkInterface $chunk, ?\SplObjectStorage $asyncMap): \Generator - { - while (true) { - try { - if (null !== $chunk && $r->stream) { - $r->stream->next(); - } - - if (!$r->stream || !$r->stream->valid() || !$r->stream) { - $r->stream = null; - break; - } - } catch (\Throwable $e) { - unset($asyncMap[$response]); - $r->stream = null; - $r->info['error'] = $e->getMessage(); - $r->response->cancel(); - - yield $r => $chunk = new ErrorChunk($r->offset, $e); - $chunk->didThrow() ?: $chunk->getContent(); - break; - } - - $chunk = $r->stream->current(); - - if (!$chunk instanceof ChunkInterface) { - throw new \LogicException(sprintf('A chunk passthru must yield instances of "%s", "%s" yielded.', ChunkInterface::class, get_debug_type($chunk))); - } - - if (null !== $chunk->getError()) { - // no-op - } elseif ($chunk->isFirst()) { - $e = $r->openBuffer(); - - yield $r => $chunk; - - if ($r->initializer && null === $r->getInfo('error')) { - // Ensure the HTTP status code is always checked - $r->getHeaders(true); - } - - if (null === $e) { - continue; - } - - $r->response->cancel(); - $chunk = new ErrorChunk($r->offset, $e); - } elseif ('' !== $content = $chunk->getContent()) { - if (null !== $r->shouldBuffer) { - throw new \LogicException('A chunk passthru must yield an "isFirst()" chunk before any content chunk.'); - } - - if (null !== $r->content && \strlen($content) !== fwrite($r->content, $content)) { - $chunk = new ErrorChunk($r->offset, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($content)))); - $r->info['error'] = $chunk->getError(); - $r->response->cancel(); - } - } - - if (null !== $chunk->getError() || $chunk->isLast()) { - $stream = $r->stream; - $r->stream = null; - unset($asyncMap[$response]); - } - - if (null === $chunk->getError()) { - $r->offset += \strlen($content); - - yield $r => $chunk; - - if (!$chunk->isLast()) { - continue; - } - - $stream->next(); - - if ($stream->valid()) { - throw new \LogicException('A chunk passthru cannot yield after an "isLast()" chunk.'); - } - - $r->passthru = null; - } else { - if ($chunk instanceof ErrorChunk) { - $chunk->didThrow(false); - } else { - try { - $chunk = new ErrorChunk($chunk->getOffset(), !$chunk->isTimeout() ?: $chunk->getError()); - } catch (TransportExceptionInterface $e) { - $chunk = new ErrorChunk($chunk->getOffset(), $e); - } - } - - yield $r => $chunk; - $chunk->didThrow() ?: $chunk->getContent(); - } - - break; - } - } - - private function openBuffer(): ?\Throwable - { - if (null === $shouldBuffer = $this->shouldBuffer) { - throw new \LogicException('A chunk passthru cannot yield more than one "isFirst()" chunk.'); - } - - $e = $this->shouldBuffer = null; - - if ($shouldBuffer instanceof \Closure) { - try { - $shouldBuffer = $shouldBuffer($this->getHeaders(false)); - - if (null !== $e = $this->response->getInfo('error')) { - throw new TransportException($e); - } - } catch (\Throwable $e) { - $this->info['error'] = $e->getMessage(); - $this->response->cancel(); - } - } - - if (true === $shouldBuffer) { - $this->content = fopen('php://temp', 'w+'); - } elseif (\is_resource($shouldBuffer)) { - $this->content = $shouldBuffer; - } - - return $e; - } - - private function close(): void - { - $this->response->cancel(); - } -} diff --git a/vendor/symfony/http-client/Response/CommonResponseTrait.php b/vendor/symfony/http-client/Response/CommonResponseTrait.php deleted file mode 100644 index 11a8d6c..0000000 --- a/vendor/symfony/http-client/Response/CommonResponseTrait.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Exception\ClientException; -use Symfony\Component\HttpClient\Exception\JsonException; -use Symfony\Component\HttpClient\Exception\RedirectionException; -use Symfony\Component\HttpClient\Exception\ServerException; -use Symfony\Component\HttpClient\Exception\TransportException; - -/** - * Implements common logic for response classes. - * - * @author Nicolas Grekas - * - * @internal - */ -trait CommonResponseTrait -{ - /** - * @var callable|null A callback that tells whether we're waiting for response headers - */ - private $initializer; - private $shouldBuffer; - private $content; - private $offset = 0; - private $jsonData; - - /** - * {@inheritdoc} - */ - public function getContent(bool $throw = true): string - { - if ($this->initializer) { - self::initialize($this); - } - - if ($throw) { - $this->checkStatusCode(); - } - - if (null === $this->content) { - $content = null; - - foreach (self::stream([$this]) as $chunk) { - if (!$chunk->isLast()) { - $content .= $chunk->getContent(); - } - } - - if (null !== $content) { - return $content; - } - - if (null === $this->content) { - throw new TransportException('Cannot get the content of the response twice: buffering is disabled.'); - } - } else { - foreach (self::stream([$this]) as $chunk) { - // Chunks are buffered in $this->content already - } - } - - rewind($this->content); - - return stream_get_contents($this->content); - } - - /** - * {@inheritdoc} - */ - public function toArray(bool $throw = true): array - { - if ('' === $content = $this->getContent($throw)) { - throw new JsonException('Response body is empty.'); - } - - if (null !== $this->jsonData) { - return $this->jsonData; - } - - try { - $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); - } catch (\JsonException $e) { - throw new JsonException($e->getMessage().sprintf(' for "%s".', $this->getInfo('url')), $e->getCode()); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error()) { - throw new JsonException(json_last_error_msg().sprintf(' for "%s".', $this->getInfo('url')), json_last_error()); - } - - if (!\is_array($content)) { - throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned for "%s".', get_debug_type($content), $this->getInfo('url'))); - } - - if (null !== $this->content) { - // Option "buffer" is true - return $this->jsonData = $content; - } - - return $content; - } - - /** - * {@inheritdoc} - */ - public function toStream(bool $throw = true) - { - if ($throw) { - // Ensure headers arrived - $this->getHeaders($throw); - } - - $stream = StreamWrapper::createResource($this); - stream_get_meta_data($stream)['wrapper_data'] - ->bindHandles($this->handle, $this->content); - - return $stream; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Closes the response and all its network handles. - */ - abstract protected function close(): void; - - private static function initialize(self $response): void - { - if (null !== $response->getInfo('error')) { - throw new TransportException($response->getInfo('error')); - } - - try { - if (($response->initializer)($response, -0.0)) { - foreach (self::stream([$response], -0.0) as $chunk) { - if ($chunk->isFirst()) { - break; - } - } - } - } catch (\Throwable $e) { - // Persist timeouts thrown during initialization - $response->info['error'] = $e->getMessage(); - $response->close(); - throw $e; - } - - $response->initializer = null; - } - - private function checkStatusCode() - { - $code = $this->getInfo('http_code'); - - if (500 <= $code) { - throw new ServerException($this); - } - - if (400 <= $code) { - throw new ClientException($this); - } - - if (300 <= $code) { - throw new RedirectionException($this); - } - } -} diff --git a/vendor/symfony/http-client/Response/CurlResponse.php b/vendor/symfony/http-client/Response/CurlResponse.php deleted file mode 100644 index 5739392..0000000 --- a/vendor/symfony/http-client/Response/CurlResponse.php +++ /dev/null @@ -1,473 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\InformationalChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\Canary; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Component\HttpClient\Internal\CurlClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class CurlResponse implements ResponseInterface, StreamableInterface -{ - use CommonResponseTrait { - getContent as private doGetContent; - } - use TransportResponseTrait; - - private static $performing = false; - private $multi; - private $debugBuffer; - - /** - * @param \CurlHandle|resource|string $ch - * - * @internal - */ - public function __construct(CurlClientState $multi, $ch, array $options = null, LoggerInterface $logger = null, string $method = 'GET', callable $resolveRedirect = null, int $curlVersion = null) - { - $this->multi = $multi; - - if (\is_resource($ch) || $ch instanceof \CurlHandle) { - $this->handle = $ch; - $this->debugBuffer = fopen('php://temp', 'w+'); - if (0x074000 === $curlVersion) { - fwrite($this->debugBuffer, 'Due to a bug in curl 7.64.0, the debug log is disabled; use another version to work around the issue.'); - } else { - curl_setopt($ch, \CURLOPT_VERBOSE, true); - curl_setopt($ch, \CURLOPT_STDERR, $this->debugBuffer); - } - } else { - $this->info['url'] = $ch; - $ch = $this->handle; - } - - $this->id = $id = (int) $ch; - $this->logger = $logger; - $this->shouldBuffer = $options['buffer'] ?? true; - $this->timeout = $options['timeout'] ?? null; - $this->info['http_method'] = $method; - $this->info['user_data'] = $options['user_data'] ?? null; - $this->info['start_time'] = $this->info['start_time'] ?? microtime(true); - $info = &$this->info; - $headers = &$this->headers; - $debugBuffer = $this->debugBuffer; - - if (!$info['response_headers']) { - // Used to keep track of what we're waiting for - curl_setopt($ch, \CURLOPT_PRIVATE, \in_array($method, ['GET', 'HEAD', 'OPTIONS', 'TRACE'], true) && 1.0 < (float) ($options['http_version'] ?? 1.1) ? 'H2' : 'H0'); // H = headers + retry counter - } - - curl_setopt($ch, \CURLOPT_HEADERFUNCTION, static function ($ch, string $data) use (&$info, &$headers, $options, $multi, $id, &$location, $resolveRedirect, $logger): int { - if (0 !== substr_compare($data, "\r\n", -2)) { - return 0; - } - - $len = 0; - - foreach (explode("\r\n", substr($data, 0, -2)) as $data) { - $len += 2 + self::parseHeaderLine($ch, $data, $info, $headers, $options, $multi, $id, $location, $resolveRedirect, $logger); - } - - return $len; - }); - - if (null === $options) { - // Pushed response: buffer until requested - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - $multi->handlesActivity[$id][] = $data; - curl_pause($ch, \CURLPAUSE_RECV); - - return \strlen($data); - }); - - return; - } - - $execCounter = $multi->execCounter; - $this->info['pause_handler'] = static function (float $duration) use ($ch, $multi, $execCounter) { - if (0 < $duration) { - if ($execCounter === $multi->execCounter) { - $multi->execCounter = !\is_float($execCounter) ? 1 + $execCounter : \PHP_INT_MIN; - curl_multi_remove_handle($multi->handle, $ch); - } - - $lastExpiry = end($multi->pauseExpiries); - $multi->pauseExpiries[(int) $ch] = $duration += microtime(true); - if (false !== $lastExpiry && $lastExpiry > $duration) { - asort($multi->pauseExpiries); - } - curl_pause($ch, \CURLPAUSE_ALL); - } else { - unset($multi->pauseExpiries[(int) $ch]); - curl_pause($ch, \CURLPAUSE_CONT); - curl_multi_add_handle($multi->handle, $ch); - } - }; - - $this->inflate = !isset($options['normalized_headers']['accept-encoding']); - curl_pause($ch, \CURLPAUSE_CONT); - - if ($onProgress = $options['on_progress']) { - $url = isset($info['url']) ? ['url' => $info['url']] : []; - curl_setopt($ch, \CURLOPT_NOPROGRESS, false); - curl_setopt($ch, \CURLOPT_PROGRESSFUNCTION, static function ($ch, $dlSize, $dlNow) use ($onProgress, &$info, $url, $multi, $debugBuffer) { - try { - rewind($debugBuffer); - $debug = ['debug' => stream_get_contents($debugBuffer)]; - $onProgress($dlNow, $dlSize, $url + curl_getinfo($ch) + $info + $debug); - } catch (\Throwable $e) { - $multi->handlesActivity[(int) $ch][] = null; - $multi->handlesActivity[(int) $ch][] = $e; - - return 1; // Abort the request - } - - return null; - }); - } - - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - if ('H' === (curl_getinfo($ch, \CURLINFO_PRIVATE)[0] ?? null)) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = new TransportException(sprintf('Unsupported protocol for "%s"', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL))); - - return 0; - } - - curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int { - $multi->handlesActivity[$id][] = $data; - - return \strlen($data); - }); - - $multi->handlesActivity[$id][] = $data; - - return \strlen($data); - }); - - $this->initializer = static function (self $response) { - $waitFor = curl_getinfo($ch = $response->handle, \CURLINFO_PRIVATE); - - return 'H' === $waitFor[0]; - }; - - // Schedule the request in a non-blocking way - $multi->lastTimeout = null; - $multi->openHandles[$id] = [$ch, $options]; - curl_multi_add_handle($multi->handle, $ch); - - $this->canary = new Canary(static function () use ($ch, $multi, $id) { - unset($multi->pauseExpiries[$id], $multi->openHandles[$id], $multi->handlesActivity[$id]); - curl_setopt($ch, \CURLOPT_PRIVATE, '_0'); - - if (self::$performing) { - return; - } - - curl_multi_remove_handle($multi->handle, $ch); - curl_setopt_array($ch, [ - \CURLOPT_NOPROGRESS => true, - \CURLOPT_PROGRESSFUNCTION => null, - \CURLOPT_HEADERFUNCTION => null, - \CURLOPT_WRITEFUNCTION => null, - \CURLOPT_READFUNCTION => null, - \CURLOPT_INFILE => null, - ]); - - if (!$multi->openHandles) { - // Schedule DNS cache eviction for the next request - $multi->dnsCache->evictions = $multi->dnsCache->evictions ?: $multi->dnsCache->removals; - $multi->dnsCache->removals = $multi->dnsCache->hostnames = []; - } - }); - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - if (!$info = $this->finalInfo) { - $info = array_merge($this->info, curl_getinfo($this->handle)); - $info['url'] = $this->info['url'] ?? $info['url']; - $info['redirect_url'] = $this->info['redirect_url'] ?? null; - - // workaround curl not subtracting the time offset for pushed responses - if (isset($this->info['url']) && $info['start_time'] / 1000 < $info['total_time']) { - $info['total_time'] -= $info['starttransfer_time'] ?: $info['total_time']; - $info['starttransfer_time'] = 0.0; - } - - rewind($this->debugBuffer); - $info['debug'] = stream_get_contents($this->debugBuffer); - $waitFor = curl_getinfo($this->handle, \CURLINFO_PRIVATE); - - if ('H' !== $waitFor[0] && 'C' !== $waitFor[0]) { - curl_setopt($this->handle, \CURLOPT_VERBOSE, false); - rewind($this->debugBuffer); - ftruncate($this->debugBuffer, 0); - $this->finalInfo = $info; - } - } - - return null !== $type ? $info[$type] ?? null : $info; - } - - /** - * {@inheritdoc} - */ - public function getContent(bool $throw = true): string - { - $performing = self::$performing; - self::$performing = $performing || '_0' === curl_getinfo($this->handle, \CURLINFO_PRIVATE); - - try { - return $this->doGetContent($throw); - } finally { - self::$performing = $performing; - } - } - - public function __destruct() - { - try { - if (null === $this->timeout) { - return; // Unused pushed response - } - - $this->doDestruct(); - } finally { - if (\is_resource($this->handle) || $this->handle instanceof \CurlHandle) { - curl_setopt($this->handle, \CURLOPT_VERBOSE, false); - } - } - } - - /** - * {@inheritdoc} - */ - private static function schedule(self $response, array &$runningResponses): void - { - if (isset($runningResponses[$i = (int) $response->multi->handle])) { - $runningResponses[$i][1][$response->id] = $response; - } else { - $runningResponses[$i] = [$response->multi, [$response->id => $response]]; - } - - if ('_0' === curl_getinfo($ch = $response->handle, \CURLINFO_PRIVATE)) { - // Response already completed - $response->multi->handlesActivity[$response->id][] = null; - $response->multi->handlesActivity[$response->id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } - } - - /** - * {@inheritdoc} - * - * @param CurlClientState $multi - */ - private static function perform(ClientState $multi, array &$responses = null): void - { - if (self::$performing) { - if ($responses) { - $response = current($responses); - $multi->handlesActivity[(int) $response->handle][] = null; - $multi->handlesActivity[(int) $response->handle][] = new TransportException(sprintf('Userland callback cannot use the client nor the response while processing "%s".', curl_getinfo($response->handle, \CURLINFO_EFFECTIVE_URL))); - } - - return; - } - - try { - self::$performing = true; - ++$multi->execCounter; - $active = 0; - while (\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($multi->handle, $active))) { - } - - if (\CURLM_OK !== $err) { - throw new TransportException(curl_multi_strerror($err)); - } - - while ($info = curl_multi_info_read($multi->handle)) { - if (\CURLMSG_DONE !== $info['msg']) { - continue; - } - $result = $info['result']; - $id = (int) $ch = $info['handle']; - $waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0'; - - if (\in_array($result, [\CURLE_SEND_ERROR, \CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) { - curl_multi_remove_handle($multi->handle, $ch); - $waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter - curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor); - curl_setopt($ch, \CURLOPT_FORBID_REUSE, true); - - if (0 === curl_multi_add_handle($multi->handle, $ch)) { - continue; - } - } - - if (\CURLE_RECV_ERROR === $result && 'H' === $waitFor[0] && 400 <= ($responses[(int) $ch]->info['http_code'] ?? 0)) { - $multi->handlesActivity[$id][] = new FirstChunk(); - } - - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL))); - } - } finally { - self::$performing = false; - } - } - - /** - * {@inheritdoc} - * - * @param CurlClientState $multi - */ - private static function select(ClientState $multi, float $timeout): int - { - if (\PHP_VERSION_ID < 70211) { - // workaround https://bugs.php.net/76480 - $timeout = min($timeout, 0.01); - } - - if ($multi->pauseExpiries) { - $now = microtime(true); - - foreach ($multi->pauseExpiries as $id => $pauseExpiry) { - if ($now < $pauseExpiry) { - $timeout = min($timeout, $pauseExpiry - $now); - break; - } - - unset($multi->pauseExpiries[$id]); - curl_pause($multi->openHandles[$id][0], \CURLPAUSE_CONT); - curl_multi_add_handle($multi->handle, $multi->openHandles[$id][0]); - } - } - - if (0 !== $selected = curl_multi_select($multi->handle, $timeout)) { - return $selected; - } - - if ($multi->pauseExpiries && 0 < $timeout -= microtime(true) - $now) { - usleep((int) (1E6 * $timeout)); - } - - return 0; - } - - /** - * Parses header lines as curl yields them to us. - */ - private static function parseHeaderLine($ch, string $data, array &$info, array &$headers, ?array $options, CurlClientState $multi, int $id, ?string &$location, ?callable $resolveRedirect, ?LoggerInterface $logger): int - { - $waitFor = @curl_getinfo($ch, \CURLINFO_PRIVATE) ?: '_0'; - - if ('H' !== $waitFor[0]) { - return \strlen($data); // Ignore HTTP trailers - } - - if ('' !== $data) { - // Regular header line: add it to the list - self::addResponseHeaders([$data], $info, $headers); - - if (!str_starts_with($data, 'HTTP/')) { - if (0 === stripos($data, 'Location:')) { - $location = trim(substr($data, 9)); - } - - return \strlen($data); - } - - if (\function_exists('openssl_x509_read') && $certinfo = curl_getinfo($ch, \CURLINFO_CERTINFO)) { - $info['peer_certificate_chain'] = array_map('openssl_x509_read', array_column($certinfo, 'Cert')); - } - - if (300 <= $info['http_code'] && $info['http_code'] < 400) { - if (curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) { - curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, false); - } elseif (303 === $info['http_code'] || ('POST' === $info['http_method'] && \in_array($info['http_code'], [301, 302], true))) { - curl_setopt($ch, \CURLOPT_POSTFIELDS, ''); - } - } - - return \strlen($data); - } - - // End of headers: handle informational responses, redirects, etc. - - if (200 > $statusCode = curl_getinfo($ch, \CURLINFO_RESPONSE_CODE)) { - $multi->handlesActivity[$id][] = new InformationalChunk($statusCode, $headers); - $location = null; - - return \strlen($data); - } - - $info['redirect_url'] = null; - - if (300 <= $statusCode && $statusCode < 400 && null !== $location) { - if ($noContent = 303 === $statusCode || ('POST' === $info['http_method'] && \in_array($statusCode, [301, 302], true))) { - $info['http_method'] = 'HEAD' === $info['http_method'] ? 'HEAD' : 'GET'; - curl_setopt($ch, \CURLOPT_CUSTOMREQUEST, $info['http_method']); - } - - if (null === $info['redirect_url'] = $resolveRedirect($ch, $location, $noContent)) { - $options['max_redirects'] = curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT); - curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, \CURLOPT_MAXREDIRS, $options['max_redirects']); - } else { - $url = parse_url($location ?? ':'); - - if (isset($url['host']) && null !== $ip = $multi->dnsCache->hostnames[$url['host'] = strtolower($url['host'])] ?? null) { - // Populate DNS cache for redirects if needed - $port = $url['port'] ?? ('http' === ($url['scheme'] ?? parse_url(curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL), \PHP_URL_SCHEME)) ? 80 : 443); - curl_setopt($ch, \CURLOPT_RESOLVE, ["{$url['host']}:$port:$ip"]); - $multi->dnsCache->removals["-{$url['host']}:$port"] = "-{$url['host']}:$port"; - } - } - } - - if (401 === $statusCode && isset($options['auth_ntlm']) && 0 === strncasecmp($headers['www-authenticate'][0] ?? '', 'NTLM ', 5)) { - // Continue with NTLM auth - } elseif ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, \CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) { - // Headers and redirects completed, time to get the response's content - $multi->handlesActivity[$id][] = new FirstChunk(); - - if ('HEAD' === $info['http_method'] || \in_array($statusCode, [204, 304], true)) { - $waitFor = '_0'; // no content expected - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null; - } else { - $waitFor[0] = 'C'; // C = content - } - - curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor); - } elseif (null !== $info['redirect_url'] && $logger) { - $logger->info(sprintf('Redirecting: "%s %s"', $info['http_code'], $info['redirect_url'])); - } - - $location = null; - - return \strlen($data); - } -} diff --git a/vendor/symfony/http-client/Response/HttplugPromise.php b/vendor/symfony/http-client/Response/HttplugPromise.php deleted file mode 100644 index 2efacca..0000000 --- a/vendor/symfony/http-client/Response/HttplugPromise.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use GuzzleHttp\Promise\Create; -use GuzzleHttp\Promise\PromiseInterface as GuzzlePromiseInterface; -use Http\Promise\Promise as HttplugPromiseInterface; -use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface; - -/** - * @author Tobias Nyholm - * - * @internal - */ -final class HttplugPromise implements HttplugPromiseInterface -{ - private $promise; - - public function __construct(GuzzlePromiseInterface $promise) - { - $this->promise = $promise; - } - - public function then(callable $onFulfilled = null, callable $onRejected = null): self - { - return new self($this->promise->then( - $this->wrapThenCallback($onFulfilled), - $this->wrapThenCallback($onRejected) - )); - } - - public function cancel(): void - { - $this->promise->cancel(); - } - - /** - * {@inheritdoc} - */ - public function getState(): string - { - return $this->promise->getState(); - } - - /** - * {@inheritdoc} - * - * @return Psr7ResponseInterface|mixed - */ - public function wait($unwrap = true) - { - $result = $this->promise->wait($unwrap); - - while ($result instanceof HttplugPromiseInterface || $result instanceof GuzzlePromiseInterface) { - $result = $result->wait($unwrap); - } - - return $result; - } - - private function wrapThenCallback(?callable $callback): ?callable - { - if (null === $callback) { - return null; - } - - return static function ($value) use ($callback) { - return Create::promiseFor($callback($value)); - }; - } -} diff --git a/vendor/symfony/http-client/Response/MockResponse.php b/vendor/symfony/http-client/Response/MockResponse.php deleted file mode 100644 index 7177795..0000000 --- a/vendor/symfony/http-client/Response/MockResponse.php +++ /dev/null @@ -1,337 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * A test-friendly response. - * - * @author Nicolas Grekas - */ -class MockResponse implements ResponseInterface, StreamableInterface -{ - use CommonResponseTrait; - use TransportResponseTrait { - doDestruct as public __destruct; - } - - private $body; - private $requestOptions = []; - private $requestUrl; - private $requestMethod; - - private static $mainMulti; - private static $idSequence = 0; - - /** - * @param string|string[]|iterable $body The response body as a string or an iterable of strings, - * yielding an empty string simulates an idle timeout, - * throwing an exception yields an ErrorChunk - * - * @see ResponseInterface::getInfo() for possible info, e.g. "response_headers" - */ - public function __construct($body = '', array $info = []) - { - $this->body = is_iterable($body) ? $body : (string) $body; - $this->info = $info + ['http_code' => 200] + $this->info; - - if (!isset($info['response_headers'])) { - return; - } - - $responseHeaders = []; - - foreach ($info['response_headers'] as $k => $v) { - foreach ((array) $v as $v) { - $responseHeaders[] = (\is_string($k) ? $k.': ' : '').$v; - } - } - - $this->info['response_headers'] = []; - self::addResponseHeaders($responseHeaders, $this->info, $this->headers); - } - - /** - * Returns the options used when doing the request. - */ - public function getRequestOptions(): array - { - return $this->requestOptions; - } - - /** - * Returns the URL used when doing the request. - */ - public function getRequestUrl(): string - { - return $this->requestUrl; - } - - /** - * Returns the method used when doing the request. - */ - public function getRequestMethod(): string - { - return $this->requestMethod; - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - return null !== $type ? $this->info[$type] ?? null : $this->info; - } - - /** - * {@inheritdoc} - */ - public function cancel(): void - { - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - try { - $this->body = null; - } catch (TransportException $e) { - // ignore errors when canceling - } - } - - /** - * {@inheritdoc} - */ - protected function close(): void - { - $this->inflate = null; - $this->body = []; - } - - /** - * @internal - */ - public static function fromRequest(string $method, string $url, array $options, ResponseInterface $mock): self - { - $response = new self([]); - $response->requestOptions = $options; - $response->id = ++self::$idSequence; - $response->shouldBuffer = $options['buffer'] ?? true; - $response->initializer = static function (self $response) { - return \is_array($response->body[0] ?? null); - }; - - $response->info['redirect_count'] = 0; - $response->info['redirect_url'] = null; - $response->info['start_time'] = microtime(true); - $response->info['http_method'] = $method; - $response->info['http_code'] = 0; - $response->info['user_data'] = $options['user_data'] ?? null; - $response->info['url'] = $url; - - if ($mock instanceof self) { - $mock->requestOptions = $response->requestOptions; - $mock->requestMethod = $method; - $mock->requestUrl = $url; - } - - self::writeRequest($response, $options, $mock); - $response->body[] = [$options, $mock]; - - return $response; - } - - /** - * {@inheritdoc} - */ - protected static function schedule(self $response, array &$runningResponses): void - { - if (!$response->id) { - throw new InvalidArgumentException('MockResponse instances must be issued by MockHttpClient before processing.'); - } - - $multi = self::$mainMulti ?? self::$mainMulti = new ClientState(); - - if (!isset($runningResponses[0])) { - $runningResponses[0] = [$multi, []]; - } - - $runningResponses[0][1][$response->id] = $response; - } - - /** - * {@inheritdoc} - */ - protected static function perform(ClientState $multi, array &$responses): void - { - foreach ($responses as $response) { - $id = $response->id; - - if (null === $response->body) { - // Canceled response - $response->body = []; - } elseif ([] === $response->body) { - // Error chunk - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } elseif (null === $chunk = array_shift($response->body)) { - // Last chunk - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = array_shift($response->body); - } elseif (\is_array($chunk)) { - // First chunk - try { - $offset = 0; - $chunk[1]->getStatusCode(); - $chunk[1]->getHeaders(false); - self::readResponse($response, $chunk[0], $chunk[1], $offset); - $multi->handlesActivity[$id][] = new FirstChunk(); - $buffer = $response->requestOptions['buffer'] ?? null; - - if ($buffer instanceof \Closure && $response->content = $buffer($response->headers) ?: null) { - $response->content = \is_resource($response->content) ? $response->content : fopen('php://temp', 'w+'); - } - } catch (\Throwable $e) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = $e; - } - } elseif ($chunk instanceof \Throwable) { - $multi->handlesActivity[$id][] = null; - $multi->handlesActivity[$id][] = $chunk; - } else { - // Data or timeout chunk - $multi->handlesActivity[$id][] = $chunk; - } - } - } - - /** - * {@inheritdoc} - */ - protected static function select(ClientState $multi, float $timeout): int - { - return 42; - } - - /** - * Simulates sending the request. - */ - private static function writeRequest(self $response, array $options, ResponseInterface $mock) - { - $onProgress = $options['on_progress'] ?? static function () {}; - $response->info += $mock->getInfo() ?: []; - - // simulate "size_upload" if it is set - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] = 0.0; - } - - // simulate "total_time" if it is not set - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" DNS resolution - $onProgress(0, 0, $response->info); - - // consume the request body - if (\is_resource($body = $options['body'] ?? '')) { - $data = stream_get_contents($body); - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] += \strlen($data); - } - } elseif ($body instanceof \Closure) { - while ('' !== $data = $body(16372)) { - if (!\is_string($data)) { - throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data))); - } - - // "notify" upload progress - if (isset($response->info['size_upload'])) { - $response->info['size_upload'] += \strlen($data); - } - - $onProgress(0, 0, $response->info); - } - } - } - - /** - * Simulates reading the response. - */ - private static function readResponse(self $response, array $options, ResponseInterface $mock, int &$offset) - { - $onProgress = $options['on_progress'] ?? static function () {}; - - // populate info related to headers - $info = $mock->getInfo() ?: []; - $response->info['http_code'] = ($info['http_code'] ?? 0) ?: $mock->getStatusCode() ?: 200; - $response->addResponseHeaders($info['response_headers'] ?? [], $response->info, $response->headers); - $dlSize = isset($response->headers['content-encoding']) || 'HEAD' === $response->info['http_method'] || \in_array($response->info['http_code'], [204, 304], true) ? 0 : (int) ($response->headers['content-length'][0] ?? 0); - - $response->info = [ - 'start_time' => $response->info['start_time'], - 'user_data' => $response->info['user_data'], - 'http_code' => $response->info['http_code'], - ] + $info + $response->info; - - if (null !== $response->info['error']) { - throw new TransportException($response->info['error']); - } - - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" headers arrival - $onProgress(0, $dlSize, $response->info); - - // cast response body to activity list - $body = $mock instanceof self ? $mock->body : $mock->getContent(false); - - if (!\is_string($body)) { - try { - foreach ($body as $chunk) { - if ('' === $chunk = (string) $chunk) { - // simulate an idle timeout - $response->body[] = new ErrorChunk($offset, sprintf('Idle timeout reached for "%s".', $response->info['url'])); - } else { - $response->body[] = $chunk; - $offset += \strlen($chunk); - // "notify" download progress - $onProgress($offset, $dlSize, $response->info); - } - } - } catch (\Throwable $e) { - $response->body[] = $e; - } - } elseif ('' !== $body) { - $response->body[] = $body; - $offset = \strlen($body); - } - - if (!isset($response->info['total_time'])) { - $response->info['total_time'] = microtime(true) - $response->info['start_time']; - } - - // "notify" completion - $onProgress($offset, $dlSize, $response->info); - - if ($dlSize && $offset !== $dlSize) { - throw new TransportException(sprintf('Transfer closed with %d bytes remaining to read.', $dlSize - $offset)); - } - } -} diff --git a/vendor/symfony/http-client/Response/NativeResponse.php b/vendor/symfony/http-client/Response/NativeResponse.php deleted file mode 100644 index c06237b..0000000 --- a/vendor/symfony/http-client/Response/NativeResponse.php +++ /dev/null @@ -1,375 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\Canary; -use Symfony\Component\HttpClient\Internal\ClientState; -use Symfony\Component\HttpClient\Internal\NativeClientState; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class NativeResponse implements ResponseInterface, StreamableInterface -{ - use CommonResponseTrait; - use TransportResponseTrait; - - private $context; - private $url; - private $resolver; - private $onProgress; - private $remaining; - private $buffer; - private $multi; - private $pauseExpiry = 0; - - /** - * @internal - */ - public function __construct(NativeClientState $multi, $context, string $url, array $options, array &$info, callable $resolver, ?callable $onProgress, ?LoggerInterface $logger) - { - $this->multi = $multi; - $this->id = $id = (int) $context; - $this->context = $context; - $this->url = $url; - $this->logger = $logger; - $this->timeout = $options['timeout']; - $this->info = &$info; - $this->resolver = $resolver; - $this->onProgress = $onProgress; - $this->inflate = !isset($options['normalized_headers']['accept-encoding']); - $this->shouldBuffer = $options['buffer'] ?? true; - - // Temporary resource to dechunk the response stream - $this->buffer = fopen('php://temp', 'w+'); - - $info['user_data'] = $options['user_data']; - ++$multi->responseCount; - - $this->initializer = static function (self $response) { - return null === $response->remaining; - }; - - $pauseExpiry = &$this->pauseExpiry; - $info['pause_handler'] = static function (float $duration) use (&$pauseExpiry) { - $pauseExpiry = 0 < $duration ? microtime(true) + $duration : 0; - }; - - $this->canary = new Canary(static function () use ($multi, $id) { - if (null !== ($host = $multi->openHandles[$id][6] ?? null) && 0 >= --$multi->hosts[$host]) { - unset($multi->hosts[$host]); - } - unset($multi->openHandles[$id], $multi->handlesActivity[$id]); - }); - } - - /** - * {@inheritdoc} - */ - public function getInfo(string $type = null) - { - if (!$info = $this->finalInfo) { - $info = $this->info; - $info['url'] = implode('', $info['url']); - unset($info['size_body'], $info['request_header']); - - if (null === $this->buffer) { - $this->finalInfo = $info; - } - } - - return null !== $type ? $info[$type] ?? null : $info; - } - - public function __destruct() - { - try { - $this->doDestruct(); - } finally { - // Clear the DNS cache when all requests completed - if (0 >= --$this->multi->responseCount) { - $this->multi->responseCount = 0; - $this->multi->dnsCache = []; - } - } - } - - private function open(): void - { - $url = $this->url; - - set_error_handler(function ($type, $msg) use (&$url) { - if (\E_NOTICE !== $type || 'fopen(): Content-type not specified assuming application/x-www-form-urlencoded' !== $msg) { - throw new TransportException($msg); - } - - $this->logger && $this->logger->info(sprintf('%s for "%s".', $msg, $url ?? $this->url)); - }); - - try { - $this->info['start_time'] = microtime(true); - - [$resolver, $url] = ($this->resolver)($this->multi); - - while (true) { - $context = stream_context_get_options($this->context); - - if ($proxy = $context['http']['proxy'] ?? null) { - $this->info['debug'] .= "* Establish HTTP proxy tunnel to {$proxy}\n"; - $this->info['request_header'] = $url; - } else { - $this->info['debug'] .= "* Trying {$this->info['primary_ip']}...\n"; - $this->info['request_header'] = $this->info['url']['path'].$this->info['url']['query']; - } - - $this->info['request_header'] = sprintf("> %s %s HTTP/%s \r\n", $context['http']['method'], $this->info['request_header'], $context['http']['protocol_version']); - $this->info['request_header'] .= implode("\r\n", $context['http']['header'])."\r\n\r\n"; - - if (\array_key_exists('peer_name', $context['ssl']) && null === $context['ssl']['peer_name']) { - unset($context['ssl']['peer_name']); - $this->context = stream_context_create([], ['options' => $context] + stream_context_get_params($this->context)); - } - - // Send request and follow redirects when needed - $this->handle = $h = fopen($url, 'r', false, $this->context); - self::addResponseHeaders(stream_get_meta_data($h)['wrapper_data'], $this->info, $this->headers, $this->info['debug']); - $url = $resolver($this->multi, $this->headers['location'][0] ?? null, $this->context); - - if (null === $url) { - break; - } - - $this->logger && $this->logger->info(sprintf('Redirecting: "%s %s"', $this->info['http_code'], $url ?? $this->url)); - } - } catch (\Throwable $e) { - $this->close(); - $this->multi->handlesActivity[$this->id][] = null; - $this->multi->handlesActivity[$this->id][] = $e; - - return; - } finally { - $this->info['pretransfer_time'] = $this->info['total_time'] = microtime(true) - $this->info['start_time']; - restore_error_handler(); - } - - if (isset($context['ssl']['capture_peer_cert_chain']) && isset(($context = stream_context_get_options($this->context))['ssl']['peer_certificate_chain'])) { - $this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain']; - } - - stream_set_blocking($h, false); - $this->context = $this->resolver = null; - - // Create dechunk buffers - if (isset($this->headers['content-length'])) { - $this->remaining = (int) $this->headers['content-length'][0]; - } elseif ('chunked' === ($this->headers['transfer-encoding'][0] ?? null)) { - stream_filter_append($this->buffer, 'dechunk', \STREAM_FILTER_WRITE); - $this->remaining = -1; - } else { - $this->remaining = -2; - } - - $this->multi->handlesActivity[$this->id] = [new FirstChunk()]; - - if ('HEAD' === $context['http']['method'] || \in_array($this->info['http_code'], [204, 304], true)) { - $this->multi->handlesActivity[$this->id][] = null; - $this->multi->handlesActivity[$this->id][] = null; - - return; - } - - $host = parse_url($this->info['redirect_url'] ?? $this->url, \PHP_URL_HOST); - $this->multi->lastTimeout = null; - $this->multi->openHandles[$this->id] = [&$this->pauseExpiry, $h, $this->buffer, $this->onProgress, &$this->remaining, &$this->info, $host]; - $this->multi->hosts[$host] = 1 + ($this->multi->hosts[$host] ?? 0); - } - - /** - * {@inheritdoc} - */ - private function close(): void - { - $this->canary->cancel(); - $this->handle = $this->buffer = $this->inflate = $this->onProgress = null; - } - - /** - * {@inheritdoc} - */ - private static function schedule(self $response, array &$runningResponses): void - { - if (!isset($runningResponses[$i = $response->multi->id])) { - $runningResponses[$i] = [$response->multi, []]; - } - - $runningResponses[$i][1][$response->id] = $response; - - if (null === $response->buffer) { - // Response already completed - $response->multi->handlesActivity[$response->id][] = null; - $response->multi->handlesActivity[$response->id][] = null !== $response->info['error'] ? new TransportException($response->info['error']) : null; - } - } - - /** - * {@inheritdoc} - * - * @param NativeClientState $multi - */ - private static function perform(ClientState $multi, array &$responses = null): void - { - foreach ($multi->openHandles as $i => [$pauseExpiry, $h, $buffer, $onProgress]) { - if ($pauseExpiry) { - if (microtime(true) < $pauseExpiry) { - continue; - } - - $multi->openHandles[$i][0] = 0; - } - - $hasActivity = false; - $remaining = &$multi->openHandles[$i][4]; - $info = &$multi->openHandles[$i][5]; - $e = null; - - // Read incoming buffer and write it to the dechunk one - try { - if ($remaining && '' !== $data = (string) fread($h, 0 > $remaining ? 16372 : $remaining)) { - fwrite($buffer, $data); - $hasActivity = true; - $multi->sleep = false; - - if (-1 !== $remaining) { - $remaining -= \strlen($data); - } - } - } catch (\Throwable $e) { - $hasActivity = $onProgress = false; - } - - if (!$hasActivity) { - if ($onProgress) { - try { - // Notify the progress callback so that it can e.g. cancel - // the request if the stream is inactive for too long - $info['total_time'] = microtime(true) - $info['start_time']; - $onProgress(); - } catch (\Throwable $e) { - // no-op - } - } - } elseif ('' !== $data = stream_get_contents($buffer, -1, 0)) { - rewind($buffer); - ftruncate($buffer, 0); - - if (null === $e) { - $multi->handlesActivity[$i][] = $data; - } - } - - if (null !== $e || !$remaining || feof($h)) { - // Stream completed - $info['total_time'] = microtime(true) - $info['start_time']; - $info['starttransfer_time'] = $info['starttransfer_time'] ?: $info['total_time']; - - if ($onProgress) { - try { - $onProgress(-1); - } catch (\Throwable $e) { - // no-op - } - } - - if (null === $e) { - if (0 < $remaining) { - $e = new TransportException(sprintf('Transfer closed with %s bytes remaining to read.', $remaining)); - } elseif (-1 === $remaining && fwrite($buffer, '-') && '' !== stream_get_contents($buffer, -1, 0)) { - $e = new TransportException('Transfer closed with outstanding data remaining from chunked response.'); - } - } - - $multi->handlesActivity[$i][] = null; - $multi->handlesActivity[$i][] = $e; - if (null !== ($host = $multi->openHandles[$i][6] ?? null) && 0 >= --$multi->hosts[$host]) { - unset($multi->hosts[$host]); - } - unset($multi->openHandles[$i]); - $multi->sleep = false; - } - } - - if (null === $responses) { - return; - } - - $maxHosts = $multi->maxHostConnections; - - foreach ($responses as $i => $response) { - if (null !== $response->remaining || null === $response->buffer) { - continue; - } - - if ($response->pauseExpiry && microtime(true) < $response->pauseExpiry) { - // Create empty open handles to tell we still have pending requests - $multi->openHandles[$i] = [\INF, null, null, null]; - } elseif ($maxHosts && $maxHosts > ($multi->hosts[parse_url($response->url, \PHP_URL_HOST)] ?? 0)) { - // Open the next pending request - this is a blocking operation so we do only one of them - $response->open(); - $multi->sleep = false; - self::perform($multi); - $maxHosts = 0; - } - } - } - - /** - * {@inheritdoc} - * - * @param NativeClientState $multi - */ - private static function select(ClientState $multi, float $timeout): int - { - if (!$multi->sleep = !$multi->sleep) { - return -1; - } - - $_ = $handles = []; - $now = null; - - foreach ($multi->openHandles as [$pauseExpiry, $h]) { - if (null === $h) { - continue; - } - - if ($pauseExpiry && ($now ?? $now = microtime(true)) < $pauseExpiry) { - $timeout = min($timeout, $pauseExpiry - $now); - continue; - } - - $handles[] = $h; - } - - if (!$handles) { - usleep((int) (1E6 * $timeout)); - - return 0; - } - - return stream_select($handles, $_, $_, (int) $timeout, (int) (1E6 * ($timeout - (int) $timeout))); - } -} diff --git a/vendor/symfony/http-client/Response/ResponseStream.php b/vendor/symfony/http-client/Response/ResponseStream.php deleted file mode 100644 index f86d2d4..0000000 --- a/vendor/symfony/http-client/Response/ResponseStream.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; - -/** - * @author Nicolas Grekas - */ -final class ResponseStream implements ResponseStreamInterface -{ - private $generator; - - public function __construct(\Generator $generator) - { - $this->generator = $generator; - } - - public function key(): ResponseInterface - { - return $this->generator->key(); - } - - public function current(): ChunkInterface - { - return $this->generator->current(); - } - - public function next(): void - { - $this->generator->next(); - } - - public function rewind(): void - { - $this->generator->rewind(); - } - - public function valid(): bool - { - return $this->generator->valid(); - } -} diff --git a/vendor/symfony/http-client/Response/StreamWrapper.php b/vendor/symfony/http-client/Response/StreamWrapper.php deleted file mode 100644 index c350e00..0000000 --- a/vendor/symfony/http-client/Response/StreamWrapper.php +++ /dev/null @@ -1,304 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * Allows turning ResponseInterface instances to PHP streams. - * - * @author Nicolas Grekas - */ -class StreamWrapper -{ - /** @var resource|string|null */ - public $context; - - /** @var HttpClientInterface */ - private $client; - - /** @var ResponseInterface */ - private $response; - - /** @var resource|null */ - private $content; - - /** @var resource|null */ - private $handle; - - private $blocking = true; - private $timeout; - private $eof = false; - private $offset = 0; - - /** - * Creates a PHP stream resource from a ResponseInterface. - * - * @return resource - */ - public static function createResource(ResponseInterface $response, HttpClientInterface $client = null) - { - if ($response instanceof StreamableInterface) { - $stack = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 2); - - if ($response !== ($stack[1]['object'] ?? null)) { - return $response->toStream(false); - } - } - - if (null === $client && !method_exists($response, 'stream')) { - throw new \InvalidArgumentException(sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__)); - } - - if (false === stream_wrapper_register('symfony', __CLASS__)) { - throw new \RuntimeException(error_get_last()['message'] ?? 'Registering the "symfony" stream wrapper failed.'); - } - - try { - $context = [ - 'client' => $client ?? $response, - 'response' => $response, - ]; - - return fopen('symfony://'.$response->getInfo('url'), 'r', false, stream_context_create(['symfony' => $context])) ?: null; - } finally { - stream_wrapper_unregister('symfony'); - } - } - - public function getResponse(): ResponseInterface - { - return $this->response; - } - - /** - * @param resource|callable|null $handle The resource handle that should be monitored when - * stream_select() is used on the created stream - * @param resource|null $content The seekable resource where the response body is buffered - */ - public function bindHandles(&$handle, &$content): void - { - $this->handle = &$handle; - $this->content = &$content; - } - - public function stream_open(string $path, string $mode, int $options): bool - { - if ('r' !== $mode) { - if ($options & \STREAM_REPORT_ERRORS) { - trigger_error(sprintf('Invalid mode "%s": only "r" is supported.', $mode), \E_USER_WARNING); - } - - return false; - } - - $context = stream_context_get_options($this->context)['symfony'] ?? null; - $this->client = $context['client'] ?? null; - $this->response = $context['response'] ?? null; - $this->context = null; - - if (null !== $this->client && null !== $this->response) { - return true; - } - - if ($options & \STREAM_REPORT_ERRORS) { - trigger_error('Missing options "client" or "response" in "symfony" stream context.', \E_USER_WARNING); - } - - return false; - } - - public function stream_read(int $count) - { - if (\is_resource($this->content)) { - // Empty the internal activity list - foreach ($this->client->stream([$this->response], 0) as $chunk) { - try { - if (!$chunk->isTimeout() && $chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - if (0 !== fseek($this->content, $this->offset)) { - return false; - } - - if ('' !== $data = fread($this->content, $count)) { - fseek($this->content, 0, \SEEK_END); - $this->offset += \strlen($data); - - return $data; - } - } - - if (\is_string($this->content)) { - if (\strlen($this->content) <= $count) { - $data = $this->content; - $this->content = null; - } else { - $data = substr($this->content, 0, $count); - $this->content = substr($this->content, $count); - } - $this->offset += \strlen($data); - - return $data; - } - - foreach ($this->client->stream([$this->response], $this->blocking ? $this->timeout : 0) as $chunk) { - try { - $this->eof = true; - $this->eof = !$chunk->isTimeout(); - $this->eof = $chunk->isLast(); - - if ($chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - - if ('' !== $data = $chunk->getContent()) { - if (\strlen($data) > $count) { - if (null === $this->content) { - $this->content = substr($data, $count); - } - $data = substr($data, 0, $count); - } - $this->offset += \strlen($data); - - return $data; - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - return ''; - } - - public function stream_set_option(int $option, int $arg1, ?int $arg2): bool - { - if (\STREAM_OPTION_BLOCKING === $option) { - $this->blocking = (bool) $arg1; - } elseif (\STREAM_OPTION_READ_TIMEOUT === $option) { - $this->timeout = $arg1 + $arg2 / 1e6; - } else { - return false; - } - - return true; - } - - public function stream_tell(): int - { - return $this->offset; - } - - public function stream_eof(): bool - { - return $this->eof && !\is_string($this->content); - } - - public function stream_seek(int $offset, int $whence = \SEEK_SET): bool - { - if (!\is_resource($this->content) || 0 !== fseek($this->content, 0, \SEEK_END)) { - return false; - } - - $size = ftell($this->content); - - if (\SEEK_CUR === $whence) { - $offset += $this->offset; - } - - if (\SEEK_END === $whence || $size < $offset) { - foreach ($this->client->stream([$this->response]) as $chunk) { - try { - if ($chunk->isFirst()) { - $this->response->getStatusCode(); // ignore 3/4/5xx - } - - // Chunks are buffered in $this->content already - $size += \strlen($chunk->getContent()); - - if (\SEEK_END !== $whence && $offset <= $size) { - break; - } - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - - return false; - } - } - - if (\SEEK_END === $whence) { - $offset += $size; - } - } - - if (0 <= $offset && $offset <= $size) { - $this->eof = false; - $this->offset = $offset; - - return true; - } - - return false; - } - - public function stream_cast(int $castAs) - { - if (\STREAM_CAST_FOR_SELECT === $castAs) { - $this->response->getHeaders(false); - - return (\is_callable($this->handle) ? ($this->handle)() : $this->handle) ?? false; - } - - return false; - } - - public function stream_stat(): array - { - try { - $headers = $this->response->getHeaders(false); - } catch (ExceptionInterface $e) { - trigger_error($e->getMessage(), \E_USER_WARNING); - $headers = []; - } - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 33060, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => (int) ($headers['content-length'][0] ?? -1), - 'atime' => 0, - 'mtime' => strtotime($headers['last-modified'][0] ?? '') ?: 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0, - ]; - } - - private function __construct() - { - } -} diff --git a/vendor/symfony/http-client/Response/StreamableInterface.php b/vendor/symfony/http-client/Response/StreamableInterface.php deleted file mode 100644 index eb1f933..0000000 --- a/vendor/symfony/http-client/Response/StreamableInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Nicolas Grekas - */ -interface StreamableInterface -{ - /** - * Casts the response to a PHP stream resource. - * - * @return resource - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function toStream(bool $throw = true); -} diff --git a/vendor/symfony/http-client/Response/TraceableResponse.php b/vendor/symfony/http-client/Response/TraceableResponse.php deleted file mode 100644 index d656c0a..0000000 --- a/vendor/symfony/http-client/Response/TraceableResponse.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Exception\ClientException; -use Symfony\Component\HttpClient\Exception\RedirectionException; -use Symfony\Component\HttpClient\Exception\ServerException; -use Symfony\Component\HttpClient\TraceableHttpClient; -use Symfony\Component\Stopwatch\StopwatchEvent; -use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class TraceableResponse implements ResponseInterface, StreamableInterface -{ - private $client; - private $response; - private $content; - private $event; - - public function __construct(HttpClientInterface $client, ResponseInterface $response, &$content, StopwatchEvent $event = null) - { - $this->client = $client; - $this->response = $response; - $this->content = &$content; - $this->event = $event; - } - - public function __sleep(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - try { - $this->response->__destruct(); - } finally { - if ($this->event && $this->event->isStarted()) { - $this->event->stop(); - } - } - } - - public function getStatusCode(): int - { - try { - return $this->response->getStatusCode(); - } finally { - if ($this->event && $this->event->isStarted()) { - $this->event->lap(); - } - } - } - - public function getHeaders(bool $throw = true): array - { - try { - return $this->response->getHeaders($throw); - } finally { - if ($this->event && $this->event->isStarted()) { - $this->event->lap(); - } - } - } - - public function getContent(bool $throw = true): string - { - try { - if (false === $this->content) { - return $this->response->getContent($throw); - } - - return $this->content = $this->response->getContent(false); - } finally { - if ($this->event && $this->event->isStarted()) { - $this->event->stop(); - } - if ($throw) { - $this->checkStatusCode($this->response->getStatusCode()); - } - } - } - - public function toArray(bool $throw = true): array - { - try { - if (false === $this->content) { - return $this->response->toArray($throw); - } - - return $this->content = $this->response->toArray(false); - } finally { - if ($this->event && $this->event->isStarted()) { - $this->event->stop(); - } - if ($throw) { - $this->checkStatusCode($this->response->getStatusCode()); - } - } - } - - public function cancel(): void - { - $this->response->cancel(); - - if ($this->event && $this->event->isStarted()) { - $this->event->stop(); - } - } - - public function getInfo(string $type = null) - { - return $this->response->getInfo($type); - } - - /** - * Casts the response to a PHP stream resource. - * - * @return resource - * - * @throws TransportExceptionInterface When a network error occurs - * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached - * @throws ClientExceptionInterface On a 4xx when $throw is true - * @throws ServerExceptionInterface On a 5xx when $throw is true - */ - public function toStream(bool $throw = true) - { - if ($throw) { - // Ensure headers arrived - $this->response->getHeaders(true); - } - - if ($this->response instanceof StreamableInterface) { - return $this->response->toStream(false); - } - - return StreamWrapper::createResource($this->response, $this->client); - } - - /** - * @internal - */ - public static function stream(HttpClientInterface $client, iterable $responses, ?float $timeout): \Generator - { - $wrappedResponses = []; - $traceableMap = new \SplObjectStorage(); - - foreach ($responses as $r) { - if (!$r instanceof self) { - throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', TraceableHttpClient::class, get_debug_type($r))); - } - - $traceableMap[$r->response] = $r; - $wrappedResponses[] = $r->response; - if ($r->event && !$r->event->isStarted()) { - $r->event->start(); - } - } - - foreach ($client->stream($wrappedResponses, $timeout) as $r => $chunk) { - if ($traceableMap[$r]->event && $traceableMap[$r]->event->isStarted()) { - try { - if ($chunk->isTimeout() || !$chunk->isLast()) { - $traceableMap[$r]->event->lap(); - } else { - $traceableMap[$r]->event->stop(); - } - } catch (TransportExceptionInterface $e) { - $traceableMap[$r]->event->stop(); - if ($chunk instanceof ErrorChunk) { - $chunk->didThrow(false); - } else { - $chunk = new ErrorChunk($chunk->getOffset(), $e); - } - } - } - yield $traceableMap[$r] => $chunk; - } - } - - private function checkStatusCode(int $code) - { - if (500 <= $code) { - throw new ServerException($this); - } - - if (400 <= $code) { - throw new ClientException($this); - } - - if (300 <= $code) { - throw new RedirectionException($this); - } - } -} diff --git a/vendor/symfony/http-client/Response/TransportResponseTrait.php b/vendor/symfony/http-client/Response/TransportResponseTrait.php deleted file mode 100644 index 566d61e..0000000 --- a/vendor/symfony/http-client/Response/TransportResponseTrait.php +++ /dev/null @@ -1,312 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Response; - -use Symfony\Component\HttpClient\Chunk\DataChunk; -use Symfony\Component\HttpClient\Chunk\ErrorChunk; -use Symfony\Component\HttpClient\Chunk\FirstChunk; -use Symfony\Component\HttpClient\Chunk\LastChunk; -use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\ClientState; - -/** - * Implements common logic for transport-level response classes. - * - * @author Nicolas Grekas - * - * @internal - */ -trait TransportResponseTrait -{ - private $canary; - private $headers = []; - private $info = [ - 'response_headers' => [], - 'http_code' => 0, - 'error' => null, - 'canceled' => false, - ]; - - /** @var object|resource */ - private $handle; - private $id; - private $timeout = 0; - private $inflate; - private $finalInfo; - private $logger; - - /** - * {@inheritdoc} - */ - public function getStatusCode(): int - { - if ($this->initializer) { - self::initialize($this); - } - - return $this->info['http_code']; - } - - /** - * {@inheritdoc} - */ - public function getHeaders(bool $throw = true): array - { - if ($this->initializer) { - self::initialize($this); - } - - if ($throw) { - $this->checkStatusCode(); - } - - return $this->headers; - } - - /** - * {@inheritdoc} - */ - public function cancel(): void - { - $this->info['canceled'] = true; - $this->info['error'] = 'Response has been canceled.'; - $this->close(); - } - - /** - * Closes the response and all its network handles. - */ - protected function close(): void - { - $this->canary->cancel(); - $this->inflate = null; - } - - /** - * Adds pending responses to the activity list. - */ - abstract protected static function schedule(self $response, array &$runningResponses): void; - - /** - * Performs all pending non-blocking operations. - */ - abstract protected static function perform(ClientState $multi, array &$responses): void; - - /** - * Waits for network activity. - */ - abstract protected static function select(ClientState $multi, float $timeout): int; - - private static function addResponseHeaders(array $responseHeaders, array &$info, array &$headers, string &$debug = ''): void - { - foreach ($responseHeaders as $h) { - if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? (\d\d\d)(?: |$)#', $h, $m)) { - if ($headers) { - $debug .= "< \r\n"; - $headers = []; - } - $info['http_code'] = (int) $m[1]; - } elseif (2 === \count($m = explode(':', $h, 2))) { - $headers[strtolower($m[0])][] = ltrim($m[1]); - } - - $debug .= "< {$h}\r\n"; - $info['response_headers'][] = $h; - } - - $debug .= "< \r\n"; - } - - /** - * Ensures the request is always sent and that the response code was checked. - */ - private function doDestruct() - { - $this->shouldBuffer = true; - - if ($this->initializer && null === $this->info['error']) { - self::initialize($this); - $this->checkStatusCode(); - } - } - - /** - * Implements an event loop based on a buffer activity queue. - * - * @param iterable $responses - * - * @internal - */ - public static function stream(iterable $responses, float $timeout = null): \Generator - { - $runningResponses = []; - - foreach ($responses as $response) { - self::schedule($response, $runningResponses); - } - - $lastActivity = microtime(true); - $elapsedTimeout = 0; - - if ($fromLastTimeout = 0.0 === $timeout && '-0' === (string) $timeout) { - $timeout = null; - } elseif ($fromLastTimeout = 0 > $timeout) { - $timeout = -$timeout; - } - - while (true) { - $hasActivity = false; - $timeoutMax = 0; - $timeoutMin = $timeout ?? \INF; - - /** @var ClientState $multi */ - foreach ($runningResponses as $i => [$multi]) { - $responses = &$runningResponses[$i][1]; - self::perform($multi, $responses); - - foreach ($responses as $j => $response) { - $timeoutMax = $timeout ?? max($timeoutMax, $response->timeout); - $timeoutMin = min($timeoutMin, $response->timeout, 1); - $chunk = false; - - if ($fromLastTimeout && null !== $multi->lastTimeout) { - $elapsedTimeout = microtime(true) - $multi->lastTimeout; - } - - if (isset($multi->handlesActivity[$j])) { - $multi->lastTimeout = null; - } elseif (!isset($multi->openHandles[$j])) { - unset($responses[$j]); - continue; - } elseif ($elapsedTimeout >= $timeoutMax) { - $multi->handlesActivity[$j] = [new ErrorChunk($response->offset, sprintf('Idle timeout reached for "%s".', $response->getInfo('url')))]; - $multi->lastTimeout ?? $multi->lastTimeout = $lastActivity; - } else { - continue; - } - - while ($multi->handlesActivity[$j] ?? false) { - $hasActivity = true; - $elapsedTimeout = 0; - - if (\is_string($chunk = array_shift($multi->handlesActivity[$j]))) { - if (null !== $response->inflate && false === $chunk = @inflate_add($response->inflate, $chunk)) { - $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Error while processing content unencoding for "%s".', $response->getInfo('url')))]; - continue; - } - - if ('' !== $chunk && null !== $response->content && \strlen($chunk) !== fwrite($response->content, $chunk)) { - $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($chunk)))]; - continue; - } - - $chunkLen = \strlen($chunk); - $chunk = new DataChunk($response->offset, $chunk); - $response->offset += $chunkLen; - } elseif (null === $chunk) { - $e = $multi->handlesActivity[$j][0]; - unset($responses[$j], $multi->handlesActivity[$j]); - $response->close(); - - if (null !== $e) { - $response->info['error'] = $e->getMessage(); - - if ($e instanceof \Error) { - throw $e; - } - - $chunk = new ErrorChunk($response->offset, $e); - } else { - if (0 === $response->offset && null === $response->content) { - $response->content = fopen('php://memory', 'w+'); - } - - $chunk = new LastChunk($response->offset); - } - } elseif ($chunk instanceof ErrorChunk) { - unset($responses[$j]); - $elapsedTimeout = $timeoutMax; - } elseif ($chunk instanceof FirstChunk) { - if ($response->logger) { - $info = $response->getInfo(); - $response->logger->info(sprintf('Response: "%s %s"', $info['http_code'], $info['url'])); - } - - $response->inflate = \extension_loaded('zlib') && $response->inflate && 'gzip' === ($response->headers['content-encoding'][0] ?? null) ? inflate_init(\ZLIB_ENCODING_GZIP) : null; - - if ($response->shouldBuffer instanceof \Closure) { - try { - $response->shouldBuffer = ($response->shouldBuffer)($response->headers); - - if (null !== $response->info['error']) { - throw new TransportException($response->info['error']); - } - } catch (\Throwable $e) { - $response->close(); - $multi->handlesActivity[$j] = [null, $e]; - } - } - - if (true === $response->shouldBuffer) { - $response->content = fopen('php://temp', 'w+'); - } elseif (\is_resource($response->shouldBuffer)) { - $response->content = $response->shouldBuffer; - } - $response->shouldBuffer = null; - - yield $response => $chunk; - - if ($response->initializer && null === $response->info['error']) { - // Ensure the HTTP status code is always checked - $response->getHeaders(true); - } - - continue; - } - - yield $response => $chunk; - } - - unset($multi->handlesActivity[$j]); - - if ($chunk instanceof ErrorChunk && !$chunk->didThrow()) { - // Ensure transport exceptions are always thrown - $chunk->getContent(); - } - } - - if (!$responses) { - unset($runningResponses[$i]); - } - - // Prevent memory leaks - $multi->handlesActivity = $multi->handlesActivity ?: []; - $multi->openHandles = $multi->openHandles ?: []; - } - - if (!$runningResponses) { - break; - } - - if ($hasActivity) { - $lastActivity = microtime(true); - continue; - } - - if (-1 === self::select($multi, min($timeoutMin, $timeoutMax - $elapsedTimeout))) { - usleep(min(500, 1E6 * $timeoutMin)); - } - - $elapsedTimeout = microtime(true) - $lastActivity; - } - } -} diff --git a/vendor/symfony/http-client/Retry/GenericRetryStrategy.php b/vendor/symfony/http-client/Retry/GenericRetryStrategy.php deleted file mode 100644 index ebe10a2..0000000 --- a/vendor/symfony/http-client/Retry/GenericRetryStrategy.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Retry; - -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Component\HttpClient\Response\AsyncContext; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * Decides to retry the request when HTTP status codes belong to the given list of codes. - * - * @author Jérémy Derussé - */ -class GenericRetryStrategy implements RetryStrategyInterface -{ - public const IDEMPOTENT_METHODS = ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE']; - public const DEFAULT_RETRY_STATUS_CODES = [ - 0 => self::IDEMPOTENT_METHODS, // for transport exceptions - 423, - 425, - 429, - 500 => self::IDEMPOTENT_METHODS, - 502, - 503, - 504 => self::IDEMPOTENT_METHODS, - 507 => self::IDEMPOTENT_METHODS, - 510 => self::IDEMPOTENT_METHODS, - ]; - - private $statusCodes; - private $delayMs; - private $multiplier; - private $maxDelayMs; - private $jitter; - - /** - * @param array $statusCodes List of HTTP status codes that trigger a retry - * @param int $delayMs Amount of time to delay (or the initial value when multiplier is used) - * @param float $multiplier Multiplier to apply to the delay each time a retry occurs - * @param int $maxDelayMs Maximum delay to allow (0 means no maximum) - * @param float $jitter Probability of randomness int delay (0 = none, 1 = 100% random) - */ - public function __construct(array $statusCodes = self::DEFAULT_RETRY_STATUS_CODES, int $delayMs = 1000, float $multiplier = 2.0, int $maxDelayMs = 0, float $jitter = 0.1) - { - $this->statusCodes = $statusCodes; - - if ($delayMs < 0) { - throw new InvalidArgumentException(sprintf('Delay must be greater than or equal to zero: "%s" given.', $delayMs)); - } - $this->delayMs = $delayMs; - - if ($multiplier < 1) { - throw new InvalidArgumentException(sprintf('Multiplier must be greater than or equal to one: "%s" given.', $multiplier)); - } - $this->multiplier = $multiplier; - - if ($maxDelayMs < 0) { - throw new InvalidArgumentException(sprintf('Max delay must be greater than or equal to zero: "%s" given.', $maxDelayMs)); - } - $this->maxDelayMs = $maxDelayMs; - - if ($jitter < 0 || $jitter > 1) { - throw new InvalidArgumentException(sprintf('Jitter must be between 0 and 1: "%s" given.', $jitter)); - } - $this->jitter = $jitter; - } - - public function shouldRetry(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): ?bool - { - $statusCode = $context->getStatusCode(); - if (\in_array($statusCode, $this->statusCodes, true)) { - return true; - } - if (isset($this->statusCodes[$statusCode]) && \is_array($this->statusCodes[$statusCode])) { - return \in_array($context->getInfo('http_method'), $this->statusCodes[$statusCode], true); - } - if (null === $exception) { - return false; - } - - if (\in_array(0, $this->statusCodes, true)) { - return true; - } - if (isset($this->statusCodes[0]) && \is_array($this->statusCodes[0])) { - return \in_array($context->getInfo('http_method'), $this->statusCodes[0], true); - } - - return false; - } - - public function getDelay(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): int - { - $delay = $this->delayMs * $this->multiplier ** $context->getInfo('retry_count'); - - if ($this->jitter > 0) { - $randomness = $delay * $this->jitter; - $delay = $delay + random_int(-$randomness, +$randomness); - } - - if ($delay > $this->maxDelayMs && 0 !== $this->maxDelayMs) { - return $this->maxDelayMs; - } - - return (int) $delay; - } -} diff --git a/vendor/symfony/http-client/Retry/RetryStrategyInterface.php b/vendor/symfony/http-client/Retry/RetryStrategyInterface.php deleted file mode 100644 index 2576433..0000000 --- a/vendor/symfony/http-client/Retry/RetryStrategyInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient\Retry; - -use Symfony\Component\HttpClient\Response\AsyncContext; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; - -/** - * @author Jérémy Derussé - * @author Nicolas Grekas - */ -interface RetryStrategyInterface -{ - /** - * Returns whether the request should be retried. - * - * @param ?string $responseContent Null is passed when the body did not arrive yet - * - * @return bool|null Returns null to signal that the body is required to take a decision - */ - public function shouldRetry(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): ?bool; - - /** - * Returns the time to wait in milliseconds. - */ - public function getDelay(AsyncContext $context, ?string $responseContent, ?TransportExceptionInterface $exception): int; -} diff --git a/vendor/symfony/http-client/RetryableHttpClient.php b/vendor/symfony/http-client/RetryableHttpClient.php deleted file mode 100644 index 4df466f..0000000 --- a/vendor/symfony/http-client/RetryableHttpClient.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Symfony\Component\HttpClient\Response\AsyncContext; -use Symfony\Component\HttpClient\Response\AsyncResponse; -use Symfony\Component\HttpClient\Retry\GenericRetryStrategy; -use Symfony\Component\HttpClient\Retry\RetryStrategyInterface; -use Symfony\Contracts\HttpClient\ChunkInterface; -use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Automatically retries failing HTTP requests. - * - * @author Jérémy Derussé - */ -class RetryableHttpClient implements HttpClientInterface, ResetInterface -{ - use AsyncDecoratorTrait; - - private $strategy; - private $maxRetries; - private $logger; - - /** - * @param int $maxRetries The maximum number of times to retry - */ - public function __construct(HttpClientInterface $client, RetryStrategyInterface $strategy = null, int $maxRetries = 3, LoggerInterface $logger = null) - { - $this->client = $client; - $this->strategy = $strategy ?? new GenericRetryStrategy(); - $this->maxRetries = $maxRetries; - $this->logger = $logger ?? new NullLogger(); - } - - public function request(string $method, string $url, array $options = []): ResponseInterface - { - if ($this->maxRetries <= 0) { - return new AsyncResponse($this->client, $method, $url, $options); - } - - $retryCount = 0; - $content = ''; - $firstChunk = null; - - return new AsyncResponse($this->client, $method, $url, $options, function (ChunkInterface $chunk, AsyncContext $context) use ($method, $url, $options, &$retryCount, &$content, &$firstChunk) { - $exception = null; - try { - if ($chunk->isTimeout() || null !== $chunk->getInformationalStatus() || $context->getInfo('canceled')) { - yield $chunk; - - return; - } - } catch (TransportExceptionInterface $exception) { - // catch TransportExceptionInterface to send it to the strategy - } - if (null !== $exception) { - // always retry request that fail to resolve DNS - if ('' !== $context->getInfo('primary_ip')) { - $shouldRetry = $this->strategy->shouldRetry($context, null, $exception); - if (null === $shouldRetry) { - throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with an exception.', \get_class($this->strategy))); - } - - if (false === $shouldRetry) { - yield from $this->passthru($context, $firstChunk, $content, $chunk); - - return; - } - } - } elseif ($chunk->isFirst()) { - if (false === $shouldRetry = $this->strategy->shouldRetry($context, null, null)) { - yield from $this->passthru($context, $firstChunk, $content, $chunk); - - return; - } - - // Body is needed to decide - if (null === $shouldRetry) { - $firstChunk = $chunk; - $content = ''; - - return; - } - } else { - if (!$chunk->isLast()) { - $content .= $chunk->getContent(); - - return; - } - - if (null === $shouldRetry = $this->strategy->shouldRetry($context, $content, null)) { - throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with a body.', \get_class($this->strategy))); - } - - if (false === $shouldRetry) { - yield from $this->passthru($context, $firstChunk, $content, $chunk); - - return; - } - } - - $context->getResponse()->cancel(); - - $delay = $this->getDelayFromHeader($context->getHeaders()) ?? $this->strategy->getDelay($context, !$exception && $chunk->isLast() ? $content : null, $exception); - ++$retryCount; - - $this->logger->info('Try #{count} after {delay}ms'.($exception ? ': '.$exception->getMessage() : ', status code: '.$context->getStatusCode()), [ - 'count' => $retryCount, - 'delay' => $delay, - ]); - - $context->setInfo('retry_count', $retryCount); - $context->replaceRequest($method, $url, $options); - $context->pause($delay / 1000); - - if ($retryCount >= $this->maxRetries) { - $context->passthru(); - } - }); - } - - private function getDelayFromHeader(array $headers): ?int - { - if (null !== $after = $headers['retry-after'][0] ?? null) { - if (is_numeric($after)) { - return (int) $after * 1000; - } - - if (false !== $time = strtotime($after)) { - return max(0, $time - time()) * 1000; - } - } - - return null; - } - - private function passthru(AsyncContext $context, ?ChunkInterface $firstChunk, string &$content, ChunkInterface $lastChunk): \Generator - { - $context->passthru(); - - if (null !== $firstChunk) { - yield $firstChunk; - } - - if ('' !== $content) { - $chunk = $context->createChunk($content); - $content = ''; - - yield $chunk; - } - - yield $lastChunk; - } -} diff --git a/vendor/symfony/http-client/ScopingHttpClient.php b/vendor/symfony/http-client/ScopingHttpClient.php deleted file mode 100644 index 85fa26a..0000000 --- a/vendor/symfony/http-client/ScopingHttpClient.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Exception\InvalidArgumentException; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Auto-configure the default options based on the requested URL. - * - * @author Anthony Martin - */ -class ScopingHttpClient implements HttpClientInterface, ResetInterface, LoggerAwareInterface -{ - use HttpClientTrait; - - private $client; - private $defaultOptionsByRegexp; - private $defaultRegexp; - - public function __construct(HttpClientInterface $client, array $defaultOptionsByRegexp, string $defaultRegexp = null) - { - $this->client = $client; - $this->defaultOptionsByRegexp = $defaultOptionsByRegexp; - $this->defaultRegexp = $defaultRegexp; - - if (null !== $defaultRegexp && !isset($defaultOptionsByRegexp[$defaultRegexp])) { - throw new InvalidArgumentException(sprintf('No options are mapped to the provided "%s" default regexp.', $defaultRegexp)); - } - } - - public static function forBaseUri(HttpClientInterface $client, string $baseUri, array $defaultOptions = [], string $regexp = null): self - { - if (null === $regexp) { - $regexp = preg_quote(implode('', self::resolveUrl(self::parseUrl('.'), self::parseUrl($baseUri)))); - } - - $defaultOptions['base_uri'] = $baseUri; - - return new self($client, [$regexp => $defaultOptions], $regexp); - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $e = null; - $url = self::parseUrl($url, $options['query'] ?? []); - - if (\is_string($options['base_uri'] ?? null)) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - - try { - $url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null)); - } catch (InvalidArgumentException $e) { - if (null === $this->defaultRegexp) { - throw $e; - } - - $defaultOptions = $this->defaultOptionsByRegexp[$this->defaultRegexp]; - $options = self::mergeDefaultOptions($options, $defaultOptions, true); - if (\is_string($options['base_uri'] ?? null)) { - $options['base_uri'] = self::parseUrl($options['base_uri']); - } - $url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null, $defaultOptions['query'] ?? [])); - } - - foreach ($this->defaultOptionsByRegexp as $regexp => $defaultOptions) { - if (preg_match("{{$regexp}}A", $url)) { - if (null === $e || $regexp !== $this->defaultRegexp) { - $options = self::mergeDefaultOptions($options, $defaultOptions, true); - } - break; - } - } - - return $this->client->request($method, $url, $options); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - return $this->client->stream($responses, $timeout); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - } - - /** - * {@inheritdoc} - */ - public function setLogger(LoggerInterface $logger): void - { - if ($this->client instanceof LoggerAwareInterface) { - $this->client->setLogger($logger); - } - } - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->client = $this->client->withOptions($options); - - return $clone; - } -} diff --git a/vendor/symfony/http-client/TraceableHttpClient.php b/vendor/symfony/http-client/TraceableHttpClient.php deleted file mode 100644 index 76c9282..0000000 --- a/vendor/symfony/http-client/TraceableHttpClient.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpClient; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\Response\ResponseStream; -use Symfony\Component\HttpClient\Response\TraceableResponse; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; -use Symfony\Contracts\HttpClient\ResponseStreamInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Jérémy Romey - */ -final class TraceableHttpClient implements HttpClientInterface, ResetInterface, LoggerAwareInterface -{ - private $client; - private $stopwatch; - private $tracedRequests; - - public function __construct(HttpClientInterface $client, Stopwatch $stopwatch = null) - { - $this->client = $client; - $this->stopwatch = $stopwatch; - $this->tracedRequests = new \ArrayObject(); - } - - /** - * {@inheritdoc} - */ - public function request(string $method, string $url, array $options = []): ResponseInterface - { - $content = null; - $traceInfo = []; - $this->tracedRequests[] = [ - 'method' => $method, - 'url' => $url, - 'options' => $options, - 'info' => &$traceInfo, - 'content' => &$content, - ]; - $onProgress = $options['on_progress'] ?? null; - - if (false === ($options['extra']['trace_content'] ?? true)) { - unset($content); - $content = false; - } - - $options['on_progress'] = function (int $dlNow, int $dlSize, array $info) use (&$traceInfo, $onProgress) { - $traceInfo = $info; - - if (null !== $onProgress) { - $onProgress($dlNow, $dlSize, $info); - } - }; - - return new TraceableResponse($this->client, $this->client->request($method, $url, $options), $content, null === $this->stopwatch ? null : $this->stopwatch->start("$method $url", 'http_client')); - } - - /** - * {@inheritdoc} - */ - public function stream($responses, float $timeout = null): ResponseStreamInterface - { - if ($responses instanceof TraceableResponse) { - $responses = [$responses]; - } elseif (!is_iterable($responses)) { - throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); - } - - return new ResponseStream(TraceableResponse::stream($this->client, $responses, $timeout)); - } - - public function getTracedRequests(): array - { - return $this->tracedRequests->getArrayCopy(); - } - - public function reset() - { - if ($this->client instanceof ResetInterface) { - $this->client->reset(); - } - - $this->tracedRequests->exchangeArray([]); - } - - /** - * {@inheritdoc} - */ - public function setLogger(LoggerInterface $logger): void - { - if ($this->client instanceof LoggerAwareInterface) { - $this->client->setLogger($logger); - } - } - - /** - * {@inheritdoc} - */ - public function withOptions(array $options): self - { - $clone = clone $this; - $clone->client = $this->client->withOptions($options); - - return $clone; - } -} diff --git a/vendor/symfony/http-client/composer.json b/vendor/symfony/http-client/composer.json deleted file mode 100644 index 084c258..0000000 --- a/vendor/symfony/http-client/composer.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "symfony/http-client", - "type": "library", - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "2.4" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-client-contracts": "^2.4", - "symfony/polyfill-php73": "^1.11", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.0|^2|^3" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4.13|^5.1.5|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpClient\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/http-foundation/AcceptHeader.php b/vendor/symfony/http-foundation/AcceptHeader.php deleted file mode 100644 index 057c6b5..0000000 --- a/vendor/symfony/http-foundation/AcceptHeader.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeaderItem::class); - -/** - * Represents an Accept-* header. - * - * An accept header is compound with a list of items, - * sorted by descending quality. - * - * @author Jean-François Simon - */ -class AcceptHeader -{ - /** - * @var AcceptHeaderItem[] - */ - private $items = []; - - /** - * @var bool - */ - private $sorted = true; - - /** - * @param AcceptHeaderItem[] $items - */ - public function __construct(array $items) - { - foreach ($items as $item) { - $this->add($item); - } - } - - /** - * Builds an AcceptHeader instance from a string. - * - * @return self - */ - public static function fromString(?string $headerValue) - { - $index = 0; - - $parts = HeaderUtils::split($headerValue ?? '', ',;='); - - return new self(array_map(function ($subParts) use (&$index) { - $part = array_shift($subParts); - $attributes = HeaderUtils::combine($subParts); - - $item = new AcceptHeaderItem($part[0], $attributes); - $item->setIndex($index++); - - return $item; - }, $parts)); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - return implode(',', $this->items); - } - - /** - * Tests if header has given value. - * - * @return bool - */ - public function has(string $value) - { - return isset($this->items[$value]); - } - - /** - * Returns given value's item, if exists. - * - * @return AcceptHeaderItem|null - */ - public function get(string $value) - { - return $this->items[$value] ?? $this->items[explode('/', $value)[0].'/*'] ?? $this->items['*/*'] ?? $this->items['*'] ?? null; - } - - /** - * Adds an item. - * - * @return $this - */ - public function add(AcceptHeaderItem $item) - { - $this->items[$item->getValue()] = $item; - $this->sorted = false; - - return $this; - } - - /** - * Returns all items. - * - * @return AcceptHeaderItem[] - */ - public function all() - { - $this->sort(); - - return $this->items; - } - - /** - * Filters items on their value using given regex. - * - * @return self - */ - public function filter(string $pattern) - { - return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { - return preg_match($pattern, $item->getValue()); - })); - } - - /** - * Returns first item. - * - * @return AcceptHeaderItem|null - */ - public function first() - { - $this->sort(); - - return !empty($this->items) ? reset($this->items) : null; - } - - /** - * Sorts items by descending quality. - */ - private function sort(): void - { - if (!$this->sorted) { - uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) { - $qA = $a->getQuality(); - $qB = $b->getQuality(); - - if ($qA === $qB) { - return $a->getIndex() > $b->getIndex() ? 1 : -1; - } - - return $qA > $qB ? -1 : 1; - }); - - $this->sorted = true; - } - } -} diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php deleted file mode 100644 index 8b86eee..0000000 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ /dev/null @@ -1,177 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents an Accept-* header item. - * - * @author Jean-François Simon - */ -class AcceptHeaderItem -{ - private $value; - private $quality = 1.0; - private $index = 0; - private $attributes = []; - - public function __construct(string $value, array $attributes = []) - { - $this->value = $value; - foreach ($attributes as $name => $value) { - $this->setAttribute($name, $value); - } - } - - /** - * Builds an AcceptHeaderInstance instance from a string. - * - * @return self - */ - public static function fromString(?string $itemValue) - { - $parts = HeaderUtils::split($itemValue ?? '', ';='); - - $part = array_shift($parts); - $attributes = HeaderUtils::combine($parts); - - return new self($part[0], $attributes); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); - if (\count($this->attributes) > 0) { - $string .= '; '.HeaderUtils::toString($this->attributes, ';'); - } - - return $string; - } - - /** - * Set the item value. - * - * @return $this - */ - public function setValue(string $value) - { - $this->value = $value; - - return $this; - } - - /** - * Returns the item value. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set the item quality. - * - * @return $this - */ - public function setQuality(float $quality) - { - $this->quality = $quality; - - return $this; - } - - /** - * Returns the item quality. - * - * @return float - */ - public function getQuality() - { - return $this->quality; - } - - /** - * Set the item index. - * - * @return $this - */ - public function setIndex(int $index) - { - $this->index = $index; - - return $this; - } - - /** - * Returns the item index. - * - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Tests if an attribute exists. - * - * @return bool - */ - public function hasAttribute(string $name) - { - return isset($this->attributes[$name]); - } - - /** - * Returns an attribute by its name. - * - * @param mixed $default - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return $this->attributes[$name] ?? $default; - } - - /** - * Returns all attributes. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Set an attribute. - * - * @return $this - */ - public function setAttribute(string $name, string $value) - { - if ('q' === $name) { - $this->quality = (float) $value; - } else { - $this->attributes[$name] = $value; - } - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php deleted file mode 100644 index 4769cab..0000000 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ /dev/null @@ -1,363 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\File; - -/** - * BinaryFileResponse represents an HTTP response delivering a file. - * - * @author Niklas Fiekas - * @author stealth35 - * @author Igor Wiedler - * @author Jordan Alliot - * @author Sergey Linnik - */ -class BinaryFileResponse extends Response -{ - protected static $trustXSendfileTypeHeader = false; - - /** - * @var File - */ - protected $file; - protected $offset = 0; - protected $maxlen = -1; - protected $deleteFileAfterSend = false; - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - */ - public function __construct($file, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - parent::__construct(null, $status, $headers); - - $this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified); - - if ($public) { - $this->setPublic(); - } - } - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - * - * @return static - * - * @deprecated since Symfony 5.2, use __construct() instead. - */ - public static function create($file = null, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); - } - - /** - * Sets the file to stream. - * - * @param \SplFileInfo|string $file The file to stream - * - * @return $this - * - * @throws FileException - */ - public function setFile($file, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - if (!$file instanceof File) { - if ($file instanceof \SplFileInfo) { - $file = new File($file->getPathname()); - } else { - $file = new File((string) $file); - } - } - - if (!$file->isReadable()) { - throw new FileException('File must be readable.'); - } - - $this->file = $file; - - if ($autoEtag) { - $this->setAutoEtag(); - } - - if ($autoLastModified) { - $this->setAutoLastModified(); - } - - if ($contentDisposition) { - $this->setContentDisposition($contentDisposition); - } - - return $this; - } - - /** - * Gets the file. - * - * @return File - */ - public function getFile() - { - return $this->file; - } - - /** - * Automatically sets the Last-Modified header according the file modification date. - * - * @return $this - */ - public function setAutoLastModified() - { - $this->setLastModified(\DateTime::createFromFormat('U', $this->file->getMTime())); - - return $this; - } - - /** - * Automatically sets the ETag header according to the checksum of the file. - * - * @return $this - */ - public function setAutoEtag() - { - $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); - - return $this; - } - - /** - * Sets the Content-Disposition header with the given filename. - * - * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT - * @param string $filename Optionally use this UTF-8 encoded filename instead of the real name of the file - * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename - * - * @return $this - */ - public function setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '') - { - if ('' === $filename) { - $filename = $this->file->getFilename(); - } - - if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || str_contains($filename, '%'))) { - $encoding = mb_detect_encoding($filename, null, true) ?: '8bit'; - - for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { - $char = mb_substr($filename, $i, 1, $encoding); - - if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) { - $filenameFallback .= '_'; - } else { - $filenameFallback .= $char; - } - } - } - - $dispositionHeader = $this->headers->makeDisposition($disposition, $filename, $filenameFallback); - $this->headers->set('Content-Disposition', $dispositionHeader); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function prepare(Request $request) - { - if (!$this->headers->has('Content-Type')) { - $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); - } - - if ('HTTP/1.0' !== $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); - } - - $this->ensureIEOverSSLCompatibility($request); - - $this->offset = 0; - $this->maxlen = -1; - - if (false === $fileSize = $this->file->getSize()) { - return $this; - } - $this->headers->set('Content-Length', $fileSize); - - if (!$this->headers->has('Accept-Ranges')) { - // Only accept ranges on safe HTTP methods - $this->headers->set('Accept-Ranges', $request->isMethodSafe() ? 'bytes' : 'none'); - } - - if (self::$trustXSendfileTypeHeader && $request->headers->has('X-Sendfile-Type')) { - // Use X-Sendfile, do not send any content. - $type = $request->headers->get('X-Sendfile-Type'); - $path = $this->file->getRealPath(); - // Fall back to scheme://path for stream wrapped locations. - if (false === $path) { - $path = $this->file->getPathname(); - } - if ('x-accel-redirect' === strtolower($type)) { - // Do X-Accel-Mapping substitutions. - // @link https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-redirect - $parts = HeaderUtils::split($request->headers->get('X-Accel-Mapping', ''), ',='); - foreach ($parts as $part) { - [$pathPrefix, $location] = $part; - if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) { - $path = $location.substr($path, \strlen($pathPrefix)); - // Only set X-Accel-Redirect header if a valid URI can be produced - // as nginx does not serve arbitrary file paths. - $this->headers->set($type, $path); - $this->maxlen = 0; - break; - } - } - } else { - $this->headers->set($type, $path); - $this->maxlen = 0; - } - } elseif ($request->headers->has('Range') && $request->isMethod('GET')) { - // Process the range headers. - if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { - $range = $request->headers->get('Range'); - - if (str_starts_with($range, 'bytes=')) { - [$start, $end] = explode('-', substr($range, 6), 2) + [0]; - - $end = ('' === $end) ? $fileSize - 1 : (int) $end; - - if ('' === $start) { - $start = $fileSize - $end; - $end = $fileSize - 1; - } else { - $start = (int) $start; - } - - if ($start <= $end) { - $end = min($end, $fileSize - 1); - if ($start < 0 || $start > $end) { - $this->setStatusCode(416); - $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); - } elseif ($end - $start < $fileSize - 1) { - $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; - $this->offset = $start; - - $this->setStatusCode(206); - $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); - $this->headers->set('Content-Length', $end - $start + 1); - } - } - } - } - } - - return $this; - } - - private function hasValidIfRangeHeader(?string $header): bool - { - if ($this->getEtag() === $header) { - return true; - } - - if (null === $lastModified = $this->getLastModified()) { - return false; - } - - return $lastModified->format('D, d M Y H:i:s').' GMT' === $header; - } - - /** - * {@inheritdoc} - */ - public function sendContent() - { - if (!$this->isSuccessful()) { - return parent::sendContent(); - } - - if (0 === $this->maxlen) { - return $this; - } - - $out = fopen('php://output', 'w'); - $file = fopen($this->file->getPathname(), 'r'); - - stream_copy_to_stream($file, $out, $this->maxlen, $this->offset); - - fclose($out); - fclose($file); - - if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { - unlink($this->file->getPathname()); - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a BinaryFileResponse instance.'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } - - /** - * Trust X-Sendfile-Type header. - */ - public static function trustXSendfileTypeHeader() - { - self::$trustXSendfileTypeHeader = true; - } - - /** - * If this is set to true, the file will be unlinked after the request is sent - * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. - * - * @return $this - */ - public function deleteFileAfterSend(bool $shouldDelete = true) - { - $this->deleteFileAfterSend = $shouldDelete; - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/CHANGELOG.md b/vendor/symfony/http-foundation/CHANGELOG.md deleted file mode 100644 index ad7607a..0000000 --- a/vendor/symfony/http-foundation/CHANGELOG.md +++ /dev/null @@ -1,296 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate passing `null` as `$requestIp` to `IpUtils::__checkIp()`, `IpUtils::__checkIp4()` or `IpUtils::__checkIp6()`, pass an empty string instead. - * Add the `litespeed_finish_request` method to work with Litespeed - * Deprecate `upload_progress.*` and `url_rewriter.tags` session options - * Allow setting session options via DSN - -5.3 ---- - - * Add the `SessionFactory`, `NativeSessionStorageFactory`, `PhpBridgeSessionStorageFactory` and `MockFileSessionStorageFactory` classes - * Calling `Request::getSession()` when there is no available session throws a `SessionNotFoundException` - * Add the `RequestStack::getSession` method - * Deprecate the `NamespacedAttributeBag` class - * Add `ResponseFormatSame` PHPUnit constraint - * Deprecate the `RequestStack::getMasterRequest()` method and add `getMainRequest()` as replacement - -5.2.0 ------ - - * added support for `X-Forwarded-Prefix` header - * added `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names - * added `File::getContent()` - * added ability to use comma separated ip addresses for `RequestMatcher::matchIps()` - * added `Request::toArray()` to parse a JSON request body to an array - * added `RateLimiter\RequestRateLimiterInterface` and `RateLimiter\AbstractRequestRateLimiter` - * deprecated not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()`; wrap your filter in a closure instead. - * Deprecated the `Request::HEADER_X_FORWARDED_ALL` constant, use either `HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO` or `HEADER_X_FORWARDED_AWS_ELB` or `HEADER_X_FORWARDED_TRAEFIK` constants instead. - * Deprecated `BinaryFileResponse::create()`, use `__construct()` instead - -5.1.0 ------ - - * added `Cookie::withValue`, `Cookie::withDomain`, `Cookie::withExpires`, - `Cookie::withPath`, `Cookie::withSecure`, `Cookie::withHttpOnly`, - `Cookie::withRaw`, `Cookie::withSameSite` - * Deprecate `Response::create()`, `JsonResponse::create()`, - `RedirectResponse::create()`, and `StreamedResponse::create()` methods (use - `__construct()` instead) - * added `Request::preferSafeContent()` and `Response::setContentSafe()` to handle "safe" HTTP preference - according to [RFC 8674](https://tools.ietf.org/html/rfc8674) - * made the Mime component an optional dependency - * added `MarshallingSessionHandler`, `IdentityMarshaller` - * made `Session` accept a callback to report when the session is being used - * Add support for all core cache control directives - * Added `Symfony\Component\HttpFoundation\InputBag` - * Deprecated retrieving non-string values using `InputBag::get()`, use `InputBag::all()` if you need access to the collection of values - -5.0.0 ------ - - * made `Cookie` auto-secure and lax by default - * removed classes in the `MimeType` namespace, use the Symfony Mime component instead - * removed method `UploadedFile::getClientSize()` and the related constructor argument - * made `Request::getSession()` throw if the session has not been set before - * removed `Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL` - * passing a null url when instantiating a `RedirectResponse` is not allowed - -4.4.0 ------ - - * passing arguments to `Request::isMethodSafe()` is deprecated. - * `ApacheRequest` is deprecated, use the `Request` class instead. - * passing a third argument to `HeaderBag::get()` is deprecated, use method `all()` instead - * [BC BREAK] `PdoSessionHandler` with MySQL changed the type of the lifetime column, - make sure to run `ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL` to - update your database. - * `PdoSessionHandler` now precalculates the expiry timestamp in the lifetime column, - make sure to run `CREATE INDEX EXPIRY ON sessions (sess_lifetime)` to update your database - to speed up garbage collection of expired sessions. - * added `SessionHandlerFactory` to create session handlers with a DSN - * added `IpUtils::anonymize()` to help with GDPR compliance. - -4.3.0 ------ - - * added PHPUnit constraints: `RequestAttributeValueSame`, `ResponseCookieValueSame`, `ResponseHasCookie`, - `ResponseHasHeader`, `ResponseHeaderSame`, `ResponseIsRedirected`, `ResponseIsSuccessful`, and `ResponseStatusCodeSame` - * deprecated `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` in favor of `Symfony\Component\Mime\MimeTypesInterface`. - * deprecated `MimeType` and `MimeTypeExtensionGuesser` in favor of `Symfony\Component\Mime\MimeTypes`. - * deprecated `FileBinaryMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileBinaryMimeTypeGuesser`. - * deprecated `FileinfoMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileinfoMimeTypeGuesser`. - * added `UrlHelper` that allows to get an absolute URL and a relative path for a given path - -4.2.0 ------ - - * the default value of the "$secure" and "$samesite" arguments of Cookie's constructor - will respectively change from "false" to "null" and from "null" to "lax" in Symfony - 5.0, you should define their values explicitly or use "Cookie::create()" instead. - * added `matchPort()` in RequestMatcher - -4.1.3 ------ - - * [BC BREAK] Support for the IIS-only `X_ORIGINAL_URL` and `X_REWRITE_URL` - HTTP headers has been dropped for security reasons. - -4.1.0 ------ - - * Query string normalization uses `parse_str()` instead of custom parsing logic. - * Passing the file size to the constructor of the `UploadedFile` class is deprecated. - * The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead. - * added `RedisSessionHandler` to use Redis as a session storage - * The `get()` method of the `AcceptHeader` class now takes into account the - `*` and `*/*` default values (if they are present in the Accept HTTP header) - when looking for items. - * deprecated `Request::getSession()` when no session has been set. Use `Request::hasSession()` instead. - * added `CannotWriteFileException`, `ExtensionFileException`, `FormSizeFileException`, - `IniSizeFileException`, `NoFileException`, `NoTmpDirFileException`, `PartialFileException` to - handle failed `UploadedFile`. - * added `MigratingSessionHandler` for migrating between two session handlers without losing sessions - * added `HeaderUtils`. - -4.0.0 ------ - - * the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` - methods have been removed - * the `Request::HEADER_CLIENT_IP` constant has been removed, use - `Request::HEADER_X_FORWARDED_FOR` instead - * the `Request::HEADER_CLIENT_HOST` constant has been removed, use - `Request::HEADER_X_FORWARDED_HOST` instead - * the `Request::HEADER_CLIENT_PROTO` constant has been removed, use - `Request::HEADER_X_FORWARDED_PROTO` instead - * the `Request::HEADER_CLIENT_PORT` constant has been removed, use - `Request::HEADER_X_FORWARDED_PORT` instead - * checking for cacheable HTTP methods using the `Request::isMethodSafe()` - method (by not passing `false` as its argument) is not supported anymore and - throws a `\BadMethodCallException` - * the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes have been removed - * setting session save handlers that do not implement `\SessionHandlerInterface` in - `NativeSessionStorage::setSaveHandler()` is not supported anymore and throws a - `\TypeError` - -3.4.0 ------ - - * implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new - `AbstractSessionHandler` base class and a new `StrictSessionHandler` wrapper - * deprecated the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes - * deprecated setting session save handlers that do not implement `\SessionHandlerInterface` in `NativeSessionStorage::setSaveHandler()` - * deprecated using `MongoDbSessionHandler` with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead - * deprecated `MemcacheSessionHandler`; use `MemcachedSessionHandler` instead - -3.3.0 ------ - - * the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument, - see https://symfony.com/doc/current/deployment/proxies.html for more info, - * deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods, - * added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown, - disabling `Range` and `Content-Length` handling, switching to chunked encoding instead - * added the `Cookie::fromString()` method that allows to create a cookie from a - raw header string - -3.1.0 ------ - - * Added support for creating `JsonResponse` with a string of JSON data - -3.0.0 ------ - - * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY" - -2.8.0 ------ - - * Finding deep items in `ParameterBag::get()` is deprecated since version 2.8 and - will be removed in 3.0. - -2.6.0 ------ - - * PdoSessionHandler changes - - implemented different session locking strategies to prevent loss of data by concurrent access to the same session - - [BC BREAK] save session data in a binary column without base64_encode - - [BC BREAK] added lifetime column to the session table which allows to have different lifetimes for each session - - implemented lazy connections that are only opened when a session is used by either passing a dsn string - explicitly or falling back to session.save_path ini setting - - added a createTable method that initializes a correctly defined table depending on the database vendor - -2.5.0 ------ - - * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation - of the options used while encoding data to JSON format. - -2.4.0 ------ - - * added RequestStack - * added Request::getEncodings() - * added accessors methods to session handlers - -2.3.0 ------ - - * added support for ranges of IPs in trusted proxies - * `UploadedFile::isValid` now returns false if the file was not uploaded via HTTP (in a non-test mode) - * Improved error-handling of `\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler` - to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases - to verify that Exceptions are properly thrown when the PDO queries fail. - -2.2.0 ------ - - * fixed the Request::create() precedence (URI information always take precedence now) - * added Request::getTrustedProxies() - * deprecated Request::isProxyTrusted() - * [BC BREAK] JsonResponse does not turn a top level empty array to an object anymore, use an ArrayObject to enforce objects - * added a IpUtils class to check if an IP belongs to a CIDR - * added Request::getRealMethod() to get the "real" HTTP method (getMethod() returns the "intended" HTTP method) - * disabled _method request parameter support by default (call Request::enableHttpMethodParameterOverride() to - enable it, and Request::getHttpMethodParameterOverride() to check if it is supported) - * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3 - * Deprecated Flashbag::count() and \Countable interface, will be removed in 2.3 - -2.1.0 ------ - - * added Request::getSchemeAndHttpHost() and Request::getUserInfo() - * added a fluent interface to the Response class - * added Request::isProxyTrusted() - * added JsonResponse - * added a getTargetUrl method to RedirectResponse - * added support for streamed responses - * made Response::prepare() method the place to enforce HTTP specification - * [BC BREAK] moved management of the locale from the Session class to the Request class - * added a generic access to the PHP built-in filter mechanism: ParameterBag::filter() - * made FileBinaryMimeTypeGuesser command configurable - * added Request::getUser() and Request::getPassword() - * added support for the PATCH method in Request - * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3 - * added ResponseHeaderBag::makeDisposition() (implements RFC 6266) - * made mimetype to extension conversion configurable - * [BC BREAK] Moved all session related classes and interfaces into own namespace, as - `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly. - Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`. - * SessionHandlers must implement `\SessionHandlerInterface` or extend from the - `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class. - * Added internal storage driver proxy mechanism for forward compatibility with - PHP 5.4 `\SessionHandler` class. - * Added session handlers for custom Memcache, Memcached and Null session save handlers. - * [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`. - * [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and - `remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class - is a mediator for the session storage internals including the session handlers - which do the real work of participating in the internal PHP session workflow. - * [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit - and functional testing without starting real PHP sessions. Removed - `ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit - tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage` - for functional tests. These do not interact with global session ini - configuration values, session functions or `$_SESSION` superglobal. This means - they can be configured directly allowing multiple instances to work without - conflicting in the same PHP process. - * [BC BREAK] Removed the `close()` method from the `Session` class, as this is - now redundant. - * Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()` - `getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead - which returns a `FlashBagInterface`. - * `Session->clear()` now only clears session attributes as before it cleared - flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now. - * Session data is now managed by `SessionBagInterface` to better encapsulate - session data. - * Refactored session attribute and flash messages system to their own - `SessionBagInterface` implementations. - * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This - implementation is ESI compatible. - * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire - behavior of messages auto expiring after one page page load. Messages must - be retrieved by `get()` or `all()`. - * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate - attributes storage behavior from 2.0.x (default). - * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for - namespace session attributes. - * Flash API can stores messages in an array so there may be multiple messages - per flash type. The old `Session` class API remains without BC break as it - will allow single messages as before. - * Added basic session meta-data to the session to record session create time, - last updated time, and the lifetime of the session cookie that was provided - to the client. - * Request::getClientIp() method doesn't take a parameter anymore but bases - itself on the trustProxy parameter. - * Added isMethod() to Request object. - * [BC BREAK] The methods `getPathInfo()`, `getBaseUrl()` and `getBasePath()` of - a `Request` now all return a raw value (vs a urldecoded value before). Any call - to one of these methods must be checked and wrapped in a `rawurldecode()` if - needed. diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php deleted file mode 100644 index b4b26c0..0000000 --- a/vendor/symfony/http-foundation/Cookie.php +++ /dev/null @@ -1,422 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents a cookie. - * - * @author Johannes M. Schmitt - */ -class Cookie -{ - public const SAMESITE_NONE = 'none'; - public const SAMESITE_LAX = 'lax'; - public const SAMESITE_STRICT = 'strict'; - - protected $name; - protected $value; - protected $domain; - protected $expire; - protected $path; - protected $secure; - protected $httpOnly; - - private $raw; - private $sameSite; - private $secureDefault = false; - - private const RESERVED_CHARS_LIST = "=,; \t\r\n\v\f"; - private const RESERVED_CHARS_FROM = ['=', ',', ';', ' ', "\t", "\r", "\n", "\v", "\f"]; - private const RESERVED_CHARS_TO = ['%3D', '%2C', '%3B', '%20', '%09', '%0D', '%0A', '%0B', '%0C']; - - /** - * Creates cookie from raw header string. - * - * @return static - */ - public static function fromString(string $cookie, bool $decode = false) - { - $data = [ - 'expires' => 0, - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => false, - 'raw' => !$decode, - 'samesite' => null, - ]; - - $parts = HeaderUtils::split($cookie, ';='); - $part = array_shift($parts); - - $name = $decode ? urldecode($part[0]) : $part[0]; - $value = isset($part[1]) ? ($decode ? urldecode($part[1]) : $part[1]) : null; - - $data = HeaderUtils::combine($parts) + $data; - $data['expires'] = self::expiresTimestamp($data['expires']); - - if (isset($data['max-age']) && ($data['max-age'] > 0 || $data['expires'] > time())) { - $data['expires'] = time() + (int) $data['max-age']; - } - - return new static($name, $value, $data['expires'], $data['path'], $data['domain'], $data['secure'], $data['httponly'], $data['raw'], $data['samesite']); - } - - public static function create(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX): self - { - return new self($name, $value, $expire, $path, $domain, $secure, $httpOnly, $raw, $sameSite); - } - - /** - * @param string $name The name of the cookie - * @param string|null $value The value of the cookie - * @param int|string|\DateTimeInterface $expire The time the cookie expires - * @param string $path The path on the server in which the cookie will be available on - * @param string|null $domain The domain that the cookie is available to - * @param bool|null $secure Whether the client should send back the cookie only over HTTPS or null to auto-enable this when the request is already using HTTPS - * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol - * @param bool $raw Whether the cookie value should be sent with no url encoding - * @param string|null $sameSite Whether the cookie will be available for cross-site requests - * - * @throws \InvalidArgumentException - */ - public function __construct(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = 'lax') - { - // from PHP source code - if ($raw && false !== strpbrk($name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); - } - - if (empty($name)) { - throw new \InvalidArgumentException('The cookie name cannot be empty.'); - } - - $this->name = $name; - $this->value = $value; - $this->domain = $domain; - $this->expire = self::expiresTimestamp($expire); - $this->path = empty($path) ? '/' : $path; - $this->secure = $secure; - $this->httpOnly = $httpOnly; - $this->raw = $raw; - $this->sameSite = $this->withSameSite($sameSite)->sameSite; - } - - /** - * Creates a cookie copy with a new value. - * - * @return static - */ - public function withValue(?string $value): self - { - $cookie = clone $this; - $cookie->value = $value; - - return $cookie; - } - - /** - * Creates a cookie copy with a new domain that the cookie is available to. - * - * @return static - */ - public function withDomain(?string $domain): self - { - $cookie = clone $this; - $cookie->domain = $domain; - - return $cookie; - } - - /** - * Creates a cookie copy with a new time the cookie expires. - * - * @param int|string|\DateTimeInterface $expire - * - * @return static - */ - public function withExpires($expire = 0): self - { - $cookie = clone $this; - $cookie->expire = self::expiresTimestamp($expire); - - return $cookie; - } - - /** - * Converts expires formats to a unix timestamp. - * - * @param int|string|\DateTimeInterface $expire - */ - private static function expiresTimestamp($expire = 0): int - { - // convert expiration time to a Unix timestamp - if ($expire instanceof \DateTimeInterface) { - $expire = $expire->format('U'); - } elseif (!is_numeric($expire)) { - $expire = strtotime($expire); - - if (false === $expire) { - throw new \InvalidArgumentException('The cookie expiration time is not valid.'); - } - } - - return 0 < $expire ? (int) $expire : 0; - } - - /** - * Creates a cookie copy with a new path on the server in which the cookie will be available on. - * - * @return static - */ - public function withPath(string $path): self - { - $cookie = clone $this; - $cookie->path = '' === $path ? '/' : $path; - - return $cookie; - } - - /** - * Creates a cookie copy that only be transmitted over a secure HTTPS connection from the client. - * - * @return static - */ - public function withSecure(bool $secure = true): self - { - $cookie = clone $this; - $cookie->secure = $secure; - - return $cookie; - } - - /** - * Creates a cookie copy that be accessible only through the HTTP protocol. - * - * @return static - */ - public function withHttpOnly(bool $httpOnly = true): self - { - $cookie = clone $this; - $cookie->httpOnly = $httpOnly; - - return $cookie; - } - - /** - * Creates a cookie copy that uses no url encoding. - * - * @return static - */ - public function withRaw(bool $raw = true): self - { - if ($raw && false !== strpbrk($this->name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $this->name)); - } - - $cookie = clone $this; - $cookie->raw = $raw; - - return $cookie; - } - - /** - * Creates a cookie copy with SameSite attribute. - * - * @return static - */ - public function withSameSite(?string $sameSite): self - { - if ('' === $sameSite) { - $sameSite = null; - } elseif (null !== $sameSite) { - $sameSite = strtolower($sameSite); - } - - if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) { - throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); - } - - $cookie = clone $this; - $cookie->sameSite = $sameSite; - - return $cookie; - } - - /** - * Returns the cookie as a string. - * - * @return string - */ - public function __toString() - { - if ($this->isRaw()) { - $str = $this->getName(); - } else { - $str = str_replace(self::RESERVED_CHARS_FROM, self::RESERVED_CHARS_TO, $this->getName()); - } - - $str .= '='; - - if ('' === (string) $this->getValue()) { - $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; Max-Age=0'; - } else { - $str .= $this->isRaw() ? $this->getValue() : rawurlencode($this->getValue()); - - if (0 !== $this->getExpiresTime()) { - $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()).'; Max-Age='.$this->getMaxAge(); - } - } - - if ($this->getPath()) { - $str .= '; path='.$this->getPath(); - } - - if ($this->getDomain()) { - $str .= '; domain='.$this->getDomain(); - } - - if (true === $this->isSecure()) { - $str .= '; secure'; - } - - if (true === $this->isHttpOnly()) { - $str .= '; httponly'; - } - - if (null !== $this->getSameSite()) { - $str .= '; samesite='.$this->getSameSite(); - } - - return $str; - } - - /** - * Gets the name of the cookie. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Gets the value of the cookie. - * - * @return string|null - */ - public function getValue() - { - return $this->value; - } - - /** - * Gets the domain that the cookie is available to. - * - * @return string|null - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Gets the time the cookie expires. - * - * @return int - */ - public function getExpiresTime() - { - return $this->expire; - } - - /** - * Gets the max-age attribute. - * - * @return int - */ - public function getMaxAge() - { - $maxAge = $this->expire - time(); - - return 0 >= $maxAge ? 0 : $maxAge; - } - - /** - * Gets the path on the server in which the cookie will be available on. - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client. - * - * @return bool - */ - public function isSecure() - { - return $this->secure ?? $this->secureDefault; - } - - /** - * Checks whether the cookie will be made accessible only through the HTTP protocol. - * - * @return bool - */ - public function isHttpOnly() - { - return $this->httpOnly; - } - - /** - * Whether this cookie is about to be cleared. - * - * @return bool - */ - public function isCleared() - { - return 0 !== $this->expire && $this->expire < time(); - } - - /** - * Checks if the cookie value should be sent with no url encoding. - * - * @return bool - */ - public function isRaw() - { - return $this->raw; - } - - /** - * Gets the SameSite attribute. - * - * @return string|null - */ - public function getSameSite() - { - return $this->sameSite; - } - - /** - * @param bool $default The default value of the "secure" flag when it is set to null - */ - public function setSecureDefault(bool $default): void - { - $this->secureDefault = $default; - } -} diff --git a/vendor/symfony/http-foundation/Exception/BadRequestException.php b/vendor/symfony/http-foundation/Exception/BadRequestException.php deleted file mode 100644 index e4bb309..0000000 --- a/vendor/symfony/http-foundation/Exception/BadRequestException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user sends a malformed request. - */ -class BadRequestException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php b/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php deleted file mode 100644 index 5fcf5b4..0000000 --- a/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * The HTTP request contains headers with conflicting information. - * - * @author Magnus Nordlander - */ -class ConflictingHeadersException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/JsonException.php b/vendor/symfony/http-foundation/Exception/JsonException.php deleted file mode 100644 index 5990e76..0000000 --- a/vendor/symfony/http-foundation/Exception/JsonException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Thrown by Request::toArray() when the content cannot be JSON-decoded. - * - * @author Tobias Nyholm - */ -final class JsonException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php b/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php deleted file mode 100644 index 478d0dc..0000000 --- a/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Interface for Request exceptions. - * - * Exceptions implementing this interface should trigger an HTTP 400 response in the application code. - */ -interface RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php b/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php deleted file mode 100644 index 9c719aa..0000000 --- a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a session does not exists. This happens in the following cases: - * - the session is not enabled - * - attempt to read a session outside a request context (ie. cli script). - * - * @author Jérémy Derussé - */ -class SessionNotFoundException extends \LogicException implements RequestExceptionInterface -{ - public function __construct(string $message = 'There is currently no session available.', int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - } -} diff --git a/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php b/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php deleted file mode 100644 index ae7a5f1..0000000 --- a/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user has performed an operation that should be considered - * suspicious from a security perspective. - */ -class SuspiciousOperationException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php b/vendor/symfony/http-foundation/ExpressionRequestMatcher.php deleted file mode 100644 index 26bed7d..0000000 --- a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; - -/** - * ExpressionRequestMatcher uses an expression to match a Request. - * - * @author Fabien Potencier - */ -class ExpressionRequestMatcher extends RequestMatcher -{ - private $language; - private $expression; - - public function setExpression(ExpressionLanguage $language, $expression) - { - $this->language = $language; - $this->expression = $expression; - } - - public function matches(Request $request) - { - if (!$this->language) { - throw new \LogicException('Unable to match the request as the expression language is not available.'); - } - - return $this->language->evaluate($this->expression, [ - 'request' => $request, - 'method' => $request->getMethod(), - 'path' => rawurldecode($request->getPathInfo()), - 'host' => $request->getHost(), - 'ip' => $request->getClientIp(), - 'attributes' => $request->attributes->all(), - ]) && parent::matches($request); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php b/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php deleted file mode 100644 index 136d2a9..0000000 --- a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when the access on a file was denied. - * - * @author Bernhard Schussek - */ -class AccessDeniedException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file %s could not be accessed', $path)); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php b/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php deleted file mode 100644 index c49f53a..0000000 --- a/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_CANT_WRITE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class CannotWriteFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php b/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php deleted file mode 100644 index ed83499..0000000 --- a/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_EXTENSION error occurred with UploadedFile. - * - * @author Florent Mata - */ -class ExtensionFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/FileException.php b/vendor/symfony/http-foundation/File/Exception/FileException.php deleted file mode 100644 index fad5133..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred in the component File. - * - * @author Bernhard Schussek - */ -class FileException extends \RuntimeException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php b/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php deleted file mode 100644 index 31bdf68..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when a file was not found. - * - * @author Bernhard Schussek - */ -class FileNotFoundException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file "%s" does not exist', $path)); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php b/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php deleted file mode 100644 index 8741be0..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_FORM_SIZE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class FormSizeFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php b/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php deleted file mode 100644 index c8fde61..0000000 --- a/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_INI_SIZE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class IniSizeFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/NoFileException.php b/vendor/symfony/http-foundation/File/Exception/NoFileException.php deleted file mode 100644 index 4b48cc7..0000000 --- a/vendor/symfony/http-foundation/File/Exception/NoFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_FILE error occurred with UploadedFile. - * - * @author Florent Mata - */ -class NoFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php b/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php deleted file mode 100644 index bdead2d..0000000 --- a/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_TMP_DIR error occurred with UploadedFile. - * - * @author Florent Mata - */ -class NoTmpDirFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/PartialFileException.php b/vendor/symfony/http-foundation/File/Exception/PartialFileException.php deleted file mode 100644 index 4641efb..0000000 --- a/vendor/symfony/http-foundation/File/Exception/PartialFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_PARTIAL error occurred with UploadedFile. - * - * @author Florent Mata - */ -class PartialFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php b/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php deleted file mode 100644 index 8533f99..0000000 --- a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -class UnexpectedTypeException extends FileException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, get_debug_type($value))); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/UploadException.php b/vendor/symfony/http-foundation/File/Exception/UploadException.php deleted file mode 100644 index 7074e76..0000000 --- a/vendor/symfony/http-foundation/File/Exception/UploadException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred during file upload. - * - * @author Bernhard Schussek - */ -class UploadException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php deleted file mode 100644 index d941577..0000000 --- a/vendor/symfony/http-foundation/File/File.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file in the file system. - * - * @author Bernhard Schussek - */ -class File extends \SplFileInfo -{ - /** - * Constructs a new file from the given path. - * - * @param string $path The path to the file - * @param bool $checkPath Whether to check the path or not - * - * @throws FileNotFoundException If the given path is not a file - */ - public function __construct(string $path, bool $checkPath = true) - { - if ($checkPath && !is_file($path)) { - throw new FileNotFoundException($path); - } - - parent::__construct($path); - } - - /** - * Returns the extension based on the mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getMimeType() - * to guess the file extension. - * - * @return string|null - * - * @see MimeTypes - * @see getMimeType() - */ - public function guessExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getMimeType())[0] ?? null; - } - - /** - * Returns the mime type of the file. - * - * The mime type is guessed using a MimeTypeGuesserInterface instance, - * which uses finfo_file() then the "file" system binary, - * depending on which of those are available. - * - * @return string|null - * - * @see MimeTypes - */ - public function getMimeType() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the mime type as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->guessMimeType($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return self - * - * @throws FileException if the target file could not be created - */ - public function move(string $directory, string $name = null) - { - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $renamed = rename($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$renamed) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - public function getContent(): string - { - $content = file_get_contents($this->getPathname()); - - if (false === $content) { - throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname())); - } - - return $content; - } - - /** - * @return self - */ - protected function getTargetFile(string $directory, string $name = null) - { - if (!is_dir($directory)) { - if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { - throw new FileException(sprintf('Unable to create the "%s" directory.', $directory)); - } - } elseif (!is_writable($directory)) { - throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory)); - } - - $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); - - return new self($target, false); - } - - /** - * Returns locale independent base name of the given path. - * - * @return string - */ - protected function getName(string $name) - { - $originalName = str_replace('\\', '/', $name); - $pos = strrpos($originalName, '/'); - $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1); - - return $originalName; - } -} diff --git a/vendor/symfony/http-foundation/File/Stream.php b/vendor/symfony/http-foundation/File/Stream.php deleted file mode 100644 index cef3e03..0000000 --- a/vendor/symfony/http-foundation/File/Stream.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -/** - * A PHP stream of unknown size. - * - * @author Nicolas Grekas - */ -class Stream extends File -{ - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function getSize() - { - return false; - } -} diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php deleted file mode 100644 index 5cfe8c4..0000000 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ /dev/null @@ -1,290 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\CannotWriteFileException; -use Symfony\Component\HttpFoundation\File\Exception\ExtensionFileException; -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\HttpFoundation\File\Exception\FormSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException; -use Symfony\Component\HttpFoundation\File\Exception\PartialFileException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file uploaded through a form. - * - * @author Bernhard Schussek - * @author Florian Eckerstorfer - * @author Fabien Potencier - */ -class UploadedFile extends File -{ - private $test; - private $originalName; - private $mimeType; - private $error; - - /** - * Accepts the information of the uploaded file as provided by the PHP global $_FILES. - * - * The file object is only created when the uploaded file is valid (i.e. when the - * isValid() method returns true). Otherwise the only methods that could be called - * on an UploadedFile instance are: - * - * * getClientOriginalName, - * * getClientMimeType, - * * isValid, - * * getError. - * - * Calling any other method on an non-valid instance will cause an unpredictable result. - * - * @param string $path The full temporary path to the file - * @param string $originalName The original file name of the uploaded file - * @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream - * @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK - * @param bool $test Whether the test mode is active - * Local files are used in test mode hence the code should not enforce HTTP uploads - * - * @throws FileException If file_uploads is disabled - * @throws FileNotFoundException If the file does not exist - */ - public function __construct(string $path, string $originalName, string $mimeType = null, int $error = null, bool $test = false) - { - $this->originalName = $this->getName($originalName); - $this->mimeType = $mimeType ?: 'application/octet-stream'; - $this->error = $error ?: \UPLOAD_ERR_OK; - $this->test = $test; - - parent::__construct($path, \UPLOAD_ERR_OK === $this->error); - } - - /** - * Returns the original file name. - * - * It is extracted from the request from which the file has been uploaded. - * Then it should not be considered as a safe value. - * - * @return string - */ - public function getClientOriginalName() - { - return $this->originalName; - } - - /** - * Returns the original file extension. - * - * It is extracted from the original file name that was uploaded. - * Then it should not be considered as a safe value. - * - * @return string - */ - public function getClientOriginalExtension() - { - return pathinfo($this->originalName, \PATHINFO_EXTENSION); - } - - /** - * Returns the file mime type. - * - * The client mime type is extracted from the request from which the file - * was uploaded, so it should not be considered as a safe value. - * - * For a trusted mime type, use getMimeType() instead (which guesses the mime - * type based on the file content). - * - * @return string - * - * @see getMimeType() - */ - public function getClientMimeType() - { - return $this->mimeType; - } - - /** - * Returns the extension based on the client mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getClientMimeType() - * to guess the file extension. As such, the extension returned - * by this method cannot be trusted. - * - * For a trusted extension, use guessExtension() instead (which guesses - * the extension based on the guessed mime type for the file). - * - * @return string|null - * - * @see guessExtension() - * @see getClientMimeType() - */ - public function guessClientExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getClientMimeType())[0] ?? null; - } - - /** - * Returns the upload error. - * - * If the upload was successful, the constant UPLOAD_ERR_OK is returned. - * Otherwise one of the other UPLOAD_ERR_XXX constants is returned. - * - * @return int - */ - public function getError() - { - return $this->error; - } - - /** - * Returns whether the file has been uploaded with HTTP and no error occurred. - * - * @return bool - */ - public function isValid() - { - $isOk = \UPLOAD_ERR_OK === $this->error; - - return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return File - * - * @throws FileException if, for any reason, the file could not have been moved - */ - public function move(string $directory, string $name = null) - { - if ($this->isValid()) { - if ($this->test) { - return parent::move($directory, $name); - } - - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $moved = move_uploaded_file($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$moved) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - switch ($this->error) { - case \UPLOAD_ERR_INI_SIZE: - throw new IniSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_FORM_SIZE: - throw new FormSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_PARTIAL: - throw new PartialFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_FILE: - throw new NoFileException($this->getErrorMessage()); - case \UPLOAD_ERR_CANT_WRITE: - throw new CannotWriteFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_TMP_DIR: - throw new NoTmpDirFileException($this->getErrorMessage()); - case \UPLOAD_ERR_EXTENSION: - throw new ExtensionFileException($this->getErrorMessage()); - } - - throw new FileException($this->getErrorMessage()); - } - - /** - * Returns the maximum size of an uploaded file as configured in php.ini. - * - * @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX) - */ - public static function getMaxFilesize() - { - $sizePostMax = self::parseFilesize(ini_get('post_max_size')); - $sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize')); - - return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX); - } - - /** - * Returns the given size from an ini value in bytes. - * - * @return int|float Returns float if size > PHP_INT_MAX - */ - private static function parseFilesize(string $size) - { - if ('' === $size) { - return 0; - } - - $size = strtolower($size); - - $max = ltrim($size, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($size, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Returns an informative upload error message. - * - * @return string - */ - public function getErrorMessage() - { - static $errors = [ - \UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', - \UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', - \UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', - \UPLOAD_ERR_NO_FILE => 'No file was uploaded.', - \UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', - \UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', - \UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', - ]; - - $errorCode = $this->error; - $maxFilesize = \UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; - $message = $errors[$errorCode] ?? 'The file "%s" was not uploaded due to an unknown error.'; - - return sprintf($message, $this->getClientOriginalName(), $maxFilesize); - } -} diff --git a/vendor/symfony/http-foundation/FileBag.php b/vendor/symfony/http-foundation/FileBag.php deleted file mode 100644 index ff5ab77..0000000 --- a/vendor/symfony/http-foundation/FileBag.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\UploadedFile; - -/** - * FileBag is a container for uploaded files. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - */ -class FileBag extends ParameterBag -{ - private const FILE_KEYS = ['error', 'name', 'size', 'tmp_name', 'type']; - - /** - * @param array|UploadedFile[] $parameters An array of HTTP files - */ - public function __construct(array $parameters = []) - { - $this->replace($parameters); - } - - /** - * {@inheritdoc} - */ - public function replace(array $files = []) - { - $this->parameters = []; - $this->add($files); - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $value) - { - if (!\is_array($value) && !$value instanceof UploadedFile) { - throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); - } - - parent::set($key, $this->convertFileInformation($value)); - } - - /** - * {@inheritdoc} - */ - public function add(array $files = []) - { - foreach ($files as $key => $file) { - $this->set($key, $file); - } - } - - /** - * Converts uploaded files to UploadedFile instances. - * - * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information - * - * @return UploadedFile[]|UploadedFile|null - */ - protected function convertFileInformation($file) - { - if ($file instanceof UploadedFile) { - return $file; - } - - $file = $this->fixPhpFilesArray($file); - $keys = array_keys($file); - sort($keys); - - if (self::FILE_KEYS == $keys) { - if (\UPLOAD_ERR_NO_FILE == $file['error']) { - $file = null; - } else { - $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error'], false); - } - } else { - $file = array_map(function ($v) { return $v instanceof UploadedFile || \is_array($v) ? $this->convertFileInformation($v) : $v; }, $file); - if (array_keys($keys) === $keys) { - $file = array_filter($file); - } - } - - return $file; - } - - /** - * Fixes a malformed PHP $_FILES array. - * - * PHP has a bug that the format of the $_FILES array differs, depending on - * whether the uploaded file fields had normal field names or array-like - * field names ("normal" vs. "parent[child]"). - * - * This method fixes the array to look like the "normal" $_FILES array. - * - * It's safe to pass an already converted array, in which case this method - * just returns the original array unmodified. - * - * @return array - */ - protected function fixPhpFilesArray(array $data) - { - // Remove extra key added by PHP 8.1. - unset($data['full_path']); - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS != $keys || !isset($data['name']) || !\is_array($data['name'])) { - return $data; - } - - $files = $data; - foreach (self::FILE_KEYS as $k) { - unset($files[$k]); - } - - foreach ($data['name'] as $key => $name) { - $files[$key] = $this->fixPhpFilesArray([ - 'error' => $data['error'][$key], - 'name' => $name, - 'type' => $data['type'][$key], - 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], - ]); - } - - return $files; - } -} diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php deleted file mode 100644 index 4683a68..0000000 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ /dev/null @@ -1,295 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HeaderBag is a container for HTTP headers. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate> - */ -class HeaderBag implements \IteratorAggregate, \Countable -{ - protected const UPPER = '_ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - protected const LOWER = '-abcdefghijklmnopqrstuvwxyz'; - - /** - * @var array> - */ - protected $headers = []; - protected $cacheControl = []; - - public function __construct(array $headers = []) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the headers as a string. - * - * @return string - */ - public function __toString() - { - if (!$headers = $this->all()) { - return ''; - } - - ksort($headers); - $max = max(array_map('strlen', array_keys($headers))) + 1; - $content = ''; - foreach ($headers as $name => $values) { - $name = ucwords($name, '-'); - foreach ($values as $value) { - $content .= sprintf("%-{$max}s %s\r\n", $name.':', $value); - } - } - - return $content; - } - - /** - * Returns the headers. - * - * @param string|null $key The name of the headers to return or null to get them all - * - * @return array>|array - */ - public function all(string $key = null) - { - if (null !== $key) { - return $this->headers[strtr($key, self::UPPER, self::LOWER)] ?? []; - } - - return $this->headers; - } - - /** - * Returns the parameter keys. - * - * @return string[] - */ - public function keys() - { - return array_keys($this->all()); - } - - /** - * Replaces the current HTTP headers by a new set. - */ - public function replace(array $headers = []) - { - $this->headers = []; - $this->add($headers); - } - - /** - * Adds new headers the current HTTP headers set. - */ - public function add(array $headers) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the first header by name or the default one. - * - * @return string|null - */ - public function get(string $key, string $default = null) - { - $headers = $this->all($key); - - if (!$headers) { - return $default; - } - - if (null === $headers[0]) { - return null; - } - - return (string) $headers[0]; - } - - /** - * Sets a header by name. - * - * @param string|string[]|null $values The value or an array of values - * @param bool $replace Whether to replace the actual value or not (true by default) - */ - public function set(string $key, $values, bool $replace = true) - { - $key = strtr($key, self::UPPER, self::LOWER); - - if (\is_array($values)) { - $values = array_values($values); - - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = $values; - } else { - $this->headers[$key] = array_merge($this->headers[$key], $values); - } - } else { - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = [$values]; - } else { - $this->headers[$key][] = $values; - } - } - - if ('cache-control' === $key) { - $this->cacheControl = $this->parseCacheControl(implode(', ', $this->headers[$key])); - } - } - - /** - * Returns true if the HTTP header is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists(strtr($key, self::UPPER, self::LOWER), $this->all()); - } - - /** - * Returns true if the given HTTP header contains the given value. - * - * @return bool - */ - public function contains(string $key, string $value) - { - return \in_array($value, $this->all($key)); - } - - /** - * Removes a header. - */ - public function remove(string $key) - { - $key = strtr($key, self::UPPER, self::LOWER); - - unset($this->headers[$key]); - - if ('cache-control' === $key) { - $this->cacheControl = []; - } - } - - /** - * Returns the HTTP header value converted to a date. - * - * @return \DateTimeInterface|null - * - * @throws \RuntimeException When the HTTP header is not parseable - */ - public function getDate(string $key, \DateTime $default = null) - { - if (null === $value = $this->get($key)) { - return $default; - } - - if (false === $date = \DateTime::createFromFormat(\DATE_RFC2822, $value)) { - throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value)); - } - - return $date; - } - - /** - * Adds a custom Cache-Control directive. - * - * @param bool|string $value The Cache-Control directive value - */ - public function addCacheControlDirective(string $key, $value = true) - { - $this->cacheControl[$key] = $value; - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns true if the Cache-Control directive is defined. - * - * @return bool - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->cacheControl); - } - - /** - * Returns a Cache-Control directive value by name. - * - * @return bool|string|null - */ - public function getCacheControlDirective(string $key) - { - return $this->cacheControl[$key] ?? null; - } - - /** - * Removes a Cache-Control directive. - */ - public function removeCacheControlDirective(string $key) - { - unset($this->cacheControl[$key]); - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns an iterator for headers. - * - * @return \ArrayIterator> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->headers); - } - - /** - * Returns the number of headers. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->headers); - } - - protected function getCacheControlHeader() - { - ksort($this->cacheControl); - - return HeaderUtils::toString($this->cacheControl, ','); - } - - /** - * Parses a Cache-Control HTTP header. - * - * @return array - */ - protected function parseCacheControl(string $header) - { - $parts = HeaderUtils::split($header, ',='); - - return HeaderUtils::combine($parts); - } -} diff --git a/vendor/symfony/http-foundation/HeaderUtils.php b/vendor/symfony/http-foundation/HeaderUtils.php deleted file mode 100644 index 1d56be0..0000000 --- a/vendor/symfony/http-foundation/HeaderUtils.php +++ /dev/null @@ -1,293 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HTTP header utility functions. - * - * @author Christian Schmidt - */ -class HeaderUtils -{ - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Splits an HTTP header by one or more separators. - * - * Example: - * - * HeaderUtils::split("da, en-gb;q=0.8", ",;") - * // => ['da'], ['en-gb', 'q=0.8']] - * - * @param string $separators List of characters to split on, ordered by - * precedence, e.g. ",", ";=", or ",;=" - * - * @return array Nested array with as many levels as there are characters in - * $separators - */ - public static function split(string $header, string $separators): array - { - $quotedSeparators = preg_quote($separators, '/'); - - preg_match_all(' - / - (?!\s) - (?: - # quoted-string - "(?:[^"\\\\]|\\\\.)*(?:"|\\\\|$) - | - # token - [^"'.$quotedSeparators.']+ - )+ - (?['.$quotedSeparators.']) - \s* - /x', trim($header), $matches, \PREG_SET_ORDER); - - return self::groupParts($matches, $separators); - } - - /** - * Combines an array of arrays into one associative array. - * - * Each of the nested arrays should have one or two elements. The first - * value will be used as the keys in the associative array, and the second - * will be used as the values, or true if the nested array only contains one - * element. Array keys are lowercased. - * - * Example: - * - * HeaderUtils::combine([["foo", "abc"], ["bar"]]) - * // => ["foo" => "abc", "bar" => true] - */ - public static function combine(array $parts): array - { - $assoc = []; - foreach ($parts as $part) { - $name = strtolower($part[0]); - $value = $part[1] ?? true; - $assoc[$name] = $value; - } - - return $assoc; - } - - /** - * Joins an associative array into a string for use in an HTTP header. - * - * The key and value of each entry are joined with "=", and all entries - * are joined with the specified separator and an additional space (for - * readability). Values are quoted if necessary. - * - * Example: - * - * HeaderUtils::toString(["foo" => "abc", "bar" => true, "baz" => "a b c"], ",") - * // => 'foo=abc, bar, baz="a b c"' - */ - public static function toString(array $assoc, string $separator): string - { - $parts = []; - foreach ($assoc as $name => $value) { - if (true === $value) { - $parts[] = $name; - } else { - $parts[] = $name.'='.self::quote($value); - } - } - - return implode($separator.' ', $parts); - } - - /** - * Encodes a string as a quoted string, if necessary. - * - * If a string contains characters not allowed by the "token" construct in - * the HTTP specification, it is backslash-escaped and enclosed in quotes - * to match the "quoted-string" construct. - */ - public static function quote(string $s): string - { - if (preg_match('/^[a-z0-9!#$%&\'*.^_`|~-]+$/i', $s)) { - return $s; - } - - return '"'.addcslashes($s, '"\\"').'"'; - } - - /** - * Decodes a quoted string. - * - * If passed an unquoted string that matches the "token" construct (as - * defined in the HTTP specification), it is passed through verbatimly. - */ - public static function unquote(string $s): string - { - return preg_replace('/\\\\(.)|"/', '$1', $s); - } - - /** - * Generates an HTTP Content-Disposition field-value. - * - * @param string $disposition One of "inline" or "attachment" - * @param string $filename A unicode string - * @param string $filenameFallback A string containing only ASCII characters that - * is semantically equivalent to $filename. If the filename is already ASCII, - * it can be omitted, or just copied from $filename - * - * @throws \InvalidArgumentException - * - * @see RFC 6266 - */ - public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string - { - if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) { - throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); - } - - if ('' === $filenameFallback) { - $filenameFallback = $filename; - } - - // filenameFallback is not ASCII. - if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) { - throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); - } - - // percent characters aren't safe in fallback. - if (str_contains($filenameFallback, '%')) { - throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); - } - - // path separators aren't allowed in either. - if (str_contains($filename, '/') || str_contains($filename, '\\') || str_contains($filenameFallback, '/') || str_contains($filenameFallback, '\\')) { - throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); - } - - $params = ['filename' => $filenameFallback]; - if ($filename !== $filenameFallback) { - $params['filename*'] = "utf-8''".rawurlencode($filename); - } - - return $disposition.'; '.self::toString($params, ';'); - } - - /** - * Like parse_str(), but preserves dots in variable names. - */ - public static function parseQuery(string $query, bool $ignoreBrackets = false, string $separator = '&'): array - { - $q = []; - - foreach (explode($separator, $query) as $v) { - if (false !== $i = strpos($v, "\0")) { - $v = substr($v, 0, $i); - } - - if (false === $i = strpos($v, '=')) { - $k = urldecode($v); - $v = ''; - } else { - $k = urldecode(substr($v, 0, $i)); - $v = substr($v, $i); - } - - if (false !== $i = strpos($k, "\0")) { - $k = substr($k, 0, $i); - } - - $k = ltrim($k, ' '); - - if ($ignoreBrackets) { - $q[$k][] = urldecode(substr($v, 1)); - - continue; - } - - if (false === $i = strpos($k, '[')) { - $q[] = bin2hex($k).$v; - } else { - $q[] = bin2hex(substr($k, 0, $i)).rawurlencode(substr($k, $i)).$v; - } - } - - if ($ignoreBrackets) { - return $q; - } - - parse_str(implode('&', $q), $q); - - $query = []; - - foreach ($q as $k => $v) { - if (false !== $i = strpos($k, '_')) { - $query[substr_replace($k, hex2bin(substr($k, 0, $i)).'[', 0, 1 + $i)] = $v; - } else { - $query[hex2bin($k)] = $v; - } - } - - return $query; - } - - private static function groupParts(array $matches, string $separators, bool $first = true): array - { - $separator = $separators[0]; - $partSeparators = substr($separators, 1); - - $i = 0; - $partMatches = []; - $previousMatchWasSeparator = false; - foreach ($matches as $match) { - if (!$first && $previousMatchWasSeparator && isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; - $partMatches[$i][] = $match; - } elseif (isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; - ++$i; - } else { - $previousMatchWasSeparator = false; - $partMatches[$i][] = $match; - } - } - - $parts = []; - if ($partSeparators) { - foreach ($partMatches as $matches) { - $parts[] = self::groupParts($matches, $partSeparators, false); - } - } else { - foreach ($partMatches as $matches) { - $parts[] = self::unquote($matches[0][0]); - } - - if (!$first && 2 < \count($parts)) { - $parts = [ - $parts[0], - implode($separator, \array_slice($parts, 1)), - ]; - } - } - - return $parts; - } -} diff --git a/vendor/symfony/http-foundation/InputBag.php b/vendor/symfony/http-foundation/InputBag.php deleted file mode 100644 index b36001d..0000000 --- a/vendor/symfony/http-foundation/InputBag.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE. - * - * @author Saif Eddin Gmati - */ -final class InputBag extends ParameterBag -{ - /** - * Returns a scalar input value by name. - * - * @param string|int|float|bool|null $default The default value if the input key does not exist - * - * @return string|int|float|bool|null - */ - public function get(string $key, $default = null) - { - if (null !== $default && !is_scalar($default) && !(\is_object($default) && method_exists($default, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing a non-scalar value as 2nd argument to "%s()" is deprecated, pass a scalar or null instead.', __METHOD__); - } - - $value = parent::get($key, $this); - - if (null !== $value && $this !== $value && !is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-string value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__); - } - - return $this === $value ? $default : $value; - } - - /** - * {@inheritdoc} - */ - public function all(string $key = null): array - { - return parent::all($key); - } - - /** - * Replaces the current input values by a new set. - */ - public function replace(array $inputs = []) - { - $this->parameters = []; - $this->add($inputs); - } - - /** - * Adds input values. - */ - public function add(array $inputs = []) - { - foreach ($inputs as $input => $value) { - $this->set($input, $value); - } - } - - /** - * Sets an input by name. - * - * @param string|int|float|bool|array|null $value - */ - public function set(string $key, $value) - { - if (null !== $value && !is_scalar($value) && !\is_array($value) && !method_exists($value, '__toString')) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing "%s" as a 2nd Argument to "%s()" is deprecated, pass a scalar, array, or null instead.', get_debug_type($value), __METHOD__); - } - - $this->parameters[$key] = $value; - } - - /** - * {@inheritdoc} - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->has($key) ? $this->all()[$key] : $default; - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - if (\is_array($value) && !(($options['flags'] ?? 0) & (\FILTER_REQUIRE_ARRAY | \FILTER_FORCE_ARRAY))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Filtering an array value with "%s()" without passing the FILTER_REQUIRE_ARRAY or FILTER_FORCE_ARRAY flag is deprecated', __METHOD__); - - if (!isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } -} diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php deleted file mode 100644 index 24111f1..0000000 --- a/vendor/symfony/http-foundation/IpUtils.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Http utility functions. - * - * @author Fabien Potencier - */ -class IpUtils -{ - private static $checkedIps = []; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. - * - * @param string|array $ips List of IPs or subnets (can be a string if only a single one) - * - * @return bool - */ - public static function checkIp(?string $requestIp, $ips) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - if (!\is_array($ips)) { - $ips = [$ips]; - } - - $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; - - foreach ($ips as $ip) { - if (self::$method($requestIp, $ip)) { - return true; - } - } - - return false; - } - - /** - * Compares two IPv4 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @param string $ip IPv4 address or subnet in CIDR notation - * - * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet - */ - public static function checkIp4(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - return self::$checkedIps[$cacheKey] = false; - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if ('0' === $netmask) { - return self::$checkedIps[$cacheKey] = filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); - } - - if ($netmask < 0 || $netmask > 32) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - $address = $ip; - $netmask = 32; - } - - if (false === ip2long($address)) { - return self::$checkedIps[$cacheKey] = false; - } - - return self::$checkedIps[$cacheKey] = 0 === substr_compare(sprintf('%032b', ip2long($requestIp)), sprintf('%032b', ip2long($address)), 0, $netmask); - } - - /** - * Compares two IPv6 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @author David Soria Parra - * - * @see https://github.com/dsp/v6tools - * - * @param string $ip IPv6 address or subnet in CIDR notation - * - * @return bool - * - * @throws \RuntimeException When IPV6 support is not enabled - */ - public static function checkIp6(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!((\extension_loaded('sockets') && \defined('AF_INET6')) || @inet_pton('::1'))) { - throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if ('0' === $netmask) { - return (bool) unpack('n*', @inet_pton($address)); - } - - if ($netmask < 1 || $netmask > 128) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - $address = $ip; - $netmask = 128; - } - - $bytesAddr = unpack('n*', @inet_pton($address)); - $bytesTest = unpack('n*', @inet_pton($requestIp)); - - if (!$bytesAddr || !$bytesTest) { - return self::$checkedIps[$cacheKey] = false; - } - - for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) { - $left = $netmask - 16 * ($i - 1); - $left = ($left <= 16) ? $left : 16; - $mask = ~(0xFFFF >> $left) & 0xFFFF; - if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) { - return self::$checkedIps[$cacheKey] = false; - } - } - - return self::$checkedIps[$cacheKey] = true; - } - - /** - * Anonymizes an IP/IPv6. - * - * Removes the last byte for v4 and the last 8 bytes for v6 IPs - */ - public static function anonymize(string $ip): string - { - $wrappedIPv6 = false; - if ('[' === substr($ip, 0, 1) && ']' === substr($ip, -1, 1)) { - $wrappedIPv6 = true; - $ip = substr($ip, 1, -1); - } - - $packedAddress = inet_pton($ip); - if (4 === \strlen($packedAddress)) { - $mask = '255.255.255.0'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff:ffff'))) { - $mask = '::ffff:ffff:ff00'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff'))) { - $mask = '::ffff:ff00'; - } else { - $mask = 'ffff:ffff:ffff:ffff:0000:0000:0000:0000'; - } - $ip = inet_ntop($packedAddress & inet_pton($mask)); - - if ($wrappedIPv6) { - $ip = '['.$ip.']'; - } - - return $ip; - } -} diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php deleted file mode 100644 index 501a638..0000000 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ /dev/null @@ -1,221 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Response represents an HTTP response in JSON format. - * - * Note that this class does not force the returned JSON content to be an - * object. It is however recommended that you do return an object as it - * protects yourself against XSSI and JSON-JavaScript Hijacking. - * - * @see https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md#always-return-json-with-an-object-on-the-outside - * - * @author Igor Wiedler - */ -class JsonResponse extends Response -{ - protected $data; - protected $callback; - - // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. - // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT - public const DEFAULT_ENCODING_OPTIONS = 15; - - protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS; - - /** - * @param mixed $data The response data - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $json If the data is already a JSON string - */ - public function __construct($data = null, int $status = 200, array $headers = [], bool $json = false) - { - parent::__construct('', $status, $headers); - - if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) { - throw new \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data))); - } - - if (null === $data) { - $data = new \ArrayObject(); - } - - $json ? $this->setJson($data) : $this->setData($data); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::create(['key' => 'value']) - * ->setSharedMaxAge(300); - * - * @param mixed $data The JSON response data - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($data = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($data, $status, $headers); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::fromJsonString('{"key": "value"}') - * ->setSharedMaxAge(300); - * - * @param string $data The JSON response string - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - */ - public static function fromJsonString(string $data, int $status = 200, array $headers = []) - { - return new static($data, $status, $headers, true); - } - - /** - * Sets the JSONP callback. - * - * @param string|null $callback The JSONP callback or null to use none - * - * @return $this - * - * @throws \InvalidArgumentException When the callback name is not valid - */ - public function setCallback(string $callback = null) - { - if (null !== $callback) { - // partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/ - // partially taken from https://github.com/willdurand/JsonpCallbackValidator - // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. - // (c) William Durand - $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; - $reserved = [ - 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', - 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', - 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', - ]; - $parts = explode('.', $callback); - foreach ($parts as $part) { - if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { - throw new \InvalidArgumentException('The callback name is not valid.'); - } - } - } - - $this->callback = $callback; - - return $this->update(); - } - - /** - * Sets a raw string containing a JSON document to be sent. - * - * @return $this - */ - public function setJson(string $json) - { - $this->data = $json; - - return $this->update(); - } - - /** - * Sets the data to be sent as JSON. - * - * @param mixed $data - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setData($data = []) - { - try { - $data = json_encode($data, $this->encodingOptions); - } catch (\Exception $e) { - if ('Exception' === \get_class($e) && str_starts_with($e->getMessage(), 'Failed calling ')) { - throw $e->getPrevious() ?: $e; - } - throw $e; - } - - if (\PHP_VERSION_ID >= 70300 && (\JSON_THROW_ON_ERROR & $this->encodingOptions)) { - return $this->setJson($data); - } - - if (\JSON_ERROR_NONE !== json_last_error()) { - throw new \InvalidArgumentException(json_last_error_msg()); - } - - return $this->setJson($data); - } - - /** - * Returns options used while encoding data to JSON. - * - * @return int - */ - public function getEncodingOptions() - { - return $this->encodingOptions; - } - - /** - * Sets options used while encoding data to JSON. - * - * @return $this - */ - public function setEncodingOptions(int $encodingOptions) - { - $this->encodingOptions = $encodingOptions; - - return $this->setData(json_decode($this->data)); - } - - /** - * Updates the content and headers according to the JSON data and callback. - * - * @return $this - */ - protected function update() - { - if (null !== $this->callback) { - // Not using application/javascript for compatibility reasons with older browsers. - $this->headers->set('Content-Type', 'text/javascript'); - - return $this->setContent(sprintf('/**/%s(%s);', $this->callback, $this->data)); - } - - // Only set the header when there is none or when it equals 'text/javascript' (from a previous update with callback) - // in order to not overwrite a custom definition. - if (!$this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) { - $this->headers->set('Content-Type', 'application/json'); - } - - return $this->setContent($this->data); - } -} diff --git a/vendor/symfony/http-foundation/LICENSE b/vendor/symfony/http-foundation/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/http-foundation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php deleted file mode 100644 index 7d051ab..0000000 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ /dev/null @@ -1,228 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * ParameterBag is a container for key/value pairs. - * - * @author Fabien Potencier - * - * @implements \IteratorAggregate - */ -class ParameterBag implements \IteratorAggregate, \Countable -{ - /** - * Parameter storage. - */ - protected $parameters; - - public function __construct(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Returns the parameters. - * - * @param string|null $key The name of the parameter to return or null to get them all - * - * @return array - */ - public function all(/*string $key = null*/) - { - $key = \func_num_args() > 0 ? func_get_arg(0) : null; - - if (null === $key) { - return $this->parameters; - } - - if (!\is_array($value = $this->parameters[$key] ?? [])) { - throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value))); - } - - return $value; - } - - /** - * Returns the parameter keys. - * - * @return array - */ - public function keys() - { - return array_keys($this->parameters); - } - - /** - * Replaces the current parameters by a new set. - */ - public function replace(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Adds parameters. - */ - public function add(array $parameters = []) - { - $this->parameters = array_replace($this->parameters, $parameters); - } - - /** - * Returns a parameter by name. - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - */ - public function get(string $key, $default = null) - { - return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; - } - - /** - * Sets a parameter by name. - * - * @param mixed $value The value - */ - public function set(string $key, $value) - { - $this->parameters[$key] = $value; - } - - /** - * Returns true if the parameter is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists($key, $this->parameters); - } - - /** - * Removes a parameter. - */ - public function remove(string $key) - { - unset($this->parameters[$key]); - } - - /** - * Returns the alphabetic characters of the parameter value. - * - * @return string - */ - public function getAlpha(string $key, string $default = '') - { - return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the alphabetic characters and digits of the parameter value. - * - * @return string - */ - public function getAlnum(string $key, string $default = '') - { - return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the digits of the parameter value. - * - * @return string - */ - public function getDigits(string $key, string $default = '') - { - // we need to remove - and + because they're allowed in the filter - return str_replace(['-', '+'], '', $this->filter($key, $default, \FILTER_SANITIZE_NUMBER_INT)); - } - - /** - * Returns the parameter value converted to integer. - * - * @return int - */ - public function getInt(string $key, int $default = 0) - { - return (int) $this->get($key, $default); - } - - /** - * Returns the parameter value converted to boolean. - * - * @return bool - */ - public function getBoolean(string $key, bool $default = false) - { - return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN); - } - - /** - * Filter key. - * - * @param mixed $default Default = null - * @param int $filter FILTER_* constant - * @param mixed $options Filter options - * - * @see https://php.net/filter-var - * - * @return mixed - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->get($key, $default); - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - // Add a convenience check for arrays. - if (\is_array($value) && !isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } - - /** - * Returns an iterator for parameters. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->parameters); - } - - /** - * Returns the number of parameters. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->parameters); - } -} diff --git a/vendor/symfony/http-foundation/README.md b/vendor/symfony/http-foundation/README.md deleted file mode 100644 index 424f2c4..0000000 --- a/vendor/symfony/http-foundation/README.md +++ /dev/null @@ -1,28 +0,0 @@ -HttpFoundation Component -======================== - -The HttpFoundation component defines an object-oriented layer for the HTTP -specification. - -Sponsor -------- - -The HttpFoundation component for Symfony 5.4/6.0 is [backed][1] by [Laravel][2]. - -Laravel is a PHP web development framework that is passionate about maximum developer -happiness. Laravel is built using a variety of bespoke and Symfony based components. - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_foundation.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://laravel.com/ -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php b/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php deleted file mode 100644 index c91d614..0000000 --- a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\Policy\NoLimiter; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * An implementation of RequestRateLimiterInterface that - * fits most use-cases. - * - * @author Wouter de Jong - */ -abstract class AbstractRequestRateLimiter implements RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit - { - $limiters = $this->getLimiters($request); - if (0 === \count($limiters)) { - $limiters = [new NoLimiter()]; - } - - $minimalRateLimit = null; - foreach ($limiters as $limiter) { - $rateLimit = $limiter->consume(1); - - if (null === $minimalRateLimit || $rateLimit->getRemainingTokens() < $minimalRateLimit->getRemainingTokens()) { - $minimalRateLimit = $rateLimit; - } - } - - return $minimalRateLimit; - } - - public function reset(Request $request): void - { - foreach ($this->getLimiters($request) as $limiter) { - $limiter->reset(); - } - } - - /** - * @return LimiterInterface[] a set of limiters using keys extracted from the request - */ - abstract protected function getLimiters(Request $request): array; -} diff --git a/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php b/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php deleted file mode 100644 index 4c87a40..0000000 --- a/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * A special type of limiter that deals with requests. - * - * This allows to limit on different types of information - * from the requests. - * - * @author Wouter de Jong - */ -interface RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit; - - public function reset(Request $request): void; -} diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php deleted file mode 100644 index 2103280..0000000 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RedirectResponse represents an HTTP response doing a redirect. - * - * @author Fabien Potencier - */ -class RedirectResponse extends Response -{ - protected $targetUrl; - - /** - * Creates a redirect response so that it conforms to the rules defined for a redirect status code. - * - * @param string $url The URL to redirect to. The URL should be a full URL, with schema etc., - * but practically every browser redirects on paths only as well - * @param int $status The status code (302 by default) - * @param array $headers The headers (Location is always set to the given URL) - * - * @throws \InvalidArgumentException - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3 - */ - public function __construct(string $url, int $status = 302, array $headers = []) - { - parent::__construct('', $status, $headers); - - $this->setTargetUrl($url); - - if (!$this->isRedirect()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); - } - - if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) { - $this->headers->remove('cache-control'); - } - } - - /** - * Factory method for chainability. - * - * @param string $url The URL to redirect to - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($url = '', int $status = 302, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($url, $status, $headers); - } - - /** - * Returns the target URL. - * - * @return string - */ - public function getTargetUrl() - { - return $this->targetUrl; - } - - /** - * Sets the redirect target of this response. - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setTargetUrl(string $url) - { - if ('' === $url) { - throw new \InvalidArgumentException('Cannot redirect to an empty URL.'); - } - - $this->targetUrl = $url; - - $this->setContent( - sprintf(' - - - - - - Redirecting to %1$s - - - Redirecting to %1$s. - -', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); - - $this->headers->set('Location', $url); - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php deleted file mode 100644 index d112b1f..0000000 --- a/vendor/symfony/http-foundation/Request.php +++ /dev/null @@ -1,2147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; -use Symfony\Component\HttpFoundation\Exception\JsonException; -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeader::class); -class_exists(FileBag::class); -class_exists(HeaderBag::class); -class_exists(HeaderUtils::class); -class_exists(InputBag::class); -class_exists(ParameterBag::class); -class_exists(ServerBag::class); - -/** - * Request represents an HTTP request. - * - * The methods dealing with URL accept / return a raw path (% encoded): - * * getBasePath - * * getBaseUrl - * * getPathInfo - * * getRequestUri - * * getUri - * * getUriForPath - * - * @author Fabien Potencier - */ -class Request -{ - public const HEADER_FORWARDED = 0b000001; // When using RFC 7239 - public const HEADER_X_FORWARDED_FOR = 0b000010; - public const HEADER_X_FORWARDED_HOST = 0b000100; - public const HEADER_X_FORWARDED_PROTO = 0b001000; - public const HEADER_X_FORWARDED_PORT = 0b010000; - public const HEADER_X_FORWARDED_PREFIX = 0b100000; - - /** @deprecated since Symfony 5.2, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead. */ - public const HEADER_X_FORWARDED_ALL = 0b1011110; // All "X-Forwarded-*" headers sent by "usual" reverse proxy - public const HEADER_X_FORWARDED_AWS_ELB = 0b0011010; // AWS ELB doesn't send X-Forwarded-Host - public const HEADER_X_FORWARDED_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy - - public const METHOD_HEAD = 'HEAD'; - public const METHOD_GET = 'GET'; - public const METHOD_POST = 'POST'; - public const METHOD_PUT = 'PUT'; - public const METHOD_PATCH = 'PATCH'; - public const METHOD_DELETE = 'DELETE'; - public const METHOD_PURGE = 'PURGE'; - public const METHOD_OPTIONS = 'OPTIONS'; - public const METHOD_TRACE = 'TRACE'; - public const METHOD_CONNECT = 'CONNECT'; - - /** - * @var string[] - */ - protected static $trustedProxies = []; - - /** - * @var string[] - */ - protected static $trustedHostPatterns = []; - - /** - * @var string[] - */ - protected static $trustedHosts = []; - - protected static $httpMethodParameterOverride = false; - - /** - * Custom parameters. - * - * @var ParameterBag - */ - public $attributes; - - /** - * Request body parameters ($_POST). - * - * @var InputBag - */ - public $request; - - /** - * Query string parameters ($_GET). - * - * @var InputBag - */ - public $query; - - /** - * Server and execution environment parameters ($_SERVER). - * - * @var ServerBag - */ - public $server; - - /** - * Uploaded files ($_FILES). - * - * @var FileBag - */ - public $files; - - /** - * Cookies ($_COOKIE). - * - * @var InputBag - */ - public $cookies; - - /** - * Headers (taken from the $_SERVER). - * - * @var HeaderBag - */ - public $headers; - - /** - * @var string|resource|false|null - */ - protected $content; - - /** - * @var array - */ - protected $languages; - - /** - * @var array - */ - protected $charsets; - - /** - * @var array - */ - protected $encodings; - - /** - * @var array - */ - protected $acceptableContentTypes; - - /** - * @var string - */ - protected $pathInfo; - - /** - * @var string - */ - protected $requestUri; - - /** - * @var string - */ - protected $baseUrl; - - /** - * @var string - */ - protected $basePath; - - /** - * @var string - */ - protected $method; - - /** - * @var string - */ - protected $format; - - /** - * @var SessionInterface|callable(): SessionInterface - */ - protected $session; - - /** - * @var string - */ - protected $locale; - - /** - * @var string - */ - protected $defaultLocale = 'en'; - - /** - * @var array - */ - protected static $formats; - - protected static $requestFactory; - - /** - * @var string|null - */ - private $preferredFormat; - private $isHostValid = true; - private $isForwardedValid = true; - - /** - * @var bool|null - */ - private $isSafeContentPreferred; - - private static $trustedHeaderSet = -1; - - private const FORWARDED_PARAMS = [ - self::HEADER_X_FORWARDED_FOR => 'for', - self::HEADER_X_FORWARDED_HOST => 'host', - self::HEADER_X_FORWARDED_PROTO => 'proto', - self::HEADER_X_FORWARDED_PORT => 'host', - ]; - - /** - * Names for headers that can be trusted when - * using trusted proxies. - * - * The FORWARDED header is the standard as of rfc7239. - * - * The other headers are non-standard, but widely used - * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). - */ - private const TRUSTED_HEADERS = [ - self::HEADER_FORWARDED => 'FORWARDED', - self::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - self::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - self::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', - self::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX', - ]; - - /** - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Sets the parameters for this request. - * - * This method also re-initializes all properties. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->request = new InputBag($request); - $this->query = new InputBag($query); - $this->attributes = new ParameterBag($attributes); - $this->cookies = new InputBag($cookies); - $this->files = new FileBag($files); - $this->server = new ServerBag($server); - $this->headers = new HeaderBag($this->server->getHeaders()); - - $this->content = $content; - $this->languages = null; - $this->charsets = null; - $this->encodings = null; - $this->acceptableContentTypes = null; - $this->pathInfo = null; - $this->requestUri = null; - $this->baseUrl = null; - $this->basePath = null; - $this->method = null; - $this->format = null; - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @return static - */ - public static function createFromGlobals() - { - $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER); - - if (str_starts_with($request->headers->get('CONTENT_TYPE', ''), 'application/x-www-form-urlencoded') - && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH']) - ) { - parse_str($request->getContent(), $data); - $request->request = new InputBag($data); - } - - return $request; - } - - /** - * Creates a Request based on a given URI and configuration. - * - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string|resource|null $content The raw body data - * - * @return static - */ - public static function create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $server = array_replace([ - 'SERVER_NAME' => 'localhost', - 'SERVER_PORT' => 80, - 'HTTP_HOST' => 'localhost', - 'HTTP_USER_AGENT' => 'Symfony', - 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', - 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', - 'REMOTE_ADDR' => '127.0.0.1', - 'SCRIPT_NAME' => '', - 'SCRIPT_FILENAME' => '', - 'SERVER_PROTOCOL' => 'HTTP/1.1', - 'REQUEST_TIME' => time(), - 'REQUEST_TIME_FLOAT' => microtime(true), - ], $server); - - $server['PATH_INFO'] = ''; - $server['REQUEST_METHOD'] = strtoupper($method); - - $components = parse_url($uri); - if (isset($components['host'])) { - $server['SERVER_NAME'] = $components['host']; - $server['HTTP_HOST'] = $components['host']; - } - - if (isset($components['scheme'])) { - if ('https' === $components['scheme']) { - $server['HTTPS'] = 'on'; - $server['SERVER_PORT'] = 443; - } else { - unset($server['HTTPS']); - $server['SERVER_PORT'] = 80; - } - } - - if (isset($components['port'])) { - $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] .= ':'.$components['port']; - } - - if (isset($components['user'])) { - $server['PHP_AUTH_USER'] = $components['user']; - } - - if (isset($components['pass'])) { - $server['PHP_AUTH_PW'] = $components['pass']; - } - - if (!isset($components['path'])) { - $components['path'] = '/'; - } - - switch (strtoupper($method)) { - case 'POST': - case 'PUT': - case 'DELETE': - if (!isset($server['CONTENT_TYPE'])) { - $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; - } - // no break - case 'PATCH': - $request = $parameters; - $query = []; - break; - default: - $request = []; - $query = $parameters; - break; - } - - $queryString = ''; - if (isset($components['query'])) { - parse_str(html_entity_decode($components['query']), $qs); - - if ($query) { - $query = array_replace($qs, $query); - $queryString = http_build_query($query, '', '&'); - } else { - $query = $qs; - $queryString = $components['query']; - } - } elseif ($query) { - $queryString = http_build_query($query, '', '&'); - } - - $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); - $server['QUERY_STRING'] = $queryString; - - return self::createRequestFromFactory($query, $request, [], $cookies, $files, $server, $content); - } - - /** - * Sets a callable able to create a Request instance. - * - * This is mainly useful when you need to override the Request class - * to keep BC with an existing system. It should not be used for any - * other purpose. - */ - public static function setFactory(?callable $callable) - { - self::$requestFactory = $callable; - } - - /** - * Clones a request and overrides some of its parameters. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * - * @return static - */ - public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) - { - $dup = clone $this; - if (null !== $query) { - $dup->query = new InputBag($query); - } - if (null !== $request) { - $dup->request = new InputBag($request); - } - if (null !== $attributes) { - $dup->attributes = new ParameterBag($attributes); - } - if (null !== $cookies) { - $dup->cookies = new InputBag($cookies); - } - if (null !== $files) { - $dup->files = new FileBag($files); - } - if (null !== $server) { - $dup->server = new ServerBag($server); - $dup->headers = new HeaderBag($dup->server->getHeaders()); - } - $dup->languages = null; - $dup->charsets = null; - $dup->encodings = null; - $dup->acceptableContentTypes = null; - $dup->pathInfo = null; - $dup->requestUri = null; - $dup->baseUrl = null; - $dup->basePath = null; - $dup->method = null; - $dup->format = null; - - if (!$dup->get('_format') && $this->get('_format')) { - $dup->attributes->set('_format', $this->get('_format')); - } - - if (!$dup->getRequestFormat(null)) { - $dup->setRequestFormat($this->getRequestFormat(null)); - } - - return $dup; - } - - /** - * Clones the current request. - * - * Note that the session is not cloned as duplicated requests - * are most of the time sub-requests of the main one. - */ - public function __clone() - { - $this->query = clone $this->query; - $this->request = clone $this->request; - $this->attributes = clone $this->attributes; - $this->cookies = clone $this->cookies; - $this->files = clone $this->files; - $this->server = clone $this->server; - $this->headers = clone $this->headers; - } - - /** - * Returns the request as a string. - * - * @return string - */ - public function __toString() - { - $content = $this->getContent(); - - $cookieHeader = ''; - $cookies = []; - - foreach ($this->cookies as $k => $v) { - $cookies[] = $k.'='.$v; - } - - if (!empty($cookies)) { - $cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n"; - } - - return - sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". - $this->headers. - $cookieHeader."\r\n". - $content; - } - - /** - * Overrides the PHP global variables according to this request instance. - * - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never overridden, see rfc1867 - */ - public function overrideGlobals() - { - $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), '', '&'))); - - $_GET = $this->query->all(); - $_POST = $this->request->all(); - $_SERVER = $this->server->all(); - $_COOKIE = $this->cookies->all(); - - foreach ($this->headers->all() as $key => $value) { - $key = strtoupper(str_replace('-', '_', $key)); - if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { - $_SERVER[$key] = implode(', ', $value); - } else { - $_SERVER['HTTP_'.$key] = implode(', ', $value); - } - } - - $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; - - $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); - $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; - - $_REQUEST = [[]]; - - foreach (str_split($requestOrder) as $order) { - $_REQUEST[] = $request[$order]; - } - - $_REQUEST = array_merge(...$_REQUEST); - } - - /** - * Sets a list of trusted proxies. - * - * You should only list the reverse proxies that you manage directly. - * - * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] - * @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies - */ - public static function setTrustedProxies(array $proxies, int $trustedHeaderSet) - { - if (self::HEADER_X_FORWARDED_ALL === $trustedHeaderSet) { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.'); - } - self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) { - if ('REMOTE_ADDR' !== $proxy) { - $proxies[] = $proxy; - } elseif (isset($_SERVER['REMOTE_ADDR'])) { - $proxies[] = $_SERVER['REMOTE_ADDR']; - } - - return $proxies; - }, []); - self::$trustedHeaderSet = $trustedHeaderSet; - } - - /** - * Gets the list of trusted proxies. - * - * @return array - */ - public static function getTrustedProxies() - { - return self::$trustedProxies; - } - - /** - * Gets the set of trusted headers from trusted proxies. - * - * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies - */ - public static function getTrustedHeaderSet() - { - return self::$trustedHeaderSet; - } - - /** - * Sets a list of trusted host patterns. - * - * You should only list the hosts you manage using regexs. - * - * @param array $hostPatterns A list of trusted host patterns - */ - public static function setTrustedHosts(array $hostPatterns) - { - self::$trustedHostPatterns = array_map(function ($hostPattern) { - return sprintf('{%s}i', $hostPattern); - }, $hostPatterns); - // we need to reset trusted hosts on trusted host patterns change - self::$trustedHosts = []; - } - - /** - * Gets the list of trusted host patterns. - * - * @return array - */ - public static function getTrustedHosts() - { - return self::$trustedHostPatterns; - } - - /** - * Normalizes a query string. - * - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @return string - */ - public static function normalizeQueryString(?string $qs) - { - if ('' === ($qs ?? '')) { - return ''; - } - - $qs = HeaderUtils::parseQuery($qs); - ksort($qs); - - return http_build_query($qs, '', '&', \PHP_QUERY_RFC3986); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered - * and used to send a "PUT" or "DELETE" request via the _method request parameter. - * If these methods are not protected against CSRF, this presents a possible vulnerability. - * - * The HTTP method can only be overridden when the real HTTP method is POST. - */ - public static function enableHttpMethodParameterOverride() - { - self::$httpMethodParameterOverride = true; - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @return bool - */ - public static function getHttpMethodParameterOverride() - { - return self::$httpMethodParameterOverride; - } - - /** - * Gets a "parameter" value from any bag. - * - * This method is mainly useful for libraries that want to provide some flexibility. If you don't need the - * flexibility in controllers, it is better to explicitly get request parameters from the appropriate - * public property instead (attributes, query, request). - * - * Order of precedence: PATH (routing placeholders or custom attributes), GET, POST - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - * - * @internal since Symfony 5.4, use explicit input sources instead - */ - public function get(string $key, $default = null) - { - if ($this !== $result = $this->attributes->get($key, $this)) { - return $result; - } - - if ($this->query->has($key)) { - return $this->query->all()[$key]; - } - - if ($this->request->has($key)) { - return $this->request->all()[$key]; - } - - return $default; - } - - /** - * Gets the Session. - * - * @return SessionInterface - */ - public function getSession() - { - $session = $this->session; - if (!$session instanceof SessionInterface && null !== $session) { - $this->setSession($session = $session()); - } - - if (null === $session) { - throw new SessionNotFoundException('Session has not been set.'); - } - - return $session; - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @return bool - */ - public function hasPreviousSession() - { - // the check for $this->session avoids malicious users trying to fake a session cookie with proper name - return $this->hasSession() && $this->cookies->has($this->getSession()->getName()); - } - - /** - * Whether the request contains a Session object. - * - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory` - * - * @return bool - */ - public function hasSession(/* bool $skipIfUninitialized = false */) - { - $skipIfUninitialized = \func_num_args() > 0 ? func_get_arg(0) : false; - - return null !== $this->session && (!$skipIfUninitialized || $this->session instanceof SessionInterface); - } - - public function setSession(SessionInterface $session) - { - $this->session = $session; - } - - /** - * @internal - * - * @param callable(): SessionInterface $factory - */ - public function setSessionFactory(callable $factory) - { - $this->session = $factory; - } - - /** - * Returns the client IP addresses. - * - * In the returned array the most trusted IP address is first, and the - * least trusted one last. The "real" client IP address is the last one, - * but this is also the least trusted one. Trusted proxies are stripped. - * - * Use this method carefully; you should use getClientIp() instead. - * - * @return array - * - * @see getClientIp() - */ - public function getClientIps() - { - $ip = $this->server->get('REMOTE_ADDR'); - - if (!$this->isFromTrustedProxy()) { - return [$ip]; - } - - return $this->getTrustedValues(self::HEADER_X_FORWARDED_FOR, $ip) ?: [$ip]; - } - - /** - * Returns the client IP address. - * - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via the $trustedHeaderSet - * argument of the Request::setTrustedProxies() method instead. - * - * @return string|null - * - * @see getClientIps() - * @see https://wikipedia.org/wiki/X-Forwarded-For - */ - public function getClientIp() - { - $ipAddresses = $this->getClientIps(); - - return $ipAddresses[0]; - } - - /** - * Returns current script name. - * - * @return string - */ - public function getScriptName() - { - return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); - } - - /** - * Returns the path being requested relative to the executed script. - * - * The path info always starts with a /. - * - * Suppose this request is instantiated from /mysite on localhost: - * - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getPathInfo() - { - if (null === $this->pathInfo) { - $this->pathInfo = $this->preparePathInfo(); - } - - return $this->pathInfo; - } - - /** - * Returns the root path from which this request is executed. - * - * Suppose that an index.php file instantiates this request object: - * - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getBasePath() - { - if (null === $this->basePath) { - $this->basePath = $this->prepareBasePath(); - } - - return $this->basePath; - } - - /** - * Returns the root URL from which this request is executed. - * - * The base URL never ends with a /. - * - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @return string The raw URL (i.e. not urldecoded) - */ - public function getBaseUrl() - { - $trustedPrefix = ''; - - // the proxy prefix must be prepended to any prefix being needed at the webserver level - if ($this->isFromTrustedProxy() && $trustedPrefixValues = $this->getTrustedValues(self::HEADER_X_FORWARDED_PREFIX)) { - $trustedPrefix = rtrim($trustedPrefixValues[0], '/'); - } - - return $trustedPrefix.$this->getBaseUrlReal(); - } - - /** - * Returns the real base URL received by the webserver from which this request is executed. - * The URL does not include trusted reverse proxy prefix. - * - * @return string The raw URL (i.e. not urldecoded) - */ - private function getBaseUrlReal(): string - { - if (null === $this->baseUrl) { - $this->baseUrl = $this->prepareBaseUrl(); - } - - return $this->baseUrl; - } - - /** - * Gets the request's scheme. - * - * @return string - */ - public function getScheme() - { - return $this->isSecure() ? 'https' : 'http'; - } - - /** - * Returns the port on which the request is made. - * - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Port" header must contain the client port. - * - * @return int|string|null Can be a string if fetched from the server bag - */ - public function getPort() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_PORT)) { - $host = $host[0]; - } elseif ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - return $this->server->get('SERVER_PORT'); - } - - if ('[' === $host[0]) { - $pos = strpos($host, ':', strrpos($host, ']')); - } else { - $pos = strrpos($host, ':'); - } - - if (false !== $pos && $port = substr($host, $pos + 1)) { - return (int) $port; - } - - return 'https' === $this->getScheme() ? 443 : 80; - } - - /** - * Returns the user. - * - * @return string|null - */ - public function getUser() - { - return $this->headers->get('PHP_AUTH_USER'); - } - - /** - * Returns the password. - * - * @return string|null - */ - public function getPassword() - { - return $this->headers->get('PHP_AUTH_PW'); - } - - /** - * Gets the user info. - * - * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server - */ - public function getUserInfo() - { - $userinfo = $this->getUser(); - - $pass = $this->getPassword(); - if ('' != $pass) { - $userinfo .= ":$pass"; - } - - return $userinfo; - } - - /** - * Returns the HTTP host being requested. - * - * The port name will be appended to the host if it's non-standard. - * - * @return string - */ - public function getHttpHost() - { - $scheme = $this->getScheme(); - $port = $this->getPort(); - - if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) { - return $this->getHost(); - } - - return $this->getHost().':'.$port; - } - - /** - * Returns the requested URI (path and query string). - * - * @return string The raw URI (i.e. not URI decoded) - */ - public function getRequestUri() - { - if (null === $this->requestUri) { - $this->requestUri = $this->prepareRequestUri(); - } - - return $this->requestUri; - } - - /** - * Gets the scheme and HTTP host. - * - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @return string - */ - public function getSchemeAndHttpHost() - { - return $this->getScheme().'://'.$this->getHttpHost(); - } - - /** - * Generates a normalized URI (URL) for the Request. - * - * @return string - * - * @see getQueryString() - */ - public function getUri() - { - if (null !== $qs = $this->getQueryString()) { - $qs = '?'.$qs; - } - - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs; - } - - /** - * Generates a normalized URI for the given path. - * - * @param string $path A path to use instead of the current one - * - * @return string - */ - public function getUriForPath(string $path) - { - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path; - } - - /** - * Returns the path as relative reference from the current Request path. - * - * Only the URIs path component (no schema, host etc.) is relevant and must be given. - * Both paths must be absolute and not contain relative parts. - * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. - * Furthermore, they can be used to reduce the link size in documents. - * - * Example target paths, given a base path of "/a/b/c/d": - * - "/a/b/c/d" -> "" - * - "/a/b/c/" -> "./" - * - "/a/b/" -> "../" - * - "/a/b/c/other" -> "other" - * - "/a/x/y" -> "../../x/y" - * - * @return string - */ - public function getRelativeUriForPath(string $path) - { - // be sure that we are dealing with an absolute path - if (!isset($path[0]) || '/' !== $path[0]) { - return $path; - } - - if ($path === $basePath = $this->getPathInfo()) { - return ''; - } - - $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', substr($path, 1)); - array_pop($sourceDirs); - $targetFile = array_pop($targetDirs); - - foreach ($sourceDirs as $i => $dir) { - if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { - unset($sourceDirs[$i], $targetDirs[$i]); - } else { - break; - } - } - - $targetDirs[] = $targetFile; - $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); - - // A reference to the same base directory or an empty subdirectory must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name - // (see https://tools.ietf.org/html/rfc3986#section-4.2). - return !isset($path[0]) || '/' === $path[0] - || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) - ? "./$path" : $path; - } - - /** - * Generates the normalized query string for the Request. - * - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @return string|null - */ - public function getQueryString() - { - $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); - - return '' === $qs ? null : $qs; - } - - /** - * Checks whether the request is secure or not. - * - * This method can read the client protocol from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * - * @return bool - */ - public function isSecure() - { - if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { - return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); - } - - $https = $this->server->get('HTTPS'); - - return !empty($https) && 'off' !== strtolower($https); - } - - /** - * Returns the host name. - * - * This method can read the client host name from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Host" header must contain the client host name. - * - * @return string - * - * @throws SuspiciousOperationException when the host name is invalid or not trusted - */ - public function getHost() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - if (!$host = $this->server->get('SERVER_NAME')) { - $host = $this->server->get('SERVER_ADDR', ''); - } - } - - // trim and remove port number from host - // host is lowercase as per RFC 952/2181 - $host = strtolower(preg_replace('/:\d+$/', '', trim($host))); - - // as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) - // check that it does not contain forbidden characters (see RFC 952 and RFC 2181) - // use preg_replace() instead of preg_match() to prevent DoS attacks with long host names - if ($host && '' !== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $host)) { - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Invalid Host "%s".', $host)); - } - - if (\count(self::$trustedHostPatterns) > 0) { - // to avoid host header injection attacks, you should provide a list of trusted host patterns - - if (\in_array($host, self::$trustedHosts)) { - return $host; - } - - foreach (self::$trustedHostPatterns as $pattern) { - if (preg_match($pattern, $host)) { - self::$trustedHosts[] = $host; - - return $host; - } - } - - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Untrusted Host "%s".', $host)); - } - - return $host; - } - - /** - * Sets the request method. - */ - public function setMethod(string $method) - { - $this->method = null; - $this->server->set('REQUEST_METHOD', $method); - } - - /** - * Gets the request "intended" method. - * - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * - * The method is always an uppercased string. - * - * @return string - * - * @see getRealMethod() - */ - public function getMethod() - { - if (null !== $this->method) { - return $this->method; - } - - $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - - if ('POST' !== $this->method) { - return $this->method; - } - - $method = $this->headers->get('X-HTTP-METHOD-OVERRIDE'); - - if (!$method && self::$httpMethodParameterOverride) { - $method = $this->request->get('_method', $this->query->get('_method', 'POST')); - } - - if (!\is_string($method)) { - return $this->method; - } - - $method = strtoupper($method); - - if (\in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'PATCH', 'PURGE', 'TRACE'], true)) { - return $this->method = $method; - } - - if (!preg_match('/^[A-Z]++$/D', $method)) { - throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method)); - } - - return $this->method = $method; - } - - /** - * Gets the "real" request method. - * - * @return string - * - * @see getMethod() - */ - public function getRealMethod() - { - return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - } - - /** - * Gets the mime type associated with the format. - * - * @return string|null - */ - public function getMimeType(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; - } - - /** - * Gets the mime types associated with the format. - * - * @return array - */ - public static function getMimeTypes(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return static::$formats[$format] ?? []; - } - - /** - * Gets the format associated with the mime type. - * - * @return string|null - */ - public function getFormat(?string $mimeType) - { - $canonicalMimeType = null; - if ($mimeType && false !== $pos = strpos($mimeType, ';')) { - $canonicalMimeType = trim(substr($mimeType, 0, $pos)); - } - - if (null === static::$formats) { - static::initializeFormats(); - } - - foreach (static::$formats as $format => $mimeTypes) { - if (\in_array($mimeType, (array) $mimeTypes)) { - return $format; - } - if (null !== $canonicalMimeType && \in_array($canonicalMimeType, (array) $mimeTypes)) { - return $format; - } - } - - return null; - } - - /** - * Associates a format with mime types. - * - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - */ - public function setFormat(?string $format, $mimeTypes) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; - } - - /** - * Gets the request format. - * - * Here is the process to determine the format: - * - * * format defined by the user (with setRequestFormat()) - * * _format request attribute - * * $default - * - * @see getPreferredFormat - * - * @return string|null - */ - public function getRequestFormat(?string $default = 'html') - { - if (null === $this->format) { - $this->format = $this->attributes->get('_format'); - } - - return $this->format ?? $default; - } - - /** - * Sets the request format. - */ - public function setRequestFormat(?string $format) - { - $this->format = $format; - } - - /** - * Gets the format associated with the request. - * - * @return string|null - */ - public function getContentType() - { - return $this->getFormat($this->headers->get('CONTENT_TYPE', '')); - } - - /** - * Sets the default locale. - */ - public function setDefaultLocale(string $locale) - { - $this->defaultLocale = $locale; - - if (null === $this->locale) { - $this->setPhpDefaultLocale($locale); - } - } - - /** - * Get the default locale. - * - * @return string - */ - public function getDefaultLocale() - { - return $this->defaultLocale; - } - - /** - * Sets the locale. - */ - public function setLocale(string $locale) - { - $this->setPhpDefaultLocale($this->locale = $locale); - } - - /** - * Get the locale. - * - * @return string - */ - public function getLocale() - { - return null === $this->locale ? $this->defaultLocale : $this->locale; - } - - /** - * Checks if the request method is of specified type. - * - * @param string $method Uppercase request method (GET, POST etc) - * - * @return bool - */ - public function isMethod(string $method) - { - return $this->getMethod() === strtoupper($method); - } - - /** - * Checks whether or not the method is safe. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 - * - * @return bool - */ - public function isMethodSafe() - { - return \in_array($this->getMethod(), ['GET', 'HEAD', 'OPTIONS', 'TRACE']); - } - - /** - * Checks whether or not the method is idempotent. - * - * @return bool - */ - public function isMethodIdempotent() - { - return \in_array($this->getMethod(), ['HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE']); - } - - /** - * Checks whether the method is cacheable or not. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.3 - * - * @return bool - */ - public function isMethodCacheable() - { - return \in_array($this->getMethod(), ['GET', 'HEAD']); - } - - /** - * Returns the protocol version. - * - * If the application is behind a proxy, the protocol version used in the - * requests between the client and the proxy and between the proxy and the - * server might be different. This returns the former (from the "Via" header) - * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns - * the latter (from the "SERVER_PROTOCOL" server parameter). - * - * @return string|null - */ - public function getProtocolVersion() - { - if ($this->isFromTrustedProxy()) { - preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via') ?? '', $matches); - - if ($matches) { - return 'HTTP/'.$matches[2]; - } - } - - return $this->server->get('SERVER_PROTOCOL'); - } - - /** - * Returns the request body content. - * - * @param bool $asResource If true, a resource will be returned - * - * @return string|resource - */ - public function getContent(bool $asResource = false) - { - $currentContentIsResource = \is_resource($this->content); - - if (true === $asResource) { - if ($currentContentIsResource) { - rewind($this->content); - - return $this->content; - } - - // Content passed in parameter (test) - if (\is_string($this->content)) { - $resource = fopen('php://temp', 'r+'); - fwrite($resource, $this->content); - rewind($resource); - - return $resource; - } - - $this->content = false; - - return fopen('php://input', 'r'); - } - - if ($currentContentIsResource) { - rewind($this->content); - - return stream_get_contents($this->content); - } - - if (null === $this->content || false === $this->content) { - $this->content = file_get_contents('php://input'); - } - - return $this->content; - } - - /** - * Gets the request body decoded as array, typically from a JSON payload. - * - * @throws JsonException When the body cannot be decoded to an array - * - * @return array - */ - public function toArray() - { - if ('' === $content = $this->getContent()) { - throw new JsonException('Request body is empty.'); - } - - try { - $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); - } catch (\JsonException $e) { - throw new JsonException('Could not decode request body.', $e->getCode(), $e); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error()) { - throw new JsonException('Could not decode request body: '.json_last_error_msg(), json_last_error()); - } - - if (!\is_array($content)) { - throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content))); - } - - return $content; - } - - /** - * Gets the Etags. - * - * @return array - */ - public function getETags() - { - return preg_split('/\s*,\s*/', $this->headers->get('If-None-Match', ''), -1, \PREG_SPLIT_NO_EMPTY); - } - - /** - * @return bool - */ - public function isNoCache() - { - return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); - } - - /** - * Gets the preferred format for the response by inspecting, in the following order: - * * the request format set using setRequestFormat; - * * the values of the Accept HTTP header. - * - * Note that if you use this method, you should send the "Vary: Accept" header - * in the response to prevent any issues with intermediary HTTP caches. - */ - public function getPreferredFormat(?string $default = 'html'): ?string - { - if (null !== $this->preferredFormat || null !== $this->preferredFormat = $this->getRequestFormat(null)) { - return $this->preferredFormat; - } - - foreach ($this->getAcceptableContentTypes() as $mimeType) { - if ($this->preferredFormat = $this->getFormat($mimeType)) { - return $this->preferredFormat; - } - } - - return $default; - } - - /** - * Returns the preferred language. - * - * @param string[] $locales An array of ordered available locales - * - * @return string|null - */ - public function getPreferredLanguage(array $locales = null) - { - $preferredLanguages = $this->getLanguages(); - - if (empty($locales)) { - return $preferredLanguages[0] ?? null; - } - - if (!$preferredLanguages) { - return $locales[0]; - } - - $extendedPreferredLanguages = []; - foreach ($preferredLanguages as $language) { - $extendedPreferredLanguages[] = $language; - if (false !== $position = strpos($language, '_')) { - $superLanguage = substr($language, 0, $position); - if (!\in_array($superLanguage, $preferredLanguages)) { - $extendedPreferredLanguages[] = $superLanguage; - } - } - } - - $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); - - return $preferredLanguages[0] ?? $locales[0]; - } - - /** - * Gets a list of languages acceptable by the client browser ordered in the user browser preferences. - * - * @return array - */ - public function getLanguages() - { - if (null !== $this->languages) { - return $this->languages; - } - - $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); - $this->languages = []; - foreach ($languages as $lang => $acceptHeaderItem) { - if (str_contains($lang, '-')) { - $codes = explode('-', $lang); - if ('i' === $codes[0]) { - // Language not listed in ISO 639 that are not variants - // of any listed language, which can be registered with the - // i-prefix, such as i-cherokee - if (\count($codes) > 1) { - $lang = $codes[1]; - } - } else { - for ($i = 0, $max = \count($codes); $i < $max; ++$i) { - if (0 === $i) { - $lang = strtolower($codes[0]); - } else { - $lang .= '_'.strtoupper($codes[$i]); - } - } - } - } - - $this->languages[] = $lang; - } - - return $this->languages; - } - - /** - * Gets a list of charsets acceptable by the client browser in preferable order. - * - * @return array - */ - public function getCharsets() - { - if (null !== $this->charsets) { - return $this->charsets; - } - - return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); - } - - /** - * Gets a list of encodings acceptable by the client browser in preferable order. - * - * @return array - */ - public function getEncodings() - { - if (null !== $this->encodings) { - return $this->encodings; - } - - return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); - } - - /** - * Gets a list of content types acceptable by the client browser in preferable order. - * - * @return array - */ - public function getAcceptableContentTypes() - { - if (null !== $this->acceptableContentTypes) { - return $this->acceptableContentTypes; - } - - return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); - } - - /** - * Returns true if the request is an XMLHttpRequest. - * - * It works if your JavaScript library sets an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript - * - * @return bool - */ - public function isXmlHttpRequest() - { - return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); - } - - /** - * Checks whether the client browser prefers safe content or not according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function preferSafeContent(): bool - { - if (null !== $this->isSafeContentPreferred) { - return $this->isSafeContentPreferred; - } - - if (!$this->isSecure()) { - // see https://tools.ietf.org/html/rfc8674#section-3 - return $this->isSafeContentPreferred = false; - } - - return $this->isSafeContentPreferred = AcceptHeader::fromString($this->headers->get('Prefer'))->has('safe'); - } - - /* - * The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24) - * - * Code subject to the new BSD license (https://framework.zend.com/license). - * - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (https://www.zend.com/) - */ - - protected function prepareRequestUri() - { - $requestUri = ''; - - if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { - // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) - $requestUri = $this->server->get('UNENCODED_URL'); - $this->server->remove('UNENCODED_URL'); - $this->server->remove('IIS_WasUrlRewritten'); - } elseif ($this->server->has('REQUEST_URI')) { - $requestUri = $this->server->get('REQUEST_URI'); - - if ('' !== $requestUri && '/' === $requestUri[0]) { - // To only use path and query remove the fragment. - if (false !== $pos = strpos($requestUri, '#')) { - $requestUri = substr($requestUri, 0, $pos); - } - } else { - // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, - // only use URL path. - $uriComponents = parse_url($requestUri); - - if (isset($uriComponents['path'])) { - $requestUri = $uriComponents['path']; - } - - if (isset($uriComponents['query'])) { - $requestUri .= '?'.$uriComponents['query']; - } - } - } elseif ($this->server->has('ORIG_PATH_INFO')) { - // IIS 5.0, PHP as CGI - $requestUri = $this->server->get('ORIG_PATH_INFO'); - if ('' != $this->server->get('QUERY_STRING')) { - $requestUri .= '?'.$this->server->get('QUERY_STRING'); - } - $this->server->remove('ORIG_PATH_INFO'); - } - - // normalize the request URI to ease creating sub-requests from this request - $this->server->set('REQUEST_URI', $requestUri); - - return $requestUri; - } - - /** - * Prepares the base URL. - * - * @return string - */ - protected function prepareBaseUrl() - { - $filename = basename($this->server->get('SCRIPT_FILENAME', '')); - - if (basename($this->server->get('SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('SCRIPT_NAME'); - } elseif (basename($this->server->get('PHP_SELF', '')) === $filename) { - $baseUrl = $this->server->get('PHP_SELF'); - } elseif (basename($this->server->get('ORIG_SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility - } else { - // Backtrack up the script_filename to find the portion matching - // php_self - $path = $this->server->get('PHP_SELF', ''); - $file = $this->server->get('SCRIPT_FILENAME', ''); - $segs = explode('/', trim($file, '/')); - $segs = array_reverse($segs); - $index = 0; - $last = \count($segs); - $baseUrl = ''; - do { - $seg = $segs[$index]; - $baseUrl = '/'.$seg.$baseUrl; - ++$index; - } while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); - } - - // Does the baseUrl have anything in common with the request_uri? - $requestUri = $this->getRequestUri(); - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { - // full $baseUrl matches - return $prefix; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) { - // directory portion of $baseUrl matches - return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR); - } - - $truncatedRequestUri = $requestUri; - if (false !== $pos = strpos($requestUri, '?')) { - $truncatedRequestUri = substr($requestUri, 0, $pos); - } - - $basename = basename($baseUrl ?? ''); - if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { - // no match whatsoever; set it blank - return ''; - } - - // If using mod_rewrite or ISAPI_Rewrite strip the script filename - // out of baseUrl. $pos !== 0 makes sure it is not matching a value - // from PATH_INFO or QUERY_STRING - if (\strlen($requestUri) >= \strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { - $baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl)); - } - - return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR); - } - - /** - * Prepares the base path. - * - * @return string - */ - protected function prepareBasePath() - { - $baseUrl = $this->getBaseUrl(); - if (empty($baseUrl)) { - return ''; - } - - $filename = basename($this->server->get('SCRIPT_FILENAME')); - if (basename($baseUrl) === $filename) { - $basePath = \dirname($baseUrl); - } else { - $basePath = $baseUrl; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $basePath = str_replace('\\', '/', $basePath); - } - - return rtrim($basePath, '/'); - } - - /** - * Prepares the path info. - * - * @return string - */ - protected function preparePathInfo() - { - if (null === ($requestUri = $this->getRequestUri())) { - return '/'; - } - - // Remove the query string from REQUEST_URI - if (false !== $pos = strpos($requestUri, '?')) { - $requestUri = substr($requestUri, 0, $pos); - } - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if (null === ($baseUrl = $this->getBaseUrlReal())) { - return $requestUri; - } - - $pathInfo = substr($requestUri, \strlen($baseUrl)); - if (false === $pathInfo || '' === $pathInfo) { - // If substr() returns false then PATH_INFO is set to an empty string - return '/'; - } - - return $pathInfo; - } - - /** - * Initializes HTTP request formats. - */ - protected static function initializeFormats() - { - static::$formats = [ - 'html' => ['text/html', 'application/xhtml+xml'], - 'txt' => ['text/plain'], - 'js' => ['application/javascript', 'application/x-javascript', 'text/javascript'], - 'css' => ['text/css'], - 'json' => ['application/json', 'application/x-json'], - 'jsonld' => ['application/ld+json'], - 'xml' => ['text/xml', 'application/xml', 'application/x-xml'], - 'rdf' => ['application/rdf+xml'], - 'atom' => ['application/atom+xml'], - 'rss' => ['application/rss+xml'], - 'form' => ['application/x-www-form-urlencoded', 'multipart/form-data'], - ]; - } - - private function setPhpDefaultLocale(string $locale): void - { - // if either the class Locale doesn't exist, or an exception is thrown when - // setting the default locale, the intl module is not installed, and - // the call can be ignored: - try { - if (class_exists(\Locale::class, false)) { - \Locale::setDefault($locale); - } - } catch (\Exception $e) { - } - } - - /** - * Returns the prefix as encoded in the string when the string starts with - * the given prefix, null otherwise. - */ - private function getUrlencodedPrefix(string $string, string $prefix): ?string - { - if (!str_starts_with(rawurldecode($string), $prefix)) { - return null; - } - - $len = \strlen($prefix); - - if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { - return $match[0]; - } - - return null; - } - - private static function createRequestFromFactory(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): self - { - if (self::$requestFactory) { - $request = (self::$requestFactory)($query, $request, $attributes, $cookies, $files, $server, $content); - - if (!$request instanceof self) { - throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); - } - - return $request; - } - - return new static($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Indicates whether this request originated from a trusted proxy. - * - * This can be useful to determine whether or not to trust the - * contents of a proxy-specific header. - * - * @return bool - */ - public function isFromTrustedProxy() - { - return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR', ''), self::$trustedProxies); - } - - private function getTrustedValues(int $type, string $ip = null): array - { - $clientValues = []; - $forwardedValues = []; - - if ((self::$trustedHeaderSet & $type) && $this->headers->has(self::TRUSTED_HEADERS[$type])) { - foreach (explode(',', $this->headers->get(self::TRUSTED_HEADERS[$type])) as $v) { - $clientValues[] = (self::HEADER_X_FORWARDED_PORT === $type ? '0.0.0.0:' : '').trim($v); - } - } - - if ((self::$trustedHeaderSet & self::HEADER_FORWARDED) && (isset(self::FORWARDED_PARAMS[$type])) && $this->headers->has(self::TRUSTED_HEADERS[self::HEADER_FORWARDED])) { - $forwarded = $this->headers->get(self::TRUSTED_HEADERS[self::HEADER_FORWARDED]); - $parts = HeaderUtils::split($forwarded, ',;='); - $forwardedValues = []; - $param = self::FORWARDED_PARAMS[$type]; - foreach ($parts as $subParts) { - if (null === $v = HeaderUtils::combine($subParts)[$param] ?? null) { - continue; - } - if (self::HEADER_X_FORWARDED_PORT === $type) { - if (str_ends_with($v, ']') || false === $v = strrchr($v, ':')) { - $v = $this->isSecure() ? ':443' : ':80'; - } - $v = '0.0.0.0'.$v; - } - $forwardedValues[] = $v; - } - } - - if (null !== $ip) { - $clientValues = $this->normalizeAndFilterClientIps($clientValues, $ip); - $forwardedValues = $this->normalizeAndFilterClientIps($forwardedValues, $ip); - } - - if ($forwardedValues === $clientValues || !$clientValues) { - return $forwardedValues; - } - - if (!$forwardedValues) { - return $clientValues; - } - - if (!$this->isForwardedValid) { - return null !== $ip ? ['0.0.0.0', $ip] : []; - } - $this->isForwardedValid = false; - - throw new ConflictingHeadersException(sprintf('The request has both a trusted "%s" header and a trusted "%s" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one.', self::TRUSTED_HEADERS[self::HEADER_FORWARDED], self::TRUSTED_HEADERS[$type])); - } - - private function normalizeAndFilterClientIps(array $clientIps, string $ip): array - { - if (!$clientIps) { - return []; - } - $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from - $firstTrustedIp = null; - - foreach ($clientIps as $key => $clientIp) { - if (strpos($clientIp, '.')) { - // Strip :port from IPv4 addresses. This is allowed in Forwarded - // and may occur in X-Forwarded-For. - $i = strpos($clientIp, ':'); - if ($i) { - $clientIps[$key] = $clientIp = substr($clientIp, 0, $i); - } - } elseif (str_starts_with($clientIp, '[')) { - // Strip brackets and :port from IPv6 addresses. - $i = strpos($clientIp, ']', 1); - $clientIps[$key] = $clientIp = substr($clientIp, 1, $i - 1); - } - - if (!filter_var($clientIp, \FILTER_VALIDATE_IP)) { - unset($clientIps[$key]); - - continue; - } - - if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { - unset($clientIps[$key]); - - // Fallback to this when the client IP falls into the range of trusted proxies - if (null === $firstTrustedIp) { - $firstTrustedIp = $clientIp; - } - } - } - - // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; - } -} diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php deleted file mode 100644 index f2645f9..0000000 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcher compares a pre-defined set of checks against a Request instance. - * - * @author Fabien Potencier - */ -class RequestMatcher implements RequestMatcherInterface -{ - /** - * @var string|null - */ - private $path; - - /** - * @var string|null - */ - private $host; - - /** - * @var int|null - */ - private $port; - - /** - * @var string[] - */ - private $methods = []; - - /** - * @var string[] - */ - private $ips = []; - - /** - * @var array - */ - private $attributes = []; - - /** - * @var string[] - */ - private $schemes = []; - - /** - * @param string|string[]|null $methods - * @param string|string[]|null $ips - * @param string|string[]|null $schemes - */ - public function __construct(string $path = null, string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, int $port = null) - { - $this->matchPath($path); - $this->matchHost($host); - $this->matchMethod($methods); - $this->matchIps($ips); - $this->matchScheme($schemes); - $this->matchPort($port); - - foreach ($attributes as $k => $v) { - $this->matchAttribute($k, $v); - } - } - - /** - * Adds a check for the HTTP scheme. - * - * @param string|string[]|null $scheme An HTTP scheme or an array of HTTP schemes - */ - public function matchScheme($scheme) - { - $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; - } - - /** - * Adds a check for the URL host name. - */ - public function matchHost(?string $regexp) - { - $this->host = $regexp; - } - - /** - * Adds a check for the the URL port. - * - * @param int|null $port The port number to connect to - */ - public function matchPort(?int $port) - { - $this->port = $port; - } - - /** - * Adds a check for the URL path info. - */ - public function matchPath(?string $regexp) - { - $this->path = $regexp; - } - - /** - * Adds a check for the client IP. - * - * @param string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIp(string $ip) - { - $this->matchIps($ip); - } - - /** - * Adds a check for the client IP. - * - * @param string|string[]|null $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIps($ips) - { - $ips = null !== $ips ? (array) $ips : []; - - $this->ips = array_reduce($ips, static function (array $ips, string $ip) { - return array_merge($ips, preg_split('/\s*,\s*/', $ip)); - }, []); - } - - /** - * Adds a check for the HTTP method. - * - * @param string|string[]|null $method An HTTP method or an array of HTTP methods - */ - public function matchMethod($method) - { - $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; - } - - /** - * Adds a check for request attribute. - */ - public function matchAttribute(string $key, string $regexp) - { - $this->attributes[$key] = $regexp; - } - - /** - * {@inheritdoc} - */ - public function matches(Request $request) - { - if ($this->schemes && !\in_array($request->getScheme(), $this->schemes, true)) { - return false; - } - - if ($this->methods && !\in_array($request->getMethod(), $this->methods, true)) { - return false; - } - - foreach ($this->attributes as $key => $pattern) { - $requestAttribute = $request->attributes->get($key); - if (!\is_string($requestAttribute)) { - return false; - } - if (!preg_match('{'.$pattern.'}', $requestAttribute)) { - return false; - } - } - - if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getPathInfo()))) { - return false; - } - - if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) { - return false; - } - - if (null !== $this->port && 0 < $this->port && $request->getPort() !== $this->port) { - return false; - } - - if (IpUtils::checkIp($request->getClientIp() ?? '', $this->ips)) { - return true; - } - - // Note to future implementors: add additional checks above the - // foreach above or else your check might not be run! - return 0 === \count($this->ips); - } -} diff --git a/vendor/symfony/http-foundation/RequestMatcherInterface.php b/vendor/symfony/http-foundation/RequestMatcherInterface.php deleted file mode 100644 index c2e1478..0000000 --- a/vendor/symfony/http-foundation/RequestMatcherInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcherInterface is an interface for strategies to match a Request. - * - * @author Fabien Potencier - */ -interface RequestMatcherInterface -{ - /** - * Decides whether the rule(s) implemented by the strategy matches the supplied request. - * - * @return bool - */ - public function matches(Request $request); -} diff --git a/vendor/symfony/http-foundation/RequestStack.php b/vendor/symfony/http-foundation/RequestStack.php deleted file mode 100644 index 855b518..0000000 --- a/vendor/symfony/http-foundation/RequestStack.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Request stack that controls the lifecycle of requests. - * - * @author Benjamin Eberlei - */ -class RequestStack -{ - /** - * @var Request[] - */ - private $requests = []; - - /** - * Pushes a Request on the stack. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - */ - public function push(Request $request) - { - $this->requests[] = $request; - } - - /** - * Pops the current request from the stack. - * - * This operation lets the current request go out of scope. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - * - * @return Request|null - */ - public function pop() - { - if (!$this->requests) { - return null; - } - - return array_pop($this->requests); - } - - /** - * @return Request|null - */ - public function getCurrentRequest() - { - return end($this->requests) ?: null; - } - - /** - * Gets the main request. - * - * Be warned that making your code aware of the main request - * might make it un-compatible with other features of your framework - * like ESI support. - */ - public function getMainRequest(): ?Request - { - if (!$this->requests) { - return null; - } - - return $this->requests[0]; - } - - /** - * Gets the master request. - * - * @return Request|null - * - * @deprecated since symfony/http-foundation 5.3, use getMainRequest() instead - */ - public function getMasterRequest() - { - trigger_deprecation('symfony/http-foundation', '5.3', '"%s()" is deprecated, use "getMainRequest()" instead.', __METHOD__); - - return $this->getMainRequest(); - } - - /** - * Returns the parent request of the current. - * - * Be warned that making your code aware of the parent request - * might make it un-compatible with other features of your framework - * like ESI support. - * - * If current Request is the main request, it returns null. - * - * @return Request|null - */ - public function getParentRequest() - { - $pos = \count($this->requests) - 2; - - return $this->requests[$pos] ?? null; - } - - /** - * Gets the current session. - * - * @throws SessionNotFoundException - */ - public function getSession(): SessionInterface - { - if ((null !== $request = end($this->requests) ?: null) && $request->hasSession()) { - return $request->getSession(); - } - - throw new SessionNotFoundException(); - } -} diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php deleted file mode 100644 index def7f8e..0000000 --- a/vendor/symfony/http-foundation/Response.php +++ /dev/null @@ -1,1285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(ResponseHeaderBag::class); - -/** - * Response represents an HTTP response. - * - * @author Fabien Potencier - */ -class Response -{ - public const HTTP_CONTINUE = 100; - public const HTTP_SWITCHING_PROTOCOLS = 101; - public const HTTP_PROCESSING = 102; // RFC2518 - public const HTTP_EARLY_HINTS = 103; // RFC8297 - public const HTTP_OK = 200; - public const HTTP_CREATED = 201; - public const HTTP_ACCEPTED = 202; - public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; - public const HTTP_NO_CONTENT = 204; - public const HTTP_RESET_CONTENT = 205; - public const HTTP_PARTIAL_CONTENT = 206; - public const HTTP_MULTI_STATUS = 207; // RFC4918 - public const HTTP_ALREADY_REPORTED = 208; // RFC5842 - public const HTTP_IM_USED = 226; // RFC3229 - public const HTTP_MULTIPLE_CHOICES = 300; - public const HTTP_MOVED_PERMANENTLY = 301; - public const HTTP_FOUND = 302; - public const HTTP_SEE_OTHER = 303; - public const HTTP_NOT_MODIFIED = 304; - public const HTTP_USE_PROXY = 305; - public const HTTP_RESERVED = 306; - public const HTTP_TEMPORARY_REDIRECT = 307; - public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 - public const HTTP_BAD_REQUEST = 400; - public const HTTP_UNAUTHORIZED = 401; - public const HTTP_PAYMENT_REQUIRED = 402; - public const HTTP_FORBIDDEN = 403; - public const HTTP_NOT_FOUND = 404; - public const HTTP_METHOD_NOT_ALLOWED = 405; - public const HTTP_NOT_ACCEPTABLE = 406; - public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; - public const HTTP_REQUEST_TIMEOUT = 408; - public const HTTP_CONFLICT = 409; - public const HTTP_GONE = 410; - public const HTTP_LENGTH_REQUIRED = 411; - public const HTTP_PRECONDITION_FAILED = 412; - public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; - public const HTTP_REQUEST_URI_TOO_LONG = 414; - public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; - public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; - public const HTTP_EXPECTATION_FAILED = 417; - public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 - public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 - public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 - public const HTTP_LOCKED = 423; // RFC4918 - public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 - public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 - public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 - public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 - public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 - public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 - public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; - public const HTTP_INTERNAL_SERVER_ERROR = 500; - public const HTTP_NOT_IMPLEMENTED = 501; - public const HTTP_BAD_GATEWAY = 502; - public const HTTP_SERVICE_UNAVAILABLE = 503; - public const HTTP_GATEWAY_TIMEOUT = 504; - public const HTTP_VERSION_NOT_SUPPORTED = 505; - public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 - public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 - public const HTTP_LOOP_DETECTED = 508; // RFC5842 - public const HTTP_NOT_EXTENDED = 510; // RFC2774 - public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 - - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control - */ - private const HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES = [ - 'must_revalidate' => false, - 'no_cache' => false, - 'no_store' => false, - 'no_transform' => false, - 'public' => false, - 'private' => false, - 'proxy_revalidate' => false, - 'max_age' => true, - 's_maxage' => true, - 'immutable' => false, - 'last_modified' => true, - 'etag' => true, - ]; - - /** - * @var ResponseHeaderBag - */ - public $headers; - - /** - * @var string - */ - protected $content; - - /** - * @var string - */ - protected $version; - - /** - * @var int - */ - protected $statusCode; - - /** - * @var string - */ - protected $statusText; - - /** - * @var string - */ - protected $charset; - - /** - * Status codes translation table. - * - * The list of codes is complete according to the - * {@link https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml Hypertext Transfer Protocol (HTTP) Status Code Registry} - * (last updated 2021-10-01). - * - * Unless otherwise noted, the status code is defined in RFC2616. - * - * @var array - */ - public static $statusTexts = [ - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', // RFC2518 - 103 => 'Early Hints', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', // RFC4918 - 208 => 'Already Reported', // RFC5842 - 226 => 'IM Used', // RFC3229 - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', // RFC7238 - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Content Too Large', // RFC-ietf-httpbis-semantics - 414 => 'URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', // RFC2324 - 421 => 'Misdirected Request', // RFC7540 - 422 => 'Unprocessable Content', // RFC-ietf-httpbis-semantics - 423 => 'Locked', // RFC4918 - 424 => 'Failed Dependency', // RFC4918 - 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 - 426 => 'Upgrade Required', // RFC2817 - 428 => 'Precondition Required', // RFC6585 - 429 => 'Too Many Requests', // RFC6585 - 431 => 'Request Header Fields Too Large', // RFC6585 - 451 => 'Unavailable For Legal Reasons', // RFC7725 - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', // RFC2295 - 507 => 'Insufficient Storage', // RFC4918 - 508 => 'Loop Detected', // RFC5842 - 510 => 'Not Extended', // RFC2774 - 511 => 'Network Authentication Required', // RFC6585 - ]; - - /** - * @throws \InvalidArgumentException When the HTTP status code is not valid - */ - public function __construct(?string $content = '', int $status = 200, array $headers = []) - { - $this->headers = new ResponseHeaderBag($headers); - $this->setContent($content); - $this->setStatusCode($status); - $this->setProtocolVersion('1.0'); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return Response::create($body, 200) - * ->setSharedMaxAge(300); - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create(?string $content = '', int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($content, $status, $headers); - } - - /** - * Returns the Response as an HTTP string. - * - * The string representation of the Response is the same as the - * one that will be sent to the client only if the prepare() method - * has been called before. - * - * @return string - * - * @see prepare() - */ - public function __toString() - { - return - sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n". - $this->headers."\r\n". - $this->getContent(); - } - - /** - * Clones the current Response instance. - */ - public function __clone() - { - $this->headers = clone $this->headers; - } - - /** - * Prepares the Response before it is sent to the client. - * - * This method tweaks the Response to ensure that it is - * compliant with RFC 2616. Most of the changes are based on - * the Request that is "associated" with this Response. - * - * @return $this - */ - public function prepare(Request $request) - { - $headers = $this->headers; - - if ($this->isInformational() || $this->isEmpty()) { - $this->setContent(null); - $headers->remove('Content-Type'); - $headers->remove('Content-Length'); - // prevent PHP from sending the Content-Type header based on default_mimetype - ini_set('default_mimetype', ''); - } else { - // Content-type based on the Request - if (!$headers->has('Content-Type')) { - $format = $request->getRequestFormat(null); - if (null !== $format && $mimeType = $request->getMimeType($format)) { - $headers->set('Content-Type', $mimeType); - } - } - - // Fix Content-Type - $charset = $this->charset ?: 'UTF-8'; - if (!$headers->has('Content-Type')) { - $headers->set('Content-Type', 'text/html; charset='.$charset); - } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { - // add the charset - $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset); - } - - // Fix Content-Length - if ($headers->has('Transfer-Encoding')) { - $headers->remove('Content-Length'); - } - - if ($request->isMethod('HEAD')) { - // cf. RFC2616 14.13 - $length = $headers->get('Content-Length'); - $this->setContent(null); - if ($length) { - $headers->set('Content-Length', $length); - } - } - } - - // Fix protocol - if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); - } - - // Check if we need to send extra expire info headers - if ('1.0' == $this->getProtocolVersion() && str_contains($headers->get('Cache-Control', ''), 'no-cache')) { - $headers->set('pragma', 'no-cache'); - $headers->set('expires', -1); - } - - $this->ensureIEOverSSLCompatibility($request); - - if ($request->isSecure()) { - foreach ($headers->getCookies() as $cookie) { - $cookie->setSecureDefault(true); - } - } - - return $this; - } - - /** - * Sends HTTP headers. - * - * @return $this - */ - public function sendHeaders() - { - // headers have already been sent by the developer - if (headers_sent()) { - return $this; - } - - // headers - foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) { - $replace = 0 === strcasecmp($name, 'Content-Type'); - foreach ($values as $value) { - header($name.': '.$value, $replace, $this->statusCode); - } - } - - // cookies - foreach ($this->headers->getCookies() as $cookie) { - header('Set-Cookie: '.$cookie, false, $this->statusCode); - } - - // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); - - return $this; - } - - /** - * Sends content for the current web response. - * - * @return $this - */ - public function sendContent() - { - echo $this->content; - - return $this; - } - - /** - * Sends HTTP headers and content. - * - * @return $this - */ - public function send() - { - $this->sendHeaders(); - $this->sendContent(); - - if (\function_exists('fastcgi_finish_request')) { - fastcgi_finish_request(); - } elseif (\function_exists('litespeed_finish_request')) { - litespeed_finish_request(); - } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - static::closeOutputBuffers(0, true); - } - - return $this; - } - - /** - * Sets the response content. - * - * @return $this - */ - public function setContent(?string $content) - { - $this->content = $content ?? ''; - - return $this; - } - - /** - * Gets the current response content. - * - * @return string|false - */ - public function getContent() - { - return $this->content; - } - - /** - * Sets the HTTP protocol version (1.0 or 1.1). - * - * @return $this - * - * @final - */ - public function setProtocolVersion(string $version): object - { - $this->version = $version; - - return $this; - } - - /** - * Gets the HTTP protocol version. - * - * @final - */ - public function getProtocolVersion(): string - { - return $this->version; - } - - /** - * Sets the response status code. - * - * If the status text is null it will be automatically populated for the known - * status codes and left empty otherwise. - * - * @return $this - * - * @throws \InvalidArgumentException When the HTTP status code is not valid - * - * @final - */ - public function setStatusCode(int $code, string $text = null): object - { - $this->statusCode = $code; - if ($this->isInvalid()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); - } - - if (null === $text) { - $this->statusText = self::$statusTexts[$code] ?? 'unknown status'; - - return $this; - } - - if (false === $text) { - $this->statusText = ''; - - return $this; - } - - $this->statusText = $text; - - return $this; - } - - /** - * Retrieves the status code for the current web response. - * - * @final - */ - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * Sets the response charset. - * - * @return $this - * - * @final - */ - public function setCharset(string $charset): object - { - $this->charset = $charset; - - return $this; - } - - /** - * Retrieves the response charset. - * - * @final - */ - public function getCharset(): ?string - { - return $this->charset; - } - - /** - * Returns true if the response may safely be kept in a shared (surrogate) cache. - * - * Responses marked "private" with an explicit Cache-Control directive are - * considered uncacheable. - * - * Responses with neither a freshness lifetime (Expires, max-age) nor cache - * validator (Last-Modified, ETag) are considered uncacheable because there is - * no way to tell when or how to remove them from the cache. - * - * Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation, - * for example "status codes that are defined as cacheable by default [...] - * can be reused by a cache with heuristic expiration unless otherwise indicated" - * (https://tools.ietf.org/html/rfc7231#section-6.1) - * - * @final - */ - public function isCacheable(): bool - { - if (!\in_array($this->statusCode, [200, 203, 300, 301, 302, 404, 410])) { - return false; - } - - if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { - return false; - } - - return $this->isValidateable() || $this->isFresh(); - } - - /** - * Returns true if the response is "fresh". - * - * Fresh responses may be served from cache without any interaction with the - * origin. A response is considered fresh when it includes a Cache-Control/max-age - * indicator or Expires header and the calculated age is less than the freshness lifetime. - * - * @final - */ - public function isFresh(): bool - { - return $this->getTtl() > 0; - } - - /** - * Returns true if the response includes headers that can be used to validate - * the response with the origin server using a conditional GET request. - * - * @final - */ - public function isValidateable(): bool - { - return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); - } - - /** - * Marks the response as "private". - * - * It makes the response ineligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPrivate(): object - { - $this->headers->removeCacheControlDirective('public'); - $this->headers->addCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "public". - * - * It makes the response eligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPublic(): object - { - $this->headers->addCacheControlDirective('public'); - $this->headers->removeCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "immutable". - * - * @return $this - * - * @final - */ - public function setImmutable(bool $immutable = true): object - { - if ($immutable) { - $this->headers->addCacheControlDirective('immutable'); - } else { - $this->headers->removeCacheControlDirective('immutable'); - } - - return $this; - } - - /** - * Returns true if the response is marked as "immutable". - * - * @final - */ - public function isImmutable(): bool - { - return $this->headers->hasCacheControlDirective('immutable'); - } - - /** - * Returns true if the response must be revalidated by shared caches once it has become stale. - * - * This method indicates that the response must not be served stale by a - * cache in any circumstance without first revalidating with the origin. - * When present, the TTL of the response should not be overridden to be - * greater than the value provided by the origin. - * - * @final - */ - public function mustRevalidate(): bool - { - return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->hasCacheControlDirective('proxy-revalidate'); - } - - /** - * Returns the Date header as a DateTime instance. - * - * @throws \RuntimeException When the header is not parseable - * - * @final - */ - public function getDate(): ?\DateTimeInterface - { - return $this->headers->getDate('Date'); - } - - /** - * Sets the Date header. - * - * @return $this - * - * @final - */ - public function setDate(\DateTimeInterface $date): object - { - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Date', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the age of the response in seconds. - * - * @final - */ - public function getAge(): int - { - if (null !== $age = $this->headers->get('Age')) { - return (int) $age; - } - - return max(time() - (int) $this->getDate()->format('U'), 0); - } - - /** - * Marks the response stale by setting the Age header to be equal to the maximum age of the response. - * - * @return $this - */ - public function expire() - { - if ($this->isFresh()) { - $this->headers->set('Age', $this->getMaxAge()); - $this->headers->remove('Expires'); - } - - return $this; - } - - /** - * Returns the value of the Expires header as a DateTime instance. - * - * @final - */ - public function getExpires(): ?\DateTimeInterface - { - try { - return $this->headers->getDate('Expires'); - } catch (\RuntimeException $e) { - // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past - return \DateTime::createFromFormat('U', time() - 172800); - } - } - - /** - * Sets the Expires HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setExpires(\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Expires'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the number of seconds after the time specified in the response's Date - * header when the response should no longer be considered fresh. - * - * First, it checks for a s-maxage directive, then a max-age directive, and then it falls - * back on an expires header. It returns null when no maximum age can be established. - * - * @final - */ - public function getMaxAge(): ?int - { - if ($this->headers->hasCacheControlDirective('s-maxage')) { - return (int) $this->headers->getCacheControlDirective('s-maxage'); - } - - if ($this->headers->hasCacheControlDirective('max-age')) { - return (int) $this->headers->getCacheControlDirective('max-age'); - } - - if (null !== $this->getExpires()) { - return (int) $this->getExpires()->format('U') - (int) $this->getDate()->format('U'); - } - - return null; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh. - * - * This methods sets the Cache-Control max-age directive. - * - * @return $this - * - * @final - */ - public function setMaxAge(int $value): object - { - $this->headers->addCacheControlDirective('max-age', $value); - - return $this; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. - * - * This methods sets the Cache-Control s-maxage directive. - * - * @return $this - * - * @final - */ - public function setSharedMaxAge(int $value): object - { - $this->setPublic(); - $this->headers->addCacheControlDirective('s-maxage', $value); - - return $this; - } - - /** - * Returns the response's time-to-live in seconds. - * - * It returns null when no freshness information is present in the response. - * - * When the responses TTL is <= 0, the response may not be served from cache without first - * revalidating with the origin. - * - * @final - */ - public function getTtl(): ?int - { - $maxAge = $this->getMaxAge(); - - return null !== $maxAge ? $maxAge - $this->getAge() : null; - } - - /** - * Sets the response's time-to-live for shared caches in seconds. - * - * This method adjusts the Cache-Control/s-maxage directive. - * - * @return $this - * - * @final - */ - public function setTtl(int $seconds): object - { - $this->setSharedMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Sets the response's time-to-live for private/client caches in seconds. - * - * This method adjusts the Cache-Control/max-age directive. - * - * @return $this - * - * @final - */ - public function setClientTtl(int $seconds): object - { - $this->setMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Returns the Last-Modified HTTP header as a DateTime instance. - * - * @throws \RuntimeException When the HTTP header is not parseable - * - * @final - */ - public function getLastModified(): ?\DateTimeInterface - { - return $this->headers->getDate('Last-Modified'); - } - - /** - * Sets the Last-Modified HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setLastModified(\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Last-Modified'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the literal value of the ETag HTTP header. - * - * @final - */ - public function getEtag(): ?string - { - return $this->headers->get('ETag'); - } - - /** - * Sets the ETag value. - * - * @param string|null $etag The ETag unique identifier or null to remove the header - * @param bool $weak Whether you want a weak ETag or not - * - * @return $this - * - * @final - */ - public function setEtag(string $etag = null, bool $weak = false): object - { - if (null === $etag) { - $this->headers->remove('Etag'); - } else { - if (!str_starts_with($etag, '"')) { - $etag = '"'.$etag.'"'; - } - - $this->headers->set('ETag', (true === $weak ? 'W/' : '').$etag); - } - - return $this; - } - - /** - * Sets the response's cache headers (validation and/or expiration). - * - * Available options are: must_revalidate, no_cache, no_store, no_transform, public, private, proxy_revalidate, max_age, s_maxage, immutable, last_modified and etag. - * - * @return $this - * - * @throws \InvalidArgumentException - * - * @final - */ - public function setCache(array $options): object - { - if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) { - throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); - } - - if (isset($options['etag'])) { - $this->setEtag($options['etag']); - } - - if (isset($options['last_modified'])) { - $this->setLastModified($options['last_modified']); - } - - if (isset($options['max_age'])) { - $this->setMaxAge($options['max_age']); - } - - if (isset($options['s_maxage'])) { - $this->setSharedMaxAge($options['s_maxage']); - } - - foreach (self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES as $directive => $hasValue) { - if (!$hasValue && isset($options[$directive])) { - if ($options[$directive]) { - $this->headers->addCacheControlDirective(str_replace('_', '-', $directive)); - } else { - $this->headers->removeCacheControlDirective(str_replace('_', '-', $directive)); - } - } - } - - if (isset($options['public'])) { - if ($options['public']) { - $this->setPublic(); - } else { - $this->setPrivate(); - } - } - - if (isset($options['private'])) { - if ($options['private']) { - $this->setPrivate(); - } else { - $this->setPublic(); - } - } - - return $this; - } - - /** - * Modifies the response so that it conforms to the rules defined for a 304 status code. - * - * This sets the status, removes the body, and discards any headers - * that MUST NOT be included in 304 responses. - * - * @return $this - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3.5 - * - * @final - */ - public function setNotModified(): object - { - $this->setStatusCode(304); - $this->setContent(null); - - // remove headers that MUST NOT be included with 304 Not Modified responses - foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) { - $this->headers->remove($header); - } - - return $this; - } - - /** - * Returns true if the response includes a Vary header. - * - * @final - */ - public function hasVary(): bool - { - return null !== $this->headers->get('Vary'); - } - - /** - * Returns an array of header names given in the Vary header. - * - * @final - */ - public function getVary(): array - { - if (!$vary = $this->headers->all('Vary')) { - return []; - } - - $ret = []; - foreach ($vary as $item) { - $ret[] = preg_split('/[\s,]+/', $item); - } - - return array_merge([], ...$ret); - } - - /** - * Sets the Vary header. - * - * @param string|array $headers - * @param bool $replace Whether to replace the actual value or not (true by default) - * - * @return $this - * - * @final - */ - public function setVary($headers, bool $replace = true): object - { - $this->headers->set('Vary', $headers, $replace); - - return $this; - } - - /** - * Determines if the Response validators (ETag, Last-Modified) match - * a conditional value specified in the Request. - * - * If the Response is not modified, it sets the status code to 304 and - * removes the actual content by calling the setNotModified() method. - * - * @final - */ - public function isNotModified(Request $request): bool - { - if (!$request->isMethodCacheable()) { - return false; - } - - $notModified = false; - $lastModified = $this->headers->get('Last-Modified'); - $modifiedSince = $request->headers->get('If-Modified-Since'); - - if (($ifNoneMatchEtags = $request->getETags()) && (null !== $etag = $this->getEtag())) { - if (0 == strncmp($etag, 'W/', 2)) { - $etag = substr($etag, 2); - } - - // Use weak comparison as per https://tools.ietf.org/html/rfc7232#section-3.2. - foreach ($ifNoneMatchEtags as $ifNoneMatchEtag) { - if (0 == strncmp($ifNoneMatchEtag, 'W/', 2)) { - $ifNoneMatchEtag = substr($ifNoneMatchEtag, 2); - } - - if ($ifNoneMatchEtag === $etag || '*' === $ifNoneMatchEtag) { - $notModified = true; - break; - } - } - } - // Only do If-Modified-Since date comparison when If-None-Match is not present as per https://tools.ietf.org/html/rfc7232#section-3.3. - elseif ($modifiedSince && $lastModified) { - $notModified = strtotime($modifiedSince) >= strtotime($lastModified); - } - - if ($notModified) { - $this->setNotModified(); - } - - return $notModified; - } - - /** - * Is response invalid? - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - * - * @final - */ - public function isInvalid(): bool - { - return $this->statusCode < 100 || $this->statusCode >= 600; - } - - /** - * Is response informative? - * - * @final - */ - public function isInformational(): bool - { - return $this->statusCode >= 100 && $this->statusCode < 200; - } - - /** - * Is response successful? - * - * @final - */ - public function isSuccessful(): bool - { - return $this->statusCode >= 200 && $this->statusCode < 300; - } - - /** - * Is the response a redirect? - * - * @final - */ - public function isRedirection(): bool - { - return $this->statusCode >= 300 && $this->statusCode < 400; - } - - /** - * Is there a client error? - * - * @final - */ - public function isClientError(): bool - { - return $this->statusCode >= 400 && $this->statusCode < 500; - } - - /** - * Was there a server side error? - * - * @final - */ - public function isServerError(): bool - { - return $this->statusCode >= 500 && $this->statusCode < 600; - } - - /** - * Is the response OK? - * - * @final - */ - public function isOk(): bool - { - return 200 === $this->statusCode; - } - - /** - * Is the response forbidden? - * - * @final - */ - public function isForbidden(): bool - { - return 403 === $this->statusCode; - } - - /** - * Is the response a not found error? - * - * @final - */ - public function isNotFound(): bool - { - return 404 === $this->statusCode; - } - - /** - * Is the response a redirect of some form? - * - * @final - */ - public function isRedirect(string $location = null): bool - { - return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); - } - - /** - * Is the response empty? - * - * @final - */ - public function isEmpty(): bool - { - return \in_array($this->statusCode, [204, 304]); - } - - /** - * Cleans or flushes output buffers up to target level. - * - * Resulting level can be greater than target level if a non-removable buffer has been encountered. - * - * @final - */ - public static function closeOutputBuffers(int $targetLevel, bool $flush): void - { - $status = ob_get_status(true); - $level = \count($status); - $flags = \PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? \PHP_OUTPUT_HANDLER_FLUSHABLE : \PHP_OUTPUT_HANDLER_CLEANABLE); - - while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { - if ($flush) { - ob_end_flush(); - } else { - ob_end_clean(); - } - } - } - - /** - * Marks a response as safe according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function setContentSafe(bool $safe = true): void - { - if ($safe) { - $this->headers->set('Preference-Applied', 'safe'); - } elseif ('safe' === $this->headers->get('Preference-Applied')) { - $this->headers->remove('Preference-Applied'); - } - - $this->setVary('Prefer', false); - } - - /** - * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. - * - * @see http://support.microsoft.com/kb/323308 - * - * @final - */ - protected function ensureIEOverSSLCompatibility(Request $request): void - { - if (false !== stripos($this->headers->get('Content-Disposition') ?? '', 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT') ?? '', $match) && true === $request->isSecure()) { - if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) { - $this->headers->remove('Cache-Control'); - } - } - } -} diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php deleted file mode 100644 index 1df13fa..0000000 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ /dev/null @@ -1,291 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ResponseHeaderBag is a container for Response HTTP headers. - * - * @author Fabien Potencier - */ -class ResponseHeaderBag extends HeaderBag -{ - public const COOKIES_FLAT = 'flat'; - public const COOKIES_ARRAY = 'array'; - - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - protected $computedCacheControl = []; - protected $cookies = []; - protected $headerNames = []; - - public function __construct(array $headers = []) - { - parent::__construct($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - /* RFC2616 - 14.18 says all Responses need to have a Date */ - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * Returns the headers, with original capitalizations. - * - * @return array - */ - public function allPreserveCase() - { - $headers = []; - foreach ($this->all() as $name => $value) { - $headers[$this->headerNames[$name] ?? $name] = $value; - } - - return $headers; - } - - public function allPreserveCaseWithoutCookies() - { - $headers = $this->allPreserveCase(); - if (isset($this->headerNames['set-cookie'])) { - unset($headers[$this->headerNames['set-cookie']]); - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function replace(array $headers = []) - { - $this->headerNames = []; - - parent::replace($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function all(string $key = null) - { - $headers = parent::all(); - - if (null !== $key) { - $key = strtr($key, self::UPPER, self::LOWER); - - return 'set-cookie' !== $key ? $headers[$key] ?? [] : array_map('strval', $this->getCookies()); - } - - foreach ($this->getCookies() as $cookie) { - $headers['set-cookie'][] = (string) $cookie; - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $values, bool $replace = true) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - - if ('set-cookie' === $uniqueKey) { - if ($replace) { - $this->cookies = []; - } - foreach ((array) $values as $cookie) { - $this->setCookie(Cookie::fromString($cookie)); - } - $this->headerNames[$uniqueKey] = $key; - - return; - } - - $this->headerNames[$uniqueKey] = $key; - - parent::set($key, $values, $replace); - - // ensure the cache-control header has sensible defaults - if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true) && '' !== $computed = $this->computeCacheControlValue()) { - $this->headers['cache-control'] = [$computed]; - $this->headerNames['cache-control'] = 'Cache-Control'; - $this->computedCacheControl = $this->parseCacheControl($computed); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $key) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - unset($this->headerNames[$uniqueKey]); - - if ('set-cookie' === $uniqueKey) { - $this->cookies = []; - - return; - } - - parent::remove($key); - - if ('cache-control' === $uniqueKey) { - $this->computedCacheControl = []; - } - - if ('date' === $uniqueKey) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->computedCacheControl); - } - - /** - * {@inheritdoc} - */ - public function getCacheControlDirective(string $key) - { - return $this->computedCacheControl[$key] ?? null; - } - - public function setCookie(Cookie $cookie) - { - $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; - $this->headerNames['set-cookie'] = 'Set-Cookie'; - } - - /** - * Removes a cookie from the array, but does not unset it in the browser. - */ - public function removeCookie(string $name, ?string $path = '/', string $domain = null) - { - if (null === $path) { - $path = '/'; - } - - unset($this->cookies[$domain][$path][$name]); - - if (empty($this->cookies[$domain][$path])) { - unset($this->cookies[$domain][$path]); - - if (empty($this->cookies[$domain])) { - unset($this->cookies[$domain]); - } - } - - if (empty($this->cookies)) { - unset($this->headerNames['set-cookie']); - } - } - - /** - * Returns an array with all cookies. - * - * @return Cookie[] - * - * @throws \InvalidArgumentException When the $format is invalid - */ - public function getCookies(string $format = self::COOKIES_FLAT) - { - if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { - throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); - } - - if (self::COOKIES_ARRAY === $format) { - return $this->cookies; - } - - $flattenedCookies = []; - foreach ($this->cookies as $path) { - foreach ($path as $cookies) { - foreach ($cookies as $cookie) { - $flattenedCookies[] = $cookie; - } - } - } - - return $flattenedCookies; - } - - /** - * Clears a cookie in the browser. - */ - public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null) - { - $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); - } - - /** - * @see HeaderUtils::makeDisposition() - */ - public function makeDisposition(string $disposition, string $filename, string $filenameFallback = '') - { - return HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback); - } - - /** - * Returns the calculated value of the cache-control header. - * - * This considers several other headers and calculates or modifies the - * cache-control header to a sensible, conservative value. - * - * @return string - */ - protected function computeCacheControlValue() - { - if (!$this->cacheControl) { - if ($this->has('Last-Modified') || $this->has('Expires')) { - return 'private, must-revalidate'; // allows for heuristic expiration (RFC 7234 Section 4.2.2) in the case of "Last-Modified" - } - - // conservative by default - return 'no-cache, private'; - } - - $header = $this->getCacheControlHeader(); - if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { - return $header; - } - - // public if s-maxage is defined, private otherwise - if (!isset($this->cacheControl['s-maxage'])) { - return $header.', private'; - } - - return $header; - } - - private function initDate(): void - { - $this->set('Date', gmdate('D, d M Y H:i:s').' GMT'); - } -} diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php deleted file mode 100644 index 25688d5..0000000 --- a/vendor/symfony/http-foundation/ServerBag.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ServerBag is a container for HTTP headers from the $_SERVER variable. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - * @author Robert Kiss - */ -class ServerBag extends ParameterBag -{ - /** - * Gets the HTTP headers. - * - * @return array - */ - public function getHeaders() - { - $headers = []; - foreach ($this->parameters as $key => $value) { - if (str_starts_with($key, 'HTTP_')) { - $headers[substr($key, 5)] = $value; - } elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { - $headers[$key] = $value; - } - } - - if (isset($this->parameters['PHP_AUTH_USER'])) { - $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; - $headers['PHP_AUTH_PW'] = $this->parameters['PHP_AUTH_PW'] ?? ''; - } else { - /* - * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default - * For this workaround to work, add these lines to your .htaccess file: - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * - * A sample .htaccess file: - * RewriteEngine On - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * RewriteCond %{REQUEST_FILENAME} !-f - * RewriteRule ^(.*)$ app.php [QSA,L] - */ - - $authorizationHeader = null; - if (isset($this->parameters['HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; - } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; - } - - if (null !== $authorizationHeader) { - if (0 === stripos($authorizationHeader, 'basic ')) { - // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic - $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); - if (2 == \count($exploded)) { - [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded; - } - } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { - // In some circumstances PHP_AUTH_DIGEST needs to be set - $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; - $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; - } elseif (0 === stripos($authorizationHeader, 'bearer ')) { - /* - * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables, - * I'll just set $headers['AUTHORIZATION'] here. - * https://php.net/reserved.variables.server - */ - $headers['AUTHORIZATION'] = $authorizationHeader; - } - } - } - - if (isset($headers['AUTHORIZATION'])) { - return $headers; - } - - // PHP_AUTH_USER/PHP_AUTH_PW - if (isset($headers['PHP_AUTH_USER'])) { - $headers['AUTHORIZATION'] = 'Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.($headers['PHP_AUTH_PW'] ?? '')); - } elseif (isset($headers['PHP_AUTH_DIGEST'])) { - $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; - } - - return $headers; - } -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php deleted file mode 100644 index f4f051c..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -/** - * This class relates to session attribute storage. - * - * @implements \IteratorAggregate - */ -class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable -{ - private $name = 'attributes'; - private $storageKey; - - protected $attributes = []; - - /** - * @param string $storageKey The key used to store attributes in the session - */ - public function __construct(string $storageKey = '_sf2_attributes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$attributes) - { - $this->attributes = &$attributes; - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->attributes = []; - foreach ($attributes as $key => $value) { - $this->set($key, $value); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - if (\array_key_exists($name, $this->attributes)) { - $retval = $this->attributes[$name]; - unset($this->attributes[$name]); - } - - return $retval; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $return = $this->attributes; - $this->attributes = []; - - return $return; - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->attributes); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->attributes); - } -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php deleted file mode 100644 index cb50696..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Attributes store. - * - * @author Drak - */ -interface AttributeBagInterface extends SessionBagInterface -{ - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array - */ - public function all(); - - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php deleted file mode 100644 index 864b35f..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -trigger_deprecation('symfony/http-foundation', '5.3', 'The "%s" class is deprecated.', NamespacedAttributeBag::class); - -/** - * This class provides structured storage of session attributes using - * a name spacing character in the key. - * - * @author Drak - * - * @deprecated since Symfony 5.3 - */ -class NamespacedAttributeBag extends AttributeBag -{ - private $namespaceCharacter; - - /** - * @param string $storageKey Session storage key - * @param string $namespaceCharacter Namespace character to use in keys - */ - public function __construct(string $storageKey = '_sf2_attributes', string $namespaceCharacter = '/') - { - $this->namespaceCharacter = $namespaceCharacter; - parent::__construct($storageKey); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return false; - } - - return \array_key_exists($name, $attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return $default; - } - - return \array_key_exists($name, $attributes) ? $attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $attributes = &$this->resolveAttributePath($name, true); - $name = $this->resolveKey($name); - $attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - $attributes = &$this->resolveAttributePath($name); - $name = $this->resolveKey($name); - if (null !== $attributes && \array_key_exists($name, $attributes)) { - $retval = $attributes[$name]; - unset($attributes[$name]); - } - - return $retval; - } - - /** - * Resolves a path in attributes property and returns it as a reference. - * - * This method allows structured namespacing of session attributes. - * - * @param string $name Key name - * @param bool $writeContext Write context, default false - * - * @return array|null - */ - protected function &resolveAttributePath(string $name, bool $writeContext = false) - { - $array = &$this->attributes; - $name = (str_starts_with($name, $this->namespaceCharacter)) ? substr($name, 1) : $name; - - // Check if there is anything to do, else return - if (!$name) { - return $array; - } - - $parts = explode($this->namespaceCharacter, $name); - if (\count($parts) < 2) { - if (!$writeContext) { - return $array; - } - - $array[$parts[0]] = []; - - return $array; - } - - unset($parts[\count($parts) - 1]); - - foreach ($parts as $part) { - if (null !== $array && !\array_key_exists($part, $array)) { - if (!$writeContext) { - $null = null; - - return $null; - } - - $array[$part] = []; - } - - $array = &$array[$part]; - } - - return $array; - } - - /** - * Resolves the key from the name. - * - * This is the last part in a dot separated string. - * - * @return string - */ - protected function resolveKey(string $name) - { - if (false !== $pos = strrpos($name, $this->namespaceCharacter)) { - $name = substr($name, $pos + 1); - } - - return $name; - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php deleted file mode 100644 index 8aab3a1..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * AutoExpireFlashBag flash message container. - * - * @author Drak - */ -class AutoExpireFlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = ['display' => [], 'new' => []]; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - - // The logic: messages from the last request will be stored in new, so we move them to previous - // This request we will show what is in 'display'. What is placed into 'new' this time round will - // be moved to display next time round. - $this->flashes['display'] = \array_key_exists('new', $this->flashes) ? $this->flashes['new'] : []; - $this->flashes['new'] = []; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes['new'][$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes['display'][$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return \array_key_exists('display', $this->flashes) ? $this->flashes['display'] : []; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - $return = $default; - - if (!$this->has($type)) { - return $return; - } - - if (isset($this->flashes['display'][$type])) { - $return = $this->flashes['display'][$type]; - unset($this->flashes['display'][$type]); - } - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->flashes['display']; - $this->flashes['display'] = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes['new'] = $messages; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes['new'][$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes['display']); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php deleted file mode 100644 index 88df750..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * FlashBag flash message container. - * - * @author Drak - */ -class FlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = []; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes[$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes[$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return $this->flashes; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - if (!$this->has($type)) { - return $default; - } - - $return = $this->flashes[$type]; - - unset($this->flashes[$type]); - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->peekAll(); - $this->flashes = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes[$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes = $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php deleted file mode 100644 index 8713e71..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * FlashBagInterface. - * - * @author Drak - */ -interface FlashBagInterface extends SessionBagInterface -{ - /** - * Adds a flash message for the given type. - * - * @param mixed $message - */ - public function add(string $type, $message); - - /** - * Registers one or more messages for a given type. - * - * @param string|array $messages - */ - public function set(string $type, $messages); - - /** - * Gets flash messages for a given type. - * - * @param string $type Message category type - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function peek(string $type, array $default = []); - - /** - * Gets all flash messages. - * - * @return array - */ - public function peekAll(); - - /** - * Gets and clears flash from the stack. - * - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function get(string $type, array $default = []); - - /** - * Gets and clears flashes from the stack. - * - * @return array - */ - public function all(); - - /** - * Sets all flash messages. - */ - public function setAll(array $messages); - - /** - * Has flash messages for a given type? - * - * @return bool - */ - public function has(string $type); - - /** - * Returns a list of all defined types. - * - * @return array - */ - public function keys(); -} diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php deleted file mode 100644 index 022e398..0000000 --- a/vendor/symfony/http-foundation/Session/Session.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AttributeBag::class); -class_exists(FlashBag::class); -class_exists(SessionBagProxy::class); - -/** - * @author Fabien Potencier - * @author Drak - * - * @implements \IteratorAggregate - */ -class Session implements SessionInterface, \IteratorAggregate, \Countable -{ - protected $storage; - - private $flashName; - private $attributeName; - private $data = []; - private $usageIndex = 0; - private $usageReporter; - - public function __construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null, callable $usageReporter = null) - { - $this->storage = $storage ?? new NativeSessionStorage(); - $this->usageReporter = $usageReporter; - - $attributes = $attributes ?? new AttributeBag(); - $this->attributeName = $attributes->getName(); - $this->registerBag($attributes); - - $flashes = $flashes ?? new FlashBag(); - $this->flashName = $flashes->getName(); - $this->registerBag($flashes); - } - - /** - * {@inheritdoc} - */ - public function start() - { - return $this->storage->start(); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return $this->getAttributeBag()->has($name); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return $this->getAttributeBag()->get($name, $default); - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->getAttributeBag()->set($name, $value); - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->getAttributeBag()->all(); - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->getAttributeBag()->replace($attributes); - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - return $this->getAttributeBag()->remove($name); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->getAttributeBag()->clear(); - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->storage->isStarted(); - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->getAttributeBag()->all()); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getAttributeBag()->all()); - } - - public function &getUsageIndex(): int - { - return $this->usageIndex; - } - - /** - * @internal - */ - public function isEmpty(): bool - { - if ($this->isStarted()) { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - } - foreach ($this->data as &$data) { - if (!empty($data)) { - return false; - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function invalidate(int $lifetime = null) - { - $this->storage->clear(); - - return $this->migrate(true, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function migrate(bool $destroy = false, int $lifetime = null) - { - return $this->storage->regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - $this->storage->save(); - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->storage->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->storage->getId() !== $id) { - $this->storage->setId($id); - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->storage->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->storage->setName($name); - } - - /** - * {@inheritdoc} - */ - public function getMetadataBag() - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->storage->getMetadataBag(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - $bag = $this->storage->getBag($name); - - return method_exists($bag, 'getBag') ? $bag->getBag() : $bag; - } - - /** - * Gets the flashbag interface. - * - * @return FlashBagInterface - */ - public function getFlashBag() - { - return $this->getBag($this->flashName); - } - - /** - * Gets the attributebag interface. - * - * Note that this method was added to help with IDE autocompletion. - */ - private function getAttributeBag(): AttributeBagInterface - { - return $this->getBag($this->attributeName); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionBagInterface.php b/vendor/symfony/http-foundation/Session/SessionBagInterface.php deleted file mode 100644 index 8e37d06..0000000 --- a/vendor/symfony/http-foundation/Session/SessionBagInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session Bag store. - * - * @author Drak - */ -interface SessionBagInterface -{ - /** - * Gets this bag's name. - * - * @return string - */ - public function getName(); - - /** - * Initializes the Bag. - */ - public function initialize(array &$array); - - /** - * Gets the storage key for this bag. - * - * @return string - */ - public function getStorageKey(); - - /** - * Clears out data from bag. - * - * @return mixed Whatever data was contained - */ - public function clear(); -} diff --git a/vendor/symfony/http-foundation/Session/SessionBagProxy.php b/vendor/symfony/http-foundation/Session/SessionBagProxy.php deleted file mode 100644 index 90aa010..0000000 --- a/vendor/symfony/http-foundation/Session/SessionBagProxy.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class SessionBagProxy implements SessionBagInterface -{ - private $bag; - private $data; - private $usageIndex; - private $usageReporter; - - public function __construct(SessionBagInterface $bag, array &$data, ?int &$usageIndex, ?callable $usageReporter) - { - $this->bag = $bag; - $this->data = &$data; - $this->usageIndex = &$usageIndex; - $this->usageReporter = $usageReporter; - } - - public function getBag(): SessionBagInterface - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->bag; - } - - public function isEmpty(): bool - { - if (!isset($this->data[$this->bag->getStorageKey()])) { - return true; - } - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return empty($this->data[$this->bag->getStorageKey()]); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->bag->getName(); - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array): void - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - $this->data[$this->bag->getStorageKey()] = &$array; - - $this->bag->initialize($array); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey(): string - { - return $this->bag->getStorageKey(); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->bag->clear(); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionFactory.php b/vendor/symfony/http-foundation/Session/SessionFactory.php deleted file mode 100644 index 04c4b06..0000000 --- a/vendor/symfony/http-foundation/Session/SessionFactory.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(Session::class); - -/** - * @author Jérémy Derussé - */ -class SessionFactory implements SessionFactoryInterface -{ - private $requestStack; - private $storageFactory; - private $usageReporter; - - public function __construct(RequestStack $requestStack, SessionStorageFactoryInterface $storageFactory, callable $usageReporter = null) - { - $this->requestStack = $requestStack; - $this->storageFactory = $storageFactory; - $this->usageReporter = $usageReporter; - } - - public function createSession(): SessionInterface - { - return new Session($this->storageFactory->createStorage($this->requestStack->getMainRequest()), null, null, $this->usageReporter); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php b/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php deleted file mode 100644 index b24fdc4..0000000 --- a/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Kevin Bond - */ -interface SessionFactoryInterface -{ - public function createSession(): SessionInterface; -} diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php deleted file mode 100644 index b2f09fd..0000000 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; - -/** - * Interface for the session. - * - * @author Drak - */ -interface SessionInterface -{ - /** - * Starts the session storage. - * - * @return bool - * - * @throws \RuntimeException if session fails to start - */ - public function start(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Invalidates the current session. - * - * Clears all session attributes and flashes and regenerates the - * session and deletes the old session from persistence. - * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function invalidate(int $lifetime = null); - - /** - * Migrates the current session to a new session id while maintaining all - * session attributes. - * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function migrate(bool $destroy = false, int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method is generally not required for real sessions as - * the session will be automatically saved at the end of - * code execution. - */ - public function save(); - - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array - */ - public function all(); - - /** - * Sets attributes. - */ - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); - - /** - * Clears all attributes. - */ - public function clear(); - - /** - * Checks if the session was started. - * - * @return bool - */ - public function isStarted(); - - /** - * Registers a SessionBagInterface with the session. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * Gets a bag instance by name. - * - * @return SessionBagInterface - */ - public function getBag(string $name); - - /** - * Gets session meta. - * - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/vendor/symfony/http-foundation/Session/SessionUtils.php b/vendor/symfony/http-foundation/Session/SessionUtils.php deleted file mode 100644 index b5bce4a..0000000 --- a/vendor/symfony/http-foundation/Session/SessionUtils.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session utility functions. - * - * @author Nicolas Grekas - * @author Rémon van de Kamp - * - * @internal - */ -final class SessionUtils -{ - /** - * Finds the session header amongst the headers that are to be sent, removes it, and returns - * it so the caller can process it further. - */ - public static function popSessionCookie(string $sessionName, string $sessionId): ?string - { - $sessionCookie = null; - $sessionCookiePrefix = sprintf(' %s=', urlencode($sessionName)); - $sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId)); - $otherCookies = []; - foreach (headers_list() as $h) { - if (0 !== stripos($h, 'Set-Cookie:')) { - continue; - } - if (11 === strpos($h, $sessionCookiePrefix, 11)) { - $sessionCookie = $h; - - if (11 !== strpos($h, $sessionCookieWithId, 11)) { - $otherCookies[] = $h; - } - } else { - $otherCookies[] = $h; - } - } - if (null === $sessionCookie) { - return null; - } - - header_remove('Set-Cookie'); - foreach ($otherCookies as $h) { - header($h, false); - } - - return $sessionCookie; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php deleted file mode 100644 index bc7b944..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\HttpFoundation\Session\SessionUtils; - -/** - * This abstract session handler provides a generic implementation - * of the PHP 7.0 SessionUpdateTimestampHandlerInterface, - * enabling strict and lazy session handling. - * - * @author Nicolas Grekas - */ -abstract class AbstractSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $sessionName; - private $prefetchId; - private $prefetchData; - private $newSessionId; - private $igbinaryEmptyData; - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionName = $sessionName; - if (!headers_sent() && !ini_get('session.cache_limiter') && '0' !== ini_get('session.cache_limiter')) { - header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) ini_get('session.cache_expire'))); - } - - return true; - } - - /** - * @return string - */ - abstract protected function doRead(string $sessionId); - - /** - * @return bool - */ - abstract protected function doWrite(string $sessionId, string $data); - - /** - * @return bool - */ - abstract protected function doDestroy(string $sessionId); - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - $this->prefetchData = $this->read($sessionId); - $this->prefetchId = $sessionId; - - if (\PHP_VERSION_ID < 70317 || (70400 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70405)) { - // work around https://bugs.php.net/79413 - foreach (debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { - if (!isset($frame['class']) && isset($frame['function']) && \in_array($frame['function'], ['session_regenerate_id', 'session_create_id'], true)) { - return '' === $this->prefetchData; - } - } - } - - return '' !== $this->prefetchData; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - if (null !== $this->prefetchId) { - $prefetchId = $this->prefetchId; - $prefetchData = $this->prefetchData; - $this->prefetchId = $this->prefetchData = null; - - if ($prefetchId === $sessionId || '' === $prefetchData) { - $this->newSessionId = '' === $prefetchData ? $sessionId : null; - - return $prefetchData; - } - } - - $data = $this->doRead($sessionId); - $this->newSessionId = '' === $data ? $sessionId : null; - - return $data; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - if (null === $this->igbinaryEmptyData) { - // see https://github.com/igbinary/igbinary/issues/146 - $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize([]) : ''; - } - if ('' === $data || $this->igbinaryEmptyData === $data) { - return $this->destroy($sessionId); - } - $this->newSessionId = null; - - return $this->doWrite($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - if (!headers_sent() && filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { - if (!$this->sessionName) { - throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class)); - } - $cookie = SessionUtils::popSessionCookie($this->sessionName, $sessionId); - - /* - * We send an invalidation Set-Cookie header (zero lifetime) - * when either the session was started or a cookie with - * the session name was sent by the client (in which case - * we know it's invalid as a valid session cookie would've - * started the session). - */ - if (null === $cookie || isset($_COOKIE[$this->sessionName])) { - if (\PHP_VERSION_ID < 70300) { - setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN)); - } else { - $params = session_get_cookie_params(); - unset($params['lifetime']); - setcookie($this->sessionName, '', $params); - } - } - } - - return $this->newSessionId === $sessionId || $this->doDestroy($sessionId); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php b/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php deleted file mode 100644 index bea3a32..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE - */ -class IdentityMarshaller implements MarshallerInterface -{ - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - foreach ($values as $key => $value) { - if (!\is_string($value)) { - throw new \LogicException(sprintf('%s accepts only string as data.', __METHOD__)); - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value): string - { - return $value; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php deleted file mode 100644 index c321c8c..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE - */ -class MarshallingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $handler; - private $marshaller; - - public function __construct(AbstractSessionHandler $handler, MarshallerInterface $marshaller) - { - $this->handler = $handler; - $this->marshaller = $marshaller; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $name) - { - return $this->handler->open($savePath, $name); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->marshaller->unmarshall($this->handler->read($sessionId)); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - $failed = []; - $marshalledData = $this->marshaller->marshall(['data' => $data], $failed); - - if (isset($failed['data'])) { - return false; - } - - return $this->handler->write($sessionId, $marshalledData['data']); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler->updateTimestamp($sessionId, $data); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php deleted file mode 100644 index a5a78eb..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Memcached based session storage handler based on the Memcached class - * provided by the PHP memcached extension. - * - * @see https://php.net/memcached - * - * @author Drak - */ -class MemcachedSessionHandler extends AbstractSessionHandler -{ - private $memcached; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * Constructor. - * - * List of available options: - * * prefix: The prefix to use for the memcached keys in order to avoid collision - * * ttl: The time to live in seconds. - * - * @throws \InvalidArgumentException When unsupported options are passed - */ - public function __construct(\Memcached $memcached, array $options = []) - { - $this->memcached = $memcached; - - if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->ttl = $options['expiretime'] ?? $options['ttl'] ?? null; - $this->prefix = $options['prefix'] ?? 'sf2s'; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->memcached->quit(); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->memcached->get($this->prefix.$sessionId) ?: ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $this->memcached->touch($this->prefix.$sessionId, time() + (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->memcached->set($this->prefix.$sessionId, $data, time() + (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $result = $this->memcached->delete($this->prefix.$sessionId); - - return $result || \Memcached::RES_NOTFOUND == $this->memcached->getResultCode(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // not required here because memcached will auto expire the records anyhow. - return 0; - } - - /** - * Return a Memcached instance. - * - * @return \Memcached - */ - protected function getMemcached() - { - return $this->memcached; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php deleted file mode 100644 index bf27ca6..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Migrating session handler for migrating from one handler to another. It reads - * from the current handler and writes both the current and new ones. - * - * It ignores errors from the new handler. - * - * @author Ross Motley - * @author Oliver Radwell - */ -class MigratingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $currentHandler; - - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $writeOnlyHandler; - - public function __construct(\SessionHandlerInterface $currentHandler, \SessionHandlerInterface $writeOnlyHandler) - { - if (!$currentHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $currentHandler = new StrictSessionHandler($currentHandler); - } - if (!$writeOnlyHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $writeOnlyHandler = new StrictSessionHandler($writeOnlyHandler); - } - - $this->currentHandler = $currentHandler; - $this->writeOnlyHandler = $writeOnlyHandler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $result = $this->currentHandler->close(); - $this->writeOnlyHandler->close(); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $result = $this->currentHandler->destroy($sessionId); - $this->writeOnlyHandler->destroy($sessionId); - - return $result; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - $result = $this->currentHandler->gc($maxlifetime); - $this->writeOnlyHandler->gc($maxlifetime); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $result = $this->currentHandler->open($savePath, $sessionName); - $this->writeOnlyHandler->open($savePath, $sessionName); - - return $result; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $sessionData) - { - $result = $this->currentHandler->write($sessionId, $sessionData); - $this->writeOnlyHandler->write($sessionId, $sessionData); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $sessionData) - { - $result = $this->currentHandler->updateTimestamp($sessionId, $sessionData); - $this->writeOnlyHandler->updateTimestamp($sessionId, $sessionData); - - return $result; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php deleted file mode 100644 index 8384e79..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ /dev/null @@ -1,193 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use MongoDB\BSON\Binary; -use MongoDB\BSON\UTCDateTime; -use MongoDB\Client; -use MongoDB\Collection; - -/** - * Session handler using the mongodb/mongodb package and MongoDB driver extension. - * - * @author Markus Bachmann - * - * @see https://packagist.org/packages/mongodb/mongodb - * @see https://php.net/mongodb - */ -class MongoDbSessionHandler extends AbstractSessionHandler -{ - private $mongo; - - /** - * @var Collection - */ - private $collection; - - /** - * @var array - */ - private $options; - - /** - * Constructor. - * - * List of available options: - * * database: The name of the database [required] - * * collection: The name of the collection [required] - * * id_field: The field name for storing the session id [default: _id] - * * data_field: The field name for storing the session data [default: data] - * * time_field: The field name for storing the timestamp [default: time] - * * expiry_field: The field name for storing the expiry-timestamp [default: expires_at]. - * - * It is strongly recommended to put an index on the `expiry_field` for - * garbage-collection. Alternatively it's possible to automatically expire - * the sessions in the database as described below: - * - * A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions - * automatically. Such an index can for example look like this: - * - * db..createIndex( - * { "": 1 }, - * { "expireAfterSeconds": 0 } - * ) - * - * More details on: https://docs.mongodb.org/manual/tutorial/expire-data/ - * - * If you use such an index, you can drop `gc_probability` to 0 since - * no garbage-collection is required. - * - * @throws \InvalidArgumentException When "database" or "collection" not provided - */ - public function __construct(Client $mongo, array $options) - { - if (!isset($options['database']) || !isset($options['collection'])) { - throw new \InvalidArgumentException('You must provide the "database" and "collection" option for MongoDBSessionHandler.'); - } - - $this->mongo = $mongo; - - $this->options = array_merge([ - 'id_field' => '_id', - 'data_field' => 'data', - 'time_field' => 'time', - 'expiry_field' => 'expires_at', - ], $options); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->getCollection()->deleteOne([ - $this->options['id_field'] => $sessionId, - ]); - - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->getCollection()->deleteMany([ - $this->options['expiry_field'] => ['$lt' => new UTCDateTime()], - ])->getDeletedCount(); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $expiry = new UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); - - $fields = [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - $this->options['data_field'] => new Binary($data, Binary::TYPE_OLD_BINARY), - ]; - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => $fields], - ['upsert' => true] - ); - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = new UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - ]] - ); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - $dbData = $this->getCollection()->findOne([ - $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => ['$gte' => new UTCDateTime()], - ]); - - if (null === $dbData) { - return ''; - } - - return $dbData[$this->options['data_field']]->getData(); - } - - private function getCollection(): Collection - { - if (null === $this->collection) { - $this->collection = $this->mongo->selectCollection($this->options['database'], $this->options['collection']); - } - - return $this->collection; - } - - /** - * @return Client - */ - protected function getMongo() - { - return $this->mongo; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php deleted file mode 100644 index effc9db..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Native session handler using PHP's built in file storage. - * - * @author Drak - */ -class NativeFileSessionHandler extends \SessionHandler -{ - /** - * @param string $savePath Path of directory to save session files - * Default null will leave setting as defined by PHP. - * '/path', 'N;/path', or 'N;octal-mode;/path - * - * @see https://php.net/session.configuration#ini.session.save-path for further details. - * - * @throws \InvalidArgumentException On invalid $savePath - * @throws \RuntimeException When failing to create the save directory - */ - public function __construct(string $savePath = null) - { - if (null === $savePath) { - $savePath = ini_get('session.save_path'); - } - - $baseDir = $savePath; - - if ($count = substr_count($savePath, ';')) { - if ($count > 2) { - throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'.', $savePath)); - } - - // characters after last ';' are the path - $baseDir = ltrim(strrchr($savePath, ';'), ';'); - } - - if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir)); - } - - ini_set('session.save_path', $savePath); - ini_set('session.save_handler', 'files'); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php deleted file mode 100644 index 4331dbe..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Can be used in unit testing or in a situations where persisted sessions are not desired. - * - * @author Drak - */ -class NullSessionHandler extends AbstractSessionHandler -{ - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php deleted file mode 100644 index 067bfcb..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ /dev/null @@ -1,943 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Session handler using a PDO connection to read and write data. - * - * It works with MySQL, PostgreSQL, Oracle, SQL Server and SQLite and implements - * different locking strategies to handle concurrent access to the same session. - * Locking is necessary to prevent loss of data due to race conditions and to keep - * the session data consistent between read() and write(). With locking, requests - * for the same session will wait until the other one finished writing. For this - * reason it's best practice to close a session as early as possible to improve - * concurrency. PHPs internal files session handler also implements locking. - * - * Attention: Since SQLite does not support row level locks but locks the whole database, - * it means only one session can be accessed at a time. Even different sessions would wait - * for another to finish. So saving session in SQLite should only be considered for - * development or prototypes. - * - * Session data is a binary string that can contain non-printable characters like the null byte. - * For this reason it must be saved in a binary column in the database like BLOB in MySQL. - * Saving it in a character column could corrupt the data. You can use createTable() - * to initialize a correctly defined table. - * - * @see https://php.net/sessionhandlerinterface - * - * @author Fabien Potencier - * @author Michael Williams - * @author Tobias Schultze - */ -class PdoSessionHandler extends AbstractSessionHandler -{ - /** - * No locking is done. This means sessions are prone to loss of data due to - * race conditions of concurrent requests to the same session. The last session - * write will win in this case. It might be useful when you implement your own - * logic to deal with this like an optimistic approach. - */ - public const LOCK_NONE = 0; - - /** - * Creates an application-level lock on a session. The disadvantage is that the - * lock is not enforced by the database and thus other, unaware parts of the - * application could still concurrently modify the session. The advantage is it - * does not require a transaction. - * This mode is not available for SQLite and not yet implemented for oci and sqlsrv. - */ - public const LOCK_ADVISORY = 1; - - /** - * Issues a real row lock. Since it uses a transaction between opening and - * closing a session, you have to be careful when you use same database connection - * that you also use for your application logic. This mode is the default because - * it's the only reliable solution across DBMSs. - */ - public const LOCK_TRANSACTIONAL = 2; - - private const MAX_LIFETIME = 315576000; - - /** - * @var \PDO|null PDO instance or null when not connected yet - */ - private $pdo; - - /** - * DSN string or null for session.save_path or false when lazy connection disabled. - * - * @var string|false|null - */ - private $dsn = false; - - /** - * @var string|null - */ - private $driver; - - /** - * @var string - */ - private $table = 'sessions'; - - /** - * @var string - */ - private $idCol = 'sess_id'; - - /** - * @var string - */ - private $dataCol = 'sess_data'; - - /** - * @var string - */ - private $lifetimeCol = 'sess_lifetime'; - - /** - * @var string - */ - private $timeCol = 'sess_time'; - - /** - * Username when lazy-connect. - * - * @var string - */ - private $username = ''; - - /** - * Password when lazy-connect. - * - * @var string - */ - private $password = ''; - - /** - * Connection options when lazy-connect. - * - * @var array - */ - private $connectionOptions = []; - - /** - * The strategy for locking, see constants. - * - * @var int - */ - private $lockMode = self::LOCK_TRANSACTIONAL; - - /** - * It's an array to support multiple reads before closing which is manual, non-standard usage. - * - * @var \PDOStatement[] An array of statements to release advisory locks - */ - private $unlockStatements = []; - - /** - * True when the current session exists but expired according to session.gc_maxlifetime. - * - * @var bool - */ - private $sessionExpired = false; - - /** - * Whether a transaction is active. - * - * @var bool - */ - private $inTransaction = false; - - /** - * Whether gc() has been called. - * - * @var bool - */ - private $gcCalled = false; - - /** - * You can either pass an existing database connection as PDO instance or - * pass a DSN string that will be used to lazy-connect to the database - * when the session is actually used. Furthermore it's possible to pass null - * which will then use the session.save_path ini setting as PDO DSN parameter. - * - * List of available options: - * * db_table: The name of the table [default: sessions] - * * db_id_col: The column where to store the session id [default: sess_id] - * * db_data_col: The column where to store the session data [default: sess_data] - * * db_lifetime_col: The column where to store the lifetime [default: sess_lifetime] - * * db_time_col: The column where to store the timestamp [default: sess_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] - * - * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null - * - * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - */ - public function __construct($pdoOrDsn = null, array $options = []) - { - if ($pdoOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->pdo = $pdoOrDsn; - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } elseif (\is_string($pdoOrDsn) && str_contains($pdoOrDsn, '://')) { - $this->dsn = $this->buildDsnFromUrl($pdoOrDsn); - } else { - $this->dsn = $pdoOrDsn; - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->lockMode = $options['lock_mode'] ?? $this->lockMode; - } - - /** - * Creates the table to store sessions which can be called once for setup. - * - * Session ID is saved in a column of maximum length 128 because that is enough even - * for a 512 bit configured session.hash_function like Whirlpool. Session data is - * saved in a BLOB. One could also use a shorter inlined varbinary column - * if one was sure the data fits into it. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable() - { - // connect if we are not yet - $this->getConnection(); - - switch ($this->driver) { - case 'mysql': - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB"; - break; - case 'sqlite': - $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'pgsql': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'oci': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'sqlsrv': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - default: - throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)); - } - - try { - $this->pdo->exec($sql); - $this->pdo->exec("CREATE INDEX EXPIRY ON $this->table ($this->lifetimeCol)"); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * Returns true when the current session exists but expired according to session.gc_maxlifetime. - * - * Can be used to distinguish between a new session and one that expired due to inactivity. - * - * @return bool - */ - public function isSessionExpired() - { - return $this->sessionExpired; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionExpired = false; - - if (null === $this->pdo) { - $this->connect($this->dsn ?: $savePath); - } - - return parent::open($savePath, $sessionName); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - try { - return parent::read($sessionId); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // We delay gc() to close() so that it is executed outside the transactional and blocking read-write process. - // This way, pruning expired sessions does not block them from being started while the current session is used. - $this->gcCalled = true; - - return 0; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - // delete the record associated with this id - $sql = "DELETE FROM $this->table WHERE $this->idCol = :id"; - - try { - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $maxlifetime = (int) ini_get('session.gc_maxlifetime'); - - try { - // We use a single MERGE SQL query when supported by the database. - $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); - if (null !== $mergeStmt) { - $mergeStmt->execute(); - - return true; - } - - $updateStmt = $this->getUpdateStatement($sessionId, $data, $maxlifetime); - $updateStmt->execute(); - - // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in - // duplicate key errors when the same session is written simultaneously (given the LOCK_NONE behavior). - // We can just catch such an error and re-execute the update. This is similar to a serializable - // transaction with retry logic on serialization failures but without the overhead and without possible - // false positives due to longer gap locking. - if (!$updateStmt->rowCount()) { - try { - $insertStmt = $this->getInsertStatement($sessionId, $data, $maxlifetime); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Handle integrity violation SQLSTATE 23000 (or a subclass like 23505 in Postgres) for duplicate keys - if (str_starts_with($e->getCode(), '23')) { - $updateStmt->execute(); - } else { - throw $e; - } - } - } - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = time() + (int) ini_get('session.gc_maxlifetime'); - - try { - $updateStmt = $this->pdo->prepare( - "UPDATE $this->table SET $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id" - ); - $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $updateStmt->bindParam(':expiry', $expiry, \PDO::PARAM_INT); - $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); - $updateStmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $this->commit(); - - while ($unlockStmt = array_shift($this->unlockStatements)) { - $unlockStmt->execute(); - } - - if ($this->gcCalled) { - $this->gcCalled = false; - - // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time AND $this->lifetimeCol > :min"; - $stmt = $this->pdo->prepare($sql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - // to be removed in 6.0 - if ('mysql' === $this->driver) { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol + $this->timeCol < :time"; - } else { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol < :time - $this->timeCol"; - } - - $stmt = $this->pdo->prepare($legacySql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - } - - if (false !== $this->dsn) { - $this->pdo = null; // only close lazy-connection - $this->driver = null; - } - - return true; - } - - /** - * Lazy-connects to the database. - */ - private function connect(string $dsn): void - { - $this->pdo = new \PDO($dsn, $this->username, $this->password, $this->connectionOptions); - $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - /** - * Builds a PDO DSN from a URL-like connection string. - * - * @todo implement missing support for oci DSN (which look totally different from other PDO ones) - */ - private function buildDsnFromUrl(string $dsnOrUrl): string - { - // (pdo_)?sqlite3?:///... => (pdo_)?sqlite3?://localhost/... or else the URL will be invalid - $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $dsnOrUrl); - - $params = parse_url($url); - - if (false === $params) { - return $dsnOrUrl; // If the URL is not valid, let's assume it might be a DSN already. - } - - $params = array_map('rawurldecode', $params); - - // Override the default username and password. Values passed through options will still win over these in the constructor. - if (isset($params['user'])) { - $this->username = $params['user']; - } - - if (isset($params['pass'])) { - $this->password = $params['pass']; - } - - if (!isset($params['scheme'])) { - throw new \InvalidArgumentException('URLs without scheme are not supported to configure the PdoSessionHandler.'); - } - - $driverAliasMap = [ - 'mssql' => 'sqlsrv', - 'mysql2' => 'mysql', // Amazon RDS, for some weird reason - 'postgres' => 'pgsql', - 'postgresql' => 'pgsql', - 'sqlite3' => 'sqlite', - ]; - - $driver = $driverAliasMap[$params['scheme']] ?? $params['scheme']; - - // Doctrine DBAL supports passing its internal pdo_* driver names directly too (allowing both dashes and underscores). This allows supporting the same here. - if (str_starts_with($driver, 'pdo_') || str_starts_with($driver, 'pdo-')) { - $driver = substr($driver, 4); - } - - $dsn = null; - switch ($driver) { - case 'mysql': - $dsn = 'mysql:'; - if ('' !== ($params['query'] ?? '')) { - $queryParams = []; - parse_str($params['query'], $queryParams); - if ('' !== ($queryParams['charset'] ?? '')) { - $dsn .= 'charset='.$queryParams['charset'].';'; - } - - if ('' !== ($queryParams['unix_socket'] ?? '')) { - $dsn .= 'unix_socket='.$queryParams['unix_socket'].';'; - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - } - } - // If "unix_socket" is not in the query, we continue with the same process as pgsql - // no break - case 'pgsql': - $dsn ?? $dsn = 'pgsql:'; - - if (isset($params['host']) && '' !== $params['host']) { - $dsn .= 'host='.$params['host'].';'; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= 'port='.$params['port'].';'; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - - case 'sqlite': - return 'sqlite:'.substr($params['path'], 1); - - case 'sqlsrv': - $dsn = 'sqlsrv:server='; - - if (isset($params['host'])) { - $dsn .= $params['host']; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= ','.$params['port']; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= ';Database='.$dbName; - } - - return $dsn; - - default: - throw new \InvalidArgumentException(sprintf('The scheme "%s" is not supported by the PdoSessionHandler URL configuration. Pass a PDO DSN directly.', $params['scheme'])); - } - } - - /** - * Helper method to begin a transaction. - * - * Since SQLite does not support row level locks, we have to acquire a reserved lock - * on the database immediately. Because of https://bugs.php.net/42766 we have to create - * such a transaction manually which also means we cannot use PDO::commit or - * PDO::rollback or PDO::inTransaction for SQLite. - * - * Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions - * due to https://percona.com/blog/2013/12/12/one-more-innodb-gap-lock-to-avoid/ . - * So we change it to READ COMMITTED. - */ - private function beginTransaction(): void - { - if (!$this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('BEGIN IMMEDIATE TRANSACTION'); - } else { - if ('mysql' === $this->driver) { - $this->pdo->exec('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - } - $this->pdo->beginTransaction(); - } - $this->inTransaction = true; - } - } - - /** - * Helper method to commit a transaction. - */ - private function commit(): void - { - if ($this->inTransaction) { - try { - // commit read-write transaction which also releases the lock - if ('sqlite' === $this->driver) { - $this->pdo->exec('COMMIT'); - } else { - $this->pdo->commit(); - } - $this->inTransaction = false; - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - } - - /** - * Helper method to rollback a transaction. - */ - private function rollback(): void - { - // We only need to rollback if we are in a transaction. Otherwise the resulting - // error would hide the real problem why rollback was called. We might not be - // in a transaction when not using the transactional locking behavior or when - // two callbacks (e.g. destroy and write) are invoked that both fail. - if ($this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('ROLLBACK'); - } else { - $this->pdo->rollBack(); - } - $this->inTransaction = false; - } - } - - /** - * Reads the session data in respect to the different locking strategies. - * - * We need to make sure we do not return session data that is already considered garbage according - * to the session.gc_maxlifetime setting because gc() is called after read() and only sometimes. - * - * @return string - */ - protected function doRead(string $sessionId) - { - if (self::LOCK_ADVISORY === $this->lockMode) { - $this->unlockStatements[] = $this->doAdvisoryLock($sessionId); - } - - $selectSql = $this->getSelectSql(); - $selectStmt = $this->pdo->prepare($selectSql); - $selectStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $insertStmt = null; - - while (true) { - $selectStmt->execute(); - $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); - - if ($sessionRows) { - $expiry = (int) $sessionRows[0][1]; - if ($expiry <= self::MAX_LIFETIME) { - $expiry += $sessionRows[0][2]; - } - - if ($expiry < time()) { - $this->sessionExpired = true; - - return ''; - } - - return \is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; - } - - if (null !== $insertStmt) { - $this->rollback(); - throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); - } - - if (!filter_var(ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { - // In strict mode, session fixation is not possible: new sessions always start with a unique - // random id, so that concurrency is not possible and this code path can be skipped. - // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block - // until other connections to the session are committed. - try { - $insertStmt = $this->getInsertStatement($sessionId, '', 0); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Catch duplicate key error because other connection created the session already. - // It would only not be the case when the other connection destroyed the session. - if (str_starts_with($e->getCode(), '23')) { - // Retrieve finished session data written by concurrent connection by restarting the loop. - // We have to start a new transaction as a failed query will mark the current transaction as - // aborted in PostgreSQL and disallow further queries within it. - $this->rollback(); - $this->beginTransaction(); - continue; - } - - throw $e; - } - } - - return ''; - } - } - - /** - * Executes an application-level lock on the database. - * - * @return \PDOStatement The statement that needs to be executed later to release the lock - * - * @throws \DomainException When an unsupported PDO driver is used - * - * @todo implement missing advisory locks - * - for oci using DBMS_LOCK.REQUEST - * - for sqlsrv using sp_getapplock with LockOwner = Session - */ - private function doAdvisoryLock(string $sessionId): \PDOStatement - { - switch ($this->driver) { - case 'mysql': - // MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced. - $lockId = substr($sessionId, 0, 64); - // should we handle the return value? 0 on timeout, null on error - // we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout - $stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)'); - $stmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('DO RELEASE_LOCK(:key)'); - $releaseStmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - - return $releaseStmt; - case 'pgsql': - // Obtaining an exclusive session level advisory lock requires an integer key. - // When session.sid_bits_per_character > 4, the session id can contain non-hex-characters. - // So we cannot just use hexdec(). - if (4 === \PHP_INT_SIZE) { - $sessionInt1 = $this->convertStringToInt($sessionId); - $sessionInt2 = $this->convertStringToInt(substr($sessionId, 4, 4)); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key1, :key2)'); - $stmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $stmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key1, :key2)'); - $releaseStmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $releaseStmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - } else { - $sessionBigInt = $this->convertStringToInt($sessionId); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key)'); - $stmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key)'); - $releaseStmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - } - - return $releaseStmt; - case 'sqlite': - throw new \DomainException('SQLite does not support advisory locks.'); - default: - throw new \DomainException(sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - /** - * Encodes the first 4 (when PHP_INT_SIZE == 4) or 8 characters of the string as an integer. - * - * Keep in mind, PHP integers are signed. - */ - private function convertStringToInt(string $string): int - { - if (4 === \PHP_INT_SIZE) { - return (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - } - - $int1 = (\ord($string[7]) << 24) + (\ord($string[6]) << 16) + (\ord($string[5]) << 8) + \ord($string[4]); - $int2 = (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - - return $int2 + ($int1 << 32); - } - - /** - * Return a locking or nonlocking SQL query to read session information. - * - * @throws \DomainException When an unsupported PDO driver is used - */ - private function getSelectSql(): string - { - if (self::LOCK_TRANSACTIONAL === $this->lockMode) { - $this->beginTransaction(); - - // selecting the time column should be removed in 6.0 - switch ($this->driver) { - case 'mysql': - case 'oci': - case 'pgsql': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id FOR UPDATE"; - case 'sqlsrv': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WITH (UPDLOCK, ROWLOCK) WHERE $this->idCol = :id"; - case 'sqlite': - // we already locked when starting transaction - break; - default: - throw new \DomainException(sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id"; - } - - /** - * Returns an insert statement supported by the database for writing session data. - */ - private function getInsertStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, EMPTY_BLOB(), :expiry, :time) RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns an update statement supported by the database for writing session data. - */ - private function getUpdateStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "UPDATE $this->table SET $this->dataCol = EMPTY_BLOB(), $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. - */ - private function getMergeStatement(string $sessionId, string $data, int $maxlifetime): ?\PDOStatement - { - switch (true) { - case 'mysql' === $this->driver: - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ - $mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $this->driver: - $mergeSql = "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - // MERGE is not supported with LOBs: https://oracle.com/technetwork/articles/fuecks-lobs-095315.html - return null; - } - - $mergeStmt = $this->pdo->prepare($mergeSql); - - if ('sqlsrv' === $this->driver) { - $mergeStmt->bindParam(1, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(2, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(3, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(4, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(5, time(), \PDO::PARAM_INT); - $mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(7, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(8, time(), \PDO::PARAM_INT); - } else { - $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); - } - - return $mergeStmt; - } - - /** - * Return a PDO instance. - * - * @return \PDO - */ - protected function getConnection() - { - if (null === $this->pdo) { - $this->connect($this->dsn ?: ini_get('session.save_path')); - } - - return $this->pdo; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php deleted file mode 100644 index 9573b31..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Predis\Response\ErrorInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * Redis based session storage handler based on the Redis class - * provided by the PHP redis extension. - * - * @author Dalibor Karlović - */ -class RedisSessionHandler extends AbstractSessionHandler -{ - private $redis; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * List of available options: - * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server - * * ttl: The time to live in seconds. - * - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis - * - * @throws \InvalidArgumentException When unsupported client or options are passed - */ - public function __construct($redis, array $options = []) - { - if ( - !$redis instanceof \Redis && - !$redis instanceof \RedisArray && - !$redis instanceof \RedisCluster && - !$redis instanceof \Predis\ClientInterface && - !$redis instanceof RedisProxy && - !$redis instanceof RedisClusterProxy - ) { - throw new \InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis))); - } - - if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->redis = $redis; - $this->prefix = $options['prefix'] ?? 'sf_s'; - $this->ttl = $options['ttl'] ?? null; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId): string - { - return $this->redis->get($this->prefix.$sessionId) ?: ''; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data): bool - { - $result = $this->redis->setEx($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime')), $data); - - return $result && !$result instanceof ErrorInterface; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId): bool - { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($this->prefix.$sessionId); - } catch (\Throwable $e) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($this->prefix.$sessionId); - } - - return true; - } - - /** - * {@inheritdoc} - */ - #[\ReturnTypeWillChange] - public function close(): bool - { - return true; - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php b/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php deleted file mode 100644 index f3f7b20..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Doctrine\DBAL\DriverManager; -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * @author Nicolas Grekas - */ -class SessionHandlerFactory -{ - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy|\Memcached|\PDO|string $connection Connection or DSN - */ - public static function createHandler($connection): AbstractSessionHandler - { - if (!\is_string($connection) && !\is_object($connection)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, get_debug_type($connection))); - } - - if ($options = \is_string($connection) ? parse_url($connection) : false) { - parse_str($options['query'] ?? '', $options); - } - - switch (true) { - case $connection instanceof \Redis: - case $connection instanceof \RedisArray: - case $connection instanceof \RedisCluster: - case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: - return new RedisSessionHandler($connection); - - case $connection instanceof \Memcached: - return new MemcachedSessionHandler($connection); - - case $connection instanceof \PDO: - return new PdoSessionHandler($connection); - - case !\is_string($connection): - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', get_debug_type($connection))); - case str_starts_with($connection, 'file://'): - $savePath = substr($connection, 7); - - return new StrictSessionHandler(new NativeFileSessionHandler('' === $savePath ? null : $savePath)); - - case str_starts_with($connection, 'redis:'): - case str_starts_with($connection, 'rediss:'): - case str_starts_with($connection, 'memcached:'): - if (!class_exists(AbstractAdapter::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $connection)); - } - $handlerClass = str_starts_with($connection, 'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class; - $connection = AbstractAdapter::createConnection($connection, ['lazy' => true]); - - return new $handlerClass($connection, array_intersect_key($options ?: [], ['prefix' => 1, 'ttl' => 1])); - - case str_starts_with($connection, 'pdo_oci://'): - if (!class_exists(DriverManager::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require doctrine/dbal".', $connection)); - } - $connection = DriverManager::getConnection(['url' => $connection])->getWrappedConnection(); - // no break; - - case str_starts_with($connection, 'mssql://'): - case str_starts_with($connection, 'mysql://'): - case str_starts_with($connection, 'mysql2://'): - case str_starts_with($connection, 'pgsql://'): - case str_starts_with($connection, 'postgres://'): - case str_starts_with($connection, 'postgresql://'): - case str_starts_with($connection, 'sqlsrv://'): - case str_starts_with($connection, 'sqlite://'): - case str_starts_with($connection, 'sqlite3://'): - return new PdoSessionHandler($connection, $options ?: []); - } - - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection)); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php deleted file mode 100644 index 0461e99..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Adds basic `SessionUpdateTimestampHandlerInterface` behaviors to another `SessionHandlerInterface`. - * - * @author Nicolas Grekas - */ -class StrictSessionHandler extends AbstractSessionHandler -{ - private $handler; - private $doDestroy; - - public function __construct(\SessionHandlerInterface $handler) - { - if ($handler instanceof \SessionUpdateTimestampHandlerInterface) { - throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_debug_type($handler), self::class)); - } - - $this->handler = $handler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - parent::open($savePath, $sessionName); - - return $this->handler->open($savePath, $sessionName); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->write($sessionId, $data); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $this->doDestroy = true; - $destroyed = parent::destroy($sessionId); - - return $this->doDestroy ? $this->doDestroy($sessionId) : $destroyed; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->doDestroy = false; - - return $this->handler->destroy($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php deleted file mode 100644 index 1bfce55..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Metadata container. - * - * Adds metadata to the session. - * - * @author Drak - */ -class MetadataBag implements SessionBagInterface -{ - public const CREATED = 'c'; - public const UPDATED = 'u'; - public const LIFETIME = 'l'; - - /** - * @var string - */ - private $name = '__metadata'; - - /** - * @var string - */ - private $storageKey; - - /** - * @var array - */ - protected $meta = [self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0]; - - /** - * Unix timestamp. - * - * @var int - */ - private $lastUsed; - - /** - * @var int - */ - private $updateThreshold; - - /** - * @param string $storageKey The key used to store bag in the session - * @param int $updateThreshold The time to wait between two UPDATED updates - */ - public function __construct(string $storageKey = '_sf2_meta', int $updateThreshold = 0) - { - $this->storageKey = $storageKey; - $this->updateThreshold = $updateThreshold; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array) - { - $this->meta = &$array; - - if (isset($array[self::CREATED])) { - $this->lastUsed = $this->meta[self::UPDATED]; - - $timeStamp = time(); - if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { - $this->meta[self::UPDATED] = $timeStamp; - } - } else { - $this->stampCreated(); - } - } - - /** - * Gets the lifetime that the session cookie was set with. - * - * @return int - */ - public function getLifetime() - { - return $this->meta[self::LIFETIME]; - } - - /** - * Stamps a new session's metadata. - * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - */ - public function stampNew(int $lifetime = null) - { - $this->stampCreated($lifetime); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * Gets the created timestamp metadata. - * - * @return int Unix timestamp - */ - public function getCreated() - { - return $this->meta[self::CREATED]; - } - - /** - * Gets the last used metadata. - * - * @return int Unix timestamp - */ - public function getLastUsed() - { - return $this->lastUsed; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // nothing to do - return null; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * Sets name. - */ - public function setName(string $name) - { - $this->name = $name; - } - - private function stampCreated(int $lifetime = null): void - { - $timeStamp = time(); - $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; - $this->meta[self::LIFETIME] = $lifetime ?? (int) ini_get('session.cookie_lifetime'); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php deleted file mode 100644 index c5c2bb0..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * MockArraySessionStorage mocks the session for unit tests. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle. - * - * When doing functional testing, you should use MockFileSessionStorage instead. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - * @author Drak - */ -class MockArraySessionStorage implements SessionStorageInterface -{ - /** - * @var string - */ - protected $id = ''; - - /** - * @var string - */ - protected $name; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var array - */ - protected $data = []; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var array|SessionBagInterface[] - */ - protected $bags = []; - - public function __construct(string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - $this->name = $name; - $this->setMetadataBag($metaBag); - } - - public function setSessionData(array $array) - { - $this->data = $array; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (empty($this->id)) { - $this->id = $this->generateId(); - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - $this->metadataBag->stampNew($lifetime); - $this->id = $this->generateId(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->id; - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->started) { - throw new \LogicException('Cannot set session ID after the session has started.'); - } - - $this->id = $id; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started || $this->closed) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - // nothing to do since we don't persist the session data - $this->closed = false; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $this->data = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - public function setMetadataBag(MetadataBag $bag = null) - { - if (null === $bag) { - $bag = new MetadataBag(); - } - - $this->metadataBag = $bag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * Generates a session ID. - * - * This doesn't need to be particularly cryptographically secure since this is just - * a mock. - * - * @return string - */ - protected function generateId() - { - return hash('sha256', uniqid('ss_mock_', true)); - } - - protected function loadSession() - { - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $this->data[$key] = $this->data[$key] ?? []; - $bag->initialize($this->data[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php deleted file mode 100644 index 8e32a45..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -/** - * MockFileSessionStorage is used to mock sessions for - * functional testing where you may need to persist session data - * across separate PHP processes. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle and this class does - * not pollute any session related globals, including session_*() functions - * or session.* PHP ini directives. - * - * @author Drak - */ -class MockFileSessionStorage extends MockArraySessionStorage -{ - private $savePath; - - /** - * @param string|null $savePath Path of directory to save session files - */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - if (null === $savePath) { - $savePath = sys_get_temp_dir(); - } - - if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $savePath)); - } - - $this->savePath = $savePath; - - parent::__construct($name, $metaBag); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (!$this->id) { - $this->id = $this->generateId(); - } - - $this->read(); - - $this->started = true; - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - if ($destroy) { - $this->destroy(); - } - - return parent::regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - - $data = $this->data; - - foreach ($this->bags as $bag) { - if (empty($data[$key = $bag->getStorageKey()])) { - unset($data[$key]); - } - } - if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { - unset($data[$key]); - } - - try { - if ($data) { - $path = $this->getFilePath(); - $tmp = $path.bin2hex(random_bytes(6)); - file_put_contents($tmp, serialize($data)); - rename($tmp, $path); - } else { - $this->destroy(); - } - } finally { - $this->data = $data; - } - - // this is needed when the session object is re-used across multiple requests - // in functional tests. - $this->started = false; - } - - /** - * Deletes a session from persistent storage. - * Deliberately leaves session data in memory intact. - */ - private function destroy(): void - { - set_error_handler(static function () {}); - try { - unlink($this->getFilePath()); - } finally { - restore_error_handler(); - } - } - - /** - * Calculate path to file. - */ - private function getFilePath(): string - { - return $this->savePath.'/'.$this->id.'.mocksess'; - } - - /** - * Reads session from storage and loads session. - */ - private function read(): void - { - set_error_handler(static function () {}); - try { - $data = file_get_contents($this->getFilePath()); - } finally { - restore_error_handler(); - } - - $this->data = $data ? unserialize($data) : []; - - $this->loadSession(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php deleted file mode 100644 index d0da1e1..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(MockFileSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class MockFileSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $savePath; - private $name; - private $metaBag; - - /** - * @see MockFileSessionStorage constructor. - */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) - { - $this->savePath = $savePath; - $this->name = $name; - $this->metaBag = $metaBag; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - return new MockFileSessionStorage($this->savePath, $this->name, $this->metaBag); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php deleted file mode 100644 index 02467da..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ /dev/null @@ -1,470 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; -use Symfony\Component\HttpFoundation\Session\SessionUtils; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; - -// Help opcache.preload discover always-needed symbols -class_exists(MetadataBag::class); -class_exists(StrictSessionHandler::class); -class_exists(SessionHandlerProxy::class); - -/** - * This provides a base class for session attribute storage. - * - * @author Drak - */ -class NativeSessionStorage implements SessionStorageInterface -{ - /** - * @var SessionBagInterface[] - */ - protected $bags = []; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var AbstractProxy|\SessionHandlerInterface - */ - protected $saveHandler; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var string|null - */ - private $emulateSameSite; - - /** - * Depending on how you want the storage driver to behave you probably - * want to override this constructor entirely. - * - * List of options for $options array with their defaults. - * - * @see https://php.net/session.configuration for options - * but we omit 'session.' from the beginning of the keys for convenience. - * - * ("auto_start", is not supported as it tells PHP to start a session before - * PHP starts to execute user-land code. Setting during runtime has no effect). - * - * cache_limiter, "" (use "0" to prevent headers from being sent entirely). - * cache_expire, "0" - * cookie_domain, "" - * cookie_httponly, "" - * cookie_lifetime, "0" - * cookie_path, "/" - * cookie_secure, "" - * cookie_samesite, null - * gc_divisor, "100" - * gc_maxlifetime, "1440" - * gc_probability, "1" - * lazy_write, "1" - * name, "PHPSESSID" - * referer_check, "" - * serialize_handler, "php" - * use_strict_mode, "1" - * use_cookies, "1" - * use_only_cookies, "1" - * use_trans_sid, "0" - * sid_length, "32" - * sid_bits_per_character, "5" - * trans_sid_hosts, $_SERVER['HTTP_HOST'] - * trans_sid_tags, "a=href,area=href,frame=src,form=" - * - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $options += [ - 'cache_limiter' => '', - 'cache_expire' => 0, - 'use_cookies' => 1, - 'lazy_write' => 1, - 'use_strict_mode' => 1, - ]; - - session_register_shutdown(); - - $this->setMetadataBag($metaBag); - $this->setOptions($options); - $this->setSaveHandler($handler); - } - - /** - * Gets the save handler instance. - * - * @return AbstractProxy|\SessionHandlerInterface - */ - public function getSaveHandler() - { - return $this->saveHandler; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (\PHP_SESSION_ACTIVE === session_status()) { - throw new \RuntimeException('Failed to start the session: already started by PHP.'); - } - - if (filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { - throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); - } - - // ok to try and start the session - if (!session_start()) { - throw new \RuntimeException('Failed to start the session.'); - } - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->saveHandler->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - $this->saveHandler->setId($id); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->saveHandler->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->saveHandler->setName($name); - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, int $lifetime = null) - { - // Cannot regenerate the session ID for non-active sessions. - if (\PHP_SESSION_ACTIVE !== session_status()) { - return false; - } - - if (headers_sent()) { - return false; - } - - if (null !== $lifetime && $lifetime != ini_get('session.cookie_lifetime')) { - $this->save(); - ini_set('session.cookie_lifetime', $lifetime); - $this->start(); - } - - if ($destroy) { - $this->metadataBag->stampNew(); - } - - $isRegenerated = session_regenerate_id($destroy); - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - return $isRegenerated; - } - - /** - * {@inheritdoc} - */ - public function save() - { - // Store a copy so we can restore the bags in case the session was not left empty - $session = $_SESSION; - - foreach ($this->bags as $bag) { - if (empty($_SESSION[$key = $bag->getStorageKey()])) { - unset($_SESSION[$key]); - } - } - if ([$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { - unset($_SESSION[$key]); - } - - // Register error handler to add information about the current save handler - $previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) { - if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) { - $handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler; - $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', \get_class($handler)); - } - - return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false; - }); - - try { - session_write_close(); - } finally { - restore_error_handler(); - - // Restore only if not empty - if ($_SESSION) { - $_SESSION = $session; - } - } - - $this->closed = true; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $_SESSION = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - if ($this->started) { - throw new \LogicException('Cannot register a bag when the session is already started.'); - } - - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started && $this->saveHandler->isActive()) { - $this->loadSession(); - } elseif (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - public function setMetadataBag(MetadataBag $metaBag = null) - { - if (null === $metaBag) { - $metaBag = new MetadataBag(); - } - - $this->metadataBag = $metaBag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - /** - * Sets session.* ini variables. - * - * For convenience we omit 'session.' from the beginning of the keys. - * Explicitly ignores other ini keys. - * - * @param array $options Session ini directives [key => value] - * - * @see https://php.net/session.configuration - */ - public function setOptions(array $options) - { - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - $validOptions = array_flip([ - 'cache_expire', 'cache_limiter', 'cookie_domain', 'cookie_httponly', - 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'cookie_samesite', - 'gc_divisor', 'gc_maxlifetime', 'gc_probability', - 'lazy_write', 'name', 'referer_check', - 'serialize_handler', 'use_strict_mode', 'use_cookies', - 'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled', - 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', - 'upload_progress.freq', 'upload_progress.min_freq', 'url_rewriter.tags', - 'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags', - ]); - - foreach ($options as $key => $value) { - if (isset($validOptions[$key])) { - if (str_starts_with($key, 'upload_progress.')) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. The settings prefixed with "session.upload_progress." can not be changed at runtime.', $key); - continue; - } - if ('url_rewriter.tags' === $key) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. Use "trans_sid_tags" instead.', $key); - } - if ('cookie_samesite' === $key && \PHP_VERSION_ID < 70300) { - // PHP < 7.3 does not support same_site cookies. We will emulate it in - // the start() method instead. - $this->emulateSameSite = $value; - continue; - } - if ('cookie_secure' === $key && 'auto' === $value) { - continue; - } - ini_set('url_rewriter.tags' !== $key ? 'session.'.$key : $key, $value); - } - } - } - - /** - * Registers session save handler as a PHP session handler. - * - * To use internal PHP session save handlers, override this method using ini_set with - * session.save_handler and session.save_path e.g. - * - * ini_set('session.save_handler', 'files'); - * ini_set('session.save_path', '/tmp'); - * - * or pass in a \SessionHandler instance which configures session.save_handler in the - * constructor, for a template see NativeFileSessionHandler. - * - * @see https://php.net/session-set-save-handler - * @see https://php.net/sessionhandlerinterface - * @see https://php.net/sessionhandler - * - * @param AbstractProxy|\SessionHandlerInterface|null $saveHandler - * - * @throws \InvalidArgumentException - */ - public function setSaveHandler($saveHandler = null) - { - if (!$saveHandler instanceof AbstractProxy && - !$saveHandler instanceof \SessionHandlerInterface && - null !== $saveHandler) { - throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null.'); - } - - // Wrap $saveHandler in proxy and prevent double wrapping of proxy - if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) { - $saveHandler = new SessionHandlerProxy($saveHandler); - } elseif (!$saveHandler instanceof AbstractProxy) { - $saveHandler = new SessionHandlerProxy(new StrictSessionHandler(new \SessionHandler())); - } - $this->saveHandler = $saveHandler; - - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - if ($this->saveHandler instanceof SessionHandlerProxy) { - session_set_save_handler($this->saveHandler, false); - } - } - - /** - * Load the session with attributes. - * - * After starting the session, PHP retrieves the session from whatever handlers - * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). - * PHP takes the return value from the read() handler, unserializes it - * and populates $_SESSION with the result automatically. - */ - protected function loadSession(array &$session = null) - { - if (null === $session) { - $session = &$_SESSION; - } - - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) && \is_array($session[$key]) ? $session[$key] : []; - $bag->initialize($session[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php deleted file mode 100644 index a7d7411..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(NativeSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class NativeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $options; - private $handler; - private $metaBag; - private $secure; - - /** - * @see NativeSessionStorage constructor. - */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null, bool $secure = false) - { - $this->options = $options; - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new NativeSessionStorage($this->options, $this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php deleted file mode 100644 index 72dbef1..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; - -/** - * Allows session to be started by PHP and managed by Symfony. - * - * @author Drak - */ -class PhpBridgeSessionStorage extends NativeSessionStorage -{ - /** - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct($handler = null, MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $this->setMetadataBag($metaBag); - $this->setSaveHandler($handler); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags and nothing else that may be set - // since the purpose of this driver is to share a handler - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // reconnect the bags to the session - $this->loadSession(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php deleted file mode 100644 index 173ef71..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(PhpBridgeSessionStorage::class); - -/** - * @author Jérémy Derussé - */ -class PhpBridgeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $handler; - private $metaBag; - private $secure; - - /** - * @see PhpBridgeSessionStorage constructor. - */ - public function __construct($handler = null, MetadataBag $metaBag = null, bool $secure = false) - { - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new PhpBridgeSessionStorage($this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php deleted file mode 100644 index edd04df..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -/** - * @author Drak - */ -abstract class AbstractProxy -{ - /** - * Flag if handler wraps an internal PHP session handler (using \SessionHandler). - * - * @var bool - */ - protected $wrapper = false; - - /** - * @var string - */ - protected $saveHandlerName; - - /** - * Gets the session.save_handler name. - * - * @return string|null - */ - public function getSaveHandlerName() - { - return $this->saveHandlerName; - } - - /** - * Is this proxy handler and instance of \SessionHandlerInterface. - * - * @return bool - */ - public function isSessionHandlerInterface() - { - return $this instanceof \SessionHandlerInterface; - } - - /** - * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. - * - * @return bool - */ - public function isWrapper() - { - return $this->wrapper; - } - - /** - * Has a session started? - * - * @return bool - */ - public function isActive() - { - return \PHP_SESSION_ACTIVE === session_status(); - } - - /** - * Gets the session ID. - * - * @return string - */ - public function getId() - { - return session_id(); - } - - /** - * Sets the session ID. - * - * @throws \LogicException - */ - public function setId(string $id) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the ID of an active session.'); - } - - session_id($id); - } - - /** - * Gets the session name. - * - * @return string - */ - public function getName() - { - return session_name(); - } - - /** - * Sets the session name. - * - * @throws \LogicException - */ - public function setName(string $name) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the name of an active session.'); - } - - session_name($name); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php deleted file mode 100644 index 9b0cdeb..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -/** - * @author Drak - */ -class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - protected $handler; - - public function __construct(\SessionHandlerInterface $handler) - { - $this->handler = $handler; - $this->wrapper = $handler instanceof \SessionHandler; - $this->saveHandlerName = $this->wrapper ? ini_get('session.save_handler') : 'user'; - } - - /** - * @return \SessionHandlerInterface - */ - public function getHandler() - { - return $this->handler; - } - - // \SessionHandlerInterface - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - return $this->handler->open($savePath, $sessionName); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return string|false - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php b/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php deleted file mode 100644 index d17c60a..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé - * - * @internal to be removed in Symfony 6 - */ -final class ServiceSessionFactory implements SessionStorageFactoryInterface -{ - private $storage; - - public function __construct(SessionStorageInterface $storage) - { - $this->storage = $storage; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - if ($this->storage instanceof NativeSessionStorage && $request && $request->isSecure()) { - $this->storage->setOptions(['cookie_secure' => true]); - } - - return $this->storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php deleted file mode 100644 index d03f0da..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé - */ -interface SessionStorageFactoryInterface -{ - /** - * Creates a new instance of SessionStorageInterface. - */ - public function createStorage(?Request $request): SessionStorageInterface; -} diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php deleted file mode 100644 index b7f66e7..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * StorageInterface. - * - * @author Fabien Potencier - * @author Drak - */ -interface SessionStorageInterface -{ - /** - * Starts the session. - * - * @return bool - * - * @throws \RuntimeException if something goes wrong starting the session - */ - public function start(); - - /** - * Checks if the session is started. - * - * @return bool - */ - public function isStarted(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Regenerates id that represents this storage. - * - * This method must invoke session_regenerate_id($destroy) unless - * this interface is used for a storage object designed for unit - * or functional testing where a real PHP session would interfere - * with testing. - * - * Note regenerate+destroy should not clear the session data in memory - * only delete the session data from persistent storage. - * - * Care: When regenerating the session ID no locking is involved in PHP's - * session design. See https://bugs.php.net/61470 for a discussion. - * So you must make sure the regenerated session is saved BEFORE sending the - * headers with the new ID. Symfony's HttpKernel offers a listener for this. - * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. - * Otherwise session data could get lost again for concurrent requests with the - * new ID. One result could be that you get logged out after just logging in. - * - * @param bool $destroy Destroy session when regenerating? - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - * - * @throws \RuntimeException If an error occurs while regenerating this storage - */ - public function regenerate(bool $destroy = false, int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method must invoke session_write_close() unless this interface is - * used for a storage object design for unit or functional testing where - * a real PHP session would interfere with testing, in which case - * it should actually persist the session data if required. - * - * @throws \RuntimeException if the session is saved without being started, or if the session - * is already closed - */ - public function save(); - - /** - * Clear all session data in memory. - */ - public function clear(); - - /** - * Gets a SessionBagInterface by name. - * - * @return SessionBagInterface - * - * @throws \InvalidArgumentException If the bag does not exist - */ - public function getBag(string $name); - - /** - * Registers a SessionBagInterface for use. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php deleted file mode 100644 index 676cd66..0000000 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * StreamedResponse represents a streamed HTTP response. - * - * A StreamedResponse uses a callback for its content. - * - * The callback should use the standard PHP functions like echo - * to stream the response back to the client. The flush() function - * can also be used if needed. - * - * @see flush() - * - * @author Fabien Potencier - */ -class StreamedResponse extends Response -{ - protected $callback; - protected $streamed; - private $headersSent; - - public function __construct(callable $callback = null, int $status = 200, array $headers = []) - { - parent::__construct(null, $status, $headers); - - if (null !== $callback) { - $this->setCallback($callback); - } - $this->streamed = false; - $this->headersSent = false; - } - - /** - * Factory method for chainability. - * - * @param callable|null $callback A valid PHP callback or null to set it later - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($callback = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($callback, $status, $headers); - } - - /** - * Sets the PHP callback associated with this Response. - * - * @return $this - */ - public function setCallback(callable $callback) - { - $this->callback = $callback; - - return $this; - } - - /** - * {@inheritdoc} - * - * This method only sends the headers once. - * - * @return $this - */ - public function sendHeaders() - { - if ($this->headersSent) { - return $this; - } - - $this->headersSent = true; - - return parent::sendHeaders(); - } - - /** - * {@inheritdoc} - * - * This method only sends the content once. - * - * @return $this - */ - public function sendContent() - { - if ($this->streamed) { - return $this; - } - - $this->streamed = true; - - if (null === $this->callback) { - throw new \LogicException('The Response callback must not be null.'); - } - - ($this->callback)(); - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - * - * @return $this - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); - } - - $this->streamed = true; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php deleted file mode 100644 index cb216ea..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Request; - -final class RequestAttributeValueSame extends Constraint -{ - private $name; - private $value; - - public function __construct(string $name, string $value) - { - $this->name = $name; - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value); - } - - /** - * @param Request $request - * - * {@inheritdoc} - */ - protected function matches($request): bool - { - return $this->value === $request->attributes->get($this->name); - } - - /** - * @param Request $request - * - * {@inheritdoc} - */ - protected function failureDescription($request): string - { - return 'the Request '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php deleted file mode 100644 index 554e1a1..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseCookieValueSame extends Constraint -{ - private $name; - private $value; - private $path; - private $domain; - - public function __construct(string $name, string $value, string $path = '/', string $domain = null) - { - $this->name = $name; - $this->value = $value; - $this->path = $path; - $this->domain = $domain; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - $str = sprintf('has cookie "%s"', $this->name); - if ('/' !== $this->path) { - $str .= sprintf(' with path "%s"', $this->path); - } - if ($this->domain) { - $str .= sprintf(' for domain "%s"', $this->domain); - } - $str .= sprintf(' with value "%s"', $this->value); - - return $str; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - $cookie = $this->getCookie($response); - if (!$cookie) { - return false; - } - - return $this->value === $cookie->getValue(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - protected function getCookie(Response $response): ?Cookie - { - $cookies = $response->headers->getCookies(); - - $filteredCookies = array_filter($cookies, function (Cookie $cookie) { - return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; - }); - - return reset($filteredCookies) ?: null; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php deleted file mode 100644 index f73aedf..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Asserts that the response is in the given format. - * - * @author Kévin Dunglas - */ -final class ResponseFormatSame extends Constraint -{ - private $request; - private $format; - - public function __construct(Request $request, ?string $format) - { - $this->request = $request; - $this->format = $format; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'format is '.($this->format ?? 'null'); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->format === $this->request->getFormat($response->headers->get('Content-Type')); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php deleted file mode 100644 index eae9e27..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHasCookie extends Constraint -{ - private $name; - private $path; - private $domain; - - public function __construct(string $name, string $path = '/', string $domain = null) - { - $this->name = $name; - $this->path = $path; - $this->domain = $domain; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - $str = sprintf('has cookie "%s"', $this->name); - if ('/' !== $this->path) { - $str .= sprintf(' with path "%s"', $this->path); - } - if ($this->domain) { - $str .= sprintf(' for domain "%s"', $this->domain); - } - - return $str; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return null !== $this->getCookie($response); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - private function getCookie(Response $response): ?Cookie - { - $cookies = $response->headers->getCookies(); - - $filteredCookies = array_filter($cookies, function (Cookie $cookie) { - return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; - }); - - return reset($filteredCookies) ?: null; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php deleted file mode 100644 index 68ad827..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHasHeader extends Constraint -{ - private $headerName; - - public function __construct(string $headerName) - { - $this->headerName = $headerName; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has header "%s"', $this->headerName); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->headers->has($this->headerName); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php deleted file mode 100644 index a27d0c7..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHeaderSame extends Constraint -{ - private $headerName; - private $expectedValue; - - public function __construct(string $headerName, string $expectedValue) - { - $this->headerName = $headerName; - $this->expectedValue = $expectedValue; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->expectedValue === $response->headers->get($this->headerName, null); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php deleted file mode 100644 index 8c4b883..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsRedirected extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is redirected'; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->isRedirect(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php deleted file mode 100644 index 9c66558..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsSuccessful extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is successful'; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->isSuccessful(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php deleted file mode 100644 index 880c781..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsUnprocessable extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is unprocessable'; - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function matches($other): bool - { - return Response::HTTP_UNPROCESSABLE_ENTITY === $other->getStatusCode(); - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function failureDescription($other): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($other): string - { - return (string) $other; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php deleted file mode 100644 index 72bb000..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseStatusCodeSame extends Constraint -{ - private $statusCode; - - public function __construct(int $statusCode) - { - $this->statusCode = $statusCode; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'status code is '.$this->statusCode; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->statusCode === $response->getStatusCode(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/UrlHelper.php b/vendor/symfony/http-foundation/UrlHelper.php deleted file mode 100644 index c15f101..0000000 --- a/vendor/symfony/http-foundation/UrlHelper.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\Routing\RequestContext; - -/** - * A helper service for manipulating URLs within and outside the request scope. - * - * @author Valentin Udaltsov - */ -final class UrlHelper -{ - private $requestStack; - private $requestContext; - - public function __construct(RequestStack $requestStack, RequestContext $requestContext = null) - { - $this->requestStack = $requestStack; - $this->requestContext = $requestContext; - } - - public function getAbsoluteUrl(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $this->getAbsoluteUrlFromContext($path); - } - - if ('#' === $path[0]) { - $path = $request->getRequestUri().$path; - } elseif ('?' === $path[0]) { - $path = $request->getPathInfo().$path; - } - - if (!$path || '/' !== $path[0]) { - $prefix = $request->getPathInfo(); - $last = \strlen($prefix) - 1; - if ($last !== $pos = strrpos($prefix, '/')) { - $prefix = substr($prefix, 0, $pos).'/'; - } - - return $request->getUriForPath($prefix.$path); - } - - return $request->getSchemeAndHttpHost().$path; - } - - public function getRelativePath(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $path; - } - - return $request->getRelativeUriForPath($path); - } - - private function getAbsoluteUrlFromContext(string $path): string - { - if (null === $this->requestContext || '' === $host = $this->requestContext->getHost()) { - return $path; - } - - $scheme = $this->requestContext->getScheme(); - $port = ''; - - if ('http' === $scheme && 80 !== $this->requestContext->getHttpPort()) { - $port = ':'.$this->requestContext->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $this->requestContext->getHttpsPort()) { - $port = ':'.$this->requestContext->getHttpsPort(); - } - - if ('#' === $path[0]) { - $queryString = $this->requestContext->getQueryString(); - $path = $this->requestContext->getPathInfo().($queryString ? '?'.$queryString : '').$path; - } elseif ('?' === $path[0]) { - $path = $this->requestContext->getPathInfo().$path; - } - - if ('/' !== $path[0]) { - $path = rtrim($this->requestContext->getBaseUrl(), '/').'/'.$path; - } - - return $scheme.'://'.$host.$port.$path; - } -} diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json deleted file mode 100644 index d54bbfd..0000000 --- a/vendor/symfony/http-foundation/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "symfony/http-foundation", - "type": "library", - "description": "Defines an object-oriented layer for the HTTP specification", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0" - }, - "suggest" : { - "symfony/mime": "To use the file extension guesser" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/http-kernel/Attribute/ArgumentInterface.php b/vendor/symfony/http-kernel/Attribute/ArgumentInterface.php deleted file mode 100644 index 78769f1..0000000 --- a/vendor/symfony/http-kernel/Attribute/ArgumentInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Attribute; - -trigger_deprecation('symfony/http-kernel', '5.3', 'The "%s" interface is deprecated.', ArgumentInterface::class); - -/** - * Marker interface for controller argument attributes. - * - * @deprecated since Symfony 5.3 - */ -interface ArgumentInterface -{ -} diff --git a/vendor/symfony/http-kernel/Attribute/AsController.php b/vendor/symfony/http-kernel/Attribute/AsController.php deleted file mode 100644 index ef37104..0000000 --- a/vendor/symfony/http-kernel/Attribute/AsController.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Attribute; - -/** - * Service tag to autoconfigure controllers. - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class AsController -{ - public function __construct() - { - } -} diff --git a/vendor/symfony/http-kernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Bundle/Bundle.php deleted file mode 100644 index 54a1d10..0000000 --- a/vendor/symfony/http-kernel/Bundle/Bundle.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Bundle; - -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerAwareTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions. - * - * @author Fabien Potencier - */ -abstract class Bundle implements BundleInterface -{ - use ContainerAwareTrait; - - protected $name; - protected $extension; - protected $path; - private $namespace; - - /** - * {@inheritdoc} - */ - public function boot() - { - } - - /** - * {@inheritdoc} - */ - public function shutdown() - { - } - - /** - * {@inheritdoc} - * - * This method can be overridden to register compilation passes, - * other extensions, ... - */ - public function build(ContainerBuilder $container) - { - } - - /** - * Returns the bundle's container extension. - * - * @return ExtensionInterface|null - * - * @throws \LogicException - */ - public function getContainerExtension() - { - if (null === $this->extension) { - $extension = $this->createContainerExtension(); - - if (null !== $extension) { - if (!$extension instanceof ExtensionInterface) { - throw new \LogicException(sprintf('Extension "%s" must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_debug_type($extension))); - } - - // check naming convention - $basename = preg_replace('/Bundle$/', '', $this->getName()); - $expectedAlias = Container::underscore($basename); - - if ($expectedAlias != $extension->getAlias()) { - throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias())); - } - - $this->extension = $extension; - } else { - $this->extension = false; - } - } - - return $this->extension ?: null; - } - - /** - * {@inheritdoc} - */ - public function getNamespace() - { - if (null === $this->namespace) { - $this->parseClassName(); - } - - return $this->namespace; - } - - /** - * {@inheritdoc} - */ - public function getPath() - { - if (null === $this->path) { - $reflected = new \ReflectionObject($this); - $this->path = \dirname($reflected->getFileName()); - } - - return $this->path; - } - - /** - * Returns the bundle name (the class short name). - */ - final public function getName(): string - { - if (null === $this->name) { - $this->parseClassName(); - } - - return $this->name; - } - - public function registerCommands(Application $application) - { - } - - /** - * Returns the bundle's container extension class. - * - * @return string - */ - protected function getContainerExtensionClass() - { - $basename = preg_replace('/Bundle$/', '', $this->getName()); - - return $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; - } - - /** - * Creates the bundle's container extension. - * - * @return ExtensionInterface|null - */ - protected function createContainerExtension() - { - return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null; - } - - private function parseClassName() - { - $pos = strrpos(static::class, '\\'); - $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos); - if (null === $this->name) { - $this->name = false === $pos ? static::class : substr(static::class, $pos + 1); - } - } -} diff --git a/vendor/symfony/http-kernel/Bundle/BundleInterface.php b/vendor/symfony/http-kernel/Bundle/BundleInterface.php deleted file mode 100644 index fdc13e0..0000000 --- a/vendor/symfony/http-kernel/Bundle/BundleInterface.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Bundle; - -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; - -/** - * BundleInterface. - * - * @author Fabien Potencier - */ -interface BundleInterface extends ContainerAwareInterface -{ - /** - * Boots the Bundle. - */ - public function boot(); - - /** - * Shutdowns the Bundle. - */ - public function shutdown(); - - /** - * Builds the bundle. - * - * It is only ever called once when the cache is empty. - */ - public function build(ContainerBuilder $container); - - /** - * Returns the container extension that should be implicitly loaded. - * - * @return ExtensionInterface|null - */ - public function getContainerExtension(); - - /** - * Returns the bundle name (the class short name). - * - * @return string - */ - public function getName(); - - /** - * Gets the Bundle namespace. - * - * @return string - */ - public function getNamespace(); - - /** - * Gets the Bundle directory path. - * - * The path should always be returned as a Unix path (with /). - * - * @return string - */ - public function getPath(); -} diff --git a/vendor/symfony/http-kernel/CHANGELOG.md b/vendor/symfony/http-kernel/CHANGELOG.md deleted file mode 100644 index d0dc207..0000000 --- a/vendor/symfony/http-kernel/CHANGELOG.md +++ /dev/null @@ -1,317 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add the ability to enable the profiler using a request query parameter, body parameter or attribute - * Deprecate `AbstractTestSessionListener` and `TestSessionListener`, use `AbstractSessionListener` and `SessionListener` instead - * Deprecate the `fileLinkFormat` parameter of `DebugHandlersListener` - * Add support for configuring log level, and status code by exception class - * Allow ignoring "kernel.reset" methods that don't exist with "on_invalid" attribute - -5.3 ---- - - * Deprecate `ArgumentInterface` - * Add `ArgumentMetadata::getAttributes()` - * Deprecate `ArgumentMetadata::getAttribute()`, use `getAttributes()` instead - * Mark the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal - * Deprecate returning a `ContainerBuilder` from `KernelInterface::registerContainerConfiguration()` - * Deprecate `HttpKernelInterface::MASTER_REQUEST` and add `HttpKernelInterface::MAIN_REQUEST` as replacement - * Deprecate `KernelEvent::isMasterRequest()` and add `isMainRequest()` as replacement - * Add `#[AsController]` attribute for declaring standalone controllers on PHP 8 - * Add `FragmentUriGeneratorInterface` and `FragmentUriGenerator` to generate the URI of a fragment - -5.2.0 ------ - - * added session usage - * made the public `http_cache` service handle requests when available - * allowed enabling trusted hosts and proxies using new `kernel.trusted_hosts`, - `kernel.trusted_proxies` and `kernel.trusted_headers` parameters - * content of request parameter `_password` is now also hidden - in the request profiler raw content section - * Allowed adding attributes on controller arguments that will be passed to argument resolvers. - * kernels implementing the `ExtensionInterface` will now be auto-registered to the container - * added parameter `kernel.runtime_environment`, defined as `%env(default:kernel.environment:APP_RUNTIME_ENV)%` - * do not set a default `Accept` HTTP header when using `HttpKernelBrowser` - -5.1.0 ------ - - * allowed to use a specific logger channel for deprecations - * made `WarmableInterface::warmUp()` return a list of classes or files to preload on PHP 7.4+; - not returning an array is deprecated - * made kernels implementing `WarmableInterface` be part of the cache warmup stage - * deprecated support for `service:action` syntax to reference controllers, use `serviceOrFqcn::method` instead - * allowed using public aliases to reference controllers - * added session usage reporting when the `_stateless` attribute of the request is set to `true` - * added `AbstractSessionListener::onSessionUsage()` to report when the session is used while a request is stateless - -5.0.0 ------ - - * removed support for getting the container from a non-booted kernel - * removed the first and second constructor argument of `ConfigDataCollector` - * removed `ConfigDataCollector::getApplicationName()` - * removed `ConfigDataCollector::getApplicationVersion()` - * removed support for `Symfony\Component\Templating\EngineInterface` in `HIncludeFragmentRenderer`, use a `Twig\Environment` only - * removed `TranslatorListener` in favor of `LocaleAwareListener` - * removed `getRootDir()` and `getName()` from `Kernel` and `KernelInterface` - * removed `FilterControllerArgumentsEvent`, use `ControllerArgumentsEvent` instead - * removed `FilterControllerEvent`, use `ControllerEvent` instead - * removed `FilterResponseEvent`, use `ResponseEvent` instead - * removed `GetResponseEvent`, use `RequestEvent` instead - * removed `GetResponseForControllerResultEvent`, use `ViewEvent` instead - * removed `GetResponseForExceptionEvent`, use `ExceptionEvent` instead - * removed `PostResponseEvent`, use `TerminateEvent` instead - * removed `SaveSessionListener` in favor of `AbstractSessionListener` - * removed `Client`, use `HttpKernelBrowser` instead - * added method `getProjectDir()` to `KernelInterface` - * removed methods `serialize` and `unserialize` from `DataCollector`, store the serialized state in the data property instead - * made `ProfilerStorageInterface` internal - * removed the second and third argument of `KernelInterface::locateResource` - * removed the second and third argument of `FileLocator::__construct` - * removed loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as - fallback directories. - * removed class `ExceptionListener`, use `ErrorListener` instead - -4.4.0 ------ - - * The `DebugHandlersListener` class has been marked as `final` - * Added new Bundle directory convention consistent with standard skeletons - * Deprecated the second and third argument of `KernelInterface::locateResource` - * Deprecated the second and third argument of `FileLocator::__construct` - * Deprecated loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as - fallback directories. Resources like service definitions are usually loaded relative to the - current directory or with a glob pattern. The fallback directories have never been advocated - so you likely do not use those in any app based on the SF Standard or Flex edition. - * Marked all dispatched event classes as `@final` - * Added `ErrorController` to enable the preview and error rendering mechanism - * Getting the container from a non-booted kernel is deprecated. - * Marked the `AjaxDataCollector`, `ConfigDataCollector`, `EventDataCollector`, - `ExceptionDataCollector`, `LoggerDataCollector`, `MemoryDataCollector`, - `RequestDataCollector` and `TimeDataCollector` classes as `@final`. - * Marked the `RouterDataCollector::collect()` method as `@final`. - * The `DataCollectorInterface::collect()` and `Profiler::collect()` methods third parameter signature - will be `\Throwable $exception = null` instead of `\Exception $exception = null` in Symfony 5.0. - * Deprecated methods `ExceptionEvent::get/setException()`, use `get/setThrowable()` instead - * Deprecated class `ExceptionListener`, use `ErrorListener` instead - -4.3.0 ------ - - * renamed `Client` to `HttpKernelBrowser` - * `KernelInterface` doesn't extend `Serializable` anymore - * deprecated the `Kernel::serialize()` and `unserialize()` methods - * increased the priority of `Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener` - * made `Symfony\Component\HttpKernel\EventListener\LocaleListener` set the default locale early - * deprecated `TranslatorListener` in favor of `LocaleAwareListener` - * added the registration of all `LocaleAwareInterface` implementations into the `LocaleAwareListener` - * made `FileLinkFormatter` final and not implement `Serializable` anymore - * the base `DataCollector` doesn't implement `Serializable` anymore, you should - store all the serialized state in the data property instead - * `DumpDataCollector` has been marked as `final` - * added an event listener to prevent search engines from indexing applications in debug mode. - * renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent` - * renamed `FilterControllerEvent` to `ControllerEvent` - * renamed `FilterResponseEvent` to `ResponseEvent` - * renamed `GetResponseEvent` to `RequestEvent` - * renamed `GetResponseForControllerResultEvent` to `ViewEvent` - * renamed `GetResponseForExceptionEvent` to `ExceptionEvent` - * renamed `PostResponseEvent` to `TerminateEvent` - * added `HttpClientKernel` for handling requests with an `HttpClientInterface` instance - * added `trace_header` and `trace_level` configuration options to `HttpCache` - -4.2.0 ------ - - * deprecated `KernelInterface::getRootDir()` and the `kernel.root_dir` parameter - * deprecated `KernelInterface::getName()` and the `kernel.name` parameter - * deprecated the first and second constructor argument of `ConfigDataCollector` - * deprecated `ConfigDataCollector::getApplicationName()` - * deprecated `ConfigDataCollector::getApplicationVersion()` - -4.1.0 ------ - - * added orphaned events support to `EventDataCollector` - * `ExceptionListener` now logs exceptions at priority `0` (previously logged at `-128`) - * Added support for using `service::method` to reference controllers, making it consistent with other cases. It is recommended over the `service:action` syntax with a single colon, which will be deprecated in the future. - * Added the ability to profile individual argument value resolvers via the - `Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver` - -4.0.0 ------ - - * removed the `DataCollector::varToString()` method, use `DataCollector::cloneVar()` - instead - * using the `DataCollector::cloneVar()` method requires the VarDumper component - * removed the `ValueExporter` class - * removed `ControllerResolverInterface::getArguments()` - * removed `TraceableControllerResolver::getArguments()` - * removed `ControllerResolver::getArguments()` and the ability to resolve arguments - * removed the `argument_resolver` service dependency from the `debug.controller_resolver` - * removed `LazyLoadingFragmentHandler::addRendererService()` - * removed `Psr6CacheClearer::addPool()` - * removed `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` - * removed `Kernel::loadClassCache()`, `Kernel::doLoadClassCache()`, `Kernel::setClassCache()`, - and `Kernel::getEnvParameters()` - * support for the `X-Status-Code` when handling exceptions in the `HttpKernel` - has been dropped, use the `HttpKernel::allowCustomResponseCode()` method - instead - * removed convention-based commands registration - * removed the `ChainCacheClearer::add()` method - * removed the `CacheaWarmerAggregate::add()` and `setWarmers()` methods - * made `CacheWarmerAggregate` and `ChainCacheClearer` classes final - -3.4.0 ------ - - * added a minimalist PSR-3 `Logger` class that writes in `stderr` - * made kernels implementing `CompilerPassInterface` able to process the container - * deprecated bundle inheritance - * added `RebootableInterface` and implemented it in `Kernel` - * deprecated commands auto registration - * deprecated `EnvParametersResource` - * added `Symfony\Component\HttpKernel\Client::catchExceptions()` - * deprecated the `ChainCacheClearer::add()` method - * deprecated the `CacheaWarmerAggregate::add()` and `setWarmers()` methods - * made `CacheWarmerAggregate` and `ChainCacheClearer` classes final - * added the possibility to reset the profiler to its initial state - * deprecated data collectors without a `reset()` method - * deprecated implementing `DebugLoggerInterface` without a `clear()` method - -3.3.0 ------ - - * added `kernel.project_dir` and `Kernel::getProjectDir()` - * deprecated `kernel.root_dir` and `Kernel::getRootDir()` - * deprecated `Kernel::getEnvParameters()` - * deprecated the special `SYMFONY__` environment variables - * added the possibility to change the query string parameter used by `UriSigner` - * deprecated `LazyLoadingFragmentHandler::addRendererService()` - * deprecated `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()` - * deprecated `Psr6CacheClearer::addPool()` - -3.2.0 ------ - - * deprecated `DataCollector::varToString()`, use `cloneVar()` instead - * changed surrogate capability name in `AbstractSurrogate::addSurrogateCapability` to 'symfony' - * Added `ControllerArgumentValueResolverPass` - -3.1.0 ------ - * deprecated passing objects as URI attributes to the ESI and SSI renderers - * deprecated `ControllerResolver::getArguments()` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` as argument to `HttpKernel` - * added `Symfony\Component\HttpKernel\Controller\ArgumentResolver` - * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getMethod()` - * added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getRedirect()` - * added the `kernel.controller_arguments` event, triggered after controller arguments have been resolved - -3.0.0 ------ - - * removed `Symfony\Component\HttpKernel\Kernel::init()` - * removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()` - * removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()` - * removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()` - * removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()` - * removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()` - * removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()` - * removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()` - * removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()` - * removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()` - * removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel` - * removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass` - * removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` - * removed `Symfony\Component\HttpKernel\EventListener\EsiListener` - * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy` - * removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface` - * removed `Symfony\Component\HttpKernel\Log\LoggerInterface` - * removed `Symfony\Component\HttpKernel\Log\NullLogger` - * removed `Symfony\Component\HttpKernel\Profiler::import()` - * removed `Symfony\Component\HttpKernel\Profiler::export()` - -2.8.0 ------ - - * deprecated `Profiler::import` and `Profiler::export` - -2.7.0 ------ - - * added the HTTP status code to profiles - -2.6.0 ------ - - * deprecated `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`, use `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` instead - * deprecated unused method `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle` - -2.5.0 ------ - - * deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead - -2.4.0 ------ - - * added event listeners for the session - * added the KernelEvents::FINISH_REQUEST event - -2.3.0 ------ - - * [BC BREAK] renamed `Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener` to `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` and changed its constructor - * deprecated `Symfony\Component\HttpKernel\Debug\ErrorHandler`, `Symfony\Component\HttpKernel\Debug\ExceptionHandler`, - `Symfony\Component\HttpKernel\Exception\FatalErrorException` and `Symfony\Component\HttpKernel\Exception\FlattenException` - * deprecated `Symfony\Component\HttpKernel\Kernel::init()` - * added the possibility to specify an id an extra attributes to hinclude tags - * added the collect of data if a controller is a Closure in the Request collector - * pass exceptions from the ExceptionListener to the logger using the logging context to allow for more - detailed messages - -2.2.0 ------ - - * [BC BREAK] the path info for sub-request is now always _fragment (or whatever you configured instead of the default) - * added Symfony\Component\HttpKernel\EventListener\FragmentListener - * added Symfony\Component\HttpKernel\UriSigner - * added Symfony\Component\HttpKernel\FragmentRenderer and rendering strategies (in Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface) - * added Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel - * added ControllerReference to create reference of Controllers (used in the FragmentRenderer class) - * [BC BREAK] renamed TimeDataCollector::getTotalTime() to - TimeDataCollector::getDuration() - * updated the MemoryDataCollector to include the memory used in the - kernel.terminate event listeners - * moved the Stopwatch classes to a new component - * added TraceableControllerResolver - * added TraceableEventDispatcher (removed ContainerAwareTraceableEventDispatcher) - * added support for WinCache opcode cache in ConfigDataCollector - -2.1.0 ------ - - * [BC BREAK] the charset is now configured via the Kernel::getCharset() method - * [BC BREAK] the current locale for the user is not stored anymore in the session - * added the HTTP method to the profiler storage - * updated all listeners to implement EventSubscriberInterface - * added TimeDataCollector - * added ContainerAwareTraceableEventDispatcher - * moved TraceableEventDispatcherInterface to the EventDispatcher component - * added RouterListener, LocaleListener, and StreamedResponseListener - * added CacheClearerInterface (and ChainCacheClearer) - * added a kernel.terminate event (via TerminableInterface and PostResponseEvent) - * added a Stopwatch class - * added WarmableInterface - * improved extensibility between bundles - * added profiler storages for Memcache(d), File-based, MongoDB, Redis - * moved Filesystem class to its own component diff --git a/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php b/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php deleted file mode 100644 index 270f690..0000000 --- a/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -/** - * CacheClearerInterface. - * - * @author Dustin Dobervich - */ -interface CacheClearerInterface -{ - /** - * Clears any caches necessary. - */ - public function clear(string $cacheDir); -} diff --git a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php b/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php deleted file mode 100644 index a875d89..0000000 --- a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -/** - * ChainCacheClearer. - * - * @author Dustin Dobervich - * - * @final - */ -class ChainCacheClearer implements CacheClearerInterface -{ - private $clearers; - - /** - * @param iterable $clearers - */ - public function __construct(iterable $clearers = []) - { - $this->clearers = $clearers; - } - - /** - * {@inheritdoc} - */ - public function clear(string $cacheDir) - { - foreach ($this->clearers as $clearer) { - $clearer->clear($cacheDir); - } - } -} diff --git a/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php b/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php deleted file mode 100644 index a074060..0000000 --- a/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheClearer; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * @author Nicolas Grekas - */ -class Psr6CacheClearer implements CacheClearerInterface -{ - private $pools = []; - - /** - * @param array $pools - */ - public function __construct(array $pools = []) - { - $this->pools = $pools; - } - - /** - * @return bool - */ - public function hasPool(string $name) - { - return isset($this->pools[$name]); - } - - /** - * @return CacheItemPoolInterface - * - * @throws \InvalidArgumentException If the cache pool with the given name does not exist - */ - public function getPool(string $name) - { - if (!$this->hasPool($name)) { - throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name)); - } - - return $this->pools[$name]; - } - - /** - * @return bool - * - * @throws \InvalidArgumentException If the cache pool with the given name does not exist - */ - public function clearPool(string $name) - { - if (!isset($this->pools[$name])) { - throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name)); - } - - return $this->pools[$name]->clear(); - } - - /** - * {@inheritdoc} - */ - public function clear(string $cacheDir) - { - foreach ($this->pools as $pool) { - $pool->clear(); - } - } -} diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php deleted file mode 100644 index aef42d6..0000000 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Abstract cache warmer that knows how to write a file to the cache. - * - * @author Fabien Potencier - */ -abstract class CacheWarmer implements CacheWarmerInterface -{ - protected function writeCacheFile(string $file, $content) - { - $tmpFile = @tempnam(\dirname($file), basename($file)); - if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { - @chmod($file, 0666 & ~umask()); - - return; - } - - throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file)); - } -} diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php deleted file mode 100644 index 67f9ed5..0000000 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Aggregates several cache warmers into a single one. - * - * @author Fabien Potencier - * - * @final - */ -class CacheWarmerAggregate implements CacheWarmerInterface -{ - private $warmers; - private $debug; - private $deprecationLogsFilepath; - private $optionalsEnabled = false; - private $onlyOptionalsEnabled = false; - - /** - * @param iterable $warmers - */ - public function __construct(iterable $warmers = [], bool $debug = false, string $deprecationLogsFilepath = null) - { - $this->warmers = $warmers; - $this->debug = $debug; - $this->deprecationLogsFilepath = $deprecationLogsFilepath; - } - - public function enableOptionalWarmers() - { - $this->optionalsEnabled = true; - } - - public function enableOnlyOptionalWarmers() - { - $this->onlyOptionalsEnabled = $this->optionalsEnabled = true; - } - - /** - * {@inheritdoc} - */ - public function warmUp(string $cacheDir): array - { - if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - $collectedLogs = []; - $previousHandler = set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { - if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type) { - return $previousHandler ? $previousHandler($type, $message, $file, $line) : false; - } - - if (isset($collectedLogs[$message])) { - ++$collectedLogs[$message]['count']; - - return null; - } - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3); - // Clean the trace by removing first frames added by the error handler itself. - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - - $collectedLogs[$message] = [ - 'type' => $type, - 'message' => $message, - 'file' => $file, - 'line' => $line, - 'trace' => $backtrace, - 'count' => 1, - ]; - - return null; - }); - } - - $preload = []; - try { - foreach ($this->warmers as $warmer) { - if (!$this->optionalsEnabled && $warmer->isOptional()) { - continue; - } - if ($this->onlyOptionalsEnabled && !$warmer->isOptional()) { - continue; - } - - $preload[] = array_values((array) $warmer->warmUp($cacheDir)); - } - } finally { - if ($collectDeprecations) { - restore_error_handler(); - - if (is_file($this->deprecationLogsFilepath)) { - $previousLogs = unserialize(file_get_contents($this->deprecationLogsFilepath)); - if (\is_array($previousLogs)) { - $collectedLogs = array_merge($previousLogs, $collectedLogs); - } - } - - file_put_contents($this->deprecationLogsFilepath, serialize(array_values($collectedLogs))); - } - } - - return array_values(array_unique(array_merge([], ...$preload))); - } - - /** - * {@inheritdoc} - */ - public function isOptional(): bool - { - return false; - } -} diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php deleted file mode 100644 index 1f1740b..0000000 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Interface for classes able to warm up the cache. - * - * @author Fabien Potencier - */ -interface CacheWarmerInterface extends WarmableInterface -{ - /** - * Checks whether this warmer is optional or not. - * - * Optional warmers can be ignored on certain conditions. - * - * A warmer should return true if the cache can be - * generated incrementally and on-demand. - * - * @return bool - */ - public function isOptional(); -} diff --git a/vendor/symfony/http-kernel/CacheWarmer/WarmableInterface.php b/vendor/symfony/http-kernel/CacheWarmer/WarmableInterface.php deleted file mode 100644 index 2f442cb..0000000 --- a/vendor/symfony/http-kernel/CacheWarmer/WarmableInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\CacheWarmer; - -/** - * Interface for classes that support warming their cache. - * - * @author Fabien Potencier - */ -interface WarmableInterface -{ - /** - * Warms up the cache. - * - * @return string[] A list of classes or files to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir); -} diff --git a/vendor/symfony/http-kernel/Config/FileLocator.php b/vendor/symfony/http-kernel/Config/FileLocator.php deleted file mode 100644 index 6eca986..0000000 --- a/vendor/symfony/http-kernel/Config/FileLocator.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Config; - -use Symfony\Component\Config\FileLocator as BaseFileLocator; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * FileLocator uses the KernelInterface to locate resources in bundles. - * - * @author Fabien Potencier - */ -class FileLocator extends BaseFileLocator -{ - private $kernel; - - public function __construct(KernelInterface $kernel) - { - $this->kernel = $kernel; - - parent::__construct(); - } - - /** - * {@inheritdoc} - */ - public function locate(string $file, string $currentPath = null, bool $first = true) - { - if (isset($file[0]) && '@' === $file[0]) { - $resource = $this->kernel->locateResource($file); - - return $first ? $resource : [$resource]; - } - - return parent::locate($file, $currentPath, $first); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php deleted file mode 100644 index a54140b..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface; - -/** - * Responsible for resolving the arguments passed to an action. - * - * @author Iltar van der Berg - */ -final class ArgumentResolver implements ArgumentResolverInterface -{ - private $argumentMetadataFactory; - private $argumentValueResolvers; - - /** - * @param iterable $argumentValueResolvers - */ - public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) - { - $this->argumentMetadataFactory = $argumentMetadataFactory ?? new ArgumentMetadataFactory(); - $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); - } - - /** - * {@inheritdoc} - */ - public function getArguments(Request $request, callable $controller): array - { - $arguments = []; - - foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) { - foreach ($this->argumentValueResolvers as $resolver) { - if (!$resolver->supports($request, $metadata)) { - continue; - } - - $resolved = $resolver->resolve($request, $metadata); - - $atLeastOne = false; - foreach ($resolved as $append) { - $atLeastOne = true; - $arguments[] = $append; - } - - if (!$atLeastOne) { - throw new \InvalidArgumentException(sprintf('"%s::resolve()" must yield at least one value.', get_debug_type($resolver))); - } - - // continue to the next controller argument - continue 2; - } - - $representative = $controller; - - if (\is_array($representative)) { - $representative = sprintf('%s::%s()', \get_class($representative[0]), $representative[1]); - } elseif (\is_object($representative)) { - $representative = \get_class($representative); - } - - throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.', $representative, $metadata->getName())); - } - - return $arguments; - } - - /** - * @return iterable - */ - public static function getDefaultArgumentValueResolvers(): iterable - { - return [ - new RequestAttributeValueResolver(), - new RequestValueResolver(), - new SessionValueResolver(), - new DefaultValueResolver(), - new VariadicValueResolver(), - ]; - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php deleted file mode 100644 index 32a0e07..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the default value defined in the action signature when no value has been given. - * - * @author Iltar van der Berg - */ -final class DefaultValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return $argument->hasDefaultValue() || (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $argument->hasDefaultValue() ? $argument->getDefaultValue() : null; - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php deleted file mode 100644 index d4971cc..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Provides an intuitive error message when controller fails because it is not registered as a service. - * - * @author Simeon Kolev - */ -final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $controller = $request->attributes->get('_controller'); - - if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { - $controller = $controller[0].'::'.$controller[1]; - } elseif (!\is_string($controller) || '' === $controller) { - return false; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - return false === $this->container->has($controller); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - if (\is_array($controller = $request->attributes->get('_controller'))) { - $controller = $controller[0].'::'.$controller[1]; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); - $message = sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what); - - throw new RuntimeException($message); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php deleted file mode 100644 index c62d327..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a non-variadic argument's value from the request attributes. - * - * @author Iltar van der Berg - */ -final class RequestAttributeValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return !$argument->isVariadic() && $request->attributes->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request->attributes->get($argument->getName()); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php deleted file mode 100644 index 75cbd97..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the same instance as the request object passed along. - * - * @author Iltar van der Berg - */ -final class RequestValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request; - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php deleted file mode 100644 index 4ffb8c9..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a service keyed by _controller and argument name. - * - * @author Nicolas Grekas - */ -final class ServiceValueResolver implements ArgumentValueResolverInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $controller = $request->attributes->get('_controller'); - - if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { - $controller = $controller[0].'::'.$controller[1]; - } elseif (!\is_string($controller) || '' === $controller) { - return false; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - return $this->container->has($controller) && $this->container->get($controller)->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - if (\is_array($controller = $request->attributes->get('_controller'))) { - $controller = $controller[0].'::'.$controller[1]; - } - - if ('\\' === $controller[0]) { - $controller = ltrim($controller, '\\'); - } - - if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); - } - - try { - yield $this->container->get($controller)->get($argument->getName()); - } catch (RuntimeException $e) { - $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); - $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage()); - - if ($e->getMessage() === $message) { - $message = sprintf('Cannot resolve %s: %s', $what, $message); - } - - $r = new \ReflectionProperty($e, 'message'); - $r->setAccessible(true); - $r->setValue($e, $message); - - throw $e; - } - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php deleted file mode 100644 index a1e6b43..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/SessionValueResolver.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields the Session. - * - * @author Iltar van der Berg - */ -final class SessionValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - if (!$request->hasSession()) { - return false; - } - - $type = $argument->getType(); - if (SessionInterface::class !== $type && !is_subclass_of($type, SessionInterface::class)) { - return false; - } - - return $request->getSession() instanceof $type; - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $request->getSession(); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php deleted file mode 100644 index bde3c90..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * Provides timing information via the stopwatch. - * - * @author Iltar van der Berg - */ -final class TraceableValueResolver implements ArgumentValueResolverInterface -{ - private $inner; - private $stopwatch; - - public function __construct(ArgumentValueResolverInterface $inner, Stopwatch $stopwatch) - { - $this->inner = $inner; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - $method = \get_class($this->inner).'::'.__FUNCTION__; - $this->stopwatch->start($method, 'controller.argument_value_resolver'); - - $return = $this->inner->supports($request, $argument); - - $this->stopwatch->stop($method); - - return $return; - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - $method = \get_class($this->inner).'::'.__FUNCTION__; - $this->stopwatch->start($method, 'controller.argument_value_resolver'); - - yield from $this->inner->resolve($request, $argument); - - $this->stopwatch->stop($method); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php deleted file mode 100644 index a8f7e0f..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Yields a variadic argument's values from the request attributes. - * - * @author Iltar van der Berg - */ -final class VariadicValueResolver implements ArgumentValueResolverInterface -{ - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - return $argument->isVariadic() && $request->attributes->has($argument->getName()); - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - $values = $request->attributes->get($argument->getName()); - - if (!\is_array($values)) { - throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), get_debug_type($values))); - } - - yield from $values; - } -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php b/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php deleted file mode 100644 index 30e4783..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; - -/** - * An ArgumentResolverInterface instance knows how to determine the - * arguments for a specific action. - * - * @author Fabien Potencier - */ -interface ArgumentResolverInterface -{ - /** - * Returns the arguments to pass to the controller. - * - * @return array - * - * @throws \RuntimeException When no value could be provided for a required argument - */ - public function getArguments(Request $request, callable $controller); -} diff --git a/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php b/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php deleted file mode 100644 index 1317707..0000000 --- a/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Responsible for resolving the value of an argument based on its metadata. - * - * @author Iltar van der Berg - */ -interface ArgumentValueResolverInterface -{ - /** - * Whether this resolver can resolve the value for the given ArgumentMetadata. - * - * @return bool - */ - public function supports(Request $request, ArgumentMetadata $argument); - - /** - * Returns the possible value(s). - * - * @return iterable - */ - public function resolve(Request $request, ArgumentMetadata $argument); -} diff --git a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php deleted file mode 100644 index 3b94684..0000000 --- a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Psr\Container\ContainerInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\DependencyInjection\Container; - -/** - * A controller resolver searching for a controller in a psr-11 container when using the "service::method" notation. - * - * @author Fabien Potencier - * @author Maxime Steinhausser - */ -class ContainerControllerResolver extends ControllerResolver -{ - protected $container; - - public function __construct(ContainerInterface $container, LoggerInterface $logger = null) - { - $this->container = $container; - - parent::__construct($logger); - } - - protected function createController(string $controller) - { - if (1 === substr_count($controller, ':')) { - $controller = str_replace(':', '::', $controller); - trigger_deprecation('symfony/http-kernel', '5.1', 'Referencing controllers with a single colon is deprecated. Use "%s" instead.', $controller); - } - - return parent::createController($controller); - } - - /** - * {@inheritdoc} - */ - protected function instantiateController(string $class) - { - $class = ltrim($class, '\\'); - - if ($this->container->has($class)) { - return $this->container->get($class); - } - - try { - return parent::instantiateController($class); - } catch (\Error $e) { - } - - $this->throwExceptionIfControllerWasRemoved($class, $e); - - if ($e instanceof \ArgumentCountError) { - throw new \InvalidArgumentException(sprintf('Controller "%s" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?', $class), 0, $e); - } - - throw new \InvalidArgumentException(sprintf('Controller "%s" does neither exist as service nor as class.', $class), 0, $e); - } - - private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous) - { - if ($this->container instanceof Container && isset($this->container->getRemovedIds()[$controller])) { - throw new \InvalidArgumentException(sprintf('Controller "%s" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?', $controller), 0, $previous); - } - } -} diff --git a/vendor/symfony/http-kernel/Controller/ControllerReference.php b/vendor/symfony/http-kernel/Controller/ControllerReference.php deleted file mode 100644 index b4fdadd..0000000 --- a/vendor/symfony/http-kernel/Controller/ControllerReference.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; - -/** - * Acts as a marker and a data holder for a Controller. - * - * Some methods in Symfony accept both a URI (as a string) or a controller as - * an argument. In the latter case, instead of passing an array representing - * the controller, you can use an instance of this class. - * - * @author Fabien Potencier - * - * @see FragmentRendererInterface - */ -class ControllerReference -{ - public $controller; - public $attributes = []; - public $query = []; - - /** - * @param string $controller The controller name - * @param array $attributes An array of parameters to add to the Request attributes - * @param array $query An array of parameters to add to the Request query string - */ - public function __construct(string $controller, array $attributes = [], array $query = []) - { - $this->controller = $controller; - $this->attributes = $attributes; - $this->query = $query; - } -} diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php deleted file mode 100644 index 8abbadd..0000000 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ /dev/null @@ -1,220 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; - -/** - * This implementation uses the '_controller' request attribute to determine - * the controller to execute. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class ControllerResolver implements ControllerResolverInterface -{ - private $logger; - - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function getController(Request $request) - { - if (!$controller = $request->attributes->get('_controller')) { - if (null !== $this->logger) { - $this->logger->warning('Unable to look for the controller as the "_controller" parameter is missing.'); - } - - return false; - } - - if (\is_array($controller)) { - if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) { - try { - $controller[0] = $this->instantiateController($controller[0]); - } catch (\Error|\LogicException $e) { - try { - // We cannot just check is_callable but have to use reflection because a non-static method - // can still be called statically in PHP but we don't want that. This is deprecated in PHP 7, so we - // could simplify this with PHP 8. - if ((new \ReflectionMethod($controller[0], $controller[1]))->isStatic()) { - return $controller; - } - } catch (\ReflectionException $reflectionException) { - throw $e; - } - - throw $e; - } - } - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller)); - } - - return $controller; - } - - if (\is_object($controller)) { - if (!\is_callable($controller)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller)); - } - - return $controller; - } - - if (\function_exists($controller)) { - return $controller; - } - - try { - $callable = $this->createController($controller); - } catch (\InvalidArgumentException $e) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e); - } - - if (!\is_callable($callable)) { - throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($callable)); - } - - return $callable; - } - - /** - * Returns a callable for the given controller. - * - * @return callable - * - * @throws \InvalidArgumentException When the controller cannot be created - */ - protected function createController(string $controller) - { - if (!str_contains($controller, '::')) { - $controller = $this->instantiateController($controller); - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException($this->getControllerError($controller)); - } - - return $controller; - } - - [$class, $method] = explode('::', $controller, 2); - - try { - $controller = [$this->instantiateController($class), $method]; - } catch (\Error|\LogicException $e) { - try { - if ((new \ReflectionMethod($class, $method))->isStatic()) { - return $class.'::'.$method; - } - } catch (\ReflectionException $reflectionException) { - throw $e; - } - - throw $e; - } - - if (!\is_callable($controller)) { - throw new \InvalidArgumentException($this->getControllerError($controller)); - } - - return $controller; - } - - /** - * Returns an instantiated controller. - * - * @return object - */ - protected function instantiateController(string $class) - { - return new $class(); - } - - private function getControllerError($callable): string - { - if (\is_string($callable)) { - if (str_contains($callable, '::')) { - $callable = explode('::', $callable, 2); - } else { - return sprintf('Function "%s" does not exist.', $callable); - } - } - - if (\is_object($callable)) { - $availableMethods = $this->getClassMethodsWithoutMagicMethods($callable); - $alternativeMsg = $availableMethods ? sprintf(' or use one of the available methods: "%s"', implode('", "', $availableMethods)) : ''; - - return sprintf('Controller class "%s" cannot be called without a method name. You need to implement "__invoke"%s.', get_debug_type($callable), $alternativeMsg); - } - - if (!\is_array($callable)) { - return sprintf('Invalid type for controller given, expected string, array or object, got "%s".', get_debug_type($callable)); - } - - if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) { - return 'Invalid array callable, expected [controller, method].'; - } - - [$controller, $method] = $callable; - - if (\is_string($controller) && !class_exists($controller)) { - return sprintf('Class "%s" does not exist.', $controller); - } - - $className = \is_object($controller) ? get_debug_type($controller) : $controller; - - if (method_exists($controller, $method)) { - return sprintf('Method "%s" on class "%s" should be public and non-abstract.', $method, $className); - } - - $collection = $this->getClassMethodsWithoutMagicMethods($controller); - - $alternatives = []; - - foreach ($collection as $item) { - $lev = levenshtein($method, $item); - - if ($lev <= \strlen($method) / 3 || str_contains($item, $method)) { - $alternatives[] = $item; - } - } - - asort($alternatives); - - $message = sprintf('Expected method "%s" on class "%s"', $method, $className); - - if (\count($alternatives) > 0) { - $message .= sprintf(', did you mean "%s"?', implode('", "', $alternatives)); - } else { - $message .= sprintf('. Available methods: "%s".', implode('", "', $collection)); - } - - return $message; - } - - private function getClassMethodsWithoutMagicMethods($classOrObject): array - { - $methods = get_class_methods($classOrObject); - - return array_filter($methods, function (string $method) { - return 0 !== strncmp($method, '__', 2); - }); - } -} diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php b/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php deleted file mode 100644 index 8b70a88..0000000 --- a/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; - -/** - * A ControllerResolverInterface implementation knows how to determine the - * controller to execute based on a Request object. - * - * A Controller can be any valid PHP callable. - * - * @author Fabien Potencier - */ -interface ControllerResolverInterface -{ - /** - * Returns the Controller instance associated with a Request. - * - * As several resolvers can exist for a single application, a resolver must - * return false when it is not able to determine the controller. - * - * The resolver must only throw an exception when it should be able to load a - * controller but cannot because of some errors made by the developer. - * - * @return callable|false A PHP callable representing the Controller, - * or false if this resolver is not able to determine the controller - * - * @throws \LogicException If a controller was found based on the request but it is not callable - */ - public function getController(Request $request); -} diff --git a/vendor/symfony/http-kernel/Controller/ErrorController.php b/vendor/symfony/http-kernel/Controller/ErrorController.php deleted file mode 100644 index b6c4401..0000000 --- a/vendor/symfony/http-kernel/Controller/ErrorController.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Renders error or exception pages from a given FlattenException. - * - * @author Yonel Ceruto - * @author Matthias Pigulla - */ -class ErrorController -{ - private $kernel; - private $controller; - private $errorRenderer; - - public function __construct(HttpKernelInterface $kernel, $controller, ErrorRendererInterface $errorRenderer) - { - $this->kernel = $kernel; - $this->controller = $controller; - $this->errorRenderer = $errorRenderer; - } - - public function __invoke(\Throwable $exception): Response - { - $exception = $this->errorRenderer->render($exception); - - return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); - } - - public function preview(Request $request, int $code): Response - { - /* - * This Request mimics the parameters set by - * \Symfony\Component\HttpKernel\EventListener\ErrorListener::duplicateRequest, with - * the additional "showException" flag. - */ - $subRequest = $request->duplicate(null, null, [ - '_controller' => $this->controller, - 'exception' => new HttpException($code, 'This is a sample exception.'), - 'logger' => null, - 'showException' => false, - ]); - - return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - } -} diff --git a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php b/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php deleted file mode 100644 index e22cf08..0000000 --- a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * @author Fabien Potencier - */ -class TraceableArgumentResolver implements ArgumentResolverInterface -{ - private $resolver; - private $stopwatch; - - public function __construct(ArgumentResolverInterface $resolver, Stopwatch $stopwatch) - { - $this->resolver = $resolver; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function getArguments(Request $request, callable $controller) - { - $e = $this->stopwatch->start('controller.get_arguments'); - - $ret = $this->resolver->getArguments($request, $controller); - - $e->stop(); - - return $ret; - } -} diff --git a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php deleted file mode 100644 index bf6b6aa..0000000 --- a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * @author Fabien Potencier - */ -class TraceableControllerResolver implements ControllerResolverInterface -{ - private $resolver; - private $stopwatch; - - public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch) - { - $this->resolver = $resolver; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function getController(Request $request) - { - $e = $this->stopwatch->start('controller.get_callable'); - - $ret = $this->resolver->getController($request); - - $e->stop(); - - return $ret; - } -} diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php deleted file mode 100644 index 1a9ebc0..0000000 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -use Symfony\Component\HttpKernel\Attribute\ArgumentInterface; - -/** - * Responsible for storing metadata of an argument. - * - * @author Iltar van der Berg - */ -class ArgumentMetadata -{ - public const IS_INSTANCEOF = 2; - - private $name; - private $type; - private $isVariadic; - private $hasDefaultValue; - private $defaultValue; - private $isNullable; - private $attributes; - - /** - * @param object[] $attributes - */ - public function __construct(string $name, ?string $type, bool $isVariadic, bool $hasDefaultValue, $defaultValue, bool $isNullable = false, $attributes = []) - { - $this->name = $name; - $this->type = $type; - $this->isVariadic = $isVariadic; - $this->hasDefaultValue = $hasDefaultValue; - $this->defaultValue = $defaultValue; - $this->isNullable = $isNullable || null === $type || ($hasDefaultValue && null === $defaultValue); - - if (null === $attributes || $attributes instanceof ArgumentInterface) { - trigger_deprecation('symfony/http-kernel', '5.3', 'The "%s" constructor expects an array of PHP attributes as last argument, %s given.', __CLASS__, get_debug_type($attributes)); - $attributes = $attributes ? [$attributes] : []; - } - - $this->attributes = $attributes; - } - - /** - * Returns the name as given in PHP, $foo would yield "foo". - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Returns the type of the argument. - * - * The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+. - * - * @return string|null - */ - public function getType() - { - return $this->type; - } - - /** - * Returns whether the argument is defined as "...$variadic". - * - * @return bool - */ - public function isVariadic() - { - return $this->isVariadic; - } - - /** - * Returns whether the argument has a default value. - * - * Implies whether an argument is optional. - * - * @return bool - */ - public function hasDefaultValue() - { - return $this->hasDefaultValue; - } - - /** - * Returns whether the argument accepts null values. - * - * @return bool - */ - public function isNullable() - { - return $this->isNullable; - } - - /** - * Returns the default value of the argument. - * - * @throws \LogicException if no default value is present; {@see self::hasDefaultValue()} - * - * @return mixed - */ - public function getDefaultValue() - { - if (!$this->hasDefaultValue) { - throw new \LogicException(sprintf('Argument $%s does not have a default value. Use "%s::hasDefaultValue()" to avoid this exception.', $this->name, __CLASS__)); - } - - return $this->defaultValue; - } - - /** - * Returns the attribute (if any) that was set on the argument. - */ - public function getAttribute(): ?ArgumentInterface - { - trigger_deprecation('symfony/http-kernel', '5.3', 'Method "%s()" is deprecated, use "getAttributes()" instead.', __METHOD__); - - if (!$this->attributes) { - return null; - } - - return $this->attributes[0] instanceof ArgumentInterface ? $this->attributes[0] : null; - } - - /** - * @return object[] - */ - public function getAttributes(string $name = null, int $flags = 0): array - { - if (!$name) { - return $this->attributes; - } - - $attributes = []; - if ($flags & self::IS_INSTANCEOF) { - foreach ($this->attributes as $attribute) { - if ($attribute instanceof $name) { - $attributes[] = $attribute; - } - } - } else { - foreach ($this->attributes as $attribute) { - if (\get_class($attribute) === $name) { - $attributes[] = $attribute; - } - } - } - - return $attributes; - } -} diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php deleted file mode 100644 index e3835c0..0000000 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -/** - * Builds {@see ArgumentMetadata} objects based on the given Controller. - * - * @author Iltar van der Berg - */ -final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface -{ - /** - * {@inheritdoc} - */ - public function createArgumentMetadata($controller): array - { - $arguments = []; - - if (\is_array($controller)) { - $reflection = new \ReflectionMethod($controller[0], $controller[1]); - $class = $reflection->class; - } elseif (\is_object($controller) && !$controller instanceof \Closure) { - $reflection = new \ReflectionMethod($controller, '__invoke'); - $class = $reflection->class; - } else { - $reflection = new \ReflectionFunction($controller); - if ($class = str_contains($reflection->name, '{closure}') ? null : $reflection->getClosureScopeClass()) { - $class = $class->name; - } - } - - foreach ($reflection->getParameters() as $param) { - $attributes = []; - if (\PHP_VERSION_ID >= 80000) { - foreach ($param->getAttributes() as $reflectionAttribute) { - if (class_exists($reflectionAttribute->getName())) { - $attributes[] = $reflectionAttribute->newInstance(); - } - } - } - - $arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param, $class), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes); - } - - return $arguments; - } - - /** - * Returns an associated type to the given parameter if available. - */ - private function getType(\ReflectionParameter $parameter, ?string $class): ?string - { - if (!$type = $parameter->getType()) { - return null; - } - $name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type; - - if (null !== $class) { - switch (strtolower($name)) { - case 'self': - return $class; - case 'parent': - return get_parent_class($class) ?: null; - } - } - - return $name; - } -} diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php deleted file mode 100644 index a34befc..0000000 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\ControllerMetadata; - -/** - * Builds method argument data. - * - * @author Iltar van der Berg - */ -interface ArgumentMetadataFactoryInterface -{ - /** - * @param string|object|array $controller The controller to resolve the arguments for - * - * @return ArgumentMetadata[] - */ - public function createArgumentMetadata($controller); -} diff --git a/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php b/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php deleted file mode 100644 index fda6a4e..0000000 --- a/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Bart van den Burg - * - * @final - */ -class AjaxDataCollector extends DataCollector -{ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - // all collecting is done client side - } - - public function reset() - { - // all collecting is done client side - } - - public function getName(): string - { - return 'ajax'; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php deleted file mode 100644 index d0f2c7c..0000000 --- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ /dev/null @@ -1,275 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Fabien Potencier - * - * @final - */ -class ConfigDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var KernelInterface - */ - private $kernel; - - /** - * Sets the Kernel associated with this Request. - */ - public function setKernel(KernelInterface $kernel = null) - { - $this->kernel = $kernel; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE); - $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE); - - $this->data = [ - 'token' => $response->headers->get('X-Debug-Token'), - 'symfony_version' => Kernel::VERSION, - 'symfony_minor_version' => sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), - 'symfony_lts' => 4 === Kernel::MINOR_VERSION, - 'symfony_state' => $this->determineSymfonyState(), - 'symfony_eom' => $eom->format('F Y'), - 'symfony_eol' => $eol->format('F Y'), - 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', - 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', - 'php_version' => \PHP_VERSION, - 'php_architecture' => \PHP_INT_SIZE * 8, - 'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', - 'php_timezone' => date_default_timezone_get(), - 'xdebug_enabled' => \extension_loaded('xdebug'), - 'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), - 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), - 'bundles' => [], - 'sapi_name' => \PHP_SAPI, - ]; - - if (isset($this->kernel)) { - foreach ($this->kernel->getBundles() as $name => $bundle) { - $this->data['bundles'][$name] = new ClassStub(\get_class($bundle)); - } - } - - if (preg_match('~^(\d+(?:\.\d+)*)(.+)?$~', $this->data['php_version'], $matches) && isset($matches[2])) { - $this->data['php_version'] = $matches[1]; - $this->data['php_version_extra'] = $matches[2]; - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - public function lateCollect() - { - $this->data = $this->cloneVar($this->data); - } - - /** - * Gets the token. - */ - public function getToken(): ?string - { - return $this->data['token']; - } - - /** - * Gets the Symfony version. - */ - public function getSymfonyVersion(): string - { - return $this->data['symfony_version']; - } - - /** - * Returns the state of the current Symfony release. - * - * @return string One of: unknown, dev, stable, eom, eol - */ - public function getSymfonyState(): string - { - return $this->data['symfony_state']; - } - - /** - * Returns the minor Symfony version used (without patch numbers of extra - * suffix like "RC", "beta", etc.). - */ - public function getSymfonyMinorVersion(): string - { - return $this->data['symfony_minor_version']; - } - - /** - * Returns if the current Symfony version is a Long-Term Support one. - */ - public function isSymfonyLts(): bool - { - return $this->data['symfony_lts']; - } - - /** - * Returns the human readable date when this Symfony version ends its - * maintenance period. - */ - public function getSymfonyEom(): string - { - return $this->data['symfony_eom']; - } - - /** - * Returns the human readable date when this Symfony version reaches its - * "end of life" and won't receive bugs or security fixes. - */ - public function getSymfonyEol(): string - { - return $this->data['symfony_eol']; - } - - /** - * Gets the PHP version. - */ - public function getPhpVersion(): string - { - return $this->data['php_version']; - } - - /** - * Gets the PHP version extra part. - */ - public function getPhpVersionExtra(): ?string - { - return $this->data['php_version_extra'] ?? null; - } - - /** - * @return int The PHP architecture as number of bits (e.g. 32 or 64) - */ - public function getPhpArchitecture(): int - { - return $this->data['php_architecture']; - } - - public function getPhpIntlLocale(): string - { - return $this->data['php_intl_locale']; - } - - public function getPhpTimezone(): string - { - return $this->data['php_timezone']; - } - - /** - * Gets the environment. - */ - public function getEnv(): string - { - return $this->data['env']; - } - - /** - * Returns true if the debug is enabled. - * - * @return bool|string true if debug is enabled, false otherwise or a string if no kernel was set - */ - public function isDebug() - { - return $this->data['debug']; - } - - /** - * Returns true if the XDebug is enabled. - */ - public function hasXDebug(): bool - { - return $this->data['xdebug_enabled']; - } - - /** - * Returns true if APCu is enabled. - */ - public function hasApcu(): bool - { - return $this->data['apcu_enabled']; - } - - /** - * Returns true if Zend OPcache is enabled. - */ - public function hasZendOpcache(): bool - { - return $this->data['zend_opcache_enabled']; - } - - public function getBundles() - { - return $this->data['bundles']; - } - - /** - * Gets the PHP SAPI name. - */ - public function getSapiName(): string - { - return $this->data['sapi_name']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'config'; - } - - /** - * Tries to retrieve information about the current Symfony version. - * - * @return string One of: dev, stable, eom, eol - */ - private function determineSymfonyState(): string - { - $now = new \DateTime(); - $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE)->modify('last day of this month'); - $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE)->modify('last day of this month'); - - if ($now > $eol) { - $versionState = 'eol'; - } elseif ($now > $eom) { - $versionState = 'eom'; - } elseif ('' !== Kernel::EXTRA_VERSION) { - $versionState = 'dev'; - } else { - $versionState = 'stable'; - } - - return $versionState; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/DataCollector/DataCollector.php deleted file mode 100644 index ccaf66d..0000000 --- a/vendor/symfony/http-kernel/DataCollector/DataCollector.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\VarDumper\Caster\CutStub; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * DataCollector. - * - * Children of this class must store the collected data in the data property. - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -abstract class DataCollector implements DataCollectorInterface -{ - /** - * @var array|Data - */ - protected $data = []; - - /** - * @var ClonerInterface - */ - private $cloner; - - /** - * Converts the variable into a serializable Data instance. - * - * This array can be displayed in the template using - * the VarDumper component. - * - * @param mixed $var - * - * @return Data - */ - protected function cloneVar($var) - { - if ($var instanceof Data) { - return $var; - } - if (null === $this->cloner) { - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(-1); - $this->cloner->addCasters($this->getCasters()); - } - - return $this->cloner->cloneVar($var); - } - - /** - * @return callable[] The casters to add to the cloner - */ - protected function getCasters() - { - $casters = [ - '*' => function ($v, array $a, Stub $s, $isNested) { - if (!$v instanceof Stub) { - foreach ($a as $k => $v) { - if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { - $a[$k] = new CutStub($v); - } - } - } - - return $a; - }, - ] + ReflectionCaster::UNSET_CLOSURE_FILE_INFO; - - return $casters; - } - - /** - * @return array - */ - public function __sleep() - { - return ['data']; - } - - public function __wakeup() - { - } - - /** - * @internal to prevent implementing \Serializable - */ - final protected function serialize() - { - } - - /** - * @internal to prevent implementing \Serializable - */ - final protected function unserialize($data) - { - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php b/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php deleted file mode 100644 index 1cb865f..0000000 --- a/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Contracts\Service\ResetInterface; - -/** - * DataCollectorInterface. - * - * @author Fabien Potencier - */ -interface DataCollectorInterface extends ResetInterface -{ - /** - * Collects data for the given Request and Response. - */ - public function collect(Request $request, Response $response, \Throwable $exception = null); - - /** - * Returns the name of the collector. - * - * @return string - */ - public function getName(); -} diff --git a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php deleted file mode 100644 index 8e052d9..0000000 --- a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ /dev/null @@ -1,291 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\DataDumperInterface; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * @author Nicolas Grekas - * - * @final - */ -class DumpDataCollector extends DataCollector implements DataDumperInterface -{ - private $stopwatch; - private $fileLinkFormat; - private $dataCount = 0; - private $isCollected = true; - private $clonesCount = 0; - private $clonesIndex = 0; - private $rootRefs; - private $charset; - private $requestStack; - private $dumper; - private $sourceContextProvider; - - /** - * @param string|FileLinkFormatter|null $fileLinkFormat - * @param DataDumperInterface|Connection|null $dumper - */ - public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, $dumper = null) - { - $this->stopwatch = $stopwatch; - $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'; - $this->requestStack = $requestStack; - $this->dumper = $dumper; - - // All clones share these properties by reference: - $this->rootRefs = [ - &$this->data, - &$this->dataCount, - &$this->isCollected, - &$this->clonesCount, - ]; - - $this->sourceContextProvider = $dumper instanceof Connection && isset($dumper->getContextProviders()['source']) ? $dumper->getContextProviders()['source'] : new SourceContextProvider($this->charset); - } - - public function __clone() - { - $this->clonesIndex = ++$this->clonesCount; - } - - public function dump(Data $data) - { - if ($this->stopwatch) { - $this->stopwatch->start('dump'); - } - - ['name' => $name, 'file' => $file, 'line' => $line, 'file_excerpt' => $fileExcerpt] = $this->sourceContextProvider->getContext(); - - if ($this->dumper instanceof Connection) { - if (!$this->dumper->write($data)) { - $this->isCollected = false; - } - } elseif ($this->dumper) { - $this->doDump($this->dumper, $data, $name, $file, $line); - } else { - $this->isCollected = false; - } - - if (!$this->dataCount) { - $this->data = []; - } - $this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt'); - ++$this->dataCount; - - if ($this->stopwatch) { - $this->stopwatch->stop('dump'); - } - } - - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (!$this->dataCount) { - $this->data = []; - } - - // Sub-requests and programmatic calls stay in the collected profile. - if ($this->dumper || ($this->requestStack && $this->requestStack->getMainRequest() !== $request) || $request->isXmlHttpRequest() || $request->headers->has('Origin')) { - return; - } - - // In all other conditions that remove the web debug toolbar, dumps are written on the output. - if (!$this->requestStack - || !$response->headers->has('X-Debug-Token') - || $response->isRedirection() - || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type'), 'html')) - || 'html' !== $request->getRequestFormat() - || false === strripos($response->getContent(), '') - ) { - if ($response->headers->has('Content-Type') && str_contains($response->headers->get('Content-Type'), 'html')) { - $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - $dumper = new CliDumper('php://output', $this->charset); - if (method_exists($dumper, 'setDisplayOptions')) { - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } - } - - foreach ($this->data as $dump) { - $this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line']); - } - } - } - - public function reset() - { - if ($this->stopwatch) { - $this->stopwatch->reset(); - } - $this->data = []; - $this->dataCount = 0; - $this->isCollected = true; - $this->clonesCount = 0; - $this->clonesIndex = 0; - } - - /** - * @internal - */ - public function __sleep(): array - { - if (!$this->dataCount) { - $this->data = []; - } - - if ($this->clonesCount !== $this->clonesIndex) { - return []; - } - - $this->data[] = $this->fileLinkFormat; - $this->data[] = $this->charset; - $this->dataCount = 0; - $this->isCollected = true; - - return parent::__sleep(); - } - - /** - * @internal - */ - public function __wakeup() - { - parent::__wakeup(); - - $charset = array_pop($this->data); - $fileLinkFormat = array_pop($this->data); - $this->dataCount = \count($this->data); - foreach ($this->data as $dump) { - if (!\is_string($dump['name']) || !\is_string($dump['file']) || !\is_int($dump['line'])) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - } - - self::__construct($this->stopwatch, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null); - } - - public function getDumpsCount(): int - { - return $this->dataCount; - } - - public function getDumps(string $format, int $maxDepthLimit = -1, int $maxItemsPerDepth = -1): array - { - $data = fopen('php://memory', 'r+'); - - if ('html' === $format) { - $dumper = new HtmlDumper($data, $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - throw new \InvalidArgumentException(sprintf('Invalid dump format: "%s".', $format)); - } - $dumps = []; - - if (!$this->dataCount) { - return $this->data = []; - } - - foreach ($this->data as $dump) { - $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); - $dump['data'] = stream_get_contents($data, -1, 0); - ftruncate($data, 0); - rewind($data); - $dumps[] = $dump; - } - - return $dumps; - } - - public function getName(): string - { - return 'dump'; - } - - public function __destruct() - { - if (0 === $this->clonesCount-- && !$this->isCollected && $this->dataCount) { - $this->clonesCount = 0; - $this->isCollected = true; - - $h = headers_list(); - $i = \count($h); - array_unshift($h, 'Content-Type: '.ini_get('default_mimetype')); - while (0 !== stripos($h[$i], 'Content-Type:')) { - --$i; - } - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && stripos($h[$i], 'html')) { - $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } else { - $dumper = new CliDumper('php://output', $this->charset); - if (method_exists($dumper, 'setDisplayOptions')) { - $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); - } - } - - foreach ($this->data as $i => $dump) { - $this->data[$i] = null; - $this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line']); - } - - $this->data = []; - $this->dataCount = 0; - } - } - - private function doDump(DataDumperInterface $dumper, Data $data, string $name, string $file, int $line) - { - if ($dumper instanceof CliDumper) { - $contextDumper = function ($name, $file, $line, $fmt) { - if ($this instanceof HtmlDumper) { - if ($file) { - $s = $this->style('meta', '%s'); - $f = strip_tags($this->style('', $file)); - $name = strip_tags($this->style('', $name)); - if ($fmt && $link = \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line)) { - $name = sprintf(''.$s.'', strip_tags($this->style('', $link)), $f, $name); - } else { - $name = sprintf(''.$s.'', $f, $name); - } - } else { - $name = $this->style('meta', $name); - } - $this->line = $name.' on line '.$this->style('meta', $line).':'; - } else { - $this->line = $this->style('meta', $name).' on line '.$this->style('meta', $line).':'; - } - $this->dumpLine(0); - }; - $contextDumper = $contextDumper->bindTo($dumper, $dumper); - $contextDumper($name, $file, $line, $this->fileLinkFormat); - } else { - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($name.' on line '.$line.':')); - } - $dumper->dump($data); - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php deleted file mode 100644 index a813553..0000000 --- a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Fabien Potencier - * - * @final - */ -class EventDataCollector extends DataCollector implements LateDataCollectorInterface -{ - protected $dispatcher; - private $requestStack; - private $currentRequest; - - public function __construct(EventDispatcherInterface $dispatcher = null, RequestStack $requestStack = null) - { - $this->dispatcher = $dispatcher; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; - $this->data = [ - 'called_listeners' => [], - 'not_called_listeners' => [], - 'orphaned_events' => [], - ]; - } - - public function reset() - { - $this->data = []; - - if ($this->dispatcher instanceof ResetInterface) { - $this->dispatcher->reset(); - } - } - - public function lateCollect() - { - if ($this->dispatcher instanceof TraceableEventDispatcher) { - $this->setCalledListeners($this->dispatcher->getCalledListeners($this->currentRequest)); - $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners($this->currentRequest)); - $this->setOrphanedEvents($this->dispatcher->getOrphanedEvents($this->currentRequest)); - } - - $this->data = $this->cloneVar($this->data); - } - - /** - * @param array $listeners An array of called listeners - * - * @see TraceableEventDispatcher - */ - public function setCalledListeners(array $listeners) - { - $this->data['called_listeners'] = $listeners; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getCalledListeners() - { - return $this->data['called_listeners']; - } - - /** - * @see TraceableEventDispatcher - */ - public function setNotCalledListeners(array $listeners) - { - $this->data['not_called_listeners'] = $listeners; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getNotCalledListeners() - { - return $this->data['not_called_listeners']; - } - - /** - * @param array $events An array of orphaned events - * - * @see TraceableEventDispatcher - */ - public function setOrphanedEvents(array $events) - { - $this->data['orphaned_events'] = $events; - } - - /** - * @see TraceableEventDispatcher - * - * @return array|Data - */ - public function getOrphanedEvents() - { - return $this->data['orphaned_events']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'events'; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php deleted file mode 100644 index 14bbbb3..0000000 --- a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Fabien Potencier - * - * @final - */ -class ExceptionDataCollector extends DataCollector -{ - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (null !== $exception) { - $this->data = [ - 'exception' => FlattenException::createFromThrowable($exception), - ]; - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - public function hasException(): bool - { - return isset($this->data['exception']); - } - - /** - * @return \Exception|FlattenException - */ - public function getException() - { - return $this->data['exception']; - } - - public function getMessage(): string - { - return $this->data['exception']->getMessage(); - } - - public function getCode(): int - { - return $this->data['exception']->getCode(); - } - - public function getStatusCode(): int - { - return $this->data['exception']->getStatusCode(); - } - - public function getTrace(): array - { - return $this->data['exception']->getTrace(); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'exception'; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php b/vendor/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php deleted file mode 100644 index 012332d..0000000 --- a/vendor/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -/** - * LateDataCollectorInterface. - * - * @author Fabien Potencier - */ -interface LateDataCollectorInterface -{ - /** - * Collects data as late as possible. - */ - public function lateCollect(); -} diff --git a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php deleted file mode 100644 index 15094fd..0000000 --- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ /dev/null @@ -1,358 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; - -/** - * @author Fabien Potencier - * - * @final - */ -class LoggerDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $logger; - private $containerPathPrefix; - private $currentRequest; - private $requestStack; - private $processedLogs; - - public function __construct(object $logger = null, string $containerPathPrefix = null, RequestStack $requestStack = null) - { - if (null !== $logger && $logger instanceof DebugLoggerInterface) { - $this->logger = $logger; - } - - $this->containerPathPrefix = $containerPathPrefix; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->logger instanceof DebugLoggerInterface) { - $this->logger->clear(); - } - $this->data = []; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - if (null !== $this->logger) { - $containerDeprecationLogs = $this->getContainerDeprecationLogs(); - $this->data = $this->computeErrorsCount($containerDeprecationLogs); - // get compiler logs later (only when they are needed) to improve performance - $this->data['compiler_logs'] = []; - $this->data['compiler_logs_filepath'] = $this->containerPathPrefix.'Compiler.log'; - $this->data['logs'] = $this->sanitizeLogs(array_merge($this->logger->getLogs($this->currentRequest), $containerDeprecationLogs)); - $this->data = $this->cloneVar($this->data); - } - $this->currentRequest = null; - } - - public function getLogs() - { - return $this->data['logs'] ?? []; - } - - public function getProcessedLogs() - { - if (null !== $this->processedLogs) { - return $this->processedLogs; - } - - $rawLogs = $this->getLogs(); - if ([] === $rawLogs) { - return $this->processedLogs = $rawLogs; - } - - $logs = []; - foreach ($this->getLogs()->getValue() as $rawLog) { - $rawLogData = $rawLog->getValue(); - - if ($rawLogData['priority']->getValue() > 300) { - $logType = 'error'; - } elseif (isset($rawLogData['scream']) && false === $rawLogData['scream']->getValue()) { - $logType = 'deprecation'; - } elseif (isset($rawLogData['scream']) && true === $rawLogData['scream']->getValue()) { - $logType = 'silenced'; - } else { - $logType = 'regular'; - } - - $logs[] = [ - 'type' => $logType, - 'errorCount' => $rawLog['errorCount'] ?? 1, - 'timestamp' => $rawLogData['timestamp_rfc3339']->getValue(), - 'priority' => $rawLogData['priority']->getValue(), - 'priorityName' => $rawLogData['priorityName']->getValue(), - 'channel' => $rawLogData['channel']->getValue(), - 'message' => $rawLogData['message'], - 'context' => $rawLogData['context'], - ]; - } - - // sort logs from oldest to newest - usort($logs, static function ($logA, $logB) { - return $logA['timestamp'] <=> $logB['timestamp']; - }); - - return $this->processedLogs = $logs; - } - - public function getFilters() - { - $filters = [ - 'channel' => [], - 'priority' => [ - 'Debug' => 100, - 'Info' => 200, - 'Notice' => 250, - 'Warning' => 300, - 'Error' => 400, - 'Critical' => 500, - 'Alert' => 550, - 'Emergency' => 600, - ], - ]; - - $allChannels = []; - foreach ($this->getProcessedLogs() as $log) { - if ('' === trim($log['channel'])) { - continue; - } - - $allChannels[] = $log['channel']; - } - $channels = array_unique($allChannels); - sort($channels); - $filters['channel'] = $channels; - - return $filters; - } - - public function getPriorities() - { - return $this->data['priorities'] ?? []; - } - - public function countErrors() - { - return $this->data['error_count'] ?? 0; - } - - public function countDeprecations() - { - return $this->data['deprecation_count'] ?? 0; - } - - public function countWarnings() - { - return $this->data['warning_count'] ?? 0; - } - - public function countScreams() - { - return $this->data['scream_count'] ?? 0; - } - - public function getCompilerLogs() - { - return $this->cloneVar($this->getContainerCompilerLogs($this->data['compiler_logs_filepath'] ?? null)); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'logger'; - } - - private function getContainerDeprecationLogs(): array - { - if (null === $this->containerPathPrefix || !is_file($file = $this->containerPathPrefix.'Deprecations.log')) { - return []; - } - - if ('' === $logContent = trim(file_get_contents($file))) { - return []; - } - - $bootTime = filemtime($file); - $logs = []; - foreach (unserialize($logContent) as $log) { - $log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])]; - $log['timestamp'] = $bootTime; - $log['timestamp_rfc3339'] = (new \DateTimeImmutable())->setTimestamp($bootTime)->format(\DateTimeInterface::RFC3339_EXTENDED); - $log['priority'] = 100; - $log['priorityName'] = 'DEBUG'; - $log['channel'] = null; - $log['scream'] = false; - unset($log['type'], $log['file'], $log['line'], $log['trace'], $log['trace'], $log['count']); - $logs[] = $log; - } - - return $logs; - } - - private function getContainerCompilerLogs(string $compilerLogsFilepath = null): array - { - if (!is_file($compilerLogsFilepath)) { - return []; - } - - $logs = []; - foreach (file($compilerLogsFilepath, \FILE_IGNORE_NEW_LINES) as $log) { - $log = explode(': ', $log, 2); - if (!isset($log[1]) || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $log[0])) { - $log = ['Unknown Compiler Pass', implode(': ', $log)]; - } - - $logs[$log[0]][] = ['message' => $log[1]]; - } - - return $logs; - } - - private function sanitizeLogs(array $logs) - { - $sanitizedLogs = []; - $silencedLogs = []; - - foreach ($logs as $log) { - if (!$this->isSilencedOrDeprecationErrorLog($log)) { - $sanitizedLogs[] = $log; - - continue; - } - - $message = '_'.$log['message']; - $exception = $log['context']['exception']; - - if ($exception instanceof SilencedErrorContext) { - if (isset($silencedLogs[$h = spl_object_hash($exception)])) { - continue; - } - $silencedLogs[$h] = true; - - if (!isset($sanitizedLogs[$message])) { - $sanitizedLogs[$message] = $log + [ - 'errorCount' => 0, - 'scream' => true, - ]; - } - $sanitizedLogs[$message]['errorCount'] += $exception->count; - - continue; - } - - $errorId = md5("{$exception->getSeverity()}/{$exception->getLine()}/{$exception->getFile()}\0{$message}", true); - - if (isset($sanitizedLogs[$errorId])) { - ++$sanitizedLogs[$errorId]['errorCount']; - } else { - $log += [ - 'errorCount' => 1, - 'scream' => false, - ]; - - $sanitizedLogs[$errorId] = $log; - } - } - - return array_values($sanitizedLogs); - } - - private function isSilencedOrDeprecationErrorLog(array $log): bool - { - if (!isset($log['context']['exception'])) { - return false; - } - - $exception = $log['context']['exception']; - - if ($exception instanceof SilencedErrorContext) { - return true; - } - - if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { - return true; - } - - return false; - } - - private function computeErrorsCount(array $containerDeprecationLogs): array - { - $silencedLogs = []; - $count = [ - 'error_count' => $this->logger->countErrors($this->currentRequest), - 'deprecation_count' => 0, - 'warning_count' => 0, - 'scream_count' => 0, - 'priorities' => [], - ]; - - foreach ($this->logger->getLogs($this->currentRequest) as $log) { - if (isset($count['priorities'][$log['priority']])) { - ++$count['priorities'][$log['priority']]['count']; - } else { - $count['priorities'][$log['priority']] = [ - 'count' => 1, - 'name' => $log['priorityName'], - ]; - } - if ('WARNING' === $log['priorityName']) { - ++$count['warning_count']; - } - - if ($this->isSilencedOrDeprecationErrorLog($log)) { - $exception = $log['context']['exception']; - if ($exception instanceof SilencedErrorContext) { - if (isset($silencedLogs[$h = spl_object_hash($exception)])) { - continue; - } - $silencedLogs[$h] = true; - $count['scream_count'] += $exception->count; - } else { - ++$count['deprecation_count']; - } - } - } - - foreach ($containerDeprecationLogs as $deprecationLog) { - $count['deprecation_count'] += $deprecationLog['context']['exception']->count; - } - - ksort($count['priorities']); - - return $count; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php deleted file mode 100644 index 4b64a57..0000000 --- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * @author Fabien Potencier - * - * @final - */ -class MemoryDataCollector extends DataCollector implements LateDataCollectorInterface -{ - public function __construct() - { - $this->reset(); - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - $this->updateMemoryUsage(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = [ - 'memory' => 0, - 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), - ]; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $this->updateMemoryUsage(); - } - - public function getMemory(): int - { - return $this->data['memory']; - } - - /** - * @return int|float - */ - public function getMemoryLimit() - { - return $this->data['memory_limit']; - } - - public function updateMemoryUsage() - { - $this->data['memory'] = memory_get_peak_usage(true); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'memory'; - } - - /** - * @return int|float - */ - private function convertToBytes(string $memoryLimit) - { - if ('-1' === $memoryLimit) { - return -1; - } - - $memoryLimit = strtolower($memoryLimit); - $max = strtolower(ltrim($memoryLimit, '+')); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($memoryLimit, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php deleted file mode 100644 index 523f5c9..0000000 --- a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ /dev/null @@ -1,504 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\ParameterBag; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Fabien Potencier - * - * @final - */ -class RequestDataCollector extends DataCollector implements EventSubscriberInterface, LateDataCollectorInterface -{ - /** - * @var \SplObjectStorage - */ - private $controllers; - private $sessionUsages = []; - private $requestStack; - - public function __construct(RequestStack $requestStack = null) - { - $this->controllers = new \SplObjectStorage(); - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - // attributes are serialized and as they can be anything, they need to be converted to strings. - $attributes = []; - $route = ''; - foreach ($request->attributes->all() as $key => $value) { - if ('_route' === $key) { - $route = \is_object($value) ? $value->getPath() : $value; - $attributes[$key] = $route; - } else { - $attributes[$key] = $value; - } - } - - $content = $request->getContent(); - - $sessionMetadata = []; - $sessionAttributes = []; - $flashes = []; - if ($request->hasSession()) { - $session = $request->getSession(); - if ($session->isStarted()) { - $sessionMetadata['Created'] = date(\DATE_RFC822, $session->getMetadataBag()->getCreated()); - $sessionMetadata['Last used'] = date(\DATE_RFC822, $session->getMetadataBag()->getLastUsed()); - $sessionMetadata['Lifetime'] = $session->getMetadataBag()->getLifetime(); - $sessionAttributes = $session->all(); - $flashes = $session->getFlashBag()->peekAll(); - } - } - - $statusCode = $response->getStatusCode(); - - $responseCookies = []; - foreach ($response->headers->getCookies() as $cookie) { - $responseCookies[$cookie->getName()] = $cookie; - } - - $dotenvVars = []; - foreach (explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '') as $name) { - if ('' !== $name && isset($_ENV[$name])) { - $dotenvVars[$name] = $_ENV[$name]; - } - } - - $this->data = [ - 'method' => $request->getMethod(), - 'format' => $request->getRequestFormat(), - 'content_type' => $response->headers->get('Content-Type', 'text/html'), - 'status_text' => Response::$statusTexts[$statusCode] ?? '', - 'status_code' => $statusCode, - 'request_query' => $request->query->all(), - 'request_request' => $request->request->all(), - 'request_files' => $request->files->all(), - 'request_headers' => $request->headers->all(), - 'request_server' => $request->server->all(), - 'request_cookies' => $request->cookies->all(), - 'request_attributes' => $attributes, - 'route' => $route, - 'response_headers' => $response->headers->all(), - 'response_cookies' => $responseCookies, - 'session_metadata' => $sessionMetadata, - 'session_attributes' => $sessionAttributes, - 'session_usages' => array_values($this->sessionUsages), - 'stateless_check' => $this->requestStack && $this->requestStack->getMainRequest()->attributes->get('_stateless', false), - 'flashes' => $flashes, - 'path_info' => $request->getPathInfo(), - 'controller' => 'n/a', - 'locale' => $request->getLocale(), - 'dotenv_vars' => $dotenvVars, - ]; - - if (isset($this->data['request_headers']['php-auth-pw'])) { - $this->data['request_headers']['php-auth-pw'] = '******'; - } - - if (isset($this->data['request_server']['PHP_AUTH_PW'])) { - $this->data['request_server']['PHP_AUTH_PW'] = '******'; - } - - if (isset($this->data['request_request']['_password'])) { - $encodedPassword = rawurlencode($this->data['request_request']['_password']); - $content = str_replace('_password='.$encodedPassword, '_password=******', $content); - $this->data['request_request']['_password'] = '******'; - } - - $this->data['content'] = $content; - - foreach ($this->data as $key => $value) { - if (!\is_array($value)) { - continue; - } - if ('request_headers' === $key || 'response_headers' === $key) { - $this->data[$key] = array_map(function ($v) { return isset($v[0]) && !isset($v[1]) ? $v[0] : $v; }, $value); - } - } - - if (isset($this->controllers[$request])) { - $this->data['controller'] = $this->parseController($this->controllers[$request]); - unset($this->controllers[$request]); - } - - if ($request->attributes->has('_redirected') && $redirectCookie = $request->cookies->get('sf_redirect')) { - $this->data['redirect'] = json_decode($redirectCookie, true); - - $response->headers->clearCookie('sf_redirect'); - } - - if ($response->isRedirect()) { - $response->headers->setCookie(new Cookie( - 'sf_redirect', - json_encode([ - 'token' => $response->headers->get('x-debug-token'), - 'route' => $request->attributes->get('_route', 'n/a'), - 'method' => $request->getMethod(), - 'controller' => $this->parseController($request->attributes->get('_controller')), - 'status_code' => $statusCode, - 'status_text' => Response::$statusTexts[$statusCode], - ]), - 0, '/', null, $request->isSecure(), true, false, 'lax' - )); - } - - $this->data['identifier'] = $this->data['route'] ?: (\is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']); - - if ($response->headers->has('x-previous-debug-token')) { - $this->data['forward_token'] = $response->headers->get('x-previous-debug-token'); - } - } - - public function lateCollect() - { - $this->data = $this->cloneVar($this->data); - } - - public function reset() - { - $this->data = []; - $this->controllers = new \SplObjectStorage(); - $this->sessionUsages = []; - } - - public function getMethod() - { - return $this->data['method']; - } - - public function getPathInfo() - { - return $this->data['path_info']; - } - - public function getRequestRequest() - { - return new ParameterBag($this->data['request_request']->getValue()); - } - - public function getRequestQuery() - { - return new ParameterBag($this->data['request_query']->getValue()); - } - - public function getRequestFiles() - { - return new ParameterBag($this->data['request_files']->getValue()); - } - - public function getRequestHeaders() - { - return new ParameterBag($this->data['request_headers']->getValue()); - } - - public function getRequestServer(bool $raw = false) - { - return new ParameterBag($this->data['request_server']->getValue($raw)); - } - - public function getRequestCookies(bool $raw = false) - { - return new ParameterBag($this->data['request_cookies']->getValue($raw)); - } - - public function getRequestAttributes() - { - return new ParameterBag($this->data['request_attributes']->getValue()); - } - - public function getResponseHeaders() - { - return new ParameterBag($this->data['response_headers']->getValue()); - } - - public function getResponseCookies() - { - return new ParameterBag($this->data['response_cookies']->getValue()); - } - - public function getSessionMetadata() - { - return $this->data['session_metadata']->getValue(); - } - - public function getSessionAttributes() - { - return $this->data['session_attributes']->getValue(); - } - - public function getStatelessCheck() - { - return $this->data['stateless_check']; - } - - public function getSessionUsages() - { - return $this->data['session_usages']; - } - - public function getFlashes() - { - return $this->data['flashes']->getValue(); - } - - public function getContent() - { - return $this->data['content']; - } - - public function isJsonRequest() - { - return 1 === preg_match('{^application/(?:\w+\++)*json$}i', $this->data['request_headers']['content-type']); - } - - public function getPrettyJson() - { - $decoded = json_decode($this->getContent()); - - return \JSON_ERROR_NONE === json_last_error() ? json_encode($decoded, \JSON_PRETTY_PRINT) : null; - } - - public function getContentType() - { - return $this->data['content_type']; - } - - public function getStatusText() - { - return $this->data['status_text']; - } - - public function getStatusCode() - { - return $this->data['status_code']; - } - - public function getFormat() - { - return $this->data['format']; - } - - public function getLocale() - { - return $this->data['locale']; - } - - public function getDotenvVars() - { - return new ParameterBag($this->data['dotenv_vars']->getValue()); - } - - /** - * Gets the route name. - * - * The _route request attributes is automatically set by the Router Matcher. - */ - public function getRoute(): string - { - return $this->data['route']; - } - - public function getIdentifier() - { - return $this->data['identifier']; - } - - /** - * Gets the route parameters. - * - * The _route_params request attributes is automatically set by the RouterListener. - */ - public function getRouteParams(): array - { - return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : []; - } - - /** - * Gets the parsed controller. - * - * @return array|string|Data The controller as a string or array of data - * with keys 'class', 'method', 'file' and 'line' - */ - public function getController() - { - return $this->data['controller']; - } - - /** - * Gets the previous request attributes. - * - * @return array|Data|false A legacy array of data from the previous redirection response - * or false otherwise - */ - public function getRedirect() - { - return $this->data['redirect'] ?? false; - } - - public function getForwardToken() - { - return $this->data['forward_token'] ?? null; - } - - public function onKernelController(ControllerEvent $event) - { - $this->controllers[$event->getRequest()] = $event->getController(); - } - - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - if ($event->getRequest()->cookies->has('sf_redirect')) { - $event->getRequest()->attributes->set('_redirected', true); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::CONTROLLER => 'onKernelController', - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'request'; - } - - public function collectSessionUsage(): void - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); - - $traceEndIndex = \count($trace) - 1; - for ($i = $traceEndIndex; $i > 0; --$i) { - if (null !== ($class = $trace[$i]['class'] ?? null) && (is_subclass_of($class, SessionInterface::class) || is_subclass_of($class, SessionBagInterface::class))) { - $traceEndIndex = $i; - break; - } - } - - if ((\count($trace) - 1) === $traceEndIndex) { - return; - } - - // Remove part of the backtrace that belongs to session only - array_splice($trace, 0, $traceEndIndex); - - // Merge identical backtraces generated by internal call reports - $name = sprintf('%s:%s', $trace[1]['class'] ?? $trace[0]['file'], $trace[0]['line']); - if (!\array_key_exists($name, $this->sessionUsages)) { - $this->sessionUsages[$name] = [ - 'name' => $name, - 'file' => $trace[0]['file'], - 'line' => $trace[0]['line'], - 'trace' => $trace, - ]; - } - } - - /** - * @param string|object|array|null $controller The controller to parse - * - * @return array|string An array of controller data or a simple string - */ - private function parseController($controller) - { - if (\is_string($controller) && str_contains($controller, '::')) { - $controller = explode('::', $controller); - } - - if (\is_array($controller)) { - try { - $r = new \ReflectionMethod($controller[0], $controller[1]); - - return [ - 'class' => \is_object($controller[0]) ? get_debug_type($controller[0]) : $controller[0], - 'method' => $controller[1], - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - } catch (\ReflectionException $e) { - if (\is_callable($controller)) { - // using __call or __callStatic - return [ - 'class' => \is_object($controller[0]) ? get_debug_type($controller[0]) : $controller[0], - 'method' => $controller[1], - 'file' => 'n/a', - 'line' => 'n/a', - ]; - } - } - } - - if ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - - $controller = [ - 'class' => $r->getName(), - 'method' => null, - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - if (str_contains($r->name, '{closure}')) { - return $controller; - } - $controller['method'] = $r->name; - - if ($class = $r->getClosureScopeClass()) { - $controller['class'] = $class->name; - } else { - return $r->name; - } - - return $controller; - } - - if (\is_object($controller)) { - $r = new \ReflectionClass($controller); - - return [ - 'class' => $r->getName(), - 'method' => null, - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - } - - return \is_string($controller) ? $controller : 'n/a'; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php deleted file mode 100644 index 372ede0..0000000 --- a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\ControllerEvent; - -/** - * @author Fabien Potencier - */ -class RouterDataCollector extends DataCollector -{ - /** - * @var \SplObjectStorage - */ - protected $controllers; - - public function __construct() - { - $this->reset(); - } - - /** - * {@inheritdoc} - * - * @final - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if ($response instanceof RedirectResponse) { - $this->data['redirect'] = true; - $this->data['url'] = $response->getTargetUrl(); - - if ($this->controllers->contains($request)) { - $this->data['route'] = $this->guessRoute($request, $this->controllers[$request]); - } - } - - unset($this->controllers[$request]); - } - - public function reset() - { - $this->controllers = new \SplObjectStorage(); - - $this->data = [ - 'redirect' => false, - 'url' => null, - 'route' => null, - ]; - } - - protected function guessRoute(Request $request, $controller) - { - return 'n/a'; - } - - /** - * Remembers the controller associated to each request. - */ - public function onKernelController(ControllerEvent $event) - { - $this->controllers[$event->getRequest()] = $event->getController(); - } - - /** - * @return bool Whether this request will result in a redirect - */ - public function getRedirect() - { - return $this->data['redirect']; - } - - /** - * @return string|null - */ - public function getTargetUrl() - { - return $this->data['url']; - } - - /** - * @return string|null - */ - public function getTargetRoute() - { - return $this->data['route']; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'router'; - } -} diff --git a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php deleted file mode 100644 index 4379906..0000000 --- a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\Stopwatch\StopwatchEvent; - -/** - * @author Fabien Potencier - * - * @final - */ -class TimeDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $kernel; - private $stopwatch; - - public function __construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null) - { - $this->kernel = $kernel; - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (null !== $this->kernel) { - $startTime = $this->kernel->getStartTime(); - } else { - $startTime = $request->server->get('REQUEST_TIME_FLOAT'); - } - - $this->data = [ - 'token' => $request->attributes->get('_stopwatch_token'), - 'start_time' => $startTime * 1000, - 'events' => [], - 'stopwatch_installed' => class_exists(Stopwatch::class, false), - ]; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - - if (null !== $this->stopwatch) { - $this->stopwatch->reset(); - } - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - if (null !== $this->stopwatch && isset($this->data['token'])) { - $this->setEvents($this->stopwatch->getSectionEvents($this->data['token'])); - } - unset($this->data['token']); - } - - /** - * @param StopwatchEvent[] $events The request events - */ - public function setEvents(array $events) - { - foreach ($events as $event) { - $event->ensureStopped(); - } - - $this->data['events'] = $events; - } - - /** - * @return StopwatchEvent[] - */ - public function getEvents(): array - { - return $this->data['events']; - } - - /** - * Gets the request elapsed time. - */ - public function getDuration(): float - { - if (!isset($this->data['events']['__section__'])) { - return 0; - } - - $lastEvent = $this->data['events']['__section__']; - - return $lastEvent->getOrigin() + $lastEvent->getDuration() - $this->getStartTime(); - } - - /** - * Gets the initialization time. - * - * This is the time spent until the beginning of the request handling. - */ - public function getInitTime(): float - { - if (!isset($this->data['events']['__section__'])) { - return 0; - } - - return $this->data['events']['__section__']->getOrigin() - $this->getStartTime(); - } - - public function getStartTime(): float - { - return $this->data['start_time']; - } - - public function isStopwatchInstalled(): bool - { - return $this->data['stopwatch_installed']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'time'; - } -} diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php deleted file mode 100644 index 0e3df04..0000000 --- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Debug; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - -/** - * Formats debug file links. - * - * @author Jérémy Romey - * - * @final - */ -class FileLinkFormatter -{ - private const FORMATS = [ - 'textmate' => 'txmt://open?url=file://%f&line=%l', - 'macvim' => 'mvim://open?url=file://%f&line=%l', - 'emacs' => 'emacs://open?url=file://%f&line=%l', - 'sublime' => 'subl://open?url=file://%f&line=%l', - 'phpstorm' => 'phpstorm://open?file=%f&line=%l', - 'atom' => 'atom://core/open/file?filename=%f&line=%l', - 'vscode' => 'vscode://file/%f:%l', - ]; - - private $fileLinkFormat; - private $requestStack; - private $baseDir; - private $urlFormat; - - /** - * @param string|\Closure $urlFormat the URL format, or a closure that returns it on-demand - */ - public function __construct(string $fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, $urlFormat = null) - { - $fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - if ($fileLinkFormat && !\is_array($fileLinkFormat)) { - $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE); - } - - $this->fileLinkFormat = $fileLinkFormat; - $this->requestStack = $requestStack; - $this->baseDir = $baseDir; - $this->urlFormat = $urlFormat; - } - - public function format(string $file, int $line) - { - if ($fmt = $this->getFileLinkFormat()) { - for ($i = 1; isset($fmt[$i]); ++$i) { - if (str_starts_with($file, $k = $fmt[$i++])) { - $file = substr_replace($file, $fmt[$i], 0, \strlen($k)); - break; - } - } - - return strtr($fmt[0], ['%f' => $file, '%l' => $line]); - } - - return false; - } - - /** - * @internal - */ - public function __sleep(): array - { - $this->fileLinkFormat = $this->getFileLinkFormat(); - - return ['fileLinkFormat']; - } - - /** - * @internal - */ - public static function generateUrlFormat(UrlGeneratorInterface $router, string $routeName, string $queryString): ?string - { - try { - return $router->generate($routeName).$queryString; - } catch (\Throwable $e) { - return null; - } - } - - private function getFileLinkFormat() - { - if ($this->fileLinkFormat) { - return $this->fileLinkFormat; - } - - if ($this->requestStack && $this->baseDir && $this->urlFormat) { - $request = $this->requestStack->getMainRequest(); - - if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) { - return [ - $request->getSchemeAndHttpHost().$this->urlFormat, - $this->baseDir.\DIRECTORY_SEPARATOR, '', - ]; - } - } - - return null; - } -} diff --git a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php deleted file mode 100644 index fd1cf9e..0000000 --- a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Debug; - -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier - */ -class TraceableEventDispatcher extends BaseTraceableEventDispatcher -{ - /** - * {@inheritdoc} - */ - protected function beforeDispatch(string $eventName, object $event) - { - switch ($eventName) { - case KernelEvents::REQUEST: - $event->getRequest()->attributes->set('_stopwatch_token', substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); - $this->stopwatch->openSection(); - break; - case KernelEvents::VIEW: - case KernelEvents::RESPONSE: - // stop only if a controller has been executed - if ($this->stopwatch->isStarted('controller')) { - $this->stopwatch->stop('controller'); - } - break; - case KernelEvents::TERMINATE: - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - // There is a very special case when using built-in AppCache class as kernel wrapper, in the case - // of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A]. - // In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID - // is equal to the [A] debug token. Trying to reopen section with the [B] token throws an exception - // which must be caught. - try { - $this->stopwatch->openSection($sectionId); - } catch (\LogicException $e) { - } - break; - } - } - - /** - * {@inheritdoc} - */ - protected function afterDispatch(string $eventName, object $event) - { - switch ($eventName) { - case KernelEvents::CONTROLLER_ARGUMENTS: - $this->stopwatch->start('controller', 'section'); - break; - case KernelEvents::RESPONSE: - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - $this->stopwatch->stopSection($sectionId); - break; - case KernelEvents::TERMINATE: - // In the special case described in the `preDispatch` method above, the `$token` section - // does not exist, then closing it throws an exception which must be caught. - $sectionId = $event->getRequest()->attributes->get('_stopwatch_token'); - if (null === $sectionId) { - break; - } - try { - $this->stopwatch->stopSection($sectionId); - } catch (\LogicException $e) { - } - break; - } - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php deleted file mode 100644 index 4bb60b4..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\HttpKernel\Kernel; - -/** - * Sets the classes to compile in the cache for the container. - * - * @author Fabien Potencier - */ -class AddAnnotatedClassesToCachePass implements CompilerPassInterface -{ - private $kernel; - - public function __construct(Kernel $kernel) - { - $this->kernel = $kernel; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $annotatedClasses = []; - foreach ($container->getExtensions() as $extension) { - if ($extension instanceof Extension) { - $annotatedClasses[] = $extension->getAnnotatedClassesToCompile(); - } - } - - $annotatedClasses = array_merge($this->kernel->getAnnotatedClassesToCompile(), ...$annotatedClasses); - - $existingClasses = $this->getClassesInComposerClassMaps(); - - $annotatedClasses = $container->getParameterBag()->resolveValue($annotatedClasses); - $this->kernel->setAnnotatedClassCache($this->expandClasses($annotatedClasses, $existingClasses)); - } - - /** - * Expands the given class patterns using a list of existing classes. - * - * @param array $patterns The class patterns to expand - * @param array $classes The existing classes to match against the patterns - */ - private function expandClasses(array $patterns, array $classes): array - { - $expanded = []; - - // Explicit classes declared in the patterns are returned directly - foreach ($patterns as $key => $pattern) { - if (!str_ends_with($pattern, '\\') && !str_contains($pattern, '*')) { - unset($patterns[$key]); - $expanded[] = ltrim($pattern, '\\'); - } - } - - // Match patterns with the classes list - $regexps = $this->patternsToRegexps($patterns); - - foreach ($classes as $class) { - $class = ltrim($class, '\\'); - - if ($this->matchAnyRegexps($class, $regexps)) { - $expanded[] = $class; - } - } - - return array_unique($expanded); - } - - private function getClassesInComposerClassMaps(): array - { - $classes = []; - - foreach (spl_autoload_functions() as $function) { - if (!\is_array($function)) { - continue; - } - - if ($function[0] instanceof DebugClassLoader || $function[0] instanceof LegacyDebugClassLoader) { - $function = $function[0]->getClassLoader(); - } - - if (\is_array($function) && $function[0] instanceof ClassLoader) { - $classes += array_filter($function[0]->getClassMap()); - } - } - - return array_keys($classes); - } - - private function patternsToRegexps(array $patterns): array - { - $regexps = []; - - foreach ($patterns as $pattern) { - // Escape user input - $regex = preg_quote(ltrim($pattern, '\\')); - - // Wildcards * and ** - $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']); - - // If this class does not end by a slash, anchor the end - if ('\\' !== substr($regex, -1)) { - $regex .= '$'; - } - - $regexps[] = '{^\\\\'.$regex.'}'; - } - - return $regexps; - } - - private function matchAnyRegexps(string $class, array $regexps): bool - { - $isTest = str_contains($class, 'Test'); - - foreach ($regexps as $regex) { - if ($isTest && !str_contains($regex, 'Test')) { - continue; - } - - if (preg_match($regex, '\\'.$class)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php b/vendor/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php deleted file mode 100644 index 072c35f..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This extension sub-class provides first-class integration with the - * Config/Definition Component. - * - * You can use this as base class if - * - * a) you use the Config/Definition component for configuration, - * b) your configuration class is named "Configuration", and - * c) the configuration class resides in the DependencyInjection sub-folder. - * - * @author Johannes M. Schmitt - */ -abstract class ConfigurableExtension extends Extension -{ - /** - * {@inheritdoc} - */ - final public function load(array $configs, ContainerBuilder $container) - { - $this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container); - } - - /** - * Configures the passed container according to the merged configuration. - */ - abstract protected function loadInternal(array $mergedConfig, ContainerBuilder $container); -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php b/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php deleted file mode 100644 index d925ed6..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver; -use Symfony\Component\Stopwatch\Stopwatch; - -/** - * Gathers and configures the argument value resolvers. - * - * @author Iltar van der Berg - */ -class ControllerArgumentValueResolverPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $argumentResolverService; - private $argumentValueResolverTag; - private $traceableResolverStopwatch; - - public function __construct(string $argumentResolverService = 'argument_resolver', string $argumentValueResolverTag = 'controller.argument_value_resolver', string $traceableResolverStopwatch = 'debug.stopwatch') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->argumentResolverService = $argumentResolverService; - $this->argumentValueResolverTag = $argumentValueResolverTag; - $this->traceableResolverStopwatch = $traceableResolverStopwatch; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->argumentResolverService)) { - return; - } - - $resolvers = $this->findAndSortTaggedServices($this->argumentValueResolverTag, $container); - - if ($container->getParameter('kernel.debug') && class_exists(Stopwatch::class) && $container->has($this->traceableResolverStopwatch)) { - foreach ($resolvers as $resolverReference) { - $id = (string) $resolverReference; - $container->register("debug.$id", TraceableValueResolver::class) - ->setDecoratedService($id) - ->setArguments([new Reference("debug.$id.inner"), new Reference($this->traceableResolverStopwatch)]); - } - } - - $container - ->getDefinition($this->argumentResolverService) - ->replaceArgument(1, new IteratorArgument($resolvers)) - ; - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/Extension.php b/vendor/symfony/http-kernel/DependencyInjection/Extension.php deleted file mode 100644 index 4090fd8..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/Extension.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; - -/** - * Allow adding classes to the class cache. - * - * @author Fabien Potencier - */ -abstract class Extension extends BaseExtension -{ - private $annotatedClasses = []; - - /** - * Gets the annotated classes to cache. - * - * @return array - */ - public function getAnnotatedClassesToCompile() - { - return $this->annotatedClasses; - } - - /** - * Adds annotated classes to the class cache. - * - * @param array $annotatedClasses An array of class patterns - */ - public function addAnnotatedClassesToCompile(array $annotatedClasses) - { - $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php deleted file mode 100644 index f26baec..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; - -/** - * Adds services tagged kernel.fragment_renderer as HTTP content rendering strategies. - * - * @author Fabien Potencier - */ -class FragmentRendererPass implements CompilerPassInterface -{ - private $handlerService; - private $rendererTag; - - public function __construct(string $handlerService = 'fragment.handler', string $rendererTag = 'kernel.fragment_renderer') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->handlerService = $handlerService; - $this->rendererTag = $rendererTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->handlerService)) { - return; - } - - $definition = $container->getDefinition($this->handlerService); - $renderers = []; - foreach ($container->findTaggedServiceIds($this->rendererTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - $class = $container->getParameterBag()->resolveValue($def->getClass()); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(FragmentRendererInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, FragmentRendererInterface::class)); - } - - foreach ($tags as $tag) { - $renderers[$tag['alias']] = new Reference($id); - } - } - - $definition->replaceArgument(0, ServiceLocatorTagPass::register($container, $renderers)); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php deleted file mode 100644 index f253287..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Fragment\FragmentHandler; - -/** - * Lazily loads fragment renderers from the dependency injection container. - * - * @author Fabien Potencier - */ -class LazyLoadingFragmentHandler extends FragmentHandler -{ - private $container; - - /** - * @var array - */ - private $initialized = []; - - public function __construct(ContainerInterface $container, RequestStack $requestStack, bool $debug = false) - { - $this->container = $container; - - parent::__construct($requestStack, [], $debug); - } - - /** - * {@inheritdoc} - */ - public function render($uri, string $renderer = 'inline', array $options = []) - { - if (!isset($this->initialized[$renderer]) && $this->container->has($renderer)) { - $this->addRenderer($this->container->get($renderer)); - $this->initialized[$renderer] = true; - } - - return parent::render($uri, $renderer, $options); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php b/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php deleted file mode 100644 index b6df1f6..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Psr\Log\LoggerInterface; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\Log\Logger; - -/** - * Registers the default logger if necessary. - * - * @author Kévin Dunglas - */ -class LoggerPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $container->setAlias(LoggerInterface::class, 'logger') - ->setPublic(false); - - if ($container->has('logger')) { - return; - } - - $container->register('logger', Logger::class) - ->setPublic(false); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php b/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php deleted file mode 100644 index 5f0f0d8..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass as BaseMergeExtensionConfigurationPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Ensures certain extensions are always loaded. - * - * @author Kris Wallsmith - */ -class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPass -{ - private $extensions; - - /** - * @param string[] $extensions - */ - public function __construct(array $extensions) - { - $this->extensions = $extensions; - } - - public function process(ContainerBuilder $container) - { - foreach ($this->extensions as $extension) { - if (!\count($container->getExtensionConfig($extension))) { - $container->loadFromExtension($extension, []); - } - } - - parent::process($container); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php deleted file mode 100644 index 8fd1f55..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ /dev/null @@ -1,223 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Creates the service-locators required by ServiceValueResolver. - * - * @author Nicolas Grekas - */ -class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface -{ - private $resolverServiceId; - private $controllerTag; - private $controllerLocator; - private $notTaggedControllerResolverServiceId; - - public function __construct(string $resolverServiceId = 'argument_resolver.service', string $controllerTag = 'controller.service_arguments', string $controllerLocator = 'argument_resolver.controller_locator', string $notTaggedControllerResolverServiceId = 'argument_resolver.not_tagged_controller') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->resolverServiceId = $resolverServiceId; - $this->controllerTag = $controllerTag; - $this->controllerLocator = $controllerLocator; - $this->notTaggedControllerResolverServiceId = $notTaggedControllerResolverServiceId; - } - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition($this->resolverServiceId) && false === $container->hasDefinition($this->notTaggedControllerResolverServiceId)) { - return; - } - - $parameterBag = $container->getParameterBag(); - $controllers = []; - - $publicAliases = []; - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic() && !$alias->isPrivate()) { - $publicAliases[(string) $alias][] = $id; - } - } - - foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - $def->setPublic(true); - $class = $def->getClass(); - $autowire = $def->isAutowired(); - $bindings = $def->getBindings(); - - // resolve service class, taking parent definitions into account - while ($def instanceof ChildDefinition) { - $def = $container->findDefinition($def->getParent()); - $class = $class ?: $def->getClass(); - $bindings += $def->getBindings(); - } - $class = $parameterBag->resolveValue($class); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - $isContainerAware = $r->implementsInterface(ContainerAwareInterface::class) || is_subclass_of($class, AbstractController::class); - - // get regular public methods - $methods = []; - $arguments = []; - foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $r) { - if ('setContainer' === $r->name && $isContainerAware) { - continue; - } - if (!$r->isConstructor() && !$r->isDestructor() && !$r->isAbstract()) { - $methods[strtolower($r->name)] = [$r, $r->getParameters()]; - } - } - - // validate and collect explicit per-actions and per-arguments service references - foreach ($tags as $attributes) { - if (!isset($attributes['action']) && !isset($attributes['argument']) && !isset($attributes['id'])) { - $autowire = true; - continue; - } - foreach (['action', 'argument', 'id'] as $k) { - if (!isset($attributes[$k][0])) { - throw new InvalidArgumentException(sprintf('Missing "%s" attribute on tag "%s" %s for service "%s".', $k, $this->controllerTag, json_encode($attributes, \JSON_UNESCAPED_UNICODE), $id)); - } - } - if (!isset($methods[$action = strtolower($attributes['action'])])) { - throw new InvalidArgumentException(sprintf('Invalid "action" attribute on tag "%s" for service "%s": no public "%s()" method found on class "%s".', $this->controllerTag, $id, $attributes['action'], $class)); - } - [$r, $parameters] = $methods[$action]; - $found = false; - - foreach ($parameters as $p) { - if ($attributes['argument'] === $p->name) { - if (!isset($arguments[$r->name][$p->name])) { - $arguments[$r->name][$p->name] = $attributes['id']; - } - $found = true; - break; - } - } - - if (!$found) { - throw new InvalidArgumentException(sprintf('Invalid "%s" tag for service "%s": method "%s()" has no "%s" argument on class "%s".', $this->controllerTag, $id, $r->name, $attributes['argument'], $class)); - } - } - - foreach ($methods as [$r, $parameters]) { - /** @var \ReflectionMethod $r */ - - // create a per-method map of argument-names to service/type-references - $args = []; - foreach ($parameters as $p) { - /** @var \ReflectionParameter $p */ - $type = ltrim($target = (string) ProxyHelper::getTypeHint($r, $p), '\\'); - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - - if (isset($arguments[$r->name][$p->name])) { - $target = $arguments[$r->name][$p->name]; - if ('?' !== $target[0]) { - $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('' === $target = (string) substr($target, 1)) { - throw new InvalidArgumentException(sprintf('A "%s" tag must have non-empty "id" attributes for service "%s".', $this->controllerTag, $id)); - } elseif ($p->allowsNull() && !$p->isOptional()) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } - } elseif (isset($bindings[$bindingName = $type.' $'.$name = Target::parseName($p)]) || isset($bindings[$bindingName = '$'.$name]) || isset($bindings[$bindingName = $type])) { - $binding = $bindings[$bindingName]; - - [$bindingValue, $bindingId, , $bindingType, $bindingFile] = $binding->getValues(); - $binding->setValues([$bindingValue, $bindingId, true, $bindingType, $bindingFile]); - - if (!$bindingValue instanceof Reference) { - $args[$p->name] = new Reference('.value.'.$container->hash($bindingValue)); - $container->register((string) $args[$p->name], 'mixed') - ->setFactory('current') - ->addArgument([$bindingValue]); - } else { - $args[$p->name] = $bindingValue; - } - - continue; - } elseif (!$type || !$autowire || '\\' !== $target[0]) { - continue; - } elseif (is_subclass_of($type, \UnitEnum::class)) { - // do not attempt to register enum typed arguments if not already present in bindings - continue; - } elseif (!$p->allowsNull()) { - $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; - } - - if (Request::class === $type || SessionInterface::class === $type) { - continue; - } - - if ($type && !$p->isOptional() && !$p->allowsNull() && !class_exists($type) && !interface_exists($type, false)) { - $message = sprintf('Cannot determine controller argument for "%s::%s()": the $%s argument is type-hinted with the non-existent class or interface: "%s".', $class, $r->name, $p->name, $type); - - // see if the type-hint lives in the same namespace as the controller - if (0 === strncmp($type, $class, strrpos($class, '\\'))) { - $message .= ' Did you forget to add a use statement?'; - } - - $container->register($erroredId = '.errored.'.$container->hash($message), $type) - ->addError($message); - - $args[$p->name] = new Reference($erroredId, ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE); - } else { - $target = ltrim($target, '\\'); - $args[$p->name] = $type ? new TypedReference($target, $type, $invalidBehavior, Target::parseName($p)) : new Reference($target, $invalidBehavior); - } - } - // register the maps as a per-method service-locators - if ($args) { - $controllers[$id.'::'.$r->name] = ServiceLocatorTagPass::register($container, $args); - - foreach ($publicAliases[$id] ?? [] as $alias) { - $controllers[$alias.'::'.$r->name] = clone $controllers[$id.'::'.$r->name]; - } - } - } - } - - $controllerLocatorRef = ServiceLocatorTagPass::register($container, $controllers); - - if ($container->hasDefinition($this->resolverServiceId)) { - $container->getDefinition($this->resolverServiceId) - ->replaceArgument(0, $controllerLocatorRef); - } - - if ($container->hasDefinition($this->notTaggedControllerResolverServiceId)) { - $container->getDefinition($this->notTaggedControllerResolverServiceId) - ->replaceArgument(0, $controllerLocatorRef); - } - - $container->setAlias($this->controllerLocator, (string) $controllerLocatorRef); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php deleted file mode 100644 index f0b801b..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Register all services that have the "kernel.locale_aware" tag into the listener. - * - * @author Pierre Bobiet - */ -class RegisterLocaleAwareServicesPass implements CompilerPassInterface -{ - private $listenerServiceId; - private $localeAwareTag; - - public function __construct(string $listenerServiceId = 'locale_aware_listener', string $localeAwareTag = 'kernel.locale_aware') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->listenerServiceId = $listenerServiceId; - $this->localeAwareTag = $localeAwareTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->listenerServiceId)) { - return; - } - - $services = []; - - foreach ($container->findTaggedServiceIds($this->localeAwareTag) as $id => $tags) { - $services[] = new Reference($id); - } - - if (!$services) { - $container->removeDefinition($this->listenerServiceId); - - return; - } - - $container - ->getDefinition($this->listenerServiceId) - ->setArgument(0, new IteratorArgument($services)) - ; - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php deleted file mode 100644 index 2d077a0..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Removes empty service-locators registered for ServiceValueResolver. - * - * @author Nicolas Grekas - */ -class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface -{ - private $controllerLocator; - - public function __construct(string $controllerLocator = 'argument_resolver.controller_locator') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->controllerLocator = $controllerLocator; - } - - public function process(ContainerBuilder $container) - { - $controllerLocator = $container->findDefinition($this->controllerLocator); - $controllers = $controllerLocator->getArgument(0); - - foreach ($controllers as $controller => $argumentRef) { - $argumentLocator = $container->getDefinition((string) $argumentRef->getValues()[0]); - - if (!$argumentLocator->getArgument(0)) { - // remove empty argument locators - $reason = sprintf('Removing service-argument resolver for controller "%s": no corresponding services exist for the referenced types.', $controller); - } else { - // any methods listed for call-at-instantiation cannot be actions - $reason = false; - [$id, $action] = explode('::', $controller); - - if ($container->hasAlias($id)) { - continue; - } - - $controllerDef = $container->getDefinition($id); - foreach ($controllerDef->getMethodCalls() as [$method]) { - if (0 === strcasecmp($action, $method)) { - $reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id); - break; - } - } - if (!$reason) { - // see Symfony\Component\HttpKernel\Controller\ContainerControllerResolver - $controllers[$id.':'.$action] = $argumentRef; - - if ('__invoke' === $action) { - $controllers[$id] = $argumentRef; - } - continue; - } - } - - unset($controllers[$controller]); - $container->log($this, $reason); - } - - $controllerLocator->replaceArgument(0, $controllers); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php b/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php deleted file mode 100644 index 2e4cd69..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Alexander M. Turek - */ -class ResettableServicePass implements CompilerPassInterface -{ - private $tagName; - - public function __construct(string $tagName = 'kernel.reset') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->tagName = $tagName; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->has('services_resetter')) { - return; - } - - $services = $methods = []; - - foreach ($container->findTaggedServiceIds($this->tagName, true) as $id => $tags) { - $services[$id] = new Reference($id, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE); - - foreach ($tags as $attributes) { - if (!isset($attributes['method'])) { - throw new RuntimeException(sprintf('Tag "%s" requires the "method" attribute to be set.', $this->tagName)); - } - - if (!isset($methods[$id])) { - $methods[$id] = []; - } - - if ('ignore' === ($attributes['on_invalid'] ?? null)) { - $attributes['method'] = '?'.$attributes['method']; - } - - $methods[$id][] = $attributes['method']; - } - } - - if (!$services) { - $container->removeAlias('services_resetter'); - $container->removeDefinition('services_resetter'); - - return; - } - - $container->findDefinition('services_resetter') - ->setArgument(0, new IteratorArgument($services)) - ->setArgument(1, $methods); - } -} diff --git a/vendor/symfony/http-kernel/DependencyInjection/ServicesResetter.php b/vendor/symfony/http-kernel/DependencyInjection/ServicesResetter.php deleted file mode 100644 index 0063dec..0000000 --- a/vendor/symfony/http-kernel/DependencyInjection/ServicesResetter.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\DependencyInjection; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Resets provided services. - * - * @author Alexander M. Turek - * @author Nicolas Grekas - * - * @internal - */ -class ServicesResetter implements ResetInterface -{ - private $resettableServices; - private $resetMethods; - - /** - * @param \Traversable $resettableServices - * @param array $resetMethods - */ - public function __construct(\Traversable $resettableServices, array $resetMethods) - { - $this->resettableServices = $resettableServices; - $this->resetMethods = $resetMethods; - } - - public function reset() - { - foreach ($this->resettableServices as $id => $service) { - foreach ((array) $this->resetMethods[$id] as $resetMethod) { - if ('?' === $resetMethod[0] && !method_exists($service, $resetMethod = substr($resetMethod, 1))) { - continue; - } - - $service->$resetMethod(); - } - } - } -} diff --git a/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php b/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php deleted file mode 100644 index d075ee9..0000000 --- a/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows filtering of controller arguments. - * - * You can call getController() to retrieve the controller and getArguments - * to retrieve the current arguments. With setArguments() you can replace - * arguments that are used to call the controller. - * - * Arguments set in the event must be compatible with the signature of the - * controller. - * - * @author Christophe Coevoet - */ -final class ControllerArgumentsEvent extends KernelEvent -{ - private $controller; - private $arguments; - - public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, ?int $requestType) - { - parent::__construct($kernel, $request, $requestType); - - $this->controller = $controller; - $this->arguments = $arguments; - } - - public function getController(): callable - { - return $this->controller; - } - - public function setController(callable $controller) - { - $this->controller = $controller; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function setArguments(array $arguments) - { - $this->arguments = $arguments; - } -} diff --git a/vendor/symfony/http-kernel/Event/ControllerEvent.php b/vendor/symfony/http-kernel/Event/ControllerEvent.php deleted file mode 100644 index da88800..0000000 --- a/vendor/symfony/http-kernel/Event/ControllerEvent.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows filtering of a controller callable. - * - * You can call getController() to retrieve the current controller. With - * setController() you can set a new controller that is used in the processing - * of the request. - * - * Controllers should be callables. - * - * @author Bernhard Schussek - */ -final class ControllerEvent extends KernelEvent -{ - private $controller; - - public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, ?int $requestType) - { - parent::__construct($kernel, $request, $requestType); - - $this->setController($controller); - } - - public function getController(): callable - { - return $this->controller; - } - - public function setController(callable $controller): void - { - $this->controller = $controller; - } -} diff --git a/vendor/symfony/http-kernel/Event/ExceptionEvent.php b/vendor/symfony/http-kernel/Event/ExceptionEvent.php deleted file mode 100644 index a18fbd3..0000000 --- a/vendor/symfony/http-kernel/Event/ExceptionEvent.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to create a response for a thrown exception. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * You can also call setThrowable() to replace the thrown exception. This - * exception will be thrown if no response is set during processing of this - * event. - * - * @author Bernhard Schussek - */ -final class ExceptionEvent extends RequestEvent -{ - private $throwable; - - /** - * @var bool - */ - private $allowCustomResponseCode = false; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Throwable $e) - { - parent::__construct($kernel, $request, $requestType); - - $this->setThrowable($e); - } - - public function getThrowable(): \Throwable - { - return $this->throwable; - } - - /** - * Replaces the thrown exception. - * - * This exception will be thrown if no response is set in the event. - */ - public function setThrowable(\Throwable $exception): void - { - $this->throwable = $exception; - } - - /** - * Mark the event as allowing a custom response code. - */ - public function allowCustomResponseCode(): void - { - $this->allowCustomResponseCode = true; - } - - /** - * Returns true if the event allows a custom response code. - */ - public function isAllowingCustomResponseCode(): bool - { - return $this->allowCustomResponseCode; - } -} diff --git a/vendor/symfony/http-kernel/Event/FinishRequestEvent.php b/vendor/symfony/http-kernel/Event/FinishRequestEvent.php deleted file mode 100644 index 306a7ad..0000000 --- a/vendor/symfony/http-kernel/Event/FinishRequestEvent.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -/** - * Triggered whenever a request is fully processed. - * - * @author Benjamin Eberlei - */ -final class FinishRequestEvent extends KernelEvent -{ -} diff --git a/vendor/symfony/http-kernel/Event/KernelEvent.php b/vendor/symfony/http-kernel/Event/KernelEvent.php deleted file mode 100644 index d9d425e..0000000 --- a/vendor/symfony/http-kernel/Event/KernelEvent.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Base class for events thrown in the HttpKernel component. - * - * @author Bernhard Schussek - */ -class KernelEvent extends Event -{ - private $kernel; - private $request; - private $requestType; - - /** - * @param int $requestType The request type the kernel is currently processing; one of - * HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST - */ - public function __construct(HttpKernelInterface $kernel, Request $request, ?int $requestType) - { - $this->kernel = $kernel; - $this->request = $request; - $this->requestType = $requestType; - } - - /** - * Returns the kernel in which this event was thrown. - * - * @return HttpKernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Returns the request the kernel is currently processing. - * - * @return Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Returns the request type the kernel is currently processing. - * - * @return int One of HttpKernelInterface::MAIN_REQUEST and - * HttpKernelInterface::SUB_REQUEST - */ - public function getRequestType() - { - return $this->requestType; - } - - /** - * Checks if this is the main request. - */ - public function isMainRequest(): bool - { - return HttpKernelInterface::MAIN_REQUEST === $this->requestType; - } - - /** - * Checks if this is a master request. - * - * @return bool - * - * @deprecated since symfony/http-kernel 5.3, use isMainRequest() instead - */ - public function isMasterRequest() - { - trigger_deprecation('symfony/http-kernel', '5.3', '"%s()" is deprecated, use "isMainRequest()" instead.', __METHOD__); - - return $this->isMainRequest(); - } -} diff --git a/vendor/symfony/http-kernel/Event/RequestEvent.php b/vendor/symfony/http-kernel/Event/RequestEvent.php deleted file mode 100644 index 30ffcdc..0000000 --- a/vendor/symfony/http-kernel/Event/RequestEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Response; - -/** - * Allows to create a response for a request. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek - */ -class RequestEvent extends KernelEvent -{ - private $response; - - /** - * Returns the response object. - * - * @return Response|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Sets a response and stops event propagation. - */ - public function setResponse(Response $response) - { - $this->response = $response; - - $this->stopPropagation(); - } - - /** - * Returns whether a response was set. - * - * @return bool - */ - public function hasResponse() - { - return null !== $this->response; - } -} diff --git a/vendor/symfony/http-kernel/Event/ResponseEvent.php b/vendor/symfony/http-kernel/Event/ResponseEvent.php deleted file mode 100644 index 1e56ebe..0000000 --- a/vendor/symfony/http-kernel/Event/ResponseEvent.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to filter a Response object. - * - * You can call getResponse() to retrieve the current response. With - * setResponse() you can set a new response that will be returned to the - * browser. - * - * @author Bernhard Schussek - */ -final class ResponseEvent extends KernelEvent -{ - private $response; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, Response $response) - { - parent::__construct($kernel, $request, $requestType); - - $this->setResponse($response); - } - - public function getResponse(): Response - { - return $this->response; - } - - public function setResponse(Response $response): void - { - $this->response = $response; - } -} diff --git a/vendor/symfony/http-kernel/Event/TerminateEvent.php b/vendor/symfony/http-kernel/Event/TerminateEvent.php deleted file mode 100644 index 014ca53..0000000 --- a/vendor/symfony/http-kernel/Event/TerminateEvent.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to execute logic after a response was sent. - * - * Since it's only triggered on main requests, the `getRequestType()` method - * will always return the value of `HttpKernelInterface::MAIN_REQUEST`. - * - * @author Jordi Boggiano - */ -final class TerminateEvent extends KernelEvent -{ - private $response; - - public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) - { - parent::__construct($kernel, $request, HttpKernelInterface::MAIN_REQUEST); - - $this->response = $response; - } - - public function getResponse(): Response - { - return $this->response; - } -} diff --git a/vendor/symfony/http-kernel/Event/ViewEvent.php b/vendor/symfony/http-kernel/Event/ViewEvent.php deleted file mode 100644 index 88211da..0000000 --- a/vendor/symfony/http-kernel/Event/ViewEvent.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Allows to create a response for the return value of a controller. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek - */ -final class ViewEvent extends RequestEvent -{ - /** - * The return value of the controller. - * - * @var mixed - */ - private $controllerResult; - - public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult) - { - parent::__construct($kernel, $request, $requestType); - - $this->controllerResult = $controllerResult; - } - - /** - * Returns the return value of the controller. - * - * @return mixed - */ - public function getControllerResult() - { - return $this->controllerResult; - } - - /** - * Assigns the return value of the controller. - * - * @param mixed $controllerResult The controller return value - */ - public function setControllerResult($controllerResult): void - { - $this->controllerResult = $controllerResult; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php deleted file mode 100644 index 7c0c1ae..0000000 --- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ /dev/null @@ -1,306 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Container\ContainerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\SessionUtils; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Exception\UnexpectedSessionUsageException; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Sets the session onto the request on the "kernel.request" event and saves - * it on the "kernel.response" event. - * - * In addition, if the session has been started it overrides the Cache-Control - * header in such a way that all caching is disabled in that case. - * If you have a scenario where caching responses with session information in - * them makes sense, you can disable this behaviour by setting the header - * AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER on the response. - * - * @author Johannes M. Schmitt - * @author Tobias Schultze - * - * @internal - */ -abstract class AbstractSessionListener implements EventSubscriberInterface, ResetInterface -{ - public const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; - - protected $container; - private $sessionUsageStack = []; - private $debug; - - /** - * @var array - */ - private $sessionOptions; - - public function __construct(ContainerInterface $container = null, bool $debug = false, array $sessionOptions = []) - { - $this->container = $container; - $this->debug = $debug; - $this->sessionOptions = $sessionOptions; - } - - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - if (!$request->hasSession()) { - // This variable prevents calling `$this->getSession()` twice in case the Request (and the below factory) is cloned - $sess = null; - $request->setSessionFactory(function () use (&$sess, $request) { - if (!$sess) { - $sess = $this->getSession(); - } - - /* - * For supporting sessions in php runtime with runners like roadrunner or swoole, the session - * cookie needs to be read from the cookie bag and set on the session storage. - * - * Do not set it when a native php session is active. - */ - if ($sess && !$sess->isStarted() && \PHP_SESSION_ACTIVE !== session_status()) { - $sessionId = $request->cookies->get($sess->getName(), ''); - $sess->setId($sessionId); - } - - return $sess; - }); - } - - $session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null; - $this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : 0; - } - - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest() || (!$this->container->has('initialized_session') && !$event->getRequest()->hasSession())) { - return; - } - - $response = $event->getResponse(); - $autoCacheControl = !$response->headers->has(self::NO_AUTO_CACHE_CONTROL_HEADER); - // Always remove the internal header if present - $response->headers->remove(self::NO_AUTO_CACHE_CONTROL_HEADER); - - if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : $event->getRequest()->getSession()) { - return; - } - - if ($session->isStarted()) { - /* - * Saves the session, in case it is still open, before sending the response/headers. - * - * This ensures several things in case the developer did not save the session explicitly: - * - * * If a session save handler without locking is used, it ensures the data is available - * on the next request, e.g. after a redirect. PHPs auto-save at script end via - * session_register_shutdown is executed after fastcgi_finish_request. So in this case - * the data could be missing the next request because it might not be saved the moment - * the new request is processed. - * * A locking save handler (e.g. the native 'files') circumvents concurrency problems like - * the one above. But by saving the session before long-running things in the terminate event, - * we ensure the session is not blocked longer than needed. - * * When regenerating the session ID no locking is involved in PHPs session design. See - * https://bugs.php.net/61470 for a discussion. So in this case, the session must - * be saved anyway before sending the headers with the new session ID. Otherwise session - * data could get lost again for concurrent requests with the new ID. One result could be - * that you get logged out after just logging in. - * - * This listener should be executed as one of the last listeners, so that previous listeners - * can still operate on the open session. This prevents the overhead of restarting it. - * Listeners after closing the session can still work with the session as usual because - * Symfonys session implementation starts the session on demand. So writing to it after - * it is saved will just restart it. - */ - $session->save(); - - /* - * For supporting sessions in php runtime with runners like roadrunner or swoole the session - * cookie need to be written on the response object and should not be written by PHP itself. - */ - $sessionName = $session->getName(); - $sessionId = $session->getId(); - $sessionOptions = $this->getSessionOptions($this->sessionOptions); - $sessionCookiePath = $sessionOptions['cookie_path'] ?? '/'; - $sessionCookieDomain = $sessionOptions['cookie_domain'] ?? null; - $sessionCookieSecure = $sessionOptions['cookie_secure'] ?? false; - $sessionCookieHttpOnly = $sessionOptions['cookie_httponly'] ?? true; - $sessionCookieSameSite = $sessionOptions['cookie_samesite'] ?? Cookie::SAMESITE_LAX; - - SessionUtils::popSessionCookie($sessionName, $sessionId); - - $request = $event->getRequest(); - $requestSessionCookieId = $request->cookies->get($sessionName); - - $isSessionEmpty = $session->isEmpty() && empty($_SESSION); // checking $_SESSION to keep compatibility with native sessions - if ($requestSessionCookieId && $isSessionEmpty) { - $response->headers->clearCookie( - $sessionName, - $sessionCookiePath, - $sessionCookieDomain, - $sessionCookieSecure, - $sessionCookieHttpOnly, - $sessionCookieSameSite - ); - } elseif ($sessionId !== $requestSessionCookieId && !$isSessionEmpty) { - $expire = 0; - $lifetime = $sessionOptions['cookie_lifetime'] ?? null; - if ($lifetime) { - $expire = time() + $lifetime; - } - - $response->headers->setCookie( - Cookie::create( - $sessionName, - $sessionId, - $expire, - $sessionCookiePath, - $sessionCookieDomain, - $sessionCookieSecure, - $sessionCookieHttpOnly, - false, - $sessionCookieSameSite - ) - ); - } - } - - if ($session instanceof Session ? $session->getUsageIndex() === end($this->sessionUsageStack) : !$session->isStarted()) { - return; - } - - if ($autoCacheControl) { - $response - ->setExpires(new \DateTime()) - ->setPrivate() - ->setMaxAge(0) - ->headers->addCacheControlDirective('must-revalidate'); - } - - if (!$event->getRequest()->attributes->get('_stateless', false)) { - return; - } - - if ($this->debug) { - throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); - } - - if ($this->container->has('logger')) { - $this->container->get('logger')->warning('Session was used while the request was declared stateless.'); - } - } - - public function onFinishRequest(FinishRequestEvent $event) - { - if ($event->isMainRequest()) { - array_pop($this->sessionUsageStack); - } - } - - public function onSessionUsage(): void - { - if (!$this->debug) { - return; - } - - if ($this->container && $this->container->has('session_collector')) { - $this->container->get('session_collector')(); - } - - if (!$requestStack = $this->container && $this->container->has('request_stack') ? $this->container->get('request_stack') : null) { - return; - } - - $stateless = false; - $clonedRequestStack = clone $requestStack; - while (null !== ($request = $clonedRequestStack->pop()) && !$stateless) { - $stateless = $request->attributes->get('_stateless'); - } - - if (!$stateless) { - return; - } - - if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : $requestStack->getCurrentRequest()->getSession()) { - return; - } - - if ($session->isStarted()) { - $session->save(); - } - - throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => ['onKernelRequest', 128], - // low priority to come after regular response listeners, but higher than StreamedResponseListener - KernelEvents::RESPONSE => ['onKernelResponse', -1000], - KernelEvents::FINISH_REQUEST => ['onFinishRequest'], - ]; - } - - public function reset(): void - { - if (\PHP_SESSION_ACTIVE === session_status()) { - session_abort(); - } - - session_unset(); - $_SESSION = []; - - if (!headers_sent()) { // session id can only be reset when no headers were so we check for headers_sent first - session_id(''); - } - } - - /** - * Gets the session object. - * - * @return SessionInterface|null - */ - abstract protected function getSession(); - - private function getSessionOptions(array $sessionOptions): array - { - $mergedSessionOptions = []; - - foreach (session_get_cookie_params() as $key => $value) { - $mergedSessionOptions['cookie_'.$key] = $value; - } - - foreach ($sessionOptions as $key => $value) { - // do the same logic as in the NativeSessionStorage - if ('cookie_secure' === $key && 'auto' === $value) { - continue; - } - $mergedSessionOptions[$key] = $value; - } - - return $mergedSessionOptions; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php deleted file mode 100644 index 838c294..0000000 --- a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -trigger_deprecation('symfony/http-kernel', '5.4', '"%s" is deprecated use "%s" instead.', AbstractTestSessionListener::class, AbstractSessionListener::class); - -/** - * TestSessionListener. - * - * Saves session in test environment. - * - * @author Bulat Shakirzyanov - * @author Fabien Potencier - * - * @internal - * - * @deprecated since Symfony 5.4, use AbstractSessionListener instead - */ -abstract class AbstractTestSessionListener implements EventSubscriberInterface -{ - private $sessionId; - private $sessionOptions; - - public function __construct(array $sessionOptions = []) - { - $this->sessionOptions = $sessionOptions; - } - - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - // bootstrap the session - if ($event->getRequest()->hasSession()) { - $session = $event->getRequest()->getSession(); - } elseif (!$session = $this->getSession()) { - return; - } - - $cookies = $event->getRequest()->cookies; - - if ($cookies->has($session->getName())) { - $this->sessionId = $cookies->get($session->getName()); - $session->setId($this->sessionId); - } - } - - /** - * Checks if session was initialized and saves if current request is the main request - * Runs on 'kernel.response' in test environment. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - if (!$request->hasSession()) { - return; - } - - $session = $request->getSession(); - if ($wasStarted = $session->isStarted()) { - $session->save(); - } - - if ($session instanceof Session ? !$session->isEmpty() || (null !== $this->sessionId && $session->getId() !== $this->sessionId) : $wasStarted) { - $params = session_get_cookie_params() + ['samesite' => null]; - foreach ($this->sessionOptions as $k => $v) { - if (str_starts_with($k, 'cookie_')) { - $params[substr($k, 7)] = $v; - } - } - - foreach ($event->getResponse()->headers->getCookies() as $cookie) { - if ($session->getName() === $cookie->getName() && $params['path'] === $cookie->getPath() && $params['domain'] == $cookie->getDomain()) { - return; - } - } - - $event->getResponse()->headers->setCookie(new Cookie($session->getName(), $session->getId(), 0 === $params['lifetime'] ? 0 : time() + $params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly'], false, $params['samesite'] ?: null)); - $this->sessionId = $session->getId(); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => ['onKernelRequest', 127], // AFTER SessionListener - KernelEvents::RESPONSE => ['onKernelResponse', -128], - ]; - } - - /** - * Gets the session object. - * - * @return SessionInterface|null - */ - abstract protected function getSession(); -} diff --git a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php deleted file mode 100644 index 9e896ad..0000000 --- a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Adds configured formats to each request. - * - * @author Gildas Quemener - * - * @final - */ -class AddRequestFormatsListener implements EventSubscriberInterface -{ - protected $formats; - - public function __construct(array $formats) - { - $this->formats = $formats; - } - - /** - * Adds request formats. - */ - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - foreach ($this->formats as $format => $mimeTypes) { - $request->setFormat($format, $mimeTypes); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [KernelEvents::REQUEST => ['onKernelRequest', 100]]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php deleted file mode 100644 index efe3960..0000000 --- a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleEvent; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\KernelEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Configures errors and exceptions handlers. - * - * @author Nicolas Grekas - * - * @final - * - * @internal since Symfony 5.3 - */ -class DebugHandlersListener implements EventSubscriberInterface -{ - private $earlyHandler; - private $exceptionHandler; - private $logger; - private $deprecationLogger; - private $levels; - private $throwAt; - private $scream; - private $scope; - private $firstCall = true; - private $hasTerminatedWithException; - - /** - * @param callable|null $exceptionHandler A handler that must support \Throwable instances that will be called on Exception - * @param array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants - * @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value - * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged - * @param bool $scope Enables/disables scoping mode - */ - public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $scope = true, $deprecationLogger = null, $fileLinkFormat = null) - { - if (!\is_bool($scope)) { - trigger_deprecation('symfony/http-kernel', '5.4', 'Passing a $fileLinkFormat is deprecated.'); - $scope = $deprecationLogger; - $deprecationLogger = $fileLinkFormat; - } - - $handler = set_exception_handler('var_dump'); - $this->earlyHandler = \is_array($handler) ? $handler[0] : null; - restore_exception_handler(); - - $this->exceptionHandler = $exceptionHandler; - $this->logger = $logger; - $this->levels = $levels ?? \E_ALL; - $this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null)); - $this->scream = $scream; - $this->scope = $scope; - $this->deprecationLogger = $deprecationLogger; - } - - /** - * Configures the error handler. - */ - public function configure(object $event = null) - { - if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - return; - } - if (!$event instanceof KernelEvent ? !$this->firstCall : !$event->isMainRequest()) { - return; - } - $this->firstCall = $this->hasTerminatedWithException = false; - - $handler = set_exception_handler('var_dump'); - $handler = \is_array($handler) ? $handler[0] : null; - restore_exception_handler(); - - if (!$handler instanceof ErrorHandler) { - $handler = $this->earlyHandler; - } - - if ($handler instanceof ErrorHandler) { - if ($this->logger || $this->deprecationLogger) { - $this->setDefaultLoggers($handler); - if (\is_array($this->levels)) { - $levels = 0; - foreach ($this->levels as $type => $log) { - $levels |= $type; - } - } else { - $levels = $this->levels; - } - - if ($this->scream) { - $handler->screamAt($levels); - } - if ($this->scope) { - $handler->scopeAt($levels & ~\E_USER_DEPRECATED & ~\E_DEPRECATED); - } else { - $handler->scopeAt(0, true); - } - $this->logger = $this->deprecationLogger = $this->levels = null; - } - if (null !== $this->throwAt) { - $handler->throwAt($this->throwAt, true); - } - } - if (!$this->exceptionHandler) { - if ($event instanceof KernelEvent) { - if (method_exists($kernel = $event->getKernel(), 'terminateWithException')) { - $request = $event->getRequest(); - $hasRun = &$this->hasTerminatedWithException; - $this->exceptionHandler = static function (\Throwable $e) use ($kernel, $request, &$hasRun) { - if ($hasRun) { - throw $e; - } - - $hasRun = true; - $kernel->terminateWithException($e, $request); - }; - } - } elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) { - $output = $event->getOutput(); - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - $this->exceptionHandler = static function (\Throwable $e) use ($app, $output) { - $app->renderThrowable($e, $output); - }; - } - } - if ($this->exceptionHandler) { - if ($handler instanceof ErrorHandler) { - $handler->setExceptionHandler($this->exceptionHandler); - } - $this->exceptionHandler = null; - } - } - - private function setDefaultLoggers(ErrorHandler $handler): void - { - if (\is_array($this->levels)) { - $levelsDeprecatedOnly = []; - $levelsWithoutDeprecated = []; - foreach ($this->levels as $type => $log) { - if (\E_DEPRECATED == $type || \E_USER_DEPRECATED == $type) { - $levelsDeprecatedOnly[$type] = $log; - } else { - $levelsWithoutDeprecated[$type] = $log; - } - } - } else { - $levelsDeprecatedOnly = $this->levels & (\E_DEPRECATED | \E_USER_DEPRECATED); - $levelsWithoutDeprecated = $this->levels & ~\E_DEPRECATED & ~\E_USER_DEPRECATED; - } - - $defaultLoggerLevels = $this->levels; - if ($this->deprecationLogger && $levelsDeprecatedOnly) { - $handler->setDefaultLogger($this->deprecationLogger, $levelsDeprecatedOnly); - $defaultLoggerLevels = $levelsWithoutDeprecated; - } - - if ($this->logger && $defaultLoggerLevels) { - $handler->setDefaultLogger($this->logger, $defaultLoggerLevels); - } - } - - public static function getSubscribedEvents(): array - { - $events = [KernelEvents::REQUEST => ['configure', 2048]]; - - if (\defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { - $events[ConsoleEvents::COMMAND] = ['configure', 2048]; - } - - return $events; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php b/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php deleted file mode 100644 index 6607e49..0000000 --- a/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Ensures that the application is not indexed by search engines. - * - * @author Gary PEGEOT - */ -class DisallowRobotsIndexingListener implements EventSubscriberInterface -{ - private const HEADER_NAME = 'X-Robots-Tag'; - - public function onResponse(ResponseEvent $event): void - { - if (!$event->getResponse()->headers->has(static::HEADER_NAME)) { - $event->getResponse()->headers->set(static::HEADER_NAME, 'noindex'); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - KernelEvents::RESPONSE => ['onResponse', -255], - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/DumpListener.php b/vendor/symfony/http-kernel/EventListener/DumpListener.php deleted file mode 100644 index 30908a4..0000000 --- a/vendor/symfony/http-kernel/EventListener/DumpListener.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Dumper\DataDumperInterface; -use Symfony\Component\VarDumper\Server\Connection; -use Symfony\Component\VarDumper\VarDumper; - -/** - * Configures dump() handler. - * - * @author Nicolas Grekas - */ -class DumpListener implements EventSubscriberInterface -{ - private $cloner; - private $dumper; - private $connection; - - public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper, Connection $connection = null) - { - $this->cloner = $cloner; - $this->dumper = $dumper; - $this->connection = $connection; - } - - public function configure() - { - $cloner = $this->cloner; - $dumper = $this->dumper; - $connection = $this->connection; - - VarDumper::setHandler(static function ($var) use ($cloner, $dumper, $connection) { - $data = $cloner->cloneVar($var); - - if (!$connection || !$connection->write($data)) { - $dumper->dump($data); - } - }); - } - - public static function getSubscribedEvents() - { - if (!class_exists(ConsoleEvents::class)) { - return []; - } - - // Register early to have a working dump() as early as possible - return [ConsoleEvents::COMMAND => ['configure', 1024]]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/ErrorListener.php b/vendor/symfony/http-kernel/EventListener/ErrorListener.php deleted file mode 100644 index 9dc3871..0000000 --- a/vendor/symfony/http-kernel/EventListener/ErrorListener.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Debug\Exception\FlattenException as LegacyFlattenException; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; - -/** - * @author Fabien Potencier - */ -class ErrorListener implements EventSubscriberInterface -{ - protected $controller; - protected $logger; - protected $debug; - protected $exceptionsMapping; - - public function __construct($controller, LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = []) - { - $this->controller = $controller; - $this->logger = $logger; - $this->debug = $debug; - $this->exceptionsMapping = $exceptionsMapping; - } - - public function logKernelException(ExceptionEvent $event) - { - $throwable = $event->getThrowable(); - $logLevel = null; - - foreach ($this->exceptionsMapping as $class => $config) { - if ($throwable instanceof $class && $config['log_level']) { - $logLevel = $config['log_level']; - break; - } - } - - foreach ($this->exceptionsMapping as $class => $config) { - if (!$throwable instanceof $class || !$config['status_code']) { - continue; - } - if (!$throwable instanceof HttpExceptionInterface || $throwable->getStatusCode() !== $config['status_code']) { - $headers = $throwable instanceof HttpExceptionInterface ? $throwable->getHeaders() : []; - $throwable = new HttpException($config['status_code'], $throwable->getMessage(), $throwable, $headers); - $event->setThrowable($throwable); - } - break; - } - - $e = FlattenException::createFromThrowable($throwable); - - $this->logException($throwable, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()), $logLevel); - } - - public function onKernelException(ExceptionEvent $event) - { - if (null === $this->controller) { - return; - } - - $throwable = $event->getThrowable(); - $request = $this->duplicateRequest($throwable, $event->getRequest()); - - try { - $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); - } catch (\Exception $e) { - $f = FlattenException::createFromThrowable($e); - - $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine())); - - $prev = $e; - do { - if ($throwable === $wrapper = $prev) { - throw $e; - } - } while ($prev = $wrapper->getPrevious()); - - $prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous'); - $prev->setAccessible(true); - $prev->setValue($wrapper, $throwable); - - throw $e; - } - - $event->setResponse($response); - - if ($this->debug) { - $event->getRequest()->attributes->set('_remove_csp_headers', true); - } - } - - public function removeCspHeader(ResponseEvent $event): void - { - if ($this->debug && $event->getRequest()->attributes->get('_remove_csp_headers', false)) { - $event->getResponse()->headers->remove('Content-Security-Policy'); - } - } - - public function onControllerArguments(ControllerArgumentsEvent $event) - { - $e = $event->getRequest()->attributes->get('exception'); - - if (!$e instanceof \Throwable || false === $k = array_search($e, $event->getArguments(), true)) { - return; - } - - $r = new \ReflectionFunction(\Closure::fromCallable($event->getController())); - $r = $r->getParameters()[$k] ?? null; - - if ($r && (!($r = $r->getType()) instanceof \ReflectionNamedType || \in_array($r->getName(), [FlattenException::class, LegacyFlattenException::class], true))) { - $arguments = $event->getArguments(); - $arguments[$k] = FlattenException::createFromThrowable($e); - $event->setArguments($arguments); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::CONTROLLER_ARGUMENTS => 'onControllerArguments', - KernelEvents::EXCEPTION => [ - ['logKernelException', 0], - ['onKernelException', -128], - ], - KernelEvents::RESPONSE => ['removeCspHeader', -128], - ]; - } - - /** - * Logs an exception. - */ - protected function logException(\Throwable $exception, string $message, string $logLevel = null): void - { - if (null !== $this->logger) { - if (null !== $logLevel) { - $this->logger->log($logLevel, $message, ['exception' => $exception]); - } elseif (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) { - $this->logger->critical($message, ['exception' => $exception]); - } else { - $this->logger->error($message, ['exception' => $exception]); - } - } - } - - /** - * Clones the request for the exception. - */ - protected function duplicateRequest(\Throwable $exception, Request $request): Request - { - $attributes = [ - '_controller' => $this->controller, - 'exception' => $exception, - 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, - ]; - $request = $request->duplicate(null, null, $attributes); - $request->setMethod('GET'); - - return $request; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/EventListener/FragmentListener.php deleted file mode 100644 index c01d9ad..0000000 --- a/vendor/symfony/http-kernel/EventListener/FragmentListener.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Handles content fragments represented by special URIs. - * - * All URL paths starting with /_fragment are handled as - * content fragments by this listener. - * - * Throws an AccessDeniedHttpException exception if the request - * is not signed or if it is not an internal sub-request. - * - * @author Fabien Potencier - * - * @final - */ -class FragmentListener implements EventSubscriberInterface -{ - private $signer; - private $fragmentPath; - - /** - * @param string $fragmentPath The path that triggers this listener - */ - public function __construct(UriSigner $signer, string $fragmentPath = '/_fragment') - { - $this->signer = $signer; - $this->fragmentPath = $fragmentPath; - } - - /** - * Fixes request attributes when the path is '/_fragment'. - * - * @throws AccessDeniedHttpException if the request does not come from a trusted IP - */ - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - if ($this->fragmentPath !== rawurldecode($request->getPathInfo())) { - return; - } - - if ($request->attributes->has('_controller')) { - // Is a sub-request: no need to parse _path but it should still be removed from query parameters as below. - $request->query->remove('_path'); - - return; - } - - if ($event->isMainRequest()) { - $this->validateRequest($request); - } - - parse_str($request->query->get('_path', ''), $attributes); - $request->attributes->add($attributes); - $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', []), $attributes)); - $request->query->remove('_path'); - } - - protected function validateRequest(Request $request) - { - // is the Request safe? - if (!$request->isMethodSafe()) { - throw new AccessDeniedHttpException(); - } - - // is the Request signed? - if ($this->signer->checkRequest($request)) { - return; - } - - throw new AccessDeniedHttpException(); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [['onKernelRequest', 48]], - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php b/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php deleted file mode 100644 index a126f06..0000000 --- a/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -/** - * Pass the current locale to the provided services. - * - * @author Pierre Bobiet - */ -class LocaleAwareListener implements EventSubscriberInterface -{ - private $localeAwareServices; - private $requestStack; - - /** - * @param iterable $localeAwareServices - */ - public function __construct(iterable $localeAwareServices, RequestStack $requestStack) - { - $this->localeAwareServices = $localeAwareServices; - $this->requestStack = $requestStack; - } - - public function onKernelRequest(RequestEvent $event): void - { - $this->setLocale($event->getRequest()->getLocale(), $event->getRequest()->getDefaultLocale()); - } - - public function onKernelFinishRequest(FinishRequestEvent $event): void - { - if (null === $parentRequest = $this->requestStack->getParentRequest()) { - foreach ($this->localeAwareServices as $service) { - $service->setLocale($event->getRequest()->getDefaultLocale()); - } - - return; - } - - $this->setLocale($parentRequest->getLocale(), $parentRequest->getDefaultLocale()); - } - - public static function getSubscribedEvents() - { - return [ - // must be registered after the Locale listener - KernelEvents::REQUEST => [['onKernelRequest', 15]], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', -15]], - ]; - } - - private function setLocale(string $locale, string $defaultLocale): void - { - foreach ($this->localeAwareServices as $service) { - try { - $service->setLocale($locale); - } catch (\InvalidArgumentException $e) { - $service->setLocale($defaultLocale); - } - } - } -} diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php deleted file mode 100644 index f19e136..0000000 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\KernelEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * Initializes the locale based on the current request. - * - * @author Fabien Potencier - * - * @final - */ -class LocaleListener implements EventSubscriberInterface -{ - private $router; - private $defaultLocale; - private $requestStack; - private $useAcceptLanguageHeader; - private $enabledLocales; - - public function __construct(RequestStack $requestStack, string $defaultLocale = 'en', RequestContextAwareInterface $router = null, bool $useAcceptLanguageHeader = false, array $enabledLocales = []) - { - $this->defaultLocale = $defaultLocale; - $this->requestStack = $requestStack; - $this->router = $router; - $this->useAcceptLanguageHeader = $useAcceptLanguageHeader; - $this->enabledLocales = $enabledLocales; - } - - public function setDefaultLocale(KernelEvent $event) - { - $event->getRequest()->setDefaultLocale($this->defaultLocale); - } - - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - $this->setLocale($request); - $this->setRouterContext($request); - } - - public function onKernelFinishRequest(FinishRequestEvent $event) - { - if (null !== $parentRequest = $this->requestStack->getParentRequest()) { - $this->setRouterContext($parentRequest); - } - } - - private function setLocale(Request $request) - { - if ($locale = $request->attributes->get('_locale')) { - $request->setLocale($locale); - } elseif ($this->useAcceptLanguageHeader && $this->enabledLocales && ($preferredLanguage = $request->getPreferredLanguage($this->enabledLocales))) { - $request->setLocale($preferredLanguage); - $request->attributes->set('_vary_by_language', true); - } - } - - private function setRouterContext(Request $request) - { - if (null !== $this->router) { - $this->router->getContext()->setParameter('_locale', $request->getLocale()); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [ - ['setDefaultLocale', 100], - // must be registered after the Router to have access to the _locale - ['onKernelRequest', 16], - ], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php deleted file mode 100644 index 8552524..0000000 --- a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestMatcherInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Profiler\Profile; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -/** - * ProfilerListener collects data for the current request by listening to the kernel events. - * - * @author Fabien Potencier - * - * @final - */ -class ProfilerListener implements EventSubscriberInterface -{ - protected $profiler; - protected $matcher; - protected $onlyException; - protected $onlyMainRequests; - protected $exception; - /** @var \SplObjectStorage */ - protected $profiles; - protected $requestStack; - protected $collectParameter; - /** @var \SplObjectStorage */ - protected $parents; - - /** - * @param bool $onlyException True if the profiler only collects data when an exception occurs, false otherwise - * @param bool $onlyMainRequests True if the profiler only collects data when the request is the main request, false otherwise - */ - public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = null, bool $onlyException = false, bool $onlyMainRequests = false, string $collectParameter = null) - { - $this->profiler = $profiler; - $this->matcher = $matcher; - $this->onlyException = $onlyException; - $this->onlyMainRequests = $onlyMainRequests; - $this->profiles = new \SplObjectStorage(); - $this->parents = new \SplObjectStorage(); - $this->requestStack = $requestStack; - $this->collectParameter = $collectParameter; - } - - /** - * Handles the onKernelException event. - */ - public function onKernelException(ExceptionEvent $event) - { - if ($this->onlyMainRequests && !$event->isMainRequest()) { - return; - } - - $this->exception = $event->getThrowable(); - } - - /** - * Handles the onKernelResponse event. - */ - public function onKernelResponse(ResponseEvent $event) - { - if ($this->onlyMainRequests && !$event->isMainRequest()) { - return; - } - - if ($this->onlyException && null === $this->exception) { - return; - } - - $request = $event->getRequest(); - if (null !== $this->collectParameter && null !== $collectParameterValue = $request->get($this->collectParameter)) { - true === $collectParameterValue || filter_var($collectParameterValue, \FILTER_VALIDATE_BOOLEAN) ? $this->profiler->enable() : $this->profiler->disable(); - } - - $exception = $this->exception; - $this->exception = null; - - if (null !== $this->matcher && !$this->matcher->matches($request)) { - return; - } - - if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) { - return; - } - - $this->profiles[$request] = $profile; - - $this->parents[$request] = $this->requestStack->getParentRequest(); - } - - public function onKernelTerminate(TerminateEvent $event) - { - // attach children to parents - foreach ($this->profiles as $request) { - if (null !== $parentRequest = $this->parents[$request]) { - if (isset($this->profiles[$parentRequest])) { - $this->profiles[$parentRequest]->addChild($this->profiles[$request]); - } - } - } - - // save profiles - foreach ($this->profiles as $request) { - $this->profiler->saveProfile($this->profiles[$request]); - } - - $this->profiles = new \SplObjectStorage(); - $this->parents = new \SplObjectStorage(); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -100], - KernelEvents::EXCEPTION => ['onKernelException', 0], - KernelEvents::TERMINATE => ['onKernelTerminate', -1024], - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/ResponseListener.php b/vendor/symfony/http-kernel/EventListener/ResponseListener.php deleted file mode 100644 index a409015..0000000 --- a/vendor/symfony/http-kernel/EventListener/ResponseListener.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * ResponseListener fixes the Response headers based on the Request. - * - * @author Fabien Potencier - * - * @final - */ -class ResponseListener implements EventSubscriberInterface -{ - private $charset; - private $addContentLanguageHeader; - - public function __construct(string $charset, bool $addContentLanguageHeader = false) - { - $this->charset = $charset; - $this->addContentLanguageHeader = $addContentLanguageHeader; - } - - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $response = $event->getResponse(); - - if (null === $response->getCharset()) { - $response->setCharset($this->charset); - } - - if ($this->addContentLanguageHeader && !$response->isInformational() && !$response->isEmpty() && !$response->headers->has('Content-Language')) { - $response->headers->set('Content-Language', $event->getRequest()->getLocale()); - } - - if ($event->getRequest()->attributes->get('_vary_by_language')) { - $response->setVary('Accept-Language', false); - } - - $response->prepare($event->getRequest()); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php deleted file mode 100644 index 7c4da98..0000000 --- a/vendor/symfony/http-kernel/EventListener/RouterListener.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * Initializes the context from the request and sets request attributes based on a matching route. - * - * @author Fabien Potencier - * @author Yonel Ceruto - * - * @final - */ -class RouterListener implements EventSubscriberInterface -{ - private $matcher; - private $context; - private $logger; - private $requestStack; - private $projectDir; - private $debug; - - /** - * @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher - * @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface) - * - * @throws \InvalidArgumentException - */ - public function __construct($matcher, RequestStack $requestStack, RequestContext $context = null, LoggerInterface $logger = null, string $projectDir = null, bool $debug = true) - { - if (!$matcher instanceof UrlMatcherInterface && !$matcher instanceof RequestMatcherInterface) { - throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); - } - - if (null === $context && !$matcher instanceof RequestContextAwareInterface) { - throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.'); - } - - $this->matcher = $matcher; - $this->context = $context ?? $matcher->getContext(); - $this->requestStack = $requestStack; - $this->logger = $logger; - $this->projectDir = $projectDir; - $this->debug = $debug; - } - - private function setCurrentRequest(Request $request = null) - { - if (null !== $request) { - try { - $this->context->fromRequest($request); - } catch (\UnexpectedValueException $e) { - throw new BadRequestHttpException($e->getMessage(), $e, $e->getCode()); - } - } - } - - /** - * After a sub-request is done, we need to reset the routing context to the parent request so that the URL generator - * operates on the correct context again. - */ - public function onKernelFinishRequest(FinishRequestEvent $event) - { - $this->setCurrentRequest($this->requestStack->getParentRequest()); - } - - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - - $this->setCurrentRequest($request); - - if ($request->attributes->has('_controller')) { - // routing is already done - return; - } - - // add attributes based on the request (routing) - try { - // matching a request is more powerful than matching a URL path + context, so try that first - if ($this->matcher instanceof RequestMatcherInterface) { - $parameters = $this->matcher->matchRequest($request); - } else { - $parameters = $this->matcher->match($request->getPathInfo()); - } - - if (null !== $this->logger) { - $this->logger->info('Matched route "{route}".', [ - 'route' => $parameters['_route'] ?? 'n/a', - 'route_parameters' => $parameters, - 'request_uri' => $request->getUri(), - 'method' => $request->getMethod(), - ]); - } - - $request->attributes->add($parameters); - unset($parameters['_route'], $parameters['_controller']); - $request->attributes->set('_route_params', $parameters); - } catch (ResourceNotFoundException $e) { - $message = sprintf('No route found for "%s %s"', $request->getMethod(), $request->getUriForPath($request->getPathInfo())); - - if ($referer = $request->headers->get('referer')) { - $message .= sprintf(' (from "%s")', $referer); - } - - throw new NotFoundHttpException($message, $e); - } catch (MethodNotAllowedException $e) { - $message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getUriForPath($request->getPathInfo()), implode(', ', $e->getAllowedMethods())); - - throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e); - } - } - - public function onKernelException(ExceptionEvent $event) - { - if (!$this->debug || !($e = $event->getThrowable()) instanceof NotFoundHttpException) { - return; - } - - if ($e->getPrevious() instanceof NoConfigurationException) { - $event->setResponse($this->createWelcomeResponse()); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [['onKernelRequest', 32]], - KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], - KernelEvents::EXCEPTION => ['onKernelException', -64], - ]; - } - - private function createWelcomeResponse(): Response - { - $version = Kernel::VERSION; - $projectDir = realpath((string) $this->projectDir).\DIRECTORY_SEPARATOR; - $docVersion = substr(Kernel::VERSION, 0, 3); - - ob_start(); - include \dirname(__DIR__).'/Resources/welcome.html.php'; - - return new Response(ob_get_clean(), Response::HTTP_NOT_FOUND); - } -} diff --git a/vendor/symfony/http-kernel/EventListener/SessionListener.php b/vendor/symfony/http-kernel/EventListener/SessionListener.php deleted file mode 100644 index 61887fd..0000000 --- a/vendor/symfony/http-kernel/EventListener/SessionListener.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpKernel\Event\RequestEvent; - -/** - * Sets the session in the request. - * - * When the passed container contains a "session_storage" entry which - * holds a NativeSessionStorage instance, the "cookie_secure" option - * will be set to true whenever the current main request is secure. - * - * @author Fabien Potencier - * - * @final - */ -class SessionListener extends AbstractSessionListener -{ - public function onKernelRequest(RequestEvent $event) - { - parent::onKernelRequest($event); - - if (!$event->isMainRequest() || (!$this->container->has('session') && !$this->container->has('session_factory'))) { - return; - } - - if ($this->container->has('session_storage') - && ($storage = $this->container->get('session_storage')) instanceof NativeSessionStorage - && ($mainRequest = $this->container->get('request_stack')->getMainRequest()) - && $mainRequest->isSecure() - ) { - $storage->setOptions(['cookie_secure' => true]); - } - } - - protected function getSession(): ?SessionInterface - { - if ($this->container->has('session')) { - return $this->container->get('session'); - } - - if ($this->container->has('session_factory')) { - return $this->container->get('session_factory')->createSession(); - } - - return null; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php b/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php deleted file mode 100644 index b3f7ca4..0000000 --- a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * StreamedResponseListener is responsible for sending the Response - * to the client. - * - * @author Fabien Potencier - * - * @final - */ -class StreamedResponseListener implements EventSubscriberInterface -{ - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $response = $event->getResponse(); - - if ($response instanceof StreamedResponse) { - $response->send(); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -1024], - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php deleted file mode 100644 index 9081bff..0000000 --- a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\HttpCache\HttpCache; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. - * - * @author Fabien Potencier - * - * @final - */ -class SurrogateListener implements EventSubscriberInterface -{ - private $surrogate; - - public function __construct(SurrogateInterface $surrogate = null) - { - $this->surrogate = $surrogate; - } - - /** - * Filters the Response. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $kernel = $event->getKernel(); - $surrogate = $this->surrogate; - if ($kernel instanceof HttpCache) { - $surrogate = $kernel->getSurrogate(); - if (null !== $this->surrogate && $this->surrogate->getName() !== $surrogate->getName()) { - $surrogate = $this->surrogate; - } - } - - if (null === $surrogate) { - return; - } - - $surrogate->addSurrogateControl($event->getResponse()); - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => 'onKernelResponse', - ]; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php deleted file mode 100644 index 45fa312..0000000 --- a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -trigger_deprecation('symfony/http-kernel', '5.4', '"%s" is deprecated, use "%s" instead.', TestSessionListener::class, SessionListener::class); - -/** - * Sets the session in the request. - * - * @author Fabien Potencier - * - * @final - * - * @deprecated since Symfony 5.4, use SessionListener instead - */ -class TestSessionListener extends AbstractTestSessionListener -{ - private $container; - - public function __construct(ContainerInterface $container, array $sessionOptions = []) - { - $this->container = $container; - parent::__construct($sessionOptions); - } - - protected function getSession(): ?SessionInterface - { - if ($this->container->has('session')) { - return $this->container->get('session'); - } - - return null; - } -} diff --git a/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php b/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php deleted file mode 100644 index caa0f32..0000000 --- a/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Validates Requests. - * - * @author Magnus Nordlander - * - * @final - */ -class ValidateRequestListener implements EventSubscriberInterface -{ - /** - * Performs the validation. - */ - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - $request = $event->getRequest(); - - if ($request::getTrustedProxies()) { - $request->getClientIps(); - } - - $request->getHost(); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::REQUEST => [ - ['onKernelRequest', 256], - ], - ]; - } -} diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php deleted file mode 100644 index 58680a3..0000000 --- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - * @author Christophe Coevoet - */ -class AccessDeniedHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(403, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php deleted file mode 100644 index f530f7d..0000000 --- a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class BadRequestHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(400, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php deleted file mode 100644 index 79c3604..0000000 --- a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class ConflictHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(409, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php b/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php deleted file mode 100644 index 54c80be..0000000 --- a/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Grégoire Pineau - */ -class ControllerDoesNotReturnResponseException extends \LogicException -{ - public function __construct(string $message, callable $controller, string $file, int $line) - { - parent::__construct($message); - - if (!$controllerDefinition = $this->parseControllerDefinition($controller)) { - return; - } - - $this->file = $controllerDefinition['file']; - $this->line = $controllerDefinition['line']; - $r = new \ReflectionProperty(\Exception::class, 'trace'); - $r->setAccessible(true); - $r->setValue($this, array_merge([ - [ - 'line' => $line, - 'file' => $file, - ], - ], $this->getTrace())); - } - - private function parseControllerDefinition(callable $controller): ?array - { - if (\is_string($controller) && str_contains($controller, '::')) { - $controller = explode('::', $controller); - } - - if (\is_array($controller)) { - try { - $r = new \ReflectionMethod($controller[0], $controller[1]); - - return [ - 'file' => $r->getFileName(), - 'line' => $r->getEndLine(), - ]; - } catch (\ReflectionException $e) { - return null; - } - } - - if ($controller instanceof \Closure) { - $r = new \ReflectionFunction($controller); - - return [ - 'file' => $r->getFileName(), - 'line' => $r->getEndLine(), - ]; - } - - if (\is_object($controller)) { - $r = new \ReflectionClass($controller); - - try { - $line = $r->getMethod('__invoke')->getEndLine(); - } catch (\ReflectionException $e) { - $line = $r->getEndLine(); - } - - return [ - 'file' => $r->getFileName(), - 'line' => $line, - ]; - } - - return null; - } -} diff --git a/vendor/symfony/http-kernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Exception/GoneHttpException.php deleted file mode 100644 index 9ea6505..0000000 --- a/vendor/symfony/http-kernel/Exception/GoneHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class GoneHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(410, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/HttpException.php b/vendor/symfony/http-kernel/Exception/HttpException.php deleted file mode 100644 index 249fe36..0000000 --- a/vendor/symfony/http-kernel/Exception/HttpException.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * HttpException. - * - * @author Kris Wallsmith - */ -class HttpException extends \RuntimeException implements HttpExceptionInterface -{ - private $statusCode; - private $headers; - - public function __construct(int $statusCode, ?string $message = '', \Throwable $previous = null, array $headers = [], ?int $code = 0) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $this->statusCode = $statusCode; - $this->headers = $headers; - - parent::__construct($message, $code, $previous); - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getHeaders() - { - return $this->headers; - } - - /** - * Set response headers. - * - * @param array $headers Response headers - */ - public function setHeaders(array $headers) - { - $this->headers = $headers; - } -} diff --git a/vendor/symfony/http-kernel/Exception/HttpExceptionInterface.php b/vendor/symfony/http-kernel/Exception/HttpExceptionInterface.php deleted file mode 100644 index 4ae0509..0000000 --- a/vendor/symfony/http-kernel/Exception/HttpExceptionInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * Interface for HTTP error exceptions. - * - * @author Kris Wallsmith - */ -interface HttpExceptionInterface extends \Throwable -{ - /** - * Returns the status code. - * - * @return int - */ - public function getStatusCode(); - - /** - * Returns response headers. - * - * @return array - */ - public function getHeaders(); -} diff --git a/vendor/symfony/http-kernel/Exception/InvalidMetadataException.php b/vendor/symfony/http-kernel/Exception/InvalidMetadataException.php deleted file mode 100644 index 129267a..0000000 --- a/vendor/symfony/http-kernel/Exception/InvalidMetadataException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -class InvalidMetadataException extends \LogicException -{ -} diff --git a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php deleted file mode 100644 index fcac137..0000000 --- a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class LengthRequiredHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(411, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php deleted file mode 100644 index 37576bc..0000000 --- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Kris Wallsmith - */ -class MethodNotAllowedHttpException extends HttpException -{ - /** - * @param string[] $allow An array of allowed methods - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct(array $allow, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $headers['Allow'] = strtoupper(implode(', ', $allow)); - - parent::__construct(405, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php deleted file mode 100644 index 5a42240..0000000 --- a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class NotAcceptableHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(406, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php deleted file mode 100644 index a475113..0000000 --- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - */ -class NotFoundHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(404, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php deleted file mode 100644 index e23740a..0000000 --- a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class PreconditionFailedHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(412, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php deleted file mode 100644 index 5c31fae..0000000 --- a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - * - * @see http://tools.ietf.org/html/rfc6585 - */ -class PreconditionRequiredHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(428, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php deleted file mode 100644 index d5681bb..0000000 --- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class ServiceUnavailableHttpException extends HttpException -{ - /** - * @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - if ($retryAfter) { - $headers['Retry-After'] = $retryAfter; - } - - parent::__construct(503, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php deleted file mode 100644 index fd74402..0000000 --- a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - * - * @see http://tools.ietf.org/html/rfc6585 - */ -class TooManyRequestsHttpException extends HttpException -{ - /** - * @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - if ($retryAfter) { - $headers['Retry-After'] = $retryAfter; - } - - parent::__construct(429, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php deleted file mode 100644 index aeb9713..0000000 --- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class UnauthorizedHttpException extends HttpException -{ - /** - * @param string $challenge WWW-Authenticate challenge string - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int|null $code The internal exception code - */ - public function __construct(string $challenge, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - if (null === $code) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__); - - $code = 0; - } - - $headers['WWW-Authenticate'] = $challenge; - - parent::__construct(401, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php b/vendor/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php deleted file mode 100644 index 0145b16..0000000 --- a/vendor/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Mathias Arlaud - */ -class UnexpectedSessionUsageException extends \LogicException -{ -} diff --git a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php deleted file mode 100644 index 7b828b1..0000000 --- a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Steve Hutchins - */ -class UnprocessableEntityHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(422, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php deleted file mode 100644 index 7908423..0000000 --- a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class UnsupportedMediaTypeHttpException extends HttpException -{ - /** - * @param string|null $message The internal exception message - * @param \Throwable|null $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) - { - if (null === $message) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - parent::__construct(415, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php deleted file mode 100644 index d051ad8..0000000 --- a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Implements Surrogate rendering strategy. - * - * @author Fabien Potencier - */ -abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRenderer -{ - private $surrogate; - private $inlineStrategy; - private $signer; - - /** - * The "fallback" strategy when surrogate is not available should always be an - * instance of InlineFragmentRenderer. - * - * @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported - */ - public function __construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null) - { - $this->surrogate = $surrogate; - $this->inlineStrategy = $inlineStrategy; - $this->signer = $signer; - } - - /** - * {@inheritdoc} - * - * Note that if the current Request has no surrogate capability, this method - * falls back to use the inline rendering strategy. - * - * Additional available options: - * - * * alt: an alternative URI to render in case of an error - * * comment: a comment to add when returning the surrogate tag - * - * Note, that not all surrogate strategies support all options. For now - * 'alt' and 'comment' are only supported by ESI. - * - * @see Symfony\Component\HttpKernel\HttpCache\SurrogateInterface - */ - public function render($uri, Request $request, array $options = []) - { - if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { - if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { - throw new \InvalidArgumentException('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is not supported. Use a different rendering strategy or pass scalar values.'); - } - - return $this->inlineStrategy->render($uri, $request, $options); - } - - if ($uri instanceof ControllerReference) { - $uri = $this->generateSignedFragmentUri($uri, $request); - } - - $alt = $options['alt'] ?? null; - if ($alt instanceof ControllerReference) { - $alt = $this->generateSignedFragmentUri($alt, $request); - } - - $tag = $this->surrogate->renderIncludeTag($uri, $alt, $options['ignore_errors'] ?? false, $options['comment'] ?? ''); - - return new Response($tag); - } - - private function generateSignedFragmentUri(ControllerReference $uri, Request $request): string - { - return (new FragmentUriGenerator($this->fragmentPath, $this->signer))->generate($uri, $request); - } - - private function containsNonScalars(array $values): bool - { - foreach ($values as $value) { - if (\is_array($value)) { - return $this->containsNonScalars($value); - } elseif (!is_scalar($value) && null !== $value) { - return true; - } - } - - return false; - } -} diff --git a/vendor/symfony/http-kernel/Fragment/EsiFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/EsiFragmentRenderer.php deleted file mode 100644 index a4570e3..0000000 --- a/vendor/symfony/http-kernel/Fragment/EsiFragmentRenderer.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -/** - * Implements the ESI rendering strategy. - * - * @author Fabien Potencier - */ -class EsiFragmentRenderer extends AbstractSurrogateFragmentRenderer -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'esi'; - } -} diff --git a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php deleted file mode 100644 index 1ecaaef..0000000 --- a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Exception\HttpException; - -/** - * Renders a URI that represents a resource fragment. - * - * This class handles the rendering of resource fragments that are included into - * a main resource. The handling of the rendering is managed by specialized renderers. - * - * @author Fabien Potencier - * - * @see FragmentRendererInterface - */ -class FragmentHandler -{ - private $debug; - private $renderers = []; - private $requestStack; - - /** - * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances - * @param bool $debug Whether the debug mode is enabled or not - */ - public function __construct(RequestStack $requestStack, array $renderers = [], bool $debug = false) - { - $this->requestStack = $requestStack; - foreach ($renderers as $renderer) { - $this->addRenderer($renderer); - } - $this->debug = $debug; - } - - /** - * Adds a renderer. - */ - public function addRenderer(FragmentRendererInterface $renderer) - { - $this->renderers[$renderer->getName()] = $renderer; - } - - /** - * Renders a URI and returns the Response content. - * - * Available options: - * - * * ignore_errors: true to return an empty string in case of an error - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @return string|null - * - * @throws \InvalidArgumentException when the renderer does not exist - * @throws \LogicException when no main request is being handled - */ - public function render($uri, string $renderer = 'inline', array $options = []) - { - if (!isset($options['ignore_errors'])) { - $options['ignore_errors'] = !$this->debug; - } - - if (!isset($this->renderers[$renderer])) { - throw new \InvalidArgumentException(sprintf('The "%s" renderer does not exist.', $renderer)); - } - - if (!$request = $this->requestStack->getCurrentRequest()) { - throw new \LogicException('Rendering a fragment can only be done when handling a Request.'); - } - - return $this->deliver($this->renderers[$renderer]->render($uri, $request, $options)); - } - - /** - * Delivers the Response as a string. - * - * When the Response is a StreamedResponse, the content is streamed immediately - * instead of being returned. - * - * @return string|null The Response content or null when the Response is streamed - * - * @throws \RuntimeException when the Response is not successful - */ - protected function deliver(Response $response) - { - if (!$response->isSuccessful()) { - $responseStatusCode = $response->getStatusCode(); - throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $this->requestStack->getCurrentRequest()->getUri(), $responseStatusCode), 0, new HttpException($responseStatusCode)); - } - - if (!$response instanceof StreamedResponse) { - return $response->getContent(); - } - - $response->sendContent(); - - return null; - } -} diff --git a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php b/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php deleted file mode 100644 index 568b178..0000000 --- a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; - -/** - * Interface implemented by all rendering strategies. - * - * @author Fabien Potencier - */ -interface FragmentRendererInterface -{ - /** - * Renders a URI and returns the Response content. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @return Response - */ - public function render($uri, Request $request, array $options = []); - - /** - * Gets the name of the strategy. - * - * @return string - */ - public function getName(); -} diff --git a/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php b/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php deleted file mode 100644 index dabe304..0000000 --- a/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\UriSigner; - -/** - * Generates a fragment URI. - * - * @author Kévin Dunglas - * @author Fabien Potencier - */ -final class FragmentUriGenerator implements FragmentUriGeneratorInterface -{ - private $fragmentPath; - private $signer; - private $requestStack; - - public function __construct(string $fragmentPath, UriSigner $signer = null, RequestStack $requestStack = null) - { - $this->fragmentPath = $fragmentPath; - $this->signer = $signer; - $this->requestStack = $requestStack; - } - - /** - * {@inheritDoc} - */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string - { - if (null === $request && (null === $this->requestStack || null === $request = $this->requestStack->getCurrentRequest())) { - throw new \LogicException('Generating a fragment URL can only be done when handling a Request.'); - } - - if ($sign && null === $this->signer) { - throw new \LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.'); - } - - if ($strict) { - $this->checkNonScalar($controller->attributes); - } - - // We need to forward the current _format and _locale values as we don't have - // a proper routing pattern to do the job for us. - // This makes things inconsistent if you switch from rendering a controller - // to rendering a route if the route pattern does not contain the special - // _format and _locale placeholders. - if (!isset($controller->attributes['_format'])) { - $controller->attributes['_format'] = $request->getRequestFormat(); - } - if (!isset($controller->attributes['_locale'])) { - $controller->attributes['_locale'] = $request->getLocale(); - } - - $controller->attributes['_controller'] = $controller->controller; - $controller->query['_path'] = http_build_query($controller->attributes, '', '&'); - $path = $this->fragmentPath.'?'.http_build_query($controller->query, '', '&'); - - // we need to sign the absolute URI, but want to return the path only. - $fragmentUri = $sign || $absolute ? $request->getUriForPath($path) : $request->getBaseUrl().$path; - - if (!$sign) { - return $fragmentUri; - } - - $fragmentUri = $this->signer->sign($fragmentUri); - - return $absolute ? $fragmentUri : substr($fragmentUri, \strlen($request->getSchemeAndHttpHost())); - } - - private function checkNonScalar(array $values): void - { - foreach ($values as $key => $value) { - if (\is_array($value)) { - $this->checkNonScalar($value); - } elseif (!is_scalar($value) && null !== $value) { - throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key)); - } - } - } -} diff --git a/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php b/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php deleted file mode 100644 index b211f5e..0000000 --- a/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ControllerReference; - -/** - * Interface implemented by rendering strategies able to generate an URL for a fragment. - * - * @author Kévin Dunglas - */ -interface FragmentUriGeneratorInterface -{ - /** - * Generates a fragment URI for a given controller. - * - * @param bool $absolute Whether to generate an absolute URL or not - * @param bool $strict Whether to allow non-scalar attributes or not - * @param bool $sign Whether to sign the URL or not - */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string; -} diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php deleted file mode 100644 index 446ce2d..0000000 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\UriSigner; -use Twig\Environment; - -/** - * Implements the Hinclude rendering strategy. - * - * @author Fabien Potencier - */ -class HIncludeFragmentRenderer extends RoutableFragmentRenderer -{ - private $globalDefaultTemplate; - private $signer; - private $twig; - private $charset; - - /** - * @param string $globalDefaultTemplate The global default content (it can be a template name or the content) - */ - public function __construct(Environment $twig = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8') - { - $this->twig = $twig; - $this->globalDefaultTemplate = $globalDefaultTemplate; - $this->signer = $signer; - $this->charset = $charset; - } - - /** - * Checks if a templating engine has been set. - * - * @return bool - */ - public function hasTemplating() - { - return null !== $this->twig; - } - - /** - * {@inheritdoc} - * - * Additional available options: - * - * * default: The default content (it can be a template name or the content) - * * id: An optional hx:include tag id attribute - * * attributes: An optional array of hx:include tag attributes - */ - public function render($uri, Request $request, array $options = []) - { - if ($uri instanceof ControllerReference) { - $uri = (new FragmentUriGenerator($this->fragmentPath, $this->signer))->generate($uri, $request); - } - - // We need to replace ampersands in the URI with the encoded form in order to return valid html/xml content. - $uri = str_replace('&', '&', $uri); - - $template = $options['default'] ?? $this->globalDefaultTemplate; - if (null !== $this->twig && $template && $this->twig->getLoader()->exists($template)) { - $content = $this->twig->render($template); - } else { - $content = $template; - } - - $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : []; - if (isset($options['id']) && $options['id']) { - $attributes['id'] = $options['id']; - } - $renderedAttributes = ''; - if (\count($attributes) > 0) { - $flags = \ENT_QUOTES | \ENT_SUBSTITUTE; - foreach ($attributes as $attribute => $value) { - $renderedAttributes .= sprintf( - ' %s="%s"', - htmlspecialchars($attribute, $flags, $this->charset, false), - htmlspecialchars($value, $flags, $this->charset, false) - ); - } - } - - return new Response(sprintf('%s', $uri, $renderedAttributes, $content)); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'hinclude'; - } -} diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php deleted file mode 100644 index ea45fdc..0000000 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\HttpCache\SubRequestHandler; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * Implements the inline rendering strategy where the Request is rendered by the current HTTP kernel. - * - * @author Fabien Potencier - */ -class InlineFragmentRenderer extends RoutableFragmentRenderer -{ - private $kernel; - private $dispatcher; - - public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) - { - $this->kernel = $kernel; - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - * - * Additional available options: - * - * * alt: an alternative URI to render in case of an error - */ - public function render($uri, Request $request, array $options = []) - { - $reference = null; - if ($uri instanceof ControllerReference) { - $reference = $uri; - - // Remove attributes from the generated URI because if not, the Symfony - // routing system will use them to populate the Request attributes. We don't - // want that as we want to preserve objects (so we manually set Request attributes - // below instead) - $attributes = $reference->attributes; - $reference->attributes = []; - - // The request format and locale might have been overridden by the user - foreach (['_format', '_locale'] as $key) { - if (isset($attributes[$key])) { - $reference->attributes[$key] = $attributes[$key]; - } - } - - $uri = $this->generateFragmentUri($uri, $request, false, false); - - $reference->attributes = array_merge($attributes, $reference->attributes); - } - - $subRequest = $this->createSubRequest($uri, $request); - - // override Request attributes as they can be objects (which are not supported by the generated URI) - if (null !== $reference) { - $subRequest->attributes->add($reference->attributes); - } - - $level = ob_get_level(); - try { - return SubRequestHandler::handle($this->kernel, $subRequest, HttpKernelInterface::SUB_REQUEST, false); - } catch (\Exception $e) { - // we dispatch the exception event to trigger the logging - // the response that comes back is ignored - if (isset($options['ignore_errors']) && $options['ignore_errors'] && $this->dispatcher) { - $event = new ExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); - - $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); - } - - // let's clean up the output buffers that were created by the sub-request - Response::closeOutputBuffers($level, false); - - if (isset($options['alt'])) { - $alt = $options['alt']; - unset($options['alt']); - - return $this->render($alt, $request, $options); - } - - if (!isset($options['ignore_errors']) || !$options['ignore_errors']) { - throw $e; - } - - return new Response(); - } - } - - protected function createSubRequest(string $uri, Request $request) - { - $cookies = $request->cookies->all(); - $server = $request->server->all(); - - unset($server['HTTP_IF_MODIFIED_SINCE']); - unset($server['HTTP_IF_NONE_MATCH']); - - $subRequest = Request::create($uri, 'get', [], $cookies, [], $server); - if ($request->headers->has('Surrogate-Capability')) { - $subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability')); - } - - static $setSession; - - if (null === $setSession) { - $setSession = \Closure::bind(static function ($subRequest, $request) { $subRequest->session = $request->session; }, null, Request::class); - } - $setSession($subRequest, $request); - - if ($request->get('_format')) { - $subRequest->attributes->set('_format', $request->get('_format')); - } - if ($request->getDefaultLocale() !== $request->getLocale()) { - $subRequest->setLocale($request->getLocale()); - } - - return $subRequest; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'inline'; - } -} diff --git a/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php deleted file mode 100644 index e922ffb..0000000 --- a/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\EventListener\FragmentListener; - -/** - * Adds the possibility to generate a fragment URI for a given Controller. - * - * @author Fabien Potencier - */ -abstract class RoutableFragmentRenderer implements FragmentRendererInterface -{ - /** - * @internal - */ - protected $fragmentPath = '/_fragment'; - - /** - * Sets the fragment path that triggers the fragment listener. - * - * @see FragmentListener - */ - public function setFragmentPath(string $path) - { - $this->fragmentPath = $path; - } - - /** - * Generates a fragment URI for a given controller. - * - * @param bool $absolute Whether to generate an absolute URL or not - * @param bool $strict Whether to allow non-scalar attributes or not - * - * @return string - */ - protected function generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true) - { - return (new FragmentUriGenerator($this->fragmentPath))->generate($reference, $request, $absolute, $strict, false); - } -} diff --git a/vendor/symfony/http-kernel/Fragment/SsiFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/SsiFragmentRenderer.php deleted file mode 100644 index 45e7122..0000000 --- a/vendor/symfony/http-kernel/Fragment/SsiFragmentRenderer.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Fragment; - -/** - * Implements the SSI rendering strategy. - * - * @author Sebastian Krebs - */ -class SsiFragmentRenderer extends AbstractSurrogateFragmentRenderer -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'ssi'; - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php deleted file mode 100644 index 3384805..0000000 --- a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * Abstract class implementing Surrogate capabilities to Request and Response instances. - * - * @author Fabien Potencier - * @author Robin Chalas - */ -abstract class AbstractSurrogate implements SurrogateInterface -{ - protected $contentTypes; - protected $phpEscapeMap = [ - ['', '', '', ''], - ]; - - /** - * @param array $contentTypes An array of content-type that should be parsed for Surrogate information - * (default: text/html, text/xml, application/xhtml+xml, and application/xml) - */ - public function __construct(array $contentTypes = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml']) - { - $this->contentTypes = $contentTypes; - } - - /** - * Returns a new cache strategy instance. - * - * @return ResponseCacheStrategyInterface - */ - public function createCacheStrategy() - { - return new ResponseCacheStrategy(); - } - - /** - * {@inheritdoc} - */ - public function hasSurrogateCapability(Request $request) - { - if (null === $value = $request->headers->get('Surrogate-Capability')) { - return false; - } - - return str_contains($value, sprintf('%s/1.0', strtoupper($this->getName()))); - } - - /** - * {@inheritdoc} - */ - public function addSurrogateCapability(Request $request) - { - $current = $request->headers->get('Surrogate-Capability'); - $new = sprintf('symfony="%s/1.0"', strtoupper($this->getName())); - - $request->headers->set('Surrogate-Capability', $current ? $current.', '.$new : $new); - } - - /** - * {@inheritdoc} - */ - public function needsParsing(Response $response) - { - if (!$control = $response->headers->get('Surrogate-Control')) { - return false; - } - - $pattern = sprintf('#content="[^"]*%s/1.0[^"]*"#', strtoupper($this->getName())); - - return (bool) preg_match($pattern, $control); - } - - /** - * {@inheritdoc} - */ - public function handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors) - { - $subRequest = Request::create($uri, Request::METHOD_GET, [], $cache->getRequest()->cookies->all(), [], $cache->getRequest()->server->all()); - - try { - $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); - - if (!$response->isSuccessful()) { - throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $subRequest->getUri(), $response->getStatusCode())); - } - - return $response->getContent(); - } catch (\Exception $e) { - if ($alt) { - return $this->handle($cache, $alt, '', $ignoreErrors); - } - - if (!$ignoreErrors) { - throw $e; - } - } - - return ''; - } - - /** - * Remove the Surrogate from the Surrogate-Control header. - */ - protected function removeFromControl(Response $response) - { - if (!$response->headers->has('Surrogate-Control')) { - return; - } - - $value = $response->headers->get('Surrogate-Control'); - $upperName = strtoupper($this->getName()); - - if (sprintf('content="%s/1.0"', $upperName) == $value) { - $response->headers->remove('Surrogate-Control'); - } elseif (preg_match(sprintf('#,\s*content="%s/1.0"#', $upperName), $value)) { - $response->headers->set('Surrogate-Control', preg_replace(sprintf('#,\s*content="%s/1.0"#', $upperName), '', $value)); - } elseif (preg_match(sprintf('#content="%s/1.0",\s*#', $upperName), $value)) { - $response->headers->set('Surrogate-Control', preg_replace(sprintf('#content="%s/1.0",\s*#', $upperName), '', $value)); - } - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php deleted file mode 100644 index cd6a00a..0000000 --- a/vendor/symfony/http-kernel/HttpCache/Esi.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Esi implements the ESI capabilities to Request and Response instances. - * - * For more information, read the following W3C notes: - * - * * ESI Language Specification 1.0 (http://www.w3.org/TR/esi-lang) - * - * * Edge Architecture Specification (http://www.w3.org/TR/edge-arch) - * - * @author Fabien Potencier - */ -class Esi extends AbstractSurrogate -{ - public function getName() - { - return 'esi'; - } - - /** - * {@inheritdoc} - */ - public function addSurrogateControl(Response $response) - { - if (str_contains($response->getContent(), 'headers->set('Surrogate-Control', 'content="ESI/1.0"'); - } - } - - /** - * {@inheritdoc} - */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '') - { - $html = sprintf('', - $uri, - $ignoreErrors ? ' onerror="continue"' : '', - $alt ? sprintf(' alt="%s"', $alt) : '' - ); - - if (!empty($comment)) { - return sprintf("\n%s", $comment, $html); - } - - return $html; - } - - /** - * {@inheritdoc} - */ - public function process(Request $request, Response $response) - { - $type = $response->headers->get('Content-Type'); - if (empty($type)) { - $type = 'text/html'; - } - - $parts = explode(';', $type); - if (!\in_array($parts[0], $this->contentTypes)) { - return $response; - } - - // we don't use a proper XML parser here as we can have ESI tags in a plain text response - $content = $response->getContent(); - $content = preg_replace('#.*?#s', '', $content); - $content = preg_replace('#]+>#s', '', $content); - - $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); - - $i = 1; - while (isset($chunks[$i])) { - $options = []; - preg_match_all('/(src|onerror|alt)="([^"]*?)"/', $chunks[$i], $matches, \PREG_SET_ORDER); - foreach ($matches as $set) { - $options[$set[1]] = $set[2]; - } - - if (!isset($options['src'])) { - throw new \RuntimeException('Unable to process an ESI tag without a "src" attribute.'); - } - - $chunks[$i] = sprintf('surrogate->handle($this, %s, %s, %s) ?>'."\n", - var_export($options['src'], true), - var_export($options['alt'] ?? '', true), - isset($options['onerror']) && 'continue' === $options['onerror'] ? 'true' : 'false' - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; - } - $content = implode('', $chunks); - - $response->setContent($content); - $response->headers->set('X-Body-Eval', 'ESI'); - - // remove ESI/1.0 from the Surrogate-Control header - $this->removeFromControl($response); - - return $response; - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php deleted file mode 100644 index bf93171..0000000 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ /dev/null @@ -1,737 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\TerminableInterface; - -/** - * Cache provides HTTP caching. - * - * @author Fabien Potencier - */ -class HttpCache implements HttpKernelInterface, TerminableInterface -{ - private $kernel; - private $store; - private $request; - private $surrogate; - private $surrogateCacheStrategy; - private $options = []; - private $traces = []; - - /** - * Constructor. - * - * The available options are: - * - * * debug If true, exceptions are thrown when things go wrong. Otherwise, the cache - * will try to carry on and deliver a meaningful response. - * - * * trace_level May be one of 'none', 'short' and 'full'. For 'short', a concise trace of the - * main request will be added as an HTTP header. 'full' will add traces for all - * requests (including ESI subrequests). (default: 'full' if in debug; 'none' otherwise) - * - * * trace_header Header name to use for traces. (default: X-Symfony-Cache) - * - * * default_ttl The number of seconds that a cache entry should be considered - * fresh when no explicit freshness information is provided in - * a response. Explicit Cache-Control or Expires headers - * override this value. (default: 0) - * - * * private_headers Set of request headers that trigger "private" cache-control behavior - * on responses that don't explicitly state whether the response is - * public or private via a Cache-Control directive. (default: Authorization and Cookie) - * - * * allow_reload Specifies whether the client can force a cache reload by including a - * Cache-Control "no-cache" directive in the request. Set it to ``true`` - * for compliance with RFC 2616. (default: false) - * - * * allow_revalidate Specifies whether the client can force a cache revalidate by including - * a Cache-Control "max-age=0" directive in the request. Set it to ``true`` - * for compliance with RFC 2616. (default: false) - * - * * stale_while_revalidate Specifies the default number of seconds (the granularity is the second as the - * Response TTL precision is a second) during which the cache can immediately return - * a stale response while it revalidates it in the background (default: 2). - * This setting is overridden by the stale-while-revalidate HTTP Cache-Control - * extension (see RFC 5861). - * - * * stale_if_error Specifies the default number of seconds (the granularity is the second) during which - * the cache can serve a stale response when an error is encountered (default: 60). - * This setting is overridden by the stale-if-error HTTP Cache-Control extension - * (see RFC 5861). - */ - public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = []) - { - $this->store = $store; - $this->kernel = $kernel; - $this->surrogate = $surrogate; - - // needed in case there is a fatal error because the backend is too slow to respond - register_shutdown_function([$this->store, 'cleanup']); - - $this->options = array_merge([ - 'debug' => false, - 'default_ttl' => 0, - 'private_headers' => ['Authorization', 'Cookie'], - 'allow_reload' => false, - 'allow_revalidate' => false, - 'stale_while_revalidate' => 2, - 'stale_if_error' => 60, - 'trace_level' => 'none', - 'trace_header' => 'X-Symfony-Cache', - ], $options); - - if (!isset($options['trace_level'])) { - $this->options['trace_level'] = $this->options['debug'] ? 'full' : 'none'; - } - } - - /** - * Gets the current store. - * - * @return StoreInterface - */ - public function getStore() - { - return $this->store; - } - - /** - * Returns an array of events that took place during processing of the last request. - * - * @return array - */ - public function getTraces() - { - return $this->traces; - } - - private function addTraces(Response $response) - { - $traceString = null; - - if ('full' === $this->options['trace_level']) { - $traceString = $this->getLog(); - } - - if ('short' === $this->options['trace_level'] && $masterId = array_key_first($this->traces)) { - $traceString = implode('/', $this->traces[$masterId]); - } - - if (null !== $traceString) { - $response->headers->add([$this->options['trace_header'] => $traceString]); - } - } - - /** - * Returns a log message for the events of the last request processing. - * - * @return string - */ - public function getLog() - { - $log = []; - foreach ($this->traces as $request => $traces) { - $log[] = sprintf('%s: %s', $request, implode(', ', $traces)); - } - - return implode('; ', $log); - } - - /** - * Gets the Request instance associated with the main request. - * - * @return Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Gets the Kernel instance. - * - * @return HttpKernelInterface - */ - public function getKernel() - { - return $this->kernel; - } - - /** - * Gets the Surrogate instance. - * - * @return SurrogateInterface - * - * @throws \LogicException - */ - public function getSurrogate() - { - return $this->surrogate; - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->traces = []; - // Keep a clone of the original request for surrogates so they can access it. - // We must clone here to get a separate instance because the application will modify the request during - // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1 - // and adding the X-Forwarded-For header, see HttpCache::forward()). - $this->request = clone $request; - if (null !== $this->surrogate) { - $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy(); - } - } - - $this->traces[$this->getTraceKey($request)] = []; - - if (!$request->isMethodSafe()) { - $response = $this->invalidate($request, $catch); - } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) { - $response = $this->pass($request, $catch); - } elseif ($this->options['allow_reload'] && $request->isNoCache()) { - /* - If allow_reload is configured and the client requests "Cache-Control: no-cache", - reload the cache by fetching a fresh response and caching it (if possible). - */ - $this->record($request, 'reload'); - $response = $this->fetch($request, $catch); - } else { - $response = $this->lookup($request, $catch); - } - - $this->restoreResponseBody($request, $response); - - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->addTraces($response); - } - - if (null !== $this->surrogate) { - if (HttpKernelInterface::MAIN_REQUEST === $type) { - $this->surrogateCacheStrategy->update($response); - } else { - $this->surrogateCacheStrategy->add($response); - } - } - - $response->prepare($request); - - $response->isNotModified($request); - - return $response; - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - if ($this->getKernel() instanceof TerminableInterface) { - $this->getKernel()->terminate($request, $response); - } - } - - /** - * Forwards the Request to the backend without storing the Response in the cache. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function pass(Request $request, bool $catch = false) - { - $this->record($request, 'pass'); - - return $this->forward($request, $catch); - } - - /** - * Invalidates non-safe methods (like POST, PUT, and DELETE). - * - * @param bool $catch Whether to process exceptions - * - * @return Response - * - * @throws \Exception - * - * @see RFC2616 13.10 - */ - protected function invalidate(Request $request, bool $catch = false) - { - $response = $this->pass($request, $catch); - - // invalidate only when the response is successful - if ($response->isSuccessful() || $response->isRedirect()) { - try { - $this->store->invalidate($request); - - // As per the RFC, invalidate Location and Content-Location URLs if present - foreach (['Location', 'Content-Location'] as $header) { - if ($uri = $response->headers->get($header)) { - $subRequest = Request::create($uri, 'get', [], [], [], $request->server->all()); - - $this->store->invalidate($subRequest); - } - } - - $this->record($request, 'invalidate'); - } catch (\Exception $e) { - $this->record($request, 'invalidate-failed'); - - if ($this->options['debug']) { - throw $e; - } - } - } - - return $response; - } - - /** - * Lookups a Response from the cache for the given Request. - * - * When a matching cache entry is found and is fresh, it uses it as the - * response without forwarding any request to the backend. When a matching - * cache entry is found but is stale, it attempts to "validate" the entry with - * the backend using conditional GET. When no matching cache entry is found, - * it triggers "miss" processing. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - * - * @throws \Exception - */ - protected function lookup(Request $request, bool $catch = false) - { - try { - $entry = $this->store->lookup($request); - } catch (\Exception $e) { - $this->record($request, 'lookup-failed'); - - if ($this->options['debug']) { - throw $e; - } - - return $this->pass($request, $catch); - } - - if (null === $entry) { - $this->record($request, 'miss'); - - return $this->fetch($request, $catch); - } - - if (!$this->isFreshEnough($request, $entry)) { - $this->record($request, 'stale'); - - return $this->validate($request, $entry, $catch); - } - - if ($entry->headers->hasCacheControlDirective('no-cache')) { - return $this->validate($request, $entry, $catch); - } - - $this->record($request, 'fresh'); - - $entry->headers->set('Age', $entry->getAge()); - - return $entry; - } - - /** - * Validates that a cache entry is fresh. - * - * The original request is used as a template for a conditional - * GET request with the backend. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function validate(Request $request, Response $entry, bool $catch = false) - { - $subRequest = clone $request; - - // send no head requests because we want content - if ('HEAD' === $request->getMethod()) { - $subRequest->setMethod('GET'); - } - - // add our cached last-modified validator - if ($entry->headers->has('Last-Modified')) { - $subRequest->headers->set('If-Modified-Since', $entry->headers->get('Last-Modified')); - } - - // Add our cached etag validator to the environment. - // We keep the etags from the client to handle the case when the client - // has a different private valid entry which is not cached here. - $cachedEtags = $entry->getEtag() ? [$entry->getEtag()] : []; - $requestEtags = $request->getETags(); - if ($etags = array_unique(array_merge($cachedEtags, $requestEtags))) { - $subRequest->headers->set('If-None-Match', implode(', ', $etags)); - } - - $response = $this->forward($subRequest, $catch, $entry); - - if (304 == $response->getStatusCode()) { - $this->record($request, 'valid'); - - // return the response and not the cache entry if the response is valid but not cached - $etag = $response->getEtag(); - if ($etag && \in_array($etag, $requestEtags) && !\in_array($etag, $cachedEtags)) { - return $response; - } - - $entry = clone $entry; - $entry->headers->remove('Date'); - - foreach (['Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified'] as $name) { - if ($response->headers->has($name)) { - $entry->headers->set($name, $response->headers->get($name)); - } - } - - $response = $entry; - } else { - $this->record($request, 'invalid'); - } - - if ($response->isCacheable()) { - $this->store($request, $response); - } - - return $response; - } - - /** - * Unconditionally fetches a fresh response from the backend and - * stores it in the cache if is cacheable. - * - * @param bool $catch Whether to process exceptions - * - * @return Response - */ - protected function fetch(Request $request, bool $catch = false) - { - $subRequest = clone $request; - - // send no head requests because we want content - if ('HEAD' === $request->getMethod()) { - $subRequest->setMethod('GET'); - } - - // avoid that the backend sends no content - $subRequest->headers->remove('If-Modified-Since'); - $subRequest->headers->remove('If-None-Match'); - - $response = $this->forward($subRequest, $catch); - - if ($response->isCacheable()) { - $this->store($request, $response); - } - - return $response; - } - - /** - * Forwards the Request to the backend and returns the Response. - * - * All backend requests (cache passes, fetches, cache validations) - * run through this method. - * - * @param bool $catch Whether to catch exceptions or not - * @param Response|null $entry A Response instance (the stale entry if present, null otherwise) - * - * @return Response - */ - protected function forward(Request $request, bool $catch = false, Response $entry = null) - { - if ($this->surrogate) { - $this->surrogate->addSurrogateCapability($request); - } - - // always a "master" request (as the real master request can be in cache) - $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch); - - /* - * Support stale-if-error given on Responses or as a config option. - * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual - * Cache-Control directives) that - * - * A cache MUST NOT generate a stale response if it is prohibited by an - * explicit in-protocol directive (e.g., by a "no-store" or "no-cache" - * cache directive, a "must-revalidate" cache-response-directive, or an - * applicable "s-maxage" or "proxy-revalidate" cache-response-directive; - * see Section 5.2.2). - * - * https://tools.ietf.org/html/rfc7234#section-4.2.4 - * - * We deviate from this in one detail, namely that we *do* serve entries in the - * stale-if-error case even if they have a `s-maxage` Cache-Control directive. - */ - if (null !== $entry - && \in_array($response->getStatusCode(), [500, 502, 503, 504]) - && !$entry->headers->hasCacheControlDirective('no-cache') - && !$entry->mustRevalidate() - ) { - if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { - $age = $this->options['stale_if_error']; - } - - /* - * stale-if-error gives the (extra) time that the Response may be used *after* it has become stale. - * So we compare the time the $entry has been sitting in the cache already with the - * time it was fresh plus the allowed grace period. - */ - if ($entry->getAge() <= $entry->getMaxAge() + $age) { - $this->record($request, 'stale-if-error'); - - return $entry; - } - } - - /* - RFC 7231 Sect. 7.1.1.2 says that a server that does not have a reasonably accurate - clock MUST NOT send a "Date" header, although it MUST send one in most other cases - except for 1xx or 5xx responses where it MAY do so. - - Anyway, a client that received a message without a "Date" header MUST add it. - */ - if (!$response->headers->has('Date')) { - $response->setDate(\DateTime::createFromFormat('U', time())); - } - - $this->processResponseBody($request, $response); - - if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) { - $response->setPrivate(); - } elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) { - $response->setTtl($this->options['default_ttl']); - } - - return $response; - } - - /** - * Checks whether the cache entry is "fresh enough" to satisfy the Request. - * - * @return bool - */ - protected function isFreshEnough(Request $request, Response $entry) - { - if (!$entry->isFresh()) { - return $this->lock($request, $entry); - } - - if ($this->options['allow_revalidate'] && null !== $maxAge = $request->headers->getCacheControlDirective('max-age')) { - return $maxAge > 0 && $maxAge >= $entry->getAge(); - } - - return true; - } - - /** - * Locks a Request during the call to the backend. - * - * @return bool true if the cache entry can be returned even if it is staled, false otherwise - */ - protected function lock(Request $request, Response $entry) - { - // try to acquire a lock to call the backend - $lock = $this->store->lock($request); - - if (true === $lock) { - // we have the lock, call the backend - return false; - } - - // there is already another process calling the backend - - // May we serve a stale response? - if ($this->mayServeStaleWhileRevalidate($entry)) { - $this->record($request, 'stale-while-revalidate'); - - return true; - } - - // wait for the lock to be released - if ($this->waitForLock($request)) { - // replace the current entry with the fresh one - $new = $this->lookup($request); - $entry->headers = $new->headers; - $entry->setContent($new->getContent()); - $entry->setStatusCode($new->getStatusCode()); - $entry->setProtocolVersion($new->getProtocolVersion()); - foreach ($new->headers->getCookies() as $cookie) { - $entry->headers->setCookie($cookie); - } - } else { - // backend is slow as hell, send a 503 response (to avoid the dog pile effect) - $entry->setStatusCode(503); - $entry->setContent('503 Service Unavailable'); - $entry->headers->set('Retry-After', 10); - } - - return true; - } - - /** - * Writes the Response to the cache. - * - * @throws \Exception - */ - protected function store(Request $request, Response $response) - { - try { - $this->store->write($request, $response); - - $this->record($request, 'store'); - - $response->headers->set('Age', $response->getAge()); - } catch (\Exception $e) { - $this->record($request, 'store-failed'); - - if ($this->options['debug']) { - throw $e; - } - } - - // now that the response is cached, release the lock - $this->store->unlock($request); - } - - /** - * Restores the Response body. - */ - private function restoreResponseBody(Request $request, Response $response) - { - if ($response->headers->has('X-Body-Eval')) { - ob_start(); - - if ($response->headers->has('X-Body-File')) { - include $response->headers->get('X-Body-File'); - } else { - eval('; ?>'.$response->getContent().'setContent(ob_get_clean()); - $response->headers->remove('X-Body-Eval'); - if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', \strlen($response->getContent())); - } - } elseif ($response->headers->has('X-Body-File')) { - // Response does not include possibly dynamic content (ESI, SSI), so we need - // not handle the content for HEAD requests - if (!$request->isMethod('HEAD')) { - $response->setContent(file_get_contents($response->headers->get('X-Body-File'))); - } - } else { - return; - } - - $response->headers->remove('X-Body-File'); - } - - protected function processResponseBody(Request $request, Response $response) - { - if (null !== $this->surrogate && $this->surrogate->needsParsing($response)) { - $this->surrogate->process($request, $response); - } - } - - /** - * Checks if the Request includes authorization or other sensitive information - * that should cause the Response to be considered private by default. - */ - private function isPrivateRequest(Request $request): bool - { - foreach ($this->options['private_headers'] as $key) { - $key = strtolower(str_replace('HTTP_', '', $key)); - - if ('cookie' === $key) { - if (\count($request->cookies->all())) { - return true; - } - } elseif ($request->headers->has($key)) { - return true; - } - } - - return false; - } - - /** - * Records that an event took place. - */ - private function record(Request $request, string $event) - { - $this->traces[$this->getTraceKey($request)][] = $event; - } - - /** - * Calculates the key we use in the "trace" array for a given request. - */ - private function getTraceKey(Request $request): string - { - $path = $request->getPathInfo(); - if ($qs = $request->getQueryString()) { - $path .= '?'.$qs; - } - - return $request->getMethod().' '.$path; - } - - /** - * Checks whether the given (cached) response may be served as "stale" when a revalidation - * is currently in progress. - */ - private function mayServeStaleWhileRevalidate(Response $entry): bool - { - $timeout = $entry->headers->getCacheControlDirective('stale-while-revalidate'); - - if (null === $timeout) { - $timeout = $this->options['stale_while_revalidate']; - } - - return abs($entry->getTtl()) < $timeout; - } - - /** - * Waits for the store to release a locked entry. - */ - private function waitForLock(Request $request): bool - { - $wait = 0; - while ($this->store->isLocked($request) && $wait < 100) { - usleep(50000); - ++$wait; - } - - return $wait < 100; - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php deleted file mode 100644 index cf86822..0000000 --- a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Response; - -/** - * ResponseCacheStrategy knows how to compute the Response cache HTTP header - * based on the different response cache headers. - * - * This implementation changes the main response TTL to the smallest TTL received - * or force validation if one of the surrogates has validation cache strategy. - * - * @author Fabien Potencier - */ -class ResponseCacheStrategy implements ResponseCacheStrategyInterface -{ - /** - * Cache-Control headers that are sent to the final response if they appear in ANY of the responses. - */ - private const OVERRIDE_DIRECTIVES = ['private', 'no-cache', 'no-store', 'no-transform', 'must-revalidate', 'proxy-revalidate']; - - /** - * Cache-Control headers that are sent to the final response if they appear in ALL of the responses. - */ - private const INHERIT_DIRECTIVES = ['public', 'immutable']; - - private $embeddedResponses = 0; - private $isNotCacheableResponseEmbedded = false; - private $age = 0; - private $flagDirectives = [ - 'no-cache' => null, - 'no-store' => null, - 'no-transform' => null, - 'must-revalidate' => null, - 'proxy-revalidate' => null, - 'public' => null, - 'private' => null, - 'immutable' => null, - ]; - private $ageDirectives = [ - 'max-age' => null, - 's-maxage' => null, - 'expires' => null, - ]; - - /** - * {@inheritdoc} - */ - public function add(Response $response) - { - ++$this->embeddedResponses; - - foreach (self::OVERRIDE_DIRECTIVES as $directive) { - if ($response->headers->hasCacheControlDirective($directive)) { - $this->flagDirectives[$directive] = true; - } - } - - foreach (self::INHERIT_DIRECTIVES as $directive) { - if (false !== $this->flagDirectives[$directive]) { - $this->flagDirectives[$directive] = $response->headers->hasCacheControlDirective($directive); - } - } - - $age = $response->getAge(); - $this->age = max($this->age, $age); - - if ($this->willMakeFinalResponseUncacheable($response)) { - $this->isNotCacheableResponseEmbedded = true; - - return; - } - - $isHeuristicallyCacheable = $response->headers->hasCacheControlDirective('public'); - $maxAge = $response->headers->hasCacheControlDirective('max-age') ? (int) $response->headers->getCacheControlDirective('max-age') : null; - $this->storeRelativeAgeDirective('max-age', $maxAge, $age, $isHeuristicallyCacheable); - $sharedMaxAge = $response->headers->hasCacheControlDirective('s-maxage') ? (int) $response->headers->getCacheControlDirective('s-maxage') : $maxAge; - $this->storeRelativeAgeDirective('s-maxage', $sharedMaxAge, $age, $isHeuristicallyCacheable); - - $expires = $response->getExpires(); - $expires = null !== $expires ? (int) $expires->format('U') - (int) $response->getDate()->format('U') : null; - $this->storeRelativeAgeDirective('expires', $expires >= 0 ? $expires : null, 0, $isHeuristicallyCacheable); - } - - /** - * {@inheritdoc} - */ - public function update(Response $response) - { - // if we have no embedded Response, do nothing - if (0 === $this->embeddedResponses) { - return; - } - - // Remove validation related headers of the master response, - // because some of the response content comes from at least - // one embedded response (which likely has a different caching strategy). - $response->setEtag(null); - $response->setLastModified(null); - - $this->add($response); - - $response->headers->set('Age', $this->age); - - if ($this->isNotCacheableResponseEmbedded) { - if ($this->flagDirectives['no-store']) { - $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); - } else { - $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); - } - - return; - } - - $flags = array_filter($this->flagDirectives); - - if (isset($flags['must-revalidate'])) { - $flags['no-cache'] = true; - } - - $response->headers->set('Cache-Control', implode(', ', array_keys($flags))); - - $maxAge = null; - - if (is_numeric($this->ageDirectives['max-age'])) { - $maxAge = $this->ageDirectives['max-age'] + $this->age; - $response->headers->addCacheControlDirective('max-age', $maxAge); - } - - if (is_numeric($this->ageDirectives['s-maxage'])) { - $sMaxage = $this->ageDirectives['s-maxage'] + $this->age; - - if ($maxAge !== $sMaxage) { - $response->headers->addCacheControlDirective('s-maxage', $sMaxage); - } - } - - if (is_numeric($this->ageDirectives['expires'])) { - $date = clone $response->getDate(); - $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); - $response->setExpires($date); - } - } - - /** - * RFC2616, Section 13.4. - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4 - */ - private function willMakeFinalResponseUncacheable(Response $response): bool - { - // RFC2616: A response received with a status code of 200, 203, 300, 301 or 410 - // MAY be stored by a cache […] unless a cache-control directive prohibits caching. - if ($response->headers->hasCacheControlDirective('no-cache') - || $response->headers->getCacheControlDirective('no-store') - ) { - return true; - } - - // Last-Modified and Etag headers cannot be merged, they render the response uncacheable - // by default (except if the response also has max-age etc.). - if (\in_array($response->getStatusCode(), [200, 203, 300, 301, 410]) - && null === $response->getLastModified() - && null === $response->getEtag() - ) { - return false; - } - - // RFC2616: A response received with any other status code (e.g. status codes 302 and 307) - // MUST NOT be returned in a reply to a subsequent request unless there are - // cache-control directives or another header(s) that explicitly allow it. - $cacheControl = ['max-age', 's-maxage', 'must-revalidate', 'proxy-revalidate', 'public', 'private']; - foreach ($cacheControl as $key) { - if ($response->headers->hasCacheControlDirective($key)) { - return false; - } - } - - if ($response->headers->has('Expires')) { - return false; - } - - return true; - } - - /** - * Store lowest max-age/s-maxage/expires for the final response. - * - * The response might have been stored in cache a while ago. To keep things comparable, - * we have to subtract the age so that the value is normalized for an age of 0. - * - * If the value is lower than the currently stored value, we update the value, to keep a rolling - * minimal value of each instruction. - * - * If the value is NULL and the isHeuristicallyCacheable parameter is false, the directive will - * not be set on the final response. In this case, not all responses had the directive set and no - * value can be found that satisfies the requirements of all responses. The directive will be dropped - * from the final response. - * - * If the isHeuristicallyCacheable parameter is true, however, the current response has been marked - * as cacheable in a public (shared) cache, but did not provide an explicit lifetime that would serve - * as an upper bound. In this case, we can proceed and possibly keep the directive on the final response. - */ - private function storeRelativeAgeDirective(string $directive, ?int $value, int $age, bool $isHeuristicallyCacheable) - { - if (null === $value) { - if ($isHeuristicallyCacheable) { - /* - * See https://datatracker.ietf.org/doc/html/rfc7234#section-4.2.2 - * This particular response does not require maximum lifetime; heuristics might be applied. - * Other responses, however, might have more stringent requirements on maximum lifetime. - * So, return early here so that the final response can have the more limiting value set. - */ - return; - } - $this->ageDirectives[$directive] = false; - } - - if (false !== $this->ageDirectives[$directive]) { - $value -= $age; - $this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value; - } - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php deleted file mode 100644 index e282299..0000000 --- a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Response; - -/** - * ResponseCacheStrategyInterface implementations know how to compute the - * Response cache HTTP header based on the different response cache headers. - * - * @author Fabien Potencier - */ -interface ResponseCacheStrategyInterface -{ - /** - * Adds a Response. - */ - public function add(Response $response); - - /** - * Updates the Response HTTP headers based on the embedded Responses. - */ - public function update(Response $response); -} diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php deleted file mode 100644 index f114e05..0000000 --- a/vendor/symfony/http-kernel/HttpCache/Ssi.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Ssi implements the SSI capabilities to Request and Response instances. - * - * @author Sebastian Krebs - */ -class Ssi extends AbstractSurrogate -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'ssi'; - } - - /** - * {@inheritdoc} - */ - public function addSurrogateControl(Response $response) - { - if (str_contains($response->getContent(), '', $uri); - } - - /** - * {@inheritdoc} - */ - public function process(Request $request, Response $response) - { - $type = $response->headers->get('Content-Type'); - if (empty($type)) { - $type = 'text/html'; - } - - $parts = explode(';', $type); - if (!\in_array($parts[0], $this->contentTypes)) { - return $response; - } - - // we don't use a proper XML parser here as we can have SSI tags in a plain text response - $content = $response->getContent(); - - $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); - - $i = 1; - while (isset($chunks[$i])) { - $options = []; - preg_match_all('/(virtual)="([^"]*?)"/', $chunks[$i], $matches, \PREG_SET_ORDER); - foreach ($matches as $set) { - $options[$set[1]] = $set[2]; - } - - if (!isset($options['virtual'])) { - throw new \RuntimeException('Unable to process an SSI tag without a "virtual" attribute.'); - } - - $chunks[$i] = sprintf('surrogate->handle($this, %s, \'\', false) ?>'."\n", - var_export($options['virtual'], true) - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; - } - $content = implode('', $chunks); - - $response->setContent($content); - $response->headers->set('X-Body-Eval', 'SSI'); - - // remove SSI/1.0 from the Surrogate-Control header - $this->removeFromControl($response); - - return $response; - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php deleted file mode 100644 index c777391..0000000 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ /dev/null @@ -1,474 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Store implements all the logic for storing cache metadata (Request and Response headers). - * - * @author Fabien Potencier - */ -class Store implements StoreInterface -{ - protected $root; - /** @var \SplObjectStorage */ - private $keyCache; - /** @var array */ - private $locks = []; - - /** - * @throws \RuntimeException - */ - public function __construct(string $root) - { - $this->root = $root; - if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { - throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); - } - $this->keyCache = new \SplObjectStorage(); - } - - /** - * Cleanups storage. - */ - public function cleanup() - { - // unlock everything - foreach ($this->locks as $lock) { - flock($lock, \LOCK_UN); - fclose($lock); - } - - $this->locks = []; - } - - /** - * Tries to lock the cache for a given Request, without blocking. - * - * @return bool|string true if the lock is acquired, the path to the current lock otherwise - */ - public function lock(Request $request) - { - $key = $this->getCacheKey($request); - - if (!isset($this->locks[$key])) { - $path = $this->getPath($key); - if (!is_dir(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { - return $path; - } - $h = fopen($path, 'c'); - if (!flock($h, \LOCK_EX | \LOCK_NB)) { - fclose($h); - - return $path; - } - - $this->locks[$key] = $h; - } - - return true; - } - - /** - * Releases the lock for the given Request. - * - * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise - */ - public function unlock(Request $request) - { - $key = $this->getCacheKey($request); - - if (isset($this->locks[$key])) { - flock($this->locks[$key], \LOCK_UN); - fclose($this->locks[$key]); - unset($this->locks[$key]); - - return true; - } - - return false; - } - - public function isLocked(Request $request) - { - $key = $this->getCacheKey($request); - - if (isset($this->locks[$key])) { - return true; // shortcut if lock held by this process - } - - if (!is_file($path = $this->getPath($key))) { - return false; - } - - $h = fopen($path, 'r'); - flock($h, \LOCK_EX | \LOCK_NB, $wouldBlock); - flock($h, \LOCK_UN); // release the lock we just acquired - fclose($h); - - return (bool) $wouldBlock; - } - - /** - * Locates a cached Response for the Request provided. - * - * @return Response|null - */ - public function lookup(Request $request) - { - $key = $this->getCacheKey($request); - - if (!$entries = $this->getMetadata($key)) { - return null; - } - - // find a cached entry that matches the request. - $match = null; - foreach ($entries as $entry) { - if ($this->requestsMatch(isset($entry[1]['vary'][0]) ? implode(', ', $entry[1]['vary']) : '', $request->headers->all(), $entry[0])) { - $match = $entry; - - break; - } - } - - if (null === $match) { - return null; - } - - $headers = $match[1]; - if (file_exists($path = $this->getPath($headers['x-content-digest'][0]))) { - return $this->restoreResponse($headers, $path); - } - - // TODO the metaStore referenced an entity that doesn't exist in - // the entityStore. We definitely want to return nil but we should - // also purge the entry from the meta-store when this is detected. - return null; - } - - /** - * Writes a cache entry to the store for the given Request and Response. - * - * Existing entries are read and any that match the response are removed. This - * method calls write with the new list of cache entries. - * - * @return string - * - * @throws \RuntimeException - */ - public function write(Request $request, Response $response) - { - $key = $this->getCacheKey($request); - $storedEnv = $this->persistRequest($request); - - if ($response->headers->has('X-Body-File')) { - // Assume the response came from disk, but at least perform some safeguard checks - if (!$response->headers->has('X-Content-Digest')) { - throw new \RuntimeException('A restored response must have the X-Content-Digest header.'); - } - - $digest = $response->headers->get('X-Content-Digest'); - if ($this->getPath($digest) !== $response->headers->get('X-Body-File')) { - throw new \RuntimeException('X-Body-File and X-Content-Digest do not match.'); - } - // Everything seems ok, omit writing content to disk - } else { - $digest = $this->generateContentDigest($response); - $response->headers->set('X-Content-Digest', $digest); - - if (!$this->save($digest, $response->getContent(), false)) { - throw new \RuntimeException('Unable to store the entity.'); - } - - if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', \strlen($response->getContent())); - } - } - - // read existing cache entries, remove non-varying, and add this one to the list - $entries = []; - $vary = $response->headers->get('vary'); - foreach ($this->getMetadata($key) as $entry) { - if (!isset($entry[1]['vary'][0])) { - $entry[1]['vary'] = ['']; - } - - if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary ?? '', $entry[0], $storedEnv)) { - $entries[] = $entry; - } - } - - $headers = $this->persistResponse($response); - unset($headers['age']); - - array_unshift($entries, [$storedEnv, $headers]); - - if (!$this->save($key, serialize($entries))) { - throw new \RuntimeException('Unable to store the metadata.'); - } - - return $key; - } - - /** - * Returns content digest for $response. - * - * @return string - */ - protected function generateContentDigest(Response $response) - { - return 'en'.hash('sha256', $response->getContent()); - } - - /** - * Invalidates all cache entries that match the request. - * - * @throws \RuntimeException - */ - public function invalidate(Request $request) - { - $modified = false; - $key = $this->getCacheKey($request); - - $entries = []; - foreach ($this->getMetadata($key) as $entry) { - $response = $this->restoreResponse($entry[1]); - if ($response->isFresh()) { - $response->expire(); - $modified = true; - $entries[] = [$entry[0], $this->persistResponse($response)]; - } else { - $entries[] = $entry; - } - } - - if ($modified && !$this->save($key, serialize($entries))) { - throw new \RuntimeException('Unable to store the metadata.'); - } - } - - /** - * Determines whether two Request HTTP header sets are non-varying based on - * the vary response header value provided. - * - * @param string|null $vary A Response vary header - * @param array $env1 A Request HTTP header array - * @param array $env2 A Request HTTP header array - */ - private function requestsMatch(?string $vary, array $env1, array $env2): bool - { - if (empty($vary)) { - return true; - } - - foreach (preg_split('/[\s,]+/', $vary) as $header) { - $key = str_replace('_', '-', strtolower($header)); - $v1 = $env1[$key] ?? null; - $v2 = $env2[$key] ?? null; - if ($v1 !== $v2) { - return false; - } - } - - return true; - } - - /** - * Gets all data associated with the given key. - * - * Use this method only if you know what you are doing. - */ - private function getMetadata(string $key): array - { - if (!$entries = $this->load($key)) { - return []; - } - - return unserialize($entries) ?: []; - } - - /** - * Purges data for the given URL. - * - * This method purges both the HTTP and the HTTPS version of the cache entry. - * - * @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise - */ - public function purge(string $url) - { - $http = preg_replace('#^https:#', 'http:', $url); - $https = preg_replace('#^http:#', 'https:', $url); - - $purgedHttp = $this->doPurge($http); - $purgedHttps = $this->doPurge($https); - - return $purgedHttp || $purgedHttps; - } - - /** - * Purges data for the given URL. - */ - private function doPurge(string $url): bool - { - $key = $this->getCacheKey(Request::create($url)); - if (isset($this->locks[$key])) { - flock($this->locks[$key], \LOCK_UN); - fclose($this->locks[$key]); - unset($this->locks[$key]); - } - - if (is_file($path = $this->getPath($key))) { - unlink($path); - - return true; - } - - return false; - } - - /** - * Loads data for the given key. - */ - private function load(string $key): ?string - { - $path = $this->getPath($key); - - return is_file($path) && false !== ($contents = @file_get_contents($path)) ? $contents : null; - } - - /** - * Save data for the given key. - */ - private function save(string $key, string $data, bool $overwrite = true): bool - { - $path = $this->getPath($key); - - if (!$overwrite && file_exists($path)) { - return true; - } - - if (isset($this->locks[$key])) { - $fp = $this->locks[$key]; - @ftruncate($fp, 0); - @fseek($fp, 0); - $len = @fwrite($fp, $data); - if (\strlen($data) !== $len) { - @ftruncate($fp, 0); - - return false; - } - } else { - if (!is_dir(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { - return false; - } - - $tmpFile = tempnam(\dirname($path), basename($path)); - if (false === $fp = @fopen($tmpFile, 'w')) { - @unlink($tmpFile); - - return false; - } - @fwrite($fp, $data); - @fclose($fp); - - if ($data != file_get_contents($tmpFile)) { - @unlink($tmpFile); - - return false; - } - - if (false === @rename($tmpFile, $path)) { - @unlink($tmpFile); - - return false; - } - } - - @chmod($path, 0666 & ~umask()); - - return true; - } - - public function getPath(string $key) - { - return $this->root.\DIRECTORY_SEPARATOR.substr($key, 0, 2).\DIRECTORY_SEPARATOR.substr($key, 2, 2).\DIRECTORY_SEPARATOR.substr($key, 4, 2).\DIRECTORY_SEPARATOR.substr($key, 6); - } - - /** - * Generates a cache key for the given Request. - * - * This method should return a key that must only depend on a - * normalized version of the request URI. - * - * If the same URI can have more than one representation, based on some - * headers, use a Vary header to indicate them, and each representation will - * be stored independently under the same cache key. - * - * @return string - */ - protected function generateCacheKey(Request $request) - { - return 'md'.hash('sha256', $request->getUri()); - } - - /** - * Returns a cache key for the given Request. - */ - private function getCacheKey(Request $request): string - { - if (isset($this->keyCache[$request])) { - return $this->keyCache[$request]; - } - - return $this->keyCache[$request] = $this->generateCacheKey($request); - } - - /** - * Persists the Request HTTP headers. - */ - private function persistRequest(Request $request): array - { - return $request->headers->all(); - } - - /** - * Persists the Response HTTP headers. - */ - private function persistResponse(Response $response): array - { - $headers = $response->headers->all(); - $headers['X-Status'] = [$response->getStatusCode()]; - - return $headers; - } - - /** - * Restores a Response from the HTTP headers and body. - */ - private function restoreResponse(array $headers, string $path = null): Response - { - $status = $headers['X-Status'][0]; - unset($headers['X-Status']); - - if (null !== $path) { - $headers['X-Body-File'] = [$path]; - } - - return new Response($path, $status, $headers); - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/StoreInterface.php b/vendor/symfony/http-kernel/HttpCache/StoreInterface.php deleted file mode 100644 index 3d07ef3..0000000 --- a/vendor/symfony/http-kernel/HttpCache/StoreInterface.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Interface implemented by HTTP cache stores. - * - * @author Fabien Potencier - */ -interface StoreInterface -{ - /** - * Locates a cached Response for the Request provided. - * - * @return Response|null - */ - public function lookup(Request $request); - - /** - * Writes a cache entry to the store for the given Request and Response. - * - * Existing entries are read and any that match the response are removed. This - * method calls write with the new list of cache entries. - * - * @return string The key under which the response is stored - */ - public function write(Request $request, Response $response); - - /** - * Invalidates all cache entries that match the request. - */ - public function invalidate(Request $request); - - /** - * Locks the cache for a given Request. - * - * @return bool|string true if the lock is acquired, the path to the current lock otherwise - */ - public function lock(Request $request); - - /** - * Releases the lock for the given Request. - * - * @return bool False if the lock file does not exist or cannot be unlocked, true otherwise - */ - public function unlock(Request $request); - - /** - * Returns whether or not a lock exists. - * - * @return bool true if lock exists, false otherwise - */ - public function isLocked(Request $request); - - /** - * Purges data for the given URL. - * - * @return bool true if the URL exists and has been purged, false otherwise - */ - public function purge(string $url); - - /** - * Cleanups storage. - */ - public function cleanup(); -} diff --git a/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php b/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php deleted file mode 100644 index 253071f..0000000 --- a/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\IpUtils; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class SubRequestHandler -{ - public static function handle(HttpKernelInterface $kernel, Request $request, int $type, bool $catch): Response - { - // save global state related to trusted headers and proxies - $trustedProxies = Request::getTrustedProxies(); - $trustedHeaderSet = Request::getTrustedHeaderSet(); - - // remove untrusted values - $remoteAddr = $request->server->get('REMOTE_ADDR'); - if (!$remoteAddr || !IpUtils::checkIp($remoteAddr, $trustedProxies)) { - $trustedHeaders = [ - 'FORWARDED' => $trustedHeaderSet & Request::HEADER_FORWARDED, - 'X_FORWARDED_FOR' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_FOR, - 'X_FORWARDED_HOST' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_HOST, - 'X_FORWARDED_PROTO' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PROTO, - 'X_FORWARDED_PORT' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PORT, - 'X_FORWARDED_PREFIX' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PREFIX, - ]; - foreach (array_filter($trustedHeaders) as $name => $key) { - $request->headers->remove($name); - $request->server->remove('HTTP_'.$name); - } - } - - // compute trusted values, taking any trusted proxies into account - $trustedIps = []; - $trustedValues = []; - foreach (array_reverse($request->getClientIps()) as $ip) { - $trustedIps[] = $ip; - $trustedValues[] = sprintf('for="%s"', $ip); - } - if ($ip !== $remoteAddr) { - $trustedIps[] = $remoteAddr; - $trustedValues[] = sprintf('for="%s"', $remoteAddr); - } - - // set trusted values, reusing as much as possible the global trusted settings - if (Request::HEADER_FORWARDED & $trustedHeaderSet) { - $trustedValues[0] .= sprintf(';host="%s";proto=%s', $request->getHttpHost(), $request->getScheme()); - $request->headers->set('Forwarded', $v = implode(', ', $trustedValues)); - $request->server->set('HTTP_FORWARDED', $v); - } - if (Request::HEADER_X_FORWARDED_FOR & $trustedHeaderSet) { - $request->headers->set('X-Forwarded-For', $v = implode(', ', $trustedIps)); - $request->server->set('HTTP_X_FORWARDED_FOR', $v); - } elseif (!(Request::HEADER_FORWARDED & $trustedHeaderSet)) { - Request::setTrustedProxies($trustedProxies, $trustedHeaderSet | Request::HEADER_X_FORWARDED_FOR); - $request->headers->set('X-Forwarded-For', $v = implode(', ', $trustedIps)); - $request->server->set('HTTP_X_FORWARDED_FOR', $v); - } - - // fix the client IP address by setting it to 127.0.0.1, - // which is the core responsibility of this method - $request->server->set('REMOTE_ADDR', '127.0.0.1'); - - // ensure 127.0.0.1 is set as trusted proxy - if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) { - Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet()); - } - - try { - return $kernel->handle($request, $type, $catch); - } finally { - // restore global state - Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); - } - } -} diff --git a/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php b/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php deleted file mode 100644 index 3f3c74a..0000000 --- a/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\HttpCache; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -interface SurrogateInterface -{ - /** - * Returns surrogate name. - * - * @return string - */ - public function getName(); - - /** - * Returns a new cache strategy instance. - * - * @return ResponseCacheStrategyInterface - */ - public function createCacheStrategy(); - - /** - * Checks that at least one surrogate has Surrogate capability. - * - * @return bool - */ - public function hasSurrogateCapability(Request $request); - - /** - * Adds Surrogate-capability to the given Request. - */ - public function addSurrogateCapability(Request $request); - - /** - * Adds HTTP headers to specify that the Response needs to be parsed for Surrogate. - * - * This method only adds an Surrogate HTTP header if the Response has some Surrogate tags. - */ - public function addSurrogateControl(Response $response); - - /** - * Checks that the Response needs to be parsed for Surrogate tags. - * - * @return bool - */ - public function needsParsing(Response $response); - - /** - * Renders a Surrogate tag. - * - * @param string $alt An alternate URI - * @param string $comment A comment to add as an esi:include tag - * - * @return string - */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = ''); - - /** - * Replaces a Response Surrogate tags with the included resource content. - * - * @return Response - */ - public function process(Request $request, Response $response); - - /** - * Handles a Surrogate from the cache. - * - * @param string $alt An alternative URI - * - * @return string - * - * @throws \RuntimeException - * @throws \Exception - */ - public function handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors); -} diff --git a/vendor/symfony/http-kernel/HttpClientKernel.php b/vendor/symfony/http-kernel/HttpClientKernel.php deleted file mode 100644 index 58ca82e..0000000 --- a/vendor/symfony/http-kernel/HttpClientKernel.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; -use Symfony\Component\Mime\Part\AbstractPart; -use Symfony\Component\Mime\Part\DataPart; -use Symfony\Component\Mime\Part\Multipart\FormDataPart; -use Symfony\Component\Mime\Part\TextPart; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ResponseHeaderBag::class); - -/** - * An implementation of a Symfony HTTP kernel using a "real" HTTP client. - * - * @author Fabien Potencier - */ -final class HttpClientKernel implements HttpKernelInterface -{ - private $client; - - public function __construct(HttpClientInterface $client = null) - { - if (null === $client && !class_exists(HttpClient::class)) { - throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__)); - } - - $this->client = $client ?? HttpClient::create(); - } - - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response - { - $headers = $this->getHeaders($request); - $body = ''; - if (null !== $part = $this->getBody($request)) { - $headers = array_merge($headers, $part->getPreparedHeaders()->toArray()); - $body = $part->bodyToIterable(); - } - $response = $this->client->request($request->getMethod(), $request->getUri(), [ - 'headers' => $headers, - 'body' => $body, - ] + $request->attributes->get('http_client_options', [])); - - $response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch)); - - $response->headers->remove('X-Body-File'); - $response->headers->remove('X-Body-Eval'); - $response->headers->remove('X-Content-Digest'); - - $response->headers = new class($response->headers->all()) extends ResponseHeaderBag { - protected function computeCacheControlValue(): string - { - return $this->getCacheControlHeader(); // preserve the original value - } - }; - - return $response; - } - - private function getBody(Request $request): ?AbstractPart - { - if (\in_array($request->getMethod(), ['GET', 'HEAD'])) { - return null; - } - - if (!class_exists(AbstractPart::class)) { - throw new \LogicException('You cannot pass non-empty bodies as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - if ($content = $request->getContent()) { - return new TextPart($content, 'utf-8', 'plain', '8bit'); - } - - $fields = $request->request->all(); - foreach ($request->files->all() as $name => $file) { - $fields[$name] = DataPart::fromPath($file->getPathname(), $file->getClientOriginalName(), $file->getClientMimeType()); - } - - return new FormDataPart($fields); - } - - private function getHeaders(Request $request): array - { - $headers = []; - foreach ($request->headers as $key => $value) { - $headers[$key] = $value; - } - $cookies = []; - foreach ($request->cookies->all() as $name => $value) { - $cookies[] = $name.'='.$value; - } - if ($cookies) { - $headers['cookie'] = implode('; ', $cookies); - } - - return $headers; - } -} diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php deleted file mode 100644 index e10e683..0000000 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver; -use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; -use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\Event\ViewEvent; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ControllerArgumentsEvent::class); -class_exists(ControllerEvent::class); -class_exists(ExceptionEvent::class); -class_exists(FinishRequestEvent::class); -class_exists(RequestEvent::class); -class_exists(ResponseEvent::class); -class_exists(TerminateEvent::class); -class_exists(ViewEvent::class); -class_exists(KernelEvents::class); - -/** - * HttpKernel notifies events to convert a Request object to a Response one. - * - * @author Fabien Potencier - */ -class HttpKernel implements HttpKernelInterface, TerminableInterface -{ - protected $dispatcher; - protected $resolver; - protected $requestStack; - private $argumentResolver; - - public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null, ArgumentResolverInterface $argumentResolver = null) - { - $this->dispatcher = $dispatcher; - $this->resolver = $resolver; - $this->requestStack = $requestStack ?? new RequestStack(); - $this->argumentResolver = $argumentResolver ?? new ArgumentResolver(); - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); - - try { - return $this->handleRaw($request, $type); - } catch (\Exception $e) { - if ($e instanceof RequestExceptionInterface) { - $e = new BadRequestHttpException($e->getMessage(), $e); - } - if (false === $catch) { - $this->finishRequest($request, $type); - - throw $e; - } - - return $this->handleThrowable($e, $request, $type); - } - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - $this->dispatcher->dispatch(new TerminateEvent($this, $request, $response), KernelEvents::TERMINATE); - } - - /** - * @internal - */ - public function terminateWithException(\Throwable $exception, Request $request = null) - { - if (!$request = $request ?: $this->requestStack->getMainRequest()) { - throw $exception; - } - - $response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST); - - $response->sendHeaders(); - $response->sendContent(); - - $this->terminate($request, $response); - } - - /** - * Handles a request to convert it to a response. - * - * Exceptions are not caught. - * - * @throws \LogicException If one of the listener does not behave as expected - * @throws NotFoundHttpException When controller cannot be found - */ - private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response - { - $this->requestStack->push($request); - - // request - $event = new RequestEvent($this, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::REQUEST); - - if ($event->hasResponse()) { - return $this->filterResponse($event->getResponse(), $request, $type); - } - - // load controller - if (false === $controller = $this->resolver->getController($request)) { - throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo())); - } - - $event = new ControllerEvent($this, $controller, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER); - $controller = $event->getController(); - - // controller arguments - $arguments = $this->argumentResolver->getArguments($request, $controller); - - $event = new ControllerArgumentsEvent($this, $controller, $arguments, $request, $type); - $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); - $controller = $event->getController(); - $arguments = $event->getArguments(); - - // call controller - $response = $controller(...$arguments); - - // view - if (!$response instanceof Response) { - $event = new ViewEvent($this, $request, $type, $response); - $this->dispatcher->dispatch($event, KernelEvents::VIEW); - - if ($event->hasResponse()) { - $response = $event->getResponse(); - } else { - $msg = sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.', $this->varToString($response)); - - // the user may have forgotten to return something - if (null === $response) { - $msg .= ' Did you forget to add a return statement somewhere in your controller?'; - } - - throw new ControllerDoesNotReturnResponseException($msg, $controller, __FILE__, __LINE__ - 17); - } - } - - return $this->filterResponse($response, $request, $type); - } - - /** - * Filters a response object. - * - * @throws \RuntimeException if the passed object is not a Response instance - */ - private function filterResponse(Response $response, Request $request, int $type): Response - { - $event = new ResponseEvent($this, $request, $type, $response); - - $this->dispatcher->dispatch($event, KernelEvents::RESPONSE); - - $this->finishRequest($request, $type); - - return $event->getResponse(); - } - - /** - * Publishes the finish request event, then pop the request from the stack. - * - * Note that the order of the operations is important here, otherwise - * operations such as {@link RequestStack::getParentRequest()} can lead to - * weird results. - */ - private function finishRequest(Request $request, int $type) - { - $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); - $this->requestStack->pop(); - } - - /** - * Handles a throwable by trying to convert it to a Response. - * - * @throws \Exception - */ - private function handleThrowable(\Throwable $e, Request $request, int $type): Response - { - $event = new ExceptionEvent($this, $request, $type, $e); - $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); - - // a listener might have replaced the exception - $e = $event->getThrowable(); - - if (!$event->hasResponse()) { - $this->finishRequest($request, $type); - - throw $e; - } - - $response = $event->getResponse(); - - // the developer asked for a specific status code - if (!$event->isAllowingCustomResponseCode() && !$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) { - // ensure that we actually have an error response - if ($e instanceof HttpExceptionInterface) { - // keep the HTTP status code and headers - $response->setStatusCode($e->getStatusCode()); - $response->headers->add($e->getHeaders()); - } else { - $response->setStatusCode(500); - } - } - - try { - return $this->filterResponse($response, $request, $type); - } catch (\Exception $e) { - return $response; - } - } - - /** - * Returns a human-readable string for the specified variable. - */ - private function varToString($var): string - { - if (\is_object($var)) { - return sprintf('an object of type %s', \get_class($var)); - } - - if (\is_array($var)) { - $a = []; - foreach ($var as $k => $v) { - $a[] = sprintf('%s => ...', $k); - } - - return sprintf('an array ([%s])', mb_substr(implode(', ', $a), 0, 255)); - } - - if (\is_resource($var)) { - return sprintf('a resource (%s)', get_resource_type($var)); - } - - if (null === $var) { - return 'null'; - } - - if (false === $var) { - return 'a boolean value (false)'; - } - - if (true === $var) { - return 'a boolean value (true)'; - } - - if (\is_string($var)) { - return sprintf('a string ("%s%s")', mb_substr($var, 0, 255), mb_strlen($var) > 255 ? '...' : ''); - } - - if (is_numeric($var)) { - return sprintf('a number (%s)', (string) $var); - } - - return (string) $var; - } -} diff --git a/vendor/symfony/http-kernel/HttpKernelBrowser.php b/vendor/symfony/http-kernel/HttpKernelBrowser.php deleted file mode 100644 index 643134f..0000000 --- a/vendor/symfony/http-kernel/HttpKernelBrowser.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\BrowserKit\AbstractBrowser; -use Symfony\Component\BrowserKit\CookieJar; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\BrowserKit\Request as DomRequest; -use Symfony\Component\BrowserKit\Response as DomResponse; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Simulates a browser and makes requests to an HttpKernel instance. - * - * @author Fabien Potencier - * - * @method Request getRequest() - * @method Response getResponse() - */ -class HttpKernelBrowser extends AbstractBrowser -{ - protected $kernel; - private $catchExceptions = true; - - /** - * @param array $server The server parameters (equivalent of $_SERVER) - */ - public function __construct(HttpKernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) - { - // These class properties must be set before calling the parent constructor, as it may depend on it. - $this->kernel = $kernel; - $this->followRedirects = false; - - parent::__construct($server, $history, $cookieJar); - } - - /** - * Sets whether to catch exceptions when the kernel is handling a request. - */ - public function catchExceptions(bool $catchExceptions) - { - $this->catchExceptions = $catchExceptions; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return Response - */ - protected function doRequest(object $request) - { - $response = $this->kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, $this->catchExceptions); - - if ($this->kernel instanceof TerminableInterface) { - $this->kernel->terminate($request, $response); - } - - return $response; - } - - /** - * {@inheritdoc} - * - * @param Request $request - * - * @return string - */ - protected function getScript(object $request) - { - $kernel = var_export(serialize($this->kernel), true); - $request = var_export(serialize($request), true); - - $errorReporting = error_reporting(); - - $requires = ''; - foreach (get_declared_classes() as $class) { - if (0 === strpos($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $file = \dirname($r->getFileName(), 2).'/autoload.php'; - if (file_exists($file)) { - $requires .= 'require_once '.var_export($file, true).";\n"; - } - } - } - - if (!$requires) { - throw new \RuntimeException('Composer autoloader not found.'); - } - - $code = <<getHandleScript(); - } - - protected function getHandleScript() - { - return <<<'EOF' -$response = $kernel->handle($request); - -if ($kernel instanceof Symfony\Component\HttpKernel\TerminableInterface) { - $kernel->terminate($request, $response); -} - -echo serialize($response); -EOF; - } - - /** - * {@inheritdoc} - * - * @return Request - */ - protected function filterRequest(DomRequest $request) - { - $httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $server = $request->getServer(), $request->getContent()); - if (!isset($server['HTTP_ACCEPT'])) { - $httpRequest->headers->remove('Accept'); - } - - foreach ($this->filterFiles($httpRequest->files->all()) as $key => $value) { - $httpRequest->files->set($key, $value); - } - - return $httpRequest; - } - - /** - * Filters an array of files. - * - * This method created test instances of UploadedFile so that the move() - * method can be called on those instances. - * - * If the size of a file is greater than the allowed size (from php.ini) then - * an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE. - * - * @see UploadedFile - * - * @return array - */ - protected function filterFiles(array $files) - { - $filtered = []; - foreach ($files as $key => $value) { - if (\is_array($value)) { - $filtered[$key] = $this->filterFiles($value); - } elseif ($value instanceof UploadedFile) { - if ($value->isValid() && $value->getSize() > UploadedFile::getMaxFilesize()) { - $filtered[$key] = new UploadedFile( - '', - $value->getClientOriginalName(), - $value->getClientMimeType(), - \UPLOAD_ERR_INI_SIZE, - true - ); - } else { - $filtered[$key] = new UploadedFile( - $value->getPathname(), - $value->getClientOriginalName(), - $value->getClientMimeType(), - $value->getError(), - true - ); - } - } - } - - return $filtered; - } - - /** - * {@inheritdoc} - * - * @param Response $response - * - * @return DomResponse - */ - protected function filterResponse(object $response) - { - // this is needed to support StreamedResponse - ob_start(); - $response->sendContent(); - $content = ob_get_clean(); - - return new DomResponse($content, $response->getStatusCode(), $response->headers->all()); - } -} diff --git a/vendor/symfony/http-kernel/HttpKernelInterface.php b/vendor/symfony/http-kernel/HttpKernelInterface.php deleted file mode 100644 index 0449240..0000000 --- a/vendor/symfony/http-kernel/HttpKernelInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * HttpKernelInterface handles a Request to convert it to a Response. - * - * @author Fabien Potencier - */ -interface HttpKernelInterface -{ - public const MAIN_REQUEST = 1; - public const SUB_REQUEST = 2; - - /** - * @deprecated since symfony/http-kernel 5.3, use MAIN_REQUEST instead. - * To ease the migration, this constant won't be removed until Symfony 7.0. - */ - public const MASTER_REQUEST = self::MAIN_REQUEST; - - /** - * Handles a Request to convert it to a Response. - * - * When $catch is true, the implementation must catch all exceptions - * and do its best to convert them to a Response instance. - * - * @param int $type The type of the request - * (one of HttpKernelInterface::MAIN_REQUEST or HttpKernelInterface::SUB_REQUEST) - * @param bool $catch Whether to catch exceptions or not - * - * @return Response - * - * @throws \Exception When an Exception occurs during processing - */ - public function handle(Request $request, int $type = self::MAIN_REQUEST, bool $catch = true); -} diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php deleted file mode 100644 index f84f09f..0000000 --- a/vendor/symfony/http-kernel/Kernel.php +++ /dev/null @@ -1,883 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; -use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\Debug\DebugClassLoader as LegacyDebugClassLoader; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Dumper\PhpDumper; -use Symfony\Component\DependencyInjection\Dumper\Preloader; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\ClosureLoader; -use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; -use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; -use Symfony\Component\DependencyInjection\Loader\IniFileLoader; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\HttpKernel\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass; -use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; - -// Help opcache.preload discover always-needed symbols -class_exists(ConfigCache::class); - -/** - * The Kernel is the heart of the Symfony system. - * - * It manages an environment made of bundles. - * - * Environment names must always start with a letter and - * they must only contain letters and numbers. - * - * @author Fabien Potencier - */ -abstract class Kernel implements KernelInterface, RebootableInterface, TerminableInterface -{ - /** - * @var array - */ - protected $bundles = []; - - protected $container; - protected $environment; - protected $debug; - protected $booted = false; - protected $startTime; - - private $projectDir; - private $warmupDir; - private $requestStackSize = 0; - private $resetServices = false; - - /** - * @var array - */ - private static $freshCache = []; - - public const VERSION = '5.4.7'; - public const VERSION_ID = 50407; - public const MAJOR_VERSION = 5; - public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 7; - public const EXTRA_VERSION = ''; - - public const END_OF_MAINTENANCE = '11/2024'; - public const END_OF_LIFE = '11/2025'; - - public function __construct(string $environment, bool $debug) - { - if (!$this->environment = $environment) { - throw new \InvalidArgumentException(sprintf('Invalid environment provided to "%s": the environment cannot be empty.', get_debug_type($this))); - } - - $this->debug = $debug; - } - - public function __clone() - { - $this->booted = false; - $this->container = null; - $this->requestStackSize = 0; - $this->resetServices = false; - } - - /** - * {@inheritdoc} - */ - public function boot() - { - if (true === $this->booted) { - if (!$this->requestStackSize && $this->resetServices) { - if ($this->container->has('services_resetter')) { - $this->container->get('services_resetter')->reset(); - } - $this->resetServices = false; - if ($this->debug) { - $this->startTime = microtime(true); - } - } - - return; - } - - if (null === $this->container) { - $this->preBoot(); - } - - foreach ($this->getBundles() as $bundle) { - $bundle->setContainer($this->container); - $bundle->boot(); - } - - $this->booted = true; - } - - /** - * {@inheritdoc} - */ - public function reboot(?string $warmupDir) - { - $this->shutdown(); - $this->warmupDir = $warmupDir; - $this->boot(); - } - - /** - * {@inheritdoc} - */ - public function terminate(Request $request, Response $response) - { - if (false === $this->booted) { - return; - } - - if ($this->getHttpKernel() instanceof TerminableInterface) { - $this->getHttpKernel()->terminate($request, $response); - } - } - - /** - * {@inheritdoc} - */ - public function shutdown() - { - if (false === $this->booted) { - return; - } - - $this->booted = false; - - foreach ($this->getBundles() as $bundle) { - $bundle->shutdown(); - $bundle->setContainer(null); - } - - $this->container = null; - $this->requestStackSize = 0; - $this->resetServices = false; - } - - /** - * {@inheritdoc} - */ - public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) - { - if (!$this->booted) { - $container = $this->container ?? $this->preBoot(); - - if ($container->has('http_cache')) { - return $container->get('http_cache')->handle($request, $type, $catch); - } - } - - $this->boot(); - ++$this->requestStackSize; - $this->resetServices = true; - - try { - return $this->getHttpKernel()->handle($request, $type, $catch); - } finally { - --$this->requestStackSize; - } - } - - /** - * Gets an HTTP kernel from the container. - * - * @return HttpKernelInterface - */ - protected function getHttpKernel() - { - return $this->container->get('http_kernel'); - } - - /** - * {@inheritdoc} - */ - public function getBundles() - { - return $this->bundles; - } - - /** - * {@inheritdoc} - */ - public function getBundle(string $name) - { - if (!isset($this->bundles[$name])) { - throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the "registerBundles()" method of your "%s.php" file?', $name, get_debug_type($this))); - } - - return $this->bundles[$name]; - } - - /** - * {@inheritdoc} - */ - public function locateResource(string $name) - { - if ('@' !== $name[0]) { - throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name)); - } - - if (str_contains($name, '..')) { - throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name)); - } - - $bundleName = substr($name, 1); - $path = ''; - if (str_contains($bundleName, '/')) { - [$bundleName, $path] = explode('/', $bundleName, 2); - } - - $bundle = $this->getBundle($bundleName); - if (file_exists($file = $bundle->getPath().'/'.$path)) { - return $file; - } - - throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); - } - - /** - * {@inheritdoc} - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * {@inheritdoc} - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Gets the application root dir (path of the project's composer file). - * - * @return string - */ - public function getProjectDir() - { - if (null === $this->projectDir) { - $r = new \ReflectionObject($this); - - if (!is_file($dir = $r->getFileName())) { - throw new \LogicException(sprintf('Cannot auto-detect project dir for kernel of class "%s".', $r->name)); - } - - $dir = $rootDir = \dirname($dir); - while (!is_file($dir.'/composer.json')) { - if ($dir === \dirname($dir)) { - return $this->projectDir = $rootDir; - } - $dir = \dirname($dir); - } - $this->projectDir = $dir; - } - - return $this->projectDir; - } - - /** - * {@inheritdoc} - */ - public function getContainer() - { - if (!$this->container) { - throw new \LogicException('Cannot retrieve the container from a non-booted kernel.'); - } - - return $this->container; - } - - /** - * @internal - */ - public function setAnnotatedClassCache(array $annotatedClasses) - { - file_put_contents(($this->warmupDir ?: $this->getBuildDir()).'/annotations.map', sprintf('debug && null !== $this->startTime ? $this->startTime : -\INF; - } - - /** - * {@inheritdoc} - */ - public function getCacheDir() - { - return $this->getProjectDir().'/var/cache/'.$this->environment; - } - - /** - * {@inheritdoc} - */ - public function getBuildDir(): string - { - // Returns $this->getCacheDir() for backward compatibility - return $this->getCacheDir(); - } - - /** - * {@inheritdoc} - */ - public function getLogDir() - { - return $this->getProjectDir().'/var/log'; - } - - /** - * {@inheritdoc} - */ - public function getCharset() - { - return 'UTF-8'; - } - - /** - * Gets the patterns defining the classes to parse and cache for annotations. - */ - public function getAnnotatedClassesToCompile(): array - { - return []; - } - - /** - * Initializes bundles. - * - * @throws \LogicException if two bundles share a common name - */ - protected function initializeBundles() - { - // init bundles - $this->bundles = []; - foreach ($this->registerBundles() as $bundle) { - $name = $bundle->getName(); - if (isset($this->bundles[$name])) { - throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s".', $name)); - } - $this->bundles[$name] = $bundle; - } - } - - /** - * The extension point similar to the Bundle::build() method. - * - * Use this method to register compiler passes and manipulate the container during the building process. - */ - protected function build(ContainerBuilder $container) - { - } - - /** - * Gets the container class. - * - * @throws \InvalidArgumentException If the generated classname is invalid - * - * @return string - */ - protected function getContainerClass() - { - $class = static::class; - $class = str_contains($class, "@anonymous\0") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class; - $class = str_replace('\\', '_', $class).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container'; - - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $class)) { - throw new \InvalidArgumentException(sprintf('The environment "%s" contains invalid characters, it can only contain characters allowed in PHP class names.', $this->environment)); - } - - return $class; - } - - /** - * Gets the container's base class. - * - * All names except Container must be fully qualified. - * - * @return string - */ - protected function getContainerBaseClass() - { - return 'Container'; - } - - /** - * Initializes the service container. - * - * The built version of the service container is used when fresh, otherwise the - * container is built. - */ - protected function initializeContainer() - { - $class = $this->getContainerClass(); - $buildDir = $this->warmupDir ?: $this->getBuildDir(); - $cache = new ConfigCache($buildDir.'/'.$class.'.php', $this->debug); - $cachePath = $cache->getPath(); - - // Silence E_WARNING to ignore "include" failures - don't use "@" to prevent silencing fatal errors - $errorLevel = error_reporting(\E_ALL ^ \E_WARNING); - - try { - if (is_file($cachePath) && \is_object($this->container = include $cachePath) - && (!$this->debug || (self::$freshCache[$cachePath] ?? $cache->isFresh())) - ) { - self::$freshCache[$cachePath] = true; - $this->container->set('kernel', $this); - error_reporting($errorLevel); - - return; - } - } catch (\Throwable $e) { - } - - $oldContainer = \is_object($this->container) ? new \ReflectionClass($this->container) : $this->container = null; - - try { - is_dir($buildDir) ?: mkdir($buildDir, 0777, true); - - if ($lock = fopen($cachePath.'.lock', 'w')) { - flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); - - if (!flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) { - fclose($lock); - $lock = null; - } elseif (!is_file($cachePath) || !\is_object($this->container = include $cachePath)) { - $this->container = null; - } elseif (!$oldContainer || \get_class($this->container) !== $oldContainer->name) { - flock($lock, \LOCK_UN); - fclose($lock); - $this->container->set('kernel', $this); - - return; - } - } - } catch (\Throwable $e) { - } finally { - error_reporting($errorLevel); - } - - if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) { - $collectedLogs = []; - $previousHandler = set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { - if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type) { - return $previousHandler ? $previousHandler($type, $message, $file, $line) : false; - } - - if (isset($collectedLogs[$message])) { - ++$collectedLogs[$message]['count']; - - return null; - } - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 5); - // Clean the trace by removing first frames added by the error handler itself. - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (!isset($backtrace[$i]['file'], $backtrace[$i]['line'], $backtrace[$i]['function'])) { - continue; - } - if (!isset($backtrace[$i]['class']) && 'trigger_deprecation' === $backtrace[$i]['function']) { - $file = $backtrace[$i]['file']; - $line = $backtrace[$i]['line']; - $backtrace = \array_slice($backtrace, 1 + $i); - break; - } - } - - // Remove frames added by DebugClassLoader. - for ($i = \count($backtrace) - 2; 0 < $i; --$i) { - if (\in_array($backtrace[$i]['class'] ?? null, [DebugClassLoader::class, LegacyDebugClassLoader::class], true)) { - $backtrace = [$backtrace[$i + 1]]; - break; - } - } - - $collectedLogs[$message] = [ - 'type' => $type, - 'message' => $message, - 'file' => $file, - 'line' => $line, - 'trace' => [$backtrace[0]], - 'count' => 1, - ]; - - return null; - }); - } - - try { - $container = null; - $container = $this->buildContainer(); - $container->compile(); - } finally { - if ($collectDeprecations) { - restore_error_handler(); - - @file_put_contents($buildDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs))); - @file_put_contents($buildDir.'/'.$class.'Compiler.log', null !== $container ? implode("\n", $container->getCompiler()->getLog()) : ''); - } - } - - $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); - - if ($lock) { - flock($lock, \LOCK_UN); - fclose($lock); - } - - $this->container = require $cachePath; - $this->container->set('kernel', $this); - - if ($oldContainer && \get_class($this->container) !== $oldContainer->name) { - // Because concurrent requests might still be using them, - // old container files are not removed immediately, - // but on a next dump of the container. - static $legacyContainers = []; - $oldContainerDir = \dirname($oldContainer->getFileName()); - $legacyContainers[$oldContainerDir.'.legacy'] = true; - foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy', \GLOB_NOSORT) as $legacyContainer) { - if (!isset($legacyContainers[$legacyContainer]) && @unlink($legacyContainer)) { - (new Filesystem())->remove(substr($legacyContainer, 0, -7)); - } - } - - touch($oldContainerDir.'.legacy'); - } - - $preload = $this instanceof WarmableInterface ? (array) $this->warmUp($this->container->getParameter('kernel.cache_dir')) : []; - - if ($this->container->has('cache_warmer')) { - $preload = array_merge($preload, (array) $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'))); - } - - if ($preload && method_exists(Preloader::class, 'append') && file_exists($preloadFile = $buildDir.'/'.$class.'.preload.php')) { - Preloader::append($preloadFile, $preload); - } - } - - /** - * Returns the kernel parameters. - * - * @return array - */ - protected function getKernelParameters() - { - $bundles = []; - $bundlesMetadata = []; - - foreach ($this->bundles as $name => $bundle) { - $bundles[$name] = \get_class($bundle); - $bundlesMetadata[$name] = [ - 'path' => $bundle->getPath(), - 'namespace' => $bundle->getNamespace(), - ]; - } - - return [ - 'kernel.project_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(), - 'kernel.environment' => $this->environment, - 'kernel.runtime_environment' => '%env(default:kernel.environment:APP_RUNTIME_ENV)%', - 'kernel.debug' => $this->debug, - 'kernel.build_dir' => realpath($buildDir = $this->warmupDir ?: $this->getBuildDir()) ?: $buildDir, - 'kernel.cache_dir' => realpath($cacheDir = ($this->getCacheDir() === $this->getBuildDir() ? ($this->warmupDir ?: $this->getCacheDir()) : $this->getCacheDir())) ?: $cacheDir, - 'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(), - 'kernel.bundles' => $bundles, - 'kernel.bundles_metadata' => $bundlesMetadata, - 'kernel.charset' => $this->getCharset(), - 'kernel.container_class' => $this->getContainerClass(), - ]; - } - - /** - * Builds the service container. - * - * @return ContainerBuilder - * - * @throws \RuntimeException - */ - protected function buildContainer() - { - foreach (['cache' => $this->getCacheDir(), 'build' => $this->warmupDir ?: $this->getBuildDir(), 'logs' => $this->getLogDir()] as $name => $dir) { - if (!is_dir($dir)) { - if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the "%s" directory (%s).', $name, $dir)); - } - } elseif (!is_writable($dir)) { - throw new \RuntimeException(sprintf('Unable to write in the "%s" directory (%s).', $name, $dir)); - } - } - - $container = $this->getContainerBuilder(); - $container->addObjectResource($this); - $this->prepareContainer($container); - - if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) { - trigger_deprecation('symfony/http-kernel', '5.3', 'Returning a ContainerBuilder from "%s::registerContainerConfiguration()" is deprecated.', get_debug_type($this)); - $container->merge($cont); - } - - $container->addCompilerPass(new AddAnnotatedClassesToCachePass($this)); - - return $container; - } - - /** - * Prepares the ContainerBuilder before it is compiled. - */ - protected function prepareContainer(ContainerBuilder $container) - { - $extensions = []; - foreach ($this->bundles as $bundle) { - if ($extension = $bundle->getContainerExtension()) { - $container->registerExtension($extension); - } - - if ($this->debug) { - $container->addObjectResource($bundle); - } - } - - foreach ($this->bundles as $bundle) { - $bundle->build($container); - } - - $this->build($container); - - foreach ($container->getExtensions() as $extension) { - $extensions[] = $extension->getAlias(); - } - - // ensure these extensions are implicitly loaded - $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions)); - } - - /** - * Gets a new ContainerBuilder instance used to build the service container. - * - * @return ContainerBuilder - */ - protected function getContainerBuilder() - { - $container = new ContainerBuilder(); - $container->getParameterBag()->add($this->getKernelParameters()); - - if ($this instanceof ExtensionInterface) { - $container->registerExtension($this); - } - if ($this instanceof CompilerPassInterface) { - $container->addCompilerPass($this, PassConfig::TYPE_BEFORE_OPTIMIZATION, -10000); - } - if (class_exists(\ProxyManager\Configuration::class) && class_exists(RuntimeInstantiator::class)) { - $container->setProxyInstantiator(new RuntimeInstantiator()); - } - - return $container; - } - - /** - * Dumps the service container to PHP code in the cache. - * - * @param string $class The name of the class to generate - * @param string $baseClass The name of the container's base class - */ - protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass) - { - // cache the container - $dumper = new PhpDumper($container); - - if (class_exists(\ProxyManager\Configuration::class) && class_exists(ProxyDumper::class)) { - $dumper->setProxyDumper(new ProxyDumper()); - } - - $content = $dumper->dump([ - 'class' => $class, - 'base_class' => $baseClass, - 'file' => $cache->getPath(), - 'as_files' => true, - 'debug' => $this->debug, - 'build_time' => $container->hasParameter('kernel.container_build_time') ? $container->getParameter('kernel.container_build_time') : time(), - 'preload_classes' => array_map('get_class', $this->bundles), - ]); - - $rootCode = array_pop($content); - $dir = \dirname($cache->getPath()).'/'; - $fs = new Filesystem(); - - foreach ($content as $file => $code) { - $fs->dumpFile($dir.$file, $code); - @chmod($dir.$file, 0666 & ~umask()); - } - $legacyFile = \dirname($dir.key($content)).'.legacy'; - if (is_file($legacyFile)) { - @unlink($legacyFile); - } - - $cache->write($rootCode, $container->getResources()); - } - - /** - * Returns a loader for the container. - * - * @return DelegatingLoader - */ - protected function getContainerLoader(ContainerInterface $container) - { - $env = $this->getEnvironment(); - $locator = new FileLocator($this); - $resolver = new LoaderResolver([ - new XmlFileLoader($container, $locator, $env), - new YamlFileLoader($container, $locator, $env), - new IniFileLoader($container, $locator, $env), - new PhpFileLoader($container, $locator, $env, class_exists(ConfigBuilderGenerator::class) ? new ConfigBuilderGenerator($this->getBuildDir()) : null), - new GlobFileLoader($container, $locator, $env), - new DirectoryLoader($container, $locator, $env), - new ClosureLoader($container, $env), - ]); - - return new DelegatingLoader($resolver); - } - - private function preBoot(): ContainerInterface - { - if ($this->debug) { - $this->startTime = microtime(true); - } - if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) { - putenv('SHELL_VERBOSITY=3'); - $_ENV['SHELL_VERBOSITY'] = 3; - $_SERVER['SHELL_VERBOSITY'] = 3; - } - - $this->initializeBundles(); - $this->initializeContainer(); - - $container = $this->container; - - if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts = $container->getParameter('kernel.trusted_hosts')) { - Request::setTrustedHosts($trustedHosts); - } - - if ($container->hasParameter('kernel.trusted_proxies') && $container->hasParameter('kernel.trusted_headers') && $trustedProxies = $container->getParameter('kernel.trusted_proxies')) { - Request::setTrustedProxies(\is_array($trustedProxies) ? $trustedProxies : array_map('trim', explode(',', $trustedProxies)), $container->getParameter('kernel.trusted_headers')); - } - - return $container; - } - - /** - * Removes comments from a PHP source string. - * - * We don't use the PHP php_strip_whitespace() function - * as we want the content to be readable and well-formatted. - * - * @return string - */ - public static function stripComments(string $source) - { - if (!\function_exists('token_get_all')) { - return $source; - } - - $rawChunk = ''; - $output = ''; - $tokens = token_get_all($source); - $ignoreSpace = false; - for ($i = 0; isset($tokens[$i]); ++$i) { - $token = $tokens[$i]; - if (!isset($token[1]) || 'b"' === $token) { - $rawChunk .= $token; - } elseif (\T_START_HEREDOC === $token[0]) { - $output .= $rawChunk.$token[1]; - do { - $token = $tokens[++$i]; - $output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token; - } while (\T_END_HEREDOC !== $token[0]); - $rawChunk = ''; - } elseif (\T_WHITESPACE === $token[0]) { - if ($ignoreSpace) { - $ignoreSpace = false; - - continue; - } - - // replace multiple new lines with a single newline - $rawChunk .= preg_replace(['/\n{2,}/S'], "\n", $token[1]); - } elseif (\in_array($token[0], [\T_COMMENT, \T_DOC_COMMENT])) { - if (!\in_array($rawChunk[\strlen($rawChunk) - 1], [' ', "\n", "\r", "\t"], true)) { - $rawChunk .= ' '; - } - $ignoreSpace = true; - } else { - $rawChunk .= $token[1]; - - // The PHP-open tag already has a new-line - if (\T_OPEN_TAG === $token[0]) { - $ignoreSpace = true; - } else { - $ignoreSpace = false; - } - } - } - - $output .= $rawChunk; - - unset($tokens, $rawChunk); - gc_mem_caches(); - - return $output; - } - - /** - * @return array - */ - public function __sleep() - { - return ['environment', 'debug']; - } - - public function __wakeup() - { - if (\is_object($this->environment) || \is_object($this->debug)) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - $this->__construct($this->environment, $this->debug); - } -} diff --git a/vendor/symfony/http-kernel/KernelEvents.php b/vendor/symfony/http-kernel/KernelEvents.php deleted file mode 100644 index 3d47f60..0000000 --- a/vendor/symfony/http-kernel/KernelEvents.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\ControllerEvent; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\Event\TerminateEvent; -use Symfony\Component\HttpKernel\Event\ViewEvent; - -/** - * Contains all events thrown in the HttpKernel component. - * - * @author Bernhard Schussek - */ -final class KernelEvents -{ - /** - * The REQUEST event occurs at the very beginning of request - * dispatching. - * - * This event allows you to create a response for a request before any - * other code in the framework is executed. - * - * @Event("Symfony\Component\HttpKernel\Event\RequestEvent") - */ - public const REQUEST = 'kernel.request'; - - /** - * The EXCEPTION event occurs when an uncaught exception appears. - * - * This event allows you to create a response for a thrown exception or - * to modify the thrown exception. - * - * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") - */ - public const EXCEPTION = 'kernel.exception'; - - /** - * The CONTROLLER event occurs once a controller was found for - * handling a request. - * - * This event allows you to change the controller that will handle the - * request. - * - * @Event("Symfony\Component\HttpKernel\Event\ControllerEvent") - */ - public const CONTROLLER = 'kernel.controller'; - - /** - * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved. - * - * This event allows you to change the arguments that will be passed to - * the controller. - * - * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") - */ - public const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; - - /** - * The VIEW event occurs when the return value of a controller - * is not a Response instance. - * - * This event allows you to create a response for the return value of the - * controller. - * - * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") - */ - public const VIEW = 'kernel.view'; - - /** - * The RESPONSE event occurs once a response was created for - * replying to a request. - * - * This event allows you to modify or replace the response that will be - * replied. - * - * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") - */ - public const RESPONSE = 'kernel.response'; - - /** - * The FINISH_REQUEST event occurs when a response was generated for a request. - * - * This event allows you to reset the global and environmental state of - * the application, when it was changed during the request. - * - * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") - */ - public const FINISH_REQUEST = 'kernel.finish_request'; - - /** - * The TERMINATE event occurs once a response was sent. - * - * This event allows you to run expensive post-response jobs. - * - * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") - */ - public const TERMINATE = 'kernel.terminate'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - ControllerArgumentsEvent::class => self::CONTROLLER_ARGUMENTS, - ControllerEvent::class => self::CONTROLLER, - ResponseEvent::class => self::RESPONSE, - FinishRequestEvent::class => self::FINISH_REQUEST, - RequestEvent::class => self::REQUEST, - ViewEvent::class => self::VIEW, - ExceptionEvent::class => self::EXCEPTION, - TerminateEvent::class => self::TERMINATE, - ]; -} diff --git a/vendor/symfony/http-kernel/KernelInterface.php b/vendor/symfony/http-kernel/KernelInterface.php deleted file mode 100644 index 41135a6..0000000 --- a/vendor/symfony/http-kernel/KernelInterface.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpKernel\Bundle\BundleInterface; - -/** - * The Kernel is the heart of the Symfony system. - * - * It manages an environment made of application kernel and bundles. - * - * @method string getBuildDir() Returns the build directory - not implementing it is deprecated since Symfony 5.2. - * This directory should be used to store build artifacts, and can be read-only at runtime. - * Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}). - * - * @author Fabien Potencier - */ -interface KernelInterface extends HttpKernelInterface -{ - /** - * Returns an array of bundles to register. - * - * @return iterable - */ - public function registerBundles(); - - /** - * Loads the container configuration. - */ - public function registerContainerConfiguration(LoaderInterface $loader); - - /** - * Boots the current kernel. - */ - public function boot(); - - /** - * Shutdowns the kernel. - * - * This method is mainly useful when doing functional testing. - */ - public function shutdown(); - - /** - * Gets the registered bundle instances. - * - * @return array - */ - public function getBundles(); - - /** - * Returns a bundle. - * - * @return BundleInterface - * - * @throws \InvalidArgumentException when the bundle is not enabled - */ - public function getBundle(string $name); - - /** - * Returns the file path for a given bundle resource. - * - * A Resource can be a file or a directory. - * - * The resource name must follow the following pattern: - * - * "@BundleName/path/to/a/file.something" - * - * where BundleName is the name of the bundle - * and the remaining part is the relative path in the bundle. - * - * @return string - * - * @throws \InvalidArgumentException if the file cannot be found or the name is not valid - * @throws \RuntimeException if the name contains invalid/unsafe characters - */ - public function locateResource(string $name); - - /** - * Gets the environment. - * - * @return string - */ - public function getEnvironment(); - - /** - * Checks if debug mode is enabled. - * - * @return bool - */ - public function isDebug(); - - /** - * Gets the project dir (path of the project's composer file). - * - * @return string - */ - public function getProjectDir(); - - /** - * Gets the current container. - * - * @return ContainerInterface - */ - public function getContainer(); - - /** - * Gets the request start time (not available if debug is disabled). - * - * @return float - */ - public function getStartTime(); - - /** - * Gets the cache directory. - * - * Since Symfony 5.2, the cache directory should be used for caches that are written at runtime. - * For caches and artifacts that can be warmed at compile-time and deployed as read-only, - * use the new "build directory" returned by the {@see getBuildDir()} method. - * - * @return string - */ - public function getCacheDir(); - - /** - * Gets the log directory. - * - * @return string - */ - public function getLogDir(); - - /** - * Gets the charset of the application. - * - * @return string - */ - public function getCharset(); -} diff --git a/vendor/symfony/http-kernel/LICENSE b/vendor/symfony/http-kernel/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/http-kernel/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php b/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php deleted file mode 100644 index 19ff0db..0000000 --- a/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Log; - -use Symfony\Component\HttpFoundation\Request; - -/** - * DebugLoggerInterface. - * - * @author Fabien Potencier - */ -interface DebugLoggerInterface -{ - /** - * Returns an array of logs. - * - * A log is an array with the following mandatory keys: - * timestamp, message, priority, and priorityName. - * It can also have an optional context key containing an array. - * - * @return array - */ - public function getLogs(Request $request = null); - - /** - * Returns the number of errors. - * - * @return int - */ - public function countErrors(Request $request = null); - - /** - * Removes all log records. - */ - public function clear(); -} diff --git a/vendor/symfony/http-kernel/Log/Logger.php b/vendor/symfony/http-kernel/Log/Logger.php deleted file mode 100644 index 378fbd5..0000000 --- a/vendor/symfony/http-kernel/Log/Logger.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Log; - -use Psr\Log\AbstractLogger; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; - -/** - * Minimalist PSR-3 logger designed to write in stderr or any other stream. - * - * @author Kévin Dunglas - */ -class Logger extends AbstractLogger -{ - private const LEVELS = [ - LogLevel::DEBUG => 0, - LogLevel::INFO => 1, - LogLevel::NOTICE => 2, - LogLevel::WARNING => 3, - LogLevel::ERROR => 4, - LogLevel::CRITICAL => 5, - LogLevel::ALERT => 6, - LogLevel::EMERGENCY => 7, - ]; - - private $minLevelIndex; - private $formatter; - - /** @var resource|null */ - private $handle; - - /** - * @param string|resource|null $output - */ - public function __construct(string $minLevel = null, $output = null, callable $formatter = null) - { - if (null === $minLevel) { - $minLevel = null === $output || 'php://stdout' === $output || 'php://stderr' === $output ? LogLevel::ERROR : LogLevel::WARNING; - - if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { - switch ((int) ($_ENV['SHELL_VERBOSITY'] ?? $_SERVER['SHELL_VERBOSITY'])) { - case -1: $minLevel = LogLevel::ERROR; break; - case 1: $minLevel = LogLevel::NOTICE; break; - case 2: $minLevel = LogLevel::INFO; break; - case 3: $minLevel = LogLevel::DEBUG; break; - } - } - } - - if (!isset(self::LEVELS[$minLevel])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $minLevel)); - } - - $this->minLevelIndex = self::LEVELS[$minLevel]; - $this->formatter = $formatter ?: [$this, 'format']; - if ($output && false === $this->handle = \is_resource($output) ? $output : @fopen($output, 'a')) { - throw new InvalidArgumentException(sprintf('Unable to open "%s".', $output)); - } - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function log($level, $message, array $context = []) - { - if (!isset(self::LEVELS[$level])) { - throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); - } - - if (self::LEVELS[$level] < $this->minLevelIndex) { - return; - } - - $formatter = $this->formatter; - if ($this->handle) { - @fwrite($this->handle, $formatter($level, $message, $context)); - } else { - error_log($formatter($level, $message, $context, false)); - } - } - - private function format(string $level, string $message, array $context, bool $prefixDate = true): string - { - if (str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { - $replacements["{{$key}}"] = $val; - } elseif ($val instanceof \DateTimeInterface) { - $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); - } elseif (\is_object($val)) { - $replacements["{{$key}}"] = '[object '.\get_class($val).']'; - } else { - $replacements["{{$key}}"] = '['.\gettype($val).']'; - } - } - - $message = strtr($message, $replacements); - } - - $log = sprintf('[%s] %s', $level, $message).\PHP_EOL; - if ($prefixDate) { - $log = date(\DateTime::RFC3339).' '.$log; - } - - return $log; - } -} diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php deleted file mode 100644 index 3e7b1bd..0000000 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -/** - * Storage for profiler using files. - * - * @author Alexandre Salomé - */ -class FileProfilerStorage implements ProfilerStorageInterface -{ - /** - * Folder where profiler data are stored. - * - * @var string - */ - private $folder; - - /** - * Constructs the file storage using a "dsn-like" path. - * - * Example : "file:/path/to/the/storage/folder" - * - * @throws \RuntimeException - */ - public function __construct(string $dsn) - { - if (!str_starts_with($dsn, 'file:')) { - throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn)); - } - $this->folder = substr($dsn, 5); - - if (!is_dir($this->folder) && false === @mkdir($this->folder, 0777, true) && !is_dir($this->folder)) { - throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $this->folder)); - } - } - - /** - * {@inheritdoc} - */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null, string $statusCode = null): array - { - $file = $this->getIndexFilename(); - - if (!file_exists($file)) { - return []; - } - - $file = fopen($file, 'r'); - fseek($file, 0, \SEEK_END); - - $result = []; - while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { - $values = str_getcsv($line); - [$csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values; - $csvTime = (int) $csvTime; - - if ($ip && !str_contains($csvIp, $ip) || $url && !str_contains($csvUrl, $url) || $method && !str_contains($csvMethod, $method) || $statusCode && !str_contains($csvStatusCode, $statusCode)) { - continue; - } - - if (!empty($start) && $csvTime < $start) { - continue; - } - - if (!empty($end) && $csvTime > $end) { - continue; - } - - $result[$csvToken] = [ - 'token' => $csvToken, - 'ip' => $csvIp, - 'method' => $csvMethod, - 'url' => $csvUrl, - 'time' => $csvTime, - 'parent' => $csvParent, - 'status_code' => $csvStatusCode, - ]; - } - - fclose($file); - - return array_values($result); - } - - /** - * {@inheritdoc} - */ - public function purge() - { - $flags = \FilesystemIterator::SKIP_DOTS; - $iterator = new \RecursiveDirectoryIterator($this->folder, $flags); - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST); - - foreach ($iterator as $file) { - if (is_file($file)) { - unlink($file); - } else { - rmdir($file); - } - } - } - - /** - * {@inheritdoc} - */ - public function read(string $token): ?Profile - { - if (!$token || !file_exists($file = $this->getFilename($token))) { - return null; - } - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } - - if (!$data = unserialize(file_get_contents($file))) { - return null; - } - - return $this->createProfileFromData($token, $data); - } - - /** - * {@inheritdoc} - * - * @throws \RuntimeException - */ - public function write(Profile $profile): bool - { - $file = $this->getFilename($profile->getToken()); - - $profileIndexed = is_file($file); - if (!$profileIndexed) { - // Create directory - $dir = \dirname($file); - if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $dir)); - } - } - - $profileToken = $profile->getToken(); - // when there are errors in sub-requests, the parent and/or children tokens - // may equal the profile token, resulting in infinite loops - $parentToken = $profile->getParentToken() !== $profileToken ? $profile->getParentToken() : null; - $childrenToken = array_filter(array_map(function (Profile $p) use ($profileToken) { - return $profileToken !== $p->getToken() ? $p->getToken() : null; - }, $profile->getChildren())); - - // Store profile - $data = [ - 'token' => $profileToken, - 'parent' => $parentToken, - 'children' => $childrenToken, - 'data' => $profile->getCollectors(), - 'ip' => $profile->getIp(), - 'method' => $profile->getMethod(), - 'url' => $profile->getUrl(), - 'time' => $profile->getTime(), - 'status_code' => $profile->getStatusCode(), - ]; - - $context = stream_context_create(); - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - stream_context_set_option($context, 'zlib', 'level', 3); - } - - if (false === file_put_contents($file, serialize($data), 0, $context)) { - return false; - } - - if (!$profileIndexed) { - // Add to index - if (false === $file = fopen($this->getIndexFilename(), 'a')) { - return false; - } - - fputcsv($file, [ - $profile->getToken(), - $profile->getIp(), - $profile->getMethod(), - $profile->getUrl(), - $profile->getTime(), - $profile->getParentToken(), - $profile->getStatusCode(), - ]); - fclose($file); - } - - return true; - } - - /** - * Gets filename to store data, associated to the token. - * - * @return string - */ - protected function getFilename(string $token) - { - // Uses 4 last characters, because first are mostly the same. - $folderA = substr($token, -2, 2); - $folderB = substr($token, -4, 2); - - return $this->folder.'/'.$folderA.'/'.$folderB.'/'.$token; - } - - /** - * Gets the index filename. - * - * @return string - */ - protected function getIndexFilename() - { - return $this->folder.'/index.csv'; - } - - /** - * Reads a line in the file, backward. - * - * This function automatically skips the empty lines and do not include the line return in result value. - * - * @param resource $file The file resource, with the pointer placed at the end of the line to read - * - * @return mixed - */ - protected function readLineFromFile($file) - { - $line = ''; - $position = ftell($file); - - if (0 === $position) { - return null; - } - - while (true) { - $chunkSize = min($position, 1024); - $position -= $chunkSize; - fseek($file, $position); - - if (0 === $chunkSize) { - // bof reached - break; - } - - $buffer = fread($file, $chunkSize); - - if (false === ($upTo = strrpos($buffer, "\n"))) { - $line = $buffer.$line; - continue; - } - - $position += $upTo; - $line = substr($buffer, $upTo + 1).$line; - fseek($file, max(0, $position), \SEEK_SET); - - if ('' !== $line) { - break; - } - } - - return '' === $line ? null : $line; - } - - protected function createProfileFromData(string $token, array $data, Profile $parent = null) - { - $profile = new Profile($token); - $profile->setIp($data['ip']); - $profile->setMethod($data['method']); - $profile->setUrl($data['url']); - $profile->setTime($data['time']); - $profile->setStatusCode($data['status_code']); - $profile->setCollectors($data['data']); - - if (!$parent && $data['parent']) { - $parent = $this->read($data['parent']); - } - - if ($parent) { - $profile->setParent($parent); - } - - foreach ($data['children'] as $token) { - if (!$token || !file_exists($file = $this->getFilename($token))) { - continue; - } - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } - - if (!$childData = unserialize(file_get_contents($file))) { - continue; - } - - $profile->addChild($this->createProfileFromData($token, $childData, $profile)); - } - - return $profile; - } -} diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php deleted file mode 100644 index a622403..0000000 --- a/vendor/symfony/http-kernel/Profiler/Profile.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; - -/** - * Profile. - * - * @author Fabien Potencier - */ -class Profile -{ - private $token; - - /** - * @var DataCollectorInterface[] - */ - private $collectors = []; - - private $ip; - private $method; - private $url; - private $time; - private $statusCode; - - /** - * @var Profile - */ - private $parent; - - /** - * @var Profile[] - */ - private $children = []; - - public function __construct(string $token) - { - $this->token = $token; - } - - public function setToken(string $token) - { - $this->token = $token; - } - - /** - * Gets the token. - * - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * Sets the parent token. - */ - public function setParent(self $parent) - { - $this->parent = $parent; - } - - /** - * Returns the parent profile. - * - * @return self|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * Returns the parent token. - * - * @return string|null - */ - public function getParentToken() - { - return $this->parent ? $this->parent->getToken() : null; - } - - /** - * Returns the IP. - * - * @return string|null - */ - public function getIp() - { - return $this->ip; - } - - public function setIp(?string $ip) - { - $this->ip = $ip; - } - - /** - * Returns the request method. - * - * @return string|null - */ - public function getMethod() - { - return $this->method; - } - - public function setMethod(string $method) - { - $this->method = $method; - } - - /** - * Returns the URL. - * - * @return string|null - */ - public function getUrl() - { - return $this->url; - } - - public function setUrl(?string $url) - { - $this->url = $url; - } - - /** - * @return int - */ - public function getTime() - { - return $this->time ?? 0; - } - - public function setTime(int $time) - { - $this->time = $time; - } - - public function setStatusCode(int $statusCode) - { - $this->statusCode = $statusCode; - } - - /** - * @return int|null - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * Finds children profilers. - * - * @return self[] - */ - public function getChildren() - { - return $this->children; - } - - /** - * Sets children profiler. - * - * @param Profile[] $children - */ - public function setChildren(array $children) - { - $this->children = []; - foreach ($children as $child) { - $this->addChild($child); - } - } - - /** - * Adds the child token. - */ - public function addChild(self $child) - { - $this->children[] = $child; - $child->setParent($this); - } - - public function getChildByToken(string $token): ?self - { - foreach ($this->children as $child) { - if ($token === $child->getToken()) { - return $child; - } - } - - return null; - } - - /** - * Gets a Collector by name. - * - * @return DataCollectorInterface - * - * @throws \InvalidArgumentException if the collector does not exist - */ - public function getCollector(string $name) - { - if (!isset($this->collectors[$name])) { - throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); - } - - return $this->collectors[$name]; - } - - /** - * Gets the Collectors associated with this profile. - * - * @return DataCollectorInterface[] - */ - public function getCollectors() - { - return $this->collectors; - } - - /** - * Sets the Collectors associated with this profile. - * - * @param DataCollectorInterface[] $collectors - */ - public function setCollectors(array $collectors) - { - $this->collectors = []; - foreach ($collectors as $collector) { - $this->addCollector($collector); - } - } - - /** - * Adds a Collector. - */ - public function addCollector(DataCollectorInterface $collector) - { - $this->collectors[$collector->getName()] = $collector; - } - - /** - * @return bool - */ - public function hasCollector(string $name) - { - return isset($this->collectors[$name]); - } - - /** - * @return array - */ - public function __sleep() - { - return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode']; - } -} diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php deleted file mode 100644 index 25e126f..0000000 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ /dev/null @@ -1,253 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Profiler. - * - * @author Fabien Potencier - */ -class Profiler implements ResetInterface -{ - private $storage; - - /** - * @var DataCollectorInterface[] - */ - private $collectors = []; - - private $logger; - private $initiallyEnabled = true; - private $enabled = true; - - public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null, bool $enable = true) - { - $this->storage = $storage; - $this->logger = $logger; - $this->initiallyEnabled = $this->enabled = $enable; - } - - /** - * Disables the profiler. - */ - public function disable() - { - $this->enabled = false; - } - - /** - * Enables the profiler. - */ - public function enable() - { - $this->enabled = true; - } - - /** - * Loads the Profile for the given Response. - * - * @return Profile|null - */ - public function loadProfileFromResponse(Response $response) - { - if (!$token = $response->headers->get('X-Debug-Token')) { - return null; - } - - return $this->loadProfile($token); - } - - /** - * Loads the Profile for the given token. - * - * @return Profile|null - */ - public function loadProfile(string $token) - { - return $this->storage->read($token); - } - - /** - * Saves a Profile. - * - * @return bool - */ - public function saveProfile(Profile $profile) - { - // late collect - foreach ($profile->getCollectors() as $collector) { - if ($collector instanceof LateDataCollectorInterface) { - $collector->lateCollect(); - } - } - - if (!($ret = $this->storage->write($profile)) && null !== $this->logger) { - $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]); - } - - return $ret; - } - - /** - * Purges all data from the storage. - */ - public function purge() - { - $this->storage->purge(); - } - - /** - * Finds profiler tokens for the given criteria. - * - * @param string|null $limit The maximum number of tokens to return - * @param string|null $start The start date to search from - * @param string|null $end The end date to search to - * - * @return array - * - * @see https://php.net/datetime.formats for the supported date/time formats - */ - public function find(?string $ip, ?string $url, ?string $limit, ?string $method, ?string $start, ?string $end, string $statusCode = null) - { - return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end), $statusCode); - } - - /** - * Collects data for the given Response. - * - * @return Profile|null - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (false === $this->enabled) { - return null; - } - - $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); - $profile->setTime(time()); - $profile->setUrl($request->getUri()); - $profile->setMethod($request->getMethod()); - $profile->setStatusCode($response->getStatusCode()); - try { - $profile->setIp($request->getClientIp()); - } catch (ConflictingHeadersException $e) { - $profile->setIp('Unknown'); - } - - if ($prevToken = $response->headers->get('X-Debug-Token')) { - $response->headers->set('X-Previous-Debug-Token', $prevToken); - } - - $response->headers->set('X-Debug-Token', $profile->getToken()); - - foreach ($this->collectors as $collector) { - $collector->collect($request, $response, $exception); - - // we need to clone for sub-requests - $profile->addCollector(clone $collector); - } - - return $profile; - } - - public function reset() - { - foreach ($this->collectors as $collector) { - $collector->reset(); - } - $this->enabled = $this->initiallyEnabled; - } - - /** - * Gets the Collectors associated with this profiler. - * - * @return array - */ - public function all() - { - return $this->collectors; - } - - /** - * Sets the Collectors associated with this profiler. - * - * @param DataCollectorInterface[] $collectors An array of collectors - */ - public function set(array $collectors = []) - { - $this->collectors = []; - foreach ($collectors as $collector) { - $this->add($collector); - } - } - - /** - * Adds a Collector. - */ - public function add(DataCollectorInterface $collector) - { - $this->collectors[$collector->getName()] = $collector; - } - - /** - * Returns true if a Collector for the given name exists. - * - * @param string $name A collector name - * - * @return bool - */ - public function has(string $name) - { - return isset($this->collectors[$name]); - } - - /** - * Gets a Collector by name. - * - * @param string $name A collector name - * - * @return DataCollectorInterface - * - * @throws \InvalidArgumentException if the collector does not exist - */ - public function get(string $name) - { - if (!isset($this->collectors[$name])) { - throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name)); - } - - return $this->collectors[$name]; - } - - private function getTimestamp(?string $value): ?int - { - if (null === $value || '' === $value) { - return null; - } - - try { - $value = new \DateTime(is_numeric($value) ? '@'.$value : $value); - } catch (\Exception $e) { - return null; - } - - return $value->getTimestamp(); - } -} diff --git a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php b/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php deleted file mode 100644 index 95d72f4..0000000 --- a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Profiler; - -/** - * ProfilerStorageInterface. - * - * This interface exists for historical reasons. The only supported - * implementation is FileProfilerStorage. - * - * As the profiler must only be used on non-production servers, the file storage - * is more than enough and no other implementations will ever be supported. - * - * @internal - * - * @author Fabien Potencier - */ -interface ProfilerStorageInterface -{ - /** - * Finds profiler tokens for the given criteria. - * - * @param int|null $limit The maximum number of tokens to return - * @param int|null $start The start date to search from - * @param int|null $end The end date to search to - */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null): array; - - /** - * Reads data associated with the given token. - * - * The method returns false if the token does not exist in the storage. - */ - public function read(string $token): ?Profile; - - /** - * Saves a Profile. - */ - public function write(Profile $profile): bool; - - /** - * Purges all data from the database. - */ - public function purge(); -} diff --git a/vendor/symfony/http-kernel/README.md b/vendor/symfony/http-kernel/README.md deleted file mode 100644 index ca50417..0000000 --- a/vendor/symfony/http-kernel/README.md +++ /dev/null @@ -1,31 +0,0 @@ -HttpKernel Component -==================== - -The HttpKernel component provides a structured process for converting a Request -into a Response by making use of the EventDispatcher component. It's flexible -enough to create full-stack frameworks, micro-frameworks or advanced CMS systems like Drupal. - -Sponsor -------- - -The HttpKernel component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2]. - -Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and -fix your projects. We provide a wide range of professional services including development, -consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps. -We are a worker cooperative! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_kernel.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://les-tilleuls.coop -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/http-kernel/RebootableInterface.php b/vendor/symfony/http-kernel/RebootableInterface.php deleted file mode 100644 index e257237..0000000 --- a/vendor/symfony/http-kernel/RebootableInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -/** - * Allows the Kernel to be rebooted using a temporary cache directory. - * - * @author Nicolas Grekas - */ -interface RebootableInterface -{ - /** - * Reboots a kernel. - * - * The getBuildDir() method of a rebootable kernel should not be called - * while building the container. Use the %kernel.build_dir% parameter instead. - * - * @param string|null $warmupDir pass null to reboot in the regular build directory - */ - public function reboot(?string $warmupDir); -} diff --git a/vendor/symfony/http-kernel/Resources/welcome.html.php b/vendor/symfony/http-kernel/Resources/welcome.html.php deleted file mode 100644 index b25f99b..0000000 --- a/vendor/symfony/http-kernel/Resources/welcome.html.php +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Welcome to Symfony! - - - -
    -
    - -

    - You're seeing this page because you haven't configured any homepage URL and debug mode is enabled. -

    -
    - -
    -
    - -

    Welcome to Symfony

    -
    - -
    - - - - - - -

    Your application is now ready and you can start working on it.

    -
    - - -
    - -
    - -
    -
    - - diff --git a/vendor/symfony/http-kernel/TerminableInterface.php b/vendor/symfony/http-kernel/TerminableInterface.php deleted file mode 100644 index 8aa3319..0000000 --- a/vendor/symfony/http-kernel/TerminableInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Terminable extends the Kernel request/response cycle with dispatching a post - * response event after sending the response and before shutting down the kernel. - * - * @author Jordi Boggiano - * @author Pierre Minnieur - */ -interface TerminableInterface -{ - /** - * Terminates a request/response cycle. - * - * Should be called after sending the response and before shutting down the kernel. - */ - public function terminate(Request $request, Response $response); -} diff --git a/vendor/symfony/http-kernel/UriSigner.php b/vendor/symfony/http-kernel/UriSigner.php deleted file mode 100644 index 38931ce..0000000 --- a/vendor/symfony/http-kernel/UriSigner.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel; - -use Symfony\Component\HttpFoundation\Request; - -/** - * Signs URIs. - * - * @author Fabien Potencier - */ -class UriSigner -{ - private $secret; - private $parameter; - - /** - * @param string $secret A secret - * @param string $parameter Query string parameter to use - */ - public function __construct(string $secret, string $parameter = '_hash') - { - $this->secret = $secret; - $this->parameter = $parameter; - } - - /** - * Signs a URI. - * - * The given URI is signed by adding the query string parameter - * which value depends on the URI and the secret. - * - * @return string - */ - public function sign(string $uri) - { - $url = parse_url($uri); - if (isset($url['query'])) { - parse_str($url['query'], $params); - } else { - $params = []; - } - - $uri = $this->buildUrl($url, $params); - $params[$this->parameter] = $this->computeHash($uri); - - return $this->buildUrl($url, $params); - } - - /** - * Checks that a URI contains the correct hash. - * - * @return bool - */ - public function check(string $uri) - { - $url = parse_url($uri); - if (isset($url['query'])) { - parse_str($url['query'], $params); - } else { - $params = []; - } - - if (empty($params[$this->parameter])) { - return false; - } - - $hash = $params[$this->parameter]; - unset($params[$this->parameter]); - - return hash_equals($this->computeHash($this->buildUrl($url, $params)), $hash); - } - - public function checkRequest(Request $request): bool - { - $qs = ($qs = $request->server->get('QUERY_STRING')) ? '?'.$qs : ''; - - // we cannot use $request->getUri() here as we want to work with the original URI (no query string reordering) - return $this->check($request->getSchemeAndHttpHost().$request->getBaseUrl().$request->getPathInfo().$qs); - } - - private function computeHash(string $uri): string - { - return base64_encode(hash_hmac('sha256', $uri, $this->secret, true)); - } - - private function buildUrl(array $url, array $params = []): string - { - ksort($params, \SORT_STRING); - $url['query'] = http_build_query($params, '', '&'); - - $scheme = isset($url['scheme']) ? $url['scheme'].'://' : ''; - $host = $url['host'] ?? ''; - $port = isset($url['port']) ? ':'.$url['port'] : ''; - $user = $url['user'] ?? ''; - $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; - $pass = ($user || $pass) ? "$pass@" : ''; - $path = $url['path'] ?? ''; - $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; - $fragment = isset($url['fragment']) ? '#'.$url['fragment'] : ''; - - return $scheme.$user.$pass.$host.$port.$path.$query.$fragment; - } -} diff --git a/vendor/symfony/http-kernel/composer.json b/vendor/symfony/http-kernel/composer.json deleted file mode 100644 index 09682db..0000000 --- a/vendor/symfony/http-kernel/composer.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "symfony/http-kernel", - "type": "library", - "description": "Provides a structured process for converting a Request into a Response", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "psr/log": "^1|^2" - }, - "require-dev": { - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "psr/cache": "^1.0|^2.0|^3.0", - "twig/twig": "^2.13|^3.0.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/form": "<5.0", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpKernel\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/options-resolver/CHANGELOG.md b/vendor/symfony/options-resolver/CHANGELOG.md deleted file mode 100644 index 84c4594..0000000 --- a/vendor/symfony/options-resolver/CHANGELOG.md +++ /dev/null @@ -1,81 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Add prototype definition for nested options - -5.1.0 ------ - - * added fluent configuration of options using `OptionResolver::define()` - * added `setInfo()` and `getInfo()` methods - * updated the signature of method `OptionsResolver::setDeprecated()` to `OptionsResolver::setDeprecation(string $option, string $package, string $version, $message)` - * deprecated `OptionsResolverIntrospector::getDeprecationMessage()`, use `OptionsResolverIntrospector::getDeprecation()` instead - -5.0.0 ------ - - * added argument `$triggerDeprecation` to `OptionsResolver::offsetGet()` - -4.3.0 ------ - - * added `OptionsResolver::addNormalizer` method - -4.2.0 ------ - - * added support for nested options definition - * added `setDeprecated` and `isDeprecated` methods - -3.4.0 ------ - - * added `OptionsResolverIntrospector` to inspect options definitions inside an `OptionsResolver` instance - * added array of types support in allowed types (e.g int[]) - -2.6.0 ------ - - * deprecated OptionsResolverInterface - * [BC BREAK] removed "array" type hint from OptionsResolverInterface methods - setRequired(), setAllowedValues(), addAllowedValues(), setAllowedTypes() and - addAllowedTypes() - * added OptionsResolver::setDefault() - * added OptionsResolver::hasDefault() - * added OptionsResolver::setNormalizer() - * added OptionsResolver::isRequired() - * added OptionsResolver::getRequiredOptions() - * added OptionsResolver::isMissing() - * added OptionsResolver::getMissingOptions() - * added OptionsResolver::setDefined() - * added OptionsResolver::isDefined() - * added OptionsResolver::getDefinedOptions() - * added OptionsResolver::remove() - * added OptionsResolver::clear() - * deprecated OptionsResolver::replaceDefaults() - * deprecated OptionsResolver::setOptional() in favor of setDefined() - * deprecated OptionsResolver::isKnown() in favor of isDefined() - * [BC BREAK] OptionsResolver::isRequired() returns true now if a required - option has a default value set - * [BC BREAK] merged Options into OptionsResolver and turned Options into an - interface - * deprecated Options::overload() (now in OptionsResolver) - * deprecated Options::set() (now in OptionsResolver) - * deprecated Options::get() (now in OptionsResolver) - * deprecated Options::has() (now in OptionsResolver) - * deprecated Options::replace() (now in OptionsResolver) - * [BC BREAK] Options::get() (now in OptionsResolver) can only be used within - lazy option/normalizer closures now - * [BC BREAK] removed Traversable interface from Options since using within - lazy option/normalizer closures resulted in exceptions - * [BC BREAK] removed Options::all() since using within lazy option/normalizer - closures resulted in exceptions - * [BC BREAK] OptionDefinitionException now extends LogicException instead of - RuntimeException - * [BC BREAK] normalizers are not executed anymore for unset options - * normalizers are executed after validating the options now - * [BC BREAK] an UndefinedOptionsException is now thrown instead of an - InvalidOptionsException when non-existing options are passed diff --git a/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php b/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php deleted file mode 100644 index 95909f3..0000000 --- a/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Debug; - -use Symfony\Component\OptionsResolver\Exception\NoConfigurationException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; -use Symfony\Component\OptionsResolver\OptionsResolver; - -/** - * @author Maxime Steinhausser - * - * @final - */ -class OptionsResolverIntrospector -{ - private $get; - - public function __construct(OptionsResolver $optionsResolver) - { - $this->get = \Closure::bind(function ($property, $option, $message) { - /** @var OptionsResolver $this */ - if (!$this->isDefined($option)) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option)); - } - - if (!\array_key_exists($option, $this->{$property})) { - throw new NoConfigurationException($message); - } - - return $this->{$property}[$option]; - }, $optionsResolver, $optionsResolver); - } - - /** - * @return mixed - * - * @throws NoConfigurationException on no configured value - */ - public function getDefault(string $option) - { - return ($this->get)('defaults', $option, sprintf('No default value was set for the "%s" option.', $option)); - } - - /** - * @return \Closure[] - * - * @throws NoConfigurationException on no configured closures - */ - public function getLazyClosures(string $option): array - { - return ($this->get)('lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option)); - } - - /** - * @return string[] - * - * @throws NoConfigurationException on no configured types - */ - public function getAllowedTypes(string $option): array - { - return ($this->get)('allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option)); - } - - /** - * @return mixed[] - * - * @throws NoConfigurationException on no configured values - */ - public function getAllowedValues(string $option): array - { - return ($this->get)('allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option)); - } - - /** - * @throws NoConfigurationException on no configured normalizer - */ - public function getNormalizer(string $option): \Closure - { - return current($this->getNormalizers($option)); - } - - /** - * @throws NoConfigurationException when no normalizer is configured - */ - public function getNormalizers(string $option): array - { - return ($this->get)('normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option)); - } - - /** - * @return string|\Closure - * - * @throws NoConfigurationException on no configured deprecation - * - * @deprecated since Symfony 5.1, use "getDeprecation()" instead. - */ - public function getDeprecationMessage(string $option) - { - trigger_deprecation('symfony/options-resolver', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__); - - return $this->getDeprecation($option)['message']; - } - - /** - * @throws NoConfigurationException on no configured deprecation - */ - public function getDeprecation(string $option): array - { - return ($this->get)('deprecated', $option, sprintf('No deprecation was set for the "%s" option.', $option)); - } -} diff --git a/vendor/symfony/options-resolver/Exception/AccessException.php b/vendor/symfony/options-resolver/Exception/AccessException.php deleted file mode 100644 index c12b680..0000000 --- a/vendor/symfony/options-resolver/Exception/AccessException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option outside of or write it inside of - * {@link \Symfony\Component\OptionsResolver\Options::resolve()}. - * - * @author Bernhard Schussek - */ -class AccessException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/options-resolver/Exception/ExceptionInterface.php b/vendor/symfony/options-resolver/Exception/ExceptionInterface.php deleted file mode 100644 index ea99d05..0000000 --- a/vendor/symfony/options-resolver/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Marker interface for all exceptions thrown by the OptionsResolver component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php b/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php deleted file mode 100644 index 6d421d6..0000000 --- a/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when an argument is invalid. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php b/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php deleted file mode 100644 index 6fd4f12..0000000 --- a/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when the value of an option does not match its validation rules. - * - * You should make sure a valid value is passed to the option. - * - * @author Bernhard Schussek - */ -class InvalidOptionsException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/options-resolver/Exception/MissingOptionsException.php b/vendor/symfony/options-resolver/Exception/MissingOptionsException.php deleted file mode 100644 index faa487f..0000000 --- a/vendor/symfony/options-resolver/Exception/MissingOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when a required option is missing. - * - * Add the option to the passed options array. - * - * @author Bernhard Schussek - */ -class MissingOptionsException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/options-resolver/Exception/NoConfigurationException.php b/vendor/symfony/options-resolver/Exception/NoConfigurationException.php deleted file mode 100644 index 6693ec1..0000000 --- a/vendor/symfony/options-resolver/Exception/NoConfigurationException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector; - -/** - * Thrown when trying to introspect an option definition property - * for which no value was configured inside the OptionsResolver instance. - * - * @see OptionsResolverIntrospector - * - * @author Maxime Steinhausser - */ -class NoConfigurationException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php b/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php deleted file mode 100644 index 4c3280f..0000000 --- a/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option that has no value set. - * - * When accessing optional options from within a lazy option or normalizer you should first - * check whether the optional option is set. You can do this with `isset($options['optional'])`. - * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can - * occur when evaluating lazy options. - * - * @author Tobias Schultze - */ -class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php b/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php deleted file mode 100644 index e8e339d..0000000 --- a/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when two lazy options have a cyclic dependency. - * - * @author Bernhard Schussek - */ -class OptionDefinitionException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php b/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php deleted file mode 100644 index 6ca3fce..0000000 --- a/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when an undefined option is passed. - * - * You should remove the options in question from your code or define them - * beforehand. - * - * @author Bernhard Schussek - */ -class UndefinedOptionsException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/options-resolver/LICENSE b/vendor/symfony/options-resolver/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/options-resolver/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/options-resolver/OptionConfigurator.php b/vendor/symfony/options-resolver/OptionConfigurator.php deleted file mode 100644 index 62f03d0..0000000 --- a/vendor/symfony/options-resolver/OptionConfigurator.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -use Symfony\Component\OptionsResolver\Exception\AccessException; - -final class OptionConfigurator -{ - private $name; - private $resolver; - - public function __construct(string $name, OptionsResolver $resolver) - { - $this->name = $name; - $this->resolver = $resolver; - $this->resolver->setDefined($name); - } - - /** - * Adds allowed types for this option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function allowedTypes(string ...$types): self - { - $this->resolver->setAllowedTypes($this->name, $types); - - return $this; - } - - /** - * Sets allowed values for this option. - * - * @param mixed ...$values One or more acceptable values/closures - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function allowedValues(...$values): self - { - $this->resolver->setAllowedValues($this->name, $values); - - return $this; - } - - /** - * Sets the default value for this option. - * - * @param mixed $value The default value of the option - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function default($value): self - { - $this->resolver->setDefault($this->name, $value); - - return $this; - } - - /** - * Defines an option configurator with the given name. - */ - public function define(string $option): self - { - return $this->resolver->define($option); - } - - /** - * Marks this option as deprecated. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string|\Closure $message The deprecation message to use - * - * @return $this - */ - public function deprecated(string $package, string $version, $message = 'The option "%name%" is deprecated.'): self - { - $this->resolver->setDeprecated($this->name, $package, $version, $message); - - return $this; - } - - /** - * Sets the normalizer for this option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function normalize(\Closure $normalizer): self - { - $this->resolver->setNormalizer($this->name, $normalizer); - - return $this; - } - - /** - * Marks this option as required. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function required(): self - { - $this->resolver->setRequired($this->name); - - return $this; - } - - /** - * Sets an info message for an option. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function info(string $info): self - { - $this->resolver->setInfo($this->name, $info); - - return $this; - } -} diff --git a/vendor/symfony/options-resolver/Options.php b/vendor/symfony/options-resolver/Options.php deleted file mode 100644 index d444ec4..0000000 --- a/vendor/symfony/options-resolver/Options.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -/** - * Contains resolved option values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -interface Options extends \ArrayAccess, \Countable -{ -} diff --git a/vendor/symfony/options-resolver/OptionsResolver.php b/vendor/symfony/options-resolver/OptionsResolver.php deleted file mode 100644 index be80a9a..0000000 --- a/vendor/symfony/options-resolver/OptionsResolver.php +++ /dev/null @@ -1,1347 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -use Symfony\Component\OptionsResolver\Exception\AccessException; -use Symfony\Component\OptionsResolver\Exception\InvalidArgumentException; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; -use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException; -use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; - -/** - * Validates options and merges them with default values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -class OptionsResolver implements Options -{ - private const VALIDATION_FUNCTIONS = [ - 'bool' => 'is_bool', - 'boolean' => 'is_bool', - 'int' => 'is_int', - 'integer' => 'is_int', - 'long' => 'is_int', - 'float' => 'is_float', - 'double' => 'is_float', - 'real' => 'is_float', - 'numeric' => 'is_numeric', - 'string' => 'is_string', - 'scalar' => 'is_scalar', - 'array' => 'is_array', - 'iterable' => 'is_iterable', - 'countable' => 'is_countable', - 'callable' => 'is_callable', - 'object' => 'is_object', - 'resource' => 'is_resource', - ]; - - /** - * The names of all defined options. - */ - private $defined = []; - - /** - * The default option values. - */ - private $defaults = []; - - /** - * A list of closure for nested options. - * - * @var \Closure[][] - */ - private $nested = []; - - /** - * The names of required options. - */ - private $required = []; - - /** - * The resolved option values. - */ - private $resolved = []; - - /** - * A list of normalizer closures. - * - * @var \Closure[][] - */ - private $normalizers = []; - - /** - * A list of accepted values for each option. - */ - private $allowedValues = []; - - /** - * A list of accepted types for each option. - */ - private $allowedTypes = []; - - /** - * A list of info messages for each option. - */ - private $info = []; - - /** - * A list of closures for evaluating lazy options. - */ - private $lazy = []; - - /** - * A list of lazy options whose closure is currently being called. - * - * This list helps detecting circular dependencies between lazy options. - */ - private $calling = []; - - /** - * A list of deprecated options. - */ - private $deprecated = []; - - /** - * The list of options provided by the user. - */ - private $given = []; - - /** - * Whether the instance is locked for reading. - * - * Once locked, the options cannot be changed anymore. This is - * necessary in order to avoid inconsistencies during the resolving - * process. If any option is changed after being read, all evaluated - * lazy options that depend on this option would become invalid. - */ - private $locked = false; - - private $parentsOptions = []; - - /** - * Whether the whole options definition is marked as array prototype. - */ - private $prototype; - - /** - * The prototype array's index that is being read. - */ - private $prototypeIndex; - - /** - * Sets the default value of a given option. - * - * If the default value should be set based on other options, you can pass - * a closure with the following signature: - * - * function (Options $options) { - * // ... - * } - * - * The closure will be evaluated when {@link resolve()} is called. The - * closure has access to the resolved values of other options through the - * passed {@link Options} instance: - * - * function (Options $options) { - * if (isset($options['port'])) { - * // ... - * } - * } - * - * If you want to access the previously set default value, add a second - * argument to the closure's signature: - * - * $options->setDefault('name', 'Default Name'); - * - * $options->setDefault('name', function (Options $options, $previousValue) { - * // 'Default Name' === $previousValue - * }); - * - * This is mostly useful if the configuration of the {@link Options} object - * is spread across different locations of your code, such as base and - * sub-classes. - * - * If you want to define nested options, you can pass a closure with the - * following signature: - * - * $options->setDefault('database', function (OptionsResolver $resolver) { - * $resolver->setDefined(['dbname', 'host', 'port', 'user', 'pass']); - * } - * - * To get access to the parent options, add a second argument to the closure's - * signature: - * - * function (OptionsResolver $resolver, Options $parent) { - * // 'default' === $parent['connection'] - * } - * - * @param string $option The name of the option - * @param mixed $value The default value of the option - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefault(string $option, $value) - { - // Setting is not possible once resolving starts, because then lazy - // options could manipulate the state of the object, leading to - // inconsistent results. - if ($this->locked) { - throw new AccessException('Default values cannot be set from a lazy option or normalizer.'); - } - - // If an option is a closure that should be evaluated lazily, store it - // in the "lazy" property. - if ($value instanceof \Closure) { - $reflClosure = new \ReflectionFunction($value); - $params = $reflClosure->getParameters(); - - if (isset($params[0]) && Options::class === $this->getParameterClassName($params[0])) { - // Initialize the option if no previous value exists - if (!isset($this->defaults[$option])) { - $this->defaults[$option] = null; - } - - // Ignore previous lazy options if the closure has no second parameter - if (!isset($this->lazy[$option]) || !isset($params[1])) { - $this->lazy[$option] = []; - } - - // Store closure for later evaluation - $this->lazy[$option][] = $value; - $this->defined[$option] = true; - - // Make sure the option is processed and is not nested anymore - unset($this->resolved[$option], $this->nested[$option]); - - return $this; - } - - if (isset($params[0]) && null !== ($type = $params[0]->getType()) && self::class === $type->getName() && (!isset($params[1]) || (($type = $params[1]->getType()) instanceof \ReflectionNamedType && Options::class === $type->getName()))) { - // Store closure for later evaluation - $this->nested[$option][] = $value; - $this->defaults[$option] = []; - $this->defined[$option] = true; - - // Make sure the option is processed and is not lazy anymore - unset($this->resolved[$option], $this->lazy[$option]); - - return $this; - } - } - - // This option is not lazy nor nested anymore - unset($this->lazy[$option], $this->nested[$option]); - - // Yet undefined options can be marked as resolved, because we only need - // to resolve options with lazy closures, normalizers or validation - // rules, none of which can exist for undefined options - // If the option was resolved before, update the resolved value - if (!isset($this->defined[$option]) || \array_key_exists($option, $this->resolved)) { - $this->resolved[$option] = $value; - } - - $this->defaults[$option] = $value; - $this->defined[$option] = true; - - return $this; - } - - /** - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefaults(array $defaults) - { - foreach ($defaults as $option => $value) { - $this->setDefault($option, $value); - } - - return $this; - } - - /** - * Returns whether a default value is set for an option. - * - * Returns true if {@link setDefault()} was called for this option. - * An option is also considered set if it was set to null. - * - * @return bool - */ - public function hasDefault(string $option) - { - return \array_key_exists($option, $this->defaults); - } - - /** - * Marks one or more options as required. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setRequired($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be made required from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - $this->required[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is required. - * - * An option is required if it was passed to {@link setRequired()}. - * - * @return bool - */ - public function isRequired(string $option) - { - return isset($this->required[$option]); - } - - /** - * Returns the names of all required options. - * - * @return string[] - * - * @see isRequired() - */ - public function getRequiredOptions() - { - return array_keys($this->required); - } - - /** - * Returns whether an option is missing a default value. - * - * An option is missing if it was passed to {@link setRequired()}, but not - * to {@link setDefault()}. This option must be passed explicitly to - * {@link resolve()}, otherwise an exception will be thrown. - * - * @return bool - */ - public function isMissing(string $option) - { - return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults); - } - - /** - * Returns the names of all options missing a default value. - * - * @return string[] - */ - public function getMissingOptions() - { - return array_keys(array_diff_key($this->required, $this->defaults)); - } - - /** - * Defines a valid option name. - * - * Defines an option name without setting a default value. The option will - * be accepted when passed to {@link resolve()}. When not passed, the - * option will not be included in the resolved options. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefined($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be defined from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is defined. - * - * Returns true for any option passed to {@link setDefault()}, - * {@link setRequired()} or {@link setDefined()}. - * - * @return bool - */ - public function isDefined(string $option) - { - return isset($this->defined[$option]); - } - - /** - * Returns the names of all defined options. - * - * @return string[] - * - * @see isDefined() - */ - public function getDefinedOptions() - { - return array_keys($this->defined); - } - - public function isNested(string $option): bool - { - return isset($this->nested[$option]); - } - - /** - * Deprecates an option, allowed types or values. - * - * Instead of passing the message, you may also pass a closure with the - * following signature: - * - * function (Options $options, $value): string { - * // ... - * } - * - * The closure receives the value as argument and should return a string. - * Return an empty string to ignore the option deprecation. - * - * The closure is invoked when {@link resolve()} is called. The parameter - * passed to the closure is the value of the option after validating it - * and before normalizing it. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string|\Closure $message The deprecation message to use - * - * @return $this - */ - public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self - { - if ($this->locked) { - throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $args = \func_get_args(); - - if (\func_num_args() < 3) { - trigger_deprecation('symfony/options-resolver', '5.1', 'The signature of method "%s()" requires 2 new arguments: "string $package, string $version", not defining them is deprecated.', __METHOD__); - - $message = $args[1] ?? 'The option "%name%" is deprecated.'; - $package = $version = ''; - } else { - $package = $args[1]; - $version = $args[2]; - $message = $args[3] ?? 'The option "%name%" is deprecated.'; - } - - if (!\is_string($message) && !$message instanceof \Closure) { - throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', get_debug_type($message))); - } - - // ignore if empty string - if ('' === $message) { - return $this; - } - - $this->deprecated[$option] = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - public function isDeprecated(string $option): bool - { - return isset($this->deprecated[$option]); - } - - /** - * Sets the normalizer for an option. - * - * The normalizer should be a closure with the following signature: - * - * function (Options $options, $value) { - * // ... - * } - * - * The closure is invoked when {@link resolve()} is called. The closure - * has access to the resolved values of other options through the passed - * {@link Options} instance. - * - * The second parameter passed to the closure is the value of - * the option. - * - * The resolved option value is set to the return value of the closure. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setNormalizer(string $option, \Closure $normalizer) - { - if ($this->locked) { - throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->normalizers[$option] = [$normalizer]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds a normalizer for an option. - * - * The normalizer should be a closure with the following signature: - * - * function (Options $options, $value): mixed { - * // ... - * } - * - * The closure is invoked when {@link resolve()} is called. The closure - * has access to the resolved values of other options through the passed - * {@link Options} instance. - * - * The second parameter passed to the closure is the value of - * the option. - * - * The resolved option value is set to the return value of the closure. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addNormalizer(string $option, \Closure $normalizer, bool $forcePrepend = false): self - { - if ($this->locked) { - throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if ($forcePrepend) { - $this->normalizers[$option] = $this->normalizers[$option] ?? []; - array_unshift($this->normalizers[$option], $normalizer); - } else { - $this->normalizers[$option][] = $normalizer; - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed values for an option. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedValues(string $option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : [$allowedValues]; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed values for an option. - * - * The values are merged with the allowed values defined previously. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedValues(string $option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if (!\is_array($allowedValues)) { - $allowedValues = [$allowedValues]; - } - - if (!isset($this->allowedValues[$option])) { - $this->allowedValues[$option] = $allowedValues; - } else { - $this->allowedValues[$option] = array_merge($this->allowedValues[$option], $allowedValues); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed types for an option. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedTypes(string $option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->allowedTypes[$option] = (array) $allowedTypes; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed types for an option. - * - * The types are merged with the allowed types defined previously. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedTypes(string $option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - if (!isset($this->allowedTypes[$option])) { - $this->allowedTypes[$option] = (array) $allowedTypes; - } else { - $this->allowedTypes[$option] = array_merge($this->allowedTypes[$option], (array) $allowedTypes); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Defines an option configurator with the given name. - */ - public function define(string $option): OptionConfigurator - { - if (isset($this->defined[$option])) { - throw new OptionDefinitionException(sprintf('The option "%s" is already defined.', $option)); - } - - return new OptionConfigurator($option, $this); - } - - /** - * Sets an info message for an option. - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setInfo(string $option, string $info): self - { - if ($this->locked) { - throw new AccessException('The Info message cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - $this->info[$option] = $info; - - return $this; - } - - /** - * Gets the info message for an option. - */ - public function getInfo(string $option): ?string - { - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - return $this->info[$option] ?? null; - } - - /** - * Marks the whole options definition as array prototype. - * - * @return $this - * - * @throws AccessException If called from a lazy option, a normalizer or a root definition - */ - public function setPrototype(bool $prototype): self - { - if ($this->locked) { - throw new AccessException('The prototype property cannot be set from a lazy option or normalizer.'); - } - - if (null === $this->prototype && $prototype) { - throw new AccessException('The prototype property cannot be set from a root definition.'); - } - - $this->prototype = $prototype; - - return $this; - } - - public function isPrototype(): bool - { - return $this->prototype ?? false; - } - - /** - * Removes the option with the given name. - * - * Undefined options are ignored. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function remove($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]); - unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option], $this->info[$option]); - } - - return $this; - } - - /** - * Removes all options. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function clear() - { - if ($this->locked) { - throw new AccessException('Options cannot be cleared from a lazy option or normalizer.'); - } - - $this->defined = []; - $this->defaults = []; - $this->nested = []; - $this->required = []; - $this->resolved = []; - $this->lazy = []; - $this->normalizers = []; - $this->allowedTypes = []; - $this->allowedValues = []; - $this->deprecated = []; - $this->info = []; - - return $this; - } - - /** - * Merges options with the default values stored in the container and - * validates them. - * - * Exceptions are thrown if: - * - * - Undefined options are passed; - * - Required options are missing; - * - Options have invalid types; - * - Options have invalid values. - * - * @return array - * - * @throws UndefinedOptionsException If an option name is undefined - * @throws InvalidOptionsException If an option doesn't fulfill the - * specified validation rules - * @throws MissingOptionsException If a required option is missing - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - * @throws NoSuchOptionException If a lazy option reads an unavailable option - * @throws AccessException If called from a lazy option or normalizer - */ - public function resolve(array $options = []) - { - if ($this->locked) { - throw new AccessException('Options cannot be resolved from a lazy option or normalizer.'); - } - - // Allow this method to be called multiple times - $clone = clone $this; - - // Make sure that no unknown options are passed - $diff = array_diff_key($options, $clone->defined); - - if (\count($diff) > 0) { - ksort($clone->defined); - ksort($diff); - - throw new UndefinedOptionsException(sprintf((\count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', $this->formatOptions(array_keys($diff)), implode('", "', array_keys($clone->defined)))); - } - - // Override options set by the user - foreach ($options as $option => $value) { - $clone->given[$option] = true; - $clone->defaults[$option] = $value; - unset($clone->resolved[$option], $clone->lazy[$option]); - } - - // Check whether any required option is missing - $diff = array_diff_key($clone->required, $clone->defaults); - - if (\count($diff) > 0) { - ksort($diff); - - throw new MissingOptionsException(sprintf(\count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', $this->formatOptions(array_keys($diff)))); - } - - // Lock the container - $clone->locked = true; - - // Now process the individual options. Use offsetGet(), which resolves - // the option itself and any options that the option depends on - foreach ($clone->defaults as $option => $_) { - $clone->offsetGet($option); - } - - return $clone->resolved; - } - - /** - * Returns the resolved value of an option. - * - * @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default) - * - * @return mixed - * - * @throws AccessException If accessing this method outside of - * {@link resolve()} - * @throws NoSuchOptionException If the option is not set - * @throws InvalidOptionsException If the option doesn't fulfill the - * specified validation rules - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - */ - #[\ReturnTypeWillChange] - public function offsetGet($option, bool $triggerDeprecation = true) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - // Shortcut for resolved options - if (isset($this->resolved[$option]) || \array_key_exists($option, $this->resolved)) { - if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || $this->calling) && \is_string($this->deprecated[$option]['message'])) { - trigger_deprecation($this->deprecated[$option]['package'], $this->deprecated[$option]['version'], strtr($this->deprecated[$option]['message'], ['%name%' => $option])); - } - - return $this->resolved[$option]; - } - - // Check whether the option is set at all - if (!isset($this->defaults[$option]) && !\array_key_exists($option, $this->defaults)) { - if (!isset($this->defined[$option])) { - throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined)))); - } - - throw new NoSuchOptionException(sprintf('The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', $this->formatOptions([$option]))); - } - - $value = $this->defaults[$option]; - - // Resolve the option if it is a nested definition - if (isset($this->nested[$option])) { - // If the closure is already being called, we have a cyclic dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - if (!\is_array($value)) { - throw new InvalidOptionsException(sprintf('The nested option "%s" with value %s is expected to be of type array, but is of type "%s".', $this->formatOptions([$option]), $this->formatValue($value), get_debug_type($value))); - } - - // The following section must be protected from cyclic calls. - $this->calling[$option] = true; - try { - $resolver = new self(); - $resolver->prototype = false; - $resolver->parentsOptions = $this->parentsOptions; - $resolver->parentsOptions[] = $option; - foreach ($this->nested[$option] as $closure) { - $closure($resolver, $this); - } - - if ($resolver->prototype) { - $values = []; - foreach ($value as $index => $prototypeValue) { - if (!\is_array($prototypeValue)) { - throw new InvalidOptionsException(sprintf('The value of the option "%s" is expected to be of type array of array, but is of type array of "%s".', $this->formatOptions([$option]), get_debug_type($prototypeValue))); - } - - $resolver->prototypeIndex = $index; - $values[$index] = $resolver->resolve($prototypeValue); - } - $value = $values; - } else { - $value = $resolver->resolve($value); - } - } finally { - $resolver->prototypeIndex = null; - unset($this->calling[$option]); - } - } - - // Resolve the option if the default value is lazily evaluated - if (isset($this->lazy[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - foreach ($this->lazy[$option] as $closure) { - $value = $closure($this, $value); - } - } finally { - unset($this->calling[$option]); - } - // END - } - - // Validate the type of the resolved option - if (isset($this->allowedTypes[$option])) { - $valid = true; - $invalidTypes = []; - - foreach ($this->allowedTypes[$option] as $type) { - if ($valid = $this->verifyTypes($type, $value, $invalidTypes)) { - break; - } - } - - if (!$valid) { - $fmtActualValue = $this->formatValue($value); - $fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]); - $fmtProvidedTypes = implode('|', array_keys($invalidTypes)); - $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) { - return str_ends_with($item, '[]'); - })) > 0; - - if (\is_array($value) && $allowedContainsArrayType) { - throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes)); - } - - throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes)); - } - } - - // Validate the value of the resolved option - if (isset($this->allowedValues[$option])) { - $success = false; - $printableAllowedValues = []; - - foreach ($this->allowedValues[$option] as $allowedValue) { - if ($allowedValue instanceof \Closure) { - if ($allowedValue($value)) { - $success = true; - break; - } - - // Don't include closures in the exception message - continue; - } - - if ($value === $allowedValue) { - $success = true; - break; - } - - $printableAllowedValues[] = $allowedValue; - } - - if (!$success) { - $message = sprintf( - 'The option "%s" with value %s is invalid.', - $option, - $this->formatValue($value) - ); - - if (\count($printableAllowedValues) > 0) { - $message .= sprintf( - ' Accepted values are: %s.', - $this->formatValues($printableAllowedValues) - ); - } - - if (isset($this->info[$option])) { - $message .= sprintf(' Info: %s.', $this->info[$option]); - } - - throw new InvalidOptionsException($message); - } - } - - // Check whether the option is deprecated - // and it is provided by the user or is being called from a lazy evaluation - if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || ($this->calling && \is_string($this->deprecated[$option]['message'])))) { - $deprecation = $this->deprecated[$option]; - $message = $this->deprecated[$option]['message']; - - if ($message instanceof \Closure) { - // If the closure is already being called, we have a cyclic dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - $this->calling[$option] = true; - try { - if (!\is_string($message = $message($this, $value))) { - throw new InvalidOptionsException(sprintf('Invalid type for deprecation message, expected string but got "%s", return an empty string to ignore.', get_debug_type($message))); - } - } finally { - unset($this->calling[$option]); - } - } - - if ('' !== $message) { - trigger_deprecation($deprecation['package'], $deprecation['version'], strtr($message, ['%name%' => $option])); - } - } - - // Normalize the validated option - if (isset($this->normalizers[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling)))); - } - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - foreach ($this->normalizers[$option] as $normalizer) { - $value = $normalizer($this, $value); - } - } finally { - unset($this->calling[$option]); - } - // END - } - - // Mark as resolved - $this->resolved[$option] = $value; - - return $value; - } - - private function verifyTypes(string $type, $value, array &$invalidTypes, int $level = 0): bool - { - if (\is_array($value) && '[]' === substr($type, -2)) { - $type = substr($type, 0, -2); - $valid = true; - - foreach ($value as $val) { - if (!$this->verifyTypes($type, $val, $invalidTypes, $level + 1)) { - $valid = false; - } - } - - return $valid; - } - - if (('null' === $type && null === $value) || (isset(self::VALIDATION_FUNCTIONS[$type]) ? self::VALIDATION_FUNCTIONS[$type]($value) : $value instanceof $type)) { - return true; - } - - if (!$invalidTypes || $level > 0) { - $invalidTypes[get_debug_type($value)] = true; - } - - return false; - } - - /** - * Returns whether a resolved option with the given name exists. - * - * @param string $option The option name - * - * @return bool - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \ArrayAccess::offsetExists() - */ - #[\ReturnTypeWillChange] - public function offsetExists($option) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - return \array_key_exists($option, $this->defaults); - } - - /** - * Not supported. - * - * @return void - * - * @throws AccessException - */ - #[\ReturnTypeWillChange] - public function offsetSet($option, $value) - { - throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.'); - } - - /** - * Not supported. - * - * @return void - * - * @throws AccessException - */ - #[\ReturnTypeWillChange] - public function offsetUnset($option) - { - throw new AccessException('Removing options via array access is not supported. Use remove() instead.'); - } - - /** - * Returns the number of set options. - * - * This may be only a subset of the defined options. - * - * @return int - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \Countable::count() - */ - #[\ReturnTypeWillChange] - public function count() - { - if (!$this->locked) { - throw new AccessException('Counting is only supported within closures of lazy options and normalizers.'); - } - - return \count($this->defaults); - } - - /** - * Returns a string representation of the value. - * - * This method returns the equivalent PHP tokens for most scalar types - * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped - * in double quotes ("). - * - * @param mixed $value The value to format as string - */ - private function formatValue($value): string - { - if (\is_object($value)) { - return \get_class($value); - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (null === $value) { - return 'null'; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - return (string) $value; - } - - /** - * Returns a string representation of a list of values. - * - * Each of the values is converted to a string using - * {@link formatValue()}. The values are then concatenated with commas. - * - * @see formatValue() - */ - private function formatValues(array $values): string - { - foreach ($values as $key => $value) { - $values[$key] = $this->formatValue($value); - } - - return implode(', ', $values); - } - - private function formatOptions(array $options): string - { - if ($this->parentsOptions) { - $prefix = array_shift($this->parentsOptions); - if ($this->parentsOptions) { - $prefix .= sprintf('[%s]', implode('][', $this->parentsOptions)); - } - - if ($this->prototype && null !== $this->prototypeIndex) { - $prefix .= sprintf('[%s]', $this->prototypeIndex); - } - - $options = array_map(static function (string $option) use ($prefix): string { - return sprintf('%s[%s]', $prefix, $option); - }, $options); - } - - return implode('", "', $options); - } - - private function getParameterClassName(\ReflectionParameter $parameter): ?string - { - if (!($type = $parameter->getType()) instanceof \ReflectionNamedType || $type->isBuiltin()) { - return null; - } - - return $type->getName(); - } -} diff --git a/vendor/symfony/options-resolver/README.md b/vendor/symfony/options-resolver/README.md deleted file mode 100644 index c63b900..0000000 --- a/vendor/symfony/options-resolver/README.md +++ /dev/null @@ -1,15 +0,0 @@ -OptionsResolver Component -========================= - -The OptionsResolver component is `array_replace` on steroids. It allows you to -create an options system with required options, defaults, validation (type, -value), normalization and more. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/options_resolver.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/options-resolver/composer.json b/vendor/symfony/options-resolver/composer.json deleted file mode 100644 index a38d1bd..0000000 --- a/vendor/symfony/options-resolver/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "symfony/options-resolver", - "type": "library", - "description": "Provides an improved replacement for the array_replace PHP function", - "keywords": ["options", "config", "configuration"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/password-hasher/CHANGELOG.md b/vendor/symfony/password-hasher/CHANGELOG.md deleted file mode 100644 index 53ea3f1..0000000 --- a/vendor/symfony/password-hasher/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -5.3 ---- - - * Add the component - * Use `bcrypt` as default algorithm in `NativePasswordHasher` diff --git a/vendor/symfony/password-hasher/Command/UserPasswordHashCommand.php b/vendor/symfony/password-hasher/Command/UserPasswordHashCommand.php deleted file mode 100644 index 1d0e1d0..0000000 --- a/vendor/symfony/password-hasher/Command/UserPasswordHashCommand.php +++ /dev/null @@ -1,223 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -/** - * Hashes a user's password. - * - * @author Sarah Khalil - * @author Robin Chalas - * - * @final - */ -class UserPasswordHashCommand extends Command -{ - protected static $defaultName = 'security:hash-password'; - protected static $defaultDescription = 'Hash a user password'; - - private $hasherFactory; - private $userClasses; - - public function __construct(PasswordHasherFactoryInterface $hasherFactory, array $userClasses = []) - { - $this->hasherFactory = $hasherFactory; - $this->userClasses = $userClasses; - - parent::__construct(); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('password', InputArgument::OPTIONAL, 'The plain password to hash.') - ->addArgument('user-class', InputArgument::OPTIONAL, 'The User entity class path associated with the hasher used to hash the password.') - ->addOption('empty-salt', null, InputOption::VALUE_NONE, 'Do not generate a salt or let the hasher generate one.') - ->setHelp(<<%command.name%
    command hashes passwords according to your -security configuration. This command is mainly used to generate passwords for -the in_memory user provider type and for changing passwords -in the database while developing the application. - -Suppose that you have the following security configuration in your application: - - -# app/config/security.yml -security: - password_hashers: - Symfony\Component\Security\Core\User\InMemoryUser: plaintext - App\Entity\User: auto - - -If you execute the command non-interactively, the first available configured -user class under the security.password_hashers key is used and a random salt is -generated to hash the password: - - php %command.full_name% --no-interaction [password] - -Pass the full user class path as the second argument to hash passwords for -your own entities: - - php %command.full_name% --no-interaction [password] 'App\Entity\User' - -Executing the command interactively allows you to generate a random salt for -hashing the password: - - php %command.full_name% [password] 'App\Entity\User' - -In case your hasher doesn't require a salt, add the empty-salt option: - - php %command.full_name% --empty-salt [password] 'App\Entity\User' - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $output instanceof ConsoleOutputInterface ? new SymfonyStyle($input, $output->getErrorOutput()) : $io; - - $input->isInteractive() ? $errorIo->title('Symfony Password Hash Utility') : $errorIo->newLine(); - - $password = $input->getArgument('password'); - $userClass = $this->getUserClass($input, $io); - $emptySalt = $input->getOption('empty-salt'); - - $hasher = $this->hasherFactory->getPasswordHasher($userClass); - $saltlessWithoutEmptySalt = !$emptySalt && !$hasher instanceof LegacyPasswordHasherInterface; - - if ($saltlessWithoutEmptySalt) { - $emptySalt = true; - } - - if (!$password) { - if (!$input->isInteractive()) { - $errorIo->error('The password must not be empty.'); - - return 1; - } - $passwordQuestion = $this->createPasswordQuestion(); - $password = $errorIo->askQuestion($passwordQuestion); - } - - $salt = null; - - if ($input->isInteractive() && !$emptySalt) { - $emptySalt = true; - - $errorIo->note('The command will take care of generating a salt for you. Be aware that some hashers advise to let them generate their own salt. If you\'re using one of those hashers, please answer \'no\' to the question below. '.\PHP_EOL.'Provide the \'empty-salt\' option in order to let the hasher handle the generation itself.'); - - if ($errorIo->confirm('Confirm salt generation ?')) { - $salt = $this->generateSalt(); - $emptySalt = false; - } - } elseif (!$emptySalt) { - $salt = $this->generateSalt(); - } - - $hashedPassword = $hasher->hash($password, $salt); - - $rows = [ - ['Hasher used', \get_class($hasher)], - ['Password hash', $hashedPassword], - ]; - if (!$emptySalt) { - $rows[] = ['Generated salt', $salt]; - } - $io->table(['Key', 'Value'], $rows); - - if (!$emptySalt) { - $errorIo->note(sprintf('Make sure that your salt storage field fits the salt length: %s chars', \strlen($salt))); - } elseif ($saltlessWithoutEmptySalt) { - $errorIo->note('Self-salting hasher used: the hasher generated its own built-in salt.'); - } - - $errorIo->success('Password hashing succeeded'); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('user-class')) { - $suggestions->suggestValues($this->userClasses); - - return; - } - } - - /** - * Create the password question to ask the user for the password to be hashed. - */ - private function createPasswordQuestion(): Question - { - $passwordQuestion = new Question('Type in your password to be hashed'); - - return $passwordQuestion->setValidator(function ($value) { - if ('' === trim($value)) { - throw new InvalidArgumentException('The password must not be empty.'); - } - - return $value; - })->setHidden(true)->setMaxAttempts(20); - } - - private function generateSalt(): string - { - return base64_encode(random_bytes(30)); - } - - private function getUserClass(InputInterface $input, SymfonyStyle $io): string - { - if (null !== $userClass = $input->getArgument('user-class')) { - return $userClass; - } - - if (!$this->userClasses) { - throw new RuntimeException('There are no configured password hashers for the "security" extension.'); - } - - if (!$input->isInteractive() || 1 === \count($this->userClasses)) { - return reset($this->userClasses); - } - - $userClasses = $this->userClasses; - natcasesort($userClasses); - $userClasses = array_values($userClasses); - - return $io->choice('For which user class would you like to hash a password?', $userClasses, reset($userClasses)); - } -} diff --git a/vendor/symfony/password-hasher/Exception/ExceptionInterface.php b/vendor/symfony/password-hasher/Exception/ExceptionInterface.php deleted file mode 100644 index 2d80d8a..0000000 --- a/vendor/symfony/password-hasher/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Exception; - -/** - * Interface for exceptions thrown by the password-hasher component. - * - * @author Robin Chalas - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/password-hasher/Exception/InvalidPasswordException.php b/vendor/symfony/password-hasher/Exception/InvalidPasswordException.php deleted file mode 100644 index 30b09d8..0000000 --- a/vendor/symfony/password-hasher/Exception/InvalidPasswordException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Exception; - -/** - * @author Robin Chalas - */ -class InvalidPasswordException extends \RuntimeException implements ExceptionInterface -{ - public function __construct(string $message = 'Invalid password.', int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - } -} diff --git a/vendor/symfony/password-hasher/Exception/LogicException.php b/vendor/symfony/password-hasher/Exception/LogicException.php deleted file mode 100644 index f4d9f31..0000000 --- a/vendor/symfony/password-hasher/Exception/LogicException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Exception; - -/** - * @author Robin Chalas - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php b/vendor/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php deleted file mode 100644 index 2dce065..0000000 --- a/vendor/symfony/password-hasher/Hasher/CheckPasswordLengthTrait.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\PasswordHasherInterface; - -/** - * @author Robin Chalas - */ -trait CheckPasswordLengthTrait -{ - private function isPasswordTooLong(string $password): bool - { - return PasswordHasherInterface::MAX_PASSWORD_LENGTH < \strlen($password); - } -} diff --git a/vendor/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php b/vendor/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php deleted file mode 100644 index 5611049..0000000 --- a/vendor/symfony/password-hasher/Hasher/MessageDigestPasswordHasher.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\Exception\LogicException; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -/** - * MessageDigestPasswordHasher uses a message digest algorithm. - * - * @author Fabien Potencier - */ -class MessageDigestPasswordHasher implements LegacyPasswordHasherInterface -{ - use CheckPasswordLengthTrait; - - private $algorithm; - private $encodeHashAsBase64; - private $iterations = 1; - private $hashLength = -1; - - /** - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash - */ - public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase64 = true, int $iterations = 5000) - { - $this->algorithm = $algorithm; - $this->encodeHashAsBase64 = $encodeHashAsBase64; - - try { - $this->hashLength = \strlen($this->hash('', 'salt')); - } catch (\LogicException $e) { - // ignore algorithm not supported - } - - $this->iterations = $iterations; - } - - public function hash(string $plainPassword, string $salt = null): string - { - if ($this->isPasswordTooLong($plainPassword)) { - throw new InvalidPasswordException(); - } - - if (!\in_array($this->algorithm, hash_algos(), true)) { - throw new LogicException(sprintf('The algorithm "%s" is not supported.', $this->algorithm)); - } - - $salted = $this->mergePasswordAndSalt($plainPassword, $salt); - $digest = hash($this->algorithm, $salted, true); - - // "stretch" hash - for ($i = 1; $i < $this->iterations; ++$i) { - $digest = hash($this->algorithm, $digest.$salted, true); - } - - return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); - } - - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool - { - if (\strlen($hashedPassword) !== $this->hashLength || false !== strpos($hashedPassword, '$')) { - return false; - } - - return !$this->isPasswordTooLong($plainPassword) && hash_equals($hashedPassword, $this->hash($plainPassword, $salt)); - } - - public function needsRehash(string $hashedPassword): bool - { - return false; - } - - private function mergePasswordAndSalt(string $password, ?string $salt): string - { - if (!$salt) { - return $password; - } - - if (false !== strrpos($salt, '{') || false !== strrpos($salt, '}')) { - throw new \InvalidArgumentException('Cannot use { or } in salt.'); - } - - return $password.'{'.$salt.'}'; - } -} diff --git a/vendor/symfony/password-hasher/Hasher/MigratingPasswordHasher.php b/vendor/symfony/password-hasher/Hasher/MigratingPasswordHasher.php deleted file mode 100644 index 3b12408..0000000 --- a/vendor/symfony/password-hasher/Hasher/MigratingPasswordHasher.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\PasswordHasherInterface; - -/** - * Hashes passwords using the best available hasher. - * Verifies them using a chain of hashers. - * - * /!\ Don't put a PlaintextPasswordHasher in the list as that'd mean a leaked hash - * could be used to authenticate successfully without knowing the cleartext password. - * - * @author Nicolas Grekas - */ -final class MigratingPasswordHasher implements PasswordHasherInterface -{ - private $bestHasher; - private $extraHashers; - - public function __construct(PasswordHasherInterface $bestHasher, PasswordHasherInterface ...$extraHashers) - { - $this->bestHasher = $bestHasher; - $this->extraHashers = $extraHashers; - } - - public function hash(string $plainPassword, string $salt = null): string - { - return $this->bestHasher->hash($plainPassword, $salt); - } - - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool - { - if ($this->bestHasher->verify($hashedPassword, $plainPassword, $salt)) { - return true; - } - - if (!$this->bestHasher->needsRehash($hashedPassword)) { - return false; - } - - foreach ($this->extraHashers as $hasher) { - if ($hasher->verify($hashedPassword, $plainPassword, $salt)) { - return true; - } - } - - return false; - } - - public function needsRehash(string $hashedPassword): bool - { - return $this->bestHasher->needsRehash($hashedPassword); - } -} diff --git a/vendor/symfony/password-hasher/Hasher/NativePasswordHasher.php b/vendor/symfony/password-hasher/Hasher/NativePasswordHasher.php deleted file mode 100644 index 8933faa..0000000 --- a/vendor/symfony/password-hasher/Hasher/NativePasswordHasher.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; - -/** - * Hashes passwords using password_hash(). - * - * @author Elnur Abdurrakhimov - * @author Terje Bråten - * @author Nicolas Grekas - */ -final class NativePasswordHasher implements PasswordHasherInterface -{ - use CheckPasswordLengthTrait; - - private $algorithm = \PASSWORD_BCRYPT; - private $options; - - /** - * @param string|null $algorithm An algorithm supported by password_hash() or null to use the best available algorithm - */ - public function __construct(int $opsLimit = null, int $memLimit = null, int $cost = null, string $algorithm = null) - { - $cost = $cost ?? 13; - $opsLimit = $opsLimit ?? max(4, \defined('SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE : 4); - $memLimit = $memLimit ?? max(64 * 1024 * 1024, \defined('SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE : 64 * 1024 * 1024); - - if (3 > $opsLimit) { - throw new \InvalidArgumentException('$opsLimit must be 3 or greater.'); - } - - if (10 * 1024 > $memLimit) { - throw new \InvalidArgumentException('$memLimit must be 10k or greater.'); - } - - if ($cost < 4 || 31 < $cost) { - throw new \InvalidArgumentException('$cost must be in the range of 4-31.'); - } - - if (null !== $algorithm) { - $algorithms = [1 => \PASSWORD_BCRYPT, '2y' => \PASSWORD_BCRYPT]; - - if (\defined('PASSWORD_ARGON2I')) { - $algorithms[2] = $algorithms['argon2i'] = \PASSWORD_ARGON2I; - } - - if (\defined('PASSWORD_ARGON2ID')) { - $algorithms[3] = $algorithms['argon2id'] = \PASSWORD_ARGON2ID; - } - - $this->algorithm = $algorithms[$algorithm] ?? $algorithm; - } - - $this->options = [ - 'cost' => $cost, - 'time_cost' => $opsLimit, - 'memory_cost' => $memLimit >> 10, - 'threads' => 1, - ]; - } - - public function hash(string $plainPassword): string - { - if ($this->isPasswordTooLong($plainPassword)) { - throw new InvalidPasswordException(); - } - - if (\PASSWORD_BCRYPT === $this->algorithm && (72 < \strlen($plainPassword) || false !== strpos($plainPassword, "\0"))) { - $plainPassword = base64_encode(hash('sha512', $plainPassword, true)); - } - - return password_hash($plainPassword, $this->algorithm, $this->options); - } - - public function verify(string $hashedPassword, string $plainPassword): bool - { - if ('' === $plainPassword || $this->isPasswordTooLong($plainPassword)) { - return false; - } - - if (0 !== strpos($hashedPassword, '$argon')) { - // Bcrypt cuts on NUL chars and after 72 bytes - if (0 === strpos($hashedPassword, '$2') && (72 < \strlen($plainPassword) || false !== strpos($plainPassword, "\0"))) { - $plainPassword = base64_encode(hash('sha512', $plainPassword, true)); - } - - return password_verify($plainPassword, $hashedPassword); - } - - if (\extension_loaded('sodium') && version_compare(\SODIUM_LIBRARY_VERSION, '1.0.14', '>=')) { - return sodium_crypto_pwhash_str_verify($hashedPassword, $plainPassword); - } - - if (\extension_loaded('libsodium') && version_compare(phpversion('libsodium'), '1.0.14', '>=')) { - return \Sodium\crypto_pwhash_str_verify($hashedPassword, $plainPassword); - } - - return password_verify($plainPassword, $hashedPassword); - } - - /** - * {@inheritdoc} - */ - public function needsRehash(string $hashedPassword): bool - { - return password_needs_rehash($hashedPassword, $this->algorithm, $this->options); - } -} diff --git a/vendor/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php b/vendor/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php deleted file mode 100644 index 58046bc..0000000 --- a/vendor/symfony/password-hasher/Hasher/PasswordHasherAwareInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -/** - * @author Christophe Coevoet - */ -interface PasswordHasherAwareInterface -{ - /** - * Gets the name of the password hasher used to hash the password. - * - * If the method returns null, the standard way to retrieve the password hasher - * will be used instead. - */ - public function getPasswordHasherName(): ?string; -} diff --git a/vendor/symfony/password-hasher/Hasher/PasswordHasherFactory.php b/vendor/symfony/password-hasher/Hasher/PasswordHasherFactory.php deleted file mode 100644 index dd7e015..0000000 --- a/vendor/symfony/password-hasher/Hasher/PasswordHasherFactory.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\LogicException; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface; -use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; -use Symfony\Component\Security\Core\Encoder\PasswordHasherAdapter; - -/** - * A generic hasher factory implementation. - * - * @author Nicolas Grekas - * @author Robin Chalas - */ -class PasswordHasherFactory implements PasswordHasherFactoryInterface -{ - private $passwordHashers; - - /** - * @param array $passwordHashers - */ - public function __construct(array $passwordHashers) - { - $this->passwordHashers = $passwordHashers; - } - - /** - * {@inheritdoc} - */ - public function getPasswordHasher($user): PasswordHasherInterface - { - $hasherKey = null; - - if (($user instanceof PasswordHasherAwareInterface && null !== $hasherName = $user->getPasswordHasherName()) || ($user instanceof EncoderAwareInterface && null !== $hasherName = $user->getEncoderName())) { - if (!\array_key_exists($hasherName, $this->passwordHashers)) { - throw new \RuntimeException(sprintf('The password hasher "%s" was not configured.', $hasherName)); - } - - $hasherKey = $hasherName; - } else { - foreach ($this->passwordHashers as $class => $hasher) { - if ((\is_object($user) && $user instanceof $class) || (!\is_object($user) && (is_subclass_of($user, $class) || $user == $class))) { - $hasherKey = $class; - break; - } - } - } - - if (null === $hasherKey) { - throw new \RuntimeException(sprintf('No password hasher has been configured for account "%s".', \is_object($user) ? get_debug_type($user) : $user)); - } - - return $this->createHasherUsingAdapter($hasherKey); - } - - /** - * Creates the actual hasher instance. - * - * @throws \InvalidArgumentException - */ - private function createHasher(array $config, bool $isExtra = false): PasswordHasherInterface - { - if (isset($config['algorithm'])) { - $rawConfig = $config; - $config = $this->getHasherConfigFromAlgorithm($config); - } - if (!isset($config['class'])) { - throw new \InvalidArgumentException('"class" must be set in '.json_encode($config)); - } - if (!isset($config['arguments'])) { - throw new \InvalidArgumentException('"arguments" must be set in '.json_encode($config)); - } - - $hasher = new $config['class'](...$config['arguments']); - if (!$hasher instanceof PasswordHasherInterface && $hasher instanceof PasswordEncoderInterface) { - $hasher = new PasswordHasherAdapter($hasher); - } - - if ($isExtra || !\in_array($config['class'], [NativePasswordHasher::class, SodiumPasswordHasher::class], true)) { - return $hasher; - } - - if ($rawConfig ?? null) { - $extrapasswordHashers = array_map(function (string $algo) use ($rawConfig): PasswordHasherInterface { - $rawConfig['algorithm'] = $algo; - - return $this->createHasher($rawConfig); - }, ['pbkdf2', $rawConfig['hash_algorithm'] ?? 'sha512']); - } else { - $extrapasswordHashers = [new Pbkdf2PasswordHasher(), new MessageDigestPasswordHasher()]; - } - - return new MigratingPasswordHasher($hasher, ...$extrapasswordHashers); - } - - private function createHasherUsingAdapter(string $hasherKey): PasswordHasherInterface - { - if (!$this->passwordHashers[$hasherKey] instanceof PasswordHasherInterface) { - $this->passwordHashers[$hasherKey] = $this->passwordHashers[$hasherKey] instanceof PasswordEncoderInterface - ? new PasswordHasherAdapter($this->passwordHashers[$hasherKey]) - : $this->createHasher($this->passwordHashers[$hasherKey]) - ; - } - - return $this->passwordHashers[$hasherKey]; - } - - private function getHasherConfigFromAlgorithm(array $config): array - { - if ('auto' === $config['algorithm']) { - // "plaintext" is not listed as any leaked hashes could then be used to authenticate directly - if (SodiumPasswordHasher::isSupported()) { - $algorithms = ['native', 'sodium', 'pbkdf2']; - } else { - $algorithms = ['native', 'pbkdf2']; - } - - if ($config['hash_algorithm'] ?? '') { - $algorithms[] = $config['hash_algorithm']; - } - - $hasherChain = []; - foreach ($algorithms as $algorithm) { - $config['algorithm'] = $algorithm; - $hasherChain[] = $this->createHasher($config, true); - } - - return [ - 'class' => MigratingPasswordHasher::class, - 'arguments' => $hasherChain, - ]; - } - - if ($frompasswordHashers = ($config['migrate_from'] ?? false)) { - unset($config['migrate_from']); - $hasherChain = [$this->createHasher($config, true)]; - - foreach ($frompasswordHashers as $name) { - if (isset($this->passwordHashers[$name])) { - $hasher = $this->createHasherUsingAdapter($name); - } else { - $hasher = $this->createHasher(['algorithm' => $name], true); - } - - $hasherChain[] = $hasher; - } - - return [ - 'class' => MigratingPasswordHasher::class, - 'arguments' => $hasherChain, - ]; - } - - switch ($config['algorithm']) { - case 'plaintext': - return [ - 'class' => PlaintextPasswordHasher::class, - 'arguments' => [$config['ignore_case'] ?? false], - ]; - - case 'pbkdf2': - return [ - 'class' => Pbkdf2PasswordHasher::class, - 'arguments' => [ - $config['hash_algorithm'] ?? 'sha512', - $config['encode_as_base64'] ?? true, - $config['iterations'] ?? 1000, - $config['key_length'] ?? 40, - ], - ]; - - case 'bcrypt': - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_BCRYPT; - - return $this->getHasherConfigFromAlgorithm($config); - - case 'native': - return [ - 'class' => NativePasswordHasher::class, - 'arguments' => [ - $config['time_cost'] ?? null, - (($config['memory_cost'] ?? 0) << 10) ?: null, - $config['cost'] ?? null, - ] + (isset($config['native_algorithm']) ? [3 => $config['native_algorithm']] : []), - ]; - - case 'sodium': - return [ - 'class' => SodiumPasswordHasher::class, - 'arguments' => [ - $config['time_cost'] ?? null, - (($config['memory_cost'] ?? 0) << 10) ?: null, - ], - ]; - - case 'argon2i': - if (SodiumPasswordHasher::isSupported() && !\defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2I')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2I; - } else { - throw new LogicException(sprintf('Algorithm "argon2i" is not available. Use "%s" instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? 'argon2id" or "auto' : 'auto')); - } - - return $this->getHasherConfigFromAlgorithm($config); - - case 'argon2id': - if (($hasSodium = SodiumPasswordHasher::isSupported()) && \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2ID')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2ID; - } else { - throw new LogicException(sprintf('Algorithm "argon2id" is not available. Either use "%s", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? 'argon2i", "auto' : 'auto')); - } - - return $this->getHasherConfigFromAlgorithm($config); - } - - return [ - 'class' => MessageDigestPasswordHasher::class, - 'arguments' => [ - $config['algorithm'], - $config['encode_as_base64'] ?? true, - $config['iterations'] ?? 5000, - ], - ]; - } -} diff --git a/vendor/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php b/vendor/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php deleted file mode 100644 index fed2a77..0000000 --- a/vendor/symfony/password-hasher/Hasher/PasswordHasherFactoryInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; - -/** - * PasswordHasherFactoryInterface to support different password hashers for different user accounts. - * - * @author Robin Chalas - * @author Johannes M. Schmitt - */ -interface PasswordHasherFactoryInterface -{ - /** - * Returns the password hasher to use for the given user. - * - * @param PasswordHasherAwareInterface|PasswordAuthenticatedUserInterface|string $user - * - * @throws \RuntimeException When no password hasher could be found for the user - */ - public function getPasswordHasher($user): PasswordHasherInterface; -} diff --git a/vendor/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php b/vendor/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php deleted file mode 100644 index 57fbe07..0000000 --- a/vendor/symfony/password-hasher/Hasher/Pbkdf2PasswordHasher.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\Exception\LogicException; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -/** - * Pbkdf2PasswordHasher uses the PBKDF2 (Password-Based Key Derivation Function 2). - * - * Providing a high level of Cryptographic security, - * PBKDF2 is recommended by the National Institute of Standards and Technology (NIST). - * - * But also warrants a warning, using PBKDF2 (with a high number of iterations) slows down the process. - * PBKDF2 should be used with caution and care. - * - * @author Sebastiaan Stok - * @author Andrew Johnson - * @author Fabien Potencier - */ -final class Pbkdf2PasswordHasher implements LegacyPasswordHasherInterface -{ - use CheckPasswordLengthTrait; - - private $algorithm; - private $encodeHashAsBase64; - private $iterations = 1; - private $length; - private $encodedLength = -1; - - /** - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash - * @param int $length Length of derived key to create - */ - public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase64 = true, int $iterations = 1000, int $length = 40) - { - $this->algorithm = $algorithm; - $this->encodeHashAsBase64 = $encodeHashAsBase64; - $this->length = $length; - - try { - $this->encodedLength = \strlen($this->hash('', 'salt')); - } catch (\LogicException $e) { - // ignore unsupported algorithm - } - - $this->iterations = $iterations; - } - - public function hash(string $plainPassword, string $salt = null): string - { - if ($this->isPasswordTooLong($plainPassword)) { - throw new InvalidPasswordException(); - } - - if (!\in_array($this->algorithm, hash_algos(), true)) { - throw new LogicException(sprintf('The algorithm "%s" is not supported.', $this->algorithm)); - } - - $digest = hash_pbkdf2($this->algorithm, $plainPassword, $salt, $this->iterations, $this->length, true); - - return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); - } - - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool - { - if (\strlen($hashedPassword) !== $this->encodedLength || false !== strpos($hashedPassword, '$')) { - return false; - } - - return !$this->isPasswordTooLong($plainPassword) && hash_equals($hashedPassword, $this->hash($plainPassword, $salt)); - } - - public function needsRehash(string $hashedPassword): bool - { - return false; - } -} diff --git a/vendor/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php b/vendor/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php deleted file mode 100644 index d9a0557..0000000 --- a/vendor/symfony/password-hasher/Hasher/PlaintextPasswordHasher.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -/** - * PlaintextPasswordHasher does not do any hashing but is useful in testing environments. - * - * As this hasher is not cryptographically secure, usage of it in production environments is discouraged. - * - * @author Fabien Potencier - */ -class PlaintextPasswordHasher implements LegacyPasswordHasherInterface -{ - use CheckPasswordLengthTrait; - - private $ignorePasswordCase; - - /** - * @param bool $ignorePasswordCase Compare password case-insensitive - */ - public function __construct(bool $ignorePasswordCase = false) - { - $this->ignorePasswordCase = $ignorePasswordCase; - } - - /** - * {@inheritdoc} - */ - public function hash(string $plainPassword, string $salt = null): string - { - if ($this->isPasswordTooLong($plainPassword)) { - throw new InvalidPasswordException(); - } - - return $this->mergePasswordAndSalt($plainPassword, $salt); - } - - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool - { - if ($this->isPasswordTooLong($plainPassword)) { - return false; - } - - $pass2 = $this->mergePasswordAndSalt($plainPassword, $salt); - - if (!$this->ignorePasswordCase) { - return hash_equals($hashedPassword, $pass2); - } - - return hash_equals(strtolower($hashedPassword), strtolower($pass2)); - } - - public function needsRehash(string $hashedPassword): bool - { - return false; - } - - private function mergePasswordAndSalt(string $password, ?string $salt): string - { - if (empty($salt)) { - return $password; - } - - if (false !== strrpos($salt, '{') || false !== strrpos($salt, '}')) { - throw new \InvalidArgumentException('Cannot use { or } in salt.'); - } - - return $password.'{'.$salt.'}'; - } -} diff --git a/vendor/symfony/password-hasher/Hasher/SodiumPasswordHasher.php b/vendor/symfony/password-hasher/Hasher/SodiumPasswordHasher.php deleted file mode 100644 index 2a22b82..0000000 --- a/vendor/symfony/password-hasher/Hasher/SodiumPasswordHasher.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\Exception\LogicException; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; - -/** - * Hashes passwords using libsodium. - * - * @author Robin Chalas - * @author Zan Baldwin - * @author Dominik Müller - */ -final class SodiumPasswordHasher implements PasswordHasherInterface -{ - use CheckPasswordLengthTrait; - - private $opsLimit; - private $memLimit; - - public function __construct(int $opsLimit = null, int $memLimit = null) - { - if (!self::isSupported()) { - throw new LogicException('Libsodium is not available. You should either install the sodium extension or use a different password hasher.'); - } - - $this->opsLimit = $opsLimit ?? max(4, \defined('SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE : 4); - $this->memLimit = $memLimit ?? max(64 * 1024 * 1024, \defined('SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE') ? \SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE : 64 * 1024 * 1024); - - if (3 > $this->opsLimit) { - throw new \InvalidArgumentException('$opsLimit must be 3 or greater.'); - } - - if (10 * 1024 > $this->memLimit) { - throw new \InvalidArgumentException('$memLimit must be 10k or greater.'); - } - } - - public static function isSupported(): bool - { - return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.14', '>='); - } - - public function hash(string $plainPassword): string - { - if ($this->isPasswordTooLong($plainPassword)) { - throw new InvalidPasswordException(); - } - - if (\function_exists('sodium_crypto_pwhash_str')) { - return sodium_crypto_pwhash_str($plainPassword, $this->opsLimit, $this->memLimit); - } - - if (\extension_loaded('libsodium')) { - return \Sodium\crypto_pwhash_str($plainPassword, $this->opsLimit, $this->memLimit); - } - - throw new LogicException('Libsodium is not available. You should either install the sodium extension or use a different password hasher.'); - } - - public function verify(string $hashedPassword, string $plainPassword): bool - { - if ('' === $plainPassword) { - return false; - } - - if ($this->isPasswordTooLong($plainPassword)) { - return false; - } - - if (0 !== strpos($hashedPassword, '$argon')) { - if (0 === strpos($hashedPassword, '$2') && (72 < \strlen($plainPassword) || false !== strpos($plainPassword, "\0"))) { - $plainPassword = base64_encode(hash('sha512', $plainPassword, true)); - } - - // Accept validating non-argon passwords for seamless migrations - return password_verify($plainPassword, $hashedPassword); - } - - if (\function_exists('sodium_crypto_pwhash_str_verify')) { - return sodium_crypto_pwhash_str_verify($hashedPassword, $plainPassword); - } - - if (\extension_loaded('libsodium')) { - return \Sodium\crypto_pwhash_str_verify($hashedPassword, $plainPassword); - } - - return false; - } - - public function needsRehash(string $hashedPassword): bool - { - if (\function_exists('sodium_crypto_pwhash_str_needs_rehash')) { - return sodium_crypto_pwhash_str_needs_rehash($hashedPassword, $this->opsLimit, $this->memLimit); - } - - if (\extension_loaded('libsodium')) { - return \Sodium\crypto_pwhash_str_needs_rehash($hashedPassword, $this->opsLimit, $this->memLimit); - } - - throw new LogicException('Libsodium is not available. You should either install the sodium extension or use a different password hasher.'); - } -} diff --git a/vendor/symfony/password-hasher/Hasher/UserPasswordHasher.php b/vendor/symfony/password-hasher/Hasher/UserPasswordHasher.php deleted file mode 100644 index 1c73d53..0000000 --- a/vendor/symfony/password-hasher/Hasher/UserPasswordHasher.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Hashes passwords based on the user and the PasswordHasherFactory. - * - * @author Ariel Ferrandini - * - * @final - */ -class UserPasswordHasher implements UserPasswordHasherInterface -{ - private $hasherFactory; - - public function __construct(PasswordHasherFactoryInterface $hasherFactory) - { - $this->hasherFactory = $hasherFactory; - } - - /** - * @param PasswordAuthenticatedUserInterface $user - */ - public function hashPassword($user, string $plainPassword): string - { - if (!$user instanceof PasswordAuthenticatedUserInterface) { - if (!$user instanceof UserInterface) { - throw new \TypeError(sprintf('Expected an instance of "%s" as first argument, but got "%s".', UserInterface::class, get_debug_type($user))); - } - trigger_deprecation('symfony/password-hasher', '5.3', 'The "%s()" method expects a "%s" instance as first argument. Not implementing it in class "%s" is deprecated.', __METHOD__, PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $salt = null; - - if ($user instanceof LegacyPasswordAuthenticatedUserInterface) { - $salt = $user->getSalt(); - } elseif ($user instanceof UserInterface) { - $salt = method_exists($user, 'getSalt') ? $user->getSalt() : null; - - if ($salt) { - trigger_deprecation('symfony/password-hasher', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - } - - $hasher = $this->hasherFactory->getPasswordHasher($user); - - return $hasher->hash($plainPassword, $salt); - } - - /** - * @param PasswordAuthenticatedUserInterface $user - */ - public function isPasswordValid($user, string $plainPassword): bool - { - if (!$user instanceof PasswordAuthenticatedUserInterface) { - if (!$user instanceof UserInterface) { - throw new \TypeError(sprintf('Expected an instance of "%s" as first argument, but got "%s".', UserInterface::class, get_debug_type($user))); - } - trigger_deprecation('symfony/password-hasher', '5.3', 'The "%s()" method expects a "%s" instance as first argument. Not implementing it in class "%s" is deprecated.', __METHOD__, PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $salt = null; - - if ($user instanceof LegacyPasswordAuthenticatedUserInterface) { - $salt = $user->getSalt(); - } elseif ($user instanceof UserInterface) { - $salt = $user->getSalt(); - - if (null !== $salt) { - trigger_deprecation('symfony/password-hasher', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - } - - if (null === $user->getPassword()) { - return false; - } - - $hasher = $this->hasherFactory->getPasswordHasher($user); - - return $hasher->verify($user->getPassword(), $plainPassword, $salt); - } - - /** - * @param PasswordAuthenticatedUserInterface $user - */ - public function needsRehash($user): bool - { - if (null === $user->getPassword()) { - return false; - } - - if (!$user instanceof PasswordAuthenticatedUserInterface) { - if (!$user instanceof UserInterface) { - throw new \TypeError(sprintf('Expected an instance of "%s" as first argument, but got "%s".', UserInterface::class, get_debug_type($user))); - } - trigger_deprecation('symfony/password-hasher', '5.3', 'The "%s()" method expects a "%s" instance as first argument. Not implementing it in class "%s" is deprecated.', __METHOD__, PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $hasher = $this->hasherFactory->getPasswordHasher($user); - - return $hasher->needsRehash($user->getPassword()); - } -} diff --git a/vendor/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php b/vendor/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php deleted file mode 100644 index cf29220..0000000 --- a/vendor/symfony/password-hasher/Hasher/UserPasswordHasherInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher\Hasher; - -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; - -/** - * Interface for the user password hasher service. - * - * @author Ariel Ferrandini - * - * @method string hashPassword(PasswordAuthenticatedUserInterface $user, string $plainPassword) Hashes the plain password for the given user. - * @method bool isPasswordValid(PasswordAuthenticatedUserInterface $user, string $plainPassword) Checks if the plaintext password matches the user's password. - * @method bool needsRehash(PasswordAuthenticatedUserInterface $user) Checks if an encoded password would benefit from rehashing. - */ -interface UserPasswordHasherInterface -{ -} diff --git a/vendor/symfony/password-hasher/LICENSE b/vendor/symfony/password-hasher/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/password-hasher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/password-hasher/LegacyPasswordHasherInterface.php b/vendor/symfony/password-hasher/LegacyPasswordHasherInterface.php deleted file mode 100644 index 7897b00..0000000 --- a/vendor/symfony/password-hasher/LegacyPasswordHasherInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; - -/** - * Provides password hashing and verification capabilities for "legacy" hashers that require external salts. - * - * @author Fabien Potencier - * @author Nicolas Grekas - * @author Robin Chalas - */ -interface LegacyPasswordHasherInterface extends PasswordHasherInterface -{ - /** - * Hashes a plain password. - * - * @throws InvalidPasswordException If the plain password is invalid, e.g. excessively long - */ - public function hash(string $plainPassword, string $salt = null): string; - - /** - * Checks that a plain password and a salt match a password hash. - */ - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool; -} diff --git a/vendor/symfony/password-hasher/PasswordHasherInterface.php b/vendor/symfony/password-hasher/PasswordHasherInterface.php deleted file mode 100644 index 6b35757..0000000 --- a/vendor/symfony/password-hasher/PasswordHasherInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PasswordHasher; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; - -/** - * Provides password hashing capabilities. - * - * @author Robin Chalas - * @author Fabien Potencier - * @author Nicolas Grekas - */ -interface PasswordHasherInterface -{ - public const MAX_PASSWORD_LENGTH = 4096; - - /** - * Hashes a plain password. - * - * @throws InvalidPasswordException When the plain password is invalid, e.g. excessively long - */ - public function hash(string $plainPassword): string; - - /** - * Verifies a plain password against a hash. - */ - public function verify(string $hashedPassword, string $plainPassword): bool; - - /** - * Checks if a password hash would benefit from rehashing. - */ - public function needsRehash(string $hashedPassword): bool; -} diff --git a/vendor/symfony/password-hasher/README.md b/vendor/symfony/password-hasher/README.md deleted file mode 100644 index 0878746..0000000 --- a/vendor/symfony/password-hasher/README.md +++ /dev/null @@ -1,40 +0,0 @@ -PasswordHasher Component -======================== - -The PasswordHasher component provides secure password hashing utilities. - -Getting Started ---------------- - -``` -$ composer require symfony/password-hasher -``` - -```php -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory; - -// Configure different password hashers via the factory -$factory = new PasswordHasherFactory([ - 'common' => ['algorithm' => 'bcrypt'], - 'memory-hard' => ['algorithm' => 'sodium'], -]); - -// Retrieve the right password hasher by its name -$passwordHasher = $factory->getPasswordHasher('common'); - -// Hash a plain password -$hash = $passwordHasher->hash('plain'); // returns a bcrypt hash - -// Verify that a given plain password matches the hash -$passwordHasher->verify($hash, 'wrong'); // returns false -$passwordHasher->verify($hash, 'plain'); // returns true (valid) -``` - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/security.html#c-hashing-passwords) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/password-hasher/composer.json b/vendor/symfony/password-hasher/composer.json deleted file mode 100644 index ccea812..0000000 --- a/vendor/symfony/password-hasher/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/password-hasher", - "type": "library", - "description": "Provides password hashing utilities", - "keywords": ["password", "hashing"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Robin Chalas", - "email": "robin.chalas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" - }, - "require-dev": { - "symfony/security-core": "^5.3|^6.0", - "symfony/console": "^5.3|^6.0" - }, - "conflict": { - "symfony/security-core": "<5.3" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\PasswordHasher\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/polyfill-intl-grapheme/Grapheme.php b/vendor/symfony/polyfill-intl-grapheme/Grapheme.php deleted file mode 100644 index 6f7c0c7..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/Grapheme.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Grapheme; - -\define('SYMFONY_GRAPHEME_CLUSTER_RX', ((float) \PCRE_VERSION < 10 ? (float) \PCRE_VERSION >= 8.32 : (float) \PCRE_VERSION >= 10.39) ? '\X' : Grapheme::GRAPHEME_CLUSTER_RX); - -/** - * Partial intl implementation in pure PHP. - * - * Implemented: - * - grapheme_extract - Extract a sequence of grapheme clusters from a text buffer, which must be encoded in UTF-8 - * - grapheme_stripos - Find position (in grapheme units) of first occurrence of a case-insensitive string - * - grapheme_stristr - Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack - * - grapheme_strlen - Get string length in grapheme units - * - grapheme_strpos - Find position (in grapheme units) of first occurrence of a string - * - grapheme_strripos - Find position (in grapheme units) of last occurrence of a case-insensitive string - * - grapheme_strrpos - Find position (in grapheme units) of last occurrence of a string - * - grapheme_strstr - Returns part of haystack string from the first occurrence of needle to the end of haystack - * - grapheme_substr - Return part of a string - * - * @author Nicolas Grekas - * - * @internal - */ -final class Grapheme -{ - // (CRLF|([ZWNJ-ZWJ]|T+|L*(LV?V+|LV|LVT)T*|L+|[^Control])[Extend]*|[Control]) - // This regular expression is a work around for http://bugs.exim.org/1279 - public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])'; - - private const CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0) - { - if (0 > $start) { - $start = \strlen($s) + $start; - } - - if (!is_scalar($s)) { - $hasError = false; - set_error_handler(function () use (&$hasError) { $hasError = true; }); - $next = substr($s, $start); - restore_error_handler(); - if ($hasError) { - substr($s, $start); - $s = ''; - } else { - $s = $next; - } - } else { - $s = substr($s, $start); - } - $size = (int) $size; - $type = (int) $type; - $start = (int) $start; - - if (\GRAPHEME_EXTR_COUNT !== $type && \GRAPHEME_EXTR_MAXBYTES !== $type && \GRAPHEME_EXTR_MAXCHARS !== $type) { - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('grapheme_extract(): Argument #3 ($type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS'); - } - - if (!isset($s[0]) || 0 > $size || 0 > $start) { - return false; - } - if (0 === $size) { - return ''; - } - - $next = $start; - - $s = preg_split('/('.SYMFONY_GRAPHEME_CLUSTER_RX.')/u', "\r\n".$s, $size + 1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); - - if (!isset($s[1])) { - return false; - } - - $i = 1; - $ret = ''; - - do { - if (\GRAPHEME_EXTR_COUNT === $type) { - --$size; - } elseif (\GRAPHEME_EXTR_MAXBYTES === $type) { - $size -= \strlen($s[$i]); - } else { - $size -= iconv_strlen($s[$i], 'UTF-8//IGNORE'); - } - - if ($size >= 0) { - $ret .= $s[$i]; - } - } while (isset($s[++$i]) && $size > 0); - - $next += \strlen($ret); - - return $ret; - } - - public static function grapheme_strlen($s) - { - preg_replace('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', '', $s, -1, $len); - - return 0 === $len && '' !== $s ? null : $len; - } - - public static function grapheme_substr($s, $start, $len = null) - { - if (null === $len) { - $len = 2147483647; - } - - preg_match_all('/'.SYMFONY_GRAPHEME_CLUSTER_RX.'/u', $s, $s); - - $slen = \count($s[0]); - $start = (int) $start; - - if (0 > $start) { - $start += $slen; - } - if (0 > $start) { - if (\PHP_VERSION_ID < 80000) { - return false; - } - - $start = 0; - } - if ($start >= $slen) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - - $rem = $slen - $start; - - if (0 > $len) { - $len += $rem; - } - if (0 === $len) { - return ''; - } - if (0 > $len) { - return \PHP_VERSION_ID >= 80000 ? '' : false; - } - if ($len > $rem) { - $len = $rem; - } - - return implode('', \array_slice($s[0], $start, $len)); - } - - public static function grapheme_strpos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 0); - } - - public static function grapheme_stripos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 1); - } - - public static function grapheme_strrpos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 2); - } - - public static function grapheme_strripos($s, $needle, $offset = 0) - { - return self::grapheme_position($s, $needle, $offset, 3); - } - - public static function grapheme_stristr($s, $needle, $beforeNeedle = false) - { - return mb_stristr($s, $needle, $beforeNeedle, 'UTF-8'); - } - - public static function grapheme_strstr($s, $needle, $beforeNeedle = false) - { - return mb_strstr($s, $needle, $beforeNeedle, 'UTF-8'); - } - - private static function grapheme_position($s, $needle, $offset, $mode) - { - $needle = (string) $needle; - if (80000 > \PHP_VERSION_ID && !preg_match('/./us', $needle)) { - return false; - } - $s = (string) $s; - if (!preg_match('/./us', $s)) { - return false; - } - if ($offset > 0) { - $s = self::grapheme_substr($s, $offset); - } elseif ($offset < 0) { - if (2 > $mode) { - $offset += self::grapheme_strlen($s); - $s = self::grapheme_substr($s, $offset); - if (0 > $offset) { - $offset = 0; - } - } elseif (0 > $offset += self::grapheme_strlen($needle)) { - $s = self::grapheme_substr($s, 0, $offset); - $offset = 0; - } else { - $offset = 0; - } - } - - // As UTF-8 is self-synchronizing, and we have ensured the strings are valid UTF-8, - // we can use normal binary string functions here. For case-insensitive searches, - // case fold the strings first. - $caseInsensitive = $mode & 1; - $reverse = $mode & 2; - if ($caseInsensitive) { - // Use the same case folding mode as mbstring does for mb_stripos(). - // Stick to SIMPLE case folding to avoid changing the length of the string, which - // might result in offsets being shifted. - $mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_LOWER; - $s = mb_convert_case($s, $mode, 'UTF-8'); - $needle = mb_convert_case($needle, $mode, 'UTF-8'); - - if (!\defined('MB_CASE_FOLD_SIMPLE')) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); - $needle = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $needle); - } - } - if ($reverse) { - $needlePos = strrpos($s, $needle); - } else { - $needlePos = strpos($s, $needle); - } - - return false !== $needlePos ? self::grapheme_strlen(substr($s, 0, $needlePos)) + $offset : false; - } -} diff --git a/vendor/symfony/polyfill-intl-grapheme/LICENSE b/vendor/symfony/polyfill-intl-grapheme/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-intl-grapheme/README.md b/vendor/symfony/polyfill-intl-grapheme/README.md deleted file mode 100644 index 77523ea..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/README.md +++ /dev/null @@ -1,31 +0,0 @@ -Symfony Polyfill / Intl: Grapheme -================================= - -This component provides a partial, native PHP implementation of the -[Grapheme functions](https://php.net/intl.grapheme) from the -[Intl](https://php.net/intl) extension. - -- [`grapheme_extract`](https://php.net/grapheme_extract): Extract a sequence of grapheme - clusters from a text buffer, which must be encoded in UTF-8 -- [`grapheme_stripos`](https://php.net/grapheme_stripos): Find position (in grapheme units) - of first occurrence of a case-insensitive string -- [`grapheme_stristr`](https://php.net/grapheme_stristr): Returns part of haystack string - from the first occurrence of case-insensitive needle to the end of haystack -- [`grapheme_strlen`](https://php.net/grapheme_strlen): Get string length in grapheme units -- [`grapheme_strpos`](https://php.net/grapheme_strpos): Find position (in grapheme units) - of first occurrence of a string -- [`grapheme_strripos`](https://php.net/grapheme_strripos): Find position (in grapheme units) - of last occurrence of a case-insensitive string -- [`grapheme_strrpos`](https://php.net/grapheme_strrpos): Find position (in grapheme units) - of last occurrence of a string -- [`grapheme_strstr`](https://php.net/grapheme_strstr): Returns part of haystack string from - the first occurrence of needle to the end of haystack -- [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-intl-grapheme/bootstrap.php b/vendor/symfony/polyfill-intl-grapheme/bootstrap.php deleted file mode 100644 index a9ea03c..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/bootstrap.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Grapheme as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!defined('GRAPHEME_EXTR_COUNT')) { - define('GRAPHEME_EXTR_COUNT', 0); -} -if (!defined('GRAPHEME_EXTR_MAXBYTES')) { - define('GRAPHEME_EXTR_MAXBYTES', 1); -} -if (!defined('GRAPHEME_EXTR_MAXCHARS')) { - define('GRAPHEME_EXTR_MAXCHARS', 2); -} - -if (!function_exists('grapheme_extract')) { - function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) { return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); } -} -if (!function_exists('grapheme_stripos')) { - function grapheme_stripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_stristr')) { - function grapheme_stristr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); } -} -if (!function_exists('grapheme_strlen')) { - function grapheme_strlen($input) { return p\Grapheme::grapheme_strlen($input); } -} -if (!function_exists('grapheme_strpos')) { - function grapheme_strpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strripos')) { - function grapheme_strripos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strrpos')) { - function grapheme_strrpos($haystack, $needle, $offset = 0) { return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); } -} -if (!function_exists('grapheme_strstr')) { - function grapheme_strstr($haystack, $needle, $beforeNeedle = false) { return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); } -} -if (!function_exists('grapheme_substr')) { - function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); } -} diff --git a/vendor/symfony/polyfill-intl-grapheme/bootstrap80.php b/vendor/symfony/polyfill-intl-grapheme/bootstrap80.php deleted file mode 100644 index b8c0786..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/bootstrap80.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Grapheme as p; - -if (!defined('GRAPHEME_EXTR_COUNT')) { - define('GRAPHEME_EXTR_COUNT', 0); -} -if (!defined('GRAPHEME_EXTR_MAXBYTES')) { - define('GRAPHEME_EXTR_MAXBYTES', 1); -} -if (!defined('GRAPHEME_EXTR_MAXCHARS')) { - define('GRAPHEME_EXTR_MAXCHARS', 2); -} - -if (!function_exists('grapheme_extract')) { - function grapheme_extract(?string $haystack, ?int $size, ?int $type = GRAPHEME_EXTR_COUNT, ?int $offset = 0, &$next = null): string|false { return p\Grapheme::grapheme_extract((string) $haystack, (int) $size, (int) $type, (int) $offset, $next); } -} -if (!function_exists('grapheme_stripos')) { - function grapheme_stripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_stripos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_stristr')) { - function grapheme_stristr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_stristr((string) $haystack, (string) $needle, (bool) $beforeNeedle); } -} -if (!function_exists('grapheme_strlen')) { - function grapheme_strlen(?string $string): int|false|null { return p\Grapheme::grapheme_strlen((string) $string); } -} -if (!function_exists('grapheme_strpos')) { - function grapheme_strpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strpos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strripos')) { - function grapheme_strripos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strripos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strrpos')) { - function grapheme_strrpos(?string $haystack, ?string $needle, ?int $offset = 0): int|false { return p\Grapheme::grapheme_strrpos((string) $haystack, (string) $needle, (int) $offset); } -} -if (!function_exists('grapheme_strstr')) { - function grapheme_strstr(?string $haystack, ?string $needle, ?bool $beforeNeedle = false): string|false { return p\Grapheme::grapheme_strstr((string) $haystack, (string) $needle, (bool) $beforeNeedle); } -} -if (!function_exists('grapheme_substr')) { - function grapheme_substr(?string $string, ?int $offset, ?int $length = null): string|false { return p\Grapheme::grapheme_substr((string) $string, (int) $offset, $length); } -} diff --git a/vendor/symfony/polyfill-intl-grapheme/composer.json b/vendor/symfony/polyfill-intl-grapheme/composer.json deleted file mode 100644 index 02c98ee..0000000 --- a/vendor/symfony/polyfill-intl-grapheme/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/polyfill-intl-grapheme", - "type": "library", - "description": "Symfony polyfill for intl's grapheme_* functions", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "grapheme"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-intl": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Collator.php b/vendor/symfony/polyfill-intl-icu/Collator.php deleted file mode 100644 index 685522b..0000000 --- a/vendor/symfony/polyfill-intl-icu/Collator.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \Collator} class. - * - * The only methods currently supported in this class are: - * - * - {@link \__construct} - * - {@link create} - * - {@link asort} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - * @author Igor Wiedler - * @author Bernhard Schussek - * - * @internal - */ -abstract class Collator -{ - /* Attribute constants */ - public const FRENCH_COLLATION = 0; - public const ALTERNATE_HANDLING = 1; - public const CASE_FIRST = 2; - public const CASE_LEVEL = 3; - public const NORMALIZATION_MODE = 4; - public const STRENGTH = 5; - public const HIRAGANA_QUATERNARY_MODE = 6; - public const NUMERIC_COLLATION = 7; - - /* Attribute constants values */ - public const DEFAULT_VALUE = -1; - - public const PRIMARY = 0; - public const SECONDARY = 1; - public const TERTIARY = 2; - public const DEFAULT_STRENGTH = 2; - public const QUATERNARY = 3; - public const IDENTICAL = 15; - - public const OFF = 16; - public const ON = 17; - - public const SHIFTED = 20; - public const NON_IGNORABLE = 21; - - public const LOWER_FIRST = 24; - public const UPPER_FIRST = 25; - - /* Sorting options */ - public const SORT_REGULAR = 0; - public const SORT_NUMERIC = 2; - public const SORT_STRING = 1; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - */ - public function __construct(?string $locale) - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * - * @return static - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - */ - public static function create(?string $locale) - { - return new static($locale); - } - - /** - * Sort array maintaining index association. - * - * @param array &$array Input array - * @param int $flags Flags for sorting, can be one of the following: - * Collator::SORT_REGULAR - compare items normally (don't change types) - * Collator::SORT_NUMERIC - compare items numerically - * Collator::SORT_STRING - compare items as strings - * - * @return bool True on success or false on failure - */ - public function asort(array &$array, int $flags = self::SORT_REGULAR) - { - $intlToPlainFlagMap = [ - self::SORT_REGULAR => \SORT_REGULAR, - self::SORT_NUMERIC => \SORT_NUMERIC, - self::SORT_STRING => \SORT_STRING, - ]; - - $plainSortFlag = $intlToPlainFlagMap[$flags] ?? self::SORT_REGULAR; - - return asort($array, $plainSortFlag); - } - - /** - * Not supported. Compare two Unicode strings. - * - * @return bool|int - * - * @see https://php.net/collator.compare - * - * @throws MethodNotImplementedException - */ - public function compare(string $string1, string $string2) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Get a value of an integer collator attribute. - * - * @return bool|int The attribute value on success or false on error - * - * @see https://php.net/collator.getattribute - * - * @throws MethodNotImplementedException - */ - public function getAttribute(int $attribute) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns collator's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last collator call - */ - public function getErrorCode() - { - return Icu::U_ZERO_ERROR; - } - - /** - * Returns collator's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last collator call - */ - public function getErrorMessage() - { - return 'U_ZERO_ERROR'; - } - - /** - * Returns the collator's locale. - * - * @return string The locale used to create the collator. Currently always - * returns "en". - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Not supported. Get sorting key for a string. - * - * @return string The collation key for $string - * - * @see https://php.net/collator.getsortkey - * - * @throws MethodNotImplementedException - */ - public function getSortKey(string $string) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Get current collator's strength. - * - * @return bool|int The current collator's strength or false on failure - * - * @see https://php.net/collator.getstrength - * - * @throws MethodNotImplementedException - */ - public function getStrength() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set a collator's attribute. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.setattribute - * - * @throws MethodNotImplementedException - */ - public function setAttribute(int $attribute, int $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set the collator's strength. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.setstrength - * - * @throws MethodNotImplementedException - */ - public function setStrength(int $strength) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sort array using specified collator and sort keys. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.sortwithsortkeys - * - * @throws MethodNotImplementedException - */ - public function sortWithSortKeys(array &$array) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sort array using specified collator. - * - * @return bool True on success or false on failure - * - * @see https://php.net/collator.sort - * - * @throws MethodNotImplementedException - */ - public function sort(array &$array, int $flags = self::SORT_REGULAR) - { - throw new MethodNotImplementedException(__METHOD__); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Currencies.php b/vendor/symfony/polyfill-intl-icu/Currencies.php deleted file mode 100644 index 90b1efa..0000000 --- a/vendor/symfony/polyfill-intl-icu/Currencies.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Currencies -{ - private static $data; - - public static function getSymbol(string $currency): ?string - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][0] ?? $data[strtoupper($currency)][0] ?? null; - } - - public static function getFractionDigits(string $currency): int - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][1] ?? $data[strtoupper($currency)][1] ?? $data['DEFAULT'][1]; - } - - public static function getRoundingIncrement(string $currency): int - { - $data = self::$data ?? self::$data = require __DIR__.'/Resources/currencies.php'; - - return $data[$currency][2] ?? $data[strtoupper($currency)][2] ?? $data['DEFAULT'][2]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php deleted file mode 100644 index 931e844..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/AmPmTransformer.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for AM/PM markers format. - * - * @author Igor Wiedler - * - * @internal - */ -class AmPmTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - return $dateTime->format('A'); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 'AM|PM'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'marker' => $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php deleted file mode 100644 index 19c4994..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfWeekTransformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day of week format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayOfWeekTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $dayOfWeek = $dateTime->format('l'); - switch ($length) { - case 4: - return $dayOfWeek; - case 5: - return $dayOfWeek[0]; - case 6: - return substr($dayOfWeek, 0, 2); - default: - return substr($dayOfWeek, 0, 3); - } - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 4: - return 'Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday'; - case 5: - return '[MTWFS]'; - case 6: - return 'Mo|Tu|We|Th|Fr|Sa|Su'; - default: - return 'Mon|Tue|Wed|Thu|Fri|Sat|Sun'; - } - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php deleted file mode 100644 index 5db0930..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/DayOfYearTransformer.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day of year format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayOfYearTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $dayOfYear = (int) $dateTime->format('z') + 1; - - return $this->padLeft($dayOfYear, $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return '\d{'.$length.'}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php deleted file mode 100644 index db4b57b..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/DayTransformer.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for day format. - * - * @author Igor Wiedler - * - * @internal - */ -class DayTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('j'), $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{1,'.$length.'}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'day' => (int) $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php deleted file mode 100644 index 02d071d..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/FullTransformer.php +++ /dev/null @@ -1,312 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; -use Symfony\Polyfill\Intl\Icu\Icu; - -/** - * Parser and formatter for date formats. - * - * @author Igor Wiedler - * - * @internal - */ -class FullTransformer -{ - private $quoteMatch = "'(?:[^']+|'')*'"; - private $implementedChars = 'MLydQqhDEaHkKmsz'; - private $notImplementedChars = 'GYuwWFgecSAZvVW'; - private $regExp; - - /** - * @var Transformer[] - */ - private $transformers; - - private $pattern; - private $timezone; - - /** - * @param string $pattern The pattern to be used to format and/or parse values - * @param string $timezone The timezone to perform the date/time calculations - */ - public function __construct(string $pattern, string $timezone) - { - $this->pattern = $pattern; - $this->timezone = $timezone; - - $implementedCharsMatch = $this->buildCharsMatch($this->implementedChars); - $notImplementedCharsMatch = $this->buildCharsMatch($this->notImplementedChars); - $this->regExp = "/($this->quoteMatch|$implementedCharsMatch|$notImplementedCharsMatch)/"; - - $this->transformers = [ - 'M' => new MonthTransformer(), - 'L' => new MonthTransformer(), - 'y' => new YearTransformer(), - 'd' => new DayTransformer(), - 'q' => new QuarterTransformer(), - 'Q' => new QuarterTransformer(), - 'h' => new Hour1201Transformer(), - 'D' => new DayOfYearTransformer(), - 'E' => new DayOfWeekTransformer(), - 'a' => new AmPmTransformer(), - 'H' => new Hour2400Transformer(), - 'K' => new Hour1200Transformer(), - 'k' => new Hour2401Transformer(), - 'm' => new MinuteTransformer(), - 's' => new SecondTransformer(), - 'z' => new TimezoneTransformer(), - ]; - } - - /** - * Format a DateTime using ICU dateformat pattern. - * - * @return string The formatted value - */ - public function format(\DateTime $dateTime): string - { - $formatted = preg_replace_callback($this->regExp, function ($matches) use ($dateTime) { - return $this->formatReplace($matches[0], $dateTime); - }, $this->pattern); - - return $formatted; - } - - /** - * Return the formatted ICU value for the matched date characters. - * - * @throws NotImplementedException When it encounters a not implemented date character - */ - private function formatReplace(string $dateChars, \DateTime $dateTime): string - { - $length = \strlen($dateChars); - - if ($this->isQuoteMatch($dateChars)) { - return $this->replaceQuoteMatch($dateChars); - } - - if (isset($this->transformers[$dateChars[0]])) { - $transformer = $this->transformers[$dateChars[0]]; - - return $transformer->format($dateTime, $length); - } - - // handle unimplemented characters - if (false !== strpos($this->notImplementedChars, $dateChars[0])) { - throw new NotImplementedException(sprintf('Unimplemented date character "%s" in format "%s".', $dateChars[0], $this->pattern)); - } - - return ''; - } - - /** - * Parse a pattern based string to a timestamp value. - * - * @param \DateTime $dateTime A configured DateTime object to use to perform the date calculation - * @param string $value String to convert to a time value - * - * @return int|false The corresponding Unix timestamp - * - * @throws \InvalidArgumentException When the value can not be matched with pattern - */ - public function parse(\DateTime $dateTime, string $value) - { - $reverseMatchingRegExp = $this->getReverseMatchingRegExp($this->pattern); - $reverseMatchingRegExp = '/^'.$reverseMatchingRegExp.'$/'; - - $options = []; - - if (preg_match($reverseMatchingRegExp, $value, $matches)) { - $matches = $this->normalizeArray($matches); - - foreach ($this->transformers as $char => $transformer) { - if (isset($matches[$char])) { - $length = \strlen($matches[$char]['pattern']); - $options = array_merge($options, $transformer->extractDateOptions($matches[$char]['value'], $length)); - } - } - - // reset error code and message - Icu::setError(Icu::U_ZERO_ERROR); - - return $this->calculateUnixTimestamp($dateTime, $options); - } - - // behave like the intl extension - Icu::setError(Icu::U_PARSE_ERROR, 'Date parsing failed'); - - return false; - } - - /** - * Retrieve a regular expression to match with a formatted value. - * - * @return string The reverse matching regular expression with named captures being formed by the - * transformer index in the $transformer array - */ - private function getReverseMatchingRegExp(string $pattern): string - { - $escapedPattern = preg_quote($pattern, '/'); - - // ICU 4.8 recognizes slash ("/") in a value to be parsed as a dash ("-") and vice-versa - // when parsing a date/time value - $escapedPattern = preg_replace('/\\\[\-|\/]/', '[\/\-]', $escapedPattern); - - $reverseMatchingRegExp = preg_replace_callback($this->regExp, function ($matches) { - $length = \strlen($matches[0]); - $transformerIndex = $matches[0][0]; - - $dateChars = $matches[0]; - if ($this->isQuoteMatch($dateChars)) { - return $this->replaceQuoteMatch($dateChars); - } - - if (isset($this->transformers[$transformerIndex])) { - $transformer = $this->transformers[$transformerIndex]; - $captureName = str_repeat($transformerIndex, $length); - - return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')'; - } - - return null; - }, $escapedPattern); - - return $reverseMatchingRegExp; - } - - /** - * Check if the first char of a string is a single quote. - */ - private function isQuoteMatch(string $quoteMatch): bool - { - return "'" === $quoteMatch[0]; - } - - /** - * Replaces single quotes at the start or end of a string with two single quotes. - */ - private function replaceQuoteMatch(string $quoteMatch): string - { - if (preg_match("/^'+$/", $quoteMatch)) { - return str_replace("''", "'", $quoteMatch); - } - - return str_replace("''", "'", substr($quoteMatch, 1, -1)); - } - - /** - * Builds a chars match regular expression. - */ - private function buildCharsMatch(string $specialChars): string - { - $specialCharsArray = str_split($specialChars); - - $specialCharsMatch = implode('|', array_map(function ($char) { - return $char.'+'; - }, $specialCharsArray)); - - return $specialCharsMatch; - } - - /** - * Normalize a preg_replace match array, removing the numeric keys and returning an associative array - * with the value and pattern values for the matched Transformer. - */ - private function normalizeArray(array $data): array - { - $ret = []; - - foreach ($data as $key => $value) { - if (!\is_string($key)) { - continue; - } - - $ret[$key[0]] = [ - 'value' => $value, - 'pattern' => $key, - ]; - } - - return $ret; - } - - /** - * Calculates the Unix timestamp based on the matched values by the reverse matching regular - * expression of parse(). - * - * @return bool|int The calculated timestamp or false if matched date is invalid - */ - private function calculateUnixTimestamp(\DateTime $dateTime, array $options) - { - $options = $this->getDefaultValueForOptions($options); - - $year = $options['year']; - $month = $options['month']; - $day = $options['day']; - $hour = $options['hour']; - $hourInstance = $options['hourInstance']; - $minute = $options['minute']; - $second = $options['second']; - $marker = $options['marker']; - $timezone = $options['timezone']; - - // If month is false, return immediately (intl behavior) - if (false === $month) { - Icu::setError(Icu::U_PARSE_ERROR, 'Date parsing failed'); - - return false; - } - - // Normalize hour - if ($hourInstance instanceof HourTransformer) { - $hour = $hourInstance->normalizeHour($hour, $marker); - } - - // Set the timezone if different from the default one - if (null !== $timezone && $timezone !== $this->timezone) { - $dateTime->setTimezone(new \DateTimeZone($timezone)); - } - - // Normalize yy year - preg_match_all($this->regExp, $this->pattern, $matches); - if (\in_array('yy', $matches[0])) { - $dateTime->setTimestamp(time()); - $year = $year > (int) $dateTime->format('y') + 20 ? 1900 + $year : 2000 + $year; - } - - $dateTime->setDate($year, $month, $day); - $dateTime->setTime($hour, $minute, $second); - - return $dateTime->getTimestamp(); - } - - /** - * Add sensible default values for missing items in the extracted date/time options array. The values - * are base in the beginning of the Unix era. - */ - private function getDefaultValueForOptions(array $options): array - { - return [ - 'year' => $options['year'] ?? 1970, - 'month' => $options['month'] ?? 1, - 'day' => $options['day'] ?? 1, - 'hour' => $options['hour'] ?? 0, - 'hourInstance' => $options['hourInstance'] ?? null, - 'minute' => $options['minute'] ?? 0, - 'second' => $options['second'] ?? 0, - 'marker' => $options['marker'] ?? null, - 'timezone' => $options['timezone'] ?? null, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php deleted file mode 100644 index 5e7c18f..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1200Transformer.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 12 hour format (0-11). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour1200Transformer extends HourTransformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $hourOfDay = $dateTime->format('g'); - $hourOfDay = '12' === $hourOfDay ? '0' : $hourOfDay; - - return $this->padLeft($hourOfDay, $length); - } - - /** - * {@inheritdoc} - */ - public function normalizeHour(int $hour, string $marker = null): int - { - if ('PM' === $marker) { - $hour += 12; - } - - return $hour; - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php deleted file mode 100644 index 0606bcf..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour1201Transformer.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 12 hour format (1-12). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour1201Transformer extends HourTransformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('g'), $length); - } - - /** - * {@inheritdoc} - */ - public function normalizeHour(int $hour, string $marker = null): int - { - if ('PM' !== $marker && 12 === $hour) { - $hour = 0; - } elseif ('PM' === $marker && 12 !== $hour) { - // If PM and hour is not 12 (1-12), sum 12 hour - $hour += 12; - } - - return $hour; - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php deleted file mode 100644 index 8536587..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2400Transformer.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 24 hour format (0-23). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour2400Transformer extends HourTransformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - return $this->padLeft($dateTime->format('G'), $length); - } - - /** - * {@inheritdoc} - */ - public function normalizeHour(int $hour, string $marker = null): int - { - if ('AM' === $marker) { - $hour = 0; - } elseif ('PM' === $marker) { - $hour = 12; - } - - return $hour; - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php deleted file mode 100644 index 929f11f..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/Hour2401Transformer.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for 24 hour format (1-24). - * - * @author Igor Wiedler - * - * @internal - */ -class Hour2401Transformer extends HourTransformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $hourOfDay = $dateTime->format('G'); - $hourOfDay = '0' === $hourOfDay ? '24' : $hourOfDay; - - return $this->padLeft($hourOfDay, $length); - } - - /** - * {@inheritdoc} - */ - public function normalizeHour(int $hour, string $marker = null): int - { - if ((null === $marker && 24 === $hour) || 'AM' === $marker) { - $hour = 0; - } elseif ('PM' === $marker) { - $hour = 12; - } - - return $hour; - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return '\d{1,2}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'hour' => (int) $matched, - 'hourInstance' => $this, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php deleted file mode 100644 index b042ccf..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/HourTransformer.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Base class for hour transformers. - * - * @author Eriksen Costa - * - * @internal - */ -abstract class HourTransformer extends Transformer -{ - /** - * Returns a normalized hour value suitable for the hour transformer type. - * - * @param int $hour The hour value - * @param string $marker An optional AM/PM marker - * - * @return int The normalized hour value - */ - abstract public function normalizeHour(int $hour, string $marker = null): int; -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php deleted file mode 100644 index 5926740..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/MinuteTransformer.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for minute format. - * - * @author Igor Wiedler - * - * @internal - */ -class MinuteTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $minuteOfHour = (int) $dateTime->format('i'); - - return $this->padLeft($minuteOfHour, $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'minute' => (int) $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php deleted file mode 100644 index d418857..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/MonthTransformer.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for month format. - * - * @author Igor Wiedler - * - * @internal - */ -class MonthTransformer extends Transformer -{ - protected static $months = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ]; - - /** - * Short months names (first 3 letters). - */ - protected static $shortMonths = []; - - /** - * Flipped $months array, $name => $index. - */ - protected static $flippedMonths = []; - - /** - * Flipped $shortMonths array, $name => $index. - */ - protected static $flippedShortMonths = []; - - public function __construct() - { - if (0 === \count(self::$shortMonths)) { - self::$shortMonths = array_map(function ($month) { - return substr($month, 0, 3); - }, self::$months); - - self::$flippedMonths = array_flip(self::$months); - self::$flippedShortMonths = array_flip(self::$shortMonths); - } - } - - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $matchLengthMap = [ - 1 => 'n', - 2 => 'm', - 3 => 'M', - 4 => 'F', - ]; - - if (isset($matchLengthMap[$length])) { - return $dateTime->format($matchLengthMap[$length]); - } - - if (5 === $length) { - return substr($dateTime->format('M'), 0, 1); - } - - return $this->padLeft($dateTime->format('m'), $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 1: - $regExp = '\d{1,2}'; - break; - case 3: - $regExp = implode('|', self::$shortMonths); - break; - case 4: - $regExp = implode('|', self::$months); - break; - case 5: - $regExp = '[JFMASOND]'; - break; - default: - $regExp = '\d{1,'.$length.'}'; - break; - } - - return $regExp; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - if (!is_numeric($matched)) { - if (3 === $length) { - $matched = self::$flippedShortMonths[$matched] + 1; - } elseif (4 === $length) { - $matched = self::$flippedMonths[$matched] + 1; - } elseif (5 === $length) { - // IntlDateFormatter::parse() always returns false for MMMMM or LLLLL - $matched = false; - } - } else { - $matched = (int) $matched; - } - - return [ - 'month' => $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php deleted file mode 100644 index 4291a72..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/QuarterTransformer.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for quarter format. - * - * @author Igor Wiedler - * - * @internal - */ -class QuarterTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $month = (int) $dateTime->format('n'); - $quarter = (int) floor(($month - 1) / 3) + 1; - switch ($length) { - case 1: - case 2: - return $this->padLeft($quarter, $length); - case 3: - return 'Q'.$quarter; - default: - $map = [1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter']; - - return $map[$quarter]; - } - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - switch ($length) { - case 1: - case 2: - return '\d{'.$length.'}'; - case 3: - return 'Q\d'; - default: - return '(?:1st|2nd|3rd|4th) quarter'; - } - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return []; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php deleted file mode 100644 index 456abd3..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/SecondTransformer.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for the second format. - * - * @author Igor Wiedler - * - * @internal - */ -class SecondTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - $secondOfMinute = (int) $dateTime->format('s'); - - return $this->padLeft($secondOfMinute, $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 1 === $length ? '\d{1,2}' : '\d{'.$length.'}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'second' => (int) $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php deleted file mode 100644 index 241e847..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/TimezoneTransformer.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; - -/** - * Parser and formatter for time zone format. - * - * @author Igor Wiedler - * - * @internal - */ -class TimezoneTransformer extends Transformer -{ - /** - * {@inheritdoc} - * - * @throws NotImplementedException When time zone is different than UTC or GMT (Etc/GMT) - */ - public function format(\DateTime $dateTime, int $length): string - { - $timeZone = substr($dateTime->getTimezone()->getName(), 0, 3); - - if (!\in_array($timeZone, ['Etc', 'UTC', 'GMT'])) { - throw new NotImplementedException('Time zone different than GMT or UTC is not supported as a formatting output.'); - } - - if ('Etc' === $timeZone) { - // i.e. Etc/GMT+1, Etc/UTC, Etc/Zulu - $timeZone = substr($dateTime->getTimezone()->getName(), 4); - } - - // From ICU >= 59.1 GMT and UTC are no longer unified - if (\in_array($timeZone, ['UTC', 'UCT', 'Universal', 'Zulu'])) { - // offset is not supported with UTC - return $length > 3 ? 'Coordinated Universal Time' : 'UTC'; - } - - $offset = (int) $dateTime->format('O'); - - // From ICU >= 4.8, the zero offset is no more used, example: GMT instead of GMT+00:00 - if (0 === $offset) { - return $length > 3 ? 'Greenwich Mean Time' : 'GMT'; - } - - if ($length > 3) { - return $dateTime->format('\G\M\TP'); - } - - return sprintf('GMT%s%d', ($offset >= 0 ? '+' : ''), $offset / 100); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 'GMT[+-]\d{2}:?\d{2}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'timezone' => self::getEtcTimeZoneId($matched), - ]; - } - - /** - * Get an Etc/GMT timezone identifier for the specified timezone. - * - * The PHP documentation for timezones states to not use the 'Other' time zones because them exists - * "for backwards compatibility". However all Etc/GMT time zones are in the tz database 'etcetera' file, - * which indicates they are not deprecated (neither are old names). - * - * Only GMT, Etc/Universal, Etc/Zulu, Etc/Greenwich, Etc/GMT-0, Etc/GMT+0 and Etc/GMT0 are old names and - * are linked to Etc/GMT or Etc/UTC. - * - * @param string $formattedTimeZone A GMT timezone string (GMT-03:00, e.g.) - * - * @return string A timezone identifier - * - * @see https://php.net/timezones.others - * - * @throws NotImplementedException When the GMT time zone have minutes offset different than zero - * @throws \InvalidArgumentException When the value can not be matched with pattern - */ - public static function getEtcTimeZoneId(string $formattedTimeZone): string - { - if (preg_match('/GMT(?P[+-])(?P\d{2}):?(?P\d{2})/', $formattedTimeZone, $matches)) { - $hours = (int) $matches['hours']; - $minutes = (int) $matches['minutes']; - $signal = '-' === $matches['signal'] ? '+' : '-'; - - if (0 < $minutes) { - throw new NotImplementedException(sprintf('It is not possible to use a GMT time zone with minutes offset different than zero (0). GMT time zone tried: "%s".', $formattedTimeZone)); - } - - return 'Etc/GMT'.(0 !== $hours ? $signal.$hours : ''); - } - - throw new \InvalidArgumentException(sprintf('The GMT time zone "%s" does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.', $formattedTimeZone)); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/Transformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/Transformer.php deleted file mode 100644 index 7f8bf25..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/Transformer.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for date formats. - * - * @author Igor Wiedler - * - * @internal - */ -abstract class Transformer -{ - /** - * Format a value using a configured DateTime as date/time source. - * - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * @param int $length The formatted value string length - * - * @return string The formatted value - */ - abstract public function format(\DateTime $dateTime, int $length): string; - - /** - * Returns a reverse matching regular expression of a string generated by format(). - * - * @param int $length The length of the value to be reverse matched - * - * @return string The reverse matching regular expression - */ - abstract public function getReverseMatchingRegExp(int $length): string; - - /** - * Extract date options from a matched value returned by the processing of the reverse matching - * regular expression. - * - * @param string $matched The matched value - * @param int $length The length of the Transformer pattern string - * - * @return array An associative array - */ - abstract public function extractDateOptions(string $matched, int $length): array; - - /** - * Pad a string with zeros to the left. - * - * @param string $value The string to be padded - * @param int $length The length to pad - * - * @return string The padded string - */ - protected function padLeft(string $value, int $length): string - { - return str_pad($value, $length, '0', \STR_PAD_LEFT); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php b/vendor/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php deleted file mode 100644 index 3bb6acd..0000000 --- a/vendor/symfony/polyfill-intl-icu/DateFormat/YearTransformer.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\DateFormat; - -/** - * Parser and formatter for year format. - * - * @author Igor Wiedler - * - * @internal - */ -class YearTransformer extends Transformer -{ - /** - * {@inheritdoc} - */ - public function format(\DateTime $dateTime, int $length): string - { - if (2 === $length) { - return $dateTime->format('y'); - } - - return $this->padLeft($dateTime->format('Y'), $length); - } - - /** - * {@inheritdoc} - */ - public function getReverseMatchingRegExp(int $length): string - { - return 2 === $length ? '\d{2}' : '\d{1,4}'; - } - - /** - * {@inheritdoc} - */ - public function extractDateOptions(string $matched, int $length): array - { - return [ - 'year' => (int) $matched, - ]; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php b/vendor/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php deleted file mode 100644 index a453b5e..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * Base ExceptionInterface for the Intl component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php b/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php deleted file mode 100644 index db120a3..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentNotImplementedException.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodArgumentNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The method name that raised the exception - * @param string $argName The argument name that is not implemented - */ - public function __construct(string $methodName, string $argName) - { - $message = sprintf('The %s() method\'s argument $%s behavior is not implemented.', $methodName, $argName); - parent::__construct($message); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php b/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php deleted file mode 100644 index bd92042..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/MethodArgumentValueNotImplementedException.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodArgumentValueNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The method name that raised the exception - * @param string $argName The argument name - * @param mixed $argValue The argument value that is not implemented - * @param string $additionalMessage An optional additional message to append to the exception message - */ - public function __construct(string $methodName, string $argName, $argValue, string $additionalMessage = '') - { - $message = sprintf( - 'The %s() method\'s argument $%s value %s behavior is not implemented.%s', - $methodName, - $argName, - var_export($argValue, true), - '' !== $additionalMessage ? ' '.$additionalMessage.'. ' : '' - ); - - parent::__construct($message); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php b/vendor/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php deleted file mode 100644 index 9e1a439..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/MethodNotImplementedException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * @author Eriksen Costa - */ -class MethodNotImplementedException extends NotImplementedException -{ - /** - * @param string $methodName The name of the method - */ - public function __construct(string $methodName) - { - parent::__construct(sprintf('The %s() is not implemented.', $methodName)); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/NotImplementedException.php b/vendor/symfony/polyfill-intl-icu/Exception/NotImplementedException.php deleted file mode 100644 index 929b933..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/NotImplementedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * Base exception class for not implemented behaviors of the intl extension in the Locale component. - * - * @author Eriksen Costa - */ -class NotImplementedException extends RuntimeException -{ - public const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.'; - - /** - * @param string $message The exception message. A note to install the intl extension is appended to this string - */ - public function __construct(string $message) - { - parent::__construct($message.' '.self::INTL_INSTALL_MESSAGE); - } -} diff --git a/vendor/symfony/polyfill-intl-icu/Exception/RuntimeException.php b/vendor/symfony/polyfill-intl-icu/Exception/RuntimeException.php deleted file mode 100644 index ceedffe..0000000 --- a/vendor/symfony/polyfill-intl-icu/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu\Exception; - -/** - * RuntimeException for the Intl component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/Icu.php b/vendor/symfony/polyfill-intl-icu/Icu.php deleted file mode 100644 index b9590f4..0000000 --- a/vendor/symfony/polyfill-intl-icu/Icu.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -/** - * Provides fake static versions of the global functions in the intl extension. - * - * @author Bernhard Schussek - * - * @internal - */ -abstract class Icu -{ - /** - * Indicates that no error occurred. - */ - public const U_ZERO_ERROR = 0; - - /** - * Indicates that an invalid argument was passed. - */ - public const U_ILLEGAL_ARGUMENT_ERROR = 1; - - /** - * Indicates that the parse() operation failed. - */ - public const U_PARSE_ERROR = 9; - - /** - * All known error codes. - */ - private static $errorCodes = [ - self::U_ZERO_ERROR => 'U_ZERO_ERROR', - self::U_ILLEGAL_ARGUMENT_ERROR => 'U_ILLEGAL_ARGUMENT_ERROR', - self::U_PARSE_ERROR => 'U_PARSE_ERROR', - ]; - - /** - * The error code of the last operation. - */ - private static $errorCode = self::U_ZERO_ERROR; - - /** - * The error code of the last operation. - */ - private static $errorMessage = 'U_ZERO_ERROR'; - - /** - * Returns whether the error code indicates a failure. - * - * @param int $errorCode The error code returned by Icu::getErrorCode() - */ - public static function isFailure(int $errorCode): bool - { - return isset(self::$errorCodes[$errorCode]) - && $errorCode > self::U_ZERO_ERROR; - } - - /** - * Returns the error code of the last operation. - * - * Returns Icu::U_ZERO_ERROR if no error occurred. - * - * @return int - */ - public static function getErrorCode() - { - return self::$errorCode; - } - - /** - * Returns the error message of the last operation. - * - * Returns "U_ZERO_ERROR" if no error occurred. - */ - public static function getErrorMessage(): string - { - return self::$errorMessage; - } - - /** - * Returns the symbolic name for a given error code. - * - * @param int $code The error code returned by Icu::getErrorCode() - */ - public static function getErrorName(int $code): string - { - return self::$errorCodes[$code] ?? '[BOGUS UErrorCode]'; - } - - /** - * Sets the current error. - * - * @param int $code One of the error constants in this class - * @param string $message The ICU class error message - * - * @throws \InvalidArgumentException If the code is not one of the error constants in this class - */ - public static function setError(int $code, string $message = '') - { - if (!isset(self::$errorCodes[$code])) { - throw new \InvalidArgumentException(sprintf('No such error code: "%s".', $code)); - } - - self::$errorMessage = $message ? sprintf('%s: %s', $message, self::$errorCodes[$code]) : self::$errorCodes[$code]; - self::$errorCode = $code; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/IntlDateFormatter.php b/vendor/symfony/polyfill-intl-icu/IntlDateFormatter.php deleted file mode 100644 index 718ce9b..0000000 --- a/vendor/symfony/polyfill-intl-icu/IntlDateFormatter.php +++ /dev/null @@ -1,645 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\DateFormat\FullTransformer; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \IntlDateFormatter} class. - * - * The only methods currently supported in this class are: - * - * - {@link __construct} - * - {@link create} - * - {@link format} - * - {@link getCalendar} - * - {@link getDateType} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - {@link getPattern} - * - {@link getTimeType} - * - {@link getTimeZoneId} - * - {@link isLenient} - * - {@link parse} - * - {@link setLenient} - * - {@link setPattern} - * - {@link setTimeZoneId} - * - {@link setTimeZone} - * - * @author Igor Wiedler - * @author Bernhard Schussek - * - * @internal - */ -abstract class IntlDateFormatter -{ - /** - * The error code from the last operation. - * - * @var int - */ - protected $errorCode = Icu::U_ZERO_ERROR; - - /** - * The error message from the last operation. - * - * @var string - */ - protected $errorMessage = 'U_ZERO_ERROR'; - - /* date/time format types */ - public const NONE = -1; - public const FULL = 0; - public const LONG = 1; - public const MEDIUM = 2; - public const SHORT = 3; - - /* date format types */ - public const RELATIVE_FULL = 128; - public const RELATIVE_LONG = 129; - public const RELATIVE_MEDIUM = 130; - public const RELATIVE_SHORT = 131; - - /* calendar formats */ - public const TRADITIONAL = 0; - public const GREGORIAN = 1; - - /** - * Patterns used to format the date when no pattern is provided. - */ - private $defaultDateFormats = [ - self::NONE => '', - self::FULL => 'EEEE, MMMM d, y', - self::LONG => 'MMMM d, y', - self::MEDIUM => 'MMM d, y', - self::SHORT => 'M/d/yy', - self::RELATIVE_FULL => 'EEEE, MMMM d, y', - self::RELATIVE_LONG => 'MMMM d, y', - self::RELATIVE_MEDIUM => 'MMM d, y', - self::RELATIVE_SHORT => 'M/d/yy', - ]; - - /** - * Patterns used to format the time when no pattern is provided. - */ - private $defaultTimeFormats = [ - self::FULL => 'h:mm:ss a zzzz', - self::LONG => 'h:mm:ss a z', - self::MEDIUM => 'h:mm:ss a', - self::SHORT => 'h:mm a', - ]; - - private $dateType; - private $timeType; - - /** - * @var string - */ - private $pattern; - - /** - * @var \DateTimeZone - */ - private $dateTimeZone; - - /** - * @var bool - */ - private $uninitializedTimeZoneId = false; - - /** - * @var string - */ - private $timezoneId; - - /** - * @var bool - */ - private $isRelativeDateType = false; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier - * @param \IntlCalendar|int|null $calendar Calendar to use for formatting or parsing. The only currently - * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") - * - * @see https://php.net/intldateformatter.create - * @see http://userguide.icu-project.org/formatparse/datetime - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed - */ - public function __construct(?string $locale, ?int $dateType, ?int $timeType, $timezone = null, $calendar = null, ?string $pattern = '') - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - - if (self::GREGORIAN !== $calendar && null !== $calendar) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'calendar', $calendar, 'Only the GREGORIAN calendar is supported'); - } - - if (\PHP_VERSION_ID >= 80100) { - if (null === $dateType) { - @trigger_error('Passing null to parameter #2 ($dateType) of type int is deprecated', \E_USER_DEPRECATED); - } - - if (null === $timeType) { - @trigger_error('Passing null to parameter #3 ($timeType) of type int is deprecated', \E_USER_DEPRECATED); - } - } - - $this->dateType = $dateType ?? self::FULL; - $this->timeType = $timeType ?? self::FULL; - - if ('' === ($pattern ?? '')) { - $pattern = $this->getDefaultPattern(); - } - - $this->setPattern($pattern); - $this->setTimeZone($timezone); - - if (\in_array($this->dateType, [self::RELATIVE_FULL, self::RELATIVE_LONG, self::RELATIVE_MEDIUM, self::RELATIVE_SHORT], true)) { - $this->isRelativeDateType = true; - } - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone Timezone identifier - * @param \IntlCalendar|int|null $calendar Calendar to use for formatting or parsing; default is Gregorian - * One of the calendar constants - * - * @return static - * - * @see https://php.net/intldateformatter.create - * @see http://userguide.icu-project.org/formatparse/datetime - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed - */ - public static function create(?string $locale, ?int $dateType, ?int $timeType, $timezone = null, int $calendar = null, ?string $pattern = '') - { - return new static($locale, $dateType, $timeType, $timezone, $calendar, $pattern); - } - - /** - * Format the date/time value (timestamp) as a string. - * - * @param int|string|\DateTimeInterface $datetime The timestamp to format - * - * @return string|bool The formatted value or false if formatting failed - * - * @see https://php.net/intldateformatter.format - * - * @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented - */ - public function format($datetime) - { - // intl allows timestamps to be passed as arrays - we don't - if (\is_array($datetime)) { - $message = 'Only Unix timestamps and DateTime objects are supported'; - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'datetime', $datetime, $message); - } - - if (\is_string($datetime) && $dt = \DateTime::createFromFormat('U', $datetime)) { - $datetime = $dt; - } - - // behave like the intl extension - $argumentError = null; - if (!\is_int($datetime) && !$datetime instanceof \DateTimeInterface) { - $argumentError = sprintf('datefmt_format: string \'%s\' is not numeric, which would be required for it to be a valid date', $datetime); - } - - if (null !== $argumentError) { - Icu::setError(Icu::U_ILLEGAL_ARGUMENT_ERROR, $argumentError); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return false; - } - - if ($datetime instanceof \DateTimeInterface) { - $datetime = $datetime->format('U'); - } - - $pattern = $this->getPattern(); - $formatted = ''; - - if ($this->isRelativeDateType && $formatted = $this->getRelativeDateFormat($datetime)) { - if (self::NONE === $this->timeType) { - $pattern = ''; - } else { - $pattern = $this->defaultTimeFormats[$this->timeType]; - if (\in_array($this->dateType, [self::RELATIVE_MEDIUM, self::RELATIVE_SHORT], true)) { - $formatted .= ', '; - } else { - $formatted .= ' at '; - } - } - } - - $transformer = new FullTransformer($pattern, $this->getTimeZoneId()); - $formatted .= $transformer->format($this->createDateTime($datetime)); - - // behave like the intl extension - Icu::setError(Icu::U_ZERO_ERROR); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return $formatted; - } - - /** - * Not supported. Formats an object. - * - * @return string The formatted value - * - * @see https://php.net/intldateformatter.formatobject - * - * @throws MethodNotImplementedException - */ - public function formatObject($datetime, $format = null, string $locale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the formatter's calendar. - * - * @return int The calendar being used by the formatter. Currently always returns - * IntlDateFormatter::GREGORIAN. - * - * @see https://php.net/intldateformatter.getcalendar - */ - public function getCalendar() - { - return self::GREGORIAN; - } - - /** - * Not supported. Returns the formatter's calendar object. - * - * @return object The calendar's object being used by the formatter - * - * @see https://php.net/intldateformatter.getcalendarobject - * - * @throws MethodNotImplementedException - */ - public function getCalendarObject() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the formatter's datetype. - * - * @return int The current value of the formatter - * - * @see https://php.net/intldateformatter.getdatetype - */ - public function getDateType() - { - return $this->dateType; - } - - /** - * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last formatter call - * - * @see https://php.net/intldateformatter.geterrorcode - */ - public function getErrorCode() - { - return $this->errorCode; - } - - /** - * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last formatter call - * - * @see https://php.net/intldateformatter.geterrormessage - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * Returns the formatter's locale. - * - * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) - * - * @return string The locale used to create the formatter. Currently always - * returns "en". - * - * @see https://php.net/intldateformatter.getlocale - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Returns the formatter's pattern. - * - * @return string The pattern string used by the formatter - * - * @see https://php.net/intldateformatter.getpattern - */ - public function getPattern() - { - return $this->pattern; - } - - /** - * Returns the formatter's time type. - * - * @return int The time type used by the formatter - * - * @see https://php.net/intldateformatter.gettimetype - */ - public function getTimeType() - { - return $this->timeType; - } - - /** - * Returns the formatter's timezone identifier. - * - * @return string The timezone identifier used by the formatter - * - * @see https://php.net/intldateformatter.gettimezoneid - */ - public function getTimeZoneId() - { - if (!$this->uninitializedTimeZoneId) { - return $this->timezoneId; - } - - return date_default_timezone_get(); - } - - /** - * Not supported. Returns the formatter's timezone. - * - * @return mixed The timezone used by the formatter - * - * @see https://php.net/intldateformatter.gettimezone - * - * @throws MethodNotImplementedException - */ - public function getTimeZone() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns whether the formatter is lenient. - * - * @return bool Currently always returns false - * - * @see https://php.net/intldateformatter.islenient - * - * @throws MethodNotImplementedException - */ - public function isLenient() - { - return false; - } - - /** - * Not supported. Parse string to a field-based time value. - * - * @return string Localtime compatible array of integers: contains 24 hour clock value in tm_hour field - * - * @see https://php.net/intldateformatter.localtime - * - * @throws MethodNotImplementedException - */ - public function localtime(string $string, &$offset = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Parse string to a timestamp value. - * - * @return int|false Parsed value as a timestamp - * - * @see https://php.net/intldateformatter.parse - * - * @throws MethodArgumentNotImplementedException When $offset different than null, behavior not implemented - */ - public function parse(string $string, &$offset = null) - { - // We don't calculate the position when parsing the value - if (null !== $offset) { - throw new MethodArgumentNotImplementedException(__METHOD__, 'offset'); - } - - $dateTime = $this->createDateTime(0); - $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId()); - - $timestamp = $transformer->parse($dateTime, $string); - - // behave like the intl extension. FullTransformer::parse() set the proper error - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return $timestamp; - } - - /** - * Not supported. Set the formatter's calendar. - * - * @param \IntlCalendar|int|null $calendar - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setcalendar - * - * @throws MethodNotImplementedException - */ - public function setCalendar($calendar) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Set the leniency of the parser. - * - * Define if the parser is strict or lenient in interpreting inputs that do not match the pattern - * exactly. Enabling lenient parsing allows the parser to accept otherwise flawed date or time - * patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or - * invalid values ("February 30th") are not accepted. - * - * @param bool $lenient Sets whether the parser is lenient or not. Currently - * only false (strict) is supported. - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setlenient - * - * @throws MethodArgumentValueNotImplementedException When $lenient is true - */ - public function setLenient(bool $lenient) - { - if ($lenient) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'lenient', $lenient, 'Only the strict parser is supported'); - } - - return true; - } - - /** - * Set the formatter's pattern. - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.setpattern - * @see http://userguide.icu-project.org/formatparse/datetime - */ - public function setPattern(string $pattern) - { - $this->pattern = $pattern; - - return true; - } - - /** - * Sets formatterʼs timezone. - * - * @param \IntlTimeZone|\DateTimeZone|string|null $timezone - * - * @return bool true on success or false on failure - * - * @see https://php.net/intldateformatter.settimezone - */ - public function setTimeZone($timezone) - { - if ($timezone instanceof \IntlTimeZone) { - $timezone = $timezone->getID(); - } - - if ($timezone instanceof \DateTimeZone) { - $timezone = $timezone->getName(); - - // DateTimeZone returns the GMT offset timezones without the leading GMT, while our parsing requires it. - if (!empty($timezone) && ('+' === $timezone[0] || '-' === $timezone[0])) { - $timezone = 'GMT'.$timezone; - } - } - - if (null === $timezone) { - $timezone = date_default_timezone_get(); - - $this->uninitializedTimeZoneId = true; - } - - // Backup original passed time zone - $timezoneId = $timezone; - - // Get an Etc/GMT time zone that is accepted for \DateTimeZone - if ('GMT' !== $timezone && 0 === strpos($timezone, 'GMT')) { - try { - $timezone = DateFormat\TimezoneTransformer::getEtcTimeZoneId($timezone); - } catch (\InvalidArgumentException $e) { - // Does nothing, will fallback to UTC - } - } - - try { - $this->dateTimeZone = new \DateTimeZone($timezone); - if ('GMT' !== $timezone && $this->dateTimeZone->getName() !== $timezone) { - $timezoneId = $this->getTimeZoneId(); - } - } catch (\Exception $e) { - $timezoneId = $timezone = $this->getTimeZoneId(); - $this->dateTimeZone = new \DateTimeZone($timezone); - } - - $this->timezoneId = $timezoneId; - - return true; - } - - /** - * Create and returns a DateTime object with the specified timestamp and with the - * current time zone. - * - * @return \DateTime - */ - protected function createDateTime($timestamp) - { - $dateTime = \DateTime::createFromFormat('U', $timestamp); - $dateTime->setTimezone($this->dateTimeZone); - - return $dateTime; - } - - /** - * Returns a pattern string based in the datetype and timetype values. - * - * @return string - */ - protected function getDefaultPattern() - { - $pattern = ''; - if (self::NONE !== $this->dateType) { - $pattern = $this->defaultDateFormats[$this->dateType]; - } - if (self::NONE !== $this->timeType) { - if (\in_array($this->dateType, [self::FULL, self::LONG, self::RELATIVE_FULL, self::RELATIVE_LONG], true)) { - $pattern .= ' \'at\' '; - } elseif (self::NONE !== $this->dateType) { - $pattern .= ', '; - } - $pattern .= $this->defaultTimeFormats[$this->timeType]; - } - - return $pattern; - } - - private function getRelativeDateFormat(int $timestamp): string - { - $today = $this->createDateTime(time()); - $today->setTime(0, 0, 0); - - $datetime = $this->createDateTime($timestamp); - $datetime->setTime(0, 0, 0); - - $interval = $today->diff($datetime); - - if (false !== $interval) { - if (0 === $interval->days) { - return 'today'; - } - - if (1 === $interval->days) { - return 1 === $interval->invert ? 'yesterday' : 'tomorrow'; - } - } - - return ''; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/LICENSE b/vendor/symfony/polyfill-intl-icu/LICENSE deleted file mode 100644 index 9e936ec..0000000 --- a/vendor/symfony/polyfill-intl-icu/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-intl-icu/Locale.php b/vendor/symfony/polyfill-intl-icu/Locale.php deleted file mode 100644 index 91a157d..0000000 --- a/vendor/symfony/polyfill-intl-icu/Locale.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; - -/** - * Replacement for PHP's native {@link \Locale} class. - * - * The only methods supported in this class are `getDefault` and `canonicalize`. - * All other methods will throw an exception when used. - * - * @author Eriksen Costa - * @author Bernhard Schussek - * - * @internal - */ -abstract class Locale -{ - public const DEFAULT_LOCALE = null; - - /* Locale method constants */ - public const ACTUAL_LOCALE = 0; - public const VALID_LOCALE = 1; - - /* Language tags constants */ - public const LANG_TAG = 'language'; - public const EXTLANG_TAG = 'extlang'; - public const SCRIPT_TAG = 'script'; - public const REGION_TAG = 'region'; - public const VARIANT_TAG = 'variant'; - public const GRANDFATHERED_LANG_TAG = 'grandfathered'; - public const PRIVATE_TAG = 'private'; - - /** - * Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.acceptfromhttp - * - * @throws MethodNotImplementedException - */ - public static function acceptFromHttp(string $header) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns a canonicalized locale string. - * - * This polyfill doesn't implement the full-spec algorithm. It only - * canonicalizes locale strings handled by the `LocaleBundle` class. - * - * @return string - */ - public static function canonicalize(string $locale) - { - if ('' === $locale || '.' === $locale[0]) { - return self::getDefault(); - } - - if (!preg_match('/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i', $locale, $m)) { - return $locale; - } - - if (!empty($m[4])) { - return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3])).'_'.strtoupper($m[4]); - } - - if (!empty($m[3])) { - return strtolower($m[1]).'_'.ucfirst(strtolower($m[2].$m[3])); - } - - return strtolower($m[1]).'_'.strtoupper($m[2]); - } - - /** - * Not supported. Returns a correctly ordered and delimited locale code. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.composelocale - * - * @throws MethodNotImplementedException - */ - public static function composeLocale(array $subtags) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Checks if a language tag filter matches with locale. - * - * @return string The corresponding locale code - * - * @see https://php.net/locale.filtermatches - * - * @throws MethodNotImplementedException - */ - public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the variants for the input locale. - * - * @return array The locale variants - * - * @see https://php.net/locale.getallvariants - * - * @throws MethodNotImplementedException - */ - public static function getAllVariants(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Returns the default locale. - * - * @return string The default locale code. Always returns 'en' - * - * @see https://php.net/locale.getdefault - */ - public static function getDefault() - { - return 'en'; - } - - /** - * Not supported. Returns the localized display name for the locale language. - * - * @return string The localized language display name - * - * @see https://php.net/locale.getdisplaylanguage - * - * @throws MethodNotImplementedException - */ - public static function getDisplayLanguage(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale. - * - * @return string The localized locale display name - * - * @see https://php.net/locale.getdisplayname - * - * @throws MethodNotImplementedException - */ - public static function getDisplayName(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale region. - * - * @return string The localized region display name - * - * @see https://php.net/locale.getdisplayregion - * - * @throws MethodNotImplementedException - */ - public static function getDisplayRegion(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale script. - * - * @return string The localized script display name - * - * @see https://php.net/locale.getdisplayscript - * - * @throws MethodNotImplementedException - */ - public static function getDisplayScript(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the localized display name for the locale variant. - * - * @return string The localized variant display name - * - * @see https://php.net/locale.getdisplayvariant - * - * @throws MethodNotImplementedException - */ - public static function getDisplayVariant(string $locale, string $displayLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the keywords for the locale. - * - * @return array Associative array with the extracted variants - * - * @see https://php.net/locale.getkeywords - * - * @throws MethodNotImplementedException - */ - public static function getKeywords(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the primary language for the locale. - * - * @return string|null The extracted language code or null in case of error - * - * @see https://php.net/locale.getprimarylanguage - * - * @throws MethodNotImplementedException - */ - public static function getPrimaryLanguage(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the region for the locale. - * - * @return string|null The extracted region code or null if not present - * - * @see https://php.net/locale.getregion - * - * @throws MethodNotImplementedException - */ - public static function getRegion(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the script for the locale. - * - * @return string|null The extracted script code or null if not present - * - * @see https://php.net/locale.getscript - * - * @throws MethodNotImplementedException - */ - public static function getScript(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns the closest language tag for the locale. - * - * @see https://php.net/locale.lookup - * - * @throws MethodNotImplementedException - */ - public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, string $defaultLocale = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns an associative array of locale identifier subtags. - * - * @return array Associative array with the extracted subtags - * - * @see https://php.net/locale.parselocale - * - * @throws MethodNotImplementedException - */ - public static function parseLocale(string $locale) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Sets the default runtime locale. - * - * @return bool true on success or false on failure - * - * @see https://php.net/locale.setdefault - * - * @throws MethodNotImplementedException - */ - public static function setDefault(string $locale) - { - if ('en' !== $locale) { - throw new MethodNotImplementedException(__METHOD__); - } - - return true; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/NumberFormatter.php b/vendor/symfony/polyfill-intl-icu/NumberFormatter.php deleted file mode 100644 index 9c79e3f..0000000 --- a/vendor/symfony/polyfill-intl-icu/NumberFormatter.php +++ /dev/null @@ -1,835 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Icu; - -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodArgumentValueNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\MethodNotImplementedException; -use Symfony\Polyfill\Intl\Icu\Exception\NotImplementedException; - -/** - * Replacement for PHP's native {@link \NumberFormatter} class. - * - * The only methods currently supported in this class are: - * - * - {@link __construct} - * - {@link create} - * - {@link formatCurrency} - * - {@link format} - * - {@link getAttribute} - * - {@link getErrorCode} - * - {@link getErrorMessage} - * - {@link getLocale} - * - {@link parse} - * - {@link setAttribute} - * - * @author Eriksen Costa - * @author Bernhard Schussek - * - * @internal - */ -abstract class NumberFormatter -{ - /* Format style constants */ - public const PATTERN_DECIMAL = 0; - public const DECIMAL = 1; - public const CURRENCY = 2; - public const PERCENT = 3; - public const SCIENTIFIC = 4; - public const SPELLOUT = 5; - public const ORDINAL = 6; - public const DURATION = 7; - public const PATTERN_RULEBASED = 9; - public const IGNORE = 0; - public const DEFAULT_STYLE = 1; - - /* Format type constants */ - public const TYPE_DEFAULT = 0; - public const TYPE_INT32 = 1; - public const TYPE_INT64 = 2; - public const TYPE_DOUBLE = 3; - public const TYPE_CURRENCY = 4; - - /* Numeric attribute constants */ - public const PARSE_INT_ONLY = 0; - public const GROUPING_USED = 1; - public const DECIMAL_ALWAYS_SHOWN = 2; - public const MAX_INTEGER_DIGITS = 3; - public const MIN_INTEGER_DIGITS = 4; - public const INTEGER_DIGITS = 5; - public const MAX_FRACTION_DIGITS = 6; - public const MIN_FRACTION_DIGITS = 7; - public const FRACTION_DIGITS = 8; - public const MULTIPLIER = 9; - public const GROUPING_SIZE = 10; - public const ROUNDING_MODE = 11; - public const ROUNDING_INCREMENT = 12; - public const FORMAT_WIDTH = 13; - public const PADDING_POSITION = 14; - public const SECONDARY_GROUPING_SIZE = 15; - public const SIGNIFICANT_DIGITS_USED = 16; - public const MIN_SIGNIFICANT_DIGITS = 17; - public const MAX_SIGNIFICANT_DIGITS = 18; - public const LENIENT_PARSE = 19; - - /* Text attribute constants */ - public const POSITIVE_PREFIX = 0; - public const POSITIVE_SUFFIX = 1; - public const NEGATIVE_PREFIX = 2; - public const NEGATIVE_SUFFIX = 3; - public const PADDING_CHARACTER = 4; - public const CURRENCY_CODE = 5; - public const DEFAULT_RULESET = 6; - public const PUBLIC_RULESETS = 7; - - /* Format symbol constants */ - public const DECIMAL_SEPARATOR_SYMBOL = 0; - public const GROUPING_SEPARATOR_SYMBOL = 1; - public const PATTERN_SEPARATOR_SYMBOL = 2; - public const PERCENT_SYMBOL = 3; - public const ZERO_DIGIT_SYMBOL = 4; - public const DIGIT_SYMBOL = 5; - public const MINUS_SIGN_SYMBOL = 6; - public const PLUS_SIGN_SYMBOL = 7; - public const CURRENCY_SYMBOL = 8; - public const INTL_CURRENCY_SYMBOL = 9; - public const MONETARY_SEPARATOR_SYMBOL = 10; - public const EXPONENTIAL_SYMBOL = 11; - public const PERMILL_SYMBOL = 12; - public const PAD_ESCAPE_SYMBOL = 13; - public const INFINITY_SYMBOL = 14; - public const NAN_SYMBOL = 15; - public const SIGNIFICANT_DIGIT_SYMBOL = 16; - public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; - - /* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */ - public const ROUND_CEILING = 0; - public const ROUND_FLOOR = 1; - public const ROUND_DOWN = 2; - public const ROUND_UP = 3; - public const ROUND_HALFEVEN = 4; - public const ROUND_HALFDOWN = 5; - public const ROUND_HALFUP = 6; - - /* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */ - public const PAD_BEFORE_PREFIX = 0; - public const PAD_AFTER_PREFIX = 1; - public const PAD_BEFORE_SUFFIX = 2; - public const PAD_AFTER_SUFFIX = 3; - - /** - * The error code from the last operation. - * - * @var int - */ - protected $errorCode = Icu::U_ZERO_ERROR; - - /** - * The error message from the last operation. - * - * @var string - */ - protected $errorMessage = 'U_ZERO_ERROR'; - - /** - * @var int - */ - private $style; - - /** - * Default values for the en locale. - */ - private $attributes = [ - self::FRACTION_DIGITS => 0, - self::GROUPING_USED => 1, - self::ROUNDING_MODE => self::ROUND_HALFEVEN, - ]; - - /** - * Holds the initialized attributes code. - */ - private $initializedAttributes = []; - - /** - * The supported styles to the constructor $styles argument. - */ - private static $supportedStyles = [ - 'CURRENCY' => self::CURRENCY, - 'DECIMAL' => self::DECIMAL, - ]; - - /** - * Supported attributes to the setAttribute() $attr argument. - */ - private static $supportedAttributes = [ - 'FRACTION_DIGITS' => self::FRACTION_DIGITS, - 'GROUPING_USED' => self::GROUPING_USED, - 'ROUNDING_MODE' => self::ROUNDING_MODE, - ]; - - /** - * The available rounding modes for setAttribute() usage with - * NumberFormatter::ROUNDING_MODE. NumberFormatter::ROUND_DOWN - * and NumberFormatter::ROUND_UP does not have a PHP only equivalent. - */ - private static $roundingModes = [ - 'ROUND_HALFEVEN' => self::ROUND_HALFEVEN, - 'ROUND_HALFDOWN' => self::ROUND_HALFDOWN, - 'ROUND_HALFUP' => self::ROUND_HALFUP, - 'ROUND_CEILING' => self::ROUND_CEILING, - 'ROUND_FLOOR' => self::ROUND_FLOOR, - 'ROUND_DOWN' => self::ROUND_DOWN, - 'ROUND_UP' => self::ROUND_UP, - ]; - - /** - * The mapping between NumberFormatter rounding modes to the available - * modes in PHP's round() function. - * - * @see https://php.net/round - */ - private static $phpRoundingMap = [ - self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, - self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN, - self::ROUND_HALFUP => \PHP_ROUND_HALF_UP, - ]; - - /** - * The list of supported rounding modes which aren't available modes in - * PHP's round() function, but there's an equivalent. Keys are rounding - * modes, values does not matter. - */ - private static $customRoundingList = [ - self::ROUND_CEILING => true, - self::ROUND_FLOOR => true, - self::ROUND_DOWN => true, - self::ROUND_UP => true, - ]; - - /** - * The maximum value of the integer type in 32 bit platforms. - */ - private static $int32Max = 2147483647; - - /** - * The maximum value of the integer type in 64 bit platforms. - * - * @var int|float - */ - private static $int64Max = 9223372036854775807; - - private static $enSymbols = [ - self::DECIMAL => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], - self::CURRENCY => ['.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','], - ]; - - private static $enTextAttributes = [ - self::DECIMAL => ['', '', '-', '', ' ', 'XXX', ''], - self::CURRENCY => ['¤', '', '-¤', '', ' ', 'XXX'], - ]; - - /** - * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. - * The only supported styles are NumberFormatter::DECIMAL - * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or - * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax - * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation - * - * @see https://php.net/numberformatter.create - * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1DecimalFormat.html#details - * @see https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1RuleBasedNumberFormat.html#details - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When the $style is not supported - * @throws MethodArgumentNotImplementedException When the pattern value is different than null - */ - public function __construct(?string $locale = 'en', int $style = null, string $pattern = null) - { - if ('en' !== $locale && null !== $locale) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported'); - } - - if (!\in_array($style, self::$supportedStyles)) { - $message = sprintf('The available styles are: %s.', implode(', ', array_keys(self::$supportedStyles))); - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'style', $style, $message); - } - - if (null !== $pattern) { - throw new MethodArgumentNotImplementedException(__METHOD__, 'pattern'); - } - - $this->style = $style; - } - - /** - * Static constructor. - * - * @param string|null $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") - * @param int $style Style of the formatting, one of the format style constants. - * The only currently supported styles are NumberFormatter::DECIMAL - * and NumberFormatter::CURRENCY. - * @param string $pattern Not supported. A pattern string in case $style is NumberFormat::PATTERN_DECIMAL or - * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax - * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation - * - * @return static - * - * @see https://php.net/numberformatter.create - * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details - * @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details - * - * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed - * @throws MethodArgumentValueNotImplementedException When the $style is not supported - * @throws MethodArgumentNotImplementedException When the pattern value is different than null - */ - public static function create(?string $locale = 'en', int $style = null, string $pattern = null) - { - return new static($locale, $style, $pattern); - } - - /** - * Format a currency value. - * - * @return string The formatted currency value - * - * @see https://php.net/numberformatter.formatcurrency - * @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes - */ - public function formatCurrency(float $amount, string $currency) - { - if (self::DECIMAL === $this->style) { - return $this->format($amount); - } - - if (null === $symbol = Currencies::getSymbol($currency)) { - return false; - } - $fractionDigits = Currencies::getFractionDigits($currency); - - $amount = $this->roundCurrency($amount, $currency); - - $negative = false; - if (0 > $amount) { - $negative = true; - $amount *= -1; - } - - $amount = $this->formatNumber($amount, $fractionDigits); - - // There's a non-breaking space after the currency code (i.e. CRC 100), but not if the currency has a symbol (i.e. £100). - $ret = $symbol.(mb_strlen($symbol, 'UTF-8') > 2 ? "\xc2\xa0" : '').$amount; - - return $negative ? '-'.$ret : $ret; - } - - /** - * Format a number. - * - * @param int|float $num The value to format - * @param int $type Type of the formatting, one of the format type constants. - * Only type NumberFormatter::TYPE_DEFAULT is currently supported. - * - * @return bool|string The formatted value or false on error - * - * @see https://php.net/numberformatter.format - * - * @throws NotImplementedException If the method is called with the class $style 'CURRENCY' - * @throws MethodArgumentValueNotImplementedException If the $type is different than TYPE_DEFAULT - */ - public function format($num, int $type = self::TYPE_DEFAULT) - { - // The original NumberFormatter does not support this format type - if (self::TYPE_CURRENCY === $type) { - if (\PHP_VERSION_ID >= 80000) { - throw new \ValueError(sprintf('The format type must be a NumberFormatter::TYPE_* constant (%s given).', $type)); - } - - trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); - - return false; - } - - if (self::CURRENCY === $this->style) { - throw new NotImplementedException(sprintf('"%s()" method does not support the formatting of currencies (instance with CURRENCY style). "%s".', __METHOD__, NotImplementedException::INTL_INSTALL_MESSAGE)); - } - - // Only the default type is supported. - if (self::TYPE_DEFAULT !== $type) { - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'type', $type, 'Only TYPE_DEFAULT is supported'); - } - - $fractionDigits = $this->getAttribute(self::FRACTION_DIGITS); - - $num = $this->round($num, $fractionDigits); - $num = $this->formatNumber($num, $fractionDigits); - - // behave like the intl extension - $this->resetError(); - - return $num; - } - - /** - * Returns an attribute value. - * - * @return int|false The attribute value on success or false on error - * - * @see https://php.net/numberformatter.getattribute - */ - public function getAttribute(int $attribute) - { - return $this->attributes[$attribute] ?? null; - } - - /** - * Returns formatter's last error code. Always returns the U_ZERO_ERROR class constant value. - * - * @return int The error code from last formatter call - * - * @see https://php.net/numberformatter.geterrorcode - */ - public function getErrorCode() - { - return $this->errorCode; - } - - /** - * Returns formatter's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value. - * - * @return string The error message from last formatter call - * - * @see https://php.net/numberformatter.geterrormessage - */ - public function getErrorMessage() - { - return $this->errorMessage; - } - - /** - * Returns the formatter's locale. - * - * The parameter $type is currently ignored. - * - * @param int $type Not supported. The locale name type to return (Locale::VALID_LOCALE or Locale::ACTUAL_LOCALE) - * - * @return string The locale used to create the formatter. Currently always - * returns "en". - * - * @see https://php.net/numberformatter.getlocale - */ - public function getLocale(int $type = Locale::ACTUAL_LOCALE) - { - return 'en'; - } - - /** - * Not supported. Returns the formatter's pattern. - * - * @return string|false The pattern string used by the formatter or false on error - * - * @see https://php.net/numberformatter.getpattern - * - * @throws MethodNotImplementedException - */ - public function getPattern() - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Returns a formatter symbol value. - * - * @return string|false The symbol value or false on error - * - * @see https://php.net/numberformatter.getsymbol - */ - public function getSymbol(int $symbol) - { - return \array_key_exists($this->style, self::$enSymbols) && \array_key_exists($symbol, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$symbol] : false; - } - - /** - * Not supported. Returns a formatter text attribute value. - * - * @return string|false The attribute value or false on error - * - * @see https://php.net/numberformatter.gettextattribute - */ - public function getTextAttribute(int $attribute) - { - return \array_key_exists($this->style, self::$enTextAttributes) && \array_key_exists($attribute, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attribute] : false; - } - - /** - * Not supported. Parse a currency number. - * - * @return float|false The parsed numeric value or false on error - * - * @see https://php.net/numberformatter.parsecurrency - * - * @throws MethodNotImplementedException - */ - public function parseCurrency(string $string, &$currency, &$offset = null) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Parse a number. - * - * @return int|float|false The parsed value or false on error - * - * @see https://php.net/numberformatter.parse - */ - public function parse(string $string, int $type = self::TYPE_DOUBLE, &$offset = null) - { - if (self::TYPE_DEFAULT === $type || self::TYPE_CURRENCY === $type) { - if (\PHP_VERSION_ID >= 80000) { - throw new \ValueError(sprintf('The format type must be a NumberFormatter::TYPE_* constant (%d given).', $type)); - } - - trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING); - - return false; - } - - // Any invalid number at the end of the string is removed. - // Only numbers and the fraction separator is expected in the string. - // If grouping is used, grouping separator also becomes a valid character. - $groupingMatch = $this->getAttribute(self::GROUPING_USED) ? '|(?P\d++(,{1}\d+)++(\.\d*+)?)' : ''; - if (preg_match("/^-?(?:\.\d++{$groupingMatch}|\d++(\.\d*+)?)/", $string, $matches)) { - $string = $matches[0]; - $offset = \strlen($string); - // value is not valid if grouping is used, but digits are not grouped in groups of three - if ($error = isset($matches['grouping']) && !preg_match('/^-?(?:\d{1,3}+)?(?:(?:,\d{3})++|\d*+)(?:\.\d*+)?$/', $string)) { - // the position on error is 0 for positive and 1 for negative numbers - $offset = 0 === strpos($string, '-') ? 1 : 0; - } - } else { - $error = true; - $offset = 0; - } - - if ($error) { - Icu::setError(Icu::U_PARSE_ERROR, 'Number parsing failed'); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - - return false; - } - - $string = str_replace(',', '', $string); - $string = $this->convertValueDataType($string, $type); - - // behave like the intl extension - $this->resetError(); - - return $string; - } - - /** - * Set an attribute. - * - * @param int|float $value - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setattribute - * - * @throws MethodArgumentValueNotImplementedException When the $attribute is not supported - * @throws MethodArgumentValueNotImplementedException When the $value is not supported - */ - public function setAttribute(int $attribute, $value) - { - if (!\in_array($attribute, self::$supportedAttributes)) { - $message = sprintf( - 'The available attributes are: %s', - implode(', ', array_keys(self::$supportedAttributes)) - ); - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attribute', $value, $message); - } - - if (self::$supportedAttributes['ROUNDING_MODE'] === $attribute && $this->isInvalidRoundingMode($value)) { - $message = sprintf( - 'The supported values for ROUNDING_MODE are: %s', - implode(', ', array_keys(self::$roundingModes)) - ); - - throw new MethodArgumentValueNotImplementedException(__METHOD__, 'attribute', $value, $message); - } - - if (self::$supportedAttributes['GROUPING_USED'] === $attribute) { - $value = $this->normalizeGroupingUsedValue($value); - } - - if (self::$supportedAttributes['FRACTION_DIGITS'] === $attribute) { - $value = $this->normalizeFractionDigitsValue($value); - if ($value < 0) { - // ignore negative values but do not raise an error - return true; - } - } - - $this->attributes[$attribute] = $value; - $this->initializedAttributes[$attribute] = true; - - return true; - } - - /** - * Not supported. Set the formatter's pattern. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setpattern - * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details - * - * @throws MethodNotImplementedException - */ - public function setPattern(string $pattern) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set the formatter's symbol. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.setsymbol - * - * @throws MethodNotImplementedException - */ - public function setSymbol(int $symbol, string $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Not supported. Set a text attribute. - * - * @return bool true on success or false on failure - * - * @see https://php.net/numberformatter.settextattribute - * - * @throws MethodNotImplementedException - */ - public function setTextAttribute(int $attribute, string $value) - { - throw new MethodNotImplementedException(__METHOD__); - } - - /** - * Set the error to the default U_ZERO_ERROR. - */ - protected function resetError() - { - Icu::setError(Icu::U_ZERO_ERROR); - $this->errorCode = Icu::getErrorCode(); - $this->errorMessage = Icu::getErrorMessage(); - } - - /** - * Rounds a currency value, applying increment rounding if applicable. - * - * When a currency have a rounding increment, an extra round is made after the first one. The rounding factor is - * determined in the ICU data and is explained as of: - * - * "the rounding increment is given in units of 10^(-fraction_digits)" - * - * The only actual rounding data as of this writing, is CHF. - * - * @see http://en.wikipedia.org/wiki/Swedish_rounding - * @see http://www.docjar.com/html/api/com/ibm/icu/util/Currency.java.html#1007 - */ - private function roundCurrency(float $value, string $currency): float - { - $fractionDigits = Currencies::getFractionDigits($currency); - $roundingIncrement = Currencies::getRoundingIncrement($currency); - - // Round with the formatter rounding mode - $value = $this->round($value, $fractionDigits); - - // Swiss rounding - if (0 < $roundingIncrement && 0 < $fractionDigits) { - $roundingFactor = $roundingIncrement / 10 ** $fractionDigits; - $value = round($value / $roundingFactor) * $roundingFactor; - } - - return $value; - } - - /** - * Rounds a value. - * - * @param int|float $value The value to round - * - * @return int|float The rounded value - */ - private function round($value, int $precision) - { - $precision = $this->getUninitializedPrecision($value, $precision); - - $roundingModeAttribute = $this->getAttribute(self::ROUNDING_MODE); - if (isset(self::$phpRoundingMap[$roundingModeAttribute])) { - $value = round($value, $precision, self::$phpRoundingMap[$roundingModeAttribute]); - } elseif (isset(self::$customRoundingList[$roundingModeAttribute])) { - $roundingCoef = 10 ** $precision; - $value *= $roundingCoef; - $value = (float) (string) $value; - - switch ($roundingModeAttribute) { - case self::ROUND_CEILING: - $value = ceil($value); - break; - case self::ROUND_FLOOR: - $value = floor($value); - break; - case self::ROUND_UP: - $value = $value > 0 ? ceil($value) : floor($value); - break; - case self::ROUND_DOWN: - $value = $value > 0 ? floor($value) : ceil($value); - break; - } - - $value /= $roundingCoef; - } - - return $value; - } - - /** - * Formats a number. - * - * @param int|float $value The numeric value to format - */ - private function formatNumber($value, int $precision): string - { - $precision = $this->getUninitializedPrecision($value, $precision); - - return number_format($value, $precision, '.', $this->getAttribute(self::GROUPING_USED) ? ',' : ''); - } - - /** - * Returns the precision value if the DECIMAL style is being used and the FRACTION_DIGITS attribute is uninitialized. - * - * @param int|float $value The value to get the precision from if the FRACTION_DIGITS attribute is uninitialized - */ - private function getUninitializedPrecision($value, int $precision): int - { - if (self::CURRENCY === $this->style) { - return $precision; - } - - if (!$this->isInitializedAttribute(self::FRACTION_DIGITS)) { - preg_match('/.*\.(.*)/', (string) $value, $digits); - if (isset($digits[1])) { - $precision = \strlen($digits[1]); - } - } - - return $precision; - } - - /** - * Check if the attribute is initialized (value set by client code). - */ - private function isInitializedAttribute(string $attr): bool - { - return isset($this->initializedAttributes[$attr]); - } - - /** - * Returns the numeric value using the $type to convert to the right data type. - * - * @param mixed $value The value to be converted - * - * @return int|float|false The converted value - */ - private function convertValueDataType($value, int $type) - { - if (self::TYPE_DOUBLE === $type) { - $value = (float) $value; - } elseif (self::TYPE_INT32 === $type) { - $value = $this->getInt32Value($value); - } elseif (self::TYPE_INT64 === $type) { - $value = $this->getInt64Value($value); - } - - return $value; - } - - /** - * Convert the value data type to int or returns false if the value is out of the integer value range. - * - * @return int|false The converted value - */ - private function getInt32Value($value) - { - if ($value > self::$int32Max || $value < -self::$int32Max - 1) { - return false; - } - - return (int) $value; - } - - /** - * Convert the value data type to int or returns false if the value is out of the integer value range. - * - * @return int|float|false The converted value - */ - private function getInt64Value($value) - { - if ($value > self::$int64Max || $value < -self::$int64Max - 1) { - return false; - } - - if (\PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) { - return (float) $value; - } - - return (int) $value; - } - - /** - * Check if the rounding mode is invalid. - */ - private function isInvalidRoundingMode(int $value): bool - { - if (\in_array($value, self::$roundingModes, true)) { - return false; - } - - return true; - } - - /** - * Returns the normalized value for the GROUPING_USED attribute. Any value that can be converted to int will be - * cast to Boolean and then to int again. This way, negative values are converted to 1 and string values to 0. - */ - private function normalizeGroupingUsedValue($value): int - { - return (int) (bool) (int) $value; - } - - /** - * Returns the normalized value for the FRACTION_DIGITS attribute. - */ - private function normalizeFractionDigitsValue($value): int - { - return (int) $value; - } -} diff --git a/vendor/symfony/polyfill-intl-icu/README.md b/vendor/symfony/polyfill-intl-icu/README.md deleted file mode 100644 index 2eccdc6..0000000 --- a/vendor/symfony/polyfill-intl-icu/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Symfony Polyfill / Intl: ICU -============================ - -This package provides fallback implementations when the -[Intl](https://php.net/intl) extension is not installed. -It is limited to the "en" locale and to: - -- [`intl_is_failure()`](https://php.net/intl-is-failure) -- [`intl_get_error_code()`](https://php.net/intl-get-error-code) -- [`intl_get_error_message()`](https://php.net/intl-get-error-message) -- [`intl_error_name()`](https://php.net/intl-error-name) -- [`Collator`](https://php.net/Collator) -- [`NumberFormatter`](https://php.net/NumberFormatter) -- [`Locale`](https://php.net/Locale) -- [`IntlDateFormatter`](https://php.net/IntlDateFormatter) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-intl-icu/Resources/currencies.php b/vendor/symfony/polyfill-intl-icu/Resources/currencies.php deleted file mode 100644 index 6cd5c32..0000000 --- a/vendor/symfony/polyfill-intl-icu/Resources/currencies.php +++ /dev/null @@ -1,1311 +0,0 @@ - - array ( - 0 => 'ADP', - 1 => 0, - 2 => 0, - ), - 'AED' => - array ( - 0 => 'AED', - ), - 'AFA' => - array ( - 0 => 'AFA', - ), - 'AFN' => - array ( - 0 => 'AFN', - 1 => 0, - 2 => 0, - ), - 'ALK' => - array ( - 0 => 'ALK', - ), - 'ALL' => - array ( - 0 => 'ALL', - 1 => 0, - 2 => 0, - ), - 'AMD' => - array ( - 0 => 'AMD', - 1 => 2, - 2 => 0, - ), - 'ANG' => - array ( - 0 => 'ANG', - ), - 'AOA' => - array ( - 0 => 'AOA', - ), - 'AOK' => - array ( - 0 => 'AOK', - ), - 'AON' => - array ( - 0 => 'AON', - ), - 'AOR' => - array ( - 0 => 'AOR', - ), - 'ARA' => - array ( - 0 => 'ARA', - ), - 'ARL' => - array ( - 0 => 'ARL', - ), - 'ARM' => - array ( - 0 => 'ARM', - ), - 'ARP' => - array ( - 0 => 'ARP', - ), - 'ARS' => - array ( - 0 => 'ARS', - ), - 'ATS' => - array ( - 0 => 'ATS', - ), - 'AUD' => - array ( - 0 => 'A$', - ), - 'AWG' => - array ( - 0 => 'AWG', - ), - 'AZM' => - array ( - 0 => 'AZM', - ), - 'AZN' => - array ( - 0 => 'AZN', - ), - 'BAD' => - array ( - 0 => 'BAD', - ), - 'BAM' => - array ( - 0 => 'BAM', - ), - 'BAN' => - array ( - 0 => 'BAN', - ), - 'BBD' => - array ( - 0 => 'BBD', - ), - 'BDT' => - array ( - 0 => 'BDT', - ), - 'BEC' => - array ( - 0 => 'BEC', - ), - 'BEF' => - array ( - 0 => 'BEF', - ), - 'BEL' => - array ( - 0 => 'BEL', - ), - 'BGL' => - array ( - 0 => 'BGL', - ), - 'BGM' => - array ( - 0 => 'BGM', - ), - 'BGN' => - array ( - 0 => 'BGN', - ), - 'BGO' => - array ( - 0 => 'BGO', - ), - 'BHD' => - array ( - 0 => 'BHD', - 1 => 3, - 2 => 0, - ), - 'BIF' => - array ( - 0 => 'BIF', - 1 => 0, - 2 => 0, - ), - 'BMD' => - array ( - 0 => 'BMD', - ), - 'BND' => - array ( - 0 => 'BND', - ), - 'BOB' => - array ( - 0 => 'BOB', - ), - 'BOL' => - array ( - 0 => 'BOL', - ), - 'BOP' => - array ( - 0 => 'BOP', - ), - 'BOV' => - array ( - 0 => 'BOV', - ), - 'BRB' => - array ( - 0 => 'BRB', - ), - 'BRC' => - array ( - 0 => 'BRC', - ), - 'BRE' => - array ( - 0 => 'BRE', - ), - 'BRL' => - array ( - 0 => 'R$', - ), - 'BRN' => - array ( - 0 => 'BRN', - ), - 'BRR' => - array ( - 0 => 'BRR', - ), - 'BRZ' => - array ( - 0 => 'BRZ', - ), - 'BSD' => - array ( - 0 => 'BSD', - ), - 'BTN' => - array ( - 0 => 'BTN', - ), - 'BUK' => - array ( - 0 => 'BUK', - ), - 'BWP' => - array ( - 0 => 'BWP', - ), - 'BYB' => - array ( - 0 => 'BYB', - ), - 'BYN' => - array ( - 0 => 'BYN', - 1 => 2, - 2 => 0, - ), - 'BYR' => - array ( - 0 => 'BYR', - 1 => 0, - 2 => 0, - ), - 'BZD' => - array ( - 0 => 'BZD', - ), - 'CAD' => - array ( - 0 => 'CA$', - 1 => 2, - 2 => 0, - ), - 'CDF' => - array ( - 0 => 'CDF', - ), - 'CHE' => - array ( - 0 => 'CHE', - ), - 'CHF' => - array ( - 0 => 'CHF', - 1 => 2, - 2 => 0, - ), - 'CHW' => - array ( - 0 => 'CHW', - ), - 'CLE' => - array ( - 0 => 'CLE', - ), - 'CLF' => - array ( - 0 => 'CLF', - 1 => 4, - 2 => 0, - ), - 'CLP' => - array ( - 0 => 'CLP', - 1 => 0, - 2 => 0, - ), - 'CNH' => - array ( - 0 => 'CNH', - ), - 'CNX' => - array ( - 0 => 'CNX', - ), - 'CNY' => - array ( - 0 => 'CN¥', - ), - 'COP' => - array ( - 0 => 'COP', - 1 => 2, - 2 => 0, - ), - 'COU' => - array ( - 0 => 'COU', - ), - 'CRC' => - array ( - 0 => 'CRC', - 1 => 2, - 2 => 0, - ), - 'CSD' => - array ( - 0 => 'CSD', - ), - 'CSK' => - array ( - 0 => 'CSK', - ), - 'CUC' => - array ( - 0 => 'CUC', - ), - 'CUP' => - array ( - 0 => 'CUP', - ), - 'CVE' => - array ( - 0 => 'CVE', - ), - 'CYP' => - array ( - 0 => 'CYP', - ), - 'CZK' => - array ( - 0 => 'CZK', - 1 => 2, - 2 => 0, - ), - 'DDM' => - array ( - 0 => 'DDM', - ), - 'DEM' => - array ( - 0 => 'DEM', - ), - 'DJF' => - array ( - 0 => 'DJF', - 1 => 0, - 2 => 0, - ), - 'DKK' => - array ( - 0 => 'DKK', - 1 => 2, - 2 => 0, - ), - 'DOP' => - array ( - 0 => 'DOP', - ), - 'DZD' => - array ( - 0 => 'DZD', - ), - 'ECS' => - array ( - 0 => 'ECS', - ), - 'ECV' => - array ( - 0 => 'ECV', - ), - 'EEK' => - array ( - 0 => 'EEK', - ), - 'EGP' => - array ( - 0 => 'EGP', - ), - 'ERN' => - array ( - 0 => 'ERN', - ), - 'ESA' => - array ( - 0 => 'ESA', - ), - 'ESB' => - array ( - 0 => 'ESB', - ), - 'ESP' => - array ( - 0 => 'ESP', - 1 => 0, - 2 => 0, - ), - 'ETB' => - array ( - 0 => 'ETB', - ), - 'EUR' => - array ( - 0 => '€', - ), - 'FIM' => - array ( - 0 => 'FIM', - ), - 'FJD' => - array ( - 0 => 'FJD', - ), - 'FKP' => - array ( - 0 => 'FKP', - ), - 'FRF' => - array ( - 0 => 'FRF', - ), - 'GBP' => - array ( - 0 => '£', - ), - 'GEK' => - array ( - 0 => 'GEK', - ), - 'GEL' => - array ( - 0 => 'GEL', - ), - 'GHC' => - array ( - 0 => 'GHC', - ), - 'GHS' => - array ( - 0 => 'GHS', - ), - 'GIP' => - array ( - 0 => 'GIP', - ), - 'GMD' => - array ( - 0 => 'GMD', - ), - 'GNF' => - array ( - 0 => 'GNF', - 1 => 0, - 2 => 0, - ), - 'GNS' => - array ( - 0 => 'GNS', - ), - 'GQE' => - array ( - 0 => 'GQE', - ), - 'GRD' => - array ( - 0 => 'GRD', - ), - 'GTQ' => - array ( - 0 => 'GTQ', - ), - 'GWE' => - array ( - 0 => 'GWE', - ), - 'GWP' => - array ( - 0 => 'GWP', - ), - 'GYD' => - array ( - 0 => 'GYD', - 1 => 2, - 2 => 0, - ), - 'HKD' => - array ( - 0 => 'HK$', - ), - 'HNL' => - array ( - 0 => 'HNL', - ), - 'HRD' => - array ( - 0 => 'HRD', - ), - 'HRK' => - array ( - 0 => 'HRK', - ), - 'HTG' => - array ( - 0 => 'HTG', - ), - 'HUF' => - array ( - 0 => 'HUF', - 1 => 2, - 2 => 0, - ), - 'IDR' => - array ( - 0 => 'IDR', - 1 => 2, - 2 => 0, - ), - 'IEP' => - array ( - 0 => 'IEP', - ), - 'ILP' => - array ( - 0 => 'ILP', - ), - 'ILR' => - array ( - 0 => 'ILR', - ), - 'ILS' => - array ( - 0 => '₪', - ), - 'INR' => - array ( - 0 => '₹', - ), - 'IQD' => - array ( - 0 => 'IQD', - 1 => 0, - 2 => 0, - ), - 'IRR' => - array ( - 0 => 'IRR', - 1 => 0, - 2 => 0, - ), - 'ISJ' => - array ( - 0 => 'ISJ', - ), - 'ISK' => - array ( - 0 => 'ISK', - 1 => 0, - 2 => 0, - ), - 'ITL' => - array ( - 0 => 'ITL', - 1 => 0, - 2 => 0, - ), - 'JMD' => - array ( - 0 => 'JMD', - ), - 'JOD' => - array ( - 0 => 'JOD', - 1 => 3, - 2 => 0, - ), - 'JPY' => - array ( - 0 => '¥', - 1 => 0, - 2 => 0, - ), - 'KES' => - array ( - 0 => 'KES', - ), - 'KGS' => - array ( - 0 => 'KGS', - ), - 'KHR' => - array ( - 0 => 'KHR', - ), - 'KMF' => - array ( - 0 => 'KMF', - 1 => 0, - 2 => 0, - ), - 'KPW' => - array ( - 0 => 'KPW', - 1 => 0, - 2 => 0, - ), - 'KRH' => - array ( - 0 => 'KRH', - ), - 'KRO' => - array ( - 0 => 'KRO', - ), - 'KRW' => - array ( - 0 => '₩', - 1 => 0, - 2 => 0, - ), - 'KWD' => - array ( - 0 => 'KWD', - 1 => 3, - 2 => 0, - ), - 'KYD' => - array ( - 0 => 'KYD', - ), - 'KZT' => - array ( - 0 => 'KZT', - ), - 'LAK' => - array ( - 0 => 'LAK', - 1 => 0, - 2 => 0, - ), - 'LBP' => - array ( - 0 => 'LBP', - 1 => 0, - 2 => 0, - ), - 'LKR' => - array ( - 0 => 'LKR', - ), - 'LRD' => - array ( - 0 => 'LRD', - ), - 'LSL' => - array ( - 0 => 'LSL', - ), - 'LTL' => - array ( - 0 => 'LTL', - ), - 'LTT' => - array ( - 0 => 'LTT', - ), - 'LUC' => - array ( - 0 => 'LUC', - ), - 'LUF' => - array ( - 0 => 'LUF', - 1 => 0, - 2 => 0, - ), - 'LUL' => - array ( - 0 => 'LUL', - ), - 'LVL' => - array ( - 0 => 'LVL', - ), - 'LVR' => - array ( - 0 => 'LVR', - ), - 'LYD' => - array ( - 0 => 'LYD', - 1 => 3, - 2 => 0, - ), - 'MAD' => - array ( - 0 => 'MAD', - ), - 'MAF' => - array ( - 0 => 'MAF', - ), - 'MCF' => - array ( - 0 => 'MCF', - ), - 'MDC' => - array ( - 0 => 'MDC', - ), - 'MDL' => - array ( - 0 => 'MDL', - ), - 'MGA' => - array ( - 0 => 'MGA', - 1 => 0, - 2 => 0, - ), - 'MGF' => - array ( - 0 => 'MGF', - 1 => 0, - 2 => 0, - ), - 'MKD' => - array ( - 0 => 'MKD', - ), - 'MKN' => - array ( - 0 => 'MKN', - ), - 'MLF' => - array ( - 0 => 'MLF', - ), - 'MMK' => - array ( - 0 => 'MMK', - 1 => 0, - 2 => 0, - ), - 'MNT' => - array ( - 0 => 'MNT', - 1 => 2, - 2 => 0, - ), - 'MOP' => - array ( - 0 => 'MOP', - ), - 'MRO' => - array ( - 0 => 'MRO', - 1 => 0, - 2 => 0, - ), - 'MRU' => - array ( - 0 => 'MRU', - ), - 'MTL' => - array ( - 0 => 'MTL', - ), - 'MTP' => - array ( - 0 => 'MTP', - ), - 'MUR' => - array ( - 0 => 'MUR', - 1 => 2, - 2 => 0, - ), - 'MVP' => - array ( - 0 => 'MVP', - ), - 'MVR' => - array ( - 0 => 'MVR', - ), - 'MWK' => - array ( - 0 => 'MWK', - ), - 'MXN' => - array ( - 0 => 'MX$', - ), - 'MXP' => - array ( - 0 => 'MXP', - ), - 'MXV' => - array ( - 0 => 'MXV', - ), - 'MYR' => - array ( - 0 => 'MYR', - ), - 'MZE' => - array ( - 0 => 'MZE', - ), - 'MZM' => - array ( - 0 => 'MZM', - ), - 'MZN' => - array ( - 0 => 'MZN', - ), - 'NAD' => - array ( - 0 => 'NAD', - ), - 'NGN' => - array ( - 0 => 'NGN', - ), - 'NIC' => - array ( - 0 => 'NIC', - ), - 'NIO' => - array ( - 0 => 'NIO', - ), - 'NLG' => - array ( - 0 => 'NLG', - ), - 'NOK' => - array ( - 0 => 'NOK', - 1 => 2, - 2 => 0, - ), - 'NPR' => - array ( - 0 => 'NPR', - ), - 'NZD' => - array ( - 0 => 'NZ$', - ), - 'OMR' => - array ( - 0 => 'OMR', - 1 => 3, - 2 => 0, - ), - 'PAB' => - array ( - 0 => 'PAB', - ), - 'PEI' => - array ( - 0 => 'PEI', - ), - 'PEN' => - array ( - 0 => 'PEN', - ), - 'PES' => - array ( - 0 => 'PES', - ), - 'PGK' => - array ( - 0 => 'PGK', - ), - 'PHP' => - array ( - 0 => '₱', - ), - 'PKR' => - array ( - 0 => 'PKR', - 1 => 2, - 2 => 0, - ), - 'PLN' => - array ( - 0 => 'PLN', - ), - 'PLZ' => - array ( - 0 => 'PLZ', - ), - 'PTE' => - array ( - 0 => 'PTE', - ), - 'PYG' => - array ( - 0 => 'PYG', - 1 => 0, - 2 => 0, - ), - 'QAR' => - array ( - 0 => 'QAR', - ), - 'RHD' => - array ( - 0 => 'RHD', - ), - 'ROL' => - array ( - 0 => 'ROL', - ), - 'RON' => - array ( - 0 => 'RON', - ), - 'RSD' => - array ( - 0 => 'RSD', - 1 => 0, - 2 => 0, - ), - 'RUB' => - array ( - 0 => 'RUB', - ), - 'RUR' => - array ( - 0 => 'RUR', - ), - 'RWF' => - array ( - 0 => 'RWF', - 1 => 0, - 2 => 0, - ), - 'SAR' => - array ( - 0 => 'SAR', - ), - 'SBD' => - array ( - 0 => 'SBD', - ), - 'SCR' => - array ( - 0 => 'SCR', - ), - 'SDD' => - array ( - 0 => 'SDD', - ), - 'SDG' => - array ( - 0 => 'SDG', - ), - 'SDP' => - array ( - 0 => 'SDP', - ), - 'SEK' => - array ( - 0 => 'SEK', - 1 => 2, - 2 => 0, - ), - 'SGD' => - array ( - 0 => 'SGD', - ), - 'SHP' => - array ( - 0 => 'SHP', - ), - 'SIT' => - array ( - 0 => 'SIT', - ), - 'SKK' => - array ( - 0 => 'SKK', - ), - 'SLL' => - array ( - 0 => 'SLL', - 1 => 0, - 2 => 0, - ), - 'SOS' => - array ( - 0 => 'SOS', - 1 => 0, - 2 => 0, - ), - 'SRD' => - array ( - 0 => 'SRD', - ), - 'SRG' => - array ( - 0 => 'SRG', - ), - 'SSP' => - array ( - 0 => 'SSP', - ), - 'STD' => - array ( - 0 => 'STD', - 1 => 0, - 2 => 0, - ), - 'STN' => - array ( - 0 => 'STN', - ), - 'SUR' => - array ( - 0 => 'SUR', - ), - 'SVC' => - array ( - 0 => 'SVC', - ), - 'SYP' => - array ( - 0 => 'SYP', - 1 => 0, - 2 => 0, - ), - 'SZL' => - array ( - 0 => 'SZL', - ), - 'THB' => - array ( - 0 => 'THB', - ), - 'TJR' => - array ( - 0 => 'TJR', - ), - 'TJS' => - array ( - 0 => 'TJS', - ), - 'TMM' => - array ( - 0 => 'TMM', - 1 => 0, - 2 => 0, - ), - 'TMT' => - array ( - 0 => 'TMT', - ), - 'TND' => - array ( - 0 => 'TND', - 1 => 3, - 2 => 0, - ), - 'TOP' => - array ( - 0 => 'TOP', - ), - 'TPE' => - array ( - 0 => 'TPE', - ), - 'TRL' => - array ( - 0 => 'TRL', - 1 => 0, - 2 => 0, - ), - 'TRY' => - array ( - 0 => 'TRY', - ), - 'TTD' => - array ( - 0 => 'TTD', - ), - 'TWD' => - array ( - 0 => 'NT$', - 1 => 2, - 2 => 0, - ), - 'TZS' => - array ( - 0 => 'TZS', - 1 => 2, - 2 => 0, - ), - 'UAH' => - array ( - 0 => 'UAH', - ), - 'UAK' => - array ( - 0 => 'UAK', - ), - 'UGS' => - array ( - 0 => 'UGS', - ), - 'UGX' => - array ( - 0 => 'UGX', - 1 => 0, - 2 => 0, - ), - 'USD' => - array ( - 0 => '$', - ), - 'USN' => - array ( - 0 => 'USN', - ), - 'USS' => - array ( - 0 => 'USS', - ), - 'UYI' => - array ( - 0 => 'UYI', - 1 => 0, - 2 => 0, - ), - 'UYP' => - array ( - 0 => 'UYP', - ), - 'UYU' => - array ( - 0 => 'UYU', - ), - 'UYW' => - array ( - 0 => 'UYW', - 1 => 4, - 2 => 0, - ), - 'UZS' => - array ( - 0 => 'UZS', - 1 => 2, - 2 => 0, - ), - 'VEB' => - array ( - 0 => 'VEB', - ), - 'VEF' => - array ( - 0 => 'VEF', - 1 => 2, - 2 => 0, - ), - 'VES' => - array ( - 0 => 'VES', - ), - 'VND' => - array ( - 0 => '₫', - 1 => 0, - 2 => 0, - ), - 'VNN' => - array ( - 0 => 'VNN', - ), - 'VUV' => - array ( - 0 => 'VUV', - 1 => 0, - 2 => 0, - ), - 'WST' => - array ( - 0 => 'WST', - ), - 'XAF' => - array ( - 0 => 'FCFA', - 1 => 0, - 2 => 0, - ), - 'XCD' => - array ( - 0 => 'EC$', - ), - 'XEU' => - array ( - 0 => 'XEU', - ), - 'XFO' => - array ( - 0 => 'XFO', - ), - 'XFU' => - array ( - 0 => 'XFU', - ), - 'XOF' => - array ( - 0 => 'F CFA', - 1 => 0, - 2 => 0, - ), - 'XPF' => - array ( - 0 => 'CFPF', - 1 => 0, - 2 => 0, - ), - 'XRE' => - array ( - 0 => 'XRE', - ), - 'YDD' => - array ( - 0 => 'YDD', - ), - 'YER' => - array ( - 0 => 'YER', - 1 => 0, - 2 => 0, - ), - 'YUD' => - array ( - 0 => 'YUD', - ), - 'YUM' => - array ( - 0 => 'YUM', - ), - 'YUN' => - array ( - 0 => 'YUN', - ), - 'YUR' => - array ( - 0 => 'YUR', - ), - 'ZAL' => - array ( - 0 => 'ZAL', - ), - 'ZAR' => - array ( - 0 => 'ZAR', - ), - 'ZMK' => - array ( - 0 => 'ZMK', - 1 => 0, - 2 => 0, - ), - 'ZMW' => - array ( - 0 => 'ZMW', - ), - 'ZRN' => - array ( - 0 => 'ZRN', - ), - 'ZRZ' => - array ( - 0 => 'ZRZ', - ), - 'ZWD' => - array ( - 0 => 'ZWD', - 1 => 0, - 2 => 0, - ), - 'ZWL' => - array ( - 0 => 'ZWL', - ), - 'ZWR' => - array ( - 0 => 'ZWR', - ), - 'DEFAULT' => - array ( - 1 => 2, - 2 => 0, - ), -); diff --git a/vendor/symfony/polyfill-intl-icu/Resources/stubs/Collator.php b/vendor/symfony/polyfill-intl-icu/Resources/stubs/Collator.php deleted file mode 100644 index a1efbcb..0000000 --- a/vendor/symfony/polyfill-intl-icu/Resources/stubs/Collator.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\Collator as CollatorPolyfill; - -/** - * Stub implementation for the Collator class of the intl extension. - * - * @author Bernhard Schussek - */ -class Collator extends CollatorPolyfill -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php b/vendor/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php deleted file mode 100644 index e701200..0000000 --- a/vendor/symfony/polyfill-intl-icu/Resources/stubs/IntlDateFormatter.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\IntlDateFormatter as IntlDateFormatterPolyfill; - -/** - * Stub implementation for the IntlDateFormatter class of the intl extension. - * - * @author Bernhard Schussek - */ -class IntlDateFormatter extends IntlDateFormatterPolyfill -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/Resources/stubs/Locale.php b/vendor/symfony/polyfill-intl-icu/Resources/stubs/Locale.php deleted file mode 100644 index f1b951e..0000000 --- a/vendor/symfony/polyfill-intl-icu/Resources/stubs/Locale.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\Locale as LocalePolyfill; - -/** - * Stub implementation for the Locale class of the intl extension. - * - * @author Bernhard Schussek - */ -class Locale extends LocalePolyfill -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php b/vendor/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php deleted file mode 100644 index 9288b9d..0000000 --- a/vendor/symfony/polyfill-intl-icu/Resources/stubs/NumberFormatter.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu\NumberFormatter as NumberFormatterPolyfill; - -/** - * Stub implementation for the NumberFormatter class of the intl extension. - * - * @author Bernhard Schussek - * - * @see IntlNumberFormatter - */ -class NumberFormatter extends NumberFormatterPolyfill -{ -} diff --git a/vendor/symfony/polyfill-intl-icu/bootstrap.php b/vendor/symfony/polyfill-intl-icu/bootstrap.php deleted file mode 100644 index 77d7543..0000000 --- a/vendor/symfony/polyfill-intl-icu/bootstrap.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('intl_is_failure')) { - function intl_is_failure($errorCode) { return p\Icu::isFailure($errorCode); } -} -if (!function_exists('intl_get_error_code')) { - function intl_get_error_code() { return p\Icu::getErrorCode(); } -} -if (!function_exists('intl_get_error_message')) { - function intl_get_error_message() { return p\Icu::getErrorMessage(); } -} -if (!function_exists('intl_error_name')) { - function intl_error_name($errorCode) { return p\Icu::getErrorName($errorCode); } -} diff --git a/vendor/symfony/polyfill-intl-icu/bootstrap80.php b/vendor/symfony/polyfill-intl-icu/bootstrap80.php deleted file mode 100644 index ee1653a..0000000 --- a/vendor/symfony/polyfill-intl-icu/bootstrap80.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Icu as p; - -if (!function_exists('intl_is_failure')) { - function intl_is_failure(?int $errorCode): bool { return p\Icu::isFailure((int) $errorCode); } -} -if (!function_exists('intl_get_error_code')) { - function intl_get_error_code(): int { return p\Icu::getErrorCode(); } -} -if (!function_exists('intl_get_error_message')) { - function intl_get_error_message(): string { return p\Icu::getErrorMessage(); } -} -if (!function_exists('intl_error_name')) { - function intl_error_name(?int $errorCode): string { return p\Icu::getErrorName((int) $errorCode); } -} diff --git a/vendor/symfony/polyfill-intl-icu/composer.json b/vendor/symfony/polyfill-intl-icu/composer.json deleted file mode 100644 index d1ed2d8..0000000 --- a/vendor/symfony/polyfill-intl-icu/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/polyfill-intl-icu", - "type": "library", - "description": "Symfony polyfill for intl's ICU-related data and classes", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "icu"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "files": [ "bootstrap.php" ], - "psr-4": { "Symfony\\Polyfill\\Intl\\Icu\\": "" }, - "classmap": [ "Resources/stubs" ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-intl-normalizer/LICENSE b/vendor/symfony/polyfill-intl-normalizer/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/vendor/symfony/polyfill-intl-normalizer/Normalizer.php deleted file mode 100644 index 4443c23..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/Normalizer.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Intl\Normalizer; - -/** - * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. - * - * It has been validated with Unicode 6.3 Normalization Conformance Test. - * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. - * - * @author Nicolas Grekas - * - * @internal - */ -class Normalizer -{ - public const FORM_D = \Normalizer::FORM_D; - public const FORM_KD = \Normalizer::FORM_KD; - public const FORM_C = \Normalizer::FORM_C; - public const FORM_KC = \Normalizer::FORM_KC; - public const NFD = \Normalizer::NFD; - public const NFKD = \Normalizer::NFKD; - public const NFC = \Normalizer::NFC; - public const NFKC = \Normalizer::NFKC; - - private static $C; - private static $D; - private static $KD; - private static $cC; - private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - public static function isNormalized(string $s, int $form = self::FORM_C) - { - if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { - return false; - } - if (!isset($s[strspn($s, self::$ASCII)])) { - return true; - } - if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { - return true; - } - - return self::normalize($s, $form) === $s; - } - - public static function normalize(string $s, int $form = self::FORM_C) - { - if (!preg_match('//u', $s)) { - return false; - } - - switch ($form) { - case self::NFC: $C = true; $K = false; break; - case self::NFD: $C = false; $K = false; break; - case self::NFKC: $C = true; $K = true; break; - case self::NFKD: $C = false; $K = true; break; - default: - if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { - return $s; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); - } - - if ('' === $s) { - return ''; - } - - if ($K && null === self::$KD) { - self::$KD = self::getData('compatibilityDecomposition'); - } - - if (null === self::$D) { - self::$D = self::getData('canonicalDecomposition'); - self::$cC = self::getData('combiningClass'); - } - - if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { - mb_internal_encoding('8bit'); - } - - $r = self::decompose($s, $K); - - if ($C) { - if (null === self::$C) { - self::$C = self::getData('canonicalComposition'); - } - - $r = self::recompose($r); - } - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - - return $r; - } - - private static function recompose($s) - { - $ASCII = self::$ASCII; - $compMap = self::$C; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - - $result = $tail = ''; - - $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; - $len = \strlen($s); - - $lastUchr = substr($s, 0, $i); - $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - if ($j = strspn($s, $ASCII, $i + 1)) { - $lastUchr .= substr($s, $i, $j); - $i += $j; - } - - $result .= $lastUchr; - $lastUchr = $s[$i]; - $lastUcls = 0; - ++$i; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - - if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr - || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr - || $lastUcls) { - // Table lookup and combining chars composition - - $ucls = $combClass[$uchr] ?? 0; - - if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { - $lastUchr = $compMap[$lastUchr.$uchr]; - } elseif ($lastUcls = $ucls) { - $tail .= $uchr; - } else { - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - $result .= $lastUchr; - $lastUchr = $uchr; - } - } else { - // Hangul chars - - $L = \ord($lastUchr[2]) - 0x80; - $V = \ord($uchr[2]) - 0xA1; - $T = 0; - - $uchr = substr($s, $i + $ulen, 3); - - if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { - $T = \ord($uchr[2]) - 0xA7; - 0 > $T && $T += 0x40; - $ulen += 3; - } - - $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; - $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); - } - - $i += $ulen; - } - - return $result.$lastUchr.$tail; - } - - private static function decompose($s, $c) - { - $result = ''; - - $ASCII = self::$ASCII; - $decompMap = self::$D; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - if ($c) { - $compatMap = self::$KD; - } - - $c = []; - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $j = 1 + strspn($s, $ASCII, $i + 1); - $result .= substr($s, $i, $j); - $i += $j; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { - // Table lookup - - if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { - $uchr = $j; - - $j = \strlen($uchr); - $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; - - if ($ulen != $j) { - // Put trailing chars in $s - - $j -= $ulen; - $i -= $j; - - if (0 > $i) { - $s = str_repeat(' ', -$i).$s; - $len -= $i; - $i = 0; - } - - while ($j--) { - $s[$i + $j] = $uchr[$ulen + $j]; - } - - $uchr = substr($uchr, 0, $ulen); - } - } - if (isset($combClass[$uchr])) { - // Combining chars, for sorting - - if (!isset($c[$combClass[$uchr]])) { - $c[$combClass[$uchr]] = ''; - } - $c[$combClass[$uchr]] .= $uchr; - continue; - } - } else { - // Hangul chars - - $uchr = unpack('C*', $uchr); - $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; - - $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) - ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); - - if ($j %= 28) { - $uchr .= $j < 25 - ? ("\xE1\x86".\chr(0xA7 + $j)) - : ("\xE1\x87".\chr(0x67 + $j)); - } - } - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $result .= $uchr; - } - - if ($c) { - ksort($c); - $result .= implode('', $c); - } - - return $result; - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } -} diff --git a/vendor/symfony/polyfill-intl-normalizer/README.md b/vendor/symfony/polyfill-intl-normalizer/README.md deleted file mode 100644 index 15060c5..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Symfony Polyfill / Intl: Normalizer -=================================== - -This component provides a fallback implementation for the -[`Normalizer`](https://php.net/Normalizer) class provided -by the [Intl](https://php.net/intl) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php deleted file mode 100644 index 0fdfc89..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php +++ /dev/null @@ -1,17 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '΅' => '΅', - 'Ά' => 'Ά', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ὲ' => 'ὲ', - 'ὴ' => 'ὴ', - 'ὶ' => 'ὶ', - 'ὸ' => 'ὸ', - 'ὺ' => 'ὺ', - 'ὼ' => 'ὼ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'ᾼ' => 'ᾼ', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Ὴ' => 'Ὴ', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ὼ' => 'Ὼ', - 'ῼ' => 'ῼ', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', -); diff --git a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php deleted file mode 100644 index 5a3e8e0..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php +++ /dev/null @@ -1,2065 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '̀' => '̀', - '́' => '́', - '̓' => '̓', - '̈́' => '̈́', - 'ʹ' => 'ʹ', - ';' => ';', - '΅' => '΅', - 'Ά' => 'Ά', - '·' => '·', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'क़' => 'क़', - 'ख़' => 'ख़', - 'ग़' => 'ग़', - 'ज़' => 'ज़', - 'ड़' => 'ड़', - 'ढ़' => 'ढ़', - 'फ़' => 'फ़', - 'य़' => 'य़', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ড়' => 'ড়', - 'ঢ়' => 'ঢ়', - 'য়' => 'য়', - 'ਲ਼' => 'ਲ਼', - 'ਸ਼' => 'ਸ਼', - 'ਖ਼' => 'ਖ਼', - 'ਗ਼' => 'ਗ਼', - 'ਜ਼' => 'ਜ਼', - 'ਫ਼' => 'ਫ਼', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ଡ଼' => 'ଡ଼', - 'ଢ଼' => 'ଢ଼', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'གྷ' => 'གྷ', - 'ཌྷ' => 'ཌྷ', - 'དྷ' => 'དྷ', - 'བྷ' => 'བྷ', - 'ཛྷ' => 'ཛྷ', - 'ཀྵ' => 'ཀྵ', - 'ཱི' => 'ཱི', - 'ཱུ' => 'ཱུ', - 'ྲྀ' => 'ྲྀ', - 'ླྀ' => 'ླྀ', - 'ཱྀ' => 'ཱྀ', - 'ྒྷ' => 'ྒྷ', - 'ྜྷ' => 'ྜྷ', - 'ྡྷ' => 'ྡྷ', - 'ྦྷ' => 'ྦྷ', - 'ྫྷ' => 'ྫྷ', - 'ྐྵ' => 'ྐྵ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ά' => 'ά', - 'ὲ' => 'ὲ', - 'έ' => 'έ', - 'ὴ' => 'ὴ', - 'ή' => 'ή', - 'ὶ' => 'ὶ', - 'ί' => 'ί', - 'ὸ' => 'ὸ', - 'ό' => 'ό', - 'ὺ' => 'ὺ', - 'ύ' => 'ύ', - 'ὼ' => 'ὼ', - 'ώ' => 'ώ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'Ά' => 'Ά', - 'ᾼ' => 'ᾼ', - 'ι' => 'ι', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Έ' => 'Έ', - 'Ὴ' => 'Ὴ', - 'Ή' => 'Ή', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ΐ' => 'ΐ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - 'Ί' => 'Ί', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ΰ' => 'ΰ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ύ' => 'Ύ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - '΅' => '΅', - '`' => '`', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ό' => 'Ό', - 'Ὼ' => 'Ὼ', - 'Ώ' => 'Ώ', - 'ῼ' => 'ῼ', - '´' => '´', - ' ' => ' ', - ' ' => ' ', - 'Ω' => 'Ω', - 'K' => 'K', - 'Å' => 'Å', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - '〈' => '〈', - '〉' => '〉', - '⫝̸' => '⫝̸', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '豈' => '豈', - '更' => '更', - '車' => '車', - '賈' => '賈', - '滑' => '滑', - '串' => '串', - '句' => '句', - '龜' => '龜', - '龜' => '龜', - '契' => '契', - '金' => '金', - '喇' => '喇', - '奈' => '奈', - '懶' => '懶', - '癩' => '癩', - '羅' => '羅', - '蘿' => '蘿', - '螺' => '螺', - '裸' => '裸', - '邏' => '邏', - '樂' => '樂', - '洛' => '洛', - '烙' => '烙', - '珞' => '珞', - '落' => '落', - '酪' => '酪', - '駱' => '駱', - '亂' => '亂', - '卵' => '卵', - '欄' => '欄', - '爛' => '爛', - '蘭' => '蘭', - '鸞' => '鸞', - '嵐' => '嵐', - '濫' => '濫', - '藍' => '藍', - '襤' => '襤', - '拉' => '拉', - '臘' => '臘', - '蠟' => '蠟', - '廊' => '廊', - '朗' => '朗', - '浪' => '浪', - '狼' => '狼', - '郎' => '郎', - '來' => '來', - '冷' => '冷', - '勞' => '勞', - '擄' => '擄', - '櫓' => '櫓', - '爐' => '爐', - '盧' => '盧', - '老' => '老', - '蘆' => '蘆', - '虜' => '虜', - '路' => '路', - '露' => '露', - '魯' => '魯', - '鷺' => '鷺', - '碌' => '碌', - '祿' => '祿', - '綠' => '綠', - '菉' => '菉', - '錄' => '錄', - '鹿' => '鹿', - '論' => '論', - '壟' => '壟', - '弄' => '弄', - '籠' => '籠', - '聾' => '聾', - '牢' => '牢', - '磊' => '磊', - '賂' => '賂', - '雷' => '雷', - '壘' => '壘', - '屢' => '屢', - '樓' => '樓', - '淚' => '淚', - '漏' => '漏', - '累' => '累', - '縷' => '縷', - '陋' => '陋', - '勒' => '勒', - '肋' => '肋', - '凜' => '凜', - '凌' => '凌', - '稜' => '稜', - '綾' => '綾', - '菱' => '菱', - '陵' => '陵', - '讀' => '讀', - '拏' => '拏', - '樂' => '樂', - '諾' => '諾', - '丹' => '丹', - '寧' => '寧', - '怒' => '怒', - '率' => '率', - '異' => '異', - '北' => '北', - '磻' => '磻', - '便' => '便', - '復' => '復', - '不' => '不', - '泌' => '泌', - '數' => '數', - '索' => '索', - '參' => '參', - '塞' => '塞', - '省' => '省', - '葉' => '葉', - '說' => '說', - '殺' => '殺', - '辰' => '辰', - '沈' => '沈', - '拾' => '拾', - '若' => '若', - '掠' => '掠', - '略' => '略', - '亮' => '亮', - '兩' => '兩', - '凉' => '凉', - '梁' => '梁', - '糧' => '糧', - '良' => '良', - '諒' => '諒', - '量' => '量', - '勵' => '勵', - '呂' => '呂', - '女' => '女', - '廬' => '廬', - '旅' => '旅', - '濾' => '濾', - '礪' => '礪', - '閭' => '閭', - '驪' => '驪', - '麗' => '麗', - '黎' => '黎', - '力' => '力', - '曆' => '曆', - '歷' => '歷', - '轢' => '轢', - '年' => '年', - '憐' => '憐', - '戀' => '戀', - '撚' => '撚', - '漣' => '漣', - '煉' => '煉', - '璉' => '璉', - '秊' => '秊', - '練' => '練', - '聯' => '聯', - '輦' => '輦', - '蓮' => '蓮', - '連' => '連', - '鍊' => '鍊', - '列' => '列', - '劣' => '劣', - '咽' => '咽', - '烈' => '烈', - '裂' => '裂', - '說' => '說', - '廉' => '廉', - '念' => '念', - '捻' => '捻', - '殮' => '殮', - '簾' => '簾', - '獵' => '獵', - '令' => '令', - '囹' => '囹', - '寧' => '寧', - '嶺' => '嶺', - '怜' => '怜', - '玲' => '玲', - '瑩' => '瑩', - '羚' => '羚', - '聆' => '聆', - '鈴' => '鈴', - '零' => '零', - '靈' => '靈', - '領' => '領', - '例' => '例', - '禮' => '禮', - '醴' => '醴', - '隸' => '隸', - '惡' => '惡', - '了' => '了', - '僚' => '僚', - '寮' => '寮', - '尿' => '尿', - '料' => '料', - '樂' => '樂', - '燎' => '燎', - '療' => '療', - '蓼' => '蓼', - '遼' => '遼', - '龍' => '龍', - '暈' => '暈', - '阮' => '阮', - '劉' => '劉', - '杻' => '杻', - '柳' => '柳', - '流' => '流', - '溜' => '溜', - '琉' => '琉', - '留' => '留', - '硫' => '硫', - '紐' => '紐', - '類' => '類', - '六' => '六', - '戮' => '戮', - '陸' => '陸', - '倫' => '倫', - '崙' => '崙', - '淪' => '淪', - '輪' => '輪', - '律' => '律', - '慄' => '慄', - '栗' => '栗', - '率' => '率', - '隆' => '隆', - '利' => '利', - '吏' => '吏', - '履' => '履', - '易' => '易', - '李' => '李', - '梨' => '梨', - '泥' => '泥', - '理' => '理', - '痢' => '痢', - '罹' => '罹', - '裏' => '裏', - '裡' => '裡', - '里' => '里', - '離' => '離', - '匿' => '匿', - '溺' => '溺', - '吝' => '吝', - '燐' => '燐', - '璘' => '璘', - '藺' => '藺', - '隣' => '隣', - '鱗' => '鱗', - '麟' => '麟', - '林' => '林', - '淋' => '淋', - '臨' => '臨', - '立' => '立', - '笠' => '笠', - '粒' => '粒', - '狀' => '狀', - '炙' => '炙', - '識' => '識', - '什' => '什', - '茶' => '茶', - '刺' => '刺', - '切' => '切', - '度' => '度', - '拓' => '拓', - '糖' => '糖', - '宅' => '宅', - '洞' => '洞', - '暴' => '暴', - '輻' => '輻', - '行' => '行', - '降' => '降', - '見' => '見', - '廓' => '廓', - '兀' => '兀', - '嗀' => '嗀', - '塚' => '塚', - '晴' => '晴', - '凞' => '凞', - '猪' => '猪', - '益' => '益', - '礼' => '礼', - '神' => '神', - '祥' => '祥', - '福' => '福', - '靖' => '靖', - '精' => '精', - '羽' => '羽', - '蘒' => '蘒', - '諸' => '諸', - '逸' => '逸', - '都' => '都', - '飯' => '飯', - '飼' => '飼', - '館' => '館', - '鶴' => '鶴', - '郞' => '郞', - '隷' => '隷', - '侮' => '侮', - '僧' => '僧', - '免' => '免', - '勉' => '勉', - '勤' => '勤', - '卑' => '卑', - '喝' => '喝', - '嘆' => '嘆', - '器' => '器', - '塀' => '塀', - '墨' => '墨', - '層' => '層', - '屮' => '屮', - '悔' => '悔', - '慨' => '慨', - '憎' => '憎', - '懲' => '懲', - '敏' => '敏', - '既' => '既', - '暑' => '暑', - '梅' => '梅', - '海' => '海', - '渚' => '渚', - '漢' => '漢', - '煮' => '煮', - '爫' => '爫', - '琢' => '琢', - '碑' => '碑', - '社' => '社', - '祉' => '祉', - '祈' => '祈', - '祐' => '祐', - '祖' => '祖', - '祝' => '祝', - '禍' => '禍', - '禎' => '禎', - '穀' => '穀', - '突' => '突', - '節' => '節', - '練' => '練', - '縉' => '縉', - '繁' => '繁', - '署' => '署', - '者' => '者', - '臭' => '臭', - '艹' => '艹', - '艹' => '艹', - '著' => '著', - '褐' => '褐', - '視' => '視', - '謁' => '謁', - '謹' => '謹', - '賓' => '賓', - '贈' => '贈', - '辶' => '辶', - '逸' => '逸', - '難' => '難', - '響' => '響', - '頻' => '頻', - '恵' => '恵', - '𤋮' => '𤋮', - '舘' => '舘', - '並' => '並', - '况' => '况', - '全' => '全', - '侀' => '侀', - '充' => '充', - '冀' => '冀', - '勇' => '勇', - '勺' => '勺', - '喝' => '喝', - '啕' => '啕', - '喙' => '喙', - '嗢' => '嗢', - '塚' => '塚', - '墳' => '墳', - '奄' => '奄', - '奔' => '奔', - '婢' => '婢', - '嬨' => '嬨', - '廒' => '廒', - '廙' => '廙', - '彩' => '彩', - '徭' => '徭', - '惘' => '惘', - '慎' => '慎', - '愈' => '愈', - '憎' => '憎', - '慠' => '慠', - '懲' => '懲', - '戴' => '戴', - '揄' => '揄', - '搜' => '搜', - '摒' => '摒', - '敖' => '敖', - '晴' => '晴', - '朗' => '朗', - '望' => '望', - '杖' => '杖', - '歹' => '歹', - '殺' => '殺', - '流' => '流', - '滛' => '滛', - '滋' => '滋', - '漢' => '漢', - '瀞' => '瀞', - '煮' => '煮', - '瞧' => '瞧', - '爵' => '爵', - '犯' => '犯', - '猪' => '猪', - '瑱' => '瑱', - '甆' => '甆', - '画' => '画', - '瘝' => '瘝', - '瘟' => '瘟', - '益' => '益', - '盛' => '盛', - '直' => '直', - '睊' => '睊', - '着' => '着', - '磌' => '磌', - '窱' => '窱', - '節' => '節', - '类' => '类', - '絛' => '絛', - '練' => '練', - '缾' => '缾', - '者' => '者', - '荒' => '荒', - '華' => '華', - '蝹' => '蝹', - '襁' => '襁', - '覆' => '覆', - '視' => '視', - '調' => '調', - '諸' => '諸', - '請' => '請', - '謁' => '謁', - '諾' => '諾', - '諭' => '諭', - '謹' => '謹', - '變' => '變', - '贈' => '贈', - '輸' => '輸', - '遲' => '遲', - '醙' => '醙', - '鉶' => '鉶', - '陼' => '陼', - '難' => '難', - '靖' => '靖', - '韛' => '韛', - '響' => '響', - '頋' => '頋', - '頻' => '頻', - '鬒' => '鬒', - '龜' => '龜', - '𢡊' => '𢡊', - '𢡄' => '𢡄', - '𣏕' => '𣏕', - '㮝' => '㮝', - '䀘' => '䀘', - '䀹' => '䀹', - '𥉉' => '𥉉', - '𥳐' => '𥳐', - '𧻓' => '𧻓', - '齃' => '齃', - '龎' => '龎', - 'יִ' => 'יִ', - 'ײַ' => 'ײַ', - 'שׁ' => 'שׁ', - 'שׂ' => 'שׂ', - 'שּׁ' => 'שּׁ', - 'שּׂ' => 'שּׂ', - 'אַ' => 'אַ', - 'אָ' => 'אָ', - 'אּ' => 'אּ', - 'בּ' => 'בּ', - 'גּ' => 'גּ', - 'דּ' => 'דּ', - 'הּ' => 'הּ', - 'וּ' => 'וּ', - 'זּ' => 'זּ', - 'טּ' => 'טּ', - 'יּ' => 'יּ', - 'ךּ' => 'ךּ', - 'כּ' => 'כּ', - 'לּ' => 'לּ', - 'מּ' => 'מּ', - 'נּ' => 'נּ', - 'סּ' => 'סּ', - 'ףּ' => 'ףּ', - 'פּ' => 'פּ', - 'צּ' => 'צּ', - 'קּ' => 'קּ', - 'רּ' => 'רּ', - 'שּ' => 'שּ', - 'תּ' => 'תּ', - 'וֹ' => 'וֹ', - 'בֿ' => 'בֿ', - 'כֿ' => 'כֿ', - 'פֿ' => 'פֿ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', - '𝅗𝅥' => '𝅗𝅥', - '𝅘𝅥' => '𝅘𝅥', - '𝅘𝅥𝅮' => '𝅘𝅥𝅮', - '𝅘𝅥𝅯' => '𝅘𝅥𝅯', - '𝅘𝅥𝅰' => '𝅘𝅥𝅰', - '𝅘𝅥𝅱' => '𝅘𝅥𝅱', - '𝅘𝅥𝅲' => '𝅘𝅥𝅲', - '𝆹𝅥' => '𝆹𝅥', - '𝆺𝅥' => '𝆺𝅥', - '𝆹𝅥𝅮' => '𝆹𝅥𝅮', - '𝆺𝅥𝅮' => '𝆺𝅥𝅮', - '𝆹𝅥𝅯' => '𝆹𝅥𝅯', - '𝆺𝅥𝅯' => '𝆺𝅥𝅯', - '丽' => '丽', - '丸' => '丸', - '乁' => '乁', - '𠄢' => '𠄢', - '你' => '你', - '侮' => '侮', - '侻' => '侻', - '倂' => '倂', - '偺' => '偺', - '備' => '備', - '僧' => '僧', - '像' => '像', - '㒞' => '㒞', - '𠘺' => '𠘺', - '免' => '免', - '兔' => '兔', - '兤' => '兤', - '具' => '具', - '𠔜' => '𠔜', - '㒹' => '㒹', - '內' => '內', - '再' => '再', - '𠕋' => '𠕋', - '冗' => '冗', - '冤' => '冤', - '仌' => '仌', - '冬' => '冬', - '况' => '况', - '𩇟' => '𩇟', - '凵' => '凵', - '刃' => '刃', - '㓟' => '㓟', - '刻' => '刻', - '剆' => '剆', - '割' => '割', - '剷' => '剷', - '㔕' => '㔕', - '勇' => '勇', - '勉' => '勉', - '勤' => '勤', - '勺' => '勺', - '包' => '包', - '匆' => '匆', - '北' => '北', - '卉' => '卉', - '卑' => '卑', - '博' => '博', - '即' => '即', - '卽' => '卽', - '卿' => '卿', - '卿' => '卿', - '卿' => '卿', - '𠨬' => '𠨬', - '灰' => '灰', - '及' => '及', - '叟' => '叟', - '𠭣' => '𠭣', - '叫' => '叫', - '叱' => '叱', - '吆' => '吆', - '咞' => '咞', - '吸' => '吸', - '呈' => '呈', - '周' => '周', - '咢' => '咢', - '哶' => '哶', - '唐' => '唐', - '啓' => '啓', - '啣' => '啣', - '善' => '善', - '善' => '善', - '喙' => '喙', - '喫' => '喫', - '喳' => '喳', - '嗂' => '嗂', - '圖' => '圖', - '嘆' => '嘆', - '圗' => '圗', - '噑' => '噑', - '噴' => '噴', - '切' => '切', - '壮' => '壮', - '城' => '城', - '埴' => '埴', - '堍' => '堍', - '型' => '型', - '堲' => '堲', - '報' => '報', - '墬' => '墬', - '𡓤' => '𡓤', - '売' => '売', - '壷' => '壷', - '夆' => '夆', - '多' => '多', - '夢' => '夢', - '奢' => '奢', - '𡚨' => '𡚨', - '𡛪' => '𡛪', - '姬' => '姬', - '娛' => '娛', - '娧' => '娧', - '姘' => '姘', - '婦' => '婦', - '㛮' => '㛮', - '㛼' => '㛼', - '嬈' => '嬈', - '嬾' => '嬾', - '嬾' => '嬾', - '𡧈' => '𡧈', - '寃' => '寃', - '寘' => '寘', - '寧' => '寧', - '寳' => '寳', - '𡬘' => '𡬘', - '寿' => '寿', - '将' => '将', - '当' => '当', - '尢' => '尢', - '㞁' => '㞁', - '屠' => '屠', - '屮' => '屮', - '峀' => '峀', - '岍' => '岍', - '𡷤' => '𡷤', - '嵃' => '嵃', - '𡷦' => '𡷦', - '嵮' => '嵮', - '嵫' => '嵫', - '嵼' => '嵼', - '巡' => '巡', - '巢' => '巢', - '㠯' => '㠯', - '巽' => '巽', - '帨' => '帨', - '帽' => '帽', - '幩' => '幩', - '㡢' => '㡢', - '𢆃' => '𢆃', - '㡼' => '㡼', - '庰' => '庰', - '庳' => '庳', - '庶' => '庶', - '廊' => '廊', - '𪎒' => '𪎒', - '廾' => '廾', - '𢌱' => '𢌱', - '𢌱' => '𢌱', - '舁' => '舁', - '弢' => '弢', - '弢' => '弢', - '㣇' => '㣇', - '𣊸' => '𣊸', - '𦇚' => '𦇚', - '形' => '形', - '彫' => '彫', - '㣣' => '㣣', - '徚' => '徚', - '忍' => '忍', - '志' => '志', - '忹' => '忹', - '悁' => '悁', - '㤺' => '㤺', - '㤜' => '㤜', - '悔' => '悔', - '𢛔' => '𢛔', - '惇' => '惇', - '慈' => '慈', - '慌' => '慌', - '慎' => '慎', - '慌' => '慌', - '慺' => '慺', - '憎' => '憎', - '憲' => '憲', - '憤' => '憤', - '憯' => '憯', - '懞' => '懞', - '懲' => '懲', - '懶' => '懶', - '成' => '成', - '戛' => '戛', - '扝' => '扝', - '抱' => '抱', - '拔' => '拔', - '捐' => '捐', - '𢬌' => '𢬌', - '挽' => '挽', - '拼' => '拼', - '捨' => '捨', - '掃' => '掃', - '揤' => '揤', - '𢯱' => '𢯱', - '搢' => '搢', - '揅' => '揅', - '掩' => '掩', - '㨮' => '㨮', - '摩' => '摩', - '摾' => '摾', - '撝' => '撝', - '摷' => '摷', - '㩬' => '㩬', - '敏' => '敏', - '敬' => '敬', - '𣀊' => '𣀊', - '旣' => '旣', - '書' => '書', - '晉' => '晉', - '㬙' => '㬙', - '暑' => '暑', - '㬈' => '㬈', - '㫤' => '㫤', - '冒' => '冒', - '冕' => '冕', - '最' => '最', - '暜' => '暜', - '肭' => '肭', - '䏙' => '䏙', - '朗' => '朗', - '望' => '望', - '朡' => '朡', - '杞' => '杞', - '杓' => '杓', - '𣏃' => '𣏃', - '㭉' => '㭉', - '柺' => '柺', - '枅' => '枅', - '桒' => '桒', - '梅' => '梅', - '𣑭' => '𣑭', - '梎' => '梎', - '栟' => '栟', - '椔' => '椔', - '㮝' => '㮝', - '楂' => '楂', - '榣' => '榣', - '槪' => '槪', - '檨' => '檨', - '𣚣' => '𣚣', - '櫛' => '櫛', - '㰘' => '㰘', - '次' => '次', - '𣢧' => '𣢧', - '歔' => '歔', - '㱎' => '㱎', - '歲' => '歲', - '殟' => '殟', - '殺' => '殺', - '殻' => '殻', - '𣪍' => '𣪍', - '𡴋' => '𡴋', - '𣫺' => '𣫺', - '汎' => '汎', - '𣲼' => '𣲼', - '沿' => '沿', - '泍' => '泍', - '汧' => '汧', - '洖' => '洖', - '派' => '派', - '海' => '海', - '流' => '流', - '浩' => '浩', - '浸' => '浸', - '涅' => '涅', - '𣴞' => '𣴞', - '洴' => '洴', - '港' => '港', - '湮' => '湮', - '㴳' => '㴳', - '滋' => '滋', - '滇' => '滇', - '𣻑' => '𣻑', - '淹' => '淹', - '潮' => '潮', - '𣽞' => '𣽞', - '𣾎' => '𣾎', - '濆' => '濆', - '瀹' => '瀹', - '瀞' => '瀞', - '瀛' => '瀛', - '㶖' => '㶖', - '灊' => '灊', - '災' => '災', - '灷' => '灷', - '炭' => '炭', - '𠔥' => '𠔥', - '煅' => '煅', - '𤉣' => '𤉣', - '熜' => '熜', - '𤎫' => '𤎫', - '爨' => '爨', - '爵' => '爵', - '牐' => '牐', - '𤘈' => '𤘈', - '犀' => '犀', - '犕' => '犕', - '𤜵' => '𤜵', - '𤠔' => '𤠔', - '獺' => '獺', - '王' => '王', - '㺬' => '㺬', - '玥' => '玥', - '㺸' => '㺸', - '㺸' => '㺸', - '瑇' => '瑇', - '瑜' => '瑜', - '瑱' => '瑱', - '璅' => '璅', - '瓊' => '瓊', - '㼛' => '㼛', - '甤' => '甤', - '𤰶' => '𤰶', - '甾' => '甾', - '𤲒' => '𤲒', - '異' => '異', - '𢆟' => '𢆟', - '瘐' => '瘐', - '𤾡' => '𤾡', - '𤾸' => '𤾸', - '𥁄' => '𥁄', - '㿼' => '㿼', - '䀈' => '䀈', - '直' => '直', - '𥃳' => '𥃳', - '𥃲' => '𥃲', - '𥄙' => '𥄙', - '𥄳' => '𥄳', - '眞' => '眞', - '真' => '真', - '真' => '真', - '睊' => '睊', - '䀹' => '䀹', - '瞋' => '瞋', - '䁆' => '䁆', - '䂖' => '䂖', - '𥐝' => '𥐝', - '硎' => '硎', - '碌' => '碌', - '磌' => '磌', - '䃣' => '䃣', - '𥘦' => '𥘦', - '祖' => '祖', - '𥚚' => '𥚚', - '𥛅' => '𥛅', - '福' => '福', - '秫' => '秫', - '䄯' => '䄯', - '穀' => '穀', - '穊' => '穊', - '穏' => '穏', - '𥥼' => '𥥼', - '𥪧' => '𥪧', - '𥪧' => '𥪧', - '竮' => '竮', - '䈂' => '䈂', - '𥮫' => '𥮫', - '篆' => '篆', - '築' => '築', - '䈧' => '䈧', - '𥲀' => '𥲀', - '糒' => '糒', - '䊠' => '䊠', - '糨' => '糨', - '糣' => '糣', - '紀' => '紀', - '𥾆' => '𥾆', - '絣' => '絣', - '䌁' => '䌁', - '緇' => '緇', - '縂' => '縂', - '繅' => '繅', - '䌴' => '䌴', - '𦈨' => '𦈨', - '𦉇' => '𦉇', - '䍙' => '䍙', - '𦋙' => '𦋙', - '罺' => '罺', - '𦌾' => '𦌾', - '羕' => '羕', - '翺' => '翺', - '者' => '者', - '𦓚' => '𦓚', - '𦔣' => '𦔣', - '聠' => '聠', - '𦖨' => '𦖨', - '聰' => '聰', - '𣍟' => '𣍟', - '䏕' => '䏕', - '育' => '育', - '脃' => '脃', - '䐋' => '䐋', - '脾' => '脾', - '媵' => '媵', - '𦞧' => '𦞧', - '𦞵' => '𦞵', - '𣎓' => '𣎓', - '𣎜' => '𣎜', - '舁' => '舁', - '舄' => '舄', - '辞' => '辞', - '䑫' => '䑫', - '芑' => '芑', - '芋' => '芋', - '芝' => '芝', - '劳' => '劳', - '花' => '花', - '芳' => '芳', - '芽' => '芽', - '苦' => '苦', - '𦬼' => '𦬼', - '若' => '若', - '茝' => '茝', - '荣' => '荣', - '莭' => '莭', - '茣' => '茣', - '莽' => '莽', - '菧' => '菧', - '著' => '著', - '荓' => '荓', - '菊' => '菊', - '菌' => '菌', - '菜' => '菜', - '𦰶' => '𦰶', - '𦵫' => '𦵫', - '𦳕' => '𦳕', - '䔫' => '䔫', - '蓱' => '蓱', - '蓳' => '蓳', - '蔖' => '蔖', - '𧏊' => '𧏊', - '蕤' => '蕤', - '𦼬' => '𦼬', - '䕝' => '䕝', - '䕡' => '䕡', - '𦾱' => '𦾱', - '𧃒' => '𧃒', - '䕫' => '䕫', - '虐' => '虐', - '虜' => '虜', - '虧' => '虧', - '虩' => '虩', - '蚩' => '蚩', - '蚈' => '蚈', - '蜎' => '蜎', - '蛢' => '蛢', - '蝹' => '蝹', - '蜨' => '蜨', - '蝫' => '蝫', - '螆' => '螆', - '䗗' => '䗗', - '蟡' => '蟡', - '蠁' => '蠁', - '䗹' => '䗹', - '衠' => '衠', - '衣' => '衣', - '𧙧' => '𧙧', - '裗' => '裗', - '裞' => '裞', - '䘵' => '䘵', - '裺' => '裺', - '㒻' => '㒻', - '𧢮' => '𧢮', - '𧥦' => '𧥦', - '䚾' => '䚾', - '䛇' => '䛇', - '誠' => '誠', - '諭' => '諭', - '變' => '變', - '豕' => '豕', - '𧲨' => '𧲨', - '貫' => '貫', - '賁' => '賁', - '贛' => '贛', - '起' => '起', - '𧼯' => '𧼯', - '𠠄' => '𠠄', - '跋' => '跋', - '趼' => '趼', - '跰' => '跰', - '𠣞' => '𠣞', - '軔' => '軔', - '輸' => '輸', - '𨗒' => '𨗒', - '𨗭' => '𨗭', - '邔' => '邔', - '郱' => '郱', - '鄑' => '鄑', - '𨜮' => '𨜮', - '鄛' => '鄛', - '鈸' => '鈸', - '鋗' => '鋗', - '鋘' => '鋘', - '鉼' => '鉼', - '鏹' => '鏹', - '鐕' => '鐕', - '𨯺' => '𨯺', - '開' => '開', - '䦕' => '䦕', - '閷' => '閷', - '𨵷' => '𨵷', - '䧦' => '䧦', - '雃' => '雃', - '嶲' => '嶲', - '霣' => '霣', - '𩅅' => '𩅅', - '𩈚' => '𩈚', - '䩮' => '䩮', - '䩶' => '䩶', - '韠' => '韠', - '𩐊' => '𩐊', - '䪲' => '䪲', - '𩒖' => '𩒖', - '頋' => '頋', - '頋' => '頋', - '頩' => '頩', - '𩖶' => '𩖶', - '飢' => '飢', - '䬳' => '䬳', - '餩' => '餩', - '馧' => '馧', - '駂' => '駂', - '駾' => '駾', - '䯎' => '䯎', - '𩬰' => '𩬰', - '鬒' => '鬒', - '鱀' => '鱀', - '鳽' => '鳽', - '䳎' => '䳎', - '䳭' => '䳭', - '鵧' => '鵧', - '𪃎' => '𪃎', - '䳸' => '䳸', - '𪄅' => '𪄅', - '𪈎' => '𪈎', - '𪊑' => '𪊑', - '麻' => '麻', - '䵖' => '䵖', - '黹' => '黹', - '黾' => '黾', - '鼅' => '鼅', - '鼏' => '鼏', - '鼖' => '鼖', - '鼻' => '鼻', - '𪘀' => '𪘀', -); diff --git a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php deleted file mode 100644 index ec90f36..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php +++ /dev/null @@ -1,876 +0,0 @@ - 230, - '́' => 230, - '̂' => 230, - '̃' => 230, - '̄' => 230, - '̅' => 230, - '̆' => 230, - '̇' => 230, - '̈' => 230, - '̉' => 230, - '̊' => 230, - '̋' => 230, - '̌' => 230, - '̍' => 230, - '̎' => 230, - '̏' => 230, - '̐' => 230, - '̑' => 230, - '̒' => 230, - '̓' => 230, - '̔' => 230, - '̕' => 232, - '̖' => 220, - '̗' => 220, - '̘' => 220, - '̙' => 220, - '̚' => 232, - '̛' => 216, - '̜' => 220, - '̝' => 220, - '̞' => 220, - '̟' => 220, - '̠' => 220, - '̡' => 202, - '̢' => 202, - '̣' => 220, - '̤' => 220, - '̥' => 220, - '̦' => 220, - '̧' => 202, - '̨' => 202, - '̩' => 220, - '̪' => 220, - '̫' => 220, - '̬' => 220, - '̭' => 220, - '̮' => 220, - '̯' => 220, - '̰' => 220, - '̱' => 220, - '̲' => 220, - '̳' => 220, - '̴' => 1, - '̵' => 1, - '̶' => 1, - '̷' => 1, - '̸' => 1, - '̹' => 220, - '̺' => 220, - '̻' => 220, - '̼' => 220, - '̽' => 230, - '̾' => 230, - '̿' => 230, - '̀' => 230, - '́' => 230, - '͂' => 230, - '̓' => 230, - '̈́' => 230, - 'ͅ' => 240, - '͆' => 230, - '͇' => 220, - '͈' => 220, - '͉' => 220, - '͊' => 230, - '͋' => 230, - '͌' => 230, - '͍' => 220, - '͎' => 220, - '͐' => 230, - '͑' => 230, - '͒' => 230, - '͓' => 220, - '͔' => 220, - '͕' => 220, - '͖' => 220, - '͗' => 230, - '͘' => 232, - '͙' => 220, - '͚' => 220, - '͛' => 230, - '͜' => 233, - '͝' => 234, - '͞' => 234, - '͟' => 233, - '͠' => 234, - '͡' => 234, - '͢' => 233, - 'ͣ' => 230, - 'ͤ' => 230, - 'ͥ' => 230, - 'ͦ' => 230, - 'ͧ' => 230, - 'ͨ' => 230, - 'ͩ' => 230, - 'ͪ' => 230, - 'ͫ' => 230, - 'ͬ' => 230, - 'ͭ' => 230, - 'ͮ' => 230, - 'ͯ' => 230, - '҃' => 230, - '҄' => 230, - '҅' => 230, - '҆' => 230, - '҇' => 230, - '֑' => 220, - '֒' => 230, - '֓' => 230, - '֔' => 230, - '֕' => 230, - '֖' => 220, - '֗' => 230, - '֘' => 230, - '֙' => 230, - '֚' => 222, - '֛' => 220, - '֜' => 230, - '֝' => 230, - '֞' => 230, - '֟' => 230, - '֠' => 230, - '֡' => 230, - '֢' => 220, - '֣' => 220, - '֤' => 220, - '֥' => 220, - '֦' => 220, - '֧' => 220, - '֨' => 230, - '֩' => 230, - '֪' => 220, - '֫' => 230, - '֬' => 230, - '֭' => 222, - '֮' => 228, - '֯' => 230, - 'ְ' => 10, - 'ֱ' => 11, - 'ֲ' => 12, - 'ֳ' => 13, - 'ִ' => 14, - 'ֵ' => 15, - 'ֶ' => 16, - 'ַ' => 17, - 'ָ' => 18, - 'ֹ' => 19, - 'ֺ' => 19, - 'ֻ' => 20, - 'ּ' => 21, - 'ֽ' => 22, - 'ֿ' => 23, - 'ׁ' => 24, - 'ׂ' => 25, - 'ׄ' => 230, - 'ׅ' => 220, - 'ׇ' => 18, - 'ؐ' => 230, - 'ؑ' => 230, - 'ؒ' => 230, - 'ؓ' => 230, - 'ؔ' => 230, - 'ؕ' => 230, - 'ؖ' => 230, - 'ؗ' => 230, - 'ؘ' => 30, - 'ؙ' => 31, - 'ؚ' => 32, - 'ً' => 27, - 'ٌ' => 28, - 'ٍ' => 29, - 'َ' => 30, - 'ُ' => 31, - 'ِ' => 32, - 'ّ' => 33, - 'ْ' => 34, - 'ٓ' => 230, - 'ٔ' => 230, - 'ٕ' => 220, - 'ٖ' => 220, - 'ٗ' => 230, - '٘' => 230, - 'ٙ' => 230, - 'ٚ' => 230, - 'ٛ' => 230, - 'ٜ' => 220, - 'ٝ' => 230, - 'ٞ' => 230, - 'ٟ' => 220, - 'ٰ' => 35, - 'ۖ' => 230, - 'ۗ' => 230, - 'ۘ' => 230, - 'ۙ' => 230, - 'ۚ' => 230, - 'ۛ' => 230, - 'ۜ' => 230, - '۟' => 230, - '۠' => 230, - 'ۡ' => 230, - 'ۢ' => 230, - 'ۣ' => 220, - 'ۤ' => 230, - 'ۧ' => 230, - 'ۨ' => 230, - '۪' => 220, - '۫' => 230, - '۬' => 230, - 'ۭ' => 220, - 'ܑ' => 36, - 'ܰ' => 230, - 'ܱ' => 220, - 'ܲ' => 230, - 'ܳ' => 230, - 'ܴ' => 220, - 'ܵ' => 230, - 'ܶ' => 230, - 'ܷ' => 220, - 'ܸ' => 220, - 'ܹ' => 220, - 'ܺ' => 230, - 'ܻ' => 220, - 'ܼ' => 220, - 'ܽ' => 230, - 'ܾ' => 220, - 'ܿ' => 230, - '݀' => 230, - '݁' => 230, - '݂' => 220, - '݃' => 230, - '݄' => 220, - '݅' => 230, - '݆' => 220, - '݇' => 230, - '݈' => 220, - '݉' => 230, - '݊' => 230, - '߫' => 230, - '߬' => 230, - '߭' => 230, - '߮' => 230, - '߯' => 230, - '߰' => 230, - '߱' => 230, - '߲' => 220, - '߳' => 230, - '߽' => 220, - 'ࠖ' => 230, - 'ࠗ' => 230, - '࠘' => 230, - '࠙' => 230, - 'ࠛ' => 230, - 'ࠜ' => 230, - 'ࠝ' => 230, - 'ࠞ' => 230, - 'ࠟ' => 230, - 'ࠠ' => 230, - 'ࠡ' => 230, - 'ࠢ' => 230, - 'ࠣ' => 230, - 'ࠥ' => 230, - 'ࠦ' => 230, - 'ࠧ' => 230, - 'ࠩ' => 230, - 'ࠪ' => 230, - 'ࠫ' => 230, - 'ࠬ' => 230, - '࠭' => 230, - '࡙' => 220, - '࡚' => 220, - '࡛' => 220, - '࣓' => 220, - 'ࣔ' => 230, - 'ࣕ' => 230, - 'ࣖ' => 230, - 'ࣗ' => 230, - 'ࣘ' => 230, - 'ࣙ' => 230, - 'ࣚ' => 230, - 'ࣛ' => 230, - 'ࣜ' => 230, - 'ࣝ' => 230, - 'ࣞ' => 230, - 'ࣟ' => 230, - '࣠' => 230, - '࣡' => 230, - 'ࣣ' => 220, - 'ࣤ' => 230, - 'ࣥ' => 230, - 'ࣦ' => 220, - 'ࣧ' => 230, - 'ࣨ' => 230, - 'ࣩ' => 220, - '࣪' => 230, - '࣫' => 230, - '࣬' => 230, - '࣭' => 220, - '࣮' => 220, - '࣯' => 220, - 'ࣰ' => 27, - 'ࣱ' => 28, - 'ࣲ' => 29, - 'ࣳ' => 230, - 'ࣴ' => 230, - 'ࣵ' => 230, - 'ࣶ' => 220, - 'ࣷ' => 230, - 'ࣸ' => 230, - 'ࣹ' => 220, - 'ࣺ' => 220, - 'ࣻ' => 230, - 'ࣼ' => 230, - 'ࣽ' => 230, - 'ࣾ' => 230, - 'ࣿ' => 230, - '़' => 7, - '्' => 9, - '॑' => 230, - '॒' => 220, - '॓' => 230, - '॔' => 230, - '়' => 7, - '্' => 9, - '৾' => 230, - '਼' => 7, - '੍' => 9, - '઼' => 7, - '્' => 9, - '଼' => 7, - '୍' => 9, - '்' => 9, - '్' => 9, - 'ౕ' => 84, - 'ౖ' => 91, - '಼' => 7, - '್' => 9, - '഻' => 9, - '഼' => 9, - '്' => 9, - '්' => 9, - 'ุ' => 103, - 'ู' => 103, - 'ฺ' => 9, - '่' => 107, - '้' => 107, - '๊' => 107, - '๋' => 107, - 'ຸ' => 118, - 'ູ' => 118, - '຺' => 9, - '່' => 122, - '້' => 122, - '໊' => 122, - '໋' => 122, - '༘' => 220, - '༙' => 220, - '༵' => 220, - '༷' => 220, - '༹' => 216, - 'ཱ' => 129, - 'ི' => 130, - 'ུ' => 132, - 'ེ' => 130, - 'ཻ' => 130, - 'ོ' => 130, - 'ཽ' => 130, - 'ྀ' => 130, - 'ྂ' => 230, - 'ྃ' => 230, - '྄' => 9, - '྆' => 230, - '྇' => 230, - '࿆' => 220, - '့' => 7, - '္' => 9, - '်' => 9, - 'ႍ' => 220, - '፝' => 230, - '፞' => 230, - '፟' => 230, - '᜔' => 9, - '᜴' => 9, - '្' => 9, - '៝' => 230, - 'ᢩ' => 228, - '᤹' => 222, - '᤺' => 230, - '᤻' => 220, - 'ᨗ' => 230, - 'ᨘ' => 220, - '᩠' => 9, - '᩵' => 230, - '᩶' => 230, - '᩷' => 230, - '᩸' => 230, - '᩹' => 230, - '᩺' => 230, - '᩻' => 230, - '᩼' => 230, - '᩿' => 220, - '᪰' => 230, - '᪱' => 230, - '᪲' => 230, - '᪳' => 230, - '᪴' => 230, - '᪵' => 220, - '᪶' => 220, - '᪷' => 220, - '᪸' => 220, - '᪹' => 220, - '᪺' => 220, - '᪻' => 230, - '᪼' => 230, - '᪽' => 220, - 'ᪿ' => 220, - 'ᫀ' => 220, - '᬴' => 7, - '᭄' => 9, - '᭫' => 230, - '᭬' => 220, - '᭭' => 230, - '᭮' => 230, - '᭯' => 230, - '᭰' => 230, - '᭱' => 230, - '᭲' => 230, - '᭳' => 230, - '᮪' => 9, - '᮫' => 9, - '᯦' => 7, - '᯲' => 9, - '᯳' => 9, - '᰷' => 7, - '᳐' => 230, - '᳑' => 230, - '᳒' => 230, - '᳔' => 1, - '᳕' => 220, - '᳖' => 220, - '᳗' => 220, - '᳘' => 220, - '᳙' => 220, - '᳚' => 230, - '᳛' => 230, - '᳜' => 220, - '᳝' => 220, - '᳞' => 220, - '᳟' => 220, - '᳠' => 230, - '᳢' => 1, - '᳣' => 1, - '᳤' => 1, - '᳥' => 1, - '᳦' => 1, - '᳧' => 1, - '᳨' => 1, - '᳭' => 220, - '᳴' => 230, - '᳸' => 230, - '᳹' => 230, - '᷀' => 230, - '᷁' => 230, - '᷂' => 220, - '᷃' => 230, - '᷄' => 230, - '᷅' => 230, - '᷆' => 230, - '᷇' => 230, - '᷈' => 230, - '᷉' => 230, - '᷊' => 220, - '᷋' => 230, - '᷌' => 230, - '᷍' => 234, - '᷎' => 214, - '᷏' => 220, - '᷐' => 202, - '᷑' => 230, - '᷒' => 230, - 'ᷓ' => 230, - 'ᷔ' => 230, - 'ᷕ' => 230, - 'ᷖ' => 230, - 'ᷗ' => 230, - 'ᷘ' => 230, - 'ᷙ' => 230, - 'ᷚ' => 230, - 'ᷛ' => 230, - 'ᷜ' => 230, - 'ᷝ' => 230, - 'ᷞ' => 230, - 'ᷟ' => 230, - 'ᷠ' => 230, - 'ᷡ' => 230, - 'ᷢ' => 230, - 'ᷣ' => 230, - 'ᷤ' => 230, - 'ᷥ' => 230, - 'ᷦ' => 230, - 'ᷧ' => 230, - 'ᷨ' => 230, - 'ᷩ' => 230, - 'ᷪ' => 230, - 'ᷫ' => 230, - 'ᷬ' => 230, - 'ᷭ' => 230, - 'ᷮ' => 230, - 'ᷯ' => 230, - 'ᷰ' => 230, - 'ᷱ' => 230, - 'ᷲ' => 230, - 'ᷳ' => 230, - 'ᷴ' => 230, - '᷵' => 230, - '᷶' => 232, - '᷷' => 228, - '᷸' => 228, - '᷹' => 220, - '᷻' => 230, - '᷼' => 233, - '᷽' => 220, - '᷾' => 230, - '᷿' => 220, - '⃐' => 230, - '⃑' => 230, - '⃒' => 1, - '⃓' => 1, - '⃔' => 230, - '⃕' => 230, - '⃖' => 230, - '⃗' => 230, - '⃘' => 1, - '⃙' => 1, - '⃚' => 1, - '⃛' => 230, - '⃜' => 230, - '⃡' => 230, - '⃥' => 1, - '⃦' => 1, - '⃧' => 230, - '⃨' => 220, - '⃩' => 230, - '⃪' => 1, - '⃫' => 1, - '⃬' => 220, - '⃭' => 220, - '⃮' => 220, - '⃯' => 220, - '⃰' => 230, - '⳯' => 230, - '⳰' => 230, - '⳱' => 230, - '⵿' => 9, - 'ⷠ' => 230, - 'ⷡ' => 230, - 'ⷢ' => 230, - 'ⷣ' => 230, - 'ⷤ' => 230, - 'ⷥ' => 230, - 'ⷦ' => 230, - 'ⷧ' => 230, - 'ⷨ' => 230, - 'ⷩ' => 230, - 'ⷪ' => 230, - 'ⷫ' => 230, - 'ⷬ' => 230, - 'ⷭ' => 230, - 'ⷮ' => 230, - 'ⷯ' => 230, - 'ⷰ' => 230, - 'ⷱ' => 230, - 'ⷲ' => 230, - 'ⷳ' => 230, - 'ⷴ' => 230, - 'ⷵ' => 230, - 'ⷶ' => 230, - 'ⷷ' => 230, - 'ⷸ' => 230, - 'ⷹ' => 230, - 'ⷺ' => 230, - 'ⷻ' => 230, - 'ⷼ' => 230, - 'ⷽ' => 230, - 'ⷾ' => 230, - 'ⷿ' => 230, - '〪' => 218, - '〫' => 228, - '〬' => 232, - '〭' => 222, - '〮' => 224, - '〯' => 224, - '゙' => 8, - '゚' => 8, - '꙯' => 230, - 'ꙴ' => 230, - 'ꙵ' => 230, - 'ꙶ' => 230, - 'ꙷ' => 230, - 'ꙸ' => 230, - 'ꙹ' => 230, - 'ꙺ' => 230, - 'ꙻ' => 230, - '꙼' => 230, - '꙽' => 230, - 'ꚞ' => 230, - 'ꚟ' => 230, - '꛰' => 230, - '꛱' => 230, - '꠆' => 9, - '꠬' => 9, - '꣄' => 9, - '꣠' => 230, - '꣡' => 230, - '꣢' => 230, - '꣣' => 230, - '꣤' => 230, - '꣥' => 230, - '꣦' => 230, - '꣧' => 230, - '꣨' => 230, - '꣩' => 230, - '꣪' => 230, - '꣫' => 230, - '꣬' => 230, - '꣭' => 230, - '꣮' => 230, - '꣯' => 230, - '꣰' => 230, - '꣱' => 230, - '꤫' => 220, - '꤬' => 220, - '꤭' => 220, - '꥓' => 9, - '꦳' => 7, - '꧀' => 9, - 'ꪰ' => 230, - 'ꪲ' => 230, - 'ꪳ' => 230, - 'ꪴ' => 220, - 'ꪷ' => 230, - 'ꪸ' => 230, - 'ꪾ' => 230, - '꪿' => 230, - '꫁' => 230, - '꫶' => 9, - '꯭' => 9, - 'ﬞ' => 26, - '︠' => 230, - '︡' => 230, - '︢' => 230, - '︣' => 230, - '︤' => 230, - '︥' => 230, - '︦' => 230, - '︧' => 220, - '︨' => 220, - '︩' => 220, - '︪' => 220, - '︫' => 220, - '︬' => 220, - '︭' => 220, - '︮' => 230, - '︯' => 230, - '𐇽' => 220, - '𐋠' => 220, - '𐍶' => 230, - '𐍷' => 230, - '𐍸' => 230, - '𐍹' => 230, - '𐍺' => 230, - '𐨍' => 220, - '𐨏' => 230, - '𐨸' => 230, - '𐨹' => 1, - '𐨺' => 220, - '𐨿' => 9, - '𐫥' => 230, - '𐫦' => 220, - '𐴤' => 230, - '𐴥' => 230, - '𐴦' => 230, - '𐴧' => 230, - '𐺫' => 230, - '𐺬' => 230, - '𐽆' => 220, - '𐽇' => 220, - '𐽈' => 230, - '𐽉' => 230, - '𐽊' => 230, - '𐽋' => 220, - '𐽌' => 230, - '𐽍' => 220, - '𐽎' => 220, - '𐽏' => 220, - '𐽐' => 220, - '𑁆' => 9, - '𑁿' => 9, - '𑂹' => 9, - '𑂺' => 7, - '𑄀' => 230, - '𑄁' => 230, - '𑄂' => 230, - '𑄳' => 9, - '𑄴' => 9, - '𑅳' => 7, - '𑇀' => 9, - '𑇊' => 7, - '𑈵' => 9, - '𑈶' => 7, - '𑋩' => 7, - '𑋪' => 9, - '𑌻' => 7, - '𑌼' => 7, - '𑍍' => 9, - '𑍦' => 230, - '𑍧' => 230, - '𑍨' => 230, - '𑍩' => 230, - '𑍪' => 230, - '𑍫' => 230, - '𑍬' => 230, - '𑍰' => 230, - '𑍱' => 230, - '𑍲' => 230, - '𑍳' => 230, - '𑍴' => 230, - '𑑂' => 9, - '𑑆' => 7, - '𑑞' => 230, - '𑓂' => 9, - '𑓃' => 7, - '𑖿' => 9, - '𑗀' => 7, - '𑘿' => 9, - '𑚶' => 9, - '𑚷' => 7, - '𑜫' => 9, - '𑠹' => 9, - '𑠺' => 7, - '𑤽' => 9, - '𑤾' => 9, - '𑥃' => 7, - '𑧠' => 9, - '𑨴' => 9, - '𑩇' => 9, - '𑪙' => 9, - '𑰿' => 9, - '𑵂' => 7, - '𑵄' => 9, - '𑵅' => 9, - '𑶗' => 9, - '𖫰' => 1, - '𖫱' => 1, - '𖫲' => 1, - '𖫳' => 1, - '𖫴' => 1, - '𖬰' => 230, - '𖬱' => 230, - '𖬲' => 230, - '𖬳' => 230, - '𖬴' => 230, - '𖬵' => 230, - '𖬶' => 230, - '𖿰' => 6, - '𖿱' => 6, - '𛲞' => 1, - '𝅥' => 216, - '𝅦' => 216, - '𝅧' => 1, - '𝅨' => 1, - '𝅩' => 1, - '𝅭' => 226, - '𝅮' => 216, - '𝅯' => 216, - '𝅰' => 216, - '𝅱' => 216, - '𝅲' => 216, - '𝅻' => 220, - '𝅼' => 220, - '𝅽' => 220, - '𝅾' => 220, - '𝅿' => 220, - '𝆀' => 220, - '𝆁' => 220, - '𝆂' => 220, - '𝆅' => 230, - '𝆆' => 230, - '𝆇' => 230, - '𝆈' => 230, - '𝆉' => 230, - '𝆊' => 220, - '𝆋' => 220, - '𝆪' => 230, - '𝆫' => 230, - '𝆬' => 230, - '𝆭' => 230, - '𝉂' => 230, - '𝉃' => 230, - '𝉄' => 230, - '𞀀' => 230, - '𞀁' => 230, - '𞀂' => 230, - '𞀃' => 230, - '𞀄' => 230, - '𞀅' => 230, - '𞀆' => 230, - '𞀈' => 230, - '𞀉' => 230, - '𞀊' => 230, - '𞀋' => 230, - '𞀌' => 230, - '𞀍' => 230, - '𞀎' => 230, - '𞀏' => 230, - '𞀐' => 230, - '𞀑' => 230, - '𞀒' => 230, - '𞀓' => 230, - '𞀔' => 230, - '𞀕' => 230, - '𞀖' => 230, - '𞀗' => 230, - '𞀘' => 230, - '𞀛' => 230, - '𞀜' => 230, - '𞀝' => 230, - '𞀞' => 230, - '𞀟' => 230, - '𞀠' => 230, - '𞀡' => 230, - '𞀣' => 230, - '𞀤' => 230, - '𞀦' => 230, - '𞀧' => 230, - '𞀨' => 230, - '𞀩' => 230, - '𞀪' => 230, - '𞄰' => 230, - '𞄱' => 230, - '𞄲' => 230, - '𞄳' => 230, - '𞄴' => 230, - '𞄵' => 230, - '𞄶' => 230, - '𞋬' => 230, - '𞋭' => 230, - '𞋮' => 230, - '𞋯' => 230, - '𞣐' => 220, - '𞣑' => 220, - '𞣒' => 220, - '𞣓' => 220, - '𞣔' => 220, - '𞣕' => 220, - '𞣖' => 220, - '𞥄' => 230, - '𞥅' => 230, - '𞥆' => 230, - '𞥇' => 230, - '𞥈' => 230, - '𞥉' => 230, - '𞥊' => 7, -); diff --git a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php deleted file mode 100644 index 1574902..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php +++ /dev/null @@ -1,3695 +0,0 @@ - ' ', - '¨' => ' ̈', - 'ª' => 'a', - '¯' => ' ̄', - '²' => '2', - '³' => '3', - '´' => ' ́', - 'µ' => 'μ', - '¸' => ' ̧', - '¹' => '1', - 'º' => 'o', - '¼' => '1⁄4', - '½' => '1⁄2', - '¾' => '3⁄4', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ŀ' => 'L·', - 'ŀ' => 'l·', - 'ʼn' => 'ʼn', - 'ſ' => 's', - 'DŽ' => 'DŽ', - 'Dž' => 'Dž', - 'dž' => 'dž', - 'LJ' => 'LJ', - 'Lj' => 'Lj', - 'lj' => 'lj', - 'NJ' => 'NJ', - 'Nj' => 'Nj', - 'nj' => 'nj', - 'DZ' => 'DZ', - 'Dz' => 'Dz', - 'dz' => 'dz', - 'ʰ' => 'h', - 'ʱ' => 'ɦ', - 'ʲ' => 'j', - 'ʳ' => 'r', - 'ʴ' => 'ɹ', - 'ʵ' => 'ɻ', - 'ʶ' => 'ʁ', - 'ʷ' => 'w', - 'ʸ' => 'y', - '˘' => ' ̆', - '˙' => ' ̇', - '˚' => ' ̊', - '˛' => ' ̨', - '˜' => ' ̃', - '˝' => ' ̋', - 'ˠ' => 'ɣ', - 'ˡ' => 'l', - 'ˢ' => 's', - 'ˣ' => 'x', - 'ˤ' => 'ʕ', - 'ͺ' => ' ͅ', - '΄' => ' ́', - '΅' => ' ̈́', - 'ϐ' => 'β', - 'ϑ' => 'θ', - 'ϒ' => 'Υ', - 'ϓ' => 'Ύ', - 'ϔ' => 'Ϋ', - 'ϕ' => 'φ', - 'ϖ' => 'π', - 'ϰ' => 'κ', - 'ϱ' => 'ρ', - 'ϲ' => 'ς', - 'ϴ' => 'Θ', - 'ϵ' => 'ε', - 'Ϲ' => 'Σ', - 'և' => 'եւ', - 'ٵ' => 'اٴ', - 'ٶ' => 'وٴ', - 'ٷ' => 'ۇٴ', - 'ٸ' => 'يٴ', - 'ำ' => 'ํา', - 'ຳ' => 'ໍາ', - 'ໜ' => 'ຫນ', - 'ໝ' => 'ຫມ', - '༌' => '་', - 'ཷ' => 'ྲཱྀ', - 'ཹ' => 'ླཱྀ', - 'ჼ' => 'ნ', - 'ᴬ' => 'A', - 'ᴭ' => 'Æ', - 'ᴮ' => 'B', - 'ᴰ' => 'D', - 'ᴱ' => 'E', - 'ᴲ' => 'Ǝ', - 'ᴳ' => 'G', - 'ᴴ' => 'H', - 'ᴵ' => 'I', - 'ᴶ' => 'J', - 'ᴷ' => 'K', - 'ᴸ' => 'L', - 'ᴹ' => 'M', - 'ᴺ' => 'N', - 'ᴼ' => 'O', - 'ᴽ' => 'Ȣ', - 'ᴾ' => 'P', - 'ᴿ' => 'R', - 'ᵀ' => 'T', - 'ᵁ' => 'U', - 'ᵂ' => 'W', - 'ᵃ' => 'a', - 'ᵄ' => 'ɐ', - 'ᵅ' => 'ɑ', - 'ᵆ' => 'ᴂ', - 'ᵇ' => 'b', - 'ᵈ' => 'd', - 'ᵉ' => 'e', - 'ᵊ' => 'ə', - 'ᵋ' => 'ɛ', - 'ᵌ' => 'ɜ', - 'ᵍ' => 'g', - 'ᵏ' => 'k', - 'ᵐ' => 'm', - 'ᵑ' => 'ŋ', - 'ᵒ' => 'o', - 'ᵓ' => 'ɔ', - 'ᵔ' => 'ᴖ', - 'ᵕ' => 'ᴗ', - 'ᵖ' => 'p', - 'ᵗ' => 't', - 'ᵘ' => 'u', - 'ᵙ' => 'ᴝ', - 'ᵚ' => 'ɯ', - 'ᵛ' => 'v', - 'ᵜ' => 'ᴥ', - 'ᵝ' => 'β', - 'ᵞ' => 'γ', - 'ᵟ' => 'δ', - 'ᵠ' => 'φ', - 'ᵡ' => 'χ', - 'ᵢ' => 'i', - 'ᵣ' => 'r', - 'ᵤ' => 'u', - 'ᵥ' => 'v', - 'ᵦ' => 'β', - 'ᵧ' => 'γ', - 'ᵨ' => 'ρ', - 'ᵩ' => 'φ', - 'ᵪ' => 'χ', - 'ᵸ' => 'н', - 'ᶛ' => 'ɒ', - 'ᶜ' => 'c', - 'ᶝ' => 'ɕ', - 'ᶞ' => 'ð', - 'ᶟ' => 'ɜ', - 'ᶠ' => 'f', - 'ᶡ' => 'ɟ', - 'ᶢ' => 'ɡ', - 'ᶣ' => 'ɥ', - 'ᶤ' => 'ɨ', - 'ᶥ' => 'ɩ', - 'ᶦ' => 'ɪ', - 'ᶧ' => 'ᵻ', - 'ᶨ' => 'ʝ', - 'ᶩ' => 'ɭ', - 'ᶪ' => 'ᶅ', - 'ᶫ' => 'ʟ', - 'ᶬ' => 'ɱ', - 'ᶭ' => 'ɰ', - 'ᶮ' => 'ɲ', - 'ᶯ' => 'ɳ', - 'ᶰ' => 'ɴ', - 'ᶱ' => 'ɵ', - 'ᶲ' => 'ɸ', - 'ᶳ' => 'ʂ', - 'ᶴ' => 'ʃ', - 'ᶵ' => 'ƫ', - 'ᶶ' => 'ʉ', - 'ᶷ' => 'ʊ', - 'ᶸ' => 'ᴜ', - 'ᶹ' => 'ʋ', - 'ᶺ' => 'ʌ', - 'ᶻ' => 'z', - 'ᶼ' => 'ʐ', - 'ᶽ' => 'ʑ', - 'ᶾ' => 'ʒ', - 'ᶿ' => 'θ', - 'ẚ' => 'aʾ', - 'ẛ' => 'ṡ', - '᾽' => ' ̓', - '᾿' => ' ̓', - '῀' => ' ͂', - '῁' => ' ̈͂', - '῍' => ' ̓̀', - '῎' => ' ̓́', - '῏' => ' ̓͂', - '῝' => ' ̔̀', - '῞' => ' ̔́', - '῟' => ' ̔͂', - '῭' => ' ̈̀', - '΅' => ' ̈́', - '´' => ' ́', - '῾' => ' ̔', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - '‑' => '‐', - '‗' => ' ̳', - '․' => '.', - '‥' => '..', - '…' => '...', - ' ' => ' ', - '″' => '′′', - '‴' => '′′′', - '‶' => '‵‵', - '‷' => '‵‵‵', - '‼' => '!!', - '‾' => ' ̅', - '⁇' => '??', - '⁈' => '?!', - '⁉' => '!?', - '⁗' => '′′′′', - ' ' => ' ', - '⁰' => '0', - 'ⁱ' => 'i', - '⁴' => '4', - '⁵' => '5', - '⁶' => '6', - '⁷' => '7', - '⁸' => '8', - '⁹' => '9', - '⁺' => '+', - '⁻' => '−', - '⁼' => '=', - '⁽' => '(', - '⁾' => ')', - 'ⁿ' => 'n', - '₀' => '0', - '₁' => '1', - '₂' => '2', - '₃' => '3', - '₄' => '4', - '₅' => '5', - '₆' => '6', - '₇' => '7', - '₈' => '8', - '₉' => '9', - '₊' => '+', - '₋' => '−', - '₌' => '=', - '₍' => '(', - '₎' => ')', - 'ₐ' => 'a', - 'ₑ' => 'e', - 'ₒ' => 'o', - 'ₓ' => 'x', - 'ₔ' => 'ə', - 'ₕ' => 'h', - 'ₖ' => 'k', - 'ₗ' => 'l', - 'ₘ' => 'm', - 'ₙ' => 'n', - 'ₚ' => 'p', - 'ₛ' => 's', - 'ₜ' => 't', - '₨' => 'Rs', - '℀' => 'a/c', - '℁' => 'a/s', - 'ℂ' => 'C', - '℃' => '°C', - '℅' => 'c/o', - '℆' => 'c/u', - 'ℇ' => 'Ɛ', - '℉' => '°F', - 'ℊ' => 'g', - 'ℋ' => 'H', - 'ℌ' => 'H', - 'ℍ' => 'H', - 'ℎ' => 'h', - 'ℏ' => 'ħ', - 'ℐ' => 'I', - 'ℑ' => 'I', - 'ℒ' => 'L', - 'ℓ' => 'l', - 'ℕ' => 'N', - '№' => 'No', - 'ℙ' => 'P', - 'ℚ' => 'Q', - 'ℛ' => 'R', - 'ℜ' => 'R', - 'ℝ' => 'R', - '℠' => 'SM', - '℡' => 'TEL', - '™' => 'TM', - 'ℤ' => 'Z', - 'ℨ' => 'Z', - 'ℬ' => 'B', - 'ℭ' => 'C', - 'ℯ' => 'e', - 'ℰ' => 'E', - 'ℱ' => 'F', - 'ℳ' => 'M', - 'ℴ' => 'o', - 'ℵ' => 'א', - 'ℶ' => 'ב', - 'ℷ' => 'ג', - 'ℸ' => 'ד', - 'ℹ' => 'i', - '℻' => 'FAX', - 'ℼ' => 'π', - 'ℽ' => 'γ', - 'ℾ' => 'Γ', - 'ℿ' => 'Π', - '⅀' => '∑', - 'ⅅ' => 'D', - 'ⅆ' => 'd', - 'ⅇ' => 'e', - 'ⅈ' => 'i', - 'ⅉ' => 'j', - '⅐' => '1⁄7', - '⅑' => '1⁄9', - '⅒' => '1⁄10', - '⅓' => '1⁄3', - '⅔' => '2⁄3', - '⅕' => '1⁄5', - '⅖' => '2⁄5', - '⅗' => '3⁄5', - '⅘' => '4⁄5', - '⅙' => '1⁄6', - '⅚' => '5⁄6', - '⅛' => '1⁄8', - '⅜' => '3⁄8', - '⅝' => '5⁄8', - '⅞' => '7⁄8', - '⅟' => '1⁄', - 'Ⅰ' => 'I', - 'Ⅱ' => 'II', - 'Ⅲ' => 'III', - 'Ⅳ' => 'IV', - 'Ⅴ' => 'V', - 'Ⅵ' => 'VI', - 'Ⅶ' => 'VII', - 'Ⅷ' => 'VIII', - 'Ⅸ' => 'IX', - 'Ⅹ' => 'X', - 'Ⅺ' => 'XI', - 'Ⅻ' => 'XII', - 'Ⅼ' => 'L', - 'Ⅽ' => 'C', - 'Ⅾ' => 'D', - 'Ⅿ' => 'M', - 'ⅰ' => 'i', - 'ⅱ' => 'ii', - 'ⅲ' => 'iii', - 'ⅳ' => 'iv', - 'ⅴ' => 'v', - 'ⅵ' => 'vi', - 'ⅶ' => 'vii', - 'ⅷ' => 'viii', - 'ⅸ' => 'ix', - 'ⅹ' => 'x', - 'ⅺ' => 'xi', - 'ⅻ' => 'xii', - 'ⅼ' => 'l', - 'ⅽ' => 'c', - 'ⅾ' => 'd', - 'ⅿ' => 'm', - '↉' => '0⁄3', - '∬' => '∫∫', - '∭' => '∫∫∫', - '∯' => '∮∮', - '∰' => '∮∮∮', - '①' => '1', - '②' => '2', - '③' => '3', - '④' => '4', - '⑤' => '5', - '⑥' => '6', - '⑦' => '7', - '⑧' => '8', - '⑨' => '9', - '⑩' => '10', - '⑪' => '11', - '⑫' => '12', - '⑬' => '13', - '⑭' => '14', - '⑮' => '15', - '⑯' => '16', - '⑰' => '17', - '⑱' => '18', - '⑲' => '19', - '⑳' => '20', - '⑴' => '(1)', - '⑵' => '(2)', - '⑶' => '(3)', - '⑷' => '(4)', - '⑸' => '(5)', - '⑹' => '(6)', - '⑺' => '(7)', - '⑻' => '(8)', - '⑼' => '(9)', - '⑽' => '(10)', - '⑾' => '(11)', - '⑿' => '(12)', - '⒀' => '(13)', - '⒁' => '(14)', - '⒂' => '(15)', - '⒃' => '(16)', - '⒄' => '(17)', - '⒅' => '(18)', - '⒆' => '(19)', - '⒇' => '(20)', - '⒈' => '1.', - '⒉' => '2.', - '⒊' => '3.', - '⒋' => '4.', - '⒌' => '5.', - '⒍' => '6.', - '⒎' => '7.', - '⒏' => '8.', - '⒐' => '9.', - '⒑' => '10.', - '⒒' => '11.', - '⒓' => '12.', - '⒔' => '13.', - '⒕' => '14.', - '⒖' => '15.', - '⒗' => '16.', - '⒘' => '17.', - '⒙' => '18.', - '⒚' => '19.', - '⒛' => '20.', - '⒜' => '(a)', - '⒝' => '(b)', - '⒞' => '(c)', - '⒟' => '(d)', - '⒠' => '(e)', - '⒡' => '(f)', - '⒢' => '(g)', - '⒣' => '(h)', - '⒤' => '(i)', - '⒥' => '(j)', - '⒦' => '(k)', - '⒧' => '(l)', - '⒨' => '(m)', - '⒩' => '(n)', - '⒪' => '(o)', - '⒫' => '(p)', - '⒬' => '(q)', - '⒭' => '(r)', - '⒮' => '(s)', - '⒯' => '(t)', - '⒰' => '(u)', - '⒱' => '(v)', - '⒲' => '(w)', - '⒳' => '(x)', - '⒴' => '(y)', - '⒵' => '(z)', - 'Ⓐ' => 'A', - 'Ⓑ' => 'B', - 'Ⓒ' => 'C', - 'Ⓓ' => 'D', - 'Ⓔ' => 'E', - 'Ⓕ' => 'F', - 'Ⓖ' => 'G', - 'Ⓗ' => 'H', - 'Ⓘ' => 'I', - 'Ⓙ' => 'J', - 'Ⓚ' => 'K', - 'Ⓛ' => 'L', - 'Ⓜ' => 'M', - 'Ⓝ' => 'N', - 'Ⓞ' => 'O', - 'Ⓟ' => 'P', - 'Ⓠ' => 'Q', - 'Ⓡ' => 'R', - 'Ⓢ' => 'S', - 'Ⓣ' => 'T', - 'Ⓤ' => 'U', - 'Ⓥ' => 'V', - 'Ⓦ' => 'W', - 'Ⓧ' => 'X', - 'Ⓨ' => 'Y', - 'Ⓩ' => 'Z', - 'ⓐ' => 'a', - 'ⓑ' => 'b', - 'ⓒ' => 'c', - 'ⓓ' => 'd', - 'ⓔ' => 'e', - 'ⓕ' => 'f', - 'ⓖ' => 'g', - 'ⓗ' => 'h', - 'ⓘ' => 'i', - 'ⓙ' => 'j', - 'ⓚ' => 'k', - 'ⓛ' => 'l', - 'ⓜ' => 'm', - 'ⓝ' => 'n', - 'ⓞ' => 'o', - 'ⓟ' => 'p', - 'ⓠ' => 'q', - 'ⓡ' => 'r', - 'ⓢ' => 's', - 'ⓣ' => 't', - 'ⓤ' => 'u', - 'ⓥ' => 'v', - 'ⓦ' => 'w', - 'ⓧ' => 'x', - 'ⓨ' => 'y', - 'ⓩ' => 'z', - '⓪' => '0', - '⨌' => '∫∫∫∫', - '⩴' => '::=', - '⩵' => '==', - '⩶' => '===', - 'ⱼ' => 'j', - 'ⱽ' => 'V', - 'ⵯ' => 'ⵡ', - '⺟' => '母', - '⻳' => '龟', - '⼀' => '一', - '⼁' => '丨', - '⼂' => '丶', - '⼃' => '丿', - '⼄' => '乙', - '⼅' => '亅', - '⼆' => '二', - '⼇' => '亠', - '⼈' => '人', - '⼉' => '儿', - '⼊' => '入', - '⼋' => '八', - '⼌' => '冂', - '⼍' => '冖', - '⼎' => '冫', - '⼏' => '几', - '⼐' => '凵', - '⼑' => '刀', - '⼒' => '力', - '⼓' => '勹', - '⼔' => '匕', - '⼕' => '匚', - '⼖' => '匸', - '⼗' => '十', - '⼘' => '卜', - '⼙' => '卩', - '⼚' => '厂', - '⼛' => '厶', - '⼜' => '又', - '⼝' => '口', - '⼞' => '囗', - '⼟' => '土', - '⼠' => '士', - '⼡' => '夂', - '⼢' => '夊', - '⼣' => '夕', - '⼤' => '大', - '⼥' => '女', - '⼦' => '子', - '⼧' => '宀', - '⼨' => '寸', - '⼩' => '小', - '⼪' => '尢', - '⼫' => '尸', - '⼬' => '屮', - '⼭' => '山', - '⼮' => '巛', - '⼯' => '工', - '⼰' => '己', - '⼱' => '巾', - '⼲' => '干', - '⼳' => '幺', - '⼴' => '广', - '⼵' => '廴', - '⼶' => '廾', - '⼷' => '弋', - '⼸' => '弓', - '⼹' => '彐', - '⼺' => '彡', - '⼻' => '彳', - '⼼' => '心', - '⼽' => '戈', - '⼾' => '戶', - '⼿' => '手', - '⽀' => '支', - '⽁' => '攴', - '⽂' => '文', - '⽃' => '斗', - '⽄' => '斤', - '⽅' => '方', - '⽆' => '无', - '⽇' => '日', - '⽈' => '曰', - '⽉' => '月', - '⽊' => '木', - '⽋' => '欠', - '⽌' => '止', - '⽍' => '歹', - '⽎' => '殳', - '⽏' => '毋', - '⽐' => '比', - '⽑' => '毛', - '⽒' => '氏', - '⽓' => '气', - '⽔' => '水', - '⽕' => '火', - '⽖' => '爪', - '⽗' => '父', - '⽘' => '爻', - '⽙' => '爿', - '⽚' => '片', - '⽛' => '牙', - '⽜' => '牛', - '⽝' => '犬', - '⽞' => '玄', - '⽟' => '玉', - '⽠' => '瓜', - '⽡' => '瓦', - '⽢' => '甘', - '⽣' => '生', - '⽤' => '用', - '⽥' => '田', - '⽦' => '疋', - '⽧' => '疒', - '⽨' => '癶', - '⽩' => '白', - '⽪' => '皮', - '⽫' => '皿', - '⽬' => '目', - '⽭' => '矛', - '⽮' => '矢', - '⽯' => '石', - '⽰' => '示', - '⽱' => '禸', - '⽲' => '禾', - '⽳' => '穴', - '⽴' => '立', - '⽵' => '竹', - '⽶' => '米', - '⽷' => '糸', - '⽸' => '缶', - '⽹' => '网', - '⽺' => '羊', - '⽻' => '羽', - '⽼' => '老', - '⽽' => '而', - '⽾' => '耒', - '⽿' => '耳', - '⾀' => '聿', - '⾁' => '肉', - '⾂' => '臣', - '⾃' => '自', - '⾄' => '至', - '⾅' => '臼', - '⾆' => '舌', - '⾇' => '舛', - '⾈' => '舟', - '⾉' => '艮', - '⾊' => '色', - '⾋' => '艸', - '⾌' => '虍', - '⾍' => '虫', - '⾎' => '血', - '⾏' => '行', - '⾐' => '衣', - '⾑' => '襾', - '⾒' => '見', - '⾓' => '角', - '⾔' => '言', - '⾕' => '谷', - '⾖' => '豆', - '⾗' => '豕', - '⾘' => '豸', - '⾙' => '貝', - '⾚' => '赤', - '⾛' => '走', - '⾜' => '足', - '⾝' => '身', - '⾞' => '車', - '⾟' => '辛', - '⾠' => '辰', - '⾡' => '辵', - '⾢' => '邑', - '⾣' => '酉', - '⾤' => '釆', - '⾥' => '里', - '⾦' => '金', - '⾧' => '長', - '⾨' => '門', - '⾩' => '阜', - '⾪' => '隶', - '⾫' => '隹', - '⾬' => '雨', - '⾭' => '靑', - '⾮' => '非', - '⾯' => '面', - '⾰' => '革', - '⾱' => '韋', - '⾲' => '韭', - '⾳' => '音', - '⾴' => '頁', - '⾵' => '風', - '⾶' => '飛', - '⾷' => '食', - '⾸' => '首', - '⾹' => '香', - '⾺' => '馬', - '⾻' => '骨', - '⾼' => '高', - '⾽' => '髟', - '⾾' => '鬥', - '⾿' => '鬯', - '⿀' => '鬲', - '⿁' => '鬼', - '⿂' => '魚', - '⿃' => '鳥', - '⿄' => '鹵', - '⿅' => '鹿', - '⿆' => '麥', - '⿇' => '麻', - '⿈' => '黃', - '⿉' => '黍', - '⿊' => '黑', - '⿋' => '黹', - '⿌' => '黽', - '⿍' => '鼎', - '⿎' => '鼓', - '⿏' => '鼠', - '⿐' => '鼻', - '⿑' => '齊', - '⿒' => '齒', - '⿓' => '龍', - '⿔' => '龜', - '⿕' => '龠', - ' ' => ' ', - '〶' => '〒', - '〸' => '十', - '〹' => '卄', - '〺' => '卅', - '゛' => ' ゙', - '゜' => ' ゚', - 'ゟ' => 'より', - 'ヿ' => 'コト', - 'ㄱ' => 'ᄀ', - 'ㄲ' => 'ᄁ', - 'ㄳ' => 'ᆪ', - 'ㄴ' => 'ᄂ', - 'ㄵ' => 'ᆬ', - 'ㄶ' => 'ᆭ', - 'ㄷ' => 'ᄃ', - 'ㄸ' => 'ᄄ', - 'ㄹ' => 'ᄅ', - 'ㄺ' => 'ᆰ', - 'ㄻ' => 'ᆱ', - 'ㄼ' => 'ᆲ', - 'ㄽ' => 'ᆳ', - 'ㄾ' => 'ᆴ', - 'ㄿ' => 'ᆵ', - 'ㅀ' => 'ᄚ', - 'ㅁ' => 'ᄆ', - 'ㅂ' => 'ᄇ', - 'ㅃ' => 'ᄈ', - 'ㅄ' => 'ᄡ', - 'ㅅ' => 'ᄉ', - 'ㅆ' => 'ᄊ', - 'ㅇ' => 'ᄋ', - 'ㅈ' => 'ᄌ', - 'ㅉ' => 'ᄍ', - 'ㅊ' => 'ᄎ', - 'ㅋ' => 'ᄏ', - 'ㅌ' => 'ᄐ', - 'ㅍ' => 'ᄑ', - 'ㅎ' => 'ᄒ', - 'ㅏ' => 'ᅡ', - 'ㅐ' => 'ᅢ', - 'ㅑ' => 'ᅣ', - 'ㅒ' => 'ᅤ', - 'ㅓ' => 'ᅥ', - 'ㅔ' => 'ᅦ', - 'ㅕ' => 'ᅧ', - 'ㅖ' => 'ᅨ', - 'ㅗ' => 'ᅩ', - 'ㅘ' => 'ᅪ', - 'ㅙ' => 'ᅫ', - 'ㅚ' => 'ᅬ', - 'ㅛ' => 'ᅭ', - 'ㅜ' => 'ᅮ', - 'ㅝ' => 'ᅯ', - 'ㅞ' => 'ᅰ', - 'ㅟ' => 'ᅱ', - 'ㅠ' => 'ᅲ', - 'ㅡ' => 'ᅳ', - 'ㅢ' => 'ᅴ', - 'ㅣ' => 'ᅵ', - 'ㅤ' => 'ᅠ', - 'ㅥ' => 'ᄔ', - 'ㅦ' => 'ᄕ', - 'ㅧ' => 'ᇇ', - 'ㅨ' => 'ᇈ', - 'ㅩ' => 'ᇌ', - 'ㅪ' => 'ᇎ', - 'ㅫ' => 'ᇓ', - 'ㅬ' => 'ᇗ', - 'ㅭ' => 'ᇙ', - 'ㅮ' => 'ᄜ', - 'ㅯ' => 'ᇝ', - 'ㅰ' => 'ᇟ', - 'ㅱ' => 'ᄝ', - 'ㅲ' => 'ᄞ', - 'ㅳ' => 'ᄠ', - 'ㅴ' => 'ᄢ', - 'ㅵ' => 'ᄣ', - 'ㅶ' => 'ᄧ', - 'ㅷ' => 'ᄩ', - 'ㅸ' => 'ᄫ', - 'ㅹ' => 'ᄬ', - 'ㅺ' => 'ᄭ', - 'ㅻ' => 'ᄮ', - 'ㅼ' => 'ᄯ', - 'ㅽ' => 'ᄲ', - 'ㅾ' => 'ᄶ', - 'ㅿ' => 'ᅀ', - 'ㆀ' => 'ᅇ', - 'ㆁ' => 'ᅌ', - 'ㆂ' => 'ᇱ', - 'ㆃ' => 'ᇲ', - 'ㆄ' => 'ᅗ', - 'ㆅ' => 'ᅘ', - 'ㆆ' => 'ᅙ', - 'ㆇ' => 'ᆄ', - 'ㆈ' => 'ᆅ', - 'ㆉ' => 'ᆈ', - 'ㆊ' => 'ᆑ', - 'ㆋ' => 'ᆒ', - 'ㆌ' => 'ᆔ', - 'ㆍ' => 'ᆞ', - 'ㆎ' => 'ᆡ', - '㆒' => '一', - '㆓' => '二', - '㆔' => '三', - '㆕' => '四', - '㆖' => '上', - '㆗' => '中', - '㆘' => '下', - '㆙' => '甲', - '㆚' => '乙', - '㆛' => '丙', - '㆜' => '丁', - '㆝' => '天', - '㆞' => '地', - '㆟' => '人', - '㈀' => '(ᄀ)', - '㈁' => '(ᄂ)', - '㈂' => '(ᄃ)', - '㈃' => '(ᄅ)', - '㈄' => '(ᄆ)', - '㈅' => '(ᄇ)', - '㈆' => '(ᄉ)', - '㈇' => '(ᄋ)', - '㈈' => '(ᄌ)', - '㈉' => '(ᄎ)', - '㈊' => '(ᄏ)', - '㈋' => '(ᄐ)', - '㈌' => '(ᄑ)', - '㈍' => '(ᄒ)', - '㈎' => '(가)', - '㈏' => '(나)', - '㈐' => '(다)', - '㈑' => '(라)', - '㈒' => '(마)', - '㈓' => '(바)', - '㈔' => '(사)', - '㈕' => '(아)', - '㈖' => '(자)', - '㈗' => '(차)', - '㈘' => '(카)', - '㈙' => '(타)', - '㈚' => '(파)', - '㈛' => '(하)', - '㈜' => '(주)', - '㈝' => '(오전)', - '㈞' => '(오후)', - '㈠' => '(一)', - '㈡' => '(二)', - '㈢' => '(三)', - '㈣' => '(四)', - '㈤' => '(五)', - '㈥' => '(六)', - '㈦' => '(七)', - '㈧' => '(八)', - '㈨' => '(九)', - '㈩' => '(十)', - '㈪' => '(月)', - '㈫' => '(火)', - '㈬' => '(水)', - '㈭' => '(木)', - '㈮' => '(金)', - '㈯' => '(土)', - '㈰' => '(日)', - '㈱' => '(株)', - '㈲' => '(有)', - '㈳' => '(社)', - '㈴' => '(名)', - '㈵' => '(特)', - '㈶' => '(財)', - '㈷' => '(祝)', - '㈸' => '(労)', - '㈹' => '(代)', - '㈺' => '(呼)', - '㈻' => '(学)', - '㈼' => '(監)', - '㈽' => '(企)', - '㈾' => '(資)', - '㈿' => '(協)', - '㉀' => '(祭)', - '㉁' => '(休)', - '㉂' => '(自)', - '㉃' => '(至)', - '㉄' => '問', - '㉅' => '幼', - '㉆' => '文', - '㉇' => '箏', - '㉐' => 'PTE', - '㉑' => '21', - '㉒' => '22', - '㉓' => '23', - '㉔' => '24', - '㉕' => '25', - '㉖' => '26', - '㉗' => '27', - '㉘' => '28', - '㉙' => '29', - '㉚' => '30', - '㉛' => '31', - '㉜' => '32', - '㉝' => '33', - '㉞' => '34', - '㉟' => '35', - '㉠' => 'ᄀ', - '㉡' => 'ᄂ', - '㉢' => 'ᄃ', - '㉣' => 'ᄅ', - '㉤' => 'ᄆ', - '㉥' => 'ᄇ', - '㉦' => 'ᄉ', - '㉧' => 'ᄋ', - '㉨' => 'ᄌ', - '㉩' => 'ᄎ', - '㉪' => 'ᄏ', - '㉫' => 'ᄐ', - '㉬' => 'ᄑ', - '㉭' => 'ᄒ', - '㉮' => '가', - '㉯' => '나', - '㉰' => '다', - '㉱' => '라', - '㉲' => '마', - '㉳' => '바', - '㉴' => '사', - '㉵' => '아', - '㉶' => '자', - '㉷' => '차', - '㉸' => '카', - '㉹' => '타', - '㉺' => '파', - '㉻' => '하', - '㉼' => '참고', - '㉽' => '주의', - '㉾' => '우', - '㊀' => '一', - '㊁' => '二', - '㊂' => '三', - '㊃' => '四', - '㊄' => '五', - '㊅' => '六', - '㊆' => '七', - '㊇' => '八', - '㊈' => '九', - '㊉' => '十', - '㊊' => '月', - '㊋' => '火', - '㊌' => '水', - '㊍' => '木', - '㊎' => '金', - '㊏' => '土', - '㊐' => '日', - '㊑' => '株', - '㊒' => '有', - '㊓' => '社', - '㊔' => '名', - '㊕' => '特', - '㊖' => '財', - '㊗' => '祝', - '㊘' => '労', - '㊙' => '秘', - '㊚' => '男', - '㊛' => '女', - '㊜' => '適', - '㊝' => '優', - '㊞' => '印', - '㊟' => '注', - '㊠' => '項', - '㊡' => '休', - '㊢' => '写', - '㊣' => '正', - '㊤' => '上', - '㊥' => '中', - '㊦' => '下', - '㊧' => '左', - '㊨' => '右', - '㊩' => '医', - '㊪' => '宗', - '㊫' => '学', - '㊬' => '監', - '㊭' => '企', - '㊮' => '資', - '㊯' => '協', - '㊰' => '夜', - '㊱' => '36', - '㊲' => '37', - '㊳' => '38', - '㊴' => '39', - '㊵' => '40', - '㊶' => '41', - '㊷' => '42', - '㊸' => '43', - '㊹' => '44', - '㊺' => '45', - '㊻' => '46', - '㊼' => '47', - '㊽' => '48', - '㊾' => '49', - '㊿' => '50', - '㋀' => '1月', - '㋁' => '2月', - '㋂' => '3月', - '㋃' => '4月', - '㋄' => '5月', - '㋅' => '6月', - '㋆' => '7月', - '㋇' => '8月', - '㋈' => '9月', - '㋉' => '10月', - '㋊' => '11月', - '㋋' => '12月', - '㋌' => 'Hg', - '㋍' => 'erg', - '㋎' => 'eV', - '㋏' => 'LTD', - '㋐' => 'ア', - '㋑' => 'イ', - '㋒' => 'ウ', - '㋓' => 'エ', - '㋔' => 'オ', - '㋕' => 'カ', - '㋖' => 'キ', - '㋗' => 'ク', - '㋘' => 'ケ', - '㋙' => 'コ', - '㋚' => 'サ', - '㋛' => 'シ', - '㋜' => 'ス', - '㋝' => 'セ', - '㋞' => 'ソ', - '㋟' => 'タ', - '㋠' => 'チ', - '㋡' => 'ツ', - '㋢' => 'テ', - '㋣' => 'ト', - '㋤' => 'ナ', - '㋥' => 'ニ', - '㋦' => 'ヌ', - '㋧' => 'ネ', - '㋨' => 'ノ', - '㋩' => 'ハ', - '㋪' => 'ヒ', - '㋫' => 'フ', - '㋬' => 'ヘ', - '㋭' => 'ホ', - '㋮' => 'マ', - '㋯' => 'ミ', - '㋰' => 'ム', - '㋱' => 'メ', - '㋲' => 'モ', - '㋳' => 'ヤ', - '㋴' => 'ユ', - '㋵' => 'ヨ', - '㋶' => 'ラ', - '㋷' => 'リ', - '㋸' => 'ル', - '㋹' => 'レ', - '㋺' => 'ロ', - '㋻' => 'ワ', - '㋼' => 'ヰ', - '㋽' => 'ヱ', - '㋾' => 'ヲ', - '㋿' => '令和', - '㌀' => 'アパート', - '㌁' => 'アルファ', - '㌂' => 'アンペア', - '㌃' => 'アール', - '㌄' => 'イニング', - '㌅' => 'インチ', - '㌆' => 'ウォン', - '㌇' => 'エスクード', - '㌈' => 'エーカー', - '㌉' => 'オンス', - '㌊' => 'オーム', - '㌋' => 'カイリ', - '㌌' => 'カラット', - '㌍' => 'カロリー', - '㌎' => 'ガロン', - '㌏' => 'ガンマ', - '㌐' => 'ギガ', - '㌑' => 'ギニー', - '㌒' => 'キュリー', - '㌓' => 'ギルダー', - '㌔' => 'キロ', - '㌕' => 'キログラム', - '㌖' => 'キロメートル', - '㌗' => 'キロワット', - '㌘' => 'グラム', - '㌙' => 'グラムトン', - '㌚' => 'クルゼイロ', - '㌛' => 'クローネ', - '㌜' => 'ケース', - '㌝' => 'コルナ', - '㌞' => 'コーポ', - '㌟' => 'サイクル', - '㌠' => 'サンチーム', - '㌡' => 'シリング', - '㌢' => 'センチ', - '㌣' => 'セント', - '㌤' => 'ダース', - '㌥' => 'デシ', - '㌦' => 'ドル', - '㌧' => 'トン', - '㌨' => 'ナノ', - '㌩' => 'ノット', - '㌪' => 'ハイツ', - '㌫' => 'パーセント', - '㌬' => 'パーツ', - '㌭' => 'バーレル', - '㌮' => 'ピアストル', - '㌯' => 'ピクル', - '㌰' => 'ピコ', - '㌱' => 'ビル', - '㌲' => 'ファラッド', - '㌳' => 'フィート', - '㌴' => 'ブッシェル', - '㌵' => 'フラン', - '㌶' => 'ヘクタール', - '㌷' => 'ペソ', - '㌸' => 'ペニヒ', - '㌹' => 'ヘルツ', - '㌺' => 'ペンス', - '㌻' => 'ページ', - '㌼' => 'ベータ', - '㌽' => 'ポイント', - '㌾' => 'ボルト', - '㌿' => 'ホン', - '㍀' => 'ポンド', - '㍁' => 'ホール', - '㍂' => 'ホーン', - '㍃' => 'マイクロ', - '㍄' => 'マイル', - '㍅' => 'マッハ', - '㍆' => 'マルク', - '㍇' => 'マンション', - '㍈' => 'ミクロン', - '㍉' => 'ミリ', - '㍊' => 'ミリバール', - '㍋' => 'メガ', - '㍌' => 'メガトン', - '㍍' => 'メートル', - '㍎' => 'ヤード', - '㍏' => 'ヤール', - '㍐' => 'ユアン', - '㍑' => 'リットル', - '㍒' => 'リラ', - '㍓' => 'ルピー', - '㍔' => 'ルーブル', - '㍕' => 'レム', - '㍖' => 'レントゲン', - '㍗' => 'ワット', - '㍘' => '0点', - '㍙' => '1点', - '㍚' => '2点', - '㍛' => '3点', - '㍜' => '4点', - '㍝' => '5点', - '㍞' => '6点', - '㍟' => '7点', - '㍠' => '8点', - '㍡' => '9点', - '㍢' => '10点', - '㍣' => '11点', - '㍤' => '12点', - '㍥' => '13点', - '㍦' => '14点', - '㍧' => '15点', - '㍨' => '16点', - '㍩' => '17点', - '㍪' => '18点', - '㍫' => '19点', - '㍬' => '20点', - '㍭' => '21点', - '㍮' => '22点', - '㍯' => '23点', - '㍰' => '24点', - '㍱' => 'hPa', - '㍲' => 'da', - '㍳' => 'AU', - '㍴' => 'bar', - '㍵' => 'oV', - '㍶' => 'pc', - '㍷' => 'dm', - '㍸' => 'dm2', - '㍹' => 'dm3', - '㍺' => 'IU', - '㍻' => '平成', - '㍼' => '昭和', - '㍽' => '大正', - '㍾' => '明治', - '㍿' => '株式会社', - '㎀' => 'pA', - '㎁' => 'nA', - '㎂' => 'μA', - '㎃' => 'mA', - '㎄' => 'kA', - '㎅' => 'KB', - '㎆' => 'MB', - '㎇' => 'GB', - '㎈' => 'cal', - '㎉' => 'kcal', - '㎊' => 'pF', - '㎋' => 'nF', - '㎌' => 'μF', - '㎍' => 'μg', - '㎎' => 'mg', - '㎏' => 'kg', - '㎐' => 'Hz', - '㎑' => 'kHz', - '㎒' => 'MHz', - '㎓' => 'GHz', - '㎔' => 'THz', - '㎕' => 'μl', - '㎖' => 'ml', - '㎗' => 'dl', - '㎘' => 'kl', - '㎙' => 'fm', - '㎚' => 'nm', - '㎛' => 'μm', - '㎜' => 'mm', - '㎝' => 'cm', - '㎞' => 'km', - '㎟' => 'mm2', - '㎠' => 'cm2', - '㎡' => 'm2', - '㎢' => 'km2', - '㎣' => 'mm3', - '㎤' => 'cm3', - '㎥' => 'm3', - '㎦' => 'km3', - '㎧' => 'm∕s', - '㎨' => 'm∕s2', - '㎩' => 'Pa', - '㎪' => 'kPa', - '㎫' => 'MPa', - '㎬' => 'GPa', - '㎭' => 'rad', - '㎮' => 'rad∕s', - '㎯' => 'rad∕s2', - '㎰' => 'ps', - '㎱' => 'ns', - '㎲' => 'μs', - '㎳' => 'ms', - '㎴' => 'pV', - '㎵' => 'nV', - '㎶' => 'μV', - '㎷' => 'mV', - '㎸' => 'kV', - '㎹' => 'MV', - '㎺' => 'pW', - '㎻' => 'nW', - '㎼' => 'μW', - '㎽' => 'mW', - '㎾' => 'kW', - '㎿' => 'MW', - '㏀' => 'kΩ', - '㏁' => 'MΩ', - '㏂' => 'a.m.', - '㏃' => 'Bq', - '㏄' => 'cc', - '㏅' => 'cd', - '㏆' => 'C∕kg', - '㏇' => 'Co.', - '㏈' => 'dB', - '㏉' => 'Gy', - '㏊' => 'ha', - '㏋' => 'HP', - '㏌' => 'in', - '㏍' => 'KK', - '㏎' => 'KM', - '㏏' => 'kt', - '㏐' => 'lm', - '㏑' => 'ln', - '㏒' => 'log', - '㏓' => 'lx', - '㏔' => 'mb', - '㏕' => 'mil', - '㏖' => 'mol', - '㏗' => 'PH', - '㏘' => 'p.m.', - '㏙' => 'PPM', - '㏚' => 'PR', - '㏛' => 'sr', - '㏜' => 'Sv', - '㏝' => 'Wb', - '㏞' => 'V∕m', - '㏟' => 'A∕m', - '㏠' => '1日', - '㏡' => '2日', - '㏢' => '3日', - '㏣' => '4日', - '㏤' => '5日', - '㏥' => '6日', - '㏦' => '7日', - '㏧' => '8日', - '㏨' => '9日', - '㏩' => '10日', - '㏪' => '11日', - '㏫' => '12日', - '㏬' => '13日', - '㏭' => '14日', - '㏮' => '15日', - '㏯' => '16日', - '㏰' => '17日', - '㏱' => '18日', - '㏲' => '19日', - '㏳' => '20日', - '㏴' => '21日', - '㏵' => '22日', - '㏶' => '23日', - '㏷' => '24日', - '㏸' => '25日', - '㏹' => '26日', - '㏺' => '27日', - '㏻' => '28日', - '㏼' => '29日', - '㏽' => '30日', - '㏾' => '31日', - '㏿' => 'gal', - 'ꚜ' => 'ъ', - 'ꚝ' => 'ь', - 'ꝰ' => 'ꝯ', - 'ꟸ' => 'Ħ', - 'ꟹ' => 'œ', - 'ꭜ' => 'ꜧ', - 'ꭝ' => 'ꬷ', - 'ꭞ' => 'ɫ', - 'ꭟ' => 'ꭒ', - 'ꭩ' => 'ʍ', - 'ff' => 'ff', - 'fi' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ſt' => 'st', - 'st' => 'st', - 'ﬓ' => 'մն', - 'ﬔ' => 'մե', - 'ﬕ' => 'մի', - 'ﬖ' => 'վն', - 'ﬗ' => 'մխ', - 'ﬠ' => 'ע', - 'ﬡ' => 'א', - 'ﬢ' => 'ד', - 'ﬣ' => 'ה', - 'ﬤ' => 'כ', - 'ﬥ' => 'ל', - 'ﬦ' => 'ם', - 'ﬧ' => 'ר', - 'ﬨ' => 'ת', - '﬩' => '+', - 'ﭏ' => 'אל', - 'ﭐ' => 'ٱ', - 'ﭑ' => 'ٱ', - 'ﭒ' => 'ٻ', - 'ﭓ' => 'ٻ', - 'ﭔ' => 'ٻ', - 'ﭕ' => 'ٻ', - 'ﭖ' => 'پ', - 'ﭗ' => 'پ', - 'ﭘ' => 'پ', - 'ﭙ' => 'پ', - 'ﭚ' => 'ڀ', - 'ﭛ' => 'ڀ', - 'ﭜ' => 'ڀ', - 'ﭝ' => 'ڀ', - 'ﭞ' => 'ٺ', - 'ﭟ' => 'ٺ', - 'ﭠ' => 'ٺ', - 'ﭡ' => 'ٺ', - 'ﭢ' => 'ٿ', - 'ﭣ' => 'ٿ', - 'ﭤ' => 'ٿ', - 'ﭥ' => 'ٿ', - 'ﭦ' => 'ٹ', - 'ﭧ' => 'ٹ', - 'ﭨ' => 'ٹ', - 'ﭩ' => 'ٹ', - 'ﭪ' => 'ڤ', - 'ﭫ' => 'ڤ', - 'ﭬ' => 'ڤ', - 'ﭭ' => 'ڤ', - 'ﭮ' => 'ڦ', - 'ﭯ' => 'ڦ', - 'ﭰ' => 'ڦ', - 'ﭱ' => 'ڦ', - 'ﭲ' => 'ڄ', - 'ﭳ' => 'ڄ', - 'ﭴ' => 'ڄ', - 'ﭵ' => 'ڄ', - 'ﭶ' => 'ڃ', - 'ﭷ' => 'ڃ', - 'ﭸ' => 'ڃ', - 'ﭹ' => 'ڃ', - 'ﭺ' => 'چ', - 'ﭻ' => 'چ', - 'ﭼ' => 'چ', - 'ﭽ' => 'چ', - 'ﭾ' => 'ڇ', - 'ﭿ' => 'ڇ', - 'ﮀ' => 'ڇ', - 'ﮁ' => 'ڇ', - 'ﮂ' => 'ڍ', - 'ﮃ' => 'ڍ', - 'ﮄ' => 'ڌ', - 'ﮅ' => 'ڌ', - 'ﮆ' => 'ڎ', - 'ﮇ' => 'ڎ', - 'ﮈ' => 'ڈ', - 'ﮉ' => 'ڈ', - 'ﮊ' => 'ژ', - 'ﮋ' => 'ژ', - 'ﮌ' => 'ڑ', - 'ﮍ' => 'ڑ', - 'ﮎ' => 'ک', - 'ﮏ' => 'ک', - 'ﮐ' => 'ک', - 'ﮑ' => 'ک', - 'ﮒ' => 'گ', - 'ﮓ' => 'گ', - 'ﮔ' => 'گ', - 'ﮕ' => 'گ', - 'ﮖ' => 'ڳ', - 'ﮗ' => 'ڳ', - 'ﮘ' => 'ڳ', - 'ﮙ' => 'ڳ', - 'ﮚ' => 'ڱ', - 'ﮛ' => 'ڱ', - 'ﮜ' => 'ڱ', - 'ﮝ' => 'ڱ', - 'ﮞ' => 'ں', - 'ﮟ' => 'ں', - 'ﮠ' => 'ڻ', - 'ﮡ' => 'ڻ', - 'ﮢ' => 'ڻ', - 'ﮣ' => 'ڻ', - 'ﮤ' => 'ۀ', - 'ﮥ' => 'ۀ', - 'ﮦ' => 'ہ', - 'ﮧ' => 'ہ', - 'ﮨ' => 'ہ', - 'ﮩ' => 'ہ', - 'ﮪ' => 'ھ', - 'ﮫ' => 'ھ', - 'ﮬ' => 'ھ', - 'ﮭ' => 'ھ', - 'ﮮ' => 'ے', - 'ﮯ' => 'ے', - 'ﮰ' => 'ۓ', - 'ﮱ' => 'ۓ', - 'ﯓ' => 'ڭ', - 'ﯔ' => 'ڭ', - 'ﯕ' => 'ڭ', - 'ﯖ' => 'ڭ', - 'ﯗ' => 'ۇ', - 'ﯘ' => 'ۇ', - 'ﯙ' => 'ۆ', - 'ﯚ' => 'ۆ', - 'ﯛ' => 'ۈ', - 'ﯜ' => 'ۈ', - 'ﯝ' => 'ۇٴ', - 'ﯞ' => 'ۋ', - 'ﯟ' => 'ۋ', - 'ﯠ' => 'ۅ', - 'ﯡ' => 'ۅ', - 'ﯢ' => 'ۉ', - 'ﯣ' => 'ۉ', - 'ﯤ' => 'ې', - 'ﯥ' => 'ې', - 'ﯦ' => 'ې', - 'ﯧ' => 'ې', - 'ﯨ' => 'ى', - 'ﯩ' => 'ى', - 'ﯪ' => 'ئا', - 'ﯫ' => 'ئا', - 'ﯬ' => 'ئە', - 'ﯭ' => 'ئە', - 'ﯮ' => 'ئو', - 'ﯯ' => 'ئو', - 'ﯰ' => 'ئۇ', - 'ﯱ' => 'ئۇ', - 'ﯲ' => 'ئۆ', - 'ﯳ' => 'ئۆ', - 'ﯴ' => 'ئۈ', - 'ﯵ' => 'ئۈ', - 'ﯶ' => 'ئې', - 'ﯷ' => 'ئې', - 'ﯸ' => 'ئې', - 'ﯹ' => 'ئى', - 'ﯺ' => 'ئى', - 'ﯻ' => 'ئى', - 'ﯼ' => 'ی', - 'ﯽ' => 'ی', - 'ﯾ' => 'ی', - 'ﯿ' => 'ی', - 'ﰀ' => 'ئج', - 'ﰁ' => 'ئح', - 'ﰂ' => 'ئم', - 'ﰃ' => 'ئى', - 'ﰄ' => 'ئي', - 'ﰅ' => 'بج', - 'ﰆ' => 'بح', - 'ﰇ' => 'بخ', - 'ﰈ' => 'بم', - 'ﰉ' => 'بى', - 'ﰊ' => 'بي', - 'ﰋ' => 'تج', - 'ﰌ' => 'تح', - 'ﰍ' => 'تخ', - 'ﰎ' => 'تم', - 'ﰏ' => 'تى', - 'ﰐ' => 'تي', - 'ﰑ' => 'ثج', - 'ﰒ' => 'ثم', - 'ﰓ' => 'ثى', - 'ﰔ' => 'ثي', - 'ﰕ' => 'جح', - 'ﰖ' => 'جم', - 'ﰗ' => 'حج', - 'ﰘ' => 'حم', - 'ﰙ' => 'خج', - 'ﰚ' => 'خح', - 'ﰛ' => 'خم', - 'ﰜ' => 'سج', - 'ﰝ' => 'سح', - 'ﰞ' => 'سخ', - 'ﰟ' => 'سم', - 'ﰠ' => 'صح', - 'ﰡ' => 'صم', - 'ﰢ' => 'ضج', - 'ﰣ' => 'ضح', - 'ﰤ' => 'ضخ', - 'ﰥ' => 'ضم', - 'ﰦ' => 'طح', - 'ﰧ' => 'طم', - 'ﰨ' => 'ظم', - 'ﰩ' => 'عج', - 'ﰪ' => 'عم', - 'ﰫ' => 'غج', - 'ﰬ' => 'غم', - 'ﰭ' => 'فج', - 'ﰮ' => 'فح', - 'ﰯ' => 'فخ', - 'ﰰ' => 'فم', - 'ﰱ' => 'فى', - 'ﰲ' => 'في', - 'ﰳ' => 'قح', - 'ﰴ' => 'قم', - 'ﰵ' => 'قى', - 'ﰶ' => 'قي', - 'ﰷ' => 'كا', - 'ﰸ' => 'كج', - 'ﰹ' => 'كح', - 'ﰺ' => 'كخ', - 'ﰻ' => 'كل', - 'ﰼ' => 'كم', - 'ﰽ' => 'كى', - 'ﰾ' => 'كي', - 'ﰿ' => 'لج', - 'ﱀ' => 'لح', - 'ﱁ' => 'لخ', - 'ﱂ' => 'لم', - 'ﱃ' => 'لى', - 'ﱄ' => 'لي', - 'ﱅ' => 'مج', - 'ﱆ' => 'مح', - 'ﱇ' => 'مخ', - 'ﱈ' => 'مم', - 'ﱉ' => 'مى', - 'ﱊ' => 'مي', - 'ﱋ' => 'نج', - 'ﱌ' => 'نح', - 'ﱍ' => 'نخ', - 'ﱎ' => 'نم', - 'ﱏ' => 'نى', - 'ﱐ' => 'ني', - 'ﱑ' => 'هج', - 'ﱒ' => 'هم', - 'ﱓ' => 'هى', - 'ﱔ' => 'هي', - 'ﱕ' => 'يج', - 'ﱖ' => 'يح', - 'ﱗ' => 'يخ', - 'ﱘ' => 'يم', - 'ﱙ' => 'يى', - 'ﱚ' => 'يي', - 'ﱛ' => 'ذٰ', - 'ﱜ' => 'رٰ', - 'ﱝ' => 'ىٰ', - 'ﱞ' => ' ٌّ', - 'ﱟ' => ' ٍّ', - 'ﱠ' => ' َّ', - 'ﱡ' => ' ُّ', - 'ﱢ' => ' ِّ', - 'ﱣ' => ' ّٰ', - 'ﱤ' => 'ئر', - 'ﱥ' => 'ئز', - 'ﱦ' => 'ئم', - 'ﱧ' => 'ئن', - 'ﱨ' => 'ئى', - 'ﱩ' => 'ئي', - 'ﱪ' => 'بر', - 'ﱫ' => 'بز', - 'ﱬ' => 'بم', - 'ﱭ' => 'بن', - 'ﱮ' => 'بى', - 'ﱯ' => 'بي', - 'ﱰ' => 'تر', - 'ﱱ' => 'تز', - 'ﱲ' => 'تم', - 'ﱳ' => 'تن', - 'ﱴ' => 'تى', - 'ﱵ' => 'تي', - 'ﱶ' => 'ثر', - 'ﱷ' => 'ثز', - 'ﱸ' => 'ثم', - 'ﱹ' => 'ثن', - 'ﱺ' => 'ثى', - 'ﱻ' => 'ثي', - 'ﱼ' => 'فى', - 'ﱽ' => 'في', - 'ﱾ' => 'قى', - 'ﱿ' => 'قي', - 'ﲀ' => 'كا', - 'ﲁ' => 'كل', - 'ﲂ' => 'كم', - 'ﲃ' => 'كى', - 'ﲄ' => 'كي', - 'ﲅ' => 'لم', - 'ﲆ' => 'لى', - 'ﲇ' => 'لي', - 'ﲈ' => 'ما', - 'ﲉ' => 'مم', - 'ﲊ' => 'نر', - 'ﲋ' => 'نز', - 'ﲌ' => 'نم', - 'ﲍ' => 'نن', - 'ﲎ' => 'نى', - 'ﲏ' => 'ني', - 'ﲐ' => 'ىٰ', - 'ﲑ' => 'ير', - 'ﲒ' => 'يز', - 'ﲓ' => 'يم', - 'ﲔ' => 'ين', - 'ﲕ' => 'يى', - 'ﲖ' => 'يي', - 'ﲗ' => 'ئج', - 'ﲘ' => 'ئح', - 'ﲙ' => 'ئخ', - 'ﲚ' => 'ئم', - 'ﲛ' => 'ئه', - 'ﲜ' => 'بج', - 'ﲝ' => 'بح', - 'ﲞ' => 'بخ', - 'ﲟ' => 'بم', - 'ﲠ' => 'به', - 'ﲡ' => 'تج', - 'ﲢ' => 'تح', - 'ﲣ' => 'تخ', - 'ﲤ' => 'تم', - 'ﲥ' => 'ته', - 'ﲦ' => 'ثم', - 'ﲧ' => 'جح', - 'ﲨ' => 'جم', - 'ﲩ' => 'حج', - 'ﲪ' => 'حم', - 'ﲫ' => 'خج', - 'ﲬ' => 'خم', - 'ﲭ' => 'سج', - 'ﲮ' => 'سح', - 'ﲯ' => 'سخ', - 'ﲰ' => 'سم', - 'ﲱ' => 'صح', - 'ﲲ' => 'صخ', - 'ﲳ' => 'صم', - 'ﲴ' => 'ضج', - 'ﲵ' => 'ضح', - 'ﲶ' => 'ضخ', - 'ﲷ' => 'ضم', - 'ﲸ' => 'طح', - 'ﲹ' => 'ظم', - 'ﲺ' => 'عج', - 'ﲻ' => 'عم', - 'ﲼ' => 'غج', - 'ﲽ' => 'غم', - 'ﲾ' => 'فج', - 'ﲿ' => 'فح', - 'ﳀ' => 'فخ', - 'ﳁ' => 'فم', - 'ﳂ' => 'قح', - 'ﳃ' => 'قم', - 'ﳄ' => 'كج', - 'ﳅ' => 'كح', - 'ﳆ' => 'كخ', - 'ﳇ' => 'كل', - 'ﳈ' => 'كم', - 'ﳉ' => 'لج', - 'ﳊ' => 'لح', - 'ﳋ' => 'لخ', - 'ﳌ' => 'لم', - 'ﳍ' => 'له', - 'ﳎ' => 'مج', - 'ﳏ' => 'مح', - 'ﳐ' => 'مخ', - 'ﳑ' => 'مم', - 'ﳒ' => 'نج', - 'ﳓ' => 'نح', - 'ﳔ' => 'نخ', - 'ﳕ' => 'نم', - 'ﳖ' => 'نه', - 'ﳗ' => 'هج', - 'ﳘ' => 'هم', - 'ﳙ' => 'هٰ', - 'ﳚ' => 'يج', - 'ﳛ' => 'يح', - 'ﳜ' => 'يخ', - 'ﳝ' => 'يم', - 'ﳞ' => 'يه', - 'ﳟ' => 'ئم', - 'ﳠ' => 'ئه', - 'ﳡ' => 'بم', - 'ﳢ' => 'به', - 'ﳣ' => 'تم', - 'ﳤ' => 'ته', - 'ﳥ' => 'ثم', - 'ﳦ' => 'ثه', - 'ﳧ' => 'سم', - 'ﳨ' => 'سه', - 'ﳩ' => 'شم', - 'ﳪ' => 'شه', - 'ﳫ' => 'كل', - 'ﳬ' => 'كم', - 'ﳭ' => 'لم', - 'ﳮ' => 'نم', - 'ﳯ' => 'نه', - 'ﳰ' => 'يم', - 'ﳱ' => 'يه', - 'ﳲ' => 'ـَّ', - 'ﳳ' => 'ـُّ', - 'ﳴ' => 'ـِّ', - 'ﳵ' => 'طى', - 'ﳶ' => 'طي', - 'ﳷ' => 'عى', - 'ﳸ' => 'عي', - 'ﳹ' => 'غى', - 'ﳺ' => 'غي', - 'ﳻ' => 'سى', - 'ﳼ' => 'سي', - 'ﳽ' => 'شى', - 'ﳾ' => 'شي', - 'ﳿ' => 'حى', - 'ﴀ' => 'حي', - 'ﴁ' => 'جى', - 'ﴂ' => 'جي', - 'ﴃ' => 'خى', - 'ﴄ' => 'خي', - 'ﴅ' => 'صى', - 'ﴆ' => 'صي', - 'ﴇ' => 'ضى', - 'ﴈ' => 'ضي', - 'ﴉ' => 'شج', - 'ﴊ' => 'شح', - 'ﴋ' => 'شخ', - 'ﴌ' => 'شم', - 'ﴍ' => 'شر', - 'ﴎ' => 'سر', - 'ﴏ' => 'صر', - 'ﴐ' => 'ضر', - 'ﴑ' => 'طى', - 'ﴒ' => 'طي', - 'ﴓ' => 'عى', - 'ﴔ' => 'عي', - 'ﴕ' => 'غى', - 'ﴖ' => 'غي', - 'ﴗ' => 'سى', - 'ﴘ' => 'سي', - 'ﴙ' => 'شى', - 'ﴚ' => 'شي', - 'ﴛ' => 'حى', - 'ﴜ' => 'حي', - 'ﴝ' => 'جى', - 'ﴞ' => 'جي', - 'ﴟ' => 'خى', - 'ﴠ' => 'خي', - 'ﴡ' => 'صى', - 'ﴢ' => 'صي', - 'ﴣ' => 'ضى', - 'ﴤ' => 'ضي', - 'ﴥ' => 'شج', - 'ﴦ' => 'شح', - 'ﴧ' => 'شخ', - 'ﴨ' => 'شم', - 'ﴩ' => 'شر', - 'ﴪ' => 'سر', - 'ﴫ' => 'صر', - 'ﴬ' => 'ضر', - 'ﴭ' => 'شج', - 'ﴮ' => 'شح', - 'ﴯ' => 'شخ', - 'ﴰ' => 'شم', - 'ﴱ' => 'سه', - 'ﴲ' => 'شه', - 'ﴳ' => 'طم', - 'ﴴ' => 'سج', - 'ﴵ' => 'سح', - 'ﴶ' => 'سخ', - 'ﴷ' => 'شج', - 'ﴸ' => 'شح', - 'ﴹ' => 'شخ', - 'ﴺ' => 'طم', - 'ﴻ' => 'ظم', - 'ﴼ' => 'اً', - 'ﴽ' => 'اً', - 'ﵐ' => 'تجم', - 'ﵑ' => 'تحج', - 'ﵒ' => 'تحج', - 'ﵓ' => 'تحم', - 'ﵔ' => 'تخم', - 'ﵕ' => 'تمج', - 'ﵖ' => 'تمح', - 'ﵗ' => 'تمخ', - 'ﵘ' => 'جمح', - 'ﵙ' => 'جمح', - 'ﵚ' => 'حمي', - 'ﵛ' => 'حمى', - 'ﵜ' => 'سحج', - 'ﵝ' => 'سجح', - 'ﵞ' => 'سجى', - 'ﵟ' => 'سمح', - 'ﵠ' => 'سمح', - 'ﵡ' => 'سمج', - 'ﵢ' => 'سمم', - 'ﵣ' => 'سمم', - 'ﵤ' => 'صحح', - 'ﵥ' => 'صحح', - 'ﵦ' => 'صمم', - 'ﵧ' => 'شحم', - 'ﵨ' => 'شحم', - 'ﵩ' => 'شجي', - 'ﵪ' => 'شمخ', - 'ﵫ' => 'شمخ', - 'ﵬ' => 'شمم', - 'ﵭ' => 'شمم', - 'ﵮ' => 'ضحى', - 'ﵯ' => 'ضخم', - 'ﵰ' => 'ضخم', - 'ﵱ' => 'طمح', - 'ﵲ' => 'طمح', - 'ﵳ' => 'طمم', - 'ﵴ' => 'طمي', - 'ﵵ' => 'عجم', - 'ﵶ' => 'عمم', - 'ﵷ' => 'عمم', - 'ﵸ' => 'عمى', - 'ﵹ' => 'غمم', - 'ﵺ' => 'غمي', - 'ﵻ' => 'غمى', - 'ﵼ' => 'فخم', - 'ﵽ' => 'فخم', - 'ﵾ' => 'قمح', - 'ﵿ' => 'قمم', - 'ﶀ' => 'لحم', - 'ﶁ' => 'لحي', - 'ﶂ' => 'لحى', - 'ﶃ' => 'لجج', - 'ﶄ' => 'لجج', - 'ﶅ' => 'لخم', - 'ﶆ' => 'لخم', - 'ﶇ' => 'لمح', - 'ﶈ' => 'لمح', - 'ﶉ' => 'محج', - 'ﶊ' => 'محم', - 'ﶋ' => 'محي', - 'ﶌ' => 'مجح', - 'ﶍ' => 'مجم', - 'ﶎ' => 'مخج', - 'ﶏ' => 'مخم', - 'ﶒ' => 'مجخ', - 'ﶓ' => 'همج', - 'ﶔ' => 'همم', - 'ﶕ' => 'نحم', - 'ﶖ' => 'نحى', - 'ﶗ' => 'نجم', - 'ﶘ' => 'نجم', - 'ﶙ' => 'نجى', - 'ﶚ' => 'نمي', - 'ﶛ' => 'نمى', - 'ﶜ' => 'يمم', - 'ﶝ' => 'يمم', - 'ﶞ' => 'بخي', - 'ﶟ' => 'تجي', - 'ﶠ' => 'تجى', - 'ﶡ' => 'تخي', - 'ﶢ' => 'تخى', - 'ﶣ' => 'تمي', - 'ﶤ' => 'تمى', - 'ﶥ' => 'جمي', - 'ﶦ' => 'جحى', - 'ﶧ' => 'جمى', - 'ﶨ' => 'سخى', - 'ﶩ' => 'صحي', - 'ﶪ' => 'شحي', - 'ﶫ' => 'ضحي', - 'ﶬ' => 'لجي', - 'ﶭ' => 'لمي', - 'ﶮ' => 'يحي', - 'ﶯ' => 'يجي', - 'ﶰ' => 'يمي', - 'ﶱ' => 'ممي', - 'ﶲ' => 'قمي', - 'ﶳ' => 'نحي', - 'ﶴ' => 'قمح', - 'ﶵ' => 'لحم', - 'ﶶ' => 'عمي', - 'ﶷ' => 'كمي', - 'ﶸ' => 'نجح', - 'ﶹ' => 'مخي', - 'ﶺ' => 'لجم', - 'ﶻ' => 'كمم', - 'ﶼ' => 'لجم', - 'ﶽ' => 'نجح', - 'ﶾ' => 'جحي', - 'ﶿ' => 'حجي', - 'ﷀ' => 'مجي', - 'ﷁ' => 'فمي', - 'ﷂ' => 'بحي', - 'ﷃ' => 'كمم', - 'ﷄ' => 'عجم', - 'ﷅ' => 'صمم', - 'ﷆ' => 'سخي', - 'ﷇ' => 'نجي', - 'ﷰ' => 'صلے', - 'ﷱ' => 'قلے', - 'ﷲ' => 'الله', - 'ﷳ' => 'اكبر', - 'ﷴ' => 'محمد', - 'ﷵ' => 'صلعم', - 'ﷶ' => 'رسول', - 'ﷷ' => 'عليه', - 'ﷸ' => 'وسلم', - 'ﷹ' => 'صلى', - 'ﷺ' => 'صلى الله عليه وسلم', - 'ﷻ' => 'جل جلاله', - '﷼' => 'ریال', - '︐' => ',', - '︑' => '、', - '︒' => '。', - '︓' => ':', - '︔' => ';', - '︕' => '!', - '︖' => '?', - '︗' => '〖', - '︘' => '〗', - '︙' => '...', - '︰' => '..', - '︱' => '—', - '︲' => '–', - '︳' => '_', - '︴' => '_', - '︵' => '(', - '︶' => ')', - '︷' => '{', - '︸' => '}', - '︹' => '〔', - '︺' => '〕', - '︻' => '【', - '︼' => '】', - '︽' => '《', - '︾' => '》', - '︿' => '〈', - '﹀' => '〉', - '﹁' => '「', - '﹂' => '」', - '﹃' => '『', - '﹄' => '』', - '﹇' => '[', - '﹈' => ']', - '﹉' => ' ̅', - '﹊' => ' ̅', - '﹋' => ' ̅', - '﹌' => ' ̅', - '﹍' => '_', - '﹎' => '_', - '﹏' => '_', - '﹐' => ',', - '﹑' => '、', - '﹒' => '.', - '﹔' => ';', - '﹕' => ':', - '﹖' => '?', - '﹗' => '!', - '﹘' => '—', - '﹙' => '(', - '﹚' => ')', - '﹛' => '{', - '﹜' => '}', - '﹝' => '〔', - '﹞' => '〕', - '﹟' => '#', - '﹠' => '&', - '﹡' => '*', - '﹢' => '+', - '﹣' => '-', - '﹤' => '<', - '﹥' => '>', - '﹦' => '=', - '﹨' => '\\', - '﹩' => '$', - '﹪' => '%', - '﹫' => '@', - 'ﹰ' => ' ً', - 'ﹱ' => 'ـً', - 'ﹲ' => ' ٌ', - 'ﹴ' => ' ٍ', - 'ﹶ' => ' َ', - 'ﹷ' => 'ـَ', - 'ﹸ' => ' ُ', - 'ﹹ' => 'ـُ', - 'ﹺ' => ' ِ', - 'ﹻ' => 'ـِ', - 'ﹼ' => ' ّ', - 'ﹽ' => 'ـّ', - 'ﹾ' => ' ْ', - 'ﹿ' => 'ـْ', - 'ﺀ' => 'ء', - 'ﺁ' => 'آ', - 'ﺂ' => 'آ', - 'ﺃ' => 'أ', - 'ﺄ' => 'أ', - 'ﺅ' => 'ؤ', - 'ﺆ' => 'ؤ', - 'ﺇ' => 'إ', - 'ﺈ' => 'إ', - 'ﺉ' => 'ئ', - 'ﺊ' => 'ئ', - 'ﺋ' => 'ئ', - 'ﺌ' => 'ئ', - 'ﺍ' => 'ا', - 'ﺎ' => 'ا', - 'ﺏ' => 'ب', - 'ﺐ' => 'ب', - 'ﺑ' => 'ب', - 'ﺒ' => 'ب', - 'ﺓ' => 'ة', - 'ﺔ' => 'ة', - 'ﺕ' => 'ت', - 'ﺖ' => 'ت', - 'ﺗ' => 'ت', - 'ﺘ' => 'ت', - 'ﺙ' => 'ث', - 'ﺚ' => 'ث', - 'ﺛ' => 'ث', - 'ﺜ' => 'ث', - 'ﺝ' => 'ج', - 'ﺞ' => 'ج', - 'ﺟ' => 'ج', - 'ﺠ' => 'ج', - 'ﺡ' => 'ح', - 'ﺢ' => 'ح', - 'ﺣ' => 'ح', - 'ﺤ' => 'ح', - 'ﺥ' => 'خ', - 'ﺦ' => 'خ', - 'ﺧ' => 'خ', - 'ﺨ' => 'خ', - 'ﺩ' => 'د', - 'ﺪ' => 'د', - 'ﺫ' => 'ذ', - 'ﺬ' => 'ذ', - 'ﺭ' => 'ر', - 'ﺮ' => 'ر', - 'ﺯ' => 'ز', - 'ﺰ' => 'ز', - 'ﺱ' => 'س', - 'ﺲ' => 'س', - 'ﺳ' => 'س', - 'ﺴ' => 'س', - 'ﺵ' => 'ش', - 'ﺶ' => 'ش', - 'ﺷ' => 'ش', - 'ﺸ' => 'ش', - 'ﺹ' => 'ص', - 'ﺺ' => 'ص', - 'ﺻ' => 'ص', - 'ﺼ' => 'ص', - 'ﺽ' => 'ض', - 'ﺾ' => 'ض', - 'ﺿ' => 'ض', - 'ﻀ' => 'ض', - 'ﻁ' => 'ط', - 'ﻂ' => 'ط', - 'ﻃ' => 'ط', - 'ﻄ' => 'ط', - 'ﻅ' => 'ظ', - 'ﻆ' => 'ظ', - 'ﻇ' => 'ظ', - 'ﻈ' => 'ظ', - 'ﻉ' => 'ع', - 'ﻊ' => 'ع', - 'ﻋ' => 'ع', - 'ﻌ' => 'ع', - 'ﻍ' => 'غ', - 'ﻎ' => 'غ', - 'ﻏ' => 'غ', - 'ﻐ' => 'غ', - 'ﻑ' => 'ف', - 'ﻒ' => 'ف', - 'ﻓ' => 'ف', - 'ﻔ' => 'ف', - 'ﻕ' => 'ق', - 'ﻖ' => 'ق', - 'ﻗ' => 'ق', - 'ﻘ' => 'ق', - 'ﻙ' => 'ك', - 'ﻚ' => 'ك', - 'ﻛ' => 'ك', - 'ﻜ' => 'ك', - 'ﻝ' => 'ل', - 'ﻞ' => 'ل', - 'ﻟ' => 'ل', - 'ﻠ' => 'ل', - 'ﻡ' => 'م', - 'ﻢ' => 'م', - 'ﻣ' => 'م', - 'ﻤ' => 'م', - 'ﻥ' => 'ن', - 'ﻦ' => 'ن', - 'ﻧ' => 'ن', - 'ﻨ' => 'ن', - 'ﻩ' => 'ه', - 'ﻪ' => 'ه', - 'ﻫ' => 'ه', - 'ﻬ' => 'ه', - 'ﻭ' => 'و', - 'ﻮ' => 'و', - 'ﻯ' => 'ى', - 'ﻰ' => 'ى', - 'ﻱ' => 'ي', - 'ﻲ' => 'ي', - 'ﻳ' => 'ي', - 'ﻴ' => 'ي', - 'ﻵ' => 'لآ', - 'ﻶ' => 'لآ', - 'ﻷ' => 'لأ', - 'ﻸ' => 'لأ', - 'ﻹ' => 'لإ', - 'ﻺ' => 'لإ', - 'ﻻ' => 'لا', - 'ﻼ' => 'لا', - '!' => '!', - '"' => '"', - '#' => '#', - '$' => '$', - '%' => '%', - '&' => '&', - ''' => '\'', - '(' => '(', - ')' => ')', - '*' => '*', - '+' => '+', - ',' => ',', - '-' => '-', - '.' => '.', - '/' => '/', - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - ':' => ':', - ';' => ';', - '<' => '<', - '=' => '=', - '>' => '>', - '?' => '?', - '@' => '@', - 'A' => 'A', - 'B' => 'B', - 'C' => 'C', - 'D' => 'D', - 'E' => 'E', - 'F' => 'F', - 'G' => 'G', - 'H' => 'H', - 'I' => 'I', - 'J' => 'J', - 'K' => 'K', - 'L' => 'L', - 'M' => 'M', - 'N' => 'N', - 'O' => 'O', - 'P' => 'P', - 'Q' => 'Q', - 'R' => 'R', - 'S' => 'S', - 'T' => 'T', - 'U' => 'U', - 'V' => 'V', - 'W' => 'W', - 'X' => 'X', - 'Y' => 'Y', - 'Z' => 'Z', - '[' => '[', - '\' => '\\', - ']' => ']', - '^' => '^', - '_' => '_', - '`' => '`', - 'a' => 'a', - 'b' => 'b', - 'c' => 'c', - 'd' => 'd', - 'e' => 'e', - 'f' => 'f', - 'g' => 'g', - 'h' => 'h', - 'i' => 'i', - 'j' => 'j', - 'k' => 'k', - 'l' => 'l', - 'm' => 'm', - 'n' => 'n', - 'o' => 'o', - 'p' => 'p', - 'q' => 'q', - 'r' => 'r', - 's' => 's', - 't' => 't', - 'u' => 'u', - 'v' => 'v', - 'w' => 'w', - 'x' => 'x', - 'y' => 'y', - 'z' => 'z', - '{' => '{', - '|' => '|', - '}' => '}', - '~' => '~', - '⦅' => '⦅', - '⦆' => '⦆', - '。' => '。', - '「' => '「', - '」' => '」', - '、' => '、', - '・' => '・', - 'ヲ' => 'ヲ', - 'ァ' => 'ァ', - 'ィ' => 'ィ', - 'ゥ' => 'ゥ', - 'ェ' => 'ェ', - 'ォ' => 'ォ', - 'ャ' => 'ャ', - 'ュ' => 'ュ', - 'ョ' => 'ョ', - 'ッ' => 'ッ', - 'ー' => 'ー', - 'ア' => 'ア', - 'イ' => 'イ', - 'ウ' => 'ウ', - 'エ' => 'エ', - 'オ' => 'オ', - 'カ' => 'カ', - 'キ' => 'キ', - 'ク' => 'ク', - 'ケ' => 'ケ', - 'コ' => 'コ', - 'サ' => 'サ', - 'シ' => 'シ', - 'ス' => 'ス', - 'セ' => 'セ', - 'ソ' => 'ソ', - 'タ' => 'タ', - 'チ' => 'チ', - 'ツ' => 'ツ', - 'テ' => 'テ', - 'ト' => 'ト', - 'ナ' => 'ナ', - 'ニ' => 'ニ', - 'ヌ' => 'ヌ', - 'ネ' => 'ネ', - 'ノ' => 'ノ', - 'ハ' => 'ハ', - 'ヒ' => 'ヒ', - 'フ' => 'フ', - 'ヘ' => 'ヘ', - 'ホ' => 'ホ', - 'マ' => 'マ', - 'ミ' => 'ミ', - 'ム' => 'ム', - 'メ' => 'メ', - 'モ' => 'モ', - 'ヤ' => 'ヤ', - 'ユ' => 'ユ', - 'ヨ' => 'ヨ', - 'ラ' => 'ラ', - 'リ' => 'リ', - 'ル' => 'ル', - 'レ' => 'レ', - 'ロ' => 'ロ', - 'ワ' => 'ワ', - 'ン' => 'ン', - '゙' => '゙', - '゚' => '゚', - 'ᅠ' => 'ᅠ', - 'ᄀ' => 'ᄀ', - 'ᄁ' => 'ᄁ', - 'ᆪ' => 'ᆪ', - 'ᄂ' => 'ᄂ', - 'ᆬ' => 'ᆬ', - 'ᆭ' => 'ᆭ', - 'ᄃ' => 'ᄃ', - 'ᄄ' => 'ᄄ', - 'ᄅ' => 'ᄅ', - 'ᆰ' => 'ᆰ', - 'ᆱ' => 'ᆱ', - 'ᆲ' => 'ᆲ', - 'ᆳ' => 'ᆳ', - 'ᆴ' => 'ᆴ', - 'ᆵ' => 'ᆵ', - 'ᄚ' => 'ᄚ', - 'ᄆ' => 'ᄆ', - 'ᄇ' => 'ᄇ', - 'ᄈ' => 'ᄈ', - 'ᄡ' => 'ᄡ', - 'ᄉ' => 'ᄉ', - 'ᄊ' => 'ᄊ', - 'ᄋ' => 'ᄋ', - 'ᄌ' => 'ᄌ', - 'ᄍ' => 'ᄍ', - 'ᄎ' => 'ᄎ', - 'ᄏ' => 'ᄏ', - 'ᄐ' => 'ᄐ', - 'ᄑ' => 'ᄑ', - 'ᄒ' => 'ᄒ', - 'ᅡ' => 'ᅡ', - 'ᅢ' => 'ᅢ', - 'ᅣ' => 'ᅣ', - 'ᅤ' => 'ᅤ', - 'ᅥ' => 'ᅥ', - 'ᅦ' => 'ᅦ', - 'ᅧ' => 'ᅧ', - 'ᅨ' => 'ᅨ', - 'ᅩ' => 'ᅩ', - 'ᅪ' => 'ᅪ', - 'ᅫ' => 'ᅫ', - 'ᅬ' => 'ᅬ', - 'ᅭ' => 'ᅭ', - 'ᅮ' => 'ᅮ', - 'ᅯ' => 'ᅯ', - 'ᅰ' => 'ᅰ', - 'ᅱ' => 'ᅱ', - 'ᅲ' => 'ᅲ', - 'ᅳ' => 'ᅳ', - 'ᅴ' => 'ᅴ', - 'ᅵ' => 'ᅵ', - '¢' => '¢', - '£' => '£', - '¬' => '¬', - ' ̄' => ' ̄', - '¦' => '¦', - '¥' => '¥', - '₩' => '₩', - '│' => '│', - '←' => '←', - '↑' => '↑', - '→' => '→', - '↓' => '↓', - '■' => '■', - '○' => '○', - '𝐀' => 'A', - '𝐁' => 'B', - '𝐂' => 'C', - '𝐃' => 'D', - '𝐄' => 'E', - '𝐅' => 'F', - '𝐆' => 'G', - '𝐇' => 'H', - '𝐈' => 'I', - '𝐉' => 'J', - '𝐊' => 'K', - '𝐋' => 'L', - '𝐌' => 'M', - '𝐍' => 'N', - '𝐎' => 'O', - '𝐏' => 'P', - '𝐐' => 'Q', - '𝐑' => 'R', - '𝐒' => 'S', - '𝐓' => 'T', - '𝐔' => 'U', - '𝐕' => 'V', - '𝐖' => 'W', - '𝐗' => 'X', - '𝐘' => 'Y', - '𝐙' => 'Z', - '𝐚' => 'a', - '𝐛' => 'b', - '𝐜' => 'c', - '𝐝' => 'd', - '𝐞' => 'e', - '𝐟' => 'f', - '𝐠' => 'g', - '𝐡' => 'h', - '𝐢' => 'i', - '𝐣' => 'j', - '𝐤' => 'k', - '𝐥' => 'l', - '𝐦' => 'm', - '𝐧' => 'n', - '𝐨' => 'o', - '𝐩' => 'p', - '𝐪' => 'q', - '𝐫' => 'r', - '𝐬' => 's', - '𝐭' => 't', - '𝐮' => 'u', - '𝐯' => 'v', - '𝐰' => 'w', - '𝐱' => 'x', - '𝐲' => 'y', - '𝐳' => 'z', - '𝐴' => 'A', - '𝐵' => 'B', - '𝐶' => 'C', - '𝐷' => 'D', - '𝐸' => 'E', - '𝐹' => 'F', - '𝐺' => 'G', - '𝐻' => 'H', - '𝐼' => 'I', - '𝐽' => 'J', - '𝐾' => 'K', - '𝐿' => 'L', - '𝑀' => 'M', - '𝑁' => 'N', - '𝑂' => 'O', - '𝑃' => 'P', - '𝑄' => 'Q', - '𝑅' => 'R', - '𝑆' => 'S', - '𝑇' => 'T', - '𝑈' => 'U', - '𝑉' => 'V', - '𝑊' => 'W', - '𝑋' => 'X', - '𝑌' => 'Y', - '𝑍' => 'Z', - '𝑎' => 'a', - '𝑏' => 'b', - '𝑐' => 'c', - '𝑑' => 'd', - '𝑒' => 'e', - '𝑓' => 'f', - '𝑔' => 'g', - '𝑖' => 'i', - '𝑗' => 'j', - '𝑘' => 'k', - '𝑙' => 'l', - '𝑚' => 'm', - '𝑛' => 'n', - '𝑜' => 'o', - '𝑝' => 'p', - '𝑞' => 'q', - '𝑟' => 'r', - '𝑠' => 's', - '𝑡' => 't', - '𝑢' => 'u', - '𝑣' => 'v', - '𝑤' => 'w', - '𝑥' => 'x', - '𝑦' => 'y', - '𝑧' => 'z', - '𝑨' => 'A', - '𝑩' => 'B', - '𝑪' => 'C', - '𝑫' => 'D', - '𝑬' => 'E', - '𝑭' => 'F', - '𝑮' => 'G', - '𝑯' => 'H', - '𝑰' => 'I', - '𝑱' => 'J', - '𝑲' => 'K', - '𝑳' => 'L', - '𝑴' => 'M', - '𝑵' => 'N', - '𝑶' => 'O', - '𝑷' => 'P', - '𝑸' => 'Q', - '𝑹' => 'R', - '𝑺' => 'S', - '𝑻' => 'T', - '𝑼' => 'U', - '𝑽' => 'V', - '𝑾' => 'W', - '𝑿' => 'X', - '𝒀' => 'Y', - '𝒁' => 'Z', - '𝒂' => 'a', - '𝒃' => 'b', - '𝒄' => 'c', - '𝒅' => 'd', - '𝒆' => 'e', - '𝒇' => 'f', - '𝒈' => 'g', - '𝒉' => 'h', - '𝒊' => 'i', - '𝒋' => 'j', - '𝒌' => 'k', - '𝒍' => 'l', - '𝒎' => 'm', - '𝒏' => 'n', - '𝒐' => 'o', - '𝒑' => 'p', - '𝒒' => 'q', - '𝒓' => 'r', - '𝒔' => 's', - '𝒕' => 't', - '𝒖' => 'u', - '𝒗' => 'v', - '𝒘' => 'w', - '𝒙' => 'x', - '𝒚' => 'y', - '𝒛' => 'z', - '𝒜' => 'A', - '𝒞' => 'C', - '𝒟' => 'D', - '𝒢' => 'G', - '𝒥' => 'J', - '𝒦' => 'K', - '𝒩' => 'N', - '𝒪' => 'O', - '𝒫' => 'P', - '𝒬' => 'Q', - '𝒮' => 'S', - '𝒯' => 'T', - '𝒰' => 'U', - '𝒱' => 'V', - '𝒲' => 'W', - '𝒳' => 'X', - '𝒴' => 'Y', - '𝒵' => 'Z', - '𝒶' => 'a', - '𝒷' => 'b', - '𝒸' => 'c', - '𝒹' => 'd', - '𝒻' => 'f', - '𝒽' => 'h', - '𝒾' => 'i', - '𝒿' => 'j', - '𝓀' => 'k', - '𝓁' => 'l', - '𝓂' => 'm', - '𝓃' => 'n', - '𝓅' => 'p', - '𝓆' => 'q', - '𝓇' => 'r', - '𝓈' => 's', - '𝓉' => 't', - '𝓊' => 'u', - '𝓋' => 'v', - '𝓌' => 'w', - '𝓍' => 'x', - '𝓎' => 'y', - '𝓏' => 'z', - '𝓐' => 'A', - '𝓑' => 'B', - '𝓒' => 'C', - '𝓓' => 'D', - '𝓔' => 'E', - '𝓕' => 'F', - '𝓖' => 'G', - '𝓗' => 'H', - '𝓘' => 'I', - '𝓙' => 'J', - '𝓚' => 'K', - '𝓛' => 'L', - '𝓜' => 'M', - '𝓝' => 'N', - '𝓞' => 'O', - '𝓟' => 'P', - '𝓠' => 'Q', - '𝓡' => 'R', - '𝓢' => 'S', - '𝓣' => 'T', - '𝓤' => 'U', - '𝓥' => 'V', - '𝓦' => 'W', - '𝓧' => 'X', - '𝓨' => 'Y', - '𝓩' => 'Z', - '𝓪' => 'a', - '𝓫' => 'b', - '𝓬' => 'c', - '𝓭' => 'd', - '𝓮' => 'e', - '𝓯' => 'f', - '𝓰' => 'g', - '𝓱' => 'h', - '𝓲' => 'i', - '𝓳' => 'j', - '𝓴' => 'k', - '𝓵' => 'l', - '𝓶' => 'm', - '𝓷' => 'n', - '𝓸' => 'o', - '𝓹' => 'p', - '𝓺' => 'q', - '𝓻' => 'r', - '𝓼' => 's', - '𝓽' => 't', - '𝓾' => 'u', - '𝓿' => 'v', - '𝔀' => 'w', - '𝔁' => 'x', - '𝔂' => 'y', - '𝔃' => 'z', - '𝔄' => 'A', - '𝔅' => 'B', - '𝔇' => 'D', - '𝔈' => 'E', - '𝔉' => 'F', - '𝔊' => 'G', - '𝔍' => 'J', - '𝔎' => 'K', - '𝔏' => 'L', - '𝔐' => 'M', - '𝔑' => 'N', - '𝔒' => 'O', - '𝔓' => 'P', - '𝔔' => 'Q', - '𝔖' => 'S', - '𝔗' => 'T', - '𝔘' => 'U', - '𝔙' => 'V', - '𝔚' => 'W', - '𝔛' => 'X', - '𝔜' => 'Y', - '𝔞' => 'a', - '𝔟' => 'b', - '𝔠' => 'c', - '𝔡' => 'd', - '𝔢' => 'e', - '𝔣' => 'f', - '𝔤' => 'g', - '𝔥' => 'h', - '𝔦' => 'i', - '𝔧' => 'j', - '𝔨' => 'k', - '𝔩' => 'l', - '𝔪' => 'm', - '𝔫' => 'n', - '𝔬' => 'o', - '𝔭' => 'p', - '𝔮' => 'q', - '𝔯' => 'r', - '𝔰' => 's', - '𝔱' => 't', - '𝔲' => 'u', - '𝔳' => 'v', - '𝔴' => 'w', - '𝔵' => 'x', - '𝔶' => 'y', - '𝔷' => 'z', - '𝔸' => 'A', - '𝔹' => 'B', - '𝔻' => 'D', - '𝔼' => 'E', - '𝔽' => 'F', - '𝔾' => 'G', - '𝕀' => 'I', - '𝕁' => 'J', - '𝕂' => 'K', - '𝕃' => 'L', - '𝕄' => 'M', - '𝕆' => 'O', - '𝕊' => 'S', - '𝕋' => 'T', - '𝕌' => 'U', - '𝕍' => 'V', - '𝕎' => 'W', - '𝕏' => 'X', - '𝕐' => 'Y', - '𝕒' => 'a', - '𝕓' => 'b', - '𝕔' => 'c', - '𝕕' => 'd', - '𝕖' => 'e', - '𝕗' => 'f', - '𝕘' => 'g', - '𝕙' => 'h', - '𝕚' => 'i', - '𝕛' => 'j', - '𝕜' => 'k', - '𝕝' => 'l', - '𝕞' => 'm', - '𝕟' => 'n', - '𝕠' => 'o', - '𝕡' => 'p', - '𝕢' => 'q', - '𝕣' => 'r', - '𝕤' => 's', - '𝕥' => 't', - '𝕦' => 'u', - '𝕧' => 'v', - '𝕨' => 'w', - '𝕩' => 'x', - '𝕪' => 'y', - '𝕫' => 'z', - '𝕬' => 'A', - '𝕭' => 'B', - '𝕮' => 'C', - '𝕯' => 'D', - '𝕰' => 'E', - '𝕱' => 'F', - '𝕲' => 'G', - '𝕳' => 'H', - '𝕴' => 'I', - '𝕵' => 'J', - '𝕶' => 'K', - '𝕷' => 'L', - '𝕸' => 'M', - '𝕹' => 'N', - '𝕺' => 'O', - '𝕻' => 'P', - '𝕼' => 'Q', - '𝕽' => 'R', - '𝕾' => 'S', - '𝕿' => 'T', - '𝖀' => 'U', - '𝖁' => 'V', - '𝖂' => 'W', - '𝖃' => 'X', - '𝖄' => 'Y', - '𝖅' => 'Z', - '𝖆' => 'a', - '𝖇' => 'b', - '𝖈' => 'c', - '𝖉' => 'd', - '𝖊' => 'e', - '𝖋' => 'f', - '𝖌' => 'g', - '𝖍' => 'h', - '𝖎' => 'i', - '𝖏' => 'j', - '𝖐' => 'k', - '𝖑' => 'l', - '𝖒' => 'm', - '𝖓' => 'n', - '𝖔' => 'o', - '𝖕' => 'p', - '𝖖' => 'q', - '𝖗' => 'r', - '𝖘' => 's', - '𝖙' => 't', - '𝖚' => 'u', - '𝖛' => 'v', - '𝖜' => 'w', - '𝖝' => 'x', - '𝖞' => 'y', - '𝖟' => 'z', - '𝖠' => 'A', - '𝖡' => 'B', - '𝖢' => 'C', - '𝖣' => 'D', - '𝖤' => 'E', - '𝖥' => 'F', - '𝖦' => 'G', - '𝖧' => 'H', - '𝖨' => 'I', - '𝖩' => 'J', - '𝖪' => 'K', - '𝖫' => 'L', - '𝖬' => 'M', - '𝖭' => 'N', - '𝖮' => 'O', - '𝖯' => 'P', - '𝖰' => 'Q', - '𝖱' => 'R', - '𝖲' => 'S', - '𝖳' => 'T', - '𝖴' => 'U', - '𝖵' => 'V', - '𝖶' => 'W', - '𝖷' => 'X', - '𝖸' => 'Y', - '𝖹' => 'Z', - '𝖺' => 'a', - '𝖻' => 'b', - '𝖼' => 'c', - '𝖽' => 'd', - '𝖾' => 'e', - '𝖿' => 'f', - '𝗀' => 'g', - '𝗁' => 'h', - '𝗂' => 'i', - '𝗃' => 'j', - '𝗄' => 'k', - '𝗅' => 'l', - '𝗆' => 'm', - '𝗇' => 'n', - '𝗈' => 'o', - '𝗉' => 'p', - '𝗊' => 'q', - '𝗋' => 'r', - '𝗌' => 's', - '𝗍' => 't', - '𝗎' => 'u', - '𝗏' => 'v', - '𝗐' => 'w', - '𝗑' => 'x', - '𝗒' => 'y', - '𝗓' => 'z', - '𝗔' => 'A', - '𝗕' => 'B', - '𝗖' => 'C', - '𝗗' => 'D', - '𝗘' => 'E', - '𝗙' => 'F', - '𝗚' => 'G', - '𝗛' => 'H', - '𝗜' => 'I', - '𝗝' => 'J', - '𝗞' => 'K', - '𝗟' => 'L', - '𝗠' => 'M', - '𝗡' => 'N', - '𝗢' => 'O', - '𝗣' => 'P', - '𝗤' => 'Q', - '𝗥' => 'R', - '𝗦' => 'S', - '𝗧' => 'T', - '𝗨' => 'U', - '𝗩' => 'V', - '𝗪' => 'W', - '𝗫' => 'X', - '𝗬' => 'Y', - '𝗭' => 'Z', - '𝗮' => 'a', - '𝗯' => 'b', - '𝗰' => 'c', - '𝗱' => 'd', - '𝗲' => 'e', - '𝗳' => 'f', - '𝗴' => 'g', - '𝗵' => 'h', - '𝗶' => 'i', - '𝗷' => 'j', - '𝗸' => 'k', - '𝗹' => 'l', - '𝗺' => 'm', - '𝗻' => 'n', - '𝗼' => 'o', - '𝗽' => 'p', - '𝗾' => 'q', - '𝗿' => 'r', - '𝘀' => 's', - '𝘁' => 't', - '𝘂' => 'u', - '𝘃' => 'v', - '𝘄' => 'w', - '𝘅' => 'x', - '𝘆' => 'y', - '𝘇' => 'z', - '𝘈' => 'A', - '𝘉' => 'B', - '𝘊' => 'C', - '𝘋' => 'D', - '𝘌' => 'E', - '𝘍' => 'F', - '𝘎' => 'G', - '𝘏' => 'H', - '𝘐' => 'I', - '𝘑' => 'J', - '𝘒' => 'K', - '𝘓' => 'L', - '𝘔' => 'M', - '𝘕' => 'N', - '𝘖' => 'O', - '𝘗' => 'P', - '𝘘' => 'Q', - '𝘙' => 'R', - '𝘚' => 'S', - '𝘛' => 'T', - '𝘜' => 'U', - '𝘝' => 'V', - '𝘞' => 'W', - '𝘟' => 'X', - '𝘠' => 'Y', - '𝘡' => 'Z', - '𝘢' => 'a', - '𝘣' => 'b', - '𝘤' => 'c', - '𝘥' => 'd', - '𝘦' => 'e', - '𝘧' => 'f', - '𝘨' => 'g', - '𝘩' => 'h', - '𝘪' => 'i', - '𝘫' => 'j', - '𝘬' => 'k', - '𝘭' => 'l', - '𝘮' => 'm', - '𝘯' => 'n', - '𝘰' => 'o', - '𝘱' => 'p', - '𝘲' => 'q', - '𝘳' => 'r', - '𝘴' => 's', - '𝘵' => 't', - '𝘶' => 'u', - '𝘷' => 'v', - '𝘸' => 'w', - '𝘹' => 'x', - '𝘺' => 'y', - '𝘻' => 'z', - '𝘼' => 'A', - '𝘽' => 'B', - '𝘾' => 'C', - '𝘿' => 'D', - '𝙀' => 'E', - '𝙁' => 'F', - '𝙂' => 'G', - '𝙃' => 'H', - '𝙄' => 'I', - '𝙅' => 'J', - '𝙆' => 'K', - '𝙇' => 'L', - '𝙈' => 'M', - '𝙉' => 'N', - '𝙊' => 'O', - '𝙋' => 'P', - '𝙌' => 'Q', - '𝙍' => 'R', - '𝙎' => 'S', - '𝙏' => 'T', - '𝙐' => 'U', - '𝙑' => 'V', - '𝙒' => 'W', - '𝙓' => 'X', - '𝙔' => 'Y', - '𝙕' => 'Z', - '𝙖' => 'a', - '𝙗' => 'b', - '𝙘' => 'c', - '𝙙' => 'd', - '𝙚' => 'e', - '𝙛' => 'f', - '𝙜' => 'g', - '𝙝' => 'h', - '𝙞' => 'i', - '𝙟' => 'j', - '𝙠' => 'k', - '𝙡' => 'l', - '𝙢' => 'm', - '𝙣' => 'n', - '𝙤' => 'o', - '𝙥' => 'p', - '𝙦' => 'q', - '𝙧' => 'r', - '𝙨' => 's', - '𝙩' => 't', - '𝙪' => 'u', - '𝙫' => 'v', - '𝙬' => 'w', - '𝙭' => 'x', - '𝙮' => 'y', - '𝙯' => 'z', - '𝙰' => 'A', - '𝙱' => 'B', - '𝙲' => 'C', - '𝙳' => 'D', - '𝙴' => 'E', - '𝙵' => 'F', - '𝙶' => 'G', - '𝙷' => 'H', - '𝙸' => 'I', - '𝙹' => 'J', - '𝙺' => 'K', - '𝙻' => 'L', - '𝙼' => 'M', - '𝙽' => 'N', - '𝙾' => 'O', - '𝙿' => 'P', - '𝚀' => 'Q', - '𝚁' => 'R', - '𝚂' => 'S', - '𝚃' => 'T', - '𝚄' => 'U', - '𝚅' => 'V', - '𝚆' => 'W', - '𝚇' => 'X', - '𝚈' => 'Y', - '𝚉' => 'Z', - '𝚊' => 'a', - '𝚋' => 'b', - '𝚌' => 'c', - '𝚍' => 'd', - '𝚎' => 'e', - '𝚏' => 'f', - '𝚐' => 'g', - '𝚑' => 'h', - '𝚒' => 'i', - '𝚓' => 'j', - '𝚔' => 'k', - '𝚕' => 'l', - '𝚖' => 'm', - '𝚗' => 'n', - '𝚘' => 'o', - '𝚙' => 'p', - '𝚚' => 'q', - '𝚛' => 'r', - '𝚜' => 's', - '𝚝' => 't', - '𝚞' => 'u', - '𝚟' => 'v', - '𝚠' => 'w', - '𝚡' => 'x', - '𝚢' => 'y', - '𝚣' => 'z', - '𝚤' => 'ı', - '𝚥' => 'ȷ', - '𝚨' => 'Α', - '𝚩' => 'Β', - '𝚪' => 'Γ', - '𝚫' => 'Δ', - '𝚬' => 'Ε', - '𝚭' => 'Ζ', - '𝚮' => 'Η', - '𝚯' => 'Θ', - '𝚰' => 'Ι', - '𝚱' => 'Κ', - '𝚲' => 'Λ', - '𝚳' => 'Μ', - '𝚴' => 'Ν', - '𝚵' => 'Ξ', - '𝚶' => 'Ο', - '𝚷' => 'Π', - '𝚸' => 'Ρ', - '𝚹' => 'Θ', - '𝚺' => 'Σ', - '𝚻' => 'Τ', - '𝚼' => 'Υ', - '𝚽' => 'Φ', - '𝚾' => 'Χ', - '𝚿' => 'Ψ', - '𝛀' => 'Ω', - '𝛁' => '∇', - '𝛂' => 'α', - '𝛃' => 'β', - '𝛄' => 'γ', - '𝛅' => 'δ', - '𝛆' => 'ε', - '𝛇' => 'ζ', - '𝛈' => 'η', - '𝛉' => 'θ', - '𝛊' => 'ι', - '𝛋' => 'κ', - '𝛌' => 'λ', - '𝛍' => 'μ', - '𝛎' => 'ν', - '𝛏' => 'ξ', - '𝛐' => 'ο', - '𝛑' => 'π', - '𝛒' => 'ρ', - '𝛓' => 'ς', - '𝛔' => 'σ', - '𝛕' => 'τ', - '𝛖' => 'υ', - '𝛗' => 'φ', - '𝛘' => 'χ', - '𝛙' => 'ψ', - '𝛚' => 'ω', - '𝛛' => '∂', - '𝛜' => 'ε', - '𝛝' => 'θ', - '𝛞' => 'κ', - '𝛟' => 'φ', - '𝛠' => 'ρ', - '𝛡' => 'π', - '𝛢' => 'Α', - '𝛣' => 'Β', - '𝛤' => 'Γ', - '𝛥' => 'Δ', - '𝛦' => 'Ε', - '𝛧' => 'Ζ', - '𝛨' => 'Η', - '𝛩' => 'Θ', - '𝛪' => 'Ι', - '𝛫' => 'Κ', - '𝛬' => 'Λ', - '𝛭' => 'Μ', - '𝛮' => 'Ν', - '𝛯' => 'Ξ', - '𝛰' => 'Ο', - '𝛱' => 'Π', - '𝛲' => 'Ρ', - '𝛳' => 'Θ', - '𝛴' => 'Σ', - '𝛵' => 'Τ', - '𝛶' => 'Υ', - '𝛷' => 'Φ', - '𝛸' => 'Χ', - '𝛹' => 'Ψ', - '𝛺' => 'Ω', - '𝛻' => '∇', - '𝛼' => 'α', - '𝛽' => 'β', - '𝛾' => 'γ', - '𝛿' => 'δ', - '𝜀' => 'ε', - '𝜁' => 'ζ', - '𝜂' => 'η', - '𝜃' => 'θ', - '𝜄' => 'ι', - '𝜅' => 'κ', - '𝜆' => 'λ', - '𝜇' => 'μ', - '𝜈' => 'ν', - '𝜉' => 'ξ', - '𝜊' => 'ο', - '𝜋' => 'π', - '𝜌' => 'ρ', - '𝜍' => 'ς', - '𝜎' => 'σ', - '𝜏' => 'τ', - '𝜐' => 'υ', - '𝜑' => 'φ', - '𝜒' => 'χ', - '𝜓' => 'ψ', - '𝜔' => 'ω', - '𝜕' => '∂', - '𝜖' => 'ε', - '𝜗' => 'θ', - '𝜘' => 'κ', - '𝜙' => 'φ', - '𝜚' => 'ρ', - '𝜛' => 'π', - '𝜜' => 'Α', - '𝜝' => 'Β', - '𝜞' => 'Γ', - '𝜟' => 'Δ', - '𝜠' => 'Ε', - '𝜡' => 'Ζ', - '𝜢' => 'Η', - '𝜣' => 'Θ', - '𝜤' => 'Ι', - '𝜥' => 'Κ', - '𝜦' => 'Λ', - '𝜧' => 'Μ', - '𝜨' => 'Ν', - '𝜩' => 'Ξ', - '𝜪' => 'Ο', - '𝜫' => 'Π', - '𝜬' => 'Ρ', - '𝜭' => 'Θ', - '𝜮' => 'Σ', - '𝜯' => 'Τ', - '𝜰' => 'Υ', - '𝜱' => 'Φ', - '𝜲' => 'Χ', - '𝜳' => 'Ψ', - '𝜴' => 'Ω', - '𝜵' => '∇', - '𝜶' => 'α', - '𝜷' => 'β', - '𝜸' => 'γ', - '𝜹' => 'δ', - '𝜺' => 'ε', - '𝜻' => 'ζ', - '𝜼' => 'η', - '𝜽' => 'θ', - '𝜾' => 'ι', - '𝜿' => 'κ', - '𝝀' => 'λ', - '𝝁' => 'μ', - '𝝂' => 'ν', - '𝝃' => 'ξ', - '𝝄' => 'ο', - '𝝅' => 'π', - '𝝆' => 'ρ', - '𝝇' => 'ς', - '𝝈' => 'σ', - '𝝉' => 'τ', - '𝝊' => 'υ', - '𝝋' => 'φ', - '𝝌' => 'χ', - '𝝍' => 'ψ', - '𝝎' => 'ω', - '𝝏' => '∂', - '𝝐' => 'ε', - '𝝑' => 'θ', - '𝝒' => 'κ', - '𝝓' => 'φ', - '𝝔' => 'ρ', - '𝝕' => 'π', - '𝝖' => 'Α', - '𝝗' => 'Β', - '𝝘' => 'Γ', - '𝝙' => 'Δ', - '𝝚' => 'Ε', - '𝝛' => 'Ζ', - '𝝜' => 'Η', - '𝝝' => 'Θ', - '𝝞' => 'Ι', - '𝝟' => 'Κ', - '𝝠' => 'Λ', - '𝝡' => 'Μ', - '𝝢' => 'Ν', - '𝝣' => 'Ξ', - '𝝤' => 'Ο', - '𝝥' => 'Π', - '𝝦' => 'Ρ', - '𝝧' => 'Θ', - '𝝨' => 'Σ', - '𝝩' => 'Τ', - '𝝪' => 'Υ', - '𝝫' => 'Φ', - '𝝬' => 'Χ', - '𝝭' => 'Ψ', - '𝝮' => 'Ω', - '𝝯' => '∇', - '𝝰' => 'α', - '𝝱' => 'β', - '𝝲' => 'γ', - '𝝳' => 'δ', - '𝝴' => 'ε', - '𝝵' => 'ζ', - '𝝶' => 'η', - '𝝷' => 'θ', - '𝝸' => 'ι', - '𝝹' => 'κ', - '𝝺' => 'λ', - '𝝻' => 'μ', - '𝝼' => 'ν', - '𝝽' => 'ξ', - '𝝾' => 'ο', - '𝝿' => 'π', - '𝞀' => 'ρ', - '𝞁' => 'ς', - '𝞂' => 'σ', - '𝞃' => 'τ', - '𝞄' => 'υ', - '𝞅' => 'φ', - '𝞆' => 'χ', - '𝞇' => 'ψ', - '𝞈' => 'ω', - '𝞉' => '∂', - '𝞊' => 'ε', - '𝞋' => 'θ', - '𝞌' => 'κ', - '𝞍' => 'φ', - '𝞎' => 'ρ', - '𝞏' => 'π', - '𝞐' => 'Α', - '𝞑' => 'Β', - '𝞒' => 'Γ', - '𝞓' => 'Δ', - '𝞔' => 'Ε', - '𝞕' => 'Ζ', - '𝞖' => 'Η', - '𝞗' => 'Θ', - '𝞘' => 'Ι', - '𝞙' => 'Κ', - '𝞚' => 'Λ', - '𝞛' => 'Μ', - '𝞜' => 'Ν', - '𝞝' => 'Ξ', - '𝞞' => 'Ο', - '𝞟' => 'Π', - '𝞠' => 'Ρ', - '𝞡' => 'Θ', - '𝞢' => 'Σ', - '𝞣' => 'Τ', - '𝞤' => 'Υ', - '𝞥' => 'Φ', - '𝞦' => 'Χ', - '𝞧' => 'Ψ', - '𝞨' => 'Ω', - '𝞩' => '∇', - '𝞪' => 'α', - '𝞫' => 'β', - '𝞬' => 'γ', - '𝞭' => 'δ', - '𝞮' => 'ε', - '𝞯' => 'ζ', - '𝞰' => 'η', - '𝞱' => 'θ', - '𝞲' => 'ι', - '𝞳' => 'κ', - '𝞴' => 'λ', - '𝞵' => 'μ', - '𝞶' => 'ν', - '𝞷' => 'ξ', - '𝞸' => 'ο', - '𝞹' => 'π', - '𝞺' => 'ρ', - '𝞻' => 'ς', - '𝞼' => 'σ', - '𝞽' => 'τ', - '𝞾' => 'υ', - '𝞿' => 'φ', - '𝟀' => 'χ', - '𝟁' => 'ψ', - '𝟂' => 'ω', - '𝟃' => '∂', - '𝟄' => 'ε', - '𝟅' => 'θ', - '𝟆' => 'κ', - '𝟇' => 'φ', - '𝟈' => 'ρ', - '𝟉' => 'π', - '𝟊' => 'Ϝ', - '𝟋' => 'ϝ', - '𝟎' => '0', - '𝟏' => '1', - '𝟐' => '2', - '𝟑' => '3', - '𝟒' => '4', - '𝟓' => '5', - '𝟔' => '6', - '𝟕' => '7', - '𝟖' => '8', - '𝟗' => '9', - '𝟘' => '0', - '𝟙' => '1', - '𝟚' => '2', - '𝟛' => '3', - '𝟜' => '4', - '𝟝' => '5', - '𝟞' => '6', - '𝟟' => '7', - '𝟠' => '8', - '𝟡' => '9', - '𝟢' => '0', - '𝟣' => '1', - '𝟤' => '2', - '𝟥' => '3', - '𝟦' => '4', - '𝟧' => '5', - '𝟨' => '6', - '𝟩' => '7', - '𝟪' => '8', - '𝟫' => '9', - '𝟬' => '0', - '𝟭' => '1', - '𝟮' => '2', - '𝟯' => '3', - '𝟰' => '4', - '𝟱' => '5', - '𝟲' => '6', - '𝟳' => '7', - '𝟴' => '8', - '𝟵' => '9', - '𝟶' => '0', - '𝟷' => '1', - '𝟸' => '2', - '𝟹' => '3', - '𝟺' => '4', - '𝟻' => '5', - '𝟼' => '6', - '𝟽' => '7', - '𝟾' => '8', - '𝟿' => '9', - '𞸀' => 'ا', - '𞸁' => 'ب', - '𞸂' => 'ج', - '𞸃' => 'د', - '𞸅' => 'و', - '𞸆' => 'ز', - '𞸇' => 'ح', - '𞸈' => 'ط', - '𞸉' => 'ي', - '𞸊' => 'ك', - '𞸋' => 'ل', - '𞸌' => 'م', - '𞸍' => 'ن', - '𞸎' => 'س', - '𞸏' => 'ع', - '𞸐' => 'ف', - '𞸑' => 'ص', - '𞸒' => 'ق', - '𞸓' => 'ر', - '𞸔' => 'ش', - '𞸕' => 'ت', - '𞸖' => 'ث', - '𞸗' => 'خ', - '𞸘' => 'ذ', - '𞸙' => 'ض', - '𞸚' => 'ظ', - '𞸛' => 'غ', - '𞸜' => 'ٮ', - '𞸝' => 'ں', - '𞸞' => 'ڡ', - '𞸟' => 'ٯ', - '𞸡' => 'ب', - '𞸢' => 'ج', - '𞸤' => 'ه', - '𞸧' => 'ح', - '𞸩' => 'ي', - '𞸪' => 'ك', - '𞸫' => 'ل', - '𞸬' => 'م', - '𞸭' => 'ن', - '𞸮' => 'س', - '𞸯' => 'ع', - '𞸰' => 'ف', - '𞸱' => 'ص', - '𞸲' => 'ق', - '𞸴' => 'ش', - '𞸵' => 'ت', - '𞸶' => 'ث', - '𞸷' => 'خ', - '𞸹' => 'ض', - '𞸻' => 'غ', - '𞹂' => 'ج', - '𞹇' => 'ح', - '𞹉' => 'ي', - '𞹋' => 'ل', - '𞹍' => 'ن', - '𞹎' => 'س', - '𞹏' => 'ع', - '𞹑' => 'ص', - '𞹒' => 'ق', - '𞹔' => 'ش', - '𞹗' => 'خ', - '𞹙' => 'ض', - '𞹛' => 'غ', - '𞹝' => 'ں', - '𞹟' => 'ٯ', - '𞹡' => 'ب', - '𞹢' => 'ج', - '𞹤' => 'ه', - '𞹧' => 'ح', - '𞹨' => 'ط', - '𞹩' => 'ي', - '𞹪' => 'ك', - '𞹬' => 'م', - '𞹭' => 'ن', - '𞹮' => 'س', - '𞹯' => 'ع', - '𞹰' => 'ف', - '𞹱' => 'ص', - '𞹲' => 'ق', - '𞹴' => 'ش', - '𞹵' => 'ت', - '𞹶' => 'ث', - '𞹷' => 'خ', - '𞹹' => 'ض', - '𞹺' => 'ظ', - '𞹻' => 'غ', - '𞹼' => 'ٮ', - '𞹾' => 'ڡ', - '𞺀' => 'ا', - '𞺁' => 'ب', - '𞺂' => 'ج', - '𞺃' => 'د', - '𞺄' => 'ه', - '𞺅' => 'و', - '𞺆' => 'ز', - '𞺇' => 'ح', - '𞺈' => 'ط', - '𞺉' => 'ي', - '𞺋' => 'ل', - '𞺌' => 'م', - '𞺍' => 'ن', - '𞺎' => 'س', - '𞺏' => 'ع', - '𞺐' => 'ف', - '𞺑' => 'ص', - '𞺒' => 'ق', - '𞺓' => 'ر', - '𞺔' => 'ش', - '𞺕' => 'ت', - '𞺖' => 'ث', - '𞺗' => 'خ', - '𞺘' => 'ذ', - '𞺙' => 'ض', - '𞺚' => 'ظ', - '𞺛' => 'غ', - '𞺡' => 'ب', - '𞺢' => 'ج', - '𞺣' => 'د', - '𞺥' => 'و', - '𞺦' => 'ز', - '𞺧' => 'ح', - '𞺨' => 'ط', - '𞺩' => 'ي', - '𞺫' => 'ل', - '𞺬' => 'م', - '𞺭' => 'ن', - '𞺮' => 'س', - '𞺯' => 'ع', - '𞺰' => 'ف', - '𞺱' => 'ص', - '𞺲' => 'ق', - '𞺳' => 'ر', - '𞺴' => 'ش', - '𞺵' => 'ت', - '𞺶' => 'ث', - '𞺷' => 'خ', - '𞺸' => 'ذ', - '𞺹' => 'ض', - '𞺺' => 'ظ', - '𞺻' => 'غ', - '🄀' => '0.', - '🄁' => '0,', - '🄂' => '1,', - '🄃' => '2,', - '🄄' => '3,', - '🄅' => '4,', - '🄆' => '5,', - '🄇' => '6,', - '🄈' => '7,', - '🄉' => '8,', - '🄊' => '9,', - '🄐' => '(A)', - '🄑' => '(B)', - '🄒' => '(C)', - '🄓' => '(D)', - '🄔' => '(E)', - '🄕' => '(F)', - '🄖' => '(G)', - '🄗' => '(H)', - '🄘' => '(I)', - '🄙' => '(J)', - '🄚' => '(K)', - '🄛' => '(L)', - '🄜' => '(M)', - '🄝' => '(N)', - '🄞' => '(O)', - '🄟' => '(P)', - '🄠' => '(Q)', - '🄡' => '(R)', - '🄢' => '(S)', - '🄣' => '(T)', - '🄤' => '(U)', - '🄥' => '(V)', - '🄦' => '(W)', - '🄧' => '(X)', - '🄨' => '(Y)', - '🄩' => '(Z)', - '🄪' => '〔S〕', - '🄫' => 'C', - '🄬' => 'R', - '🄭' => 'CD', - '🄮' => 'WZ', - '🄰' => 'A', - '🄱' => 'B', - '🄲' => 'C', - '🄳' => 'D', - '🄴' => 'E', - '🄵' => 'F', - '🄶' => 'G', - '🄷' => 'H', - '🄸' => 'I', - '🄹' => 'J', - '🄺' => 'K', - '🄻' => 'L', - '🄼' => 'M', - '🄽' => 'N', - '🄾' => 'O', - '🄿' => 'P', - '🅀' => 'Q', - '🅁' => 'R', - '🅂' => 'S', - '🅃' => 'T', - '🅄' => 'U', - '🅅' => 'V', - '🅆' => 'W', - '🅇' => 'X', - '🅈' => 'Y', - '🅉' => 'Z', - '🅊' => 'HV', - '🅋' => 'MV', - '🅌' => 'SD', - '🅍' => 'SS', - '🅎' => 'PPV', - '🅏' => 'WC', - '🅪' => 'MC', - '🅫' => 'MD', - '🅬' => 'MR', - '🆐' => 'DJ', - '🈀' => 'ほか', - '🈁' => 'ココ', - '🈂' => 'サ', - '🈐' => '手', - '🈑' => '字', - '🈒' => '双', - '🈓' => 'デ', - '🈔' => '二', - '🈕' => '多', - '🈖' => '解', - '🈗' => '天', - '🈘' => '交', - '🈙' => '映', - '🈚' => '無', - '🈛' => '料', - '🈜' => '前', - '🈝' => '後', - '🈞' => '再', - '🈟' => '新', - '🈠' => '初', - '🈡' => '終', - '🈢' => '生', - '🈣' => '販', - '🈤' => '声', - '🈥' => '吹', - '🈦' => '演', - '🈧' => '投', - '🈨' => '捕', - '🈩' => '一', - '🈪' => '三', - '🈫' => '遊', - '🈬' => '左', - '🈭' => '中', - '🈮' => '右', - '🈯' => '指', - '🈰' => '走', - '🈱' => '打', - '🈲' => '禁', - '🈳' => '空', - '🈴' => '合', - '🈵' => '満', - '🈶' => '有', - '🈷' => '月', - '🈸' => '申', - '🈹' => '割', - '🈺' => '営', - '🈻' => '配', - '🉀' => '〔本〕', - '🉁' => '〔三〕', - '🉂' => '〔二〕', - '🉃' => '〔安〕', - '🉄' => '〔点〕', - '🉅' => '〔打〕', - '🉆' => '〔盗〕', - '🉇' => '〔勝〕', - '🉈' => '〔敗〕', - '🉐' => '得', - '🉑' => '可', - '🯰' => '0', - '🯱' => '1', - '🯲' => '2', - '🯳' => '3', - '🯴' => '4', - '🯵' => '5', - '🯶' => '6', - '🯷' => '7', - '🯸' => '8', - '🯹' => '9', -); diff --git a/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/vendor/symfony/polyfill-intl-normalizer/bootstrap.php deleted file mode 100644 index 3608e5c..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Normalizer as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } -} diff --git a/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php deleted file mode 100644 index e36d1a9..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Intl\Normalizer as p; - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } -} diff --git a/vendor/symfony/polyfill-intl-normalizer/composer.json b/vendor/symfony/polyfill-intl-normalizer/composer.json deleted file mode 100644 index 393edf7..0000000 --- a/vendor/symfony/polyfill-intl-normalizer/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "symfony/polyfill-intl-normalizer", - "type": "library", - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "suggest": { - "ext-intl": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/vendor/symfony/polyfill-mbstring/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php deleted file mode 100644 index b65c54a..0000000 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ /dev/null @@ -1,873 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Mbstring; - -/** - * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. - * - * Implemented: - * - mb_chr - Returns a specific character from its Unicode code point - * - mb_convert_encoding - Convert character encoding - * - mb_convert_variables - Convert character code in variable(s) - * - mb_decode_mimeheader - Decode string in MIME header field - * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED - * - mb_decode_numericentity - Decode HTML numeric string reference to character - * - mb_encode_numericentity - Encode character to HTML numeric string reference - * - mb_convert_case - Perform case folding on a string - * - mb_detect_encoding - Detect character encoding - * - mb_get_info - Get internal settings of mbstring - * - mb_http_input - Detect HTTP input character encoding - * - mb_http_output - Set/Get HTTP output character encoding - * - mb_internal_encoding - Set/Get internal character encoding - * - mb_list_encodings - Returns an array of all supported encodings - * - mb_ord - Returns the Unicode code point of a character - * - mb_output_handler - Callback function converts character encoding in output buffer - * - mb_scrub - Replaces ill-formed byte sequences with substitute characters - * - mb_strlen - Get string length - * - mb_strpos - Find position of first occurrence of string in a string - * - mb_strrpos - Find position of last occurrence of a string in a string - * - mb_str_split - Convert a string to an array - * - mb_strtolower - Make a string lowercase - * - mb_strtoupper - Make a string uppercase - * - mb_substitute_character - Set/Get substitution character - * - mb_substr - Get part of string - * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive - * - mb_stristr - Finds first occurrence of a string within another, case insensitive - * - mb_strrchr - Finds the last occurrence of a character in a string within another - * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive - * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive - * - mb_strstr - Finds first occurrence of a string within another - * - mb_strwidth - Return width of string - * - mb_substr_count - Count the number of substring occurrences - * - * Not implemented: - * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) - * - mb_ereg_* - Regular expression with multibyte support - * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable - * - mb_preferred_mime_name - Get MIME charset string - * - mb_regex_encoding - Returns current encoding for multibyte regex as string - * - mb_regex_set_options - Set/Get the default options for mbregex functions - * - mb_send_mail - Send encoded mail - * - mb_split - Split multibyte string using regular expression - * - mb_strcut - Get part of string - * - mb_strimwidth - Get truncated string with specified width - * - * @author Nicolas Grekas - * - * @internal - */ -final class Mbstring -{ - public const MB_CASE_FOLD = \PHP_INT_MAX; - - private const CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - private static $encodingList = ['ASCII', 'UTF-8']; - private static $language = 'neutral'; - private static $internalEncoding = 'UTF-8'; - - public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) - { - if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) { - $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); - } else { - $fromEncoding = self::getEncoding($fromEncoding); - } - - $toEncoding = self::getEncoding($toEncoding); - - if ('BASE64' === $fromEncoding) { - $s = base64_decode($s); - $fromEncoding = $toEncoding; - } - - if ('BASE64' === $toEncoding) { - return base64_encode($s); - } - - if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { - if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { - $fromEncoding = 'Windows-1252'; - } - if ('UTF-8' !== $fromEncoding) { - $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); - } - - return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); - } - - if ('HTML-ENTITIES' === $fromEncoding) { - $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); - $fromEncoding = 'UTF-8'; - } - - return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); - } - - public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) - { - $ok = true; - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { - if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { - $ok = false; - } - }); - - return $ok ? $fromEncoding : false; - } - - public static function mb_decode_mimeheader($s) - { - return \iconv_mime_decode($s, 2, self::$internalEncoding); - } - - public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) - { - trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); - } - - public static function mb_decode_numericentity($s, $convmap, $encoding = null) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return ''; // Instead of null (cf. mb_encode_numericentity). - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $cnt = floor(\count($convmap) / 4) * 4; - - for ($i = 0; $i < $cnt; $i += 4) { - // collector_decode_htmlnumericentity ignores $convmap[$i + 3] - $convmap[$i] += $convmap[$i + 2]; - $convmap[$i + 1] += $convmap[$i + 2]; - } - - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { - $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; - for ($i = 0; $i < $cnt; $i += 4) { - if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { - return self::mb_chr($c - $convmap[$i + 2]); - } - } - - return $m[0]; - }, $s); - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) - { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !is_scalar($encoding)) { - trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; // Instead of '' (cf. mb_decode_numericentity). - } - - if (null !== $is_hex && !is_scalar($is_hex)) { - trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $cnt = floor(\count($convmap) / 4) * 4; - $i = 0; - $len = \strlen($s); - $result = ''; - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - $c = self::mb_ord($uchr); - - for ($j = 0; $j < $cnt; $j += 4) { - if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { - $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; - $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; - continue 2; - } - } - $result .= $uchr; - } - - if (null === $encoding) { - return $result; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $result); - } - - public static function mb_convert_case($s, $mode, $encoding = null) - { - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - if (\MB_CASE_TITLE == $mode) { - static $titleRegexp = null; - if (null === $titleRegexp) { - $titleRegexp = self::getData('titleCaseRegexp'); - } - $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); - } else { - if (\MB_CASE_UPPER == $mode) { - static $upper = null; - if (null === $upper) { - $upper = self::getData('upperCase'); - } - $map = $upper; - } else { - if (self::MB_CASE_FOLD === $mode) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); - } - - static $lower = null; - if (null === $lower) { - $lower = self::getData('lowerCase'); - } - $map = $lower; - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($map[$uchr])) { - $uchr = $map[$uchr]; - $nlen = \strlen($uchr); - - if ($nlen == $ulen) { - $nlen = $i; - do { - $s[--$nlen] = $uchr[--$ulen]; - } while ($ulen); - } else { - $s = substr_replace($s, $uchr, $i - $ulen, $ulen); - $len += $nlen - $ulen; - $i += $nlen - $ulen; - } - } - } - } - - if (null === $encoding) { - return $s; - } - - return \iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_internal_encoding($encoding = null) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - $normalizedEncoding = self::getEncoding($encoding); - - if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { - self::$internalEncoding = $normalizedEncoding; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - public static function mb_language($lang = null) - { - if (null === $lang) { - return self::$language; - } - - switch ($normalizedLang = strtolower($lang)) { - case 'uni': - case 'neutral': - self::$language = $normalizedLang; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); - } - - public static function mb_list_encodings() - { - return ['UTF-8']; - } - - public static function mb_encoding_aliases($encoding) - { - switch (strtoupper($encoding)) { - case 'UTF8': - case 'UTF-8': - return ['utf8']; - } - - return false; - } - - public static function mb_check_encoding($var = null, $encoding = null) - { - if (null === $encoding) { - if (null === $var) { - return false; - } - $encoding = self::$internalEncoding; - } - - return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); - } - - public static function mb_detect_encoding($str, $encodingList = null, $strict = false) - { - if (null === $encodingList) { - $encodingList = self::$encodingList; - } else { - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - } - - foreach ($encodingList as $enc) { - switch ($enc) { - case 'ASCII': - if (!preg_match('/[\x80-\xFF]/', $str)) { - return $enc; - } - break; - - case 'UTF8': - case 'UTF-8': - if (preg_match('//u', $str)) { - return 'UTF-8'; - } - break; - - default: - if (0 === strncmp($enc, 'ISO-8859-', 9)) { - return $enc; - } - } - } - - return false; - } - - public static function mb_detect_order($encodingList = null) - { - if (null === $encodingList) { - return self::$encodingList; - } - - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - - foreach ($encodingList as $enc) { - switch ($enc) { - default: - if (strncmp($enc, 'ISO-8859-', 9)) { - return false; - } - // no break - case 'ASCII': - case 'UTF8': - case 'UTF-8': - } - } - - self::$encodingList = $encodingList; - - return true; - } - - public static function mb_strlen($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return \strlen($s); - } - - return @\iconv_strlen($s, $encoding); - } - - public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strpos($haystack, $needle, $offset); - } - - $needle = (string) $needle; - if ('' === $needle) { - if (80000 > \PHP_VERSION_ID) { - trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); - - return false; - } - - return 0; - } - - return \iconv_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strrpos($haystack, $needle, $offset); - } - - if ($offset != (int) $offset) { - $offset = 0; - } elseif ($offset = (int) $offset) { - if ($offset < 0) { - if (0 > $offset += self::mb_strlen($needle)) { - $haystack = self::mb_substr($haystack, 0, $offset, $encoding); - } - $offset = 0; - } else { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); - } - } - - $pos = '' !== $needle || 80000 > \PHP_VERSION_ID - ? \iconv_strrpos($haystack, $needle, $encoding) - : self::mb_strlen($haystack, $encoding); - - return false !== $pos ? $offset + $pos : false; - } - - public static function mb_str_split($string, $split_length = 1, $encoding = null) - { - if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); - - return null; - } - - if (1 > $split_length = (int) $split_length) { - if (80000 > \PHP_VERSION_ID) { - trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); - return false; - } - - throw new \ValueError('Argument #2 ($length) must be greater than 0'); - } - - if (null === $encoding) { - $encoding = mb_internal_encoding(); - } - - if ('UTF-8' === $encoding = self::getEncoding($encoding)) { - $rx = '/('; - while (65535 < $split_length) { - $rx .= '.{65535}'; - $split_length -= 65535; - } - $rx .= '.{'.$split_length.'})/us'; - - return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); - } - - $result = []; - $length = mb_strlen($string, $encoding); - - for ($i = 0; $i < $length; $i += $split_length) { - $result[] = mb_substr($string, $i, $split_length, $encoding); - } - - return $result; - } - - public static function mb_strtolower($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); - } - - public static function mb_strtoupper($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); - } - - public static function mb_substitute_character($c = null) - { - if (null === $c) { - return 'none'; - } - if (0 === strcasecmp($c, 'none')) { - return true; - } - if (80000 > \PHP_VERSION_ID) { - return false; - } - if (\is_int($c) || 'long' === $c || 'entity' === $c) { - return false; - } - - throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); - } - - public static function mb_substr($s, $start, $length = null, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return (string) substr($s, $start, null === $length ? 2147483647 : $length); - } - - if ($start < 0) { - $start = \iconv_strlen($s, $encoding) + $start; - if ($start < 0) { - $start = 0; - } - } - - if (null === $length) { - $length = 2147483647; - } elseif ($length < 0) { - $length = \iconv_strlen($s, $encoding) + $length - $start; - if ($length < 0) { - return ''; - } - } - - return (string) \iconv_substr($s, $start, $length, $encoding); - } - - public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) - { - $pos = self::mb_stripos($haystack, $needle, 0, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - $pos = strrpos($haystack, $needle); - } else { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = \iconv_strrpos($haystack, $needle, $encoding); - } - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = self::mb_strripos($haystack, $needle, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - - return self::mb_strrpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) - { - $pos = strpos($haystack, $needle); - if (false === $pos) { - return false; - } - if ($part) { - return substr($haystack, 0, $pos); - } - - return substr($haystack, $pos); - } - - public static function mb_get_info($type = 'all') - { - $info = [ - 'internal_encoding' => self::$internalEncoding, - 'http_output' => 'pass', - 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', - 'func_overload' => 0, - 'func_overload_list' => 'no overload', - 'mail_charset' => 'UTF-8', - 'mail_header_encoding' => 'BASE64', - 'mail_body_encoding' => 'BASE64', - 'illegal_chars' => 0, - 'encoding_translation' => 'Off', - 'language' => self::$language, - 'detect_order' => self::$encodingList, - 'substitute_character' => 'none', - 'strict_detection' => 'Off', - ]; - - if ('all' === $type) { - return $info; - } - if (isset($info[$type])) { - return $info[$type]; - } - - return false; - } - - public static function mb_http_input($type = '') - { - return false; - } - - public static function mb_http_output($encoding = null) - { - return null !== $encoding ? 'pass' === $encoding : 'pass'; - } - - public static function mb_strwidth($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - - if ('UTF-8' !== $encoding) { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); - - return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); - } - - public static function mb_substr_count($haystack, $needle, $encoding = null) - { - return substr_count($haystack, $needle); - } - - public static function mb_output_handler($contents, $status) - { - return $contents; - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } - - private static function getSubpart($pos, $part, $haystack, $encoding) - { - if (false === $pos) { - return false; - } - if ($part) { - return self::mb_substr($haystack, 0, $pos, $encoding); - } - - return self::mb_substr($haystack, $pos, null, $encoding); - } - - private static function html_encoding_callback(array $m) - { - $i = 1; - $entities = ''; - $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); - - while (isset($m[$i])) { - if (0x80 > $m[$i]) { - $entities .= \chr($m[$i++]); - continue; - } - if (0xF0 <= $m[$i]) { - $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } elseif (0xE0 <= $m[$i]) { - $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } else { - $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; - } - - $entities .= '&#'.$c.';'; - } - - return $entities; - } - - private static function title_case(array $s) - { - return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } - - private static function getEncoding($encoding) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - if ('UTF-8' === $encoding) { - return 'UTF-8'; - } - - $encoding = strtoupper($encoding); - - if ('8BIT' === $encoding || 'BINARY' === $encoding) { - return 'CP850'; - } - - if ('UTF8' === $encoding) { - return 'UTF-8'; - } - - return $encoding; - } -} diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md deleted file mode 100644 index 4efb599..0000000 --- a/vendor/symfony/polyfill-mbstring/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Symfony Polyfill / Mbstring -=========================== - -This component provides a partial, native PHP implementation for the -[Mbstring](https://php.net/mbstring) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php deleted file mode 100644 index fac60b0..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +++ /dev/null @@ -1,1397 +0,0 @@ - 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - 'À' => 'à', - 'Á' => 'á', - 'Â' => 'â', - 'Ã' => 'ã', - 'Ä' => 'ä', - 'Å' => 'å', - 'Æ' => 'æ', - 'Ç' => 'ç', - 'È' => 'è', - 'É' => 'é', - 'Ê' => 'ê', - 'Ë' => 'ë', - 'Ì' => 'ì', - 'Í' => 'í', - 'Î' => 'î', - 'Ï' => 'ï', - 'Ð' => 'ð', - 'Ñ' => 'ñ', - 'Ò' => 'ò', - 'Ó' => 'ó', - 'Ô' => 'ô', - 'Õ' => 'õ', - 'Ö' => 'ö', - 'Ø' => 'ø', - 'Ù' => 'ù', - 'Ú' => 'ú', - 'Û' => 'û', - 'Ü' => 'ü', - 'Ý' => 'ý', - 'Þ' => 'þ', - 'Ā' => 'ā', - 'Ă' => 'ă', - 'Ą' => 'ą', - 'Ć' => 'ć', - 'Ĉ' => 'ĉ', - 'Ċ' => 'ċ', - 'Č' => 'č', - 'Ď' => 'ď', - 'Đ' => 'đ', - 'Ē' => 'ē', - 'Ĕ' => 'ĕ', - 'Ė' => 'ė', - 'Ę' => 'ę', - 'Ě' => 'ě', - 'Ĝ' => 'ĝ', - 'Ğ' => 'ğ', - 'Ġ' => 'ġ', - 'Ģ' => 'ģ', - 'Ĥ' => 'ĥ', - 'Ħ' => 'ħ', - 'Ĩ' => 'ĩ', - 'Ī' => 'ī', - 'Ĭ' => 'ĭ', - 'Į' => 'į', - 'İ' => 'i̇', - 'IJ' => 'ij', - 'Ĵ' => 'ĵ', - 'Ķ' => 'ķ', - 'Ĺ' => 'ĺ', - 'Ļ' => 'ļ', - 'Ľ' => 'ľ', - 'Ŀ' => 'ŀ', - 'Ł' => 'ł', - 'Ń' => 'ń', - 'Ņ' => 'ņ', - 'Ň' => 'ň', - 'Ŋ' => 'ŋ', - 'Ō' => 'ō', - 'Ŏ' => 'ŏ', - 'Ő' => 'ő', - 'Œ' => 'œ', - 'Ŕ' => 'ŕ', - 'Ŗ' => 'ŗ', - 'Ř' => 'ř', - 'Ś' => 'ś', - 'Ŝ' => 'ŝ', - 'Ş' => 'ş', - 'Š' => 'š', - 'Ţ' => 'ţ', - 'Ť' => 'ť', - 'Ŧ' => 'ŧ', - 'Ũ' => 'ũ', - 'Ū' => 'ū', - 'Ŭ' => 'ŭ', - 'Ů' => 'ů', - 'Ű' => 'ű', - 'Ų' => 'ų', - 'Ŵ' => 'ŵ', - 'Ŷ' => 'ŷ', - 'Ÿ' => 'ÿ', - 'Ź' => 'ź', - 'Ż' => 'ż', - 'Ž' => 'ž', - 'Ɓ' => 'ɓ', - 'Ƃ' => 'ƃ', - 'Ƅ' => 'ƅ', - 'Ɔ' => 'ɔ', - 'Ƈ' => 'ƈ', - 'Ɖ' => 'ɖ', - 'Ɗ' => 'ɗ', - 'Ƌ' => 'ƌ', - 'Ǝ' => 'ǝ', - 'Ə' => 'ə', - 'Ɛ' => 'ɛ', - 'Ƒ' => 'ƒ', - 'Ɠ' => 'ɠ', - 'Ɣ' => 'ɣ', - 'Ɩ' => 'ɩ', - 'Ɨ' => 'ɨ', - 'Ƙ' => 'ƙ', - 'Ɯ' => 'ɯ', - 'Ɲ' => 'ɲ', - 'Ɵ' => 'ɵ', - 'Ơ' => 'ơ', - 'Ƣ' => 'ƣ', - 'Ƥ' => 'ƥ', - 'Ʀ' => 'ʀ', - 'Ƨ' => 'ƨ', - 'Ʃ' => 'ʃ', - 'Ƭ' => 'ƭ', - 'Ʈ' => 'ʈ', - 'Ư' => 'ư', - 'Ʊ' => 'ʊ', - 'Ʋ' => 'ʋ', - 'Ƴ' => 'ƴ', - 'Ƶ' => 'ƶ', - 'Ʒ' => 'ʒ', - 'Ƹ' => 'ƹ', - 'Ƽ' => 'ƽ', - 'DŽ' => 'dž', - 'Dž' => 'dž', - 'LJ' => 'lj', - 'Lj' => 'lj', - 'NJ' => 'nj', - 'Nj' => 'nj', - 'Ǎ' => 'ǎ', - 'Ǐ' => 'ǐ', - 'Ǒ' => 'ǒ', - 'Ǔ' => 'ǔ', - 'Ǖ' => 'ǖ', - 'Ǘ' => 'ǘ', - 'Ǚ' => 'ǚ', - 'Ǜ' => 'ǜ', - 'Ǟ' => 'ǟ', - 'Ǡ' => 'ǡ', - 'Ǣ' => 'ǣ', - 'Ǥ' => 'ǥ', - 'Ǧ' => 'ǧ', - 'Ǩ' => 'ǩ', - 'Ǫ' => 'ǫ', - 'Ǭ' => 'ǭ', - 'Ǯ' => 'ǯ', - 'DZ' => 'dz', - 'Dz' => 'dz', - 'Ǵ' => 'ǵ', - 'Ƕ' => 'ƕ', - 'Ƿ' => 'ƿ', - 'Ǹ' => 'ǹ', - 'Ǻ' => 'ǻ', - 'Ǽ' => 'ǽ', - 'Ǿ' => 'ǿ', - 'Ȁ' => 'ȁ', - 'Ȃ' => 'ȃ', - 'Ȅ' => 'ȅ', - 'Ȇ' => 'ȇ', - 'Ȉ' => 'ȉ', - 'Ȋ' => 'ȋ', - 'Ȍ' => 'ȍ', - 'Ȏ' => 'ȏ', - 'Ȑ' => 'ȑ', - 'Ȓ' => 'ȓ', - 'Ȕ' => 'ȕ', - 'Ȗ' => 'ȗ', - 'Ș' => 'ș', - 'Ț' => 'ț', - 'Ȝ' => 'ȝ', - 'Ȟ' => 'ȟ', - 'Ƞ' => 'ƞ', - 'Ȣ' => 'ȣ', - 'Ȥ' => 'ȥ', - 'Ȧ' => 'ȧ', - 'Ȩ' => 'ȩ', - 'Ȫ' => 'ȫ', - 'Ȭ' => 'ȭ', - 'Ȯ' => 'ȯ', - 'Ȱ' => 'ȱ', - 'Ȳ' => 'ȳ', - 'Ⱥ' => 'ⱥ', - 'Ȼ' => 'ȼ', - 'Ƚ' => 'ƚ', - 'Ⱦ' => 'ⱦ', - 'Ɂ' => 'ɂ', - 'Ƀ' => 'ƀ', - 'Ʉ' => 'ʉ', - 'Ʌ' => 'ʌ', - 'Ɇ' => 'ɇ', - 'Ɉ' => 'ɉ', - 'Ɋ' => 'ɋ', - 'Ɍ' => 'ɍ', - 'Ɏ' => 'ɏ', - 'Ͱ' => 'ͱ', - 'Ͳ' => 'ͳ', - 'Ͷ' => 'ͷ', - 'Ϳ' => 'ϳ', - 'Ά' => 'ά', - 'Έ' => 'έ', - 'Ή' => 'ή', - 'Ί' => 'ί', - 'Ό' => 'ό', - 'Ύ' => 'ύ', - 'Ώ' => 'ώ', - 'Α' => 'α', - 'Β' => 'β', - 'Γ' => 'γ', - 'Δ' => 'δ', - 'Ε' => 'ε', - 'Ζ' => 'ζ', - 'Η' => 'η', - 'Θ' => 'θ', - 'Ι' => 'ι', - 'Κ' => 'κ', - 'Λ' => 'λ', - 'Μ' => 'μ', - 'Ν' => 'ν', - 'Ξ' => 'ξ', - 'Ο' => 'ο', - 'Π' => 'π', - 'Ρ' => 'ρ', - 'Σ' => 'σ', - 'Τ' => 'τ', - 'Υ' => 'υ', - 'Φ' => 'φ', - 'Χ' => 'χ', - 'Ψ' => 'ψ', - 'Ω' => 'ω', - 'Ϊ' => 'ϊ', - 'Ϋ' => 'ϋ', - 'Ϗ' => 'ϗ', - 'Ϙ' => 'ϙ', - 'Ϛ' => 'ϛ', - 'Ϝ' => 'ϝ', - 'Ϟ' => 'ϟ', - 'Ϡ' => 'ϡ', - 'Ϣ' => 'ϣ', - 'Ϥ' => 'ϥ', - 'Ϧ' => 'ϧ', - 'Ϩ' => 'ϩ', - 'Ϫ' => 'ϫ', - 'Ϭ' => 'ϭ', - 'Ϯ' => 'ϯ', - 'ϴ' => 'θ', - 'Ϸ' => 'ϸ', - 'Ϲ' => 'ϲ', - 'Ϻ' => 'ϻ', - 'Ͻ' => 'ͻ', - 'Ͼ' => 'ͼ', - 'Ͽ' => 'ͽ', - 'Ѐ' => 'ѐ', - 'Ё' => 'ё', - 'Ђ' => 'ђ', - 'Ѓ' => 'ѓ', - 'Є' => 'є', - 'Ѕ' => 'ѕ', - 'І' => 'і', - 'Ї' => 'ї', - 'Ј' => 'ј', - 'Љ' => 'љ', - 'Њ' => 'њ', - 'Ћ' => 'ћ', - 'Ќ' => 'ќ', - 'Ѝ' => 'ѝ', - 'Ў' => 'ў', - 'Џ' => 'џ', - 'А' => 'а', - 'Б' => 'б', - 'В' => 'в', - 'Г' => 'г', - 'Д' => 'д', - 'Е' => 'е', - 'Ж' => 'ж', - 'З' => 'з', - 'И' => 'и', - 'Й' => 'й', - 'К' => 'к', - 'Л' => 'л', - 'М' => 'м', - 'Н' => 'н', - 'О' => 'о', - 'П' => 'п', - 'Р' => 'р', - 'С' => 'с', - 'Т' => 'т', - 'У' => 'у', - 'Ф' => 'ф', - 'Х' => 'х', - 'Ц' => 'ц', - 'Ч' => 'ч', - 'Ш' => 'ш', - 'Щ' => 'щ', - 'Ъ' => 'ъ', - 'Ы' => 'ы', - 'Ь' => 'ь', - 'Э' => 'э', - 'Ю' => 'ю', - 'Я' => 'я', - 'Ѡ' => 'ѡ', - 'Ѣ' => 'ѣ', - 'Ѥ' => 'ѥ', - 'Ѧ' => 'ѧ', - 'Ѩ' => 'ѩ', - 'Ѫ' => 'ѫ', - 'Ѭ' => 'ѭ', - 'Ѯ' => 'ѯ', - 'Ѱ' => 'ѱ', - 'Ѳ' => 'ѳ', - 'Ѵ' => 'ѵ', - 'Ѷ' => 'ѷ', - 'Ѹ' => 'ѹ', - 'Ѻ' => 'ѻ', - 'Ѽ' => 'ѽ', - 'Ѿ' => 'ѿ', - 'Ҁ' => 'ҁ', - 'Ҋ' => 'ҋ', - 'Ҍ' => 'ҍ', - 'Ҏ' => 'ҏ', - 'Ґ' => 'ґ', - 'Ғ' => 'ғ', - 'Ҕ' => 'ҕ', - 'Җ' => 'җ', - 'Ҙ' => 'ҙ', - 'Қ' => 'қ', - 'Ҝ' => 'ҝ', - 'Ҟ' => 'ҟ', - 'Ҡ' => 'ҡ', - 'Ң' => 'ң', - 'Ҥ' => 'ҥ', - 'Ҧ' => 'ҧ', - 'Ҩ' => 'ҩ', - 'Ҫ' => 'ҫ', - 'Ҭ' => 'ҭ', - 'Ү' => 'ү', - 'Ұ' => 'ұ', - 'Ҳ' => 'ҳ', - 'Ҵ' => 'ҵ', - 'Ҷ' => 'ҷ', - 'Ҹ' => 'ҹ', - 'Һ' => 'һ', - 'Ҽ' => 'ҽ', - 'Ҿ' => 'ҿ', - 'Ӏ' => 'ӏ', - 'Ӂ' => 'ӂ', - 'Ӄ' => 'ӄ', - 'Ӆ' => 'ӆ', - 'Ӈ' => 'ӈ', - 'Ӊ' => 'ӊ', - 'Ӌ' => 'ӌ', - 'Ӎ' => 'ӎ', - 'Ӑ' => 'ӑ', - 'Ӓ' => 'ӓ', - 'Ӕ' => 'ӕ', - 'Ӗ' => 'ӗ', - 'Ә' => 'ә', - 'Ӛ' => 'ӛ', - 'Ӝ' => 'ӝ', - 'Ӟ' => 'ӟ', - 'Ӡ' => 'ӡ', - 'Ӣ' => 'ӣ', - 'Ӥ' => 'ӥ', - 'Ӧ' => 'ӧ', - 'Ө' => 'ө', - 'Ӫ' => 'ӫ', - 'Ӭ' => 'ӭ', - 'Ӯ' => 'ӯ', - 'Ӱ' => 'ӱ', - 'Ӳ' => 'ӳ', - 'Ӵ' => 'ӵ', - 'Ӷ' => 'ӷ', - 'Ӹ' => 'ӹ', - 'Ӻ' => 'ӻ', - 'Ӽ' => 'ӽ', - 'Ӿ' => 'ӿ', - 'Ԁ' => 'ԁ', - 'Ԃ' => 'ԃ', - 'Ԅ' => 'ԅ', - 'Ԇ' => 'ԇ', - 'Ԉ' => 'ԉ', - 'Ԋ' => 'ԋ', - 'Ԍ' => 'ԍ', - 'Ԏ' => 'ԏ', - 'Ԑ' => 'ԑ', - 'Ԓ' => 'ԓ', - 'Ԕ' => 'ԕ', - 'Ԗ' => 'ԗ', - 'Ԙ' => 'ԙ', - 'Ԛ' => 'ԛ', - 'Ԝ' => 'ԝ', - 'Ԟ' => 'ԟ', - 'Ԡ' => 'ԡ', - 'Ԣ' => 'ԣ', - 'Ԥ' => 'ԥ', - 'Ԧ' => 'ԧ', - 'Ԩ' => 'ԩ', - 'Ԫ' => 'ԫ', - 'Ԭ' => 'ԭ', - 'Ԯ' => 'ԯ', - 'Ա' => 'ա', - 'Բ' => 'բ', - 'Գ' => 'գ', - 'Դ' => 'դ', - 'Ե' => 'ե', - 'Զ' => 'զ', - 'Է' => 'է', - 'Ը' => 'ը', - 'Թ' => 'թ', - 'Ժ' => 'ժ', - 'Ի' => 'ի', - 'Լ' => 'լ', - 'Խ' => 'խ', - 'Ծ' => 'ծ', - 'Կ' => 'կ', - 'Հ' => 'հ', - 'Ձ' => 'ձ', - 'Ղ' => 'ղ', - 'Ճ' => 'ճ', - 'Մ' => 'մ', - 'Յ' => 'յ', - 'Ն' => 'ն', - 'Շ' => 'շ', - 'Ո' => 'ո', - 'Չ' => 'չ', - 'Պ' => 'պ', - 'Ջ' => 'ջ', - 'Ռ' => 'ռ', - 'Ս' => 'ս', - 'Վ' => 'վ', - 'Տ' => 'տ', - 'Ր' => 'ր', - 'Ց' => 'ց', - 'Ւ' => 'ւ', - 'Փ' => 'փ', - 'Ք' => 'ք', - 'Օ' => 'օ', - 'Ֆ' => 'ֆ', - 'Ⴀ' => 'ⴀ', - 'Ⴁ' => 'ⴁ', - 'Ⴂ' => 'ⴂ', - 'Ⴃ' => 'ⴃ', - 'Ⴄ' => 'ⴄ', - 'Ⴅ' => 'ⴅ', - 'Ⴆ' => 'ⴆ', - 'Ⴇ' => 'ⴇ', - 'Ⴈ' => 'ⴈ', - 'Ⴉ' => 'ⴉ', - 'Ⴊ' => 'ⴊ', - 'Ⴋ' => 'ⴋ', - 'Ⴌ' => 'ⴌ', - 'Ⴍ' => 'ⴍ', - 'Ⴎ' => 'ⴎ', - 'Ⴏ' => 'ⴏ', - 'Ⴐ' => 'ⴐ', - 'Ⴑ' => 'ⴑ', - 'Ⴒ' => 'ⴒ', - 'Ⴓ' => 'ⴓ', - 'Ⴔ' => 'ⴔ', - 'Ⴕ' => 'ⴕ', - 'Ⴖ' => 'ⴖ', - 'Ⴗ' => 'ⴗ', - 'Ⴘ' => 'ⴘ', - 'Ⴙ' => 'ⴙ', - 'Ⴚ' => 'ⴚ', - 'Ⴛ' => 'ⴛ', - 'Ⴜ' => 'ⴜ', - 'Ⴝ' => 'ⴝ', - 'Ⴞ' => 'ⴞ', - 'Ⴟ' => 'ⴟ', - 'Ⴠ' => 'ⴠ', - 'Ⴡ' => 'ⴡ', - 'Ⴢ' => 'ⴢ', - 'Ⴣ' => 'ⴣ', - 'Ⴤ' => 'ⴤ', - 'Ⴥ' => 'ⴥ', - 'Ⴧ' => 'ⴧ', - 'Ⴭ' => 'ⴭ', - 'Ꭰ' => 'ꭰ', - 'Ꭱ' => 'ꭱ', - 'Ꭲ' => 'ꭲ', - 'Ꭳ' => 'ꭳ', - 'Ꭴ' => 'ꭴ', - 'Ꭵ' => 'ꭵ', - 'Ꭶ' => 'ꭶ', - 'Ꭷ' => 'ꭷ', - 'Ꭸ' => 'ꭸ', - 'Ꭹ' => 'ꭹ', - 'Ꭺ' => 'ꭺ', - 'Ꭻ' => 'ꭻ', - 'Ꭼ' => 'ꭼ', - 'Ꭽ' => 'ꭽ', - 'Ꭾ' => 'ꭾ', - 'Ꭿ' => 'ꭿ', - 'Ꮀ' => 'ꮀ', - 'Ꮁ' => 'ꮁ', - 'Ꮂ' => 'ꮂ', - 'Ꮃ' => 'ꮃ', - 'Ꮄ' => 'ꮄ', - 'Ꮅ' => 'ꮅ', - 'Ꮆ' => 'ꮆ', - 'Ꮇ' => 'ꮇ', - 'Ꮈ' => 'ꮈ', - 'Ꮉ' => 'ꮉ', - 'Ꮊ' => 'ꮊ', - 'Ꮋ' => 'ꮋ', - 'Ꮌ' => 'ꮌ', - 'Ꮍ' => 'ꮍ', - 'Ꮎ' => 'ꮎ', - 'Ꮏ' => 'ꮏ', - 'Ꮐ' => 'ꮐ', - 'Ꮑ' => 'ꮑ', - 'Ꮒ' => 'ꮒ', - 'Ꮓ' => 'ꮓ', - 'Ꮔ' => 'ꮔ', - 'Ꮕ' => 'ꮕ', - 'Ꮖ' => 'ꮖ', - 'Ꮗ' => 'ꮗ', - 'Ꮘ' => 'ꮘ', - 'Ꮙ' => 'ꮙ', - 'Ꮚ' => 'ꮚ', - 'Ꮛ' => 'ꮛ', - 'Ꮜ' => 'ꮜ', - 'Ꮝ' => 'ꮝ', - 'Ꮞ' => 'ꮞ', - 'Ꮟ' => 'ꮟ', - 'Ꮠ' => 'ꮠ', - 'Ꮡ' => 'ꮡ', - 'Ꮢ' => 'ꮢ', - 'Ꮣ' => 'ꮣ', - 'Ꮤ' => 'ꮤ', - 'Ꮥ' => 'ꮥ', - 'Ꮦ' => 'ꮦ', - 'Ꮧ' => 'ꮧ', - 'Ꮨ' => 'ꮨ', - 'Ꮩ' => 'ꮩ', - 'Ꮪ' => 'ꮪ', - 'Ꮫ' => 'ꮫ', - 'Ꮬ' => 'ꮬ', - 'Ꮭ' => 'ꮭ', - 'Ꮮ' => 'ꮮ', - 'Ꮯ' => 'ꮯ', - 'Ꮰ' => 'ꮰ', - 'Ꮱ' => 'ꮱ', - 'Ꮲ' => 'ꮲ', - 'Ꮳ' => 'ꮳ', - 'Ꮴ' => 'ꮴ', - 'Ꮵ' => 'ꮵ', - 'Ꮶ' => 'ꮶ', - 'Ꮷ' => 'ꮷ', - 'Ꮸ' => 'ꮸ', - 'Ꮹ' => 'ꮹ', - 'Ꮺ' => 'ꮺ', - 'Ꮻ' => 'ꮻ', - 'Ꮼ' => 'ꮼ', - 'Ꮽ' => 'ꮽ', - 'Ꮾ' => 'ꮾ', - 'Ꮿ' => 'ꮿ', - 'Ᏸ' => 'ᏸ', - 'Ᏹ' => 'ᏹ', - 'Ᏺ' => 'ᏺ', - 'Ᏻ' => 'ᏻ', - 'Ᏼ' => 'ᏼ', - 'Ᏽ' => 'ᏽ', - 'Ა' => 'ა', - 'Ბ' => 'ბ', - 'Გ' => 'გ', - 'Დ' => 'დ', - 'Ე' => 'ე', - 'Ვ' => 'ვ', - 'Ზ' => 'ზ', - 'Თ' => 'თ', - 'Ი' => 'ი', - 'Კ' => 'კ', - 'Ლ' => 'ლ', - 'Მ' => 'მ', - 'Ნ' => 'ნ', - 'Ო' => 'ო', - 'Პ' => 'პ', - 'Ჟ' => 'ჟ', - 'Რ' => 'რ', - 'Ს' => 'ს', - 'Ტ' => 'ტ', - 'Უ' => 'უ', - 'Ფ' => 'ფ', - 'Ქ' => 'ქ', - 'Ღ' => 'ღ', - 'Ყ' => 'ყ', - 'Შ' => 'შ', - 'Ჩ' => 'ჩ', - 'Ც' => 'ც', - 'Ძ' => 'ძ', - 'Წ' => 'წ', - 'Ჭ' => 'ჭ', - 'Ხ' => 'ხ', - 'Ჯ' => 'ჯ', - 'Ჰ' => 'ჰ', - 'Ჱ' => 'ჱ', - 'Ჲ' => 'ჲ', - 'Ჳ' => 'ჳ', - 'Ჴ' => 'ჴ', - 'Ჵ' => 'ჵ', - 'Ჶ' => 'ჶ', - 'Ჷ' => 'ჷ', - 'Ჸ' => 'ჸ', - 'Ჹ' => 'ჹ', - 'Ჺ' => 'ჺ', - 'Ჽ' => 'ჽ', - 'Ჾ' => 'ჾ', - 'Ჿ' => 'ჿ', - 'Ḁ' => 'ḁ', - 'Ḃ' => 'ḃ', - 'Ḅ' => 'ḅ', - 'Ḇ' => 'ḇ', - 'Ḉ' => 'ḉ', - 'Ḋ' => 'ḋ', - 'Ḍ' => 'ḍ', - 'Ḏ' => 'ḏ', - 'Ḑ' => 'ḑ', - 'Ḓ' => 'ḓ', - 'Ḕ' => 'ḕ', - 'Ḗ' => 'ḗ', - 'Ḙ' => 'ḙ', - 'Ḛ' => 'ḛ', - 'Ḝ' => 'ḝ', - 'Ḟ' => 'ḟ', - 'Ḡ' => 'ḡ', - 'Ḣ' => 'ḣ', - 'Ḥ' => 'ḥ', - 'Ḧ' => 'ḧ', - 'Ḩ' => 'ḩ', - 'Ḫ' => 'ḫ', - 'Ḭ' => 'ḭ', - 'Ḯ' => 'ḯ', - 'Ḱ' => 'ḱ', - 'Ḳ' => 'ḳ', - 'Ḵ' => 'ḵ', - 'Ḷ' => 'ḷ', - 'Ḹ' => 'ḹ', - 'Ḻ' => 'ḻ', - 'Ḽ' => 'ḽ', - 'Ḿ' => 'ḿ', - 'Ṁ' => 'ṁ', - 'Ṃ' => 'ṃ', - 'Ṅ' => 'ṅ', - 'Ṇ' => 'ṇ', - 'Ṉ' => 'ṉ', - 'Ṋ' => 'ṋ', - 'Ṍ' => 'ṍ', - 'Ṏ' => 'ṏ', - 'Ṑ' => 'ṑ', - 'Ṓ' => 'ṓ', - 'Ṕ' => 'ṕ', - 'Ṗ' => 'ṗ', - 'Ṙ' => 'ṙ', - 'Ṛ' => 'ṛ', - 'Ṝ' => 'ṝ', - 'Ṟ' => 'ṟ', - 'Ṡ' => 'ṡ', - 'Ṣ' => 'ṣ', - 'Ṥ' => 'ṥ', - 'Ṧ' => 'ṧ', - 'Ṩ' => 'ṩ', - 'Ṫ' => 'ṫ', - 'Ṭ' => 'ṭ', - 'Ṯ' => 'ṯ', - 'Ṱ' => 'ṱ', - 'Ṳ' => 'ṳ', - 'Ṵ' => 'ṵ', - 'Ṷ' => 'ṷ', - 'Ṹ' => 'ṹ', - 'Ṻ' => 'ṻ', - 'Ṽ' => 'ṽ', - 'Ṿ' => 'ṿ', - 'Ẁ' => 'ẁ', - 'Ẃ' => 'ẃ', - 'Ẅ' => 'ẅ', - 'Ẇ' => 'ẇ', - 'Ẉ' => 'ẉ', - 'Ẋ' => 'ẋ', - 'Ẍ' => 'ẍ', - 'Ẏ' => 'ẏ', - 'Ẑ' => 'ẑ', - 'Ẓ' => 'ẓ', - 'Ẕ' => 'ẕ', - 'ẞ' => 'ß', - 'Ạ' => 'ạ', - 'Ả' => 'ả', - 'Ấ' => 'ấ', - 'Ầ' => 'ầ', - 'Ẩ' => 'ẩ', - 'Ẫ' => 'ẫ', - 'Ậ' => 'ậ', - 'Ắ' => 'ắ', - 'Ằ' => 'ằ', - 'Ẳ' => 'ẳ', - 'Ẵ' => 'ẵ', - 'Ặ' => 'ặ', - 'Ẹ' => 'ẹ', - 'Ẻ' => 'ẻ', - 'Ẽ' => 'ẽ', - 'Ế' => 'ế', - 'Ề' => 'ề', - 'Ể' => 'ể', - 'Ễ' => 'ễ', - 'Ệ' => 'ệ', - 'Ỉ' => 'ỉ', - 'Ị' => 'ị', - 'Ọ' => 'ọ', - 'Ỏ' => 'ỏ', - 'Ố' => 'ố', - 'Ồ' => 'ồ', - 'Ổ' => 'ổ', - 'Ỗ' => 'ỗ', - 'Ộ' => 'ộ', - 'Ớ' => 'ớ', - 'Ờ' => 'ờ', - 'Ở' => 'ở', - 'Ỡ' => 'ỡ', - 'Ợ' => 'ợ', - 'Ụ' => 'ụ', - 'Ủ' => 'ủ', - 'Ứ' => 'ứ', - 'Ừ' => 'ừ', - 'Ử' => 'ử', - 'Ữ' => 'ữ', - 'Ự' => 'ự', - 'Ỳ' => 'ỳ', - 'Ỵ' => 'ỵ', - 'Ỷ' => 'ỷ', - 'Ỹ' => 'ỹ', - 'Ỻ' => 'ỻ', - 'Ỽ' => 'ỽ', - 'Ỿ' => 'ỿ', - 'Ἀ' => 'ἀ', - 'Ἁ' => 'ἁ', - 'Ἂ' => 'ἂ', - 'Ἃ' => 'ἃ', - 'Ἄ' => 'ἄ', - 'Ἅ' => 'ἅ', - 'Ἆ' => 'ἆ', - 'Ἇ' => 'ἇ', - 'Ἐ' => 'ἐ', - 'Ἑ' => 'ἑ', - 'Ἒ' => 'ἒ', - 'Ἓ' => 'ἓ', - 'Ἔ' => 'ἔ', - 'Ἕ' => 'ἕ', - 'Ἠ' => 'ἠ', - 'Ἡ' => 'ἡ', - 'Ἢ' => 'ἢ', - 'Ἣ' => 'ἣ', - 'Ἤ' => 'ἤ', - 'Ἥ' => 'ἥ', - 'Ἦ' => 'ἦ', - 'Ἧ' => 'ἧ', - 'Ἰ' => 'ἰ', - 'Ἱ' => 'ἱ', - 'Ἲ' => 'ἲ', - 'Ἳ' => 'ἳ', - 'Ἴ' => 'ἴ', - 'Ἵ' => 'ἵ', - 'Ἶ' => 'ἶ', - 'Ἷ' => 'ἷ', - 'Ὀ' => 'ὀ', - 'Ὁ' => 'ὁ', - 'Ὂ' => 'ὂ', - 'Ὃ' => 'ὃ', - 'Ὄ' => 'ὄ', - 'Ὅ' => 'ὅ', - 'Ὑ' => 'ὑ', - 'Ὓ' => 'ὓ', - 'Ὕ' => 'ὕ', - 'Ὗ' => 'ὗ', - 'Ὠ' => 'ὠ', - 'Ὡ' => 'ὡ', - 'Ὢ' => 'ὢ', - 'Ὣ' => 'ὣ', - 'Ὤ' => 'ὤ', - 'Ὥ' => 'ὥ', - 'Ὦ' => 'ὦ', - 'Ὧ' => 'ὧ', - 'ᾈ' => 'ᾀ', - 'ᾉ' => 'ᾁ', - 'ᾊ' => 'ᾂ', - 'ᾋ' => 'ᾃ', - 'ᾌ' => 'ᾄ', - 'ᾍ' => 'ᾅ', - 'ᾎ' => 'ᾆ', - 'ᾏ' => 'ᾇ', - 'ᾘ' => 'ᾐ', - 'ᾙ' => 'ᾑ', - 'ᾚ' => 'ᾒ', - 'ᾛ' => 'ᾓ', - 'ᾜ' => 'ᾔ', - 'ᾝ' => 'ᾕ', - 'ᾞ' => 'ᾖ', - 'ᾟ' => 'ᾗ', - 'ᾨ' => 'ᾠ', - 'ᾩ' => 'ᾡ', - 'ᾪ' => 'ᾢ', - 'ᾫ' => 'ᾣ', - 'ᾬ' => 'ᾤ', - 'ᾭ' => 'ᾥ', - 'ᾮ' => 'ᾦ', - 'ᾯ' => 'ᾧ', - 'Ᾰ' => 'ᾰ', - 'Ᾱ' => 'ᾱ', - 'Ὰ' => 'ὰ', - 'Ά' => 'ά', - 'ᾼ' => 'ᾳ', - 'Ὲ' => 'ὲ', - 'Έ' => 'έ', - 'Ὴ' => 'ὴ', - 'Ή' => 'ή', - 'ῌ' => 'ῃ', - 'Ῐ' => 'ῐ', - 'Ῑ' => 'ῑ', - 'Ὶ' => 'ὶ', - 'Ί' => 'ί', - 'Ῠ' => 'ῠ', - 'Ῡ' => 'ῡ', - 'Ὺ' => 'ὺ', - 'Ύ' => 'ύ', - 'Ῥ' => 'ῥ', - 'Ὸ' => 'ὸ', - 'Ό' => 'ό', - 'Ὼ' => 'ὼ', - 'Ώ' => 'ώ', - 'ῼ' => 'ῳ', - 'Ω' => 'ω', - 'K' => 'k', - 'Å' => 'å', - 'Ⅎ' => 'ⅎ', - 'Ⅰ' => 'ⅰ', - 'Ⅱ' => 'ⅱ', - 'Ⅲ' => 'ⅲ', - 'Ⅳ' => 'ⅳ', - 'Ⅴ' => 'ⅴ', - 'Ⅵ' => 'ⅵ', - 'Ⅶ' => 'ⅶ', - 'Ⅷ' => 'ⅷ', - 'Ⅸ' => 'ⅸ', - 'Ⅹ' => 'ⅹ', - 'Ⅺ' => 'ⅺ', - 'Ⅻ' => 'ⅻ', - 'Ⅼ' => 'ⅼ', - 'Ⅽ' => 'ⅽ', - 'Ⅾ' => 'ⅾ', - 'Ⅿ' => 'ⅿ', - 'Ↄ' => 'ↄ', - 'Ⓐ' => 'ⓐ', - 'Ⓑ' => 'ⓑ', - 'Ⓒ' => 'ⓒ', - 'Ⓓ' => 'ⓓ', - 'Ⓔ' => 'ⓔ', - 'Ⓕ' => 'ⓕ', - 'Ⓖ' => 'ⓖ', - 'Ⓗ' => 'ⓗ', - 'Ⓘ' => 'ⓘ', - 'Ⓙ' => 'ⓙ', - 'Ⓚ' => 'ⓚ', - 'Ⓛ' => 'ⓛ', - 'Ⓜ' => 'ⓜ', - 'Ⓝ' => 'ⓝ', - 'Ⓞ' => 'ⓞ', - 'Ⓟ' => 'ⓟ', - 'Ⓠ' => 'ⓠ', - 'Ⓡ' => 'ⓡ', - 'Ⓢ' => 'ⓢ', - 'Ⓣ' => 'ⓣ', - 'Ⓤ' => 'ⓤ', - 'Ⓥ' => 'ⓥ', - 'Ⓦ' => 'ⓦ', - 'Ⓧ' => 'ⓧ', - 'Ⓨ' => 'ⓨ', - 'Ⓩ' => 'ⓩ', - 'Ⰰ' => 'ⰰ', - 'Ⰱ' => 'ⰱ', - 'Ⰲ' => 'ⰲ', - 'Ⰳ' => 'ⰳ', - 'Ⰴ' => 'ⰴ', - 'Ⰵ' => 'ⰵ', - 'Ⰶ' => 'ⰶ', - 'Ⰷ' => 'ⰷ', - 'Ⰸ' => 'ⰸ', - 'Ⰹ' => 'ⰹ', - 'Ⰺ' => 'ⰺ', - 'Ⰻ' => 'ⰻ', - 'Ⰼ' => 'ⰼ', - 'Ⰽ' => 'ⰽ', - 'Ⰾ' => 'ⰾ', - 'Ⰿ' => 'ⰿ', - 'Ⱀ' => 'ⱀ', - 'Ⱁ' => 'ⱁ', - 'Ⱂ' => 'ⱂ', - 'Ⱃ' => 'ⱃ', - 'Ⱄ' => 'ⱄ', - 'Ⱅ' => 'ⱅ', - 'Ⱆ' => 'ⱆ', - 'Ⱇ' => 'ⱇ', - 'Ⱈ' => 'ⱈ', - 'Ⱉ' => 'ⱉ', - 'Ⱊ' => 'ⱊ', - 'Ⱋ' => 'ⱋ', - 'Ⱌ' => 'ⱌ', - 'Ⱍ' => 'ⱍ', - 'Ⱎ' => 'ⱎ', - 'Ⱏ' => 'ⱏ', - 'Ⱐ' => 'ⱐ', - 'Ⱑ' => 'ⱑ', - 'Ⱒ' => 'ⱒ', - 'Ⱓ' => 'ⱓ', - 'Ⱔ' => 'ⱔ', - 'Ⱕ' => 'ⱕ', - 'Ⱖ' => 'ⱖ', - 'Ⱗ' => 'ⱗ', - 'Ⱘ' => 'ⱘ', - 'Ⱙ' => 'ⱙ', - 'Ⱚ' => 'ⱚ', - 'Ⱛ' => 'ⱛ', - 'Ⱜ' => 'ⱜ', - 'Ⱝ' => 'ⱝ', - 'Ⱞ' => 'ⱞ', - 'Ⱡ' => 'ⱡ', - 'Ɫ' => 'ɫ', - 'Ᵽ' => 'ᵽ', - 'Ɽ' => 'ɽ', - 'Ⱨ' => 'ⱨ', - 'Ⱪ' => 'ⱪ', - 'Ⱬ' => 'ⱬ', - 'Ɑ' => 'ɑ', - 'Ɱ' => 'ɱ', - 'Ɐ' => 'ɐ', - 'Ɒ' => 'ɒ', - 'Ⱳ' => 'ⱳ', - 'Ⱶ' => 'ⱶ', - 'Ȿ' => 'ȿ', - 'Ɀ' => 'ɀ', - 'Ⲁ' => 'ⲁ', - 'Ⲃ' => 'ⲃ', - 'Ⲅ' => 'ⲅ', - 'Ⲇ' => 'ⲇ', - 'Ⲉ' => 'ⲉ', - 'Ⲋ' => 'ⲋ', - 'Ⲍ' => 'ⲍ', - 'Ⲏ' => 'ⲏ', - 'Ⲑ' => 'ⲑ', - 'Ⲓ' => 'ⲓ', - 'Ⲕ' => 'ⲕ', - 'Ⲗ' => 'ⲗ', - 'Ⲙ' => 'ⲙ', - 'Ⲛ' => 'ⲛ', - 'Ⲝ' => 'ⲝ', - 'Ⲟ' => 'ⲟ', - 'Ⲡ' => 'ⲡ', - 'Ⲣ' => 'ⲣ', - 'Ⲥ' => 'ⲥ', - 'Ⲧ' => 'ⲧ', - 'Ⲩ' => 'ⲩ', - 'Ⲫ' => 'ⲫ', - 'Ⲭ' => 'ⲭ', - 'Ⲯ' => 'ⲯ', - 'Ⲱ' => 'ⲱ', - 'Ⲳ' => 'ⲳ', - 'Ⲵ' => 'ⲵ', - 'Ⲷ' => 'ⲷ', - 'Ⲹ' => 'ⲹ', - 'Ⲻ' => 'ⲻ', - 'Ⲽ' => 'ⲽ', - 'Ⲿ' => 'ⲿ', - 'Ⳁ' => 'ⳁ', - 'Ⳃ' => 'ⳃ', - 'Ⳅ' => 'ⳅ', - 'Ⳇ' => 'ⳇ', - 'Ⳉ' => 'ⳉ', - 'Ⳋ' => 'ⳋ', - 'Ⳍ' => 'ⳍ', - 'Ⳏ' => 'ⳏ', - 'Ⳑ' => 'ⳑ', - 'Ⳓ' => 'ⳓ', - 'Ⳕ' => 'ⳕ', - 'Ⳗ' => 'ⳗ', - 'Ⳙ' => 'ⳙ', - 'Ⳛ' => 'ⳛ', - 'Ⳝ' => 'ⳝ', - 'Ⳟ' => 'ⳟ', - 'Ⳡ' => 'ⳡ', - 'Ⳣ' => 'ⳣ', - 'Ⳬ' => 'ⳬ', - 'Ⳮ' => 'ⳮ', - 'Ⳳ' => 'ⳳ', - 'Ꙁ' => 'ꙁ', - 'Ꙃ' => 'ꙃ', - 'Ꙅ' => 'ꙅ', - 'Ꙇ' => 'ꙇ', - 'Ꙉ' => 'ꙉ', - 'Ꙋ' => 'ꙋ', - 'Ꙍ' => 'ꙍ', - 'Ꙏ' => 'ꙏ', - 'Ꙑ' => 'ꙑ', - 'Ꙓ' => 'ꙓ', - 'Ꙕ' => 'ꙕ', - 'Ꙗ' => 'ꙗ', - 'Ꙙ' => 'ꙙ', - 'Ꙛ' => 'ꙛ', - 'Ꙝ' => 'ꙝ', - 'Ꙟ' => 'ꙟ', - 'Ꙡ' => 'ꙡ', - 'Ꙣ' => 'ꙣ', - 'Ꙥ' => 'ꙥ', - 'Ꙧ' => 'ꙧ', - 'Ꙩ' => 'ꙩ', - 'Ꙫ' => 'ꙫ', - 'Ꙭ' => 'ꙭ', - 'Ꚁ' => 'ꚁ', - 'Ꚃ' => 'ꚃ', - 'Ꚅ' => 'ꚅ', - 'Ꚇ' => 'ꚇ', - 'Ꚉ' => 'ꚉ', - 'Ꚋ' => 'ꚋ', - 'Ꚍ' => 'ꚍ', - 'Ꚏ' => 'ꚏ', - 'Ꚑ' => 'ꚑ', - 'Ꚓ' => 'ꚓ', - 'Ꚕ' => 'ꚕ', - 'Ꚗ' => 'ꚗ', - 'Ꚙ' => 'ꚙ', - 'Ꚛ' => 'ꚛ', - 'Ꜣ' => 'ꜣ', - 'Ꜥ' => 'ꜥ', - 'Ꜧ' => 'ꜧ', - 'Ꜩ' => 'ꜩ', - 'Ꜫ' => 'ꜫ', - 'Ꜭ' => 'ꜭ', - 'Ꜯ' => 'ꜯ', - 'Ꜳ' => 'ꜳ', - 'Ꜵ' => 'ꜵ', - 'Ꜷ' => 'ꜷ', - 'Ꜹ' => 'ꜹ', - 'Ꜻ' => 'ꜻ', - 'Ꜽ' => 'ꜽ', - 'Ꜿ' => 'ꜿ', - 'Ꝁ' => 'ꝁ', - 'Ꝃ' => 'ꝃ', - 'Ꝅ' => 'ꝅ', - 'Ꝇ' => 'ꝇ', - 'Ꝉ' => 'ꝉ', - 'Ꝋ' => 'ꝋ', - 'Ꝍ' => 'ꝍ', - 'Ꝏ' => 'ꝏ', - 'Ꝑ' => 'ꝑ', - 'Ꝓ' => 'ꝓ', - 'Ꝕ' => 'ꝕ', - 'Ꝗ' => 'ꝗ', - 'Ꝙ' => 'ꝙ', - 'Ꝛ' => 'ꝛ', - 'Ꝝ' => 'ꝝ', - 'Ꝟ' => 'ꝟ', - 'Ꝡ' => 'ꝡ', - 'Ꝣ' => 'ꝣ', - 'Ꝥ' => 'ꝥ', - 'Ꝧ' => 'ꝧ', - 'Ꝩ' => 'ꝩ', - 'Ꝫ' => 'ꝫ', - 'Ꝭ' => 'ꝭ', - 'Ꝯ' => 'ꝯ', - 'Ꝺ' => 'ꝺ', - 'Ꝼ' => 'ꝼ', - 'Ᵹ' => 'ᵹ', - 'Ꝿ' => 'ꝿ', - 'Ꞁ' => 'ꞁ', - 'Ꞃ' => 'ꞃ', - 'Ꞅ' => 'ꞅ', - 'Ꞇ' => 'ꞇ', - 'Ꞌ' => 'ꞌ', - 'Ɥ' => 'ɥ', - 'Ꞑ' => 'ꞑ', - 'Ꞓ' => 'ꞓ', - 'Ꞗ' => 'ꞗ', - 'Ꞙ' => 'ꞙ', - 'Ꞛ' => 'ꞛ', - 'Ꞝ' => 'ꞝ', - 'Ꞟ' => 'ꞟ', - 'Ꞡ' => 'ꞡ', - 'Ꞣ' => 'ꞣ', - 'Ꞥ' => 'ꞥ', - 'Ꞧ' => 'ꞧ', - 'Ꞩ' => 'ꞩ', - 'Ɦ' => 'ɦ', - 'Ɜ' => 'ɜ', - 'Ɡ' => 'ɡ', - 'Ɬ' => 'ɬ', - 'Ɪ' => 'ɪ', - 'Ʞ' => 'ʞ', - 'Ʇ' => 'ʇ', - 'Ʝ' => 'ʝ', - 'Ꭓ' => 'ꭓ', - 'Ꞵ' => 'ꞵ', - 'Ꞷ' => 'ꞷ', - 'Ꞹ' => 'ꞹ', - 'Ꞻ' => 'ꞻ', - 'Ꞽ' => 'ꞽ', - 'Ꞿ' => 'ꞿ', - 'Ꟃ' => 'ꟃ', - 'Ꞔ' => 'ꞔ', - 'Ʂ' => 'ʂ', - 'Ᶎ' => 'ᶎ', - 'Ꟈ' => 'ꟈ', - 'Ꟊ' => 'ꟊ', - 'Ꟶ' => 'ꟶ', - 'A' => 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - '𐐀' => '𐐨', - '𐐁' => '𐐩', - '𐐂' => '𐐪', - '𐐃' => '𐐫', - '𐐄' => '𐐬', - '𐐅' => '𐐭', - '𐐆' => '𐐮', - '𐐇' => '𐐯', - '𐐈' => '𐐰', - '𐐉' => '𐐱', - '𐐊' => '𐐲', - '𐐋' => '𐐳', - '𐐌' => '𐐴', - '𐐍' => '𐐵', - '𐐎' => '𐐶', - '𐐏' => '𐐷', - '𐐐' => '𐐸', - '𐐑' => '𐐹', - '𐐒' => '𐐺', - '𐐓' => '𐐻', - '𐐔' => '𐐼', - '𐐕' => '𐐽', - '𐐖' => '𐐾', - '𐐗' => '𐐿', - '𐐘' => '𐑀', - '𐐙' => '𐑁', - '𐐚' => '𐑂', - '𐐛' => '𐑃', - '𐐜' => '𐑄', - '𐐝' => '𐑅', - '𐐞' => '𐑆', - '𐐟' => '𐑇', - '𐐠' => '𐑈', - '𐐡' => '𐑉', - '𐐢' => '𐑊', - '𐐣' => '𐑋', - '𐐤' => '𐑌', - '𐐥' => '𐑍', - '𐐦' => '𐑎', - '𐐧' => '𐑏', - '𐒰' => '𐓘', - '𐒱' => '𐓙', - '𐒲' => '𐓚', - '𐒳' => '𐓛', - '𐒴' => '𐓜', - '𐒵' => '𐓝', - '𐒶' => '𐓞', - '𐒷' => '𐓟', - '𐒸' => '𐓠', - '𐒹' => '𐓡', - '𐒺' => '𐓢', - '𐒻' => '𐓣', - '𐒼' => '𐓤', - '𐒽' => '𐓥', - '𐒾' => '𐓦', - '𐒿' => '𐓧', - '𐓀' => '𐓨', - '𐓁' => '𐓩', - '𐓂' => '𐓪', - '𐓃' => '𐓫', - '𐓄' => '𐓬', - '𐓅' => '𐓭', - '𐓆' => '𐓮', - '𐓇' => '𐓯', - '𐓈' => '𐓰', - '𐓉' => '𐓱', - '𐓊' => '𐓲', - '𐓋' => '𐓳', - '𐓌' => '𐓴', - '𐓍' => '𐓵', - '𐓎' => '𐓶', - '𐓏' => '𐓷', - '𐓐' => '𐓸', - '𐓑' => '𐓹', - '𐓒' => '𐓺', - '𐓓' => '𐓻', - '𐲀' => '𐳀', - '𐲁' => '𐳁', - '𐲂' => '𐳂', - '𐲃' => '𐳃', - '𐲄' => '𐳄', - '𐲅' => '𐳅', - '𐲆' => '𐳆', - '𐲇' => '𐳇', - '𐲈' => '𐳈', - '𐲉' => '𐳉', - '𐲊' => '𐳊', - '𐲋' => '𐳋', - '𐲌' => '𐳌', - '𐲍' => '𐳍', - '𐲎' => '𐳎', - '𐲏' => '𐳏', - '𐲐' => '𐳐', - '𐲑' => '𐳑', - '𐲒' => '𐳒', - '𐲓' => '𐳓', - '𐲔' => '𐳔', - '𐲕' => '𐳕', - '𐲖' => '𐳖', - '𐲗' => '𐳗', - '𐲘' => '𐳘', - '𐲙' => '𐳙', - '𐲚' => '𐳚', - '𐲛' => '𐳛', - '𐲜' => '𐳜', - '𐲝' => '𐳝', - '𐲞' => '𐳞', - '𐲟' => '𐳟', - '𐲠' => '𐳠', - '𐲡' => '𐳡', - '𐲢' => '𐳢', - '𐲣' => '𐳣', - '𐲤' => '𐳤', - '𐲥' => '𐳥', - '𐲦' => '𐳦', - '𐲧' => '𐳧', - '𐲨' => '𐳨', - '𐲩' => '𐳩', - '𐲪' => '𐳪', - '𐲫' => '𐳫', - '𐲬' => '𐳬', - '𐲭' => '𐳭', - '𐲮' => '𐳮', - '𐲯' => '𐳯', - '𐲰' => '𐳰', - '𐲱' => '𐳱', - '𐲲' => '𐳲', - '𑢠' => '𑣀', - '𑢡' => '𑣁', - '𑢢' => '𑣂', - '𑢣' => '𑣃', - '𑢤' => '𑣄', - '𑢥' => '𑣅', - '𑢦' => '𑣆', - '𑢧' => '𑣇', - '𑢨' => '𑣈', - '𑢩' => '𑣉', - '𑢪' => '𑣊', - '𑢫' => '𑣋', - '𑢬' => '𑣌', - '𑢭' => '𑣍', - '𑢮' => '𑣎', - '𑢯' => '𑣏', - '𑢰' => '𑣐', - '𑢱' => '𑣑', - '𑢲' => '𑣒', - '𑢳' => '𑣓', - '𑢴' => '𑣔', - '𑢵' => '𑣕', - '𑢶' => '𑣖', - '𑢷' => '𑣗', - '𑢸' => '𑣘', - '𑢹' => '𑣙', - '𑢺' => '𑣚', - '𑢻' => '𑣛', - '𑢼' => '𑣜', - '𑢽' => '𑣝', - '𑢾' => '𑣞', - '𑢿' => '𑣟', - '𖹀' => '𖹠', - '𖹁' => '𖹡', - '𖹂' => '𖹢', - '𖹃' => '𖹣', - '𖹄' => '𖹤', - '𖹅' => '𖹥', - '𖹆' => '𖹦', - '𖹇' => '𖹧', - '𖹈' => '𖹨', - '𖹉' => '𖹩', - '𖹊' => '𖹪', - '𖹋' => '𖹫', - '𖹌' => '𖹬', - '𖹍' => '𖹭', - '𖹎' => '𖹮', - '𖹏' => '𖹯', - '𖹐' => '𖹰', - '𖹑' => '𖹱', - '𖹒' => '𖹲', - '𖹓' => '𖹳', - '𖹔' => '𖹴', - '𖹕' => '𖹵', - '𖹖' => '𖹶', - '𖹗' => '𖹷', - '𖹘' => '𖹸', - '𖹙' => '𖹹', - '𖹚' => '𖹺', - '𖹛' => '𖹻', - '𖹜' => '𖹼', - '𖹝' => '𖹽', - '𖹞' => '𖹾', - '𖹟' => '𖹿', - '𞤀' => '𞤢', - '𞤁' => '𞤣', - '𞤂' => '𞤤', - '𞤃' => '𞤥', - '𞤄' => '𞤦', - '𞤅' => '𞤧', - '𞤆' => '𞤨', - '𞤇' => '𞤩', - '𞤈' => '𞤪', - '𞤉' => '𞤫', - '𞤊' => '𞤬', - '𞤋' => '𞤭', - '𞤌' => '𞤮', - '𞤍' => '𞤯', - '𞤎' => '𞤰', - '𞤏' => '𞤱', - '𞤐' => '𞤲', - '𞤑' => '𞤳', - '𞤒' => '𞤴', - '𞤓' => '𞤵', - '𞤔' => '𞤶', - '𞤕' => '𞤷', - '𞤖' => '𞤸', - '𞤗' => '𞤹', - '𞤘' => '𞤺', - '𞤙' => '𞤻', - '𞤚' => '𞤼', - '𞤛' => '𞤽', - '𞤜' => '𞤾', - '𞤝' => '𞤿', - '𞤞' => '𞥀', - '𞤟' => '𞥁', - '𞤠' => '𞥂', - '𞤡' => '𞥃', -); diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php deleted file mode 100644 index 2a8f6e7..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +++ /dev/null @@ -1,5 +0,0 @@ - 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - 'µ' => 'Μ', - 'à' => 'À', - 'á' => 'Á', - 'â' => 'Â', - 'ã' => 'Ã', - 'ä' => 'Ä', - 'å' => 'Å', - 'æ' => 'Æ', - 'ç' => 'Ç', - 'è' => 'È', - 'é' => 'É', - 'ê' => 'Ê', - 'ë' => 'Ë', - 'ì' => 'Ì', - 'í' => 'Í', - 'î' => 'Î', - 'ï' => 'Ï', - 'ð' => 'Ð', - 'ñ' => 'Ñ', - 'ò' => 'Ò', - 'ó' => 'Ó', - 'ô' => 'Ô', - 'õ' => 'Õ', - 'ö' => 'Ö', - 'ø' => 'Ø', - 'ù' => 'Ù', - 'ú' => 'Ú', - 'û' => 'Û', - 'ü' => 'Ü', - 'ý' => 'Ý', - 'þ' => 'Þ', - 'ÿ' => 'Ÿ', - 'ā' => 'Ā', - 'ă' => 'Ă', - 'ą' => 'Ą', - 'ć' => 'Ć', - 'ĉ' => 'Ĉ', - 'ċ' => 'Ċ', - 'č' => 'Č', - 'ď' => 'Ď', - 'đ' => 'Đ', - 'ē' => 'Ē', - 'ĕ' => 'Ĕ', - 'ė' => 'Ė', - 'ę' => 'Ę', - 'ě' => 'Ě', - 'ĝ' => 'Ĝ', - 'ğ' => 'Ğ', - 'ġ' => 'Ġ', - 'ģ' => 'Ģ', - 'ĥ' => 'Ĥ', - 'ħ' => 'Ħ', - 'ĩ' => 'Ĩ', - 'ī' => 'Ī', - 'ĭ' => 'Ĭ', - 'į' => 'Į', - 'ı' => 'I', - 'ij' => 'IJ', - 'ĵ' => 'Ĵ', - 'ķ' => 'Ķ', - 'ĺ' => 'Ĺ', - 'ļ' => 'Ļ', - 'ľ' => 'Ľ', - 'ŀ' => 'Ŀ', - 'ł' => 'Ł', - 'ń' => 'Ń', - 'ņ' => 'Ņ', - 'ň' => 'Ň', - 'ŋ' => 'Ŋ', - 'ō' => 'Ō', - 'ŏ' => 'Ŏ', - 'ő' => 'Ő', - 'œ' => 'Œ', - 'ŕ' => 'Ŕ', - 'ŗ' => 'Ŗ', - 'ř' => 'Ř', - 'ś' => 'Ś', - 'ŝ' => 'Ŝ', - 'ş' => 'Ş', - 'š' => 'Š', - 'ţ' => 'Ţ', - 'ť' => 'Ť', - 'ŧ' => 'Ŧ', - 'ũ' => 'Ũ', - 'ū' => 'Ū', - 'ŭ' => 'Ŭ', - 'ů' => 'Ů', - 'ű' => 'Ű', - 'ų' => 'Ų', - 'ŵ' => 'Ŵ', - 'ŷ' => 'Ŷ', - 'ź' => 'Ź', - 'ż' => 'Ż', - 'ž' => 'Ž', - 'ſ' => 'S', - 'ƀ' => 'Ƀ', - 'ƃ' => 'Ƃ', - 'ƅ' => 'Ƅ', - 'ƈ' => 'Ƈ', - 'ƌ' => 'Ƌ', - 'ƒ' => 'Ƒ', - 'ƕ' => 'Ƕ', - 'ƙ' => 'Ƙ', - 'ƚ' => 'Ƚ', - 'ƞ' => 'Ƞ', - 'ơ' => 'Ơ', - 'ƣ' => 'Ƣ', - 'ƥ' => 'Ƥ', - 'ƨ' => 'Ƨ', - 'ƭ' => 'Ƭ', - 'ư' => 'Ư', - 'ƴ' => 'Ƴ', - 'ƶ' => 'Ƶ', - 'ƹ' => 'Ƹ', - 'ƽ' => 'Ƽ', - 'ƿ' => 'Ƿ', - 'Dž' => 'DŽ', - 'dž' => 'DŽ', - 'Lj' => 'LJ', - 'lj' => 'LJ', - 'Nj' => 'NJ', - 'nj' => 'NJ', - 'ǎ' => 'Ǎ', - 'ǐ' => 'Ǐ', - 'ǒ' => 'Ǒ', - 'ǔ' => 'Ǔ', - 'ǖ' => 'Ǖ', - 'ǘ' => 'Ǘ', - 'ǚ' => 'Ǚ', - 'ǜ' => 'Ǜ', - 'ǝ' => 'Ǝ', - 'ǟ' => 'Ǟ', - 'ǡ' => 'Ǡ', - 'ǣ' => 'Ǣ', - 'ǥ' => 'Ǥ', - 'ǧ' => 'Ǧ', - 'ǩ' => 'Ǩ', - 'ǫ' => 'Ǫ', - 'ǭ' => 'Ǭ', - 'ǯ' => 'Ǯ', - 'Dz' => 'DZ', - 'dz' => 'DZ', - 'ǵ' => 'Ǵ', - 'ǹ' => 'Ǹ', - 'ǻ' => 'Ǻ', - 'ǽ' => 'Ǽ', - 'ǿ' => 'Ǿ', - 'ȁ' => 'Ȁ', - 'ȃ' => 'Ȃ', - 'ȅ' => 'Ȅ', - 'ȇ' => 'Ȇ', - 'ȉ' => 'Ȉ', - 'ȋ' => 'Ȋ', - 'ȍ' => 'Ȍ', - 'ȏ' => 'Ȏ', - 'ȑ' => 'Ȑ', - 'ȓ' => 'Ȓ', - 'ȕ' => 'Ȕ', - 'ȗ' => 'Ȗ', - 'ș' => 'Ș', - 'ț' => 'Ț', - 'ȝ' => 'Ȝ', - 'ȟ' => 'Ȟ', - 'ȣ' => 'Ȣ', - 'ȥ' => 'Ȥ', - 'ȧ' => 'Ȧ', - 'ȩ' => 'Ȩ', - 'ȫ' => 'Ȫ', - 'ȭ' => 'Ȭ', - 'ȯ' => 'Ȯ', - 'ȱ' => 'Ȱ', - 'ȳ' => 'Ȳ', - 'ȼ' => 'Ȼ', - 'ȿ' => 'Ȿ', - 'ɀ' => 'Ɀ', - 'ɂ' => 'Ɂ', - 'ɇ' => 'Ɇ', - 'ɉ' => 'Ɉ', - 'ɋ' => 'Ɋ', - 'ɍ' => 'Ɍ', - 'ɏ' => 'Ɏ', - 'ɐ' => 'Ɐ', - 'ɑ' => 'Ɑ', - 'ɒ' => 'Ɒ', - 'ɓ' => 'Ɓ', - 'ɔ' => 'Ɔ', - 'ɖ' => 'Ɖ', - 'ɗ' => 'Ɗ', - 'ə' => 'Ə', - 'ɛ' => 'Ɛ', - 'ɜ' => 'Ɜ', - 'ɠ' => 'Ɠ', - 'ɡ' => 'Ɡ', - 'ɣ' => 'Ɣ', - 'ɥ' => 'Ɥ', - 'ɦ' => 'Ɦ', - 'ɨ' => 'Ɨ', - 'ɩ' => 'Ɩ', - 'ɪ' => 'Ɪ', - 'ɫ' => 'Ɫ', - 'ɬ' => 'Ɬ', - 'ɯ' => 'Ɯ', - 'ɱ' => 'Ɱ', - 'ɲ' => 'Ɲ', - 'ɵ' => 'Ɵ', - 'ɽ' => 'Ɽ', - 'ʀ' => 'Ʀ', - 'ʂ' => 'Ʂ', - 'ʃ' => 'Ʃ', - 'ʇ' => 'Ʇ', - 'ʈ' => 'Ʈ', - 'ʉ' => 'Ʉ', - 'ʊ' => 'Ʊ', - 'ʋ' => 'Ʋ', - 'ʌ' => 'Ʌ', - 'ʒ' => 'Ʒ', - 'ʝ' => 'Ʝ', - 'ʞ' => 'Ʞ', - 'ͅ' => 'Ι', - 'ͱ' => 'Ͱ', - 'ͳ' => 'Ͳ', - 'ͷ' => 'Ͷ', - 'ͻ' => 'Ͻ', - 'ͼ' => 'Ͼ', - 'ͽ' => 'Ͽ', - 'ά' => 'Ά', - 'έ' => 'Έ', - 'ή' => 'Ή', - 'ί' => 'Ί', - 'α' => 'Α', - 'β' => 'Β', - 'γ' => 'Γ', - 'δ' => 'Δ', - 'ε' => 'Ε', - 'ζ' => 'Ζ', - 'η' => 'Η', - 'θ' => 'Θ', - 'ι' => 'Ι', - 'κ' => 'Κ', - 'λ' => 'Λ', - 'μ' => 'Μ', - 'ν' => 'Ν', - 'ξ' => 'Ξ', - 'ο' => 'Ο', - 'π' => 'Π', - 'ρ' => 'Ρ', - 'ς' => 'Σ', - 'σ' => 'Σ', - 'τ' => 'Τ', - 'υ' => 'Υ', - 'φ' => 'Φ', - 'χ' => 'Χ', - 'ψ' => 'Ψ', - 'ω' => 'Ω', - 'ϊ' => 'Ϊ', - 'ϋ' => 'Ϋ', - 'ό' => 'Ό', - 'ύ' => 'Ύ', - 'ώ' => 'Ώ', - 'ϐ' => 'Β', - 'ϑ' => 'Θ', - 'ϕ' => 'Φ', - 'ϖ' => 'Π', - 'ϗ' => 'Ϗ', - 'ϙ' => 'Ϙ', - 'ϛ' => 'Ϛ', - 'ϝ' => 'Ϝ', - 'ϟ' => 'Ϟ', - 'ϡ' => 'Ϡ', - 'ϣ' => 'Ϣ', - 'ϥ' => 'Ϥ', - 'ϧ' => 'Ϧ', - 'ϩ' => 'Ϩ', - 'ϫ' => 'Ϫ', - 'ϭ' => 'Ϭ', - 'ϯ' => 'Ϯ', - 'ϰ' => 'Κ', - 'ϱ' => 'Ρ', - 'ϲ' => 'Ϲ', - 'ϳ' => 'Ϳ', - 'ϵ' => 'Ε', - 'ϸ' => 'Ϸ', - 'ϻ' => 'Ϻ', - 'а' => 'А', - 'б' => 'Б', - 'в' => 'В', - 'г' => 'Г', - 'д' => 'Д', - 'е' => 'Е', - 'ж' => 'Ж', - 'з' => 'З', - 'и' => 'И', - 'й' => 'Й', - 'к' => 'К', - 'л' => 'Л', - 'м' => 'М', - 'н' => 'Н', - 'о' => 'О', - 'п' => 'П', - 'р' => 'Р', - 'с' => 'С', - 'т' => 'Т', - 'у' => 'У', - 'ф' => 'Ф', - 'х' => 'Х', - 'ц' => 'Ц', - 'ч' => 'Ч', - 'ш' => 'Ш', - 'щ' => 'Щ', - 'ъ' => 'Ъ', - 'ы' => 'Ы', - 'ь' => 'Ь', - 'э' => 'Э', - 'ю' => 'Ю', - 'я' => 'Я', - 'ѐ' => 'Ѐ', - 'ё' => 'Ё', - 'ђ' => 'Ђ', - 'ѓ' => 'Ѓ', - 'є' => 'Є', - 'ѕ' => 'Ѕ', - 'і' => 'І', - 'ї' => 'Ї', - 'ј' => 'Ј', - 'љ' => 'Љ', - 'њ' => 'Њ', - 'ћ' => 'Ћ', - 'ќ' => 'Ќ', - 'ѝ' => 'Ѝ', - 'ў' => 'Ў', - 'џ' => 'Џ', - 'ѡ' => 'Ѡ', - 'ѣ' => 'Ѣ', - 'ѥ' => 'Ѥ', - 'ѧ' => 'Ѧ', - 'ѩ' => 'Ѩ', - 'ѫ' => 'Ѫ', - 'ѭ' => 'Ѭ', - 'ѯ' => 'Ѯ', - 'ѱ' => 'Ѱ', - 'ѳ' => 'Ѳ', - 'ѵ' => 'Ѵ', - 'ѷ' => 'Ѷ', - 'ѹ' => 'Ѹ', - 'ѻ' => 'Ѻ', - 'ѽ' => 'Ѽ', - 'ѿ' => 'Ѿ', - 'ҁ' => 'Ҁ', - 'ҋ' => 'Ҋ', - 'ҍ' => 'Ҍ', - 'ҏ' => 'Ҏ', - 'ґ' => 'Ґ', - 'ғ' => 'Ғ', - 'ҕ' => 'Ҕ', - 'җ' => 'Җ', - 'ҙ' => 'Ҙ', - 'қ' => 'Қ', - 'ҝ' => 'Ҝ', - 'ҟ' => 'Ҟ', - 'ҡ' => 'Ҡ', - 'ң' => 'Ң', - 'ҥ' => 'Ҥ', - 'ҧ' => 'Ҧ', - 'ҩ' => 'Ҩ', - 'ҫ' => 'Ҫ', - 'ҭ' => 'Ҭ', - 'ү' => 'Ү', - 'ұ' => 'Ұ', - 'ҳ' => 'Ҳ', - 'ҵ' => 'Ҵ', - 'ҷ' => 'Ҷ', - 'ҹ' => 'Ҹ', - 'һ' => 'Һ', - 'ҽ' => 'Ҽ', - 'ҿ' => 'Ҿ', - 'ӂ' => 'Ӂ', - 'ӄ' => 'Ӄ', - 'ӆ' => 'Ӆ', - 'ӈ' => 'Ӈ', - 'ӊ' => 'Ӊ', - 'ӌ' => 'Ӌ', - 'ӎ' => 'Ӎ', - 'ӏ' => 'Ӏ', - 'ӑ' => 'Ӑ', - 'ӓ' => 'Ӓ', - 'ӕ' => 'Ӕ', - 'ӗ' => 'Ӗ', - 'ә' => 'Ә', - 'ӛ' => 'Ӛ', - 'ӝ' => 'Ӝ', - 'ӟ' => 'Ӟ', - 'ӡ' => 'Ӡ', - 'ӣ' => 'Ӣ', - 'ӥ' => 'Ӥ', - 'ӧ' => 'Ӧ', - 'ө' => 'Ө', - 'ӫ' => 'Ӫ', - 'ӭ' => 'Ӭ', - 'ӯ' => 'Ӯ', - 'ӱ' => 'Ӱ', - 'ӳ' => 'Ӳ', - 'ӵ' => 'Ӵ', - 'ӷ' => 'Ӷ', - 'ӹ' => 'Ӹ', - 'ӻ' => 'Ӻ', - 'ӽ' => 'Ӽ', - 'ӿ' => 'Ӿ', - 'ԁ' => 'Ԁ', - 'ԃ' => 'Ԃ', - 'ԅ' => 'Ԅ', - 'ԇ' => 'Ԇ', - 'ԉ' => 'Ԉ', - 'ԋ' => 'Ԋ', - 'ԍ' => 'Ԍ', - 'ԏ' => 'Ԏ', - 'ԑ' => 'Ԑ', - 'ԓ' => 'Ԓ', - 'ԕ' => 'Ԕ', - 'ԗ' => 'Ԗ', - 'ԙ' => 'Ԙ', - 'ԛ' => 'Ԛ', - 'ԝ' => 'Ԝ', - 'ԟ' => 'Ԟ', - 'ԡ' => 'Ԡ', - 'ԣ' => 'Ԣ', - 'ԥ' => 'Ԥ', - 'ԧ' => 'Ԧ', - 'ԩ' => 'Ԩ', - 'ԫ' => 'Ԫ', - 'ԭ' => 'Ԭ', - 'ԯ' => 'Ԯ', - 'ա' => 'Ա', - 'բ' => 'Բ', - 'գ' => 'Գ', - 'դ' => 'Դ', - 'ե' => 'Ե', - 'զ' => 'Զ', - 'է' => 'Է', - 'ը' => 'Ը', - 'թ' => 'Թ', - 'ժ' => 'Ժ', - 'ի' => 'Ի', - 'լ' => 'Լ', - 'խ' => 'Խ', - 'ծ' => 'Ծ', - 'կ' => 'Կ', - 'հ' => 'Հ', - 'ձ' => 'Ձ', - 'ղ' => 'Ղ', - 'ճ' => 'Ճ', - 'մ' => 'Մ', - 'յ' => 'Յ', - 'ն' => 'Ն', - 'շ' => 'Շ', - 'ո' => 'Ո', - 'չ' => 'Չ', - 'պ' => 'Պ', - 'ջ' => 'Ջ', - 'ռ' => 'Ռ', - 'ս' => 'Ս', - 'վ' => 'Վ', - 'տ' => 'Տ', - 'ր' => 'Ր', - 'ց' => 'Ց', - 'ւ' => 'Ւ', - 'փ' => 'Փ', - 'ք' => 'Ք', - 'օ' => 'Օ', - 'ֆ' => 'Ֆ', - 'ა' => 'Ა', - 'ბ' => 'Ბ', - 'გ' => 'Გ', - 'დ' => 'Დ', - 'ე' => 'Ე', - 'ვ' => 'Ვ', - 'ზ' => 'Ზ', - 'თ' => 'Თ', - 'ი' => 'Ი', - 'კ' => 'Კ', - 'ლ' => 'Ლ', - 'მ' => 'Მ', - 'ნ' => 'Ნ', - 'ო' => 'Ო', - 'პ' => 'Პ', - 'ჟ' => 'Ჟ', - 'რ' => 'Რ', - 'ს' => 'Ს', - 'ტ' => 'Ტ', - 'უ' => 'Უ', - 'ფ' => 'Ფ', - 'ქ' => 'Ქ', - 'ღ' => 'Ღ', - 'ყ' => 'Ყ', - 'შ' => 'Შ', - 'ჩ' => 'Ჩ', - 'ც' => 'Ც', - 'ძ' => 'Ძ', - 'წ' => 'Წ', - 'ჭ' => 'Ჭ', - 'ხ' => 'Ხ', - 'ჯ' => 'Ჯ', - 'ჰ' => 'Ჰ', - 'ჱ' => 'Ჱ', - 'ჲ' => 'Ჲ', - 'ჳ' => 'Ჳ', - 'ჴ' => 'Ჴ', - 'ჵ' => 'Ჵ', - 'ჶ' => 'Ჶ', - 'ჷ' => 'Ჷ', - 'ჸ' => 'Ჸ', - 'ჹ' => 'Ჹ', - 'ჺ' => 'Ჺ', - 'ჽ' => 'Ჽ', - 'ჾ' => 'Ჾ', - 'ჿ' => 'Ჿ', - 'ᏸ' => 'Ᏸ', - 'ᏹ' => 'Ᏹ', - 'ᏺ' => 'Ᏺ', - 'ᏻ' => 'Ᏻ', - 'ᏼ' => 'Ᏼ', - 'ᏽ' => 'Ᏽ', - 'ᲀ' => 'В', - 'ᲁ' => 'Д', - 'ᲂ' => 'О', - 'ᲃ' => 'С', - 'ᲄ' => 'Т', - 'ᲅ' => 'Т', - 'ᲆ' => 'Ъ', - 'ᲇ' => 'Ѣ', - 'ᲈ' => 'Ꙋ', - 'ᵹ' => 'Ᵹ', - 'ᵽ' => 'Ᵽ', - 'ᶎ' => 'Ᶎ', - 'ḁ' => 'Ḁ', - 'ḃ' => 'Ḃ', - 'ḅ' => 'Ḅ', - 'ḇ' => 'Ḇ', - 'ḉ' => 'Ḉ', - 'ḋ' => 'Ḋ', - 'ḍ' => 'Ḍ', - 'ḏ' => 'Ḏ', - 'ḑ' => 'Ḑ', - 'ḓ' => 'Ḓ', - 'ḕ' => 'Ḕ', - 'ḗ' => 'Ḗ', - 'ḙ' => 'Ḙ', - 'ḛ' => 'Ḛ', - 'ḝ' => 'Ḝ', - 'ḟ' => 'Ḟ', - 'ḡ' => 'Ḡ', - 'ḣ' => 'Ḣ', - 'ḥ' => 'Ḥ', - 'ḧ' => 'Ḧ', - 'ḩ' => 'Ḩ', - 'ḫ' => 'Ḫ', - 'ḭ' => 'Ḭ', - 'ḯ' => 'Ḯ', - 'ḱ' => 'Ḱ', - 'ḳ' => 'Ḳ', - 'ḵ' => 'Ḵ', - 'ḷ' => 'Ḷ', - 'ḹ' => 'Ḹ', - 'ḻ' => 'Ḻ', - 'ḽ' => 'Ḽ', - 'ḿ' => 'Ḿ', - 'ṁ' => 'Ṁ', - 'ṃ' => 'Ṃ', - 'ṅ' => 'Ṅ', - 'ṇ' => 'Ṇ', - 'ṉ' => 'Ṉ', - 'ṋ' => 'Ṋ', - 'ṍ' => 'Ṍ', - 'ṏ' => 'Ṏ', - 'ṑ' => 'Ṑ', - 'ṓ' => 'Ṓ', - 'ṕ' => 'Ṕ', - 'ṗ' => 'Ṗ', - 'ṙ' => 'Ṙ', - 'ṛ' => 'Ṛ', - 'ṝ' => 'Ṝ', - 'ṟ' => 'Ṟ', - 'ṡ' => 'Ṡ', - 'ṣ' => 'Ṣ', - 'ṥ' => 'Ṥ', - 'ṧ' => 'Ṧ', - 'ṩ' => 'Ṩ', - 'ṫ' => 'Ṫ', - 'ṭ' => 'Ṭ', - 'ṯ' => 'Ṯ', - 'ṱ' => 'Ṱ', - 'ṳ' => 'Ṳ', - 'ṵ' => 'Ṵ', - 'ṷ' => 'Ṷ', - 'ṹ' => 'Ṹ', - 'ṻ' => 'Ṻ', - 'ṽ' => 'Ṽ', - 'ṿ' => 'Ṿ', - 'ẁ' => 'Ẁ', - 'ẃ' => 'Ẃ', - 'ẅ' => 'Ẅ', - 'ẇ' => 'Ẇ', - 'ẉ' => 'Ẉ', - 'ẋ' => 'Ẋ', - 'ẍ' => 'Ẍ', - 'ẏ' => 'Ẏ', - 'ẑ' => 'Ẑ', - 'ẓ' => 'Ẓ', - 'ẕ' => 'Ẕ', - 'ẛ' => 'Ṡ', - 'ạ' => 'Ạ', - 'ả' => 'Ả', - 'ấ' => 'Ấ', - 'ầ' => 'Ầ', - 'ẩ' => 'Ẩ', - 'ẫ' => 'Ẫ', - 'ậ' => 'Ậ', - 'ắ' => 'Ắ', - 'ằ' => 'Ằ', - 'ẳ' => 'Ẳ', - 'ẵ' => 'Ẵ', - 'ặ' => 'Ặ', - 'ẹ' => 'Ẹ', - 'ẻ' => 'Ẻ', - 'ẽ' => 'Ẽ', - 'ế' => 'Ế', - 'ề' => 'Ề', - 'ể' => 'Ể', - 'ễ' => 'Ễ', - 'ệ' => 'Ệ', - 'ỉ' => 'Ỉ', - 'ị' => 'Ị', - 'ọ' => 'Ọ', - 'ỏ' => 'Ỏ', - 'ố' => 'Ố', - 'ồ' => 'Ồ', - 'ổ' => 'Ổ', - 'ỗ' => 'Ỗ', - 'ộ' => 'Ộ', - 'ớ' => 'Ớ', - 'ờ' => 'Ờ', - 'ở' => 'Ở', - 'ỡ' => 'Ỡ', - 'ợ' => 'Ợ', - 'ụ' => 'Ụ', - 'ủ' => 'Ủ', - 'ứ' => 'Ứ', - 'ừ' => 'Ừ', - 'ử' => 'Ử', - 'ữ' => 'Ữ', - 'ự' => 'Ự', - 'ỳ' => 'Ỳ', - 'ỵ' => 'Ỵ', - 'ỷ' => 'Ỷ', - 'ỹ' => 'Ỹ', - 'ỻ' => 'Ỻ', - 'ỽ' => 'Ỽ', - 'ỿ' => 'Ỿ', - 'ἀ' => 'Ἀ', - 'ἁ' => 'Ἁ', - 'ἂ' => 'Ἂ', - 'ἃ' => 'Ἃ', - 'ἄ' => 'Ἄ', - 'ἅ' => 'Ἅ', - 'ἆ' => 'Ἆ', - 'ἇ' => 'Ἇ', - 'ἐ' => 'Ἐ', - 'ἑ' => 'Ἑ', - 'ἒ' => 'Ἒ', - 'ἓ' => 'Ἓ', - 'ἔ' => 'Ἔ', - 'ἕ' => 'Ἕ', - 'ἠ' => 'Ἠ', - 'ἡ' => 'Ἡ', - 'ἢ' => 'Ἢ', - 'ἣ' => 'Ἣ', - 'ἤ' => 'Ἤ', - 'ἥ' => 'Ἥ', - 'ἦ' => 'Ἦ', - 'ἧ' => 'Ἧ', - 'ἰ' => 'Ἰ', - 'ἱ' => 'Ἱ', - 'ἲ' => 'Ἲ', - 'ἳ' => 'Ἳ', - 'ἴ' => 'Ἴ', - 'ἵ' => 'Ἵ', - 'ἶ' => 'Ἶ', - 'ἷ' => 'Ἷ', - 'ὀ' => 'Ὀ', - 'ὁ' => 'Ὁ', - 'ὂ' => 'Ὂ', - 'ὃ' => 'Ὃ', - 'ὄ' => 'Ὄ', - 'ὅ' => 'Ὅ', - 'ὑ' => 'Ὑ', - 'ὓ' => 'Ὓ', - 'ὕ' => 'Ὕ', - 'ὗ' => 'Ὗ', - 'ὠ' => 'Ὠ', - 'ὡ' => 'Ὡ', - 'ὢ' => 'Ὢ', - 'ὣ' => 'Ὣ', - 'ὤ' => 'Ὤ', - 'ὥ' => 'Ὥ', - 'ὦ' => 'Ὦ', - 'ὧ' => 'Ὧ', - 'ὰ' => 'Ὰ', - 'ά' => 'Ά', - 'ὲ' => 'Ὲ', - 'έ' => 'Έ', - 'ὴ' => 'Ὴ', - 'ή' => 'Ή', - 'ὶ' => 'Ὶ', - 'ί' => 'Ί', - 'ὸ' => 'Ὸ', - 'ό' => 'Ό', - 'ὺ' => 'Ὺ', - 'ύ' => 'Ύ', - 'ὼ' => 'Ὼ', - 'ώ' => 'Ώ', - 'ᾀ' => 'ἈΙ', - 'ᾁ' => 'ἉΙ', - 'ᾂ' => 'ἊΙ', - 'ᾃ' => 'ἋΙ', - 'ᾄ' => 'ἌΙ', - 'ᾅ' => 'ἍΙ', - 'ᾆ' => 'ἎΙ', - 'ᾇ' => 'ἏΙ', - 'ᾐ' => 'ἨΙ', - 'ᾑ' => 'ἩΙ', - 'ᾒ' => 'ἪΙ', - 'ᾓ' => 'ἫΙ', - 'ᾔ' => 'ἬΙ', - 'ᾕ' => 'ἭΙ', - 'ᾖ' => 'ἮΙ', - 'ᾗ' => 'ἯΙ', - 'ᾠ' => 'ὨΙ', - 'ᾡ' => 'ὩΙ', - 'ᾢ' => 'ὪΙ', - 'ᾣ' => 'ὫΙ', - 'ᾤ' => 'ὬΙ', - 'ᾥ' => 'ὭΙ', - 'ᾦ' => 'ὮΙ', - 'ᾧ' => 'ὯΙ', - 'ᾰ' => 'Ᾰ', - 'ᾱ' => 'Ᾱ', - 'ᾳ' => 'ΑΙ', - 'ι' => 'Ι', - 'ῃ' => 'ΗΙ', - 'ῐ' => 'Ῐ', - 'ῑ' => 'Ῑ', - 'ῠ' => 'Ῠ', - 'ῡ' => 'Ῡ', - 'ῥ' => 'Ῥ', - 'ῳ' => 'ΩΙ', - 'ⅎ' => 'Ⅎ', - 'ⅰ' => 'Ⅰ', - 'ⅱ' => 'Ⅱ', - 'ⅲ' => 'Ⅲ', - 'ⅳ' => 'Ⅳ', - 'ⅴ' => 'Ⅴ', - 'ⅵ' => 'Ⅵ', - 'ⅶ' => 'Ⅶ', - 'ⅷ' => 'Ⅷ', - 'ⅸ' => 'Ⅸ', - 'ⅹ' => 'Ⅹ', - 'ⅺ' => 'Ⅺ', - 'ⅻ' => 'Ⅻ', - 'ⅼ' => 'Ⅼ', - 'ⅽ' => 'Ⅽ', - 'ⅾ' => 'Ⅾ', - 'ⅿ' => 'Ⅿ', - 'ↄ' => 'Ↄ', - 'ⓐ' => 'Ⓐ', - 'ⓑ' => 'Ⓑ', - 'ⓒ' => 'Ⓒ', - 'ⓓ' => 'Ⓓ', - 'ⓔ' => 'Ⓔ', - 'ⓕ' => 'Ⓕ', - 'ⓖ' => 'Ⓖ', - 'ⓗ' => 'Ⓗ', - 'ⓘ' => 'Ⓘ', - 'ⓙ' => 'Ⓙ', - 'ⓚ' => 'Ⓚ', - 'ⓛ' => 'Ⓛ', - 'ⓜ' => 'Ⓜ', - 'ⓝ' => 'Ⓝ', - 'ⓞ' => 'Ⓞ', - 'ⓟ' => 'Ⓟ', - 'ⓠ' => 'Ⓠ', - 'ⓡ' => 'Ⓡ', - 'ⓢ' => 'Ⓢ', - 'ⓣ' => 'Ⓣ', - 'ⓤ' => 'Ⓤ', - 'ⓥ' => 'Ⓥ', - 'ⓦ' => 'Ⓦ', - 'ⓧ' => 'Ⓧ', - 'ⓨ' => 'Ⓨ', - 'ⓩ' => 'Ⓩ', - 'ⰰ' => 'Ⰰ', - 'ⰱ' => 'Ⰱ', - 'ⰲ' => 'Ⰲ', - 'ⰳ' => 'Ⰳ', - 'ⰴ' => 'Ⰴ', - 'ⰵ' => 'Ⰵ', - 'ⰶ' => 'Ⰶ', - 'ⰷ' => 'Ⰷ', - 'ⰸ' => 'Ⰸ', - 'ⰹ' => 'Ⰹ', - 'ⰺ' => 'Ⰺ', - 'ⰻ' => 'Ⰻ', - 'ⰼ' => 'Ⰼ', - 'ⰽ' => 'Ⰽ', - 'ⰾ' => 'Ⰾ', - 'ⰿ' => 'Ⰿ', - 'ⱀ' => 'Ⱀ', - 'ⱁ' => 'Ⱁ', - 'ⱂ' => 'Ⱂ', - 'ⱃ' => 'Ⱃ', - 'ⱄ' => 'Ⱄ', - 'ⱅ' => 'Ⱅ', - 'ⱆ' => 'Ⱆ', - 'ⱇ' => 'Ⱇ', - 'ⱈ' => 'Ⱈ', - 'ⱉ' => 'Ⱉ', - 'ⱊ' => 'Ⱊ', - 'ⱋ' => 'Ⱋ', - 'ⱌ' => 'Ⱌ', - 'ⱍ' => 'Ⱍ', - 'ⱎ' => 'Ⱎ', - 'ⱏ' => 'Ⱏ', - 'ⱐ' => 'Ⱐ', - 'ⱑ' => 'Ⱑ', - 'ⱒ' => 'Ⱒ', - 'ⱓ' => 'Ⱓ', - 'ⱔ' => 'Ⱔ', - 'ⱕ' => 'Ⱕ', - 'ⱖ' => 'Ⱖ', - 'ⱗ' => 'Ⱗ', - 'ⱘ' => 'Ⱘ', - 'ⱙ' => 'Ⱙ', - 'ⱚ' => 'Ⱚ', - 'ⱛ' => 'Ⱛ', - 'ⱜ' => 'Ⱜ', - 'ⱝ' => 'Ⱝ', - 'ⱞ' => 'Ⱞ', - 'ⱡ' => 'Ⱡ', - 'ⱥ' => 'Ⱥ', - 'ⱦ' => 'Ⱦ', - 'ⱨ' => 'Ⱨ', - 'ⱪ' => 'Ⱪ', - 'ⱬ' => 'Ⱬ', - 'ⱳ' => 'Ⱳ', - 'ⱶ' => 'Ⱶ', - 'ⲁ' => 'Ⲁ', - 'ⲃ' => 'Ⲃ', - 'ⲅ' => 'Ⲅ', - 'ⲇ' => 'Ⲇ', - 'ⲉ' => 'Ⲉ', - 'ⲋ' => 'Ⲋ', - 'ⲍ' => 'Ⲍ', - 'ⲏ' => 'Ⲏ', - 'ⲑ' => 'Ⲑ', - 'ⲓ' => 'Ⲓ', - 'ⲕ' => 'Ⲕ', - 'ⲗ' => 'Ⲗ', - 'ⲙ' => 'Ⲙ', - 'ⲛ' => 'Ⲛ', - 'ⲝ' => 'Ⲝ', - 'ⲟ' => 'Ⲟ', - 'ⲡ' => 'Ⲡ', - 'ⲣ' => 'Ⲣ', - 'ⲥ' => 'Ⲥ', - 'ⲧ' => 'Ⲧ', - 'ⲩ' => 'Ⲩ', - 'ⲫ' => 'Ⲫ', - 'ⲭ' => 'Ⲭ', - 'ⲯ' => 'Ⲯ', - 'ⲱ' => 'Ⲱ', - 'ⲳ' => 'Ⲳ', - 'ⲵ' => 'Ⲵ', - 'ⲷ' => 'Ⲷ', - 'ⲹ' => 'Ⲹ', - 'ⲻ' => 'Ⲻ', - 'ⲽ' => 'Ⲽ', - 'ⲿ' => 'Ⲿ', - 'ⳁ' => 'Ⳁ', - 'ⳃ' => 'Ⳃ', - 'ⳅ' => 'Ⳅ', - 'ⳇ' => 'Ⳇ', - 'ⳉ' => 'Ⳉ', - 'ⳋ' => 'Ⳋ', - 'ⳍ' => 'Ⳍ', - 'ⳏ' => 'Ⳏ', - 'ⳑ' => 'Ⳑ', - 'ⳓ' => 'Ⳓ', - 'ⳕ' => 'Ⳕ', - 'ⳗ' => 'Ⳗ', - 'ⳙ' => 'Ⳙ', - 'ⳛ' => 'Ⳛ', - 'ⳝ' => 'Ⳝ', - 'ⳟ' => 'Ⳟ', - 'ⳡ' => 'Ⳡ', - 'ⳣ' => 'Ⳣ', - 'ⳬ' => 'Ⳬ', - 'ⳮ' => 'Ⳮ', - 'ⳳ' => 'Ⳳ', - 'ⴀ' => 'Ⴀ', - 'ⴁ' => 'Ⴁ', - 'ⴂ' => 'Ⴂ', - 'ⴃ' => 'Ⴃ', - 'ⴄ' => 'Ⴄ', - 'ⴅ' => 'Ⴅ', - 'ⴆ' => 'Ⴆ', - 'ⴇ' => 'Ⴇ', - 'ⴈ' => 'Ⴈ', - 'ⴉ' => 'Ⴉ', - 'ⴊ' => 'Ⴊ', - 'ⴋ' => 'Ⴋ', - 'ⴌ' => 'Ⴌ', - 'ⴍ' => 'Ⴍ', - 'ⴎ' => 'Ⴎ', - 'ⴏ' => 'Ⴏ', - 'ⴐ' => 'Ⴐ', - 'ⴑ' => 'Ⴑ', - 'ⴒ' => 'Ⴒ', - 'ⴓ' => 'Ⴓ', - 'ⴔ' => 'Ⴔ', - 'ⴕ' => 'Ⴕ', - 'ⴖ' => 'Ⴖ', - 'ⴗ' => 'Ⴗ', - 'ⴘ' => 'Ⴘ', - 'ⴙ' => 'Ⴙ', - 'ⴚ' => 'Ⴚ', - 'ⴛ' => 'Ⴛ', - 'ⴜ' => 'Ⴜ', - 'ⴝ' => 'Ⴝ', - 'ⴞ' => 'Ⴞ', - 'ⴟ' => 'Ⴟ', - 'ⴠ' => 'Ⴠ', - 'ⴡ' => 'Ⴡ', - 'ⴢ' => 'Ⴢ', - 'ⴣ' => 'Ⴣ', - 'ⴤ' => 'Ⴤ', - 'ⴥ' => 'Ⴥ', - 'ⴧ' => 'Ⴧ', - 'ⴭ' => 'Ⴭ', - 'ꙁ' => 'Ꙁ', - 'ꙃ' => 'Ꙃ', - 'ꙅ' => 'Ꙅ', - 'ꙇ' => 'Ꙇ', - 'ꙉ' => 'Ꙉ', - 'ꙋ' => 'Ꙋ', - 'ꙍ' => 'Ꙍ', - 'ꙏ' => 'Ꙏ', - 'ꙑ' => 'Ꙑ', - 'ꙓ' => 'Ꙓ', - 'ꙕ' => 'Ꙕ', - 'ꙗ' => 'Ꙗ', - 'ꙙ' => 'Ꙙ', - 'ꙛ' => 'Ꙛ', - 'ꙝ' => 'Ꙝ', - 'ꙟ' => 'Ꙟ', - 'ꙡ' => 'Ꙡ', - 'ꙣ' => 'Ꙣ', - 'ꙥ' => 'Ꙥ', - 'ꙧ' => 'Ꙧ', - 'ꙩ' => 'Ꙩ', - 'ꙫ' => 'Ꙫ', - 'ꙭ' => 'Ꙭ', - 'ꚁ' => 'Ꚁ', - 'ꚃ' => 'Ꚃ', - 'ꚅ' => 'Ꚅ', - 'ꚇ' => 'Ꚇ', - 'ꚉ' => 'Ꚉ', - 'ꚋ' => 'Ꚋ', - 'ꚍ' => 'Ꚍ', - 'ꚏ' => 'Ꚏ', - 'ꚑ' => 'Ꚑ', - 'ꚓ' => 'Ꚓ', - 'ꚕ' => 'Ꚕ', - 'ꚗ' => 'Ꚗ', - 'ꚙ' => 'Ꚙ', - 'ꚛ' => 'Ꚛ', - 'ꜣ' => 'Ꜣ', - 'ꜥ' => 'Ꜥ', - 'ꜧ' => 'Ꜧ', - 'ꜩ' => 'Ꜩ', - 'ꜫ' => 'Ꜫ', - 'ꜭ' => 'Ꜭ', - 'ꜯ' => 'Ꜯ', - 'ꜳ' => 'Ꜳ', - 'ꜵ' => 'Ꜵ', - 'ꜷ' => 'Ꜷ', - 'ꜹ' => 'Ꜹ', - 'ꜻ' => 'Ꜻ', - 'ꜽ' => 'Ꜽ', - 'ꜿ' => 'Ꜿ', - 'ꝁ' => 'Ꝁ', - 'ꝃ' => 'Ꝃ', - 'ꝅ' => 'Ꝅ', - 'ꝇ' => 'Ꝇ', - 'ꝉ' => 'Ꝉ', - 'ꝋ' => 'Ꝋ', - 'ꝍ' => 'Ꝍ', - 'ꝏ' => 'Ꝏ', - 'ꝑ' => 'Ꝑ', - 'ꝓ' => 'Ꝓ', - 'ꝕ' => 'Ꝕ', - 'ꝗ' => 'Ꝗ', - 'ꝙ' => 'Ꝙ', - 'ꝛ' => 'Ꝛ', - 'ꝝ' => 'Ꝝ', - 'ꝟ' => 'Ꝟ', - 'ꝡ' => 'Ꝡ', - 'ꝣ' => 'Ꝣ', - 'ꝥ' => 'Ꝥ', - 'ꝧ' => 'Ꝧ', - 'ꝩ' => 'Ꝩ', - 'ꝫ' => 'Ꝫ', - 'ꝭ' => 'Ꝭ', - 'ꝯ' => 'Ꝯ', - 'ꝺ' => 'Ꝺ', - 'ꝼ' => 'Ꝼ', - 'ꝿ' => 'Ꝿ', - 'ꞁ' => 'Ꞁ', - 'ꞃ' => 'Ꞃ', - 'ꞅ' => 'Ꞅ', - 'ꞇ' => 'Ꞇ', - 'ꞌ' => 'Ꞌ', - 'ꞑ' => 'Ꞑ', - 'ꞓ' => 'Ꞓ', - 'ꞔ' => 'Ꞔ', - 'ꞗ' => 'Ꞗ', - 'ꞙ' => 'Ꞙ', - 'ꞛ' => 'Ꞛ', - 'ꞝ' => 'Ꞝ', - 'ꞟ' => 'Ꞟ', - 'ꞡ' => 'Ꞡ', - 'ꞣ' => 'Ꞣ', - 'ꞥ' => 'Ꞥ', - 'ꞧ' => 'Ꞧ', - 'ꞩ' => 'Ꞩ', - 'ꞵ' => 'Ꞵ', - 'ꞷ' => 'Ꞷ', - 'ꞹ' => 'Ꞹ', - 'ꞻ' => 'Ꞻ', - 'ꞽ' => 'Ꞽ', - 'ꞿ' => 'Ꞿ', - 'ꟃ' => 'Ꟃ', - 'ꟈ' => 'Ꟈ', - 'ꟊ' => 'Ꟊ', - 'ꟶ' => 'Ꟶ', - 'ꭓ' => 'Ꭓ', - 'ꭰ' => 'Ꭰ', - 'ꭱ' => 'Ꭱ', - 'ꭲ' => 'Ꭲ', - 'ꭳ' => 'Ꭳ', - 'ꭴ' => 'Ꭴ', - 'ꭵ' => 'Ꭵ', - 'ꭶ' => 'Ꭶ', - 'ꭷ' => 'Ꭷ', - 'ꭸ' => 'Ꭸ', - 'ꭹ' => 'Ꭹ', - 'ꭺ' => 'Ꭺ', - 'ꭻ' => 'Ꭻ', - 'ꭼ' => 'Ꭼ', - 'ꭽ' => 'Ꭽ', - 'ꭾ' => 'Ꭾ', - 'ꭿ' => 'Ꭿ', - 'ꮀ' => 'Ꮀ', - 'ꮁ' => 'Ꮁ', - 'ꮂ' => 'Ꮂ', - 'ꮃ' => 'Ꮃ', - 'ꮄ' => 'Ꮄ', - 'ꮅ' => 'Ꮅ', - 'ꮆ' => 'Ꮆ', - 'ꮇ' => 'Ꮇ', - 'ꮈ' => 'Ꮈ', - 'ꮉ' => 'Ꮉ', - 'ꮊ' => 'Ꮊ', - 'ꮋ' => 'Ꮋ', - 'ꮌ' => 'Ꮌ', - 'ꮍ' => 'Ꮍ', - 'ꮎ' => 'Ꮎ', - 'ꮏ' => 'Ꮏ', - 'ꮐ' => 'Ꮐ', - 'ꮑ' => 'Ꮑ', - 'ꮒ' => 'Ꮒ', - 'ꮓ' => 'Ꮓ', - 'ꮔ' => 'Ꮔ', - 'ꮕ' => 'Ꮕ', - 'ꮖ' => 'Ꮖ', - 'ꮗ' => 'Ꮗ', - 'ꮘ' => 'Ꮘ', - 'ꮙ' => 'Ꮙ', - 'ꮚ' => 'Ꮚ', - 'ꮛ' => 'Ꮛ', - 'ꮜ' => 'Ꮜ', - 'ꮝ' => 'Ꮝ', - 'ꮞ' => 'Ꮞ', - 'ꮟ' => 'Ꮟ', - 'ꮠ' => 'Ꮠ', - 'ꮡ' => 'Ꮡ', - 'ꮢ' => 'Ꮢ', - 'ꮣ' => 'Ꮣ', - 'ꮤ' => 'Ꮤ', - 'ꮥ' => 'Ꮥ', - 'ꮦ' => 'Ꮦ', - 'ꮧ' => 'Ꮧ', - 'ꮨ' => 'Ꮨ', - 'ꮩ' => 'Ꮩ', - 'ꮪ' => 'Ꮪ', - 'ꮫ' => 'Ꮫ', - 'ꮬ' => 'Ꮬ', - 'ꮭ' => 'Ꮭ', - 'ꮮ' => 'Ꮮ', - 'ꮯ' => 'Ꮯ', - 'ꮰ' => 'Ꮰ', - 'ꮱ' => 'Ꮱ', - 'ꮲ' => 'Ꮲ', - 'ꮳ' => 'Ꮳ', - 'ꮴ' => 'Ꮴ', - 'ꮵ' => 'Ꮵ', - 'ꮶ' => 'Ꮶ', - 'ꮷ' => 'Ꮷ', - 'ꮸ' => 'Ꮸ', - 'ꮹ' => 'Ꮹ', - 'ꮺ' => 'Ꮺ', - 'ꮻ' => 'Ꮻ', - 'ꮼ' => 'Ꮼ', - 'ꮽ' => 'Ꮽ', - 'ꮾ' => 'Ꮾ', - 'ꮿ' => 'Ꮿ', - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - '𐐨' => '𐐀', - '𐐩' => '𐐁', - '𐐪' => '𐐂', - '𐐫' => '𐐃', - '𐐬' => '𐐄', - '𐐭' => '𐐅', - '𐐮' => '𐐆', - '𐐯' => '𐐇', - '𐐰' => '𐐈', - '𐐱' => '𐐉', - '𐐲' => '𐐊', - '𐐳' => '𐐋', - '𐐴' => '𐐌', - '𐐵' => '𐐍', - '𐐶' => '𐐎', - '𐐷' => '𐐏', - '𐐸' => '𐐐', - '𐐹' => '𐐑', - '𐐺' => '𐐒', - '𐐻' => '𐐓', - '𐐼' => '𐐔', - '𐐽' => '𐐕', - '𐐾' => '𐐖', - '𐐿' => '𐐗', - '𐑀' => '𐐘', - '𐑁' => '𐐙', - '𐑂' => '𐐚', - '𐑃' => '𐐛', - '𐑄' => '𐐜', - '𐑅' => '𐐝', - '𐑆' => '𐐞', - '𐑇' => '𐐟', - '𐑈' => '𐐠', - '𐑉' => '𐐡', - '𐑊' => '𐐢', - '𐑋' => '𐐣', - '𐑌' => '𐐤', - '𐑍' => '𐐥', - '𐑎' => '𐐦', - '𐑏' => '𐐧', - '𐓘' => '𐒰', - '𐓙' => '𐒱', - '𐓚' => '𐒲', - '𐓛' => '𐒳', - '𐓜' => '𐒴', - '𐓝' => '𐒵', - '𐓞' => '𐒶', - '𐓟' => '𐒷', - '𐓠' => '𐒸', - '𐓡' => '𐒹', - '𐓢' => '𐒺', - '𐓣' => '𐒻', - '𐓤' => '𐒼', - '𐓥' => '𐒽', - '𐓦' => '𐒾', - '𐓧' => '𐒿', - '𐓨' => '𐓀', - '𐓩' => '𐓁', - '𐓪' => '𐓂', - '𐓫' => '𐓃', - '𐓬' => '𐓄', - '𐓭' => '𐓅', - '𐓮' => '𐓆', - '𐓯' => '𐓇', - '𐓰' => '𐓈', - '𐓱' => '𐓉', - '𐓲' => '𐓊', - '𐓳' => '𐓋', - '𐓴' => '𐓌', - '𐓵' => '𐓍', - '𐓶' => '𐓎', - '𐓷' => '𐓏', - '𐓸' => '𐓐', - '𐓹' => '𐓑', - '𐓺' => '𐓒', - '𐓻' => '𐓓', - '𐳀' => '𐲀', - '𐳁' => '𐲁', - '𐳂' => '𐲂', - '𐳃' => '𐲃', - '𐳄' => '𐲄', - '𐳅' => '𐲅', - '𐳆' => '𐲆', - '𐳇' => '𐲇', - '𐳈' => '𐲈', - '𐳉' => '𐲉', - '𐳊' => '𐲊', - '𐳋' => '𐲋', - '𐳌' => '𐲌', - '𐳍' => '𐲍', - '𐳎' => '𐲎', - '𐳏' => '𐲏', - '𐳐' => '𐲐', - '𐳑' => '𐲑', - '𐳒' => '𐲒', - '𐳓' => '𐲓', - '𐳔' => '𐲔', - '𐳕' => '𐲕', - '𐳖' => '𐲖', - '𐳗' => '𐲗', - '𐳘' => '𐲘', - '𐳙' => '𐲙', - '𐳚' => '𐲚', - '𐳛' => '𐲛', - '𐳜' => '𐲜', - '𐳝' => '𐲝', - '𐳞' => '𐲞', - '𐳟' => '𐲟', - '𐳠' => '𐲠', - '𐳡' => '𐲡', - '𐳢' => '𐲢', - '𐳣' => '𐲣', - '𐳤' => '𐲤', - '𐳥' => '𐲥', - '𐳦' => '𐲦', - '𐳧' => '𐲧', - '𐳨' => '𐲨', - '𐳩' => '𐲩', - '𐳪' => '𐲪', - '𐳫' => '𐲫', - '𐳬' => '𐲬', - '𐳭' => '𐲭', - '𐳮' => '𐲮', - '𐳯' => '𐲯', - '𐳰' => '𐲰', - '𐳱' => '𐲱', - '𐳲' => '𐲲', - '𑣀' => '𑢠', - '𑣁' => '𑢡', - '𑣂' => '𑢢', - '𑣃' => '𑢣', - '𑣄' => '𑢤', - '𑣅' => '𑢥', - '𑣆' => '𑢦', - '𑣇' => '𑢧', - '𑣈' => '𑢨', - '𑣉' => '𑢩', - '𑣊' => '𑢪', - '𑣋' => '𑢫', - '𑣌' => '𑢬', - '𑣍' => '𑢭', - '𑣎' => '𑢮', - '𑣏' => '𑢯', - '𑣐' => '𑢰', - '𑣑' => '𑢱', - '𑣒' => '𑢲', - '𑣓' => '𑢳', - '𑣔' => '𑢴', - '𑣕' => '𑢵', - '𑣖' => '𑢶', - '𑣗' => '𑢷', - '𑣘' => '𑢸', - '𑣙' => '𑢹', - '𑣚' => '𑢺', - '𑣛' => '𑢻', - '𑣜' => '𑢼', - '𑣝' => '𑢽', - '𑣞' => '𑢾', - '𑣟' => '𑢿', - '𖹠' => '𖹀', - '𖹡' => '𖹁', - '𖹢' => '𖹂', - '𖹣' => '𖹃', - '𖹤' => '𖹄', - '𖹥' => '𖹅', - '𖹦' => '𖹆', - '𖹧' => '𖹇', - '𖹨' => '𖹈', - '𖹩' => '𖹉', - '𖹪' => '𖹊', - '𖹫' => '𖹋', - '𖹬' => '𖹌', - '𖹭' => '𖹍', - '𖹮' => '𖹎', - '𖹯' => '𖹏', - '𖹰' => '𖹐', - '𖹱' => '𖹑', - '𖹲' => '𖹒', - '𖹳' => '𖹓', - '𖹴' => '𖹔', - '𖹵' => '𖹕', - '𖹶' => '𖹖', - '𖹷' => '𖹗', - '𖹸' => '𖹘', - '𖹹' => '𖹙', - '𖹺' => '𖹚', - '𖹻' => '𖹛', - '𖹼' => '𖹜', - '𖹽' => '𖹝', - '𖹾' => '𖹞', - '𖹿' => '𖹟', - '𞤢' => '𞤀', - '𞤣' => '𞤁', - '𞤤' => '𞤂', - '𞤥' => '𞤃', - '𞤦' => '𞤄', - '𞤧' => '𞤅', - '𞤨' => '𞤆', - '𞤩' => '𞤇', - '𞤪' => '𞤈', - '𞤫' => '𞤉', - '𞤬' => '𞤊', - '𞤭' => '𞤋', - '𞤮' => '𞤌', - '𞤯' => '𞤍', - '𞤰' => '𞤎', - '𞤱' => '𞤏', - '𞤲' => '𞤐', - '𞤳' => '𞤑', - '𞤴' => '𞤒', - '𞤵' => '𞤓', - '𞤶' => '𞤔', - '𞤷' => '𞤕', - '𞤸' => '𞤖', - '𞤹' => '𞤗', - '𞤺' => '𞤘', - '𞤻' => '𞤙', - '𞤼' => '𞤚', - '𞤽' => '𞤛', - '𞤾' => '𞤜', - '𞤿' => '𞤝', - '𞥀' => '𞤞', - '𞥁' => '𞤟', - '𞥂' => '𞤠', - '𞥃' => '𞤡', - 'ß' => 'SS', - 'ff' => 'FF', - 'fi' => 'FI', - 'fl' => 'FL', - 'ffi' => 'FFI', - 'ffl' => 'FFL', - 'ſt' => 'ST', - 'st' => 'ST', - 'և' => 'ԵՒ', - 'ﬓ' => 'ՄՆ', - 'ﬔ' => 'ՄԵ', - 'ﬕ' => 'ՄԻ', - 'ﬖ' => 'ՎՆ', - 'ﬗ' => 'ՄԽ', - 'ʼn' => 'ʼN', - 'ΐ' => 'Ϊ́', - 'ΰ' => 'Ϋ́', - 'ǰ' => 'J̌', - 'ẖ' => 'H̱', - 'ẗ' => 'T̈', - 'ẘ' => 'W̊', - 'ẙ' => 'Y̊', - 'ẚ' => 'Aʾ', - 'ὐ' => 'Υ̓', - 'ὒ' => 'Υ̓̀', - 'ὔ' => 'Υ̓́', - 'ὖ' => 'Υ̓͂', - 'ᾶ' => 'Α͂', - 'ῆ' => 'Η͂', - 'ῒ' => 'Ϊ̀', - 'ΐ' => 'Ϊ́', - 'ῖ' => 'Ι͂', - 'ῗ' => 'Ϊ͂', - 'ῢ' => 'Ϋ̀', - 'ΰ' => 'Ϋ́', - 'ῤ' => 'Ρ̓', - 'ῦ' => 'Υ͂', - 'ῧ' => 'Ϋ͂', - 'ῶ' => 'Ω͂', - 'ᾈ' => 'ἈΙ', - 'ᾉ' => 'ἉΙ', - 'ᾊ' => 'ἊΙ', - 'ᾋ' => 'ἋΙ', - 'ᾌ' => 'ἌΙ', - 'ᾍ' => 'ἍΙ', - 'ᾎ' => 'ἎΙ', - 'ᾏ' => 'ἏΙ', - 'ᾘ' => 'ἨΙ', - 'ᾙ' => 'ἩΙ', - 'ᾚ' => 'ἪΙ', - 'ᾛ' => 'ἫΙ', - 'ᾜ' => 'ἬΙ', - 'ᾝ' => 'ἭΙ', - 'ᾞ' => 'ἮΙ', - 'ᾟ' => 'ἯΙ', - 'ᾨ' => 'ὨΙ', - 'ᾩ' => 'ὩΙ', - 'ᾪ' => 'ὪΙ', - 'ᾫ' => 'ὫΙ', - 'ᾬ' => 'ὬΙ', - 'ᾭ' => 'ὭΙ', - 'ᾮ' => 'ὮΙ', - 'ᾯ' => 'ὯΙ', - 'ᾼ' => 'ΑΙ', - 'ῌ' => 'ΗΙ', - 'ῼ' => 'ΩΙ', - 'ᾲ' => 'ᾺΙ', - 'ᾴ' => 'ΆΙ', - 'ῂ' => 'ῊΙ', - 'ῄ' => 'ΉΙ', - 'ῲ' => 'ῺΙ', - 'ῴ' => 'ΏΙ', - 'ᾷ' => 'Α͂Ι', - 'ῇ' => 'Η͂Ι', - 'ῷ' => 'Ω͂Ι', -); diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php deleted file mode 100644 index 1fedd1f..0000000 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language($language = null) { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php deleted file mode 100644 index 82f5ac4..0000000 --- a/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -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); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json deleted file mode 100644 index 1fa21ca..0000000 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "symfony/polyfill-mbstring", - "type": "library", - "description": "Symfony polyfill for the Mbstring extension", - "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE deleted file mode 100644 index 3f853aa..0000000 --- a/vendor/symfony/polyfill-php73/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php73/Php73.php b/vendor/symfony/polyfill-php73/Php73.php deleted file mode 100644 index 65c35a6..0000000 --- a/vendor/symfony/polyfill-php73/Php73.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php73; - -/** - * @author Gabriel Caruso - * @author Ion Bazan - * - * @internal - */ -final class Php73 -{ - public static $startAt = 1533462603; - - /** - * @param bool $asNum - * - * @return array|float|int - */ - public static function hrtime($asNum = false) - { - $ns = microtime(false); - $s = substr($ns, 11) - self::$startAt; - $ns = 1E9 * (float) $ns; - - if ($asNum) { - $ns += $s * 1E9; - - return \PHP_INT_SIZE === 4 ? $ns : (int) $ns; - } - - return [$s, (int) $ns]; - } -} diff --git a/vendor/symfony/polyfill-php73/README.md b/vendor/symfony/polyfill-php73/README.md deleted file mode 100644 index b3ebbce..0000000 --- a/vendor/symfony/polyfill-php73/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Symfony Polyfill / Php73 -======================== - -This component provides functions added to PHP 7.3 core: - -- [`array_key_first`](https://php.net/array_key_first) -- [`array_key_last`](https://php.net/array_key_last) -- [`hrtime`](https://php.net/function.hrtime) -- [`is_countable`](https://php.net/is_countable) -- [`JsonException`](https://php.net/JsonException) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php b/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php deleted file mode 100644 index f06d6c2..0000000 --- a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 70300) { - class JsonException extends Exception - { - } -} diff --git a/vendor/symfony/polyfill-php73/bootstrap.php b/vendor/symfony/polyfill-php73/bootstrap.php deleted file mode 100644 index d6b2153..0000000 --- a/vendor/symfony/polyfill-php73/bootstrap.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php73 as p; - -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)); } -} diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json deleted file mode 100644 index a7fe478..0000000 --- a/vendor/symfony/polyfill-php73/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/polyfill-php73", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE deleted file mode 100644 index 5593b1d..0000000 --- a/vendor/symfony/polyfill-php80/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php80/Php80.php b/vendor/symfony/polyfill-php80/Php80.php deleted file mode 100644 index 362dd1a..0000000 --- a/vendor/symfony/polyfill-php80/Php80.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Ion Bazan - * @author Nico Oelgart - * @author Nicolas Grekas - * - * @internal - */ -final class Php80 -{ - public static function fdiv(float $dividend, float $divisor): float - { - return @($dividend / $divisor); - } - - public static function get_debug_type($value): string - { - switch (true) { - case null === $value: return 'null'; - case \is_bool($value): return 'bool'; - case \is_string($value): return 'string'; - case \is_array($value): return 'array'; - case \is_int($value): return 'int'; - case \is_float($value): return 'float'; - case \is_object($value): break; - case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; - default: - if (null === $type = @get_resource_type($value)) { - return 'unknown'; - } - - if ('Unknown' === $type) { - $type = 'closed'; - } - - return "resource ($type)"; - } - - $class = \get_class($value); - - if (false === strpos($class, '@')) { - return $class; - } - - return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; - } - - public static function get_resource_id($res): int - { - if (!\is_resource($res) && null === @get_resource_type($res)) { - throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); - } - - return (int) $res; - } - - public static function preg_last_error_msg(): string - { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - return 'Internal error'; - case \PREG_BAD_UTF8_ERROR: - return 'Malformed UTF-8 characters, possibly incorrectly encoded'; - 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: - return 'Backtrack limit exhausted'; - case \PREG_RECURSION_LIMIT_ERROR: - return 'Recursion limit exhausted'; - case \PREG_JIT_STACKLIMIT_ERROR: - return 'JIT stack limit exhausted'; - case \PREG_NO_ERROR: - return 'No error'; - default: - return 'Unknown error'; - } - } - - public static function str_contains(string $haystack, string $needle): bool - { - return '' === $needle || false !== strpos($haystack, $needle); - } - - public static function str_starts_with(string $haystack, string $needle): bool - { - return 0 === strncmp($haystack, $needle, \strlen($needle)); - } - - public static function str_ends_with(string $haystack, string $needle): bool - { - if ('' === $needle || $needle === $haystack) { - return true; - } - - if ('' === $haystack) { - return false; - } - - $needleLength = \strlen($needle); - - return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength); - } -} diff --git a/vendor/symfony/polyfill-php80/PhpToken.php b/vendor/symfony/polyfill-php80/PhpToken.php deleted file mode 100644 index fe6e691..0000000 --- a/vendor/symfony/polyfill-php80/PhpToken.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Fedonyuk Anton - * - * @internal - */ -class PhpToken implements \Stringable -{ - /** - * @var int - */ - public $id; - - /** - * @var string - */ - public $text; - - /** - * @var int - */ - public $line; - - /** - * @var int - */ - public $pos; - - public function __construct(int $id, string $text, int $line = -1, int $position = -1) - { - $this->id = $id; - $this->text = $text; - $this->line = $line; - $this->pos = $position; - } - - public function getTokenName(): ?string - { - if ('UNKNOWN' === $name = token_name($this->id)) { - $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text; - } - - return $name; - } - - /** - * @param int|string|array $kind - */ - public function is($kind): bool - { - foreach ((array) $kind as $value) { - if (\in_array($value, [$this->id, $this->text], true)) { - return true; - } - } - - return false; - } - - public function isIgnorable(): bool - { - return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true); - } - - public function __toString(): string - { - return (string) $this->text; - } - - /** - * @return static[] - */ - public static function tokenize(string $code, int $flags = 0): array - { - $line = 1; - $position = 0; - $tokens = token_get_all($code, $flags); - foreach ($tokens as $index => $token) { - if (\is_string($token)) { - $id = \ord($token); - $text = $token; - } else { - [$id, $text, $line] = $token; - } - $tokens[$index] = new static($id, $text, $line, $position); - $position += \strlen($text); - } - - return $tokens; - } -} diff --git a/vendor/symfony/polyfill-php80/README.md b/vendor/symfony/polyfill-php80/README.md deleted file mode 100644 index 10b8ee4..0000000 --- a/vendor/symfony/polyfill-php80/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Symfony Polyfill / Php80 -======================== - -This component provides features added to PHP 8.0 core: - -- `Stringable` interface -- [`fdiv`](https://php.net/fdiv) -- `ValueError` class -- `UnhandledMatchError` class -- `FILTER_VALIDATE_BOOL` constant -- [`get_debug_type`](https://php.net/get_debug_type) -- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) -- [`str_contains`](https://php.net/str_contains) -- [`str_starts_with`](https://php.net/str_starts_with) -- [`str_ends_with`](https://php.net/str_ends_with) -- [`get_resource_id`](https://php.net/get_resource_id) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php deleted file mode 100644 index 7ea6d27..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +++ /dev/null @@ -1,22 +0,0 @@ -flags = $flags; - } -} diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php deleted file mode 100644 index 72f1081..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +++ /dev/null @@ -1,7 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php80 as p; - -if (\PHP_VERSION_ID >= 80000) { - return; -} - -if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { - define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); -} - -if (!function_exists('fdiv')) { - function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } -} -if (!function_exists('preg_last_error_msg')) { - function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } -} -if (!function_exists('str_contains')) { - function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_starts_with')) { - function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_ends_with')) { - function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } -} -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($resource): int { return p\Php80::get_resource_id($resource); } -} diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json deleted file mode 100644 index 5fe679d..0000000 --- a/vendor/symfony/polyfill-php80/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "symfony/polyfill-php80", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php81/LICENSE b/vendor/symfony/polyfill-php81/LICENSE deleted file mode 100644 index efb17f9..0000000 --- a/vendor/symfony/polyfill-php81/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php81/Php81.php b/vendor/symfony/polyfill-php81/Php81.php deleted file mode 100644 index f0507b7..0000000 --- a/vendor/symfony/polyfill-php81/Php81.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * 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 - * - * @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; - } -} diff --git a/vendor/symfony/polyfill-php81/README.md b/vendor/symfony/polyfill-php81/README.md deleted file mode 100644 index 5ef61be..0000000 --- a/vendor/symfony/polyfill-php81/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Symfony Polyfill / Php81 -======================== - -This component provides features added to PHP 8.1 core: - -- [`array_is_list`](https://php.net/array_is_list) -- [`MYSQLI_REFRESH_REPLICA`](https://www.php.net/manual/en/mysqli.constants.php#constantmysqli-refresh-replica) constant -- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php deleted file mode 100644 index f4cad34..0000000 --- a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php +++ /dev/null @@ -1,11 +0,0 @@ - - * - * 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; } -} diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json deleted file mode 100644 index c39ccf4..0000000 --- a/vendor/symfony/polyfill-php81/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/polyfill-php81", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php81\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/property-access/CHANGELOG.md b/vendor/symfony/property-access/CHANGELOG.md deleted file mode 100644 index f90c6f5..0000000 --- a/vendor/symfony/property-access/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -CHANGELOG -========= - -5.3.0 ------ - - * deprecate passing a boolean as the second argument of `PropertyAccessor::__construct()`, expecting a combination of bitwise flags instead - -5.2.0 ------ - - * deprecated passing a boolean as the first argument of `PropertyAccessor::__construct()`, expecting a combination of bitwise flags instead - * added the ability to disable usage of the magic `__get` & `__set` methods - -5.1.0 ------ - - * Added an `UninitializedPropertyException` - * Linking to PropertyInfo extractor to remove a lot of duplicate code - -4.4.0 ------ - - * deprecated passing `null` as `$defaultLifetime` 2nd argument of `PropertyAccessor::createCache()` method, - pass `0` instead - -4.3.0 ------ - - * added a `$throwExceptionOnInvalidPropertyPath` argument to the PropertyAccessor constructor. - * added `enableExceptionOnInvalidPropertyPath()`, `disableExceptionOnInvalidPropertyPath()` and - `isExceptionOnInvalidPropertyPath()` methods to `PropertyAccessorBuilder` - -4.0.0 ------ - - * removed the `StringUtil` class, use `Symfony\Component\Inflector\Inflector` - -3.1.0 ------ - - * deprecated the `StringUtil` class, use `Symfony\Component\Inflector\Inflector` - instead - -2.7.0 ------- - - * `UnexpectedTypeException` now expects three constructor arguments: The invalid property value, - the `PropertyPathInterface` object and the current index of the property path. - -2.5.0 ------- - - * allowed non alpha numeric characters in second level and deeper object properties names - * [BC BREAK] when accessing an index on an object that does not implement - ArrayAccess, a NoSuchIndexException is now thrown instead of the - semantically wrong NoSuchPropertyException - * [BC BREAK] added isReadable() and isWritable() to PropertyAccessorInterface - -2.3.0 ------- - - * added PropertyAccessorBuilder, to enable or disable the support of "__call" - * added support for "__call" in the PropertyAccessor (disabled by default) - * [BC BREAK] changed PropertyAccessor to continue its search for a property or - method even if a non-public match was found. Before, a PropertyAccessDeniedException - was thrown in this case. Class PropertyAccessDeniedException was removed - now. - * deprecated PropertyAccess::getPropertyAccessor - * added PropertyAccess::createPropertyAccessor and PropertyAccess::createPropertyAccessorBuilder diff --git a/vendor/symfony/property-access/Exception/AccessException.php b/vendor/symfony/property-access/Exception/AccessException.php deleted file mode 100644 index b3a8546..0000000 --- a/vendor/symfony/property-access/Exception/AccessException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property path is not available. - * - * @author Stéphane Escandell - */ -class AccessException extends RuntimeException -{ -} diff --git a/vendor/symfony/property-access/Exception/ExceptionInterface.php b/vendor/symfony/property-access/Exception/ExceptionInterface.php deleted file mode 100644 index fabf9a0..0000000 --- a/vendor/symfony/property-access/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Marker interface for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/property-access/Exception/InvalidArgumentException.php b/vendor/symfony/property-access/Exception/InvalidArgumentException.php deleted file mode 100644 index 47bc7e1..0000000 --- a/vendor/symfony/property-access/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base InvalidArgumentException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/property-access/Exception/InvalidPropertyPathException.php b/vendor/symfony/property-access/Exception/InvalidPropertyPathException.php deleted file mode 100644 index 69de31c..0000000 --- a/vendor/symfony/property-access/Exception/InvalidPropertyPathException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property path is malformed. - * - * @author Bernhard Schussek - */ -class InvalidPropertyPathException extends RuntimeException -{ -} diff --git a/vendor/symfony/property-access/Exception/NoSuchIndexException.php b/vendor/symfony/property-access/Exception/NoSuchIndexException.php deleted file mode 100644 index 597b990..0000000 --- a/vendor/symfony/property-access/Exception/NoSuchIndexException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when an index cannot be found. - * - * @author Stéphane Escandell - */ -class NoSuchIndexException extends AccessException -{ -} diff --git a/vendor/symfony/property-access/Exception/NoSuchPropertyException.php b/vendor/symfony/property-access/Exception/NoSuchPropertyException.php deleted file mode 100644 index 1c7eda5..0000000 --- a/vendor/symfony/property-access/Exception/NoSuchPropertyException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property cannot be found. - * - * @author Bernhard Schussek - */ -class NoSuchPropertyException extends AccessException -{ -} diff --git a/vendor/symfony/property-access/Exception/OutOfBoundsException.php b/vendor/symfony/property-access/Exception/OutOfBoundsException.php deleted file mode 100644 index a3c4559..0000000 --- a/vendor/symfony/property-access/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base OutOfBoundsException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/property-access/Exception/RuntimeException.php b/vendor/symfony/property-access/Exception/RuntimeException.php deleted file mode 100644 index 9fe843e..0000000 --- a/vendor/symfony/property-access/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Base RuntimeException for the PropertyAccess component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/property-access/Exception/UnexpectedTypeException.php b/vendor/symfony/property-access/Exception/UnexpectedTypeException.php deleted file mode 100644 index 78bc416..0000000 --- a/vendor/symfony/property-access/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -use Symfony\Component\PropertyAccess\PropertyPathInterface; - -/** - * Thrown when a value does not match an expected type. - * - * @author Bernhard Schussek - */ -class UnexpectedTypeException extends RuntimeException -{ - /** - * @param mixed $value The unexpected value found while traversing property path - * @param int $pathIndex The property path index when the unexpected value was found - */ - public function __construct($value, PropertyPathInterface $path, int $pathIndex) - { - $message = sprintf( - 'PropertyAccessor requires a graph of objects or arrays to operate on, '. - 'but it found type "%s" while trying to traverse path "%s" at property "%s".', - \gettype($value), - (string) $path, - $path->getElement($pathIndex) - ); - - parent::__construct($message); - } -} diff --git a/vendor/symfony/property-access/Exception/UninitializedPropertyException.php b/vendor/symfony/property-access/Exception/UninitializedPropertyException.php deleted file mode 100644 index c0d6973..0000000 --- a/vendor/symfony/property-access/Exception/UninitializedPropertyException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Exception; - -/** - * Thrown when a property is not initialized. - * - * @author Jules Pietri - */ -class UninitializedPropertyException extends AccessException -{ -} diff --git a/vendor/symfony/property-access/LICENSE b/vendor/symfony/property-access/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/property-access/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/property-access/PropertyAccess.php b/vendor/symfony/property-access/PropertyAccess.php deleted file mode 100644 index 1953ac0..0000000 --- a/vendor/symfony/property-access/PropertyAccess.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Entry point of the PropertyAccess component. - * - * @author Bernhard Schussek - */ -final class PropertyAccess -{ - /** - * Creates a property accessor with the default configuration. - */ - public static function createPropertyAccessor(): PropertyAccessor - { - return self::createPropertyAccessorBuilder()->getPropertyAccessor(); - } - - public static function createPropertyAccessorBuilder(): PropertyAccessorBuilder - { - return new PropertyAccessorBuilder(); - } - - /** - * This class cannot be instantiated. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/property-access/PropertyAccessor.php b/vendor/symfony/property-access/PropertyAccessor.php deleted file mode 100644 index f4eb475..0000000 --- a/vendor/symfony/property-access/PropertyAccessor.php +++ /dev/null @@ -1,748 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ApcuAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; -use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException; -use Symfony\Component\PropertyAccess\Exception\UninitializedPropertyException; -use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; -use Symfony\Component\PropertyInfo\PropertyReadInfo; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfo; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -/** - * Default implementation of {@link PropertyAccessorInterface}. - * - * @author Bernhard Schussek - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class PropertyAccessor implements PropertyAccessorInterface -{ - /** @var int Allow none of the magic methods */ - public const DISALLOW_MAGIC_METHODS = ReflectionExtractor::DISALLOW_MAGIC_METHODS; - /** @var int Allow magic __get methods */ - public const MAGIC_GET = ReflectionExtractor::ALLOW_MAGIC_GET; - /** @var int Allow magic __set methods */ - public const MAGIC_SET = ReflectionExtractor::ALLOW_MAGIC_SET; - /** @var int Allow magic __call methods */ - public const MAGIC_CALL = ReflectionExtractor::ALLOW_MAGIC_CALL; - - public const DO_NOT_THROW = 0; - public const THROW_ON_INVALID_INDEX = 1; - public const THROW_ON_INVALID_PROPERTY_PATH = 2; - - private const VALUE = 0; - private const REF = 1; - private const IS_REF_CHAINED = 2; - private const CACHE_PREFIX_READ = 'r'; - private const CACHE_PREFIX_WRITE = 'w'; - private const CACHE_PREFIX_PROPERTY_PATH = 'p'; - - private $magicMethodsFlags; - private $ignoreInvalidIndices; - private $ignoreInvalidProperty; - - /** - * @var CacheItemPoolInterface - */ - private $cacheItemPool; - - private $propertyPathCache = []; - - /** - * @var PropertyReadInfoExtractorInterface - */ - private $readInfoExtractor; - - /** - * @var PropertyWriteInfoExtractorInterface - */ - private $writeInfoExtractor; - private $readPropertyCache = []; - private $writePropertyCache = []; - private const RESULT_PROTO = [self::VALUE => null]; - - /** - * Should not be used by application code. Use - * {@link PropertyAccess::createPropertyAccessor()} instead. - * - * @param int $magicMethods A bitwise combination of the MAGIC_* constants - * to specify the allowed magic methods (__get, __set, __call) - * or self::DISALLOW_MAGIC_METHODS for none - * @param int $throw A bitwise combination of the THROW_* constants - * to specify when exceptions should be thrown - * @param PropertyReadInfoExtractorInterface $readInfoExtractor - * @param PropertyWriteInfoExtractorInterface $writeInfoExtractor - */ - public function __construct($magicMethods = self::MAGIC_GET | self::MAGIC_SET, $throw = self::THROW_ON_INVALID_PROPERTY_PATH, CacheItemPoolInterface $cacheItemPool = null, $readInfoExtractor = null, $writeInfoExtractor = null) - { - if (\is_bool($magicMethods)) { - trigger_deprecation('symfony/property-access', '5.2', 'Passing a boolean as the first argument to "%s()" is deprecated. Pass a combination of bitwise flags instead (i.e an integer).', __METHOD__); - - $magicMethods = ($magicMethods ? self::MAGIC_CALL : 0) | self::MAGIC_GET | self::MAGIC_SET; - } elseif (!\is_int($magicMethods)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be an integer, "%s" given.', __METHOD__, get_debug_type($readInfoExtractor))); - } - - if (\is_bool($throw)) { - trigger_deprecation('symfony/property-access', '5.3', 'Passing a boolean as the second argument to "%s()" is deprecated. Pass a combination of bitwise flags instead (i.e an integer).', __METHOD__); - - $throw = $throw ? self::THROW_ON_INVALID_INDEX : self::DO_NOT_THROW; - - if (!\is_bool($readInfoExtractor)) { - $throw |= self::THROW_ON_INVALID_PROPERTY_PATH; - } - } - - if (\is_bool($readInfoExtractor)) { - trigger_deprecation('symfony/property-access', '5.3', 'Passing a boolean as the fourth argument to "%s()" is deprecated. Pass a combination of bitwise flags as the second argument instead (i.e an integer).', __METHOD__); - - if ($readInfoExtractor) { - $throw |= self::THROW_ON_INVALID_PROPERTY_PATH; - } - - $readInfoExtractor = $writeInfoExtractor; - $writeInfoExtractor = 4 < \func_num_args() ? func_get_arg(4) : null; - } - - if (null !== $readInfoExtractor && !$readInfoExtractor instanceof PropertyReadInfoExtractorInterface) { - throw new \TypeError(sprintf('Argument 4 passed to "%s()" must be null or an instance of "%s", "%s" given.', __METHOD__, PropertyReadInfoExtractorInterface::class, get_debug_type($readInfoExtractor))); - } - - if (null !== $writeInfoExtractor && !$writeInfoExtractor instanceof PropertyWriteInfoExtractorInterface) { - throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be null or an instance of "%s", "%s" given.', __METHOD__, PropertyWriteInfoExtractorInterface::class, get_debug_type($writeInfoExtractor))); - } - - $this->magicMethodsFlags = $magicMethods; - $this->ignoreInvalidIndices = 0 === ($throw & self::THROW_ON_INVALID_INDEX); - $this->cacheItemPool = $cacheItemPool instanceof NullAdapter ? null : $cacheItemPool; // Replace the NullAdapter by the null value - $this->ignoreInvalidProperty = 0 === ($throw & self::THROW_ON_INVALID_PROPERTY_PATH); - $this->readInfoExtractor = $readInfoExtractor ?? new ReflectionExtractor([], null, null, false); - $this->writeInfoExtractor = $writeInfoExtractor ?? new ReflectionExtractor(['set'], null, null, false); - } - - /** - * {@inheritdoc} - */ - public function getValue($objectOrArray, $propertyPath) - { - $zval = [ - self::VALUE => $objectOrArray, - ]; - - if (\is_object($objectOrArray) && false === strpbrk((string) $propertyPath, '.[')) { - return $this->readProperty($zval, $propertyPath, $this->ignoreInvalidProperty)[self::VALUE]; - } - - $propertyPath = $this->getPropertyPath($propertyPath); - - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); - - return $propertyValues[\count($propertyValues) - 1][self::VALUE]; - } - - /** - * {@inheritdoc} - */ - public function setValue(&$objectOrArray, $propertyPath, $value) - { - if (\is_object($objectOrArray) && false === strpbrk((string) $propertyPath, '.[')) { - $zval = [ - self::VALUE => $objectOrArray, - ]; - - try { - $this->writeProperty($zval, $propertyPath, $value); - - return; - } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); - // It wasn't thrown in this class so rethrow it - throw $e; - } - } - - $propertyPath = $this->getPropertyPath($propertyPath); - - $zval = [ - self::VALUE => $objectOrArray, - self::REF => &$objectOrArray, - ]; - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); - $overwrite = true; - - try { - for ($i = \count($propertyValues) - 1; 0 <= $i; --$i) { - $zval = $propertyValues[$i]; - unset($propertyValues[$i]); - - // You only need set value for current element if: - // 1. it's the parent of the last index element - // OR - // 2. its child is not passed by reference - // - // This may avoid uncessary value setting process for array elements. - // For example: - // '[a][b][c]' => 'old-value' - // If you want to change its value to 'new-value', - // you only need set value for '[a][b][c]' and it's safe to ignore '[a][b]' and '[a]' - if ($overwrite) { - $property = $propertyPath->getElement($i); - - if ($propertyPath->isIndex($i)) { - if ($overwrite = !isset($zval[self::REF])) { - $ref = &$zval[self::REF]; - $ref = $zval[self::VALUE]; - } - $this->writeIndex($zval, $property, $value); - if ($overwrite) { - $zval[self::VALUE] = $zval[self::REF]; - } - } else { - $this->writeProperty($zval, $property, $value); - } - - // if current element is an object - // OR - // if current element's reference chain is not broken - current element - // as well as all its ancients in the property path are all passed by reference, - // then there is no need to continue the value setting process - if (\is_object($zval[self::VALUE]) || isset($zval[self::IS_REF_CHAINED])) { - break; - } - } - - $value = $zval[self::VALUE]; - } - } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); - - // It wasn't thrown in this class so rethrow it - throw $e; - } - } - - private static function throwInvalidArgumentException(string $message, array $trace, int $i, string $propertyPath, \Throwable $previous = null): void - { - if (!isset($trace[$i]['file']) || __FILE__ !== $trace[$i]['file']) { - return; - } - - if (\PHP_VERSION_ID < 80000) { - if (preg_match('/^Typed property \S+::\$\S+ must be (\S+), (\S+) used$/', $message, $matches)) { - [, $expectedType, $actualType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - - if (!str_starts_with($message, 'Argument ')) { - return; - } - - $pos = strpos($message, $delim = 'must be of the type ') ?: (strpos($message, $delim = 'must be an instance of ') ?: strpos($message, $delim = 'must implement interface ')); - $pos += \strlen($delim); - $j = strpos($message, ',', $pos); - $type = substr($message, 2 + $j, strpos($message, ' given', $j) - $j - 2); - $message = substr($message, $pos, $j - $pos); - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $message, 'NULL' === $type ? 'null' : $type, $propertyPath), 0, $previous); - } - - if (preg_match('/^\S+::\S+\(\): Argument #\d+ \(\$\S+\) must be of type (\S+), (\S+) given/', $message, $matches)) { - [, $expectedType, $actualType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - if (preg_match('/^Cannot assign (\S+) to property \S+::\$\S+ of type (\S+)$/', $message, $matches)) { - [, $actualType, $expectedType] = $matches; - - throw new InvalidArgumentException(sprintf('Expected argument of type "%s", "%s" given at property path "%s".', $expectedType, 'NULL' === $actualType ? 'null' : $actualType, $propertyPath), 0, $previous); - } - } - - /** - * {@inheritdoc} - */ - public function isReadable($objectOrArray, $propertyPath) - { - if (!$propertyPath instanceof PropertyPathInterface) { - $propertyPath = new PropertyPath($propertyPath); - } - - try { - $zval = [ - self::VALUE => $objectOrArray, - ]; - $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices); - - return true; - } catch (AccessException $e) { - return false; - } catch (UnexpectedTypeException $e) { - return false; - } - } - - /** - * {@inheritdoc} - */ - public function isWritable($objectOrArray, $propertyPath) - { - $propertyPath = $this->getPropertyPath($propertyPath); - - try { - $zval = [ - self::VALUE => $objectOrArray, - ]; - $propertyValues = $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength() - 1); - - for ($i = \count($propertyValues) - 1; 0 <= $i; --$i) { - $zval = $propertyValues[$i]; - unset($propertyValues[$i]); - - if ($propertyPath->isIndex($i)) { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - return false; - } - } elseif (!\is_object($zval[self::VALUE]) || !$this->isPropertyWritable($zval[self::VALUE], $propertyPath->getElement($i))) { - return false; - } - - if (\is_object($zval[self::VALUE])) { - return true; - } - } - - return true; - } catch (AccessException $e) { - return false; - } catch (UnexpectedTypeException $e) { - return false; - } - } - - /** - * Reads the path from an object up to a given path index. - * - * @throws UnexpectedTypeException if a value within the path is neither object nor array - * @throws NoSuchIndexException If a non-existing index is accessed - */ - private function readPropertiesUntil(array $zval, PropertyPathInterface $propertyPath, int $lastIndex, bool $ignoreInvalidIndices = true): array - { - if (!\is_object($zval[self::VALUE]) && !\is_array($zval[self::VALUE])) { - throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, 0); - } - - // Add the root object to the list - $propertyValues = [$zval]; - - for ($i = 0; $i < $lastIndex; ++$i) { - $property = $propertyPath->getElement($i); - $isIndex = $propertyPath->isIndex($i); - - if ($isIndex) { - // Create missing nested arrays on demand - if (($zval[self::VALUE] instanceof \ArrayAccess && !$zval[self::VALUE]->offsetExists($property)) || - (\is_array($zval[self::VALUE]) && !isset($zval[self::VALUE][$property]) && !\array_key_exists($property, $zval[self::VALUE])) - ) { - if (!$ignoreInvalidIndices) { - if (!\is_array($zval[self::VALUE])) { - if (!$zval[self::VALUE] instanceof \Traversable) { - throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s".', $property, (string) $propertyPath)); - } - - $zval[self::VALUE] = iterator_to_array($zval[self::VALUE]); - } - - throw new NoSuchIndexException(sprintf('Cannot read index "%s" while trying to traverse path "%s". Available indices are "%s".', $property, (string) $propertyPath, print_r(array_keys($zval[self::VALUE]), true))); - } - - if ($i + 1 < $propertyPath->getLength()) { - if (isset($zval[self::REF])) { - $zval[self::VALUE][$property] = []; - $zval[self::REF] = $zval[self::VALUE]; - } else { - $zval[self::VALUE] = [$property => []]; - } - } - } - - $zval = $this->readIndex($zval, $property); - } else { - $zval = $this->readProperty($zval, $property, $this->ignoreInvalidProperty); - } - - // the final value of the path must not be validated - if ($i + 1 < $propertyPath->getLength() && !\is_object($zval[self::VALUE]) && !\is_array($zval[self::VALUE])) { - throw new UnexpectedTypeException($zval[self::VALUE], $propertyPath, $i + 1); - } - - if (isset($zval[self::REF]) && (0 === $i || isset($propertyValues[$i - 1][self::IS_REF_CHAINED]))) { - // Set the IS_REF_CHAINED flag to true if: - // current property is passed by reference and - // it is the first element in the property path or - // the IS_REF_CHAINED flag of its parent element is true - // Basically, this flag is true only when the reference chain from the top element to current element is not broken - $zval[self::IS_REF_CHAINED] = true; - } - - $propertyValues[] = $zval; - } - - return $propertyValues; - } - - /** - * Reads a key from an array-like structure. - * - * @param string|int $index The key to read - * - * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array - */ - private function readIndex(array $zval, $index): array - { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - throw new NoSuchIndexException(sprintf('Cannot read index "%s" from object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_debug_type($zval[self::VALUE]))); - } - - $result = self::RESULT_PROTO; - - if (isset($zval[self::VALUE][$index])) { - $result[self::VALUE] = $zval[self::VALUE][$index]; - - if (!isset($zval[self::REF])) { - // Save creating references when doing read-only lookups - } elseif (\is_array($zval[self::VALUE])) { - $result[self::REF] = &$zval[self::REF][$index]; - } elseif (\is_object($result[self::VALUE])) { - $result[self::REF] = $result[self::VALUE]; - } - } - - return $result; - } - - /** - * Reads the value of a property from an object. - * - * @throws NoSuchPropertyException If $ignoreInvalidProperty is false and the property does not exist or is not public - */ - private function readProperty(array $zval, string $property, bool $ignoreInvalidProperty = false): array - { - if (!\is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%1$s]" instead.', $property)); - } - - $result = self::RESULT_PROTO; - $object = $zval[self::VALUE]; - $class = \get_class($object); - $access = $this->getReadInfo($class, $property); - - if (null !== $access) { - $name = $access->getName(); - $type = $access->getType(); - - try { - if (PropertyReadInfo::TYPE_METHOD === $type) { - try { - $result[self::VALUE] = $object->$name(); - } catch (\TypeError $e) { - [$trace] = $e->getTrace(); - - // handle uninitialized properties in PHP >= 7 - if (__FILE__ === $trace['file'] - && $name === $trace['function'] - && $object instanceof $trace['class'] - && preg_match('/Return value (?:of .*::\w+\(\) )?must be of (?:the )?type (\w+), null returned$/', $e->getMessage(), $matches) - ) { - throw new UninitializedPropertyException(sprintf('The method "%s::%s()" returned "null", but expected type "%3$s". Did you forget to initialize a property or to make the return type nullable using "?%3$s"?', get_debug_type($object), $name, $matches[1]), 0, $e); - } - - throw $e; - } - } elseif (PropertyReadInfo::TYPE_PROPERTY === $type) { - if ($access->canBeReference() && !isset($object->$name) && !\array_key_exists($name, (array) $object) && (\PHP_VERSION_ID < 70400 || !(new \ReflectionProperty($class, $name))->hasType())) { - throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not initialized.', $class, $name)); - } - - $result[self::VALUE] = $object->$name; - - if (isset($zval[self::REF]) && $access->canBeReference()) { - $result[self::REF] = &$object->$name; - } - } - } catch (\Error $e) { - // handle uninitialized properties in PHP >= 7.4 - if (\PHP_VERSION_ID >= 70400 && preg_match('/^Typed property ([\w\\\\@]+)::\$(\w+) must not be accessed before initialization$/', $e->getMessage(), $matches)) { - $r = new \ReflectionProperty(str_contains($matches[1], '@anonymous') ? $class : $matches[1], $matches[2]); - $type = ($type = $r->getType()) instanceof \ReflectionNamedType ? $type->getName() : (string) $type; - - throw new UninitializedPropertyException(sprintf('The property "%s::$%s" is not readable because it is typed "%s". You should initialize it or declare a default value instead.', $matches[1], $r->getName(), $type), 0, $e); - } - - throw $e; - } - } elseif (property_exists($object, $property) && \array_key_exists($property, (array) $object)) { - $result[self::VALUE] = $object->$property; - if (isset($zval[self::REF])) { - $result[self::REF] = &$object->$property; - } - } elseif (!$ignoreInvalidProperty) { - throw new NoSuchPropertyException(sprintf('Can\'t get a way to read the property "%s" in class "%s".', $property, $class)); - } - - // Objects are always passed around by reference - if (isset($zval[self::REF]) && \is_object($result[self::VALUE])) { - $result[self::REF] = $result[self::VALUE]; - } - - return $result; - } - - /** - * Guesses how to read the property value. - */ - private function getReadInfo(string $class, string $property): ?PropertyReadInfo - { - $key = str_replace('\\', '.', $class).'..'.$property; - - if (isset($this->readPropertyCache[$key])) { - return $this->readPropertyCache[$key]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_READ.rawurlencode($key)); - if ($item->isHit()) { - return $this->readPropertyCache[$key] = $item->get(); - } - } - - $accessor = $this->readInfoExtractor->getReadInfo($class, $property, [ - 'enable_getter_setter_extraction' => true, - 'enable_magic_methods_extraction' => $this->magicMethodsFlags, - 'enable_constructor_extraction' => false, - ]); - - if (isset($item)) { - $this->cacheItemPool->save($item->set($accessor)); - } - - return $this->readPropertyCache[$key] = $accessor; - } - - /** - * Sets the value of an index in a given array-accessible value. - * - * @param string|int $index The index to write at - * @param mixed $value The value to write - * - * @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array - */ - private function writeIndex(array $zval, $index, $value) - { - if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { - throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, get_debug_type($zval[self::VALUE]))); - } - - $zval[self::REF][$index] = $value; - } - - /** - * Sets the value of a property in the given object. - * - * @param mixed $value The value to write - * - * @throws NoSuchPropertyException if the property does not exist or is not public - */ - private function writeProperty(array $zval, string $property, $value) - { - if (!\is_object($zval[self::VALUE])) { - throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%1$s]" instead?', $property)); - } - - $object = $zval[self::VALUE]; - $class = \get_class($object); - $mutator = $this->getWriteInfo($class, $property, $value); - - if (PropertyWriteInfo::TYPE_NONE !== $mutator->getType()) { - $type = $mutator->getType(); - - if (PropertyWriteInfo::TYPE_METHOD === $type) { - $object->{$mutator->getName()}($value); - } elseif (PropertyWriteInfo::TYPE_PROPERTY === $type) { - $object->{$mutator->getName()} = $value; - } elseif (PropertyWriteInfo::TYPE_ADDER_AND_REMOVER === $type) { - $this->writeCollection($zval, $property, $value, $mutator->getAdderInfo(), $mutator->getRemoverInfo()); - } - } elseif ($object instanceof \stdClass && property_exists($object, $property)) { - $object->$property = $value; - } elseif (!$this->ignoreInvalidProperty) { - if ($mutator->hasErrors()) { - throw new NoSuchPropertyException(implode('. ', $mutator->getErrors()).'.'); - } - - throw new NoSuchPropertyException(sprintf('Could not determine access type for property "%s" in class "%s".', $property, get_debug_type($object))); - } - } - - /** - * Adjusts a collection-valued property by calling add*() and remove*() methods. - */ - private function writeCollection(array $zval, string $property, iterable $collection, PropertyWriteInfo $addMethod, PropertyWriteInfo $removeMethod) - { - // At this point the add and remove methods have been found - $previousValue = $this->readProperty($zval, $property); - $previousValue = $previousValue[self::VALUE]; - - $removeMethodName = $removeMethod->getName(); - $addMethodName = $addMethod->getName(); - - if ($previousValue instanceof \Traversable) { - $previousValue = iterator_to_array($previousValue); - } - if ($previousValue && \is_array($previousValue)) { - if (\is_object($collection)) { - $collection = iterator_to_array($collection); - } - foreach ($previousValue as $key => $item) { - if (!\in_array($item, $collection, true)) { - unset($previousValue[$key]); - $zval[self::VALUE]->$removeMethodName($item); - } - } - } else { - $previousValue = false; - } - - foreach ($collection as $item) { - if (!$previousValue || !\in_array($item, $previousValue, true)) { - $zval[self::VALUE]->$addMethodName($item); - } - } - } - - private function getWriteInfo(string $class, string $property, $value): PropertyWriteInfo - { - $useAdderAndRemover = is_iterable($value); - $key = str_replace('\\', '.', $class).'..'.$property.'..'.(int) $useAdderAndRemover; - - if (isset($this->writePropertyCache[$key])) { - return $this->writePropertyCache[$key]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_WRITE.rawurlencode($key)); - if ($item->isHit()) { - return $this->writePropertyCache[$key] = $item->get(); - } - } - - $mutator = $this->writeInfoExtractor->getWriteInfo($class, $property, [ - 'enable_getter_setter_extraction' => true, - 'enable_magic_methods_extraction' => $this->magicMethodsFlags, - 'enable_constructor_extraction' => false, - 'enable_adder_remover_extraction' => $useAdderAndRemover, - ]); - - if (isset($item)) { - $this->cacheItemPool->save($item->set($mutator)); - } - - return $this->writePropertyCache[$key] = $mutator; - } - - /** - * Returns whether a property is writable in the given object. - */ - private function isPropertyWritable(object $object, string $property): bool - { - $mutatorForArray = $this->getWriteInfo(\get_class($object), $property, []); - - if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType() || ($object instanceof \stdClass && property_exists($object, $property))) { - return true; - } - - $mutator = $this->getWriteInfo(\get_class($object), $property, ''); - - return PropertyWriteInfo::TYPE_NONE !== $mutator->getType() || ($object instanceof \stdClass && property_exists($object, $property)); - } - - /** - * Gets a PropertyPath instance and caches it. - * - * @param string|PropertyPath $propertyPath - */ - private function getPropertyPath($propertyPath): PropertyPath - { - if ($propertyPath instanceof PropertyPathInterface) { - // Don't call the copy constructor has it is not needed here - return $propertyPath; - } - - if (isset($this->propertyPathCache[$propertyPath])) { - return $this->propertyPathCache[$propertyPath]; - } - - if ($this->cacheItemPool) { - $item = $this->cacheItemPool->getItem(self::CACHE_PREFIX_PROPERTY_PATH.rawurlencode($propertyPath)); - if ($item->isHit()) { - return $this->propertyPathCache[$propertyPath] = $item->get(); - } - } - - $propertyPathInstance = new PropertyPath($propertyPath); - if (isset($item)) { - $item->set($propertyPathInstance); - $this->cacheItemPool->save($item); - } - - return $this->propertyPathCache[$propertyPath] = $propertyPathInstance; - } - - /** - * Creates the APCu adapter if applicable. - * - * @return AdapterInterface - * - * @throws \LogicException When the Cache Component isn't available - */ - public static function createCache(string $namespace, int $defaultLifetime, string $version, LoggerInterface $logger = null) - { - if (!class_exists(ApcuAdapter::class)) { - throw new \LogicException(sprintf('The Symfony Cache component must be installed to use "%s()".', __METHOD__)); - } - - if (!ApcuAdapter::isSupported()) { - return new NullAdapter(); - } - - $apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version); - if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - $apcu->setLogger(new NullLogger()); - } elseif (null !== $logger) { - $apcu->setLogger($logger); - } - - return $apcu; - } -} diff --git a/vendor/symfony/property-access/PropertyAccessorBuilder.php b/vendor/symfony/property-access/PropertyAccessorBuilder.php deleted file mode 100644 index 68c1984..0000000 --- a/vendor/symfony/property-access/PropertyAccessorBuilder.php +++ /dev/null @@ -1,308 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; - -/** - * A configurable builder to create a PropertyAccessor. - * - * @author Jérémie Augustin - */ -class PropertyAccessorBuilder -{ - /** @var int */ - private $magicMethods = PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET; - private $throwExceptionOnInvalidIndex = false; - private $throwExceptionOnInvalidPropertyPath = true; - - /** - * @var CacheItemPoolInterface|null - */ - private $cacheItemPool; - - /** - * @var PropertyReadInfoExtractorInterface|null - */ - private $readInfoExtractor; - - /** - * @var PropertyWriteInfoExtractorInterface|null - */ - private $writeInfoExtractor; - - /** - * Enables the use of all magic methods by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicMethods(): self - { - $this->magicMethods = PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET | PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Disable the use of all magic methods by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicMethods(): self - { - $this->magicMethods = PropertyAccessor::DISALLOW_MAGIC_METHODS; - - return $this; - } - - /** - * Enables the use of "__call" by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicCall() - { - $this->magicMethods |= PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Enables the use of "__get" by the PropertyAccessor. - */ - public function enableMagicGet(): self - { - $this->magicMethods |= PropertyAccessor::MAGIC_GET; - - return $this; - } - - /** - * Enables the use of "__set" by the PropertyAccessor. - * - * @return $this - */ - public function enableMagicSet(): self - { - $this->magicMethods |= PropertyAccessor::MAGIC_SET; - - return $this; - } - - /** - * Disables the use of "__call" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicCall() - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_CALL; - - return $this; - } - - /** - * Disables the use of "__get" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicGet(): self - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_GET; - - return $this; - } - - /** - * Disables the use of "__set" by the PropertyAccessor. - * - * @return $this - */ - public function disableMagicSet(): self - { - $this->magicMethods &= ~PropertyAccessor::MAGIC_SET; - - return $this; - } - - /** - * @return bool whether the use of "__call" by the PropertyAccessor is enabled - */ - public function isMagicCallEnabled() - { - return (bool) ($this->magicMethods & PropertyAccessor::MAGIC_CALL); - } - - /** - * @return bool whether the use of "__get" by the PropertyAccessor is enabled - */ - public function isMagicGetEnabled(): bool - { - return $this->magicMethods & PropertyAccessor::MAGIC_GET; - } - - /** - * @return bool whether the use of "__set" by the PropertyAccessor is enabled - */ - public function isMagicSetEnabled(): bool - { - return $this->magicMethods & PropertyAccessor::MAGIC_SET; - } - - /** - * Enables exceptions when reading a non-existing index. - * - * This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() - * which are always created on-the-fly. - * - * @return $this - */ - public function enableExceptionOnInvalidIndex() - { - $this->throwExceptionOnInvalidIndex = true; - - return $this; - } - - /** - * Disables exceptions when reading a non-existing index. - * - * Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index. - * - * @return $this - */ - public function disableExceptionOnInvalidIndex() - { - $this->throwExceptionOnInvalidIndex = false; - - return $this; - } - - /** - * @return bool whether an exception is thrown or null is returned when reading a non-existing index - */ - public function isExceptionOnInvalidIndexEnabled() - { - return $this->throwExceptionOnInvalidIndex; - } - - /** - * Enables exceptions when reading a non-existing property. - * - * This has no influence on writing non-existing indices with PropertyAccessorInterface::setValue() - * which are always created on-the-fly. - * - * @return $this - */ - public function enableExceptionOnInvalidPropertyPath() - { - $this->throwExceptionOnInvalidPropertyPath = true; - - return $this; - } - - /** - * Disables exceptions when reading a non-existing index. - * - * Instead, null is returned when calling PropertyAccessorInterface::getValue() on a non-existing index. - * - * @return $this - */ - public function disableExceptionOnInvalidPropertyPath() - { - $this->throwExceptionOnInvalidPropertyPath = false; - - return $this; - } - - /** - * @return bool whether an exception is thrown or null is returned when reading a non-existing property - */ - public function isExceptionOnInvalidPropertyPath() - { - return $this->throwExceptionOnInvalidPropertyPath; - } - - /** - * Sets a cache system. - * - * @return $this - */ - public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null) - { - $this->cacheItemPool = $cacheItemPool; - - return $this; - } - - /** - * Gets the used cache system. - * - * @return CacheItemPoolInterface|null - */ - public function getCacheItemPool() - { - return $this->cacheItemPool; - } - - /** - * @return $this - */ - public function setReadInfoExtractor(?PropertyReadInfoExtractorInterface $readInfoExtractor) - { - $this->readInfoExtractor = $readInfoExtractor; - - return $this; - } - - public function getReadInfoExtractor(): ?PropertyReadInfoExtractorInterface - { - return $this->readInfoExtractor; - } - - /** - * @return $this - */ - public function setWriteInfoExtractor(?PropertyWriteInfoExtractorInterface $writeInfoExtractor) - { - $this->writeInfoExtractor = $writeInfoExtractor; - - return $this; - } - - public function getWriteInfoExtractor(): ?PropertyWriteInfoExtractorInterface - { - return $this->writeInfoExtractor; - } - - /** - * Builds and returns a new PropertyAccessor object. - * - * @return PropertyAccessorInterface - */ - public function getPropertyAccessor() - { - $throw = PropertyAccessor::DO_NOT_THROW; - - if ($this->throwExceptionOnInvalidIndex) { - $throw |= PropertyAccessor::THROW_ON_INVALID_INDEX; - } - - if ($this->throwExceptionOnInvalidPropertyPath) { - $throw |= PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH; - } - - return new PropertyAccessor($this->magicMethods, $throw, $this->cacheItemPool, $this->readInfoExtractor, $this->writeInfoExtractor); - } -} diff --git a/vendor/symfony/property-access/PropertyAccessorInterface.php b/vendor/symfony/property-access/PropertyAccessorInterface.php deleted file mode 100644 index c5226b2..0000000 --- a/vendor/symfony/property-access/PropertyAccessorInterface.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Writes and reads values to/from an object/array graph. - * - * @author Bernhard Schussek - */ -interface PropertyAccessorInterface -{ - /** - * Sets the value at the end of the property path of the object graph. - * - * Example: - * - * use Symfony\Component\PropertyAccess\PropertyAccess; - * - * $propertyAccessor = PropertyAccess::createPropertyAccessor(); - * - * echo $propertyAccessor->setValue($object, 'child.name', 'Fabien'); - * // equals echo $object->getChild()->setName('Fabien'); - * - * This method first tries to find a public setter for each property in the - * path. The name of the setter must be the camel-cased property name - * prefixed with "set". - * - * If the setter does not exist, this method tries to find a public - * property. The value of the property is then changed. - * - * If neither is found, an exception is thrown. - * - * @param object|array $objectOrArray The object or array to modify - * @param string|PropertyPathInterface $propertyPath The property path to modify - * @param mixed $value The value to set at the end of the property path - * - * @throws Exception\InvalidArgumentException If the property path is invalid - * @throws Exception\AccessException If a property/index does not exist or is not public - * @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array - */ - public function setValue(&$objectOrArray, $propertyPath, $value); - - /** - * Returns the value at the end of the property path of the object graph. - * - * Example: - * - * use Symfony\Component\PropertyAccess\PropertyAccess; - * - * $propertyAccessor = PropertyAccess::createPropertyAccessor(); - * - * echo $propertyAccessor->getValue($object, 'child.name'); - * // equals echo $object->getChild()->getName(); - * - * This method first tries to find a public getter for each property in the - * path. The name of the getter must be the camel-cased property name - * prefixed with "get", "is", or "has". - * - * If the getter does not exist, this method tries to find a public - * property. The value of the property is then returned. - * - * If none of them are found, an exception is thrown. - * - * @param object|array $objectOrArray The object or array to traverse - * @param string|PropertyPathInterface $propertyPath The property path to read - * - * @return mixed - * - * @throws Exception\InvalidArgumentException If the property path is invalid - * @throws Exception\AccessException If a property/index does not exist or is not public - * @throws Exception\UnexpectedTypeException If a value within the path is neither object - * nor array - */ - public function getValue($objectOrArray, $propertyPath); - - /** - * Returns whether a value can be written at a given property path. - * - * Whenever this method returns true, {@link setValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $objectOrArray The object or array to check - * @param string|PropertyPathInterface $propertyPath The property path to check - * - * @return bool - * - * @throws Exception\InvalidArgumentException If the property path is invalid - */ - public function isWritable($objectOrArray, $propertyPath); - - /** - * Returns whether a property path can be read from an object graph. - * - * Whenever this method returns true, {@link getValue()} is guaranteed not - * to throw an exception when called with the same arguments. - * - * @param object|array $objectOrArray The object or array to check - * @param string|PropertyPathInterface $propertyPath The property path to check - * - * @return bool - * - * @throws Exception\InvalidArgumentException If the property path is invalid - */ - public function isReadable($objectOrArray, $propertyPath); -} diff --git a/vendor/symfony/property-access/PropertyPath.php b/vendor/symfony/property-access/PropertyPath.php deleted file mode 100644 index e99c019..0000000 --- a/vendor/symfony/property-access/PropertyPath.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException; -use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; - -/** - * Default implementation of {@link PropertyPathInterface}. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class PropertyPath implements \IteratorAggregate, PropertyPathInterface -{ - /** - * Character used for separating between plural and singular of an element. - */ - public const SINGULAR_SEPARATOR = '|'; - - /** - * The elements of the property path. - * - * @var list - */ - private $elements = []; - - /** - * The number of elements in the property path. - * - * @var int - */ - private $length; - - /** - * Contains a Boolean for each property in $elements denoting whether this - * element is an index. It is a property otherwise. - * - * @var array - */ - private $isIndex = []; - - /** - * String representation of the path. - * - * @var string - */ - private $pathAsString; - - /** - * Constructs a property path from a string. - * - * @param PropertyPath|string $propertyPath The property path as string or instance - * - * @throws InvalidArgumentException If the given path is not a string - * @throws InvalidPropertyPathException If the syntax of the property path is not valid - */ - public function __construct($propertyPath) - { - // Can be used as copy constructor - if ($propertyPath instanceof self) { - /* @var PropertyPath $propertyPath */ - $this->elements = $propertyPath->elements; - $this->length = $propertyPath->length; - $this->isIndex = $propertyPath->isIndex; - $this->pathAsString = $propertyPath->pathAsString; - - return; - } - if (!\is_string($propertyPath)) { - throw new InvalidArgumentException(sprintf('The property path constructor needs a string or an instance of "Symfony\Component\PropertyAccess\PropertyPath". Got: "%s".', get_debug_type($propertyPath))); - } - - if ('' === $propertyPath) { - throw new InvalidPropertyPathException('The property path should not be empty.'); - } - - $this->pathAsString = $propertyPath; - $position = 0; - $remaining = $propertyPath; - - // first element is evaluated differently - no leading dot for properties - $pattern = '/^(([^\.\[]++)|\[([^\]]++)\])(.*)/'; - - while (preg_match($pattern, $remaining, $matches)) { - if ('' !== $matches[2]) { - $element = $matches[2]; - $this->isIndex[] = false; - } else { - $element = $matches[3]; - $this->isIndex[] = true; - } - - $this->elements[] = $element; - - $position += \strlen($matches[1]); - $remaining = $matches[4]; - $pattern = '/^(\.([^\.|\[]++)|\[([^\]]++)\])(.*)/'; - } - - if ('' !== $remaining) { - throw new InvalidPropertyPathException(sprintf('Could not parse property path "%s". Unexpected token "%s" at position %d.', $propertyPath, $remaining[0], $position)); - } - - $this->length = \count($this->elements); - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->pathAsString; - } - - /** - * {@inheritdoc} - */ - public function getLength() - { - return $this->length; - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - if ($this->length <= 1) { - return null; - } - - $parent = clone $this; - - --$parent->length; - $parent->pathAsString = substr($parent->pathAsString, 0, max(strrpos($parent->pathAsString, '.'), strrpos($parent->pathAsString, '['))); - array_pop($parent->elements); - array_pop($parent->isIndex); - - return $parent; - } - - /** - * Returns a new iterator for this path. - * - * @return PropertyPathIteratorInterface - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new PropertyPathIterator($this); - } - - /** - * {@inheritdoc} - */ - public function getElements() - { - return $this->elements; - } - - /** - * {@inheritdoc} - */ - public function getElement(int $index) - { - if (!isset($this->elements[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return $this->elements[$index]; - } - - /** - * {@inheritdoc} - */ - public function isProperty(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return !$this->isIndex[$index]; - } - - /** - * {@inheritdoc} - */ - public function isIndex(int $index) - { - if (!isset($this->isIndex[$index])) { - throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index)); - } - - return $this->isIndex[$index]; - } -} diff --git a/vendor/symfony/property-access/PropertyPathBuilder.php b/vendor/symfony/property-access/PropertyPathBuilder.php deleted file mode 100644 index b521f6a..0000000 --- a/vendor/symfony/property-access/PropertyPathBuilder.php +++ /dev/null @@ -1,281 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -use Symfony\Component\PropertyAccess\Exception\OutOfBoundsException; - -/** - * @author Bernhard Schussek - */ -class PropertyPathBuilder -{ - private $elements = []; - private $isIndex = []; - - /** - * Creates a new property path builder. - * - * @param PropertyPathInterface|string|null $path The path to initially store - * in the builder. Optional. - */ - public function __construct($path = null) - { - if (null !== $path) { - $this->append($path); - } - } - - /** - * Appends a (sub-) path to the current path. - * - * @param PropertyPathInterface|string $path The path to append - * @param int $offset The offset where the appended - * piece starts in $path - * @param int $length The length of the appended piece - * If 0, the full path is appended - */ - public function append($path, int $offset = 0, int $length = 0) - { - if (\is_string($path)) { - $path = new PropertyPath($path); - } - - if (0 === $length) { - $end = $path->getLength(); - } else { - $end = $offset + $length; - } - - for (; $offset < $end; ++$offset) { - $this->elements[] = $path->getElement($offset); - $this->isIndex[] = $path->isIndex($offset); - } - } - - /** - * Appends an index element to the current path. - */ - public function appendIndex(string $name) - { - $this->elements[] = $name; - $this->isIndex[] = true; - } - - /** - * Appends a property element to the current path. - */ - public function appendProperty(string $name) - { - $this->elements[] = $name; - $this->isIndex[] = false; - } - - /** - * Removes elements from the current path. - * - * @throws OutOfBoundsException if offset is invalid - */ - public function remove(int $offset, int $length = 1) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - $this->resize($offset, $length, 0); - } - - /** - * Replaces a sub-path by a different (sub-) path. - * - * @param int $offset The offset at which to replace - * @param int $length The length of the piece to replace - * @param PropertyPathInterface|string $path The path to insert - * @param int $pathOffset The offset where the inserted piece - * starts in $path - * @param int $pathLength The length of the inserted piece - * If 0, the full path is inserted - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replace(int $offset, int $length, $path, int $pathOffset = 0, int $pathLength = 0) - { - if (\is_string($path)) { - $path = new PropertyPath($path); - } - - if ($offset < 0 && abs($offset) <= $this->getLength()) { - $offset = $this->getLength() + $offset; - } elseif (!isset($this->elements[$offset])) { - throw new OutOfBoundsException('The offset '.$offset.' is not within the property path'); - } - - if (0 === $pathLength) { - $pathLength = $path->getLength() - $pathOffset; - } - - $this->resize($offset, $length, $pathLength); - - for ($i = 0; $i < $pathLength; ++$i) { - $this->elements[$offset + $i] = $path->getElement($pathOffset + $i); - $this->isIndex[$offset + $i] = $path->isIndex($pathOffset + $i); - } - ksort($this->elements); - } - - /** - * Replaces a property element by an index element. - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replaceByIndex(int $offset, string $name = null) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - if (null !== $name) { - $this->elements[$offset] = $name; - } - - $this->isIndex[$offset] = true; - } - - /** - * Replaces an index element by a property element. - * - * @throws OutOfBoundsException If the offset is invalid - */ - public function replaceByProperty(int $offset, string $name = null) - { - if (!isset($this->elements[$offset])) { - throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset)); - } - - if (null !== $name) { - $this->elements[$offset] = $name; - } - - $this->isIndex[$offset] = false; - } - - /** - * Returns the length of the current path. - * - * @return int - */ - public function getLength() - { - return \count($this->elements); - } - - /** - * Returns the current property path. - * - * @return PropertyPathInterface|null - */ - public function getPropertyPath() - { - $pathAsString = $this->__toString(); - - return '' !== $pathAsString ? new PropertyPath($pathAsString) : null; - } - - /** - * Returns the current property path as string. - * - * @return string - */ - public function __toString() - { - $string = ''; - - foreach ($this->elements as $offset => $element) { - if ($this->isIndex[$offset]) { - $element = '['.$element.']'; - } elseif ('' !== $string) { - $string .= '.'; - } - - $string .= $element; - } - - return $string; - } - - /** - * Resizes the path so that a chunk of length $cutLength is - * removed at $offset and another chunk of length $insertionLength - * can be inserted. - */ - private function resize(int $offset, int $cutLength, int $insertionLength) - { - // Nothing else to do in this case - if ($insertionLength === $cutLength) { - return; - } - - $length = \count($this->elements); - - if ($cutLength > $insertionLength) { - // More elements should be removed than inserted - $diff = $cutLength - $insertionLength; - $newLength = $length - $diff; - - // Shift elements to the left (left-to-right until the new end) - // Max allowed offset to be shifted is such that - // $offset + $diff < $length (otherwise invalid index access) - // i.e. $offset < $length - $diff = $newLength - for ($i = $offset; $i < $newLength; ++$i) { - $this->elements[$i] = $this->elements[$i + $diff]; - $this->isIndex[$i] = $this->isIndex[$i + $diff]; - } - - // All remaining elements should be removed - $this->elements = \array_slice($this->elements, 0, $i); - $this->isIndex = \array_slice($this->isIndex, 0, $i); - } else { - $diff = $insertionLength - $cutLength; - - $newLength = $length + $diff; - $indexAfterInsertion = $offset + $insertionLength; - - // $diff <= $insertionLength - // $indexAfterInsertion >= $insertionLength - // => $diff <= $indexAfterInsertion - - // In each of the following loops, $i >= $diff must hold, - // otherwise ($i - $diff) becomes negative. - - // Shift old elements to the right to make up space for the - // inserted elements. This needs to be done left-to-right in - // order to preserve an ascending array index order - // Since $i = max($length, $indexAfterInsertion) and $indexAfterInsertion >= $diff, - // $i >= $diff is guaranteed. - for ($i = max($length, $indexAfterInsertion); $i < $newLength; ++$i) { - $this->elements[$i] = $this->elements[$i - $diff]; - $this->isIndex[$i] = $this->isIndex[$i - $diff]; - } - - // Shift remaining elements to the right. Do this right-to-left - // so we don't overwrite elements before copying them - // The last written index is the immediate index after the inserted - // string, because the indices before that will be overwritten - // anyway. - // Since $i >= $indexAfterInsertion and $indexAfterInsertion >= $diff, - // $i >= $diff is guaranteed. - for ($i = $length - 1; $i >= $indexAfterInsertion; --$i) { - $this->elements[$i] = $this->elements[$i - $diff]; - $this->isIndex[$i] = $this->isIndex[$i - $diff]; - } - } - } -} diff --git a/vendor/symfony/property-access/PropertyPathInterface.php b/vendor/symfony/property-access/PropertyPathInterface.php deleted file mode 100644 index d58ad32..0000000 --- a/vendor/symfony/property-access/PropertyPathInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * A sequence of property names or array indices. - * - * @author Bernhard Schussek - * - * @extends \Traversable - */ -interface PropertyPathInterface extends \Traversable -{ - /** - * Returns the string representation of the property path. - * - * @return string - */ - public function __toString(); - - /** - * Returns the length of the property path, i.e. the number of elements. - * - * @return int - */ - public function getLength(); - - /** - * Returns the parent property path. - * - * The parent property path is the one that contains the same items as - * this one except for the last one. - * - * If this property path only contains one item, null is returned. - * - * @return self|null - */ - public function getParent(); - - /** - * Returns the elements of the property path as array. - * - * @return list - */ - public function getElements(); - - /** - * Returns the element at the given index in the property path. - * - * @param int $index The index key - * - * @return string - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function getElement(int $index); - - /** - * Returns whether the element at the given index is a property. - * - * @param int $index The index in the property path - * - * @return bool - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function isProperty(int $index); - - /** - * Returns whether the element at the given index is an array index. - * - * @param int $index The index in the property path - * - * @return bool - * - * @throws Exception\OutOfBoundsException If the offset is invalid - */ - public function isIndex(int $index); -} diff --git a/vendor/symfony/property-access/PropertyPathIterator.php b/vendor/symfony/property-access/PropertyPathIterator.php deleted file mode 100644 index a3335e3..0000000 --- a/vendor/symfony/property-access/PropertyPathIterator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * Traverses a property path and provides additional methods to find out - * information about the current element. - * - * @author Bernhard Schussek - * - * @extends \ArrayIterator - */ -class PropertyPathIterator extends \ArrayIterator implements PropertyPathIteratorInterface -{ - protected $path; - - public function __construct(PropertyPathInterface $path) - { - parent::__construct($path->getElements()); - - $this->path = $path; - } - - /** - * {@inheritdoc} - */ - public function isIndex() - { - return $this->path->isIndex($this->key()); - } - - /** - * {@inheritdoc} - */ - public function isProperty() - { - return $this->path->isProperty($this->key()); - } -} diff --git a/vendor/symfony/property-access/PropertyPathIteratorInterface.php b/vendor/symfony/property-access/PropertyPathIteratorInterface.php deleted file mode 100644 index 0397f9c..0000000 --- a/vendor/symfony/property-access/PropertyPathIteratorInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess; - -/** - * @author Bernhard Schussek - * - * @extends \SeekableIterator - */ -interface PropertyPathIteratorInterface extends \SeekableIterator -{ - /** - * Returns whether the current element in the property path is an array - * index. - * - * @return bool - */ - public function isIndex(); - - /** - * Returns whether the current element in the property path is a property - * name. - * - * @return bool - */ - public function isProperty(); -} diff --git a/vendor/symfony/property-access/README.md b/vendor/symfony/property-access/README.md deleted file mode 100644 index 29cb233..0000000 --- a/vendor/symfony/property-access/README.md +++ /dev/null @@ -1,14 +0,0 @@ -PropertyAccess Component -======================== - -The PropertyAccess component provides functions to read and write from/to an -object or array using a simple string notation. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/property_access.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/property-access/composer.json b/vendor/symfony/property-access/composer.json deleted file mode 100644 index fb6103a..0000000 --- a/vendor/symfony/property-access/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/property-access", - "type": "library", - "description": "Provides functions to read and write from/to an object or array using a simple string notation", - "keywords": ["property", "index", "access", "object", "array", "extraction", "injection", "reflection", "property path"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/property-info": "^5.2|^6.0" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/cache-implementation": "To cache access methods." - }, - "autoload": { - "psr-4": { "Symfony\\Component\\PropertyAccess\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/property-info/CHANGELOG.md b/vendor/symfony/property-info/CHANGELOG.md deleted file mode 100644 index 8963b94..0000000 --- a/vendor/symfony/property-info/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add PhpStanExtractor - -5.3 ---- - - * Add support for multiple types for collection keys & values - * Deprecate the `Type::getCollectionKeyType()` and `Type::getCollectionValueType()` methods, use `Type::getCollectionKeyTypes()` and `Type::getCollectionValueTypes()` instead - -5.2.0 ------ - - * deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction` - -5.1.0 ------ - - * Add support for extracting accessor and mutator via PHP Reflection - -4.3.0 ------ - - * Added the ability to extract private and protected properties and methods on `ReflectionExtractor` - * Added the ability to extract property type based on its initial value - -4.2.0 ------ - - * added `PropertyInitializableExtractorInterface` to test if a property can be initialized through the constructor (implemented by `ReflectionExtractor`) - -3.3.0 ------ - - * Added `PropertyInfoPass` diff --git a/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php b/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php deleted file mode 100644 index cab31b3..0000000 --- a/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds extractors to the property_info.constructor_extractor service. - * - * @author Dmitrii Poddubnyi - */ -final class PropertyInfoConstructorPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $service; - private $tag; - - public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->service = $service; - $this->tag = $tag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->service)) { - return; - } - $definition = $container->getDefinition($this->service); - - $listExtractors = $this->findAndSortTaggedServices($this->tag, $container); - $definition->replaceArgument(0, new IteratorArgument($listExtractors)); - } -} diff --git a/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php b/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php deleted file mode 100644 index 289b114..0000000 --- a/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds extractors to the property_info service. - * - * @author Kévin Dunglas - */ -class PropertyInfoPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $propertyInfoService; - private $listExtractorTag; - private $typeExtractorTag; - private $descriptionExtractorTag; - private $accessExtractorTag; - private $initializableExtractorTag; - - public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->propertyInfoService = $propertyInfoService; - $this->listExtractorTag = $listExtractorTag; - $this->typeExtractorTag = $typeExtractorTag; - $this->descriptionExtractorTag = $descriptionExtractorTag; - $this->accessExtractorTag = $accessExtractorTag; - $this->initializableExtractorTag = $initializableExtractorTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->propertyInfoService)) { - return; - } - - $definition = $container->getDefinition($this->propertyInfoService); - - $listExtractors = $this->findAndSortTaggedServices($this->listExtractorTag, $container); - $definition->replaceArgument(0, new IteratorArgument($listExtractors)); - - $typeExtractors = $this->findAndSortTaggedServices($this->typeExtractorTag, $container); - $definition->replaceArgument(1, new IteratorArgument($typeExtractors)); - - $descriptionExtractors = $this->findAndSortTaggedServices($this->descriptionExtractorTag, $container); - $definition->replaceArgument(2, new IteratorArgument($descriptionExtractors)); - - $accessExtractors = $this->findAndSortTaggedServices($this->accessExtractorTag, $container); - $definition->replaceArgument(3, new IteratorArgument($accessExtractors)); - - $initializableExtractors = $this->findAndSortTaggedServices($this->initializableExtractorTag, $container); - $definition->setArgument(4, new IteratorArgument($initializableExtractors)); - } -} diff --git a/vendor/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php b/vendor/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php deleted file mode 100644 index cbde902..0000000 --- a/vendor/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\Type; - -/** - * Infers the constructor argument type. - * - * @author Dmitrii Poddubnyi - * - * @internal - */ -interface ConstructorArgumentTypeExtractorInterface -{ - /** - * Gets types of an argument from constructor. - * - * @return Type[]|null - * - * @internal - */ - public function getTypesFromConstructor(string $class, string $property): ?array; -} diff --git a/vendor/symfony/property-info/Extractor/ConstructorExtractor.php b/vendor/symfony/property-info/Extractor/ConstructorExtractor.php deleted file mode 100644 index fb32634..0000000 --- a/vendor/symfony/property-info/Extractor/ConstructorExtractor.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; - -/** - * Extracts the constructor argument type using ConstructorArgumentTypeExtractorInterface implementations. - * - * @author Dmitrii Poddubnyi - */ -final class ConstructorExtractor implements PropertyTypeExtractorInterface -{ - private $extractors; - - /** - * @param iterable $extractors - */ - public function __construct(iterable $extractors = []) - { - $this->extractors = $extractors; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - foreach ($this->extractors as $extractor) { - $value = $extractor->getTypesFromConstructor($class, $property); - if (null !== $value) { - return $value; - } - } - - return null; - } -} diff --git a/vendor/symfony/property-info/Extractor/PhpDocExtractor.php b/vendor/symfony/property-info/Extractor/PhpDocExtractor.php deleted file mode 100644 index 0f2fba5..0000000 --- a/vendor/symfony/property-info/Extractor/PhpDocExtractor.php +++ /dev/null @@ -1,360 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag; -use phpDocumentor\Reflection\DocBlockFactory; -use phpDocumentor\Reflection\DocBlockFactoryInterface; -use phpDocumentor\Reflection\Types\Context; -use phpDocumentor\Reflection\Types\ContextFactory; -use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper; - -/** - * Extracts data using a PHPDoc parser. - * - * @author Kévin Dunglas - * - * @final - */ -class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - public const PROPERTY = 0; - public const ACCESSOR = 1; - public const MUTATOR = 2; - - /** - * @var array - */ - private $docBlocks = []; - - /** - * @var Context[] - */ - private $contexts = []; - - private $docBlockFactory; - private $contextFactory; - private $phpDocTypeHelper; - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - - /** - * @param string[]|null $mutatorPrefixes - * @param string[]|null $accessorPrefixes - * @param string[]|null $arrayMutatorPrefixes - */ - public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) - { - if (!class_exists(DocBlockFactory::class)) { - throw new \LogicException(sprintf('Unable to use the "%s" class as the "phpdocumentor/reflection-docblock" package is not installed.', __CLASS__)); - } - - $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); - $this->contextFactory = new ContextFactory(); - $this->phpDocTypeHelper = new PhpDocTypeHelper(); - $this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - /** @var $docBlock DocBlock */ - [$docBlock] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - $shortDescription = $docBlock->getSummary(); - - if (!empty($shortDescription)) { - return $shortDescription; - } - - foreach ($docBlock->getTagsByName('var') as $var) { - if ($var && !$var instanceof InvalidTag) { - $varDescription = $var->getDescription()->render(); - - if (!empty($varDescription)) { - return $varDescription; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - /** @var $docBlock DocBlock */ - [$docBlock] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - $contents = $docBlock->getDescription()->render(); - - return '' === $contents ? null : $contents; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - /** @var $docBlock DocBlock */ - [$docBlock, $source, $prefix] = $this->getDocBlock($class, $property); - if (!$docBlock) { - return null; - } - - switch ($source) { - case self::PROPERTY: - $tag = 'var'; - break; - - case self::ACCESSOR: - $tag = 'return'; - break; - - case self::MUTATOR: - $tag = 'param'; - break; - } - - $parentClass = null; - $types = []; - /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ - foreach ($docBlock->getTagsByName($tag) as $tag) { - if ($tag && !$tag instanceof InvalidTag && null !== $tag->getType()) { - foreach ($this->phpDocTypeHelper->getTypes($tag->getType()) as $type) { - switch ($type->getClassName()) { - case 'self': - case 'static': - $resolvedClass = $class; - break; - - case 'parent': - if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { - break; - } - // no break - - default: - $types[] = $type; - continue 2; - } - - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes()); - } - } - } - - if (!isset($types[0])) { - return null; - } - - if (!\in_array($prefix, $this->arrayMutatorPrefixes)) { - return $types; - } - - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; - } - - /** - * {@inheritdoc} - */ - public function getTypesFromConstructor(string $class, string $property): ?array - { - $docBlock = $this->getDocBlockFromConstructor($class, $property); - - if (!$docBlock) { - return null; - } - - $types = []; - /** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */ - foreach ($docBlock->getTagsByName('param') as $tag) { - if ($tag && null !== $tag->getType()) { - $types[] = $this->phpDocTypeHelper->getTypes($tag->getType()); - } - } - - if (!isset($types[0])) { - return null; - } - - return array_merge([], ...$types); - } - - private function getDocBlockFromConstructor(string $class, string $property): ?DocBlock - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - $reflectionConstructor = $reflectionClass->getConstructor(); - if (!$reflectionConstructor) { - return null; - } - - try { - $docBlock = $this->docBlockFactory->create($reflectionConstructor, $this->contextFactory->createFromReflector($reflectionConstructor)); - - return $this->filterDocBlockParams($docBlock, $property); - } catch (\InvalidArgumentException $e) { - return null; - } - } - - private function filterDocBlockParams(DocBlock $docBlock, string $allowedParam): DocBlock - { - $tags = array_values(array_filter($docBlock->getTagsByName('param'), function ($tag) use ($allowedParam) { - return $tag instanceof DocBlock\Tags\Param && $allowedParam === $tag->getVariableName(); - })); - - return new DocBlock($docBlock->getSummary(), $docBlock->getDescription(), $tags, $docBlock->getContext(), - $docBlock->getLocation(), $docBlock->isTemplateStart(), $docBlock->isTemplateEnd()); - } - - /** - * @return array{DocBlock|null, int|null, string|null} - */ - private function getDocBlock(string $class, string $property): array - { - $propertyHash = sprintf('%s::%s', $class, $property); - - if (isset($this->docBlocks[$propertyHash])) { - return $this->docBlocks[$propertyHash]; - } - - $ucFirstProperty = ucfirst($property); - - switch (true) { - case $docBlock = $this->getDocBlockFromProperty($class, $property): - $data = [$docBlock, self::PROPERTY, null]; - break; - - case [$docBlock] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR): - $data = [$docBlock, self::ACCESSOR, null]; - break; - - case [$docBlock, $prefix] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR): - $data = [$docBlock, self::MUTATOR, $prefix]; - break; - - default: - $data = [null, null, null]; - } - - return $this->docBlocks[$propertyHash] = $data; - } - - private function getDocBlockFromProperty(string $class, string $property): ?DocBlock - { - // Use a ReflectionProperty instead of $class to get the parent class if applicable - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - } catch (\ReflectionException $e) { - return null; - } - - $reflector = $reflectionProperty->getDeclaringClass(); - - foreach ($reflector->getTraits() as $trait) { - if ($trait->hasProperty($property)) { - return $this->getDocBlockFromProperty($trait->getName(), $property); - } - } - - try { - return $this->docBlockFactory->create($reflectionProperty, $this->createFromReflector($reflector)); - } catch (\InvalidArgumentException|\RuntimeException $e) { - return null; - } - } - - /** - * @return array{DocBlock, string}|null - */ - private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array - { - $prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes; - $prefix = null; - - foreach ($prefixes as $prefix) { - $methodName = $prefix.$ucFirstProperty; - - try { - $reflectionMethod = new \ReflectionMethod($class, $methodName); - if ($reflectionMethod->isStatic()) { - continue; - } - - if ( - (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) || - (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) - ) { - break; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - - if (!isset($reflectionMethod)) { - return null; - } - - $reflector = $reflectionMethod->getDeclaringClass(); - - foreach ($reflector->getTraits() as $trait) { - if ($trait->hasMethod($methodName)) { - return $this->getDocBlockFromMethod($trait->getName(), $ucFirstProperty, $type); - } - } - - try { - return [$this->docBlockFactory->create($reflectionMethod, $this->createFromReflector($reflector)), $prefix]; - } catch (\InvalidArgumentException|\RuntimeException $e) { - return null; - } - } - - /** - * Prevents a lot of redundant calls to ContextFactory::createForNamespace(). - */ - private function createFromReflector(\ReflectionClass $reflector): Context - { - $cacheKey = $reflector->getNamespaceName().':'.$reflector->getFileName(); - - if (isset($this->contexts[$cacheKey])) { - return $this->contexts[$cacheKey]; - } - - $this->contexts[$cacheKey] = $this->contextFactory->createFromReflector($reflector); - - return $this->contexts[$cacheKey]; - } -} diff --git a/vendor/symfony/property-info/Extractor/PhpStanExtractor.php b/vendor/symfony/property-info/Extractor/PhpStanExtractor.php deleted file mode 100644 index f833731..0000000 --- a/vendor/symfony/property-info/Extractor/PhpStanExtractor.php +++ /dev/null @@ -1,277 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; -use PHPStan\PhpDocParser\Lexer\Lexer; -use PHPStan\PhpDocParser\Parser\ConstExprParser; -use PHPStan\PhpDocParser\Parser\PhpDocParser; -use PHPStan\PhpDocParser\Parser\TokenIterator; -use PHPStan\PhpDocParser\Parser\TypeParser; -use Symfony\Component\PropertyInfo\PhpStan\NameScopeFactory; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\PropertyInfo\Util\PhpStanTypeHelper; - -/** - * Extracts data using PHPStan parser. - * - * @author Baptiste Leduc - */ -final class PhpStanExtractor implements PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - private const PROPERTY = 0; - private const ACCESSOR = 1; - private const MUTATOR = 2; - - /** @var PhpDocParser */ - private $phpDocParser; - - /** @var Lexer */ - private $lexer; - - /** @var NameScopeFactory */ - private $nameScopeFactory; - - /** @var array */ - private $docBlocks = []; - private $phpStanTypeHelper; - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - - /** - * @param list|null $mutatorPrefixes - * @param list|null $accessorPrefixes - * @param list|null $arrayMutatorPrefixes - */ - public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) - { - $this->phpStanTypeHelper = new PhpStanTypeHelper(); - $this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; - - $this->phpDocParser = new PhpDocParser(new TypeParser(new ConstExprParser()), new ConstExprParser()); - $this->lexer = new Lexer(); - $this->nameScopeFactory = new NameScopeFactory(); - } - - public function getTypes(string $class, string $property, array $context = []): ?array - { - /** @var PhpDocNode|null $docNode */ - [$docNode, $source, $prefix, $declaringClass] = $this->getDocBlock($class, $property); - $nameScope = $this->nameScopeFactory->create($class, $declaringClass); - if (null === $docNode) { - return null; - } - - switch ($source) { - case self::PROPERTY: - $tag = '@var'; - break; - - case self::ACCESSOR: - $tag = '@return'; - break; - - case self::MUTATOR: - $tag = '@param'; - break; - } - - $parentClass = null; - $types = []; - foreach ($docNode->getTagsByName($tag) as $tagDocNode) { - if ($tagDocNode->value instanceof InvalidTagValueNode) { - continue; - } - - foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) { - switch ($type->getClassName()) { - case 'self': - case 'static': - $resolvedClass = $class; - break; - - case 'parent': - if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { - break; - } - // no break - - default: - $types[] = $type; - continue 2; - } - - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes()); - } - } - - if (!isset($types[0])) { - return null; - } - - if (!\in_array($prefix, $this->arrayMutatorPrefixes, true)) { - return $types; - } - - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])]; - } - - public function getTypesFromConstructor(string $class, string $property): ?array - { - if (null === $tagDocNode = $this->getDocBlockFromConstructor($class, $property)) { - return null; - } - - $types = []; - foreach ($this->phpStanTypeHelper->getTypes($tagDocNode, $this->nameScopeFactory->create($class)) as $type) { - $types[] = $type; - } - - if (!isset($types[0])) { - return null; - } - - return $types; - } - - private function getDocBlockFromConstructor(string $class, string $property): ?ParamTagValueNode - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - if (null === $reflectionConstructor = $reflectionClass->getConstructor()) { - return null; - } - - $rawDocNode = $reflectionConstructor->getDocComment(); - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return $this->filterDocBlockParams($phpDocNode, $property); - } - - private function filterDocBlockParams(PhpDocNode $docNode, string $allowedParam): ?ParamTagValueNode - { - $tags = array_values(array_filter($docNode->getTagsByName('@param'), function ($tagNode) use ($allowedParam) { - return $tagNode instanceof PhpDocTagNode && ('$'.$allowedParam) === $tagNode->value->parameterName; - })); - - if (!$tags) { - return null; - } - - return $tags[0]->value; - } - - /** - * @return array{PhpDocNode|null, int|null, string|null, string|null} - */ - private function getDocBlock(string $class, string $property): array - { - $propertyHash = $class.'::'.$property; - - if (isset($this->docBlocks[$propertyHash])) { - return $this->docBlocks[$propertyHash]; - } - - $ucFirstProperty = ucfirst($property); - - if ([$docBlock, $declaringClass] = $this->getDocBlockFromProperty($class, $property)) { - $data = [$docBlock, self::PROPERTY, null, $declaringClass]; - } elseif ([$docBlock, $_, $declaringClass] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR)) { - $data = [$docBlock, self::ACCESSOR, null, $declaringClass]; - } elseif ([$docBlock, $prefix, $declaringClass] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR)) { - $data = [$docBlock, self::MUTATOR, $prefix, $declaringClass]; - } else { - $data = [null, null, null, null]; - } - - return $this->docBlocks[$propertyHash] = $data; - } - - /** - * @return array{PhpDocNode, string}|null - */ - private function getDocBlockFromProperty(string $class, string $property): ?array - { - // Use a ReflectionProperty instead of $class to get the parent class if applicable - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - } catch (\ReflectionException $e) { - return null; - } - - if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) { - return null; - } - - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return [$phpDocNode, $reflectionProperty->class]; - } - - /** - * @return array{PhpDocNode, string, string}|null - */ - private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array - { - $prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes; - $prefix = null; - - foreach ($prefixes as $prefix) { - $methodName = $prefix.$ucFirstProperty; - - try { - $reflectionMethod = new \ReflectionMethod($class, $methodName); - if ($reflectionMethod->isStatic()) { - continue; - } - - if ( - (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) - || (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) - ) { - break; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - - if (!isset($reflectionMethod)) { - return null; - } - - if (null === $rawDocNode = $reflectionMethod->getDocComment() ?: null) { - return null; - } - - $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); - $phpDocNode = $this->phpDocParser->parse($tokens); - $tokens->consumeTokenType(Lexer::TOKEN_END); - - return [$phpDocNode, $prefix, $reflectionMethod->class]; - } -} diff --git a/vendor/symfony/property-info/Extractor/ReflectionExtractor.php b/vendor/symfony/property-info/Extractor/ReflectionExtractor.php deleted file mode 100644 index b9011bf..0000000 --- a/vendor/symfony/property-info/Extractor/ReflectionExtractor.php +++ /dev/null @@ -1,872 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyReadInfo; -use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyWriteInfo; -use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface; -use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\String\Inflector\EnglishInflector; -use Symfony\Component\String\Inflector\InflectorInterface; - -/** - * Extracts data using the reflection API. - * - * @author Kévin Dunglas - * - * @final - */ -class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface, PropertyReadInfoExtractorInterface, PropertyWriteInfoExtractorInterface, ConstructorArgumentTypeExtractorInterface -{ - /** - * @internal - */ - public static $defaultMutatorPrefixes = ['add', 'remove', 'set']; - - /** - * @internal - */ - public static $defaultAccessorPrefixes = ['get', 'is', 'has', 'can']; - - /** - * @internal - */ - public static $defaultArrayMutatorPrefixes = ['add', 'remove']; - - public const ALLOW_PRIVATE = 1; - public const ALLOW_PROTECTED = 2; - public const ALLOW_PUBLIC = 4; - - /** @var int Allow none of the magic methods */ - public const DISALLOW_MAGIC_METHODS = 0; - /** @var int Allow magic __get methods */ - public const ALLOW_MAGIC_GET = 1 << 0; - /** @var int Allow magic __set methods */ - public const ALLOW_MAGIC_SET = 1 << 1; - /** @var int Allow magic __call methods */ - public const ALLOW_MAGIC_CALL = 1 << 2; - - private const MAP_TYPES = [ - 'integer' => Type::BUILTIN_TYPE_INT, - 'boolean' => Type::BUILTIN_TYPE_BOOL, - 'double' => Type::BUILTIN_TYPE_FLOAT, - ]; - - private $mutatorPrefixes; - private $accessorPrefixes; - private $arrayMutatorPrefixes; - private $enableConstructorExtraction; - private $methodReflectionFlags; - private $magicMethodsFlags; - private $propertyReflectionFlags; - private $inflector; - - private $arrayMutatorPrefixesFirst; - private $arrayMutatorPrefixesLast; - - /** - * @param string[]|null $mutatorPrefixes - * @param string[]|null $accessorPrefixes - * @param string[]|null $arrayMutatorPrefixes - */ - public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET) - { - $this->mutatorPrefixes = $mutatorPrefixes ?? self::$defaultMutatorPrefixes; - $this->accessorPrefixes = $accessorPrefixes ?? self::$defaultAccessorPrefixes; - $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? self::$defaultArrayMutatorPrefixes; - $this->enableConstructorExtraction = $enableConstructorExtraction; - $this->methodReflectionFlags = $this->getMethodsFlags($accessFlags); - $this->propertyReflectionFlags = $this->getPropertyFlags($accessFlags); - $this->magicMethodsFlags = $magicMethodsFlags; - $this->inflector = $inflector ?? new EnglishInflector(); - - $this->arrayMutatorPrefixesFirst = array_merge($this->arrayMutatorPrefixes, array_diff($this->mutatorPrefixes, $this->arrayMutatorPrefixes)); - $this->arrayMutatorPrefixesLast = array_reverse($this->arrayMutatorPrefixesFirst); - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $reflectionProperties = $reflectionClass->getProperties(); - - $properties = []; - foreach ($reflectionProperties as $reflectionProperty) { - if ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags) { - $properties[$reflectionProperty->name] = $reflectionProperty->name; - } - } - - foreach ($reflectionClass->getMethods($this->methodReflectionFlags) as $reflectionMethod) { - if ($reflectionMethod->isStatic()) { - continue; - } - - $propertyName = $this->getPropertyName($reflectionMethod->name, $reflectionProperties); - if (!$propertyName || isset($properties[$propertyName])) { - continue; - } - if ($reflectionClass->hasProperty($lowerCasedPropertyName = lcfirst($propertyName)) || (!$reflectionClass->hasProperty($propertyName) && !preg_match('/^[A-Z]{2,}/', $propertyName))) { - $propertyName = $lowerCasedPropertyName; - } - $properties[$propertyName] = $propertyName; - } - - return $properties ? array_values($properties) : null; - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - if ($fromMutator = $this->extractFromMutator($class, $property)) { - return $fromMutator; - } - - if ($fromAccessor = $this->extractFromAccessor($class, $property)) { - return $fromAccessor; - } - - if ( - ($context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction) && - $fromConstructor = $this->extractFromConstructor($class, $property) - ) { - return $fromConstructor; - } - - if ($fromPropertyDeclaration = $this->extractFromPropertyDeclaration($class, $property)) { - return $fromPropertyDeclaration; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getTypesFromConstructor(string $class, string $property): ?array - { - try { - $reflection = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - if (!$reflectionConstructor = $reflection->getConstructor()) { - return null; - } - if (!$reflectionParameter = $this->getReflectionParameterFromConstructor($property, $reflectionConstructor)) { - return null; - } - if (!$reflectionType = $reflectionParameter->getType()) { - return null; - } - if (!$types = $this->extractFromReflectionType($reflectionType, $reflectionConstructor->getDeclaringClass())) { - return null; - } - - return $types; - } - - private function getReflectionParameterFromConstructor(string $property, \ReflectionMethod $reflectionConstructor): ?\ReflectionParameter - { - $reflectionParameter = null; - foreach ($reflectionConstructor->getParameters() as $reflectionParameter) { - if ($reflectionParameter->getName() === $property) { - return $reflectionParameter; - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - if ($this->isAllowedProperty($class, $property)) { - return true; - } - - return null !== $this->getReadInfo($class, $property, $context); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - if ($this->isAllowedProperty($class, $property)) { - return true; - } - - [$reflectionMethod] = $this->getMutatorMethod($class, $property); - - return null !== $reflectionMethod; - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - if (!$reflectionClass->isInstantiable()) { - return false; - } - - if ($constructor = $reflectionClass->getConstructor()) { - foreach ($constructor->getParameters() as $parameter) { - if ($property === $parameter->name) { - return true; - } - } - } elseif ($parentClass = $reflectionClass->getParentClass()) { - return $this->isInitializable($parentClass->getName(), $property); - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo - { - try { - $reflClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $allowGetterSetter = $context['enable_getter_setter_extraction'] ?? false; - $magicMethods = $context['enable_magic_methods_extraction'] ?? $this->magicMethodsFlags; - $allowMagicCall = (bool) ($magicMethods & self::ALLOW_MAGIC_CALL); - $allowMagicGet = (bool) ($magicMethods & self::ALLOW_MAGIC_GET); - - if (isset($context['enable_magic_call_extraction'])) { - trigger_deprecation('symfony/property-info', '5.2', 'Using the "enable_magic_call_extraction" context option in "%s()" is deprecated. Use "enable_magic_methods_extraction" instead.', __METHOD__); - - $allowMagicCall = $context['enable_magic_call_extraction'] ?? false; - } - - $hasProperty = $reflClass->hasProperty($property); - $camelProp = $this->camelize($property); - $getsetter = lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item) - - foreach ($this->accessorPrefixes as $prefix) { - $methodName = $prefix.$camelProp; - - if ($reflClass->hasMethod($methodName) && $reflClass->getMethod($methodName)->getModifiers() & $this->methodReflectionFlags && !$reflClass->getMethod($methodName)->getNumberOfRequiredParameters()) { - $method = $reflClass->getMethod($methodName); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $methodName, $this->getReadVisiblityForMethod($method), $method->isStatic(), false); - } - } - - if ($allowGetterSetter && $reflClass->hasMethod($getsetter) && ($reflClass->getMethod($getsetter)->getModifiers() & $this->methodReflectionFlags)) { - $method = $reflClass->getMethod($getsetter); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisiblityForMethod($method), $method->isStatic(), false); - } - - if ($allowMagicGet && $reflClass->hasMethod('__get') && ($reflClass->getMethod('__get')->getModifiers() & $this->methodReflectionFlags)) { - return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false); - } - - if ($hasProperty && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { - $reflProperty = $reflClass->getProperty($property); - - return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($reflProperty), $reflProperty->isStatic(), true); - } - - if ($allowMagicCall && $reflClass->hasMethod('__call') && ($reflClass->getMethod('__call')->getModifiers() & $this->methodReflectionFlags)) { - return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get'.$camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false); - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo - { - try { - $reflClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $allowGetterSetter = $context['enable_getter_setter_extraction'] ?? false; - $magicMethods = $context['enable_magic_methods_extraction'] ?? $this->magicMethodsFlags; - $allowMagicCall = (bool) ($magicMethods & self::ALLOW_MAGIC_CALL); - $allowMagicSet = (bool) ($magicMethods & self::ALLOW_MAGIC_SET); - - if (isset($context['enable_magic_call_extraction'])) { - trigger_deprecation('symfony/property-info', '5.2', 'Using the "enable_magic_call_extraction" context option in "%s()" is deprecated. Use "enable_magic_methods_extraction" instead.', __METHOD__); - - $allowMagicCall = $context['enable_magic_call_extraction'] ?? false; - } - - $allowConstruct = $context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction; - $allowAdderRemover = $context['enable_adder_remover_extraction'] ?? true; - - $camelized = $this->camelize($property); - $constructor = $reflClass->getConstructor(); - $singulars = $this->inflector->singularize($camelized); - $errors = []; - - if (null !== $constructor && $allowConstruct) { - foreach ($constructor->getParameters() as $parameter) { - if ($parameter->getName() === $property) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_CONSTRUCTOR, $property); - } - } - } - - [$adderAccessName, $removerAccessName, $adderAndRemoverErrors] = $this->findAdderAndRemover($reflClass, $singulars); - if ($allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) { - $adderMethod = $reflClass->getMethod($adderAccessName); - $removerMethod = $reflClass->getMethod($removerAccessName); - - $mutator = new PropertyWriteInfo(PropertyWriteInfo::TYPE_ADDER_AND_REMOVER); - $mutator->setAdderInfo(new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $adderAccessName, $this->getWriteVisiblityForMethod($adderMethod), $adderMethod->isStatic())); - $mutator->setRemoverInfo(new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $removerAccessName, $this->getWriteVisiblityForMethod($removerMethod), $removerMethod->isStatic())); - - return $mutator; - } - - $errors[] = $adderAndRemoverErrors; - - foreach ($this->mutatorPrefixes as $mutatorPrefix) { - $methodName = $mutatorPrefix.$camelized; - - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $methodName, 1); - if (!$accessible) { - $errors[] = $methodAccessibleErrors; - continue; - } - - $method = $reflClass->getMethod($methodName); - - if (!\in_array($mutatorPrefix, $this->arrayMutatorPrefixes, true)) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $methodName, $this->getWriteVisiblityForMethod($method), $method->isStatic()); - } - } - - $getsetter = lcfirst($camelized); - - if ($allowGetterSetter) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $getsetter, 1); - if ($accessible) { - $method = $reflClass->getMethod($getsetter); - - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $getsetter, $this->getWriteVisiblityForMethod($method), $method->isStatic()); - } - - $errors[] = $methodAccessibleErrors; - } - - if ($reflClass->hasProperty($property) && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { - $reflProperty = $reflClass->getProperty($property); - - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, $this->getWriteVisiblityForProperty($reflProperty), $reflProperty->isStatic()); - } - - if ($allowMagicSet) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, '__set', 2); - if ($accessible) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, PropertyWriteInfo::VISIBILITY_PUBLIC, false); - } - - $errors[] = $methodAccessibleErrors; - } - - if ($allowMagicCall) { - [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, '__call', 2); - if ($accessible) { - return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set'.$camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false); - } - - $errors[] = $methodAccessibleErrors; - } - - if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) { - $errors[] = [sprintf( - 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. - 'the new value must be an array or an instance of \Traversable', - $property, - $reflClass->getName(), - implode('()", "', [$adderAccessName, $removerAccessName]) - )]; - } - - $noneProperty = new PropertyWriteInfo(); - $noneProperty->setErrors(array_merge([], ...$errors)); - - return $noneProperty; - } - - /** - * @return Type[]|null - */ - private function extractFromMutator(string $class, string $property): ?array - { - [$reflectionMethod, $prefix] = $this->getMutatorMethod($class, $property); - if (null === $reflectionMethod) { - return null; - } - - $reflectionParameters = $reflectionMethod->getParameters(); - $reflectionParameter = $reflectionParameters[0]; - - if (!$reflectionType = $reflectionParameter->getType()) { - return null; - } - $type = $this->extractFromReflectionType($reflectionType, $reflectionMethod->getDeclaringClass()); - - if (1 === \count($type) && \in_array($prefix, $this->arrayMutatorPrefixes)) { - $type = [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type[0])]; - } - - return $type; - } - - /** - * Tries to extract type information from accessors. - * - * @return Type[]|null - */ - private function extractFromAccessor(string $class, string $property): ?array - { - [$reflectionMethod, $prefix] = $this->getAccessorMethod($class, $property); - if (null === $reflectionMethod) { - return null; - } - - if ($reflectionType = $reflectionMethod->getReturnType()) { - return $this->extractFromReflectionType($reflectionType, $reflectionMethod->getDeclaringClass()); - } - - if (\in_array($prefix, ['is', 'can', 'has'])) { - return [new Type(Type::BUILTIN_TYPE_BOOL)]; - } - - return null; - } - - /** - * Tries to extract type information from constructor. - * - * @return Type[]|null - */ - private function extractFromConstructor(string $class, string $property): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - } catch (\ReflectionException $e) { - return null; - } - - $constructor = $reflectionClass->getConstructor(); - - if (!$constructor) { - return null; - } - - foreach ($constructor->getParameters() as $parameter) { - if ($property !== $parameter->name) { - continue; - } - $reflectionType = $parameter->getType(); - - return $reflectionType ? $this->extractFromReflectionType($reflectionType, $constructor->getDeclaringClass()) : null; - } - - if ($parentClass = $reflectionClass->getParentClass()) { - return $this->extractFromConstructor($parentClass->getName(), $property); - } - - return null; - } - - private function extractFromPropertyDeclaration(string $class, string $property): ?array - { - try { - $reflectionClass = new \ReflectionClass($class); - - if (\PHP_VERSION_ID >= 70400) { - $reflectionProperty = $reflectionClass->getProperty($property); - $reflectionPropertyType = $reflectionProperty->getType(); - - if (null !== $reflectionPropertyType && $types = $this->extractFromReflectionType($reflectionPropertyType, $reflectionProperty->getDeclaringClass())) { - return $types; - } - } - } catch (\ReflectionException $e) { - return null; - } - - $defaultValue = $reflectionClass->getDefaultProperties()[$property] ?? null; - - if (null === $defaultValue) { - return null; - } - - $type = \gettype($defaultValue); - $type = static::MAP_TYPES[$type] ?? $type; - - return [new Type($type, $this->isNullableProperty($class, $property), null, Type::BUILTIN_TYPE_ARRAY === $type)]; - } - - private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array - { - $types = []; - $nullable = $reflectionType->allowsNull(); - - foreach (($reflectionType instanceof \ReflectionUnionType || $reflectionType instanceof \ReflectionIntersectionType) ? $reflectionType->getTypes() : [$reflectionType] as $type) { - $phpTypeOrClass = $type->getName(); - if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) { - continue; - } - - if (Type::BUILTIN_TYPE_ARRAY === $phpTypeOrClass) { - $types[] = new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true); - } elseif ('void' === $phpTypeOrClass) { - $types[] = new Type(Type::BUILTIN_TYPE_NULL, $nullable); - } elseif ($type->isBuiltin()) { - $types[] = new Type($phpTypeOrClass, $nullable); - } else { - $types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, $this->resolveTypeName($phpTypeOrClass, $declaringClass)); - } - } - - return $types; - } - - private function resolveTypeName(string $name, \ReflectionClass $declaringClass): string - { - if ('self' === $lcName = strtolower($name)) { - return $declaringClass->name; - } - if ('parent' === $lcName && $parent = $declaringClass->getParentClass()) { - return $parent->name; - } - - return $name; - } - - private function isNullableProperty(string $class, string $property): bool - { - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - - if (\PHP_VERSION_ID >= 70400) { - $reflectionPropertyType = $reflectionProperty->getType(); - - return null !== $reflectionPropertyType && $reflectionPropertyType->allowsNull(); - } - - return false; - } catch (\ReflectionException $e) { - // Return false if the property doesn't exist - } - - return false; - } - - private function isAllowedProperty(string $class, string $property): bool - { - try { - $reflectionProperty = new \ReflectionProperty($class, $property); - - return (bool) ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags); - } catch (\ReflectionException $e) { - // Return false if the property doesn't exist - } - - return false; - } - - /** - * Gets the accessor method. - * - * Returns an array with a the instance of \ReflectionMethod as first key - * and the prefix of the method as second or null if not found. - */ - private function getAccessorMethod(string $class, string $property): ?array - { - $ucProperty = ucfirst($property); - - foreach ($this->accessorPrefixes as $prefix) { - try { - $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty); - if ($reflectionMethod->isStatic()) { - continue; - } - - if (0 === $reflectionMethod->getNumberOfRequiredParameters()) { - return [$reflectionMethod, $prefix]; - } - } catch (\ReflectionException $e) { - // Return null if the property doesn't exist - } - } - - return null; - } - - /** - * Returns an array with a the instance of \ReflectionMethod as first key - * and the prefix of the method as second or null if not found. - */ - private function getMutatorMethod(string $class, string $property): ?array - { - $ucProperty = ucfirst($property); - $ucSingulars = $this->inflector->singularize($ucProperty); - - $mutatorPrefixes = \in_array($ucProperty, $ucSingulars, true) ? $this->arrayMutatorPrefixesLast : $this->arrayMutatorPrefixesFirst; - - foreach ($mutatorPrefixes as $prefix) { - $names = [$ucProperty]; - if (\in_array($prefix, $this->arrayMutatorPrefixes)) { - $names = array_merge($names, $ucSingulars); - } - - foreach ($names as $name) { - try { - $reflectionMethod = new \ReflectionMethod($class, $prefix.$name); - if ($reflectionMethod->isStatic()) { - continue; - } - - // Parameter can be optional to allow things like: method(array $foo = null) - if ($reflectionMethod->getNumberOfParameters() >= 1) { - return [$reflectionMethod, $prefix]; - } - } catch (\ReflectionException $e) { - // Try the next prefix if the method doesn't exist - } - } - } - - return null; - } - - private function getPropertyName(string $methodName, array $reflectionProperties): ?string - { - $pattern = implode('|', array_merge($this->accessorPrefixes, $this->mutatorPrefixes)); - - if ('' !== $pattern && preg_match('/^('.$pattern.')(.+)$/i', $methodName, $matches)) { - if (!\in_array($matches[1], $this->arrayMutatorPrefixes)) { - return $matches[2]; - } - - foreach ($reflectionProperties as $reflectionProperty) { - foreach ($this->inflector->singularize($reflectionProperty->name) as $name) { - if (strtolower($name) === strtolower($matches[2])) { - return $reflectionProperty->name; - } - } - } - - return $matches[2]; - } - - return null; - } - - /** - * Searches for add and remove methods. - * - * @param \ReflectionClass $reflClass The reflection class for the given object - * @param array $singulars The singular form of the property name or null - * - * @return array An array containing the adder and remover when found and errors - */ - private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars): array - { - if (!\is_array($this->arrayMutatorPrefixes) && 2 !== \count($this->arrayMutatorPrefixes)) { - return [null, null, []]; - } - - [$addPrefix, $removePrefix] = $this->arrayMutatorPrefixes; - $errors = []; - - foreach ($singulars as $singular) { - $addMethod = $addPrefix.$singular; - $removeMethod = $removePrefix.$singular; - - [$addMethodFound, $addMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $addMethod, 1); - [$removeMethodFound, $removeMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $removeMethod, 1); - $errors[] = $addMethodAccessibleErrors; - $errors[] = $removeMethodAccessibleErrors; - - if ($addMethodFound && $removeMethodFound) { - return [$addMethod, $removeMethod, []]; - } - - if ($addMethodFound && !$removeMethodFound) { - $errors[] = [sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod)]; - } elseif (!$addMethodFound && $removeMethodFound) { - $errors[] = [sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod)]; - } - } - - return [null, null, array_merge([], ...$errors)]; - } - - /** - * Returns whether a method is public and has the number of required parameters and errors. - */ - private function isMethodAccessible(\ReflectionClass $class, string $methodName, int $parameters): array - { - $errors = []; - - if ($class->hasMethod($methodName)) { - $method = $class->getMethod($methodName); - - if (\ReflectionMethod::IS_PUBLIC === $this->methodReflectionFlags && !$method->isPublic()) { - $errors[] = sprintf('The method "%s" in class "%s" was found but does not have public access.', $methodName, $class->getName()); - } elseif ($method->getNumberOfRequiredParameters() > $parameters || $method->getNumberOfParameters() < $parameters) { - $errors[] = sprintf('The method "%s" in class "%s" requires %d arguments, but should accept only %d.', $methodName, $class->getName(), $method->getNumberOfRequiredParameters(), $parameters); - } else { - return [true, $errors]; - } - } - - return [false, $errors]; - } - - /** - * Camelizes a given string. - */ - private function camelize(string $string): string - { - return str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); - } - - /** - * Return allowed reflection method flags. - */ - private function getMethodsFlags(int $accessFlags): int - { - $methodFlags = 0; - - if ($accessFlags & self::ALLOW_PUBLIC) { - $methodFlags |= \ReflectionMethod::IS_PUBLIC; - } - - if ($accessFlags & self::ALLOW_PRIVATE) { - $methodFlags |= \ReflectionMethod::IS_PRIVATE; - } - - if ($accessFlags & self::ALLOW_PROTECTED) { - $methodFlags |= \ReflectionMethod::IS_PROTECTED; - } - - return $methodFlags; - } - - /** - * Return allowed reflection property flags. - */ - private function getPropertyFlags(int $accessFlags): int - { - $propertyFlags = 0; - - if ($accessFlags & self::ALLOW_PUBLIC) { - $propertyFlags |= \ReflectionProperty::IS_PUBLIC; - } - - if ($accessFlags & self::ALLOW_PRIVATE) { - $propertyFlags |= \ReflectionProperty::IS_PRIVATE; - } - - if ($accessFlags & self::ALLOW_PROTECTED) { - $propertyFlags |= \ReflectionProperty::IS_PROTECTED; - } - - return $propertyFlags; - } - - private function getReadVisiblityForProperty(\ReflectionProperty $reflectionProperty): string - { - if ($reflectionProperty->isPrivate()) { - return PropertyReadInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionProperty->isProtected()) { - return PropertyReadInfo::VISIBILITY_PROTECTED; - } - - return PropertyReadInfo::VISIBILITY_PUBLIC; - } - - private function getReadVisiblityForMethod(\ReflectionMethod $reflectionMethod): string - { - if ($reflectionMethod->isPrivate()) { - return PropertyReadInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionMethod->isProtected()) { - return PropertyReadInfo::VISIBILITY_PROTECTED; - } - - return PropertyReadInfo::VISIBILITY_PUBLIC; - } - - private function getWriteVisiblityForProperty(\ReflectionProperty $reflectionProperty): string - { - if ($reflectionProperty->isPrivate()) { - return PropertyWriteInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionProperty->isProtected()) { - return PropertyWriteInfo::VISIBILITY_PROTECTED; - } - - return PropertyWriteInfo::VISIBILITY_PUBLIC; - } - - private function getWriteVisiblityForMethod(\ReflectionMethod $reflectionMethod): string - { - if ($reflectionMethod->isPrivate()) { - return PropertyWriteInfo::VISIBILITY_PRIVATE; - } - - if ($reflectionMethod->isProtected()) { - return PropertyWriteInfo::VISIBILITY_PROTECTED; - } - - return PropertyWriteInfo::VISIBILITY_PUBLIC; - } -} diff --git a/vendor/symfony/property-info/Extractor/SerializerExtractor.php b/vendor/symfony/property-info/Extractor/SerializerExtractor.php deleted file mode 100644 index 08ff10d..0000000 --- a/vendor/symfony/property-info/Extractor/SerializerExtractor.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Extractor; - -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; - -/** - * Lists available properties using Symfony Serializer Component metadata. - * - * @author Kévin Dunglas - * - * @final - */ -class SerializerExtractor implements PropertyListExtractorInterface -{ - private $classMetadataFactory; - - public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) - { - $this->classMetadataFactory = $classMetadataFactory; - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - if (!\array_key_exists('serializer_groups', $context) || (null !== $context['serializer_groups'] && !\is_array($context['serializer_groups']))) { - return null; - } - - if (!$this->classMetadataFactory->getMetadataFor($class)) { - return null; - } - - $properties = []; - $serializerClassMetadata = $this->classMetadataFactory->getMetadataFor($class); - - foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { - $ignored = method_exists($serializerAttributeMetadata, 'isIgnored') && $serializerAttributeMetadata->isIgnored(); - if (!$ignored && (null === $context['serializer_groups'] || array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { - $properties[] = $serializerAttributeMetadata->getName(); - } - } - - return $properties; - } -} diff --git a/vendor/symfony/property-info/LICENSE b/vendor/symfony/property-info/LICENSE deleted file mode 100644 index 4e90b1b..0000000 --- a/vendor/symfony/property-info/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/property-info/PhpStan/NameScope.php b/vendor/symfony/property-info/PhpStan/NameScope.php deleted file mode 100644 index 7d9a5f9..0000000 --- a/vendor/symfony/property-info/PhpStan/NameScope.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\PhpStan; - -/** - * NameScope class adapted from PHPStan code. - * - * @copyright Copyright (c) 2016, PHPStan https://github.com/phpstan/phpstan-src - * @copyright Copyright (c) 2016, Ondřej Mirtes - * @author Baptiste Leduc - * - * @internal - */ -final class NameScope -{ - private $calledClassName; - private $namespace; - /** @var array alias(string) => fullName(string) */ - private $uses; - - public function __construct(string $calledClassName, string $namespace, array $uses = []) - { - $this->calledClassName = $calledClassName; - $this->namespace = $namespace; - $this->uses = $uses; - } - - public function resolveStringName(string $name): string - { - if (0 === strpos($name, '\\')) { - return ltrim($name, '\\'); - } - - $nameParts = explode('\\', $name); - $firstNamePart = $nameParts[0]; - if (isset($this->uses[$firstNamePart])) { - if (1 === \count($nameParts)) { - return $this->uses[$firstNamePart]; - } - array_shift($nameParts); - - return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts)); - } - - if (null !== $this->namespace) { - return sprintf('%s\\%s', $this->namespace, $name); - } - - return $name; - } - - public function resolveRootClass(): string - { - return $this->resolveStringName($this->calledClassName); - } -} diff --git a/vendor/symfony/property-info/PhpStan/NameScopeFactory.php b/vendor/symfony/property-info/PhpStan/NameScopeFactory.php deleted file mode 100644 index 32f2f33..0000000 --- a/vendor/symfony/property-info/PhpStan/NameScopeFactory.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\PhpStan; - -use phpDocumentor\Reflection\Types\ContextFactory; - -/** - * @author Baptiste Leduc - * - * @internal - */ -final class NameScopeFactory -{ - public function create(string $calledClassName, string $declaringClassName = null): NameScope - { - $declaringClassName = $declaringClassName ?? $calledClassName; - - $path = explode('\\', $calledClassName); - $calledClassName = array_pop($path); - - $declaringReflection = new \ReflectionClass($declaringClassName); - [$declaringNamespace, $declaringUses] = $this->extractFromFullClassName($declaringReflection); - $declaringUses = array_merge($declaringUses, $this->collectUses($declaringReflection)); - - return new NameScope($calledClassName, $declaringNamespace, $declaringUses); - } - - private function collectUses(\ReflectionClass $reflection): array - { - $uses = [$this->extractFromFullClassName($reflection)[1]]; - - foreach ($reflection->getTraits() as $traitReflection) { - $uses[] = $this->extractFromFullClassName($traitReflection)[1]; - } - - if (false !== $parentClass = $reflection->getParentClass()) { - $uses[] = $this->collectUses($parentClass); - } - - return $uses ? array_merge(...$uses) : []; - } - - private function extractFromFullClassName(\ReflectionClass $reflection): array - { - $namespace = trim($reflection->getNamespaceName(), '\\'); - $fileName = $reflection->getFileName(); - - if (\is_string($fileName) && is_file($fileName)) { - if (false === $contents = file_get_contents($fileName)) { - throw new \RuntimeException(sprintf('Unable to read file "%s".', $fileName)); - } - - $factory = new ContextFactory(); - $context = $factory->createForNamespace($namespace, $contents); - - return [$namespace, $context->getNamespaceAliases()]; - } - - return [$namespace, []]; - } -} diff --git a/vendor/symfony/property-info/PropertyAccessExtractorInterface.php b/vendor/symfony/property-info/PropertyAccessExtractorInterface.php deleted file mode 100644 index f9ee787..0000000 --- a/vendor/symfony/property-info/PropertyAccessExtractorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses if the property can be accessed or mutated. - * - * @author Kévin Dunglas - */ -interface PropertyAccessExtractorInterface -{ - /** - * Is the property readable? - * - * @return bool|null - */ - public function isReadable(string $class, string $property, array $context = []); - - /** - * Is the property writable? - * - * @return bool|null - */ - public function isWritable(string $class, string $property, array $context = []); -} diff --git a/vendor/symfony/property-info/PropertyDescriptionExtractorInterface.php b/vendor/symfony/property-info/PropertyDescriptionExtractorInterface.php deleted file mode 100644 index f376537..0000000 --- a/vendor/symfony/property-info/PropertyDescriptionExtractorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses the property's human readable description. - * - * @author Kévin Dunglas - */ -interface PropertyDescriptionExtractorInterface -{ - /** - * Gets the short description of the property. - * - * @return string|null - */ - public function getShortDescription(string $class, string $property, array $context = []); - - /** - * Gets the long description of the property. - * - * @return string|null - */ - public function getLongDescription(string $class, string $property, array $context = []); -} diff --git a/vendor/symfony/property-info/PropertyInfoCacheExtractor.php b/vendor/symfony/property-info/PropertyInfoCacheExtractor.php deleted file mode 100644 index ca7b324..0000000 --- a/vendor/symfony/property-info/PropertyInfoCacheExtractor.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * Adds a PSR-6 cache layer on top of an extractor. - * - * @author Kévin Dunglas - * - * @final - */ -class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface -{ - private $propertyInfoExtractor; - private $cacheItemPool; - private $arrayCache = []; - - public function __construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) - { - $this->propertyInfoExtractor = $propertyInfoExtractor; - $this->cacheItemPool = $cacheItemPool; - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isReadable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isWritable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract('getShortDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract('getLongDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - return $this->extract('getProperties', [$class, $context]); - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - return $this->extract('getTypes', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - return $this->extract('isInitializable', [$class, $property, $context]); - } - - /** - * Retrieves the cached data if applicable or delegates to the decorated extractor. - * - * @return mixed - */ - private function extract(string $method, array $arguments) - { - try { - $serializedArguments = serialize($arguments); - } catch (\Exception $exception) { - // If arguments are not serializable, skip the cache - return $this->propertyInfoExtractor->{$method}(...$arguments); - } - - // Calling rawurlencode escapes special characters not allowed in PSR-6's keys - $key = rawurlencode($method.'.'.$serializedArguments); - - if (\array_key_exists($key, $this->arrayCache)) { - return $this->arrayCache[$key]; - } - - $item = $this->cacheItemPool->getItem($key); - - if ($item->isHit()) { - return $this->arrayCache[$key] = $item->get(); - } - - $value = $this->propertyInfoExtractor->{$method}(...$arguments); - $item->set($value); - $this->cacheItemPool->save($item); - - return $this->arrayCache[$key] = $value; - } -} diff --git a/vendor/symfony/property-info/PropertyInfoExtractor.php b/vendor/symfony/property-info/PropertyInfoExtractor.php deleted file mode 100644 index eca169f..0000000 --- a/vendor/symfony/property-info/PropertyInfoExtractor.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Default {@see PropertyInfoExtractorInterface} implementation. - * - * @author Kévin Dunglas - * - * @final - */ -class PropertyInfoExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface -{ - private $listExtractors; - private $typeExtractors; - private $descriptionExtractors; - private $accessExtractors; - private $initializableExtractors; - - /** - * @param iterable $listExtractors - * @param iterable $typeExtractors - * @param iterable $descriptionExtractors - * @param iterable $accessExtractors - * @param iterable $initializableExtractors - */ - public function __construct(iterable $listExtractors = [], iterable $typeExtractors = [], iterable $descriptionExtractors = [], iterable $accessExtractors = [], iterable $initializableExtractors = []) - { - $this->listExtractors = $listExtractors; - $this->typeExtractors = $typeExtractors; - $this->descriptionExtractors = $descriptionExtractors; - $this->accessExtractors = $accessExtractors; - $this->initializableExtractors = $initializableExtractors; - } - - /** - * {@inheritdoc} - */ - public function getProperties(string $class, array $context = []): ?array - { - return $this->extract($this->listExtractors, 'getProperties', [$class, $context]); - } - - /** - * {@inheritdoc} - */ - public function getShortDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract($this->descriptionExtractors, 'getShortDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getLongDescription(string $class, string $property, array $context = []): ?string - { - return $this->extract($this->descriptionExtractors, 'getLongDescription', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function getTypes(string $class, string $property, array $context = []): ?array - { - return $this->extract($this->typeExtractors, 'getTypes', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isReadable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->accessExtractors, 'isReadable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isWritable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->accessExtractors, 'isWritable', [$class, $property, $context]); - } - - /** - * {@inheritdoc} - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool - { - return $this->extract($this->initializableExtractors, 'isInitializable', [$class, $property, $context]); - } - - /** - * Iterates over registered extractors and return the first value found. - * - * @param iterable $extractors - * @param list $arguments - * - * @return mixed - */ - private function extract(iterable $extractors, string $method, array $arguments) - { - foreach ($extractors as $extractor) { - if (null !== $value = $extractor->{$method}(...$arguments)) { - return $value; - } - } - - return null; - } -} diff --git a/vendor/symfony/property-info/PropertyInfoExtractorInterface.php b/vendor/symfony/property-info/PropertyInfoExtractorInterface.php deleted file mode 100644 index 8893018..0000000 --- a/vendor/symfony/property-info/PropertyInfoExtractorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Gets info about PHP class properties. - * - * A convenient interface inheriting all specific info interfaces. - * - * @author Kévin Dunglas - */ -interface PropertyInfoExtractorInterface extends PropertyTypeExtractorInterface, PropertyDescriptionExtractorInterface, PropertyAccessExtractorInterface, PropertyListExtractorInterface -{ -} diff --git a/vendor/symfony/property-info/PropertyInitializableExtractorInterface.php b/vendor/symfony/property-info/PropertyInitializableExtractorInterface.php deleted file mode 100644 index 13248fc..0000000 --- a/vendor/symfony/property-info/PropertyInitializableExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Guesses if the property can be initialized through the constructor. - * - * @author Kévin Dunglas - */ -interface PropertyInitializableExtractorInterface -{ - /** - * Is the property initializable? Returns true if a constructor's parameter matches the given property name. - */ - public function isInitializable(string $class, string $property, array $context = []): ?bool; -} diff --git a/vendor/symfony/property-info/PropertyListExtractorInterface.php b/vendor/symfony/property-info/PropertyListExtractorInterface.php deleted file mode 100644 index 326e6cc..0000000 --- a/vendor/symfony/property-info/PropertyListExtractorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extracts the list of properties available for the given class. - * - * @author Kévin Dunglas - */ -interface PropertyListExtractorInterface -{ - /** - * Gets the list of properties available for the given class. - * - * @return string[]|null - */ - public function getProperties(string $class, array $context = []); -} diff --git a/vendor/symfony/property-info/PropertyReadInfo.php b/vendor/symfony/property-info/PropertyReadInfo.php deleted file mode 100644 index ae10352..0000000 --- a/vendor/symfony/property-info/PropertyReadInfo.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * The property read info tells how a property can be read. - * - * @author Joel Wurtz - * - * @internal - */ -final class PropertyReadInfo -{ - public const TYPE_METHOD = 'method'; - public const TYPE_PROPERTY = 'property'; - - public const VISIBILITY_PUBLIC = 'public'; - public const VISIBILITY_PROTECTED = 'protected'; - public const VISIBILITY_PRIVATE = 'private'; - - private $type; - - private $name; - - private $visibility; - - private $static; - - private $byRef; - - public function __construct(string $type, string $name, string $visibility, bool $static, bool $byRef) - { - $this->type = $type; - $this->name = $name; - $this->visibility = $visibility; - $this->static = $static; - $this->byRef = $byRef; - } - - /** - * Get type of access. - */ - public function getType(): string - { - return $this->type; - } - - /** - * Get name of the access, which can be a method name or a property name, depending on the type. - */ - public function getName(): string - { - return $this->name; - } - - public function getVisibility(): string - { - return $this->visibility; - } - - public function isStatic(): bool - { - return $this->static; - } - - /** - * Whether this accessor can be accessed by reference. - */ - public function canBeReference(): bool - { - return $this->byRef; - } -} diff --git a/vendor/symfony/property-info/PropertyReadInfoExtractorInterface.php b/vendor/symfony/property-info/PropertyReadInfoExtractorInterface.php deleted file mode 100644 index 816b282..0000000 --- a/vendor/symfony/property-info/PropertyReadInfoExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extract read information for the property of a class. - * - * @author Joel Wurtz - */ -interface PropertyReadInfoExtractorInterface -{ - /** - * Get read information object for a given property of a class. - */ - public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo; -} diff --git a/vendor/symfony/property-info/PropertyTypeExtractorInterface.php b/vendor/symfony/property-info/PropertyTypeExtractorInterface.php deleted file mode 100644 index 6da0bcb..0000000 --- a/vendor/symfony/property-info/PropertyTypeExtractorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Type Extractor Interface. - * - * @author Kévin Dunglas - */ -interface PropertyTypeExtractorInterface -{ - /** - * Gets types of a property. - * - * @return Type[]|null - */ - public function getTypes(string $class, string $property, array $context = []); -} diff --git a/vendor/symfony/property-info/PropertyWriteInfo.php b/vendor/symfony/property-info/PropertyWriteInfo.php deleted file mode 100644 index b4e33b2..0000000 --- a/vendor/symfony/property-info/PropertyWriteInfo.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * The write mutator defines how a property can be written. - * - * @author Joel Wurtz - * - * @internal - */ -final class PropertyWriteInfo -{ - public const TYPE_NONE = 'none'; - public const TYPE_METHOD = 'method'; - public const TYPE_PROPERTY = 'property'; - public const TYPE_ADDER_AND_REMOVER = 'adder_and_remover'; - public const TYPE_CONSTRUCTOR = 'constructor'; - - public const VISIBILITY_PUBLIC = 'public'; - public const VISIBILITY_PROTECTED = 'protected'; - public const VISIBILITY_PRIVATE = 'private'; - - private $type; - private $name; - private $visibility; - private $static; - private $adderInfo; - private $removerInfo; - private $errors = []; - - public function __construct(string $type = self::TYPE_NONE, string $name = null, string $visibility = null, bool $static = null) - { - $this->type = $type; - $this->name = $name; - $this->visibility = $visibility; - $this->static = $static; - } - - public function getType(): string - { - return $this->type; - } - - public function getName(): string - { - if (null === $this->name) { - throw new \LogicException("Calling getName() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->name; - } - - public function setAdderInfo(self $adderInfo): void - { - $this->adderInfo = $adderInfo; - } - - public function getAdderInfo(): self - { - if (null === $this->adderInfo) { - throw new \LogicException("Calling getAdderInfo() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->adderInfo; - } - - public function setRemoverInfo(self $removerInfo): void - { - $this->removerInfo = $removerInfo; - } - - public function getRemoverInfo(): self - { - if (null === $this->removerInfo) { - throw new \LogicException("Calling getRemoverInfo() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->removerInfo; - } - - public function getVisibility(): string - { - if (null === $this->visibility) { - throw new \LogicException("Calling getVisibility() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->visibility; - } - - public function isStatic(): bool - { - if (null === $this->static) { - throw new \LogicException("Calling isStatic() when having a mutator of type {$this->type} is not tolerated."); - } - - return $this->static; - } - - public function setErrors(array $errors): void - { - $this->errors = $errors; - } - - public function getErrors(): array - { - return $this->errors; - } - - public function hasErrors(): bool - { - return (bool) \count($this->errors); - } -} diff --git a/vendor/symfony/property-info/PropertyWriteInfoExtractorInterface.php b/vendor/symfony/property-info/PropertyWriteInfoExtractorInterface.php deleted file mode 100644 index f113463..0000000 --- a/vendor/symfony/property-info/PropertyWriteInfoExtractorInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Extract write information for the property of a class. - * - * @author Joel Wurtz - */ -interface PropertyWriteInfoExtractorInterface -{ - /** - * Get write information object for a given property of a class. - */ - public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo; -} diff --git a/vendor/symfony/property-info/README.md b/vendor/symfony/property-info/README.md deleted file mode 100644 index da3514f..0000000 --- a/vendor/symfony/property-info/README.md +++ /dev/null @@ -1,14 +0,0 @@ -PropertyInfo Component -====================== - -The PropertyInfo component extracts information about PHP class' properties -using metadata of popular sources. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/property_info.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/property-info/Type.php b/vendor/symfony/property-info/Type.php deleted file mode 100644 index 6aecc01..0000000 --- a/vendor/symfony/property-info/Type.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo; - -/** - * Type value object (immutable). - * - * @author Kévin Dunglas - * - * @final - */ -class Type -{ - public const BUILTIN_TYPE_INT = 'int'; - public const BUILTIN_TYPE_FLOAT = 'float'; - public const BUILTIN_TYPE_STRING = 'string'; - public const BUILTIN_TYPE_BOOL = 'bool'; - public const BUILTIN_TYPE_TRUE = 'true'; - public const BUILTIN_TYPE_FALSE = 'false'; - public const BUILTIN_TYPE_RESOURCE = 'resource'; - public const BUILTIN_TYPE_OBJECT = 'object'; - public const BUILTIN_TYPE_ARRAY = 'array'; - public const BUILTIN_TYPE_NULL = 'null'; - public const BUILTIN_TYPE_CALLABLE = 'callable'; - public const BUILTIN_TYPE_ITERABLE = 'iterable'; - - /** - * List of PHP builtin types. - * - * @var string[] - */ - public static $builtinTypes = [ - self::BUILTIN_TYPE_INT, - self::BUILTIN_TYPE_FLOAT, - self::BUILTIN_TYPE_STRING, - self::BUILTIN_TYPE_BOOL, - self::BUILTIN_TYPE_TRUE, - self::BUILTIN_TYPE_FALSE, - self::BUILTIN_TYPE_RESOURCE, - self::BUILTIN_TYPE_OBJECT, - self::BUILTIN_TYPE_ARRAY, - self::BUILTIN_TYPE_CALLABLE, - self::BUILTIN_TYPE_NULL, - self::BUILTIN_TYPE_ITERABLE, - ]; - - /** - * List of PHP builtin collection types. - * - * @var string[] - */ - public static $builtinCollectionTypes = [ - self::BUILTIN_TYPE_ARRAY, - self::BUILTIN_TYPE_ITERABLE, - ]; - - private $builtinType; - private $nullable; - private $class; - private $collection; - private $collectionKeyType; - private $collectionValueType; - - /** - * @param Type[]|Type|null $collectionKeyType - * @param Type[]|Type|null $collectionValueType - * - * @throws \InvalidArgumentException - */ - public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, $collectionKeyType = null, $collectionValueType = null) - { - if (!\in_array($builtinType, self::$builtinTypes)) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType)); - } - - $this->builtinType = $builtinType; - $this->nullable = $nullable; - $this->class = $class; - $this->collection = $collection; - $this->collectionKeyType = $this->validateCollectionArgument($collectionKeyType, 5, '$collectionKeyType') ?? []; - $this->collectionValueType = $this->validateCollectionArgument($collectionValueType, 6, '$collectionValueType') ?? []; - } - - private function validateCollectionArgument($collectionArgument, int $argumentIndex, string $argumentName): ?array - { - if (null === $collectionArgument) { - return null; - } - - if (!\is_array($collectionArgument) && !$collectionArgument instanceof self) { - throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument))); - } - - if (\is_array($collectionArgument)) { - foreach ($collectionArgument as $type) { - if (!$type instanceof self) { - throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", array value "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument))); - } - } - - return $collectionArgument; - } - - return [$collectionArgument]; - } - - /** - * Gets built-in type. - * - * Can be bool, int, float, string, array, object, resource, null, callback or iterable. - */ - public function getBuiltinType(): string - { - return $this->builtinType; - } - - public function isNullable(): bool - { - return $this->nullable; - } - - /** - * Gets the class name. - * - * Only applicable if the built-in type is object. - */ - public function getClassName(): ?string - { - return $this->class; - } - - public function isCollection(): bool - { - return $this->collection; - } - - /** - * Gets collection key type. - * - * Only applicable for a collection type. - * - * @deprecated since Symfony 5.3, use "getCollectionKeyTypes()" instead - */ - public function getCollectionKeyType(): ?self - { - trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionKeyTypes()" instead.', __METHOD__); - - $type = $this->getCollectionKeyTypes(); - if (0 === \count($type)) { - return null; - } - - if (\is_array($type)) { - [$type] = $type; - } - - return $type; - } - - /** - * Gets collection key types. - * - * Only applicable for a collection type. - * - * @return Type[] - */ - public function getCollectionKeyTypes(): array - { - return $this->collectionKeyType; - } - - /** - * Gets collection value type. - * - * Only applicable for a collection type. - * - * @deprecated since Symfony 5.3, use "getCollectionValueTypes()" instead - */ - public function getCollectionValueType(): ?self - { - trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionValueTypes()" instead.', __METHOD__); - - return $this->getCollectionValueTypes()[0] ?? null; - } - - /** - * Gets collection value types. - * - * Only applicable for a collection type. - * - * @return Type[] - */ - public function getCollectionValueTypes(): array - { - return $this->collectionValueType; - } -} diff --git a/vendor/symfony/property-info/Util/PhpDocTypeHelper.php b/vendor/symfony/property-info/Util/PhpDocTypeHelper.php deleted file mode 100644 index cafbaaf..0000000 --- a/vendor/symfony/property-info/Util/PhpDocTypeHelper.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Util; - -use phpDocumentor\Reflection\PseudoTypes\List_; -use phpDocumentor\Reflection\Type as DocType; -use phpDocumentor\Reflection\Types\Array_; -use phpDocumentor\Reflection\Types\Collection; -use phpDocumentor\Reflection\Types\Compound; -use phpDocumentor\Reflection\Types\Null_; -use phpDocumentor\Reflection\Types\Nullable; -use Symfony\Component\PropertyInfo\Type; - -// Workaround for phpdocumentor/type-resolver < 1.6 -// We trigger the autoloader here, so we don't need to trigger it inside the loop later. -class_exists(List_::class); - -/** - * Transforms a php doc type to a {@link Type} instance. - * - * @author Kévin Dunglas - * @author Guilhem N. - */ -final class PhpDocTypeHelper -{ - /** - * Creates a {@see Type} from a PHPDoc type. - * - * @return Type[] - */ - public function getTypes(DocType $varType): array - { - $types = []; - $nullable = false; - - if ($varType instanceof Nullable) { - $nullable = true; - $varType = $varType->getActualType(); - } - - if (!$varType instanceof Compound) { - if ($varType instanceof Null_) { - $nullable = true; - } - - $type = $this->createType($varType, $nullable); - if (null !== $type) { - $types[] = $type; - } - - return $types; - } - - $varTypes = []; - for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) { - $type = $varType->get($typeIndex); - - // If null is present, all types are nullable - if ($type instanceof Null_) { - $nullable = true; - continue; - } - - if ($type instanceof Nullable) { - $nullable = true; - $type = $type->getActualType(); - } - - $varTypes[] = $type; - } - - foreach ($varTypes as $varType) { - $type = $this->createType($varType, $nullable); - if (null !== $type) { - $types[] = $type; - } - } - - return $types; - } - - /** - * Creates a {@see Type} from a PHPDoc type. - */ - private function createType(DocType $type, bool $nullable, string $docType = null): ?Type - { - $docType = $docType ?? (string) $type; - - if ($type instanceof Collection) { - $fqsen = $type->getFqsen(); - if ($fqsen && 'list' === $fqsen->getName() && !class_exists(List_::class, false) && !class_exists((string) $fqsen)) { - // Workaround for phpdocumentor/type-resolver < 1.6 - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), $this->getTypes($type->getValueType())); - } - - [$phpType, $class] = $this->getPhpTypeAndClass((string) $fqsen); - - $key = $this->getTypes($type->getKeyType()); - $value = $this->getTypes($type->getValueType()); - - // More than 1 type returned means it is a Compound type, which is - // not handled by Type, so better use a null value. - $key = 1 === \count($key) ? $key[0] : null; - $value = 1 === \count($value) ? $value[0] : null; - - return new Type($phpType, $nullable, $class, true, $key, $value); - } - - // Cannot guess - if (!$docType || 'mixed' === $docType) { - return null; - } - - if (str_ends_with($docType, '[]')) { - $collectionKeyType = new Type(Type::BUILTIN_TYPE_INT); - $collectionValueType = $this->createType($type, false, substr($docType, 0, -2)); - - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType); - } - - if ((str_starts_with($docType, 'list<') || str_starts_with($docType, 'array<')) && $type instanceof Array_) { - // array is converted to x[] which is handled above - // so it's only necessary to handle array here - $collectionKeyType = $this->getTypes($type->getKeyType())[0]; - - $collectionValueTypes = $this->getTypes($type->getValueType()); - if (1 != \count($collectionValueTypes)) { - // the Type class does not support union types yet, so assume that no type was defined - $collectionValueType = null; - } else { - $collectionValueType = $collectionValueTypes[0]; - } - - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType); - } - - $docType = $this->normalizeType($docType); - [$phpType, $class] = $this->getPhpTypeAndClass($docType); - - if ('array' === $docType) { - return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, null, null); - } - - return new Type($phpType, $nullable, $class); - } - - private function normalizeType(string $docType): string - { - switch ($docType) { - case 'integer': - return 'int'; - - case 'boolean': - return 'bool'; - - // real is not part of the PHPDoc standard, so we ignore it - case 'double': - return 'float'; - - case 'callback': - return 'callable'; - - case 'void': - return 'null'; - - default: - return $docType; - } - } - - private function getPhpTypeAndClass(string $docType): array - { - if (\in_array($docType, Type::$builtinTypes)) { - return [$docType, null]; - } - - if (\in_array($docType, ['parent', 'self', 'static'], true)) { - return ['object', $docType]; - } - - return ['object', ltrim($docType, '\\')]; - } -} diff --git a/vendor/symfony/property-info/Util/PhpStanTypeHelper.php b/vendor/symfony/property-info/Util/PhpStanTypeHelper.php deleted file mode 100644 index f3812ea..0000000 --- a/vendor/symfony/property-info/Util/PhpStanTypeHelper.php +++ /dev/null @@ -1,188 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Util; - -use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode; -use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode; -use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode; -use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode; -use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode; -use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode; -use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode; -use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; -use PHPStan\PhpDocParser\Ast\Type\NullableTypeNode; -use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode; -use PHPStan\PhpDocParser\Ast\Type\TypeNode; -use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode; -use Symfony\Component\PropertyInfo\PhpStan\NameScope; -use Symfony\Component\PropertyInfo\Type; - -/** - * Transforms a php doc tag value to a {@link Type} instance. - * - * @author Baptiste Leduc - * - * @internal - */ -final class PhpStanTypeHelper -{ - /** - * Creates a {@see Type} from a PhpDocTagValueNode type. - * - * @return Type[] - */ - public function getTypes(PhpDocTagValueNode $node, NameScope $nameScope): array - { - if ($node instanceof ParamTagValueNode || $node instanceof ReturnTagValueNode || $node instanceof VarTagValueNode) { - return $this->compressNullableType($this->extractTypes($node->type, $nameScope)); - } - - return []; - } - - /** - * Because PhpStan extract null as a separated type when Symfony / PHP compress it in the first available type we - * need this method to mimic how Symfony want null types. - * - * @param Type[] $types - * - * @return Type[] - */ - private function compressNullableType(array $types): array - { - $firstTypeIndex = null; - $nullableTypeIndex = null; - - foreach ($types as $k => $type) { - if (null === $firstTypeIndex && Type::BUILTIN_TYPE_NULL !== $type->getBuiltinType() && !$type->isNullable()) { - $firstTypeIndex = $k; - } - - if (null === $nullableTypeIndex && Type::BUILTIN_TYPE_NULL === $type->getBuiltinType()) { - $nullableTypeIndex = $k; - } - - if (null !== $firstTypeIndex && null !== $nullableTypeIndex) { - break; - } - } - - if (null !== $firstTypeIndex && null !== $nullableTypeIndex) { - $firstType = $types[$firstTypeIndex]; - $types[$firstTypeIndex] = new Type( - $firstType->getBuiltinType(), - true, - $firstType->getClassName(), - $firstType->isCollection(), - $firstType->getCollectionKeyTypes(), - $firstType->getCollectionValueTypes() - ); - unset($types[$nullableTypeIndex]); - } - - return array_values($types); - } - - /** - * @return Type[] - */ - private function extractTypes(TypeNode $node, NameScope $nameScope): array - { - if ($node instanceof UnionTypeNode) { - $types = []; - foreach ($node->types as $type) { - if ($type instanceof ConstTypeNode) { - // It's safer to fall back to other extractors here, as resolving const types correctly is not easy at the moment - return []; - } - foreach ($this->extractTypes($type, $nameScope) as $subType) { - $types[] = $subType; - } - } - - return $this->compressNullableType($types); - } - if ($node instanceof GenericTypeNode) { - [$mainType] = $this->extractTypes($node->type, $nameScope); - - $collectionKeyTypes = $mainType->getCollectionKeyTypes(); - $collectionKeyValues = []; - if (1 === \count($node->genericTypes)) { - foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $subType) { - $collectionKeyValues[] = $subType; - } - } elseif (2 === \count($node->genericTypes)) { - foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $keySubType) { - $collectionKeyTypes[] = $keySubType; - } - foreach ($this->extractTypes($node->genericTypes[1], $nameScope) as $valueSubType) { - $collectionKeyValues[] = $valueSubType; - } - } - - return [new Type($mainType->getBuiltinType(), $mainType->isNullable(), $mainType->getClassName(), true, $collectionKeyTypes, $collectionKeyValues)]; - } - if ($node instanceof ArrayShapeNode) { - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]; - } - if ($node instanceof ArrayTypeNode) { - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, [new Type(Type::BUILTIN_TYPE_INT)], $this->extractTypes($node->type, $nameScope))]; - } - if ($node instanceof CallableTypeNode || $node instanceof CallableTypeParameterNode) { - return [new Type(Type::BUILTIN_TYPE_CALLABLE)]; - } - if ($node instanceof NullableTypeNode) { - $subTypes = $this->extractTypes($node->type, $nameScope); - if (\count($subTypes) > 1) { - $subTypes[] = new Type(Type::BUILTIN_TYPE_NULL); - - return $subTypes; - } - - return [new Type($subTypes[0]->getBuiltinType(), true, $subTypes[0]->getClassName(), $subTypes[0]->isCollection(), $subTypes[0]->getCollectionKeyTypes(), $subTypes[0]->getCollectionValueTypes())]; - } - if ($node instanceof ThisTypeNode) { - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())]; - } - if ($node instanceof IdentifierTypeNode) { - if (\in_array($node->name, Type::$builtinTypes)) { - return [new Type($node->name, false, null, \in_array($node->name, Type::$builtinCollectionTypes))]; - } - - switch ($node->name) { - case 'integer': - return [new Type(Type::BUILTIN_TYPE_INT)]; - case 'list': - case 'non-empty-list': - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT))]; - case 'non-empty-array': - return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]; - case 'mixed': - return []; // mixed seems to be ignored in all other extractors - case 'parent': - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $node->name)]; - case 'static': - case 'self': - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())]; - case 'void': - return [new Type(Type::BUILTIN_TYPE_NULL)]; - } - - return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveStringName($node->name))]; - } - - return []; - } -} diff --git a/vendor/symfony/property-info/composer.json b/vendor/symfony/property-info/composer.json deleted file mode 100644 index e6a29c0..0000000 --- a/vendor/symfony/property-info/composer.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "symfony/property-info", - "type": "library", - "description": "Extracts information about PHP class' properties using metadata of popular sources", - "keywords": [ - "property", - "type", - "PHPDoc", - "symfony", - "validator", - "doctrine" - ], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/string": "^5.1|^6.0" - }, - "require-dev": { - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "phpstan/phpdoc-parser": "^1.0", - "doctrine/annotations": "^1.10.4" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<4.4" - }, - "suggest": { - "psr/cache-implementation": "To cache results", - "symfony/doctrine-bridge": "To use Doctrine metadata", - "phpdocumentor/reflection-docblock": "To use the PHPDoc", - "symfony/serializer": "To use Serializer metadata" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\PropertyInfo\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/routing/Alias.php b/vendor/symfony/routing/Alias.php deleted file mode 100644 index f3e1d5a..0000000 --- a/vendor/symfony/routing/Alias.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Routing\Exception\InvalidArgumentException; - -class Alias -{ - private $id; - private $deprecation = []; - - public function __construct(string $id) - { - $this->id = $id; - } - - /** - * @return static - */ - public function withId(string $id): self - { - $new = clone $this; - - $new->id = $id; - - return $new; - } - - /** - * Returns the target name of this alias. - * - * @return string The target name - */ - public function getId(): string - { - return $this->id; - } - - /** - * Whether this alias is deprecated, that means it should not be referenced anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(string $package, string $version, string $message): self - { - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%alias_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%alias_id%" placeholder.'); - } - } - - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message ?: 'The "%alias_id%" route alias is deprecated. You should stop using it, as it will be removed in the future.', - ]; - - return $this; - } - - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @param string $name Route name relying on this alias - */ - public function getDeprecation(string $name): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%alias_id%', $name, $this->deprecation['message']), - ]; - } -} diff --git a/vendor/symfony/routing/Annotation/Route.php b/vendor/symfony/routing/Annotation/Route.php deleted file mode 100644 index 81563df..0000000 --- a/vendor/symfony/routing/Annotation/Route.php +++ /dev/null @@ -1,272 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Annotation; - -/** - * Annotation class for @Route(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"CLASS", "METHOD"}) - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] -class Route -{ - private $path; - private $localizedPaths = []; - private $name; - private $requirements = []; - private $options = []; - private $defaults = []; - private $host; - private $methods = []; - private $schemes = []; - private $condition; - private $priority; - private $env; - - /** - * @param array|string $data data array managed by the Doctrine Annotations library or the path - * @param array|string|null $path - * @param string[] $requirements - * @param string[]|string $methods - * @param string[]|string $schemes - * - * @throws \BadMethodCallException - */ - public function __construct( - $data = [], - $path = null, - string $name = null, - array $requirements = [], - array $options = [], - array $defaults = [], - string $host = null, - $methods = [], - $schemes = [], - string $condition = null, - int $priority = null, - string $locale = null, - string $format = null, - bool $utf8 = null, - bool $stateless = null, - string $env = null - ) { - if (\is_string($data)) { - $data = ['path' => $data]; - } elseif (!\is_array($data)) { - throw new \TypeError(sprintf('"%s": Argument $data is expected to be a string or array, got "%s".', __METHOD__, get_debug_type($data))); - } elseif ([] !== $data) { - $deprecation = false; - foreach ($data as $key => $val) { - if (\in_array($key, ['path', 'name', 'requirements', 'options', 'defaults', 'host', 'methods', 'schemes', 'condition', 'priority', 'locale', 'format', 'utf8', 'stateless', 'env', 'value'])) { - $deprecation = true; - } - } - - if ($deprecation) { - trigger_deprecation('symfony/routing', '5.3', 'Passing an array as first argument to "%s" is deprecated. Use named arguments instead.', __METHOD__); - } else { - $localizedPaths = $data; - $data = ['path' => $localizedPaths]; - } - } - if (null !== $path && !\is_string($path) && !\is_array($path)) { - throw new \TypeError(sprintf('"%s": Argument $path is expected to be a string, array or null, got "%s".', __METHOD__, get_debug_type($path))); - } - - $data['path'] = $data['path'] ?? $path; - $data['name'] = $data['name'] ?? $name; - $data['requirements'] = $data['requirements'] ?? $requirements; - $data['options'] = $data['options'] ?? $options; - $data['defaults'] = $data['defaults'] ?? $defaults; - $data['host'] = $data['host'] ?? $host; - $data['methods'] = $data['methods'] ?? $methods; - $data['schemes'] = $data['schemes'] ?? $schemes; - $data['condition'] = $data['condition'] ?? $condition; - $data['priority'] = $data['priority'] ?? $priority; - $data['locale'] = $data['locale'] ?? $locale; - $data['format'] = $data['format'] ?? $format; - $data['utf8'] = $data['utf8'] ?? $utf8; - $data['stateless'] = $data['stateless'] ?? $stateless; - $data['env'] = $data['env'] ?? $env; - - $data = array_filter($data, static function ($value): bool { - return null !== $value; - }); - - if (isset($data['localized_paths'])) { - throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', static::class)); - } - - if (isset($data['value'])) { - $data[\is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value']; - unset($data['value']); - } - - if (isset($data['path']) && \is_array($data['path'])) { - $data['localized_paths'] = $data['path']; - unset($data['path']); - } - - if (isset($data['locale'])) { - $data['defaults']['_locale'] = $data['locale']; - unset($data['locale']); - } - - if (isset($data['format'])) { - $data['defaults']['_format'] = $data['format']; - unset($data['format']); - } - - if (isset($data['utf8'])) { - $data['options']['utf8'] = filter_var($data['utf8'], \FILTER_VALIDATE_BOOLEAN) ?: false; - unset($data['utf8']); - } - - if (isset($data['stateless'])) { - $data['defaults']['_stateless'] = filter_var($data['stateless'], \FILTER_VALIDATE_BOOLEAN) ?: false; - unset($data['stateless']); - } - - foreach ($data as $key => $value) { - $method = 'set'.str_replace('_', '', $key); - if (!method_exists($this, $method)) { - throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, static::class)); - } - $this->$method($value); - } - } - - public function setPath(string $path) - { - $this->path = $path; - } - - public function getPath() - { - return $this->path; - } - - public function setLocalizedPaths(array $localizedPaths) - { - $this->localizedPaths = $localizedPaths; - } - - public function getLocalizedPaths(): array - { - return $this->localizedPaths; - } - - public function setHost(string $pattern) - { - $this->host = $pattern; - } - - public function getHost() - { - return $this->host; - } - - public function setName(string $name) - { - $this->name = $name; - } - - public function getName() - { - return $this->name; - } - - public function setRequirements(array $requirements) - { - $this->requirements = $requirements; - } - - public function getRequirements() - { - return $this->requirements; - } - - public function setOptions(array $options) - { - $this->options = $options; - } - - public function getOptions() - { - return $this->options; - } - - public function setDefaults(array $defaults) - { - $this->defaults = $defaults; - } - - public function getDefaults() - { - return $this->defaults; - } - - public function setSchemes($schemes) - { - $this->schemes = \is_array($schemes) ? $schemes : [$schemes]; - } - - public function getSchemes() - { - return $this->schemes; - } - - public function setMethods($methods) - { - $this->methods = \is_array($methods) ? $methods : [$methods]; - } - - public function getMethods() - { - return $this->methods; - } - - public function setCondition(?string $condition) - { - $this->condition = $condition; - } - - public function getCondition() - { - return $this->condition; - } - - public function setPriority(int $priority): void - { - $this->priority = $priority; - } - - public function getPriority(): ?int - { - return $this->priority; - } - - public function setEnv(?string $env): void - { - $this->env = $env; - } - - public function getEnv(): ?string - { - return $this->env; - } -} diff --git a/vendor/symfony/routing/CHANGELOG.md b/vendor/symfony/routing/CHANGELOG.md deleted file mode 100644 index b966389..0000000 --- a/vendor/symfony/routing/CHANGELOG.md +++ /dev/null @@ -1,296 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Already encoded slashes are not decoded nor double-encoded anymore when generating URLs - * Add support for per-env configuration in XML and Yaml loaders - * Deprecate creating instances of the `Route` annotation class by passing an array of parameters - * Add `RoutingConfigurator::env()` to get the current environment - -5.2.0 ------ - - * Added support for inline definition of requirements and defaults for host - * Added support for `\A` and `\z` as regex start and end for route requirement - * Added support for `#[Route]` attributes - -5.1.0 ------ - - * added the protected method `PhpFileLoader::callConfigurator()` as extension point to ease custom routing configuration - * deprecated `RouteCollectionBuilder` in favor of `RoutingConfigurator`. - * added "priority" option to annotated routes - * added argument `$priority` to `RouteCollection::add()` - * deprecated the `RouteCompiler::REGEX_DELIMITER` constant - * added `ExpressionLanguageProvider` to expose extra functions to route conditions - * added support for a `stateless` keyword for configuring route stateless in PHP, YAML and XML configurations. - * added the "hosts" option to be able to configure the host per locale. - * added `RequestContext::fromUri()` to ease building the default context - -5.0.0 ------ - - * removed `PhpGeneratorDumper` and `PhpMatcherDumper` - * removed `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options - * `Serializable` implementing methods for `Route` and `CompiledRoute` are final - * removed referencing service route loaders with a single colon - * Removed `ServiceRouterLoader` and `ObjectRouteLoader`. - -4.4.0 ------ - - * Deprecated `ServiceRouterLoader` in favor of `ContainerLoader`. - * Deprecated `ObjectRouteLoader` in favor of `ObjectLoader`. - * Added a way to exclude patterns of resources from being imported by the `import()` method - -4.3.0 ------ - - * added `CompiledUrlMatcher` and `CompiledUrlMatcherDumper` - * added `CompiledUrlGenerator` and `CompiledUrlGeneratorDumper` - * deprecated `PhpGeneratorDumper` and `PhpMatcherDumper` - * deprecated `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options - * `Serializable` implementing methods for `Route` and `CompiledRoute` are marked as `@internal` and `@final`. - Instead of overwriting them, use `__serialize` and `__unserialize` as extension points which are forward compatible - with the new serialization methods in PHP 7.4. - * exposed `utf8` Route option, defaults "locale" and "format" in configuration loaders and configurators - * added support for invokable service route loaders - -4.2.0 ------ - - * added fallback to cultureless locale for internationalized routes - -4.0.0 ------ - - * dropped support for using UTF-8 route patterns without using the `utf8` option - * dropped support for using UTF-8 route requirements without using the `utf8` option - -3.4.0 ------ - - * Added `NoConfigurationException`. - * Added the possibility to define a prefix for all routes of a controller via @Route(name="prefix_") - * Added support for prioritized routing loaders. - * Add matched and default parameters to redirect responses - * Added support for a `controller` keyword for configuring route controllers in YAML and XML configurations. - -3.3.0 ------ - - * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0. - * router.options.generator_class - * router.options.generator_base_class - * router.options.generator_dumper_class - * router.options.matcher_class - * router.options.matcher_base_class - * router.options.matcher_dumper_class - * router.options.matcher.cache_class - * router.options.generator.cache_class - -3.2.0 ------ - - * Added support for `bool`, `int`, `float`, `string`, `list` and `map` defaults in XML configurations. - * Added support for UTF-8 requirements - -2.8.0 ------ - - * allowed specifying a directory to recursively load all routing configuration files it contains - * Added ObjectRouteLoader and ServiceRouteLoader that allow routes to be loaded - by calling a method on an object/service. - * [DEPRECATION] Deprecated the hardcoded value for the `$referenceType` argument of the `UrlGeneratorInterface::generate` method. - Use the constants defined in the `UrlGeneratorInterface` instead. - - Before: - - ```php - $router->generate('blog_show', ['slug' => 'my-blog-post'], true); - ``` - - After: - - ```php - use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - - $router->generate('blog_show', ['slug' => 'my-blog-post'], UrlGeneratorInterface::ABSOLUTE_URL); - ``` - -2.5.0 ------ - - * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and - will be removed in Symfony 3.0, since the performance gains were minimal and - it's hard to replicate the behavior of PHP implementation. - -2.3.0 ------ - - * added RequestContext::getQueryString() - -2.2.0 ------ - - * [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0): - - * The `pattern` setting for a route has been deprecated in favor of `path` - * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings - - Before: - - ```yaml - article_edit: - pattern: /article/{id} - requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } - ``` - - ```xml - - POST|PUT - https - \d+ - - ``` - - ```php - $route = new Route(); - $route->setPattern('/article/{id}'); - $route->setRequirement('_method', 'POST|PUT'); - $route->setRequirement('_scheme', 'https'); - ``` - - After: - - ```yaml - article_edit: - path: /article/{id} - methods: [POST, PUT] - schemes: https - requirements: { 'id': '\d+' } - ``` - - ```xml - - \d+ - - ``` - - ```php - $route = new Route(); - $route->setPath('/article/{id}'); - $route->setMethods(['POST', 'PUT']); - $route->setSchemes('https'); - ``` - - * [BC BREAK] RouteCollection does not behave like a tree structure anymore but as - a flat array of Routes. So when using PHP to build the RouteCollection, you must - make sure to add routes to the sub-collection before adding it to the parent - collection (this is not relevant when using YAML or XML for Route definitions). - - Before: - - ```php - $rootCollection = new RouteCollection(); - $subCollection = new RouteCollection(); - $rootCollection->addCollection($subCollection); - $subCollection->add('foo', new Route('/foo')); - ``` - - After: - - ```php - $rootCollection = new RouteCollection(); - $subCollection = new RouteCollection(); - $subCollection->add('foo', new Route('/foo')); - $rootCollection->addCollection($subCollection); - ``` - - Also one must call `addCollection` from the bottom to the top hierarchy. - So the correct sequence is the following (and not the reverse): - - ```php - $childCollection->addCollection($grandchildCollection); - $rootCollection->addCollection($childCollection); - ``` - - * [DEPRECATION] The methods `RouteCollection::getParent()` and `RouteCollection::getRoot()` - have been deprecated and will be removed in Symfony 2.3. - * [BC BREAK] Misusing the `RouteCollection::addPrefix` method to add defaults, requirements - or options without adding a prefix is not supported anymore. So if you called `addPrefix` - with an empty prefix or `/` only (both have no relevance), like - `addPrefix('', $defaultsArray, $requirementsArray, $optionsArray)` - you need to use the new dedicated methods `addDefaults($defaultsArray)`, - `addRequirements($requirementsArray)` or `addOptions($optionsArray)` instead. - * [DEPRECATION] The `$options` parameter to `RouteCollection::addPrefix()` has been deprecated - because adding options has nothing to do with adding a path prefix. If you want to add options - to all child routes of a RouteCollection, you can use `addOptions()`. - * [DEPRECATION] The method `RouteCollection::getPrefix()` has been deprecated - because it suggested that all routes in the collection would have this prefix, which is - not necessarily true. On top of that, since there is no tree structure anymore, this method - is also useless. Don't worry about performance, prefix optimization for matching is still done - in the dumper, which was also improved in 2.2.0 to find even more grouping possibilities. - * [DEPRECATION] `RouteCollection::addCollection(RouteCollection $collection)` should now only be - used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options` - will still work, but have been deprecated. The `addPrefix` method should be used for this - use-case instead. - Before: `$parentCollection->addCollection($collection, '/prefix', [...], [...])` - After: - ```php - $collection->addPrefix('/prefix', [...], [...]); - $parentCollection->addCollection($collection); - ``` - * added support for the method default argument values when defining a @Route - * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`. - * Characters that function as separator between placeholders are now whitelisted - to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`. - * [BC BREAK] The default requirement of a variable has been changed slightly. - Previously it disallowed the previous and the next char around a variable. Now - it disallows the slash (`/`) and the next char. Using the previous char added - no value and was problematic because the route `/index.{_format}` would be - matched by `/index.ht/ml`. - * The default requirement now uses possessive quantifiers when possible which - improves matching performance by up to 20% because it prevents backtracking - when it's not needed. - * The ConfigurableRequirementsInterface can now also be used to disable the requirements - check on URL generation completely by calling `setStrictRequirements(null)`. It - improves performance in production environment as you should know that params always - pass the requirements (otherwise it would break your link anyway). - * There is no restriction on the route name anymore. So non-alphanumeric characters - are now also allowed. - * [BC BREAK] `RouteCompilerInterface::compile(Route $route)` was made static - (only relevant if you implemented your own RouteCompiler). - * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g. - "../parent-file" and "//example.com/dir/file". The third parameter in - `UrlGeneratorInterface::generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)` - now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for - claritiy. The old method calls with a Boolean parameter will continue to work because they - equal the signature using the constants. - -2.1.0 ------ - - * added RequestMatcherInterface - * added RequestContext::fromRequest() - * the UrlMatcher does not throw a \LogicException anymore when the required - scheme is not the current one - * added TraceableUrlMatcher - * added the possibility to define options, default values and requirements - for placeholders in prefix, including imported routes - * added RouterInterface::getRouteCollection - * [BC BREAK] the UrlMatcher urldecodes the route parameters only once, they - were decoded twice before. Note that the `urldecode()` calls have been - changed for a single `rawurldecode()` in order to support `+` for input - paths. - * added RouteCollection::getRoot method to retrieve the root of a - RouteCollection tree - * [BC BREAK] made RouteCollection::setParent private which could not have - been used anyway without creating inconsistencies - * [BC BREAK] RouteCollection::remove also removes a route from parent - collections (not only from its children) - * added ConfigurableRequirementsInterface that allows to disable exceptions - (and generate empty URLs instead) when generating a route with an invalid - parameter value diff --git a/vendor/symfony/routing/CompiledRoute.php b/vendor/symfony/routing/CompiledRoute.php deleted file mode 100644 index 1449cdb..0000000 --- a/vendor/symfony/routing/CompiledRoute.php +++ /dev/null @@ -1,173 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * CompiledRoutes are returned by the RouteCompiler class. - * - * @author Fabien Potencier - */ -class CompiledRoute implements \Serializable -{ - private $variables; - private $tokens; - private $staticPrefix; - private $regex; - private $pathVariables; - private $hostVariables; - private $hostRegex; - private $hostTokens; - - /** - * @param string $staticPrefix The static prefix of the compiled route - * @param string $regex The regular expression to use to match this route - * @param array $tokens An array of tokens to use to generate URL for this route - * @param array $pathVariables An array of path variables - * @param string|null $hostRegex Host regex - * @param array $hostTokens Host tokens - * @param array $hostVariables An array of host variables - * @param array $variables An array of variables (variables defined in the path and in the host patterns) - */ - public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = []) - { - $this->staticPrefix = $staticPrefix; - $this->regex = $regex; - $this->tokens = $tokens; - $this->pathVariables = $pathVariables; - $this->hostRegex = $hostRegex; - $this->hostTokens = $hostTokens; - $this->hostVariables = $hostVariables; - $this->variables = $variables; - } - - public function __serialize(): array - { - return [ - 'vars' => $this->variables, - 'path_prefix' => $this->staticPrefix, - 'path_regex' => $this->regex, - 'path_tokens' => $this->tokens, - 'path_vars' => $this->pathVariables, - 'host_regex' => $this->hostRegex, - 'host_tokens' => $this->hostTokens, - 'host_vars' => $this->hostVariables, - ]; - } - - /** - * @internal - */ - final public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function __unserialize(array $data): void - { - $this->variables = $data['vars']; - $this->staticPrefix = $data['path_prefix']; - $this->regex = $data['path_regex']; - $this->tokens = $data['path_tokens']; - $this->pathVariables = $data['path_vars']; - $this->hostRegex = $data['host_regex']; - $this->hostTokens = $data['host_tokens']; - $this->hostVariables = $data['host_vars']; - } - - /** - * @internal - */ - final public function unserialize($serialized) - { - $this->__unserialize(unserialize($serialized, ['allowed_classes' => false])); - } - - /** - * Returns the static prefix. - * - * @return string - */ - public function getStaticPrefix() - { - return $this->staticPrefix; - } - - /** - * Returns the regex. - * - * @return string - */ - public function getRegex() - { - return $this->regex; - } - - /** - * Returns the host regex. - * - * @return string|null - */ - public function getHostRegex() - { - return $this->hostRegex; - } - - /** - * Returns the tokens. - * - * @return array - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Returns the host tokens. - * - * @return array - */ - public function getHostTokens() - { - return $this->hostTokens; - } - - /** - * Returns the variables. - * - * @return array - */ - public function getVariables() - { - return $this->variables; - } - - /** - * Returns the path variables. - * - * @return array - */ - public function getPathVariables() - { - return $this->pathVariables; - } - - /** - * Returns the host variables. - * - * @return array - */ - public function getHostVariables() - { - return $this->hostVariables; - } -} diff --git a/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php b/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php deleted file mode 100644 index 0e9b9c8..0000000 --- a/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged routing.loader services to routing.resolver service. - * - * @author Fabien Potencier - */ -class RoutingResolverPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - private $resolverServiceId; - private $loaderTag; - - public function __construct(string $resolverServiceId = 'routing.resolver', string $loaderTag = 'routing.loader') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/routing', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->resolverServiceId = $resolverServiceId; - $this->loaderTag = $loaderTag; - } - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition($this->resolverServiceId)) { - return; - } - - $definition = $container->getDefinition($this->resolverServiceId); - - foreach ($this->findAndSortTaggedServices($this->loaderTag, $container) as $id) { - $definition->addMethodCall('addLoader', [new Reference($id)]); - } - } -} diff --git a/vendor/symfony/routing/Exception/ExceptionInterface.php b/vendor/symfony/routing/Exception/ExceptionInterface.php deleted file mode 100644 index 22e72b1..0000000 --- a/vendor/symfony/routing/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * ExceptionInterface. - * - * @author Alexandre Salomé - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/routing/Exception/InvalidArgumentException.php b/vendor/symfony/routing/Exception/InvalidArgumentException.php deleted file mode 100644 index 950b9b1..0000000 --- a/vendor/symfony/routing/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Exception/InvalidParameterException.php b/vendor/symfony/routing/Exception/InvalidParameterException.php deleted file mode 100644 index 94d841f..0000000 --- a/vendor/symfony/routing/Exception/InvalidParameterException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a parameter is not valid. - * - * @author Alexandre Salomé - */ -class InvalidParameterException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Exception/MethodNotAllowedException.php b/vendor/symfony/routing/Exception/MethodNotAllowedException.php deleted file mode 100644 index 27cf212..0000000 --- a/vendor/symfony/routing/Exception/MethodNotAllowedException.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * The resource was found but the request method is not allowed. - * - * This exception should trigger an HTTP 405 response in your application code. - * - * @author Kris Wallsmith - */ -class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface -{ - protected $allowedMethods = []; - - /** - * @param string[] $allowedMethods - */ - public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null) - { - if (null === $message) { - trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - - $this->allowedMethods = array_map('strtoupper', $allowedMethods); - - parent::__construct($message, $code, $previous); - } - - /** - * Gets the allowed HTTP methods. - * - * @return string[] - */ - public function getAllowedMethods() - { - return $this->allowedMethods; - } -} diff --git a/vendor/symfony/routing/Exception/MissingMandatoryParametersException.php b/vendor/symfony/routing/Exception/MissingMandatoryParametersException.php deleted file mode 100644 index 57f3a40..0000000 --- a/vendor/symfony/routing/Exception/MissingMandatoryParametersException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a route cannot be generated because of missing - * mandatory parameters. - * - * @author Alexandre Salomé - */ -class MissingMandatoryParametersException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Exception/NoConfigurationException.php b/vendor/symfony/routing/Exception/NoConfigurationException.php deleted file mode 100644 index 333bc74..0000000 --- a/vendor/symfony/routing/Exception/NoConfigurationException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when no routes are configured. - * - * @author Yonel Ceruto - */ -class NoConfigurationException extends ResourceNotFoundException -{ -} diff --git a/vendor/symfony/routing/Exception/ResourceNotFoundException.php b/vendor/symfony/routing/Exception/ResourceNotFoundException.php deleted file mode 100644 index ccbca15..0000000 --- a/vendor/symfony/routing/Exception/ResourceNotFoundException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * The resource was not found. - * - * This exception should trigger an HTTP 404 response in your application code. - * - * @author Kris Wallsmith - */ -class ResourceNotFoundException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Exception/RouteCircularReferenceException.php b/vendor/symfony/routing/Exception/RouteCircularReferenceException.php deleted file mode 100644 index 841e359..0000000 --- a/vendor/symfony/routing/Exception/RouteCircularReferenceException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class RouteCircularReferenceException extends RuntimeException -{ - public function __construct(string $routeId, array $path) - { - parent::__construct(sprintf('Circular reference detected for route "%s", path: "%s".', $routeId, implode(' -> ', $path))); - } -} diff --git a/vendor/symfony/routing/Exception/RouteNotFoundException.php b/vendor/symfony/routing/Exception/RouteNotFoundException.php deleted file mode 100644 index 24ab0b4..0000000 --- a/vendor/symfony/routing/Exception/RouteNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -/** - * Exception thrown when a route does not exist. - * - * @author Alexandre Salomé - */ -class RouteNotFoundException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Exception/RuntimeException.php b/vendor/symfony/routing/Exception/RuntimeException.php deleted file mode 100644 index 48da62e..0000000 --- a/vendor/symfony/routing/Exception/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Exception; - -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/routing/Generator/CompiledUrlGenerator.php b/vendor/symfony/routing/Generator/CompiledUrlGenerator.php deleted file mode 100644 index 8cbbf8f..0000000 --- a/vendor/symfony/routing/Generator/CompiledUrlGenerator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContext; - -/** - * Generates URLs based on rules dumped by CompiledUrlGeneratorDumper. - */ -class CompiledUrlGenerator extends UrlGenerator -{ - private $compiledRoutes = []; - private $defaultLocale; - - public function __construct(array $compiledRoutes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->compiledRoutes = $compiledRoutes; - $this->context = $context; - $this->logger = $logger; - $this->defaultLocale = $defaultLocale; - } - - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - $locale = $parameters['_locale'] - ?? $this->context->getParameter('_locale') - ?: $this->defaultLocale; - - if (null !== $locale) { - do { - if (($this->compiledRoutes[$name.'.'.$locale][1]['_canonical_route'] ?? null) === $name) { - $name .= '.'.$locale; - break; - } - } while (false !== $locale = strstr($locale, '_', true)); - } - - if (!isset($this->compiledRoutes[$name])) { - throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); - } - - [$variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes, $deprecations] = $this->compiledRoutes[$name] + [6 => []]; - - foreach ($deprecations as $deprecation) { - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - if (isset($defaults['_canonical_route']) && isset($defaults['_locale'])) { - if (!\in_array('_locale', $variables, true)) { - unset($parameters['_locale']); - } elseif (!isset($parameters['_locale'])) { - $parameters['_locale'] = $defaults['_locale']; - } - } - - return $this->doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, $requiredSchemes); - } -} diff --git a/vendor/symfony/routing/Generator/ConfigurableRequirementsInterface.php b/vendor/symfony/routing/Generator/ConfigurableRequirementsInterface.php deleted file mode 100644 index 568f7f7..0000000 --- a/vendor/symfony/routing/Generator/ConfigurableRequirementsInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -/** - * ConfigurableRequirementsInterface must be implemented by URL generators that - * can be configured whether an exception should be generated when the parameters - * do not match the requirements. It is also possible to disable the requirements - * check for URL generation completely. - * - * The possible configurations and use-cases: - * - setStrictRequirements(true): Throw an exception for mismatching requirements. This - * is mostly useful in development environment. - * - setStrictRequirements(false): Don't throw an exception but return an empty string as URL for - * mismatching requirements and log the problem. Useful when you cannot control all - * params because they come from third party libs but don't want to have a 404 in - * production environment. It should log the mismatch so one can review it. - * - setStrictRequirements(null): Return the URL with the given parameters without - * checking the requirements at all. When generating a URL you should either trust - * your params or you validated them beforehand because otherwise it would break your - * link anyway. So in production environment you should know that params always pass - * the requirements. Thus this option allows to disable the check on URL generation for - * performance reasons (saving a preg_match for each requirement every time a URL is - * generated). - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -interface ConfigurableRequirementsInterface -{ - /** - * Enables or disables the exception on incorrect parameters. - * Passing null will deactivate the requirements check completely. - */ - public function setStrictRequirements(?bool $enabled); - - /** - * Returns whether to throw an exception on incorrect parameters. - * Null means the requirements check is deactivated completely. - * - * @return bool|null - */ - public function isStrictRequirements(); -} diff --git a/vendor/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php b/vendor/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php deleted file mode 100644 index 9c6740b..0000000 --- a/vendor/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\Exception\RouteCircularReferenceException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; - -/** - * CompiledUrlGeneratorDumper creates a PHP array to be used with CompiledUrlGenerator. - * - * @author Fabien Potencier - * @author Tobias Schultze - * @author Nicolas Grekas - */ -class CompiledUrlGeneratorDumper extends GeneratorDumper -{ - public function getCompiledRoutes(): array - { - $compiledRoutes = []; - foreach ($this->getRoutes()->all() as $name => $route) { - $compiledRoute = $route->compile(); - - $compiledRoutes[$name] = [ - $compiledRoute->getVariables(), - $route->getDefaults(), - $route->getRequirements(), - $compiledRoute->getTokens(), - $compiledRoute->getHostTokens(), - $route->getSchemes(), - [], - ]; - } - - return $compiledRoutes; - } - - public function getCompiledAliases(): array - { - $routes = $this->getRoutes(); - $compiledAliases = []; - foreach ($routes->getAliases() as $name => $alias) { - $deprecations = $alias->isDeprecated() ? [$alias->getDeprecation($name)] : []; - $currentId = $alias->getId(); - $visited = []; - while (null !== $alias = $routes->getAlias($currentId) ?? null) { - if (false !== $searchKey = array_search($currentId, $visited)) { - $visited[] = $currentId; - - throw new RouteCircularReferenceException($currentId, \array_slice($visited, $searchKey)); - } - - if ($alias->isDeprecated()) { - $deprecations[] = $deprecation = $alias->getDeprecation($currentId); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - $visited[] = $currentId; - $currentId = $alias->getId(); - } - - if (null === $target = $routes->get($currentId)) { - throw new RouteNotFoundException(sprintf('Target route "%s" for alias "%s" does not exist.', $currentId, $name)); - } - - $compiledTarget = $target->compile(); - - $compiledAliases[$name] = [ - $compiledTarget->getVariables(), - $target->getDefaults(), - $target->getRequirements(), - $compiledTarget->getTokens(), - $compiledTarget->getHostTokens(), - $target->getSchemes(), - $deprecations, - ]; - } - - return $compiledAliases; - } - - /** - * {@inheritdoc} - */ - public function dump(array $options = []) - { - return <<generateDeclaredRoutes()} -]; - -EOF; - } - - /** - * Generates PHP code representing an array of defined routes - * together with the routes properties (e.g. requirements). - */ - private function generateDeclaredRoutes(): string - { - $routes = ''; - foreach ($this->getCompiledRoutes() as $name => $properties) { - $routes .= sprintf("\n '%s' => %s,", $name, CompiledUrlMatcherDumper::export($properties)); - } - - foreach ($this->getCompiledAliases() as $alias => $properties) { - $routes .= sprintf("\n '%s' => %s,", $alias, CompiledUrlMatcherDumper::export($properties)); - } - - return $routes; - } -} diff --git a/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php b/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php deleted file mode 100644 index 659c5ba..0000000 --- a/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * GeneratorDumper is the base class for all built-in generator dumpers. - * - * @author Fabien Potencier - */ -abstract class GeneratorDumper implements GeneratorDumperInterface -{ - private $routes; - - public function __construct(RouteCollection $routes) - { - $this->routes = $routes; - } - - /** - * {@inheritdoc} - */ - public function getRoutes() - { - return $this->routes; - } -} diff --git a/vendor/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php b/vendor/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php deleted file mode 100644 index d4a248a..0000000 --- a/vendor/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * GeneratorDumperInterface is the interface that all generator dumper classes must implement. - * - * @author Fabien Potencier - */ -interface GeneratorDumperInterface -{ - /** - * Dumps a set of routes to a string representation of executable code - * that can then be used to generate a URL of such a route. - * - * @return string - */ - public function dump(array $options = []); - - /** - * Gets the routes to dump. - * - * @return RouteCollection - */ - public function getRoutes(); -} diff --git a/vendor/symfony/routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Generator/UrlGenerator.php deleted file mode 100644 index acf3ead..0000000 --- a/vendor/symfony/routing/Generator/UrlGenerator.php +++ /dev/null @@ -1,378 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Routing\Exception\InvalidParameterException; -use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; - -/** - * UrlGenerator can generate a URL or a path for any route in the RouteCollection - * based on the passed parameters. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface -{ - private const QUERY_FRAGMENT_DECODED = [ - // RFC 3986 explicitly allows those in the query/fragment to reference other URIs unencoded - '%2F' => '/', - '%3F' => '?', - // reserved chars that have no special meaning for HTTP URIs in a query or fragment - // this excludes esp. "&", "=" and also "+" because PHP would treat it as a space (form-encoded) - '%40' => '@', - '%3A' => ':', - '%21' => '!', - '%3B' => ';', - '%2C' => ',', - '%2A' => '*', - ]; - - protected $routes; - protected $context; - - /** - * @var bool|null - */ - protected $strictRequirements = true; - - protected $logger; - - private $defaultLocale; - - /** - * This array defines the characters (besides alphanumeric ones) that will not be percent-encoded in the path segment of the generated URL. - * - * PHP's rawurlencode() encodes all chars except "a-zA-Z0-9-._~" according to RFC 3986. But we want to allow some chars - * to be used in their literal form (reasons below). Other chars inside the path must of course be encoded, e.g. - * "?" and "#" (would be interpreted wrongly as query and fragment identifier), - * "'" and """ (are used as delimiters in HTML). - */ - protected $decodedChars = [ - // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning - // some webservers don't allow the slash in encoded form in the path for security reasons anyway - // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss - '%2F' => '/', - '%252F' => '%2F', - // the following chars are general delimiters in the URI specification but have only special meaning in the authority component - // so they can safely be used in the path in unencoded form - '%40' => '@', - '%3A' => ':', - // these chars are only sub-delimiters that have no predefined meaning and can therefore be used literally - // so URI producing applications can use these chars to delimit subcomponents in a path segment without being encoded for better readability - '%3B' => ';', - '%2C' => ',', - '%3D' => '=', - '%2B' => '+', - '%21' => '!', - '%2A' => '*', - '%7C' => '|', - ]; - - public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->routes = $routes; - $this->context = $context; - $this->logger = $logger; - $this->defaultLocale = $defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * {@inheritdoc} - */ - public function setStrictRequirements(?bool $enabled) - { - $this->strictRequirements = $enabled; - } - - /** - * {@inheritdoc} - */ - public function isStrictRequirements() - { - return $this->strictRequirements; - } - - /** - * {@inheritdoc} - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - $route = null; - $locale = $parameters['_locale'] - ?? $this->context->getParameter('_locale') - ?: $this->defaultLocale; - - if (null !== $locale) { - do { - if (null !== ($route = $this->routes->get($name.'.'.$locale)) && $route->getDefault('_canonical_route') === $name) { - break; - } - } while (false !== $locale = strstr($locale, '_', true)); - } - - if (null === $route = $route ?? $this->routes->get($name)) { - throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name)); - } - - // the Route has a cache of its own and is not recompiled as long as it does not get modified - $compiledRoute = $route->compile(); - - $defaults = $route->getDefaults(); - $variables = $compiledRoute->getVariables(); - - if (isset($defaults['_canonical_route']) && isset($defaults['_locale'])) { - if (!\in_array('_locale', $variables, true)) { - unset($parameters['_locale']); - } elseif (!isset($parameters['_locale'])) { - $parameters['_locale'] = $defaults['_locale']; - } - } - - return $this->doGenerate($variables, $defaults, $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); - } - - /** - * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route - * @throws InvalidParameterException When a parameter value for a placeholder is not correct because - * it does not match the requirement - * - * @return string - */ - protected function doGenerate(array $variables, array $defaults, array $requirements, array $tokens, array $parameters, string $name, int $referenceType, array $hostTokens, array $requiredSchemes = []) - { - $variables = array_flip($variables); - $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); - - // all params must be given - if ($diff = array_diff_key($variables, $mergedParams)) { - throw new MissingMandatoryParametersException(sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', array_keys($diff)), $name)); - } - - $url = ''; - $optional = true; - $message = 'Parameter "{parameter}" for route "{route}" must match "{expected}" ("{given}" given) to generate a corresponding URL.'; - foreach ($tokens as $token) { - if ('variable' === $token[0]) { - $varName = $token[3]; - // variable is not important by default - $important = $token[5] ?? false; - - if (!$optional || $important || !\array_key_exists($varName, $defaults) || (null !== $mergedParams[$varName] && (string) $mergedParams[$varName] !== (string) $defaults[$varName])) { - // check requirement (while ignoring look-around patterns) - if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, ['{parameter}' => $varName, '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$varName]])); - } - - if ($this->logger) { - $this->logger->error($message, ['parameter' => $varName, 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$varName]]); - } - - return ''; - } - - $url = $token[1].$mergedParams[$varName].$url; - $optional = false; - } - } else { - // static text - $url = $token[1].$url; - $optional = false; - } - } - - if ('' === $url) { - $url = '/'; - } - - // the contexts base URL is already encoded (see Symfony\Component\HttpFoundation\Request) - $url = strtr(rawurlencode($url), $this->decodedChars); - - // the path segments "." and ".." are interpreted as relative reference when resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 - // so we need to encode them as they are not used for this purpose here - // otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route - $url = strtr($url, ['/../' => '/%2E%2E/', '/./' => '/%2E/']); - if (str_ends_with($url, '/..')) { - $url = substr($url, 0, -2).'%2E%2E'; - } elseif (str_ends_with($url, '/.')) { - $url = substr($url, 0, -1).'%2E'; - } - - $schemeAuthority = ''; - $host = $this->context->getHost(); - $scheme = $this->context->getScheme(); - - if ($requiredSchemes) { - if (!\in_array($scheme, $requiredSchemes, true)) { - $referenceType = self::ABSOLUTE_URL; - $scheme = current($requiredSchemes); - } - } - - if ($hostTokens) { - $routeHost = ''; - foreach ($hostTokens as $token) { - if ('variable' === $token[0]) { - // check requirement (while ignoring look-around patterns) - if (null !== $this->strictRequirements && !preg_match('#^'.preg_replace('/\(\?(?:=|<=|!|strictRequirements) { - throw new InvalidParameterException(strtr($message, ['{parameter}' => $token[3], '{route}' => $name, '{expected}' => $token[2], '{given}' => $mergedParams[$token[3]]])); - } - - if ($this->logger) { - $this->logger->error($message, ['parameter' => $token[3], 'route' => $name, 'expected' => $token[2], 'given' => $mergedParams[$token[3]]]); - } - - return ''; - } - - $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; - } else { - $routeHost = $token[1].$routeHost; - } - } - - if ($routeHost !== $host) { - $host = $routeHost; - if (self::ABSOLUTE_URL !== $referenceType) { - $referenceType = self::NETWORK_PATH; - } - } - } - - if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) { - if ('' !== $host || ('' !== $scheme && 'http' !== $scheme && 'https' !== $scheme)) { - $port = ''; - if ('http' === $scheme && 80 !== $this->context->getHttpPort()) { - $port = ':'.$this->context->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $this->context->getHttpsPort()) { - $port = ':'.$this->context->getHttpsPort(); - } - - $schemeAuthority = self::NETWORK_PATH === $referenceType || '' === $scheme ? '//' : "$scheme://"; - $schemeAuthority .= $host.$port; - } - } - - if (self::RELATIVE_PATH === $referenceType) { - $url = self::getRelativePath($this->context->getPathInfo(), $url); - } else { - $url = $schemeAuthority.$this->context->getBaseUrl().$url; - } - - // add a query string if needed - $extra = array_udiff_assoc(array_diff_key($parameters, $variables), $defaults, function ($a, $b) { - return $a == $b ? 0 : 1; - }); - - array_walk_recursive($extra, $caster = static function (&$v) use (&$caster) { - if (\is_object($v)) { - if ($vars = get_object_vars($v)) { - array_walk_recursive($vars, $caster); - $v = $vars; - } elseif (method_exists($v, '__toString')) { - $v = (string) $v; - } - } - }); - - // extract fragment - $fragment = $defaults['_fragment'] ?? ''; - - if (isset($extra['_fragment'])) { - $fragment = $extra['_fragment']; - unset($extra['_fragment']); - } - - if ($extra && $query = http_build_query($extra, '', '&', \PHP_QUERY_RFC3986)) { - $url .= '?'.strtr($query, self::QUERY_FRAGMENT_DECODED); - } - - if ('' !== $fragment) { - $url .= '#'.strtr(rawurlencode($fragment), self::QUERY_FRAGMENT_DECODED); - } - - return $url; - } - - /** - * Returns the target path as relative reference from the base path. - * - * Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. - * Both paths must be absolute and not contain relative parts. - * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. - * Furthermore, they can be used to reduce the link size in documents. - * - * Example target paths, given a base path of "/a/b/c/d": - * - "/a/b/c/d" -> "" - * - "/a/b/c/" -> "./" - * - "/a/b/" -> "../" - * - "/a/b/c/other" -> "other" - * - "/a/x/y" -> "../../x/y" - * - * @param string $basePath The base path - * @param string $targetPath The target path - * - * @return string - */ - public static function getRelativePath(string $basePath, string $targetPath) - { - if ($basePath === $targetPath) { - return ''; - } - - $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', isset($targetPath[0]) && '/' === $targetPath[0] ? substr($targetPath, 1) : $targetPath); - array_pop($sourceDirs); - $targetFile = array_pop($targetDirs); - - foreach ($sourceDirs as $i => $dir) { - if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { - unset($sourceDirs[$i], $targetDirs[$i]); - } else { - break; - } - } - - $targetDirs[] = $targetFile; - $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); - - // A reference to the same base directory or an empty subdirectory must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name - // (see http://tools.ietf.org/html/rfc3986#section-4.2). - return '' === $path || '/' === $path[0] - || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) - ? "./$path" : $path; - } -} diff --git a/vendor/symfony/routing/Generator/UrlGeneratorInterface.php b/vendor/symfony/routing/Generator/UrlGeneratorInterface.php deleted file mode 100644 index c6d5005..0000000 --- a/vendor/symfony/routing/Generator/UrlGeneratorInterface.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Generator; - -use Symfony\Component\Routing\Exception\InvalidParameterException; -use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * UrlGeneratorInterface is the interface that all URL generator classes must implement. - * - * The constants in this interface define the different types of resource references that - * are declared in RFC 3986: http://tools.ietf.org/html/rfc3986 - * We are using the term "URL" instead of "URI" as this is more common in web applications - * and we do not need to distinguish them as the difference is mostly semantical and - * less technical. Generating URIs, i.e. representation-independent resource identifiers, - * is also possible. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -interface UrlGeneratorInterface extends RequestContextAwareInterface -{ - /** - * Generates an absolute URL, e.g. "http://example.com/dir/file". - */ - public const ABSOLUTE_URL = 0; - - /** - * Generates an absolute path, e.g. "/dir/file". - */ - public const ABSOLUTE_PATH = 1; - - /** - * Generates a relative path based on the current request path, e.g. "../parent-file". - * - * @see UrlGenerator::getRelativePath() - */ - public const RELATIVE_PATH = 2; - - /** - * Generates a network path, e.g. "//example.com/dir/file". - * Such reference reuses the current scheme but specifies the host. - */ - public const NETWORK_PATH = 3; - - /** - * Generates a URL or path for a specific route based on the given parameters. - * - * Parameters that reference placeholders in the route pattern will substitute them in the - * path or host. Extra params are added as query string to the URL. - * - * When the passed reference type cannot be generated for the route because it requires a different - * host or scheme than the current one, the method will return a more comprehensive reference - * that includes the required params. For example, when you call this method with $referenceType = ABSOLUTE_PATH - * but the route requires the https scheme whereas the current scheme is http, it will instead return an - * ABSOLUTE_URL with the https scheme and the current host. This makes sure the generated URL matches - * the route in any case. - * - * If there is no route with the given name, the generator must throw the RouteNotFoundException. - * - * The special parameter _fragment will be used as the document fragment suffixed to the final URL. - * - * @return string - * - * @throws RouteNotFoundException If the named route doesn't exist - * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route - * @throws InvalidParameterException When a parameter value for a placeholder is not correct because - * it does not match the requirement - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH); -} diff --git a/vendor/symfony/routing/LICENSE b/vendor/symfony/routing/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/routing/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Loader/AnnotationClassLoader.php deleted file mode 100644 index ad5af5c..0000000 --- a/vendor/symfony/routing/Loader/AnnotationClassLoader.php +++ /dev/null @@ -1,394 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Loader\LoaderResolverInterface; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Annotation\Route as RouteAnnotation; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationClassLoader loads routing information from a PHP class and its methods. - * - * You need to define an implementation for the configureRoute() method. Most of the - * time, this method should define some PHP callable to be called for the route - * (a controller in MVC speak). - * - * The @Route annotation can be set on the class (for global parameters), - * and on each method. - * - * The @Route annotation main value is the route path. The annotation also - * recognizes several parameters: requirements, options, defaults, schemes, - * methods, host, and name. The name parameter is mandatory. - * Here is an example of how you should be able to use it: - * /** - * * @Route("/Blog") - * * / - * class Blog - * { - * /** - * * @Route("/", name="blog_index") - * * / - * public function index() - * { - * } - * /** - * * @Route("/{id}", name="blog_post", requirements = {"id" = "\d+"}) - * * / - * public function show() - * { - * } - * } - * - * On PHP 8, the annotation class can be used as an attribute as well: - * #[Route('/Blog')] - * class Blog - * { - * #[Route('/', name: 'blog_index')] - * public function index() - * { - * } - * #[Route('/{id}', name: 'blog_post', requirements: ["id" => '\d+'])] - * public function show() - * { - * } - * } - - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -abstract class AnnotationClassLoader implements LoaderInterface -{ - protected $reader; - protected $env; - - /** - * @var string - */ - protected $routeAnnotationClass = RouteAnnotation::class; - - /** - * @var int - */ - protected $defaultRouteIndex = 0; - - public function __construct(Reader $reader = null, string $env = null) - { - $this->reader = $reader; - $this->env = $env; - } - - /** - * Sets the annotation class to read route properties from. - */ - public function setRouteAnnotationClass(string $class) - { - $this->routeAnnotationClass = $class; - } - - /** - * Loads from annotations from a class. - * - * @param string $class A class name - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When route can't be parsed - */ - public function load($class, string $type = null) - { - if (!class_exists($class)) { - throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); - } - - $class = new \ReflectionClass($class); - if ($class->isAbstract()) { - throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class->getName())); - } - - $globals = $this->getGlobals($class); - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($class->getFileName())); - - if ($globals['env'] && $this->env !== $globals['env']) { - return $collection; - } - - foreach ($class->getMethods() as $method) { - $this->defaultRouteIndex = 0; - foreach ($this->getAnnotations($method) as $annot) { - $this->addRoute($collection, $annot, $globals, $class, $method); - } - } - - if (0 === $collection->count() && $class->hasMethod('__invoke')) { - $globals = $this->resetGlobals(); - foreach ($this->getAnnotations($class) as $annot) { - $this->addRoute($collection, $annot, $globals, $class, $class->getMethod('__invoke')); - } - } - - return $collection; - } - - /** - * @param RouteAnnotation $annot or an object that exposes a similar interface - */ - protected function addRoute(RouteCollection $collection, object $annot, array $globals, \ReflectionClass $class, \ReflectionMethod $method) - { - if ($annot->getEnv() && $annot->getEnv() !== $this->env) { - return; - } - - $name = $annot->getName(); - if (null === $name) { - $name = $this->getDefaultRouteName($class, $method); - } - $name = $globals['name'].$name; - - $requirements = $annot->getRequirements(); - - foreach ($requirements as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s::%s()"?', $placeholder, $requirement, $name, $class->getName(), $method->getName())); - } - } - - $defaults = array_replace($globals['defaults'], $annot->getDefaults()); - $requirements = array_replace($globals['requirements'], $requirements); - $options = array_replace($globals['options'], $annot->getOptions()); - $schemes = array_merge($globals['schemes'], $annot->getSchemes()); - $methods = array_merge($globals['methods'], $annot->getMethods()); - - $host = $annot->getHost(); - if (null === $host) { - $host = $globals['host']; - } - - $condition = $annot->getCondition() ?? $globals['condition']; - $priority = $annot->getPriority() ?? $globals['priority']; - - $path = $annot->getLocalizedPaths() ?: $annot->getPath(); - $prefix = $globals['localized_paths'] ?: $globals['path']; - $paths = []; - - if (\is_array($path)) { - if (!\is_array($prefix)) { - foreach ($path as $locale => $localePath) { - $paths[$locale] = $prefix.$localePath; - } - } elseif ($missing = array_diff_key($prefix, $path)) { - throw new \LogicException(sprintf('Route to "%s" is missing paths for locale(s) "%s".', $class->name.'::'.$method->name, implode('", "', array_keys($missing)))); - } else { - foreach ($path as $locale => $localePath) { - if (!isset($prefix[$locale])) { - throw new \LogicException(sprintf('Route to "%s" with locale "%s" is missing a corresponding prefix in class "%s".', $method->name, $locale, $class->name)); - } - - $paths[$locale] = $prefix[$locale].$localePath; - } - } - } elseif (\is_array($prefix)) { - foreach ($prefix as $locale => $localePrefix) { - $paths[$locale] = $localePrefix.$path; - } - } else { - $paths[] = $prefix.$path; - } - - foreach ($method->getParameters() as $param) { - if (isset($defaults[$param->name]) || !$param->isDefaultValueAvailable()) { - continue; - } - foreach ($paths as $locale => $path) { - if (preg_match(sprintf('/\{%s(?:<.*?>)?\}/', preg_quote($param->name)), $path)) { - $defaults[$param->name] = $param->getDefaultValue(); - break; - } - } - } - - foreach ($paths as $locale => $path) { - $route = $this->createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); - $this->configureRoute($route, $class, $method, $annot); - if (0 !== $locale) { - $route->setDefault('_locale', $locale); - $route->setRequirement('_locale', preg_quote($locale)); - $route->setDefault('_canonical_route', $name); - $collection->add($name.'.'.$locale, $route, $priority); - } else { - $collection->add($name, $route, $priority); - } - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); - } - - /** - * {@inheritdoc} - */ - public function setResolver(LoaderResolverInterface $resolver) - { - } - - /** - * {@inheritdoc} - */ - public function getResolver() - { - } - - /** - * Gets the default route name for a class method. - * - * @return string - */ - protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) - { - $name = str_replace('\\', '_', $class->name).'_'.$method->name; - $name = \function_exists('mb_strtolower') && preg_match('//u', $name) ? mb_strtolower($name, 'UTF-8') : strtolower($name); - if ($this->defaultRouteIndex > 0) { - $name .= '_'.$this->defaultRouteIndex; - } - ++$this->defaultRouteIndex; - - return $name; - } - - protected function getGlobals(\ReflectionClass $class) - { - $globals = $this->resetGlobals(); - - $annot = null; - if (\PHP_VERSION_ID >= 80000 && ($attribute = $class->getAttributes($this->routeAnnotationClass, \ReflectionAttribute::IS_INSTANCEOF)[0] ?? null)) { - $annot = $attribute->newInstance(); - } - if (!$annot && $this->reader) { - $annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass); - } - - if ($annot) { - if (null !== $annot->getName()) { - $globals['name'] = $annot->getName(); - } - - if (null !== $annot->getPath()) { - $globals['path'] = $annot->getPath(); - } - - $globals['localized_paths'] = $annot->getLocalizedPaths(); - - if (null !== $annot->getRequirements()) { - $globals['requirements'] = $annot->getRequirements(); - } - - if (null !== $annot->getOptions()) { - $globals['options'] = $annot->getOptions(); - } - - if (null !== $annot->getDefaults()) { - $globals['defaults'] = $annot->getDefaults(); - } - - if (null !== $annot->getSchemes()) { - $globals['schemes'] = $annot->getSchemes(); - } - - if (null !== $annot->getMethods()) { - $globals['methods'] = $annot->getMethods(); - } - - if (null !== $annot->getHost()) { - $globals['host'] = $annot->getHost(); - } - - if (null !== $annot->getCondition()) { - $globals['condition'] = $annot->getCondition(); - } - - $globals['priority'] = $annot->getPriority() ?? 0; - $globals['env'] = $annot->getEnv(); - - foreach ($globals['requirements'] as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" in "%s"?', $placeholder, $requirement, $class->getName())); - } - } - } - - return $globals; - } - - private function resetGlobals(): array - { - return [ - 'path' => null, - 'localized_paths' => [], - 'requirements' => [], - 'options' => [], - 'defaults' => [], - 'schemes' => [], - 'methods' => [], - 'host' => '', - 'condition' => '', - 'name' => '', - 'priority' => 0, - 'env' => null, - ]; - } - - protected function createRoute(string $path, array $defaults, array $requirements, array $options, ?string $host, array $schemes, array $methods, ?string $condition) - { - return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); - } - - abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot); - - /** - * @param \ReflectionClass|\ReflectionMethod $reflection - * - * @return iterable - */ - private function getAnnotations(object $reflection): iterable - { - if (\PHP_VERSION_ID >= 80000) { - foreach ($reflection->getAttributes($this->routeAnnotationClass, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - yield $attribute->newInstance(); - } - } - - if (!$this->reader) { - return; - } - - $anntotations = $reflection instanceof \ReflectionClass - ? $this->reader->getClassAnnotations($reflection) - : $this->reader->getMethodAnnotations($reflection); - - foreach ($anntotations as $annotation) { - if ($annotation instanceof $this->routeAnnotationClass) { - yield $annotation; - } - } - } -} diff --git a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php deleted file mode 100644 index ae825a3..0000000 --- a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationDirectoryLoader loads routing information from annotations set - * on PHP classes and methods. - * - * @author Fabien Potencier - */ -class AnnotationDirectoryLoader extends AnnotationFileLoader -{ - /** - * Loads from annotations from a directory. - * - * @param string $path A directory path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed - */ - public function load($path, string $type = null) - { - if (!is_dir($dir = $this->locator->locate($path))) { - return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection(); - } - - $collection = new RouteCollection(); - $collection->addResource(new DirectoryResource($dir, '/\.php$/')); - $files = iterator_to_array(new \RecursiveIteratorIterator( - new \RecursiveCallbackFilterIterator( - new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - function (\SplFileInfo $current) { - return '.' !== substr($current->getBasename(), 0, 1); - } - ), - \RecursiveIteratorIterator::LEAVES_ONLY - )); - usort($files, function (\SplFileInfo $a, \SplFileInfo $b) { - return (string) $a > (string) $b ? 1 : -1; - }); - - foreach ($files as $file) { - if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) { - continue; - } - - if ($class = $this->findClass($file)) { - $refl = new \ReflectionClass($class); - if ($refl->isAbstract()) { - continue; - } - - $collection->addCollection($this->loader->load($class, $type)); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - if ('annotation' === $type) { - return true; - } - - if ($type || !\is_string($resource)) { - return false; - } - - try { - return is_dir($this->locator->locate($resource)); - } catch (\Exception $e) { - return false; - } - } -} diff --git a/vendor/symfony/routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Loader/AnnotationFileLoader.php deleted file mode 100644 index 27af66e..0000000 --- a/vendor/symfony/routing/Loader/AnnotationFileLoader.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * AnnotationFileLoader loads routing information from annotations set - * on a PHP class and its methods. - * - * @author Fabien Potencier - */ -class AnnotationFileLoader extends FileLoader -{ - protected $loader; - - public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) - { - if (!\function_exists('token_get_all')) { - throw new \LogicException('The Tokenizer extension is required for the routing annotation loaders.'); - } - - parent::__construct($locator); - - $this->loader = $loader; - } - - /** - * Loads from annotations from a file. - * - * @param string $file A PHP file path - * @param string|null $type The resource type - * - * @return RouteCollection|null - * - * @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $collection = new RouteCollection(); - if ($class = $this->findClass($path)) { - $refl = new \ReflectionClass($class); - if ($refl->isAbstract()) { - return null; - } - - $collection->addResource(new FileResource($path)); - $collection->addCollection($this->loader->load($class, $type)); - } - - gc_mem_caches(); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); - } - - /** - * Returns the full class name for the first class in the file. - * - * @return string|false - */ - protected function findClass(string $file) - { - $class = false; - $namespace = false; - $tokens = token_get_all(file_get_contents($file)); - - if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the " true, \T_STRING => true]; - if (\defined('T_NAME_QUALIFIED')) { - $nsTokens[\T_NAME_QUALIFIED] = true; - } - for ($i = 0; isset($tokens[$i]); ++$i) { - $token = $tokens[$i]; - if (!isset($token[1])) { - continue; - } - - if (true === $class && \T_STRING === $token[0]) { - return $namespace.'\\'.$token[1]; - } - - if (true === $namespace && isset($nsTokens[$token[0]])) { - $namespace = $token[1]; - while (isset($tokens[++$i][1], $nsTokens[$tokens[$i][0]])) { - $namespace .= $tokens[$i][1]; - } - $token = $tokens[$i]; - } - - if (\T_CLASS === $token[0]) { - // Skip usage of ::class constant and anonymous classes - $skipClassToken = false; - for ($j = $i - 1; $j > 0; --$j) { - if (!isset($tokens[$j][1])) { - if ('(' === $tokens[$j] || ',' === $tokens[$j]) { - $skipClassToken = true; - } - break; - } - - if (\T_DOUBLE_COLON === $tokens[$j][0] || \T_NEW === $tokens[$j][0]) { - $skipClassToken = true; - break; - } elseif (!\in_array($tokens[$j][0], [\T_WHITESPACE, \T_DOC_COMMENT, \T_COMMENT])) { - break; - } - } - - if (!$skipClassToken) { - $class = true; - } - } - - if (\T_NAMESPACE === $token[0]) { - $namespace = true; - } - } - - return false; - } -} diff --git a/vendor/symfony/routing/Loader/ClosureLoader.php b/vendor/symfony/routing/Loader/ClosureLoader.php deleted file mode 100644 index 42f950f..0000000 --- a/vendor/symfony/routing/Loader/ClosureLoader.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Routing\RouteCollection; - -/** - * ClosureLoader loads routes from a PHP closure. - * - * The Closure must return a RouteCollection instance. - * - * @author Fabien Potencier - */ -class ClosureLoader extends Loader -{ - /** - * Loads a Closure. - * - * @param \Closure $closure A Closure - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($closure, string $type = null) - { - return $closure($this->env); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return $resource instanceof \Closure && (!$type || 'closure' === $type); - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/AliasConfigurator.php b/vendor/symfony/routing/Loader/Configurator/AliasConfigurator.php deleted file mode 100644 index 4b2206e..0000000 --- a/vendor/symfony/routing/Loader/Configurator/AliasConfigurator.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\Routing\Alias; - -class AliasConfigurator -{ - private $alias; - - public function __construct(Alias $alias) - { - $this->alias = $alias; - } - - /** - * Whether this alias is deprecated, that means it should not be called anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function deprecate(string $package, string $version, string $message): self - { - $this->alias->setDeprecated($package, $version, $message); - - return $this; - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php b/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php deleted file mode 100644 index 09274cc..0000000 --- a/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class CollectionConfigurator -{ - use Traits\AddTrait; - use Traits\HostTrait; - use Traits\RouteTrait; - - private $parent; - private $parentConfigurator; - private $parentPrefixes; - private $host; - - public function __construct(RouteCollection $parent, string $name, self $parentConfigurator = null, array $parentPrefixes = null) - { - $this->parent = $parent; - $this->name = $name; - $this->collection = new RouteCollection(); - $this->route = new Route(''); - $this->parentConfigurator = $parentConfigurator; // for GC control - $this->parentPrefixes = $parentPrefixes; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (null === $this->prefixes) { - $this->collection->addPrefix($this->route->getPath()); - } - if (null !== $this->host) { - $this->addHost($this->collection, $this->host); - } - - $this->parent->addCollection($this->collection); - } - - /** - * Creates a sub-collection. - */ - final public function collection(string $name = ''): self - { - return new self($this->collection, $this->name.$name, $this, $this->prefixes); - } - - /** - * Sets the prefix to add to the path of all child routes. - * - * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this - */ - final public function prefix($prefix): self - { - if (\is_array($prefix)) { - if (null === $this->parentPrefixes) { - // no-op - } elseif ($missing = array_diff_key($this->parentPrefixes, $prefix)) { - throw new \LogicException(sprintf('Collection "%s" is missing prefixes for locale(s) "%s".', $this->name, implode('", "', array_keys($missing)))); - } else { - foreach ($prefix as $locale => $localePrefix) { - if (!isset($this->parentPrefixes[$locale])) { - throw new \LogicException(sprintf('Collection "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $this->name, $locale)); - } - - $prefix[$locale] = $this->parentPrefixes[$locale].$localePrefix; - } - } - $this->prefixes = $prefix; - $this->route->setPath('/'); - } else { - $this->prefixes = null; - $this->route->setPath($prefix); - } - - return $this; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->host = $host; - - return $this; - } - - private function createRoute(string $path): Route - { - return (clone $this->route)->setPath($path); - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/ImportConfigurator.php b/vendor/symfony/routing/Loader/Configurator/ImportConfigurator.php deleted file mode 100644 index 32f3efe..0000000 --- a/vendor/symfony/routing/Loader/Configurator/ImportConfigurator.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class ImportConfigurator -{ - use Traits\HostTrait; - use Traits\PrefixTrait; - use Traits\RouteTrait; - - private $parent; - - public function __construct(RouteCollection $parent, RouteCollection $route) - { - $this->parent = $parent; - $this->route = $route; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->parent->addCollection($this->route); - } - - /** - * Sets the prefix to add to the path of all child routes. - * - * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this - */ - final public function prefix($prefix, bool $trailingSlashOnRoot = true): self - { - $this->addPrefix($this->route, $prefix, $trailingSlashOnRoot); - - return $this; - } - - /** - * Sets the prefix to add to the name of all child routes. - * - * @return $this - */ - final public function namePrefix(string $namePrefix): self - { - $this->route->addNamePrefix($namePrefix); - - return $this; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->addHost($this->route, $host); - - return $this; - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php b/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php deleted file mode 100644 index bb6ce26..0000000 --- a/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class RouteConfigurator -{ - use Traits\AddTrait; - use Traits\HostTrait; - use Traits\RouteTrait; - - protected $parentConfigurator; - - public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null) - { - $this->collection = $collection; - $this->route = $route; - $this->name = $name; - $this->parentConfigurator = $parentConfigurator; // for GC control - $this->prefixes = $prefixes; - } - - /** - * Sets the host to use for all child routes. - * - * @param string|array $host the host, or the localized hosts - * - * @return $this - */ - final public function host($host): self - { - $this->addHost($this->route, $host); - - return $this; - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php b/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php deleted file mode 100644 index 4687bf6..0000000 --- a/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator; - -use Symfony\Component\Routing\Loader\PhpFileLoader; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -class RoutingConfigurator -{ - use Traits\AddTrait; - - private $loader; - private $path; - private $file; - private $env; - - public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, string $env = null) - { - $this->collection = $collection; - $this->loader = $loader; - $this->path = $path; - $this->file = $file; - $this->env = $env; - } - - /** - * @param string|string[]|null $exclude Glob patterns to exclude from the import - */ - final public function import($resource, string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator - { - $this->loader->setCurrentDir(\dirname($this->path)); - - $imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file, $exclude) ?: []; - if (!\is_array($imported)) { - return new ImportConfigurator($this->collection, $imported); - } - - $mergedCollection = new RouteCollection(); - foreach ($imported as $subCollection) { - $mergedCollection->addCollection($subCollection); - } - - return new ImportConfigurator($this->collection, $mergedCollection); - } - - final public function collection(string $name = ''): CollectionConfigurator - { - return new CollectionConfigurator($this->collection, $name); - } - - /** - * Get the current environment to be able to write conditional configuration. - */ - final public function env(): ?string - { - return $this->env; - } - - /** - * @return static - */ - final public function withPath(string $path): self - { - $clone = clone $this; - $clone->path = $clone->file = $path; - - return $clone; - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/AddTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/AddTrait.php deleted file mode 100644 index 92b1bd0..0000000 --- a/vendor/symfony/routing/Loader/Configurator/Traits/AddTrait.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Loader\Configurator\AliasConfigurator; -use Symfony\Component\Routing\Loader\Configurator\CollectionConfigurator; -use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator; -use Symfony\Component\Routing\RouteCollection; - -/** - * @author Nicolas Grekas - */ -trait AddTrait -{ - use LocalizedRouteTrait; - - /** - * @var RouteCollection - */ - protected $collection; - protected $name = ''; - protected $prefixes; - - /** - * Adds a route. - * - * @param string|array $path the path, or the localized paths of the route - */ - public function add(string $name, $path): RouteConfigurator - { - $parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null); - $route = $this->createLocalizedRoute($this->collection, $name, $path, $this->name, $this->prefixes); - - return new RouteConfigurator($this->collection, $route, $this->name, $parentConfigurator, $this->prefixes); - } - - public function alias(string $name, string $alias): AliasConfigurator - { - return new AliasConfigurator($this->collection->addAlias($name, $alias)); - } - - /** - * Adds a route. - * - * @param string|array $path the path, or the localized paths of the route - */ - public function __invoke(string $name, $path): RouteConfigurator - { - return $this->add($name, $path); - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/HostTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/HostTrait.php deleted file mode 100644 index 54ae656..0000000 --- a/vendor/symfony/routing/Loader/Configurator/Traits/HostTrait.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - */ -trait HostTrait -{ - final protected function addHost(RouteCollection $routes, $hosts) - { - if (!$hosts || !\is_array($hosts)) { - $routes->setHost($hosts ?: ''); - - return; - } - - foreach ($routes->all() as $name => $route) { - if (null === $locale = $route->getDefault('_locale')) { - $routes->remove($name); - foreach ($hosts as $locale => $host) { - $localizedRoute = clone $route; - $localizedRoute->setDefault('_locale', $locale); - $localizedRoute->setRequirement('_locale', preg_quote($locale)); - $localizedRoute->setDefault('_canonical_route', $name); - $localizedRoute->setHost($host); - $routes->add($name.'.'.$locale, $localizedRoute); - } - } elseif (!isset($hosts[$locale])) { - throw new \InvalidArgumentException(sprintf('Route "%s" with locale "%s" is missing a corresponding host in its parent collection.', $name, $locale)); - } else { - $route->setHost($hosts[$locale]); - $route->setRequirement('_locale', preg_quote($locale)); - $routes->add($name, $route); - } - } - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php deleted file mode 100644 index 4734a4e..0000000 --- a/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - * - * @author Nicolas Grekas - * @author Jules Pietri - */ -trait LocalizedRouteTrait -{ - /** - * Creates one or many routes. - * - * @param string|array $path the path, or the localized paths of the route - */ - final protected function createLocalizedRoute(RouteCollection $collection, string $name, $path, string $namePrefix = '', array $prefixes = null): RouteCollection - { - $paths = []; - - $routes = new RouteCollection(); - - if (\is_array($path)) { - if (null === $prefixes) { - $paths = $path; - } elseif ($missing = array_diff_key($prefixes, $path)) { - throw new \LogicException(sprintf('Route "%s" is missing routes for locale(s) "%s".', $name, implode('", "', array_keys($missing)))); - } else { - foreach ($path as $locale => $localePath) { - if (!isset($prefixes[$locale])) { - throw new \LogicException(sprintf('Route "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $name, $locale)); - } - - $paths[$locale] = $prefixes[$locale].$localePath; - } - } - } elseif (null !== $prefixes) { - foreach ($prefixes as $locale => $prefix) { - $paths[$locale] = $prefix.$path; - } - } else { - $routes->add($namePrefix.$name, $route = $this->createRoute($path)); - $collection->add($namePrefix.$name, $route); - - return $routes; - } - - foreach ($paths as $locale => $path) { - $routes->add($name.'.'.$locale, $route = $this->createRoute($path)); - $collection->add($namePrefix.$name.'.'.$locale, $route); - $route->setDefault('_locale', $locale); - $route->setRequirement('_locale', preg_quote($locale)); - $route->setDefault('_canonical_route', $namePrefix.$name); - } - - return $routes; - } - - private function createRoute(string $path): Route - { - return new Route($path); - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php deleted file mode 100644 index 27053bc..0000000 --- a/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * @internal - * - * @author Nicolas Grekas - */ -trait PrefixTrait -{ - final protected function addPrefix(RouteCollection $routes, $prefix, bool $trailingSlashOnRoot) - { - if (\is_array($prefix)) { - foreach ($prefix as $locale => $localePrefix) { - $prefix[$locale] = trim(trim($localePrefix), '/'); - } - foreach ($routes->all() as $name => $route) { - if (null === $locale = $route->getDefault('_locale')) { - $routes->remove($name); - foreach ($prefix as $locale => $localePrefix) { - $localizedRoute = clone $route; - $localizedRoute->setDefault('_locale', $locale); - $localizedRoute->setRequirement('_locale', preg_quote($locale)); - $localizedRoute->setDefault('_canonical_route', $name); - $localizedRoute->setPath($localePrefix.(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name.'.'.$locale, $localizedRoute); - } - } elseif (!isset($prefix[$locale])) { - throw new \InvalidArgumentException(sprintf('Route "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $name, $locale)); - } else { - $route->setPath($prefix[$locale].(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name, $route); - } - } - - return; - } - - $routes->addPrefix($prefix); - if (!$trailingSlashOnRoot) { - $rootPath = (new Route(trim(trim($prefix), '/').'/'))->getPath(); - foreach ($routes->all() as $route) { - if ($route->getPath() === $rootPath) { - $route->setPath(rtrim($rootPath, '/')); - } - } - } - } -} diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/RouteTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/RouteTrait.php deleted file mode 100644 index ac05d10..0000000 --- a/vendor/symfony/routing/Loader/Configurator/Traits/RouteTrait.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader\Configurator\Traits; - -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -trait RouteTrait -{ - /** - * @var RouteCollection|Route - */ - protected $route; - - /** - * Adds defaults. - * - * @return $this - */ - final public function defaults(array $defaults): self - { - $this->route->addDefaults($defaults); - - return $this; - } - - /** - * Adds requirements. - * - * @return $this - */ - final public function requirements(array $requirements): self - { - $this->route->addRequirements($requirements); - - return $this; - } - - /** - * Adds options. - * - * @return $this - */ - final public function options(array $options): self - { - $this->route->addOptions($options); - - return $this; - } - - /** - * Whether paths should accept utf8 encoding. - * - * @return $this - */ - final public function utf8(bool $utf8 = true): self - { - $this->route->addOptions(['utf8' => $utf8]); - - return $this; - } - - /** - * Sets the condition. - * - * @return $this - */ - final public function condition(string $condition): self - { - $this->route->setCondition($condition); - - return $this; - } - - /** - * Sets the pattern for the host. - * - * @return $this - */ - final public function host(string $pattern): self - { - $this->route->setHost($pattern); - - return $this; - } - - /** - * Sets the schemes (e.g. 'https') this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @param string[] $schemes - * - * @return $this - */ - final public function schemes(array $schemes): self - { - $this->route->setSchemes($schemes); - - return $this; - } - - /** - * Sets the HTTP methods (e.g. 'POST') this route is restricted to. - * So an empty array means that any method is allowed. - * - * @param string[] $methods - * - * @return $this - */ - final public function methods(array $methods): self - { - $this->route->setMethods($methods); - - return $this; - } - - /** - * Adds the "_controller" entry to defaults. - * - * @param callable|string|array $controller a callable or parseable pseudo-callable - * - * @return $this - */ - final public function controller($controller): self - { - $this->route->addDefaults(['_controller' => $controller]); - - return $this; - } - - /** - * Adds the "_locale" entry to defaults. - * - * @return $this - */ - final public function locale(string $locale): self - { - $this->route->addDefaults(['_locale' => $locale]); - - return $this; - } - - /** - * Adds the "_format" entry to defaults. - * - * @return $this - */ - final public function format(string $format): self - { - $this->route->addDefaults(['_format' => $format]); - - return $this; - } - - /** - * Adds the "_stateless" entry to defaults. - * - * @return $this - */ - final public function stateless(bool $stateless = true): self - { - $this->route->addDefaults(['_stateless' => $stateless]); - - return $this; - } -} diff --git a/vendor/symfony/routing/Loader/ContainerLoader.php b/vendor/symfony/routing/Loader/ContainerLoader.php deleted file mode 100644 index d8730ae..0000000 --- a/vendor/symfony/routing/Loader/ContainerLoader.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Psr\Container\ContainerInterface; - -/** - * A route loader that executes a service from a PSR-11 container to load the routes. - * - * @author Ryan Weaver - */ -class ContainerLoader extends ObjectLoader -{ - private $container; - - public function __construct(ContainerInterface $container, string $env = null) - { - $this->container = $container; - parent::__construct($env); - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'service' === $type && \is_string($resource); - } - - /** - * {@inheritdoc} - */ - protected function getObject(string $id) - { - return $this->container->get($id); - } -} diff --git a/vendor/symfony/routing/Loader/DirectoryLoader.php b/vendor/symfony/routing/Loader/DirectoryLoader.php deleted file mode 100644 index c0f3491..0000000 --- a/vendor/symfony/routing/Loader/DirectoryLoader.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Routing\RouteCollection; - -class DirectoryLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $collection = new RouteCollection(); - $collection->addResource(new DirectoryResource($path)); - - foreach (scandir($path) as $dir) { - if ('.' !== $dir[0]) { - $this->setCurrentDir($path); - $subPath = $path.'/'.$dir; - $subType = null; - - if (is_dir($subPath)) { - $subPath .= '/'; - $subType = 'directory'; - } - - $subCollection = $this->import($subPath, $subType, false, $path); - $collection->addCollection($subCollection); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - // only when type is forced to directory, not to conflict with AnnotationLoader - - return 'directory' === $type; - } -} diff --git a/vendor/symfony/routing/Loader/GlobFileLoader.php b/vendor/symfony/routing/Loader/GlobFileLoader.php deleted file mode 100644 index 780fb15..0000000 --- a/vendor/symfony/routing/Loader/GlobFileLoader.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Routing\RouteCollection; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Nicolas Grekas - */ -class GlobFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $type = null) - { - $collection = new RouteCollection(); - - foreach ($this->glob($resource, false, $globResource) as $path => $info) { - $collection->addCollection($this->import($path)); - } - - $collection->addResource($globResource); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return 'glob' === $type; - } -} diff --git a/vendor/symfony/routing/Loader/ObjectLoader.php b/vendor/symfony/routing/Loader/ObjectLoader.php deleted file mode 100644 index 0624539..0000000 --- a/vendor/symfony/routing/Loader/ObjectLoader.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\RouteCollection; - -/** - * A route loader that calls a method on an object to load the routes. - * - * @author Ryan Weaver - */ -abstract class ObjectLoader extends Loader -{ - /** - * Returns the object that the method will be called on to load routes. - * - * For example, if your application uses a service container, - * the $id may be a service id. - * - * @return object - */ - abstract protected function getObject(string $id); - - /** - * Calls the object method that will load the routes. - * - * @param string $resource object_id::method - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($resource, string $type = null) - { - if (!preg_match('/^[^\:]+(?:::(?:[^\:]+))?$/', $resource)) { - throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the %s route loader: use the format "object_id::method" or "object_id" if your object class has an "__invoke" method.', $resource, \is_string($type) ? '"'.$type.'"' : 'object')); - } - - $parts = explode('::', $resource); - $method = $parts[1] ?? '__invoke'; - - $loaderObject = $this->getObject($parts[0]); - - if (!\is_object($loaderObject)) { - throw new \TypeError(sprintf('"%s:getObject()" must return an object: "%s" returned.', static::class, get_debug_type($loaderObject))); - } - - if (!\is_callable([$loaderObject, $method])) { - throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s".', $method, get_debug_type($loaderObject), $resource)); - } - - $routeCollection = $loaderObject->$method($this, $this->env); - - if (!$routeCollection instanceof RouteCollection) { - $type = get_debug_type($routeCollection); - - throw new \LogicException(sprintf('The "%s::%s()" method must return a RouteCollection: "%s" returned.', get_debug_type($loaderObject), $method, $type)); - } - - // make the object file tracked so that if it changes, the cache rebuilds - $this->addClassResource(new \ReflectionClass($loaderObject), $routeCollection); - - return $routeCollection; - } - - private function addClassResource(\ReflectionClass $class, RouteCollection $collection) - { - do { - if (is_file($class->getFileName())) { - $collection->addResource(new FileResource($class->getFileName())); - } - } while ($class = $class->getParentClass()); - } -} diff --git a/vendor/symfony/routing/Loader/PhpFileLoader.php b/vendor/symfony/routing/Loader/PhpFileLoader.php deleted file mode 100644 index 39ac812..0000000 --- a/vendor/symfony/routing/Loader/PhpFileLoader.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; -use Symfony\Component\Routing\RouteCollection; - -/** - * PhpFileLoader loads routes from a PHP file. - * - * The file must return a RouteCollection instance. - * - * @author Fabien Potencier - * @author Nicolas grekas - * @author Jules Pietri - */ -class PhpFileLoader extends FileLoader -{ - /** - * Loads a PHP file. - * - * @param string $file A PHP file path - * @param string|null $type The resource type - * - * @return RouteCollection - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - $this->setCurrentDir(\dirname($path)); - - // the closure forbids access to the private scope in the included file - $loader = $this; - $load = \Closure::bind(static function ($file) use ($loader) { - return include $file; - }, null, ProtectedPhpFileLoader::class); - - $result = $load($path); - - if (\is_object($result) && \is_callable($result)) { - $collection = $this->callConfigurator($result, $path, $file); - } else { - $collection = $result; - } - - $collection->addResource(new FileResource($path)); - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'php' === $type); - } - - protected function callConfigurator(callable $result, string $path, string $file): RouteCollection - { - $collection = new RouteCollection(); - - $result(new RoutingConfigurator($collection, $this, $path, $file, $this->env)); - - return $collection; - } -} - -/** - * @internal - */ -final class ProtectedPhpFileLoader extends PhpFileLoader -{ -} diff --git a/vendor/symfony/routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Loader/XmlFileLoader.php deleted file mode 100644 index 9f502df..0000000 --- a/vendor/symfony/routing/Loader/XmlFileLoader.php +++ /dev/null @@ -1,469 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Routing\Loader\Configurator\Traits\HostTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\LocalizedRouteTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\PrefixTrait; -use Symfony\Component\Routing\RouteCollection; - -/** - * XmlFileLoader loads XML routing files. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class XmlFileLoader extends FileLoader -{ - use HostTrait; - use LocalizedRouteTrait; - use PrefixTrait; - - public const NAMESPACE_URI = 'http://symfony.com/schema/routing'; - public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd'; - - /** - * Loads an XML file. - * - * @param string $file An XML file path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be - * parsed because it does not validate against the scheme - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - $xml = $this->loadFile($path); - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($path)); - - // process routes and imports - foreach ($xml->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement) { - continue; - } - - $this->parseNode($collection, $node, $path, $file); - } - - return $collection; - } - - /** - * Parses a node from a loaded XML file. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseNode(RouteCollection $collection, \DOMElement $node, string $path, string $file) - { - if (self::NAMESPACE_URI !== $node->namespaceURI) { - return; - } - - switch ($node->localName) { - case 'route': - $this->parseRoute($collection, $node, $path); - break; - case 'import': - $this->parseImport($collection, $node, $path, $file); - break; - case 'when': - if (!$this->env || $node->getAttribute('env') !== $this->env) { - break; - } - foreach ($node->childNodes as $node) { - if ($node instanceof \DOMElement) { - $this->parseNode($collection, $node, $path, $file); - } - } - break; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "route" or "import".', $node->localName, $path)); - } - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type); - } - - /** - * Parses a route and adds it to the RouteCollection. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseRoute(RouteCollection $collection, \DOMElement $node, string $path) - { - if ('' === $id = $node->getAttribute('id')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have an "id" attribute.', $path)); - } - - if ('' !== $alias = $node->getAttribute('alias')) { - $alias = $collection->addAlias($id, $alias); - - if ($deprecationInfo = $this->parseDeprecation($node, $path)) { - $alias->setDeprecated($deprecationInfo['package'], $deprecationInfo['version'], $deprecationInfo['message']); - } - - return; - } - - $schemes = preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY); - $methods = preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY); - - [$defaults, $requirements, $options, $condition, $paths, /* $prefixes */, $hosts] = $this->parseConfigs($node, $path); - - if (!$paths && '' === $node->getAttribute('path')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "path" attribute or child nodes.', $path)); - } - - if ($paths && '' !== $node->getAttribute('path')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must not have both a "path" attribute and child nodes.', $path)); - } - - $routes = $this->createLocalizedRoute($collection, $id, $paths ?: $node->getAttribute('path')); - $routes->addDefaults($defaults); - $routes->addRequirements($requirements); - $routes->addOptions($options); - $routes->setSchemes($schemes); - $routes->setMethods($methods); - $routes->setCondition($condition); - - if (null !== $hosts) { - $this->addHost($routes, $hosts); - } - } - - /** - * Parses an import and adds the routes in the resource to the RouteCollection. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - protected function parseImport(RouteCollection $collection, \DOMElement $node, string $path, string $file) - { - if ('' === $resource = $node->getAttribute('resource')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "resource" attribute.', $path)); - } - - $type = $node->getAttribute('type'); - $prefix = $node->getAttribute('prefix'); - $schemes = $node->hasAttribute('schemes') ? preg_split('/[\s,\|]++/', $node->getAttribute('schemes'), -1, \PREG_SPLIT_NO_EMPTY) : null; - $methods = $node->hasAttribute('methods') ? preg_split('/[\s,\|]++/', $node->getAttribute('methods'), -1, \PREG_SPLIT_NO_EMPTY) : null; - $trailingSlashOnRoot = $node->hasAttribute('trailing-slash-on-root') ? XmlUtils::phpize($node->getAttribute('trailing-slash-on-root')) : true; - $namePrefix = $node->getAttribute('name-prefix') ?: null; - - [$defaults, $requirements, $options, $condition, /* $paths */, $prefixes, $hosts] = $this->parseConfigs($node, $path); - - if ('' !== $prefix && $prefixes) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must not have both a "prefix" attribute and child nodes.', $path)); - } - - $exclude = []; - foreach ($node->childNodes as $child) { - if ($child instanceof \DOMElement && $child->localName === $exclude && self::NAMESPACE_URI === $child->namespaceURI) { - $exclude[] = $child->nodeValue; - } - } - - if ($node->hasAttribute('exclude')) { - if ($exclude) { - throw new \InvalidArgumentException('You cannot use both the attribute "exclude" and tags at the same time.'); - } - $exclude = [$node->getAttribute('exclude')]; - } - - $this->setCurrentDir(\dirname($path)); - - /** @var RouteCollection[] $imported */ - $imported = $this->import($resource, ('' !== $type ? $type : null), false, $file, $exclude) ?: []; - - if (!\is_array($imported)) { - $imported = [$imported]; - } - - foreach ($imported as $subCollection) { - $this->addPrefix($subCollection, $prefixes ?: $prefix, $trailingSlashOnRoot); - - if (null !== $hosts) { - $this->addHost($subCollection, $hosts); - } - - if (null !== $condition) { - $subCollection->setCondition($condition); - } - if (null !== $schemes) { - $subCollection->setSchemes($schemes); - } - if (null !== $methods) { - $subCollection->setMethods($methods); - } - if (null !== $namePrefix) { - $subCollection->addNamePrefix($namePrefix); - } - $subCollection->addDefaults($defaults); - $subCollection->addRequirements($requirements); - $subCollection->addOptions($options); - - $collection->addCollection($subCollection); - } - } - - /** - * @return \DOMDocument - * - * @throws \InvalidArgumentException When loading of XML file fails because of syntax errors - * or when the XML structure is not as expected by the scheme - - * see validate() - */ - protected function loadFile(string $file) - { - return XmlUtils::loadFile($file, __DIR__.static::SCHEME_PATH); - } - - /** - * Parses the config elements (default, requirement, option). - * - * @throws \InvalidArgumentException When the XML is invalid - */ - private function parseConfigs(\DOMElement $node, string $path): array - { - $defaults = []; - $requirements = []; - $options = []; - $condition = null; - $prefixes = []; - $paths = []; - $hosts = []; - - /** @var \DOMElement $n */ - foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) { - if ($node !== $n->parentNode) { - continue; - } - - switch ($n->localName) { - case 'path': - $paths[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'host': - $hosts[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'prefix': - $prefixes[$n->getAttribute('locale')] = trim($n->textContent); - break; - case 'default': - if ($this->isElementValueNull($n)) { - $defaults[$n->getAttribute('key')] = null; - } else { - $defaults[$n->getAttribute('key')] = $this->parseDefaultsConfig($n, $path); - } - - break; - case 'requirement': - $requirements[$n->getAttribute('key')] = trim($n->textContent); - break; - case 'option': - $options[$n->getAttribute('key')] = XmlUtils::phpize(trim($n->textContent)); - break; - case 'condition': - $condition = trim($n->textContent); - break; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "default", "requirement", "option" or "condition".', $n->localName, $path)); - } - } - - if ($controller = $node->getAttribute('controller')) { - if (isset($defaults['_controller'])) { - $name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName); - - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for ', $path).$name); - } - - $defaults['_controller'] = $controller; - } - if ($node->hasAttribute('locale')) { - $defaults['_locale'] = $node->getAttribute('locale'); - } - if ($node->hasAttribute('format')) { - $defaults['_format'] = $node->getAttribute('format'); - } - if ($node->hasAttribute('utf8')) { - $options['utf8'] = XmlUtils::phpize($node->getAttribute('utf8')); - } - if ($stateless = $node->getAttribute('stateless')) { - if (isset($defaults['_stateless'])) { - $name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName); - - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "stateless" attribute and the defaults key "_stateless" for ', $path).$name); - } - - $defaults['_stateless'] = XmlUtils::phpize($stateless); - } - - if (!$hosts) { - $hosts = $node->hasAttribute('host') ? $node->getAttribute('host') : null; - } - - return [$defaults, $requirements, $options, $condition, $paths, $prefixes, $hosts]; - } - - /** - * Parses the "default" elements. - * - * @return array|bool|float|int|string|null - */ - private function parseDefaultsConfig(\DOMElement $element, string $path) - { - if ($this->isElementValueNull($element)) { - return null; - } - - // Check for existing element nodes in the default element. There can - // only be a single element inside a default element. So this element - // (if one was found) can safely be returned. - foreach ($element->childNodes as $child) { - if (!$child instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $child->namespaceURI) { - continue; - } - - return $this->parseDefaultNode($child, $path); - } - - // If the default element doesn't contain a nested "bool", "int", "float", - // "string", "list", or "map" element, the element contents will be treated - // as the string value of the associated default option. - return trim($element->textContent); - } - - /** - * Recursively parses the value of a "default" element. - * - * @return array|bool|float|int|string|null - * - * @throws \InvalidArgumentException when the XML is invalid - */ - private function parseDefaultNode(\DOMElement $node, string $path) - { - if ($this->isElementValueNull($node)) { - return null; - } - - switch ($node->localName) { - case 'bool': - return 'true' === trim($node->nodeValue) || '1' === trim($node->nodeValue); - case 'int': - return (int) trim($node->nodeValue); - case 'float': - return (float) trim($node->nodeValue); - case 'string': - return trim($node->nodeValue); - case 'list': - $list = []; - - foreach ($node->childNodes as $element) { - if (!$element instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $element->namespaceURI) { - continue; - } - - $list[] = $this->parseDefaultNode($element, $path); - } - - return $list; - case 'map': - $map = []; - - foreach ($node->childNodes as $element) { - if (!$element instanceof \DOMElement) { - continue; - } - - if (self::NAMESPACE_URI !== $element->namespaceURI) { - continue; - } - - $map[$element->getAttribute('key')] = $this->parseDefaultNode($element, $path); - } - - return $map; - default: - throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".', $node->localName, $path)); - } - } - - private function isElementValueNull(\DOMElement $element): bool - { - $namespaceUri = 'http://www.w3.org/2001/XMLSchema-instance'; - - if (!$element->hasAttributeNS($namespaceUri, 'nil')) { - return false; - } - - return 'true' === $element->getAttributeNS($namespaceUri, 'nil') || '1' === $element->getAttributeNS($namespaceUri, 'nil'); - } - - /** - * Parses the deprecation elements. - * - * @throws \InvalidArgumentException When the XML is invalid - */ - private function parseDeprecation(\DOMElement $node, string $path): array - { - $deprecatedNode = null; - foreach ($node->childNodes as $child) { - if (!$child instanceof \DOMElement || self::NAMESPACE_URI !== $child->namespaceURI) { - continue; - } - if ('deprecated' !== $child->localName) { - throw new \InvalidArgumentException(sprintf('Invalid child element "%s" defined for alias "%s" in "%s".', $child->localName, $node->getAttribute('id'), $path)); - } - - $deprecatedNode = $child; - } - - if (null === $deprecatedNode) { - return []; - } - - if (!$deprecatedNode->hasAttribute('package')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "package" attribute.', $path)); - } - if (!$deprecatedNode->hasAttribute('version')) { - throw new \InvalidArgumentException(sprintf('The element in file "%s" must have a "version" attribute.', $path)); - } - - return [ - 'package' => $deprecatedNode->getAttribute('package'), - 'version' => $deprecatedNode->getAttribute('version'), - 'message' => trim($deprecatedNode->nodeValue), - ]; - } -} diff --git a/vendor/symfony/routing/Loader/YamlFileLoader.php b/vendor/symfony/routing/Loader/YamlFileLoader.php deleted file mode 100644 index ae98a31..0000000 --- a/vendor/symfony/routing/Loader/YamlFileLoader.php +++ /dev/null @@ -1,314 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Loader; - -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Loader\Configurator\Traits\HostTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\LocalizedRouteTrait; -use Symfony\Component\Routing\Loader\Configurator\Traits\PrefixTrait; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileLoader loads Yaml routing files. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class YamlFileLoader extends FileLoader -{ - use HostTrait; - use LocalizedRouteTrait; - use PrefixTrait; - - private const AVAILABLE_KEYS = [ - 'resource', 'type', 'prefix', 'path', 'host', 'schemes', 'methods', 'defaults', 'requirements', 'options', 'condition', 'controller', 'name_prefix', 'trailing_slash_on_root', 'locale', 'format', 'utf8', 'exclude', 'stateless', - ]; - private $yamlParser; - - /** - * Loads a Yaml file. - * - * @param string $file A Yaml file path - * @param string|null $type The resource type - * - * @return RouteCollection - * - * @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid - */ - public function load($file, string $type = null) - { - $path = $this->locator->locate($file); - - if (!stream_is_local($path)) { - throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path)); - } - - if (!file_exists($path)) { - throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path)); - } - - if (null === $this->yamlParser) { - $this->yamlParser = new YamlParser(); - } - - try { - $parsedConfig = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT); - } catch (ParseException $e) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $path).$e->getMessage(), 0, $e); - } - - $collection = new RouteCollection(); - $collection->addResource(new FileResource($path)); - - // empty file - if (null === $parsedConfig) { - return $collection; - } - - // not an array - if (!\is_array($parsedConfig)) { - throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path)); - } - - foreach ($parsedConfig as $name => $config) { - if (0 === strpos($name, 'when@')) { - if (!$this->env || 'when@'.$this->env !== $name) { - continue; - } - - foreach ($config as $name => $config) { - $this->validate($config, $name.'" when "@'.$this->env, $path); - - if (isset($config['resource'])) { - $this->parseImport($collection, $config, $path, $file); - } else { - $this->parseRoute($collection, $name, $config, $path); - } - } - - continue; - } - - $this->validate($config, $name, $path); - - if (isset($config['resource'])) { - $this->parseImport($collection, $config, $path, $file); - } else { - $this->parseRoute($collection, $name, $config, $path); - } - } - - return $collection; - } - - /** - * {@inheritdoc} - */ - public function supports($resource, string $type = null) - { - return \is_string($resource) && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type); - } - - /** - * Parses a route and adds it to the RouteCollection. - */ - protected function parseRoute(RouteCollection $collection, string $name, array $config, string $path) - { - if (isset($config['alias'])) { - $alias = $collection->addAlias($name, $config['alias']); - $deprecation = $config['deprecated'] ?? null; - if (null !== $deprecation) { - $alias->setDeprecated( - $deprecation['package'], - $deprecation['version'], - $deprecation['message'] ?? '' - ); - } - - return; - } - - $defaults = $config['defaults'] ?? []; - $requirements = $config['requirements'] ?? []; - $options = $config['options'] ?? []; - - foreach ($requirements as $placeholder => $requirement) { - if (\is_int($placeholder)) { - throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder, $requirement, $name, $path)); - } - } - - if (isset($config['controller'])) { - $defaults['_controller'] = $config['controller']; - } - if (isset($config['locale'])) { - $defaults['_locale'] = $config['locale']; - } - if (isset($config['format'])) { - $defaults['_format'] = $config['format']; - } - if (isset($config['utf8'])) { - $options['utf8'] = $config['utf8']; - } - if (isset($config['stateless'])) { - $defaults['_stateless'] = $config['stateless']; - } - - $routes = $this->createLocalizedRoute($collection, $name, $config['path']); - $routes->addDefaults($defaults); - $routes->addRequirements($requirements); - $routes->addOptions($options); - $routes->setSchemes($config['schemes'] ?? []); - $routes->setMethods($config['methods'] ?? []); - $routes->setCondition($config['condition'] ?? null); - - if (isset($config['host'])) { - $this->addHost($routes, $config['host']); - } - } - - /** - * Parses an import and adds the routes in the resource to the RouteCollection. - */ - protected function parseImport(RouteCollection $collection, array $config, string $path, string $file) - { - $type = $config['type'] ?? null; - $prefix = $config['prefix'] ?? ''; - $defaults = $config['defaults'] ?? []; - $requirements = $config['requirements'] ?? []; - $options = $config['options'] ?? []; - $host = $config['host'] ?? null; - $condition = $config['condition'] ?? null; - $schemes = $config['schemes'] ?? null; - $methods = $config['methods'] ?? null; - $trailingSlashOnRoot = $config['trailing_slash_on_root'] ?? true; - $namePrefix = $config['name_prefix'] ?? null; - $exclude = $config['exclude'] ?? null; - - if (isset($config['controller'])) { - $defaults['_controller'] = $config['controller']; - } - if (isset($config['locale'])) { - $defaults['_locale'] = $config['locale']; - } - if (isset($config['format'])) { - $defaults['_format'] = $config['format']; - } - if (isset($config['utf8'])) { - $options['utf8'] = $config['utf8']; - } - if (isset($config['stateless'])) { - $defaults['_stateless'] = $config['stateless']; - } - - $this->setCurrentDir(\dirname($path)); - - /** @var RouteCollection[] $imported */ - $imported = $this->import($config['resource'], $type, false, $file, $exclude) ?: []; - - if (!\is_array($imported)) { - $imported = [$imported]; - } - - foreach ($imported as $subCollection) { - $this->addPrefix($subCollection, $prefix, $trailingSlashOnRoot); - - if (null !== $host) { - $this->addHost($subCollection, $host); - } - if (null !== $condition) { - $subCollection->setCondition($condition); - } - if (null !== $schemes) { - $subCollection->setSchemes($schemes); - } - if (null !== $methods) { - $subCollection->setMethods($methods); - } - if (null !== $namePrefix) { - $subCollection->addNamePrefix($namePrefix); - } - $subCollection->addDefaults($defaults); - $subCollection->addRequirements($requirements); - $subCollection->addOptions($options); - - $collection->addCollection($subCollection); - } - } - - /** - * Validates the route configuration. - * - * @param array $config A resource config - * @param string $name The config key - * @param string $path The loaded file path - * - * @throws \InvalidArgumentException If one of the provided config keys is not supported, - * something is missing or the combination is nonsense - */ - protected function validate($config, string $name, string $path) - { - if (!\is_array($config)) { - throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path)); - } - if (isset($config['alias'])) { - $this->validateAlias($config, $name, $path); - - return; - } - if ($extraKeys = array_diff(array_keys($config), self::AVAILABLE_KEYS)) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', $path, $name, implode('", "', $extraKeys), implode('", "', self::AVAILABLE_KEYS))); - } - if (isset($config['resource']) && isset($config['path'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', $path, $name)); - } - if (!isset($config['resource']) && isset($config['type'])) { - throw new \InvalidArgumentException(sprintf('The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', $name, $path)); - } - if (!isset($config['resource']) && !isset($config['path'])) { - throw new \InvalidArgumentException(sprintf('You must define a "path" for the route "%s" in file "%s".', $name, $path)); - } - if (isset($config['controller']) && isset($config['defaults']['_controller'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" key and the defaults key "_controller" for "%s".', $path, $name)); - } - if (isset($config['stateless']) && isset($config['defaults']['_stateless'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "stateless" key and the defaults key "_stateless" for "%s".', $path, $name)); - } - } - - /** - * @throws \InvalidArgumentException If one of the provided config keys is not supported, - * something is missing or the combination is nonsense - */ - private function validateAlias(array $config, string $name, string $path): void - { - foreach ($config as $key => $value) { - if (!\in_array($key, ['alias', 'deprecated'], true)) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify other keys than "alias" and "deprecated" for "%s".', $path, $name)); - } - - if ('deprecated' === $key) { - if (!isset($value['package'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must specify the attribute "package" of the "deprecated" option for "%s".', $path, $name)); - } - - if (!isset($value['version'])) { - throw new \InvalidArgumentException(sprintf('The routing file "%s" must specify the attribute "version" of the "deprecated" option for "%s".', $path, $name)); - } - } - } - } -} diff --git a/vendor/symfony/routing/Loader/schema/routing/routing-1.0.xsd b/vendor/symfony/routing/Loader/schema/routing/routing-1.0.xsd deleted file mode 100644 index 66c40a0..0000000 --- a/vendor/symfony/routing/Loader/schema/routing/routing-1.0.xsd +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/routing/Matcher/CompiledUrlMatcher.php b/vendor/symfony/routing/Matcher/CompiledUrlMatcher.php deleted file mode 100644 index ae13fd7..0000000 --- a/vendor/symfony/routing/Matcher/CompiledUrlMatcher.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherTrait; -use Symfony\Component\Routing\RequestContext; - -/** - * Matches URLs based on rules dumped by CompiledUrlMatcherDumper. - * - * @author Nicolas Grekas - */ -class CompiledUrlMatcher extends UrlMatcher -{ - use CompiledUrlMatcherTrait; - - public function __construct(array $compiledRoutes, RequestContext $context) - { - $this->context = $context; - [$this->matchHost, $this->staticRoutes, $this->regexpList, $this->dynamicRoutes, $this->checkCondition] = $compiledRoutes; - } -} diff --git a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php deleted file mode 100644 index 123130e..0000000 --- a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php +++ /dev/null @@ -1,501 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * CompiledUrlMatcherDumper creates PHP arrays to be used with CompiledUrlMatcher. - * - * @author Fabien Potencier - * @author Tobias Schultze - * @author Arnaud Le Blanc - * @author Nicolas Grekas - */ -class CompiledUrlMatcherDumper extends MatcherDumper -{ - private $expressionLanguage; - private $signalingException; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - /** - * {@inheritdoc} - */ - public function dump(array $options = []) - { - return <<generateCompiledRoutes()}]; - -EOF; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * Generates the arrays for CompiledUrlMatcher's constructor. - */ - public function getCompiledRoutes(bool $forDump = false): array - { - // Group hosts by same-suffix, re-order when possible - $matchHost = false; - $routes = new StaticPrefixCollection(); - foreach ($this->getRoutes()->all() as $name => $route) { - if ($host = $route->getHost()) { - $matchHost = true; - $host = '/'.strtr(strrev($host), '}.{', '(/)'); - } - - $routes->addRoute($host ?: '/(.*)', [$name, $route]); - } - - if ($matchHost) { - $compiledRoutes = [true]; - $routes = $routes->populateCollection(new RouteCollection()); - } else { - $compiledRoutes = [false]; - $routes = $this->getRoutes(); - } - - [$staticRoutes, $dynamicRoutes] = $this->groupStaticRoutes($routes); - - $conditions = [null]; - $compiledRoutes[] = $this->compileStaticRoutes($staticRoutes, $conditions); - $chunkLimit = \count($dynamicRoutes); - - while (true) { - try { - $this->signalingException = new \RuntimeException('Compilation failed: regular expression is too large'); - $compiledRoutes = array_merge($compiledRoutes, $this->compileDynamicRoutes($dynamicRoutes, $matchHost, $chunkLimit, $conditions)); - - break; - } catch (\Exception $e) { - if (1 < $chunkLimit && $this->signalingException === $e) { - $chunkLimit = 1 + ($chunkLimit >> 1); - continue; - } - throw $e; - } - } - - if ($forDump) { - $compiledRoutes[2] = $compiledRoutes[4]; - } - unset($conditions[0]); - - if ($conditions) { - foreach ($conditions as $expression => $condition) { - $conditions[$expression] = "case {$condition}: return {$expression};"; - } - - $checkConditionCode = <<indent(implode("\n", $conditions), 3)} - } - } -EOF; - $compiledRoutes[4] = $forDump ? $checkConditionCode.",\n" : eval('return '.$checkConditionCode.';'); - } else { - $compiledRoutes[4] = $forDump ? " null, // \$checkCondition\n" : null; - } - - return $compiledRoutes; - } - - private function generateCompiledRoutes(): string - { - [$matchHost, $staticRoutes, $regexpCode, $dynamicRoutes, $checkConditionCode] = $this->getCompiledRoutes(true); - - $code = self::export($matchHost).', // $matchHost'."\n"; - - $code .= '[ // $staticRoutes'."\n"; - foreach ($staticRoutes as $path => $routes) { - $code .= sprintf(" %s => [\n", self::export($path)); - foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); - } - $code .= " ],\n"; - } - $code .= "],\n"; - - $code .= sprintf("[ // \$regexpList%s\n],\n", $regexpCode); - - $code .= '[ // $dynamicRoutes'."\n"; - foreach ($dynamicRoutes as $path => $routes) { - $code .= sprintf(" %s => [\n", self::export($path)); - foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); - } - $code .= " ],\n"; - } - $code .= "],\n"; - $code = preg_replace('/ => \[\n (\[.+?),\n \],/', ' => [$1],', $code); - - return $this->indent($code, 1).$checkConditionCode; - } - - /** - * Splits static routes from dynamic routes, so that they can be matched first, using a simple switch. - */ - private function groupStaticRoutes(RouteCollection $collection): array - { - $staticRoutes = $dynamicRegex = []; - $dynamicRoutes = new RouteCollection(); - - foreach ($collection->all() as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $hostRegex = $compiledRoute->getHostRegex(); - $regex = $compiledRoute->getRegex(); - if ($hasTrailingSlash = '/' !== $route->getPath()) { - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - } - - if (!$compiledRoute->getPathVariables()) { - $host = !$compiledRoute->getHostVariables() ? $route->getHost() : ''; - $url = $route->getPath(); - if ($hasTrailingSlash) { - $url = substr($url, 0, -1); - } - foreach ($dynamicRegex as [$hostRx, $rx, $prefix]) { - if (('' === $prefix || str_starts_with($url, $prefix)) && (preg_match($rx, $url) || preg_match($rx, $url.'/')) && (!$host || !$hostRx || preg_match($hostRx, $host))) { - $dynamicRegex[] = [$hostRegex, $regex, $staticPrefix]; - $dynamicRoutes->add($name, $route); - continue 2; - } - } - - $staticRoutes[$url][$name] = [$route, $hasTrailingSlash]; - } else { - $dynamicRegex[] = [$hostRegex, $regex, $staticPrefix]; - $dynamicRoutes->add($name, $route); - } - } - - return [$staticRoutes, $dynamicRoutes]; - } - - /** - * Compiles static routes in a switch statement. - * - * Condition-less paths are put in a static array in the switch's default, with generic matching logic. - * Paths that can match two or more routes, or have user-specified conditions are put in separate switch's cases. - * - * @throws \LogicException - */ - private function compileStaticRoutes(array $staticRoutes, array &$conditions): array - { - if (!$staticRoutes) { - return []; - } - $compiledRoutes = []; - - foreach ($staticRoutes as $url => $routes) { - $compiledRoutes[$url] = []; - foreach ($routes as $name => [$route, $hasTrailingSlash]) { - $compiledRoutes[$url][] = $this->compileRoute($route, $name, (!$route->compile()->getHostVariables() ? $route->getHost() : $route->compile()->getHostRegex()) ?: null, $hasTrailingSlash, false, $conditions); - } - } - - return $compiledRoutes; - } - - /** - * Compiles a regular expression followed by a switch statement to match dynamic routes. - * - * The regular expression matches both the host and the pathinfo at the same time. For stellar performance, - * it is built as a tree of patterns, with re-ordering logic to group same-prefix routes together when possible. - * - * Patterns are named so that we know which one matched (https://pcre.org/current/doc/html/pcre2syntax.html#SEC23). - * This name is used to "switch" to the additional logic required to match the final route. - * - * Condition-less paths are put in a static array in the switch's default, with generic matching logic. - * Paths that can match two or more routes, or have user-specified conditions are put in separate switch's cases. - * - * Last but not least: - * - Because it is not possible to mix unicode/non-unicode patterns in a single regexp, several of them can be generated. - * - The same regexp can be used several times when the logic in the switch rejects the match. When this happens, the - * matching-but-failing subpattern is excluded by replacing its name by "(*F)", which forces a failure-to-match. - * To ease this backlisting operation, the name of subpatterns is also the string offset where the replacement should occur. - */ - private function compileDynamicRoutes(RouteCollection $collection, bool $matchHost, int $chunkLimit, array &$conditions): array - { - if (!$collection->all()) { - return [[], [], '']; - } - $regexpList = []; - $code = ''; - $state = (object) [ - 'regexMark' => 0, - 'regex' => [], - 'routes' => [], - 'mark' => 0, - 'markTail' => 0, - 'hostVars' => [], - 'vars' => [], - ]; - $state->getVars = static function ($m) use ($state) { - if ('_route' === $m[1]) { - return '?:'; - } - - $state->vars[] = $m[1]; - - return ''; - }; - - $chunkSize = 0; - $prev = null; - $perModifiers = []; - foreach ($collection->all() as $name => $route) { - preg_match('#[a-zA-Z]*$#', $route->compile()->getRegex(), $rx); - if ($chunkLimit < ++$chunkSize || $prev !== $rx[0] && $route->compile()->getPathVariables()) { - $chunkSize = 1; - $routes = new RouteCollection(); - $perModifiers[] = [$rx[0], $routes]; - $prev = $rx[0]; - } - $routes->add($name, $route); - } - - foreach ($perModifiers as [$modifiers, $routes]) { - $prev = false; - $perHost = []; - foreach ($routes->all() as $name => $route) { - $regex = $route->compile()->getHostRegex(); - if ($prev !== $regex) { - $routes = new RouteCollection(); - $perHost[] = [$regex, $routes]; - $prev = $regex; - } - $routes->add($name, $route); - } - $prev = false; - $rx = '{^(?'; - $code .= "\n {$state->mark} => ".self::export($rx); - $startingMark = $state->mark; - $state->mark += \strlen($rx); - $state->regex = $rx; - - foreach ($perHost as [$hostRegex, $routes]) { - if ($matchHost) { - if ($hostRegex) { - preg_match('#^.\^(.*)\$.[a-zA-Z]*$#', $hostRegex, $rx); - $state->vars = []; - $hostRegex = '(?i:'.preg_replace_callback('#\?P<([^>]++)>#', $state->getVars, $rx[1]).')\.'; - $state->hostVars = $state->vars; - } else { - $hostRegex = '(?:(?:[^./]*+\.)++)'; - $state->hostVars = []; - } - $state->mark += \strlen($rx = ($prev ? ')' : '')."|{$hostRegex}(?"); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - $prev = true; - } - - $tree = new StaticPrefixCollection(); - foreach ($routes->all() as $name => $route) { - preg_match('#^.\^(.*)\$.[a-zA-Z]*$#', $route->compile()->getRegex(), $rx); - - $state->vars = []; - $regex = preg_replace_callback('#\?P<([^>]++)>#', $state->getVars, $rx[1]); - if ($hasTrailingSlash = '/' !== $regex && '/' === $regex[-1]) { - $regex = substr($regex, 0, -1); - } - $hasTrailingVar = (bool) preg_match('#\{\w+\}/?$#', $route->getPath()); - - $tree->addRoute($regex, [$name, $regex, $state->vars, $route, $hasTrailingSlash, $hasTrailingVar]); - } - - $code .= $this->compileStaticPrefixCollection($tree, $state, 0, $conditions); - } - if ($matchHost) { - $code .= "\n .')'"; - $state->regex .= ')'; - } - $rx = ")/?$}{$modifiers}"; - $code .= "\n .'{$rx}',"; - $state->regex .= $rx; - $state->markTail = 0; - - // if the regex is too large, throw a signaling exception to recompute with smaller chunk size - set_error_handler(function ($type, $message) { throw str_contains($message, $this->signalingException->getMessage()) ? $this->signalingException : new \ErrorException($message); }); - try { - preg_match($state->regex, ''); - } finally { - restore_error_handler(); - } - - $regexpList[$startingMark] = $state->regex; - } - - $state->routes[$state->mark][] = [null, null, null, null, false, false, 0]; - unset($state->getVars); - - return [$regexpList, $state->routes, $code]; - } - - /** - * Compiles a regexp tree of subpatterns that matches nested same-prefix routes. - * - * @param \stdClass $state A simple state object that keeps track of the progress of the compilation, - * and gathers the generated switch's "case" and "default" statements - */ - private function compileStaticPrefixCollection(StaticPrefixCollection $tree, \stdClass $state, int $prefixLen, array &$conditions): string - { - $code = ''; - $prevRegex = null; - $routes = $tree->getRoutes(); - - foreach ($routes as $i => $route) { - if ($route instanceof StaticPrefixCollection) { - $prevRegex = null; - $prefix = substr($route->getPrefix(), $prefixLen); - $state->mark += \strlen($rx = "|{$prefix}(?"); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - $code .= $this->indent($this->compileStaticPrefixCollection($route, $state, $prefixLen + \strlen($prefix), $conditions)); - $code .= "\n .')'"; - $state->regex .= ')'; - ++$state->markTail; - continue; - } - - [$name, $regex, $vars, $route, $hasTrailingSlash, $hasTrailingVar] = $route; - $compiledRoute = $route->compile(); - $vars = array_merge($state->hostVars, $vars); - - if ($compiledRoute->getRegex() === $prevRegex) { - $state->routes[$state->mark][] = $this->compileRoute($route, $name, $vars, $hasTrailingSlash, $hasTrailingVar, $conditions); - continue; - } - - $state->mark += 3 + $state->markTail + \strlen($regex) - $prefixLen; - $state->markTail = 2 + \strlen($state->mark); - $rx = sprintf('|%s(*:%s)', substr($regex, $prefixLen), $state->mark); - $code .= "\n .".self::export($rx); - $state->regex .= $rx; - - $prevRegex = $compiledRoute->getRegex(); - $state->routes[$state->mark] = [$this->compileRoute($route, $name, $vars, $hasTrailingSlash, $hasTrailingVar, $conditions)]; - } - - return $code; - } - - /** - * Compiles a single Route to PHP code used to match it against the path info. - */ - private function compileRoute(Route $route, string $name, $vars, bool $hasTrailingSlash, bool $hasTrailingVar, array &$conditions): array - { - $defaults = $route->getDefaults(); - - if (isset($defaults['_canonical_route'])) { - $name = $defaults['_canonical_route']; - unset($defaults['_canonical_route']); - } - - if ($condition = $route->getCondition()) { - $condition = $this->getExpressionLanguage()->compile($condition, ['context', 'request']); - $condition = $conditions[$condition] ?? $conditions[$condition] = (str_contains($condition, '$request') ? 1 : -1) * \count($conditions); - } else { - $condition = null; - } - - return [ - ['_route' => $name] + $defaults, - $vars, - array_flip($route->getMethods()) ?: null, - array_flip($route->getSchemes()) ?: null, - $hasTrailingSlash, - $hasTrailingVar, - $condition, - ]; - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - if (!class_exists(ExpressionLanguage::class)) { - throw new \LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); - } - - return $this->expressionLanguage; - } - - private function indent(string $code, int $level = 1): string - { - return preg_replace('/^./m', str_repeat(' ', $level).'$0', $code); - } - - /** - * @internal - */ - public static function export($value): string - { - if (null === $value) { - return 'null'; - } - if (!\is_array($value)) { - if (\is_object($value)) { - throw new \InvalidArgumentException('Symfony\Component\Routing\Route cannot contain objects.'); - } - - return str_replace("\n", '\'."\n".\'', var_export($value, true)); - } - if (!$value) { - return '[]'; - } - - $i = 0; - $export = '['; - - foreach ($value as $k => $v) { - if ($i === $k) { - ++$i; - } else { - $export .= self::export($k).' => '; - - if (\is_int($k) && $i < $k) { - $i = 1 + $k; - } - } - - $export .= self::export($v).', '; - } - - return substr_replace($export, ']', -2); - } -} diff --git a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php b/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php deleted file mode 100644 index bdb7ba3..0000000 --- a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; -use Symfony\Component\Routing\RequestContext; - -/** - * @author Nicolas Grekas - * - * @internal - * - * @property RequestContext $context - */ -trait CompiledUrlMatcherTrait -{ - private $matchHost = false; - private $staticRoutes = []; - private $regexpList = []; - private $dynamicRoutes = []; - - /** - * @var callable|null - */ - private $checkCondition; - - public function match(string $pathinfo): array - { - $allow = $allowSchemes = []; - if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) { - return $ret; - } - if ($allow) { - throw new MethodNotAllowedException(array_keys($allow)); - } - if (!$this instanceof RedirectableUrlMatcherInterface) { - throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { - // no-op - } elseif ($allowSchemes) { - redirect_scheme: - $scheme = $this->context->getScheme(); - $this->context->setScheme(key($allowSchemes)); - try { - if ($ret = $this->doMatch($pathinfo)) { - return $this->redirect($pathinfo, $ret['_route'], $this->context->getScheme()) + $ret; - } - } finally { - $this->context->setScheme($scheme); - } - } elseif ('/' !== $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') { - $pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo; - if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) { - return $this->redirect($pathinfo, $ret['_route']) + $ret; - } - if ($allowSchemes) { - goto redirect_scheme; - } - } - - throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - - private function doMatch(string $pathinfo, array &$allow = [], array &$allowSchemes = []): array - { - $allow = $allowSchemes = []; - $pathinfo = rawurldecode($pathinfo) ?: '/'; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - $context = $this->context; - $requestMethod = $canonicalMethod = $context->getMethod(); - - if ($this->matchHost) { - $host = strtolower($context->getHost()); - } - - if ('HEAD' === $requestMethod) { - $canonicalMethod = 'GET'; - } - $supportsRedirections = 'GET' === $canonicalMethod && $this instanceof RedirectableUrlMatcherInterface; - - foreach ($this->staticRoutes[$trimmedPathinfo] ?? [] as [$ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash, , $condition]) { - if ($condition && !($this->checkCondition)($condition, $context, 0 < $condition ? $request ?? $request = $this->request ?: $this->createRequest($pathinfo) : null)) { - continue; - } - - if ($requiredHost) { - if ('{' !== $requiredHost[0] ? $requiredHost !== $host : !preg_match($requiredHost, $host, $hostMatches)) { - continue; - } - if ('{' === $requiredHost[0] && $hostMatches) { - $hostMatches['_route'] = $ret['_route']; - $ret = $this->mergeDefaults($hostMatches, $ret); - } - } - - if ('/' !== $pathinfo && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsRedirections && (!$requiredMethods || isset($requiredMethods['GET']))) { - return $allow = $allowSchemes = []; - } - continue; - } - - $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]); - if ($hasRequiredScheme && $requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) { - $allow += $requiredMethods; - continue; - } - - if (!$hasRequiredScheme) { - $allowSchemes += $requiredSchemes; - continue; - } - - return $ret; - } - - $matchedPathinfo = $this->matchHost ? $host.'.'.$pathinfo : $pathinfo; - - foreach ($this->regexpList as $offset => $regex) { - while (preg_match($regex, $matchedPathinfo, $matches)) { - foreach ($this->dynamicRoutes[$m = (int) $matches['MARK']] as [$ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar, $condition]) { - if (null !== $condition) { - if (0 === $condition) { // marks the last route in the regexp - continue 3; - } - if (!($this->checkCondition)($condition, $context, 0 < $condition ? $request ?? $request = $this->request ?: $this->createRequest($pathinfo) : null)) { - continue; - } - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && $hasTrailingVar; - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $n = $matches[\count($vars)] ?? null) || '/' !== ($n[-1] ?? '/')) && preg_match($regex, $this->matchHost ? $host.'.'.$trimmedPathinfo : $trimmedPathinfo, $n) && $m === (int) $n['MARK']) { - if ($hasTrailingSlash) { - $matches = $n; - } else { - $hasTrailingVar = false; - } - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsRedirections && (!$requiredMethods || isset($requiredMethods['GET']))) { - return $allow = $allowSchemes = []; - } - continue; - } - - foreach ($vars as $i => $v) { - if (isset($matches[1 + $i])) { - $ret[$v] = $matches[1 + $i]; - } - } - - if ($requiredSchemes && !isset($requiredSchemes[$context->getScheme()])) { - $allowSchemes += $requiredSchemes; - continue; - } - - if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) { - $allow += $requiredMethods; - continue; - } - - return $ret; - } - - $regex = substr_replace($regex, 'F', $m - $offset, 1 + \strlen($m)); - $offset += \strlen($m); - } - } - - if ('/' === $pathinfo && !$allow && !$allowSchemes) { - throw new NoConfigurationException(); - } - - return []; - } -} diff --git a/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php deleted file mode 100644 index ea51ab4..0000000 --- a/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * MatcherDumper is the abstract class for all built-in matcher dumpers. - * - * @author Fabien Potencier - */ -abstract class MatcherDumper implements MatcherDumperInterface -{ - private $routes; - - public function __construct(RouteCollection $routes) - { - $this->routes = $routes; - } - - /** - * {@inheritdoc} - */ - public function getRoutes() - { - return $this->routes; - } -} diff --git a/vendor/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php b/vendor/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php deleted file mode 100644 index 8e33802..0000000 --- a/vendor/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * MatcherDumperInterface is the interface that all matcher dumper classes must implement. - * - * @author Fabien Potencier - */ -interface MatcherDumperInterface -{ - /** - * Dumps a set of routes to a string representation of executable code - * that can then be used to match a request against these routes. - * - * @return string - */ - public function dump(array $options = []); - - /** - * Gets the routes to dump. - * - * @return RouteCollection - */ - public function getRoutes(); -} diff --git a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php b/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php deleted file mode 100644 index 97bd692..0000000 --- a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php +++ /dev/null @@ -1,205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Dumper; - -use Symfony\Component\Routing\RouteCollection; - -/** - * Prefix tree of routes preserving routes order. - * - * @author Frank de Jonge - * @author Nicolas Grekas - * - * @internal - */ -class StaticPrefixCollection -{ - private $prefix; - - /** - * @var string[] - */ - private $staticPrefixes = []; - - /** - * @var string[] - */ - private $prefixes = []; - - /** - * @var array[]|self[] - */ - private $items = []; - - public function __construct(string $prefix = '/') - { - $this->prefix = $prefix; - } - - public function getPrefix(): string - { - return $this->prefix; - } - - /** - * @return array[]|self[] - */ - public function getRoutes(): array - { - return $this->items; - } - - /** - * Adds a route to a group. - * - * @param array|self $route - */ - public function addRoute(string $prefix, $route) - { - [$prefix, $staticPrefix] = $this->getCommonPrefix($prefix, $prefix); - - for ($i = \count($this->items) - 1; 0 <= $i; --$i) { - $item = $this->items[$i]; - - [$commonPrefix, $commonStaticPrefix] = $this->getCommonPrefix($prefix, $this->prefixes[$i]); - - if ($this->prefix === $commonPrefix) { - // the new route and a previous one have no common prefix, let's see if they are exclusive to each others - - if ($this->prefix !== $staticPrefix && $this->prefix !== $this->staticPrefixes[$i]) { - // the new route and the previous one have exclusive static prefixes - continue; - } - - if ($this->prefix === $staticPrefix && $this->prefix === $this->staticPrefixes[$i]) { - // the new route and the previous one have no static prefix - break; - } - - if ($this->prefixes[$i] !== $this->staticPrefixes[$i] && $this->prefix === $this->staticPrefixes[$i]) { - // the previous route is non-static and has no static prefix - break; - } - - if ($prefix !== $staticPrefix && $this->prefix === $staticPrefix) { - // the new route is non-static and has no static prefix - break; - } - - continue; - } - - if ($item instanceof self && $this->prefixes[$i] === $commonPrefix) { - // the new route is a child of a previous one, let's nest it - $item->addRoute($prefix, $route); - } else { - // the new route and a previous one have a common prefix, let's merge them - $child = new self($commonPrefix); - [$child->prefixes[0], $child->staticPrefixes[0]] = $child->getCommonPrefix($this->prefixes[$i], $this->prefixes[$i]); - [$child->prefixes[1], $child->staticPrefixes[1]] = $child->getCommonPrefix($prefix, $prefix); - $child->items = [$this->items[$i], $route]; - - $this->staticPrefixes[$i] = $commonStaticPrefix; - $this->prefixes[$i] = $commonPrefix; - $this->items[$i] = $child; - } - - return; - } - - // No optimised case was found, in this case we simple add the route for possible - // grouping when new routes are added. - $this->staticPrefixes[] = $staticPrefix; - $this->prefixes[] = $prefix; - $this->items[] = $route; - } - - /** - * Linearizes back a set of nested routes into a collection. - */ - public function populateCollection(RouteCollection $routes): RouteCollection - { - foreach ($this->items as $route) { - if ($route instanceof self) { - $route->populateCollection($routes); - } else { - $routes->add(...$route); - } - } - - return $routes; - } - - /** - * Gets the full and static common prefixes between two route patterns. - * - * The static prefix stops at last at the first opening bracket. - */ - private function getCommonPrefix(string $prefix, string $anotherPrefix): array - { - $baseLength = \strlen($this->prefix); - $end = min(\strlen($prefix), \strlen($anotherPrefix)); - $staticLength = null; - set_error_handler([__CLASS__, 'handleError']); - - try { - for ($i = $baseLength; $i < $end && $prefix[$i] === $anotherPrefix[$i]; ++$i) { - if ('(' === $prefix[$i]) { - $staticLength = $staticLength ?? $i; - for ($j = 1 + $i, $n = 1; $j < $end && 0 < $n; ++$j) { - if ($prefix[$j] !== $anotherPrefix[$j]) { - break 2; - } - if ('(' === $prefix[$j]) { - ++$n; - } elseif (')' === $prefix[$j]) { - --$n; - } elseif ('\\' === $prefix[$j] && (++$j === $end || $prefix[$j] !== $anotherPrefix[$j])) { - --$j; - break; - } - } - if (0 < $n) { - break; - } - if (('?' === ($prefix[$j] ?? '') || '?' === ($anotherPrefix[$j] ?? '')) && ($prefix[$j] ?? '') !== ($anotherPrefix[$j] ?? '')) { - break; - } - $subPattern = substr($prefix, $i, $j - $i); - if ($prefix !== $anotherPrefix && !preg_match('/^\(\[[^\]]++\]\+\+\)$/', $subPattern) && !preg_match('{(?> 6) && preg_match('//u', $prefix.' '.$anotherPrefix)) { - do { - // Prevent cutting in the middle of an UTF-8 characters - --$i; - } while (0b10 === (\ord($prefix[$i]) >> 6)); - } - - return [substr($prefix, 0, $i), substr($prefix, 0, $staticLength ?? $i)]; - } - - public static function handleError(int $type, string $msg) - { - return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length'); - } -} diff --git a/vendor/symfony/routing/Matcher/ExpressionLanguageProvider.php b/vendor/symfony/routing/Matcher/ExpressionLanguageProvider.php deleted file mode 100644 index 96bb7ba..0000000 --- a/vendor/symfony/routing/Matcher/ExpressionLanguageProvider.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\ExpressionLanguage\ExpressionFunction; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * Exposes functions defined in the request context to route conditions. - * - * @author Ahmed TAILOULOUTE - */ -class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface -{ - private $functions; - - public function __construct(ServiceProviderInterface $functions) - { - $this->functions = $functions; - } - - /** - * {@inheritdoc} - */ - public function getFunctions() - { - $functions = []; - - foreach ($this->functions->getProvidedServices() as $function => $type) { - $functions[] = new ExpressionFunction( - $function, - static function (...$args) use ($function) { - return sprintf('($context->getParameter(\'_functions\')->get(%s)(%s))', var_export($function, true), implode(', ', $args)); - }, - function ($values, ...$args) use ($function) { - return $values['context']->getParameter('_functions')->get($function)(...$args); - } - ); - } - - return $functions; - } - - public function get(string $function): callable - { - return $this->functions->get($function); - } -} diff --git a/vendor/symfony/routing/Matcher/RedirectableUrlMatcher.php b/vendor/symfony/routing/Matcher/RedirectableUrlMatcher.php deleted file mode 100644 index 3cd7c81..0000000 --- a/vendor/symfony/routing/Matcher/RedirectableUrlMatcher.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Exception\ExceptionInterface; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; - -/** - * @author Fabien Potencier - */ -abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface -{ - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - try { - return parent::match($pathinfo); - } catch (ResourceNotFoundException $e) { - if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { - throw $e; - } - - if ($this->allowSchemes) { - redirect_scheme: - $scheme = $this->context->getScheme(); - $this->context->setScheme(current($this->allowSchemes)); - try { - $ret = parent::match($pathinfo); - - return $this->redirect($pathinfo, $ret['_route'] ?? null, $this->context->getScheme()) + $ret; - } catch (ExceptionInterface $e2) { - throw $e; - } finally { - $this->context->setScheme($scheme); - } - } elseif ('/' === $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') { - throw $e; - } else { - try { - $pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo; - $ret = parent::match($pathinfo); - - return $this->redirect($pathinfo, $ret['_route'] ?? null) + $ret; - } catch (ExceptionInterface $e2) { - if ($this->allowSchemes) { - goto redirect_scheme; - } - throw $e; - } - } - } - } -} diff --git a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php b/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php deleted file mode 100644 index d07f420..0000000 --- a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -/** - * RedirectableUrlMatcherInterface knows how to redirect the user. - * - * @author Fabien Potencier - */ -interface RedirectableUrlMatcherInterface -{ - /** - * Redirects the user to another URL and returns the parameters for the redirection. - * - * @param string $path The path info to redirect to - * @param string $route The route name that matched - * @param string|null $scheme The URL scheme (null to keep the current one) - * - * @return array - */ - public function redirect(string $path, string $route, string $scheme = null); -} diff --git a/vendor/symfony/routing/Matcher/RequestMatcherInterface.php b/vendor/symfony/routing/Matcher/RequestMatcherInterface.php deleted file mode 100644 index c05016e..0000000 --- a/vendor/symfony/routing/Matcher/RequestMatcherInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; - -/** - * RequestMatcherInterface is the interface that all request matcher classes must implement. - * - * @author Fabien Potencier - */ -interface RequestMatcherInterface -{ - /** - * Tries to match a request with a set of routes. - * - * If the matcher cannot find information, it must throw one of the exceptions documented - * below. - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If no matching resource could be found - * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed - */ - public function matchRequest(Request $request); -} diff --git a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php deleted file mode 100644 index 9e8c4c4..0000000 --- a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\ExceptionInterface; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * TraceableUrlMatcher helps debug path info matching by tracing the match. - * - * @author Fabien Potencier - */ -class TraceableUrlMatcher extends UrlMatcher -{ - public const ROUTE_DOES_NOT_MATCH = 0; - public const ROUTE_ALMOST_MATCHES = 1; - public const ROUTE_MATCHES = 2; - - protected $traces; - - public function getTraces(string $pathinfo) - { - $this->traces = []; - - try { - $this->match($pathinfo); - } catch (ExceptionInterface $e) { - } - - return $this->traces; - } - - public function getTracesForRequest(Request $request) - { - $this->request = $request; - $traces = $this->getTraces($request->getPathInfo()); - $this->request = null; - - return $traces; - } - - protected function matchCollection(string $pathinfo, RouteCollection $routes) - { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatcherInterface; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - - foreach ($routes as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $requiredMethods = $route->getMethods(); - - // check the static prefix of the URL first. Only use the more expensive preg_match when it matches - if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) { - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - continue; - } - $regex = $compiledRoute->getRegex(); - - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - - if (!preg_match($regex, $pathinfo, $matches)) { - // does it match without any requirements? - $r = new Route($route->getPath(), $route->getDefaults(), [], $route->getOptions()); - $cr = $r->compile(); - if (!preg_match($cr->getRegex(), $pathinfo)) { - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - - continue; - } - - foreach ($route->getRequirements() as $n => $regex) { - $r = new Route($route->getPath(), $route->getDefaults(), [$n => $regex], $route->getOptions()); - $cr = $r->compile(); - - if (\in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { - $this->addTrace(sprintf('Requirement for "%s" does not match (%s)', $n, $regex), self::ROUTE_ALMOST_MATCHES, $name, $route); - - continue 2; - } - } - - continue; - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && preg_match('#\{\w+\}/?$#', $route->getPath()); - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $m = $matches[\count($compiledRoute->getPathVariables())] ?? null) || '/' !== ($m[-1] ?? '/')) && preg_match($regex, $trimmedPathinfo, $m)) { - if ($hasTrailingSlash) { - $matches = $m; - } else { - $hasTrailingVar = false; - } - } - - $hostMatches = []; - if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { - $this->addTrace(sprintf('Host "%s" does not match the requirement ("%s")', $this->context->getHost(), $route->getHost()), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - $status = $this->handleRouteRequirements($pathinfo, $name, $route); - - if (self::REQUIREMENT_MISMATCH === $status[0]) { - $this->addTrace(sprintf('Condition "%s" does not evaluate to "true"', $route->getCondition()), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsTrailingSlash && (!$requiredMethods || \in_array('GET', $requiredMethods))) { - $this->addTrace('Route matches!', self::ROUTE_MATCHES, $name, $route); - - return $this->allow = $this->allowSchemes = []; - } - $this->addTrace(sprintf('Path "%s" does not match', $route->getPath()), self::ROUTE_DOES_NOT_MATCH, $name, $route); - continue; - } - - if ($route->getSchemes() && !$route->hasScheme($this->context->getScheme())) { - $this->allowSchemes = array_merge($this->allowSchemes, $route->getSchemes()); - $this->addTrace(sprintf('Scheme "%s" does not match any of the required schemes (%s)', $this->context->getScheme(), implode(', ', $route->getSchemes())), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - if ($requiredMethods && !\in_array($method, $requiredMethods)) { - $this->allow = array_merge($this->allow, $requiredMethods); - $this->addTrace(sprintf('Method "%s" does not match any of the required methods (%s)', $this->context->getMethod(), implode(', ', $requiredMethods)), self::ROUTE_ALMOST_MATCHES, $name, $route); - continue; - } - - $this->addTrace('Route matches!', self::ROUTE_MATCHES, $name, $route); - - return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, $status[1] ?? [])); - } - - return []; - } - - private function addTrace(string $log, int $level = self::ROUTE_DOES_NOT_MATCH, string $name = null, Route $route = null) - { - $this->traces[] = [ - 'log' => $log, - 'name' => $name, - 'level' => $level, - 'path' => null !== $route ? $route->getPath() : null, - ]; - } -} diff --git a/vendor/symfony/routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Matcher/UrlMatcher.php deleted file mode 100644 index f076a2f..0000000 --- a/vendor/symfony/routing/Matcher/UrlMatcher.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -/** - * UrlMatcher matches URL based on a set of routes. - * - * @author Fabien Potencier - */ -class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface -{ - public const REQUIREMENT_MATCH = 0; - public const REQUIREMENT_MISMATCH = 1; - public const ROUTE_MATCH = 2; - - /** @var RequestContext */ - protected $context; - - /** - * Collects HTTP methods that would be allowed for the request. - */ - protected $allow = []; - - /** - * Collects URI schemes that would be allowed for the request. - * - * @internal - */ - protected $allowSchemes = []; - - protected $routes; - protected $request; - protected $expressionLanguage; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - protected $expressionLanguageProviders = []; - - public function __construct(RouteCollection $routes, RequestContext $context) - { - $this->routes = $routes; - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - $this->allow = $this->allowSchemes = []; - - if ($ret = $this->matchCollection(rawurldecode($pathinfo) ?: '/', $this->routes)) { - return $ret; - } - - if ('/' === $pathinfo && !$this->allow && !$this->allowSchemes) { - throw new NoConfigurationException(); - } - - throw 0 < \count($this->allow) ? new MethodNotAllowedException(array_unique($this->allow)) : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); - } - - /** - * {@inheritdoc} - */ - public function matchRequest(Request $request) - { - $this->request = $request; - - $ret = $this->match($request->getPathInfo()); - - $this->request = null; - - return $ret; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * Tries to match a URL with a set of routes. - * - * @param string $pathinfo The path info to be parsed - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If the resource could not be found - * @throws MethodNotAllowedException If the resource was found but the request method is not allowed - */ - protected function matchCollection(string $pathinfo, RouteCollection $routes) - { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatcherInterface; - $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/'; - - foreach ($routes as $name => $route) { - $compiledRoute = $route->compile(); - $staticPrefix = rtrim($compiledRoute->getStaticPrefix(), '/'); - $requiredMethods = $route->getMethods(); - - // check the static prefix of the URL first. Only use the more expensive preg_match when it matches - if ('' !== $staticPrefix && !str_starts_with($trimmedPathinfo, $staticPrefix)) { - continue; - } - $regex = $compiledRoute->getRegex(); - - $pos = strrpos($regex, '$'); - $hasTrailingSlash = '/' === $regex[$pos - 1]; - $regex = substr_replace($regex, '/?$', $pos - $hasTrailingSlash, 1 + $hasTrailingSlash); - - if (!preg_match($regex, $pathinfo, $matches)) { - continue; - } - - $hasTrailingVar = $trimmedPathinfo !== $pathinfo && preg_match('#\{\w+\}/?$#', $route->getPath()); - - if ($hasTrailingVar && ($hasTrailingSlash || (null === $m = $matches[\count($compiledRoute->getPathVariables())] ?? null) || '/' !== ($m[-1] ?? '/')) && preg_match($regex, $trimmedPathinfo, $m)) { - if ($hasTrailingSlash) { - $matches = $m; - } else { - $hasTrailingVar = false; - } - } - - $hostMatches = []; - if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) { - continue; - } - - $status = $this->handleRouteRequirements($pathinfo, $name, $route); - - if (self::REQUIREMENT_MISMATCH === $status[0]) { - continue; - } - - if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) { - if ($supportsTrailingSlash && (!$requiredMethods || \in_array('GET', $requiredMethods))) { - return $this->allow = $this->allowSchemes = []; - } - continue; - } - - if ($route->getSchemes() && !$route->hasScheme($this->context->getScheme())) { - $this->allowSchemes = array_merge($this->allowSchemes, $route->getSchemes()); - continue; - } - - if ($requiredMethods && !\in_array($method, $requiredMethods)) { - $this->allow = array_merge($this->allow, $requiredMethods); - continue; - } - - return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, $status[1] ?? [])); - } - - return []; - } - - /** - * Returns an array of values to use as request attributes. - * - * As this method requires the Route object, it is not available - * in matchers that do not have access to the matched Route instance - * (like the PHP and Apache matcher dumpers). - * - * @return array - */ - protected function getAttributes(Route $route, string $name, array $attributes) - { - $defaults = $route->getDefaults(); - if (isset($defaults['_canonical_route'])) { - $name = $defaults['_canonical_route']; - unset($defaults['_canonical_route']); - } - $attributes['_route'] = $name; - - return $this->mergeDefaults($attributes, $defaults); - } - - /** - * Handles specific route requirements. - * - * @return array The first element represents the status, the second contains additional information - */ - protected function handleRouteRequirements(string $pathinfo, string $name, Route $route) - { - // expression condition - if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), ['context' => $this->context, 'request' => $this->request ?: $this->createRequest($pathinfo)])) { - return [self::REQUIREMENT_MISMATCH, null]; - } - - return [self::REQUIREMENT_MATCH, null]; - } - - /** - * Get merged default parameters. - * - * @return array - */ - protected function mergeDefaults(array $params, array $defaults) - { - foreach ($params as $key => $value) { - if (!\is_int($key) && null !== $value) { - $defaults[$key] = $value; - } - } - - return $defaults; - } - - protected function getExpressionLanguage() - { - if (null === $this->expressionLanguage) { - if (!class_exists(ExpressionLanguage::class)) { - throw new \LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders); - } - - return $this->expressionLanguage; - } - - /** - * @internal - */ - protected function createRequest(string $pathinfo): ?Request - { - if (!class_exists(Request::class)) { - return null; - } - - return Request::create($this->context->getScheme().'://'.$this->context->getHost().$this->context->getBaseUrl().$pathinfo, $this->context->getMethod(), $this->context->getParameters(), [], [], [ - 'SCRIPT_FILENAME' => $this->context->getBaseUrl(), - 'SCRIPT_NAME' => $this->context->getBaseUrl(), - ]); - } -} diff --git a/vendor/symfony/routing/Matcher/UrlMatcherInterface.php b/vendor/symfony/routing/Matcher/UrlMatcherInterface.php deleted file mode 100644 index 0a5be97..0000000 --- a/vendor/symfony/routing/Matcher/UrlMatcherInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher; - -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * UrlMatcherInterface is the interface that all URL matcher classes must implement. - * - * @author Fabien Potencier - */ -interface UrlMatcherInterface extends RequestContextAwareInterface -{ - /** - * Tries to match a URL path with a set of routes. - * - * If the matcher cannot find information, it must throw one of the exceptions documented - * below. - * - * @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded) - * - * @return array - * - * @throws NoConfigurationException If no routing configuration could be found - * @throws ResourceNotFoundException If the resource could not be found - * @throws MethodNotAllowedException If the resource was found but the request method is not allowed - */ - public function match(string $pathinfo); -} diff --git a/vendor/symfony/routing/README.md b/vendor/symfony/routing/README.md deleted file mode 100644 index ae8284f..0000000 --- a/vendor/symfony/routing/README.md +++ /dev/null @@ -1,51 +0,0 @@ -Routing Component -================= - -The Routing component maps an HTTP request to a set of configuration variables. - -Getting Started ---------------- - -``` -$ composer require symfony/routing -``` - -```php -use App\Controller\BlogController; -use Symfony\Component\Routing\Generator\UrlGenerator; -use Symfony\Component\Routing\Matcher\UrlMatcher; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; - -$route = new Route('/blog/{slug}', ['_controller' => BlogController::class]); -$routes = new RouteCollection(); -$routes->add('blog_show', $route); - -$context = new RequestContext(); - -// Routing can match routes with incoming requests -$matcher = new UrlMatcher($routes, $context); -$parameters = $matcher->match('/blog/lorem-ipsum'); -// $parameters = [ -// '_controller' => 'App\Controller\BlogController', -// 'slug' => 'lorem-ipsum', -// '_route' => 'blog_show' -// ] - -// Routing can also generate URLs for a given route -$generator = new UrlGenerator($routes, $context); -$url = $generator->generate('blog_show', [ - 'slug' => 'my-blog-post', -]); -// $url = '/blog/my-blog-post' -``` - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/routing.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/routing/RequestContext.php b/vendor/symfony/routing/RequestContext.php deleted file mode 100644 index 8994b26..0000000 --- a/vendor/symfony/routing/RequestContext.php +++ /dev/null @@ -1,327 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\HttpFoundation\Request; - -/** - * Holds information about the current request. - * - * This class implements a fluent interface. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class RequestContext -{ - private $baseUrl; - private $pathInfo; - private $method; - private $host; - private $scheme; - private $httpPort; - private $httpsPort; - private $queryString; - private $parameters = []; - - public function __construct(string $baseUrl = '', string $method = 'GET', string $host = 'localhost', string $scheme = 'http', int $httpPort = 80, int $httpsPort = 443, string $path = '/', string $queryString = '') - { - $this->setBaseUrl($baseUrl); - $this->setMethod($method); - $this->setHost($host); - $this->setScheme($scheme); - $this->setHttpPort($httpPort); - $this->setHttpsPort($httpsPort); - $this->setPathInfo($path); - $this->setQueryString($queryString); - } - - public static function fromUri(string $uri, string $host = 'localhost', string $scheme = 'http', int $httpPort = 80, int $httpsPort = 443): self - { - $uri = parse_url($uri); - $scheme = $uri['scheme'] ?? $scheme; - $host = $uri['host'] ?? $host; - - if (isset($uri['port'])) { - if ('http' === $scheme) { - $httpPort = $uri['port']; - } elseif ('https' === $scheme) { - $httpsPort = $uri['port']; - } - } - - return new self($uri['path'] ?? '', 'GET', $host, $scheme, $httpPort, $httpsPort); - } - - /** - * Updates the RequestContext information based on a HttpFoundation Request. - * - * @return $this - */ - public function fromRequest(Request $request) - { - $this->setBaseUrl($request->getBaseUrl()); - $this->setPathInfo($request->getPathInfo()); - $this->setMethod($request->getMethod()); - $this->setHost($request->getHost()); - $this->setScheme($request->getScheme()); - $this->setHttpPort($request->isSecure() || null === $request->getPort() ? $this->httpPort : $request->getPort()); - $this->setHttpsPort($request->isSecure() && null !== $request->getPort() ? $request->getPort() : $this->httpsPort); - $this->setQueryString($request->server->get('QUERY_STRING', '')); - - return $this; - } - - /** - * Gets the base URL. - * - * @return string - */ - public function getBaseUrl() - { - return $this->baseUrl; - } - - /** - * Sets the base URL. - * - * @return $this - */ - public function setBaseUrl(string $baseUrl) - { - $this->baseUrl = $baseUrl; - - return $this; - } - - /** - * Gets the path info. - * - * @return string - */ - public function getPathInfo() - { - return $this->pathInfo; - } - - /** - * Sets the path info. - * - * @return $this - */ - public function setPathInfo(string $pathInfo) - { - $this->pathInfo = $pathInfo; - - return $this; - } - - /** - * Gets the HTTP method. - * - * The method is always an uppercased string. - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Sets the HTTP method. - * - * @return $this - */ - public function setMethod(string $method) - { - $this->method = strtoupper($method); - - return $this; - } - - /** - * Gets the HTTP host. - * - * The host is always lowercased because it must be treated case-insensitive. - * - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Sets the HTTP host. - * - * @return $this - */ - public function setHost(string $host) - { - $this->host = strtolower($host); - - return $this; - } - - /** - * Gets the HTTP scheme. - * - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Sets the HTTP scheme. - * - * @return $this - */ - public function setScheme(string $scheme) - { - $this->scheme = strtolower($scheme); - - return $this; - } - - /** - * Gets the HTTP port. - * - * @return int - */ - public function getHttpPort() - { - return $this->httpPort; - } - - /** - * Sets the HTTP port. - * - * @return $this - */ - public function setHttpPort(int $httpPort) - { - $this->httpPort = $httpPort; - - return $this; - } - - /** - * Gets the HTTPS port. - * - * @return int - */ - public function getHttpsPort() - { - return $this->httpsPort; - } - - /** - * Sets the HTTPS port. - * - * @return $this - */ - public function setHttpsPort(int $httpsPort) - { - $this->httpsPort = $httpsPort; - - return $this; - } - - /** - * Gets the query string without the "?". - * - * @return string - */ - public function getQueryString() - { - return $this->queryString; - } - - /** - * Sets the query string. - * - * @return $this - */ - public function setQueryString(?string $queryString) - { - // string cast to be fault-tolerant, accepting null - $this->queryString = (string) $queryString; - - return $this; - } - - /** - * Returns the parameters. - * - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Sets the parameters. - * - * @param array $parameters The parameters - * - * @return $this - */ - public function setParameters(array $parameters) - { - $this->parameters = $parameters; - - return $this; - } - - /** - * Gets a parameter value. - * - * @return mixed - */ - public function getParameter(string $name) - { - return $this->parameters[$name] ?? null; - } - - /** - * Checks if a parameter value is set for the given parameter. - * - * @return bool - */ - public function hasParameter(string $name) - { - return \array_key_exists($name, $this->parameters); - } - - /** - * Sets a parameter value. - * - * @param mixed $parameter The parameter value - * - * @return $this - */ - public function setParameter(string $name, $parameter) - { - $this->parameters[$name] = $parameter; - - return $this; - } - - public function isSecure(): bool - { - return 'https' === $this->scheme; - } -} diff --git a/vendor/symfony/routing/RequestContextAwareInterface.php b/vendor/symfony/routing/RequestContextAwareInterface.php deleted file mode 100644 index 270a2b0..0000000 --- a/vendor/symfony/routing/RequestContextAwareInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -interface RequestContextAwareInterface -{ - /** - * Sets the request context. - */ - public function setContext(RequestContext $context); - - /** - * Gets the request context. - * - * @return RequestContext - */ - public function getContext(); -} diff --git a/vendor/symfony/routing/Route.php b/vendor/symfony/routing/Route.php deleted file mode 100644 index c67bd2d..0000000 --- a/vendor/symfony/routing/Route.php +++ /dev/null @@ -1,507 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * A Route describes a route and its parameters. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class Route implements \Serializable -{ - private $path = '/'; - private $host = ''; - private $schemes = []; - private $methods = []; - private $defaults = []; - private $requirements = []; - private $options = []; - private $condition = ''; - - /** - * @var CompiledRoute|null - */ - private $compiled; - - /** - * Constructor. - * - * Available options: - * - * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) - * * utf8: Whether UTF-8 matching is enforced ot not - * - * @param string $path The path pattern to match - * @param array $defaults An array of default parameter values - * @param array $requirements An array of requirements for parameters (regexes) - * @param array $options An array of options - * @param string|null $host The host pattern to match - * @param string|string[] $schemes A required URI scheme or an array of restricted schemes - * @param string|string[] $methods A required HTTP method or an array of restricted methods - * @param string|null $condition A condition that should evaluate to true for the route to match - */ - public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '') - { - $this->setPath($path); - $this->addDefaults($defaults); - $this->addRequirements($requirements); - $this->setOptions($options); - $this->setHost($host); - $this->setSchemes($schemes); - $this->setMethods($methods); - $this->setCondition($condition); - } - - public function __serialize(): array - { - return [ - 'path' => $this->path, - 'host' => $this->host, - 'defaults' => $this->defaults, - 'requirements' => $this->requirements, - 'options' => $this->options, - 'schemes' => $this->schemes, - 'methods' => $this->methods, - 'condition' => $this->condition, - 'compiled' => $this->compiled, - ]; - } - - /** - * @internal - */ - final public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function __unserialize(array $data): void - { - $this->path = $data['path']; - $this->host = $data['host']; - $this->defaults = $data['defaults']; - $this->requirements = $data['requirements']; - $this->options = $data['options']; - $this->schemes = $data['schemes']; - $this->methods = $data['methods']; - - if (isset($data['condition'])) { - $this->condition = $data['condition']; - } - if (isset($data['compiled'])) { - $this->compiled = $data['compiled']; - } - } - - /** - * @internal - */ - final public function unserialize($serialized) - { - $this->__unserialize(unserialize($serialized)); - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * @return $this - */ - public function setPath(string $pattern) - { - $pattern = $this->extractInlineDefaultsAndRequirements($pattern); - - // A pattern must start with a slash and must not have multiple slashes at the beginning because the - // generated path for this route would be confused with a network path, e.g. '//domain.com/path'. - $this->path = '/'.ltrim(trim($pattern), '/'); - $this->compiled = null; - - return $this; - } - - /** - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * @return $this - */ - public function setHost(?string $pattern) - { - $this->host = $this->extractInlineDefaultsAndRequirements((string) $pattern); - $this->compiled = null; - - return $this; - } - - /** - * Returns the lowercased schemes this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @return string[] - */ - public function getSchemes() - { - return $this->schemes; - } - - /** - * Sets the schemes (e.g. 'https') this route is restricted to. - * So an empty array means that any scheme is allowed. - * - * @param string|string[] $schemes The scheme or an array of schemes - * - * @return $this - */ - public function setSchemes($schemes) - { - $this->schemes = array_map('strtolower', (array) $schemes); - $this->compiled = null; - - return $this; - } - - /** - * Checks if a scheme requirement has been set. - * - * @return bool - */ - public function hasScheme(string $scheme) - { - return \in_array(strtolower($scheme), $this->schemes, true); - } - - /** - * Returns the uppercased HTTP methods this route is restricted to. - * So an empty array means that any method is allowed. - * - * @return string[] - */ - public function getMethods() - { - return $this->methods; - } - - /** - * Sets the HTTP methods (e.g. 'POST') this route is restricted to. - * So an empty array means that any method is allowed. - * - * @param string|string[] $methods The method or an array of methods - * - * @return $this - */ - public function setMethods($methods) - { - $this->methods = array_map('strtoupper', (array) $methods); - $this->compiled = null; - - return $this; - } - - /** - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * @return $this - */ - public function setOptions(array $options) - { - $this->options = [ - 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', - ]; - - return $this->addOptions($options); - } - - /** - * @return $this - */ - public function addOptions(array $options) - { - foreach ($options as $name => $option) { - $this->options[$name] = $option; - } - $this->compiled = null; - - return $this; - } - - /** - * Sets an option value. - * - * @param mixed $value The option value - * - * @return $this - */ - public function setOption(string $name, $value) - { - $this->options[$name] = $value; - $this->compiled = null; - - return $this; - } - - /** - * Returns the option value or null when not found. - * - * @return mixed - */ - public function getOption(string $name) - { - return $this->options[$name] ?? null; - } - - /** - * @return bool - */ - public function hasOption(string $name) - { - return \array_key_exists($name, $this->options); - } - - /** - * @return array - */ - public function getDefaults() - { - return $this->defaults; - } - - /** - * @return $this - */ - public function setDefaults(array $defaults) - { - $this->defaults = []; - - return $this->addDefaults($defaults); - } - - /** - * @return $this - */ - public function addDefaults(array $defaults) - { - if (isset($defaults['_locale']) && $this->isLocalized()) { - unset($defaults['_locale']); - } - - foreach ($defaults as $name => $default) { - $this->defaults[$name] = $default; - } - $this->compiled = null; - - return $this; - } - - /** - * @return mixed - */ - public function getDefault(string $name) - { - return $this->defaults[$name] ?? null; - } - - /** - * @return bool - */ - public function hasDefault(string $name) - { - return \array_key_exists($name, $this->defaults); - } - - /** - * Sets a default value. - * - * @param mixed $default The default value - * - * @return $this - */ - public function setDefault(string $name, $default) - { - if ('_locale' === $name && $this->isLocalized()) { - return $this; - } - - $this->defaults[$name] = $default; - $this->compiled = null; - - return $this; - } - - /** - * @return array - */ - public function getRequirements() - { - return $this->requirements; - } - - /** - * @return $this - */ - public function setRequirements(array $requirements) - { - $this->requirements = []; - - return $this->addRequirements($requirements); - } - - /** - * @return $this - */ - public function addRequirements(array $requirements) - { - if (isset($requirements['_locale']) && $this->isLocalized()) { - unset($requirements['_locale']); - } - - foreach ($requirements as $key => $regex) { - $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); - } - $this->compiled = null; - - return $this; - } - - /** - * @return string|null - */ - public function getRequirement(string $key) - { - return $this->requirements[$key] ?? null; - } - - /** - * @return bool - */ - public function hasRequirement(string $key) - { - return \array_key_exists($key, $this->requirements); - } - - /** - * @return $this - */ - public function setRequirement(string $key, string $regex) - { - if ('_locale' === $key && $this->isLocalized()) { - return $this; - } - - $this->requirements[$key] = $this->sanitizeRequirement($key, $regex); - $this->compiled = null; - - return $this; - } - - /** - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * @return $this - */ - public function setCondition(?string $condition) - { - $this->condition = (string) $condition; - $this->compiled = null; - - return $this; - } - - /** - * Compiles the route. - * - * @return CompiledRoute - * - * @throws \LogicException If the Route cannot be compiled because the - * path or host pattern is invalid - * - * @see RouteCompiler which is responsible for the compilation process - */ - public function compile() - { - if (null !== $this->compiled) { - return $this->compiled; - } - - $class = $this->getOption('compiler_class'); - - return $this->compiled = $class::compile($this); - } - - private function extractInlineDefaultsAndRequirements(string $pattern): string - { - if (false === strpbrk($pattern, '?<')) { - return $pattern; - } - - return preg_replace_callback('#\{(!?)(\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) { - if (isset($m[4][0])) { - $this->setDefault($m[2], '?' !== $m[4] ? substr($m[4], 1) : null); - } - if (isset($m[3][0])) { - $this->setRequirement($m[2], substr($m[3], 1, -1)); - } - - return '{'.$m[1].$m[2].'}'; - }, $pattern); - } - - private function sanitizeRequirement(string $key, string $regex) - { - if ('' !== $regex) { - if ('^' === $regex[0]) { - $regex = substr($regex, 1); - } elseif (0 === strpos($regex, '\\A')) { - $regex = substr($regex, 2); - } - } - - if (str_ends_with($regex, '$')) { - $regex = substr($regex, 0, -1); - } elseif (\strlen($regex) - 2 === strpos($regex, '\\z')) { - $regex = substr($regex, 0, -2); - } - - if ('' === $regex) { - throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key)); - } - - return $regex; - } - - private function isLocalized(): bool - { - return isset($this->defaults['_locale']) && isset($this->defaults['_canonical_route']) && ($this->requirements['_locale'] ?? null) === preg_quote($this->defaults['_locale']); - } -} diff --git a/vendor/symfony/routing/RouteCollection.php b/vendor/symfony/routing/RouteCollection.php deleted file mode 100644 index 1b5ffd4..0000000 --- a/vendor/symfony/routing/RouteCollection.php +++ /dev/null @@ -1,383 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Routing\Exception\InvalidArgumentException; -use Symfony\Component\Routing\Exception\RouteCircularReferenceException; - -/** - * A RouteCollection represents a set of Route instances. - * - * When adding a route at the end of the collection, an existing route - * with the same name is removed first. So there can only be one route - * with a given name. - * - * @author Fabien Potencier - * @author Tobias Schultze - * - * @implements \IteratorAggregate - */ -class RouteCollection implements \IteratorAggregate, \Countable -{ - /** - * @var array - */ - private $routes = []; - - /** - * @var array - */ - private $aliases = []; - - /** - * @var array - */ - private $resources = []; - - /** - * @var array - */ - private $priorities = []; - - public function __clone() - { - foreach ($this->routes as $name => $route) { - $this->routes[$name] = clone $route; - } - - foreach ($this->aliases as $name => $alias) { - $this->aliases[$name] = clone $alias; - } - } - - /** - * Gets the current RouteCollection as an Iterator that includes all routes. - * - * It implements \IteratorAggregate. - * - * @see all() - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->all()); - } - - /** - * Gets the number of Routes in this collection. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->routes); - } - - /** - * @param int $priority - */ - public function add(string $name, Route $route/*, int $priority = 0*/) - { - if (\func_num_args() < 3 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) { - trigger_deprecation('symfony/routing', '5.1', 'The "%s()" method will have a new "int $priority = 0" argument in version 6.0, not defining it is deprecated.', __METHOD__); - } - - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - - $this->routes[$name] = $route; - - if ($priority = 3 <= \func_num_args() ? func_get_arg(2) : 0) { - $this->priorities[$name] = $priority; - } - } - - /** - * Returns all routes in this collection. - * - * @return array - */ - public function all() - { - if ($this->priorities) { - $priorities = $this->priorities; - $keysOrder = array_flip(array_keys($this->routes)); - uksort($this->routes, static function ($n1, $n2) use ($priorities, $keysOrder) { - return (($priorities[$n2] ?? 0) <=> ($priorities[$n1] ?? 0)) ?: ($keysOrder[$n1] <=> $keysOrder[$n2]); - }); - } - - return $this->routes; - } - - /** - * Gets a route by name. - * - * @return Route|null - */ - public function get(string $name) - { - $visited = []; - while (null !== $alias = $this->aliases[$name] ?? null) { - if (false !== $searchKey = array_search($name, $visited)) { - $visited[] = $name; - - throw new RouteCircularReferenceException($name, \array_slice($visited, $searchKey)); - } - - if ($alias->isDeprecated()) { - $deprecation = $alias->getDeprecation($name); - - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - $visited[] = $name; - $name = $alias->getId(); - } - - return $this->routes[$name] ?? null; - } - - /** - * Removes a route or an array of routes by name from the collection. - * - * @param string|string[] $name The route name or an array of route names - */ - public function remove($name) - { - foreach ((array) $name as $n) { - unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); - } - } - - /** - * Adds a route collection at the end of the current set by appending all - * routes of the added collection. - */ - public function addCollection(self $collection) - { - // we need to remove all routes with the same names first because just replacing them - // would not place the new route at the end of the merged array - foreach ($collection->all() as $name => $route) { - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - $this->routes[$name] = $route; - - if (isset($collection->priorities[$name])) { - $this->priorities[$name] = $collection->priorities[$name]; - } - } - - foreach ($collection->getAliases() as $name => $alias) { - unset($this->routes[$name], $this->priorities[$name], $this->aliases[$name]); - - $this->aliases[$name] = $alias; - } - - foreach ($collection->getResources() as $resource) { - $this->addResource($resource); - } - } - - /** - * Adds a prefix to the path of all child routes. - */ - public function addPrefix(string $prefix, array $defaults = [], array $requirements = []) - { - $prefix = trim(trim($prefix), '/'); - - if ('' === $prefix) { - return; - } - - foreach ($this->routes as $route) { - $route->setPath('/'.$prefix.$route->getPath()); - $route->addDefaults($defaults); - $route->addRequirements($requirements); - } - } - - /** - * Adds a prefix to the name of all the routes within in the collection. - */ - public function addNamePrefix(string $prefix) - { - $prefixedRoutes = []; - $prefixedPriorities = []; - $prefixedAliases = []; - - foreach ($this->routes as $name => $route) { - $prefixedRoutes[$prefix.$name] = $route; - if (null !== $canonicalName = $route->getDefault('_canonical_route')) { - $route->setDefault('_canonical_route', $prefix.$canonicalName); - } - if (isset($this->priorities[$name])) { - $prefixedPriorities[$prefix.$name] = $this->priorities[$name]; - } - } - - foreach ($this->aliases as $name => $alias) { - $prefixedAliases[$prefix.$name] = $alias->withId($prefix.$alias->getId()); - } - - $this->routes = $prefixedRoutes; - $this->priorities = $prefixedPriorities; - $this->aliases = $prefixedAliases; - } - - /** - * Sets the host pattern on all routes. - */ - public function setHost(?string $pattern, array $defaults = [], array $requirements = []) - { - foreach ($this->routes as $route) { - $route->setHost($pattern); - $route->addDefaults($defaults); - $route->addRequirements($requirements); - } - } - - /** - * Sets a condition on all routes. - * - * Existing conditions will be overridden. - */ - public function setCondition(?string $condition) - { - foreach ($this->routes as $route) { - $route->setCondition($condition); - } - } - - /** - * Adds defaults to all routes. - * - * An existing default value under the same name in a route will be overridden. - */ - public function addDefaults(array $defaults) - { - if ($defaults) { - foreach ($this->routes as $route) { - $route->addDefaults($defaults); - } - } - } - - /** - * Adds requirements to all routes. - * - * An existing requirement under the same name in a route will be overridden. - */ - public function addRequirements(array $requirements) - { - if ($requirements) { - foreach ($this->routes as $route) { - $route->addRequirements($requirements); - } - } - } - - /** - * Adds options to all routes. - * - * An existing option value under the same name in a route will be overridden. - */ - public function addOptions(array $options) - { - if ($options) { - foreach ($this->routes as $route) { - $route->addOptions($options); - } - } - } - - /** - * Sets the schemes (e.g. 'https') all child routes are restricted to. - * - * @param string|string[] $schemes The scheme or an array of schemes - */ - public function setSchemes($schemes) - { - foreach ($this->routes as $route) { - $route->setSchemes($schemes); - } - } - - /** - * Sets the HTTP methods (e.g. 'POST') all child routes are restricted to. - * - * @param string|string[] $methods The method or an array of methods - */ - public function setMethods($methods) - { - foreach ($this->routes as $route) { - $route->setMethods($methods); - } - } - - /** - * Returns an array of resources loaded to build this collection. - * - * @return ResourceInterface[] - */ - public function getResources() - { - return array_values($this->resources); - } - - /** - * Adds a resource for this collection. If the resource already exists - * it is not added. - */ - public function addResource(ResourceInterface $resource) - { - $key = (string) $resource; - - if (!isset($this->resources[$key])) { - $this->resources[$key] = $resource; - } - } - - /** - * Sets an alias for an existing route. - * - * @param string $name The alias to create - * @param string $alias The route to alias - * - * @throws InvalidArgumentException if the alias is for itself - */ - public function addAlias(string $name, string $alias): Alias - { - if ($name === $alias) { - throw new InvalidArgumentException(sprintf('Route alias "%s" can not reference itself.', $name)); - } - - unset($this->routes[$name], $this->priorities[$name]); - - return $this->aliases[$name] = new Alias($alias); - } - - /** - * @return array - */ - public function getAliases(): array - { - return $this->aliases; - } - - public function getAlias(string $name): ?Alias - { - return $this->aliases[$name] ?? null; - } -} diff --git a/vendor/symfony/routing/RouteCollectionBuilder.php b/vendor/symfony/routing/RouteCollectionBuilder.php deleted file mode 100644 index d7eed31..0000000 --- a/vendor/symfony/routing/RouteCollectionBuilder.php +++ /dev/null @@ -1,364 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; - -trigger_deprecation('symfony/routing', '5.1', 'The "%s" class is deprecated, use "%s" instead.', RouteCollectionBuilder::class, RoutingConfigurator::class); - -/** - * Helps add and import routes into a RouteCollection. - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.1, use RoutingConfigurator instead - */ -class RouteCollectionBuilder -{ - /** - * @var Route[]|RouteCollectionBuilder[] - */ - private $routes = []; - - private $loader; - private $defaults = []; - private $prefix; - private $host; - private $condition; - private $requirements = []; - private $options = []; - private $schemes; - private $methods; - private $resources = []; - - public function __construct(LoaderInterface $loader = null) - { - $this->loader = $loader; - } - - /** - * Import an external routing resource and returns the RouteCollectionBuilder. - * - * $routes->import('blog.yml', '/blog'); - * - * @param mixed $resource - * - * @return self - * - * @throws LoaderLoadException - */ - public function import($resource, string $prefix = '/', string $type = null) - { - /** @var RouteCollection[] $collections */ - $collections = $this->load($resource, $type); - - // create a builder from the RouteCollection - $builder = $this->createBuilder(); - - foreach ($collections as $collection) { - if (null === $collection) { - continue; - } - - foreach ($collection->all() as $name => $route) { - $builder->addRoute($route, $name); - } - - foreach ($collection->getResources() as $resource) { - $builder->addResource($resource); - } - } - - // mount into this builder - $this->mount($prefix, $builder); - - return $builder; - } - - /** - * Adds a route and returns it for future modification. - * - * @return Route - */ - public function add(string $path, string $controller, string $name = null) - { - $route = new Route($path); - $route->setDefault('_controller', $controller); - $this->addRoute($route, $name); - - return $route; - } - - /** - * Returns a RouteCollectionBuilder that can be configured and then added with mount(). - * - * @return self - */ - public function createBuilder() - { - return new self($this->loader); - } - - /** - * Add a RouteCollectionBuilder. - */ - public function mount(string $prefix, self $builder) - { - $builder->prefix = trim(trim($prefix), '/'); - $this->routes[] = $builder; - } - - /** - * Adds a Route object to the builder. - * - * @return $this - */ - public function addRoute(Route $route, string $name = null) - { - if (null === $name) { - // used as a flag to know which routes will need a name later - $name = '_unnamed_route_'.spl_object_hash($route); - } - - $this->routes[$name] = $route; - - return $this; - } - - /** - * Sets the host on all embedded routes (unless already set). - * - * @return $this - */ - public function setHost(?string $pattern) - { - $this->host = $pattern; - - return $this; - } - - /** - * Sets a condition on all embedded routes (unless already set). - * - * @return $this - */ - public function setCondition(?string $condition) - { - $this->condition = $condition; - - return $this; - } - - /** - * Sets a default value that will be added to all embedded routes (unless that - * default value is already set). - * - * @param mixed $value - * - * @return $this - */ - public function setDefault(string $key, $value) - { - $this->defaults[$key] = $value; - - return $this; - } - - /** - * Sets a requirement that will be added to all embedded routes (unless that - * requirement is already set). - * - * @param mixed $regex - * - * @return $this - */ - public function setRequirement(string $key, $regex) - { - $this->requirements[$key] = $regex; - - return $this; - } - - /** - * Sets an option that will be added to all embedded routes (unless that - * option is already set). - * - * @param mixed $value - * - * @return $this - */ - public function setOption(string $key, $value) - { - $this->options[$key] = $value; - - return $this; - } - - /** - * Sets the schemes on all embedded routes (unless already set). - * - * @param array|string $schemes - * - * @return $this - */ - public function setSchemes($schemes) - { - $this->schemes = $schemes; - - return $this; - } - - /** - * Sets the methods on all embedded routes (unless already set). - * - * @param array|string $methods - * - * @return $this - */ - public function setMethods($methods) - { - $this->methods = $methods; - - return $this; - } - - /** - * Adds a resource for this collection. - * - * @return $this - */ - private function addResource(ResourceInterface $resource): self - { - $this->resources[] = $resource; - - return $this; - } - - /** - * Creates the final RouteCollection and returns it. - * - * @return RouteCollection - */ - public function build() - { - $routeCollection = new RouteCollection(); - - foreach ($this->routes as $name => $route) { - if ($route instanceof Route) { - $route->setDefaults(array_merge($this->defaults, $route->getDefaults())); - $route->setOptions(array_merge($this->options, $route->getOptions())); - - foreach ($this->requirements as $key => $val) { - if (!$route->hasRequirement($key)) { - $route->setRequirement($key, $val); - } - } - - if (null !== $this->prefix) { - $route->setPath('/'.$this->prefix.$route->getPath()); - } - - if (!$route->getHost()) { - $route->setHost($this->host); - } - - if (!$route->getCondition()) { - $route->setCondition($this->condition); - } - - if (!$route->getSchemes()) { - $route->setSchemes($this->schemes); - } - - if (!$route->getMethods()) { - $route->setMethods($this->methods); - } - - // auto-generate the route name if it's been marked - if ('_unnamed_route_' === substr($name, 0, 15)) { - $name = $this->generateRouteName($route); - } - - $routeCollection->add($name, $route); - } else { - /* @var self $route */ - $subCollection = $route->build(); - if (null !== $this->prefix) { - $subCollection->addPrefix($this->prefix); - } - - $routeCollection->addCollection($subCollection); - } - } - - foreach ($this->resources as $resource) { - $routeCollection->addResource($resource); - } - - return $routeCollection; - } - - /** - * Generates a route name based on details of this route. - */ - private function generateRouteName(Route $route): string - { - $methods = implode('_', $route->getMethods()).'_'; - - $routeName = $methods.$route->getPath(); - $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); - $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); - - // Collapse consecutive underscores down into a single underscore. - $routeName = preg_replace('/_+/', '_', $routeName); - - return $routeName; - } - - /** - * Finds a loader able to load an imported resource and loads it. - * - * @param mixed $resource A resource - * @param string|null $type The resource type or null if unknown - * - * @return RouteCollection[] - * - * @throws LoaderLoadException If no loader is found - */ - private function load($resource, string $type = null): array - { - if (null === $this->loader) { - throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.'); - } - - if ($this->loader->supports($resource, $type)) { - $collections = $this->loader->load($resource, $type); - - return \is_array($collections) ? $collections : [$collections]; - } - - if (null === $resolver = $this->loader->getResolver()) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - if (false === $loader = $resolver->resolve($resource, $type)) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - $collections = $loader->load($resource, $type); - - return \is_array($collections) ? $collections : [$collections]; - } -} diff --git a/vendor/symfony/routing/RouteCompiler.php b/vendor/symfony/routing/RouteCompiler.php deleted file mode 100644 index 7e78c29..0000000 --- a/vendor/symfony/routing/RouteCompiler.php +++ /dev/null @@ -1,346 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * RouteCompiler compiles Route instances to CompiledRoute instances. - * - * @author Fabien Potencier - * @author Tobias Schultze - */ -class RouteCompiler implements RouteCompilerInterface -{ - /** - * @deprecated since Symfony 5.1, to be removed in 6.0 - */ - public const REGEX_DELIMITER = '#'; - - /** - * This string defines the characters that are automatically considered separators in front of - * optional placeholders (with default and no static text following). Such a single separator - * can be left out together with the optional placeholder from matching and generating URLs. - */ - public const SEPARATORS = '/,;.:-_~+*=@|'; - - /** - * The maximum supported length of a PCRE subpattern name - * http://pcre.org/current/doc/html/pcre2pattern.html#SEC16. - * - * @internal - */ - public const VARIABLE_MAXIMUM_LENGTH = 32; - - /** - * {@inheritdoc} - * - * @throws \InvalidArgumentException if a path variable is named _fragment - * @throws \LogicException if a variable is referenced more than once - * @throws \DomainException if a variable name starts with a digit or if it is too long to be successfully used as - * a PCRE subpattern - */ - public static function compile(Route $route) - { - $hostVariables = []; - $variables = []; - $hostRegex = null; - $hostTokens = []; - - if ('' !== $host = $route->getHost()) { - $result = self::compilePattern($route, $host, true); - - $hostVariables = $result['variables']; - $variables = $hostVariables; - - $hostTokens = $result['tokens']; - $hostRegex = $result['regex']; - } - - $locale = $route->getDefault('_locale'); - if (null !== $locale && null !== $route->getDefault('_canonical_route') && preg_quote($locale) === $route->getRequirement('_locale')) { - $requirements = $route->getRequirements(); - unset($requirements['_locale']); - $route->setRequirements($requirements); - $route->setPath(str_replace('{_locale}', $locale, $route->getPath())); - } - - $path = $route->getPath(); - - $result = self::compilePattern($route, $path, false); - - $staticPrefix = $result['staticPrefix']; - - $pathVariables = $result['variables']; - - foreach ($pathVariables as $pathParam) { - if ('_fragment' === $pathParam) { - throw new \InvalidArgumentException(sprintf('Route pattern "%s" cannot contain "_fragment" as a path parameter.', $route->getPath())); - } - } - - $variables = array_merge($variables, $pathVariables); - - $tokens = $result['tokens']; - $regex = $result['regex']; - - return new CompiledRoute( - $staticPrefix, - $regex, - $tokens, - $pathVariables, - $hostRegex, - $hostTokens, - $hostVariables, - array_unique($variables) - ); - } - - private static function compilePattern(Route $route, string $pattern, bool $isHost): array - { - $tokens = []; - $variables = []; - $matches = []; - $pos = 0; - $defaultSeparator = $isHost ? '.' : '/'; - $useUtf8 = preg_match('//u', $pattern); - $needsUtf8 = $route->getOption('utf8'); - - if (!$needsUtf8 && $useUtf8 && preg_match('/[\x80-\xFF]/', $pattern)) { - throw new \LogicException(sprintf('Cannot use UTF-8 route patterns without setting the "utf8" option for route "%s".', $route->getPath())); - } - if (!$useUtf8 && $needsUtf8) { - throw new \LogicException(sprintf('Cannot mix UTF-8 requirements with non-UTF-8 pattern "%s".', $pattern)); - } - - // Match all variables enclosed in "{}" and iterate over them. But we only want to match the innermost variable - // in case of nested "{}", e.g. {foo{bar}}. This in ensured because \w does not match "{" or "}" itself. - preg_match_all('#\{(!)?(\w+)\}#', $pattern, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER); - foreach ($matches as $match) { - $important = $match[1][1] >= 0; - $varName = $match[2][0]; - // get all static text preceding the current variable - $precedingText = substr($pattern, $pos, $match[0][1] - $pos); - $pos = $match[0][1] + \strlen($match[0][0]); - - if (!\strlen($precedingText)) { - $precedingChar = ''; - } elseif ($useUtf8) { - preg_match('/.$/u', $precedingText, $precedingChar); - $precedingChar = $precedingChar[0]; - } else { - $precedingChar = substr($precedingText, -1); - } - $isSeparator = '' !== $precedingChar && str_contains(static::SEPARATORS, $precedingChar); - - // A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the - // variable would not be usable as a Controller action argument. - if (preg_match('/^\d/', $varName)) { - throw new \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern)); - } - if (\in_array($varName, $variables)) { - throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName)); - } - - if (\strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { - throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %d characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern)); - } - - if ($isSeparator && $precedingText !== $precedingChar) { - $tokens[] = ['text', substr($precedingText, 0, -\strlen($precedingChar))]; - } elseif (!$isSeparator && '' !== $precedingText) { - $tokens[] = ['text', $precedingText]; - } - - $regexp = $route->getRequirement($varName); - if (null === $regexp) { - $followingPattern = (string) substr($pattern, $pos); - // Find the next static character after the variable that functions as a separator. By default, this separator and '/' - // are disallowed for the variable. This default requirement makes sure that optional variables can be matched at all - // and that the generating-matching-combination of URLs unambiguous, i.e. the params used for generating the URL are - // the same that will be matched. Example: new Route('/{page}.{_format}', ['_format' => 'html']) - // If {page} would also match the separating dot, {_format} would never match as {page} will eagerly consume everything. - // Also even if {_format} was not optional the requirement prevents that {page} matches something that was originally - // part of {_format} when generating the URL, e.g. _format = 'mobile.html'. - $nextSeparator = self::findNextSeparator($followingPattern, $useUtf8); - $regexp = sprintf( - '[^%s%s]+', - preg_quote($defaultSeparator), - $defaultSeparator !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator) : '' - ); - if (('' !== $nextSeparator && !preg_match('#^\{\w+\}#', $followingPattern)) || '' === $followingPattern) { - // When we have a separator, which is disallowed for the variable, we can optimize the regex with a possessive - // quantifier. This prevents useless backtracking of PCRE and improves performance by 20% for matching those patterns. - // Given the above example, there is no point in backtracking into {page} (that forbids the dot) when a dot must follow - // after it. This optimization cannot be applied when the next char is no real separator or when the next variable is - // directly adjacent, e.g. '/{x}{y}'. - $regexp .= '+'; - } - } else { - if (!preg_match('//u', $regexp)) { - $useUtf8 = false; - } elseif (!$needsUtf8 && preg_match('/[\x80-\xFF]|(?= 0; --$i) { - $token = $tokens[$i]; - // variable is optional when it is not important and has a default value - if ('variable' === $token[0] && !($token[5] ?? false) && $route->hasDefault($token[3])) { - $firstOptional = $i; - } else { - break; - } - } - } - - // compute the matching regexp - $regexp = ''; - for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { - $regexp .= self::computeRegexp($tokens, $i, $firstOptional); - } - $regexp = '{^'.$regexp.'$}sD'.($isHost ? 'i' : ''); - - // enable Utf8 matching if really required - if ($needsUtf8) { - $regexp .= 'u'; - for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { - if ('variable' === $tokens[$i][0]) { - $tokens[$i][4] = true; - } - } - } - - return [ - 'staticPrefix' => self::determineStaticPrefix($route, $tokens), - 'regex' => $regexp, - 'tokens' => array_reverse($tokens), - 'variables' => $variables, - ]; - } - - /** - * Determines the longest static prefix possible for a route. - */ - private static function determineStaticPrefix(Route $route, array $tokens): string - { - if ('text' !== $tokens[0][0]) { - return ($route->hasDefault($tokens[0][3]) || '/' === $tokens[0][1]) ? '' : $tokens[0][1]; - } - - $prefix = $tokens[0][1]; - - if (isset($tokens[1][1]) && '/' !== $tokens[1][1] && false === $route->hasDefault($tokens[1][3])) { - $prefix .= $tokens[1][1]; - } - - return $prefix; - } - - /** - * Returns the next static character in the Route pattern that will serve as a separator (or the empty string when none available). - */ - private static function findNextSeparator(string $pattern, bool $useUtf8): string - { - if ('' == $pattern) { - // return empty string if pattern is empty or false (false which can be returned by substr) - return ''; - } - // first remove all placeholders from the pattern so we can find the next real static character - if ('' === $pattern = preg_replace('#\{\w+\}#', '', $pattern)) { - return ''; - } - if ($useUtf8) { - preg_match('/^./u', $pattern, $pattern); - } - - return str_contains(static::SEPARATORS, $pattern[0]) ? $pattern[0] : ''; - } - - /** - * Computes the regexp used to match a specific token. It can be static text or a subpattern. - * - * @param array $tokens The route tokens - * @param int $index The index of the current token - * @param int $firstOptional The index of the first optional token - */ - private static function computeRegexp(array $tokens, int $index, int $firstOptional): string - { - $token = $tokens[$index]; - if ('text' === $token[0]) { - // Text tokens - return preg_quote($token[1]); - } else { - // Variable tokens - if (0 === $index && 0 === $firstOptional) { - // When the only token is an optional variable token, the separator is required - return sprintf('%s(?P<%s>%s)?', preg_quote($token[1]), $token[3], $token[2]); - } else { - $regexp = sprintf('%s(?P<%s>%s)', preg_quote($token[1]), $token[3], $token[2]); - if ($index >= $firstOptional) { - // Enclose each optional token in a subpattern to make it optional. - // "?:" means it is non-capturing, i.e. the portion of the subject string that - // matched the optional subpattern is not passed back. - $regexp = "(?:$regexp"; - $nbTokens = \count($tokens); - if ($nbTokens - 1 == $index) { - // Close the optional subpatterns - $regexp .= str_repeat(')?', $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0)); - } - } - - return $regexp; - } - } - } - - private static function transformCapturingGroupsToNonCapturings(string $regexp): string - { - for ($i = 0; $i < \strlen($regexp); ++$i) { - if ('\\' === $regexp[$i]) { - ++$i; - continue; - } - if ('(' !== $regexp[$i] || !isset($regexp[$i + 2])) { - continue; - } - if ('*' === $regexp[++$i] || '?' === $regexp[$i]) { - ++$i; - continue; - } - $regexp = substr_replace($regexp, '?:', $i, 0); - ++$i; - } - - return $regexp; - } -} diff --git a/vendor/symfony/routing/RouteCompilerInterface.php b/vendor/symfony/routing/RouteCompilerInterface.php deleted file mode 100644 index 9bae33a..0000000 --- a/vendor/symfony/routing/RouteCompilerInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -/** - * RouteCompilerInterface is the interface that all RouteCompiler classes must implement. - * - * @author Fabien Potencier - */ -interface RouteCompilerInterface -{ - /** - * Compiles the current route instance. - * - * @return CompiledRoute - * - * @throws \LogicException If the Route cannot be compiled because the - * path or host pattern is invalid - */ - public static function compile(Route $route); -} diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php deleted file mode 100644 index fbab1a7..0000000 --- a/vendor/symfony/routing/Router.php +++ /dev/null @@ -1,393 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Config\ConfigCacheFactory; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Generator\CompiledUrlGenerator; -use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface; -use Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper; -use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Matcher\CompiledUrlMatcher; -use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; -use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface; -use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; - -/** - * The Router class is an example of the integration of all pieces of the - * routing system for easier use. - * - * @author Fabien Potencier - */ -class Router implements RouterInterface, RequestMatcherInterface -{ - /** - * @var UrlMatcherInterface|null - */ - protected $matcher; - - /** - * @var UrlGeneratorInterface|null - */ - protected $generator; - - /** - * @var RequestContext - */ - protected $context; - - /** - * @var LoaderInterface - */ - protected $loader; - - /** - * @var RouteCollection|null - */ - protected $collection; - - /** - * @var mixed - */ - protected $resource; - - /** - * @var array - */ - protected $options = []; - - /** - * @var LoggerInterface|null - */ - protected $logger; - - /** - * @var string|null - */ - protected $defaultLocale; - - /** - * @var ConfigCacheFactoryInterface|null - */ - private $configCacheFactory; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - private static $cache = []; - - /** - * @param mixed $resource The main resource to load - */ - public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null) - { - $this->loader = $loader; - $this->resource = $resource; - $this->logger = $logger; - $this->context = $context ?? new RequestContext(); - $this->setOptions($options); - $this->defaultLocale = $defaultLocale; - } - - /** - * Sets options. - * - * Available options: - * - * * cache_dir: The cache directory (or null to disable caching) - * * debug: Whether to enable debugging or not (false by default) - * * generator_class: The name of a UrlGeneratorInterface implementation - * * generator_dumper_class: The name of a GeneratorDumperInterface implementation - * * matcher_class: The name of a UrlMatcherInterface implementation - * * matcher_dumper_class: The name of a MatcherDumperInterface implementation - * * resource_type: Type hint for the main resource (optional) - * * strict_requirements: Configure strict requirement checking for generators - * implementing ConfigurableRequirementsInterface (default is true) - * - * @throws \InvalidArgumentException When unsupported option is provided - */ - public function setOptions(array $options) - { - $this->options = [ - 'cache_dir' => null, - 'debug' => false, - 'generator_class' => CompiledUrlGenerator::class, - 'generator_dumper_class' => CompiledUrlGeneratorDumper::class, - 'matcher_class' => CompiledUrlMatcher::class, - 'matcher_dumper_class' => CompiledUrlMatcherDumper::class, - 'resource_type' => null, - 'strict_requirements' => true, - ]; - - // check option names and live merge, if errors are encountered Exception will be thrown - $invalid = []; - foreach ($options as $key => $value) { - if (\array_key_exists($key, $this->options)) { - $this->options[$key] = $value; - } else { - $invalid[] = $key; - } - } - - if ($invalid) { - throw new \InvalidArgumentException(sprintf('The Router does not support the following options: "%s".', implode('", "', $invalid))); - } - } - - /** - * Sets an option. - * - * @param mixed $value The value - * - * @throws \InvalidArgumentException - */ - public function setOption(string $key, $value) - { - if (!\array_key_exists($key, $this->options)) { - throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); - } - - $this->options[$key] = $value; - } - - /** - * Gets an option value. - * - * @return mixed - * - * @throws \InvalidArgumentException - */ - public function getOption(string $key) - { - if (!\array_key_exists($key, $this->options)) { - throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key)); - } - - return $this->options[$key]; - } - - /** - * {@inheritdoc} - */ - public function getRouteCollection() - { - if (null === $this->collection) { - $this->collection = $this->loader->load($this->resource, $this->options['resource_type']); - } - - return $this->collection; - } - - /** - * {@inheritdoc} - */ - public function setContext(RequestContext $context) - { - $this->context = $context; - - if (null !== $this->matcher) { - $this->getMatcher()->setContext($context); - } - if (null !== $this->generator) { - $this->getGenerator()->setContext($context); - } - } - - /** - * {@inheritdoc} - */ - public function getContext() - { - return $this->context; - } - - /** - * Sets the ConfigCache factory to use. - */ - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) - { - $this->configCacheFactory = $configCacheFactory; - } - - /** - * {@inheritdoc} - */ - public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH) - { - return $this->getGenerator()->generate($name, $parameters, $referenceType); - } - - /** - * {@inheritdoc} - */ - public function match(string $pathinfo) - { - return $this->getMatcher()->match($pathinfo); - } - - /** - * {@inheritdoc} - */ - public function matchRequest(Request $request) - { - $matcher = $this->getMatcher(); - if (!$matcher instanceof RequestMatcherInterface) { - // fallback to the default UrlMatcherInterface - return $matcher->match($request->getPathInfo()); - } - - return $matcher->matchRequest($request); - } - - /** - * Gets the UrlMatcher or RequestMatcher instance associated with this Router. - * - * @return UrlMatcherInterface|RequestMatcherInterface - */ - public function getMatcher() - { - if (null !== $this->matcher) { - return $this->matcher; - } - - if (null === $this->options['cache_dir']) { - $routes = $this->getRouteCollection(); - $compiled = is_a($this->options['matcher_class'], CompiledUrlMatcher::class, true); - if ($compiled) { - $routes = (new CompiledUrlMatcherDumper($routes))->getCompiledRoutes(); - } - $this->matcher = new $this->options['matcher_class']($routes, $this->context); - if (method_exists($this->matcher, 'addExpressionLanguageProvider')) { - foreach ($this->expressionLanguageProviders as $provider) { - $this->matcher->addExpressionLanguageProvider($provider); - } - } - - return $this->matcher; - } - - $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_matching_routes.php', - function (ConfigCacheInterface $cache) { - $dumper = $this->getMatcherDumperInstance(); - if (method_exists($dumper, 'addExpressionLanguageProvider')) { - foreach ($this->expressionLanguageProviders as $provider) { - $dumper->addExpressionLanguageProvider($provider); - } - } - - $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); - } - ); - - return $this->matcher = new $this->options['matcher_class'](self::getCompiledRoutes($cache->getPath()), $this->context); - } - - /** - * Gets the UrlGenerator instance associated with this Router. - * - * @return UrlGeneratorInterface - */ - public function getGenerator() - { - if (null !== $this->generator) { - return $this->generator; - } - - if (null === $this->options['cache_dir']) { - $routes = $this->getRouteCollection(); - $aliases = []; - $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true); - if ($compiled) { - $generatorDumper = new CompiledUrlGeneratorDumper($routes); - $routes = $generatorDumper->getCompiledRoutes(); - $aliases = $generatorDumper->getCompiledAliases(); - } - $this->generator = new $this->options['generator_class'](array_merge($routes, $aliases), $this->context, $this->logger, $this->defaultLocale); - } else { - $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_generating_routes.php', - function (ConfigCacheInterface $cache) { - $dumper = $this->getGeneratorDumperInstance(); - - $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); - } - ); - - $this->generator = new $this->options['generator_class'](self::getCompiledRoutes($cache->getPath()), $this->context, $this->logger, $this->defaultLocale); - } - - if ($this->generator instanceof ConfigurableRequirementsInterface) { - $this->generator->setStrictRequirements($this->options['strict_requirements']); - } - - return $this->generator; - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * @return GeneratorDumperInterface - */ - protected function getGeneratorDumperInstance() - { - return new $this->options['generator_dumper_class']($this->getRouteCollection()); - } - - /** - * @return MatcherDumperInterface - */ - protected function getMatcherDumperInstance() - { - return new $this->options['matcher_dumper_class']($this->getRouteCollection()); - } - - /** - * Provides the ConfigCache factory implementation, falling back to a - * default implementation if necessary. - */ - private function getConfigCacheFactory(): ConfigCacheFactoryInterface - { - if (null === $this->configCacheFactory) { - $this->configCacheFactory = new ConfigCacheFactory($this->options['debug']); - } - - return $this->configCacheFactory; - } - - private static function getCompiledRoutes(string $path): array - { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { - self::$cache = null; - } - - if (null === self::$cache) { - return require $path; - } - - if (isset(self::$cache[$path])) { - return self::$cache[$path]; - } - - return self::$cache[$path] = require $path; - } -} diff --git a/vendor/symfony/routing/RouterInterface.php b/vendor/symfony/routing/RouterInterface.php deleted file mode 100644 index 6912f8a..0000000 --- a/vendor/symfony/routing/RouterInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing; - -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; - -/** - * RouterInterface is the interface that all Router classes must implement. - * - * This interface is the concatenation of UrlMatcherInterface and UrlGeneratorInterface. - * - * @author Fabien Potencier - */ -interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface -{ - /** - * Gets the RouteCollection instance associated with this Router. - * - * WARNING: This method should never be used at runtime as it is SLOW. - * You might use it in a cache warmer though. - * - * @return RouteCollection - */ - public function getRouteCollection(); -} diff --git a/vendor/symfony/routing/composer.json b/vendor/symfony/routing/composer.json deleted file mode 100644 index b978c06..0000000 --- a/vendor/symfony/routing/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "symfony/routing", - "type": "library", - "description": "Maps an HTTP request to a set of configuration variables", - "keywords": ["routing", "router", "URL", "URI"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/config": "^5.3|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.12", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" - }, - "suggest": { - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/yaml": "For using the YAML loader", - "symfony/expression-language": "For using expression matching" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Routing\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/runtime/CHANGELOG.md b/vendor/symfony/runtime/CHANGELOG.md deleted file mode 100644 index 3f5d90c..0000000 --- a/vendor/symfony/runtime/CHANGELOG.md +++ /dev/null @@ -1,14 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * The component is not experimental anymore - * Add options "env_var_name" and "debug_var_name" to `GenericRuntime` and `SymfonyRuntime` - * Add option "dotenv_overload" to `SymfonyRuntime` - -5.3.0 ------ - - * Add the component diff --git a/vendor/symfony/runtime/GenericRuntime.php b/vendor/symfony/runtime/GenericRuntime.php deleted file mode 100644 index c88832f..0000000 --- a/vendor/symfony/runtime/GenericRuntime.php +++ /dev/null @@ -1,237 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime; - -use Symfony\Component\Runtime\Internal\BasicErrorHandler; -use Symfony\Component\Runtime\Resolver\ClosureResolver; -use Symfony\Component\Runtime\Resolver\DebugClosureResolver; -use Symfony\Component\Runtime\Runner\ClosureRunner; - -// Help opcache.preload discover always-needed symbols -class_exists(ClosureResolver::class); - -/** - * A runtime to do bare-metal PHP without using superglobals. - * - * It supports the following options: - * - "debug" toggles displaying errors and defaults - * to the "APP_DEBUG" environment variable; - * - "runtimes" maps types to a GenericRuntime implementation - * that knows how to deal with each of them; - * - "error_handler" defines the class to use to handle PHP errors; - * - "env_var_name" and "debug_var_name" define the name of the env - * vars that hold the Symfony env and the debug flag respectively. - * - * The app-callable can declare arguments among either: - * - "array $context" to get a local array similar to $_SERVER; - * - "array $argv" to get the command line arguments when running on the CLI; - * - "array $request" to get a local array with keys "query", "body", "files" and - * "session", which map to $_GET, $_POST, $FILES and &$_SESSION respectively. - * - * It should return a Closure():int|string|null or an instance of RunnerInterface. - * - * In debug mode, the runtime registers a strict error handler - * that throws exceptions when a PHP warning/notice is raised. - * - * @author Nicolas Grekas - */ -class GenericRuntime implements RuntimeInterface -{ - protected $options; - - /** - * @param array { - * debug?: ?bool, - * runtimes?: ?array, - * error_handler?: string|false, - * env_var_name?: string, - * debug_var_name?: string, - * } $options - */ - public function __construct(array $options = []) - { - $options['env_var_name'] ?? $options['env_var_name'] = 'APP_ENV'; - $debugKey = $options['debug_var_name'] ?? $options['debug_var_name'] = 'APP_DEBUG'; - - $debug = $options['debug'] ?? $_SERVER[$debugKey] ?? $_ENV[$debugKey] ?? true; - - if (!\is_bool($debug)) { - $debug = filter_var($debug, \FILTER_VALIDATE_BOOLEAN); - } - - if ($debug) { - umask(0000); - $_SERVER[$debugKey] = $_ENV[$debugKey] = '1'; - - if (false !== $errorHandler = ($options['error_handler'] ?? BasicErrorHandler::class)) { - $errorHandler::register($debug); - $options['error_handler'] = false; - } - } else { - $_SERVER[$debugKey] = $_ENV[$debugKey] = '0'; - } - - $this->options = $options; - } - - /** - * {@inheritdoc} - */ - public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface - { - if (!$callable instanceof \Closure) { - $callable = \Closure::fromCallable($callable); - } - - $parameters = ($reflector ?? new \ReflectionFunction($callable))->getParameters(); - $arguments = function () use ($parameters) { - $arguments = []; - - try { - foreach ($parameters as $parameter) { - $type = $parameter->getType(); - $arguments[] = $this->getArgument($parameter, $type instanceof \ReflectionNamedType ? $type->getName() : null); - } - } catch (\InvalidArgumentException $e) { - if (!$parameter->isOptional()) { - throw $e; - } - } - - return $arguments; - }; - - if ($_SERVER[$this->options['debug_var_name']]) { - return new DebugClosureResolver($callable, $arguments); - } - - return new ClosureResolver($callable, $arguments); - } - - /** - * {@inheritdoc} - */ - public function getRunner(?object $application): RunnerInterface - { - if (null === $application) { - $application = static function () { return 0; }; - } - - if ($application instanceof RunnerInterface) { - return $application; - } - - if (!$application instanceof \Closure) { - if ($runtime = $this->resolveRuntime(\get_class($application))) { - return $runtime->getRunner($application); - } - - if (!\is_callable($application)) { - throw new \LogicException(sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application))); - } - - $application = \Closure::fromCallable($application); - } - - if ($_SERVER[$this->options['debug_var_name']] && ($r = new \ReflectionFunction($application)) && $r->getNumberOfRequiredParameters()) { - throw new \ArgumentCountError(sprintf('Zero argument should be required by the runner callable, but at least one is in "%s" on line "%d.', $r->getFileName(), $r->getStartLine())); - } - - return new ClosureRunner($application); - } - - /** - * @return mixed - */ - protected function getArgument(\ReflectionParameter $parameter, ?string $type) - { - if ('array' === $type) { - switch ($parameter->name) { - case 'context': - $context = $_SERVER; - - if ($_ENV && !isset($_SERVER['PATH']) && !isset($_SERVER['Path'])) { - $context += $_ENV; - } - - return $context; - - case 'argv': - return $_SERVER['argv'] ?? []; - - case 'request': - return [ - 'query' => $_GET, - 'body' => $_POST, - 'files' => $_FILES, - 'session' => &$_SESSION, - ]; - } - } - - if (RuntimeInterface::class === $type) { - return $this; - } - - if (!$runtime = $this->getRuntime($type)) { - $r = $parameter->getDeclaringFunction(); - - throw new \InvalidArgumentException(sprintf('Cannot resolve argument "%s $%s" in "%s" on line "%d": "%s" supports only arguments "array $context", "array $argv" and "array $request", or a runtime named "Symfony\Runtime\%1$sRuntime".', $type, $parameter->name, $r->getFileName(), $r->getStartLine(), get_debug_type($this))); - } - - return $runtime->getArgument($parameter, $type); - } - - protected static function register(self $runtime): self - { - return $runtime; - } - - private function getRuntime(string $type): ?self - { - if (null === $runtime = ($this->options['runtimes'][$type] ?? null)) { - $runtime = 'Symfony\Runtime\\'.$type.'Runtime'; - $runtime = class_exists($runtime) ? $runtime : $this->options['runtimes'][$type] = false; - } - - if (\is_string($runtime)) { - $runtime = $runtime::register($this); - } - - if ($this === $runtime) { - return null; - } - - return $runtime ?: null; - } - - private function resolveRuntime(string $class): ?self - { - if ($runtime = $this->getRuntime($class)) { - return $runtime; - } - - foreach (class_parents($class) as $type) { - if ($runtime = $this->getRuntime($type)) { - return $runtime; - } - } - - foreach (class_implements($class) as $type) { - if ($runtime = $this->getRuntime($type)) { - return $runtime; - } - } - - return null; - } -} diff --git a/vendor/symfony/runtime/Internal/BasicErrorHandler.php b/vendor/symfony/runtime/Internal/BasicErrorHandler.php deleted file mode 100644 index a3f0da7..0000000 --- a/vendor/symfony/runtime/Internal/BasicErrorHandler.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class BasicErrorHandler -{ - public static function register(bool $debug): void - { - error_reporting(-1); - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - ini_set('display_errors', $debug); - } elseif (!filter_var(ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || ini_get('error_log')) { - // CLI - display errors only if they're not already logged to STDERR - ini_set('display_errors', 1); - } - - if (0 <= ini_get('zend.assertions')) { - ini_set('zend.assertions', 1); - ini_set('assert.active', $debug); - ini_set('assert.warning', 0); - ini_set('assert.exception', 1); - } - - set_error_handler(new self()); - } - - public function __invoke(int $type, string $message, string $file, int $line): bool - { - if ((\E_DEPRECATED | \E_USER_DEPRECATED) & $type) { - return true; - } - - if ((error_reporting() | \E_ERROR | \E_RECOVERABLE_ERROR | \E_PARSE | \E_CORE_ERROR | \E_COMPILE_ERROR | \E_USER_ERROR) & $type) { - throw new \ErrorException($message, 0, $type, $file, $line); - } - - return false; - } -} diff --git a/vendor/symfony/runtime/Internal/ComposerPlugin.php b/vendor/symfony/runtime/Internal/ComposerPlugin.php deleted file mode 100644 index 8247b85..0000000 --- a/vendor/symfony/runtime/Internal/ComposerPlugin.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Internal; - -use Composer\Composer; -use Composer\EventDispatcher\EventSubscriberInterface; -use Composer\Factory; -use Composer\IO\IOInterface; -use Composer\Plugin\PluginInterface; -use Composer\Script\ScriptEvents; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ComposerPlugin implements PluginInterface, EventSubscriberInterface -{ - /** - * @var Composer - */ - private $composer; - - /** - * @var IOInterface - */ - private $io; - - private static $activated = false; - - public function activate(Composer $composer, IOInterface $io): void - { - self::$activated = true; - $this->composer = $composer; - $this->io = $io; - } - - public function deactivate(Composer $composer, IOInterface $io): void - { - self::$activated = false; - } - - public function uninstall(Composer $composer, IOInterface $io): void - { - @unlink($composer->getConfig()->get('vendor-dir').'/autoload_runtime.php'); - } - - public function updateAutoloadFile(): void - { - $vendorDir = $this->composer->getConfig()->get('vendor-dir'); - - if (!is_file($autoloadFile = $vendorDir.'/autoload.php') - || false === $extra = $this->composer->getPackage()->getExtra()['runtime'] ?? [] - ) { - return; - } - - $fs = new Filesystem(); - $projectDir = \dirname(realpath(Factory::getComposerFile())); - - if (null === $autoloadTemplate = $extra['autoload_template'] ?? null) { - $autoloadTemplate = __DIR__.'/autoload_runtime.template'; - } else { - if (!$fs->isAbsolutePath($autoloadTemplate)) { - $autoloadTemplate = $projectDir.'/'.$autoloadTemplate; - } - - if (!is_file($autoloadTemplate)) { - throw new \InvalidArgumentException(sprintf('File "%s" defined under "extra.runtime.autoload_template" in your composer.json file not found.', $this->composer->getPackage()->getExtra()['runtime']['autoload_template'])); - } - } - - $projectDir = $fs->makePathRelative($projectDir, $vendorDir); - $nestingLevel = 0; - - while (0 === strpos($projectDir, '../')) { - ++$nestingLevel; - $projectDir = substr($projectDir, 3); - } - - if (!$nestingLevel) { - $projectDir = '__'.'DIR__.'.var_export('/'.$projectDir, true); - } else { - $projectDir = 'dirname(__'."DIR__, $nestingLevel)".('' !== $projectDir ? '.'.var_export('/'.$projectDir, true) : ''); - } - - $runtimeClass = $extra['class'] ?? SymfonyRuntime::class; - - unset($extra['class'], $extra['autoload_template']); - - $code = strtr(file_get_contents($autoloadTemplate), [ - '%project_dir%' => $projectDir, - '%runtime_class%' => var_export($runtimeClass, true), - '%runtime_options%' => '['.substr(var_export($extra, true), 7, -1)." 'project_dir' => {$projectDir},\n]", - ]); - - file_put_contents(substr_replace($autoloadFile, '_runtime', -4, 0), $code); - } - - public static function getSubscribedEvents(): array - { - if (!self::$activated) { - return []; - } - - return [ - ScriptEvents::POST_AUTOLOAD_DUMP => 'updateAutoloadFile', - ]; - } -} diff --git a/vendor/symfony/runtime/Internal/Console/ApplicationRuntime.php b/vendor/symfony/runtime/Internal/Console/ApplicationRuntime.php deleted file mode 100644 index de6b1d9..0000000 --- a/vendor/symfony/runtime/Internal/Console/ApplicationRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\Console; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class ApplicationRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/Console/Command/CommandRuntime.php b/vendor/symfony/runtime/Internal/Console/Command/CommandRuntime.php deleted file mode 100644 index 9cc198e..0000000 --- a/vendor/symfony/runtime/Internal/Console/Command/CommandRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\Console\Command; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class CommandRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/Console/Input/InputInterfaceRuntime.php b/vendor/symfony/runtime/Internal/Console/Input/InputInterfaceRuntime.php deleted file mode 100644 index 44360bf..0000000 --- a/vendor/symfony/runtime/Internal/Console/Input/InputInterfaceRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\Console\Input; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class InputInterfaceRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/Console/Output/OutputInterfaceRuntime.php b/vendor/symfony/runtime/Internal/Console/Output/OutputInterfaceRuntime.php deleted file mode 100644 index 7c59186..0000000 --- a/vendor/symfony/runtime/Internal/Console/Output/OutputInterfaceRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\Console\Output; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class OutputInterfaceRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/HttpFoundation/RequestRuntime.php b/vendor/symfony/runtime/Internal/HttpFoundation/RequestRuntime.php deleted file mode 100644 index 2a3a0bb..0000000 --- a/vendor/symfony/runtime/Internal/HttpFoundation/RequestRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\HttpFoundation; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class RequestRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/HttpFoundation/ResponseRuntime.php b/vendor/symfony/runtime/Internal/HttpFoundation/ResponseRuntime.php deleted file mode 100644 index c70fbff..0000000 --- a/vendor/symfony/runtime/Internal/HttpFoundation/ResponseRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\HttpFoundation; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class ResponseRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/HttpKernel/HttpKernelInterfaceRuntime.php b/vendor/symfony/runtime/Internal/HttpKernel/HttpKernelInterfaceRuntime.php deleted file mode 100644 index 08601ab..0000000 --- a/vendor/symfony/runtime/Internal/HttpKernel/HttpKernelInterfaceRuntime.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Runtime\Symfony\Component\HttpKernel; - -use Symfony\Component\Runtime\SymfonyRuntime; - -/** - * @internal - */ -class HttpKernelInterfaceRuntime extends SymfonyRuntime -{ -} diff --git a/vendor/symfony/runtime/Internal/MissingDotenv.php b/vendor/symfony/runtime/Internal/MissingDotenv.php deleted file mode 100644 index 8968656..0000000 --- a/vendor/symfony/runtime/Internal/MissingDotenv.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Internal; - -/** - * @internal class that should be loaded only when symfony/dotenv is not installed - */ -class MissingDotenv -{ -} diff --git a/vendor/symfony/runtime/Internal/SymfonyErrorHandler.php b/vendor/symfony/runtime/Internal/SymfonyErrorHandler.php deleted file mode 100644 index 40c125a..0000000 --- a/vendor/symfony/runtime/Internal/SymfonyErrorHandler.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Internal; - -use Symfony\Component\ErrorHandler\BufferingLogger; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ErrorHandler\ErrorHandler; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class SymfonyErrorHandler -{ - public static function register(bool $debug): void - { - BasicErrorHandler::register($debug); - - if (class_exists(ErrorHandler::class)) { - DebugClassLoader::enable(); - restore_error_handler(); - ErrorHandler::register(new ErrorHandler(new BufferingLogger(), $debug)); - } - } -} diff --git a/vendor/symfony/runtime/Internal/autoload_runtime.template b/vendor/symfony/runtime/Internal/autoload_runtime.template deleted file mode 100644 index 0e0d2d3..0000000 --- a/vendor/symfony/runtime/Internal/autoload_runtime.template +++ /dev/null @@ -1,34 +0,0 @@ -getResolver($app) - ->resolve(); - -$app = $app(...$args); - -exit( - $runtime - ->getRunner($app) - ->run() -); diff --git a/vendor/symfony/runtime/LICENSE b/vendor/symfony/runtime/LICENSE deleted file mode 100644 index 48d17c4..0000000 --- a/vendor/symfony/runtime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2021-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/runtime/README.md b/vendor/symfony/runtime/README.md deleted file mode 100644 index 006e7a2..0000000 --- a/vendor/symfony/runtime/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Runtime Component -================= - -Symfony Runtime enables decoupling applications from global state. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/runtime.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/runtime/Resolver/ClosureResolver.php b/vendor/symfony/runtime/Resolver/ClosureResolver.php deleted file mode 100644 index 3394295..0000000 --- a/vendor/symfony/runtime/Resolver/ClosureResolver.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Resolver; - -use Symfony\Component\Runtime\ResolverInterface; - -/** - * @author Nicolas Grekas - */ -class ClosureResolver implements ResolverInterface -{ - private $closure; - private $arguments; - - public function __construct(\Closure $closure, \Closure $arguments) - { - $this->closure = $closure; - $this->arguments = $arguments; - } - - /** - * {@inheritdoc} - */ - public function resolve(): array - { - return [$this->closure, ($this->arguments)()]; - } -} diff --git a/vendor/symfony/runtime/Resolver/DebugClosureResolver.php b/vendor/symfony/runtime/Resolver/DebugClosureResolver.php deleted file mode 100644 index e382cec..0000000 --- a/vendor/symfony/runtime/Resolver/DebugClosureResolver.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Resolver; - -/** - * @author Nicolas Grekas - */ -class DebugClosureResolver extends ClosureResolver -{ - /** - * {@inheritdoc} - */ - public function resolve(): array - { - [$closure, $arguments] = parent::resolve(); - - return [ - static function (...$arguments) use ($closure) { - if (\is_object($app = $closure(...$arguments)) || null === $app) { - return $app; - } - - $r = new \ReflectionFunction($closure); - - throw new \TypeError(sprintf('Unexpected value of type "%s" returned, "object" expected from "%s" on line "%d".', get_debug_type($app), $r->getFileName(), $r->getStartLine())); - }, - $arguments, - ]; - } -} diff --git a/vendor/symfony/runtime/ResolverInterface.php b/vendor/symfony/runtime/ResolverInterface.php deleted file mode 100644 index f6fa598..0000000 --- a/vendor/symfony/runtime/ResolverInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime; - -/** - * @author Nicolas Grekas - */ -interface ResolverInterface -{ - /** - * @return array{0: callable, 1: mixed[]} - */ - public function resolve(): array; -} diff --git a/vendor/symfony/runtime/Runner/ClosureRunner.php b/vendor/symfony/runtime/Runner/ClosureRunner.php deleted file mode 100644 index ab5207d..0000000 --- a/vendor/symfony/runtime/Runner/ClosureRunner.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Runner; - -use Symfony\Component\Runtime\RunnerInterface; - -/** - * @author Nicolas Grekas - */ -class ClosureRunner implements RunnerInterface -{ - private $closure; - - public function __construct(\Closure $closure) - { - $this->closure = $closure; - } - - public function run(): int - { - $exitStatus = ($this->closure)(); - - if (\is_string($exitStatus)) { - echo $exitStatus; - - return 0; - } - - if (null !== $exitStatus && !\is_int($exitStatus)) { - $r = new \ReflectionFunction($this->closure); - - throw new \TypeError(sprintf('Unexpected value of type "%s" returned, "string|int|null" expected from "%s" on line "%d".', get_debug_type($exitStatus), $r->getFileName(), $r->getStartLine())); - } - - return $exitStatus ?? 0; - } -} diff --git a/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php b/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php deleted file mode 100644 index 430ce57..0000000 --- a/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Runner\Symfony; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Runtime\RunnerInterface; - -/** - * @author Nicolas Grekas - */ -class ConsoleApplicationRunner implements RunnerInterface -{ - private $application; - private $defaultEnv; - private $input; - private $output; - - public function __construct(Application $application, ?string $defaultEnv, InputInterface $input, OutputInterface $output = null) - { - $this->application = $application; - $this->defaultEnv = $defaultEnv; - $this->input = $input; - $this->output = $output; - } - - public function run(): int - { - if (null === $this->defaultEnv) { - return $this->application->run($this->input, $this->output); - } - - $definition = $this->application->getDefinition(); - - if (!$definition->hasOption('env') && !$definition->hasOption('e') && !$definition->hasShortcut('e')) { - $definition->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $this->defaultEnv)); - } - - if (!$definition->hasOption('no-debug')) { - $definition->addOption(new InputOption('--no-debug', null, InputOption::VALUE_NONE, 'Switches off debug mode.')); - } - - return $this->application->run($this->input, $this->output); - } -} diff --git a/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php b/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php deleted file mode 100644 index 691530d..0000000 --- a/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Runner\Symfony; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\TerminableInterface; -use Symfony\Component\Runtime\RunnerInterface; - -/** - * @author Nicolas Grekas - */ -class HttpKernelRunner implements RunnerInterface -{ - private $kernel; - private $request; - - public function __construct(HttpKernelInterface $kernel, Request $request) - { - $this->kernel = $kernel; - $this->request = $request; - } - - public function run(): int - { - $response = $this->kernel->handle($this->request); - $response->send(); - - if ($this->kernel instanceof TerminableInterface) { - $this->kernel->terminate($this->request, $response); - } - - return 0; - } -} diff --git a/vendor/symfony/runtime/Runner/Symfony/ResponseRunner.php b/vendor/symfony/runtime/Runner/Symfony/ResponseRunner.php deleted file mode 100644 index 05de474..0000000 --- a/vendor/symfony/runtime/Runner/Symfony/ResponseRunner.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime\Runner\Symfony; - -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Runtime\RunnerInterface; - -/** - * @author Nicolas Grekas - */ -class ResponseRunner implements RunnerInterface -{ - private $response; - - public function __construct(Response $response) - { - $this->response = $response; - } - - public function run(): int - { - $this->response->send(); - - return 0; - } -} diff --git a/vendor/symfony/runtime/RunnerInterface.php b/vendor/symfony/runtime/RunnerInterface.php deleted file mode 100644 index 9001ff4..0000000 --- a/vendor/symfony/runtime/RunnerInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime; - -/** - * @author Nicolas Grekas - */ -interface RunnerInterface -{ - public function run(): int; -} diff --git a/vendor/symfony/runtime/RuntimeInterface.php b/vendor/symfony/runtime/RuntimeInterface.php deleted file mode 100644 index 757468c..0000000 --- a/vendor/symfony/runtime/RuntimeInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime; - -/** - * Enables decoupling applications from global state. - * - * @author Nicolas Grekas - */ -interface RuntimeInterface -{ - /** - * Returns a resolver that should compute the arguments of a callable. - * - * The callable itself should return an object that represents the application to pass to the getRunner() method. - */ - public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface; - - /** - * Returns a callable that knows how to run the passed object and that returns its exit status as int. - * - * The passed object is typically created by calling ResolverInterface::resolve(). - */ - public function getRunner(?object $application): RunnerInterface; -} diff --git a/vendor/symfony/runtime/SymfonyRuntime.php b/vendor/symfony/runtime/SymfonyRuntime.php deleted file mode 100644 index 0ca9713..0000000 --- a/vendor/symfony/runtime/SymfonyRuntime.php +++ /dev/null @@ -1,239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Runtime; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Dotenv\Dotenv; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Runtime\Internal\MissingDotenv; -use Symfony\Component\Runtime\Internal\SymfonyErrorHandler; -use Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner; -use Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner; -use Symfony\Component\Runtime\Runner\Symfony\ResponseRunner; - -// Help opcache.preload discover always-needed symbols -class_exists(MissingDotenv::class, false) || class_exists(Dotenv::class) || class_exists(MissingDotenv::class); - -/** - * Knows the basic conventions to run Symfony apps. - * - * In addition to the options managed by GenericRuntime, it accepts the following options: - * - "env" to define the name of the environment the app runs in; - * - "disable_dotenv" to disable looking for .env files; - * - "dotenv_path" to define the path of dot-env files - defaults to ".env"; - * - "prod_envs" to define the names of the production envs - defaults to ["prod"]; - * - "test_envs" to define the names of the test envs - defaults to ["test"]; - * - "use_putenv" to tell Dotenv to set env vars using putenv() (NOT RECOMMENDED.) - * - "dotenv_overload" to tell Dotenv to override existing vars - * - * When the "debug" / "env" options are not defined, they will fallback to the - * "APP_DEBUG" / "APP_ENV" environment variables, and to the "--env|-e" / "--no-debug" - * command line arguments if "symfony/console" is installed. - * - * When the "symfony/dotenv" component is installed, .env files are loaded. - * When "symfony/error-handler" is installed, it is registered in debug mode. - * - * On top of the base arguments provided by GenericRuntime, - * this runtime can feed the app-callable with arguments of type: - * - Request from "symfony/http-foundation" if the component is installed; - * - Application, Command, InputInterface and/or OutputInterface - * from "symfony/console" if the component is installed. - * - * This runtime can handle app-callables that return instances of either: - * - HttpKernelInterface, - * - Response, - * - Application, - * - Command, - * - int|string|null as handled by GenericRuntime. - * - * @author Nicolas Grekas - */ -class SymfonyRuntime extends GenericRuntime -{ - private $input; - private $output; - private $console; - private $command; - - /** - * @param array { - * debug?: ?bool, - * env?: ?string, - * disable_dotenv?: ?bool, - * project_dir?: ?string, - * prod_envs?: ?string[], - * dotenv_path?: ?string, - * test_envs?: ?string[], - * use_putenv?: ?bool, - * runtimes?: ?array, - * error_handler?: string|false, - * env_var_name?: string, - * debug_var_name?: string, - * dotenv_overload?: ?bool, - * } $options - */ - public function __construct(array $options = []) - { - $envKey = $options['env_var_name'] ?? $options['env_var_name'] = 'APP_ENV'; - $debugKey = $options['debug_var_name'] ?? $options['debug_var_name'] = 'APP_DEBUG'; - - if (isset($options['env'])) { - $_SERVER[$envKey] = $options['env']; - } elseif (isset($_SERVER['argv']) && class_exists(ArgvInput::class)) { - $this->options = $options; - $this->getInput(); - } - - if (!($options['disable_dotenv'] ?? false) && isset($options['project_dir']) && !class_exists(MissingDotenv::class, false)) { - (new Dotenv($envKey, $debugKey)) - ->setProdEnvs((array) ($options['prod_envs'] ?? ['prod'])) - ->usePutenv($options['use_putenv'] ?? false) - ->bootEnv($options['project_dir'].'/'.($options['dotenv_path'] ?? '.env'), 'dev', (array) ($options['test_envs'] ?? ['test']), $options['dotenv_overload'] ?? false); - - if ($this->input && ($options['dotenv_overload'] ?? false)) { - if ($this->input->getParameterOption(['--env', '-e'], $_SERVER[$envKey], true) !== $_SERVER[$envKey]) { - throw new \LogicException(sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey)); - } - - if ($_SERVER[$debugKey] && $this->input->hasParameterOption('--no-debug', true)) { - putenv($debugKey.'='.$_SERVER[$debugKey] = $_ENV[$debugKey] = '0'); - } - } - - $options['debug'] ?? $options['debug'] = '1' === $_SERVER[$debugKey]; - $options['disable_dotenv'] = true; - } else { - $_SERVER[$envKey] ?? $_SERVER[$envKey] = $_ENV[$envKey] ?? 'dev'; - $_SERVER[$debugKey] ?? $_SERVER[$debugKey] = $_ENV[$debugKey] ?? !\in_array($_SERVER[$envKey], (array) ($options['prod_envs'] ?? ['prod']), true); - } - - $options['error_handler'] ?? $options['error_handler'] = SymfonyErrorHandler::class; - - parent::__construct($options); - } - - public function getRunner(?object $application): RunnerInterface - { - if ($application instanceof HttpKernelInterface) { - return new HttpKernelRunner($application, Request::createFromGlobals()); - } - - if ($application instanceof Response) { - return new ResponseRunner($application); - } - - if ($application instanceof Command) { - $console = $this->console ?? $this->console = new Application(); - $console->setName($application->getName() ?: $console->getName()); - - if (!$application->getName() || !$console->has($application->getName())) { - $application->setName($_SERVER['argv'][0]); - $console->add($application); - } - - $console->setDefaultCommand($application->getName(), true); - $console->getDefinition()->addOptions($application->getDefinition()->getOptions()); - - return $this->getRunner($console); - } - - if ($application instanceof Application) { - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { - echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL; - } - - set_time_limit(0); - $defaultEnv = !isset($this->options['env']) ? ($_SERVER[$this->options['env_var_name']] ?? 'dev') : null; - $output = $this->output ?? $this->output = new ConsoleOutput(); - - return new ConsoleApplicationRunner($application, $defaultEnv, $this->getInput(), $output); - } - - if ($this->command) { - $this->getInput()->bind($this->command->getDefinition()); - } - - return parent::getRunner($application); - } - - /** - * @return mixed - */ - protected function getArgument(\ReflectionParameter $parameter, ?string $type) - { - switch ($type) { - case Request::class: - return Request::createFromGlobals(); - - case InputInterface::class: - return $this->getInput(); - - case OutputInterface::class: - return $this->output ?? $this->output = new ConsoleOutput(); - - case Application::class: - return $this->console ?? $this->console = new Application(); - - case Command::class: - return $this->command ?? $this->command = new Command(); - } - - return parent::getArgument($parameter, $type); - } - - protected static function register(GenericRuntime $runtime): GenericRuntime - { - $self = new self($runtime->options + ['runtimes' => []]); - $self->options['runtimes'] += [ - HttpKernelInterface::class => $self, - Request::class => $self, - Response::class => $self, - Application::class => $self, - Command::class => $self, - InputInterface::class => $self, - OutputInterface::class => $self, - ]; - $runtime->options = $self->options; - - return $self; - } - - private function getInput(): ArgvInput - { - if (null !== $this->input) { - return $this->input; - } - - $input = new ArgvInput(); - - if (isset($this->options['env'])) { - return $this->input = $input; - } - - if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { - putenv($this->options['env_var_name'].'='.$_SERVER[$this->options['env_var_name']] = $_ENV[$this->options['env_var_name']] = $env); - } - - if ($input->hasParameterOption('--no-debug', true)) { - putenv($this->options['debug_var_name'].'='.$_SERVER[$this->options['debug_var_name']] = $_ENV[$this->options['debug_var_name']] = '0'); - } - - return $this->input = $input; - } -} diff --git a/vendor/symfony/runtime/composer.json b/vendor/symfony/runtime/composer.json deleted file mode 100644 index f8112d9..0000000 --- a/vendor/symfony/runtime/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "symfony/runtime", - "type": "composer-plugin", - "description": "Enables decoupling PHP applications from global state", - "homepage": "https://symfony.com", - "license" : "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "composer-plugin-api": "^1.0|^2.0", - "symfony/polyfill-php80": "^1.15" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "symfony/console": "^4.4.30|^5.3.7|^6.0", - "symfony/dotenv": "^5.1|^6.0", - "symfony/http-foundation": "^4.4.30|^5.3.7|^6.0", - "symfony/http-kernel": "^4.4.30|^5.3.7|^6.0" - }, - "conflict": { - "symfony/dotenv": "<5.1" - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Runtime\\": "", - "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev", - "extra": { - "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" - } -} diff --git a/vendor/symfony/security-bundle/CHANGELOG.md b/vendor/symfony/security-bundle/CHANGELOG.md deleted file mode 100644 index 4cb8093..0000000 --- a/vendor/symfony/security-bundle/CHANGELOG.md +++ /dev/null @@ -1,287 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate `FirewallConfig::getListeners()`, use `FirewallConfig::getAuthenticators()` instead - * Deprecate `security.authentication.basic_entry_point` and `security.authentication.retry_entry_point` services, the logic is moved into the - `HttpBasicAuthenticator` and `ChannelListener` respectively - * Deprecate `FirewallConfig::allowsAnonymous()` and the `allows_anonymous` from the data collector data, there will be no anonymous concept as of version 6. - * Deprecate not setting `$authenticatorManagerEnabled` to `true` in `SecurityDataCollector` and `DebugFirewallCommand` - * Deprecate `SecurityFactoryInterface` and `SecurityExtension::addSecurityListenerFactory()` in favor of - `AuthenticatorFactoryInterface` and `SecurityExtension::addAuthenticatorFactory()` - * Add `AuthenticatorFactoryInterface::getPriority()` which replaces `SecurityFactoryInterface::getPosition()` - * Deprecate passing an array of arrays as 1st argument to `MainConfiguration`, pass a sorted flat array of - factories instead. - * Deprecate the `always_authenticate_before_granting` option - * Display the roles of the logged-in user in the Web Debug Toolbar - * Add the `security.access_decision_manager.strategy_service` option - * Deprecate not configuring explicitly a provider for custom_authenticators when there is more than one registered provider - -5.3 ---- - - * The authenticator system is no longer experimental - * Login Link functionality is no longer experimental - * Add `required_badges` firewall config option - * [BC break] Add `login_throttling.lock_factory` setting defaulting to `null` (instead of `lock.factory`) - * Add a `login_throttling.interval` (in `security.firewalls`) option to change the default throttling interval. - * Add the `debug:firewall` command. - * Deprecate `UserPasswordEncoderCommand` class and the corresponding `user:encode-password` command, - use `UserPasswordHashCommand` and `user:hash-password` instead - * Deprecate the `security.encoder_factory.generic` service, the `security.encoder_factory` and `Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface` aliases, - use `security.password_hasher_factory` and `Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface` instead - * Deprecate the `security.user_password_encoder.generic` service, the `security.password_encoder` and the `Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface` aliases, - use `security.user_password_hasher`, `security.password_hasher` and `Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface` instead - * Deprecate the public `security.authorization_checker` and `security.token_storage` services to private - * Not setting the `enable_authenticator_manager` config option to `true` is deprecated - * Deprecate the `security.authentication.provider.*` services, use the new authenticator system instead - * Deprecate the `security.authentication.listener.*` services, use the new authenticator system instead - * Deprecate the Guard component integration, use the new authenticator system instead - * Add `form_login.form_only` option - -5.2.0 ------ - - * Added `FirewallListenerFactoryInterface`, which can be implemented by security factories to add firewall listeners - * Added `SortFirewallListenersPass` to make the execution order of firewall listeners configurable by - leveraging `Symfony\Component\Security\Http\Firewall\FirewallListenerInterface` - * Added ability to use comma separated ip address list for `security.access_control` - * [BC break] Removed `EntryPointFactoryInterface`, authenticators must now implement `AuthenticationEntryPointInterface` if - they require autoregistration of a Security entry point. - -5.1.0 ------ - - * Added XSD for configuration - * Added security configuration for priority-based access decision strategy - * Marked the `AnonymousFactory`, `FormLoginFactory`, `FormLoginLdapFactory`, `GuardAuthenticationFactory`, `HttpBasicFactory`, `HttpBasicLdapFactory`, `JsonLoginFactory`, `JsonLoginLdapFactory`, `RememberMeFactory`, `RemoteUserFactory` and `X509Factory` as `@internal` - * Renamed method `AbstractFactory#createEntryPoint()` to `AbstractFactory#createDefaultEntryPoint()` - -5.0.0 ------ - - * The `switch_user.stateless` firewall option has been removed. - * Removed the ability to configure encoders using `argon2i` or `bcrypt` as algorithm, use `auto` instead - * The `simple_form` and `simple_preauth` authentication listeners have been removed, - use Guard instead. - * The `SimpleFormFactory` and `SimplePreAuthenticationFactory` classes have been removed, - use Guard instead. - * Removed `LogoutUrlHelper` and `SecurityHelper` templating helpers, use Twig instead - * Removed the `logout_on_user_change` firewall option - * Removed the `threads` encoder option - * Removed the `security.authentication.trust_resolver.anonymous_class` parameter - * Removed the `security.authentication.trust_resolver.rememberme_class` parameter - * Removed the `security.user.provider.in_memory.user` service. - -4.4.0 ------ - - * Added `anonymous: lazy` mode to firewalls to make them (not) start the session as late as possible - * Added `migrate_from` option to encoders configuration. - * Added new `argon2id` encoder, undeprecated the `bcrypt` and `argon2i` ones (using `auto` is still recommended by default.) - * Deprecated the usage of "query_string" without a "search_dn" and a "search_password" config key in Ldap factories. - * Marked the `SecurityDataCollector` class as `@final`. - -4.3.0 ------ - - * Added new encoder types: `auto` (recommended), `native` and `sodium` - * The normalization of the cookie names configured in the `logout.delete_cookies` - option is deprecated and will be disabled in Symfony 5.0. This affects to cookies - with dashes in their names. For example, starting from Symfony 5.0, the `my-cookie` - name will delete `my-cookie` (with a dash) instead of `my_cookie` (with an underscore). - -4.2.0 ------ - - * Using the `security.authentication.trust_resolver.anonymous_class` and - `security.authentication.trust_resolver.rememberme_class` parameters to define - the token classes is deprecated. To use custom tokens extend the existing - `Symfony\Component\Security\Core\Authentication\Token\AnonymousToken`. - or `Symfony\Component\Security\Core\Authentication\Token\RememberMeToken`. - * Added `Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass` - * Added `json_login_ldap` authentication provider to use LDAP authentication with a REST API. - * Made remember-me cookies inherit their default config from `framework.session.cookie_*` - and added an "auto" mode to their "secure" config option to make them secure on HTTPS automatically. - * Deprecated the `simple_form` and `simple_preauth` authentication listeners, use Guard instead. - * Deprecated the `SimpleFormFactory` and `SimplePreAuthenticationFactory` classes, use Guard instead. - * Added `port` in access_control - * Added individual voter decisions to the profiler - -4.1.0 ------ - - * The `switch_user.stateless` firewall option is deprecated, use the `stateless` option instead. - * The `logout_on_user_change` firewall option is deprecated. - * deprecated `SecurityUserValueResolver`, use - `Symfony\Component\Security\Http\Controller\UserValueResolver` instead. - -4.0.0 ------ - - * removed `FirewallContext::getContext()` - * made `FirewallMap::$container` and `::$map` private - * made the first `UserPasswordEncoderCommand::_construct()` argument mandatory - * `UserPasswordEncoderCommand` does not extend `ContainerAwareCommand` anymore - * removed support for voters that don't implement the `VoterInterface` - * removed HTTP digest authentication - * removed command `acl:set` along with `SetAclCommand` class - * removed command `init:acl` along with `InitAclCommand` class - * removed `acl` configuration key and related services, use symfony/acl-bundle instead - * removed auto picking the first registered provider when no configured provider on a firewall and ambiguous - * the firewall option `logout_on_user_change` is now always true, which will trigger a logout if the user changes - between requests - * the `switch_user.stateless` firewall option is `true` for stateless firewalls - -3.4.0 ------ - - * Added new `security.helper` service that is an instance of `Symfony\Component\Security\Core\Security` - and provides shortcuts for common security tasks. - * Tagging voters with the `security.voter` tag without implementing the - `VoterInterface` on the class is now deprecated and will be removed in 4.0. - * [BC BREAK] `FirewallContext::getListeners()` now returns `\Traversable|array` - * added info about called security listeners in profiler - * Added `logout_on_user_change` to the firewall options. This config item will - trigger a logout when the user has changed. Should be set to true to avoid - deprecations in the configuration. - * deprecated HTTP digest authentication - * deprecated command `acl:set` along with `SetAclCommand` class - * deprecated command `init:acl` along with `InitAclCommand` class - * Added support for the new Argon2i password encoder - * added `stateless` option to the `switch_user` listener - * deprecated auto picking the first registered provider when no configured provider on a firewall and ambiguous - -3.3.0 ------ - - * Deprecated instantiating `UserPasswordEncoderCommand` without its constructor - arguments fully provided. - * Deprecated `UserPasswordEncoderCommand::getContainer()` and relying on the - `ContainerAwareCommand` sub class or `ContainerAwareInterface` implementation for this command. - * Deprecated the `FirewallMap::$map` and `$container` properties. - * [BC BREAK] Keys of the `users` node for `in_memory` user provider are no longer normalized. - * deprecated `FirewallContext::getListeners()` - -3.2.0 ------ - - * Added the `SecurityUserValueResolver` to inject the security users in actions via - `Symfony\Component\Security\Core\User\UserInterface` in the method signature. - -3.0.0 ------ - - * Removed the `security.context` service. - -2.8.0 ------ - - * deprecated the `key` setting of `anonymous`, `remember_me` and `http_digest` - in favor of the `secret` setting. - * deprecated the `intention` firewall listener setting in favor of the `csrf_token_id`. - -2.6.0 ------ - - * Added the possibility to override the default success/failure handler - to get the provider key and the options injected - * Deprecated the `security.context` service for the `security.token_storage` and - `security.authorization_checker` services. - -2.4.0 ------ - - * Added 'host' option to firewall configuration - * Added 'csrf_token_generator' and 'csrf_token_id' options to firewall logout - listener configuration to supersede/alias 'csrf_provider' and 'intention' - respectively - * Moved 'security.secure_random' service configuration to FrameworkBundle - -2.3.0 ------ - - * allowed for multiple IP address in security access_control rules - -2.2.0 ------ - - * Added PBKDF2 Password encoder - * Added BCrypt password encoder - -2.1.0 ------ - - * [BC BREAK] The custom factories for the firewall configuration are now - registered during the build method of bundles instead of being registered - by the end-user (you need to remove the 'factories' keys in your security - configuration). - - * [BC BREAK] The Firewall listener is now registered after the Router one. This - means that specific Firewall URLs (like /login_check and /logout must now - have proper route defined in your routing configuration) - - * [BC BREAK] refactored the user provider configuration. The configuration - changed for the chain provider and the memory provider: - - Before: - - ``` yaml - security: - providers: - my_chain_provider: - providers: [my_memory_provider, my_doctrine_provider] - my_memory_provider: - users: - toto: { password: foobar, roles: [ROLE_USER] } - foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } - ``` - - After: - - ``` yaml - security: - providers: - my_chain_provider: - chain: - providers: [my_memory_provider, my_doctrine_provider] - my_memory_provider: - memory: - users: - toto: { password: foobar, roles: [ROLE_USER] } - foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } - ``` - - * [BC BREAK] Method `equals` was removed from `UserInterface` to its own new - `EquatableInterface`. The user class can now implement this interface to override - the default implementation of users equality test. - - * added a validator for the user password - * added 'erase_credentials' as a configuration key (true by default) - * added new events: `security.authentication.success` and `security.authentication.failure` - fired on authentication success/failure, regardless of authentication method, - events are defined in new event class: `Symfony\Component\Security\Core\AuthenticationEvents`. - - * Added optional CSRF protection to LogoutListener: - - ``` yaml - security: - firewalls: - default: - logout: - path: /logout_path - target: / - csrf_parameter: _csrf_token # Optional (defaults to "_csrf_token") - csrf_provider: security.csrf.token_generator # Required to enable protection - intention: logout # Optional (defaults to "logout") - ``` - - If the LogoutListener has CSRF protection enabled but cannot validate a token, - then a LogoutException will be thrown. - - * Added `logout_url` templating helper and Twig extension, which may be used to - generate logout URL's within templates. The security firewall's config key - must be specified. If a firewall's logout listener has CSRF protection - enabled, a token will be automatically added to the generated URL. diff --git a/vendor/symfony/security-bundle/CacheWarmer/ExpressionCacheWarmer.php b/vendor/symfony/security-bundle/CacheWarmer/ExpressionCacheWarmer.php deleted file mode 100644 index 095286e..0000000 --- a/vendor/symfony/security-bundle/CacheWarmer/ExpressionCacheWarmer.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\CacheWarmer; - -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; - -class ExpressionCacheWarmer implements CacheWarmerInterface -{ - private $expressions; - private $expressionLanguage; - - /** - * @param iterable $expressions - */ - public function __construct(iterable $expressions, ExpressionLanguage $expressionLanguage) - { - $this->expressions = $expressions; - $this->expressionLanguage = $expressionLanguage; - } - - public function isOptional() - { - return true; - } - - /** - * @return string[] - */ - public function warmUp(string $cacheDir) - { - foreach ($this->expressions as $expression) { - $this->expressionLanguage->parse($expression, ['token', 'user', 'object', 'subject', 'role_names', 'request', 'trust_resolver']); - } - - return []; - } -} diff --git a/vendor/symfony/security-bundle/Command/DebugFirewallCommand.php b/vendor/symfony/security-bundle/Command/DebugFirewallCommand.php deleted file mode 100644 index b5fe209..0000000 --- a/vendor/symfony/security-bundle/Command/DebugFirewallCommand.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Command; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\SecurityBundle\Security\FirewallContext; -use Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; - -/** - * @author Timo Bakx - */ -final class DebugFirewallCommand extends Command -{ - protected static $defaultName = 'debug:firewall'; - protected static $defaultDescription = 'Display information about your security firewall(s)'; - - private $firewallNames; - private $contexts; - private $eventDispatchers; - private $authenticators; - private $authenticatorManagerEnabled; - - /** - * @param string[] $firewallNames - * @param AuthenticatorInterface[][] $authenticators - */ - public function __construct(array $firewallNames, ContainerInterface $contexts, ContainerInterface $eventDispatchers, array $authenticators, bool $authenticatorManagerEnabled) - { - if (!$authenticatorManagerEnabled) { - trigger_deprecation('symfony/security-bundle', '5.4', 'Setting the $authenticatorManagerEnabled argument of "%s" to "false" is deprecated, use the new authenticator system instead.', __METHOD__); - } - - $this->firewallNames = $firewallNames; - $this->contexts = $contexts; - $this->eventDispatchers = $eventDispatchers; - $this->authenticators = $authenticators; - $this->authenticatorManagerEnabled = $authenticatorManagerEnabled; - - parent::__construct(); - } - - protected function configure(): void - { - $exampleName = $this->getExampleName(); - - $this - ->setDescription(self::$defaultDescription) - ->setHelp(<<%command.name%
    command displays the firewalls that are configured -in your application: - - php %command.full_name% - -You can pass a firewall name to display more detailed information about -a specific firewall: - - php %command.full_name% $exampleName - -To include all events and event listeners for a specific firewall, use the -events option: - - php %command.full_name% --events $exampleName - -EOF - ) - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, sprintf('A firewall name (for example "%s")', $exampleName)), - new InputOption('events', null, InputOption::VALUE_NONE, 'Include a list of event listeners (only available in combination with the "name" argument)'), - ]); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $name = $input->getArgument('name'); - - if (null === $name) { - $this->displayFirewallList($io); - - return 0; - } - - $serviceId = sprintf('security.firewall.map.context.%s', $name); - - if (!$this->contexts->has($serviceId)) { - $io->error(sprintf('Firewall %s was not found. Available firewalls are: %s', $name, implode(', ', $this->firewallNames))); - - return 1; - } - - /** @var FirewallContext $context */ - $context = $this->contexts->get($serviceId); - - $io->title(sprintf('Firewall "%s"', $name)); - - $this->displayFirewallSummary($name, $context, $io); - - $this->displaySwitchUser($context, $io); - - if ($input->getOption('events')) { - $this->displayEventListeners($name, $context, $io); - } - - if ($this->authenticatorManagerEnabled) { - $this->displayAuthenticators($name, $io); - } - - return 0; - } - - protected function displayFirewallList(SymfonyStyle $io): void - { - $io->title('Firewalls'); - $io->text('The following firewalls are defined:'); - - $io->listing($this->firewallNames); - - $io->comment(sprintf('To view details of a specific firewall, re-run this command with a firewall name. (e.g. debug:firewall %s)', $this->getExampleName())); - } - - protected function displayFirewallSummary(string $name, FirewallContext $context, SymfonyStyle $io): void - { - if (null === $context->getConfig()) { - return; - } - - $rows = [ - ['Name', $name], - ['Context', $context->getConfig()->getContext()], - ['Lazy', $context instanceof LazyFirewallContext ? 'Yes' : 'No'], - ['Stateless', $context->getConfig()->isStateless() ? 'Yes' : 'No'], - ['User Checker', $context->getConfig()->getUserChecker()], - ['Provider', $context->getConfig()->getProvider()], - ['Entry Point', $context->getConfig()->getEntryPoint()], - ['Access Denied URL', $context->getConfig()->getAccessDeniedUrl()], - ['Access Denied Handler', $context->getConfig()->getAccessDeniedHandler()], - ]; - - $io->table( - ['Option', 'Value'], - $rows - ); - } - - private function displaySwitchUser(FirewallContext $context, SymfonyStyle $io) - { - if ((null === $config = $context->getConfig()) || (null === $switchUser = $config->getSwitchUser())) { - return; - } - - $io->section('User switching'); - - $io->table(['Option', 'Value'], [ - ['Parameter', $switchUser['parameter'] ?? ''], - ['Provider', $switchUser['provider'] ?? $config->getProvider()], - ['User Role', $switchUser['role'] ?? ''], - ]); - } - - protected function displayEventListeners(string $name, FirewallContext $context, SymfonyStyle $io): void - { - $io->title(sprintf('Event listeners for firewall "%s"', $name)); - - $dispatcherId = sprintf('security.event_dispatcher.%s', $name); - - if (!$this->eventDispatchers->has($dispatcherId)) { - $io->text('No event dispatcher has been registered for this firewall.'); - - return; - } - - /** @var EventDispatcherInterface $dispatcher */ - $dispatcher = $this->eventDispatchers->get($dispatcherId); - - foreach ($dispatcher->getListeners() as $event => $listeners) { - $io->section(sprintf('"%s" event', $event)); - - $rows = []; - foreach ($listeners as $order => $listener) { - $rows[] = [ - sprintf('#%d', $order + 1), - $this->formatCallable($listener), - $dispatcher->getListenerPriority($event, $listener), - ]; - } - - $io->table( - ['Order', 'Callable', 'Priority'], - $rows - ); - } - } - - private function displayAuthenticators(string $name, SymfonyStyle $io): void - { - $io->title(sprintf('Authenticators for firewall "%s"', $name)); - - $authenticators = $this->authenticators[$name] ?? []; - - if (0 === \count($authenticators)) { - $io->text('No authenticators have been registered for this firewall.'); - - return; - } - - $io->table( - ['Classname'], - array_map( - static function ($authenticator) { - return [ - \get_class($authenticator), - ]; - }, - $authenticators - ) - ); - } - - private function formatCallable($callable): string - { - if (\is_array($callable)) { - if (\is_object($callable[0])) { - return sprintf('%s::%s()', \get_class($callable[0]), $callable[1]); - } - - return sprintf('%s::%s()', $callable[0], $callable[1]); - } - - if (\is_string($callable)) { - return sprintf('%s()', $callable); - } - - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - if (false !== strpos($r->name, '{closure}')) { - return 'Closure()'; - } - if ($class = $r->getClosureScopeClass()) { - return sprintf('%s::%s()', $class->name, $r->name); - } - - return $r->name.'()'; - } - - if (method_exists($callable, '__invoke')) { - return sprintf('%s::__invoke()', \get_class($callable)); - } - - throw new \InvalidArgumentException('Callable is not describable.'); - } - - private function getExampleName(): string - { - $name = 'main'; - - if (!\in_array($name, $this->firewallNames, true)) { - $name = reset($this->firewallNames); - } - - return $name; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->firewallNames); - } - } -} diff --git a/vendor/symfony/security-bundle/Command/UserPasswordEncoderCommand.php b/vendor/symfony/security-bundle/Command/UserPasswordEncoderCommand.php deleted file mode 100644 index 09f4df8..0000000 --- a/vendor/symfony/security-bundle/Command/UserPasswordEncoderCommand.php +++ /dev/null @@ -1,216 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\Question; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\PasswordHasher\Command\UserPasswordHashCommand; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Encoder\SelfSaltingEncoderInterface; - -/** - * Encode a user's password. - * - * @author Sarah Khalil - * - * @final - * - * @deprecated since Symfony 5.3, use {@link UserPasswordHashCommand} instead - */ -class UserPasswordEncoderCommand extends Command -{ - protected static $defaultName = 'security:encode-password'; - protected static $defaultDescription = 'Encode a password'; - - private $encoderFactory; - private $userClasses; - - public function __construct(EncoderFactoryInterface $encoderFactory, array $userClasses = []) - { - $this->encoderFactory = $encoderFactory; - $this->userClasses = $userClasses; - - parent::__construct(); - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('password', InputArgument::OPTIONAL, 'The plain password to encode.') - ->addArgument('user-class', InputArgument::OPTIONAL, 'The User entity class path associated with the encoder used to encode the password.') - ->addOption('empty-salt', null, InputOption::VALUE_NONE, 'Do not generate a salt or let the encoder generate one.') - ->setHelp(<<%command.name%
    command encodes passwords according to your -security configuration. This command is mainly used to generate passwords for -the in_memory user provider type and for changing passwords -in the database while developing the application. - -Suppose that you have the following security configuration in your application: - - -# app/config/security.yml -security: - encoders: - Symfony\Component\Security\Core\User\InMemoryUser: plaintext - App\Entity\User: auto - - -If you execute the command non-interactively, the first available configured -user class under the security.encoders key is used and a random salt is -generated to encode the password: - - php %command.full_name% --no-interaction [password] - -Pass the full user class path as the second argument to encode passwords for -your own entities: - - php %command.full_name% --no-interaction [password] 'App\Entity\User' - -Executing the command interactively allows you to generate a random salt for -encoding the password: - - php %command.full_name% [password] 'App\Entity\User' - -In case your encoder doesn't require a salt, add the empty-salt option: - - php %command.full_name% --empty-salt [password] 'App\Entity\User' - -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $errorIo = $output instanceof ConsoleOutputInterface ? new SymfonyStyle($input, $output->getErrorOutput()) : $io; - - $errorIo->caution('The use of the "security:encode-password" command is deprecated since version 5.3 and will be removed in 6.0. Use "security:hash-password" instead.'); - - $input->isInteractive() ? $errorIo->title('Symfony Password Encoder Utility') : $errorIo->newLine(); - - $password = $input->getArgument('password'); - $userClass = $this->getUserClass($input, $io); - $emptySalt = $input->getOption('empty-salt'); - - $encoder = $this->encoderFactory->getEncoder($userClass); - $saltlessWithoutEmptySalt = !$emptySalt && $encoder instanceof SelfSaltingEncoderInterface; - - if ($saltlessWithoutEmptySalt) { - $emptySalt = true; - } - - if (!$password) { - if (!$input->isInteractive()) { - $errorIo->error('The password must not be empty.'); - - return 1; - } - $passwordQuestion = $this->createPasswordQuestion(); - $password = $errorIo->askQuestion($passwordQuestion); - } - - $salt = null; - - if ($input->isInteractive() && !$emptySalt) { - $emptySalt = true; - - $errorIo->note('The command will take care of generating a salt for you. Be aware that some encoders advise to let them generate their own salt. If you\'re using one of those encoders, please answer \'no\' to the question below. '.\PHP_EOL.'Provide the \'empty-salt\' option in order to let the encoder handle the generation itself.'); - - if ($errorIo->confirm('Confirm salt generation ?')) { - $salt = $this->generateSalt(); - $emptySalt = false; - } - } elseif (!$emptySalt) { - $salt = $this->generateSalt(); - } - - $encodedPassword = $encoder->encodePassword($password, $salt); - - $rows = [ - ['Encoder used', \get_class($encoder)], - ['Encoded password', $encodedPassword], - ]; - if (!$emptySalt) { - $rows[] = ['Generated salt', $salt]; - } - $io->table(['Key', 'Value'], $rows); - - if (!$emptySalt) { - $errorIo->note(sprintf('Make sure that your salt storage field fits the salt length: %s chars', \strlen($salt))); - } elseif ($saltlessWithoutEmptySalt) { - $errorIo->note('Self-salting encoder used: the encoder generated its own built-in salt.'); - } - - $errorIo->success('Password encoding succeeded'); - - return 0; - } - - /** - * Create the password question to ask the user for the password to be encoded. - */ - private function createPasswordQuestion(): Question - { - $passwordQuestion = new Question('Type in your password to be encoded'); - - return $passwordQuestion->setValidator(function ($value) { - if ('' === trim($value)) { - throw new InvalidArgumentException('The password must not be empty.'); - } - - return $value; - })->setHidden(true)->setMaxAttempts(20); - } - - private function generateSalt(): string - { - return base64_encode(random_bytes(30)); - } - - private function getUserClass(InputInterface $input, SymfonyStyle $io): string - { - if (null !== $userClass = $input->getArgument('user-class')) { - return $userClass; - } - - if (empty($this->userClasses)) { - throw new RuntimeException('There are no configured encoders for the "security" extension.'); - } - - if (!$input->isInteractive() || 1 === \count($this->userClasses)) { - return reset($this->userClasses); - } - - $userClasses = $this->userClasses; - natcasesort($userClasses); - $userClasses = array_values($userClasses); - - return $io->choice('For which user class would you like to encode a password?', $userClasses, reset($userClasses)); - } -} diff --git a/vendor/symfony/security-bundle/DataCollector/SecurityDataCollector.php b/vendor/symfony/security-bundle/DataCollector/SecurityDataCollector.php deleted file mode 100644 index 1ed5129..0000000 --- a/vendor/symfony/security-bundle/DataCollector/SecurityDataCollector.php +++ /dev/null @@ -1,400 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DataCollector; - -use Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener; -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; -use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager; -use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter; -use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; -use Symfony\Component\Security\Http\Firewall\SwitchUserListener; -use Symfony\Component\Security\Http\FirewallMapInterface; -use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; -use Symfony\Component\VarDumper\Caster\ClassStub; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Fabien Potencier - * - * @final - */ -class SecurityDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $tokenStorage; - private $roleHierarchy; - private $logoutUrlGenerator; - private $accessDecisionManager; - private $firewallMap; - private $firewall; - private $hasVarDumper; - private $authenticatorManagerEnabled; - - public function __construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null, FirewallMapInterface $firewallMap = null, TraceableFirewallListener $firewall = null, bool $authenticatorManagerEnabled = false) - { - if (!$authenticatorManagerEnabled) { - trigger_deprecation('symfony/security-bundle', '5.4', 'Setting the $authenticatorManagerEnabled argument of "%s" to "false" is deprecated, use the new authenticator system instead.', __METHOD__); - } - - $this->tokenStorage = $tokenStorage; - $this->roleHierarchy = $roleHierarchy; - $this->logoutUrlGenerator = $logoutUrlGenerator; - $this->accessDecisionManager = $accessDecisionManager; - $this->firewallMap = $firewallMap; - $this->firewall = $firewall; - $this->hasVarDumper = class_exists(ClassStub::class); - $this->authenticatorManagerEnabled = $authenticatorManagerEnabled; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - if (null === $this->tokenStorage) { - $this->data = [ - 'enabled' => false, - 'authenticated' => false, - 'impersonated' => false, - 'impersonator_user' => null, - 'impersonation_exit_path' => null, - 'token' => null, - 'token_class' => null, - 'logout_url' => null, - 'user' => '', - 'roles' => [], - 'inherited_roles' => [], - 'supports_role_hierarchy' => null !== $this->roleHierarchy, - ]; - } elseif (null === $token = $this->tokenStorage->getToken()) { - $this->data = [ - 'enabled' => true, - 'authenticated' => false, - 'impersonated' => false, - 'impersonator_user' => null, - 'impersonation_exit_path' => null, - 'token' => null, - 'token_class' => null, - 'logout_url' => null, - 'user' => '', - 'roles' => [], - 'inherited_roles' => [], - 'supports_role_hierarchy' => null !== $this->roleHierarchy, - ]; - } else { - $inheritedRoles = []; - $assignedRoles = $token->getRoleNames(); - - $impersonatorUser = null; - if ($token instanceof SwitchUserToken) { - $originalToken = $token->getOriginalToken(); - // @deprecated since Symfony 5.3, change to $originalToken->getUserIdentifier() in 6.0 - $impersonatorUser = method_exists($originalToken, 'getUserIdentifier') ? $originalToken->getUserIdentifier() : $originalToken->getUsername(); - } - - if (null !== $this->roleHierarchy) { - foreach ($this->roleHierarchy->getReachableRoleNames($assignedRoles) as $role) { - if (!\in_array($role, $assignedRoles, true)) { - $inheritedRoles[] = $role; - } - } - } - - $logoutUrl = null; - try { - if (null !== $this->logoutUrlGenerator && !$token instanceof AnonymousToken) { - $logoutUrl = $this->logoutUrlGenerator->getLogoutPath(); - } - } catch (\Exception $e) { - // fail silently when the logout URL cannot be generated - } - - $this->data = [ - 'enabled' => true, - 'authenticated' => method_exists($token, 'isAuthenticated') ? $token->isAuthenticated(false) : (bool) $token->getUser(), - 'impersonated' => null !== $impersonatorUser, - 'impersonator_user' => $impersonatorUser, - 'impersonation_exit_path' => null, - 'token' => $token, - 'token_class' => $this->hasVarDumper ? new ClassStub(\get_class($token)) : \get_class($token), - 'logout_url' => $logoutUrl, - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - 'user' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(), - 'roles' => $assignedRoles, - 'inherited_roles' => array_unique($inheritedRoles), - 'supports_role_hierarchy' => null !== $this->roleHierarchy, - ]; - } - - // collect voters and access decision manager information - if ($this->accessDecisionManager instanceof TraceableAccessDecisionManager) { - $this->data['voter_strategy'] = $this->accessDecisionManager->getStrategy(); - - foreach ($this->accessDecisionManager->getVoters() as $voter) { - if ($voter instanceof TraceableVoter) { - $voter = $voter->getDecoratedVoter(); - } - - $this->data['voters'][] = $this->hasVarDumper ? new ClassStub(\get_class($voter)) : \get_class($voter); - } - - // collect voter details - $decisionLog = $this->accessDecisionManager->getDecisionLog(); - foreach ($decisionLog as $key => $log) { - $decisionLog[$key]['voter_details'] = []; - foreach ($log['voterDetails'] as $voterDetail) { - $voterClass = \get_class($voterDetail['voter']); - $classData = $this->hasVarDumper ? new ClassStub($voterClass) : $voterClass; - $decisionLog[$key]['voter_details'][] = [ - 'class' => $classData, - 'attributes' => $voterDetail['attributes'], // Only displayed for unanimous strategy - 'vote' => $voterDetail['vote'], - ]; - } - unset($decisionLog[$key]['voterDetails']); - } - - $this->data['access_decision_log'] = $decisionLog; - } else { - $this->data['access_decision_log'] = []; - $this->data['voter_strategy'] = 'unknown'; - $this->data['voters'] = []; - } - - // collect firewall context information - $this->data['firewall'] = null; - if ($this->firewallMap instanceof FirewallMap) { - $firewallConfig = $this->firewallMap->getFirewallConfig($request); - if (null !== $firewallConfig) { - $this->data['firewall'] = [ - 'name' => $firewallConfig->getName(), - 'allows_anonymous' => $this->authenticatorManagerEnabled ? false : $firewallConfig->allowsAnonymous(), - 'request_matcher' => $firewallConfig->getRequestMatcher(), - 'security_enabled' => $firewallConfig->isSecurityEnabled(), - 'stateless' => $firewallConfig->isStateless(), - 'provider' => $firewallConfig->getProvider(), - 'context' => $firewallConfig->getContext(), - 'entry_point' => $firewallConfig->getEntryPoint(), - 'access_denied_handler' => $firewallConfig->getAccessDeniedHandler(), - 'access_denied_url' => $firewallConfig->getAccessDeniedUrl(), - 'user_checker' => $firewallConfig->getUserChecker(), - ]; - - // in 6.0, always fill `$this->data['authenticators'] only - if ($this->authenticatorManagerEnabled) { - $this->data['firewall']['authenticators'] = $firewallConfig->getAuthenticators(); - } else { - $this->data['firewall']['listeners'] = $firewallConfig->getAuthenticators(); - } - - // generate exit impersonation path from current request - if ($this->data['impersonated'] && null !== $switchUserConfig = $firewallConfig->getSwitchUser()) { - $exitPath = $request->getRequestUri(); - $exitPath .= null === $request->getQueryString() ? '?' : '&'; - $exitPath .= sprintf('%s=%s', urlencode($switchUserConfig['parameter']), SwitchUserListener::EXIT_VALUE); - - $this->data['impersonation_exit_path'] = $exitPath; - } - } - } - - // collect firewall listeners information - $this->data['listeners'] = []; - if ($this->firewall) { - $this->data['listeners'] = $this->firewall->getWrappedListeners(); - } - - $this->data['authenticator_manager_enabled'] = $this->authenticatorManagerEnabled; - $this->data['authenticators'] = $this->firewall ? $this->firewall->getAuthenticatorsInfo() : []; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - public function lateCollect() - { - $this->data = $this->cloneVar($this->data); - } - - /** - * Checks if security is enabled. - */ - public function isEnabled(): bool - { - return $this->data['enabled']; - } - - /** - * Gets the user. - */ - public function getUser(): string - { - return $this->data['user']; - } - - /** - * Gets the roles of the user. - * - * @return array|Data - */ - public function getRoles() - { - return $this->data['roles']; - } - - /** - * Gets the inherited roles of the user. - * - * @return array|Data - */ - public function getInheritedRoles() - { - return $this->data['inherited_roles']; - } - - /** - * Checks if the data contains information about inherited roles. Still the inherited - * roles can be an empty array. - */ - public function supportsRoleHierarchy(): bool - { - return $this->data['supports_role_hierarchy']; - } - - /** - * Checks if the user is authenticated or not. - */ - public function isAuthenticated(): bool - { - return $this->data['authenticated']; - } - - public function isImpersonated(): bool - { - return $this->data['impersonated']; - } - - public function getImpersonatorUser(): ?string - { - return $this->data['impersonator_user']; - } - - public function getImpersonationExitPath(): ?string - { - return $this->data['impersonation_exit_path']; - } - - /** - * Get the class name of the security token. - * - * @return string|Data|null - */ - public function getTokenClass() - { - return $this->data['token_class']; - } - - /** - * Get the full security token class as Data object. - */ - public function getToken(): ?Data - { - return $this->data['token']; - } - - /** - * Get the logout URL. - */ - public function getLogoutUrl(): ?string - { - return $this->data['logout_url']; - } - - /** - * Returns the FQCN of the security voters enabled in the application. - * - * @return string[]|Data - */ - public function getVoters() - { - return $this->data['voters']; - } - - /** - * Returns the strategy configured for the security voters. - */ - public function getVoterStrategy(): string - { - return $this->data['voter_strategy']; - } - - /** - * Returns the log of the security decisions made by the access decision manager. - * - * @return array|Data - */ - public function getAccessDecisionLog() - { - return $this->data['access_decision_log']; - } - - /** - * Returns the configuration of the current firewall context. - * - * @return array|Data|null - */ - public function getFirewall() - { - return $this->data['firewall']; - } - - /** - * @return array|Data - */ - public function getListeners() - { - return $this->data['listeners']; - } - - /** - * @return array|Data - */ - public function getAuthenticators() - { - return $this->data['authenticators']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'security'; - } - - public function isAuthenticatorManagerEnabled(): bool - { - return $this->data['authenticator_manager_enabled']; - } -} diff --git a/vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php b/vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php deleted file mode 100644 index e82b476..0000000 --- a/vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Debug; - -use Symfony\Bundle\SecurityBundle\EventListener\FirewallListener; -use Symfony\Bundle\SecurityBundle\Security\FirewallContext; -use Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; - -/** - * Firewall collecting called security listeners and authenticators. - * - * @author Robin Chalas - */ -final class TraceableFirewallListener extends FirewallListener -{ - private $wrappedListeners = []; - private $authenticatorsInfo = []; - - public function getWrappedListeners() - { - return $this->wrappedListeners; - } - - public function getAuthenticatorsInfo(): array - { - return $this->authenticatorsInfo; - } - - protected function callListeners(RequestEvent $event, iterable $listeners) - { - $wrappedListeners = []; - $wrappedLazyListeners = []; - $authenticatorManagerListener = null; - - foreach ($listeners as $listener) { - if ($listener instanceof LazyFirewallContext) { - \Closure::bind(function () use (&$wrappedLazyListeners, &$wrappedListeners, &$authenticatorManagerListener) { - $listeners = []; - foreach ($this->listeners as $listener) { - if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) { - $authenticatorManagerListener = $listener; - } - if ($listener instanceof FirewallListenerInterface) { - $listener = new WrappedLazyListener($listener); - $listeners[] = $listener; - $wrappedLazyListeners[] = $listener; - } else { - $listeners[] = function (RequestEvent $event) use ($listener, &$wrappedListeners) { - $wrappedListener = new WrappedListener($listener); - $wrappedListener($event); - $wrappedListeners[] = $wrappedListener->getInfo(); - }; - } - } - $this->listeners = $listeners; - }, $listener, FirewallContext::class)(); - - $listener($event); - } else { - $wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener); - $wrappedListener($event); - $wrappedListeners[] = $wrappedListener->getInfo(); - if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) { - $authenticatorManagerListener = $listener; - } - } - - if ($event->hasResponse()) { - break; - } - } - - if ($wrappedLazyListeners) { - foreach ($wrappedLazyListeners as $lazyListener) { - $this->wrappedListeners[] = $lazyListener->getInfo(); - } - } - - $this->wrappedListeners = array_merge($this->wrappedListeners, $wrappedListeners); - - if ($authenticatorManagerListener) { - $this->authenticatorsInfo = $authenticatorManagerListener->getAuthenticatorsInfo(); - } - } -} diff --git a/vendor/symfony/security-bundle/Debug/TraceableListenerTrait.php b/vendor/symfony/security-bundle/Debug/TraceableListenerTrait.php deleted file mode 100644 index 6581314..0000000 --- a/vendor/symfony/security-bundle/Debug/TraceableListenerTrait.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Debug; - -use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Robin Chalas - * - * @internal - */ -trait TraceableListenerTrait -{ - private $response; - private $listener; - private $time; - private $stub; - - /** - * Proxies all method calls to the original listener. - */ - public function __call(string $method, array $arguments) - { - return $this->listener->{$method}(...$arguments); - } - - public function getWrappedListener() - { - return $this->listener; - } - - public function getInfo(): array - { - return [ - 'response' => $this->response, - 'time' => $this->time, - 'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener instanceof TraceableAuthenticatorManagerListener ? $this->listener->getAuthenticatorManagerListener() : $this->listener), - ]; - } -} diff --git a/vendor/symfony/security-bundle/Debug/WrappedLazyListener.php b/vendor/symfony/security-bundle/Debug/WrappedLazyListener.php deleted file mode 100644 index 5a3d0a1..0000000 --- a/vendor/symfony/security-bundle/Debug/WrappedLazyListener.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Debug; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Exception\LazyResponseException; -use Symfony\Component\Security\Http\Firewall\AbstractListener; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; - -/** - * Wraps a lazy security listener. - * - * @author Robin Chalas - * - * @internal - */ -final class WrappedLazyListener extends AbstractListener -{ - use TraceableListenerTrait; - - public function __construct(FirewallListenerInterface $listener) - { - $this->listener = $listener; - } - - public function supports(Request $request): ?bool - { - return $this->listener->supports($request); - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestEvent $event) - { - $startTime = microtime(true); - - try { - $ret = $this->listener->authenticate($event); - } catch (LazyResponseException $e) { - $this->response = $e->getResponse(); - - throw $e; - } finally { - $this->time = microtime(true) - $startTime; - } - - $this->response = $event->getResponse(); - - return $ret; - } -} diff --git a/vendor/symfony/security-bundle/Debug/WrappedListener.php b/vendor/symfony/security-bundle/Debug/WrappedListener.php deleted file mode 100644 index bce3d26..0000000 --- a/vendor/symfony/security-bundle/Debug/WrappedListener.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Debug; - -use Symfony\Component\HttpKernel\Event\RequestEvent; - -/** - * Wraps a security listener for calls record. - * - * @author Robin Chalas - * - * @internal - */ -final class WrappedListener -{ - use TraceableListenerTrait; - - public function __construct(callable $listener) - { - $this->listener = $listener; - } - - public function __invoke(RequestEvent $event) - { - $startTime = microtime(true); - ($this->listener)($event); - $this->time = microtime(true) - $startTime; - $this->response = $event->getResponse(); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php deleted file mode 100644 index 0393e6c..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Registers the expression language providers. - * - * @author Fabien Potencier - */ -class AddExpressionLanguageProvidersPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if ($container->has('security.expression_language')) { - $definition = $container->findDefinition('security.expression_language'); - foreach ($container->findTaggedServiceIds('security.expression_language_provider', true) as $id => $attributes) { - $definition->addMethodCall('registerProvider', [new Reference($id)]); - } - } - - if (!$container->hasDefinition('cache.system')) { - $container->removeDefinition('cache.security_expression_language'); - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSecurityVotersPass.php deleted file mode 100644 index c3c7b86..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter; -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Adds all configured security voters to the access decision manager. - * - * @author Johannes M. Schmitt - */ -class AddSecurityVotersPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('security.access.decision_manager')) { - return; - } - - $voters = $this->findAndSortTaggedServices('security.voter', $container); - if (!$voters) { - throw new LogicException('No security voters found. You need to tag at least one with "security.voter".'); - } - - $debug = $container->getParameter('kernel.debug'); - $voterServices = []; - foreach ($voters as $voter) { - $voterServiceId = (string) $voter; - $definition = $container->getDefinition($voterServiceId); - - $class = $container->getParameterBag()->resolveValue($definition->getClass()); - - if (!is_a($class, VoterInterface::class, true)) { - throw new LogicException(sprintf('"%s" must implement the "%s" when used as a voter.', $class, VoterInterface::class)); - } - - if ($debug) { - $voterServices[] = new Reference($debugVoterServiceId = 'debug.security.voter.'.$voterServiceId); - - $container - ->register($debugVoterServiceId, TraceableVoter::class) - ->addArgument($voter) - ->addArgument(new Reference('event_dispatcher')); - } else { - $voterServices[] = $voter; - } - } - - $container->getDefinition('security.access.decision_manager') - ->replaceArgument(0, new IteratorArgument($voterServices)); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php deleted file mode 100644 index 461a5ad..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/AddSessionDomainConstraintPass.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Uses the session domain to restrict allowed redirection targets. - * - * @author Nicolas Grekas - */ -class AddSessionDomainConstraintPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasParameter('session.storage.options') || !$container->has('security.http_utils')) { - return; - } - - $sessionOptions = $container->getParameter('session.storage.options'); - $domainRegexp = empty($sessionOptions['cookie_domain']) ? '%%s' : sprintf('(?:%%%%s|(?:.+\.)?%s)', preg_quote(trim($sessionOptions['cookie_domain'], '.'))); - - if ('auto' === ($sessionOptions['cookie_secure'] ?? null)) { - $secureDomainRegexp = sprintf('{^https://%s$}i', $domainRegexp); - $domainRegexp = 'https?://'.$domainRegexp; - } else { - $secureDomainRegexp = null; - $domainRegexp = (empty($sessionOptions['cookie_secure']) ? 'https?://' : 'https://').$domainRegexp; - } - - $container->findDefinition('security.http_utils') - ->addArgument(sprintf('{^%s$}i', $domainRegexp)) - ->addArgument($secureDomainRegexp); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php deleted file mode 100644 index d959d4b..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/CleanRememberMeVerifierPass.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Cleans up the remember me verifier cache if cache is missing. - * - * @author Jordi Boggiano - */ -class CleanRememberMeVerifierPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('cache.system')) { - $container->removeDefinition('cache.security_token_verifier'); - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php deleted file mode 100644 index ccab766..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfFeaturesPass.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Http\EventListener\CsrfProtectionListener; -use Symfony\Component\Security\Http\EventListener\CsrfTokenClearingLogoutListener; - -/** - * @author Christian Flothmann - * @author Wouter de Jong - * - * @internal - */ -class RegisterCsrfFeaturesPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - $this->registerCsrfProtectionListener($container); - $this->registerLogoutHandler($container); - } - - private function registerCsrfProtectionListener(ContainerBuilder $container) - { - if (!$container->has('security.authenticator.manager') || !$container->has('security.csrf.token_manager')) { - return; - } - - $container->register('security.listener.csrf_protection', CsrfProtectionListener::class) - ->addArgument(new Reference('security.csrf.token_manager')) - ->addTag('kernel.event_subscriber') - ->setPublic(false); - } - - protected function registerLogoutHandler(ContainerBuilder $container) - { - if (!$container->has('security.logout_listener') || !$container->has('security.csrf.token_storage')) { - return; - } - - $csrfTokenStorage = $container->findDefinition('security.csrf.token_storage'); - $csrfTokenStorageClass = $container->getParameterBag()->resolveValue($csrfTokenStorage->getClass()); - - if (!is_subclass_of($csrfTokenStorageClass, 'Symfony\Component\Security\Csrf\TokenStorage\ClearableTokenStorageInterface')) { - return; - } - - $container->register('security.logout.listener.csrf_token_clearing', CsrfTokenClearingLogoutListener::class) - ->addArgument(new Reference('security.csrf.token_storage')) - ->addTag('kernel.event_subscriber') - ->setPublic(false); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php deleted file mode 100644 index 8cabb9d..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -trigger_deprecation('symfony/security-bundle', '5.1', 'The "%s" class is deprecated.', RegisterCsrfTokenClearingLogoutHandlerPass::class); - -/** - * @deprecated since symfony/security-bundle 5.1 - */ -class RegisterCsrfTokenClearingLogoutHandlerPass extends RegisterCsrfFeaturesPass -{ - public function process(ContainerBuilder $container) - { - if (!$container->has('security.csrf.token_storage')) { - return; - } - - $this->registerLogoutHandler($container); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterEntryPointPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterEntryPointPass.php deleted file mode 100644 index 6de4951..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterEntryPointPass.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -/** - * @author Wouter de Jong - */ -class RegisterEntryPointPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasParameter('security.firewalls')) { - return; - } - - $firewalls = $container->getParameter('security.firewalls'); - foreach ($firewalls as $firewallName) { - if (!$container->hasDefinition('security.authenticator.manager.'.$firewallName) || !$container->hasParameter('security.'.$firewallName.'._indexed_authenticators')) { - continue; - } - - $entryPoints = []; - $indexedAuthenticators = $container->getParameter('security.'.$firewallName.'._indexed_authenticators'); - // this is a compile-only parameter, removing it cleans up space and avoids unintended usage - $container->getParameterBag()->remove('security.'.$firewallName.'._indexed_authenticators'); - foreach ($indexedAuthenticators as $key => $authenticatorId) { - if (!$container->has($authenticatorId)) { - continue; - } - - // because this pass runs before ResolveChildDefinitionPass, child definitions didn't inherit the parent class yet - $definition = $container->findDefinition($authenticatorId); - while (!($authenticatorClass = $definition->getClass()) && $definition instanceof ChildDefinition) { - $definition = $container->findDefinition($definition->getParent()); - } - - if (is_a($authenticatorClass, AuthenticationEntryPointInterface::class, true)) { - $entryPoints[$key] = $authenticatorId; - } - } - - if (!$entryPoints) { - continue; - } - - $config = $container->getDefinition('security.firewall.map.config.'.$firewallName); - $configuredEntryPoint = $config->getArgument(7); - - if (null !== $configuredEntryPoint) { - // allow entry points to be configured by authenticator key (e.g. "http_basic") - $entryPoint = $entryPoints[$configuredEntryPoint] ?? $configuredEntryPoint; - } elseif (1 === \count($entryPoints)) { - $entryPoint = array_shift($entryPoints); - } else { - $entryPointNames = []; - foreach ($entryPoints as $key => $serviceId) { - $entryPointNames[] = is_numeric($key) ? $serviceId : $key; - } - - throw new InvalidConfigurationException(sprintf('Because you have multiple authenticators in firewall "%s", you need to set the "entry_point" key to one of your authenticators ("%s") or a service ID implementing "%s". The "entry_point" determines what should happen (e.g. redirect to "/login") when an anonymous user tries to access a protected page.', $firewallName, implode('", "', $entryPointNames), AuthenticationEntryPointInterface::class)); - } - - $config->replaceArgument(7, $entryPoint); - $container->getDefinition('security.exception_listener.'.$firewallName)->replaceArgument(4, new Reference($entryPoint)); - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php deleted file mode 100644 index 2009495..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPass.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\Security\Core\AuthenticationEvents; -use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; -use Symfony\Component\Security\Http\Event\AuthenticationTokenCreatedEvent; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\Event\LoginFailureEvent; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\Event\TokenDeauthenticatedEvent; -use Symfony\Component\Security\Http\SecurityEvents; - -/** - * Makes sure all event listeners on the global dispatcher are also listening - * to events on the firewall-specific dispatchers. - * - * This compiler pass must be run after RegisterListenersPass of the - * EventDispatcher component. - * - * @author Wouter de Jong - * - * @internal - */ -class RegisterGlobalSecurityEventListenersPass implements CompilerPassInterface -{ - private const EVENT_BUBBLING_EVENTS = [ - CheckPassportEvent::class, - LoginFailureEvent::class, - LoginSuccessEvent::class, - LogoutEvent::class, - AuthenticationTokenCreatedEvent::class, - AuthenticationSuccessEvent::class, - InteractiveLoginEvent::class, - TokenDeauthenticatedEvent::class, - - // When events are registered by their name - AuthenticationEvents::AUTHENTICATION_SUCCESS, - SecurityEvents::INTERACTIVE_LOGIN, - ]; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->has('event_dispatcher') || !$container->hasParameter('security.firewalls')) { - return; - } - - $firewallDispatchers = []; - foreach ($container->getParameter('security.firewalls') as $firewallName) { - if (!$container->has('security.event_dispatcher.'.$firewallName)) { - continue; - } - - $firewallDispatchers[] = $container->findDefinition('security.event_dispatcher.'.$firewallName); - } - - $globalDispatcher = $container->findDefinition('event_dispatcher'); - foreach ($globalDispatcher->getMethodCalls() as $methodCall) { - if ('addListener' !== $methodCall[0]) { - continue; - } - - $methodCallArguments = $methodCall[1]; - if (!\in_array($methodCallArguments[0], self::EVENT_BUBBLING_EVENTS, true)) { - continue; - } - - foreach ($firewallDispatchers as $firewallDispatcher) { - $firewallDispatcher->addMethodCall('addListener', $methodCallArguments); - } - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php deleted file mode 100644 index 295f363..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterLdapLocatorPass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; - -/** - * @author Wouter de Jong - * - * @internal - */ -class RegisterLdapLocatorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - $definition = $container->setDefinition('security.ldap_locator', new Definition(ServiceLocator::class)); - - $locators = []; - foreach ($container->findTaggedServiceIds('ldap') as $serviceId => $tags) { - $locators[$serviceId] = new ServiceClosureArgument(new Reference($serviceId)); - } - - $definition->addArgument($locators); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php deleted file mode 100644 index a556ec4..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Monolog\Processor\ProcessorInterface; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; - -/** - * Injects the session tracker enabler in "security.context_listener" + binds "security.untracked_token_storage" to ProcessorInterface instances. - * - * @author Nicolas Grekas - * - * @internal - */ -class RegisterTokenUsageTrackingPass implements CompilerPassInterface -{ - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->has('security.untracked_token_storage')) { - return; - } - - $processorAutoconfiguration = $container->registerForAutoconfiguration(ProcessorInterface::class); - $processorAutoconfiguration->setBindings($processorAutoconfiguration->getBindings() + [ - TokenStorageInterface::class => new BoundArgument(new Reference('security.untracked_token_storage'), false), - ]); - - if (!$container->has('session.factory') && !$container->has('session.storage')) { - $container->setAlias('security.token_storage', 'security.untracked_token_storage')->setPublic(true); - $container->getDefinition('security.untracked_token_storage')->addTag('kernel.reset', ['method' => 'reset']); - } elseif ($container->hasDefinition('security.context_listener')) { - $tokenStorageClass = $container->getParameterBag()->resolveValue($container->findDefinition('security.token_storage')->getClass()); - - if (method_exists($tokenStorageClass, 'enableUsageTracking')) { - $container->getDefinition('security.context_listener') - ->setArgument(6, [new Reference('security.token_storage'), 'enableUsageTracking']); - } - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php deleted file mode 100644 index 5de431c..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/ReplaceDecoratedRememberMeHandlerPass.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Bundle\SecurityBundle\RememberMe\DecoratedRememberMeHandler; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Replaces the DecoratedRememberMeHandler services with the real definition. - * - * @author Wouter de Jong - * - * @internal - */ -final class ReplaceDecoratedRememberMeHandlerPass implements CompilerPassInterface -{ - private const HANDLER_TAG = 'security.remember_me_handler'; - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container): void - { - $handledFirewalls = []; - foreach ($container->findTaggedServiceIds(self::HANDLER_TAG) as $definitionId => $rememberMeHandlerTags) { - $definition = $container->findDefinition($definitionId); - if (DecoratedRememberMeHandler::class !== $definition->getClass()) { - continue; - } - - // get the actual custom remember me handler definition (passed to the decorator) - $realRememberMeHandler = $container->findDefinition((string) $definition->getArgument(0)); - if (null === $realRememberMeHandler) { - throw new \LogicException(sprintf('Invalid service definition for custom remember me handler; no service found with ID "%s".', (string) $definition->getArgument(0))); - } - - foreach ($rememberMeHandlerTags as $rememberMeHandlerTag) { - // some custom handlers may be used on multiple firewalls in the same application - if (\in_array($rememberMeHandlerTag['firewall'], $handledFirewalls, true)) { - continue; - } - - $rememberMeHandler = clone $realRememberMeHandler; - $rememberMeHandler->addTag(self::HANDLER_TAG, $rememberMeHandlerTag); - $container->setDefinition('security.authenticator.remember_me_handler.'.$rememberMeHandlerTag['firewall'], $rememberMeHandler); - - $handledFirewalls[] = $rememberMeHandlerTag['firewall']; - } - } - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Compiler/SortFirewallListenersPass.php b/vendor/symfony/security-bundle/DependencyInjection/Compiler/SortFirewallListenersPass.php deleted file mode 100644 index 6d49320..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Compiler/SortFirewallListenersPass.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; - -/** - * Sorts firewall listeners based on the execution order provided by FirewallListenerInterface::getPriority(). - * - * @author Christian Scheb - */ -class SortFirewallListenersPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - if (!$container->hasParameter('security.firewalls')) { - return; - } - - foreach ($container->getParameter('security.firewalls') as $firewallName) { - $firewallContextDefinition = $container->getDefinition('security.firewall.map.context.'.$firewallName); - $this->sortFirewallContextListeners($firewallContextDefinition, $container); - } - } - - private function sortFirewallContextListeners(Definition $definition, ContainerBuilder $container): void - { - /** @var IteratorArgument $listenerIteratorArgument */ - $listenerIteratorArgument = $definition->getArgument(0); - $prioritiesByServiceId = $this->getListenerPriorities($listenerIteratorArgument, $container); - - $listeners = $listenerIteratorArgument->getValues(); - usort($listeners, function (Reference $a, Reference $b) use ($prioritiesByServiceId) { - return $prioritiesByServiceId[(string) $b] <=> $prioritiesByServiceId[(string) $a]; - }); - - $listenerIteratorArgument->setValues(array_values($listeners)); - } - - private function getListenerPriorities(IteratorArgument $listeners, ContainerBuilder $container): array - { - $priorities = []; - - foreach ($listeners->getValues() as $reference) { - $id = (string) $reference; - $def = $container->getDefinition($id); - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - - $priority = 0; - if ($r->isSubclassOf(FirewallListenerInterface::class)) { - $priority = $r->getMethod('getPriority')->invoke(null); - } - - $priorities[$id] = $priority; - } - - return $priorities; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/MainConfiguration.php b/vendor/symfony/security-bundle/DependencyInjection/MainConfiguration.php deleted file mode 100644 index 20e6832..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/MainConfiguration.php +++ /dev/null @@ -1,521 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection; - -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; - -/** - * SecurityExtension configuration structure. - * - * @author Johannes M. Schmitt - */ -class MainConfiguration implements ConfigurationInterface -{ - /** @internal */ - public const STRATEGY_AFFIRMATIVE = 'affirmative'; - /** @internal */ - public const STRATEGY_CONSENSUS = 'consensus'; - /** @internal */ - public const STRATEGY_UNANIMOUS = 'unanimous'; - /** @internal */ - public const STRATEGY_PRIORITY = 'priority'; - - private $factories; - private $userProviderFactories; - - /** - * @param array $factories - */ - public function __construct(array $factories, array $userProviderFactories) - { - if (\is_array(current($factories))) { - trigger_deprecation('symfony/security-bundle', '5.4', 'Passing an array of arrays as 1st argument to "%s" is deprecated, pass a sorted array of factories instead.', __METHOD__); - - $factories = array_merge(...array_values($factories)); - } - - $this->factories = $factories; - $this->userProviderFactories = $userProviderFactories; - } - - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $tb = new TreeBuilder('security'); - $rootNode = $tb->getRootNode(); - - $rootNode - ->beforeNormalization() - ->ifTrue(function ($v) { - if ($v['encoders'] ?? false) { - trigger_deprecation('symfony/security-bundle', '5.3', 'The child node "encoders" at path "security" is deprecated, use "password_hashers" instead.'); - - return true; - } - - return $v['password_hashers'] ?? false; - }) - ->then(function ($v) { - $v['password_hashers'] = array_merge($v['password_hashers'] ?? [], $v['encoders'] ?? []); - $v['encoders'] = $v['password_hashers']; - - return $v; - }) - ->end() - ->children() - ->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end() - ->enumNode('session_fixation_strategy') - ->values([SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE]) - ->defaultValue(SessionAuthenticationStrategy::MIGRATE) - ->end() - ->booleanNode('hide_user_not_found')->defaultTrue()->end() - ->booleanNode('always_authenticate_before_granting') - ->defaultFalse() - ->setDeprecated('symfony/security-bundle', '5.4') - ->end() - ->booleanNode('erase_credentials')->defaultTrue()->end() - ->booleanNode('enable_authenticator_manager')->defaultFalse()->info('Enables the new Symfony Security system based on Authenticators, all used authenticators must support this before enabling this.')->end() - ->arrayNode('access_decision_manager') - ->addDefaultsIfNotSet() - ->children() - ->enumNode('strategy') - ->values($this->getAccessDecisionStrategies()) - ->end() - ->scalarNode('service')->end() - ->scalarNode('strategy_service')->end() - ->booleanNode('allow_if_all_abstain')->defaultFalse()->end() - ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end() - ->end() - ->validate() - ->ifTrue(function ($v) { return isset($v['strategy'], $v['service']); }) - ->thenInvalid('"strategy" and "service" cannot be used together.') - ->end() - ->validate() - ->ifTrue(function ($v) { return isset($v['strategy'], $v['strategy_service']); }) - ->thenInvalid('"strategy" and "strategy_service" cannot be used together.') - ->end() - ->validate() - ->ifTrue(function ($v) { return isset($v['service'], $v['strategy_service']); }) - ->thenInvalid('"service" and "strategy_service" cannot be used together.') - ->end() - ->end() - ->end() - ; - - $this->addEncodersSection($rootNode); - $this->addPasswordHashersSection($rootNode); - $this->addProvidersSection($rootNode); - $this->addFirewallsSection($rootNode, $this->factories); - $this->addAccessControlSection($rootNode); - $this->addRoleHierarchySection($rootNode); - - return $tb; - } - - private function addRoleHierarchySection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('role', 'role_hierarchy') - ->children() - ->arrayNode('role_hierarchy') - ->useAttributeAsKey('id') - ->prototype('array') - ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return ['value' => $v]; })->end() - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && isset($v['value']); }) - ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); }) - ->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ; - } - - private function addAccessControlSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('rule', 'access_control') - ->children() - ->arrayNode('access_control') - ->cannotBeOverwritten() - ->prototype('array') - ->fixXmlConfig('ip') - ->fixXmlConfig('method') - ->children() - ->scalarNode('requires_channel')->defaultNull()->end() - ->scalarNode('path') - ->defaultNull() - ->info('use the urldecoded format') - ->example('^/path to resource/') - ->end() - ->scalarNode('host')->defaultNull()->end() - ->integerNode('port')->defaultNull()->end() - ->arrayNode('ips') - ->beforeNormalization()->ifString()->then(function ($v) { return [$v]; })->end() - ->prototype('scalar')->end() - ->end() - ->arrayNode('methods') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() - ->prototype('scalar')->end() - ->end() - ->scalarNode('allow_if')->defaultNull()->end() - ->end() - ->fixXmlConfig('role') - ->children() - ->arrayNode('roles') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - /** - * @param array $factories - */ - private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $factories) - { - $firewallNodeBuilder = $rootNode - ->fixXmlConfig('firewall') - ->children() - ->arrayNode('firewalls') - ->isRequired() - ->requiresAtLeastOneElement() - ->disallowNewKeysInSubsequentConfigs() - ->useAttributeAsKey('name') - ->prototype('array') - ->fixXmlConfig('required_badge') - ->children() - ; - - $firewallNodeBuilder - ->scalarNode('pattern')->end() - ->scalarNode('host')->end() - ->arrayNode('methods') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() - ->prototype('scalar')->end() - ->end() - ->booleanNode('security')->defaultTrue()->end() - ->scalarNode('user_checker') - ->defaultValue('security.user_checker') - ->treatNullLike('security.user_checker') - ->info('The UserChecker to use when authenticating users in this firewall.') - ->end() - ->scalarNode('request_matcher')->end() - ->scalarNode('access_denied_url')->end() - ->scalarNode('access_denied_handler')->end() - ->scalarNode('entry_point') - ->info(sprintf('An enabled authenticator name or a service id that implements "%s"', AuthenticationEntryPointInterface::class)) - ->end() - ->scalarNode('provider')->end() - ->booleanNode('stateless')->defaultFalse()->end() - ->booleanNode('lazy')->defaultFalse()->end() - ->scalarNode('context')->cannotBeEmpty()->end() - ->arrayNode('logout') - ->treatTrueLike([]) - ->canBeUnset() - ->children() - ->scalarNode('csrf_parameter')->defaultValue('_csrf_token')->end() - ->scalarNode('csrf_token_generator')->cannotBeEmpty()->end() - ->scalarNode('csrf_token_id')->defaultValue('logout')->end() - ->scalarNode('path')->defaultValue('/logout')->end() - ->scalarNode('target')->defaultValue('/')->end() - ->scalarNode('success_handler')->setDeprecated('symfony/security-bundle', '5.1', sprintf('The "%%node%%" at path "%%path%%" is deprecated, register a listener on the "%s" event instead.', LogoutEvent::class))->end() - ->booleanNode('invalidate_session')->defaultTrue()->end() - ->end() - ->fixXmlConfig('delete_cookie') - ->children() - ->arrayNode('delete_cookies') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && \is_int(key($v)); }) - ->then(function ($v) { return array_map(function ($v) { return ['name' => $v]; }, $v); }) - ->end() - ->useAttributeAsKey('name') - ->prototype('array') - ->children() - ->scalarNode('path')->defaultNull()->end() - ->scalarNode('domain')->defaultNull()->end() - ->scalarNode('secure')->defaultFalse()->end() - ->scalarNode('samesite')->defaultNull()->end() - ->end() - ->end() - ->end() - ->end() - ->fixXmlConfig('handler') - ->children() - ->arrayNode('handlers') - ->prototype('scalar')->setDeprecated('symfony/security-bundle', '5.1', sprintf('The "%%node%%" at path "%%path%%" is deprecated, register a listener on the "%s" event instead.', LogoutEvent::class))->end() - ->end() - ->end() - ->end() - ->arrayNode('switch_user') - ->canBeUnset() - ->children() - ->scalarNode('provider')->end() - ->scalarNode('parameter')->defaultValue('_switch_user')->end() - ->scalarNode('role')->defaultValue('ROLE_ALLOWED_TO_SWITCH')->end() - ->end() - ->end() - ->arrayNode('required_badges') - ->info('A list of badges that must be present on the authenticated passport.') - ->validate() - ->always() - ->then(function ($requiredBadges) { - return array_map(function ($requiredBadge) { - if (class_exists($requiredBadge)) { - return $requiredBadge; - } - - if (false === strpos($requiredBadge, '\\')) { - $fqcn = 'Symfony\Component\Security\Http\Authenticator\Passport\Badge\\'.$requiredBadge; - if (class_exists($fqcn)) { - return $fqcn; - } - } - - throw new InvalidConfigurationException(sprintf('Undefined security Badge class "%s" set in "security.firewall.required_badges".', $requiredBadge)); - }, $requiredBadges); - }) - ->end() - ->prototype('scalar')->end() - ->end() - ; - - $abstractFactoryKeys = []; - foreach ($factories as $factory) { - $name = str_replace('-', '_', $factory->getKey()); - $factoryNode = $firewallNodeBuilder->arrayNode($name) - ->canBeUnset() - ; - - if ($factory instanceof AbstractFactory) { - $abstractFactoryKeys[] = $name; - } - - $factory->addConfiguration($factoryNode); - } - - // check for unreachable check paths - $firewallNodeBuilder - ->end() - ->validate() - ->ifTrue(function ($v) { - return true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher']); - }) - ->then(function ($firewall) use ($abstractFactoryKeys) { - foreach ($abstractFactoryKeys as $k) { - if (!isset($firewall[$k]['check_path'])) { - continue; - } - - if (str_contains($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) { - throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern'])); - } - } - - return $firewall; - }) - ->end() - ; - } - - private function addProvidersSection(ArrayNodeDefinition $rootNode) - { - $providerNodeBuilder = $rootNode - ->fixXmlConfig('provider') - ->children() - ->arrayNode('providers') - ->example([ - 'my_memory_provider' => [ - 'memory' => [ - 'users' => [ - 'foo' => ['password' => 'foo', 'roles' => 'ROLE_USER'], - 'bar' => ['password' => 'bar', 'roles' => '[ROLE_USER, ROLE_ADMIN]'], - ], - ], - ], - 'my_entity_provider' => ['entity' => ['class' => 'SecurityBundle:User', 'property' => 'username']], - ]) - ->requiresAtLeastOneElement() - ->useAttributeAsKey('name') - ->prototype('array') - ; - - $providerNodeBuilder - ->children() - ->scalarNode('id')->end() - ->arrayNode('chain') - ->fixXmlConfig('provider') - ->children() - ->arrayNode('providers') - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return preg_split('/\s*,\s*/', $v); }) - ->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ; - - foreach ($this->userProviderFactories as $factory) { - $name = str_replace('-', '_', $factory->getKey()); - $factoryNode = $providerNodeBuilder->children()->arrayNode($name)->canBeUnset(); - - $factory->addConfiguration($factoryNode); - } - - $providerNodeBuilder - ->validate() - ->ifTrue(function ($v) { return \count($v) > 1; }) - ->thenInvalid('You cannot set multiple provider types for the same provider') - ->end() - ->validate() - ->ifTrue(function ($v) { return 0 === \count($v); }) - ->thenInvalid('You must set a provider definition for the provider.') - ->end() - ; - } - - private function addEncodersSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('encoder') - ->children() - ->arrayNode('encoders') - ->example([ - 'App\Entity\User1' => 'auto', - 'App\Entity\User2' => [ - 'algorithm' => 'auto', - 'time_cost' => 8, - 'cost' => 13, - ], - ]) - ->requiresAtLeastOneElement() - ->useAttributeAsKey('class') - ->prototype('array') - ->canBeUnset() - ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end() - ->children() - ->scalarNode('algorithm') - ->cannotBeEmpty() - ->validate() - ->ifTrue(function ($v) { return !\is_string($v); }) - ->thenInvalid('You must provide a string value.') - ->end() - ->end() - ->arrayNode('migrate_from') - ->prototype('scalar')->end() - ->beforeNormalization()->castToArray()->end() - ->end() - ->scalarNode('hash_algorithm')->info('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.')->defaultValue('sha512')->end() - ->scalarNode('key_length')->defaultValue(40)->end() - ->booleanNode('ignore_case')->defaultFalse()->end() - ->booleanNode('encode_as_base64')->defaultTrue()->end() - ->scalarNode('iterations')->defaultValue(5000)->end() - ->integerNode('cost') - ->min(4) - ->max(31) - ->defaultNull() - ->end() - ->scalarNode('memory_cost')->defaultNull()->end() - ->scalarNode('time_cost')->defaultNull()->end() - ->scalarNode('id')->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addPasswordHashersSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('password_hasher') - ->children() - ->arrayNode('password_hashers') - ->example([ - 'App\Entity\User1' => 'auto', - 'App\Entity\User2' => [ - 'algorithm' => 'auto', - 'time_cost' => 8, - 'cost' => 13, - ], - ]) - ->requiresAtLeastOneElement() - ->useAttributeAsKey('class') - ->prototype('array') - ->canBeUnset() - ->performNoDeepMerging() - ->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end() - ->children() - ->scalarNode('algorithm') - ->cannotBeEmpty() - ->validate() - ->ifTrue(function ($v) { return !\is_string($v); }) - ->thenInvalid('You must provide a string value.') - ->end() - ->end() - ->arrayNode('migrate_from') - ->prototype('scalar')->end() - ->beforeNormalization()->castToArray()->end() - ->end() - ->scalarNode('hash_algorithm')->info('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.')->defaultValue('sha512')->end() - ->scalarNode('key_length')->defaultValue(40)->end() - ->booleanNode('ignore_case')->defaultFalse()->end() - ->booleanNode('encode_as_base64')->defaultTrue()->end() - ->scalarNode('iterations')->defaultValue(5000)->end() - ->integerNode('cost') - ->min(4) - ->max(31) - ->defaultNull() - ->end() - ->scalarNode('memory_cost')->defaultNull()->end() - ->scalarNode('time_cost')->defaultNull()->end() - ->scalarNode('id')->end() - ->end() - ->end() - ->end() - ->end(); - } - - private function getAccessDecisionStrategies(): array - { - return [ - self::STRATEGY_AFFIRMATIVE, - self::STRATEGY_CONSENSUS, - self::STRATEGY_UNANIMOUS, - self::STRATEGY_PRIORITY, - ]; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php deleted file mode 100644 index e8bfa94..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AbstractFactory.php +++ /dev/null @@ -1,205 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * AbstractFactory is the base class for all classes inheriting from - * AbstractAuthenticationListener. - * - * @author Fabien Potencier - * @author Lukas Kahwe Smith - * @author Johannes M. Schmitt - */ -abstract class AbstractFactory implements SecurityFactoryInterface -{ - protected $options = [ - 'check_path' => '/login_check', - 'use_forward' => false, - 'require_previous_session' => false, - 'login_path' => '/login', - ]; - - protected $defaultSuccessHandlerOptions = [ - 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - ]; - - protected $defaultFailureHandlerOptions = [ - 'failure_path' => null, - 'failure_forward' => false, - 'login_path' => '/login', - 'failure_path_parameter' => '_failure_path', - ]; - - public function create(ContainerBuilder $container, string $id, array $config, string $userProviderId, ?string $defaultEntryPointId) - { - // authentication provider - $authProviderId = $this->createAuthProvider($container, $id, $config, $userProviderId); - - // authentication listener - $listenerId = $this->createListener($container, $id, $config, $userProviderId); - - // add remember-me aware tag if requested - if ($this->isRememberMeAware($config)) { - $container - ->getDefinition($listenerId) - ->addTag('security.remember_me_aware', ['id' => $id, 'provider' => $userProviderId]) - ; - } - - // create entry point if applicable (optional) - $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPointId); - - return [$authProviderId, $listenerId, $entryPointId]; - } - - public function addConfiguration(NodeDefinition $node) - { - $builder = $node->children(); - - $builder - ->scalarNode('provider')->end() - ->booleanNode('remember_me')->defaultTrue()->end() - ->scalarNode('success_handler')->end() - ->scalarNode('failure_handler')->end() - ; - - foreach (array_merge($this->options, $this->defaultSuccessHandlerOptions, $this->defaultFailureHandlerOptions) as $name => $default) { - if (\is_bool($default)) { - $builder->booleanNode($name)->defaultValue($default); - } else { - $builder->scalarNode($name)->defaultValue($default); - } - } - } - - final public function addOption(string $name, $default = null) - { - $this->options[$name] = $default; - } - - /** - * Subclasses must return the id of a service which implements the - * AuthenticationProviderInterface. - * - * @return string - */ - abstract protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId); - - /** - * Subclasses must return the id of the abstract listener template. - * - * Listener definitions should inherit from the AbstractAuthenticationListener - * like this: - * - * - * - * In the above case, this method would return "my.listener.id". - * - * @return string - */ - abstract protected function getListenerId(); - - /** - * Subclasses may create an entry point of their as they see fit. The - * default implementation does not change the default entry point. - * - * @return string|null the entry point id - */ - protected function createEntryPoint(ContainerBuilder $container, string $id, array $config, ?string $defaultEntryPointId) - { - return $defaultEntryPointId; - } - - /** - * Subclasses may disable remember-me features for the listener, by - * always returning false from this method. - * - * @return bool Whether a possibly configured RememberMeServices should be set for this listener - */ - protected function isRememberMeAware(array $config) - { - return $config['remember_me']; - } - - protected function createListener(ContainerBuilder $container, string $id, array $config, string $userProvider) - { - $listenerId = $this->getListenerId(); - $listener = new ChildDefinition($listenerId); - $listener->replaceArgument(4, $id); - $listener->replaceArgument(5, new Reference($this->createAuthenticationSuccessHandler($container, $id, $config))); - $listener->replaceArgument(6, new Reference($this->createAuthenticationFailureHandler($container, $id, $config))); - $listener->replaceArgument(7, array_intersect_key($config, $this->options)); - - $listenerId .= '.'.$id; - $container->setDefinition($listenerId, $listener); - - return $listenerId; - } - - protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config) - { - $successHandlerId = $this->getSuccessHandlerId($id); - $options = array_intersect_key($config, $this->defaultSuccessHandlerOptions); - - if (isset($config['success_handler'])) { - $successHandler = $container->setDefinition($successHandlerId, new ChildDefinition('security.authentication.custom_success_handler')); - $successHandler->replaceArgument(0, new Reference($config['success_handler'])); - $successHandler->replaceArgument(1, $options); - $successHandler->replaceArgument(2, $id); - } else { - $successHandler = $container->setDefinition($successHandlerId, new ChildDefinition('security.authentication.success_handler')); - $successHandler->addMethodCall('setOptions', [$options]); - $successHandler->addMethodCall('setFirewallName', [$id]); - } - - return $successHandlerId; - } - - protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config) - { - $id = $this->getFailureHandlerId($id); - $options = array_intersect_key($config, $this->defaultFailureHandlerOptions); - - if (isset($config['failure_handler'])) { - $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.custom_failure_handler')); - $failureHandler->replaceArgument(0, new Reference($config['failure_handler'])); - $failureHandler->replaceArgument(1, $options); - } else { - $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.failure_handler')); - $failureHandler->addMethodCall('setOptions', [$options]); - } - - return $id; - } - - protected function getSuccessHandlerId(string $id) - { - return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); - } - - protected function getFailureHandlerId(string $id) - { - return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AnonymousFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AnonymousFactory.php deleted file mode 100644 index 13359ee..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AnonymousFactory.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Parameter; - -/** - * @author Wouter de Jong - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class AnonymousFactory implements SecurityFactoryInterface, AuthenticatorFactoryInterface -{ - public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) - { - if (null === $config['secret']) { - $config['secret'] = new Parameter('container.build_hash'); - } - - $listenerId = 'security.authentication.listener.anonymous.'.$id; - $container - ->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.anonymous')) - ->replaceArgument(1, $config['secret']) - ; - - $providerId = 'security.authentication.provider.anonymous.'.$id; - $container - ->setDefinition($providerId, new ChildDefinition('security.authentication.provider.anonymous')) - ->replaceArgument(0, $config['secret']) - ; - - return [$providerId, $listenerId, $defaultEntryPoint]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - throw new InvalidConfigurationException(sprintf('The authenticator manager no longer has "anonymous" security. Please remove this option under the "%s" firewall'.($config['lazy'] ? ' and add "lazy: true"' : '').'.', $firewallName)); - } - - public function getPriority() - { - return -60; - } - - public function getPosition() - { - return 'anonymous'; - } - - public function getKey() - { - return 'anonymous'; - } - - public function addConfiguration(NodeDefinition $builder) - { - $builder - ->beforeNormalization() - ->ifTrue(function ($v) { return 'lazy' === $v; }) - ->then(function ($v) { return ['lazy' => true]; }) - ->end() - ->children() - ->booleanNode('lazy')->defaultFalse()->setDeprecated('symfony/security-bundle', '5.1', 'Using "anonymous: lazy" to make the firewall lazy is deprecated, use "anonymous: true" and "lazy: true" instead.')->end() - ->scalarNode('secret')->defaultNull()->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php deleted file mode 100644 index 6ecec3e..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/AuthenticatorFactoryInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @method int getPriority() defines the position at which the authenticator is called - * - * @author Wouter de Jong - */ -interface AuthenticatorFactoryInterface -{ - /** - * Creates the authenticator service(s) for the provided configuration. - * - * @return string|string[] The authenticator service ID(s) to be used by the firewall - */ - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId); - - /** - * Defines the configuration key used to reference the authenticator - * in the firewall configuration. - * - * @return string - */ - public function getKey(); - - public function addConfiguration(NodeDefinition $builder); -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php deleted file mode 100644 index 9476178..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/CustomAuthenticatorFactory.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Wouter de Jong - * - * @internal - */ -class CustomAuthenticatorFactory implements AuthenticatorFactoryInterface, SecurityFactoryInterface -{ - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - throw new \LogicException('Custom authenticators are not supported when "security.enable_authenticator_manager" is not set to true.'); - } - - public function getPriority(): int - { - return 0; - } - - public function getPosition(): string - { - return 'pre_auth'; - } - - public function getKey(): string - { - return 'custom_authenticators'; - } - - /** - * @param ArrayNodeDefinition $builder - */ - public function addConfiguration(NodeDefinition $builder) - { - $builder - ->info('An array of service ids for all of your "authenticators"') - ->requiresAtLeastOneElement() - ->prototype('scalar')->end(); - - // get the parent array node builder ("firewalls") from inside the children builder - $factoryRootNode = $builder->end()->end(); - $factoryRootNode - ->fixXmlConfig('custom_authenticator') - ->validate() - ->ifTrue(function ($v) { return isset($v['custom_authenticators']) && empty($v['custom_authenticators']); }) - ->then(function ($v) { - unset($v['custom_authenticators']); - - return $v; - }) - ->end() - ; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): array - { - return $config; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php deleted file mode 100644 index c484201..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FirewallListenerFactoryInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Can be implemented by a security factory to add a listener to the firewall. - * - * @author Christian Scheb - */ -interface FirewallListenerFactoryInterface -{ - /** - * Creates the firewall listener services for the provided configuration. - * - * @return string[] The listener service IDs to be used by the firewall - */ - public function createListeners(ContainerBuilder $container, string $firewallName, array $config): array; -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginFactory.php deleted file mode 100644 index 137e8e5..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginFactory.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * FormLoginFactory creates services for form login authentication. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * - * @internal - */ -class FormLoginFactory extends AbstractFactory implements AuthenticatorFactoryInterface -{ - public const PRIORITY = -30; - - public function __construct() - { - $this->addOption('username_parameter', '_username'); - $this->addOption('password_parameter', '_password'); - $this->addOption('csrf_parameter', '_csrf_token'); - $this->addOption('csrf_token_id', 'authenticate'); - $this->addOption('enable_csrf', false); - $this->addOption('post_only', true); - $this->addOption('form_only', false); - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getPosition(): string - { - return 'form'; - } - - public function getKey(): string - { - return 'form-login'; - } - - public function addConfiguration(NodeDefinition $node) - { - parent::addConfiguration($node); - - $node - ->children() - ->scalarNode('csrf_token_generator')->cannotBeEmpty()->end() - ->end() - ; - } - - protected function getListenerId(): string - { - return 'security.authentication.listener.form'; - } - - protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId): string - { - if ($config['enable_csrf'] ?? false) { - throw new InvalidConfigurationException('The "enable_csrf" option of "form_login" is only available when "security.enable_authenticator_manager" is set to "true", use "csrf_token_generator" instead.'); - } - - $provider = 'security.authentication.provider.dao.'.$id; - $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.dao')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ; - - return $provider; - } - - protected function createListener(ContainerBuilder $container, string $id, array $config, string $userProvider) - { - $listenerId = parent::createListener($container, $id, $config, $userProvider); - - $container - ->getDefinition($listenerId) - ->addArgument(isset($config['csrf_token_generator']) ? new Reference($config['csrf_token_generator']) : null) - ; - - return $listenerId; - } - - protected function createEntryPoint(ContainerBuilder $container, string $id, array $config, ?string $defaultEntryPointId): ?string - { - $entryPointId = 'security.authentication.form_entry_point.'.$id; - $container - ->setDefinition($entryPointId, new ChildDefinition('security.authentication.form_entry_point')) - ->addArgument(new Reference('security.http_utils')) - ->addArgument($config['login_path']) - ->addArgument($config['use_forward']) - ; - - return $entryPointId; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - if (isset($config['csrf_token_generator'])) { - throw new InvalidConfigurationException('The "csrf_token_generator" option of "form_login" is only available when "security.enable_authenticator_manager" is set to "false", use "enable_csrf" instead.'); - } - - $authenticatorId = 'security.authenticator.form_login.'.$firewallName; - $options = array_intersect_key($config, $this->options); - $authenticator = $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.form_login')) - ->replaceArgument(1, new Reference($userProviderId)) - ->replaceArgument(2, new Reference($this->createAuthenticationSuccessHandler($container, $firewallName, $config))) - ->replaceArgument(3, new Reference($this->createAuthenticationFailureHandler($container, $firewallName, $config))) - ->replaceArgument(4, $options); - - if ($options['use_forward'] ?? false) { - $authenticator->addMethodCall('setHttpKernel', [new Reference('http_kernel')]); - } - - return $authenticatorId; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php deleted file mode 100644 index 04c2bc9..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Core\Exception\LogicException; - -/** - * FormLoginLdapFactory creates services for form login ldap authentication. - * - * @author Grégoire Pineau - * @author Charles Sarrazin - * - * @internal - */ -class FormLoginLdapFactory extends FormLoginFactory -{ - use LdapFactoryTrait; - - protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId): string - { - $provider = 'security.authentication.provider.ldap_bind.'.$id; - $definition = $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.ldap_bind')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ->replaceArgument(3, new Reference($config['service'])) - ->replaceArgument(4, $config['dn_string']) - ->replaceArgument(6, $config['search_dn']) - ->replaceArgument(7, $config['search_password']) - ; - - if (!empty($config['query_string'])) { - if ('' === $config['search_dn'] || '' === $config['search_password']) { - throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.'); - } - $definition->addMethodCall('setQueryString', [$config['query_string']]); - } - - return $provider; - } - - public function addConfiguration(NodeDefinition $node) - { - parent::addConfiguration($node); - - $node - ->children() - ->scalarNode('service')->defaultValue('ldap')->end() - ->scalarNode('dn_string')->defaultValue('{username}')->end() - ->scalarNode('query_string')->end() - ->scalarNode('search_dn')->defaultValue('')->end() - ->scalarNode('search_password')->defaultValue('')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php deleted file mode 100644 index a83a6d9..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator; - -/** - * Configures the "guard" authentication provider key under a firewall. - * - * @author Ryan Weaver - * - * @internal - */ -class GuardAuthenticationFactory implements SecurityFactoryInterface, AuthenticatorFactoryInterface -{ - public function getPosition(): string - { - return 'pre_auth'; - } - - public function getPriority(): int - { - return 0; - } - - public function getKey(): string - { - return 'guard'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->fixXmlConfig('authenticator') - ->children() - ->scalarNode('provider') - ->info('A key from the "providers" section of your security config, in case your user provider is different than the firewall') - ->end() - ->scalarNode('entry_point') - ->info('A service id (of one of your authenticators) whose start() method should be called when an anonymous user hits a page that requires authentication') - ->defaultValue(null) - ->end() - ->arrayNode('authenticators') - ->info('An array of service ids for all of your "authenticators"') - ->requiresAtLeastOneElement() - ->prototype('scalar')->end() - ->end() - ->end() - ; - } - - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - $authenticatorIds = $config['authenticators']; - $authenticatorReferences = []; - foreach ($authenticatorIds as $authenticatorId) { - $authenticatorReferences[] = new Reference($authenticatorId); - } - - $authenticators = new IteratorArgument($authenticatorReferences); - - // configure the GuardAuthenticationFactory to have the dynamic constructor arguments - $providerId = 'security.authentication.provider.guard.'.$id; - $container - ->setDefinition($providerId, new ChildDefinition('security.authentication.provider.guard')) - ->replaceArgument(0, $authenticators) - ->replaceArgument(1, new Reference($userProvider)) - ->replaceArgument(2, $id) - ->replaceArgument(3, new Reference('security.user_checker.'.$id)) - ; - - // listener - $listenerId = 'security.authentication.listener.guard.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.guard')); - $listener->replaceArgument(2, $id); - $listener->replaceArgument(3, $authenticators); - - // determine the entryPointId to use - $entryPointId = $this->determineEntryPoint($defaultEntryPoint, $config); - - // this is always injected - then the listener decides if it should be used - $container - ->getDefinition($listenerId) - ->addTag('security.remember_me_aware', ['id' => $id, 'provider' => $userProvider]); - - return [$providerId, $listenerId, $entryPointId]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId) - { - $userProvider = new Reference($userProviderId); - $authenticatorIds = []; - - if (isset($config['entry_point'])) { - throw new InvalidConfigurationException('The "security.firewall.'.$firewallName.'.guard.entry_point" option has no effect in the new authenticator system, configure "security.firewall.'.$firewallName.'.entry_point" instead.'); - } - - $guardAuthenticatorIds = $config['authenticators']; - foreach ($guardAuthenticatorIds as $i => $guardAuthenticatorId) { - $container->setDefinition($authenticatorIds[] = 'security.authenticator.guard.'.$firewallName.'.'.$i, new Definition(GuardBridgeAuthenticator::class)) - ->setArguments([ - new Reference($guardAuthenticatorId), - $userProvider, - ]); - } - - return $authenticatorIds; - } - - private function determineEntryPoint(?string $defaultEntryPointId, array $config): string - { - if ($defaultEntryPointId) { - // explode if they've configured the entry_point, but there is already one - if ($config['entry_point']) { - throw new \LogicException(sprintf('The guard authentication provider cannot use the "%s" entry_point because another entry point is already configured by another provider! Either remove the other provider or move the entry_point configuration as a root key under your firewall (i.e. at the same level as "guard").', $config['entry_point'])); - } - - return $defaultEntryPointId; - } - - if ($config['entry_point']) { - // if it's configured explicitly, use it! - return $config['entry_point']; - } - - $authenticatorIds = $config['authenticators']; - if (1 == \count($authenticatorIds)) { - // if there is only one authenticator, use that as the entry point - return array_shift($authenticatorIds); - } - - // we have multiple entry points - we must ask them to configure one - throw new \LogicException(sprintf('Because you have multiple guard authenticators, you need to set the "guard.entry_point" key to one of your authenticators (%s).', implode(', ', $authenticatorIds))); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicFactory.php deleted file mode 100644 index e35b8a0..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicFactory.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * HttpBasicFactory creates services for HTTP basic authentication. - * - * @author Fabien Potencier - * - * @internal - */ -class HttpBasicFactory implements SecurityFactoryInterface, AuthenticatorFactoryInterface -{ - public const PRIORITY = -50; - - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - $provider = 'security.authentication.provider.dao.'.$id; - $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.dao')) - ->replaceArgument(0, new Reference($userProvider)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ; - - // entry point - $entryPointId = $defaultEntryPoint; - if (null === $entryPointId) { - $entryPointId = 'security.authentication.basic_entry_point.'.$id; - $container - ->setDefinition($entryPointId, new ChildDefinition('security.authentication.basic_entry_point')) - ->addArgument($config['realm']) - ; - } - - // listener - $listenerId = 'security.authentication.listener.basic.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.basic')); - $listener->replaceArgument(2, $id); - $listener->replaceArgument(3, new Reference($entryPointId)); - $listener->addMethodCall('setSessionAuthenticationStrategy', [new Reference('security.authentication.session_strategy.'.$id)]); - - return [$provider, $listenerId, $entryPointId]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - $authenticatorId = 'security.authenticator.http_basic.'.$firewallName; - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.http_basic')) - ->replaceArgument(0, $config['realm']) - ->replaceArgument(1, new Reference($userProviderId)); - - return $authenticatorId; - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getPosition(): string - { - return 'http'; - } - - public function getKey(): string - { - return 'http-basic'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->children() - ->scalarNode('provider')->end() - ->scalarNode('realm')->defaultValue('Secured Area')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php deleted file mode 100644 index 0c63b21..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Core\Exception\LogicException; - -/** - * HttpBasicFactory creates services for HTTP basic authentication. - * - * @author Fabien Potencier - * @author Grégoire Pineau - * @author Charles Sarrazin - * - * @internal - */ -class HttpBasicLdapFactory extends HttpBasicFactory -{ - use LdapFactoryTrait; - - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - $provider = 'security.authentication.provider.ldap_bind.'.$id; - $definition = $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.ldap_bind')) - ->replaceArgument(0, new Reference($userProvider)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ->replaceArgument(3, new Reference($config['service'])) - ->replaceArgument(4, $config['dn_string']) - ->replaceArgument(6, $config['search_dn']) - ->replaceArgument(7, $config['search_password']) - ; - - // entry point - $entryPointId = $defaultEntryPoint; - - if (null === $entryPointId) { - $entryPointId = 'security.authentication.basic_entry_point.'.$id; - $container - ->setDefinition($entryPointId, new ChildDefinition('security.authentication.basic_entry_point')) - ->addArgument($config['realm']); - } - - if (!empty($config['query_string'])) { - if ('' === $config['search_dn'] || '' === $config['search_password']) { - throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.'); - } - $definition->addMethodCall('setQueryString', [$config['query_string']]); - } - - // listener - $listenerId = 'security.authentication.listener.basic.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.basic')); - $listener->replaceArgument(2, $id); - $listener->replaceArgument(3, new Reference($entryPointId)); - - return [$provider, $listenerId, $entryPointId]; - } - - public function addConfiguration(NodeDefinition $node) - { - parent::addConfiguration($node); - - $node - ->children() - ->scalarNode('service')->defaultValue('ldap')->end() - ->scalarNode('dn_string')->defaultValue('{username}')->end() - ->scalarNode('query_string')->end() - ->scalarNode('search_dn')->defaultValue('')->end() - ->scalarNode('search_password')->defaultValue('')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginFactory.php deleted file mode 100644 index b19a696..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginFactory.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * JsonLoginFactory creates services for JSON login authentication. - * - * @author Kévin Dunglas - * - * @internal - */ -class JsonLoginFactory extends AbstractFactory implements AuthenticatorFactoryInterface -{ - public const PRIORITY = -40; - - public function __construct() - { - $this->addOption('username_path', 'username'); - $this->addOption('password_path', 'password'); - $this->defaultFailureHandlerOptions = []; - $this->defaultSuccessHandlerOptions = []; - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - /** - * {@inheritdoc} - */ - public function getPosition(): string - { - return 'form'; - } - - /** - * {@inheritdoc} - */ - public function getKey(): string - { - return 'json-login'; - } - - /** - * {@inheritdoc} - */ - protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId): string - { - $provider = 'security.authentication.provider.dao.'.$id; - $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.dao')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ; - - return $provider; - } - - /** - * {@inheritdoc} - */ - protected function getListenerId(): string - { - return 'security.authentication.listener.json'; - } - - /** - * {@inheritdoc} - */ - protected function isRememberMeAware(array $config): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - protected function createListener(ContainerBuilder $container, string $id, array $config, string $userProvider) - { - $listenerId = $this->getListenerId(); - $listener = new ChildDefinition($listenerId); - $listener->replaceArgument(3, $id); - $listener->replaceArgument(4, isset($config['success_handler']) ? new Reference($this->createAuthenticationSuccessHandler($container, $id, $config)) : null); - $listener->replaceArgument(5, isset($config['failure_handler']) ? new Reference($this->createAuthenticationFailureHandler($container, $id, $config)) : null); - $listener->replaceArgument(6, array_intersect_key($config, $this->options)); - $listener->addMethodCall('setSessionAuthenticationStrategy', [new Reference('security.authentication.session_strategy.'.$id)]); - - $listenerId .= '.'.$id; - $container->setDefinition($listenerId, $listener); - - return $listenerId; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId) - { - $authenticatorId = 'security.authenticator.json_login.'.$firewallName; - $options = array_intersect_key($config, $this->options); - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.json_login')) - ->replaceArgument(1, new Reference($userProviderId)) - ->replaceArgument(2, isset($config['success_handler']) ? new Reference($this->createAuthenticationSuccessHandler($container, $firewallName, $config)) : null) - ->replaceArgument(3, isset($config['failure_handler']) ? new Reference($this->createAuthenticationFailureHandler($container, $firewallName, $config)) : null) - ->replaceArgument(4, $options); - - return $authenticatorId; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php deleted file mode 100644 index c8b77fa..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Core\Exception\LogicException; - -/** - * JsonLoginLdapFactory creates services for json login ldap authentication. - * - * @internal - */ -class JsonLoginLdapFactory extends JsonLoginFactory -{ - use LdapFactoryTrait; - - protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId): string - { - $provider = 'security.authentication.provider.ldap_bind.'.$id; - $definition = $container - ->setDefinition($provider, new ChildDefinition('security.authentication.provider.ldap_bind')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->replaceArgument(2, $id) - ->replaceArgument(3, new Reference($config['service'])) - ->replaceArgument(4, $config['dn_string']) - ->replaceArgument(6, $config['search_dn']) - ->replaceArgument(7, $config['search_password']) - ; - - if (!empty($config['query_string'])) { - if ('' === $config['search_dn'] || '' === $config['search_password']) { - throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.'); - } - $definition->addMethodCall('setQueryString', [$config['query_string']]); - } - - return $provider; - } - - public function addConfiguration(NodeDefinition $node) - { - parent::addConfiguration($node); - - $node - ->children() - ->scalarNode('service')->defaultValue('ldap')->end() - ->scalarNode('dn_string')->defaultValue('{username}')->end() - ->scalarNode('query_string')->end() - ->scalarNode('search_dn')->defaultValue('')->end() - ->scalarNode('search_password')->defaultValue('')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LdapFactoryTrait.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LdapFactoryTrait.php deleted file mode 100644 index 8af8e44..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LdapFactoryTrait.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Ldap\Security\CheckLdapCredentialsListener; -use Symfony\Component\Ldap\Security\LdapAuthenticator; - -/** - * A trait decorating the authenticator with LDAP functionality. - * - * @author Wouter de Jong - * - * @internal - */ -trait LdapFactoryTrait -{ - public function getKey(): string - { - return parent::getKey().'-ldap'; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - $key = str_replace('-', '_', $this->getKey()); - if (!class_exists(LdapAuthenticator::class)) { - throw new \LogicException(sprintf('The "%s" authenticator requires the "symfony/ldap" package version "5.1" or higher.', $key)); - } - - $authenticatorId = parent::createAuthenticator($container, $firewallName, $config, $userProviderId); - - $container->setDefinition('security.listener.'.$key.'.'.$firewallName, new Definition(CheckLdapCredentialsListener::class)) - ->addTag('kernel.event_subscriber', ['dispatcher' => 'security.event_dispatcher.'.$firewallName]) - ->addArgument(new Reference('security.ldap_locator')) - ; - - $ldapAuthenticatorId = 'security.authenticator.'.$key.'.'.$firewallName; - $definition = $container->setDefinition($ldapAuthenticatorId, new Definition(LdapAuthenticator::class)) - ->setArguments([ - new Reference($authenticatorId), - $config['service'], - $config['dn_string'], - $config['search_dn'], - $config['search_password'], - ]); - - if (!empty($config['query_string'])) { - if ('' === $config['search_dn'] || '' === $config['search_password']) { - throw new InvalidConfigurationException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.'); - } - - $definition->addArgument($config['query_string']); - } - - return $ldapAuthenticatorId; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginLinkFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginLinkFactory.php deleted file mode 100644 index 5badfb2..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginLinkFactory.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\LoginLink\LoginLinkHandler; - -/** - * @internal - */ -class LoginLinkFactory extends AbstractFactory implements AuthenticatorFactoryInterface -{ - public const PRIORITY = -20; - - public function addConfiguration(NodeDefinition $node) - { - /** @var NodeBuilder $builder */ - $builder = $node->fixXmlConfig('signature_property', 'signature_properties')->children(); - - $builder - ->scalarNode('check_route') - ->isRequired() - ->info('Route that will validate the login link - e.g. "app_login_link_verify".') - ->end() - ->scalarNode('check_post_only') - ->defaultFalse() - ->info('If true, only HTTP POST requests to "check_route" will be handled by the authenticator.') - ->end() - ->arrayNode('signature_properties') - ->isRequired() - ->prototype('scalar')->end() - ->requiresAtLeastOneElement() - ->info('An array of properties on your User that are used to sign the link. If any of these change, all existing links will become invalid.') - ->example(['email', 'password']) - ->end() - ->integerNode('lifetime') - ->defaultValue(600) - ->info('The lifetime of the login link in seconds.') - ->end() - ->integerNode('max_uses') - ->defaultNull() - ->info('Max number of times a login link can be used - null means unlimited within lifetime.') - ->end() - ->scalarNode('used_link_cache') - ->info('Cache service id used to expired links of max_uses is set.') - ->end() - ->scalarNode('success_handler') - ->info(sprintf('A service id that implements %s.', AuthenticationSuccessHandlerInterface::class)) - ->end() - ->scalarNode('failure_handler') - ->info(sprintf('A service id that implements %s.', AuthenticationFailureHandlerInterface::class)) - ->end() - ->scalarNode('provider') - ->info('The user provider to load users from.') - ->end() - ; - - foreach (array_merge($this->defaultSuccessHandlerOptions, $this->defaultFailureHandlerOptions) as $name => $default) { - if (\is_bool($default)) { - $builder->booleanNode($name)->defaultValue($default); - } else { - $builder->scalarNode($name)->defaultValue($default); - } - } - } - - public function getKey(): string - { - return 'login-link'; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - if (!class_exists(LoginLinkHandler::class)) { - throw new \LogicException('Login login link requires symfony/security-http:^5.2.'); - } - - if (!$container->hasDefinition('security.authenticator.login_link')) { - $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/../../Resources/config')); - $loader->load('security_authenticator_login_link.php'); - } - - if (null !== $config['max_uses'] && !isset($config['used_link_cache'])) { - $config['used_link_cache'] = 'security.authenticator.cache.expired_links'; - $defaultCacheDefinition = $container->getDefinition($config['used_link_cache']); - if (!$defaultCacheDefinition->hasTag('cache.pool')) { - $defaultCacheDefinition->addTag('cache.pool'); - } - } - - $expiredStorageId = null; - if (isset($config['used_link_cache'])) { - $expiredStorageId = 'security.authenticator.expired_login_link_storage.'.$firewallName; - $container - ->setDefinition($expiredStorageId, new ChildDefinition('security.authenticator.expired_login_link_storage')) - ->replaceArgument(0, new Reference($config['used_link_cache'])) - ->replaceArgument(1, $config['lifetime']); - } - - $signatureHasherId = 'security.authenticator.login_link_signature_hasher.'.$firewallName; - $container - ->setDefinition($signatureHasherId, new ChildDefinition('security.authenticator.abstract_login_link_signature_hasher')) - ->replaceArgument(1, $config['signature_properties']) - ->replaceArgument(3, $expiredStorageId ? new Reference($expiredStorageId) : null) - ->replaceArgument(4, $config['max_uses'] ?? null) - ; - - $linkerId = 'security.authenticator.login_link_handler.'.$firewallName; - $linkerOptions = [ - 'route_name' => $config['check_route'], - 'lifetime' => $config['lifetime'], - ]; - $container - ->setDefinition($linkerId, new ChildDefinition('security.authenticator.abstract_login_link_handler')) - ->replaceArgument(1, new Reference($userProviderId)) - ->replaceArgument(2, new Reference($signatureHasherId)) - ->replaceArgument(3, $linkerOptions) - ->addTag('security.authenticator.login_linker', ['firewall' => $firewallName]) - ; - - $authenticatorId = 'security.authenticator.login_link.'.$firewallName; - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.login_link')) - ->replaceArgument(0, new Reference($linkerId)) - ->replaceArgument(2, new Reference($this->createAuthenticationSuccessHandler($container, $firewallName, $config))) - ->replaceArgument(3, new Reference($this->createAuthenticationFailureHandler($container, $firewallName, $config))) - ->replaceArgument(4, [ - 'check_route' => $config['check_route'], - 'check_post_only' => $config['check_post_only'], - ]); - - return $authenticatorId; - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getPosition(): string - { - return 'form'; - } - - protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId): string - { - throw new \Exception('The old authentication system is not supported with login_link.'); - } - - protected function getListenerId(): string - { - throw new \Exception('The old authentication system is not supported with login_link.'); - } - - protected function createListener(ContainerBuilder $container, string $id, array $config, string $userProvider) - { - throw new \Exception('The old authentication system is not supported with login_link.'); - } - - protected function createEntryPoint(ContainerBuilder $container, string $id, array $config, ?string $defaultEntryPointId): ?string - { - throw new \Exception('The old authentication system is not supported with login_link.'); - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php deleted file mode 100644 index dc829be..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface; -use Symfony\Component\RateLimiter\RateLimiterFactory; -use Symfony\Component\Security\Http\EventListener\LoginThrottlingListener; -use Symfony\Component\Security\Http\RateLimiter\DefaultLoginRateLimiter; - -/** - * @author Wouter de Jong - * - * @internal - */ -class LoginThrottlingFactory implements AuthenticatorFactoryInterface, SecurityFactoryInterface -{ - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - throw new \LogicException('Login throttling is not supported when "security.enable_authenticator_manager" is not set to true.'); - } - - public function getPriority(): int - { - // this factory doesn't register any authenticators, this priority doesn't matter - return 0; - } - - public function getPosition(): string - { - // this factory doesn't register any authenticators, this position doesn't matter - return 'pre_auth'; - } - - public function getKey(): string - { - return 'login_throttling'; - } - - /** - * @param ArrayNodeDefinition $builder - */ - public function addConfiguration(NodeDefinition $builder) - { - $builder - ->children() - ->scalarNode('limiter')->info(sprintf('A service id implementing "%s".', RequestRateLimiterInterface::class))->end() - ->integerNode('max_attempts')->defaultValue(5)->end() - ->scalarNode('interval')->defaultValue('1 minute')->end() - ->scalarNode('lock_factory')->info('The service ID of the lock factory used by the login rate limiter (or null to disable locking)')->defaultNull()->end() - ->end(); - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): array - { - if (!class_exists(LoginThrottlingListener::class)) { - throw new \LogicException('Login throttling requires symfony/security-http:^5.2.'); - } - - if (!class_exists(RateLimiterFactory::class)) { - throw new \LogicException('Login throttling requires the Rate Limiter component. Try running "composer require symfony/rate-limiter".'); - } - - if (!isset($config['limiter'])) { - if (!class_exists(FrameworkExtension::class) || !method_exists(FrameworkExtension::class, 'registerRateLimiter')) { - throw new \LogicException('You must either configure a rate limiter for "security.firewalls.'.$firewallName.'.login_throttling" or install symfony/framework-bundle:^5.2.'); - } - - $limiterOptions = [ - 'policy' => 'fixed_window', - 'limit' => $config['max_attempts'], - 'interval' => $config['interval'], - 'lock_factory' => $config['lock_factory'], - ]; - FrameworkExtension::registerRateLimiter($container, $localId = '_login_local_'.$firewallName, $limiterOptions); - - $limiterOptions['limit'] = 5 * $config['max_attempts']; - FrameworkExtension::registerRateLimiter($container, $globalId = '_login_global_'.$firewallName, $limiterOptions); - - $container->register($config['limiter'] = 'security.login_throttling.'.$firewallName.'.limiter', DefaultLoginRateLimiter::class) - ->addArgument(new Reference('limiter.'.$globalId)) - ->addArgument(new Reference('limiter.'.$localId)) - ; - } - - $container - ->setDefinition('security.listener.login_throttling.'.$firewallName, new ChildDefinition('security.listener.login_throttling')) - ->replaceArgument(1, new Reference($config['limiter'])) - ->addTag('kernel.event_subscriber', ['dispatcher' => 'security.event_dispatcher.'.$firewallName]); - - return []; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RememberMeFactory.php deleted file mode 100644 index 735b087..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ /dev/null @@ -1,374 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider; -use Symfony\Bundle\SecurityBundle\RememberMe\DecoratedRememberMeHandler; -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\Security\Core\Authentication\RememberMe\CacheTokenVerifier; -use Symfony\Component\Security\Http\EventListener\RememberMeLogoutListener; - -/** - * @internal - */ -class RememberMeFactory implements SecurityFactoryInterface, AuthenticatorFactoryInterface, PrependExtensionInterface -{ - public const PRIORITY = -50; - - protected $options = [ - 'name' => 'REMEMBERME', - 'lifetime' => 31536000, - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => true, - 'samesite' => null, - 'always_remember_me' => false, - 'remember_me_parameter' => '_remember_me', - ]; - - public function create(ContainerBuilder $container, string $id, array $config, ?string $userProvider, ?string $defaultEntryPoint): array - { - // authentication provider - $authProviderId = 'security.authentication.provider.rememberme.'.$id; - $container - ->setDefinition($authProviderId, new ChildDefinition('security.authentication.provider.rememberme')) - ->replaceArgument(0, new Reference('security.user_checker.'.$id)) - ->addArgument($config['secret']) - ->addArgument($id) - ; - - // remember me services - $templateId = $this->generateRememberMeServicesTemplateId($config, $id); - $rememberMeServicesId = $templateId.'.'.$id; - - // attach to remember-me aware listeners - $userProviders = []; - foreach ($container->findTaggedServiceIds('security.remember_me_aware') as $serviceId => $attributes) { - foreach ($attributes as $attribute) { - if (!isset($attribute['id']) || $attribute['id'] !== $id) { - continue; - } - - if (!isset($attribute['provider'])) { - throw new \RuntimeException('Each "security.remember_me_aware" tag must have a provider attribute.'); - } - - // context listeners don't need a provider - if ('none' !== $attribute['provider']) { - $userProviders[] = new Reference($attribute['provider']); - } - - $container - ->getDefinition($serviceId) - ->addMethodCall('setRememberMeServices', [new Reference($rememberMeServicesId)]) - ; - } - } - - $this->createRememberMeServices($container, $id, $templateId, $userProviders, $config); - - // remember-me listener - $listenerId = 'security.authentication.listener.rememberme.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.rememberme')); - $listener->replaceArgument(1, new Reference($rememberMeServicesId)); - $listener->replaceArgument(5, $config['catch_exceptions']); - - // remember-me logout listener - $container->setDefinition('security.logout.listener.remember_me.'.$id, new Definition(RememberMeLogoutListener::class)) - ->addArgument(new Reference($rememberMeServicesId)) - ->addTag('kernel.event_subscriber', ['dispatcher' => 'security.event_dispatcher.'.$id]); - - return [$authProviderId, $listenerId, $defaultEntryPoint]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string - { - if (!$container->hasDefinition('security.authenticator.remember_me')) { - $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/../../Resources/config')); - $loader->load('security_authenticator_remember_me.php'); - } - - if ('auto' === $config['secure']) { - $config['secure'] = null; - } - - // create remember me handler (which manage the remember-me cookies) - $rememberMeHandlerId = 'security.authenticator.remember_me_handler.'.$firewallName; - if (isset($config['service']) && isset($config['token_provider'])) { - throw new InvalidConfigurationException(sprintf('You cannot use both "service" and "token_provider" in "security.firewalls.%s.remember_me".', $firewallName)); - } - - if (isset($config['service'])) { - $container->register($rememberMeHandlerId, DecoratedRememberMeHandler::class) - ->addArgument(new Reference($config['service'])) - ->addTag('security.remember_me_handler', ['firewall' => $firewallName]); - } elseif (isset($config['token_provider'])) { - $tokenProviderId = $this->createTokenProvider($container, $firewallName, $config['token_provider']); - $tokenVerifier = $this->createTokenVerifier($container, $firewallName, $config['token_verifier'] ?? null); - $container->setDefinition($rememberMeHandlerId, new ChildDefinition('security.authenticator.persistent_remember_me_handler')) - ->replaceArgument(0, new Reference($tokenProviderId)) - ->replaceArgument(1, $config['secret']) - ->replaceArgument(2, new Reference($userProviderId)) - ->replaceArgument(4, $config) - ->replaceArgument(6, $tokenVerifier) - ->addTag('security.remember_me_handler', ['firewall' => $firewallName]); - } else { - $signatureHasherId = 'security.authenticator.remember_me_signature_hasher.'.$firewallName; - $container->setDefinition($signatureHasherId, new ChildDefinition('security.authenticator.remember_me_signature_hasher')) - ->replaceArgument(1, $config['signature_properties']) - ->replaceArgument(2, $config['secret']) - ; - - $container->setDefinition($rememberMeHandlerId, new ChildDefinition('security.authenticator.signature_remember_me_handler')) - ->replaceArgument(0, new Reference($signatureHasherId)) - ->replaceArgument(1, new Reference($userProviderId)) - ->replaceArgument(3, $config) - ->addTag('security.remember_me_handler', ['firewall' => $firewallName]); - } - - // create check remember me conditions listener (which checks if a remember-me cookie is supported and requested) - $rememberMeConditionsListenerId = 'security.listener.check_remember_me_conditions.'.$firewallName; - $container->setDefinition($rememberMeConditionsListenerId, new ChildDefinition('security.listener.check_remember_me_conditions')) - ->replaceArgument(0, array_intersect_key($config, ['always_remember_me' => true, 'remember_me_parameter' => true])) - ->addTag('kernel.event_subscriber', ['dispatcher' => 'security.event_dispatcher.'.$firewallName]) - ; - - // create remember me listener (which executes the remember me services for other authenticators and logout) - $rememberMeListenerId = 'security.listener.remember_me.'.$firewallName; - $container->setDefinition($rememberMeListenerId, new ChildDefinition('security.listener.remember_me')) - ->replaceArgument(0, new Reference($rememberMeHandlerId)) - ->addTag('kernel.event_subscriber', ['dispatcher' => 'security.event_dispatcher.'.$firewallName]) - ; - - // create remember me authenticator (which re-authenticates the user based on the remember-me cookie) - $authenticatorId = 'security.authenticator.remember_me.'.$firewallName; - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.remember_me')) - ->replaceArgument(0, new Reference($rememberMeHandlerId)) - ->replaceArgument(3, $config['name'] ?? $this->options['name']) - ; - - foreach ($container->findTaggedServiceIds('security.remember_me_aware') as $serviceId => $attributes) { - // register ContextListener - if ('security.context_listener' === substr($serviceId, 0, 25)) { - continue; - } - - throw new \LogicException(sprintf('Symfony Authenticator Security dropped support for the "security.remember_me_aware" tag, service "%s" will no longer work as expected.', $serviceId)); - } - - return $authenticatorId; - } - - public function getPosition(): string - { - return 'remember_me'; - } - - /** - * {@inheritDoc} - */ - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getKey(): string - { - return 'remember-me'; - } - - public function addConfiguration(NodeDefinition $node) - { - $builder = $node - ->fixXmlConfig('user_provider') - ->children() - ; - - $builder - ->scalarNode('secret') - ->cannotBeEmpty() - ->defaultValue('%kernel.secret%') - ->end() - ->scalarNode('service')->end() - ->arrayNode('user_providers') - ->beforeNormalization() - ->ifString()->then(function ($v) { return [$v]; }) - ->end() - ->prototype('scalar')->end() - ->end() - ->booleanNode('catch_exceptions')->defaultTrue()->end() - ->arrayNode('signature_properties') - ->prototype('scalar')->end() - ->requiresAtLeastOneElement() - ->info('An array of properties on your User that are used to sign the remember-me cookie. If any of these change, all existing cookies will become invalid.') - ->example(['email', 'password']) - ->defaultValue(['password']) - ->end() - ->arrayNode('token_provider') - ->beforeNormalization() - ->ifString()->then(function ($v) { return ['service' => $v]; }) - ->end() - ->children() - ->scalarNode('service')->info('The service ID of a custom rememberme token provider.')->end() - ->arrayNode('doctrine') - ->canBeEnabled() - ->children() - ->scalarNode('connection')->defaultNull()->end() - ->end() - ->end() - ->end() - ->end() - ->scalarNode('token_verifier') - ->info('The service ID of a custom rememberme token verifier.') - ->end(); - - foreach ($this->options as $name => $value) { - if ('secure' === $name) { - $builder->enumNode($name)->values([true, false, 'auto'])->defaultValue('auto' === $value ? null : $value); - } elseif ('samesite' === $name) { - $builder->enumNode($name)->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultValue($value); - } elseif (\is_bool($value)) { - $builder->booleanNode($name)->defaultValue($value); - } elseif (\is_int($value)) { - $builder->integerNode($name)->defaultValue($value); - } else { - $builder->scalarNode($name)->defaultValue($value); - } - } - } - - private function generateRememberMeServicesTemplateId(array $config, string $id): string - { - if (isset($config['service'])) { - return $config['service']; - } - - if (isset($config['token_provider'])) { - return 'security.authentication.rememberme.services.persistent'; - } - - return 'security.authentication.rememberme.services.simplehash'; - } - - private function createRememberMeServices(ContainerBuilder $container, string $id, string $templateId, array $userProviders, array $config): void - { - $rememberMeServicesId = $templateId.'.'.$id; - - $rememberMeServices = $container->setDefinition($rememberMeServicesId, new ChildDefinition($templateId)); - $rememberMeServices->replaceArgument(1, $config['secret']); - $rememberMeServices->replaceArgument(2, $id); - - if (isset($config['token_provider'])) { - $tokenProviderId = $this->createTokenProvider($container, $id, $config['token_provider']); - $rememberMeServices->addMethodCall('setTokenProvider', [new Reference($tokenProviderId)]); - } - - // remember-me options - $mergedOptions = array_intersect_key($config, $this->options); - if ('auto' === $mergedOptions['secure']) { - $mergedOptions['secure'] = null; - } - - $rememberMeServices->replaceArgument(3, $mergedOptions); - - if ($config['user_providers']) { - $userProviders = []; - foreach ($config['user_providers'] as $providerName) { - $userProviders[] = new Reference('security.user.provider.concrete.'.$providerName); - } - } - - if (0 === \count($userProviders)) { - throw new \RuntimeException('You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.'); - } - - $rememberMeServices->replaceArgument(0, new IteratorArgument(array_unique($userProviders))); - } - - private function createTokenProvider(ContainerBuilder $container, string $firewallName, array $config): string - { - $tokenProviderId = $config['service'] ?? false; - if ($config['doctrine']['enabled'] ?? false) { - if (!class_exists(DoctrineTokenProvider::class)) { - throw new InvalidConfigurationException('Cannot use the "doctrine" token provider for "remember_me" because the Doctrine Bridge is not installed. Try running "composer require symfony/doctrine-bridge".'); - } - - if (null === $config['doctrine']['connection']) { - $connectionId = 'database_connection'; - } else { - $connectionId = 'doctrine.dbal.'.$config['doctrine']['connection'].'_connection'; - } - - $tokenProviderId = 'security.remember_me.doctrine_token_provider.'.$firewallName; - $container->register($tokenProviderId, DoctrineTokenProvider::class) - ->addArgument(new Reference($connectionId)); - } - - if (!$tokenProviderId) { - throw new InvalidConfigurationException(sprintf('No token provider was set for firewall "%s". Either configure a service ID or set "remember_me.token_provider.doctrine" to true.', $firewallName)); - } - - return $tokenProviderId; - } - - private function createTokenVerifier(ContainerBuilder $container, string $firewallName, ?string $serviceId): Reference - { - if ($serviceId) { - return new Reference($serviceId); - } - - $tokenVerifierId = 'security.remember_me.token_verifier.'.$firewallName; - - $container->register($tokenVerifierId, CacheTokenVerifier::class) - ->addArgument(new Reference('cache.security_token_verifier', ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ->addArgument(60) - ->addArgument('rememberme-'.$firewallName.'-stale-'); - - return new Reference($tokenVerifierId, ContainerInterface::NULL_ON_INVALID_REFERENCE); - } - - /** - * {@inheritdoc} - */ - public function prepend(ContainerBuilder $container) - { - $rememberMeSecureDefault = false; - $rememberMeSameSiteDefault = null; - - if (!isset($container->getExtensions()['framework'])) { - return; - } - - foreach ($container->getExtensionConfig('framework') as $config) { - if (isset($config['session']) && \is_array($config['session'])) { - $rememberMeSecureDefault = $config['session']['cookie_secure'] ?? $rememberMeSecureDefault; - $rememberMeSameSiteDefault = \array_key_exists('cookie_samesite', $config['session']) ? $config['session']['cookie_samesite'] : $rememberMeSameSiteDefault; - } - } - - $this->options['secure'] = $rememberMeSecureDefault; - $this->options['samesite'] = $rememberMeSameSiteDefault; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RemoteUserFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RemoteUserFactory.php deleted file mode 100644 index d32cffa..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/RemoteUserFactory.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * RemoteUserFactory creates services for REMOTE_USER based authentication. - * - * @author Fabien Potencier - * @author Maxime Douailin - * - * @internal - */ -class RemoteUserFactory implements SecurityFactoryInterface, AuthenticatorFactoryInterface -{ - public const PRIORITY = -10; - - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - $providerId = 'security.authentication.provider.pre_authenticated.'.$id; - $container - ->setDefinition($providerId, new ChildDefinition('security.authentication.provider.pre_authenticated')) - ->replaceArgument(0, new Reference($userProvider)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->addArgument($id) - ; - - $listenerId = 'security.authentication.listener.remote_user.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.remote_user')); - $listener->replaceArgument(2, $id); - $listener->replaceArgument(3, $config['user']); - $listener->addMethodCall('setSessionAuthenticationStrategy', [new Reference('security.authentication.session_strategy.'.$id)]); - - return [$providerId, $listenerId, $defaultEntryPoint]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId) - { - $authenticatorId = 'security.authenticator.remote_user.'.$firewallName; - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.remote_user')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(2, $firewallName) - ->replaceArgument(3, $config['user']) - ; - - return $authenticatorId; - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getPosition(): string - { - return 'pre_auth'; - } - - public function getKey(): string - { - return 'remote-user'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->children() - ->scalarNode('provider')->end() - ->scalarNode('user')->defaultValue('REMOTE_USER')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php deleted file mode 100644 index 4551a6c..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/SecurityFactoryInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * SecurityFactoryInterface is the interface for all security authentication listener. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use AuthenticatorFactoryInterface instead. - */ -interface SecurityFactoryInterface -{ - /** - * Configures the container services required to use the authentication listener. - * - * @return array containing three values: - * - the provider id - * - the listener id - * - the entry point id - */ - public function create(ContainerBuilder $container, string $id, array $config, string $userProviderId, ?string $defaultEntryPointId); - - /** - * Defines the position at which the provider is called. - * Possible values: pre_auth, form, http, and remember_me. - * - * @return string - */ - public function getPosition(); - - /** - * Defines the configuration key used to reference the provider - * in the firewall configuration. - * - * @return string - */ - public function getKey(); - - public function addConfiguration(NodeDefinition $builder); -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/X509Factory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/X509Factory.php deleted file mode 100644 index 269d369..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/Factory/X509Factory.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * X509Factory creates services for X509 certificate authentication. - * - * @author Fabien Potencier - * - * @internal - */ -class X509Factory implements SecurityFactoryInterface, AuthenticatorFactoryInterface -{ - public const PRIORITY = -10; - - public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint): array - { - $providerId = 'security.authentication.provider.pre_authenticated.'.$id; - $container - ->setDefinition($providerId, new ChildDefinition('security.authentication.provider.pre_authenticated')) - ->replaceArgument(0, new Reference($userProvider)) - ->replaceArgument(1, new Reference('security.user_checker.'.$id)) - ->addArgument($id) - ; - - // listener - $listenerId = 'security.authentication.listener.x509.'.$id; - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.x509')); - $listener->replaceArgument(2, $id); - $listener->replaceArgument(3, $config['user']); - $listener->replaceArgument(4, $config['credentials']); - $listener->addMethodCall('setSessionAuthenticationStrategy', [new Reference('security.authentication.session_strategy.'.$id)]); - - return [$providerId, $listenerId, $defaultEntryPoint]; - } - - public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId) - { - $authenticatorId = 'security.authenticator.x509.'.$firewallName; - $container - ->setDefinition($authenticatorId, new ChildDefinition('security.authenticator.x509')) - ->replaceArgument(0, new Reference($userProviderId)) - ->replaceArgument(2, $firewallName) - ->replaceArgument(3, $config['user']) - ->replaceArgument(4, $config['credentials']) - ; - - return $authenticatorId; - } - - public function getPriority(): int - { - return self::PRIORITY; - } - - public function getPosition(): string - { - return 'pre_auth'; - } - - public function getKey(): string - { - return 'x509'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->children() - ->scalarNode('provider')->end() - ->scalarNode('user')->defaultValue('SSL_CLIENT_S_DN_Email')->end() - ->scalarNode('credentials')->defaultValue('SSL_CLIENT_S_DN')->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php deleted file mode 100644 index ceb04e3..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Parameter; - -/** - * InMemoryFactory creates services for the memory provider. - * - * @author Fabien Potencier - * @author Christophe Coevoet - */ -class InMemoryFactory implements UserProviderFactoryInterface -{ - public function create(ContainerBuilder $container, string $id, array $config) - { - $definition = $container->setDefinition($id, new ChildDefinition('security.user.provider.in_memory')); - $defaultPassword = new Parameter('container.build_id'); - $users = []; - - foreach ($config['users'] as $username => $user) { - $users[$username] = ['password' => null !== $user['password'] ? (string) $user['password'] : $defaultPassword, 'roles' => $user['roles']]; - } - - $definition->addArgument($users); - } - - public function getKey() - { - return 'memory'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->fixXmlConfig('user') - ->children() - ->arrayNode('users') - ->useAttributeAsKey('identifier') - ->normalizeKeys(false) - ->beforeNormalization() - ->always() - ->then(function ($v) { - $deprecation = false; - foreach ($v as $i => $child) { - if (!isset($child['name'])) { - continue; - } - - $deprecation = true; - - $v[$i]['identifier'] = $child['name']; - unset($v[$i]['name']); - } - - if ($deprecation) { - trigger_deprecation('symfony/security-bundle', '5.3', 'The "in_memory.user.name" option is deprecated, use "identifier" instead.'); - } - - return $v; - }) - ->end() - ->prototype('array') - ->children() - ->scalarNode('password')->defaultNull()->end() - ->arrayNode('roles') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/LdapFactory.php b/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/LdapFactory.php deleted file mode 100644 index c2a3343..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/LdapFactory.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * LdapFactory creates services for Ldap user provider. - * - * @author Grégoire Pineau - * @author Charles Sarrazin - */ -class LdapFactory implements UserProviderFactoryInterface -{ - public function create(ContainerBuilder $container, string $id, array $config) - { - $container - ->setDefinition($id, new ChildDefinition('security.user.provider.ldap')) - ->replaceArgument(0, new Reference($config['service'])) - ->replaceArgument(1, $config['base_dn']) - ->replaceArgument(2, $config['search_dn']) - ->replaceArgument(3, $config['search_password']) - ->replaceArgument(4, $config['default_roles']) - ->replaceArgument(5, $config['uid_key']) - ->replaceArgument(6, $config['filter']) - ->replaceArgument(7, $config['password_attribute']) - ->replaceArgument(8, $config['extra_fields']) - ; - } - - public function getKey() - { - return 'ldap'; - } - - public function addConfiguration(NodeDefinition $node) - { - $node - ->fixXmlConfig('extra_field') - ->fixXmlConfig('default_role') - ->children() - ->scalarNode('service')->isRequired()->cannotBeEmpty()->defaultValue('ldap')->end() - ->scalarNode('base_dn')->isRequired()->cannotBeEmpty()->end() - ->scalarNode('search_dn')->defaultNull()->end() - ->scalarNode('search_password')->defaultNull()->end() - ->arrayNode('extra_fields') - ->prototype('scalar')->end() - ->end() - ->arrayNode('default_roles') - ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() - ->requiresAtLeastOneElement() - ->prototype('scalar')->end() - ->end() - ->scalarNode('uid_key')->defaultValue('sAMAccountName')->end() - ->scalarNode('filter')->defaultValue('({uid_key}={username})')->end() - ->scalarNode('password_attribute')->defaultNull()->end() - ->end() - ; - } -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php deleted file mode 100644 index 6d9481c..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * UserProviderFactoryInterface is the interface for all user provider factories. - * - * @author Fabien Potencier - * @author Christophe Coevoet - */ -interface UserProviderFactoryInterface -{ - public function create(ContainerBuilder $container, string $id, array $config); - - public function getKey(); - - public function addConfiguration(NodeDefinition $builder); -} diff --git a/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php b/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php deleted file mode 100644 index d64b2c3..0000000 --- a/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php +++ /dev/null @@ -1,1210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\DependencyInjection; - -use Composer\InstalledVersions; -use Symfony\Bridge\Twig\Extension\LogoutUrlExtension; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FirewallListenerFactoryInterface; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\UserProviderFactoryInterface; -use Symfony\Bundle\SecurityBundle\Security\LegacyLogoutHandlerListener; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher; -use Symfony\Component\PasswordHasher\Hasher\Pbkdf2PasswordHasher; -use Symfony\Component\PasswordHasher\Hasher\PlaintextPasswordHasher; -use Symfony\Component\PasswordHasher\Hasher\SodiumPasswordHasher; -use Symfony\Component\Security\Core\Authorization\Strategy\AffirmativeStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\ConsensusStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\PriorityStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\UnanimousStrategy; -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; -use Symfony\Component\Security\Core\Encoder\NativePasswordEncoder; -use Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder; -use Symfony\Component\Security\Core\User\ChainUserProvider; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; - -/** - * SecurityExtension. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class SecurityExtension extends Extension implements PrependExtensionInterface -{ - private $requestMatchers = []; - private $expressions = []; - private $contextListeners = []; - /** @var list */ - private $factories = []; - /** @var list */ - private $sortedFactories = []; - private $userProviderFactories = []; - private $statelessFirewallKeys = []; - - private $authenticatorManagerEnabled = false; - - public function prepend(ContainerBuilder $container) - { - foreach ($this->getSortedFactories() as $factory) { - if ($factory instanceof PrependExtensionInterface) { - $factory->prepend($container); - } - } - } - - public function load(array $configs, ContainerBuilder $container) - { - if (!class_exists(InstalledVersions::class)) { - trigger_deprecation('symfony/security-bundle', '5.4', 'Configuring Symfony without the Composer Runtime API is deprecated. Consider upgrading to Composer 2.1 or later.'); - } - - if (!array_filter($configs)) { - return; - } - - $mainConfig = $this->getConfiguration($configs, $container); - - $config = $this->processConfiguration($mainConfig, $configs); - - // load services - $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); - - $loader->load('security.php'); - $loader->load('password_hasher.php'); - $loader->load('security_listeners.php'); - $loader->load('security_rememberme.php'); - - if ($this->authenticatorManagerEnabled = $config['enable_authenticator_manager']) { - if ($config['always_authenticate_before_granting']) { - throw new InvalidConfigurationException('The security option "always_authenticate_before_granting" cannot be used when "enable_authenticator_manager" is set to true. If you rely on this behavior, set it to false.'); - } - - $loader->load('security_authenticator.php'); - - // The authenticator system no longer has anonymous tokens. This makes sure AccessListener - // and AuthorizationChecker do not throw AuthenticationCredentialsNotFoundException when no - // token is available in the token storage. - $container->getDefinition('security.access_listener')->setArgument(3, false); - $container->getDefinition('security.authorization_checker')->setArgument(3, false); - $container->getDefinition('security.authorization_checker')->setArgument(4, false); - } else { - trigger_deprecation('symfony/security-bundle', '5.3', 'Not setting the "security.enable_authenticator_manager" config option to true is deprecated.'); - - if ($config['always_authenticate_before_granting']) { - $authorizationChecker = $container->getDefinition('security.authorization_checker'); - $authorizationCheckerArgs = $authorizationChecker->getArguments(); - array_splice($authorizationCheckerArgs, 1, 0, [new Reference('security.authentication.manager')]); - $authorizationChecker->setArguments($authorizationCheckerArgs); - } - - $loader->load('security_legacy.php'); - } - - if ($container::willBeAvailable('symfony/twig-bridge', LogoutUrlExtension::class, ['symfony/security-bundle'], true)) { - $loader->load('templating_twig.php'); - } - - $loader->load('collectors.php'); - $loader->load('guard.php'); - - $container->getDefinition('data_collector.security')->addArgument($this->authenticatorManagerEnabled); - - if ($container->hasParameter('kernel.debug') && $container->getParameter('kernel.debug')) { - $loader->load('security_debug.php'); - } - - if (!$container::willBeAvailable('symfony/expression-language', ExpressionLanguage::class, ['symfony/security-bundle'], true)) { - $container->removeDefinition('security.expression_language'); - $container->removeDefinition('security.access.expression_voter'); - } - - // set some global scalars - $container->setParameter('security.access.denied_url', $config['access_denied_url']); - $container->setParameter('security.authentication.manager.erase_credentials', $config['erase_credentials']); - $container->setParameter('security.authentication.session_strategy.strategy', $config['session_fixation_strategy']); - - if (isset($config['access_decision_manager']['service'])) { - $container->setAlias('security.access.decision_manager', $config['access_decision_manager']['service']); - } elseif (isset($config['access_decision_manager']['strategy_service'])) { - $container - ->getDefinition('security.access.decision_manager') - ->addArgument(new Reference($config['access_decision_manager']['strategy_service'])); - } else { - $container - ->getDefinition('security.access.decision_manager') - ->addArgument($this->createStrategyDefinition( - $config['access_decision_manager']['strategy'] ?? MainConfiguration::STRATEGY_AFFIRMATIVE, - $config['access_decision_manager']['allow_if_all_abstain'], - $config['access_decision_manager']['allow_if_equal_granted_denied'] - )); - } - - $container->setParameter('security.access.always_authenticate_before_granting', $config['always_authenticate_before_granting']); - $container->setParameter('security.authentication.hide_user_not_found', $config['hide_user_not_found']); - - if (class_exists(Application::class)) { - $loader->load('debug_console.php'); - $debugCommand = $container->getDefinition('security.command.debug_firewall'); - $debugCommand->replaceArgument(4, $this->authenticatorManagerEnabled); - } - - $this->createFirewalls($config, $container); - $this->createAuthorization($config, $container); - $this->createRoleHierarchy($config, $container); - - $container->getDefinition('security.authentication.guard_handler') - ->replaceArgument(2, $this->statelessFirewallKeys); - - // @deprecated since Symfony 5.3 - if ($config['encoders']) { - $this->createEncoders($config['encoders'], $container); - } - - if ($config['password_hashers']) { - $this->createHashers($config['password_hashers'], $container); - } - - if (class_exists(Application::class)) { - $loader->load('console.php'); - - // @deprecated since Symfony 5.3 - $container->getDefinition('security.command.user_password_encoder')->replaceArgument(1, array_keys($config['encoders'])); - - $container->getDefinition('security.command.user_password_hash')->replaceArgument(1, array_keys($config['password_hashers'])); - } - - $container->registerForAutoconfiguration(VoterInterface::class) - ->addTag('security.voter'); - } - - /** - * @throws \InvalidArgumentException if the $strategy is invalid - */ - private function createStrategyDefinition(string $strategy, bool $allowIfAllAbstainDecisions, bool $allowIfEqualGrantedDeniedDecisions): Definition - { - switch ($strategy) { - case MainConfiguration::STRATEGY_AFFIRMATIVE: - return new Definition(AffirmativeStrategy::class, [$allowIfAllAbstainDecisions]); - case MainConfiguration::STRATEGY_CONSENSUS: - return new Definition(ConsensusStrategy::class, [$allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions]); - case MainConfiguration::STRATEGY_UNANIMOUS: - return new Definition(UnanimousStrategy::class, [$allowIfAllAbstainDecisions]); - case MainConfiguration::STRATEGY_PRIORITY: - return new Definition(PriorityStrategy::class, [$allowIfAllAbstainDecisions]); - } - - throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy)); - } - - private function createRoleHierarchy(array $config, ContainerBuilder $container) - { - if (!isset($config['role_hierarchy']) || 0 === \count($config['role_hierarchy'])) { - $container->removeDefinition('security.access.role_hierarchy_voter'); - - return; - } - - $container->setParameter('security.role_hierarchy.roles', $config['role_hierarchy']); - $container->removeDefinition('security.access.simple_role_voter'); - } - - private function createAuthorization(array $config, ContainerBuilder $container) - { - foreach ($config['access_control'] as $access) { - $matcher = $this->createRequestMatcher( - $container, - $access['path'], - $access['host'], - $access['port'], - $access['methods'], - $access['ips'] - ); - - $attributes = $access['roles']; - if ($access['allow_if']) { - $attributes[] = $this->createExpression($container, $access['allow_if']); - } - - $emptyAccess = 0 === \count(array_filter($access)); - - if ($emptyAccess) { - throw new InvalidConfigurationException('One or more access control items are empty. Did you accidentally add lines only containing a "-" under "security.access_control"?'); - } - - $container->getDefinition('security.access_map') - ->addMethodCall('add', [$matcher, $attributes, $access['requires_channel']]); - } - - // allow cache warm-up for expressions - if (\count($this->expressions)) { - $container->getDefinition('security.cache_warmer.expression') - ->replaceArgument(0, new IteratorArgument(array_values($this->expressions))); - } else { - $container->removeDefinition('security.cache_warmer.expression'); - } - } - - private function createFirewalls(array $config, ContainerBuilder $container) - { - if (!isset($config['firewalls'])) { - return; - } - - $firewalls = $config['firewalls']; - $providerIds = $this->createUserProviders($config, $container); - - $container->setParameter('security.firewalls', array_keys($firewalls)); - - // make the ContextListener aware of the configured user providers - $contextListenerDefinition = $container->getDefinition('security.context_listener'); - $arguments = $contextListenerDefinition->getArguments(); - $userProviders = []; - foreach ($providerIds as $userProviderId) { - $userProviders[] = new Reference($userProviderId); - } - $arguments[1] = $userProviderIteratorsArgument = new IteratorArgument($userProviders); - $contextListenerDefinition->setArguments($arguments); - $nbUserProviders = \count($userProviders); - - if ($nbUserProviders > 1) { - $container->setDefinition('security.user_providers', new Definition(ChainUserProvider::class, [$userProviderIteratorsArgument])) - ->setPublic(false); - } elseif (0 === $nbUserProviders) { - $container->removeDefinition('security.listener.user_provider'); - } else { - $container->setAlias('security.user_providers', new Alias(current($providerIds)))->setPublic(false); - } - - if (1 === \count($providerIds)) { - $container->setAlias(UserProviderInterface::class, current($providerIds)); - } - - $customUserChecker = false; - - // load firewall map - $mapDef = $container->getDefinition('security.firewall.map'); - $map = $authenticationProviders = $contextRefs = []; - foreach ($firewalls as $name => $firewall) { - if (isset($firewall['user_checker']) && 'security.user_checker' !== $firewall['user_checker']) { - $customUserChecker = true; - } - - $configId = 'security.firewall.map.config.'.$name; - - [$matcher, $listeners, $exceptionListener, $logoutListener] = $this->createFirewall($container, $name, $firewall, $authenticationProviders, $providerIds, $configId); - - $contextId = 'security.firewall.map.context.'.$name; - $isLazy = !$firewall['stateless'] && (!empty($firewall['anonymous']['lazy']) || $firewall['lazy']); - $context = new ChildDefinition($isLazy ? 'security.firewall.lazy_context' : 'security.firewall.context'); - $context = $container->setDefinition($contextId, $context); - $context - ->replaceArgument(0, new IteratorArgument($listeners)) - ->replaceArgument(1, $exceptionListener) - ->replaceArgument(2, $logoutListener) - ->replaceArgument(3, new Reference($configId)) - ; - - $contextRefs[$contextId] = new Reference($contextId); - $map[$contextId] = $matcher; - } - - $container->setAlias('security.firewall.context_locator', (string) ServiceLocatorTagPass::register($container, $contextRefs)); - - $mapDef->replaceArgument(0, new Reference('security.firewall.context_locator')); - $mapDef->replaceArgument(1, new IteratorArgument($map)); - - if (!$this->authenticatorManagerEnabled) { - // add authentication providers to authentication manager - $authenticationProviders = array_map(function ($id) { - return new Reference($id); - }, array_values(array_unique($authenticationProviders))); - - $container - ->getDefinition('security.authentication.manager') - ->replaceArgument(0, new IteratorArgument($authenticationProviders)); - } - - // register an autowire alias for the UserCheckerInterface if no custom user checker service is configured - if (!$customUserChecker) { - $container->setAlias('Symfony\Component\Security\Core\User\UserCheckerInterface', new Alias('security.user_checker', false)); - } - } - - private function createFirewall(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, array $providerIds, string $configId) - { - $config = $container->setDefinition($configId, new ChildDefinition('security.firewall.config')); - $config->replaceArgument(0, $id); - $config->replaceArgument(1, $firewall['user_checker']); - - // Matcher - $matcher = null; - if (isset($firewall['request_matcher'])) { - $matcher = new Reference($firewall['request_matcher']); - } elseif (isset($firewall['pattern']) || isset($firewall['host'])) { - $pattern = $firewall['pattern'] ?? null; - $host = $firewall['host'] ?? null; - $methods = $firewall['methods'] ?? []; - $matcher = $this->createRequestMatcher($container, $pattern, $host, null, $methods); - } - - $config->replaceArgument(2, $matcher ? (string) $matcher : null); - $config->replaceArgument(3, $firewall['security']); - - // Security disabled? - if (false === $firewall['security']) { - return [$matcher, [], null, null]; - } - - $config->replaceArgument(4, $firewall['stateless']); - - $firewallEventDispatcherId = 'security.event_dispatcher.'.$id; - - // Provider id (must be configured explicitly per firewall/authenticator if more than one provider is set) - $defaultProvider = null; - if (isset($firewall['provider'])) { - if (!isset($providerIds[$normalizedName = str_replace('-', '_', $firewall['provider'])])) { - throw new InvalidConfigurationException(sprintf('Invalid firewall "%s": user provider "%s" not found.', $id, $firewall['provider'])); - } - $defaultProvider = $providerIds[$normalizedName]; - - if ($this->authenticatorManagerEnabled) { - $container->setDefinition('security.listener.'.$id.'.user_provider', new ChildDefinition('security.listener.user_provider.abstract')) - ->addTag('kernel.event_listener', ['dispatcher' => $firewallEventDispatcherId, 'event' => CheckPassportEvent::class, 'priority' => 2048, 'method' => 'checkPassport']) - ->replaceArgument(0, new Reference($defaultProvider)); - } - } elseif (1 === \count($providerIds)) { - $defaultProvider = reset($providerIds); - } - - $config->replaceArgument(5, $defaultProvider); - - // Register Firewall-specific event dispatcher - $container->register($firewallEventDispatcherId, EventDispatcher::class) - ->addTag('event_dispatcher.dispatcher', ['name' => $firewallEventDispatcherId]); - - // Register listeners - $listeners = []; - $listenerKeys = []; - - // Channel listener - $listeners[] = new Reference('security.channel_listener'); - - $contextKey = null; - $contextListenerId = null; - // Context serializer listener - if (false === $firewall['stateless']) { - $contextKey = $firewall['context'] ?? $id; - $listeners[] = new Reference($contextListenerId = $this->createContextListener($container, $contextKey, $this->authenticatorManagerEnabled ? $firewallEventDispatcherId : null)); - $sessionStrategyId = 'security.authentication.session_strategy'; - - if ($this->authenticatorManagerEnabled) { - $container - ->setDefinition('security.listener.session.'.$id, new ChildDefinition('security.listener.session')) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } - } else { - $this->statelessFirewallKeys[] = $id; - $sessionStrategyId = 'security.authentication.session_strategy_noop'; - } - $container->setAlias(new Alias('security.authentication.session_strategy.'.$id, false), $sessionStrategyId); - - $config->replaceArgument(6, $contextKey); - - // Logout listener - $logoutListenerId = null; - if (isset($firewall['logout'])) { - $logoutListenerId = 'security.logout_listener.'.$id; - $logoutListener = $container->setDefinition($logoutListenerId, new ChildDefinition('security.logout_listener')); - $logoutListener->replaceArgument(2, new Reference($firewallEventDispatcherId)); - $logoutListener->replaceArgument(3, [ - 'csrf_parameter' => $firewall['logout']['csrf_parameter'], - 'csrf_token_id' => $firewall['logout']['csrf_token_id'], - 'logout_path' => $firewall['logout']['path'], - ]); - - // add default logout listener - if (isset($firewall['logout']['success_handler'])) { - // deprecated, to be removed in Symfony 6.0 - $logoutSuccessHandlerId = $firewall['logout']['success_handler']; - $container->register('security.logout.listener.legacy_success_listener.'.$id, LegacyLogoutHandlerListener::class) - ->setArguments([new Reference($logoutSuccessHandlerId)]) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } else { - $logoutSuccessListenerId = 'security.logout.listener.default.'.$id; - $container->setDefinition($logoutSuccessListenerId, new ChildDefinition('security.logout.listener.default')) - ->replaceArgument(1, $firewall['logout']['target']) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } - - // add CSRF provider - if (isset($firewall['logout']['csrf_token_generator'])) { - $logoutListener->addArgument(new Reference($firewall['logout']['csrf_token_generator'])); - } - - // add session logout listener - if (true === $firewall['logout']['invalidate_session'] && false === $firewall['stateless']) { - $container->setDefinition('security.logout.listener.session.'.$id, new ChildDefinition('security.logout.listener.session')) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } - - // add cookie logout listener - if (\count($firewall['logout']['delete_cookies']) > 0) { - $container->setDefinition('security.logout.listener.cookie_clearing.'.$id, new ChildDefinition('security.logout.listener.cookie_clearing')) - ->addArgument($firewall['logout']['delete_cookies']) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } - - // add custom listeners (deprecated) - foreach ($firewall['logout']['handlers'] as $i => $handlerId) { - $container->register('security.logout.listener.legacy_handler.'.$i, LegacyLogoutHandlerListener::class) - ->addArgument(new Reference($handlerId)) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - } - - // register with LogoutUrlGenerator - $container - ->getDefinition('security.logout_url_generator') - ->addMethodCall('registerListener', [ - $id, - $firewall['logout']['path'], - $firewall['logout']['csrf_token_id'], - $firewall['logout']['csrf_parameter'], - isset($firewall['logout']['csrf_token_generator']) ? new Reference($firewall['logout']['csrf_token_generator']) : null, - false === $firewall['stateless'] && isset($firewall['context']) ? $firewall['context'] : null, - ]) - ; - } - - // Determine default entry point - $configuredEntryPoint = $firewall['entry_point'] ?? null; - - // Authentication listeners - $firewallAuthenticationProviders = []; - [$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint, $contextListenerId); - - if (!$this->authenticatorManagerEnabled) { - $authenticationProviders = array_merge($authenticationProviders, $firewallAuthenticationProviders); - } else { - // $configuredEntryPoint is resolved into a service ID and stored in $defaultEntryPoint - $configuredEntryPoint = $defaultEntryPoint; - - // authenticator manager - $authenticators = array_map(function ($id) { - return new Reference($id); - }, $firewallAuthenticationProviders); - $container - ->setDefinition($managerId = 'security.authenticator.manager.'.$id, new ChildDefinition('security.authenticator.manager')) - ->replaceArgument(0, $authenticators) - ->replaceArgument(2, new Reference($firewallEventDispatcherId)) - ->replaceArgument(3, $id) - ->replaceArgument(7, $firewall['required_badges'] ?? []) - ->addTag('monolog.logger', ['channel' => 'security']) - ; - - $managerLocator = $container->getDefinition('security.authenticator.managers_locator'); - $managerLocator->replaceArgument(0, array_merge($managerLocator->getArgument(0), [$id => new ServiceClosureArgument(new Reference($managerId))])); - - // authenticator manager listener - $container - ->setDefinition('security.firewall.authenticator.'.$id, new ChildDefinition('security.firewall.authenticator')) - ->replaceArgument(0, new Reference($managerId)) - ; - - if ($container->hasDefinition('debug.security.firewall') && $this->authenticatorManagerEnabled) { - $container - ->register('debug.security.firewall.authenticator.'.$id, TraceableAuthenticatorManagerListener::class) - ->setDecoratedService('security.firewall.authenticator.'.$id) - ->setArguments([new Reference('debug.security.firewall.authenticator.'.$id.'.inner')]) - ; - } - - // user checker listener - $container - ->setDefinition('security.listener.user_checker.'.$id, new ChildDefinition('security.listener.user_checker')) - ->replaceArgument(0, new Reference('security.user_checker.'.$id)) - ->addTag('kernel.event_subscriber', ['dispatcher' => $firewallEventDispatcherId]); - - $listeners[] = new Reference('security.firewall.authenticator.'.$id); - - // Add authenticators to the debug:firewall command - if ($container->hasDefinition('security.command.debug_firewall')) { - $debugCommand = $container->getDefinition('security.command.debug_firewall'); - $debugCommand->replaceArgument(3, array_merge($debugCommand->getArgument(3), [$id => $authenticators])); - } - } - - $config->replaceArgument(7, $configuredEntryPoint ?: $defaultEntryPoint); - - $listeners = array_merge($listeners, $authListeners); - - // Switch user listener - if (isset($firewall['switch_user'])) { - $listenerKeys[] = 'switch_user'; - $listeners[] = new Reference($this->createSwitchUserListener($container, $id, $firewall['switch_user'], $defaultProvider, $firewall['stateless'])); - } - - // Access listener - $listeners[] = new Reference('security.access_listener'); - - // Exception listener - $exceptionListener = new Reference($this->createExceptionListener($container, $firewall, $id, $configuredEntryPoint ?: $defaultEntryPoint, $firewall['stateless'])); - - $config->replaceArgument(8, $firewall['access_denied_handler'] ?? null); - $config->replaceArgument(9, $firewall['access_denied_url'] ?? null); - - $container->setAlias('security.user_checker.'.$id, new Alias($firewall['user_checker'], false)); - - foreach ($this->getSortedFactories() as $factory) { - $key = str_replace('-', '_', $factory->getKey()); - if ('custom_authenticators' !== $key && \array_key_exists($key, $firewall)) { - $listenerKeys[] = $key; - } - } - - if ($firewall['custom_authenticators'] ?? false) { - foreach ($firewall['custom_authenticators'] as $customAuthenticatorId) { - $listenerKeys[] = $customAuthenticatorId; - } - } - - $config->replaceArgument(10, $listenerKeys); - $config->replaceArgument(11, $firewall['switch_user'] ?? null); - - return [$matcher, $listeners, $exceptionListener, null !== $logoutListenerId ? new Reference($logoutListenerId) : null]; - } - - private function createContextListener(ContainerBuilder $container, string $contextKey, ?string $firewallEventDispatcherId) - { - if (isset($this->contextListeners[$contextKey])) { - return $this->contextListeners[$contextKey]; - } - - $listenerId = 'security.context_listener.'.\count($this->contextListeners); - $listener = $container->setDefinition($listenerId, new ChildDefinition('security.context_listener')); - $listener->replaceArgument(2, $contextKey); - if (null !== $firewallEventDispatcherId) { - $listener->replaceArgument(4, new Reference($firewallEventDispatcherId)); - $listener->addTag('kernel.event_listener', ['event' => KernelEvents::RESPONSE, 'method' => 'onKernelResponse']); - } - - return $this->contextListeners[$contextKey] = $listenerId; - } - - private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint, string $contextListenerId = null) - { - $listeners = []; - $hasListeners = false; - $entryPoints = []; - - foreach ($this->getSortedFactories() as $factory) { - $key = str_replace('-', '_', $factory->getKey()); - - if (isset($firewall[$key])) { - $userProvider = $this->getUserProvider($container, $id, $firewall, $key, $defaultProvider, $providerIds, $contextListenerId); - - if ($this->authenticatorManagerEnabled) { - if (!$factory instanceof AuthenticatorFactoryInterface) { - throw new InvalidConfigurationException(sprintf('Cannot configure AuthenticatorManager as "%s" authentication does not support it, set "security.enable_authenticator_manager" to `false`.', $key)); - } - - $authenticators = $factory->createAuthenticator($container, $id, $firewall[$key], $userProvider); - if (\is_array($authenticators)) { - foreach ($authenticators as $authenticator) { - $authenticationProviders[] = $authenticator; - $entryPoints[] = $authenticator; - } - } else { - $authenticationProviders[] = $authenticators; - $entryPoints[$key] = $authenticators; - } - } else { - [$provider, $listenerId, $defaultEntryPoint] = $factory->create($container, $id, $firewall[$key], $userProvider, $defaultEntryPoint); - - $listeners[] = new Reference($listenerId); - $authenticationProviders[] = $provider; - } - - if ($factory instanceof FirewallListenerFactoryInterface) { - $firewallListenerIds = $factory->createListeners($container, $id, $firewall[$key]); - foreach ($firewallListenerIds as $firewallListenerId) { - $listeners[] = new Reference($firewallListenerId); - } - } - - $hasListeners = true; - } - } - - // the actual entry point is configured by the RegisterEntryPointPass - $container->setParameter('security.'.$id.'._indexed_authenticators', $entryPoints); - - if (false === $hasListeners && !$this->authenticatorManagerEnabled) { - throw new InvalidConfigurationException(sprintf('No authentication listener registered for firewall "%s".', $id)); - } - - return [$listeners, $defaultEntryPoint]; - } - - private function getUserProvider(ContainerBuilder $container, string $id, array $firewall, string $factoryKey, ?string $defaultProvider, array $providerIds, ?string $contextListenerId): string - { - if (isset($firewall[$factoryKey]['provider'])) { - if (!isset($providerIds[$normalizedName = str_replace('-', '_', $firewall[$factoryKey]['provider'])])) { - throw new InvalidConfigurationException(sprintf('Invalid firewall "%s": user provider "%s" not found.', $id, $firewall[$factoryKey]['provider'])); - } - - return $providerIds[$normalizedName]; - } - - if ('remember_me' === $factoryKey && $contextListenerId) { - $container->getDefinition($contextListenerId)->addTag('security.remember_me_aware', ['id' => $id, 'provider' => 'none']); - } - - if ($defaultProvider) { - return $defaultProvider; - } - - if (!$providerIds) { - $userProvider = sprintf('security.user.provider.missing.%s', $factoryKey); - $container->setDefinition( - $userProvider, - (new ChildDefinition('security.user.provider.missing'))->replaceArgument(0, $id) - ); - - return $userProvider; - } - - if ('remember_me' === $factoryKey || 'anonymous' === $factoryKey || 'custom_authenticators' === $factoryKey) { - if ('custom_authenticators' === $factoryKey) { - trigger_deprecation('symfony/security-bundle', '5.4', 'Not configuring explicitly the provider for the "%s" firewall is deprecated because it\'s ambiguous as there is more than one registered provider. Set the "provider" key to one of the configured providers, even if your custom authenticators don\'t use it.', $id); - } - - return 'security.user_providers'; - } - - throw new InvalidConfigurationException(sprintf('Not configuring explicitly the provider for the "%s" %s on "%s" firewall is ambiguous as there is more than one registered provider.', $factoryKey, $this->authenticatorManagerEnabled ? 'authenticator' : 'listener', $id)); - } - - private function createEncoders(array $encoders, ContainerBuilder $container) - { - $encoderMap = []; - foreach ($encoders as $class => $encoder) { - if (class_exists($class) && !is_a($class, PasswordAuthenticatedUserInterface::class, true)) { - trigger_deprecation('symfony/security-bundle', '5.3', 'Configuring an encoder for a user class that does not implement "%s" is deprecated, class "%s" should implement it.', PasswordAuthenticatedUserInterface::class, $class); - } - $encoderMap[$class] = $this->createEncoder($encoder); - } - - $container - ->getDefinition('security.encoder_factory.generic') - ->setArguments([$encoderMap]) - ; - } - - private function createEncoder(array $config) - { - // a custom encoder service - if (isset($config['id'])) { - return new Reference($config['id']); - } - - if ($config['migrate_from'] ?? false) { - return $config; - } - - // plaintext encoder - if ('plaintext' === $config['algorithm']) { - $arguments = [$config['ignore_case']]; - - return [ - 'class' => 'Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', - 'arguments' => $arguments, - ]; - } - - // pbkdf2 encoder - if ('pbkdf2' === $config['algorithm']) { - return [ - 'class' => 'Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder', - 'arguments' => [ - $config['hash_algorithm'], - $config['encode_as_base64'], - $config['iterations'], - $config['key_length'], - ], - ]; - } - - // bcrypt encoder - if ('bcrypt' === $config['algorithm']) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_BCRYPT; - - return $this->createEncoder($config); - } - - // Argon2i encoder - if ('argon2i' === $config['algorithm']) { - if (SodiumPasswordHasher::isSupported() && !\defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2I')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2I; - } else { - throw new InvalidConfigurationException(sprintf('Algorithm "argon2i" is not available. Use "%s" instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? 'argon2id", "auto' : 'auto')); - } - - return $this->createEncoder($config); - } - - if ('argon2id' === $config['algorithm']) { - if (($hasSodium = SodiumPasswordHasher::isSupported()) && \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2ID')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2ID; - } else { - throw new InvalidConfigurationException(sprintf('Algorithm "argon2id" is not available. Either use "%s", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? 'argon2i", "auto' : 'auto')); - } - - return $this->createEncoder($config); - } - - if ('native' === $config['algorithm']) { - return [ - 'class' => NativePasswordEncoder::class, - 'arguments' => [ - $config['time_cost'], - (($config['memory_cost'] ?? 0) << 10) ?: null, - $config['cost'], - ] + (isset($config['native_algorithm']) ? [3 => $config['native_algorithm']] : []), - ]; - } - - if ('sodium' === $config['algorithm']) { - if (!SodiumPasswordHasher::isSupported()) { - throw new InvalidConfigurationException('Libsodium is not available. Install the sodium extension or use "auto" instead.'); - } - - return [ - 'class' => SodiumPasswordEncoder::class, - 'arguments' => [ - $config['time_cost'], - (($config['memory_cost'] ?? 0) << 10) ?: null, - ], - ]; - } - - // run-time configured encoder - return $config; - } - - private function createHashers(array $hashers, ContainerBuilder $container) - { - $hasherMap = []; - foreach ($hashers as $class => $hasher) { - // @deprecated since Symfony 5.3, remove the check in 6.0 - if (class_exists($class) && !is_a($class, PasswordAuthenticatedUserInterface::class, true)) { - trigger_deprecation('symfony/security-bundle', '5.3', 'Configuring a password hasher for a user class that does not implement "%s" is deprecated, class "%s" should implement it.', PasswordAuthenticatedUserInterface::class, $class); - } - $hasherMap[$class] = $this->createHasher($hasher); - } - - $container - ->getDefinition('security.password_hasher_factory') - ->setArguments([$hasherMap]) - ; - } - - private function createHasher(array $config) - { - // a custom hasher service - if (isset($config['id'])) { - return new Reference($config['id']); - } - - if ($config['migrate_from'] ?? false) { - return $config; - } - - // plaintext hasher - if ('plaintext' === $config['algorithm']) { - $arguments = [$config['ignore_case']]; - - return [ - 'class' => PlaintextPasswordHasher::class, - 'arguments' => $arguments, - ]; - } - - // pbkdf2 hasher - if ('pbkdf2' === $config['algorithm']) { - return [ - 'class' => Pbkdf2PasswordHasher::class, - 'arguments' => [ - $config['hash_algorithm'], - $config['encode_as_base64'], - $config['iterations'], - $config['key_length'], - ], - ]; - } - - // bcrypt hasher - if ('bcrypt' === $config['algorithm']) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_BCRYPT; - - return $this->createHasher($config); - } - - // Argon2i hasher - if ('argon2i' === $config['algorithm']) { - if (SodiumPasswordHasher::isSupported() && !\defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2I')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2I; - } else { - throw new InvalidConfigurationException(sprintf('Algorithm "argon2i" is not available. Either use "%s" or upgrade to PHP 7.2+ instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? 'argon2id", "auto' : 'auto')); - } - - return $this->createHasher($config); - } - - if ('argon2id' === $config['algorithm']) { - if (($hasSodium = SodiumPasswordHasher::isSupported()) && \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2ID')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2ID; - } else { - throw new InvalidConfigurationException(sprintf('Algorithm "argon2id" is not available. Either use "%s", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? 'argon2i", "auto' : 'auto')); - } - - return $this->createHasher($config); - } - - if ('native' === $config['algorithm']) { - return [ - 'class' => NativePasswordHasher::class, - 'arguments' => [ - $config['time_cost'], - (($config['memory_cost'] ?? 0) << 10) ?: null, - $config['cost'], - ] + (isset($config['native_algorithm']) ? [3 => $config['native_algorithm']] : []), - ]; - } - - if ('sodium' === $config['algorithm']) { - if (!SodiumPasswordHasher::isSupported()) { - throw new InvalidConfigurationException('Libsodium is not available. Install the sodium extension or use "auto" instead.'); - } - - return [ - 'class' => SodiumPasswordHasher::class, - 'arguments' => [ - $config['time_cost'], - (($config['memory_cost'] ?? 0) << 10) ?: null, - ], - ]; - } - - // run-time configured hasher - return $config; - } - - // Parses user providers and returns an array of their ids - private function createUserProviders(array $config, ContainerBuilder $container): array - { - $providerIds = []; - foreach ($config['providers'] as $name => $provider) { - $id = $this->createUserDaoProvider($name, $provider, $container); - $providerIds[str_replace('-', '_', $name)] = $id; - } - - return $providerIds; - } - - // Parses a tag and returns the id for the related user provider service - private function createUserDaoProvider(string $name, array $provider, ContainerBuilder $container): string - { - $name = $this->getUserProviderId($name); - - // Doctrine Entity and In-memory DAO provider are managed by factories - foreach ($this->userProviderFactories as $factory) { - $key = str_replace('-', '_', $factory->getKey()); - - if (!empty($provider[$key])) { - $factory->create($container, $name, $provider[$key]); - - return $name; - } - } - - // Existing DAO service provider - if (isset($provider['id'])) { - $container->setAlias($name, new Alias($provider['id'], false)); - - return $provider['id']; - } - - // Chain provider - if (isset($provider['chain'])) { - $providers = []; - foreach ($provider['chain']['providers'] as $providerName) { - $providers[] = new Reference($this->getUserProviderId($providerName)); - } - - $container - ->setDefinition($name, new ChildDefinition('security.user.provider.chain')) - ->addArgument(new IteratorArgument($providers)); - - return $name; - } - - throw new InvalidConfigurationException(sprintf('Unable to create definition for "%s" user provider.', $name)); - } - - private function getUserProviderId(string $name): string - { - return 'security.user.provider.concrete.'.strtolower($name); - } - - private function createExceptionListener(ContainerBuilder $container, array $config, string $id, ?string $defaultEntryPoint, bool $stateless): string - { - $exceptionListenerId = 'security.exception_listener.'.$id; - $listener = $container->setDefinition($exceptionListenerId, new ChildDefinition('security.exception_listener')); - $listener->replaceArgument(3, $id); - $listener->replaceArgument(4, null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint)); - $listener->replaceArgument(8, $stateless); - - // access denied handler setup - if (isset($config['access_denied_handler'])) { - $listener->replaceArgument(6, new Reference($config['access_denied_handler'])); - } elseif (isset($config['access_denied_url'])) { - $listener->replaceArgument(5, $config['access_denied_url']); - } - - return $exceptionListenerId; - } - - private function createSwitchUserListener(ContainerBuilder $container, string $id, array $config, ?string $defaultProvider, bool $stateless): string - { - $userProvider = isset($config['provider']) ? $this->getUserProviderId($config['provider']) : $defaultProvider; - - if (!$userProvider) { - throw new InvalidConfigurationException(sprintf('Not configuring explicitly the provider for the "switch_user" listener on "%s" firewall is ambiguous as there is more than one registered provider.', $id)); - } - - $switchUserListenerId = 'security.authentication.switchuser_listener.'.$id; - $listener = $container->setDefinition($switchUserListenerId, new ChildDefinition('security.authentication.switchuser_listener')); - $listener->replaceArgument(1, new Reference($userProvider)); - $listener->replaceArgument(2, new Reference('security.user_checker.'.$id)); - $listener->replaceArgument(3, $id); - $listener->replaceArgument(6, $config['parameter']); - $listener->replaceArgument(7, $config['role']); - $listener->replaceArgument(9, $stateless); - - return $switchUserListenerId; - } - - private function createExpression(ContainerBuilder $container, string $expression): Reference - { - if (isset($this->expressions[$id = '.security.expression.'.ContainerBuilder::hash($expression)])) { - return $this->expressions[$id]; - } - - if (!$container::willBeAvailable('symfony/expression-language', ExpressionLanguage::class, ['symfony/security-bundle'], true)) { - throw new \RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - - $container - ->register($id, 'Symfony\Component\ExpressionLanguage\Expression') - ->setPublic(false) - ->addArgument($expression) - ; - - return $this->expressions[$id] = new Reference($id); - } - - private function createRequestMatcher(ContainerBuilder $container, string $path = null, string $host = null, int $port = null, array $methods = [], array $ips = null, array $attributes = []): Reference - { - if ($methods) { - $methods = array_map('strtoupper', $methods); - } - - if (null !== $ips) { - foreach ($ips as $ip) { - $container->resolveEnvPlaceholders($ip, null, $usedEnvs); - - if (!$usedEnvs && !$this->isValidIps($ip)) { - throw new \LogicException(sprintf('The given value "%s" in the "security.access_control" config option is not a valid IP address.', $ip)); - } - - $usedEnvs = null; - } - } - - $id = '.security.request_matcher.'.ContainerBuilder::hash([$path, $host, $port, $methods, $ips, $attributes]); - - if (isset($this->requestMatchers[$id])) { - return $this->requestMatchers[$id]; - } - - // only add arguments that are necessary - $arguments = [$path, $host, $methods, $ips, $attributes, null, $port]; - while (\count($arguments) > 0 && !end($arguments)) { - array_pop($arguments); - } - - $container - ->register($id, 'Symfony\Component\HttpFoundation\RequestMatcher') - ->setPublic(false) - ->setArguments($arguments) - ; - - return $this->requestMatchers[$id] = new Reference($id); - } - - /** - * @deprecated since Symfony 5.4, use "addAuthenticatorFactory()" instead - */ - public function addSecurityListenerFactory(SecurityFactoryInterface $factory) - { - trigger_deprecation('symfony/security-bundle', '5.4', 'Method "%s()" is deprecated, use "addAuthenticatorFactory()" instead.', __METHOD__); - - $this->factories[] = [[ - 'pre_auth' => -10, - 'form' => -30, - 'http' => -40, - 'remember_me' => -50, - 'anonymous' => -60, - ][$factory->getPosition()], $factory]; - $this->sortedFactories = []; - } - - public function addAuthenticatorFactory(AuthenticatorFactoryInterface $factory) - { - $this->factories[] = [method_exists($factory, 'getPriority') ? $factory->getPriority() : 0, $factory]; - $this->sortedFactories = []; - } - - public function addUserProviderFactory(UserProviderFactoryInterface $factory) - { - $this->userProviderFactories[] = $factory; - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return __DIR__.'/../Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/security'; - } - - public function getConfiguration(array $config, ContainerBuilder $container) - { - // first assemble the factories - return new MainConfiguration($this->getSortedFactories(), $this->userProviderFactories); - } - - private function isValidIps($ips): bool - { - $ipsList = array_reduce((array) $ips, static function (array $ips, string $ip) { - return array_merge($ips, preg_split('/\s*,\s*/', $ip)); - }, []); - - if (!$ipsList) { - return false; - } - - foreach ($ipsList as $cidr) { - if (!$this->isValidIp($cidr)) { - return false; - } - } - - return true; - } - - private function isValidIp(string $cidr): bool - { - $cidrParts = explode('/', $cidr); - - if (1 === \count($cidrParts)) { - return false !== filter_var($cidrParts[0], \FILTER_VALIDATE_IP); - } - - $ip = $cidrParts[0]; - $netmask = $cidrParts[1]; - - if (!ctype_digit($netmask)) { - return false; - } - - if (filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - return $netmask <= 32; - } - - if (filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return $netmask <= 128; - } - - return false; - } - - /** - * @return array - */ - private function getSortedFactories(): array - { - if (!$this->sortedFactories) { - $factories = []; - foreach ($this->factories as $i => $factory) { - $factories[] = array_merge($factory, [$i]); - } - - usort($factories, function ($a, $b) { - return $b[0] <=> $a[0] ?: $a[2] <=> $b[2]; - }); - - $this->sortedFactories = array_column($factories, 1); - } - - return $this->sortedFactories; - } -} diff --git a/vendor/symfony/security-bundle/EventListener/FirewallListener.php b/vendor/symfony/security-bundle/EventListener/FirewallListener.php deleted file mode 100644 index ca3931a..0000000 --- a/vendor/symfony/security-bundle/EventListener/FirewallListener.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\EventListener; - -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Security\Http\Firewall; -use Symfony\Component\Security\Http\FirewallMapInterface; -use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * @author Maxime Steinhausser - */ -class FirewallListener extends Firewall -{ - private $map; - private $logoutUrlGenerator; - - public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher, LogoutUrlGenerator $logoutUrlGenerator) - { - $this->map = $map; - $this->logoutUrlGenerator = $logoutUrlGenerator; - - parent::__construct($map, $dispatcher); - } - - public function configureLogoutUrlGenerator(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - if ($this->map instanceof FirewallMap && $config = $this->map->getFirewallConfig($event->getRequest())) { - $this->logoutUrlGenerator->setCurrentFirewall($config->getName(), $config->getContext()); - } - } - - public function onKernelFinishRequest(FinishRequestEvent $event) - { - if ($event->isMainRequest()) { - $this->logoutUrlGenerator->setCurrentFirewall(null); - } - - parent::onKernelFinishRequest($event); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - KernelEvents::REQUEST => [ - ['configureLogoutUrlGenerator', 8], - ['onKernelRequest', 8], - ], - KernelEvents::FINISH_REQUEST => 'onKernelFinishRequest', - ]; - } -} diff --git a/vendor/symfony/security-bundle/EventListener/VoteListener.php b/vendor/symfony/security-bundle/EventListener/VoteListener.php deleted file mode 100644 index 1b37d92..0000000 --- a/vendor/symfony/security-bundle/EventListener/VoteListener.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager; -use Symfony\Component\Security\Core\Event\VoteEvent; - -/** - * Listen to vote events from traceable voters. - * - * @author Laurent VOULLEMIER - * - * @internal - */ -class VoteListener implements EventSubscriberInterface -{ - private $traceableAccessDecisionManager; - - public function __construct(TraceableAccessDecisionManager $traceableAccessDecisionManager) - { - $this->traceableAccessDecisionManager = $traceableAccessDecisionManager; - } - - /** - * Event dispatched by a voter during access manager decision. - */ - public function onVoterVote(VoteEvent $event) - { - $this->traceableAccessDecisionManager->addVoterVote($event->getVoter(), $event->getAttributes(), $event->getVote()); - } - - public static function getSubscribedEvents(): array - { - return ['debug.security.authorization.vote' => 'onVoterVote']; - } -} diff --git a/vendor/symfony/security-bundle/LICENSE b/vendor/symfony/security-bundle/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/security-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/security-bundle/LoginLink/FirewallAwareLoginLinkHandler.php b/vendor/symfony/security-bundle/LoginLink/FirewallAwareLoginLinkHandler.php deleted file mode 100644 index 5c61cfc..0000000 --- a/vendor/symfony/security-bundle/LoginLink/FirewallAwareLoginLinkHandler.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\LoginLink; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\SecurityBundle\Security\FirewallAwareTrait; -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\LoginLink\LoginLinkDetails; -use Symfony\Component\Security\Http\LoginLink\LoginLinkHandlerInterface; - -/** - * Decorates the login link handler for the current firewall. - * - * @author Ryan Weaver - */ -class FirewallAwareLoginLinkHandler implements LoginLinkHandlerInterface -{ - use FirewallAwareTrait; - - private const FIREWALL_OPTION = 'login_link'; - - public function __construct(FirewallMap $firewallMap, ContainerInterface $loginLinkHandlerLocator, RequestStack $requestStack) - { - $this->firewallMap = $firewallMap; - $this->locator = $loginLinkHandlerLocator; - $this->requestStack = $requestStack; - } - - public function createLoginLink(UserInterface $user, Request $request = null): LoginLinkDetails - { - return $this->getForFirewall()->createLoginLink($user, $request); - } - - public function consumeLoginLink(Request $request): UserInterface - { - return $this->getForFirewall()->consumeLoginLink($request); - } -} diff --git a/vendor/symfony/security-bundle/README.md b/vendor/symfony/security-bundle/README.md deleted file mode 100644 index 63b502f..0000000 --- a/vendor/symfony/security-bundle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -SecurityBundle -============== - -SecurityBundle provides a tight integration of the Security component into the -Symfony full-stack framework. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/security-bundle/RememberMe/DecoratedRememberMeHandler.php b/vendor/symfony/security-bundle/RememberMe/DecoratedRememberMeHandler.php deleted file mode 100644 index a060fb5..0000000 --- a/vendor/symfony/security-bundle/RememberMe/DecoratedRememberMeHandler.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\RememberMe; - -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\RememberMe\RememberMeDetails; -use Symfony\Component\Security\Http\RememberMe\RememberMeHandlerInterface; - -/** - * Used as a "workaround" for tagging aliases in the RememberMeFactory. - * - * @author Wouter de Jong - * - * @internal - */ -final class DecoratedRememberMeHandler implements RememberMeHandlerInterface -{ - private $handler; - - public function __construct(RememberMeHandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * {@inheritDoc} - */ - public function createRememberMeCookie(UserInterface $user): void - { - $this->handler->createRememberMeCookie($user); - } - - /** - * {@inheritDoc} - */ - public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface - { - return $this->handler->consumeRememberMeCookie($rememberMeDetails); - } - - /** - * {@inheritDoc} - */ - public function clearRememberMeCookie(): void - { - $this->handler->clearRememberMeCookie(); - } -} diff --git a/vendor/symfony/security-bundle/RememberMe/FirewallAwareRememberMeHandler.php b/vendor/symfony/security-bundle/RememberMe/FirewallAwareRememberMeHandler.php deleted file mode 100644 index ca7450f..0000000 --- a/vendor/symfony/security-bundle/RememberMe/FirewallAwareRememberMeHandler.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\RememberMe; - -use Psr\Container\ContainerInterface; -use Symfony\Bundle\SecurityBundle\Security\FirewallAwareTrait; -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\RememberMe\RememberMeDetails; -use Symfony\Component\Security\Http\RememberMe\RememberMeHandlerInterface; - -/** - * Decorates {@see RememberMeHandlerInterface} for the current firewall. - * - * @author Wouter de Jong - */ -final class FirewallAwareRememberMeHandler implements RememberMeHandlerInterface -{ - use FirewallAwareTrait; - - private const FIREWALL_OPTION = 'remember_me'; - - public function __construct(FirewallMap $firewallMap, ContainerInterface $rememberMeHandlerLocator, RequestStack $requestStack) - { - $this->firewallMap = $firewallMap; - $this->locator = $rememberMeHandlerLocator; - $this->requestStack = $requestStack; - } - - public function createRememberMeCookie(UserInterface $user): void - { - $this->getForFirewall()->createRememberMeCookie($user); - } - - public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface - { - return $this->getForFirewall()->consumeRememberMeCookie($rememberMeDetails); - } - - public function clearRememberMeCookie(): void - { - $this->getForFirewall()->clearRememberMeCookie(); - } -} diff --git a/vendor/symfony/security-bundle/Resources/config/collectors.php b/vendor/symfony/security-bundle/Resources/config/collectors.php deleted file mode 100644 index 3619779..0000000 --- a/vendor/symfony/security-bundle/Resources/config/collectors.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('data_collector.security', SecurityDataCollector::class) - ->args([ - service('security.untracked_token_storage'), - service('security.role_hierarchy'), - service('security.logout_url_generator'), - service('security.access.decision_manager'), - service('security.firewall.map'), - service('debug.security.firewall')->nullOnInvalid(), - ]) - ->tag('data_collector', [ - 'template' => '@Security/Collector/security.html.twig', - 'id' => 'security', - 'priority' => 270, - ]) - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/console.php b/vendor/symfony/security-bundle/Resources/config/console.php deleted file mode 100644 index 5bfe8a2..0000000 --- a/vendor/symfony/security-bundle/Resources/config/console.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand; -use Symfony\Component\PasswordHasher\Command\UserPasswordHashCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.command.user_password_encoder', UserPasswordEncoderCommand::class) - ->args([ - service('security.encoder_factory'), - abstract_arg('encoders user classes'), - ]) - ->tag('console.command', ['command' => 'security:encode-password']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use "security.command.user_password_hash" instead.') - ; - - $container->services() - ->set('security.command.user_password_hash', UserPasswordHashCommand::class) - ->args([ - service('security.password_hasher_factory'), - abstract_arg('list of user classes'), - ]) - ->tag('console.command') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/debug_console.php b/vendor/symfony/security-bundle/Resources/config/debug_console.php deleted file mode 100644 index 74fa434..0000000 --- a/vendor/symfony/security-bundle/Resources/config/debug_console.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\Command\DebugFirewallCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.command.debug_firewall', DebugFirewallCommand::class) - ->args([ - param('security.firewalls'), - service('security.firewall.context_locator'), - tagged_locator('event_dispatcher.dispatcher', 'name'), - [], - false, - ]) - ->tag('console.command', ['command' => 'debug:firewall']) - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/guard.php b/vendor/symfony/security-bundle/Resources/config/guard.php deleted file mode 100644 index a57add5..0000000 --- a/vendor/symfony/security-bundle/Resources/config/guard.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener; -use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; -use Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.authentication.guard_handler', GuardAuthenticatorHandler::class) - ->args([ - service('security.token_storage'), - service('event_dispatcher')->nullOnInvalid(), - abstract_arg('stateless firewall keys'), - ]) - ->call('setSessionAuthenticationStrategy', [service('security.authentication.session_strategy')]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->alias(GuardAuthenticatorHandler::class, 'security.authentication.guard_handler') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.guard', GuardAuthenticationProvider::class) - ->abstract() - ->args([ - abstract_arg('Authenticators'), - abstract_arg('User Provider'), - abstract_arg('Provider-shared Key'), - abstract_arg('User Checker'), - service('security.password_hasher'), - ]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.guard', GuardAuthenticationListener::class) - ->abstract() - ->args([ - service('security.authentication.guard_handler'), - service('security.authentication.manager'), - abstract_arg('Provider-shared Key'), - abstract_arg('Authenticators'), - service('logger')->nullOnInvalid(), - param('security.authentication.hide_user_not_found'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/password_hasher.php b/vendor/symfony/security-bundle/Resources/config/password_hasher.php deleted file mode 100644 index 50e1be8..0000000 --- a/vendor/symfony/security-bundle/Resources/config/password_hasher.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher; -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.password_hasher_factory', PasswordHasherFactory::class) - ->args([[]]) - ->alias(PasswordHasherFactoryInterface::class, 'security.password_hasher_factory') - - ->set('security.user_password_hasher', UserPasswordHasher::class) - ->args([service('security.password_hasher_factory')]) - ->alias('security.password_hasher', 'security.user_password_hasher') - ->alias(UserPasswordHasherInterface::class, 'security.password_hasher') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/schema/security-1.0.xsd b/vendor/symfony/security-bundle/Resources/config/schema/security-1.0.xsd deleted file mode 100644 index 8f0c1fa..0000000 --- a/vendor/symfony/security-bundle/Resources/config/schema/security-1.0.xsd +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/security-bundle/Resources/config/security.php b/vendor/symfony/security-bundle/Resources/config/security.php deleted file mode 100644 index 9c44adf..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security.php +++ /dev/null @@ -1,293 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\CacheWarmer\ExpressionCacheWarmer; -use Symfony\Bundle\SecurityBundle\EventListener\FirewallListener; -use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; -use Symfony\Bundle\SecurityBundle\Security\FirewallContext; -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext; -use Symfony\Component\Ldap\Security\LdapUserProvider; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; -use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; -use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; -use Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter; -use Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter; -use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter; -use Symfony\Component\Security\Core\Encoder\EncoderFactory; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Encoder\UserPasswordEncoder; -use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; -use Symfony\Component\Security\Core\Role\RoleHierarchy; -use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Core\User\ChainUserProvider; -use Symfony\Component\Security\Core\User\InMemoryUserChecker; -use Symfony\Component\Security\Core\User\InMemoryUserProvider; -use Symfony\Component\Security\Core\User\MissingUserProvider; -use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator; -use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; -use Symfony\Component\Security\Http\Controller\UserValueResolver; -use Symfony\Component\Security\Http\Firewall; -use Symfony\Component\Security\Http\FirewallMapInterface; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\Impersonate\ImpersonateUrlGenerator; -use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; - -return static function (ContainerConfigurator $container) { - $container->parameters() - ->set('security.role_hierarchy.roles', []) - ; - - $container->services() - ->set('security.authorization_checker', AuthorizationChecker::class) - ->public() - ->args([ - service('security.token_storage'), - service('security.access.decision_manager'), - param('security.access.always_authenticate_before_granting'), - ]) - ->tag('container.private', ['package' => 'symfony/security-bundle', 'version' => '5.3']) - ->alias(AuthorizationCheckerInterface::class, 'security.authorization_checker') - - ->set('security.token_storage', UsageTrackingTokenStorage::class) - ->public() - ->args([ - service('security.untracked_token_storage'), - service_locator([ - 'request_stack' => service('request_stack'), - ]), - ]) - ->tag('kernel.reset', ['method' => 'disableUsageTracking']) - ->tag('kernel.reset', ['method' => 'setToken']) - ->tag('container.private', ['package' => 'symfony/security-bundle', 'version' => '5.3']) - ->alias(TokenStorageInterface::class, 'security.token_storage') - - ->set('security.untracked_token_storage', TokenStorage::class) - - ->set('security.helper', Security::class) - ->args([service_locator([ - 'security.token_storage' => service('security.token_storage'), - 'security.authorization_checker' => service('security.authorization_checker'), - ])]) - ->alias(Security::class, 'security.helper') - - ->set('security.user_value_resolver', UserValueResolver::class) - ->args([ - service('security.token_storage'), - ]) - ->tag('controller.argument_value_resolver', ['priority' => 40]) - - // Authentication related services - ->set('security.authentication.trust_resolver', AuthenticationTrustResolver::class) - - ->set('security.authentication.session_strategy', SessionAuthenticationStrategy::class) - ->args([param('security.authentication.session_strategy.strategy')]) - ->alias(SessionAuthenticationStrategyInterface::class, 'security.authentication.session_strategy') - - ->set('security.authentication.session_strategy_noop', SessionAuthenticationStrategy::class) - ->args(['none']) - - ->set('security.encoder_factory.generic', EncoderFactory::class) - ->args([ - [], - ]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use "security.password_hasher_factory" instead.') - ->alias('security.encoder_factory', 'security.encoder_factory.generic') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" service is deprecated, use "security.password_hasher_factory" instead.') - ->alias(EncoderFactoryInterface::class, 'security.encoder_factory') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" service is deprecated, use "'.PasswordHasherFactoryInterface::class.'" instead.') - - ->set('security.user_password_encoder.generic', UserPasswordEncoder::class) - ->args([service('security.encoder_factory')]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use "security.user_password_hasher" instead.') - ->alias('security.password_encoder', 'security.user_password_encoder.generic') - ->public() - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" service is deprecated, use "security.password_hasher"" instead.') - ->alias(UserPasswordEncoderInterface::class, 'security.password_encoder') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" service is deprecated, use "'.UserPasswordHasherInterface::class.'" instead.') - - ->set('security.user_checker', InMemoryUserChecker::class) - - ->set('security.expression_language', ExpressionLanguage::class) - ->args([service('cache.security_expression_language')->nullOnInvalid()]) - - ->set('security.authentication_utils', AuthenticationUtils::class) - ->args([service('request_stack')]) - ->alias(AuthenticationUtils::class, 'security.authentication_utils') - - // Authorization related services - ->set('security.access.decision_manager', AccessDecisionManager::class) - ->args([[]]) - ->alias(AccessDecisionManagerInterface::class, 'security.access.decision_manager') - - ->set('security.role_hierarchy', RoleHierarchy::class) - ->args([param('security.role_hierarchy.roles')]) - ->alias(RoleHierarchyInterface::class, 'security.role_hierarchy') - - // Security Voters - ->set('security.access.simple_role_voter', RoleVoter::class) - ->tag('security.voter', ['priority' => 245]) - - ->set('security.access.authenticated_voter', AuthenticatedVoter::class) - ->args([service('security.authentication.trust_resolver')]) - ->tag('security.voter', ['priority' => 250]) - - ->set('security.access.role_hierarchy_voter', RoleHierarchyVoter::class) - ->args([service('security.role_hierarchy')]) - ->tag('security.voter', ['priority' => 245]) - - ->set('security.access.expression_voter', ExpressionVoter::class) - ->args([ - service('security.expression_language'), - service('security.authentication.trust_resolver'), - service('security.authorization_checker'), - service('security.role_hierarchy')->nullOnInvalid(), - ]) - ->tag('security.voter', ['priority' => 245]) - - ->set('security.impersonate_url_generator', ImpersonateUrlGenerator::class) - ->args([ - service('request_stack'), - service('security.firewall.map'), - service('security.token_storage'), - ]) - - // Firewall related services - ->set('security.firewall', FirewallListener::class) - ->args([ - service('security.firewall.map'), - service('event_dispatcher'), - service('security.logout_url_generator'), - ]) - ->tag('kernel.event_subscriber') - ->alias(Firewall::class, 'security.firewall') - - ->set('security.firewall.map', FirewallMap::class) - ->args([ - abstract_arg('Firewall context locator'), - abstract_arg('Request matchers'), - ]) - ->alias(FirewallMapInterface::class, 'security.firewall.map') - - ->set('security.firewall.context', FirewallContext::class) - ->abstract() - ->args([ - [], - service('security.exception_listener'), - abstract_arg('LogoutListener'), - abstract_arg('FirewallConfig'), - ]) - - ->set('security.firewall.lazy_context', LazyFirewallContext::class) - ->abstract() - ->args([ - [], - service('security.exception_listener'), - abstract_arg('LogoutListener'), - abstract_arg('FirewallConfig'), - service('security.untracked_token_storage'), - ]) - - ->set('security.firewall.config', FirewallConfig::class) - ->abstract() - ->args([ - abstract_arg('name'), - abstract_arg('user_checker'), - abstract_arg('request_matcher'), - false, // security enabled - false, // stateless - null, - null, - null, - null, - null, - [], // listeners - null, // switch_user - ]) - - ->set('security.logout_url_generator', LogoutUrlGenerator::class) - ->args([ - service('request_stack')->nullOnInvalid(), - service('router')->nullOnInvalid(), - service('security.token_storage')->nullOnInvalid(), - ]) - - // Provisioning - ->set('security.user.provider.missing', MissingUserProvider::class) - ->abstract() - ->args([ - abstract_arg('firewall'), - ]) - - ->set('security.user.provider.in_memory', InMemoryUserProvider::class) - ->abstract() - - ->set('security.user.provider.ldap', LdapUserProvider::class) - ->abstract() - ->args([ - abstract_arg('security.ldap.ldap'), - abstract_arg('base dn'), - abstract_arg('search dn'), - abstract_arg('search password'), - abstract_arg('default_roles'), - abstract_arg('uid key'), - abstract_arg('filter'), - abstract_arg('password_attribute'), - abstract_arg('extra_fields (email etc)'), - ]) - - ->set('security.user.provider.chain', ChainUserProvider::class) - ->abstract() - - ->set('security.http_utils', HttpUtils::class) - ->args([ - service('router')->nullOnInvalid(), - service('router')->nullOnInvalid(), - ]) - ->alias(HttpUtils::class, 'security.http_utils') - - // Validator - ->set('security.validator.user_password', UserPasswordValidator::class) - ->args([ - service('security.token_storage'), - service('security.password_hasher_factory'), - ]) - ->tag('validator.constraint_validator', ['alias' => 'security.validator.user_password']) - - // Cache - ->set('cache.security_expression_language') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - - // Cache Warmers - ->set('security.cache_warmer.expression', ExpressionCacheWarmer::class) - ->args([ - [], - service('security.expression_language'), - ]) - ->tag('kernel.cache_warmer') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_authenticator.php b/vendor/symfony/security-bundle/Resources/config/security_authenticator.php deleted file mode 100644 index fd83cd3..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_authenticator.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\Security\UserAuthenticator; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticatorManager; -use Symfony\Component\Security\Http\Authentication\NoopAuthenticationManager; -use Symfony\Component\Security\Http\Authentication\UserAuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\FormLoginAuthenticator; -use Symfony\Component\Security\Http\Authenticator\HttpBasicAuthenticator; -use Symfony\Component\Security\Http\Authenticator\JsonLoginAuthenticator; -use Symfony\Component\Security\Http\Authenticator\RemoteUserAuthenticator; -use Symfony\Component\Security\Http\Authenticator\X509Authenticator; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; -use Symfony\Component\Security\Http\EventListener\CheckCredentialsListener; -use Symfony\Component\Security\Http\EventListener\LoginThrottlingListener; -use Symfony\Component\Security\Http\EventListener\PasswordMigratingListener; -use Symfony\Component\Security\Http\EventListener\SessionStrategyListener; -use Symfony\Component\Security\Http\EventListener\UserCheckerListener; -use Symfony\Component\Security\Http\EventListener\UserProviderListener; -use Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener; - -return static function (ContainerConfigurator $container) { - $container->services() - - // Manager - ->set('security.authenticator.manager', AuthenticatorManager::class) - ->abstract() - ->args([ - abstract_arg('authenticators'), - service('security.token_storage'), - service('event_dispatcher'), - abstract_arg('provider key'), - service('logger')->nullOnInvalid(), - param('security.authentication.manager.erase_credentials'), - param('security.authentication.hide_user_not_found'), - abstract_arg('required badges'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.managers_locator', ServiceLocator::class) - ->args([[]]) - - ->set('security.user_authenticator', UserAuthenticator::class) - ->args([ - service('security.firewall.map'), - service('security.authenticator.managers_locator'), - service('request_stack'), - ]) - ->alias(UserAuthenticatorInterface::class, 'security.user_authenticator') - - ->set('security.authentication.manager', NoopAuthenticationManager::class) - ->alias(AuthenticationManagerInterface::class, 'security.authentication.manager') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use the new authenticator system instead.') - - ->set('security.firewall.authenticator', AuthenticatorManagerListener::class) - ->abstract() - ->args([ - abstract_arg('authenticator manager'), - ]) - - // Listeners - ->set('security.listener.check_authenticator_credentials', CheckCredentialsListener::class) - ->args([ - service('security.password_hasher_factory'), - ]) - ->tag('kernel.event_subscriber') - - ->set('security.listener.user_provider', UserProviderListener::class) - ->args([ - service('security.user_providers'), - ]) - ->tag('kernel.event_listener', ['event' => CheckPassportEvent::class, 'priority' => 1024, 'method' => 'checkPassport']) - - ->set('security.listener.user_provider.abstract', UserProviderListener::class) - ->abstract() - ->args([ - abstract_arg('user provider'), - ]) - - ->set('security.listener.password_migrating', PasswordMigratingListener::class) - ->args([ - service('security.password_hasher_factory'), - ]) - ->tag('kernel.event_subscriber') - - ->set('security.listener.user_checker', UserCheckerListener::class) - ->abstract() - ->args([ - abstract_arg('user checker'), - ]) - - ->set('security.listener.session', SessionStrategyListener::class) - ->abstract() - ->args([ - service('security.authentication.session_strategy'), - ]) - - ->set('security.listener.login_throttling', LoginThrottlingListener::class) - ->abstract() - ->args([ - service('request_stack'), - abstract_arg('request rate limiter'), - ]) - - // Authenticators - ->set('security.authenticator.http_basic', HttpBasicAuthenticator::class) - ->abstract() - ->args([ - abstract_arg('realm name'), - abstract_arg('user provider'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.form_login', FormLoginAuthenticator::class) - ->abstract() - ->args([ - service('security.http_utils'), - abstract_arg('user provider'), - abstract_arg('authentication success handler'), - abstract_arg('authentication failure handler'), - abstract_arg('options'), - ]) - - ->set('security.authenticator.json_login', JsonLoginAuthenticator::class) - ->abstract() - ->args([ - service('security.http_utils'), - abstract_arg('user provider'), - abstract_arg('authentication success handler'), - abstract_arg('authentication failure handler'), - abstract_arg('options'), - service('property_accessor')->nullOnInvalid(), - ]) - ->call('setTranslator', [service('translator')->ignoreOnInvalid()]) - - ->set('security.authenticator.x509', X509Authenticator::class) - ->abstract() - ->args([ - abstract_arg('user provider'), - service('security.token_storage'), - abstract_arg('firewall name'), - abstract_arg('user key'), - abstract_arg('credentials key'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.remote_user', RemoteUserAuthenticator::class) - ->abstract() - ->args([ - abstract_arg('user provider'), - service('security.token_storage'), - abstract_arg('firewall name'), - abstract_arg('user key'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_authenticator_login_link.php b/vendor/symfony/security-bundle/Resources/config/security_authenticator_login_link.php deleted file mode 100644 index 9a46a09..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_authenticator_login_link.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\LoginLink\FirewallAwareLoginLinkHandler; -use Symfony\Component\Security\Core\Signature\ExpiredSignatureStorage; -use Symfony\Component\Security\Core\Signature\SignatureHasher; -use Symfony\Component\Security\Http\Authenticator\LoginLinkAuthenticator; -use Symfony\Component\Security\Http\LoginLink\LoginLinkHandler; -use Symfony\Component\Security\Http\LoginLink\LoginLinkHandlerInterface; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.authenticator.login_link', LoginLinkAuthenticator::class) - ->abstract() - ->args([ - abstract_arg('the login link handler instance'), - service('security.http_utils'), - abstract_arg('authentication success handler'), - abstract_arg('authentication failure handler'), - abstract_arg('options'), - ]) - - ->set('security.authenticator.abstract_login_link_handler', LoginLinkHandler::class) - ->abstract() - ->args([ - service('router'), - abstract_arg('user provider'), - abstract_arg('signature hasher'), - abstract_arg('options'), - ]) - - ->set('security.authenticator.abstract_login_link_signature_hasher', SignatureHasher::class) - ->args([ - service('property_accessor'), - abstract_arg('signature properties'), - '%kernel.secret%', - abstract_arg('expired signature storage'), - abstract_arg('max signature uses'), - ]) - - ->set('security.authenticator.expired_login_link_storage', ExpiredSignatureStorage::class) - ->abstract() - ->args([ - abstract_arg('cache pool service'), - abstract_arg('expired login link storage'), - ]) - - ->set('security.authenticator.cache.expired_links') - ->parent('cache.app') - ->private() - - ->set('security.authenticator.firewall_aware_login_link_handler', FirewallAwareLoginLinkHandler::class) - ->args([ - service('security.firewall.map'), - tagged_locator('security.authenticator.login_linker', 'firewall'), - service('request_stack'), - ]) - ->alias(LoginLinkHandlerInterface::class, 'security.authenticator.firewall_aware_login_link_handler') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_authenticator_remember_me.php b/vendor/symfony/security-bundle/Resources/config/security_authenticator_remember_me.php deleted file mode 100644 index 13c8f5e..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_authenticator_remember_me.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\RememberMe\FirewallAwareRememberMeHandler; -use Symfony\Component\Security\Core\Signature\SignatureHasher; -use Symfony\Component\Security\Http\Authenticator\RememberMeAuthenticator; -use Symfony\Component\Security\Http\EventListener\CheckRememberMeConditionsListener; -use Symfony\Component\Security\Http\EventListener\RememberMeListener; -use Symfony\Component\Security\Http\RememberMe\PersistentRememberMeHandler; -use Symfony\Component\Security\Http\RememberMe\RememberMeHandlerInterface; -use Symfony\Component\Security\Http\RememberMe\SignatureRememberMeHandler; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.authenticator.remember_me_signature_hasher', SignatureHasher::class) - ->args([ - service('property_accessor'), - abstract_arg('signature properties'), - '%kernel.secret%', - null, - null, - ]) - - ->set('security.authenticator.signature_remember_me_handler', SignatureRememberMeHandler::class) - ->abstract() - ->args([ - abstract_arg('signature hasher'), - abstract_arg('user provider'), - service('request_stack'), - abstract_arg('options'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.persistent_remember_me_handler', PersistentRememberMeHandler::class) - ->abstract() - ->args([ - abstract_arg('token provider'), - param('kernel.secret'), - abstract_arg('user provider'), - service('request_stack'), - abstract_arg('options'), - service('logger')->nullOnInvalid(), - abstract_arg('token verifier'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.firewall_aware_remember_me_handler', FirewallAwareRememberMeHandler::class) - ->args([ - service('security.firewall.map'), - tagged_locator('security.remember_me_handler', 'firewall'), - service('request_stack'), - ]) - ->alias(RememberMeHandlerInterface::class, 'security.authenticator.firewall_aware_remember_me_handler') - - ->set('security.listener.check_remember_me_conditions', CheckRememberMeConditionsListener::class) - ->abstract() - ->args([ - abstract_arg('options'), - service('logger')->nullOnInvalid(), - ]) - - ->set('security.listener.remember_me', RememberMeListener::class) - ->abstract() - ->args([ - abstract_arg('remember me handler'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authenticator.remember_me', RememberMeAuthenticator::class) - ->abstract() - ->args([ - abstract_arg('remember me handler'), - param('kernel.secret'), - service('security.token_storage'), - abstract_arg('options'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - // Cache - ->set('cache.security_token_verifier') - ->parent('cache.system') - ->private() - ->tag('cache.pool') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_debug.php b/vendor/symfony/security-bundle/Resources/config/security_debug.php deleted file mode 100644 index dc668b1..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_debug.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener; -use Symfony\Bundle\SecurityBundle\EventListener\VoteListener; -use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('debug.security.access.decision_manager', TraceableAccessDecisionManager::class) - ->decorate('security.access.decision_manager') - ->args([ - service('debug.security.access.decision_manager.inner'), - ]) - - ->set('debug.security.voter.vote_listener', VoteListener::class) - ->args([ - service('debug.security.access.decision_manager'), - ]) - ->tag('kernel.event_subscriber') - - ->set('debug.security.firewall', TraceableFirewallListener::class) - ->args([ - service('security.firewall.map'), - service('event_dispatcher'), - service('security.logout_url_generator'), - ]) - ->tag('kernel.event_subscriber') - ->alias('security.firewall', 'debug.security.firewall') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_legacy.php b/vendor/symfony/security-bundle/Resources/config/security_legacy.php deleted file mode 100644 index ec829ea..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_legacy.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager; -use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider; -use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; -use Symfony\Component\Security\Core\Authentication\Provider\LdapBindAuthenticationProvider; -use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider; -use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener; -use Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener; -use Symfony\Component\Security\Http\Firewall\RemoteUserAuthenticationListener; -use Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener; -use Symfony\Component\Security\Http\Firewall\UsernamePasswordJsonAuthenticationListener; -use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener; - -return static function (ContainerConfigurator $container) { - $container->services() - - // Authentication related services - ->set('security.authentication.manager', AuthenticationProviderManager::class) - ->args([ - abstract_arg('providers'), - param('security.authentication.manager.erase_credentials'), - ]) - ->call('setEventDispatcher', [service('event_dispatcher')]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - ->alias(AuthenticationManagerInterface::class, 'security.authentication.manager') - ->deprecate('symfony/security-bundle', '5.3', 'The "%alias_id%" alias is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.anonymous', AnonymousAuthenticationListener::class) - ->args([ - service('security.untracked_token_storage'), - abstract_arg('Key'), - service('logger')->nullOnInvalid(), - service('security.authentication.manager'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.anonymous', AnonymousAuthenticationProvider::class) - ->args([abstract_arg('Key')]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.form', UsernamePasswordFormAuthenticationListener::class) - ->parent('security.authentication.listener.abstract') - ->abstract() - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.x509', X509AuthenticationListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.manager'), - abstract_arg('Provider-shared Key'), - abstract_arg('x509 user'), - abstract_arg('x509 credentials'), - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.json', UsernamePasswordJsonAuthenticationListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.manager'), - service('security.http_utils'), - abstract_arg('Provider-shared Key'), - abstract_arg('Failure handler'), - abstract_arg('Success Handler'), - [], // Options - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - service('property_accessor')->nullOnInvalid(), - ]) - ->call('setTranslator', [service('translator')->ignoreOnInvalid()]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.remote_user', RemoteUserAuthenticationListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.manager'), - abstract_arg('Provider-shared Key'), - abstract_arg('REMOTE_USER server env var'), - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.listener.basic', BasicAuthenticationListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.manager'), - abstract_arg('Provider-shared Key'), - abstract_arg('Entry Point'), - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.dao', DaoAuthenticationProvider::class) - ->abstract() - ->args([ - abstract_arg('User Provider'), - abstract_arg('User Checker'), - abstract_arg('Provider-shared Key'), - service('security.password_hasher_factory'), - param('security.authentication.hide_user_not_found'), - ]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.ldap_bind', LdapBindAuthenticationProvider::class) - ->abstract() - ->args([ - abstract_arg('User Provider'), - abstract_arg('UserChecker'), - abstract_arg('Provider-shared Key'), - abstract_arg('LDAP'), - abstract_arg('Base DN'), - param('security.authentication.hide_user_not_found'), - abstract_arg('search dn'), - abstract_arg('search password'), - ]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.pre_authenticated', PreAuthenticatedAuthenticationProvider::class) - ->abstract() - ->args([ - abstract_arg('User Provider'), - abstract_arg('UserChecker'), - ]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_listeners.php b/vendor/symfony/security-bundle/Resources/config/security_listeners.php deleted file mode 100644 index 72129d1..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_listeners.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Security\Http\AccessMap; -use Symfony\Component\Security\Http\Authentication\CustomAuthenticationFailureHandler; -use Symfony\Component\Security\Http\Authentication\CustomAuthenticationSuccessHandler; -use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; -use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler; -use Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint; -use Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint; -use Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint; -use Symfony\Component\Security\Http\EventListener\CookieClearingLogoutListener; -use Symfony\Component\Security\Http\EventListener\DefaultLogoutListener; -use Symfony\Component\Security\Http\EventListener\SessionLogoutListener; -use Symfony\Component\Security\Http\Firewall\AccessListener; -use Symfony\Component\Security\Http\Firewall\ChannelListener; -use Symfony\Component\Security\Http\Firewall\ContextListener; -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\LogoutListener; -use Symfony\Component\Security\Http\Firewall\SwitchUserListener; - -return static function (ContainerConfigurator $container) { - $container->services() - - ->set('security.authentication.basic_entry_point', BasicAuthenticationEntryPoint::class) - ->deprecate('symfony/security-bundle', '5.4', 'The "%service_id%" service is deprecated, the logic is contained in the authenticators.') - - ->set('security.authentication.retry_entry_point', RetryAuthenticationEntryPoint::class) - ->deprecate('symfony/security-bundle', '5.4', 'The "%service_id%" service is deprecated, the logic is integrated directly in "security.channel_listener".') - ->args([ - inline_service('int')->factory([service('router.request_context'), 'getHttpPort']), - inline_service('int')->factory([service('router.request_context'), 'getHttpsPort']), - ]) - - ->set('security.channel_listener', ChannelListener::class) - ->args([ - service('security.access_map'), - service('logger')->nullOnInvalid(), - inline_service('int')->factory([service('router.request_context'), 'getHttpPort']), - inline_service('int')->factory([service('router.request_context'), 'getHttpsPort']), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.access_map', AccessMap::class) - - ->set('security.context_listener', ContextListener::class) - ->args([ - service('security.untracked_token_storage'), - [], - abstract_arg('Provider Key'), - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - service('security.authentication.trust_resolver'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.logout_listener', LogoutListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.http_utils'), - abstract_arg('event dispatcher'), - [], // Options - ]) - - ->set('security.logout.listener.session', SessionLogoutListener::class) - ->abstract() - - ->set('security.logout.listener.cookie_clearing', CookieClearingLogoutListener::class) - ->abstract() - - ->set('security.logout.listener.default', DefaultLogoutListener::class) - ->abstract() - ->args([ - service('security.http_utils'), - abstract_arg('target url'), - ]) - - ->set('security.authentication.form_entry_point', FormAuthenticationEntryPoint::class) - ->abstract() - ->args([ - service('http_kernel'), - ]) - - ->set('security.authentication.listener.abstract') - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.manager'), - service('security.authentication.session_strategy'), - service('security.http_utils'), - abstract_arg('Provider-shared Key'), - service('security.authentication.success_handler'), - service('security.authentication.failure_handler'), - [], - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authentication.custom_success_handler', CustomAuthenticationSuccessHandler::class) - ->abstract() - ->args([ - abstract_arg('The custom success handler service'), - [], // Options - abstract_arg('Provider-shared Key'), - ]) - - ->set('security.authentication.success_handler', DefaultAuthenticationSuccessHandler::class) - ->abstract() - ->args([ - service('security.http_utils'), - [], // Options - ]) - - ->set('security.authentication.custom_failure_handler', CustomAuthenticationFailureHandler::class) - ->abstract() - ->args([ - abstract_arg('The custom failure handler service'), - [], // Options - ]) - - ->set('security.authentication.failure_handler', DefaultAuthenticationFailureHandler::class) - ->abstract() - ->args([ - service('http_kernel'), - service('security.http_utils'), - [], // Options - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.exception_listener', ExceptionListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - service('security.authentication.trust_resolver'), - service('security.http_utils'), - abstract_arg('Provider-shared Key'), - service('security.authentication.entry_point')->nullOnInvalid(), - param('security.access.denied_url'), - service('security.access.denied_handler')->nullOnInvalid(), - service('logger')->nullOnInvalid(), - false, // Stateless - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authentication.switchuser_listener', SwitchUserListener::class) - ->abstract() - ->args([ - service('security.token_storage'), - abstract_arg('User Provider'), - abstract_arg('User Checker'), - abstract_arg('Provider Key'), - service('security.access.decision_manager'), - service('logger')->nullOnInvalid(), - '_switch_user', - 'ROLE_ALLOWED_TO_SWITCH', - service('event_dispatcher')->nullOnInvalid(), - false, // Stateless - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.access_listener', AccessListener::class) - ->args([ - service('security.token_storage'), - service('security.access.decision_manager'), - service('security.access_map'), - service('security.authentication.manager'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/security_rememberme.php b/vendor/symfony/security-bundle/Resources/config/security_rememberme.php deleted file mode 100644 index 1c0e355..0000000 --- a/vendor/symfony/security-bundle/Resources/config/security_rememberme.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; -use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider; -use Symfony\Component\Security\Http\Firewall\RememberMeListener; -use Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices; -use Symfony\Component\Security\Http\RememberMe\ResponseListener; -use Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('security.authentication.listener.rememberme', RememberMeListener::class) - ->abstract() - ->args([ - service('security.untracked_token_storage'), - service('security.authentication.rememberme'), - service('security.authentication.manager'), - service('logger')->nullOnInvalid(), - service('event_dispatcher')->nullOnInvalid(), - abstract_arg('Catch exception flag set in RememberMeFactory'), - service('security.authentication.session_strategy'), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.authentication.provider.rememberme', RememberMeAuthenticationProvider::class) - ->abstract() - ->args([abstract_arg('User Checker')]) - ->deprecate('symfony/security-bundle', '5.3', 'The "%service_id%" service is deprecated, use the new authenticator system instead.') - - ->set('security.rememberme.token.provider.in_memory', InMemoryTokenProvider::class) - - ->set('security.authentication.rememberme.services.abstract') - ->abstract() - ->args([ - [], // User Providers - abstract_arg('Shared Token Key'), - abstract_arg('Shared Provider Key'), - [], // Options - service('logger')->nullOnInvalid(), - ]) - ->tag('monolog.logger', ['channel' => 'security']) - - ->set('security.authentication.rememberme.services.persistent', PersistentTokenBasedRememberMeServices::class) - ->parent('security.authentication.rememberme.services.abstract') - ->abstract() - - ->set('security.authentication.rememberme.services.simplehash', TokenBasedRememberMeServices::class) - ->parent('security.authentication.rememberme.services.abstract') - ->abstract() - - ->set('security.rememberme.response_listener', ResponseListener::class) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/config/templating_twig.php b/vendor/symfony/security-bundle/Resources/config/templating_twig.php deleted file mode 100644 index 05a74d0..0000000 --- a/vendor/symfony/security-bundle/Resources/config/templating_twig.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Extension\LogoutUrlExtension; -use Symfony\Bridge\Twig\Extension\SecurityExtension; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.extension.logout_url', LogoutUrlExtension::class) - ->args([ - service('security.logout_url_generator'), - ]) - ->tag('twig.extension') - - ->set('twig.extension.security', SecurityExtension::class) - ->args([ - service('security.authorization_checker')->ignoreOnInvalid(), - service('security.impersonate_url_generator')->ignoreOnInvalid(), - ]) - ->tag('twig.extension') - ; -}; diff --git a/vendor/symfony/security-bundle/Resources/views/Collector/icon.svg b/vendor/symfony/security-bundle/Resources/views/Collector/icon.svg deleted file mode 100644 index 1110c10..0000000 --- a/vendor/symfony/security-bundle/Resources/views/Collector/icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/security-bundle/Resources/views/Collector/security.html.twig b/vendor/symfony/security-bundle/Resources/views/Collector/security.html.twig deleted file mode 100644 index 91e75ce..0000000 --- a/vendor/symfony/security-bundle/Resources/views/Collector/security.html.twig +++ /dev/null @@ -1,441 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block page_title 'Security' %} - -{% block toolbar %} - {% if collector.firewall %} - {% set color_code = collector.enabled and not collector.authenticatorManagerEnabled ? 'yellow' %} - {% set icon %} - {{ include('@Security/Collector/icon.svg') }} - {{ collector.user|default('n/a') }} - {% endset %} - - {% set text %} - {% if collector.impersonated %} -
    -
    - Impersonator - {{ collector.impersonatorUser }} -
    -
    - {% endif %} - -
    - {% if collector.enabled %} - {% if collector.token %} -
    - Logged in as - {{ collector.user }} -
    - -
    - Authenticated - {{ collector.authenticated ? 'Yes' : 'No' }} -
    - -
    - Roles - - {% set remainingRoles = collector.roles|slice(1) %} - {{ collector.roles|first }} - {% if remainingRoles is not empty %} - + - - {{ remainingRoles|length }} more - - {% endif %} - -
    - -
    - Token class - {{ collector.tokenClass|abbr_class }} -
    - {% else %} -
    - Authenticated - No -
    - {% endif %} - - {% if collector.firewall %} -
    - Firewall name - {{ collector.firewall.name }} -
    - {% endif %} - - {% if collector.token and collector.logoutUrl %} -
    - Actions - - Logout - {% if collector.impersonated and collector.impersonationExitPath %} - | Exit impersonation - {% endif %} - -
    - {% endif %} - {% else %} -
    - The security is disabled. -
    - {% endif %} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@Security/Collector/icon.svg') }} - Security - -{% endblock %} - -{% block panel %} -

    Security

    - {% if collector.enabled %} -
    -
    -

    Token

    - -
    - {% if collector.token %} -
    -
    - {{ collector.user == 'anon.' ? 'Anonymous' : collector.user }} - Username -
    - -
    - {{ include('@WebProfiler/Icon/' ~ (collector.authenticated ? 'yes' : 'no') ~ '.svg') }} - Authenticated -
    -
    - - - - - - - - - - - - - - - {% if collector.supportsRoleHierarchy %} - - - - - {% endif %} - - {% if collector.token %} - - - - - {% endif %} - -
    PropertyValue
    Roles - {{ collector.roles is empty ? 'none' : profiler_dump(collector.roles, maxDepth=1) }} - - {% if not collector.authenticated and collector.roles is empty %} -

    User is not authenticated probably because they have no roles.

    - {% endif %} -
    Inherited Roles{{ collector.inheritedRoles is empty ? 'none' : profiler_dump(collector.inheritedRoles, maxDepth=1) }}
    Token{{ profiler_dump(collector.token) }}
    - {% elseif collector.enabled %} -
    -

    There is no security token.

    -
    - {% endif %} -
    -
    - -
    -

    Firewall

    -
    - {% if collector.firewall %} -
    -
    - {{ collector.firewall.name }} - Name -
    -
    - {{ include('@WebProfiler/Icon/' ~ (collector.firewall.security_enabled ? 'yes' : 'no') ~ '.svg') }} - Security enabled -
    -
    - {{ include('@WebProfiler/Icon/' ~ (collector.firewall.stateless ? 'yes' : 'no') ~ '.svg') }} - Stateless -
    - {% if collector.authenticatorManagerEnabled == false %} -
    - {{ include('@WebProfiler/Icon/' ~ (collector.firewall.allows_anonymous ? 'yes' : 'no') ~ '.svg') }} - Allows anonymous -
    - {% endif %} -
    - - {% if collector.firewall.security_enabled %} -

    Configuration

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if collector.authenticatorManagerEnabled %} - - - - - {% else %} - - - - - {% endif %} - -
    KeyValue
    provider{{ collector.firewall.provider ?: '(none)' }}
    context{{ collector.firewall.context ?: '(none)' }}
    entry_point{{ collector.firewall.entry_point ?: '(none)' }}
    user_checker{{ collector.firewall.user_checker ?: '(none)' }}
    access_denied_handler{{ collector.firewall.access_denied_handler ?: '(none)' }}
    access_denied_url{{ collector.firewall.access_denied_url ?: '(none)' }}
    authenticators{{ collector.firewall.authenticators is empty ? '(none)' : profiler_dump(collector.firewall.authenticators, maxDepth=1) }}
    listeners{{ collector.firewall.listeners is empty ? '(none)' : profiler_dump(collector.firewall.listeners, maxDepth=1) }}
    - {% endif %} - {% endif %} -
    -
    - -
    -

    Listeners

    -
    - {% if collector.listeners|default([]) is empty %} -
    -

    No security listeners have been recorded. Check that debugging is enabled in the kernel.

    -
    - {% else %} - - - - - - - - - - {% set previous_event = (collector.listeners|first) %} - {% for listener in collector.listeners %} - {% if loop.first or listener != previous_event %} - {% if not loop.first %} - - {% endif %} - - - {% set previous_event = listener %} - {% endif %} - - - - - - - - {% if loop.last %} - - {% endif %} - {% endfor %} -
    ListenerDurationResponse
    {{ profiler_dump(listener.stub) }}{{ '%0.2f'|format(listener.time * 1000) }} ms{{ listener.response ? profiler_dump(listener.response) : '(none)' }}
    - {% endif %} -
    -
    - -
    -

    Authenticators

    -
    - {% if collector.authenticators|default([]) is not empty %} - - - - - - - - - - - {% set previous_event = (collector.listeners|first) %} - {% for authenticator in collector.authenticators %} - {% if loop.first or authenticator != previous_event %} - {% if not loop.first %} - - {% endif %} - - - {% set previous_event = authenticator %} - {% endif %} - - - - - - - - - {% if loop.last %} - - {% endif %} - {% endfor %} -
    AuthenticatorSupportsDurationPassport
    {{ profiler_dump(authenticator.stub) }}{{ include('@WebProfiler/Icon/' ~ (authenticator.supports ? 'yes' : 'no') ~ '.svg') }}{{ '%0.2f'|format(authenticator.duration * 1000) }} ms{{ authenticator.passport ? profiler_dump(authenticator.passport) : '(none)' }}
    - {% else %} -
    -

    No authenticators have been recorded. Check previous profiles on your authentication endpoint.

    -
    - {% endif %} -
    -
    - -
    -

    Access Decision

    -
    - {% if collector.voters|default([]) is not empty %} -
    -
    - {{ collector.voterStrategy|default('unknown') }} - Strategy -
    -
    - - - - - - - - - - - {% for voter in collector.voters %} - - - - - {% endfor %} - -
    #Voter class
    {{ loop.index }}{{ profiler_dump(voter) }}
    - {% endif %} - {% if collector.accessDecisionLog|default([]) is not empty %} -

    Access decision log

    - - - - - - - - - - - - - - - - - - {% for decision in collector.accessDecisionLog %} - - - - - - - - - - - {% endfor %} - -
    #ResultAttributesObject
    {{ loop.index }} - {{ decision.result - ? 'GRANTED' - : 'DENIED' - }} - - {% if decision.attributes|length == 1 %} - {% set attribute = decision.attributes|first %} - {% if attribute.expression is defined %} - Expression:
    {{ attribute.expression }}
    - {% elseif attribute.type == 'string' %} - {{ attribute }} - {% else %} - {{ profiler_dump(attribute) }} - {% endif %} - {% else %} - {{ profiler_dump(decision.attributes) }} - {% endif %} -
    {{ profiler_dump(decision.seek('object')) }}
    - {% if decision.voter_details is not empty %} - {% set voter_details_id = 'voter-details-' ~ loop.index %} -
    - - - {% for voter_detail in decision.voter_details %} - - - {% if collector.voterStrategy == 'unanimous' %} - - {% endif %} - - - {% endfor %} - -
    {{ profiler_dump(voter_detail['class']) }}attribute {{ voter_detail['attributes'][0] }} - {% if voter_detail['vote'] == constant('Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::ACCESS_GRANTED') %} - ACCESS GRANTED - {% elseif voter_detail['vote'] == constant('Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::ACCESS_ABSTAIN') %} - ACCESS ABSTAIN - {% elseif voter_detail['vote'] == constant('Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::ACCESS_DENIED') %} - ACCESS DENIED - {% else %} - unknown ({{ voter_detail['vote'] }}) - {% endif %} -
    -
    - Show voter details - {% endif %} -
    -
    - {% endif %} -
    -
    - {% endif %} -{% endblock %} diff --git a/vendor/symfony/security-bundle/Security/FirewallAwareTrait.php b/vendor/symfony/security-bundle/Security/FirewallAwareTrait.php deleted file mode 100644 index d79d0b7..0000000 --- a/vendor/symfony/security-bundle/Security/FirewallAwareTrait.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -/** - * Provides basic functionality for services mapped by the firewall name - * in a container locator. - * - * @author Wouter de Jong - * - * @internal - */ -trait FirewallAwareTrait -{ - private $locator; - private $requestStack; - private $firewallMap; - - private function getForFirewall(): object - { - $serviceIdentifier = str_replace('FirewallAware', '', static::class); - if (null === $request = $this->requestStack->getCurrentRequest()) { - throw new \LogicException('Cannot determine the correct '.$serviceIdentifier.' to use: there is no active Request and so, the firewall cannot be determined. Try using a specific '.$serviceIdentifier.' service.'); - } - - $firewall = $this->firewallMap->getFirewallConfig($request); - if (!$firewall) { - throw new \LogicException('No '.$serviceIdentifier.' found as the current route is not covered by a firewall.'); - } - - $firewallName = $firewall->getName(); - if (!$this->locator->has($firewallName)) { - $message = 'No '.$serviceIdentifier.' found for this firewall.'; - if (\defined(static::class.'::FIREWALL_OPTION')) { - $message .= sprintf('Did you forget to add a "'.static::FIREWALL_OPTION.'" key under your "%s" firewall?', $firewallName); - } - - throw new \LogicException($message); - } - - return $this->locator->get($firewallName); - } -} diff --git a/vendor/symfony/security-bundle/Security/FirewallConfig.php b/vendor/symfony/security-bundle/Security/FirewallConfig.php deleted file mode 100644 index 4b361ff..0000000 --- a/vendor/symfony/security-bundle/Security/FirewallConfig.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -/** - * @author Robin Chalas - */ -final class FirewallConfig -{ - private $name; - private $userChecker; - private $requestMatcher; - private $securityEnabled; - private $stateless; - private $provider; - private $context; - private $entryPoint; - private $accessDeniedHandler; - private $accessDeniedUrl; - private $authenticators; - private $switchUser; - - public function __construct(string $name, string $userChecker, string $requestMatcher = null, bool $securityEnabled = true, bool $stateless = false, string $provider = null, string $context = null, string $entryPoint = null, string $accessDeniedHandler = null, string $accessDeniedUrl = null, array $authenticators = [], array $switchUser = null) - { - $this->name = $name; - $this->userChecker = $userChecker; - $this->requestMatcher = $requestMatcher; - $this->securityEnabled = $securityEnabled; - $this->stateless = $stateless; - $this->provider = $provider; - $this->context = $context; - $this->entryPoint = $entryPoint; - $this->accessDeniedHandler = $accessDeniedHandler; - $this->accessDeniedUrl = $accessDeniedUrl; - $this->authenticators = $authenticators; - $this->switchUser = $switchUser; - } - - public function getName(): string - { - return $this->name; - } - - /** - * @return string|null The request matcher service id or null if neither the request matcher, pattern or host - * options were provided - */ - public function getRequestMatcher(): ?string - { - return $this->requestMatcher; - } - - public function isSecurityEnabled(): bool - { - return $this->securityEnabled; - } - - /** - * @deprecated since Symfony 5.4 - */ - public function allowsAnonymous(): bool - { - trigger_deprecation('symfony/security-bundle', '5.4', 'The "%s()" method is deprecated.', __METHOD__); - - return \in_array('anonymous', $this->authenticators, true); - } - - public function isStateless(): bool - { - return $this->stateless; - } - - public function getProvider(): ?string - { - return $this->provider; - } - - /** - * @return string|null The context key (will be null if the firewall is stateless) - */ - public function getContext(): ?string - { - return $this->context; - } - - public function getEntryPoint(): ?string - { - return $this->entryPoint; - } - - public function getUserChecker(): string - { - return $this->userChecker; - } - - public function getAccessDeniedHandler(): ?string - { - return $this->accessDeniedHandler; - } - - public function getAccessDeniedUrl(): ?string - { - return $this->accessDeniedUrl; - } - - /** - * @deprecated since Symfony 5.4, use {@see getAuthenticators()} instead - */ - public function getListeners(): array - { - trigger_deprecation('symfony/security-bundle', '5.4', 'Method "%s()" is deprecated, use "%s::getAuthenticators()" instead.', __METHOD__, __CLASS__); - - return $this->getAuthenticators(); - } - - public function getAuthenticators(): array - { - return $this->authenticators; - } - - public function getSwitchUser(): ?array - { - return $this->switchUser; - } -} diff --git a/vendor/symfony/security-bundle/Security/FirewallContext.php b/vendor/symfony/security-bundle/Security/FirewallContext.php deleted file mode 100644 index 4ebc9c7..0000000 --- a/vendor/symfony/security-bundle/Security/FirewallContext.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\LogoutListener; - -/** - * This is a wrapper around the actual firewall configuration which allows us - * to lazy load the context for one specific firewall only when we need it. - * - * @author Johannes M. Schmitt - */ -class FirewallContext -{ - private $listeners; - private $exceptionListener; - private $logoutListener; - private $config; - - /** - * @param iterable $listeners - */ - public function __construct(iterable $listeners, ExceptionListener $exceptionListener = null, LogoutListener $logoutListener = null, FirewallConfig $config = null) - { - $this->listeners = $listeners; - $this->exceptionListener = $exceptionListener; - $this->logoutListener = $logoutListener; - $this->config = $config; - } - - public function getConfig() - { - return $this->config; - } - - /** - * @return iterable - */ - public function getListeners(): iterable - { - return $this->listeners; - } - - public function getExceptionListener() - { - return $this->exceptionListener; - } - - public function getLogoutListener() - { - return $this->logoutListener; - } -} diff --git a/vendor/symfony/security-bundle/Security/FirewallMap.php b/vendor/symfony/security-bundle/Security/FirewallMap.php deleted file mode 100644 index 06cbc64..0000000 --- a/vendor/symfony/security-bundle/Security/FirewallMap.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Http\FirewallMapInterface; - -/** - * This is a lazy-loading firewall map implementation. - * - * Listeners will only be initialized if we really need them. - * - * @author Johannes M. Schmitt - */ -class FirewallMap implements FirewallMapInterface -{ - private $container; - private $map; - - public function __construct(ContainerInterface $container, iterable $map) - { - $this->container = $container; - $this->map = $map; - } - - public function getListeners(Request $request) - { - $context = $this->getFirewallContext($request); - - if (null === $context) { - return [[], null, null]; - } - - return [$context->getListeners(), $context->getExceptionListener(), $context->getLogoutListener()]; - } - - /** - * @return FirewallConfig|null - */ - public function getFirewallConfig(Request $request) - { - $context = $this->getFirewallContext($request); - - if (null === $context) { - return null; - } - - return $context->getConfig(); - } - - private function getFirewallContext(Request $request): ?FirewallContext - { - if ($request->attributes->has('_firewall_context')) { - $storedContextId = $request->attributes->get('_firewall_context'); - foreach ($this->map as $contextId => $requestMatcher) { - if ($contextId === $storedContextId) { - return $this->container->get($contextId); - } - } - - $request->attributes->remove('_firewall_context'); - } - - foreach ($this->map as $contextId => $requestMatcher) { - if (null === $requestMatcher || $requestMatcher->matches($request)) { - $request->attributes->set('_firewall_context', $contextId); - - return $this->container->get($contextId); - } - } - - return null; - } -} diff --git a/vendor/symfony/security-bundle/Security/LazyFirewallContext.php b/vendor/symfony/security-bundle/Security/LazyFirewallContext.php deleted file mode 100644 index 9d8396a..0000000 --- a/vendor/symfony/security-bundle/Security/LazyFirewallContext.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; -use Symfony\Component\Security\Http\Event\LazyResponseEvent; -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; -use Symfony\Component\Security\Http\Firewall\LogoutListener; - -/** - * Lazily calls authentication listeners when actually required by the access listener. - * - * @author Nicolas Grekas - */ -class LazyFirewallContext extends FirewallContext -{ - private $tokenStorage; - - public function __construct(iterable $listeners, ?ExceptionListener $exceptionListener, ?LogoutListener $logoutListener, ?FirewallConfig $config, TokenStorage $tokenStorage) - { - parent::__construct($listeners, $exceptionListener, $logoutListener, $config); - - $this->tokenStorage = $tokenStorage; - } - - public function getListeners(): iterable - { - return [$this]; - } - - public function __invoke(RequestEvent $event) - { - $listeners = []; - $request = $event->getRequest(); - $lazy = $request->isMethodCacheable(); - - foreach (parent::getListeners() as $listener) { - if (!$lazy || !$listener instanceof FirewallListenerInterface) { - $listeners[] = $listener; - $lazy = $lazy && $listener instanceof FirewallListenerInterface; - } elseif (false !== $supports = $listener->supports($request)) { - $listeners[] = [$listener, 'authenticate']; - $lazy = null === $supports; - } - } - - if (!$lazy) { - foreach ($listeners as $listener) { - $listener($event); - - if ($event->hasResponse()) { - return; - } - } - - return; - } - - $this->tokenStorage->setInitializer(function () use ($event, $listeners) { - $event = new LazyResponseEvent($event); - foreach ($listeners as $listener) { - $listener($event); - } - }); - } -} diff --git a/vendor/symfony/security-bundle/Security/LegacyLogoutHandlerListener.php b/vendor/symfony/security-bundle/Security/LegacyLogoutHandlerListener.php deleted file mode 100644 index cde7093..0000000 --- a/vendor/symfony/security-bundle/Security/LegacyLogoutHandlerListener.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; -use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface; - -/** - * @author Wouter de Jong - * - * @internal - */ -class LegacyLogoutHandlerListener implements EventSubscriberInterface -{ - private $logoutHandler; - - public function __construct(object $logoutHandler) - { - if (!$logoutHandler instanceof LogoutSuccessHandlerInterface && !$logoutHandler instanceof LogoutHandlerInterface) { - throw new \InvalidArgumentException(sprintf('An instance of "%s" or "%s" must be passed to "%s", "%s" given.', LogoutHandlerInterface::class, LogoutSuccessHandlerInterface::class, __METHOD__, get_debug_type($logoutHandler))); - } - - $this->logoutHandler = $logoutHandler; - } - - public function onLogout(LogoutEvent $event): void - { - if ($this->logoutHandler instanceof LogoutSuccessHandlerInterface) { - $event->setResponse($this->logoutHandler->onLogoutSuccess($event->getRequest())); - } elseif ($this->logoutHandler instanceof LogoutHandlerInterface) { - $this->logoutHandler->logout($event->getRequest(), $event->getResponse(), $event->getToken()); - } - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => 'onLogout', - ]; - } -} diff --git a/vendor/symfony/security-bundle/Security/UserAuthenticator.php b/vendor/symfony/security-bundle/Security/UserAuthenticator.php deleted file mode 100644 index 174f1d0..0000000 --- a/vendor/symfony/security-bundle/Security/UserAuthenticator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Security; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authentication\UserAuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; - -/** - * A decorator that delegates all method calls to the authenticator - * manager of the current firewall. - * - * @author Wouter de Jong - * - * @final - */ -class UserAuthenticator implements UserAuthenticatorInterface -{ - use FirewallAwareTrait; - - public function __construct(FirewallMap $firewallMap, ContainerInterface $userAuthenticators, RequestStack $requestStack) - { - $this->firewallMap = $firewallMap; - $this->locator = $userAuthenticators; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request, array $badges = []): ?Response - { - return $this->getForFirewall()->authenticateUser($user, $authenticator, $request, $badges); - } -} diff --git a/vendor/symfony/security-bundle/SecurityBundle.php b/vendor/symfony/security-bundle/SecurityBundle.php deleted file mode 100644 index 4c2c304..0000000 --- a/vendor/symfony/security-bundle/SecurityBundle.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle; - -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSecurityVotersPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddSessionDomainConstraintPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\CleanRememberMeVerifierPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterCsrfFeaturesPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterEntryPointPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterGlobalSecurityEventListenersPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterLdapLocatorPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\RegisterTokenUsageTrackingPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\ReplaceDecoratedRememberMeHandlerPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\SortFirewallListenersPass; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AnonymousFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\CustomAuthenticatorFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginLdapFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicLdapFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\JsonLoginFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\JsonLoginLdapFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\LoginLinkFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\LoginThrottlingFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RememberMeFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RemoteUserFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\X509Factory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\InMemoryFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider\LdapFactory; -use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\EventDispatcher\DependencyInjection\AddEventAliasesPass; -use Symfony\Component\HttpKernel\Bundle\Bundle; -use Symfony\Component\Security\Core\AuthenticationEvents; -use Symfony\Component\Security\Http\SecurityEvents; - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class SecurityBundle extends Bundle -{ - public function build(ContainerBuilder $container) - { - parent::build($container); - - /** @var SecurityExtension $extension */ - $extension = $container->getExtension('security'); - $extension->addAuthenticatorFactory(new FormLoginFactory()); - $extension->addAuthenticatorFactory(new FormLoginLdapFactory()); - $extension->addAuthenticatorFactory(new JsonLoginFactory()); - $extension->addAuthenticatorFactory(new JsonLoginLdapFactory()); - $extension->addAuthenticatorFactory(new HttpBasicFactory()); - $extension->addAuthenticatorFactory(new HttpBasicLdapFactory()); - $extension->addAuthenticatorFactory(new RememberMeFactory()); - $extension->addAuthenticatorFactory(new X509Factory()); - $extension->addAuthenticatorFactory(new RemoteUserFactory()); - $extension->addAuthenticatorFactory(new GuardAuthenticationFactory()); - $extension->addAuthenticatorFactory(new AnonymousFactory()); - $extension->addAuthenticatorFactory(new CustomAuthenticatorFactory()); - $extension->addAuthenticatorFactory(new LoginThrottlingFactory()); - $extension->addAuthenticatorFactory(new LoginLinkFactory()); - - $extension->addUserProviderFactory(new InMemoryFactory()); - $extension->addUserProviderFactory(new LdapFactory()); - $container->addCompilerPass(new AddExpressionLanguageProvidersPass()); - $container->addCompilerPass(new AddSecurityVotersPass()); - $container->addCompilerPass(new AddSessionDomainConstraintPass(), PassConfig::TYPE_BEFORE_REMOVING); - $container->addCompilerPass(new CleanRememberMeVerifierPass()); - $container->addCompilerPass(new RegisterCsrfFeaturesPass()); - $container->addCompilerPass(new RegisterTokenUsageTrackingPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 200); - $container->addCompilerPass(new RegisterLdapLocatorPass()); - $container->addCompilerPass(new RegisterEntryPointPass()); - // must be registered after RegisterListenersPass (in the FrameworkBundle) - $container->addCompilerPass(new RegisterGlobalSecurityEventListenersPass(), PassConfig::TYPE_BEFORE_REMOVING, -200); - // execute after ResolveChildDefinitionsPass optimization pass, to ensure class names are set - $container->addCompilerPass(new SortFirewallListenersPass(), PassConfig::TYPE_BEFORE_REMOVING); - $container->addCompilerPass(new ReplaceDecoratedRememberMeHandlerPass(), PassConfig::TYPE_OPTIMIZE); - - $container->addCompilerPass(new AddEventAliasesPass(array_merge( - AuthenticationEvents::ALIASES, - SecurityEvents::ALIASES - ))); - } -} diff --git a/vendor/symfony/security-bundle/composer.json b/vendor/symfony/security-bundle/composer.json deleted file mode 100644 index ee3e6e3..0000000 --- a/vendor/symfony/security-bundle/composer.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "symfony/security-bundle", - "type": "symfony-bundle", - "description": "Provides a tight integration of the Security component into the Symfony full-stack framework", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "ext-xml": "*", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/password-hasher": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/security-core": "^5.4|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-guard": "^5.3", - "symfony/security-http": "^5.4|^6.0" - }, - "require-dev": { - "doctrine/annotations": "^1.10.4", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/ldap": "^5.3|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/twig-bridge": "^4.4|^5.0|^6.0", - "symfony/validator": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "symfony/browser-kit": "<4.4", - "symfony/console": "<4.4", - "symfony/framework-bundle": "<4.4", - "symfony/ldap": "<5.1", - "symfony/twig-bundle": "<4.4" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\SecurityBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/security-core/Authentication/AuthenticationManagerInterface.php b/vendor/symfony/security-core/Authentication/AuthenticationManagerInterface.php deleted file mode 100644 index 151b4f4..0000000 --- a/vendor/symfony/security-core/Authentication/AuthenticationManagerInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * AuthenticationManagerInterface is the interface for authentication managers, - * which process Token authentication. - * - * @author Fabien Potencier - * - * @internal since Symfony 5.3 - */ -interface AuthenticationManagerInterface -{ - /** - * Attempts to authenticate a TokenInterface object. - * - * @return TokenInterface - * - * @throws AuthenticationException if the authentication fails - */ - public function authenticate(TokenInterface $token); -} diff --git a/vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php b/vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php deleted file mode 100644 index f8da847..0000000 --- a/vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\AuthenticationEvents; -use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; -use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; -use Symfony\Component\Security\Core\Exception\AccountStatusException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\ProviderNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AuthenticationProviderManager::class); - -// Help opcache.preload discover always-needed symbols -class_exists(AuthenticationEvents::class); -class_exists(AuthenticationFailureEvent::class); -class_exists(AuthenticationSuccessEvent::class); - -/** - * AuthenticationProviderManager uses a list of AuthenticationProviderInterface - * instances to authenticate a Token. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class AuthenticationProviderManager implements AuthenticationManagerInterface -{ - private $providers; - private $eraseCredentials; - private $eventDispatcher; - - /** - * @param iterable $providers An iterable with AuthenticationProviderInterface instances as values - * @param bool $eraseCredentials Whether to erase credentials after authentication or not - * - * @throws \InvalidArgumentException - */ - public function __construct(iterable $providers, bool $eraseCredentials = true) - { - if (!$providers) { - throw new \InvalidArgumentException('You must at least add one authentication provider.'); - } - - $this->providers = $providers; - $this->eraseCredentials = $eraseCredentials; - } - - public function setEventDispatcher(EventDispatcherInterface $dispatcher) - { - $this->eventDispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - $lastException = null; - $result = null; - - foreach ($this->providers as $provider) { - if (!$provider instanceof AuthenticationProviderInterface) { - throw new \InvalidArgumentException(sprintf('Provider "%s" must implement the AuthenticationProviderInterface.', get_debug_type($provider))); - } - - if (!$provider->supports($token)) { - continue; - } - - try { - $result = $provider->authenticate($token); - - if (null !== $result) { - break; - } - } catch (AccountStatusException $e) { - $lastException = $e; - - break; - } catch (AuthenticationException $e) { - $lastException = $e; - } catch (InvalidPasswordException $e) { - $lastException = new BadCredentialsException('Bad credentials.', 0, $e); - } - } - - if (null !== $result) { - if (true === $this->eraseCredentials) { - $result->eraseCredentials(); - } - - if (null !== $this->eventDispatcher) { - $this->eventDispatcher->dispatch(new AuthenticationSuccessEvent($result), AuthenticationEvents::AUTHENTICATION_SUCCESS); - } - - // @deprecated since Symfony 5.3 - if ($result->getUser() instanceof UserInterface && !method_exists($result->getUser(), 'getUserIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in user class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($result->getUser())); - } - - return $result; - } - - if (null === $lastException) { - $lastException = new ProviderNotFoundException(sprintf('No Authentication Provider found for token of class "%s".', \get_class($token))); - } - - if (null !== $this->eventDispatcher) { - $this->eventDispatcher->dispatch(new AuthenticationFailureEvent($token, $lastException), AuthenticationEvents::AUTHENTICATION_FAILURE); - } - - $lastException->setToken($token); - - throw $lastException; - } -} diff --git a/vendor/symfony/security-core/Authentication/AuthenticationTrustResolver.php b/vendor/symfony/security-core/Authentication/AuthenticationTrustResolver.php deleted file mode 100644 index 33f39d5..0000000 --- a/vendor/symfony/security-core/Authentication/AuthenticationTrustResolver.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication; - -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * The default implementation of the authentication trust resolver. - * - * @author Johannes M. Schmitt - */ -class AuthenticationTrustResolver implements AuthenticationTrustResolverInterface -{ - public function isAuthenticated(TokenInterface $token = null): bool - { - return $token && $token->getUser() - // @deprecated since Symfony 5.4, TokenInterface::isAuthenticated() and AnonymousToken no longer exists in 6.0 - && !$token instanceof AnonymousToken && (!method_exists($token, 'isAuthenticated') || $token->isAuthenticated(false)); - } - - /** - * {@inheritdoc} - */ - public function isAnonymous(TokenInterface $token = null/*, $deprecation = true*/) - { - if (1 === \func_num_args() || false !== func_get_arg(1)) { - trigger_deprecation('symfony/security-core', '5.4', 'The "%s()" method is deprecated, use "isAuthenticated()" or "isFullFledged()" if you want to check if the request is (fully) authenticated.', __METHOD__); - } - - return $token instanceof AnonymousToken || ($token && !$token->getUser()); - } - - /** - * {@inheritdoc} - */ - public function isRememberMe(TokenInterface $token = null) - { - return $token && $token instanceof RememberMeToken; - } - - /** - * {@inheritdoc} - */ - public function isFullFledged(TokenInterface $token = null) - { - return $token && !$this->isAnonymous($token, false) && !$this->isRememberMe($token); - } -} diff --git a/vendor/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php b/vendor/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php deleted file mode 100644 index 1122ffe..0000000 --- a/vendor/symfony/security-core/Authentication/AuthenticationTrustResolverInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * Interface for resolving the authentication status of a given token. - * - * @author Johannes M. Schmitt - * - * @method bool isAuthenticated(TokenInterface $token = null) - */ -interface AuthenticationTrustResolverInterface -{ - /** - * Resolves whether the passed token implementation is authenticated - * anonymously. - * - * If null is passed, the method must return false. - * - * @return bool - * - * @deprecated since Symfony 5.4, use !isAuthenticated() instead - */ - public function isAnonymous(TokenInterface $token = null); - - /** - * Resolves whether the passed token implementation is authenticated - * using remember-me capabilities. - * - * @return bool - */ - public function isRememberMe(TokenInterface $token = null); - - /** - * Resolves whether the passed token implementation is fully authenticated. - * - * @return bool - */ - public function isFullFledged(TokenInterface $token = null); -} diff --git a/vendor/symfony/security-core/Authentication/Provider/AnonymousAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/AnonymousAuthenticationProvider.php deleted file mode 100644 index 53f8cf1..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/AnonymousAuthenticationProvider.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AnonymousAuthenticationProvider::class); - -/** - * AnonymousAuthenticationProvider validates AnonymousToken instances. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class AnonymousAuthenticationProvider implements AuthenticationProviderInterface -{ - /** - * Used to determine if the token is created by the application - * instead of a malicious client. - * - * @var string - */ - private $secret; - - /** - * @param string $secret The secret shared with the AnonymousToken - */ - public function __construct(string $secret) - { - $this->secret = $secret; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - if ($this->secret !== $token->getSecret()) { - throw new BadCredentialsException('The Token does not contain the expected key.'); - } - - return $token; - } - - /** - * {@inheritdoc} - */ - public function supports(TokenInterface $token) - { - return $token instanceof AnonymousToken; - } -} diff --git a/vendor/symfony/security-core/Authentication/Provider/AuthenticationProviderInterface.php b/vendor/symfony/security-core/Authentication/Provider/AuthenticationProviderInterface.php deleted file mode 100644 index fb57ed8..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/AuthenticationProviderInterface.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" interface is deprecated, use the new authenticator system instead.', AuthenticationProviderInterface::class); - -/** - * AuthenticationProviderInterface is the interface for all authentication - * providers. - * - * Concrete implementations processes specific Token instances. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -interface AuthenticationProviderInterface extends AuthenticationManagerInterface -{ - /** - * Use this constant for not provided username. - * - * @var string - */ - public const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED'; - - /** - * Checks whether this provider supports the given token. - * - * @return bool - */ - public function supports(TokenInterface $token); -} diff --git a/vendor/symfony/security-core/Authentication/Provider/DaoAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/DaoAuthenticationProvider.php deleted file mode 100644 index a0e01da..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/DaoAuthenticationProvider.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', DaoAuthenticationProvider::class); - -/** - * DaoAuthenticationProvider uses a UserProviderInterface to retrieve the user - * for a UsernamePasswordToken. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class DaoAuthenticationProvider extends UserAuthenticationProvider -{ - private $hasherFactory; - private $userProvider; - - /** - * @param PasswordHasherFactoryInterface $hasherFactory - */ - public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, string $providerKey, $hasherFactory, bool $hideUserNotFoundExceptions = true) - { - parent::__construct($userChecker, $providerKey, $hideUserNotFoundExceptions); - - if ($hasherFactory instanceof EncoderFactoryInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Passing a "%s" instance to the "%s" constructor is deprecated, use "%s" instead.', EncoderFactoryInterface::class, __CLASS__, PasswordHasherFactoryInterface::class); - } - - $this->hasherFactory = $hasherFactory; - $this->userProvider = $userProvider; - } - - /** - * {@inheritdoc} - */ - protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token) - { - $currentUser = $token->getUser(); - if ($currentUser instanceof UserInterface) { - if ($currentUser->getPassword() !== $user->getPassword()) { - throw new BadCredentialsException('The credentials were changed from another session.'); - } - } else { - if ('' === ($presentedPassword = $token->getCredentials())) { - throw new BadCredentialsException('The presented password cannot be empty.'); - } - - if (null === $user->getPassword()) { - throw new BadCredentialsException('The presented password is invalid.'); - } - - if (!$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Using password-based authentication listeners while not implementing "%s" interface from class "%s" is deprecated.', PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $salt = $user->getSalt(); - if ($salt && !$user instanceof LegacyPasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - // deprecated since Symfony 5.3 - if ($this->hasherFactory instanceof EncoderFactoryInterface) { - $encoder = $this->hasherFactory->getEncoder($user); - - if (!$encoder->isPasswordValid($user->getPassword(), $presentedPassword, $salt)) { - throw new BadCredentialsException('The presented password is invalid.'); - } - - if ($this->userProvider instanceof PasswordUpgraderInterface && method_exists($encoder, 'needsRehash') && $encoder->needsRehash($user->getPassword())) { - $this->userProvider->upgradePassword($user, $encoder->encodePassword($presentedPassword, $user->getSalt())); - } - - return; - } - - $hasher = $this->hasherFactory->getPasswordHasher($user); - - if (!$hasher->verify($user->getPassword(), $presentedPassword, $salt)) { - throw new BadCredentialsException('The presented password is invalid.'); - } - - if ($this->userProvider instanceof PasswordUpgraderInterface && $hasher->needsRehash($user->getPassword())) { - $this->userProvider->upgradePassword($user, $hasher->hash($presentedPassword, $salt)); - } - } - } - - /** - * {@inheritdoc} - */ - protected function retrieveUser(string $userIdentifier, UsernamePasswordToken $token) - { - $user = $token->getUser(); - if ($user instanceof UserInterface) { - return $user; - } - - try { - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($this->userProvider, 'loadUserByIdentifier')) { - $user = $this->userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $user = $this->userProvider->loadUserByUsername($userIdentifier); - } - - if (!$user instanceof UserInterface) { - throw new AuthenticationServiceException('The user provider must return a UserInterface object.'); - } - - return $user; - } catch (UserNotFoundException $e) { - $e->setUserIdentifier($userIdentifier); - throw $e; - } catch (\Exception $e) { - $e = new AuthenticationServiceException($e->getMessage(), 0, $e); - $e->setToken($token); - throw $e; - } - } -} diff --git a/vendor/symfony/security-core/Authentication/Provider/LdapBindAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/LdapBindAuthenticationProvider.php deleted file mode 100644 index ec2bc56..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/LdapBindAuthenticationProvider.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Ldap\Exception\ConnectionException; -use Symfony\Component\Ldap\LdapInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', LdapBindAuthenticationProvider::class); - -/** - * LdapBindAuthenticationProvider authenticates a user against an LDAP server. - * - * The only way to check user credentials is to try to connect the user with its - * credentials to the ldap. - * - * @author Charles Sarrazin - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class LdapBindAuthenticationProvider extends UserAuthenticationProvider -{ - private $userProvider; - private $ldap; - private $dnString; - private $queryString; - private $searchDn; - private $searchPassword; - - public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, string $providerKey, LdapInterface $ldap, string $dnString = '{user_identifier}', bool $hideUserNotFoundExceptions = true, string $searchDn = '', string $searchPassword = '') - { - parent::__construct($userChecker, $providerKey, $hideUserNotFoundExceptions); - - $this->userProvider = $userProvider; - $this->ldap = $ldap; - $this->dnString = $dnString; - $this->searchDn = $searchDn; - $this->searchPassword = $searchPassword; - } - - /** - * Set a query string to use in order to find a DN for the user identifier. - */ - public function setQueryString(string $queryString) - { - $this->queryString = $queryString; - } - - /** - * {@inheritdoc} - */ - protected function retrieveUser(string $userIdentifier, UsernamePasswordToken $token) - { - if (AuthenticationProviderInterface::USERNAME_NONE_PROVIDED === $userIdentifier) { - throw new UserNotFoundException('User identifier cannot be null.'); - } - - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($this->userProvider, 'loadUserByIdentifier')) { - return $this->userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - return $this->userProvider->loadUserByUsername($userIdentifier); - } - } - - /** - * {@inheritdoc} - */ - protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token) - { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - $userIdentifier = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(); - $password = $token->getCredentials(); - - if ('' === (string) $password) { - throw new BadCredentialsException('The presented password must not be empty.'); - } - - try { - if ($this->queryString) { - if ('' !== $this->searchDn && '' !== $this->searchPassword) { - $this->ldap->bind($this->searchDn, $this->searchPassword); - } else { - throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.'); - } - $userIdentifier = $this->ldap->escape($userIdentifier, '', LdapInterface::ESCAPE_FILTER); - $query = str_replace(['{username}', '{user_identifier}'], $userIdentifier, $this->queryString); - $result = $this->ldap->query($this->dnString, $query)->execute(); - if (1 !== $result->count()) { - throw new BadCredentialsException('The presented username is invalid.'); - } - - $dn = $result[0]->getDn(); - } else { - $userIdentifier = $this->ldap->escape($userIdentifier, '', LdapInterface::ESCAPE_DN); - $dn = str_replace(['{username}', '{user_identifier}'], $userIdentifier, $this->dnString); - } - - $this->ldap->bind($dn, $password); - } catch (ConnectionException $e) { - throw new BadCredentialsException('The presented password is invalid.'); - } - } -} diff --git a/vendor/symfony/security-core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php deleted file mode 100644 index d81e31b..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', PreAuthenticatedAuthenticationProvider::class); - -/** - * Processes a pre-authenticated authentication request. - * - * This authentication provider will not perform any checks on authentication - * requests, as they should already be pre-authenticated. However, the - * UserProviderInterface implementation may still throw a - * UserNotFoundException, for example. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderInterface -{ - private $userProvider; - private $userChecker; - private $providerKey; - - public function __construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, string $providerKey) - { - $this->userProvider = $userProvider; - $this->userChecker = $userChecker; - $this->providerKey = $providerKey; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - if (!$user = $token->getUser()) { - throw new BadCredentialsException('No pre-authenticated principal found in request.'); - } - - $userIdentifier = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(); - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($this->userProvider, 'loadUserByIdentifier')) { - $user = $this->userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $user = $this->userProvider->loadUserByUsername($userIdentifier); - } - - $this->userChecker->checkPostAuth($user); - - $authenticatedToken = new PreAuthenticatedToken($user, $token->getCredentials(), $this->providerKey, $user->getRoles()); - $authenticatedToken->setAttributes($token->getAttributes()); - - return $authenticatedToken; - } - - /** - * {@inheritdoc} - */ - public function supports(TokenInterface $token) - { - return $token instanceof PreAuthenticatedToken && $this->providerKey === $token->getFirewallName(); - } -} diff --git a/vendor/symfony/security-core/Authentication/Provider/RememberMeAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/RememberMeAuthenticationProvider.php deleted file mode 100644 index 2fd52f2..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/RememberMeAuthenticationProvider.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', RememberMeAuthenticationProvider::class); - -/** - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class RememberMeAuthenticationProvider implements AuthenticationProviderInterface -{ - private $userChecker; - private $secret; - private $providerKey; - - /** - * @param string $secret A secret - * @param string $providerKey A provider secret - */ - public function __construct(UserCheckerInterface $userChecker, string $secret, string $providerKey) - { - $this->userChecker = $userChecker; - $this->secret = $secret; - $this->providerKey = $providerKey; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - if ($this->secret !== $token->getSecret()) { - throw new BadCredentialsException('The presented secret does not match.'); - } - - $user = $token->getUser(); - - if (!$user instanceof UserInterface) { - throw new LogicException(sprintf('Method "%s::getUser()" must return a "%s" instance, "%s" returned.', get_debug_type($token), UserInterface::class, get_debug_type($user))); - } - - $this->userChecker->checkPreAuth($user); - $this->userChecker->checkPostAuth($user); - - $authenticatedToken = new RememberMeToken($user, $this->providerKey, $this->secret); - $authenticatedToken->setAttributes($token->getAttributes()); - - return $authenticatedToken; - } - - /** - * {@inheritdoc} - */ - public function supports(TokenInterface $token) - { - return $token instanceof RememberMeToken && $token->getFirewallName() === $this->providerKey; - } -} diff --git a/vendor/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php b/vendor/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php deleted file mode 100644 index c038c76..0000000 --- a/vendor/symfony/security-core/Authentication/Provider/UserAuthenticationProvider.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Provider; - -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AccountStatusException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', UserAuthenticationProvider::class); - -/** - * UserProviderInterface retrieves users for UsernamePasswordToken tokens. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -abstract class UserAuthenticationProvider implements AuthenticationProviderInterface -{ - private $hideUserNotFoundExceptions; - private $userChecker; - private $providerKey; - - /** - * @throws \InvalidArgumentException - */ - public function __construct(UserCheckerInterface $userChecker, string $providerKey, bool $hideUserNotFoundExceptions = true) - { - if (empty($providerKey)) { - throw new \InvalidArgumentException('$providerKey must not be empty.'); - } - - $this->userChecker = $userChecker; - $this->providerKey = $providerKey; - $this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - $username = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(); - if ('' === $username || null === $username) { - $username = AuthenticationProviderInterface::USERNAME_NONE_PROVIDED; - } - - try { - $user = $this->retrieveUser($username, $token); - } catch (UserNotFoundException $e) { - if ($this->hideUserNotFoundExceptions) { - throw new BadCredentialsException('Bad credentials.', 0, $e); - } - $e->setUserIdentifier($username); - - throw $e; - } - - if (!$user instanceof UserInterface) { - throw new AuthenticationServiceException('retrieveUser() must return a UserInterface.'); - } - - try { - $this->userChecker->checkPreAuth($user); - $this->checkAuthentication($user, $token); - $this->userChecker->checkPostAuth($user); - } catch (AccountStatusException|BadCredentialsException $e) { - if ($this->hideUserNotFoundExceptions && !$e instanceof CustomUserMessageAccountStatusException) { - throw new BadCredentialsException('Bad credentials.', 0, $e); - } - - throw $e; - } - - if ($token instanceof SwitchUserToken) { - $authenticatedToken = new SwitchUserToken($user, $token->getCredentials(), $this->providerKey, $user->getRoles(), $token->getOriginalToken()); - } else { - $authenticatedToken = new UsernamePasswordToken($user, $token->getCredentials(), $this->providerKey, $user->getRoles()); - } - - $authenticatedToken->setAttributes($token->getAttributes()); - - return $authenticatedToken; - } - - /** - * {@inheritdoc} - */ - public function supports(TokenInterface $token) - { - return $token instanceof UsernamePasswordToken && $this->providerKey === $token->getFirewallName(); - } - - /** - * Retrieves the user from an implementation-specific location. - * - * @return UserInterface - * - * @throws AuthenticationException if the credentials could not be validated - */ - abstract protected function retrieveUser(string $username, UsernamePasswordToken $token); - - /** - * Does additional checks on the user and token (like validating the - * credentials). - * - * @throws AuthenticationException if the credentials could not be validated - */ - abstract protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token); -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php b/vendor/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php deleted file mode 100644 index 340bc87..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/CacheTokenVerifier.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * @author Jordi Boggiano - */ -class CacheTokenVerifier implements TokenVerifierInterface -{ - private $cache; - private $outdatedTokenTtl; - private $cacheKeyPrefix; - - /** - * @param int $outdatedTokenTtl How long the outdated token should still be considered valid. Defaults - * to 60, which matches how often the PersistentRememberMeHandler will at - * most refresh tokens. Increasing to more than that is not recommended, - * but you may use a lower value. - */ - public function __construct(CacheItemPoolInterface $cache, int $outdatedTokenTtl = 60, string $cacheKeyPrefix = 'rememberme-stale-') - { - $this->cache = $cache; - $this->outdatedTokenTtl = $outdatedTokenTtl; - $this->cacheKeyPrefix = $cacheKeyPrefix; - } - - /** - * {@inheritdoc} - */ - public function verifyToken(PersistentTokenInterface $token, string $tokenValue): bool - { - if (hash_equals($token->getTokenValue(), $tokenValue)) { - return true; - } - - $cacheKey = $this->getCacheKey($token); - $item = $this->cache->getItem($cacheKey); - if (!$item->isHit()) { - return false; - } - - $outdatedToken = $item->get(); - - return hash_equals($outdatedToken, $tokenValue); - } - - /** - * {@inheritdoc} - */ - public function updateExistingToken(PersistentTokenInterface $token, string $tokenValue, \DateTimeInterface $lastUsed): void - { - // When a token gets updated, persist the outdated token for $outdatedTokenTtl seconds so we can - // still accept it as valid in verifyToken - $item = $this->cache->getItem($this->getCacheKey($token)); - $item->set($token->getTokenValue()); - $item->expiresAfter($this->outdatedTokenTtl); - $this->cache->save($item); - } - - private function getCacheKey(PersistentTokenInterface $token): string - { - return $this->cacheKeyPrefix.rawurlencode($token->getSeries()); - } -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php b/vendor/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php deleted file mode 100644 index 571bbe0..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/InMemoryTokenProvider.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -use Symfony\Component\Security\Core\Exception\TokenNotFoundException; - -/** - * This class is used for testing purposes, and is not really suited for production. - * - * @author Johannes M. Schmitt - */ -class InMemoryTokenProvider implements TokenProviderInterface -{ - private $tokens = []; - - /** - * {@inheritdoc} - */ - public function loadTokenBySeries(string $series) - { - if (!isset($this->tokens[$series])) { - throw new TokenNotFoundException('No token found.'); - } - - return $this->tokens[$series]; - } - - /** - * {@inheritdoc} - */ - public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed) - { - if (!isset($this->tokens[$series])) { - throw new TokenNotFoundException('No token found.'); - } - - $token = new PersistentToken( - $this->tokens[$series]->getClass(), - method_exists($this->tokens[$series], 'getUserIdentifier') ? $this->tokens[$series]->getUserIdentifier() : $this->tokens[$series]->getUsername(), - $series, - $tokenValue, - $lastUsed - ); - $this->tokens[$series] = $token; - } - - /** - * {@inheritdoc} - */ - public function deleteTokenBySeries(string $series) - { - unset($this->tokens[$series]); - } - - /** - * {@inheritdoc} - */ - public function createNewToken(PersistentTokenInterface $token) - { - $this->tokens[$token->getSeries()] = $token; - } -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/PersistentToken.php b/vendor/symfony/security-core/Authentication/RememberMe/PersistentToken.php deleted file mode 100644 index b8337ad..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/PersistentToken.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -/** - * @author Johannes M. Schmitt - * - * @internal - */ -final class PersistentToken implements PersistentTokenInterface -{ - private $class; - private $userIdentifier; - private $series; - private $tokenValue; - private $lastUsed; - - public function __construct(string $class, string $userIdentifier, string $series, string $tokenValue, \DateTime $lastUsed) - { - if (empty($class)) { - throw new \InvalidArgumentException('$class must not be empty.'); - } - if ('' === $userIdentifier) { - throw new \InvalidArgumentException('$userIdentifier must not be empty.'); - } - if (empty($series)) { - throw new \InvalidArgumentException('$series must not be empty.'); - } - if (empty($tokenValue)) { - throw new \InvalidArgumentException('$tokenValue must not be empty.'); - } - - $this->class = $class; - $this->userIdentifier = $userIdentifier; - $this->series = $series; - $this->tokenValue = $tokenValue; - $this->lastUsed = $lastUsed; - } - - /** - * {@inheritdoc} - */ - public function getClass(): string - { - return $this->class; - } - - /** - * {@inheritdoc} - */ - public function getUsername(): string - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__); - - return $this->userIdentifier; - } - - public function getUserIdentifier(): string - { - return $this->userIdentifier; - } - - /** - * {@inheritdoc} - */ - public function getSeries(): string - { - return $this->series; - } - - /** - * {@inheritdoc} - */ - public function getTokenValue(): string - { - return $this->tokenValue; - } - - /** - * {@inheritdoc} - */ - public function getLastUsed(): \DateTime - { - return $this->lastUsed; - } -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php b/vendor/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php deleted file mode 100644 index e2bf2fe..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/PersistentTokenInterface.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -/** - * Interface to be implemented by persistent token classes (such as - * Doctrine entities representing a remember-me token). - * - * @method string getUserIdentifier() returns the identifier used to authenticate (e.g. their email address or username) - * - * @author Johannes M. Schmitt - */ -interface PersistentTokenInterface -{ - /** - * Returns the class of the user. - * - * @return string - */ - public function getClass(); - - /** - * Returns the series. - * - * @return string - */ - public function getSeries(); - - /** - * Returns the token value. - * - * @return string - */ - public function getTokenValue(); - - /** - * Returns the time the token was last used. - * - * @return \DateTime - */ - public function getLastUsed(); - - /** - * @return string - * - * @deprecated since Symfony 5.3, use getUserIdentifier() instead - */ - public function getUsername(); -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php b/vendor/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php deleted file mode 100644 index eda4730..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/TokenProviderInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -use Symfony\Component\Security\Core\Exception\TokenNotFoundException; - -/** - * Interface for TokenProviders. - * - * @author Johannes M. Schmitt - */ -interface TokenProviderInterface -{ - /** - * Loads the active token for the given series. - * - * @return PersistentTokenInterface - * - * @throws TokenNotFoundException if the token is not found - */ - public function loadTokenBySeries(string $series); - - /** - * Deletes all tokens belonging to series. - */ - public function deleteTokenBySeries(string $series); - - /** - * Updates the token according to this data. - * - * @throws TokenNotFoundException if the token is not found - */ - public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed); - - /** - * Creates a new token. - */ - public function createNewToken(PersistentTokenInterface $token); -} diff --git a/vendor/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php b/vendor/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php deleted file mode 100644 index 57278d9..0000000 --- a/vendor/symfony/security-core/Authentication/RememberMe/TokenVerifierInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\RememberMe; - -/** - * @author Jordi Boggiano - */ -interface TokenVerifierInterface -{ - /** - * Verifies that the given $token is valid. - * - * This lets you override the token check logic to for example accept slightly outdated tokens. - * - * Do not forget to implement token comparisons using hash_equals for a secure implementation. - */ - public function verifyToken(PersistentTokenInterface $token, string $tokenValue): bool; - - /** - * Updates an existing token with a new token value and lastUsed time. - */ - public function updateExistingToken(PersistentTokenInterface $token, string $tokenValue, \DateTimeInterface $lastUsed): void; -} diff --git a/vendor/symfony/security-core/Authentication/Token/AbstractToken.php b/vendor/symfony/security-core/Authentication/Token/AbstractToken.php deleted file mode 100644 index efe3318..0000000 --- a/vendor/symfony/security-core/Authentication/Token/AbstractToken.php +++ /dev/null @@ -1,332 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\EquatableInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Base class for Token instances. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -abstract class AbstractToken implements TokenInterface -{ - private $user; - private $roleNames = []; - private $authenticated = false; - private $attributes = []; - - /** - * @param string[] $roles An array of roles - * - * @throws \InvalidArgumentException - */ - public function __construct(array $roles = []) - { - foreach ($roles as $role) { - $this->roleNames[] = $role; - } - } - - /** - * {@inheritdoc} - */ - public function getRoleNames(): array - { - return $this->roleNames; - } - - /** - * {@inheritdoc} - */ - public function getUsername(/* $legacy = true */) - { - if (1 === \func_num_args() && false === func_get_arg(0)) { - return null; - } - - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__); - - if ($this->user instanceof UserInterface) { - return method_exists($this->user, 'getUserIdentifier') ? $this->user->getUserIdentifier() : $this->user->getUsername(); - } - - return (string) $this->user; - } - - /** - * {@inheritdoc} - */ - public function getUserIdentifier(): string - { - // method returns "null" in non-legacy mode if not overridden - $username = $this->getUsername(false); - if (null !== $username) { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s::getUsername()" is deprecated, override "getUserIdentifier()" instead.', get_debug_type($this)); - } - - if ($this->user instanceof UserInterface) { - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - return method_exists($this->user, 'getUserIdentifier') ? $this->user->getUserIdentifier() : $this->user->getUsername(); - } - - return (string) $this->user; - } - - /** - * {@inheritdoc} - */ - public function getUser() - { - return $this->user; - } - - /** - * {@inheritdoc} - */ - public function setUser($user) - { - if (!($user instanceof UserInterface || (\is_object($user) && method_exists($user, '__toString')) || \is_string($user))) { - throw new \InvalidArgumentException('$user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string.'); - } - - if (!$user instanceof UserInterface) { - trigger_deprecation('symfony/security-core', '5.4', 'Using an object that is not an instance of "%s" as $user in "%s" is deprecated.', UserInterface::class, static::class); - } - - // @deprecated since Symfony 5.4, remove the whole block if/elseif/else block in 6.0 - if (1 < \func_num_args() && !func_get_arg(1)) { - // ContextListener checks if the user has changed on its own and calls `setAuthenticated()` subsequently, - // avoid doing the same checks twice - $changed = false; - } elseif (null === $this->user) { - $changed = false; - } elseif ($this->user instanceof UserInterface) { - if (!$user instanceof UserInterface) { - $changed = true; - } else { - $changed = $this->hasUserChanged($user); - } - } elseif ($user instanceof UserInterface) { - $changed = true; - } else { - $changed = (string) $this->user !== (string) $user; - } - - // @deprecated since Symfony 5.4 - if ($changed) { - $this->setAuthenticated(false, false); - } - - $this->user = $user; - } - - /** - * {@inheritdoc} - * - * @deprecated since Symfony 5.4 - */ - public function isAuthenticated() - { - if (1 > \func_num_args() || func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s()" is deprecated, return null from "getUser()" instead when a token is not authenticated.', __METHOD__); - } - - return $this->authenticated; - } - - /** - * {@inheritdoc} - */ - public function setAuthenticated(bool $authenticated) - { - if (2 > \func_num_args() || func_get_arg(1)) { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s()" is deprecated', __METHOD__); - } - - $this->authenticated = $authenticated; - } - - /** - * {@inheritdoc} - */ - public function eraseCredentials() - { - if ($this->getUser() instanceof UserInterface) { - $this->getUser()->eraseCredentials(); - } - } - - /** - * Returns all the necessary state of the object for serialization purposes. - * - * There is no need to serialize any entry, they should be returned as-is. - * If you extend this method, keep in mind you MUST guarantee parent data is present in the state. - * Here is an example of how to extend this method: - * - * public function __serialize(): array - * { - * return [$this->childAttribute, parent::__serialize()]; - * } - * - * - * @see __unserialize() - */ - public function __serialize(): array - { - return [$this->user, $this->authenticated, null, $this->attributes, $this->roleNames]; - } - - /** - * Restores the object state from an array given by __serialize(). - * - * There is no need to unserialize any entry in $data, they are already ready-to-use. - * If you extend this method, keep in mind you MUST pass the parent data to its respective class. - * Here is an example of how to extend this method: - * - * public function __unserialize(array $data): void - * { - * [$this->childAttribute, $parentData] = $data; - * parent::__unserialize($parentData); - * } - * - * - * @see __serialize() - */ - public function __unserialize(array $data): void - { - [$this->user, $this->authenticated, , $this->attributes, $this->roleNames] = $data; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function setAttributes(array $attributes) - { - $this->attributes = $attributes; - } - - /** - * {@inheritdoc} - */ - public function hasAttribute(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function getAttribute(string $name) - { - if (!\array_key_exists($name, $this->attributes)) { - throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name)); - } - - return $this->attributes[$name]; - } - - /** - * {@inheritdoc} - */ - public function setAttribute(string $name, $value) - { - $this->attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - $class = static::class; - $class = substr($class, strrpos($class, '\\') + 1); - - $roles = []; - foreach ($this->roleNames as $role) { - $roles[] = $role; - } - - return sprintf('%s(user="%s", authenticated=%s, roles="%s")', $class, $this->getUserIdentifier(), json_encode($this->authenticated), implode(', ', $roles)); - } - - /** - * @internal - */ - final public function serialize(): string - { - return serialize($this->__serialize()); - } - - /** - * @internal - */ - final public function unserialize($serialized) - { - $this->__unserialize(\is_array($serialized) ? $serialized : unserialize($serialized)); - } - - /** - * @deprecated since Symfony 5.4 - */ - private function hasUserChanged(UserInterface $user): bool - { - if (!($this->user instanceof UserInterface)) { - throw new \BadMethodCallException('Method "hasUserChanged" should be called when current user class is instance of "UserInterface".'); - } - - if ($this->user instanceof EquatableInterface) { - return !(bool) $this->user->isEqualTo($user); - } - - // @deprecated since Symfony 5.3, check for PasswordAuthenticatedUserInterface on both user objects before comparing passwords - if ($this->user->getPassword() !== $user->getPassword()) { - return true; - } - - // @deprecated since Symfony 5.3, check for LegacyPasswordAuthenticatedUserInterface on both user objects before comparing salts - if ($this->user->getSalt() !== $user->getSalt()) { - return true; - } - - $userRoles = array_map('strval', (array) $user->getRoles()); - - if ($this instanceof SwitchUserToken) { - $userRoles[] = 'ROLE_PREVIOUS_ADMIN'; - } - - if (\count($userRoles) !== \count($this->getRoleNames()) || \count($userRoles) !== \count(array_intersect($userRoles, $this->getRoleNames()))) { - return true; - } - - // @deprecated since Symfony 5.3, drop getUsername() in 6.0 - $userIdentifier = function ($user) { - return method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(); - }; - if ($userIdentifier($this->user) !== $userIdentifier($user)) { - return true; - } - - return false; - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/AnonymousToken.php b/vendor/symfony/security-core/Authentication/Token/AnonymousToken.php deleted file mode 100644 index 5d585fe..0000000 --- a/vendor/symfony/security-core/Authentication/Token/AnonymousToken.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * AnonymousToken represents an anonymous token. - * - * @author Fabien Potencier - * - * @deprecated since 5.4, anonymous is now represented by the absence of a token - */ -class AnonymousToken extends AbstractToken -{ - private $secret; - - /** - * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client - * @param string|\Stringable|UserInterface $user - * @param string[] $roles - */ - public function __construct(string $secret, $user, array $roles = []) - { - trigger_deprecation('symfony/security-core', '5.4', 'The "%s" class is deprecated.', __CLASS__); - - parent::__construct($roles); - - $this->secret = $secret; - $this->setUser($user); - // @deprecated since Symfony 5.4 - $this->setAuthenticated(true, false); - } - - /** - * {@inheritdoc} - */ - public function getCredentials() - { - return ''; - } - - /** - * Returns the secret. - * - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->secret, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->secret, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/NullToken.php b/vendor/symfony/security-core/Authentication/Token/NullToken.php deleted file mode 100644 index 1b30d5a..0000000 --- a/vendor/symfony/security-core/Authentication/Token/NullToken.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -/** - * @author Wouter de Jong - */ -class NullToken implements TokenInterface -{ - public function __toString(): string - { - return ''; - } - - public function getRoleNames(): array - { - return []; - } - - public function getCredentials() - { - return ''; - } - - public function getUser() - { - return null; - } - - public function setUser($user) - { - throw new \BadMethodCallException('Cannot set user on a NullToken.'); - } - - public function getUsername() - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__); - - return ''; - } - - public function getUserIdentifier(): string - { - return ''; - } - - /** - * @deprecated since Symfony 5.4 - */ - public function isAuthenticated() - { - if (0 === \func_num_args() || func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s()" is deprecated, return null from "getUser()" instead when a token is not authenticated.', __METHOD__); - } - - return true; - } - - /** - * @deprecated since Symfony 5.4 - */ - public function setAuthenticated(bool $isAuthenticated) - { - throw new \BadMethodCallException('Cannot change authentication state of NullToken.'); - } - - public function eraseCredentials() - { - } - - public function getAttributes() - { - return []; - } - - public function setAttributes(array $attributes) - { - throw new \BadMethodCallException('Cannot set attributes of NullToken.'); - } - - public function hasAttribute(string $name) - { - return false; - } - - public function getAttribute(string $name) - { - return null; - } - - public function setAttribute(string $name, $value) - { - throw new \BadMethodCallException('Cannot add attribute to NullToken.'); - } - - public function __serialize(): array - { - return []; - } - - public function __unserialize(array $data): void - { - } - - /** - * @return string - * - * @internal in 5.3 - * @final in 5.3 - */ - public function serialize() - { - return ''; - } - - /** - * @return void - * - * @internal in 5.3 - * @final in 5.3 - */ - public function unserialize($serialized) - { - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php b/vendor/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php deleted file mode 100644 index ea5c534..0000000 --- a/vendor/symfony/security-core/Authentication/Token/PreAuthenticatedToken.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * PreAuthenticatedToken implements a pre-authenticated token. - * - * @author Fabien Potencier - */ -class PreAuthenticatedToken extends AbstractToken -{ - private $credentials; - private $firewallName; - - /** - * @param UserInterface $user - * @param string $firewallName - * @param string[] $roles - */ - public function __construct($user, /*string*/ $firewallName, /*array*/ $roles = []) - { - if (\is_string($roles)) { - trigger_deprecation('symfony/security-core', '5.4', 'Argument $credentials of "%s()" is deprecated.', __METHOD__); - - $credentials = $firewallName; - $firewallName = $roles; - $roles = \func_num_args() > 3 ? func_get_arg(3) : []; - } - - parent::__construct($roles); - - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - - $this->setUser($user); - $this->credentials = $credentials ?? null; - $this->firewallName = $firewallName; - - if ($roles) { - $this->setAuthenticated(true, false); - } - } - - /** - * Returns the provider key. - * - * @return string The provider key - * - * @deprecated since Symfony 5.2, use getFirewallName() instead - */ - public function getProviderKey() - { - if (1 !== \func_num_args() || true !== func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.2', 'Method "%s()" is deprecated, use "getFirewallName()" instead.', __METHOD__); - } - - return $this->firewallName; - } - - public function getFirewallName(): string - { - return $this->getProviderKey(true); - } - - /** - * {@inheritdoc} - */ - public function getCredentials() - { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s()" is deprecated.', __METHOD__); - - return $this->credentials; - } - - /** - * {@inheritdoc} - */ - public function eraseCredentials() - { - parent::eraseCredentials(); - - $this->credentials = null; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->credentials, $this->firewallName, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->credentials, $this->firewallName, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/RememberMeToken.php b/vendor/symfony/security-core/Authentication/Token/RememberMeToken.php deleted file mode 100644 index f74ef00..0000000 --- a/vendor/symfony/security-core/Authentication/Token/RememberMeToken.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Authentication Token for "Remember-Me". - * - * @author Johannes M. Schmitt - */ -class RememberMeToken extends AbstractToken -{ - private $secret; - private $firewallName; - - /** - * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client - * - * @throws \InvalidArgumentException - */ - public function __construct(UserInterface $user, string $firewallName, string $secret) - { - parent::__construct($user->getRoles()); - - if (empty($secret)) { - throw new \InvalidArgumentException('$secret must not be empty.'); - } - - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - - $this->firewallName = $firewallName; - $this->secret = $secret; - - $this->setUser($user); - parent::setAuthenticated(true, false); - } - - /** - * {@inheritdoc} - */ - public function setAuthenticated(bool $authenticated) - { - if ($authenticated) { - throw new \LogicException('You cannot set this token to authenticated after creation.'); - } - - parent::setAuthenticated(false, false); - } - - /** - * Returns the provider secret. - * - * @return string The provider secret - * - * @deprecated since Symfony 5.2, use getFirewallName() instead - */ - public function getProviderKey() - { - if (1 !== \func_num_args() || true !== func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.2', 'Method "%s()" is deprecated, use "getFirewallName()" instead.', __METHOD__); - } - - return $this->firewallName; - } - - public function getFirewallName(): string - { - return $this->getProviderKey(true); - } - - /** - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * {@inheritdoc} - */ - public function getCredentials() - { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s()" is deprecated.', __METHOD__); - - return ''; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->secret, $this->firewallName, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->secret, $this->firewallName, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorage.php b/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorage.php deleted file mode 100644 index b479324..0000000 --- a/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorage.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token\Storage; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * TokenStorage contains a TokenInterface. - * - * It gives access to the token representing the current user authentication. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class TokenStorage implements TokenStorageInterface, ResetInterface -{ - private $token; - private $initializer; - - /** - * {@inheritdoc} - */ - public function getToken() - { - if ($initializer = $this->initializer) { - $this->initializer = null; - $initializer(); - } - - return $this->token; - } - - /** - * {@inheritdoc} - */ - public function setToken(TokenInterface $token = null) - { - if ($token) { - // ensure any initializer is called - $this->getToken(); - - // @deprecated since Symfony 5.3 - if (!method_exists($token, 'getUserIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in token class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($token)); - } - } - - $this->initializer = null; - $this->token = $token; - } - - public function setInitializer(?callable $initializer): void - { - $this->initializer = $initializer; - } - - public function reset() - { - $this->setToken(null); - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php b/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php deleted file mode 100644 index 1077a9b..0000000 --- a/vendor/symfony/security-core/Authentication/Token/Storage/TokenStorageInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token\Storage; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * The TokenStorageInterface. - * - * @author Johannes M. Schmitt - */ -interface TokenStorageInterface -{ - /** - * Returns the current security token. - * - * @return TokenInterface|null - */ - public function getToken(); - - /** - * Sets the authentication token. - * - * @param TokenInterface|null $token A TokenInterface token, or null if no further authentication information should be stored - */ - public function setToken(TokenInterface $token = null); -} diff --git a/vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php b/vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php deleted file mode 100644 index 2739805..0000000 --- a/vendor/symfony/security-core/Authentication/Token/Storage/UsageTrackingTokenStorage.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token\Storage; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * A token storage that increments the session usage index when the token is accessed. - * - * @author Nicolas Grekas - */ -final class UsageTrackingTokenStorage implements TokenStorageInterface, ServiceSubscriberInterface -{ - private $storage; - private $container; - private $enableUsageTracking = false; - - public function __construct(TokenStorageInterface $storage, ContainerInterface $container) - { - $this->storage = $storage; - $this->container = $container; - } - - /** - * {@inheritdoc} - */ - public function getToken(): ?TokenInterface - { - if ($this->shouldTrackUsage()) { - // increments the internal session usage index - $this->getSession()->getMetadataBag(); - } - - return $this->storage->getToken(); - } - - /** - * {@inheritdoc} - */ - public function setToken(TokenInterface $token = null): void - { - $this->storage->setToken($token); - - if ($token && $this->shouldTrackUsage()) { - // increments the internal session usage index - $this->getSession()->getMetadataBag(); - } - } - - public function enableUsageTracking(): void - { - $this->enableUsageTracking = true; - } - - public function disableUsageTracking(): void - { - $this->enableUsageTracking = false; - } - - public static function getSubscribedServices(): array - { - return [ - 'request_stack' => RequestStack::class, - ]; - } - - private function getSession(): SessionInterface - { - // BC for symfony/security-bundle < 5.3 - if ($this->container->has('session')) { - trigger_deprecation('symfony/security-core', '5.3', 'Injecting the "session" in "%s" is deprecated, inject the "request_stack" instead.', __CLASS__); - - return $this->container->get('session'); - } - - return $this->container->get('request_stack')->getSession(); - } - - private function shouldTrackUsage(): bool - { - if (!$this->enableUsageTracking) { - return false; - } - - // BC for symfony/security-bundle < 5.3 - if ($this->container->has('session')) { - return true; - } - - if (!$this->container->get('request_stack')->getMainRequest()) { - return false; - } - - return true; - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/SwitchUserToken.php b/vendor/symfony/security-core/Authentication/Token/SwitchUserToken.php deleted file mode 100644 index 2a54c9c..0000000 --- a/vendor/symfony/security-core/Authentication/Token/SwitchUserToken.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Token representing a user who temporarily impersonates another one. - * - * @author Christian Flothmann - */ -class SwitchUserToken extends UsernamePasswordToken -{ - private $originalToken; - private $originatedFromUri; - - /** - * @param UserInterface $user - * @param string|null $originatedFromUri The URI where was the user at the switch - * - * @throws \InvalidArgumentException - */ - public function __construct($user, /*string*/ $firewallName, /*array*/ $roles, /*TokenInterface*/ $originalToken, /*string*/ $originatedFromUri = null) - { - if (\is_string($roles)) { - // @deprecated since 5.4, deprecation is triggered by UsernamePasswordToken::__construct() - $credentials = $firewallName; - $firewallName = $roles; - $roles = $originalToken; - $originalToken = $originatedFromUri; - $originatedFromUri = \func_num_args() > 5 ? func_get_arg(5) : null; - - parent::__construct($user, $credentials, $firewallName, $roles); - } else { - parent::__construct($user, $firewallName, $roles); - } - - if (!$originalToken instanceof TokenInterface) { - throw new \TypeError(sprintf('Argument $originalToken of "%s" must be an instance of "%s", "%s" given.', __METHOD__, TokenInterface::class, get_debug_type($originalToken))); - } - - $this->originalToken = $originalToken; - $this->originatedFromUri = $originatedFromUri; - } - - public function getOriginalToken(): TokenInterface - { - return $this->originalToken; - } - - public function getOriginatedFromUri(): ?string - { - return $this->originatedFromUri; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->originalToken, $this->originatedFromUri, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - if (3 > \count($data)) { - // Support for tokens serialized with version 5.1 or lower of symfony/security-core. - [$this->originalToken, $parentData] = $data; - } else { - [$this->originalToken, $this->originatedFromUri, $parentData] = $data; - } - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Authentication/Token/TokenInterface.php b/vendor/symfony/security-core/Authentication/Token/TokenInterface.php deleted file mode 100644 index ac4bab6..0000000 --- a/vendor/symfony/security-core/Authentication/Token/TokenInterface.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * TokenInterface is the interface for the user authentication information. - * - * @method string getUserIdentifier() returns the user identifier used during authentication (e.g. a user's email address or username) - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -interface TokenInterface extends \Serializable -{ - /** - * Returns a string representation of the Token. - * - * This is only to be used for debugging purposes. - * - * @return string - */ - public function __toString(); - - /** - * Returns the user roles. - * - * @return string[] - */ - public function getRoleNames(): array; - - /** - * Returns the user credentials. - * - * @return mixed - * - * @deprecated since Symfony 5.4 - */ - public function getCredentials(); - - /** - * Returns a user representation. - * - * @return UserInterface|null - * - * @see AbstractToken::setUser() - */ - public function getUser(); - - /** - * Sets the authenticated user in the token. - * - * @param UserInterface $user - * - * @throws \InvalidArgumentException - */ - public function setUser($user); - - /** - * Returns whether the user is authenticated or not. - * - * @return bool true if the token has been authenticated, false otherwise - * - * @deprecated since Symfony 5.4, return null from "getUser()" instead when a token is not authenticated - */ - public function isAuthenticated(); - - /** - * Sets the authenticated flag. - * - * @deprecated since Symfony 5.4 - */ - public function setAuthenticated(bool $isAuthenticated); - - /** - * Removes sensitive information from the token. - */ - public function eraseCredentials(); - - /** - * @return array - */ - public function getAttributes(); - - /** - * @param array $attributes The token attributes - */ - public function setAttributes(array $attributes); - - /** - * @return bool - */ - public function hasAttribute(string $name); - - /** - * @return mixed - * - * @throws \InvalidArgumentException When attribute doesn't exist for this token - */ - public function getAttribute(string $name); - - /** - * @param mixed $value The attribute value - */ - public function setAttribute(string $name, $value); - - /** - * Returns all the necessary state of the object for serialization purposes. - */ - public function __serialize(): array; - - /** - * Restores the object state from an array given by __serialize(). - */ - public function __unserialize(array $data): void; - - /** - * @return string - * - * @deprecated since Symfony 5.3, use getUserIdentifier() instead - */ - public function getUsername(); -} diff --git a/vendor/symfony/security-core/Authentication/Token/UsernamePasswordToken.php b/vendor/symfony/security-core/Authentication/Token/UsernamePasswordToken.php deleted file mode 100644 index 6bcde10..0000000 --- a/vendor/symfony/security-core/Authentication/Token/UsernamePasswordToken.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authentication\Token; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * UsernamePasswordToken implements a username and password token. - * - * @author Fabien Potencier - */ -class UsernamePasswordToken extends AbstractToken -{ - private $credentials; - private $firewallName; - - /** - * @param UserInterface $user - * @param string[] $roles - * - * @throws \InvalidArgumentException - */ - public function __construct($user, /*string*/ $firewallName, /*array*/ $roles = []) - { - if (\is_string($roles)) { - trigger_deprecation('symfony/security-core', '5.4', 'The $credentials argument of "%s" is deprecated.', static::class.'::__construct'); - - $credentials = $firewallName; - $firewallName = $roles; - $roles = \func_num_args() > 3 ? func_get_arg(3) : []; - } - - parent::__construct($roles); - - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - - $this->setUser($user); - $this->credentials = $credentials ?? null; - $this->firewallName = $firewallName; - - parent::setAuthenticated(\count($roles) > 0, false); - } - - /** - * {@inheritdoc} - */ - public function setAuthenticated(bool $isAuthenticated) - { - if ($isAuthenticated) { - throw new \LogicException('Cannot set this token to trusted after instantiation.'); - } - - parent::setAuthenticated(false, false); - } - - /** - * {@inheritdoc} - */ - public function getCredentials() - { - trigger_deprecation('symfony/security-core', '5.4', 'Method "%s" is deprecated.', __METHOD__); - - return $this->credentials; - } - - /** - * Returns the provider key. - * - * @return string The provider key - * - * @deprecated since Symfony 5.2, use getFirewallName() instead - */ - public function getProviderKey() - { - if (1 !== \func_num_args() || true !== func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.2', 'Method "%s" is deprecated, use "getFirewallName()" instead.', __METHOD__); - } - - return $this->firewallName; - } - - public function getFirewallName(): string - { - return $this->getProviderKey(true); - } - - /** - * {@inheritdoc} - */ - public function eraseCredentials() - { - parent::eraseCredentials(); - - $this->credentials = null; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->credentials, $this->firewallName, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->credentials, $this->firewallName, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/AuthenticationEvents.php b/vendor/symfony/security-core/AuthenticationEvents.php deleted file mode 100644 index fc286d2..0000000 --- a/vendor/symfony/security-core/AuthenticationEvents.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core; - -use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; -use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; - -final class AuthenticationEvents -{ - /** - * The AUTHENTICATION_SUCCESS event occurs after a user is authenticated - * by one provider. - * - * @Event("Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent") - */ - public const AUTHENTICATION_SUCCESS = 'security.authentication.success'; - - /** - * The AUTHENTICATION_FAILURE event occurs after a user cannot be - * authenticated by any of the providers. - * - * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent") - * - * @deprecated since Symfony 5.4, use {@see Event\LoginFailureEvent} instead - */ - public const AUTHENTICATION_FAILURE = 'security.authentication.failure'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - AuthenticationSuccessEvent::class => self::AUTHENTICATION_SUCCESS, - AuthenticationFailureEvent::class => self::AUTHENTICATION_FAILURE, - ]; -} diff --git a/vendor/symfony/security-core/Authorization/AccessDecisionManager.php b/vendor/symfony/security-core/Authorization/AccessDecisionManager.php deleted file mode 100644 index 0aa7ead..0000000 --- a/vendor/symfony/security-core/Authorization/AccessDecisionManager.php +++ /dev/null @@ -1,188 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\Strategy\AccessDecisionStrategyInterface; -use Symfony\Component\Security\Core\Authorization\Strategy\AffirmativeStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\ConsensusStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\PriorityStrategy; -use Symfony\Component\Security\Core\Authorization\Strategy\UnanimousStrategy; -use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface; -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; -use Symfony\Component\Security\Core\Exception\InvalidArgumentException; - -/** - * AccessDecisionManager is the base class for all access decision managers - * that use decision voters. - * - * @author Fabien Potencier - * - * @final since Symfony 5.4 - */ -class AccessDecisionManager implements AccessDecisionManagerInterface -{ - /** - * @deprecated use {@see AffirmativeStrategy} instead - */ - public const STRATEGY_AFFIRMATIVE = 'affirmative'; - - /** - * @deprecated use {@see ConsensusStrategy} instead - */ - public const STRATEGY_CONSENSUS = 'consensus'; - - /** - * @deprecated use {@see UnanimousStrategy} instead - */ - public const STRATEGY_UNANIMOUS = 'unanimous'; - - /** - * @deprecated use {@see PriorityStrategy} instead - */ - public const STRATEGY_PRIORITY = 'priority'; - - private const VALID_VOTES = [ - VoterInterface::ACCESS_GRANTED => true, - VoterInterface::ACCESS_DENIED => true, - VoterInterface::ACCESS_ABSTAIN => true, - ]; - - private $voters; - private $votersCacheAttributes; - private $votersCacheObject; - private $strategy; - - /** - * @param iterable $voters An array or an iterator of VoterInterface instances - * @param AccessDecisionStrategyInterface|null $strategy The vote strategy - * - * @throws \InvalidArgumentException - */ - public function __construct(iterable $voters = [], /* AccessDecisionStrategyInterface */ $strategy = null) - { - $this->voters = $voters; - if (\is_string($strategy)) { - trigger_deprecation('symfony/security-core', '5.4', 'Passing the access decision strategy as a string is deprecated, pass an instance of "%s" instead.', AccessDecisionStrategyInterface::class); - $allowIfAllAbstainDecisions = 3 <= \func_num_args() && func_get_arg(2); - $allowIfEqualGrantedDeniedDecisions = 4 > \func_num_args() || func_get_arg(3); - - $strategy = $this->createStrategy($strategy, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions); - } elseif (null !== $strategy && !$strategy instanceof AccessDecisionStrategyInterface) { - throw new \TypeError(sprintf('"%s": Parameter #2 ($strategy) is expected to be an instance of "%s" or null, "%s" given.', __METHOD__, AccessDecisionStrategyInterface::class, get_debug_type($strategy))); - } - - $this->strategy = $strategy ?? new AffirmativeStrategy(); - } - - /** - * @param bool $allowMultipleAttributes Whether to allow passing multiple values to the $attributes array - * - * {@inheritdoc} - */ - public function decide(TokenInterface $token, array $attributes, $object = null/*, bool $allowMultipleAttributes = false*/) - { - $allowMultipleAttributes = 3 < \func_num_args() && func_get_arg(3); - - // Special case for AccessListener, do not remove the right side of the condition before 6.0 - if (\count($attributes) > 1 && !$allowMultipleAttributes) { - throw new InvalidArgumentException(sprintf('Passing more than one Security attribute to "%s()" is not supported.', __METHOD__)); - } - - return $this->strategy->decide( - $this->collectResults($token, $attributes, $object) - ); - } - - /** - * @param mixed $object - * - * @return \Traversable - */ - private function collectResults(TokenInterface $token, array $attributes, $object): \Traversable - { - foreach ($this->getVoters($attributes, $object) as $voter) { - $result = $voter->vote($token, $object, $attributes); - if (!\is_int($result) || !(self::VALID_VOTES[$result] ?? false)) { - trigger_deprecation('symfony/security-core', '5.3', 'Returning "%s" in "%s::vote()" is deprecated, return one of "%s" constants: "ACCESS_GRANTED", "ACCESS_DENIED" or "ACCESS_ABSTAIN".', var_export($result, true), get_debug_type($voter), VoterInterface::class); - } - - yield $result; - } - } - - /** - * @throws \InvalidArgumentException if the $strategy is invalid - */ - private function createStrategy(string $strategy, bool $allowIfAllAbstainDecisions, bool $allowIfEqualGrantedDeniedDecisions): AccessDecisionStrategyInterface - { - switch ($strategy) { - case self::STRATEGY_AFFIRMATIVE: - return new AffirmativeStrategy($allowIfAllAbstainDecisions); - case self::STRATEGY_CONSENSUS: - return new ConsensusStrategy($allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions); - case self::STRATEGY_UNANIMOUS: - return new UnanimousStrategy($allowIfAllAbstainDecisions); - case self::STRATEGY_PRIORITY: - return new PriorityStrategy($allowIfAllAbstainDecisions); - } - - throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy)); - } - - /** - * @return iterable - */ - private function getVoters(array $attributes, $object = null): iterable - { - $keyAttributes = []; - foreach ($attributes as $attribute) { - $keyAttributes[] = \is_string($attribute) ? $attribute : null; - } - // use `get_class` to handle anonymous classes - $keyObject = \is_object($object) ? \get_class($object) : get_debug_type($object); - foreach ($this->voters as $key => $voter) { - if (!$voter instanceof CacheableVoterInterface) { - yield $voter; - continue; - } - - $supports = true; - // The voter supports the attributes if it supports at least one attribute of the list - foreach ($keyAttributes as $keyAttribute) { - if (null === $keyAttribute) { - $supports = true; - } elseif (!isset($this->votersCacheAttributes[$keyAttribute][$key])) { - $this->votersCacheAttributes[$keyAttribute][$key] = $supports = $voter->supportsAttribute($keyAttribute); - } else { - $supports = $this->votersCacheAttributes[$keyAttribute][$key]; - } - if ($supports) { - break; - } - } - if (!$supports) { - continue; - } - - if (!isset($this->votersCacheObject[$keyObject][$key])) { - $this->votersCacheObject[$keyObject][$key] = $supports = $voter->supportsType($keyObject); - } else { - $supports = $this->votersCacheObject[$keyObject][$key]; - } - if (!$supports) { - continue; - } - yield $voter; - } - } -} diff --git a/vendor/symfony/security-core/Authorization/AccessDecisionManagerInterface.php b/vendor/symfony/security-core/Authorization/AccessDecisionManagerInterface.php deleted file mode 100644 index b807861..0000000 --- a/vendor/symfony/security-core/Authorization/AccessDecisionManagerInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * AccessDecisionManagerInterface makes authorization decisions. - * - * @author Fabien Potencier - */ -interface AccessDecisionManagerInterface -{ - /** - * Decides whether the access is possible or not. - * - * @param array $attributes An array of attributes associated with the method being invoked - * @param mixed $object The object to secure - * - * @return bool - */ - public function decide(TokenInterface $token, array $attributes, $object = null); -} diff --git a/vendor/symfony/security-core/Authorization/AuthorizationChecker.php b/vendor/symfony/security-core/Authorization/AuthorizationChecker.php deleted file mode 100644 index 2f26dff..0000000 --- a/vendor/symfony/security-core/Authorization/AuthorizationChecker.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\NullToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; - -/** - * AuthorizationChecker is the main authorization point of the Security component. - * - * It gives access to the token representing the current user authentication. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class AuthorizationChecker implements AuthorizationCheckerInterface -{ - private $tokenStorage; - private $accessDecisionManager; - private $authenticationManager; - private $alwaysAuthenticate; - private $exceptionOnNoToken; - - public function __construct(TokenStorageInterface $tokenStorage, /*AccessDecisionManagerInterface*/ $accessDecisionManager, /*bool*/ $alwaysAuthenticate = false, /*bool*/ $exceptionOnNoToken = true) - { - if ($accessDecisionManager instanceof AuthenticationManagerInterface) { - trigger_deprecation('symfony/security-core', '5.4', 'The $autenticationManager argument of "%s" is deprecated.', __METHOD__); - - $this->authenticationManager = $accessDecisionManager; - $accessDecisionManager = $alwaysAuthenticate; - $alwaysAuthenticate = $exceptionOnNoToken; - $exceptionOnNoToken = \func_num_args() > 4 ? func_get_arg(4) : true; - } - - if (false !== $alwaysAuthenticate) { - trigger_deprecation('symfony/security-core', '5.4', 'Not setting the 4th argument of "%s" to "false" is deprecated.', __METHOD__); - } - if (false !== $exceptionOnNoToken) { - trigger_deprecation('symfony/security-core', '5.4', 'Not setting the 5th argument of "%s" to "false" is deprecated.', __METHOD__); - } - - if (!$accessDecisionManager instanceof AccessDecisionManagerInterface) { - throw new \TypeError(sprintf('Argument 2 of "%s" must be instance of "%s", "%s" given.', __METHOD__, AccessDecisionManagerInterface::class, get_debug_type($accessDecisionManager))); - } - - $this->tokenStorage = $tokenStorage; - $this->accessDecisionManager = $accessDecisionManager; - $this->alwaysAuthenticate = $alwaysAuthenticate; - $this->exceptionOnNoToken = $exceptionOnNoToken; - } - - /** - * {@inheritdoc} - * - * @throws AuthenticationCredentialsNotFoundException when the token storage has no authentication token and $exceptionOnNoToken is set to true - */ - final public function isGranted($attribute, $subject = null): bool - { - $token = $this->tokenStorage->getToken(); - - if (!$token || !$token->getUser()) { - if ($this->exceptionOnNoToken) { - throw new AuthenticationCredentialsNotFoundException('The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.'); - } - - $token = new NullToken(); - } else { - $authenticated = true; - // @deprecated since Symfony 5.4 - if ($this->alwaysAuthenticate || !$authenticated = $token->isAuthenticated(false)) { - if (!($authenticated ?? true)) { - trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s()" is deprecated, return null from "getUser()" instead.'); - } - $this->tokenStorage->setToken($token = $this->authenticationManager->authenticate($token)); - } - } - - return $this->accessDecisionManager->decide($token, [$attribute], $subject); - } -} diff --git a/vendor/symfony/security-core/Authorization/AuthorizationCheckerInterface.php b/vendor/symfony/security-core/Authorization/AuthorizationCheckerInterface.php deleted file mode 100644 index f60c80b..0000000 --- a/vendor/symfony/security-core/Authorization/AuthorizationCheckerInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -/** - * The AuthorizationCheckerInterface. - * - * @author Johannes M. Schmitt - */ -interface AuthorizationCheckerInterface -{ - /** - * Checks if the attribute is granted against the current authentication token and optionally supplied subject. - * - * @param mixed $attribute A single attribute to vote on (can be of any type, string and instance of Expression are supported by the core) - * @param mixed $subject - * - * @return bool - */ - public function isGranted($attribute, $subject = null); -} diff --git a/vendor/symfony/security-core/Authorization/ExpressionLanguage.php b/vendor/symfony/security-core/Authorization/ExpressionLanguage.php deleted file mode 100644 index 6d9ad0a..0000000 --- a/vendor/symfony/security-core/Authorization/ExpressionLanguage.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage; - -if (!class_exists(BaseExpressionLanguage::class)) { - throw new \LogicException(sprintf('The "%s" class requires the "ExpressionLanguage" component. Try running "composer require symfony/expression-language".', ExpressionLanguage::class)); -} else { - // Help opcache.preload discover always-needed symbols - class_exists(ExpressionLanguageProvider::class); - - /** - * Adds some function to the default ExpressionLanguage. - * - * @author Fabien Potencier - * - * @see ExpressionLanguageProvider - */ - class ExpressionLanguage extends BaseExpressionLanguage - { - /** - * {@inheritdoc} - */ - public function __construct(CacheItemPoolInterface $cache = null, array $providers = []) - { - // prepend the default provider to let users override it easily - array_unshift($providers, new ExpressionLanguageProvider()); - - parent::__construct($cache, $providers); - } - } -} diff --git a/vendor/symfony/security-core/Authorization/ExpressionLanguageProvider.php b/vendor/symfony/security-core/Authorization/ExpressionLanguageProvider.php deleted file mode 100644 index ba2ba26..0000000 --- a/vendor/symfony/security-core/Authorization/ExpressionLanguageProvider.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Symfony\Component\ExpressionLanguage\ExpressionFunction; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; - -/** - * Define some ExpressionLanguage functions. - * - * @author Fabien Potencier - */ -class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface -{ - public function getFunctions() - { - return [ - new ExpressionFunction('is_anonymous', function () { - return 'trigger_deprecation("symfony/security-core", "5.4", "The \"is_anonymous()\" expression function is deprecated.") || ($token && $auth_checker->isGranted("IS_ANONYMOUS"))'; - }, function (array $variables) { - trigger_deprecation('symfony/security-core', '5.4', 'The "is_anonymous()" expression function is deprecated.'); - - return $variables['token'] && $variables['auth_checker']->isGranted('IS_ANONYMOUS'); - }), - - // @deprecated remove the ternary and always use IS_AUTHENTICATED in 6.0 - new ExpressionFunction('is_authenticated', function () { - return 'defined("'.AuthenticatedVoter::class.'::IS_AUTHENTICATED") ? $auth_checker->isGranted("IS_AUTHENTICATED") : ($token && !$auth_checker->isGranted("IS_ANONYMOUS"))'; - }, function (array $variables) { - return \defined(AuthenticatedVoter::class.'::IS_AUTHENTICATED') ? $variables['auth_checker']->isGranted('IS_AUTHENTICATED') : ($variables['token'] && !$variables['auth_checker']->isGranted('IS_ANONYMOUS')); - }), - - new ExpressionFunction('is_fully_authenticated', function () { - return '$token && $auth_checker->isGranted("IS_AUTHENTICATED_FULLY")'; - }, function (array $variables) { - return $variables['token'] && $variables['auth_checker']->isGranted('IS_AUTHENTICATED_FULLY'); - }), - - new ExpressionFunction('is_granted', function ($attributes, $object = 'null') { - return sprintf('$auth_checker->isGranted(%s, %s)', $attributes, $object); - }, function (array $variables, $attributes, $object = null) { - return $variables['auth_checker']->isGranted($attributes, $object); - }), - - new ExpressionFunction('is_remember_me', function () { - return '$token && $auth_checker->isGranted("IS_REMEMBERED")'; - }, function (array $variables) { - return $variables['token'] && $variables['auth_checker']->isGranted('IS_REMEMBERED'); - }), - ]; - } -} diff --git a/vendor/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php b/vendor/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php deleted file mode 100644 index 0023837..0000000 --- a/vendor/symfony/security-core/Authorization/Strategy/AccessDecisionStrategyInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Strategy; - -/** - * A strategy for turning a stream of votes into a final decision. - * - * @author Alexander M. Turek - */ -interface AccessDecisionStrategyInterface -{ - /** - * @param \Traversable $results - */ - public function decide(\Traversable $results): bool; -} diff --git a/vendor/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php b/vendor/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php deleted file mode 100644 index 0901199..0000000 --- a/vendor/symfony/security-core/Authorization/Strategy/AffirmativeStrategy.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Strategy; - -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Grants access if any voter returns an affirmative response. - * - * If all voters abstained from voting, the decision will be based on the - * allowIfAllAbstainDecisions property value (defaults to false). - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -final class AffirmativeStrategy implements AccessDecisionStrategyInterface, \Stringable -{ - /** - * @var bool - */ - private $allowIfAllAbstainDecisions; - - public function __construct(bool $allowIfAllAbstainDecisions = false) - { - $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; - } - - /** - * {@inheritdoc} - */ - public function decide(\Traversable $results): bool - { - $deny = 0; - foreach ($results as $result) { - if (VoterInterface::ACCESS_GRANTED === $result) { - return true; - } - - if (VoterInterface::ACCESS_DENIED === $result) { - ++$deny; - } - } - - if ($deny > 0) { - return false; - } - - return $this->allowIfAllAbstainDecisions; - } - - public function __toString(): string - { - return 'affirmative'; - } -} diff --git a/vendor/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php b/vendor/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php deleted file mode 100644 index 0f61780..0000000 --- a/vendor/symfony/security-core/Authorization/Strategy/ConsensusStrategy.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Strategy; - -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Grants access if there is consensus of granted against denied responses. - * - * Consensus means majority-rule (ignoring abstains) rather than unanimous - * agreement (ignoring abstains). If you require unanimity, see - * UnanimousBased. - * - * If there were an equal number of grant and deny votes, the decision will - * be based on the allowIfEqualGrantedDeniedDecisions property value - * (defaults to true). - * - * If all voters abstained from voting, the decision will be based on the - * allowIfAllAbstainDecisions property value (defaults to false). - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -final class ConsensusStrategy implements AccessDecisionStrategyInterface, \Stringable -{ - private $allowIfAllAbstainDecisions; - private $allowIfEqualGrantedDeniedDecisions; - - public function __construct(bool $allowIfAllAbstainDecisions = false, bool $allowIfEqualGrantedDeniedDecisions = true) - { - $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; - $this->allowIfEqualGrantedDeniedDecisions = $allowIfEqualGrantedDeniedDecisions; - } - - public function decide(\Traversable $results): bool - { - $grant = 0; - $deny = 0; - foreach ($results as $result) { - if (VoterInterface::ACCESS_GRANTED === $result) { - ++$grant; - } elseif (VoterInterface::ACCESS_DENIED === $result) { - ++$deny; - } - } - - if ($grant > $deny) { - return true; - } - - if ($deny > $grant) { - return false; - } - - if ($grant > 0) { - return $this->allowIfEqualGrantedDeniedDecisions; - } - - return $this->allowIfAllAbstainDecisions; - } - - public function __toString(): string - { - return 'consensus'; - } -} diff --git a/vendor/symfony/security-core/Authorization/Strategy/PriorityStrategy.php b/vendor/symfony/security-core/Authorization/Strategy/PriorityStrategy.php deleted file mode 100644 index b2b416d..0000000 --- a/vendor/symfony/security-core/Authorization/Strategy/PriorityStrategy.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Strategy; - -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Grant or deny access depending on the first voter that does not abstain. - * The priority of voters can be used to overrule a decision. - * - * If all voters abstained from voting, the decision will be based on the - * allowIfAllAbstainDecisions property value (defaults to false). - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -final class PriorityStrategy implements AccessDecisionStrategyInterface, \Stringable -{ - private $allowIfAllAbstainDecisions; - - public function __construct(bool $allowIfAllAbstainDecisions = false) - { - $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; - } - - /** - * {@inheritdoc} - */ - public function decide(\Traversable $results): bool - { - foreach ($results as $result) { - if (VoterInterface::ACCESS_GRANTED === $result) { - return true; - } - - if (VoterInterface::ACCESS_DENIED === $result) { - return false; - } - } - - return $this->allowIfAllAbstainDecisions; - } - - public function __toString(): string - { - return 'priority'; - } -} diff --git a/vendor/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php b/vendor/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php deleted file mode 100644 index b2289f9..0000000 --- a/vendor/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Strategy; - -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Grants access if only grant (or abstain) votes were received. - * - * If all voters abstained from voting, the decision will be based on the - * allowIfAllAbstainDecisions property value (defaults to false). - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -final class UnanimousStrategy implements AccessDecisionStrategyInterface, \Stringable -{ - private $allowIfAllAbstainDecisions; - - public function __construct(bool $allowIfAllAbstainDecisions = false) - { - $this->allowIfAllAbstainDecisions = $allowIfAllAbstainDecisions; - } - - /** - * {@inheritdoc} - */ - public function decide(\Traversable $results): bool - { - $grant = 0; - foreach ($results as $result) { - if (VoterInterface::ACCESS_DENIED === $result) { - return false; - } - - if (VoterInterface::ACCESS_GRANTED === $result) { - ++$grant; - } - } - - // no deny votes - if ($grant > 0) { - return true; - } - - return $this->allowIfAllAbstainDecisions; - } - - public function __toString(): string - { - return 'unanimous'; - } -} diff --git a/vendor/symfony/security-core/Authorization/TraceableAccessDecisionManager.php b/vendor/symfony/security-core/Authorization/TraceableAccessDecisionManager.php deleted file mode 100644 index ab98420..0000000 --- a/vendor/symfony/security-core/Authorization/TraceableAccessDecisionManager.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Decorates the original AccessDecisionManager class to log information - * about the security voters and the decisions made by them. - * - * @author Javier Eguiluz - * - * @internal - */ -class TraceableAccessDecisionManager implements AccessDecisionManagerInterface -{ - private $manager; - private $strategy; - /** @var iterable */ - private $voters = []; - private $decisionLog = []; // All decision logs - private $currentLog = []; // Logs being filled in - - public function __construct(AccessDecisionManagerInterface $manager) - { - $this->manager = $manager; - - if ($this->manager instanceof AccessDecisionManager) { - // The strategy and voters are stored in a private properties of the decorated service - $reflection = new \ReflectionProperty(AccessDecisionManager::class, 'strategy'); - $reflection->setAccessible(true); - $this->strategy = $reflection->getValue($manager); - $reflection = new \ReflectionProperty(AccessDecisionManager::class, 'voters'); - $reflection->setAccessible(true); - $this->voters = $reflection->getValue($manager); - } - } - - /** - * {@inheritdoc} - * - * @param bool $allowMultipleAttributes Whether to allow passing multiple values to the $attributes array - */ - public function decide(TokenInterface $token, array $attributes, $object = null/*, bool $allowMultipleAttributes = false*/): bool - { - $currentDecisionLog = [ - 'attributes' => $attributes, - 'object' => $object, - 'voterDetails' => [], - ]; - - $this->currentLog[] = &$currentDecisionLog; - - $result = $this->manager->decide($token, $attributes, $object, 3 < \func_num_args() && func_get_arg(3)); - - $currentDecisionLog['result'] = $result; - - $this->decisionLog[] = array_pop($this->currentLog); // Using a stack since decide can be called by voters - - return $result; - } - - /** - * Adds voter vote and class to the voter details. - * - * @param array $attributes attributes used for the vote - * @param int $vote vote of the voter - */ - public function addVoterVote(VoterInterface $voter, array $attributes, int $vote) - { - $currentLogIndex = \count($this->currentLog) - 1; - $this->currentLog[$currentLogIndex]['voterDetails'][] = [ - 'voter' => $voter, - 'attributes' => $attributes, - 'vote' => $vote, - ]; - } - - public function getStrategy(): string - { - if (null === $this->strategy) { - return '-'; - } - if (method_exists($this->strategy, '__toString')) { - return (string) $this->strategy; - } - - return get_debug_type($this->strategy); - } - - /** - * @return iterable - */ - public function getVoters(): iterable - { - return $this->voters; - } - - public function getDecisionLog(): array - { - return $this->decisionLog; - } -} - -if (!class_exists(DebugAccessDecisionManager::class, false)) { - class_alias(TraceableAccessDecisionManager::class, DebugAccessDecisionManager::class); -} diff --git a/vendor/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php b/vendor/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php deleted file mode 100644 index ae78927..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/AuthenticatedVoter.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * AuthenticatedVoter votes if an attribute like IS_AUTHENTICATED_FULLY, - * IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED is present. - * - * This list is most restrictive to least restrictive checking. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class AuthenticatedVoter implements CacheableVoterInterface -{ - public const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; - public const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED'; - /** - * @deprecated since Symfony 5.4 - */ - public const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; - /** - * @deprecated since Symfony 5.4 - */ - public const IS_ANONYMOUS = 'IS_ANONYMOUS'; - public const IS_AUTHENTICATED = 'IS_AUTHENTICATED'; - public const IS_IMPERSONATOR = 'IS_IMPERSONATOR'; - public const IS_REMEMBERED = 'IS_REMEMBERED'; - public const PUBLIC_ACCESS = 'PUBLIC_ACCESS'; - - private $authenticationTrustResolver; - - public function __construct(AuthenticationTrustResolverInterface $authenticationTrustResolver) - { - $this->authenticationTrustResolver = $authenticationTrustResolver; - } - - /** - * {@inheritdoc} - */ - public function vote(TokenInterface $token, $subject, array $attributes) - { - if ($attributes === [self::PUBLIC_ACCESS]) { - return VoterInterface::ACCESS_GRANTED; - } - - $result = VoterInterface::ACCESS_ABSTAIN; - foreach ($attributes as $attribute) { - if (null === $attribute || (self::IS_AUTHENTICATED_FULLY !== $attribute - && self::IS_AUTHENTICATED_REMEMBERED !== $attribute - && self::IS_AUTHENTICATED_ANONYMOUSLY !== $attribute - && self::IS_AUTHENTICATED !== $attribute - && self::IS_ANONYMOUS !== $attribute - && self::IS_IMPERSONATOR !== $attribute - && self::IS_REMEMBERED !== $attribute)) { - continue; - } - - $result = VoterInterface::ACCESS_DENIED; - - if (self::IS_AUTHENTICATED_FULLY === $attribute - && $this->authenticationTrustResolver->isFullFledged($token)) { - return VoterInterface::ACCESS_GRANTED; - } - - if (self::IS_AUTHENTICATED_REMEMBERED === $attribute - && ($this->authenticationTrustResolver->isRememberMe($token) - || $this->authenticationTrustResolver->isFullFledged($token))) { - return VoterInterface::ACCESS_GRANTED; - } - - if (self::IS_AUTHENTICATED_ANONYMOUSLY === $attribute - && ($this->authenticationTrustResolver->isAnonymous($token) - || $this->authenticationTrustResolver->isRememberMe($token) - || $this->authenticationTrustResolver->isFullFledged($token))) { - trigger_deprecation('symfony/security-core', '5.4', 'The "IS_AUTHENTICATED_ANONYMOUSLY" security attribute is deprecated, use "PUBLIC_ACCESS" for public resources, otherwise use "IS_AUTHENTICATED" or "IS_AUTHENTICATED_FULLY" instead if you want to check if the request is (fully) authenticated.'); - - return VoterInterface::ACCESS_GRANTED; - } - - // @deprecated $this->authenticationTrustResolver must implement isAuthenticated() in 6.0 - if (self::IS_AUTHENTICATED === $attribute - && (method_exists($this->authenticationTrustResolver, 'isAuthenticated') - ? $this->authenticationTrustResolver->isAuthenticated($token) - : ($token && $token->getUser()))) { - return VoterInterface::ACCESS_GRANTED; - } - - if (self::IS_REMEMBERED === $attribute && $this->authenticationTrustResolver->isRememberMe($token)) { - return VoterInterface::ACCESS_GRANTED; - } - - if (self::IS_ANONYMOUS === $attribute && $this->authenticationTrustResolver->isAnonymous($token)) { - trigger_deprecation('symfony/security-core', '5.4', 'The "IS_ANONYMOUSLY" security attribute is deprecated, anonymous no longer exists in version 6.'); - - return VoterInterface::ACCESS_GRANTED; - } - - if (self::IS_IMPERSONATOR === $attribute && $token instanceof SwitchUserToken) { - return VoterInterface::ACCESS_GRANTED; - } - } - - return $result; - } - - public function supportsAttribute(string $attribute): bool - { - return \in_array($attribute, [ - self::IS_AUTHENTICATED_FULLY, - self::IS_AUTHENTICATED_REMEMBERED, - self::IS_AUTHENTICATED_ANONYMOUSLY, - self::IS_AUTHENTICATED, - self::IS_ANONYMOUS, - self::IS_IMPERSONATOR, - self::IS_REMEMBERED, - self::PUBLIC_ACCESS, - ], true); - } - - public function supportsType(string $subjectType): bool - { - return true; - } -} diff --git a/vendor/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php b/vendor/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php deleted file mode 100644 index 875aad6..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/CacheableVoterInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -/** - * Let voters expose the attributes and types they care about. - * - * By returning false to either `supportsAttribute` or `supportsType`, the - * voter will never be called for the specified attribute or subject. - * - * @author Jérémy Derussé - */ -interface CacheableVoterInterface extends VoterInterface -{ - public function supportsAttribute(string $attribute): bool; - - /** - * @param string $subjectType The type of the subject inferred by `get_class` or `get_debug_type` - */ - public function supportsType(string $subjectType): bool; -} diff --git a/vendor/symfony/security-core/Authorization/Voter/ExpressionVoter.php b/vendor/symfony/security-core/Authorization/Voter/ExpressionVoter.php deleted file mode 100644 index 1628072..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/ExpressionVoter.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; -use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; - -/** - * ExpressionVoter votes based on the evaluation of an expression. - * - * @author Fabien Potencier - */ -class ExpressionVoter implements CacheableVoterInterface -{ - private $expressionLanguage; - private $trustResolver; - private $authChecker; - private $roleHierarchy; - - public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, AuthorizationCheckerInterface $authChecker, RoleHierarchyInterface $roleHierarchy = null) - { - $this->expressionLanguage = $expressionLanguage; - $this->trustResolver = $trustResolver; - $this->authChecker = $authChecker; - $this->roleHierarchy = $roleHierarchy; - } - - public function supportsAttribute(string $attribute): bool - { - return false; - } - - public function supportsType(string $subjectType): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public function vote(TokenInterface $token, $subject, array $attributes) - { - $result = VoterInterface::ACCESS_ABSTAIN; - $variables = null; - foreach ($attributes as $attribute) { - if (!$attribute instanceof Expression) { - continue; - } - - if (null === $variables) { - $variables = $this->getVariables($token, $subject); - } - - $result = VoterInterface::ACCESS_DENIED; - if ($this->expressionLanguage->evaluate($attribute, $variables)) { - return VoterInterface::ACCESS_GRANTED; - } - } - - return $result; - } - - private function getVariables(TokenInterface $token, $subject): array - { - $roleNames = $token->getRoleNames(); - - if (null !== $this->roleHierarchy) { - $roleNames = $this->roleHierarchy->getReachableRoleNames($roleNames); - } - - $variables = [ - 'token' => $token, - 'user' => $token->getUser(), - 'object' => $subject, - 'subject' => $subject, - 'role_names' => $roleNames, - 'trust_resolver' => $this->trustResolver, - 'auth_checker' => $this->authChecker, - ]; - - // this is mainly to propose a better experience when the expression is used - // in an access control rule, as the developer does not know that it's going - // to be handled by this voter - if ($subject instanceof Request) { - $variables['request'] = $subject; - } - - return $variables; - } -} diff --git a/vendor/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php b/vendor/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php deleted file mode 100644 index d8f2b34..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/RoleHierarchyVoter.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; - -/** - * RoleHierarchyVoter uses a RoleHierarchy to determine the roles granted to - * the user before voting. - * - * @author Fabien Potencier - */ -class RoleHierarchyVoter extends RoleVoter -{ - private $roleHierarchy; - - public function __construct(RoleHierarchyInterface $roleHierarchy, string $prefix = 'ROLE_') - { - $this->roleHierarchy = $roleHierarchy; - - parent::__construct($prefix); - } - - /** - * {@inheritdoc} - */ - protected function extractRoles(TokenInterface $token) - { - return $this->roleHierarchy->getReachableRoleNames($token->getRoleNames()); - } -} diff --git a/vendor/symfony/security-core/Authorization/Voter/RoleVoter.php b/vendor/symfony/security-core/Authorization/Voter/RoleVoter.php deleted file mode 100644 index f1d993a..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/RoleVoter.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * RoleVoter votes if any attribute starts with a given prefix. - * - * @author Fabien Potencier - */ -class RoleVoter implements CacheableVoterInterface -{ - private $prefix; - - public function __construct(string $prefix = 'ROLE_') - { - $this->prefix = $prefix; - } - - /** - * {@inheritdoc} - */ - public function vote(TokenInterface $token, $subject, array $attributes) - { - $result = VoterInterface::ACCESS_ABSTAIN; - $roles = $this->extractRoles($token); - - foreach ($attributes as $attribute) { - if (!\is_string($attribute) || !str_starts_with($attribute, $this->prefix)) { - continue; - } - - if ('ROLE_PREVIOUS_ADMIN' === $attribute) { - trigger_deprecation('symfony/security-core', '5.1', 'The ROLE_PREVIOUS_ADMIN role is deprecated and will be removed in version 6.0, use the IS_IMPERSONATOR attribute instead.'); - } - - $result = VoterInterface::ACCESS_DENIED; - foreach ($roles as $role) { - if ($attribute === $role) { - return VoterInterface::ACCESS_GRANTED; - } - } - } - - return $result; - } - - public function supportsAttribute(string $attribute): bool - { - return str_starts_with($attribute, $this->prefix); - } - - public function supportsType(string $subjectType): bool - { - return true; - } - - protected function extractRoles(TokenInterface $token) - { - return $token->getRoleNames(); - } -} diff --git a/vendor/symfony/security-core/Authorization/Voter/TraceableVoter.php b/vendor/symfony/security-core/Authorization/Voter/TraceableVoter.php deleted file mode 100644 index f606f1d..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/TraceableVoter.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Event\VoteEvent; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * Decorates voter classes to send result events. - * - * @author Laurent VOULLEMIER - * - * @internal - */ -class TraceableVoter implements CacheableVoterInterface -{ - private $voter; - private $eventDispatcher; - - public function __construct(VoterInterface $voter, EventDispatcherInterface $eventDispatcher) - { - $this->voter = $voter; - $this->eventDispatcher = $eventDispatcher; - } - - public function vote(TokenInterface $token, $subject, array $attributes): int - { - $result = $this->voter->vote($token, $subject, $attributes); - - $this->eventDispatcher->dispatch(new VoteEvent($this->voter, $subject, $attributes, $result), 'debug.security.authorization.vote'); - - return $result; - } - - public function getDecoratedVoter(): VoterInterface - { - return $this->voter; - } - - public function supportsAttribute(string $attribute): bool - { - return !$this->voter instanceof CacheableVoterInterface || $this->voter->supportsAttribute($attribute); - } - - public function supportsType(string $subjectType): bool - { - return !$this->voter instanceof CacheableVoterInterface || $this->voter->supportsType($subjectType); - } -} diff --git a/vendor/symfony/security-core/Authorization/Voter/Voter.php b/vendor/symfony/security-core/Authorization/Voter/Voter.php deleted file mode 100644 index 6ca76ec..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/Voter.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * Voter is an abstract default implementation of a voter. - * - * @author Roman Marintšenko - * @author Grégoire Pineau - */ -abstract class Voter implements VoterInterface, CacheableVoterInterface -{ - /** - * {@inheritdoc} - */ - public function vote(TokenInterface $token, $subject, array $attributes) - { - // abstain vote by default in case none of the attributes are supported - $vote = self::ACCESS_ABSTAIN; - - foreach ($attributes as $attribute) { - try { - if (!$this->supports($attribute, $subject)) { - continue; - } - } catch (\TypeError $e) { - if (\PHP_VERSION_ID < 80000) { - if (0 === strpos($e->getMessage(), 'Argument 1 passed to') - && false !== strpos($e->getMessage(), '::supports() must be of the type string')) { - continue; - } - } elseif (false !== strpos($e->getMessage(), 'supports(): Argument #1')) { - continue; - } - - throw $e; - } - - // as soon as at least one attribute is supported, default is to deny access - $vote = self::ACCESS_DENIED; - - if ($this->voteOnAttribute($attribute, $subject, $token)) { - // grant access as soon as at least one attribute returns a positive response - return self::ACCESS_GRANTED; - } - } - - return $vote; - } - - /** - * Return false if your voter doesn't support the given attribute. Symfony will cache - * that decision and won't call your voter again for that attribute. - */ - public function supportsAttribute(string $attribute): bool - { - return true; - } - - /** - * Return false if your voter doesn't support the given subject type. Symfony will cache - * that decision and won't call your voter again for that subject type. - * - * @param string $subjectType The type of the subject inferred by `get_class()` or `get_debug_type()` - */ - public function supportsType(string $subjectType): bool - { - return true; - } - - /** - * Determines if the attribute and subject are supported by this voter. - * - * @param string $attribute An attribute - * @param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type - * - * @return bool - */ - abstract protected function supports(string $attribute, $subject); - - /** - * Perform a single access check operation on a given attribute, subject and token. - * It is safe to assume that $attribute and $subject already passed the "supports()" method check. - * - * @param mixed $subject - * - * @return bool - */ - abstract protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token); -} diff --git a/vendor/symfony/security-core/Authorization/Voter/VoterInterface.php b/vendor/symfony/security-core/Authorization/Voter/VoterInterface.php deleted file mode 100644 index a50af88..0000000 --- a/vendor/symfony/security-core/Authorization/Voter/VoterInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Authorization\Voter; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * VoterInterface is the interface implemented by all voters. - * - * @author Fabien Potencier - */ -interface VoterInterface -{ - public const ACCESS_GRANTED = 1; - public const ACCESS_ABSTAIN = 0; - public const ACCESS_DENIED = -1; - - /** - * Returns the vote for the given parameters. - * - * This method must return one of the following constants: - * ACCESS_GRANTED, ACCESS_DENIED, or ACCESS_ABSTAIN. - * - * @param mixed $subject The subject to secure - * @param array $attributes An array of attributes associated with the method being invoked - * - * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED - */ - public function vote(TokenInterface $token, $subject, array $attributes); -} diff --git a/vendor/symfony/security-core/CHANGELOG.md b/vendor/symfony/security-core/CHANGELOG.md deleted file mode 100644 index 2ee6d1a..0000000 --- a/vendor/symfony/security-core/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add a `CacheableVoterInterface` for voters that vote only on identified attributes and subjects - * Deprecate `AuthenticationEvents::AUTHENTICATION_FAILURE`, use the `LoginFailureEvent` instead - * Deprecate `AnonymousToken`, as the related authenticator was deprecated in 5.3 - * Deprecate `Token::getCredentials()`, tokens should no longer contain credentials (as they represent authenticated sessions) - * Deprecate returning `string|\Stringable` from `Token::getUser()` (it must return a `UserInterface`) - * Deprecate `AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY` and `AuthenticatedVoter::IS_ANONYMOUS`, - use `AuthenticatedVoter::IS_AUTHENTICATED_FULLY` or `AuthenticatedVoter::IS_AUTHENTICATED` instead. - * Deprecate `AuthenticationTrustResolverInterface::isAnonymous()` and the `is_anonymous()` expression - function as anonymous no longer exists in version 6, use the `isFullFledged()` or the new - `isAuthenticated()` instead if you want to check if the request is (fully) authenticated. - * Deprecate the `$authenticationManager` argument of the `AuthorizationChecker` constructor - * Deprecate setting the `$alwaysAuthenticate` argument to `true` and not setting the - `$exceptionOnNoToken` argument to `false` of `AuthorizationChecker` - * Deprecate methods `TokenInterface::isAuthenticated()` and `setAuthenticated`, - return null from "getUser()" instead when a token is not authenticated - * Add `AccessDecisionStrategyInterface` to allow custom access decision strategies - * Add access decision strategies `AffirmativeStrategy`, `ConsensusStrategy`, `PriorityStrategy`, `UnanimousStrategy` - * Deprecate passing the strategy as string to `AccessDecisionManager`, - pass an instance of `AccessDecisionStrategyInterface` instead - * Flag `AccessDecisionManager` as `@final` - -5.3 ---- - -The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md diff --git a/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php b/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php deleted file mode 100644 index 9267ad9..0000000 --- a/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\CheckPasswordLengthTrait; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', BasePasswordEncoder::class, CheckPasswordLengthTrait::class); - -/** - * BasePasswordEncoder is the base class for all password encoders. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use CheckPasswordLengthTrait instead - */ -abstract class BasePasswordEncoder implements PasswordEncoderInterface -{ - public const MAX_PASSWORD_LENGTH = 4096; - - /** - * {@inheritdoc} - */ - public function needsRehash(string $encoded): bool - { - return false; - } - - /** - * Demerges a merge password and salt string. - * - * @return array An array where the first element is the password and the second the salt - */ - protected function demergePasswordAndSalt(string $mergedPasswordSalt) - { - if (empty($mergedPasswordSalt)) { - return ['', '']; - } - - $password = $mergedPasswordSalt; - $salt = ''; - $saltBegins = strrpos($mergedPasswordSalt, '{'); - - if (false !== $saltBegins && $saltBegins + 1 < \strlen($mergedPasswordSalt)) { - $salt = substr($mergedPasswordSalt, $saltBegins + 1, -1); - $password = substr($mergedPasswordSalt, 0, $saltBegins); - } - - return [$password, $salt]; - } - - /** - * Merges a password and a salt. - * - * @return string - * - * @throws \InvalidArgumentException - */ - protected function mergePasswordAndSalt(string $password, ?string $salt) - { - if (empty($salt)) { - return $password; - } - - if (false !== strrpos($salt, '{') || false !== strrpos($salt, '}')) { - throw new \InvalidArgumentException('Cannot use { or } in salt.'); - } - - return $password.'{'.$salt.'}'; - } - - /** - * Compares two passwords. - * - * This method implements a constant-time algorithm to compare passwords to - * avoid (remote) timing attacks. - * - * @return bool - */ - protected function comparePasswords(string $password1, string $password2) - { - return hash_equals($password1, $password2); - } - - /** - * Checks if the password is too long. - * - * @return bool - */ - protected function isPasswordTooLong(string $password) - { - return \strlen($password) > static::MAX_PASSWORD_LENGTH; - } -} diff --git a/vendor/symfony/security-core/Encoder/EncoderAwareInterface.php b/vendor/symfony/security-core/Encoder/EncoderAwareInterface.php deleted file mode 100644 index 70231e2..0000000 --- a/vendor/symfony/security-core/Encoder/EncoderAwareInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherAwareInterface; - -/** - * @author Christophe Coevoet - * - * @deprecated since Symfony 5.3, use {@link PasswordHasherAwareInterface} instead. - */ -interface EncoderAwareInterface -{ - /** - * Gets the name of the encoder used to encode the password. - * - * If the method returns null, the standard way to retrieve the encoder - * will be used instead. - * - * @return string|null - */ - public function getEncoderName(); -} diff --git a/vendor/symfony/security-core/Encoder/EncoderFactory.php b/vendor/symfony/security-core/Encoder/EncoderFactory.php deleted file mode 100644 index 526c461..0000000 --- a/vendor/symfony/security-core/Encoder/EncoderFactory.php +++ /dev/null @@ -1,227 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherAwareInterface; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Exception\LogicException; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', EncoderFactory::class, PasswordHasherFactory::class); - -/** - * A generic encoder factory implementation. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.3, use {@link PasswordHasherFactory} instead - */ -class EncoderFactory implements EncoderFactoryInterface -{ - private $encoders; - - public function __construct(array $encoders) - { - $this->encoders = $encoders; - } - - /** - * {@inheritdoc} - */ - public function getEncoder($user) - { - $encoderKey = null; - - if (($user instanceof PasswordHasherAwareInterface && null !== $encoderName = $user->getPasswordHasherName()) || ($user instanceof EncoderAwareInterface && null !== $encoderName = $user->getEncoderName())) { - if (!\array_key_exists($encoderName, $this->encoders)) { - throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName)); - } - - $encoderKey = $encoderName; - } else { - foreach ($this->encoders as $class => $encoder) { - if ((\is_object($user) && $user instanceof $class) || (!\is_object($user) && (is_subclass_of($user, $class) || $user == $class))) { - $encoderKey = $class; - break; - } - } - } - - if (null === $encoderKey) { - throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', \is_object($user) ? get_debug_type($user) : $user)); - } - - if (!$this->encoders[$encoderKey] instanceof PasswordEncoderInterface) { - if ($this->encoders[$encoderKey] instanceof LegacyPasswordHasherInterface) { - $this->encoders[$encoderKey] = new LegacyPasswordHasherEncoder($this->encoders[$encoderKey]); - } elseif ($this->encoders[$encoderKey] instanceof PasswordHasherInterface) { - $this->encoders[$encoderKey] = new PasswordHasherEncoder($this->encoders[$encoderKey]); - } else { - $this->encoders[$encoderKey] = $this->createEncoder($this->encoders[$encoderKey]); - } - } - - return $this->encoders[$encoderKey]; - } - - /** - * Creates the actual encoder instance. - * - * @throws \InvalidArgumentException - */ - private function createEncoder(array $config, bool $isExtra = false): PasswordEncoderInterface - { - if (isset($config['algorithm'])) { - $rawConfig = $config; - $config = $this->getEncoderConfigFromAlgorithm($config); - } - if (!isset($config['class'])) { - throw new \InvalidArgumentException('"class" must be set in '.json_encode($config)); - } - if (!isset($config['arguments'])) { - throw new \InvalidArgumentException('"arguments" must be set in '.json_encode($config)); - } - - $encoder = new $config['class'](...$config['arguments']); - - if ($isExtra || !\in_array($config['class'], [NativePasswordEncoder::class, SodiumPasswordEncoder::class], true)) { - return $encoder; - } - - if ($rawConfig ?? null) { - $extraEncoders = array_map(function (string $algo) use ($rawConfig): PasswordEncoderInterface { - $rawConfig['algorithm'] = $algo; - - return $this->createEncoder($rawConfig); - }, ['pbkdf2', $rawConfig['hash_algorithm'] ?? 'sha512']); - } else { - $extraEncoders = [new Pbkdf2PasswordEncoder(), new MessageDigestPasswordEncoder()]; - } - - return new MigratingPasswordEncoder($encoder, ...$extraEncoders); - } - - private function getEncoderConfigFromAlgorithm(array $config): array - { - if ('auto' === $config['algorithm']) { - $encoderChain = []; - // "plaintext" is not listed as any leaked hashes could then be used to authenticate directly - foreach ([SodiumPasswordEncoder::isSupported() ? 'sodium' : 'native', 'pbkdf2', $config['hash_algorithm']] as $algo) { - $config['algorithm'] = $algo; - $encoderChain[] = $this->createEncoder($config, true); - } - - return [ - 'class' => MigratingPasswordEncoder::class, - 'arguments' => $encoderChain, - ]; - } - - if ($fromEncoders = ($config['migrate_from'] ?? false)) { - unset($config['migrate_from']); - $encoderChain = [$this->createEncoder($config, true)]; - - foreach ($fromEncoders as $name) { - if ($encoder = $this->encoders[$name] ?? false) { - $encoder = $encoder instanceof PasswordEncoderInterface ? $encoder : $this->createEncoder($encoder, true); - } else { - $encoder = $this->createEncoder(['algorithm' => $name], true); - } - - $encoderChain[] = $encoder; - } - - return [ - 'class' => MigratingPasswordEncoder::class, - 'arguments' => $encoderChain, - ]; - } - - switch ($config['algorithm']) { - case 'plaintext': - return [ - 'class' => PlaintextPasswordEncoder::class, - 'arguments' => [$config['ignore_case']], - ]; - - case 'pbkdf2': - return [ - 'class' => Pbkdf2PasswordEncoder::class, - 'arguments' => [ - $config['hash_algorithm'] ?? 'sha512', - $config['encode_as_base64'] ?? true, - $config['iterations'] ?? 1000, - $config['key_length'] ?? 40, - ], - ]; - - case 'bcrypt': - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_BCRYPT; - - return $this->getEncoderConfigFromAlgorithm($config); - - case 'native': - return [ - 'class' => NativePasswordEncoder::class, - 'arguments' => [ - $config['time_cost'] ?? null, - (($config['memory_cost'] ?? 0) << 10) ?: null, - $config['cost'] ?? null, - ] + (isset($config['native_algorithm']) ? [3 => $config['native_algorithm']] : []), - ]; - - case 'sodium': - return [ - 'class' => SodiumPasswordEncoder::class, - 'arguments' => [ - $config['time_cost'] ?? null, - (($config['memory_cost'] ?? 0) << 10) ?: null, - ], - ]; - - case 'argon2i': - if (SodiumPasswordEncoder::isSupported() && !\defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2I')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2I; - } else { - throw new LogicException(sprintf('Algorithm "argon2i" is not available. Either use %s"auto" or upgrade to PHP 7.2+ instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? '"argon2id", ' : '')); - } - - return $this->getEncoderConfigFromAlgorithm($config); - - case 'argon2id': - if (($hasSodium = SodiumPasswordEncoder::isSupported()) && \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13')) { - $config['algorithm'] = 'sodium'; - } elseif (\defined('PASSWORD_ARGON2ID')) { - $config['algorithm'] = 'native'; - $config['native_algorithm'] = \PASSWORD_ARGON2ID; - } else { - throw new LogicException(sprintf('Algorithm "argon2id" is not available. Either use %s"auto", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? '"argon2i", ' : '')); - } - - return $this->getEncoderConfigFromAlgorithm($config); - } - - return [ - 'class' => MessageDigestPasswordEncoder::class, - 'arguments' => [ - $config['algorithm'], - $config['encode_as_base64'] ?? true, - $config['iterations'] ?? 5000, - ], - ]; - } -} diff --git a/vendor/symfony/security-core/Encoder/EncoderFactoryInterface.php b/vendor/symfony/security-core/Encoder/EncoderFactoryInterface.php deleted file mode 100644 index 83dea6c..0000000 --- a/vendor/symfony/security-core/Encoder/EncoderFactoryInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', EncoderFactoryInterface::class, PasswordHasherFactoryInterface::class); - -/** - * EncoderFactoryInterface to support different encoders for different accounts. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.3, use {@link PasswordHasherFactoryInterface} instead - */ -interface EncoderFactoryInterface -{ - /** - * Returns the password encoder to use for the given account. - * - * @param UserInterface|string $user A UserInterface instance or a class name - * - * @return PasswordEncoderInterface - * - * @throws \RuntimeException when no password encoder could be found for the user - */ - public function getEncoder($user); -} diff --git a/vendor/symfony/security-core/Encoder/LegacyEncoderTrait.php b/vendor/symfony/security-core/Encoder/LegacyEncoderTrait.php deleted file mode 100644 index d126321..0000000 --- a/vendor/symfony/security-core/Encoder/LegacyEncoderTrait.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -/** - * @internal - */ -trait LegacyEncoderTrait -{ - /** - * @var PasswordHasherInterface|LegacyPasswordHasherInterface - */ - private $hasher; - - /** - * {@inheritdoc} - */ - public function encodePassword(string $raw, ?string $salt): string - { - try { - return $this->hasher->hash($raw, $salt); - } catch (InvalidPasswordException $e) { - throw new BadCredentialsException('Bad credentials.'); - } - } - - /** - * {@inheritdoc} - */ - public function isPasswordValid(string $encoded, string $raw, ?string $salt): bool - { - return $this->hasher->verify($encoded, $raw, $salt); - } - - /** - * {@inheritdoc} - */ - public function needsRehash(string $encoded): bool - { - return $this->hasher->needsRehash($encoded); - } -} diff --git a/vendor/symfony/security-core/Encoder/LegacyPasswordHasherEncoder.php b/vendor/symfony/security-core/Encoder/LegacyPasswordHasherEncoder.php deleted file mode 100644 index 7e57ff2..0000000 --- a/vendor/symfony/security-core/Encoder/LegacyPasswordHasherEncoder.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -/** - * Forward compatibility for new new PasswordHasher component. - * - * @author Alexander M. Turek - * - * @internal To be removed in Symfony 6 - */ -final class LegacyPasswordHasherEncoder implements PasswordEncoderInterface -{ - private $passwordHasher; - - public function __construct(LegacyPasswordHasherInterface $passwordHasher) - { - $this->passwordHasher = $passwordHasher; - } - - public function encodePassword(string $raw, ?string $salt): string - { - try { - return $this->passwordHasher->hash($raw, $salt); - } catch (InvalidPasswordException $e) { - throw new BadCredentialsException($e->getMessage(), $e->getCode(), $e); - } - } - - public function isPasswordValid(string $encoded, string $raw, ?string $salt): bool - { - return $this->passwordHasher->verify($encoded, $raw, $salt); - } - - public function needsRehash(string $encoded): bool - { - return $this->passwordHasher->needsRehash($encoded); - } -} diff --git a/vendor/symfony/security-core/Encoder/MessageDigestPasswordEncoder.php b/vendor/symfony/security-core/Encoder/MessageDigestPasswordEncoder.php deleted file mode 100644 index f98339f..0000000 --- a/vendor/symfony/security-core/Encoder/MessageDigestPasswordEncoder.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\MessageDigestPasswordHasher; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', MessageDigestPasswordEncoder::class, MessageDigestPasswordHasher::class); - -/** - * MessageDigestPasswordEncoder uses a message digest algorithm. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link MessageDigestPasswordHasher} instead - */ -class MessageDigestPasswordEncoder extends BasePasswordEncoder -{ - private $algorithm; - private $encodeHashAsBase64; - private $iterations = 1; - private $encodedLength = -1; - - /** - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash - */ - public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase64 = true, int $iterations = 5000) - { - $this->algorithm = $algorithm; - $this->encodeHashAsBase64 = $encodeHashAsBase64; - - try { - $this->encodedLength = \strlen($this->encodePassword('', 'salt')); - } catch (\LogicException $e) { - // ignore algorithm not supported - } - - $this->iterations = $iterations; - } - - /** - * {@inheritdoc} - */ - public function encodePassword(string $raw, ?string $salt) - { - if ($this->isPasswordTooLong($raw)) { - throw new BadCredentialsException('Invalid password.'); - } - - if (!\in_array($this->algorithm, hash_algos(), true)) { - throw new \LogicException(sprintf('The algorithm "%s" is not supported.', $this->algorithm)); - } - - $salted = $this->mergePasswordAndSalt($raw, $salt); - $digest = hash($this->algorithm, $salted, true); - - // "stretch" hash - for ($i = 1; $i < $this->iterations; ++$i) { - $digest = hash($this->algorithm, $digest.$salted, true); - } - - return $this->encodeHashAsBase64 ? base64_encode($digest) : bin2hex($digest); - } - - /** - * {@inheritdoc} - */ - public function isPasswordValid(string $encoded, string $raw, ?string $salt) - { - if (\strlen($encoded) !== $this->encodedLength || str_contains($encoded, '$')) { - return false; - } - - return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt)); - } -} diff --git a/vendor/symfony/security-core/Encoder/MigratingPasswordEncoder.php b/vendor/symfony/security-core/Encoder/MigratingPasswordEncoder.php deleted file mode 100644 index 53d3a58..0000000 --- a/vendor/symfony/security-core/Encoder/MigratingPasswordEncoder.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\MigratingPasswordHasher; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', MigratingPasswordEncoder::class, MigratingPasswordHasher::class); - -/** - * Hashes passwords using the best available encoder. - * Validates them using a chain of encoders. - * - * /!\ Don't put a PlaintextPasswordEncoder in the list as that'd mean a leaked hash - * could be used to authenticate successfully without knowing the cleartext password. - * - * @author Nicolas Grekas - * - * @deprecated since Symfony 5.3, use {@link MigratingPasswordHasher} instead - */ -final class MigratingPasswordEncoder extends BasePasswordEncoder implements SelfSaltingEncoderInterface -{ - private $bestEncoder; - private $extraEncoders; - - public function __construct(PasswordEncoderInterface $bestEncoder, PasswordEncoderInterface ...$extraEncoders) - { - $this->bestEncoder = $bestEncoder; - $this->extraEncoders = $extraEncoders; - } - - /** - * {@inheritdoc} - */ - public function encodePassword(string $raw, ?string $salt): string - { - return $this->bestEncoder->encodePassword($raw, $salt); - } - - /** - * {@inheritdoc} - */ - public function isPasswordValid(string $encoded, string $raw, ?string $salt): bool - { - if ($this->bestEncoder->isPasswordValid($encoded, $raw, $salt)) { - return true; - } - - if (!$this->bestEncoder->needsRehash($encoded)) { - return false; - } - - foreach ($this->extraEncoders as $encoder) { - if ($encoder->isPasswordValid($encoded, $raw, $salt)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function needsRehash(string $encoded): bool - { - return $this->bestEncoder->needsRehash($encoded); - } -} diff --git a/vendor/symfony/security-core/Encoder/NativePasswordEncoder.php b/vendor/symfony/security-core/Encoder/NativePasswordEncoder.php deleted file mode 100644 index bc135bb..0000000 --- a/vendor/symfony/security-core/Encoder/NativePasswordEncoder.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', NativePasswordEncoder::class, NativePasswordHasher::class); - -/** - * Hashes passwords using password_hash(). - * - * @author Elnur Abdurrakhimov - * @author Terje Bråten - * @author Nicolas Grekas - * - * @deprecated since Symfony 5.3, use {@link NativePasswordHasher} instead - */ -final class NativePasswordEncoder implements PasswordEncoderInterface, SelfSaltingEncoderInterface -{ - use LegacyEncoderTrait; - - /** - * @param string|null $algo An algorithm supported by password_hash() or null to use the stronger available algorithm - */ - public function __construct(int $opsLimit = null, int $memLimit = null, int $cost = null, string $algo = null) - { - $this->hasher = new NativePasswordHasher($opsLimit, $memLimit, $cost, $algo); - } -} diff --git a/vendor/symfony/security-core/Encoder/PasswordEncoderInterface.php b/vendor/symfony/security-core/Encoder/PasswordEncoderInterface.php deleted file mode 100644 index 9c1524d..0000000 --- a/vendor/symfony/security-core/Encoder/PasswordEncoderInterface.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', PasswordEncoderInterface::class, PasswordHasherInterface::class); - -/** - * PasswordEncoderInterface is the interface for all encoders. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link PasswordHasherInterface} instead - */ -interface PasswordEncoderInterface -{ - /** - * Encodes the raw password. - * - * @return string - * - * @throws BadCredentialsException If the raw password is invalid, e.g. excessively long - * @throws \InvalidArgumentException If the salt is invalid - */ - public function encodePassword(string $raw, ?string $salt); - - /** - * Checks a raw password against an encoded password. - * - * @param string $encoded An encoded password - * @param string $raw A raw password - * @param string|null $salt The salt - * - * @return bool - * - * @throws \InvalidArgumentException If the salt is invalid - */ - public function isPasswordValid(string $encoded, string $raw, ?string $salt); - - /** - * Checks if an encoded password would benefit from rehashing. - */ - public function needsRehash(string $encoded): bool; -} diff --git a/vendor/symfony/security-core/Encoder/PasswordHasherAdapter.php b/vendor/symfony/security-core/Encoder/PasswordHasherAdapter.php deleted file mode 100644 index a8546a4..0000000 --- a/vendor/symfony/security-core/Encoder/PasswordHasherAdapter.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -/** - * Forward compatibility for new new PasswordHasher component. - * - * @author Alexander M. Turek - * - * @internal To be removed in Symfony 6 - */ -final class PasswordHasherAdapter implements LegacyPasswordHasherInterface -{ - private $passwordEncoder; - - public function __construct(PasswordEncoderInterface $passwordEncoder) - { - $this->passwordEncoder = $passwordEncoder; - } - - public function hash(string $plainPassword, string $salt = null): string - { - return $this->passwordEncoder->encodePassword($plainPassword, $salt); - } - - public function verify(string $hashedPassword, string $plainPassword, string $salt = null): bool - { - return $this->passwordEncoder->isPasswordValid($hashedPassword, $plainPassword, $salt); - } - - public function needsRehash(string $hashedPassword): bool - { - return $this->passwordEncoder->needsRehash($hashedPassword); - } -} diff --git a/vendor/symfony/security-core/Encoder/PasswordHasherEncoder.php b/vendor/symfony/security-core/Encoder/PasswordHasherEncoder.php deleted file mode 100644 index d37875d..0000000 --- a/vendor/symfony/security-core/Encoder/PasswordHasherEncoder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Exception\InvalidPasswordException; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; - -/** - * Forward compatibility for new new PasswordHasher component. - * - * @author Alexander M. Turek - * - * @internal To be removed in Symfony 6 - */ -final class PasswordHasherEncoder implements PasswordEncoderInterface, SelfSaltingEncoderInterface -{ - private $passwordHasher; - - public function __construct(PasswordHasherInterface $passwordHasher) - { - $this->passwordHasher = $passwordHasher; - } - - public function encodePassword(string $raw, ?string $salt): string - { - if (null !== $salt) { - throw new \InvalidArgumentException('This password hasher does not support passing a salt.'); - } - - try { - return $this->passwordHasher->hash($raw); - } catch (InvalidPasswordException $e) { - throw new BadCredentialsException($e->getMessage(), $e->getCode(), $e); - } - } - - public function isPasswordValid(string $encoded, string $raw, ?string $salt): bool - { - if (null !== $salt) { - throw new \InvalidArgumentException('This password hasher does not support passing a salt.'); - } - - return $this->passwordHasher->verify($encoded, $raw); - } - - public function needsRehash(string $encoded): bool - { - return $this->passwordHasher->needsRehash($encoded); - } -} diff --git a/vendor/symfony/security-core/Encoder/Pbkdf2PasswordEncoder.php b/vendor/symfony/security-core/Encoder/Pbkdf2PasswordEncoder.php deleted file mode 100644 index d92c12f..0000000 --- a/vendor/symfony/security-core/Encoder/Pbkdf2PasswordEncoder.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\Pbkdf2PasswordHasher; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', Pbkdf2PasswordEncoder::class, Pbkdf2PasswordHasher::class); - -/** - * Pbkdf2PasswordEncoder uses the PBKDF2 (Password-Based Key Derivation Function 2). - * - * Providing a high level of Cryptographic security, - * PBKDF2 is recommended by the National Institute of Standards and Technology (NIST). - * - * But also warrants a warning, using PBKDF2 (with a high number of iterations) slows down the process. - * PBKDF2 should be used with caution and care. - * - * @author Sebastiaan Stok - * @author Andrew Johnson - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link Pbkdf2PasswordHasher} instead - */ -class Pbkdf2PasswordEncoder extends BasePasswordEncoder -{ - use LegacyEncoderTrait; - - /** - * @param string $algorithm The digest algorithm to use - * @param bool $encodeHashAsBase64 Whether to base64 encode the password hash - * @param int $iterations The number of iterations to use to stretch the password hash - * @param int $length Length of derived key to create - */ - public function __construct(string $algorithm = 'sha512', bool $encodeHashAsBase64 = true, int $iterations = 1000, int $length = 40) - { - $this->hasher = new Pbkdf2PasswordHasher($algorithm, $encodeHashAsBase64, $iterations, $length); - } -} diff --git a/vendor/symfony/security-core/Encoder/PlaintextPasswordEncoder.php b/vendor/symfony/security-core/Encoder/PlaintextPasswordEncoder.php deleted file mode 100644 index 497e9f1..0000000 --- a/vendor/symfony/security-core/Encoder/PlaintextPasswordEncoder.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\PlaintextPasswordHasher; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', PlaintextPasswordEncoder::class, PlaintextPasswordHasher::class); - -/** - * PlaintextPasswordEncoder does not do any encoding but is useful in testing environments. - * - * As this encoder is not cryptographically secure, usage of it in production environments is discouraged. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link PlaintextPasswordHasher} instead - */ -class PlaintextPasswordEncoder extends BasePasswordEncoder -{ - use LegacyEncoderTrait; - - /** - * @param bool $ignorePasswordCase Compare password case-insensitive - */ - public function __construct(bool $ignorePasswordCase = false) - { - $this->hasher = new PlaintextPasswordHasher($ignorePasswordCase); - } -} diff --git a/vendor/symfony/security-core/Encoder/SelfSaltingEncoderInterface.php b/vendor/symfony/security-core/Encoder/SelfSaltingEncoderInterface.php deleted file mode 100644 index b8740bc..0000000 --- a/vendor/symfony/security-core/Encoder/SelfSaltingEncoderInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" interface is deprecated, use "%s" on hasher implementations that deal with salts instead.', SelfSaltingEncoderInterface::class, LegacyPasswordHasherInterface::class); - -/** - * SelfSaltingEncoderInterface is a marker interface for encoders that do not - * require a user-generated salt. - * - * @author Zan Baldwin - * - * @deprecated since Symfony 5.3, use {@link LegacyPasswordHasherInterface} instead - */ -interface SelfSaltingEncoderInterface -{ -} diff --git a/vendor/symfony/security-core/Encoder/SodiumPasswordEncoder.php b/vendor/symfony/security-core/Encoder/SodiumPasswordEncoder.php deleted file mode 100644 index d2d71f4..0000000 --- a/vendor/symfony/security-core/Encoder/SodiumPasswordEncoder.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\SodiumPasswordHasher; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', SodiumPasswordEncoder::class, SodiumPasswordHasher::class); - -/** - * Hashes passwords using libsodium. - * - * @author Robin Chalas - * @author Zan Baldwin - * @author Dominik Müller - * - * @deprecated since Symfony 5.3, use {@link SodiumPasswordHasher} instead - */ -final class SodiumPasswordEncoder implements PasswordEncoderInterface, SelfSaltingEncoderInterface -{ - use LegacyEncoderTrait; - - public function __construct(int $opsLimit = null, int $memLimit = null) - { - $this->hasher = new SodiumPasswordHasher($opsLimit, $memLimit); - } - - public static function isSupported(): bool - { - return SodiumPasswordHasher::isSupported(); - } -} diff --git a/vendor/symfony/security-core/Encoder/UserPasswordEncoder.php b/vendor/symfony/security-core/Encoder/UserPasswordEncoder.php deleted file mode 100644 index 7b29918..0000000 --- a/vendor/symfony/security-core/Encoder/UserPasswordEncoder.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher; -use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', UserPasswordEncoder::class, UserPasswordHasher::class); - -/** - * A generic password encoder. - * - * @author Ariel Ferrandini - * - * @deprecated since Symfony 5.3, use {@link UserPasswordHasher} instead - */ -class UserPasswordEncoder implements UserPasswordEncoderInterface -{ - private $encoderFactory; - - public function __construct(EncoderFactoryInterface $encoderFactory) - { - $this->encoderFactory = $encoderFactory; - } - - /** - * {@inheritdoc} - */ - public function encodePassword(UserInterface $user, string $plainPassword) - { - $encoder = $this->encoderFactory->getEncoder($user); - - if (!$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/password-hasher', '5.3', 'Not implementing the "%s" interface while using "%s" is deprecated, the "%s" class should implement it.', PasswordAuthenticatedUserInterface::class, __CLASS__, get_debug_type($user)); - } - - $salt = $user->getSalt(); - if ($salt && !$user instanceof LegacyPasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/password-hasher', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - return $encoder->encodePassword($plainPassword, $user->getSalt()); - } - - /** - * {@inheritdoc} - */ - public function isPasswordValid(UserInterface $user, string $raw) - { - if (null === $user->getPassword()) { - return false; - } - - $encoder = $this->encoderFactory->getEncoder($user); - - return $encoder->isPasswordValid($user->getPassword(), $raw, $user->getSalt()); - } - - /** - * {@inheritdoc} - */ - public function needsRehash(UserInterface $user): bool - { - if (null === $user->getPassword()) { - return false; - } - - $encoder = $this->encoderFactory->getEncoder($user); - - return $encoder->needsRehash($user->getPassword()); - } -} diff --git a/vendor/symfony/security-core/Encoder/UserPasswordEncoderInterface.php b/vendor/symfony/security-core/Encoder/UserPasswordEncoderInterface.php deleted file mode 100644 index 894ba40..0000000 --- a/vendor/symfony/security-core/Encoder/UserPasswordEncoderInterface.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Encoder; - -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" interface is deprecated, use "%s" instead.', UserPasswordEncoderInterface::class, UserPasswordHasherInterface::class); - -/** - * UserPasswordEncoderInterface is the interface for the password encoder service. - * - * @author Ariel Ferrandini - * - * @deprecated since Symfony 5.3, use {@link UserPasswordHasherInterface} instead - */ -interface UserPasswordEncoderInterface -{ - /** - * Encodes the plain password. - * - * @return string - */ - public function encodePassword(UserInterface $user, string $plainPassword); - - /** - * @return bool - */ - public function isPasswordValid(UserInterface $user, string $raw); - - /** - * Checks if an encoded password would benefit from rehashing. - */ - public function needsRehash(UserInterface $user): bool; -} diff --git a/vendor/symfony/security-core/Event/AuthenticationEvent.php b/vendor/symfony/security-core/Event/AuthenticationEvent.php deleted file mode 100644 index 4fc1519..0000000 --- a/vendor/symfony/security-core/Event/AuthenticationEvent.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Event; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This is a general purpose authentication event. - * - * @author Johannes M. Schmitt - */ -class AuthenticationEvent extends Event -{ - private $authenticationToken; - - public function __construct(TokenInterface $token) - { - $this->authenticationToken = $token; - } - - public function getAuthenticationToken() - { - return $this->authenticationToken; - } -} diff --git a/vendor/symfony/security-core/Event/AuthenticationFailureEvent.php b/vendor/symfony/security-core/Event/AuthenticationFailureEvent.php deleted file mode 100644 index 4e9562c..0000000 --- a/vendor/symfony/security-core/Event/AuthenticationFailureEvent.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Event; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Event\LoginFailureEvent; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" with the new authenticator system instead.', AuthenticationFailureEvent::class, LoginFailureEvent::class); - -/** - * This event is dispatched on authentication failure. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.3, use LoginFailureEvent with the new authenticator system instead - */ -final class AuthenticationFailureEvent extends AuthenticationEvent -{ - private $authenticationException; - - public function __construct(TokenInterface $token, AuthenticationException $ex) - { - parent::__construct($token); - - $this->authenticationException = $ex; - } - - public function getAuthenticationException(): AuthenticationException - { - return $this->authenticationException; - } -} diff --git a/vendor/symfony/security-core/Event/AuthenticationSuccessEvent.php b/vendor/symfony/security-core/Event/AuthenticationSuccessEvent.php deleted file mode 100644 index 50034d7..0000000 --- a/vendor/symfony/security-core/Event/AuthenticationSuccessEvent.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Event; - -final class AuthenticationSuccessEvent extends AuthenticationEvent -{ -} diff --git a/vendor/symfony/security-core/Event/VoteEvent.php b/vendor/symfony/security-core/Event/VoteEvent.php deleted file mode 100644 index 78ac2f9..0000000 --- a/vendor/symfony/security-core/Event/VoteEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Event; - -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This event is dispatched on voter vote. - * - * @author Laurent VOULLEMIER - * - * @internal - */ -final class VoteEvent extends Event -{ - private $voter; - private $subject; - private $attributes; - private $vote; - - public function __construct(VoterInterface $voter, $subject, array $attributes, int $vote) - { - $this->voter = $voter; - $this->subject = $subject; - $this->attributes = $attributes; - $this->vote = $vote; - } - - public function getVoter(): VoterInterface - { - return $this->voter; - } - - public function getSubject() - { - return $this->subject; - } - - public function getAttributes(): array - { - return $this->attributes; - } - - public function getVote(): int - { - return $this->vote; - } -} diff --git a/vendor/symfony/security-core/Exception/AccessDeniedException.php b/vendor/symfony/security-core/Exception/AccessDeniedException.php deleted file mode 100644 index 0e59dc4..0000000 --- a/vendor/symfony/security-core/Exception/AccessDeniedException.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * AccessDeniedException is thrown when the account has not the required role. - * - * @author Fabien Potencier - */ -class AccessDeniedException extends RuntimeException -{ - private $attributes = []; - private $subject; - - public function __construct(string $message = 'Access Denied.', \Throwable $previous = null) - { - parent::__construct($message, 403, $previous); - } - - /** - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * @param array|string $attributes - */ - public function setAttributes($attributes) - { - $this->attributes = (array) $attributes; - } - - /** - * @return mixed - */ - public function getSubject() - { - return $this->subject; - } - - /** - * @param mixed $subject - */ - public function setSubject($subject) - { - $this->subject = $subject; - } -} diff --git a/vendor/symfony/security-core/Exception/AccountExpiredException.php b/vendor/symfony/security-core/Exception/AccountExpiredException.php deleted file mode 100644 index 4a71263..0000000 --- a/vendor/symfony/security-core/Exception/AccountExpiredException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * AccountExpiredException is thrown when the user account has expired. - * - * @author Fabien Potencier - * @author Alexander - */ -class AccountExpiredException extends AccountStatusException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Account has expired.'; - } -} diff --git a/vendor/symfony/security-core/Exception/AccountStatusException.php b/vendor/symfony/security-core/Exception/AccountStatusException.php deleted file mode 100644 index 880ad3d..0000000 --- a/vendor/symfony/security-core/Exception/AccountStatusException.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * AccountStatusException is the base class for authentication exceptions - * caused by the user account status. - * - * @author Fabien Potencier - * @author Alexander - */ -abstract class AccountStatusException extends AuthenticationException -{ - private $user; - - /** - * Get the user. - * - * @return UserInterface|null - */ - public function getUser() - { - return $this->user; - } - - public function setUser(UserInterface $user) - { - $this->user = $user; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->user, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->user, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php b/vendor/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php deleted file mode 100644 index 8595bed..0000000 --- a/vendor/symfony/security-core/Exception/AuthenticationCredentialsNotFoundException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * AuthenticationCredentialsNotFoundException is thrown when an authentication is rejected - * because no Token is available. - * - * @author Fabien Potencier - * @author Alexander - */ -class AuthenticationCredentialsNotFoundException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Authentication credentials could not be found.'; - } -} diff --git a/vendor/symfony/security-core/Exception/AuthenticationException.php b/vendor/symfony/security-core/Exception/AuthenticationException.php deleted file mode 100644 index ad03f0d..0000000 --- a/vendor/symfony/security-core/Exception/AuthenticationException.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * AuthenticationException is the base class for all authentication exceptions. - * - * @author Fabien Potencier - * @author Alexander - */ -class AuthenticationException extends RuntimeException -{ - /** @internal */ - protected $serialized; - - private $token; - - public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) - { - unset($this->serialized); - parent::__construct($message, $code, $previous); - } - - /** - * @return TokenInterface|null - */ - public function getToken() - { - return $this->token; - } - - public function setToken(TokenInterface $token) - { - $this->token = $token; - } - - /** - * Returns all the necessary state of the object for serialization purposes. - * - * There is no need to serialize any entry, they should be returned as-is. - * If you extend this method, keep in mind you MUST guarantee parent data is present in the state. - * Here is an example of how to extend this method: - * - * public function __serialize(): array - * { - * return [$this->childAttribute, parent::__serialize()]; - * } - * - * - * @see __unserialize() - */ - public function __serialize(): array - { - return [$this->token, $this->code, $this->message, $this->file, $this->line]; - } - - /** - * Restores the object state from an array given by __serialize(). - * - * There is no need to unserialize any entry in $data, they are already ready-to-use. - * If you extend this method, keep in mind you MUST pass the parent data to its respective class. - * Here is an example of how to extend this method: - * - * public function __unserialize(array $data): void - * { - * [$this->childAttribute, $parentData] = $data; - * parent::__unserialize($parentData); - * } - * - * - * @see __serialize() - */ - public function __unserialize(array $data): void - { - [$this->token, $this->code, $this->message, $this->file, $this->line] = $data; - } - - /** - * Message key to be used by the translation component. - * - * @return string - */ - public function getMessageKey() - { - return 'An authentication exception occurred.'; - } - - /** - * Message data to be used by the translation component. - * - * @return array - */ - public function getMessageData() - { - return []; - } - - /** - * @internal - */ - public function __sleep(): array - { - $this->serialized = $this->__serialize(); - - return ['serialized']; - } - - /** - * @internal - */ - public function __wakeup(): void - { - $this->__unserialize($this->serialized); - unset($this->serialized); - } -} diff --git a/vendor/symfony/security-core/Exception/AuthenticationExpiredException.php b/vendor/symfony/security-core/Exception/AuthenticationExpiredException.php deleted file mode 100644 index e3fce37..0000000 --- a/vendor/symfony/security-core/Exception/AuthenticationExpiredException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * AuthenticationExpiredException is thrown when an authentication token becomes un-authenticated between requests. - * - * In practice, this is due to the User changing between requests (e.g. password changes), - * causes the token to become un-authenticated. - * - * @author Ryan Weaver - */ -class AuthenticationExpiredException extends AccountStatusException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Authentication expired because your account information has changed.'; - } -} diff --git a/vendor/symfony/security-core/Exception/AuthenticationServiceException.php b/vendor/symfony/security-core/Exception/AuthenticationServiceException.php deleted file mode 100644 index 66f051d..0000000 --- a/vendor/symfony/security-core/Exception/AuthenticationServiceException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * AuthenticationServiceException is thrown when an authentication request could not be processed due to a system problem. - * - * @author Fabien Potencier - * @author Alexander - */ -class AuthenticationServiceException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Authentication request could not be processed due to a system problem.'; - } -} diff --git a/vendor/symfony/security-core/Exception/BadCredentialsException.php b/vendor/symfony/security-core/Exception/BadCredentialsException.php deleted file mode 100644 index be061c7..0000000 --- a/vendor/symfony/security-core/Exception/BadCredentialsException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * BadCredentialsException is thrown when the user credentials are invalid. - * - * @author Fabien Potencier - * @author Alexander - */ -class BadCredentialsException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Invalid credentials.'; - } -} diff --git a/vendor/symfony/security-core/Exception/CookieTheftException.php b/vendor/symfony/security-core/Exception/CookieTheftException.php deleted file mode 100644 index af97168..0000000 --- a/vendor/symfony/security-core/Exception/CookieTheftException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * This exception is thrown when the RememberMeServices implementation - * detects that a presented cookie has already been used by someone else. - * - * @author Johannes M. Schmitt - * @author Alexander - */ -class CookieTheftException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Cookie has already been used by someone else.'; - } -} diff --git a/vendor/symfony/security-core/Exception/CredentialsExpiredException.php b/vendor/symfony/security-core/Exception/CredentialsExpiredException.php deleted file mode 100644 index bcc1267..0000000 --- a/vendor/symfony/security-core/Exception/CredentialsExpiredException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * CredentialsExpiredException is thrown when the user account credentials have expired. - * - * @author Fabien Potencier - * @author Alexander - */ -class CredentialsExpiredException extends AccountStatusException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Credentials have expired.'; - } -} diff --git a/vendor/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php b/vendor/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php deleted file mode 100644 index 3594b9b..0000000 --- a/vendor/symfony/security-core/Exception/CustomUserMessageAccountStatusException.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * An authentication exception caused by the user account status - * where you can control the message shown to the user. - * - * Be sure that the message passed to this exception is something that - * can be shown safely to your user. In other words, avoid catching - * other exceptions and passing their message directly to this class. - * - * @author Vincent Langlet - */ -class CustomUserMessageAccountStatusException extends AccountStatusException -{ - private $messageKey; - - private $messageData = []; - - public function __construct(string $message = '', array $messageData = [], int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->setSafeMessage($message, $messageData); - } - - /** - * Sets a message that will be shown to the user. - * - * @param string $messageKey The message or message key - * @param array $messageData Data to be passed into the translator - */ - public function setSafeMessage(string $messageKey, array $messageData = []) - { - $this->messageKey = $messageKey; - $this->messageData = $messageData; - } - - public function getMessageKey() - { - return $this->messageKey; - } - - public function getMessageData() - { - return $this->messageData; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [parent::__serialize(), $this->messageKey, $this->messageData]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$parentData, $this->messageKey, $this->messageData] = $data; - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php b/vendor/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php deleted file mode 100644 index 799d7e0..0000000 --- a/vendor/symfony/security-core/Exception/CustomUserMessageAuthenticationException.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * An authentication exception where you can control the message shown to the user. - * - * Be sure that the message passed to this exception is something that - * can be shown safely to your user. In other words, avoid catching - * other exceptions and passing their message directly to this class. - * - * @author Ryan Weaver - */ -class CustomUserMessageAuthenticationException extends AuthenticationException -{ - private $messageKey; - - private $messageData = []; - - public function __construct(string $message = '', array $messageData = [], int $code = 0, \Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->setSafeMessage($message, $messageData); - } - - /** - * Set a message that will be shown to the user. - * - * @param string $messageKey The message or message key - * @param array $messageData Data to be passed into the translator - */ - public function setSafeMessage(string $messageKey, array $messageData = []) - { - $this->messageKey = $messageKey; - $this->messageData = $messageData; - } - - public function getMessageKey() - { - return $this->messageKey; - } - - public function getMessageData() - { - return $this->messageData; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [parent::__serialize(), $this->messageKey, $this->messageData]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$parentData, $this->messageKey, $this->messageData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Exception/DisabledException.php b/vendor/symfony/security-core/Exception/DisabledException.php deleted file mode 100644 index e9b784f..0000000 --- a/vendor/symfony/security-core/Exception/DisabledException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * DisabledException is thrown when the user account is disabled. - * - * @author Fabien Potencier - * @author Alexander - */ -class DisabledException extends AccountStatusException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Account is disabled.'; - } -} diff --git a/vendor/symfony/security-core/Exception/ExceptionInterface.php b/vendor/symfony/security-core/Exception/ExceptionInterface.php deleted file mode 100644 index 7bc2b91..0000000 --- a/vendor/symfony/security-core/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * Base ExceptionInterface for the Security component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/security-core/Exception/InsufficientAuthenticationException.php b/vendor/symfony/security-core/Exception/InsufficientAuthenticationException.php deleted file mode 100644 index e33ef6a..0000000 --- a/vendor/symfony/security-core/Exception/InsufficientAuthenticationException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * InsufficientAuthenticationException is thrown if the user credentials are not sufficiently trusted. - * - * This is the case when a user is anonymous and the resource to be displayed has an access role. - * - * @author Fabien Potencier - * @author Alexander - */ -class InsufficientAuthenticationException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Not privileged to request the resource.'; - } -} diff --git a/vendor/symfony/security-core/Exception/InvalidArgumentException.php b/vendor/symfony/security-core/Exception/InvalidArgumentException.php deleted file mode 100644 index 6f85e95..0000000 --- a/vendor/symfony/security-core/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * Base InvalidArgumentException for the Security component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/security-core/Exception/InvalidCsrfTokenException.php b/vendor/symfony/security-core/Exception/InvalidCsrfTokenException.php deleted file mode 100644 index 84be855..0000000 --- a/vendor/symfony/security-core/Exception/InvalidCsrfTokenException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * This exception is thrown when the csrf token is invalid. - * - * @author Johannes M. Schmitt - * @author Alexander - */ -class InvalidCsrfTokenException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Invalid CSRF token.'; - } -} diff --git a/vendor/symfony/security-core/Exception/LazyResponseException.php b/vendor/symfony/security-core/Exception/LazyResponseException.php deleted file mode 100644 index 8edc248..0000000 --- a/vendor/symfony/security-core/Exception/LazyResponseException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -use Symfony\Component\HttpFoundation\Response; - -/** - * A signaling exception that wraps a lazily computed response. - * - * @author Nicolas Grekas - */ -class LazyResponseException extends \Exception implements ExceptionInterface -{ - private $response; - - public function __construct(Response $response) - { - $this->response = $response; - } - - public function getResponse(): Response - { - return $this->response; - } -} diff --git a/vendor/symfony/security-core/Exception/LockedException.php b/vendor/symfony/security-core/Exception/LockedException.php deleted file mode 100644 index fffae74..0000000 --- a/vendor/symfony/security-core/Exception/LockedException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * LockedException is thrown if the user account is locked. - * - * @author Fabien Potencier - * @author Alexander - */ -class LockedException extends AccountStatusException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Account is locked.'; - } -} diff --git a/vendor/symfony/security-core/Exception/LogicException.php b/vendor/symfony/security-core/Exception/LogicException.php deleted file mode 100644 index b9c63e9..0000000 --- a/vendor/symfony/security-core/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * Base LogicException for the Security component. - * - * @author Iltar van der Berg - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/security-core/Exception/LogoutException.php b/vendor/symfony/security-core/Exception/LogoutException.php deleted file mode 100644 index 7058c62..0000000 --- a/vendor/symfony/security-core/Exception/LogoutException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * LogoutException is thrown when the account cannot be logged out. - * - * @author Jeremy Mikola - */ -class LogoutException extends RuntimeException -{ - public function __construct(string $message = 'Logout Exception', \Throwable $previous = null) - { - parent::__construct($message, 403, $previous); - } -} diff --git a/vendor/symfony/security-core/Exception/ProviderNotFoundException.php b/vendor/symfony/security-core/Exception/ProviderNotFoundException.php deleted file mode 100644 index af2e1b5..0000000 --- a/vendor/symfony/security-core/Exception/ProviderNotFoundException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * ProviderNotFoundException is thrown when no AuthenticationProviderInterface instance - * supports an authentication Token. - * - * @author Fabien Potencier - * @author Alexander - */ -class ProviderNotFoundException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'No authentication provider found to support the authentication token.'; - } -} diff --git a/vendor/symfony/security-core/Exception/RuntimeException.php b/vendor/symfony/security-core/Exception/RuntimeException.php deleted file mode 100644 index 95edec8..0000000 --- a/vendor/symfony/security-core/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * Base RuntimeException for the Security component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/security-core/Exception/SessionUnavailableException.php b/vendor/symfony/security-core/Exception/SessionUnavailableException.php deleted file mode 100644 index 90b858a..0000000 --- a/vendor/symfony/security-core/Exception/SessionUnavailableException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * This exception is thrown when no session is available. - * - * Possible reasons for this are: - * - * a) The session timed out because the user waited too long. - * b) The user has disabled cookies, and a new session is started on each - * request. - * - * @author Johannes M. Schmitt - * @author Alexander - */ -class SessionUnavailableException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'No session available, it either timed out or cookies are not enabled.'; - } -} diff --git a/vendor/symfony/security-core/Exception/TokenNotFoundException.php b/vendor/symfony/security-core/Exception/TokenNotFoundException.php deleted file mode 100644 index b050302..0000000 --- a/vendor/symfony/security-core/Exception/TokenNotFoundException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * TokenNotFoundException is thrown if a Token cannot be found. - * - * @author Johannes M. Schmitt - * @author Alexander - */ -class TokenNotFoundException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'No token could be found.'; - } -} diff --git a/vendor/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php b/vendor/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php deleted file mode 100644 index 0df80e5..0000000 --- a/vendor/symfony/security-core/Exception/TooManyLoginAttemptsAuthenticationException.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * This exception is thrown if there where too many failed login attempts in - * this session. - * - * @author Wouter de Jong - */ -class TooManyLoginAttemptsAuthenticationException extends AuthenticationException -{ - private $threshold; - - public function __construct(int $threshold = null) - { - $this->threshold = $threshold; - } - - /** - * {@inheritdoc} - */ - public function getMessageData(): array - { - return [ - '%minutes%' => $this->threshold, - '%count%' => (int) $this->threshold, - ]; - } - - /** - * {@inheritdoc} - */ - public function getMessageKey(): string - { - return 'Too many failed login attempts, please try again '.($this->threshold ? 'in %minutes% minute'.($this->threshold > 1 ? 's' : '').'.' : 'later.'); - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->threshold, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->threshold, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-core/Exception/UnsupportedUserException.php b/vendor/symfony/security-core/Exception/UnsupportedUserException.php deleted file mode 100644 index 6529fa9..0000000 --- a/vendor/symfony/security-core/Exception/UnsupportedUserException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * This exception is thrown when an account is reloaded from a provider which - * doesn't support the passed implementation of UserInterface. - * - * @author Johannes M. Schmitt - */ -class UnsupportedUserException extends AuthenticationServiceException -{ -} diff --git a/vendor/symfony/security-core/Exception/UserNotFoundException.php b/vendor/symfony/security-core/Exception/UserNotFoundException.php deleted file mode 100644 index 6ed9a5c..0000000 --- a/vendor/symfony/security-core/Exception/UserNotFoundException.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -/** - * UserNotFoundException is thrown if a User cannot be found for the given identifier. - * - * @author Fabien Potencier - * @author Alexander - */ -class UserNotFoundException extends AuthenticationException -{ - private $identifier; - - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Username could not be found.'; - } - - /** - * Get the user identifier (e.g. username or email address). - */ - public function getUserIdentifier(): ?string - { - return $this->identifier; - } - - /** - * @return string - * - * @deprecated - */ - public function getUsername() - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__); - - return $this->identifier; - } - - /** - * Set the user identifier (e.g. username or email address). - */ - public function setUserIdentifier(string $identifier): void - { - $this->identifier = $identifier; - } - - /** - * @deprecated - */ - public function setUsername(string $username) - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use setUserIdentifier() instead.', __METHOD__); - - $this->identifier = $username; - } - - /** - * {@inheritdoc} - */ - public function getMessageData() - { - return ['{{ username }}' => $this->identifier, '{{ user_identifier }}' => $this->identifier]; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->identifier, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->identifier, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} - -if (!class_exists(UsernameNotFoundException::class, false)) { - class_alias(UserNotFoundException::class, UsernameNotFoundException::class); -} diff --git a/vendor/symfony/security-core/Exception/UsernameNotFoundException.php b/vendor/symfony/security-core/Exception/UsernameNotFoundException.php deleted file mode 100644 index e0d2d4a..0000000 --- a/vendor/symfony/security-core/Exception/UsernameNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Exception; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', UsernameNotFoundException::class, UserNotFoundException::class); - -class_exists(UserNotFoundException::class); - -if (false) { - /** - * @deprecated since Symfony 5.3 to be removed in 6.0, use UserNotFoundException instead. - */ - class UsernameNotFoundException extends AuthenticationException - { - } -} diff --git a/vendor/symfony/security-core/LICENSE b/vendor/symfony/security-core/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/security-core/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/security-core/README.md b/vendor/symfony/security-core/README.md deleted file mode 100644 index 6e31770..0000000 --- a/vendor/symfony/security-core/README.md +++ /dev/null @@ -1,63 +0,0 @@ -Security Component - Core -========================= - -Security provides an infrastructure for sophisticated authorization systems, -which makes it possible to easily separate the actual authorization logic from -so called user providers that hold the users credentials. - -Getting Started ---------------- - -``` -$ composer require symfony/security-core -``` - -```php -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; -use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; -use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter; -use Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\Role\RoleHierarchy; - -$accessDecisionManager = new AccessDecisionManager([ - new AuthenticatedVoter(new AuthenticationTrustResolver()), - new RoleVoter(), - new RoleHierarchyVoter(new RoleHierarchy([ - 'ROLE_ADMIN' => ['ROLE_USER'], - ])) -]); - -$user = new \App\Entity\User(...); -$token = new UsernamePasswordToken($user, 'main', $user->getRoles()); - -if (!$accessDecisionManager->decide($token, ['ROLE_ADMIN'])) { - throw new AccessDeniedException(); -} -``` - -Sponsor -------- - -The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2]. - -Learn Symfony faster by watching real projects being built and actively coding -along with them. SymfonyCasts bridges that learning gap, bringing you video -tutorials and coding challenges. Code on! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/security.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://symfonycasts.com -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/security-core/Resources/translations/security.af.xlf b/vendor/symfony/security-core/Resources/translations/security.af.xlf deleted file mode 100644 index 4fc8b14..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.af.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - 'n Verifikasie probleem het voorgekom. - - - Authentication credentials could not be found. - Verifikasiebewyse kon nie gevind word nie. - - - Authentication request could not be processed due to a system problem. - Verifikasieversoek kon weens 'n stelselprobleem nie verwerk word nie. - - - Invalid credentials. - Ongedige verifikasiebewyse. - - - Cookie has already been used by someone else. - Die koekie is alreeds deur iemand anders gebruik. - - - Not privileged to request the resource. - Nie bevoorreg om die hulpbron aan te vra nie. - - - Invalid CSRF token. - Ongeldige CSRF-teken. - - - No authentication provider found to support the authentication token. - Geen verifikasieverskaffer is gevind wat die verifikasietoken kan ondersteun nie. - - - No session available, it either timed out or cookies are not enabled. - Geen sessie is beskikbaar, die het verval of koekies is nie geaktiveer nie. - - - No token could be found. - Geen teken kon gevind word nie. - - - Username could not be found. - Gebruikersnaam kon nie gevind word nie. - - - Account has expired. - Rekening het verval. - - - Credentials have expired. - Verifikasiebewyse het verval. - - - Account is disabled. - Rekening is deaktiveer. - - - Account is locked. - Rekening is gesluit. - - - Too many failed login attempts, please try again later. - Te veel mislukte aanmeldpogings, probeer asseblief later weer. - - - Invalid or expired login link. - Ongeldige of vervalde aanmeldskakel. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.ar.xlf b/vendor/symfony/security-core/Resources/translations/security.ar.xlf deleted file mode 100644 index 11b2001..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.ar.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - حدث خطأ اثناء الدخول. - - - Authentication credentials could not be found. - لم استطع العثور على معلومات الدخول. - - - Authentication request could not be processed due to a system problem. - لم يكتمل طلب الدخول نتيجه عطل فى النظام. - - - Invalid credentials. - معلومات الدخول خاطئة. - - - Cookie has already been used by someone else. - ملفات تعريف الارتباط(cookies) تم استخدامها من قبل شخص اخر. - - - Not privileged to request the resource. - ليست لديك الصلاحيات الكافية لهذا الطلب. - - - Invalid CSRF token. - رمز الموقع غير صحيح. - - - No authentication provider found to support the authentication token. - لا يوجد معرف للدخول يدعم الرمز المستخدم للدخول. - - - No session available, it either timed out or cookies are not enabled. - لا يوجد صلة بينك و بين الموقع اما انها انتهت او ان متصفحك لا يدعم خاصية ملفات تعريف الارتباط (cookies). - - - No token could be found. - لم استطع العثور على الرمز. - - - Username could not be found. - لم استطع العثور على اسم الدخول. - - - Account has expired. - انتهت صلاحية الحساب. - - - Credentials have expired. - انتهت صلاحية معلومات الدخول. - - - Account is disabled. - الحساب موقوف. - - - Account is locked. - الحساب مغلق. - - - Too many failed login attempts, please try again later. - عدد كبير جدا من محاولات الدخول الفاشلة، يرجى المحاولة مرة أخرى في وقت لاحق. - - - Invalid or expired login link. - رابط تسجيل الدخول غير صالح أو منتهي الصلاحية. - - - Too many failed login attempts, please try again in %minutes% minute. - عدد كبير جدا من محاولات الدخول الفاشلة، يرجى اعادة المحاولة بعد %minutes% دقيقة. - - - Too many failed login attempts, please try again in %minutes% minutes. - عدد كبير جدا من محاولات الدخول الفاشلة، يرجى اعادة المحاولة بعد %minutes% دقيقة. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.az.xlf b/vendor/symfony/security-core/Resources/translations/security.az.xlf deleted file mode 100644 index 735de07..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.az.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - Doğrulama istisnası baş verdi. - - - Authentication credentials could not be found. - Doğrulama məlumatları tapılmadı. - - - Authentication request could not be processed due to a system problem. - Sistem xətası səbəbilə doğrulama istəyi emal edilə bilmədi. - - - Invalid credentials. - Yanlış məlumat. - - - Cookie has already been used by someone else. - Kuki başqası tərəfindən istifadə edilib. - - - Not privileged to request the resource. - Resurs istəyi üçün imtiyaz yoxdur. - - - Invalid CSRF token. - Yanlış CSRF nişanı. - - - No authentication provider found to support the authentication token. - Doğrulama nişanını dəstəkləyəcək provayder tapılmadı. - - - No session available, it either timed out or cookies are not enabled. - Uyğun seans yoxdur, vaxtı keçib və ya kuki aktiv deyil. - - - No token could be found. - Nişan tapılmadı. - - - Username could not be found. - İstifadəçi adı tapılmadı. - - - Account has expired. - Hesabın istifadə müddəti bitib. - - - Credentials have expired. - Məlumatların istifadə müddəti bitib. - - - Account is disabled. - Hesab qeyri-aktiv edilib. - - - Account is locked. - Hesab kilitlənib. - - - Too many failed login attempts, please try again later. - Çoxlu uğursuz giriş təşəbbüsü, zəhmət olmasa daha sonra yeniden yoxlayın. - - - Invalid or expired login link. - Yanlış və ya müddəti keçmiş giriş keçidi. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.be.xlf b/vendor/symfony/security-core/Resources/translations/security.be.xlf deleted file mode 100644 index 0647f45..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.be.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Памылка аўтэнтыфікацыі. - - - Authentication credentials could not be found. - Дадзеныя аўтэнтыфікацыі не знойдзены. - - - Authentication request could not be processed due to a system problem. - Запыт аўтэнтыфікацыі не можа быць апрацаваны ў сувязі з праблемай у сістэме. - - - Invalid credentials. - Несапраўдныя дадзеныя аўтэнтыфікацыі. - - - Cookie has already been used by someone else. - Нехта іншы ўжо выкарыстаў гэтыя кукі (cookie). - - - Not privileged to request the resource. - Адсутнічаюць правы на запыт гэтага рэсурсу. - - - Invalid CSRF token. - Несапраўдны CSRF-токен. - - - No authentication provider found to support the authentication token. - Не знойдзен правайдар аўтэнтыфікацыі, які можа падтрымліваць гэты токен аўтэнтыфікацыі. - - - No session available, it either timed out or cookies are not enabled. - Сесія не даступна, яе час скончыўся, або кукі (cookies) выключаны. - - - No token could be found. - Токен не знойдзен. - - - Username could not be found. - Імя карыстальніка не знойдзена. - - - Account has expired. - Скончыўся тэрмін дзеяння акаўнта. - - - Credentials have expired. - Скончыўся тэрмін дзеяння дадзеных аўтэнтыфікацыі. - - - Account is disabled. - Акаўнт адключан. - - - Account is locked. - Акаўнт заблакіраван. - - - Too many failed login attempts, please try again later. - Зашмат няўдалых спроб уваходу, калі ласка, паспрабуйце пазней. - - - Invalid or expired login link. - Спасылка для ўваходу несапраўдная або пратэрмінаваная. - - - Too many failed login attempts, please try again in %minutes% minute. - Занадта шмат няўдалых спроб уваходу ў сістэму, паспрабуйце спробу праз %minutes% хвіліну. - - - Too many failed login attempts, please try again in %minutes% minutes. - Занадта шмат няўдалых спроб уваходу ў сістэму, паспрабуйце спробу праз %minutes% хвілін. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.bg.xlf b/vendor/symfony/security-core/Resources/translations/security.bg.xlf deleted file mode 100644 index 1d45b28..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.bg.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Грешка при автентикация. - - - Authentication credentials could not be found. - Удостоверението за автентикация не е открито. - - - Authentication request could not be processed due to a system problem. - Заявката за автентикация не може да бъде обработената поради системна грешка. - - - Invalid credentials. - Невалидно удостоверение за автентикация. - - - Cookie has already been used by someone else. - Тази бисквитка вече се ползва от някой друг. - - - Not privileged to request the resource. - Нямате права за достъп до този ресурс. - - - Invalid CSRF token. - Невалиден CSRF токен. - - - No authentication provider found to support the authentication token. - Не е открит провайдър, който да поддържа този токен за автентикация. - - - No session available, it either timed out or cookies are not enabled. - Сесията не е достъпна, или времето за достъп е изтекло, или бисквитките не са разрешени. - - - No token could be found. - Токенът не е открит. - - - Username could not be found. - Потребителското име не е открито. - - - Account has expired. - Акаунтът е изтекъл. - - - Credentials have expired. - Удостоверението за автентикация е изтекло. - - - Account is disabled. - Акаунтът е деактивиран. - - - Account is locked. - Акаунтът е заключен. - - - Too many failed login attempts, please try again later. - Твърде много неуспешни опити за вход, моля опитайте по-късно. - - - Invalid or expired login link. - Невалиден или изтекъл линк за вход. - - - Too many failed login attempts, please try again in %minutes% minute. - Твърде много неуспешни опити за вход, моля опитайте отново след %minutes% минута. - - - Too many failed login attempts, please try again in %minutes% minutes. - Твърде много неуспешни опити за вход, моля опитайте отново след %minutes% минути. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.bs.xlf b/vendor/symfony/security-core/Resources/translations/security.bs.xlf deleted file mode 100644 index 15fe823..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.bs.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Došlo je do autentifikacijskog izuzetka (exception). - - - Authentication credentials could not be found. - Autentifikacijski podaci nisu pronađeni. - - - Authentication request could not be processed due to a system problem. - Autentifikacijski zahtjev ne može biti obrađen zbog sistemskog problema. - - - Invalid credentials. - Autentifikacijski podaci su neispravni. - - - Cookie has already been used by someone else. - Neko drugi je već iskoristio ovaj kolačić (cookie). - - - Not privileged to request the resource. - Nemate privilegije potrebne za pristup ovom resursu. - - - Invalid CSRF token. - CSRF žeton (token) je neispravan. - - - No authentication provider found to support the authentication token. - Nije pronađen autentifikacijski provajder koji bi podržao dati autentifikacijski žeton (token). - - - No session available, it either timed out or cookies are not enabled. - Nema dostupnih sesija; ili je istekla ili su kolačići (cookies) iksljučeni. - - - No token could be found. - Nije pronađen nijedan žeton (token). - - - Username could not be found. - Korisničko ime nije pronađeno. - - - Account has expired. - Nalog je istekao. - - - Credentials have expired. - Autentifikacijski podaci su istekli. - - - Account is disabled. - Nalog je onemogućen. - - - Account is locked. - Nalog je zaključan. - - - Too many failed login attempts, please try again later. - Previše neuspješnih pokušaja prijavljivanja, molim pokušajte ponovo kasnije. - - - Invalid or expired login link. - Link za prijavljivanje je istekao ili je neispravan. - - - Too many failed login attempts, please try again in %minutes% minute. - Previše neuspjelih pokušaja prijave, pokušajte ponovo za %minutes% minuta. - - - Too many failed login attempts, please try again in %minutes% minutes. - Previše neuspjelih pokušaja prijave, pokušajte ponovo za %minutes% minuta. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.ca.xlf b/vendor/symfony/security-core/Resources/translations/security.ca.xlf deleted file mode 100644 index 212ca70..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.ca.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ha succeït un error d'autenticació. - - - Authentication credentials could not be found. - No s'han trobat les credencials d'autenticació. - - - Authentication request could not be processed due to a system problem. - La solicitud d'autenticació no s'ha pogut processar per un problema del sistema. - - - Invalid credentials. - Credencials no vàlides. - - - Cookie has already been used by someone else. - La cookie ja ha estat utilitzada per una altra persona. - - - Not privileged to request the resource. - No té privilegis per solicitar el recurs. - - - Invalid CSRF token. - Token CSRF no vàlid. - - - No authentication provider found to support the authentication token. - No s'ha trobat un proveïdor d'autenticació que suporti el token d'autenticació. - - - No session available, it either timed out or cookies are not enabled. - No hi ha sessió disponible, ha expirat o les cookies no estan habilitades. - - - No token could be found. - No s'ha trobat cap token. - - - Username could not be found. - No s'ha trobat el nom d'usuari. - - - Account has expired. - El compte ha expirat. - - - Credentials have expired. - Les credencials han expirat. - - - Account is disabled. - El compte està deshabilitat. - - - Account is locked. - El compte està bloquejat. - - - Too many failed login attempts, please try again later. - Massa intents d'inici de sessió fallits, torneu-ho a provar més tard. - - - Invalid or expired login link. - Enllaç d'inici de sessió no vàlid o caducat. - - - Too many failed login attempts, please try again in %minutes% minute. - Massa intents d'inici de sessió fallits, torneu-ho a provar en %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - Massa intents d'inici de sessió fallits, torneu-ho a provar en %minutes% minuts. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.cs.xlf b/vendor/symfony/security-core/Resources/translations/security.cs.xlf deleted file mode 100644 index 13ace0d..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.cs.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Při ověřování došlo k chybě. - - - Authentication credentials could not be found. - Ověřovací údaje nebyly nalezeny. - - - Authentication request could not be processed due to a system problem. - Požadavek na ověření nemohl být zpracován kvůli systémové chybě. - - - Invalid credentials. - Neplatné přihlašovací údaje. - - - Cookie has already been used by someone else. - Cookie již bylo použité někým jiným. - - - Not privileged to request the resource. - Nemáte oprávnění přistupovat k prostředku. - - - Invalid CSRF token. - Neplatný CSRF token. - - - No authentication provider found to support the authentication token. - Poskytovatel pro ověřovací token nebyl nalezen. - - - No session available, it either timed out or cookies are not enabled. - Session není k dispozici, vypršela její platnost, nebo jsou zakázané cookies. - - - No token could be found. - Token nebyl nalezen. - - - Username could not be found. - Přihlašovací jméno nebylo nalezeno. - - - Account has expired. - Platnost účtu vypršela. - - - Credentials have expired. - Platnost přihlašovacích údajů vypršela. - - - Account is disabled. - Účet je zakázaný. - - - Account is locked. - Účet je zablokovaný. - - - Too many failed login attempts, please try again later. - Příliš mnoho nepovedených pokusů přihlášení. Zkuste to prosím později. - - - Invalid or expired login link. - Neplatný nebo expirovaný odkaz na přihlášení. - - - Too many failed login attempts, please try again in %minutes% minute. - Příliš mnoho neúspěšných pokusů o přihlášení, zkuste to prosím znovu za %minutes% minutu. - - - Too many failed login attempts, please try again in %minutes% minutes. - Příliš mnoho neúspěšných pokusů o přihlášení, zkuste to prosím znovu za %minutes% minut. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.da.xlf b/vendor/symfony/security-core/Resources/translations/security.da.xlf deleted file mode 100644 index 9b8ca4c..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.da.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - En fejl indtraf ved godkendelse. - - - Authentication credentials could not be found. - Loginoplysninger kan ikke findes. - - - Authentication request could not be processed due to a system problem. - Godkendelsesanmodning kan ikke behandles på grund af et systemfejl. - - - Invalid credentials. - Ugyldige loginoplysninger. - - - Cookie has already been used by someone else. - Cookie er allerede brugt af en anden. - - - Not privileged to request the resource. - Ingen adgang til at forespørge ressourcen. - - - Invalid CSRF token. - Ugyldig CSRF-token. - - - No authentication provider found to support the authentication token. - Ingen godkendelsesudbyder er fundet til understøttelsen af godkendelsestoken. - - - No session available, it either timed out or cookies are not enabled. - Ingen session tilgængelig, sessionen er enten udløbet eller cookies er ikke aktiveret. - - - No token could be found. - Ingen token kan findes. - - - Username could not be found. - Brugernavn kan ikke findes. - - - Account has expired. - Brugerkonto er udløbet. - - - Credentials have expired. - Loginoplysninger er udløbet. - - - Account is disabled. - Brugerkonto er deaktiveret. - - - Account is locked. - Brugerkonto er låst. - - - Too many failed login attempts, please try again later. - For mange fejlede login forsøg, prøv venligst senere. - - - Invalid or expired login link. - Ugyldigt eller udløbet login link. - - - Too many failed login attempts, please try again in %minutes% minute. - For mange fejlede login forsøg, prøv igen om %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - For mange fejlede login forsøg, prøv igen om %minutes% minutter. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.de.xlf b/vendor/symfony/security-core/Resources/translations/security.de.xlf deleted file mode 100644 index dc7a875..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.de.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Es ist ein Fehler bei der Authentifikation aufgetreten. - - - Authentication credentials could not be found. - Es konnten keine Zugangsdaten gefunden werden. - - - Authentication request could not be processed due to a system problem. - Die Authentifikation konnte wegen eines Systemproblems nicht bearbeitet werden. - - - Invalid credentials. - Fehlerhafte Zugangsdaten. - - - Cookie has already been used by someone else. - Cookie wurde bereits von jemand anderem verwendet. - - - Not privileged to request the resource. - Keine Rechte, um die Ressource anzufragen. - - - Invalid CSRF token. - Ungültiges CSRF-Token. - - - No authentication provider found to support the authentication token. - Es wurde kein Authentifizierungs-Provider gefunden, der das Authentifizierungs-Token unterstützt. - - - No session available, it either timed out or cookies are not enabled. - Keine Session verfügbar, entweder ist diese abgelaufen oder Cookies sind nicht aktiviert. - - - No token could be found. - Es wurde kein Token gefunden. - - - Username could not be found. - Der Benutzername wurde nicht gefunden. - - - Account has expired. - Der Account ist abgelaufen. - - - Credentials have expired. - Die Zugangsdaten sind abgelaufen. - - - Account is disabled. - Der Account ist deaktiviert. - - - Account is locked. - Der Account ist gesperrt. - - - Too many failed login attempts, please try again later. - Zu viele fehlgeschlagene Anmeldeversuche, bitte versuchen Sie es später noch einmal. - - - Invalid or expired login link. - Ungültiger oder abgelaufener Anmelde-Link. - - - Too many failed login attempts, please try again in %minutes% minute. - Zu viele fehlgeschlagene Anmeldeversuche, bitte versuchen Sie es in einer Minute noch einmal. - - - Too many failed login attempts, please try again in %minutes% minutes. - Zu viele fehlgeschlagene Anmeldeversuche, bitte versuchen Sie es in %minutes% Minuten noch einmal. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.el.xlf b/vendor/symfony/security-core/Resources/translations/security.el.xlf deleted file mode 100644 index 1cf4fb2..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.el.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Συνέβη ένα σφάλμα πιστοποίησης. - - - Authentication credentials could not be found. - Τα στοιχεία πιστοποίησης δε βρέθηκαν. - - - Authentication request could not be processed due to a system problem. - Το αίτημα πιστοποίησης δε μπορεί να επεξεργαστεί λόγω σφάλματος του συστήματος. - - - Invalid credentials. - Λανθασμένα στοιχεία σύνδεσης. - - - Cookie has already been used by someone else. - Το Cookie έχει ήδη χρησιμοποιηθεί από κάποιον άλλο. - - - Not privileged to request the resource. - Δεν είστε εξουσιοδοτημένος για πρόσβαση στο συγκεκριμένο περιεχόμενο. - - - Invalid CSRF token. - Μη έγκυρο CSRF token. - - - No authentication provider found to support the authentication token. - Δε βρέθηκε κάποιος πάροχος πιστοποίησης που να υποστηρίζει το token πιστοποίησης. - - - No session available, it either timed out or cookies are not enabled. - Δεν υπάρχει ενεργή σύνοδος (session), είτε έχει λήξει ή τα cookies δεν είναι ενεργοποιημένα. - - - No token could be found. - Δεν ήταν δυνατόν να βρεθεί κάποιο token. - - - Username could not be found. - Το όνομα χρήστη δε βρέθηκε. - - - Account has expired. - Ο λογαριασμός έχει λήξει. - - - Credentials have expired. - Τα στοιχεία σύνδεσης έχουν λήξει. - - - Account is disabled. - Ο λογαριασμός είναι απενεργοποιημένος. - - - Account is locked. - Ο λογαριασμός είναι κλειδωμένος. - - - Too many failed login attempts, please try again later. - Πολλαπλές αποτυχημένες απόπειρες σύνδεσης, παρακαλούμε ξαναδοκιμάστε αργότερα. - - - Invalid or expired login link. - Μη έγκυρος ή ληγμένος σύνδεσμος σύνδεσης. - - - Too many failed login attempts, please try again in %minutes% minute. - Πολλαπλές αποτυχημένες απόπειρες σύνδεσης, παρακαλούμε ξαναδοκιμάστε σε %minutes% λεπτό. - - - Too many failed login attempts, please try again in %minutes% minutes. - Πολλαπλές αποτυχημένες απόπειρες σύνδεσης, παρακαλούμε ξαναδοκιμάστε σε %minutes% λεπτά. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.en.xlf b/vendor/symfony/security-core/Resources/translations/security.en.xlf deleted file mode 100644 index e7bc7c7..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.en.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - An authentication exception occurred. - - - Authentication credentials could not be found. - Authentication credentials could not be found. - - - Authentication request could not be processed due to a system problem. - Authentication request could not be processed due to a system problem. - - - Invalid credentials. - Invalid credentials. - - - Cookie has already been used by someone else. - Cookie has already been used by someone else. - - - Not privileged to request the resource. - Not privileged to request the resource. - - - Invalid CSRF token. - Invalid CSRF token. - - - No authentication provider found to support the authentication token. - No authentication provider found to support the authentication token. - - - No session available, it either timed out or cookies are not enabled. - No session available, it either timed out or cookies are not enabled. - - - No token could be found. - No token could be found. - - - Username could not be found. - Username could not be found. - - - Account has expired. - Account has expired. - - - Credentials have expired. - Credentials have expired. - - - Account is disabled. - Account is disabled. - - - Account is locked. - Account is locked. - - - Too many failed login attempts, please try again later. - Too many failed login attempts, please try again later. - - - Invalid or expired login link. - Invalid or expired login link. - - - Too many failed login attempts, please try again in %minutes% minute. - Too many failed login attempts, please try again in %minutes% minute. - - - Too many failed login attempts, please try again in %minutes% minutes. - Too many failed login attempts, please try again in %minutes% minutes. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.es.xlf b/vendor/symfony/security-core/Resources/translations/security.es.xlf deleted file mode 100644 index 2aec105..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.es.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ocurrió un error de autenticación. - - - Authentication credentials could not be found. - No se encontraron las credenciales de autenticación. - - - Authentication request could not be processed due to a system problem. - La solicitud de autenticación no se pudo procesar debido a un problema del sistema. - - - Invalid credentials. - Credenciales no válidas. - - - Cookie has already been used by someone else. - La cookie ya ha sido usada por otra persona. - - - Not privileged to request the resource. - No tiene privilegios para solicitar el recurso. - - - Invalid CSRF token. - Token CSRF no válido. - - - No authentication provider found to support the authentication token. - No se encontró un proveedor de autenticación que soporte el token de autenticación. - - - No session available, it either timed out or cookies are not enabled. - No hay ninguna sesión disponible, ha expirado o las cookies no están habilitados. - - - No token could be found. - No se encontró ningún token. - - - Username could not be found. - No se encontró el nombre de usuario. - - - Account has expired. - La cuenta ha expirado. - - - Credentials have expired. - Las credenciales han expirado. - - - Account is disabled. - La cuenta está deshabilitada. - - - Account is locked. - La cuenta está bloqueada. - - - Too many failed login attempts, please try again later. - Demasiados intentos fallidos de inicio de sesión, inténtelo de nuevo más tarde. - - - Invalid or expired login link. - Enlace de inicio de sesión inválido o expirado. - - - Too many failed login attempts, please try again in %minutes% minute. - Demasiados intentos fallidos de inicio de sesión, inténtelo de nuevo en %minutes% minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Demasiados intentos fallidos de inicio de sesión, inténtelo de nuevo en %minutes% minutos. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.et.xlf b/vendor/symfony/security-core/Resources/translations/security.et.xlf deleted file mode 100644 index cc2b16a..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.et.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Autentimisel juhtus ootamatu viga. - - - Authentication credentials could not be found. - Autentimisandmeid ei leitud. - - - Authentication request could not be processed due to a system problem. - Autentimispäring ei õnnestunud süsteemi probleemi tõttu. - - - Invalid credentials. - Vigased autentimisandmed. - - - Cookie has already been used by someone else. - Küpsis on juba kellegi teise poolt kasutuses. - - - Not privileged to request the resource. - Ressursi pärimiseks pole piisavalt õiguseid. - - - Invalid CSRF token. - Vigane CSRF märgis. - - - No authentication provider found to support the authentication token. - Ei leitud sobivat autentimismeetodit, mis toetaks autentimismärgist. - - - No session available, it either timed out or cookies are not enabled. - Seanss puudub, see on kas aegunud või pole küpsised lubatud. - - - No token could be found. - Identsustõendit ei leitud. - - - Username could not be found. - Kasutajanime ei leitud. - - - Account has expired. - Kasutajakonto on aegunud. - - - Credentials have expired. - Autentimistunnused on aegunud. - - - Account is disabled. - Kasutajakonto on keelatud. - - - Account is locked. - Kasutajakonto on lukustatud. - - - Too many failed login attempts, please try again later. - Liiga palju ebaõnnestunud autentimise katseid, palun proovi hiljem uuesti. - - - Invalid or expired login link. - Vigane või aegunud sisselogimise link. - - - Too many failed login attempts, please try again in %minutes% minute. - Liiga palju ebaõnnestunud autentimise katseid, palun proovi uuesti %minutes% minuti pärast. - - - Too many failed login attempts, please try again in %minutes% minutes. - Liiga palju ebaõnnestunud autentimise katseid, palun proovi uuesti %minutes% minuti pärast. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.eu.xlf b/vendor/symfony/security-core/Resources/translations/security.eu.xlf deleted file mode 100644 index cfcdd1b..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.eu.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Autentifikazio-errorea gertatu da. - - - Authentication credentials could not be found. - Ez dira aurkitu autentifikazio-kredentzialak. - - - Authentication request could not be processed due to a system problem. - Ezin izan da autentifikazio-eskaera prozesatu, sistema-arazo bat gertatu da eta. - - - Invalid credentials. - Kredentzialak okerrak dira. - - - Cookie has already been used by someone else. - Dagoeneko beste pertsona batek erabili du cookiea. - - - Not privileged to request the resource. - Ez duzu baliabidea eskatzeko aukerarik. - - - Invalid CSRF token. - CSRF tokena okerra da. - - - No authentication provider found to support the authentication token. - Ez da aurkitu autentifikazio-tokena eutsi dezakeen autentifikazio-hornitzailerik. - - - No session available, it either timed out or cookies are not enabled. - Ez dago saiorik erabilgarri, iraungi egin da edo cookieak ez daude gaituta. - - - No token could be found. - Ez da tokenik aurkitu. - - - Username could not be found. - Ez da erabiltzaile-izena aurkitu. - - - Account has expired. - Kontua iraungi da. - - - Credentials have expired. - Kredentzialak iraungi dira. - - - Account is disabled. - Kontua desgaituta dago. - - - Account is locked. - Kontua blokeatuta dago. - - - Too many failed login attempts, please try again later. - Saioa hasteko saio huts gehiegi, saiatu berriro geroago. - - - Invalid or expired login link. - Sartzeko esteka baliogabea edo iraungia. - - - Too many failed login attempts, please try again in %minutes% minute. - Saioa hasteko huts gehiegi egin dira, saiatu berriro minutu %minutes% geroago. - - - Too many failed login attempts, please try again in %minutes% minutes. - Saioa hasteko huts gehiegi egin dira, saiatu berriro %minutes% minututan. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.fa.xlf b/vendor/symfony/security-core/Resources/translations/security.fa.xlf deleted file mode 100644 index 1127901..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.fa.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - خطایی هنگام احراز هویت رخ داده است. - - - Authentication credentials could not be found. - شرایط احراز هویت یافت نشد. - - - Authentication request could not be processed due to a system problem. - درخواست احراز هویت به دلیل وجود مشکل در سیستم قابل پردازش نمی باشد. - - - Invalid credentials. - احراز هویت نامعتبر می باشد. - - - Cookie has already been used by someone else. - Cookie قبلا توسط شخص دیگری استفاده گردیده است. - - - Not privileged to request the resource. - دسترسی لازم برای درخواست از این منبع را دارا نمی باشید. - - - Invalid CSRF token. - توکن CSRF معتبر نمی باشد. - - - No authentication provider found to support the authentication token. - هیچ ارائه دهنده احراز هویتی برای پشتیبانی از توکن احراز هویت پیدا نشد. - - - No session available, it either timed out or cookies are not enabled. - هیچ جلسه‌ای در دسترس نمی باشد. این میتواند به دلیل پایان یافتن زمان و یا فعال نبودن کوکی ها باشد. - - - No token could be found. - هیچ توکنی پیدا نشد. - - - Username could not be found. - نام ‌کاربری پیدا نشد. - - - Account has expired. - حساب کاربری منقضی گردیده است. - - - Credentials have expired. - مجوزهای احراز هویت منقضی گردیده‌اند. - - - Account is disabled. - حساب کاربری غیرفعال می باشد. - - - Account is locked. - حساب کاربری قفل گردیده است. - - - Too many failed login attempts, please try again later. - تلاش‌های ناموفق زیادی برای ورود صورت گرفته است، لطفاً بعداً دوباره امتحان کنید. - - - Invalid or expired login link. - لینک ورود نامعتبر یا تاریخ‌گذشته است. - - - Too many failed login attempts, please try again in %minutes% minute. - تلاش‌های ناموفق زیادی برای ورود صورت گرفته است، لطفاً %minutes% دقیقه دیگر دوباره امتحان کنید. - - - Too many failed login attempts, please try again in %minutes% minutes. - تلاش‌های ناموفق زیادی برای ورود صورت گرفته است، لطفاً %minutes% دقیقه دیگر دوباره امتحان کنید. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.fi.xlf b/vendor/symfony/security-core/Resources/translations/security.fi.xlf deleted file mode 100644 index d0e9454..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.fi.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Autentikointi poikkeus tapahtui. - - - Authentication credentials could not be found. - Autentikoinnin tunnistetietoja ei löydetty. - - - Authentication request could not be processed due to a system problem. - Autentikointipyyntöä ei voitu käsitellä järjestelmäongelman vuoksi. - - - Invalid credentials. - Virheelliset tunnistetiedot. - - - Cookie has already been used by someone else. - Eväste on jo jonkin muun käytössä. - - - Not privileged to request the resource. - Ei oikeutta resurssiin. - - - Invalid CSRF token. - Virheellinen CSRF tunnus. - - - No authentication provider found to support the authentication token. - Autentikointi tunnukselle ei löydetty tuettua autentikointi tarjoajaa. - - - No session available, it either timed out or cookies are not enabled. - Sessio ei ole saatavilla, se on joko vanhentunut tai evästeet eivät ole käytössä. - - - No token could be found. - Tunnusta ei löytynyt. - - - Username could not be found. - Käyttäjätunnusta ei löydetty. - - - Account has expired. - Tili on vanhentunut. - - - Credentials have expired. - Tunnistetiedot ovat vanhentuneet. - - - Account is disabled. - Tili on poistettu käytöstä. - - - Account is locked. - Tili on lukittu. - - - Too many failed login attempts, please try again later. - Liian monta epäonnistunutta kirjautumisyritystä, yritä myöhemmin uudelleen. - - - Invalid or expired login link. - Virheellinen tai vanhentunut kirjautumislinkki. - - - Too many failed login attempts, please try again in %minutes% minute. - Liian monta epäonnistunutta kirjautumisyritystä, yritä uudelleen %minutes% minuutin kuluttua. - - - Too many failed login attempts, please try again in %minutes% minutes. - Liian monta epäonnistunutta kirjautumisyritystä, yritä uudelleen %minutes% minuutin kuluttua. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.fr.xlf b/vendor/symfony/security-core/Resources/translations/security.fr.xlf deleted file mode 100644 index 38fec55..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.fr.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Une exception d'authentification s'est produite. - - - Authentication credentials could not be found. - Les identifiants d'authentification n'ont pas pu être trouvés. - - - Authentication request could not be processed due to a system problem. - La requête d'authentification n'a pas pu être executée à cause d'un problème système. - - - Invalid credentials. - Identifiants invalides. - - - Cookie has already been used by someone else. - Le cookie a déjà été utilisé par quelqu'un d'autre. - - - Not privileged to request the resource. - Privilèges insuffisants pour accéder à la ressource. - - - Invalid CSRF token. - Jeton CSRF invalide. - - - No authentication provider found to support the authentication token. - Aucun fournisseur d'authentification n'a été trouvé pour supporter le jeton d'authentification. - - - No session available, it either timed out or cookies are not enabled. - Aucune session disponible, celle-ci a expiré ou les cookies ne sont pas activés. - - - No token could be found. - Aucun jeton n'a pu être trouvé. - - - Username could not be found. - Le nom d'utilisateur n'a pas pu être trouvé. - - - Account has expired. - Le compte a expiré. - - - Credentials have expired. - Les identifiants ont expiré. - - - Account is disabled. - Le compte est désactivé. - - - Account is locked. - Le compte est bloqué. - - - Too many failed login attempts, please try again later. - Plusieurs tentatives de connexion ont échoué, veuillez réessayer plus tard. - - - Invalid or expired login link. - Lien de connexion invalide ou expiré. - - - Too many failed login attempts, please try again in %minutes% minute. - Plusieurs tentatives de connexion ont échoué, veuillez réessayer dans %minutes% minute. - - - Too many failed login attempts, please try again in %minutes% minutes. - Plusieurs tentatives de connexion ont échoué, veuillez réessayer dans %minutes% minutes. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.gl.xlf b/vendor/symfony/security-core/Resources/translations/security.gl.xlf deleted file mode 100644 index f552a68..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.gl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ocorreu un erro de autenticación. - - - Authentication credentials could not be found. - Non se atoparon as credenciais de autenticación. - - - Authentication request could not be processed due to a system problem. - A solicitude de autenticación no puido ser procesada debido a un problema do sistema. - - - Invalid credentials. - Credenciais non válidas. - - - Cookie has already been used by someone else. - A cookie xa foi empregado por outro usuario. - - - Not privileged to request the resource. - Non ten privilexios para solicitar o recurso. - - - Invalid CSRF token. - Token CSRF non válido. - - - No authentication provider found to support the authentication token. - Non se atopou un provedor de autenticación que soporte o token de autenticación. - - - No session available, it either timed out or cookies are not enabled. - Non hai ningunha sesión dispoñible, expirou ou as cookies non están habilitadas. - - - No token could be found. - Non se atopou ningún token. - - - Username could not be found. - Non se atopou o nome de usuario. - - - Account has expired. - A conta expirou. - - - Credentials have expired. - As credenciais expiraron. - - - Account is disabled. - A conta está deshabilitada. - - - Account is locked. - A conta está bloqueada. - - - Too many failed login attempts, please try again later. - Demasiados intentos de inicio de sesión fallados. Téntao de novo máis tarde. - - - Invalid or expired login link. - Ligazón de inicio de sesión non válida ou caducada. - - - Too many failed login attempts, please try again in %minutes% minute. - Demasiados intentos de inicio de sesión errados, por favor, ténteo de novo en %minutes% minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Demasiados intentos de inicio de sesión errados, por favor, ténteo de novo en %minutes% minutos. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.he.xlf b/vendor/symfony/security-core/Resources/translations/security.he.xlf deleted file mode 100644 index facba0f..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.he.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - שגיאה באימות - - - Authentication credentials could not be found. - פרטי זיהוי לא נמצאו. - - - Authentication request could not be processed due to a system problem. - לא ניתן היה לעבד את בקשת אימות בגלל בעיית מערכת. - - - Invalid credentials. - שם משתמש או סיסמא שגויים. - - - Cookie has already been used by someone else. - עוגיה כבר שומשה. - - - Not privileged to request the resource. - אין הרשאה מתאימה. - - - Invalid CSRF token. - אסימון CSRF לא חוקי. - - - No authentication provider found to support the authentication token. - לא נמצא ספק אימות המתאימה לבקשה. - - - No session available, it either timed out or cookies are not enabled. - אין סיישן זמין, או שתם הזמן הקצוב או העוגיות אינן מופעלות. - - - No token could be found. - הטוקן לא נמצא. - - - Username could not be found. - שם משתמש לא נמצא. - - - Account has expired. - החשבון פג תוקף. - - - Credentials have expired. - פרטי התחברות פקעו תוקף. - - - Account is disabled. - החשבון מבוטל. - - - Account is locked. - החשבון נעול. - - - Too many failed login attempts, please try again later. - יותר מדי ניסיונות כניסה כושלים, אנא נסה שוב מאוחר יותר. - - - Invalid or expired login link. - קישור כניסה לא חוקי או שפג תוקפו. - - - Too many failed login attempts, please try again in %minutes% minute. - יותר מדי ניסיונות כניסה כושלים, אנא נסה שוב בוד %minutes% דקה. - - - Too many failed login attempts, please try again in %minutes% minutes. - יותר מדי ניסיונות כניסה כושלים, אנא נסה שוב בוד %minutes% דקות. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.hr.xlf b/vendor/symfony/security-core/Resources/translations/security.hr.xlf deleted file mode 100644 index d46be51..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.hr.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Dogodila se autentifikacijske iznimka. - - - Authentication credentials could not be found. - Autentifikacijski podaci nisu pronađeni. - - - Authentication request could not be processed due to a system problem. - Autentifikacijski zahtjev nije moguće provesti uslijed sistemskog problema. - - - Invalid credentials. - Neispravni akreditacijski podaci. - - - Cookie has already been used by someone else. - Cookie je već netko drugi iskoristio. - - - Not privileged to request the resource. - Nemate privilegije zahtijevati resurs. - - - Invalid CSRF token. - Neispravan CSRF token. - - - No authentication provider found to support the authentication token. - Nije pronađen autentifikacijski provider koji bi podržao autentifikacijski token. - - - No session available, it either timed out or cookies are not enabled. - Sesija nije dostupna, ili je istekla ili cookies nisu omogućeni. - - - No token could be found. - Token nije pronađen. - - - Username could not be found. - Korisničko ime nije pronađeno. - - - Account has expired. - Račun je isteko. - - - Credentials have expired. - Akreditacijski podaci su istekli. - - - Account is disabled. - Račun je onemogućen. - - - Account is locked. - Račun je zaključan. - - - Too many failed login attempts, please try again later. - Previše neuspjelih pokušaja prijave, molim pokušajte ponovo kasnije. - - - Invalid or expired login link. - Link za prijavu je isteako ili je neispravan. - - - Too many failed login attempts, please try again in %minutes% minute. - Previše neuspjelih pokušaja prijave, molim pokušajte ponovo za %minutes% minutu. - - - Too many failed login attempts, please try again in %minutes% minutes. - Previše neuspjelih pokušaja prijave, molim pokušajte ponovo za %minutes% minutu.|Previše neuspjelih pokušaja prijave, molim pokušajte ponovo za %minutes% minute.|Previše neuspjelih pokušaja prijave, molim pokušajte ponovo za %minutes% minuta. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.hu.xlf b/vendor/symfony/security-core/Resources/translations/security.hu.xlf deleted file mode 100644 index 4587e8a..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.hu.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Hitelesítési hiba lépett fel. - - - Authentication credentials could not be found. - Nem találhatók hitelesítési információk. - - - Authentication request could not be processed due to a system problem. - A hitelesítési kérést rendszerhiba miatt nem lehet feldolgozni. - - - Invalid credentials. - Érvénytelen hitelesítési információk. - - - Cookie has already been used by someone else. - Ezt a sütit valaki más már felhasználta. - - - Not privileged to request the resource. - Nem rendelkezik az erőforrás eléréséhez szükséges jogosultsággal. - - - Invalid CSRF token. - Érvénytelen CSRF token. - - - No authentication provider found to support the authentication token. - Nem található a hitelesítési tokent támogató hitelesítési szolgáltatás. - - - No session available, it either timed out or cookies are not enabled. - Munkamenet nem áll rendelkezésre, túllépte az időkeretet vagy a sütik le vannak tiltva. - - - No token could be found. - Nem található token. - - - Username could not be found. - A felhasználónév nem található. - - - Account has expired. - A fiók lejárt. - - - Credentials have expired. - A hitelesítési információk lejártak. - - - Account is disabled. - Felfüggesztett fiók. - - - Account is locked. - Zárolt fiók. - - - Too many failed login attempts, please try again later. - Túl sok sikertelen bejelentkezési kísérlet, kérjük próbálja újra később. - - - Invalid or expired login link. - Érvénytelen vagy lejárt bejelentkezési link. - - - Too many failed login attempts, please try again in %minutes% minute. - Túl sok sikertelen bejelentkezési kísérlet, kérjük próbálja újra %minutes% perc múlva. - - - Too many failed login attempts, please try again in %minutes% minutes. - Túl sok sikertelen bejelentkezési kísérlet, kérjük próbálja újra %minutes% perc múlva. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.hy.xlf b/vendor/symfony/security-core/Resources/translations/security.hy.xlf deleted file mode 100644 index e7e3202..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.hy.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Նույնականացման սխալ։ - - - Authentication credentials could not be found. - Նույնականացման տվյալները չեն գտնվել։ - - - Authentication request could not be processed due to a system problem. - Համակարգային սխալ՝ նույնականացման հացրման պրոցեսինգի ժամանակ։ - - - Invalid credentials. - Սխալ մուտքային տվյալներ - - - Cookie has already been used by someone else. - Cookie-ն արդեն օգտագործվում է ուրիշի կողմից։ - - - Not privileged to request the resource. - Ռեսուրսի հարցման համար չկա թույլատվություն։ - - - Invalid CSRF token. - Անվավեր CSRF թոքեն։ - - - No authentication provider found to support the authentication token. - Նույնականացման ոչ մի մատակարար չի գտնվել, որ աջակցի նույնականացման թոքենը։ - - - No session available, it either timed out or cookies are not enabled. - Հասանելի սեսիա չկա, կամ այն սպառվել է կամ cookie-ները անջատված են: - - - No token could be found. - Թոքենը չի գտնվել։ - - - Username could not be found. - Օգտանունը չի գտնվել։ - - - Account has expired. - Հաշիվը ժամկետանց է։ - - - Credentials have expired. - Մուտքային տվյալները ժամկետանց են։ - - - Account is disabled. - Հաշիվը դեկատիվացված է։ - - - Account is locked. - Հաշիվն արգելափակված է։ - - - Too many failed login attempts, please try again later. - Չափից շատ մուտքի փորձեր, խնդրում ենք փորձել մի փոքր ուշ - - - Invalid or expired login link. - Անվավեր կամ ժամկետանց մուտքի հղում։ - - - Too many failed login attempts, please try again in %minutes% minute. - Մուտքի չափազանց շատ անհաջող փորձեր: Խնդրում ենք կրկին փորձել %minutes րոպե: - - - Too many failed login attempts, please try again in %minutes% minutes. - Մուտքի չափազանց շատ անհաջող փորձեր: Խնդրում ենք կրկին փորձել %minutes րոպե: - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.id.xlf b/vendor/symfony/security-core/Resources/translations/security.id.xlf deleted file mode 100644 index 119e2d0..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.id.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Terjadi sebuah pengecualian otentikasi. - - - Authentication credentials could not be found. - Kredensial otentikasi tidak bisa ditemukan. - - - Authentication request could not be processed due to a system problem. - Permintaan otentikasi tidak bisa diproses karena masalah sistem. - - - Invalid credentials. - Kredensial salah. - - - Cookie has already been used by someone else. - Cookie sudah digunakan oleh orang lain. - - - Not privileged to request the resource. - Tidak berhak untuk meminta sumber daya. - - - Invalid CSRF token. - Token CSRF salah. - - - No authentication provider found to support the authentication token. - Tidak ditemukan penyedia otentikasi untuk mendukung token otentikasi. - - - No session available, it either timed out or cookies are not enabled. - Tidak ada sesi yang tersedia, mungkin waktu sudah habis atau cookie tidak diaktifkan - - - No token could be found. - Tidak ada token yang bisa ditemukan. - - - Username could not be found. - Username tidak bisa ditemukan. - - - Account has expired. - Akun telah berakhir. - - - Credentials have expired. - Kredensial telah berakhir. - - - Account is disabled. - Akun dinonaktifkan. - - - Account is locked. - Akun terkunci. - - - Too many failed login attempts, please try again later. - Terlalu banyak percobaan login yang salah, silahkan coba lagi nanti. - - - Invalid or expired login link. - Link login salah atau sudah kedaluwarsa. - - - Too many failed login attempts, please try again in %minutes% minute. - Terlalu banyak percobaan login yang salah, silahkan coba lagi dalam %minutes% menit. - - - Too many failed login attempts, please try again in %minutes% minutes. - Terlalu banyak percobaan login yang salah, silahkan coba lagi dalam %minutes% menit. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.it.xlf b/vendor/symfony/security-core/Resources/translations/security.it.xlf deleted file mode 100644 index d9d8799..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.it.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Si è verificato un errore di autenticazione. - - - Authentication credentials could not be found. - Impossibile trovare le credenziali di autenticazione. - - - Authentication request could not be processed due to a system problem. - La richiesta di autenticazione non può essere processata a causa di un errore di sistema. - - - Invalid credentials. - Credenziali non valide. - - - Cookie has already been used by someone else. - Il cookie è già stato usato da qualcun altro. - - - Not privileged to request the resource. - Non hai i privilegi per richiedere questa risorsa. - - - Invalid CSRF token. - CSRF token non valido. - - - No authentication provider found to support the authentication token. - Non è stato trovato un valido fornitore di autenticazione per supportare il token. - - - No session available, it either timed out or cookies are not enabled. - Nessuna sessione disponibile, può essere scaduta o i cookie non sono abilitati. - - - No token could be found. - Nessun token trovato. - - - Username could not be found. - Username non trovato. - - - Account has expired. - Account scaduto. - - - Credentials have expired. - Credenziali scadute. - - - Account is disabled. - L'account è disabilitato. - - - Account is locked. - L'account è bloccato. - - - Too many failed login attempts, please try again later. - Troppi tentativi di login falliti, riprova tra un po'. - - - Invalid or expired login link. - Link di login scaduto o non valido. - - - Too many failed login attempts, please try again in %minutes% minute. - Troppi tentativi di login falliti, riprova tra %minutes% minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Troppi tentativi di login falliti, riprova tra %minutes% minuti. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.ja.xlf b/vendor/symfony/security-core/Resources/translations/security.ja.xlf deleted file mode 100644 index d283152..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.ja.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - 認証エラーが発生しました。 - - - Authentication credentials could not be found. - 認証資格がありません。 - - - Authentication request could not be processed due to a system problem. - システムの問題により認証要求を処理できませんでした。 - - - Invalid credentials. - 資格が無効です。 - - - Cookie has already been used by someone else. - Cookie が別のユーザーで使用されています。 - - - Not privileged to request the resource. - リソースをリクエストする権限がありません。 - - - Invalid CSRF token. - CSRF トークンが無効です。 - - - No authentication provider found to support the authentication token. - 認証トークンをサポートする認証プロバイダーが見つかりません。 - - - No session available, it either timed out or cookies are not enabled. - 利用可能なセッションがありません。タイムアウトしたか、Cookie が無効になっています。 - - - No token could be found. - トークンが見つかりません。 - - - Username could not be found. - ユーザー名が見つかりません。 - - - Account has expired. - アカウントが有効期限切れです。 - - - Credentials have expired. - 資格が有効期限切れです。 - - - Account is disabled. - アカウントが無効です。 - - - Account is locked. - アカウントはロックされています。 - - - Too many failed login attempts, please try again later. - ログイン試行回数を超えました。しばらくして再度お試しください。 - - - Invalid or expired login link. - ログインリンクが有効期限切れ、もしくは無効です。 - - - Too many failed login attempts, please try again in %minutes% minute. - ログイン試行回数が多すぎます。%minutes%分後に再度お試しください。 - - - Too many failed login attempts, please try again in %minutes% minutes. - ログイン試行回数が多すぎます。%minutes%分後に再度お試しください。 - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.lb.xlf b/vendor/symfony/security-core/Resources/translations/security.lb.xlf deleted file mode 100644 index 36987bc..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.lb.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - Bei der Authentifikatioun ass e Feeler opgetrueden. - - - Authentication credentials could not be found. - Et konnte keng Zouganksdate fonnt ginn. - - - Authentication request could not be processed due to a system problem. - D'Ufro fir eng Authentifikatioun konnt wéinst engem Problem vum System net beaarbecht ginn. - - - Invalid credentials. - Ongëlteg Zouganksdaten. - - - Cookie has already been used by someone else. - De Cookie gouf scho vun engem anere benotzt. - - - Not privileged to request the resource. - Keng Rechter fir d'Ressource unzefroen. - - - Invalid CSRF token. - Ongëltegen CSRF-Token. - - - No authentication provider found to support the authentication token. - Et gouf keen Authentifizéierungs-Provider fonnt deen den Authentifizéierungs-Token ënnerstëtzt. - - - No session available, it either timed out or cookies are not enabled. - Keng Sëtzung disponibel. Entweder ass se ofgelaf oder Cookies sinn net aktivéiert. - - - No token could be found. - Et konnt keen Token fonnt ginn. - - - Username could not be found. - De Benotzernumm konnt net fonnt ginn. - - - Account has expired. - Den Account ass ofgelaf. - - - Credentials have expired. - D'Zouganksdate sinn ofgelaf. - - - Account is disabled. - De Konto ass deaktivéiert. - - - Account is locked. - De Konto ass gespaart. - - - Too many failed login attempts, please try again later. - Ze vill mësslonge Login-Versich, w.e.g. méi spéit nach emol probéieren. - - - Invalid or expired login link. - Ongëltegen oder ofgelafene Login-Link. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.lt.xlf b/vendor/symfony/security-core/Resources/translations/security.lt.xlf deleted file mode 100644 index b4daa08..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.lt.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Įvyko autentifikacijos klaida. - - - Authentication credentials could not be found. - Nepavyko rasti autentifikacijos duomenų. - - - Authentication request could not be processed due to a system problem. - Autentifikacijos užklausos nepavyko įvykdyti dėl sistemos klaidų. - - - Invalid credentials. - Klaidingi duomenys. - - - Cookie has already been used by someone else. - Slapukas buvo panaudotas kažkam kitam. - - - Not privileged to request the resource. - Neturite teisių pasiektį resursą. - - - Invalid CSRF token. - Neteisingas CSRF raktas. - - - No authentication provider found to support the authentication token. - Nerastas autentifikacijos tiekėjas, kuris palaikytų autentifikacijos raktą. - - - No session available, it either timed out or cookies are not enabled. - Sesija yra nepasiekiama, pasibaigė galiojimo laikas arba slapukai yra išjungti. - - - No token could be found. - Nepavyko rasti rakto. - - - Username could not be found. - Tokio naudotojo vardo nepavyko rasti. - - - Account has expired. - Paskyros galiojimo laikas baigėsi. - - - Credentials have expired. - Autentifikacijos duomenų galiojimo laikas baigėsi. - - - Account is disabled. - Paskyra yra išjungta. - - - Account is locked. - Paskyra yra užblokuota. - - - Too many failed login attempts, please try again later. - Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą vėliau. - - - Invalid or expired login link. - Netinkama arba pasibaigusio galiojimo laiko prisijungimo nuoroda. - - - Too many failed login attempts, please try again in %minutes% minute. - Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą po %minutes% minutės. - - - Too many failed login attempts, please try again in %minutes% minutes. - Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą po %minutes% minutės.|Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą po %minutes% minučių.|Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą po %minutes% minučių. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.lv.xlf b/vendor/symfony/security-core/Resources/translations/security.lv.xlf deleted file mode 100644 index bdb4a22..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.lv.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Radās autentifikācijas kļūda. - - - Authentication credentials could not be found. - Autentifikācijas dati nav atrasti. - - - Authentication request could not be processed due to a system problem. - Autentifikācijas pieprasījums nevar tikt apstrādāts sistēmas problēmas dēļ. - - - Invalid credentials. - Nederīgi autentifikācijas dati. - - - Cookie has already been used by someone else. - Kāds cits jau izmantoja sīkdatni. - - - Not privileged to request the resource. - Nav tiesību ši resursa izsaukšanai. - - - Invalid CSRF token. - Nederīgs CSRF talons. - - - No authentication provider found to support the authentication token. - Nav atrasts, autentifikācijas talonu atbalstošs, autentifikācijas sniedzējs. - - - No session available, it either timed out or cookies are not enabled. - Sesija nav pieejama - vai nu tā beidzās, vai nu sīkdatnes nav iespējotas. - - - No token could be found. - Nevar atrast nevienu talonu. - - - Username could not be found. - Nevar atrast lietotājvārdu. - - - Account has expired. - Konta derīguma termiņš ir beidzies. - - - Credentials have expired. - Autentifikācijas datu derīguma termiņš ir beidzies. - - - Account is disabled. - Konts ir atspējots. - - - Account is locked. - Konts ir slēgts. - - - Too many failed login attempts, please try again later. - Pārāk daudz atteiktu ieejas mēģinājumu, lūdzu, mēģiniet vēlreiz vēlāk. - - - Invalid or expired login link. - Ieejas saite ir nederīga vai arī tai ir beidzies derīguma termiņš. - - - Too many failed login attempts, please try again in %minutes% minute. - Pārāk daudz nesekmīgu autentifikācijas mēģinājumu, lūdzu mēģiniet vēlreiz pēc %minutes% minūtes. - - - Too many failed login attempts, please try again in %minutes% minutes. - Pārāk daudz nesekmīgu autentifikācijas mēģinājumu, lūdzu mēģiniet vēlreiz pēc %minutes% minūtēm. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.mn.xlf b/vendor/symfony/security-core/Resources/translations/security.mn.xlf deleted file mode 100644 index 7310e66..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.mn.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - Нэвтрэх хүсэлтийн алдаа гарав. - - - Authentication credentials could not be found. - Нэвтрэх эрхийн мэдээлэл олдсонгүй. - - - Authentication request could not be processed due to a system problem. - Системийн алдаанаас болон нэвтрэх хүсэлтийг гүйцэтгэх боломжгүй байна. - - - Invalid credentials. - Буруу нэвтрэх эрхийн мэдээлэл. - - - Cookie has already been used by someone else. - Күүки файлыг аль хэдийн өөр хүн хэрэглэж байна. - - - Not privileged to request the resource. - Энэхүү мэдээллийг авах эрх хүрэхгүй байна. - - - Invalid CSRF token. - Тохиромжгүй CSRF токен. - - - No authentication provider found to support the authentication token. - Нэвтрэх токенг дэмжих нэвтрэх эрхийн хангагч олдсонгүй. - - - No available, it either timed out or cookies are not enabled. - Хэрэглэгчийн session олдсонгүй, хугацаа нь дууссан эсвэл күүки идэвхижүүлээгүй байна. - - - No token could be found. - Токен олдсонгүй. - - - Username could not be found. - Нэвтрэх нэр олсонгүй. - - - Account has expired. - Бүртгэлийн хугацаа дууссан байна. - - - Credentials have expired. - Нэвтрэх эрхийн хугацаа дууссан байна. - - - Account is disabled. - Бүртгэлийг хаасан байна. - - - Account is locked. - Бүртгэлийг цоожилсон байна. - - - Too many failed login attempts, please try again later. - Хэтэрхий олон амжилтгүй оролдлого, түр хүлээгээд дахин оролдоно уу. - - - Invalid or expired login link. - Буруу эсвэл хугацаа нь дууссан нэвтрэх зам. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.my.xlf b/vendor/symfony/security-core/Resources/translations/security.my.xlf deleted file mode 100644 index df593f0..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.my.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - အသုံးပြုခွင့် ခြွင်းချက်တစ်ခုဖြစ်သွားသည်။ - - - Authentication credentials could not be found. - အသုံးပြုခွင့် အထောက်အထားများ ရှာမတွေ့ပါ။ - - - Authentication request could not be processed due to a system problem. - System ပြဿနာအခက်အခဲရှိ နေပါသဖြင့် အသုံးပြုခွင့်တောင်းဆိုချက်ကို ဆောင်ရွက်၍မရ နိုင်ပါ။ - - - Invalid credentials. - သင့်လျှော်သော် အထောက်အထားမဟုတ်ပါ။ - - - Cookie has already been used by someone else. - Cookie ကို တစ်စုံတစ်ယောက်မှ အသုံးပြုပြီးဖြစ်သည်။ - - - Not privileged to request the resource. - အရင်းအမြစ်ကိုတောင်းဆိုရန်အခွင့်ထူးမရပါ။ - - - Invalid CSRF token. - သင့်လျှော်သော် CSRF token မဟုတ်ပါ။ - - - No authentication provider found to support the authentication token. - အထောက်အထားစိစစ်ခြင်းသင်္ကေတကိုပံ့ပိုးရန် မည်သည့်အထောက်အထားစိစစ်ရေး ၀န်ဆောင်မှုမှမတွေ့ပါ။ - - - No session available, it either timed out or cookies are not enabled. - Session မအားလပ်ပါ။ Session အချိန်ကုန်သွားခြင်း (သို့မဟုတ်) cookies များကိုဖွင့်ထားခြင်းမရှိပါ။ - - - No token could be found. - Toke ရှာမတွေ့ပါ။ - - - Username could not be found. - အသုံးပြုသူအမည် ရှာဖွေတွေ့ရှိချင်းမရှိပါ။ - - - Account has expired. - အကောင့် သက်တမ်းကုန်လွန်သွားပါပြီ။ - - - Credentials have expired. - အထောက်အထားသက်တန်း ကုန်လွန်သွားပါပြီ။ - - - Account is disabled. - အကောင့်ပိတ်ထားပါသည်။ - - - Account is locked. - အကောင့် လောခ်ကျသွားပါပြီ။ - - - Too many failed login attempts, please try again later. - Login ၀င်ရန်ကြိုးစားမှုများလွန်းပါသည်၊ ကျေးဇူးပြု၍ နောက်မှထပ်ကြိုးစားပါ။ - - - Invalid or expired login link. - မသင့်လျှော်သော် (သို့မဟုတ်) သက်တန်းကုန်သော login link ဖြစ်ပါသည်။ - - - Too many failed login attempts, please try again in %minutes% minute. - Too many failed login attempts, please try again in %minutes% minute. - - - Too many failed login attempts, please try again in %minutes% minutes. - Login ၀င်ရန်ကြိုးစားမှုများလွန်းပါသည်၊ ကျေးဇူးပြု၍ နောက် %minutes% မှထပ်မံကြိုးစားပါ။ - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.nb.xlf b/vendor/symfony/security-core/Resources/translations/security.nb.xlf deleted file mode 100644 index 2d3a87c..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.nb.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - En autentiseringsfeil har skjedd. - - - Authentication credentials could not be found. - Påloggingsinformasjonen kunne ikke bli funnet. - - - Authentication request could not be processed due to a system problem. - Autentiserings forespørselen kunne ikke bli prosessert grunnet en system feil. - - - Invalid credentials. - Ugyldig påloggingsinformasjon. - - - Cookie has already been used by someone else. - Cookie har allerede blitt brukt av noen andre. - - - Not privileged to request the resource. - Ingen tilgang til å be om gitt ressurs. - - - Invalid CSRF token. - Ugyldig CSRF token. - - - No authentication provider found to support the authentication token. - Ingen autentiserings tilbyder funnet som støtter gitt autentiserings token. - - - No session available, it either timed out or cookies are not enabled. - Ingen sesjon tilgjengelig, sesjonen er enten utløpt eller cookies ikke skrudd på. - - - No token could be found. - Ingen token kunne bli funnet. - - - Username could not be found. - Brukernavn kunne ikke bli funnet. - - - Account has expired. - Brukerkonto har utgått. - - - Credentials have expired. - Påloggingsinformasjon har utløpt. - - - Account is disabled. - Brukerkonto er deaktivert. - - - Account is locked. - Brukerkonto er sperret. - - - Too many failed login attempts, please try again later. - For mange mislykkede påloggingsforsøk. Prøv igjen senere. - - - Invalid or expired login link. - Ugyldig eller utløpt påloggingskobling. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.nl.xlf b/vendor/symfony/security-core/Resources/translations/security.nl.xlf deleted file mode 100644 index b07c785..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.nl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Er heeft zich een authenticatieprobleem voorgedaan. - - - Authentication credentials could not be found. - Authenticatiegegevens konden niet worden gevonden. - - - Authentication request could not be processed due to a system problem. - Authenticatieaanvraag kon niet worden verwerkt door een technisch probleem. - - - Invalid credentials. - Ongeldige inloggegevens. - - - Cookie has already been used by someone else. - Cookie is al door een ander persoon gebruikt. - - - Not privileged to request the resource. - Onvoldoende rechten om de aanvraag te verwerken. - - - Invalid CSRF token. - CSRF-code is ongeldig. - - - No authentication provider found to support the authentication token. - Geen authenticatieprovider gevonden die de authenticatietoken ondersteunt. - - - No session available, it either timed out or cookies are not enabled. - Geen sessie beschikbaar, mogelijk is deze verlopen of cookies zijn uitgeschakeld. - - - No token could be found. - Er kon geen authenticatietoken worden gevonden. - - - Username could not be found. - Gebruikersnaam kon niet worden gevonden. - - - Account has expired. - Account is verlopen. - - - Credentials have expired. - Authenticatiegegevens zijn verlopen. - - - Account is disabled. - Account is gedeactiveerd. - - - Account is locked. - Account is geblokkeerd. - - - Too many failed login attempts, please try again later. - Te veel onjuiste inlogpogingen, probeer het later nogmaals. - - - Invalid or expired login link. - Ongeldige of verlopen inloglink. - - - Too many failed login attempts, please try again in %minutes% minute. - Te veel onjuiste inlogpogingen, probeer het opnieuw over %minutes% minuut. - - - Too many failed login attempts, please try again in %minutes% minutes. - Te veel onjuiste inlogpogingen, probeer het opnieuw over %minutes% minuten. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.nn.xlf b/vendor/symfony/security-core/Resources/translations/security.nn.xlf deleted file mode 100644 index 89ca44f..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.nn.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - Innlogginga har feila. - - - Authentication credentials could not be found. - Innloggingsinformasjonen vart ikkje funnen. - - - Authentication request could not be processed due to a system problem. - Innlogginga vart ikkje fullført på grunn av ein systemfeil. - - - Invalid credentials. - Ugyldig innloggingsinformasjon. - - - Cookie has already been used by someone else. - Informasjonskapselen er allereie brukt av ein annan brukar. - - - Not privileged to request the resource. - Du har ikkje åtgang til å be om denne ressursen. - - - Invalid CSRF token. - Ugyldig CSRF-teikn. - - - No authentication provider found to support the authentication token. - Fann ingen innloggingstilbydar som støttar dette innloggingsteiknet. - - - No session available, it either timed out or cookies are not enabled. - Ingen sesjon tilgjengeleg. Sesjonen er anten ikkje lenger gyldig, eller informasjonskapslar er ikkje skrudd på i nettlesaren. - - - No token could be found. - Fann ingen innloggingsteikn. - - - Username could not be found. - Fann ikkje brukarnamnet. - - - Account has expired. - Brukarkontoen er utgjengen. - - - Credentials have expired. - Innloggingsinformasjonen er utgjengen. - - - Account is disabled. - Brukarkontoen er sperra. - - - Account is locked. - Brukarkontoen er sperra. - - - Too many failed login attempts, please try again later. - For mange innloggingsforsøk har feila, prøv igjen seinare. - - - Invalid or expired login link. - Innloggingslenka er ugyldig eller utgjengen. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.no.xlf b/vendor/symfony/security-core/Resources/translations/security.no.xlf deleted file mode 100644 index 2d3a87c..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.no.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - En autentiseringsfeil har skjedd. - - - Authentication credentials could not be found. - Påloggingsinformasjonen kunne ikke bli funnet. - - - Authentication request could not be processed due to a system problem. - Autentiserings forespørselen kunne ikke bli prosessert grunnet en system feil. - - - Invalid credentials. - Ugyldig påloggingsinformasjon. - - - Cookie has already been used by someone else. - Cookie har allerede blitt brukt av noen andre. - - - Not privileged to request the resource. - Ingen tilgang til å be om gitt ressurs. - - - Invalid CSRF token. - Ugyldig CSRF token. - - - No authentication provider found to support the authentication token. - Ingen autentiserings tilbyder funnet som støtter gitt autentiserings token. - - - No session available, it either timed out or cookies are not enabled. - Ingen sesjon tilgjengelig, sesjonen er enten utløpt eller cookies ikke skrudd på. - - - No token could be found. - Ingen token kunne bli funnet. - - - Username could not be found. - Brukernavn kunne ikke bli funnet. - - - Account has expired. - Brukerkonto har utgått. - - - Credentials have expired. - Påloggingsinformasjon har utløpt. - - - Account is disabled. - Brukerkonto er deaktivert. - - - Account is locked. - Brukerkonto er sperret. - - - Too many failed login attempts, please try again later. - For mange mislykkede påloggingsforsøk. Prøv igjen senere. - - - Invalid or expired login link. - Ugyldig eller utløpt påloggingskobling. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.pl.xlf b/vendor/symfony/security-core/Resources/translations/security.pl.xlf deleted file mode 100644 index 430f9f2..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.pl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Wystąpił błąd uwierzytelniania. - - - Authentication credentials could not be found. - Dane uwierzytelniania nie zostały znalezione. - - - Authentication request could not be processed due to a system problem. - Żądanie uwierzytelniania nie mogło zostać pomyślnie zakończone z powodu problemu z systemem. - - - Invalid credentials. - Nieprawidłowe dane. - - - Cookie has already been used by someone else. - To ciasteczko jest używane przez kogoś innego. - - - Not privileged to request the resource. - Brak uprawnień dla żądania wskazanego zasobu. - - - Invalid CSRF token. - Nieprawidłowy token CSRF. - - - No authentication provider found to support the authentication token. - Nie znaleziono mechanizmu uwierzytelniania zdolnego do obsługi przesłanego tokenu. - - - No session available, it either timed out or cookies are not enabled. - Brak danych sesji, sesja wygasła lub ciasteczka nie są włączone. - - - No token could be found. - Nie znaleziono tokenu. - - - Username could not be found. - Użytkownik o podanej nazwie nie istnieje. - - - Account has expired. - Konto wygasło. - - - Credentials have expired. - Dane uwierzytelniania wygasły. - - - Account is disabled. - Konto jest wyłączone. - - - Account is locked. - Konto jest zablokowane. - - - Too many failed login attempts, please try again later. - Zbyt dużo nieudanych prób logowania, proszę spróbować ponownie później. - - - Invalid or expired login link. - Nieprawidłowy lub wygasły link logowania. - - - Too many failed login attempts, please try again in %minutes% minute. - Zbyt wiele nieudanych prób logowania, spróbuj ponownie po upływie %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - Zbyt wiele nieudanych prób logowania, spróbuj ponownie po upływie %minutes% minut. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.pt.xlf b/vendor/symfony/security-core/Resources/translations/security.pt.xlf deleted file mode 100644 index e4034ae..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.pt.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ocorreu uma excepção durante a autenticação. - - - Authentication credentials could not be found. - As credenciais de autenticação não foram encontradas. - - - Authentication request could not be processed due to a system problem. - O pedido de autenticação não foi concluído devido a um problema no sistema. - - - Invalid credentials. - Credenciais inválidas. - - - Cookie has already been used by someone else. - Este cookie já está em uso. - - - Not privileged to request the resource. - Não possui privilégios para aceder a este recurso. - - - Invalid CSRF token. - Token CSRF inválido. - - - No authentication provider found to support the authentication token. - Nenhum fornecedor de autenticação encontrado para suportar o token de autenticação. - - - No session available, it either timed out or cookies are not enabled. - Não existe sessão disponível, esta expirou ou os cookies estão desativados. - - - No token could be found. - O token não foi encontrado. - - - Username could not be found. - Nome de utilizador não encontrado. - - - Account has expired. - A conta expirou. - - - Credentials have expired. - As credenciais expiraram. - - - Account is disabled. - Conta desativada. - - - Account is locked. - A conta está trancada. - - - Too many failed login attempts, please try again later. - Várias tentativas de login falhadas, por favor tente mais tarde. - - - Invalid or expired login link. - Ligação de login inválida ou expirada. - - - Too many failed login attempts, please try again in %minutes% minute. - Demasiadas tentativas de login, tente novamente num minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Demasiadas tentativas de login, tente novamente em %minutes% minutos. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.pt_BR.xlf b/vendor/symfony/security-core/Resources/translations/security.pt_BR.xlf deleted file mode 100644 index 438ae86..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.pt_BR.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Uma exceção ocorreu durante a autenticação. - - - Authentication credentials could not be found. - As credenciais de autenticação não foram encontradas. - - - Authentication request could not be processed due to a system problem. - A solicitação de autenticação não pôde ser processada devido a um problema no sistema. - - - Invalid credentials. - Credenciais inválidas. - - - Cookie has already been used by someone else. - Este cookie já foi usado por outra pessoa. - - - Not privileged to request the resource. - Sem privilégio para solicitar o recurso. - - - Invalid CSRF token. - Token CSRF inválido. - - - No authentication provider found to support the authentication token. - Nenhum provedor de autenticação encontrado para suportar o token de autenticação. - - - No session available, it either timed out or cookies are not enabled. - Nenhuma sessão disponível, ela expirou ou os cookies não estão habilitados. - - - No token could be found. - Nenhum token foi encontrado. - - - Username could not be found. - Nome de usuário não encontrado. - - - Account has expired. - A conta está expirada. - - - Credentials have expired. - As credenciais estão expiradas. - - - Account is disabled. - Conta desativada. - - - Account is locked. - A conta está travada. - - - Too many failed login attempts, please try again later. - Muitas tentativas de login malsucedidas, tente novamente mais tarde. - - - Invalid or expired login link. - Link de login inválido ou expirado. - - - Too many failed login attempts, please try again in %minutes% minute. - Muitas tentativas de login inválidas, por favor, tente novamente em um minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Muitas tentativas de login inválidas, por favor, tente novamente em %minutes% minutos. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.ro.xlf b/vendor/symfony/security-core/Resources/translations/security.ro.xlf deleted file mode 100644 index 9324a86..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.ro.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - A apărut o eroare de autentificare. - - - Authentication credentials could not be found. - Informațiile de autentificare nu au fost găsite. - - - Authentication request could not be processed due to a system problem. - Sistemul nu a putut procesa cererea de autentificare din cauza unei erori. - - - Invalid credentials. - Date de autentificare invalide. - - - Cookie has already been used by someone else. - Cookie este folosit deja de altcineva. - - - Not privileged to request the resource. - Permisiuni insuficiente pentru resursa cerută. - - - Invalid CSRF token. - Token CSRF este invalid. - - - No authentication provider found to support the authentication token. - Nu a fost găsit nici un agent de autentificare pentru tokenul specificat. - - - No session available, it either timed out or cookies are not enabled. - Sesiunea nu mai este disponibilă, a expirat sau suportul pentru cookies nu este activat. - - - No token could be found. - Tokenul nu a putut fi găsit. - - - Username could not be found. - Numele de utilizator nu a fost găsit. - - - Account has expired. - Contul a expirat. - - - Credentials have expired. - Datele de autentificare au expirat. - - - Account is disabled. - Contul este dezactivat. - - - Account is locked. - Contul este blocat. - - - Too many failed login attempts, please try again later. - Prea multe încercări de autentificare eșuate, vă rugăm să încercați mai târziu. - - - Invalid or expired login link. - Link de autentificare invalid sau expirat. - - - Too many failed login attempts, please try again in %minutes% minute. - Prea multe încercări nereușite, încearcă din nou în %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - Prea multe încercări nereușite, încearcă din nou în %minutes% minute. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.ru.xlf b/vendor/symfony/security-core/Resources/translations/security.ru.xlf deleted file mode 100644 index 4a3124f..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.ru.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ошибка аутентификации. - - - Authentication credentials could not be found. - Аутентификационные данные не найдены. - - - Authentication request could not be processed due to a system problem. - Запрос аутентификации не может быть обработан в связи с проблемой в системе. - - - Invalid credentials. - Недействительные аутентификационные данные. - - - Cookie has already been used by someone else. - Cookie уже был использован кем-то другим. - - - Not privileged to request the resource. - Отсутствуют права на запрос этого ресурса. - - - Invalid CSRF token. - Недействительный токен CSRF. - - - No authentication provider found to support the authentication token. - Не найден провайдер аутентификации, поддерживающий токен аутентификации. - - - No session available, it either timed out or cookies are not enabled. - Сессия не найдена, ее время истекло, либо cookies не включены. - - - No token could be found. - Токен не найден. - - - Username could not be found. - Имя пользователя не найдено. - - - Account has expired. - Время действия учетной записи истекло. - - - Credentials have expired. - Время действия аутентификационных данных истекло. - - - Account is disabled. - Учетная запись отключена. - - - Account is locked. - Учетная запись заблокирована. - - - Too many failed login attempts, please try again later. - Слишком много неудачных попыток входа, пожалуйста, попробуйте позже. - - - Invalid or expired login link. - Ссылка для входа недействительна или просрочена. - - - Too many failed login attempts, please try again in %minutes% minute. - Слишком много неудачных попыток входа в систему, повторите попытку через %minutes% минуту. - - - Too many failed login attempts, please try again in %minutes% minutes. - Слишком много неудачных попыток входа в систему, повторите попытку через %minutes% мин. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sk.xlf b/vendor/symfony/security-core/Resources/translations/security.sk.xlf deleted file mode 100644 index 8e06bef..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sk.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Pri overovaní došlo k chybe. - - - Authentication credentials could not be found. - Overovacie údaje neboli nájdené. - - - Authentication request could not be processed due to a system problem. - Požiadavok na overenie nemohol byť spracovaný kvôli systémovej chybe. - - - Invalid credentials. - Neplatné prihlasovacie údaje. - - - Cookie has already been used by someone else. - Cookie už bolo použité niekým iným. - - - Not privileged to request the resource. - Nemáte oprávnenie pristupovať k prostriedku. - - - Invalid CSRF token. - Neplatný CSRF token. - - - No authentication provider found to support the authentication token. - Poskytovateľ pre overovací token nebol nájdený. - - - No session available, it either timed out or cookies are not enabled. - Session nie je k dispozíci, vypršala jej platnosť, alebo sú zakázané cookies. - - - No token could be found. - Token nebol nájdený. - - - Username could not be found. - Prihlasovacie meno nebolo nájdené. - - - Account has expired. - Platnosť účtu skončila. - - - Credentials have expired. - Platnosť prihlasovacích údajov skončila. - - - Account is disabled. - Účet je zakázaný. - - - Account is locked. - Účet je zablokovaný. - - - Too many failed login attempts, please try again later. - Príliš mnoho neúspešných pokusov o prihlásenie. Skúste to prosím znovu neskôr. - - - Invalid or expired login link. - Neplatný alebo expirovaný odkaz na prihlásenie. - - - Too many failed login attempts, please try again in %minutes% minute. - Príliš veľa neúspešných pokusov o prihlásenie. Skúste to znova o %minutes% minútu. - - - Too many failed login attempts, please try again in %minutes% minutes. - Príliš veľa neúspešných pokusov o prihlásenie. Skúste to znova o %minutes% minút. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sl.xlf b/vendor/symfony/security-core/Resources/translations/security.sl.xlf deleted file mode 100644 index 6466e58..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Prišlo je do izjeme pri preverjanju avtentikacije. - - - Authentication credentials could not be found. - Poverilnic za avtentikacijo ni bilo mogoče najti. - - - Authentication request could not be processed due to a system problem. - Zahteve za avtentikacijo ni bilo mogoče izvesti zaradi sistemske težave. - - - Invalid credentials. - Neveljavne pravice. - - - Cookie has already been used by someone else. - Piškotek je uporabil že nekdo drug. - - - Not privileged to request the resource. - Nimate privilegijev za zahtevani vir. - - - Invalid CSRF token. - Neveljaven CSRF žeton. - - - No authentication provider found to support the authentication token. - Ponudnika avtentikacije za podporo prijavnega žetona ni bilo mogoče najti. - - - No session available, it either timed out or cookies are not enabled. - Seja ni na voljo, ali je potekla ali pa piškotki niso omogočeni. - - - No token could be found. - Žetona ni bilo mogoče najti. - - - Username could not be found. - Uporabniškega imena ni bilo mogoče najti. - - - Account has expired. - Račun je potekel. - - - Credentials have expired. - Poverilnice so potekle. - - - Account is disabled. - Račun je onemogočen. - - - Account is locked. - Račun je zaklenjen. - - - Too many failed login attempts, please try again later. - Preveč neuspelih poskusov prijave, poskusite znova pozneje. - - - Invalid or expired login link. - Neveljavna ali potekla povezava prijave. - - - Too many failed login attempts, please try again in %minutes% minute. - Preveč neuspelih poskusov prijave, poskusite znova čez %minutes% minuto. - - - Too many failed login attempts, please try again in %minutes% minutes. - Preveč neuspelih poskusov prijave, poskusite znova čez %minutes% minut. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sq.xlf b/vendor/symfony/security-core/Resources/translations/security.sq.xlf deleted file mode 100644 index 03e1370..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sq.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - An authentication exception occurred. - Ndodhi një problem në autentikim. - - - Authentication credentials could not be found. - Kredencialet e autentikimit nuk mund të gjendeshin. - - - Authentication request could not be processed due to a system problem. - Kërkesa për autentikim nuk mund të përpunohej për shkak të një problemi në sistem. - - - Invalid credentials. - Kredenciale të pavlefshme. - - - Cookie has already been used by someone else. - Cookie është përdorur tashmë nga dikush tjetër. - - - Not privileged to request the resource. - Nuk është i privilegjuar të kërkojë burimin. - - - Invalid CSRF token. - Identifikues i pavlefshëm CSRF. - - - No authentication provider found to support the authentication token. - Asnjë ofrues i vërtetimit nuk u gjet që të mbështesë simbolin e vërtetimit. - - - No session available, it either timed out or cookies are not enabled. - Nuk ka asnjë sesion të vlefshëm, i ka skaduar koha ose cookies nuk janë aktivizuar. - - - No token could be found. - Asnjë simbol identifikimi nuk mund të gjendej. - - - Username could not be found. - Emri i përdoruesit nuk mund të gjendej. - - - Account has expired. - Llogaria ka skaduar. - - - Credentials have expired. - Kredencialet kanë skaduar. - - - Account is disabled. - Llogaria është çaktivizuar. - - - Account is locked. - Llogaria është e kyçur. - - - Too many failed login attempts, please try again later. - Shumë përpjekje të dështuara autentikimi, provo përsëri më vonë. - - - Invalid or expired login link. - Link hyrje i pavlefshëm ose i skaduar. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sr_Cyrl.xlf b/vendor/symfony/security-core/Resources/translations/security.sr_Cyrl.xlf deleted file mode 100644 index 97549bd..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sr_Cyrl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Изузетак при аутентификацији. - - - Authentication credentials could not be found. - Аутентификациони подаци нису пронађени. - - - Authentication request could not be processed due to a system problem. - Захтев за аутентификацију не може бити обрађен због системских проблема. - - - Invalid credentials. - Невалидни подаци за аутентификацију. - - - Cookie has already been used by someone else. - Колачић је већ искоришћен од стране неког другог. - - - Not privileged to request the resource. - Немате права приступа овом ресурсу. - - - Invalid CSRF token. - Невалидан CSRF токен. - - - No authentication provider found to support the authentication token. - Аутентификациони провајдер за подршку токена није пронађен. - - - No session available, it either timed out or cookies are not enabled. - Сесија није доступна, истекла је или су колачићи искључени. - - - No token could be found. - Токен не може бити пронађен. - - - Username could not be found. - Корисничко име не може бити пронађено. - - - Account has expired. - Налог је истекао. - - - Credentials have expired. - Подаци за аутентификацију су истекли. - - - Account is disabled. - Налог је онемогућен. - - - Account is locked. - Налог је закључан. - - - Too many failed login attempts, please try again later. - Превише неуспешних покушаја пријављивања, молим покушајте поново касније. - - - Invalid or expired login link. - Линк за пријављивање је истекао или је неисправан. - - - Too many failed login attempts, please try again in %minutes% minute. - Превише неуспешних покушаја пријављивања, молим покушајте поново за %minutes% минут. - - - Too many failed login attempts, please try again in %minutes% minutes. - Превише неуспешних покушаја пријављивања, молим покушајте поново за %minutes% минута. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sr_Latn.xlf b/vendor/symfony/security-core/Resources/translations/security.sr_Latn.xlf deleted file mode 100644 index f3de5de..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sr_Latn.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Izuzetak pri autentifikaciji. - - - Authentication credentials could not be found. - Autentifikacioni podaci nisu pronađeni. - - - Authentication request could not be processed due to a system problem. - Zahtev za autentifikaciju ne može biti obrađen zbog sistemskih problema. - - - Invalid credentials. - Nevalidni podaci za autentifikaciju. - - - Cookie has already been used by someone else. - Kolačić je već iskorišćen od strane nekog drugog. - - - Not privileged to request the resource. - Nemate prava pristupa ovom resursu. - - - Invalid CSRF token. - Nevalidan CSRF token. - - - No authentication provider found to support the authentication token. - Autentifikacioni provajder za podršku tokena nije pronađen. - - - No session available, it either timed out or cookies are not enabled. - Sesija nije dostupna, istekla je ili su kolačići isključeni. - - - No token could be found. - Token ne može biti pronađen. - - - Username could not be found. - Korisničko ime ne može biti pronađeno. - - - Account has expired. - Nalog je istekao. - - - Credentials have expired. - Podaci za autentifikaciju su istekli. - - - Account is disabled. - Nalog je onemogućen. - - - Account is locked. - Nalog je zaključan. - - - Too many failed login attempts, please try again later. - Previše neuspešnih pokušaja prijavljivanja, molim pokušajte ponovo kasnije. - - - Invalid or expired login link. - Link za prijavljivanje je istekao ili je neispravan. - - - Too many failed login attempts, please try again in %minutes% minute. - Previše neuspešnih pokušaja prijavljivanja, molim pokušajte ponovo za %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - Previše neuspešnih pokušaja prijavljivanja, molim pokušajte ponovo za %minutes% minuta. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.sv.xlf b/vendor/symfony/security-core/Resources/translations/security.sv.xlf deleted file mode 100644 index 6d7b248..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.sv.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Ett autentiseringsfel har inträffat. - - - Authentication credentials could not be found. - Uppgifterna för autentisering kunde inte hittas. - - - Authentication request could not be processed due to a system problem. - Autentiseringen kunde inte genomföras på grund av systemfel. - - - Invalid credentials. - Felaktiga uppgifter. - - - Cookie has already been used by someone else. - Cookien har redan använts av någon annan. - - - Not privileged to request the resource. - Saknar rättigheter för resursen. - - - Invalid CSRF token. - Ogiltig CSRF-token. - - - No authentication provider found to support the authentication token. - Ingen leverantör för autentisering hittades för angiven autentiseringstoken. - - - No session available, it either timed out or cookies are not enabled. - Ingen session finns tillgänglig, antingen har den förfallit eller är cookies inte aktiverat. - - - No token could be found. - Ingen token kunde hittas. - - - Username could not be found. - Användarnamnet kunde inte hittas. - - - Account has expired. - Kontot har förfallit. - - - Credentials have expired. - Uppgifterna har förfallit. - - - Account is disabled. - Kontot är inaktiverat. - - - Account is locked. - Kontot är låst. - - - Too many failed login attempts, please try again later. - För många misslyckade inloggningsförsök, försök igen senare. - - - Invalid or expired login link. - Ogiltig eller utgången inloggningslänk. - - - Too many failed login attempts, please try again in %minutes% minute. - För många misslyckade inloggningsförsök, försök igen om %minutes% minut. - - - Too many failed login attempts, please try again in %minutes% minutes. - För många misslyckade inloggningsförsök, försök igen om %minutes% minuter. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.th.xlf b/vendor/symfony/security-core/Resources/translations/security.th.xlf deleted file mode 100644 index 658fcbf..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.th.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - พบความผิดพลาดในการรับรองตัวตน - - - Authentication credentials could not be found. - ไม่พบข้อมูลในการรับรองตัวตน (credentials) - - - Authentication request could not be processed due to a system problem. - คำร้องในการรับรองตัวตนไม่สามารถดำเนินการได้ เนื่องมาจากปัญหาของระบบ - - - Invalid credentials. - ข้อมูลการรับรองตัวตนไม่ถูกต้อง - - - Cookie has already been used by someone else. - Cookie ถูกใช้งานไปแล้วด้วยผู้อื่น - - - Not privileged to request the resource. - ไม่ได้รับสิทธิ์ให้ใช้งานส่วนนี้ได้ - - - Invalid CSRF token. - CSRF token ไม่ถูกต้อง - - - No authentication provider found to support the authentication token. - ไม่พบ authentication provider ที่รองรับสำหรับ authentication token - - - No session available, it either timed out or cookies are not enabled. - ไม่มี session ที่พร้อมใช้งาน, Session หมดอายุไปแล้วหรือ cookies ไม่ถูกเปิดใช้งาน - - - No token could be found. - ไม่พบ token - - - Username could not be found. - ไม่พบ Username - - - Account has expired. - บัญชีหมดอายุไปแล้ว - - - Credentials have expired. - ข้อมูลการระบุตัวตนหมดอายุแล้ว - - - Account is disabled. - บัญชีถูกระงับแล้ว - - - Account is locked. - บัญชีถูกล็อกแล้ว - - - Too many failed login attempts, please try again later. - มีความพยายามเข้าสู่ระบบล้มเหลวมากเกินไป กรุณาลองใหม่ภายหลัง - - - Invalid or expired login link. - ลิงค์เข้าสู่ระบบไม่ถูกต้องหรือหมดอายุไปแล้ว - - - Too many failed login attempts, please try again in %minutes% minute. - มีความพยายามเข้าสู่ระบบล้มเหลวมากเกินไป โปรดลองอีกครั้งใน %minutes% นาที - - - Too many failed login attempts, please try again in %minutes% minutes. - มีความพยายามเข้าสู่ระบบล้มเหลวมากเกินไป โปรดลองอีกครั้งใน %minutes% นาที - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.tl.xlf b/vendor/symfony/security-core/Resources/translations/security.tl.xlf deleted file mode 100644 index eed0c7e..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.tl.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Nagkaroon ng isang pagbubukod sa pagpapatotoo. - - - Authentication credentials could not be found. - Hindi matagpuan ang mga kredensyal ng pagpapatotoo. - - - Authentication request could not be processed due to a system problem. - Ang kahilingan sa pagpapatotoo ay hindi naproseso dahil sa isang problema sa system. - - - Invalid credentials. - Di-wastong mga kredensyal. - - - Cookie has already been used by someone else. - Ang Cookie ay ginamit na ng ibang tao. - - - Not privileged to request the resource. - Walang pribilehiyo upang humingi ng mga bagong mapagkukunan. - - - Invalid CSRF token. - Di-wastong token ng CSRF. - - - No authentication provider found to support the authentication token. - Walang nahanap na provider ng pagpapatotoo upang suportahan ang token ng pagpapatotoo. - - - No session available, it either timed out or cookies are not enabled. - Walang magagamit na session, alinman sa nag-time out o ang cookies ay hindi pinagana. - - - No token could be found. - Walang makitang token. - - - Username could not be found. - Hindi makita ang username. - - - Account has expired. - Nag-expire na ang account. - - - Credentials have expired. - Nag-expire na ang mga kredensyal. - - - Account is disabled. - Ang account ay hindi pinagana. - - - Account is locked. - Ang account ay naka-lock. - - - Too many failed login attempts, please try again later. - Napakaraming nabigong mga pagtatangka sa pag-login, mangyaring subukang muli sa ibang pagkakataon. - - - Invalid or expired login link. - Inbalido o nagexpire na ang link para makapaglogin. - - - Too many failed login attempts, please try again in %minutes% minute. - Napakaraming nabigong mga pagtatangka sa pag-login, pakisubukan ulit sa% minuto% minuto. - - - Too many failed login attempts, please try again in %minutes% minute. - Napakaraming nabigong mga pagtatangka sa pag-login, pakisubukan ulit sa% minuto% minuto. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.tr.xlf b/vendor/symfony/security-core/Resources/translations/security.tr.xlf deleted file mode 100644 index 3466f8f..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.tr.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Bir yetkilendirme istisnası oluştu. - - - Authentication credentials could not be found. - Kimlik bilgileri bulunamadı. - - - Authentication request could not be processed due to a system problem. - Bir sistem hatası nedeniyle yetkilendirme isteği işleme alınamıyor. - - - Invalid credentials. - Geçersiz kimlik bilgileri. - - - Cookie has already been used by someone else. - Çerez bir başkası tarafından zaten kullanılmıştı. - - - Not privileged to request the resource. - Kaynak talebi için imtiyaz bulunamadı. - - - Invalid CSRF token. - Geçersiz CSRF fişi. - - - No authentication provider found to support the authentication token. - Yetkilendirme fişini destekleyecek yetkilendirme sağlayıcısı bulunamadı. - - - No session available, it either timed out or cookies are not enabled. - Oturum bulunamadı, zaman aşımına uğradı veya çerezler etkin değil. - - - No token could be found. - Fiş bulunamadı. - - - Username could not be found. - Kullanıcı adı bulunamadı. - - - Account has expired. - Hesap zaman aşımına uğradı. - - - Credentials have expired. - Kimlik bilgileri zaman aşımına uğradı. - - - Account is disabled. - Hesap engellenmiş. - - - Account is locked. - Hesap kilitlenmiş. - - - Too many failed login attempts, please try again later. - Çok fazla başarısız giriş denemesi, lütfen daha sonra tekrar deneyin. - - - Invalid or expired login link. - Geçersiz veya süresi dolmuş oturum açma bağlantısı. - - - Too many failed login attempts, please try again in %minutes% minute. - Çok fazla başarısız giriş denemesi, lütfen %minutes% dakika sonra tekrar deneyin. - - - Too many failed login attempts, please try again in %minutes% minutes. - Çok fazla başarısız giriş denemesi, lütfen %minutes% dakika sonra tekrar deneyin. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.uk.xlf b/vendor/symfony/security-core/Resources/translations/security.uk.xlf deleted file mode 100644 index 6d5cff4..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.uk.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Помилка автентифікації. - - - Authentication credentials could not be found. - Автентифікаційні дані не знайдено. - - - Authentication request could not be processed due to a system problem. - Запит на автентифікацію не може бути опрацьовано у зв’язку з проблемою в системі. - - - Invalid credentials. - Невірні автентифікаційні дані. - - - Cookie has already been used by someone else. - Хтось інший вже використав цей сookie. - - - Not privileged to request the resource. - Відсутні права на запит цього ресурсу. - - - Invalid CSRF token. - Невірний токен CSRF. - - - No authentication provider found to support the authentication token. - Не знайдено провайдера автентифікації, що підтримує токен автентифікаціії. - - - No session available, it either timed out or cookies are not enabled. - Сесія недоступна, її час вийшов, або cookies вимкнено. - - - No token could be found. - Токен не знайдено. - - - Username could not be found. - Ім’я користувача не знайдено. - - - Account has expired. - Термін дії облікового запису вичерпано. - - - Credentials have expired. - Термін дії автентифікаційних даних вичерпано. - - - Account is disabled. - Обліковий запис відключено. - - - Account is locked. - Обліковий запис заблоковано. - - - Too many failed login attempts, please try again later. - Забагато невдалих спроб входу. Будь ласка, спробуйте пізніше. - - - Invalid or expired login link. - Посилання для входу недійсне, або термін його дії закінчився. - - - Too many failed login attempts, please try again in %minutes% minute. - Забагато невдалих спроб входу. Будь ласка, спробуйте знову через %minutes% хвилину. - - - Too many failed login attempts, please try again in %minutes% minutes. - Забагато невдалих спроб входу. Будь ласка, спробуйте знову через %minutes% хв. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.uz.xlf b/vendor/symfony/security-core/Resources/translations/security.uz.xlf deleted file mode 100644 index 2b66d1b..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.uz.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Autentifikatsiyada xatolik. - - - Authentication credentials could not be found. - Autentifikatsiya ma'lumotlari topilmadi. - - - Authentication request could not be processed due to a system problem. - Tizimdagi muammo tufayli autentifikatsiya so'rovi bajarilmadi. - - - Invalid credentials. - Noto'g'ri ma'lumot. - - - Cookie has already been used by someone else. - Cookie faylini allaqachon kimdir ishlatgan. - - - Not privileged to request the resource. - Sizda ushbu manbani talab qilishga ruxsat yo'q.. - - - Invalid CSRF token. - Noto'g'ri CSRF belgisi. - - - No authentication provider found to support the authentication token. - Haqiqiylikni tasdiqlovchi belgini qo'llab-quvvatlovchi biron bir autentifikatsiya provayderi topilmadi. - - - No session available, it either timed out or cookies are not enabled. - Sessiya topilmadi, muddati tugamadi yoki cookie-fayllar yoqilmagan. - - - No token could be found. - To'ken topilmadi. - - - Username could not be found. - Foydalanuvchi nomi topilmadi. - - - Account has expired. - Akkunt muddati tugagan. - - - Credentials have expired. - Autentifikatsiya ma'lumotlari muddati tugagan. - - - Account is disabled. - Akkunt o'chirilgan. - - - Account is locked. - Akkunt bloklangan. - - - Too many failed login attempts, please try again later. - Kirish urinishlari muvaffaqiyatsiz tugadi, keyinroq qayta urinib ko'ring. - - - Invalid or expired login link. - Kirish havolasi yaroqsiz yoki muddati tugagan. - - - Too many failed login attempts, please try again in %minutes% minute. - Kirish uchun muvaffaqiyatsiz urinishlar, %minutes% daqiqadan so'ng qayta urinib ko'ring. - - - Too many failed login attempts, please try again in %minutes% minutes. - Kirish uchun muvaffaqiyatsiz urinishlar, %minutes% daqiqadan so'ng qayta urinib ko'ring. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.vi.xlf b/vendor/symfony/security-core/Resources/translations/security.vi.xlf deleted file mode 100644 index 5ad00a6..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.vi.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - Có lỗi trong quá trình xác thực. - - - Authentication credentials could not be found. - Thông tin dùng để xác thực không tìm thấy. - - - Authentication request could not be processed due to a system problem. - Yêu cầu xác thực không thể thực hiện do lỗi của hệ thống. - - - Invalid credentials. - Thông tin dùng để xác thực không hợp lệ. - - - Cookie has already been used by someone else. - Cookie đã được dùng bởi người dùng khác. - - - Not privileged to request the resource. - Không được phép yêu cầu tài nguyên. - - - Invalid CSRF token. - Mã CSRF không hợp lệ. - - - No authentication provider found to support the authentication token. - Không tìm thấy nhà cung cấp dịch vụ xác thực nào cho mã xác thực mà bạn sử dụng. - - - No session available, it either timed out or cookies are not enabled. - Không tìm thấy phiên làm việc. Phiên làm việc hoặc cookie có thể bị tắt. - - - No token could be found. - Không tìm thấy mã token. - - - Username could not be found. - Không tìm thấy tên người dùng. - - - Account has expired. - Tài khoản đã hết hạn. - - - Credentials have expired. - Thông tin xác thực đã hết hạn. - - - Account is disabled. - Tài khoản bị tạm ngừng. - - - Account is locked. - Tài khoản bị khóa. - - - Too many failed login attempts, please try again later. - Đăng nhập sai quá nhiều lần, vui lòng thử lại lần nữa. - - - Invalid or expired login link. - Liên kết đăng nhập không hợp lệ hoặc quá hạn. - - - Too many failed login attempts, please try again in %minutes% minute. - Quá nhiều lần thử đăng nhập không thành công, vui lòng thử lại sau %minutes% phút. - - - Too many failed login attempts, please try again in %minutes% minutes. - Quá nhiều lần thử đăng nhập không thành công, vui lòng thử lại sau %minutes% phút. - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.zh_CN.xlf b/vendor/symfony/security-core/Resources/translations/security.zh_CN.xlf deleted file mode 100644 index 6c4934e..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.zh_CN.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - 身份验证发生异常。 - - - Authentication credentials could not be found. - 没有找到身份验证的凭证。 - - - Authentication request could not be processed due to a system problem. - 由于系统故障,身份验证的请求无法被处理。 - - - Invalid credentials. - 无效的凭证。 - - - Cookie has already been used by someone else. - Cookie 已经被其他人使用。 - - - Not privileged to request the resource. - 没有权限请求此资源。 - - - Invalid CSRF token. - 无效的 CSRF token 。 - - - No authentication provider found to support the authentication token. - 没有找到支持此 token 的身份验证服务提供方。 - - - No session available, it either timed out or cookies are not enabled. - Session 不可用。会话超时或没有启用 cookies 。 - - - No token could be found. - 找不到 token 。 - - - Username could not be found. - 找不到用户名。 - - - Account has expired. - 帐号已过期。 - - - Credentials have expired. - 凭证已过期。 - - - Account is disabled. - 帐号已被禁用。 - - - Account is locked. - 帐号已被锁定。 - - - Too many failed login attempts, please try again later. - 登入失败的次数过多,请稍后再试。 - - - Invalid or expired login link. - 失效或过期的登入链接。 - - - Too many failed login attempts, please try again in %minutes% minute. - 登入失败的次数过多,请在%minutes%分钟后再试。 - - - Too many failed login attempts, please try again in %minutes% minutes. - 登入失败的次数过多,请在%minutes%分钟后再试。 - - - - diff --git a/vendor/symfony/security-core/Resources/translations/security.zh_TW.xlf b/vendor/symfony/security-core/Resources/translations/security.zh_TW.xlf deleted file mode 100644 index fd30587..0000000 --- a/vendor/symfony/security-core/Resources/translations/security.zh_TW.xlf +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - An authentication exception occurred. - 身份驗證發生異常。 - - - Authentication credentials could not be found. - 沒有找到身份驗證的憑證。 - - - Authentication request could not be processed due to a system problem. - 由於系統故障,身份驗證的請求無法被處理。 - - - Invalid credentials. - 無效的憑證。 - - - Cookie has already been used by someone else. - Cookie 已經被其他人使用。 - - - Not privileged to request the resource. - 沒有權限請求此資源。 - - - Invalid CSRF token. - 無效的 CSRF token 。 - - - No authentication provider found to support the authentication token. - 沒有找到支持此 token 的身份驗證服務提供方。 - - - No session available, it either timed out or cookies are not enabled. - Session 不可用。回話超時或沒有啓用 cookies 。 - - - No token could be found. - 找不到 token 。 - - - Username could not be found. - 找不到用戶名。 - - - Account has expired. - 賬號已逾期。 - - - Credentials have expired. - 憑證已逾期。 - - - Account is disabled. - 賬號已被禁用。 - - - Account is locked. - 賬號已被鎖定。 - - - Too many failed login attempts, please try again later. - 登入失敗的次數過多,請稍後再試。 - - - Invalid or expired login link. - 失效或過期的登入鏈接。 - - - Too many failed login attempts, please try again in %minutes% minute. - 登錄失敗的次數過多,請在%minutes%分鐘後再試。 - - - Too many failed login attempts, please try again in %minutes% minutes. - 登錄失敗的次數過多,請在%minutes%分鐘後再試。 - - - - diff --git a/vendor/symfony/security-core/Role/Role.php b/vendor/symfony/security-core/Role/Role.php deleted file mode 100644 index 374eb59..0000000 --- a/vendor/symfony/security-core/Role/Role.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Role; - -/** - * Allows migrating session payloads from v4. - * - * @internal - */ -class Role -{ - private $role; - - private function __construct() - { - } - - public function __toString(): string - { - return $this->role; - } -} diff --git a/vendor/symfony/security-core/Role/RoleHierarchy.php b/vendor/symfony/security-core/Role/RoleHierarchy.php deleted file mode 100644 index d7960d4..0000000 --- a/vendor/symfony/security-core/Role/RoleHierarchy.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Role; - -/** - * RoleHierarchy defines a role hierarchy. - * - * @author Fabien Potencier - */ -class RoleHierarchy implements RoleHierarchyInterface -{ - private $hierarchy; - /** @var array> */ - protected $map; - - /** - * @param array> $hierarchy - */ - public function __construct(array $hierarchy) - { - $this->hierarchy = $hierarchy; - - $this->buildRoleMap(); - } - - /** - * {@inheritdoc} - */ - public function getReachableRoleNames(array $roles): array - { - $reachableRoles = $roles; - - foreach ($roles as $role) { - if (!isset($this->map[$role])) { - continue; - } - - foreach ($this->map[$role] as $r) { - $reachableRoles[] = $r; - } - } - - return array_values(array_unique($reachableRoles)); - } - - protected function buildRoleMap() - { - $this->map = []; - foreach ($this->hierarchy as $main => $roles) { - $this->map[$main] = $roles; - $visited = []; - $additionalRoles = $roles; - while ($role = array_shift($additionalRoles)) { - if (!isset($this->hierarchy[$role])) { - continue; - } - - $visited[] = $role; - - foreach ($this->hierarchy[$role] as $roleToAdd) { - $this->map[$main][] = $roleToAdd; - } - - foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) { - $additionalRoles[] = $additionalRole; - } - } - - $this->map[$main] = array_unique($this->map[$main]); - } - } -} diff --git a/vendor/symfony/security-core/Role/RoleHierarchyInterface.php b/vendor/symfony/security-core/Role/RoleHierarchyInterface.php deleted file mode 100644 index 6e8fa81..0000000 --- a/vendor/symfony/security-core/Role/RoleHierarchyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Role; - -/** - * RoleHierarchyInterface is the interface for a role hierarchy. - * - * @author Fabien Potencier - */ -interface RoleHierarchyInterface -{ - /** - * @param string[] $roles - * - * @return string[] - */ - public function getReachableRoleNames(array $roles): array; -} diff --git a/vendor/symfony/security-core/Role/SwitchUserRole.php b/vendor/symfony/security-core/Role/SwitchUserRole.php deleted file mode 100644 index 6a29fb4..0000000 --- a/vendor/symfony/security-core/Role/SwitchUserRole.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Role; - -/** - * Allows migrating session payloads from v4. - * - * @internal - */ -class SwitchUserRole extends Role -{ - private $deprecationTriggered; - private $source; -} diff --git a/vendor/symfony/security-core/Security.php b/vendor/symfony/security-core/Security.php deleted file mode 100644 index 0e0d4e5..0000000 --- a/vendor/symfony/security-core/Security.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Helper class for commonly-needed security tasks. - * - * @final - */ -class Security implements AuthorizationCheckerInterface -{ - public const ACCESS_DENIED_ERROR = '_security.403_error'; - public const AUTHENTICATION_ERROR = '_security.last_error'; - public const LAST_USERNAME = '_security.last_username'; - public const MAX_USERNAME_LENGTH = 4096; - - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - public function getUser(): ?UserInterface - { - if (!$token = $this->getToken()) { - return null; - } - - $user = $token->getUser(); - - // @deprecated since Symfony 5.4, $user will always be a UserInterface instance - if (!$user instanceof UserInterface) { - return null; - } - - return $user; - } - - /** - * Checks if the attributes are granted against the current authentication token and optionally supplied subject. - * - * @param mixed $attributes - * @param mixed $subject - */ - public function isGranted($attributes, $subject = null): bool - { - return $this->container->get('security.authorization_checker') - ->isGranted($attributes, $subject); - } - - public function getToken(): ?TokenInterface - { - return $this->container->get('security.token_storage')->getToken(); - } -} diff --git a/vendor/symfony/security-core/Signature/Exception/ExpiredSignatureException.php b/vendor/symfony/security-core/Signature/Exception/ExpiredSignatureException.php deleted file mode 100644 index 8986c62..0000000 --- a/vendor/symfony/security-core/Signature/Exception/ExpiredSignatureException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Signature\Exception; - -use Symfony\Component\Security\Core\Exception\RuntimeException; - -/** - * @author Wouter de Jong - */ -class ExpiredSignatureException extends RuntimeException -{ -} diff --git a/vendor/symfony/security-core/Signature/Exception/InvalidSignatureException.php b/vendor/symfony/security-core/Signature/Exception/InvalidSignatureException.php deleted file mode 100644 index 72102fe..0000000 --- a/vendor/symfony/security-core/Signature/Exception/InvalidSignatureException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Signature\Exception; - -use Symfony\Component\Security\Core\Exception\RuntimeException; - -/** - * @author Wouter de Jong - */ -class InvalidSignatureException extends RuntimeException -{ -} diff --git a/vendor/symfony/security-core/Signature/ExpiredSignatureStorage.php b/vendor/symfony/security-core/Signature/ExpiredSignatureStorage.php deleted file mode 100644 index 9861c15..0000000 --- a/vendor/symfony/security-core/Signature/ExpiredSignatureStorage.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Signature; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * @author Ryan Weaver - */ -final class ExpiredSignatureStorage -{ - private $cache; - private $lifetime; - - public function __construct(CacheItemPoolInterface $cache, int $lifetime) - { - $this->cache = $cache; - $this->lifetime = $lifetime; - } - - public function countUsages(string $hash): int - { - $key = rawurlencode($hash); - if (!$this->cache->hasItem($key)) { - return 0; - } - - return $this->cache->getItem($key)->get(); - } - - public function incrementUsages(string $hash): void - { - $item = $this->cache->getItem(rawurlencode($hash)); - - if (!$item->isHit()) { - $item->expiresAfter($this->lifetime); - } - - $item->set($this->countUsages($hash) + 1); - $this->cache->save($item); - } -} diff --git a/vendor/symfony/security-core/Signature/SignatureHasher.php b/vendor/symfony/security-core/Signature/SignatureHasher.php deleted file mode 100644 index 735c613..0000000 --- a/vendor/symfony/security-core/Signature/SignatureHasher.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Signature; - -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Security\Core\Signature\Exception\ExpiredSignatureException; -use Symfony\Component\Security\Core\Signature\Exception\InvalidSignatureException; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Creates and validates secure hashes used in login links and remember-me cookies. - * - * @author Wouter de Jong - * @author Ryan Weaver - */ -class SignatureHasher -{ - private $propertyAccessor; - private $signatureProperties; - private $secret; - private $expiredSignaturesStorage; - private $maxUses; - - /** - * @param array $signatureProperties properties of the User; the hash is invalidated if these properties change - * @param ExpiredSignatureStorage|null $expiredSignaturesStorage if provided, secures a sequence of hashes that are expired - * @param int|null $maxUses used together with $expiredSignatureStorage to allow a maximum usage of a hash - */ - public function __construct(PropertyAccessorInterface $propertyAccessor, array $signatureProperties, string $secret, ExpiredSignatureStorage $expiredSignaturesStorage = null, int $maxUses = null) - { - $this->propertyAccessor = $propertyAccessor; - $this->signatureProperties = $signatureProperties; - $this->secret = $secret; - $this->expiredSignaturesStorage = $expiredSignaturesStorage; - $this->maxUses = $maxUses; - } - - /** - * Verifies the hash using the provided user and expire time. - * - * @param int $expires the expiry time as a unix timestamp - * @param string $hash the plaintext hash provided by the request - * - * @throws InvalidSignatureException If the signature does not match the provided parameters - * @throws ExpiredSignatureException If the signature is no longer valid - */ - public function verifySignatureHash(UserInterface $user, int $expires, string $hash): void - { - if (!hash_equals($hash, $this->computeSignatureHash($user, $expires))) { - throw new InvalidSignatureException('Invalid or expired signature.'); - } - - if ($expires < time()) { - throw new ExpiredSignatureException('Signature has expired.'); - } - - if ($this->expiredSignaturesStorage && $this->maxUses) { - if ($this->expiredSignaturesStorage->countUsages($hash) >= $this->maxUses) { - throw new ExpiredSignatureException(sprintf('Signature can only be used "%d" times.', $this->maxUses)); - } - - $this->expiredSignaturesStorage->incrementUsages($hash); - } - } - - /** - * Computes the secure hash for the provided user and expire time. - * - * @param int $expires the expiry time as a unix timestamp - */ - public function computeSignatureHash(UserInterface $user, int $expires): string - { - $signatureFields = [base64_encode(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername()), $expires]; - - foreach ($this->signatureProperties as $property) { - $value = $this->propertyAccessor->getValue($user, $property) ?? ''; - if ($value instanceof \DateTimeInterface) { - $value = $value->format('c'); - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new \InvalidArgumentException(sprintf('The property path "%s" on the user object "%s" must return a value that can be cast to a string, but "%s" was returned.', $property, \get_class($user), get_debug_type($value))); - } - $signatureFields[] = base64_encode($value); - } - - return base64_encode(hash_hmac('sha256', implode(':', $signatureFields), $this->secret)); - } -} diff --git a/vendor/symfony/security-core/Test/AccessDecisionStrategyTestCase.php b/vendor/symfony/security-core/Test/AccessDecisionStrategyTestCase.php deleted file mode 100644 index a82bf61..0000000 --- a/vendor/symfony/security-core/Test/AccessDecisionStrategyTestCase.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; -use Symfony\Component\Security\Core\Authorization\Strategy\AccessDecisionStrategyInterface; -use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; - -/** - * Abstract test case for access decision strategies. - * - * @author Alexander M. Turek - */ -abstract class AccessDecisionStrategyTestCase extends TestCase -{ - /** - * @dataProvider provideStrategyTests - * - * @param VoterInterface[] $voters - */ - final public function testDecide(AccessDecisionStrategyInterface $strategy, array $voters, bool $expected) - { - $token = $this->createMock(TokenInterface::class); - $manager = new AccessDecisionManager($voters, $strategy); - - $this->assertSame($expected, $manager->decide($token, ['ROLE_FOO'])); - } - - /** - * @return iterable - */ - abstract public function provideStrategyTests(): iterable; - - /** - * @return VoterInterface[] - */ - final protected function getVoters(int $grants, int $denies, int $abstains): array - { - $voters = []; - for ($i = 0; $i < $grants; ++$i) { - $voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED); - } - for ($i = 0; $i < $denies; ++$i) { - $voters[] = $this->getVoter(VoterInterface::ACCESS_DENIED); - } - for ($i = 0; $i < $abstains; ++$i) { - $voters[] = $this->getVoter(VoterInterface::ACCESS_ABSTAIN); - } - - return $voters; - } - - final protected function getVoter(int $vote): VoterInterface - { - $voter = $this->createMock(VoterInterface::class); - $voter->method('vote')->willReturn($vote); - - return $voter; - } -} diff --git a/vendor/symfony/security-core/User/ChainUserProvider.php b/vendor/symfony/security-core/User/ChainUserProvider.php deleted file mode 100644 index 148b239..0000000 --- a/vendor/symfony/security-core/User/ChainUserProvider.php +++ /dev/null @@ -1,153 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; - -/** - * Chain User Provider. - * - * This provider calls several leaf providers in a chain until one is able to - * handle the request. - * - * @author Johannes M. Schmitt - */ -class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterface -{ - private $providers; - - /** - * @param iterable $providers - */ - public function __construct(iterable $providers) - { - $this->providers = $providers; - } - - /** - * @return UserProviderInterface[] - */ - public function getProviders() - { - if ($this->providers instanceof \Traversable) { - return iterator_to_array($this->providers); - } - - return $this->providers; - } - - /** - * {@inheritdoc} - */ - public function loadUserByUsername(string $username) - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use loadUserByIdentifier() instead.', __METHOD__); - - return $this->loadUserByIdentifier($username); - } - - public function loadUserByIdentifier(string $identifier): UserInterface - { - foreach ($this->providers as $provider) { - try { - // @deprecated since Symfony 5.3, change to $provider->loadUserByIdentifier() in 6.0 - if (!method_exists($provider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($provider)); - - return $provider->loadUserByUsername($identifier); - } - - return $provider->loadUserByIdentifier($identifier); - } catch (UserNotFoundException $e) { - // try next one - } - } - - $ex = new UserNotFoundException(sprintf('There is no user with identifier "%s".', $identifier)); - $ex->setUserIdentifier($identifier); - throw $ex; - } - - /** - * {@inheritdoc} - */ - public function refreshUser(UserInterface $user) - { - $supportedUserFound = false; - - foreach ($this->providers as $provider) { - try { - if (!$provider->supportsClass(get_debug_type($user))) { - continue; - } - - return $provider->refreshUser($user); - } catch (UnsupportedUserException $e) { - // try next one - } catch (UserNotFoundException $e) { - $supportedUserFound = true; - // try next one - } - } - - if ($supportedUserFound) { - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - $username = method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(); - $e = new UserNotFoundException(sprintf('There is no user with name "%s".', $username)); - $e->setUserIdentifier($username); - throw $e; - } else { - throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', get_debug_type($user))); - } - } - - /** - * {@inheritdoc} - */ - public function supportsClass(string $class) - { - foreach ($this->providers as $provider) { - if ($provider->supportsClass($class)) { - return true; - } - } - - return false; - } - - /** - * @param PasswordAuthenticatedUserInterface $user - * - * {@inheritdoc} - */ - public function upgradePassword($user, string $newHashedPassword): void - { - if (!$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'The "%s::upgradePassword()" method expects an instance of "%s" as first argument, the "%s" class should implement it.', PasswordUpgraderInterface::class, PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - - if (!$user instanceof UserInterface) { - throw new \TypeError(sprintf('The "%s::upgradePassword()" method expects an instance of "%s" as first argument, "%s" given.', static::class, PasswordAuthenticatedUserInterface::class, get_debug_type($user))); - } - } - - foreach ($this->providers as $provider) { - if ($provider instanceof PasswordUpgraderInterface) { - try { - $provider->upgradePassword($user, $newHashedPassword); - } catch (UnsupportedUserException $e) { - // ignore: password upgrades are opportunistic - } - } - } - } -} diff --git a/vendor/symfony/security-core/User/EquatableInterface.php b/vendor/symfony/security-core/User/EquatableInterface.php deleted file mode 100644 index 7040810..0000000 --- a/vendor/symfony/security-core/User/EquatableInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * EquatableInterface used to test if two objects are equal in security - * and re-authentication context. - * - * @author Dariusz Górecki - */ -interface EquatableInterface -{ - /** - * The equality comparison should neither be done by referential equality - * nor by comparing identities (i.e. getId() === getId()). - * - * However, you do not need to compare every attribute, but only those that - * are relevant for assessing whether re-authentication is required. - * - * @return bool - */ - public function isEqualTo(UserInterface $user); -} diff --git a/vendor/symfony/security-core/User/InMemoryUser.php b/vendor/symfony/security-core/User/InMemoryUser.php deleted file mode 100644 index 39da71e..0000000 --- a/vendor/symfony/security-core/User/InMemoryUser.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * UserInterface implementation used by the in-memory user provider. - * - * This should not be used for anything else. - * - * @author Robin Chalas - * @author Fabien Potencier - */ -final class InMemoryUser extends User -{ - /** - * {@inheritdoc} - * - * @deprecated since Symfony 5.3 - */ - public function isAccountNonExpired(): bool - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, you should stop using it.', __METHOD__); - - return parent::isAccountNonExpired(); - } - - /** - * {@inheritdoc} - * - * @deprecated since Symfony 5.3 - */ - public function isAccountNonLocked(): bool - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, you should stop using it.', __METHOD__); - - return parent::isAccountNonLocked(); - } - - /** - * {@inheritdoc} - * - * @deprecated since Symfony 5.3 - */ - public function isCredentialsNonExpired(): bool - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, you should stop using it.', __METHOD__); - - return parent::isCredentialsNonExpired(); - } - - /** - * @deprecated since Symfony 5.3 - */ - public function getExtraFields(): array - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, you should stop using it.', __METHOD__); - - return parent::getExtraFields(); - } - - public function setPassword(string $password) - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, you should stop using it.', __METHOD__); - - parent::setPassword($password); - } -} diff --git a/vendor/symfony/security-core/User/InMemoryUserChecker.php b/vendor/symfony/security-core/User/InMemoryUserChecker.php deleted file mode 100644 index b35e630..0000000 --- a/vendor/symfony/security-core/User/InMemoryUserChecker.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Security\Core\Exception\AccountExpiredException; -use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; -use Symfony\Component\Security\Core\Exception\DisabledException; -use Symfony\Component\Security\Core\Exception\LockedException; - -/** - * Checks the state of the in-memory user account. - * - * @author Fabien Potencier - */ -class InMemoryUserChecker implements UserCheckerInterface -{ - public function checkPreAuth(UserInterface $user) - { - // @deprecated since Symfony 5.3, in 6.0 change to: - // if (!$user instanceof InMemoryUser) { - if (!$user instanceof InMemoryUser && !$user instanceof User) { - return; - } - - if (!$user->isEnabled()) { - $ex = new DisabledException('User account is disabled.'); - $ex->setUser($user); - throw $ex; - } - - // @deprecated since Symfony 5.3 - if (User::class === \get_class($user)) { - if (!$user->isAccountNonLocked()) { - $ex = new LockedException('User account is locked.'); - $ex->setUser($user); - throw $ex; - } - - if (!$user->isAccountNonExpired()) { - $ex = new AccountExpiredException('User account has expired.'); - $ex->setUser($user); - throw $ex; - } - } - } - - public function checkPostAuth(UserInterface $user) - { - // @deprecated since Symfony 5.3, noop in 6.0 - if (User::class !== \get_class($user)) { - return; - } - - if (!$user->isCredentialsNonExpired()) { - $ex = new CredentialsExpiredException('User credentials have expired.'); - $ex->setUser($user); - throw $ex; - } - } -} - -if (!class_exists(UserChecker::class, false)) { - class_alias(InMemoryUserChecker::class, UserChecker::class); -} diff --git a/vendor/symfony/security-core/User/InMemoryUserProvider.php b/vendor/symfony/security-core/User/InMemoryUserProvider.php deleted file mode 100644 index 6b0b41d..0000000 --- a/vendor/symfony/security-core/User/InMemoryUserProvider.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; - -/** - * InMemoryUserProvider is a simple non persistent user provider. - * - * Useful for testing, demonstration, prototyping, and for simple needs - * (a backend with a unique admin for instance) - * - * @author Fabien Potencier - */ -class InMemoryUserProvider implements UserProviderInterface -{ - /** - * @var array - */ - private $users; - - /** - * The user array is a hash where the keys are usernames and the values are - * an array of attributes: 'password', 'enabled', and 'roles'. - * - * @param array}> $users An array of users - */ - public function __construct(array $users = []) - { - foreach ($users as $username => $attributes) { - $password = $attributes['password'] ?? null; - $enabled = $attributes['enabled'] ?? true; - $roles = $attributes['roles'] ?? []; - $user = new InMemoryUser($username, $password, $roles, $enabled); - - $this->createUser($user); - } - } - - /** - * Adds a new User to the provider. - * - * @throws \LogicException - */ - public function createUser(UserInterface $user) - { - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - $userIdentifier = strtolower(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername()); - if (isset($this->users[$userIdentifier])) { - throw new \LogicException('Another user with the same username already exists.'); - } - - $this->users[$userIdentifier] = $user; - } - - /** - * {@inheritdoc} - */ - public function loadUserByUsername(string $username) - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use loadUserByIdentifier() instead.', __METHOD__); - - return $this->loadUserByIdentifier($username); - } - - public function loadUserByIdentifier(string $identifier): UserInterface - { - $user = $this->getUser($identifier); - - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - return new InMemoryUser(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), $user->getPassword(), $user->getRoles(), $user->isEnabled()); - } - - /** - * {@inheritdoc} - */ - public function refreshUser(UserInterface $user) - { - if (!$user instanceof InMemoryUser && !$user instanceof User) { - throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_debug_type($user))); - } - - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - $storedUser = $this->getUser(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername()); - $userIdentifier = method_exists($storedUser, 'getUserIdentifier') ? $storedUser->getUserIdentifier() : $storedUser->getUsername(); - - // @deprecated since Symfony 5.3 - if (User::class === \get_class($user)) { - if (User::class !== \get_class($storedUser)) { - $accountNonExpired = true; - $credentialsNonExpired = $storedUser->getPassword() === $user->getPassword(); - $accountNonLocked = true; - } else { - $accountNonExpired = $storedUser->isAccountNonExpired(); - $credentialsNonExpired = $storedUser->isCredentialsNonExpired() && $storedUser->getPassword() === $user->getPassword(); - $accountNonLocked = $storedUser->isAccountNonLocked(); - } - - return new User($userIdentifier, $storedUser->getPassword(), $storedUser->getRoles(), $storedUser->isEnabled(), $accountNonExpired, $credentialsNonExpired, $accountNonLocked); - } - - return new InMemoryUser($userIdentifier, $storedUser->getPassword(), $storedUser->getRoles(), $storedUser->isEnabled()); - } - - /** - * {@inheritdoc} - */ - public function supportsClass(string $class) - { - // @deprecated since Symfony 5.3 - if (User::class === $class) { - return true; - } - - return InMemoryUser::class == $class; - } - - /** - * Returns the user by given username. - * - * @throws UserNotFoundException if user whose given username does not exist - */ - private function getUser(string $username)/*: InMemoryUser */ - { - if (!isset($this->users[strtolower($username)])) { - $ex = new UserNotFoundException(sprintf('Username "%s" does not exist.', $username)); - $ex->setUserIdentifier($username); - - throw $ex; - } - - return $this->users[strtolower($username)]; - } -} diff --git a/vendor/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php b/vendor/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php deleted file mode 100644 index fcffe0b..0000000 --- a/vendor/symfony/security-core/User/LegacyPasswordAuthenticatedUserInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * For users that can be authenticated using a password/salt couple. - * - * Once all password hashes have been upgraded to a modern algorithm via password migrations, - * implement {@see PasswordAuthenticatedUserInterface} instead. - * - * @author Robin Chalas - */ -interface LegacyPasswordAuthenticatedUserInterface extends PasswordAuthenticatedUserInterface -{ - /** - * Returns the salt that was originally used to hash the password. - */ - public function getSalt(): ?string; -} diff --git a/vendor/symfony/security-core/User/MissingUserProvider.php b/vendor/symfony/security-core/User/MissingUserProvider.php deleted file mode 100644 index 02df051..0000000 --- a/vendor/symfony/security-core/User/MissingUserProvider.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * MissingUserProvider is a dummy user provider used to throw proper exception - * when a firewall requires a user provider but none was defined. - * - * @internal - */ -class MissingUserProvider implements UserProviderInterface -{ - /** - * @param string $firewall the firewall missing a provider - */ - public function __construct(string $firewall) - { - throw new InvalidConfigurationException(sprintf('"%s" firewall requires a user provider but none was defined.', $firewall)); - } - - /** - * {@inheritdoc} - */ - public function loadUserByUsername(string $username): UserInterface - { - throw new \BadMethodCallException(); - } - - public function loadUserByIdentifier(string $identifier): UserInterface - { - throw new \BadMethodCallException(); - } - - /** - * {@inheritdoc} - */ - public function refreshUser(UserInterface $user): UserInterface - { - throw new \BadMethodCallException(); - } - - /** - * {@inheritdoc} - */ - public function supportsClass(string $class): bool - { - throw new \BadMethodCallException(); - } -} diff --git a/vendor/symfony/security-core/User/PasswordAuthenticatedUserInterface.php b/vendor/symfony/security-core/User/PasswordAuthenticatedUserInterface.php deleted file mode 100644 index 478c9e3..0000000 --- a/vendor/symfony/security-core/User/PasswordAuthenticatedUserInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * For users that can be authenticated using a password. - * - * @author Robin Chalas - * @author Wouter de Jong - */ -interface PasswordAuthenticatedUserInterface -{ - /** - * Returns the hashed password used to authenticate the user. - * - * Usually on authentication, a plain-text password will be compared to this value. - */ - public function getPassword(): ?string; -} diff --git a/vendor/symfony/security-core/User/PasswordUpgraderInterface.php b/vendor/symfony/security-core/User/PasswordUpgraderInterface.php deleted file mode 100644 index 16195fa..0000000 --- a/vendor/symfony/security-core/User/PasswordUpgraderInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * @author Nicolas Grekas - * - * @method void upgradePassword(PasswordAuthenticatedUserInterface|UserInterface $user, string $newHashedPassword) Upgrades the hashed password of a user, typically for using a better hash algorithm. - * This method should persist the new password in the user storage and update the $user object accordingly. - * Because you don't want your users not being able to log in, this method should be opportunistic: - * it's fine if it does nothing or if it fails without throwing any exception. - */ -interface PasswordUpgraderInterface -{ -} diff --git a/vendor/symfony/security-core/User/User.php b/vendor/symfony/security-core/User/User.php deleted file mode 100644 index 28f3304..0000000 --- a/vendor/symfony/security-core/User/User.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * User is the user implementation used by the in-memory user provider. - * - * This should not be used for anything else. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link InMemoryUser} instead - */ -class User implements UserInterface, PasswordAuthenticatedUserInterface, EquatableInterface -{ - private $username; - private $password; - private $enabled; - private $accountNonExpired; - private $credentialsNonExpired; - private $accountNonLocked; - private $roles; - private $extraFields; - - public function __construct(?string $username, ?string $password, array $roles = [], bool $enabled = true, bool $userNonExpired = true, bool $credentialsNonExpired = true, bool $userNonLocked = true, array $extraFields = []) - { - if (InMemoryUser::class !== static::class) { - trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', self::class, InMemoryUser::class); - } - - if ('' === $username || null === $username) { - throw new \InvalidArgumentException('The username cannot be empty.'); - } - - $this->username = $username; - $this->password = $password; - $this->enabled = $enabled; - $this->accountNonExpired = $userNonExpired; - $this->credentialsNonExpired = $credentialsNonExpired; - $this->accountNonLocked = $userNonLocked; - $this->roles = $roles; - $this->extraFields = $extraFields; - } - - public function __toString(): string - { - return $this->getUserIdentifier(); - } - - /** - * {@inheritdoc} - */ - public function getRoles(): array - { - return $this->roles; - } - - /** - * {@inheritdoc} - */ - public function getPassword(): ?string - { - return $this->password; - } - - /** - * {@inheritdoc} - */ - public function getSalt(): ?string - { - return null; - } - - /** - * {@inheritdoc} - */ - public function getUsername(): string - { - trigger_deprecation('symfony/security-core', '5.3', 'Method "%s()" is deprecated, use getUserIdentifier() instead.', __METHOD__); - - return $this->username; - } - - /** - * Returns the identifier for this user (e.g. its username or email address). - */ - public function getUserIdentifier(): string - { - return $this->username; - } - - /** - * Checks whether the user's account has expired. - * - * Internally, if this method returns false, the authentication system - * will throw an AccountExpiredException and prevent login. - * - * @see AccountExpiredException - */ - public function isAccountNonExpired(): bool - { - return $this->accountNonExpired; - } - - /** - * Checks whether the user is locked. - * - * Internally, if this method returns false, the authentication system - * will throw a LockedException and prevent login. - * - * @see LockedException - */ - public function isAccountNonLocked(): bool - { - return $this->accountNonLocked; - } - - /** - * Checks whether the user's credentials (password) has expired. - * - * Internally, if this method returns false, the authentication system - * will throw a CredentialsExpiredException and prevent login. - * - * @see CredentialsExpiredException - */ - public function isCredentialsNonExpired(): bool - { - return $this->credentialsNonExpired; - } - - /** - * Checks whether the user is enabled. - * - * Internally, if this method returns false, the authentication system - * will throw a DisabledException and prevent login. - * - * @see DisabledException - */ - public function isEnabled(): bool - { - return $this->enabled; - } - - /** - * {@inheritdoc} - */ - public function eraseCredentials() - { - } - - public function getExtraFields(): array - { - return $this->extraFields; - } - - /** - * {@inheritdoc} - */ - public function isEqualTo(UserInterface $user): bool - { - if (!$user instanceof self) { - return false; - } - - if ($this->getPassword() !== $user->getPassword()) { - return false; - } - - if ($this->getSalt() !== $user->getSalt()) { - return false; - } - - $currentRoles = array_map('strval', (array) $this->getRoles()); - $newRoles = array_map('strval', (array) $user->getRoles()); - $rolesChanged = \count($currentRoles) !== \count($newRoles) || \count($currentRoles) !== \count(array_intersect($currentRoles, $newRoles)); - if ($rolesChanged) { - return false; - } - - if ($this->getUserIdentifier() !== $user->getUserIdentifier()) { - return false; - } - - if (self::class === static::class) { - if ($this->isAccountNonExpired() !== $user->isAccountNonExpired()) { - return false; - } - - if ($this->isAccountNonLocked() !== $user->isAccountNonLocked()) { - return false; - } - - if ($this->isCredentialsNonExpired() !== $user->isCredentialsNonExpired()) { - return false; - } - } - - if ($this->isEnabled() !== $user->isEnabled()) { - return false; - } - - return true; - } - - public function setPassword(string $password) - { - $this->password = $password; - } -} diff --git a/vendor/symfony/security-core/User/UserChecker.php b/vendor/symfony/security-core/User/UserChecker.php deleted file mode 100644 index 8ffecf1..0000000 --- a/vendor/symfony/security-core/User/UserChecker.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', UserChecker::class, InMemoryUserChecker::class); - -class_exists(InMemoryUserChecker::class); - -if (false) { - /** - * UserChecker checks the user account flags. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use {@link InMemoryUserChecker} instead - */ - class UserChecker - { - } -} diff --git a/vendor/symfony/security-core/User/UserCheckerInterface.php b/vendor/symfony/security-core/User/UserCheckerInterface.php deleted file mode 100644 index a7c5f17..0000000 --- a/vendor/symfony/security-core/User/UserCheckerInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Security\Core\Exception\AccountStatusException; - -/** - * Implement to throw AccountStatusException during the authentication process. - * - * Can be used when you want to check the account status, e.g when the account is - * disabled or blocked. This should not be used to make authentication decisions. - * - * @author Fabien Potencier - */ -interface UserCheckerInterface -{ - /** - * Checks the user account before authentication. - * - * @throws AccountStatusException - */ - public function checkPreAuth(UserInterface $user); - - /** - * Checks the user account after authentication. - * - * @throws AccountStatusException - */ - public function checkPostAuth(UserInterface $user); -} diff --git a/vendor/symfony/security-core/User/UserInterface.php b/vendor/symfony/security-core/User/UserInterface.php deleted file mode 100644 index 806de8c..0000000 --- a/vendor/symfony/security-core/User/UserInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -/** - * Represents the interface that all user classes must implement. - * - * This interface is useful because the authentication layer can deal with - * the object through its lifecycle, using the object to get the hashed - * password (for checking against a submitted password), assigning roles - * and so on. - * - * Regardless of how your users are loaded or where they come from (a database, - * configuration, web service, etc.), you will have a class that implements - * this interface. Objects that implement this interface are created and - * loaded by different objects that implement UserProviderInterface. - * - * @see UserProviderInterface - * - * @method string getUserIdentifier() returns the identifier for this user (e.g. its username or email address) - * - * @author Fabien Potencier - */ -interface UserInterface -{ - /** - * Returns the roles granted to the user. - * - * public function getRoles() - * { - * return ['ROLE_USER']; - * } - * - * Alternatively, the roles might be stored in a ``roles`` property, - * and populated in any number of different ways when the user object - * is created. - * - * @return string[] - */ - public function getRoles(); - - /** - * Returns the password used to authenticate the user. - * - * This should be the hashed password. On authentication, a plain-text - * password will be hashed, and then compared to this value. - * - * This method is deprecated since Symfony 5.3, implement it from {@link PasswordAuthenticatedUserInterface} instead. - * - * @return string|null - */ - public function getPassword(); - - /** - * Returns the salt that was originally used to hash the password. - * - * This can return null if the password was not hashed using a salt. - * - * This method is deprecated since Symfony 5.3, implement it from {@link LegacyPasswordAuthenticatedUserInterface} instead. - * - * @return string|null - */ - public function getSalt(); - - /** - * Removes sensitive data from the user. - * - * This is important if, at any given point, sensitive information like - * the plain-text password is stored on this object. - */ - public function eraseCredentials(); - - /** - * @return string - * - * @deprecated since Symfony 5.3, use getUserIdentifier() instead - */ - public function getUsername(); -} diff --git a/vendor/symfony/security-core/User/UserProviderInterface.php b/vendor/symfony/security-core/User/UserProviderInterface.php deleted file mode 100644 index 52d24f9..0000000 --- a/vendor/symfony/security-core/User/UserProviderInterface.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\User; - -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; - -/** - * Represents a class that loads UserInterface objects from some source for the authentication system. - * - * In a typical authentication configuration, a user identifier (e.g. a - * username or email address) credential enters the system (via form login, or - * any method). The user provider that is configured with that authentication - * method is asked to load the UserInterface object for the given identifier (via - * loadUserByIdentifier) so that the rest of the process can continue. - * - * Internally, a user provider can load users from any source (databases, - * configuration, web service). This is totally independent of how the authentication - * information is submitted or what the UserInterface object looks like. - * - * @see UserInterface - * - * @method UserInterface loadUserByIdentifier(string $identifier) loads the user for the given user identifier (e.g. username or email). - * This method must throw UserNotFoundException if the user is not found. - * - * @author Fabien Potencier - */ -interface UserProviderInterface -{ - /** - * Refreshes the user. - * - * It is up to the implementation to decide if the user data should be - * totally reloaded (e.g. from the database), or if the UserInterface - * object can just be merged into some internal array of users / identity - * map. - * - * @return UserInterface - * - * @throws UnsupportedUserException if the user is not supported - * @throws UserNotFoundException if the user is not found - */ - public function refreshUser(UserInterface $user); - - /** - * Whether this provider supports the given user class. - * - * @return bool - */ - public function supportsClass(string $class); - - /** - * @return UserInterface - * - * @throws UserNotFoundException - * - * @deprecated since Symfony 5.3, use loadUserByIdentifier() instead - */ - public function loadUserByUsername(string $username); -} diff --git a/vendor/symfony/security-core/Validator/Constraints/UserPassword.php b/vendor/symfony/security-core/Validator/Constraints/UserPassword.php deleted file mode 100644 index f9de213..0000000 --- a/vendor/symfony/security-core/Validator/Constraints/UserPassword.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class UserPassword extends Constraint -{ - public $message = 'This value should be the user\'s current password.'; - public $service = 'security.validator.user_password'; - - public function __construct(array $options = null, string $message = null, string $service = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->service = $service ?? $this->service; - } - - /** - * {@inheritdoc} - */ - public function validatedBy() - { - return $this->service; - } -} diff --git a/vendor/symfony/security-core/Validator/Constraints/UserPasswordValidator.php b/vendor/symfony/security-core/Validator/Constraints/UserPasswordValidator.php deleted file mode 100644 index 688426a..0000000 --- a/vendor/symfony/security-core/Validator/Constraints/UserPasswordValidator.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Validator\Constraints; - -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; -use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -class UserPasswordValidator extends ConstraintValidator -{ - private $tokenStorage; - private $hasherFactory; - - /** - * @param PasswordHasherFactoryInterface $hasherFactory - */ - public function __construct(TokenStorageInterface $tokenStorage, $hasherFactory) - { - if ($hasherFactory instanceof EncoderFactoryInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Passing a "%s" instance to the "%s" constructor is deprecated, use "%s" instead.', EncoderFactoryInterface::class, __CLASS__, PasswordHasherFactoryInterface::class); - } - - $this->tokenStorage = $tokenStorage; - $this->hasherFactory = $hasherFactory; - } - - /** - * {@inheritdoc} - */ - public function validate($password, Constraint $constraint) - { - if (!$constraint instanceof UserPassword) { - throw new UnexpectedTypeException($constraint, UserPassword::class); - } - - if (null === $password || '' === $password) { - $this->context->addViolation($constraint->message); - - return; - } - - if (!\is_string($password)) { - throw new UnexpectedTypeException($password, 'string'); - } - - $user = $this->tokenStorage->getToken()->getUser(); - - if (!$user instanceof UserInterface) { - throw new ConstraintDefinitionException('The User object must implement the UserInterface interface.'); - } - - if (!$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Using the "%s" validation constraint without implementing the "%s" interface is deprecated, the "%s" class should implement it.', UserPassword::class, PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $salt = $user->getSalt(); - if ($salt && !$user instanceof LegacyPasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $hasher = $this->hasherFactory instanceof EncoderFactoryInterface ? $this->hasherFactory->getEncoder($user) : $this->hasherFactory->getPasswordHasher($user); - - if (null === $user->getPassword() || !($hasher instanceof PasswordEncoderInterface ? $hasher->isPasswordValid($user->getPassword(), $password, $user->getSalt()) : $hasher->verify($user->getPassword(), $password, $user->getSalt()))) { - $this->context->addViolation($constraint->message); - } - } -} diff --git a/vendor/symfony/security-core/composer.json b/vendor/symfony/security-core/composer.json deleted file mode 100644 index 2270a04..0000000 --- a/vendor/symfony/security-core/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "symfony/security-core", - "type": "library", - "description": "Symfony Security Component - Core Library", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/event-dispatcher-contracts": "^1.1|^2|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1.6|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/password-hasher": "^5.3|^6.0" - }, - "require-dev": { - "psr/container": "^1.0|^2.0", - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/ldap": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/event-dispatcher": "<4.4", - "symfony/http-foundation": "<5.3", - "symfony/security-guard": "<4.4", - "symfony/ldap": "<4.4", - "symfony/validator": "<5.2" - }, - "suggest": { - "psr/container-implementation": "To instantiate the Security class", - "symfony/event-dispatcher": "", - "symfony/http-foundation": "", - "symfony/validator": "For using the user password constraint", - "symfony/expression-language": "For using the expression voter", - "symfony/ldap": "For using LDAP integration" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Security\\Core\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/security-csrf/CHANGELOG.md b/vendor/symfony/security-csrf/CHANGELOG.md deleted file mode 100644 index 22652b0..0000000 --- a/vendor/symfony/security-csrf/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - -The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md diff --git a/vendor/symfony/security-csrf/CsrfToken.php b/vendor/symfony/security-csrf/CsrfToken.php deleted file mode 100644 index 861a510..0000000 --- a/vendor/symfony/security-csrf/CsrfToken.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf; - -/** - * A CSRF token. - * - * @author Bernhard Schussek - */ -class CsrfToken -{ - private $id; - private $value; - - public function __construct(string $id, ?string $value) - { - $this->id = $id; - $this->value = $value ?? ''; - } - - /** - * Returns the ID of the CSRF token. - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Returns the value of the CSRF token. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns the value of the CSRF token. - * - * @return string - */ - public function __toString() - { - return $this->value; - } -} diff --git a/vendor/symfony/security-csrf/CsrfTokenManager.php b/vendor/symfony/security-csrf/CsrfTokenManager.php deleted file mode 100644 index 3e7454e..0000000 --- a/vendor/symfony/security-csrf/CsrfTokenManager.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Exception\InvalidArgumentException; -use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface; -use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator; -use Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage; -use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface; - -/** - * Default implementation of {@link CsrfTokenManagerInterface}. - * - * @author Bernhard Schussek - * @author Kévin Dunglas - */ -class CsrfTokenManager implements CsrfTokenManagerInterface -{ - private $generator; - private $storage; - private $namespace; - - /** - * @param string|RequestStack|callable|null $namespace - * * null: generates a namespace using $_SERVER['HTTPS'] - * * string: uses the given string - * * RequestStack: generates a namespace using the current main request - * * callable: uses the result of this callable (must return a string) - */ - public function __construct(TokenGeneratorInterface $generator = null, TokenStorageInterface $storage = null, $namespace = null) - { - $this->generator = $generator ?? new UriSafeTokenGenerator(); - $this->storage = $storage ?? new NativeSessionTokenStorage(); - - $superGlobalNamespaceGenerator = function () { - return !empty($_SERVER['HTTPS']) && 'off' !== strtolower($_SERVER['HTTPS']) ? 'https-' : ''; - }; - - if (null === $namespace) { - $this->namespace = $superGlobalNamespaceGenerator; - } elseif ($namespace instanceof RequestStack) { - $this->namespace = function () use ($namespace, $superGlobalNamespaceGenerator) { - if ($request = $namespace->getMainRequest()) { - return $request->isSecure() ? 'https-' : ''; - } - - return $superGlobalNamespaceGenerator(); - }; - } elseif (\is_callable($namespace) || \is_string($namespace)) { - $this->namespace = $namespace; - } else { - throw new InvalidArgumentException(sprintf('$namespace must be a string, a callable returning a string, null or an instance of "RequestStack". "%s" given.', get_debug_type($namespace))); - } - } - - /** - * {@inheritdoc} - */ - public function getToken(string $tokenId) - { - $namespacedId = $this->getNamespace().$tokenId; - if ($this->storage->hasToken($namespacedId)) { - $value = $this->storage->getToken($namespacedId); - } else { - $value = $this->generator->generateToken(); - - $this->storage->setToken($namespacedId, $value); - } - - return new CsrfToken($tokenId, $this->randomize($value)); - } - - /** - * {@inheritdoc} - */ - public function refreshToken(string $tokenId) - { - $namespacedId = $this->getNamespace().$tokenId; - $value = $this->generator->generateToken(); - - $this->storage->setToken($namespacedId, $value); - - return new CsrfToken($tokenId, $this->randomize($value)); - } - - /** - * {@inheritdoc} - */ - public function removeToken(string $tokenId) - { - return $this->storage->removeToken($this->getNamespace().$tokenId); - } - - /** - * {@inheritdoc} - */ - public function isTokenValid(CsrfToken $token) - { - $namespacedId = $this->getNamespace().$token->getId(); - if (!$this->storage->hasToken($namespacedId)) { - return false; - } - - return hash_equals($this->storage->getToken($namespacedId), $this->derandomize($token->getValue())); - } - - private function getNamespace(): string - { - return \is_callable($ns = $this->namespace) ? $ns() : $ns; - } - - private function randomize(string $value): string - { - $key = random_bytes(32); - $value = $this->xor($value, $key); - - return sprintf('%s.%s.%s', substr(md5($key), 0, 1 + (\ord($key[0]) % 32)), rtrim(strtr(base64_encode($key), '+/', '-_'), '='), rtrim(strtr(base64_encode($value), '+/', '-_'), '=')); - } - - private function derandomize(string $value): string - { - $parts = explode('.', $value); - if (3 !== \count($parts)) { - return $value; - } - $key = base64_decode(strtr($parts[1], '-_', '+/')); - $value = base64_decode(strtr($parts[2], '-_', '+/')); - - return $this->xor($value, $key); - } - - private function xor(string $value, string $key): string - { - if (\strlen($value) > \strlen($key)) { - $key = str_repeat($key, ceil(\strlen($value) / \strlen($key))); - } - - return $value ^ $key; - } -} diff --git a/vendor/symfony/security-csrf/CsrfTokenManagerInterface.php b/vendor/symfony/security-csrf/CsrfTokenManagerInterface.php deleted file mode 100644 index 8e4d72c..0000000 --- a/vendor/symfony/security-csrf/CsrfTokenManagerInterface.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf; - -/** - * Manages CSRF tokens. - * - * @author Bernhard Schussek - */ -interface CsrfTokenManagerInterface -{ - /** - * Returns a CSRF token for the given ID. - * - * If previously no token existed for the given ID, a new token is - * generated. Otherwise the existing token is returned (with the same value, - * not the same instance). - * - * @param string $tokenId The token ID. You may choose an arbitrary value - * for the ID - * - * @return CsrfToken - */ - public function getToken(string $tokenId); - - /** - * Generates a new token value for the given ID. - * - * This method will generate a new token for the given token ID, independent - * of whether a token value previously existed or not. It can be used to - * enforce once-only tokens in environments with high security needs. - * - * @param string $tokenId The token ID. You may choose an arbitrary value - * for the ID - * - * @return CsrfToken - */ - public function refreshToken(string $tokenId); - - /** - * Invalidates the CSRF token with the given ID, if one exists. - * - * @return string|null Returns the removed token value if one existed, NULL - * otherwise - */ - public function removeToken(string $tokenId); - - /** - * Returns whether the given CSRF token is valid. - * - * @return bool - */ - public function isTokenValid(CsrfToken $token); -} diff --git a/vendor/symfony/security-csrf/Exception/TokenNotFoundException.php b/vendor/symfony/security-csrf/Exception/TokenNotFoundException.php deleted file mode 100644 index 936afde..0000000 --- a/vendor/symfony/security-csrf/Exception/TokenNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\Exception; - -use Symfony\Component\Security\Core\Exception\RuntimeException; - -/** - * @author Bernhard Schussek - */ -class TokenNotFoundException extends RuntimeException -{ -} diff --git a/vendor/symfony/security-csrf/LICENSE b/vendor/symfony/security-csrf/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/security-csrf/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/security-csrf/README.md b/vendor/symfony/security-csrf/README.md deleted file mode 100644 index a27d877..0000000 --- a/vendor/symfony/security-csrf/README.md +++ /dev/null @@ -1,29 +0,0 @@ -Security Component - CSRF -========================= - -The Security CSRF (cross-site request forgery) component provides a class -`CsrfTokenManager` for generating and validating CSRF tokens. - -Sponsor -------- - -The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2]. - -Learn Symfony faster by watching real projects being built and actively coding -along with them. SymfonyCasts bridges that learning gap, bringing you video -tutorials and coding challenges. Code on! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/security.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://symfonycasts.com -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php b/vendor/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php deleted file mode 100644 index efb4360..0000000 --- a/vendor/symfony/security-csrf/TokenGenerator/TokenGeneratorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenGenerator; - -/** - * Generates CSRF tokens. - * - * @author Bernhard Schussek - */ -interface TokenGeneratorInterface -{ - /** - * Generates a CSRF token. - * - * @return string - */ - public function generateToken(); -} diff --git a/vendor/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php b/vendor/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php deleted file mode 100644 index 5963851..0000000 --- a/vendor/symfony/security-csrf/TokenGenerator/UriSafeTokenGenerator.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenGenerator; - -/** - * Generates CSRF tokens. - * - * @author Bernhard Schussek - */ -class UriSafeTokenGenerator implements TokenGeneratorInterface -{ - private $entropy; - - /** - * Generates URI-safe CSRF tokens. - * - * @param int $entropy The amount of entropy collected for each token (in bits) - */ - public function __construct(int $entropy = 256) - { - $this->entropy = $entropy; - } - - /** - * {@inheritdoc} - */ - public function generateToken() - { - // Generate an URI safe base64 encoded string that does not contain "+", - // "/" or "=" which need to be URL encoded and make URLs unnecessarily - // longer. - $bytes = random_bytes($this->entropy / 8); - - return rtrim(strtr(base64_encode($bytes), '+/', '-_'), '='); - } -} diff --git a/vendor/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php b/vendor/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php deleted file mode 100644 index 0d6f16b..0000000 --- a/vendor/symfony/security-csrf/TokenStorage/ClearableTokenStorageInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenStorage; - -/** - * @author Christian Flothmann - */ -interface ClearableTokenStorageInterface extends TokenStorageInterface -{ - /** - * Removes all CSRF tokens. - */ - public function clear(); -} diff --git a/vendor/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php b/vendor/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php deleted file mode 100644 index 97a95b6..0000000 --- a/vendor/symfony/security-csrf/TokenStorage/NativeSessionTokenStorage.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenStorage; - -use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; - -/** - * Token storage that uses PHP's native session handling. - * - * @author Bernhard Schussek - */ -class NativeSessionTokenStorage implements ClearableTokenStorageInterface -{ - /** - * The namespace used to store values in the session. - */ - public const SESSION_NAMESPACE = '_csrf'; - - private $sessionStarted = false; - private $namespace; - - /** - * Initializes the storage with a session namespace. - * - * @param string $namespace The namespace under which the token is stored in the session - */ - public function __construct(string $namespace = self::SESSION_NAMESPACE) - { - $this->namespace = $namespace; - } - - /** - * {@inheritdoc} - */ - public function getToken(string $tokenId) - { - if (!$this->sessionStarted) { - $this->startSession(); - } - - if (!isset($_SESSION[$this->namespace][$tokenId])) { - throw new TokenNotFoundException('The CSRF token with ID '.$tokenId.' does not exist.'); - } - - return (string) $_SESSION[$this->namespace][$tokenId]; - } - - /** - * {@inheritdoc} - */ - public function setToken(string $tokenId, string $token) - { - if (!$this->sessionStarted) { - $this->startSession(); - } - - $_SESSION[$this->namespace][$tokenId] = $token; - } - - /** - * {@inheritdoc} - */ - public function hasToken(string $tokenId) - { - if (!$this->sessionStarted) { - $this->startSession(); - } - - return isset($_SESSION[$this->namespace][$tokenId]); - } - - /** - * {@inheritdoc} - */ - public function removeToken(string $tokenId) - { - if (!$this->sessionStarted) { - $this->startSession(); - } - - if (!isset($_SESSION[$this->namespace][$tokenId])) { - return null; - } - - $token = (string) $_SESSION[$this->namespace][$tokenId]; - - unset($_SESSION[$this->namespace][$tokenId]); - - if (!$_SESSION[$this->namespace]) { - unset($_SESSION[$this->namespace]); - } - - return $token; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - unset($_SESSION[$this->namespace]); - } - - private function startSession() - { - if (\PHP_SESSION_NONE === session_status()) { - session_start(); - } - - $this->sessionStarted = true; - } -} diff --git a/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php b/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php deleted file mode 100644 index 84f9954..0000000 --- a/vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenStorage; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; -use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; - -/** - * Token storage that uses a Symfony Session object. - * - * @author Bernhard Schussek - */ -class SessionTokenStorage implements ClearableTokenStorageInterface -{ - /** - * The namespace used to store values in the session. - */ - public const SESSION_NAMESPACE = '_csrf'; - - private $requestStack; - private $namespace; - /** - * To be removed in Symfony 6.0. - */ - private $session; - - /** - * Initializes the storage with a RequestStack object and a session namespace. - * - * @param RequestStack $requestStack - * @param string $namespace The namespace under which the token is stored in the requestStack - */ - public function __construct(/* RequestStack*/ $requestStack, string $namespace = self::SESSION_NAMESPACE) - { - if ($requestStack instanceof SessionInterface) { - trigger_deprecation('symfony/security-csrf', '5.3', 'Passing a "%s" to "%s" is deprecated, use a "%s" instead.', SessionInterface::class, __CLASS__, RequestStack::class); - $request = new Request(); - $request->setSession($requestStack); - - $requestStack = new RequestStack(); - $requestStack->push($request); - } - $this->requestStack = $requestStack; - $this->namespace = $namespace; - } - - /** - * {@inheritdoc} - */ - public function getToken(string $tokenId) - { - $session = $this->getSession(); - if (!$session->isStarted()) { - $session->start(); - } - - if (!$session->has($this->namespace.'/'.$tokenId)) { - throw new TokenNotFoundException('The CSRF token with ID '.$tokenId.' does not exist.'); - } - - return (string) $session->get($this->namespace.'/'.$tokenId); - } - - /** - * {@inheritdoc} - */ - public function setToken(string $tokenId, string $token) - { - $session = $this->getSession(); - if (!$session->isStarted()) { - $session->start(); - } - - $session->set($this->namespace.'/'.$tokenId, $token); - } - - /** - * {@inheritdoc} - */ - public function hasToken(string $tokenId) - { - $session = $this->getSession(); - if (!$session->isStarted()) { - $session->start(); - } - - return $session->has($this->namespace.'/'.$tokenId); - } - - /** - * {@inheritdoc} - */ - public function removeToken(string $tokenId) - { - $session = $this->getSession(); - if (!$session->isStarted()) { - $session->start(); - } - - return $session->remove($this->namespace.'/'.$tokenId); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $session = $this->getSession(); - foreach (array_keys($session->all()) as $key) { - if (str_starts_with($key, $this->namespace.'/')) { - $session->remove($key); - } - } - } - - private function getSession(): SessionInterface - { - try { - return $this->session ?? $this->requestStack->getSession(); - } catch (SessionNotFoundException $e) { - trigger_deprecation('symfony/security-csrf', '5.3', 'Using the "%s" without a session has no effect and is deprecated. It will throw a "%s" in Symfony 6.0', __CLASS__, SessionNotFoundException::class); - - return $this->session ?? $this->session = new Session(new MockArraySessionStorage()); - } - } -} diff --git a/vendor/symfony/security-csrf/TokenStorage/TokenStorageInterface.php b/vendor/symfony/security-csrf/TokenStorage/TokenStorageInterface.php deleted file mode 100644 index 15d8bbd..0000000 --- a/vendor/symfony/security-csrf/TokenStorage/TokenStorageInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Csrf\TokenStorage; - -/** - * Stores CSRF tokens. - * - * @author Bernhard Schussek - */ -interface TokenStorageInterface -{ - /** - * Reads a stored CSRF token. - * - * @return string - * - * @throws \Symfony\Component\Security\Csrf\Exception\TokenNotFoundException If the token ID does not exist - */ - public function getToken(string $tokenId); - - /** - * Stores a CSRF token. - */ - public function setToken(string $tokenId, string $token); - - /** - * Removes a CSRF token. - * - * @return string|null Returns the removed token if one existed, NULL - * otherwise - */ - public function removeToken(string $tokenId); - - /** - * Checks whether a token with the given token ID exists. - * - * @return bool - */ - public function hasToken(string $tokenId); -} diff --git a/vendor/symfony/security-csrf/composer.json b/vendor/symfony/security-csrf/composer.json deleted file mode 100644 index ce55876..0000000 --- a/vendor/symfony/security-csrf/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "symfony/security-csrf", - "type": "library", - "description": "Symfony Security Component - CSRF Library", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/security-core": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/http-foundation": "^5.3|^6.0" - }, - "conflict": { - "symfony/http-foundation": "<5.3" - }, - "suggest": { - "symfony/http-foundation": "For using the class SessionTokenStorage." - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Security\\Csrf\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/security-guard/AbstractGuardAuthenticator.php b/vendor/symfony/security-guard/AbstractGuardAuthenticator.php deleted file mode 100644 index 13ada75..0000000 --- a/vendor/symfony/security-guard/AbstractGuardAuthenticator.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard; - -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken; - -/** - * An optional base class that creates a PostAuthenticationGuardToken for you. - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -abstract class AbstractGuardAuthenticator implements AuthenticatorInterface -{ - /** - * Shortcut to create a PostAuthenticationGuardToken for you, if you don't really - * care about which authenticated token you're using. - * - * @return PostAuthenticationGuardToken - */ - public function createAuthenticatedToken(UserInterface $user, string $providerKey) - { - return new PostAuthenticationGuardToken( - $user, - $providerKey, - $user->getRoles() - ); - } -} diff --git a/vendor/symfony/security-guard/Authenticator/AbstractFormLoginAuthenticator.php b/vendor/symfony/security-guard/Authenticator/AbstractFormLoginAuthenticator.php deleted file mode 100644 index a02fb13..0000000 --- a/vendor/symfony/security-guard/Authenticator/AbstractFormLoginAuthenticator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Authenticator; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; - -/** - * A base class to make form login authentication easier! - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -abstract class AbstractFormLoginAuthenticator extends AbstractGuardAuthenticator -{ - /** - * Return the URL to the login page. - * - * @return string - */ - abstract protected function getLoginUrl(); - - /** - * Override to change what happens after a bad username/password is submitted. - * - * @return RedirectResponse - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception) - { - if ($request->hasSession()) { - $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); - } - - $url = $this->getLoginUrl(); - - return new RedirectResponse($url); - } - - public function supportsRememberMe() - { - return true; - } - - /** - * Override to control what happens when the user hits a secure page - * but isn't logged in yet. - * - * @return RedirectResponse - */ - public function start(Request $request, AuthenticationException $authException = null) - { - $url = $this->getLoginUrl(); - - return new RedirectResponse($url); - } -} diff --git a/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php b/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php deleted file mode 100644 index 5d447b4..0000000 --- a/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Authenticator; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Guard\AuthenticatorInterface as GuardAuthenticatorInterface; -use Symfony\Component\Security\Guard\PasswordAuthenticatedInterface; -use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\CustomCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', GuardBridgeAuthenticator::class); - -/** - * This authenticator is used to bridge Guard authenticators with - * the Symfony Authenticator system. - * - * @author Wouter de Jong - * - * @deprecated since Symfony 5.3 - */ -class GuardBridgeAuthenticator implements InteractiveAuthenticatorInterface, AuthenticationEntryPointInterface -{ - private $guard; - private $userProvider; - - public function __construct(GuardAuthenticatorInterface $guard, UserProviderInterface $userProvider) - { - $this->guard = $guard; - $this->userProvider = $userProvider; - } - - public function start(Request $request, AuthenticationException $authException = null) - { - return $this->guard->start($request, $authException); - } - - public function supports(Request $request): ?bool - { - return $this->guard->supports($request); - } - - public function authenticate(Request $request): PassportInterface - { - $credentials = $this->guard->getCredentials($request); - - if (null === $credentials) { - throw new \UnexpectedValueException(sprintf('The return value of "%1$s::getCredentials()" must not be null. Return false from "%1$s::supports()" instead.', get_debug_type($this->guard))); - } - - // get the user from the GuardAuthenticator - if (class_exists(UserBadge::class)) { - $user = new UserBadge('guard_authenticator_'.md5(serialize($credentials)), function () use ($credentials) { return $this->getUser($credentials); }); - } else { - // BC with symfony/security-http:5.1 - $user = $this->getUser($credentials); - } - - if ($this->guard instanceof PasswordAuthenticatedInterface && !$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-guard', '5.3', 'Not implementing the "%s" interface in class "%s" while using password-based guard authenticators is deprecated.', PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $passport = new Passport($user, new CustomCredentials([$this->guard, 'checkCredentials'], $credentials)); - if ($this->userProvider instanceof PasswordUpgraderInterface && $this->guard instanceof PasswordAuthenticatedInterface && (null !== $password = $this->guard->getPassword($credentials))) { - $passport->addBadge(new PasswordUpgradeBadge($password, $this->userProvider)); - } - - if ($this->guard->supportsRememberMe()) { - $passport->addBadge(new RememberMeBadge()); - } - - return $passport; - } - - public function getGuardAuthenticator(): GuardAuthenticatorInterface - { - return $this->guard; - } - - private function getUser($credentials): UserInterface - { - $user = $this->guard->getUser($credentials, $this->userProvider); - - if (null === $user) { - throw new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($this->guard))); - } - - if (!$user instanceof UserInterface) { - throw new \UnexpectedValueException(sprintf('The "%s::getUser()" method must return a UserInterface. You returned "%s".', get_debug_type($this->guard), get_debug_type($user))); - } - - return $user; - } - - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - if (!$passport instanceof UserPassportInterface) { - throw new \LogicException(sprintf('"%s" does not support non-user passports.', __CLASS__)); - } - - return $this->guard->createAuthenticatedToken($passport->getUser(), $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return $this->guard->createAuthenticatedToken($passport->getUser(), $firewallName); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return $this->guard->onAuthenticationSuccess($request, $token, $firewallName); - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - return $this->guard->onAuthenticationFailure($request, $exception); - } - - public function isInteractive(): bool - { - // the GuardAuthenticationHandler always dispatches the InteractiveLoginEvent - return true; - } -} diff --git a/vendor/symfony/security-guard/AuthenticatorInterface.php b/vendor/symfony/security-guard/AuthenticatorInterface.php deleted file mode 100644 index 699fd3e..0000000 --- a/vendor/symfony/security-guard/AuthenticatorInterface.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Guard\Token\GuardTokenInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -/** - * The interface for all "guard" authenticators. - * - * The methods on this interface are called throughout the guard authentication - * process to give you the power to control most parts of the process from - * one location. - * - * @author Ryan Weaver - * @author Amaury Leroux de Lens - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -interface AuthenticatorInterface extends AuthenticationEntryPointInterface -{ - /** - * Does the authenticator support the given Request? - * - * If this returns false, the authenticator will be skipped. - * - * @return bool - */ - public function supports(Request $request); - - /** - * Get the authentication credentials from the request and return them - * as any type (e.g. an associate array). - * - * Whatever value you return here will be passed to getUser() and checkCredentials() - * - * For example, for a form login, you might: - * - * return [ - * 'username' => $request->request->get('_username'), - * 'password' => $request->request->get('_password'), - * ]; - * - * Or for an API token that's on a header, you might use: - * - * return ['api_key' => $request->headers->get('X-API-TOKEN')]; - * - * @return mixed Any non-null value - * - * @throws \UnexpectedValueException If null is returned - */ - public function getCredentials(Request $request); - - /** - * Return a UserInterface object based on the credentials. - * - * The *credentials* are the return value from getCredentials() - * - * You may throw an AuthenticationException if you wish. If you return - * null, then a UserNotFoundException is thrown for you. - * - * @param mixed $credentials - * - * @throws AuthenticationException - * - * @return UserInterface|null - */ - public function getUser($credentials, UserProviderInterface $userProvider); - - /** - * Returns true if the credentials are valid. - * - * If false is returned, authentication will fail. You may also throw - * an AuthenticationException if you wish to cause authentication to fail. - * - * The *credentials* are the return value from getCredentials() - * - * @param mixed $credentials - * - * @return bool - * - * @throws AuthenticationException - */ - public function checkCredentials($credentials, UserInterface $user); - - /** - * Create an authenticated token for the given user. - * - * If you don't care about which token class is used or don't really - * understand what a "token" is, you can skip this method by extending - * the AbstractGuardAuthenticator class from your authenticator. - * - * @see AbstractGuardAuthenticator - * - * @return GuardTokenInterface - */ - public function createAuthenticatedToken(UserInterface $user, string $providerKey); - - /** - * Called when authentication executed, but failed (e.g. wrong username password). - * - * This should return the Response sent back to the user, like a - * RedirectResponse to the login page or a 401 response. - * - * If you return null, the request will continue, but the user will - * not be authenticated. This is probably not what you want to do. - * - * @return Response|null - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception); - - /** - * Called when authentication executed and was successful! - * - * This should return the Response sent back to the user, like a - * RedirectResponse to the last page they visited. - * - * If you return null, the current request will continue, and the user - * will be authenticated. This makes sense, for example, with an API. - * - * @return Response|null - */ - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey); - - /** - * Does this method support remember me cookies? - * - * Remember me cookie will be set if *all* of the following are met: - * A) This method returns true - * B) The remember_me key under your firewall is configured - * C) The "remember me" functionality is activated. This is usually - * done by having a _remember_me checkbox in your form, but - * can be configured by the "always_remember_me" and "remember_me_parameter" - * parameters under the "remember_me" firewall key - * D) The onAuthenticationSuccess method returns a Response object - * - * @return bool - */ - public function supportsRememberMe(); -} diff --git a/vendor/symfony/security-guard/CHANGELOG.md b/vendor/symfony/security-guard/CHANGELOG.md deleted file mode 100644 index 22652b0..0000000 --- a/vendor/symfony/security-guard/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - -The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md diff --git a/vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php b/vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php deleted file mode 100644 index 81fb20f..0000000 --- a/vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AccountStatusException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Guard\AuthenticatorInterface; -use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; -use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; -use Symfony\Component\Security\Http\Firewall\AbstractListener; -use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', GuardAuthenticationListener::class); - -/** - * Authentication listener for the "guard" system. - * - * @author Ryan Weaver - * @author Amaury Leroux de Lens - * - * @final - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class GuardAuthenticationListener extends AbstractListener -{ - private $guardHandler; - private $authenticationManager; - private $providerKey; - private $guardAuthenticators; - private $logger; - private $rememberMeServices; - private $hideUserNotFoundExceptions; - - /** - * @param string $providerKey The provider (i.e. firewall) key - * @param iterable $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationProvider - */ - public function __construct(GuardAuthenticatorHandler $guardHandler, AuthenticationManagerInterface $authenticationManager, string $providerKey, iterable $guardAuthenticators, LoggerInterface $logger = null, bool $hideUserNotFoundExceptions = true) - { - if (empty($providerKey)) { - throw new \InvalidArgumentException('$providerKey must not be empty.'); - } - - $this->guardHandler = $guardHandler; - $this->authenticationManager = $authenticationManager; - $this->providerKey = $providerKey; - $this->guardAuthenticators = $guardAuthenticators; - $this->logger = $logger; - $this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - if (null !== $this->logger) { - $context = ['firewall_key' => $this->providerKey]; - - if ($this->guardAuthenticators instanceof \Countable || \is_array($this->guardAuthenticators)) { - $context['authenticators'] = \count($this->guardAuthenticators); - } - - $this->logger->debug('Checking for guard authentication credentials.', $context); - } - - $guardAuthenticators = []; - - foreach ($this->guardAuthenticators as $key => $guardAuthenticator) { - if (null !== $this->logger) { - $this->logger->debug('Checking support on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); - } - - if ($guardAuthenticator->supports($request)) { - $guardAuthenticators[$key] = $guardAuthenticator; - } elseif (null !== $this->logger) { - $this->logger->debug('Guard authenticator does not support the request.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); - } - } - - if (!$guardAuthenticators) { - return false; - } - - $request->attributes->set('_guard_authenticators', $guardAuthenticators); - - return true; - } - - /** - * Iterates over each authenticator to see if each wants to authenticate the request. - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - $guardAuthenticators = $request->attributes->get('_guard_authenticators'); - $request->attributes->remove('_guard_authenticators'); - - foreach ($guardAuthenticators as $key => $guardAuthenticator) { - // get a key that's unique to *this* guard authenticator - // this MUST be the same as GuardAuthenticationProvider - $uniqueGuardKey = $this->providerKey.'_'.$key; - - $this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event); - - if ($event->hasResponse()) { - if (null !== $this->logger) { - $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]); - } - - break; - } - } - } - - private function executeGuardAuthenticator(string $uniqueGuardKey, AuthenticatorInterface $guardAuthenticator, RequestEvent $event) - { - $request = $event->getRequest(); - try { - if (null !== $this->logger) { - $this->logger->debug('Calling getCredentials() on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); - } - - // allow the authenticator to fetch authentication info from the request - $credentials = $guardAuthenticator->getCredentials($request); - - if (null === $credentials) { - throw new \UnexpectedValueException(sprintf('The return value of "%1$s::getCredentials()" must not be null. Return false from "%1$s::supports()" instead.', get_debug_type($guardAuthenticator))); - } - - // create a token with the unique key, so that the provider knows which authenticator to use - $token = new PreAuthenticationGuardToken($credentials, $uniqueGuardKey); - - if (null !== $this->logger) { - $this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]); - } - // pass the token into the AuthenticationManager system - // this indirectly calls GuardAuthenticationProvider::authenticate() - $token = $this->authenticationManager->authenticate($token); - - if (null !== $this->logger) { - $this->logger->info('Guard authentication successful!', ['token' => $token, 'authenticator' => \get_class($guardAuthenticator)]); - } - - // sets the token on the token storage, etc - $this->guardHandler->authenticateWithToken($token, $request, $this->providerKey); - } catch (AuthenticationException $e) { - // oh no! Authentication failed! - - if (null !== $this->logger) { - $this->logger->info('Guard authentication failed.', ['exception' => $e, 'authenticator' => \get_class($guardAuthenticator)]); - } - - // Avoid leaking error details in case of invalid user (e.g. user not found or invalid account status) - // to prevent user enumeration via response content - if ($this->hideUserNotFoundExceptions && ($e instanceof UsernameNotFoundException || ($e instanceof AccountStatusException && !$e instanceof CustomUserMessageAccountStatusException))) { - $e = new BadCredentialsException('Bad credentials.', 0, $e); - } - - $response = $this->guardHandler->handleAuthenticationFailure($e, $request, $guardAuthenticator, $this->providerKey); - - if ($response instanceof Response) { - $event->setResponse($response); - } - - return; - } - - // success! - $response = $this->guardHandler->handleAuthenticationSuccess($token, $request, $guardAuthenticator, $this->providerKey); - if ($response instanceof Response) { - if (null !== $this->logger) { - $this->logger->debug('Guard authenticator set success response.', ['response' => $response, 'authenticator' => \get_class($guardAuthenticator)]); - } - - $event->setResponse($response); - } else { - if (null !== $this->logger) { - $this->logger->debug('Guard authenticator set no success response: request continues.', ['authenticator' => \get_class($guardAuthenticator)]); - } - } - - // attempt to trigger the remember me functionality - $this->triggerRememberMe($guardAuthenticator, $request, $token, $response); - } - - /** - * Should be called if this listener will support remember me. - */ - public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) - { - $this->rememberMeServices = $rememberMeServices; - } - - /** - * Checks to see if remember me is supported in the authenticator and - * on the firewall. If it is, the RememberMeServicesInterface is notified. - */ - private function triggerRememberMe(AuthenticatorInterface $guardAuthenticator, Request $request, TokenInterface $token, Response $response = null) - { - if (null === $this->rememberMeServices) { - if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: it is not configured for the firewall.', ['authenticator' => \get_class($guardAuthenticator)]); - } - - return; - } - - if (!$guardAuthenticator->supportsRememberMe()) { - if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: your authenticator does not support it.', ['authenticator' => \get_class($guardAuthenticator)]); - } - - return; - } - - if (!$response instanceof Response) { - throw new \LogicException(sprintf('"%s::onAuthenticationSuccess()" *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', get_debug_type($guardAuthenticator))); - } - - $this->rememberMeServices->loginSuccess($request, $response, $token); - } -} diff --git a/vendor/symfony/security-guard/GuardAuthenticatorHandler.php b/vendor/symfony/security-guard/GuardAuthenticatorHandler.php deleted file mode 100644 index cbd5bdf..0000000 --- a/vendor/symfony/security-guard/GuardAuthenticatorHandler.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', GuardAuthenticatorHandler::class); - -/** - * A utility class that does much of the *work* during the guard authentication process. - * - * By having the logic here instead of the listener, more of the process - * can be called directly (e.g. for manual authentication) or overridden. - * - * @author Ryan Weaver - * - * @final - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class GuardAuthenticatorHandler -{ - private $tokenStorage; - private $dispatcher; - private $sessionStrategy; - private $statelessProviderKeys; - - /** - * @param array $statelessProviderKeys An array of provider/firewall keys that are "stateless" and so do not need the session migrated on success - */ - public function __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null, array $statelessProviderKeys = []) - { - $this->tokenStorage = $tokenStorage; - $this->dispatcher = $eventDispatcher; - $this->statelessProviderKeys = $statelessProviderKeys; - } - - /** - * Authenticates the given token in the system. - */ - public function authenticateWithToken(TokenInterface $token, Request $request, string $providerKey = null) - { - $this->migrateSession($request, $token, $providerKey); - $this->tokenStorage->setToken($token); - - if (null !== $this->dispatcher) { - $loginEvent = new InteractiveLoginEvent($request, $token); - $this->dispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - } - - /** - * Returns the "on success" response for the given GuardAuthenticator. - */ - public function handleAuthenticationSuccess(TokenInterface $token, Request $request, AuthenticatorInterface $guardAuthenticator, string $providerKey): ?Response - { - $response = $guardAuthenticator->onAuthenticationSuccess($request, $token, $providerKey); - - // check that it's a Response or null - if ($response instanceof Response || null === $response) { - return $response; - } - - throw new \UnexpectedValueException(sprintf('The "%s::onAuthenticationSuccess()" method must return null or a Response object. You returned "%s".', \get_class($guardAuthenticator), get_debug_type($response))); - } - - /** - * Convenience method for authenticating the user and returning the - * Response *if any* for success. - */ - public function authenticateUserAndHandleSuccess(UserInterface $user, Request $request, AuthenticatorInterface $authenticator, string $providerKey): ?Response - { - // create an authenticated token for the User - $token = $authenticator->createAuthenticatedToken($user, $providerKey); - // authenticate this in the system - $this->authenticateWithToken($token, $request, $providerKey); - - // return the success metric - return $this->handleAuthenticationSuccess($token, $request, $authenticator, $providerKey); - } - - /** - * Handles an authentication failure and returns the Response for the - * GuardAuthenticator. - */ - public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $guardAuthenticator, string $providerKey): ?Response - { - $response = $guardAuthenticator->onAuthenticationFailure($request, $authenticationException); - if ($response instanceof Response || null === $response) { - // returning null is ok, it means they want the request to continue - return $response; - } - - throw new \UnexpectedValueException(sprintf('The "%s::onAuthenticationFailure()" method must return null or a Response object. You returned "%s".', \get_class($guardAuthenticator), get_debug_type($response))); - } - - /** - * Call this method if your authentication token is stored to a session. - * - * @final - */ - public function setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy) - { - $this->sessionStrategy = $sessionStrategy; - } - - private function migrateSession(Request $request, TokenInterface $token, ?string $providerKey) - { - if (\in_array($providerKey, $this->statelessProviderKeys, true) || !$this->sessionStrategy || !$request->hasSession() || !$request->hasPreviousSession()) { - return; - } - - $this->sessionStrategy->onAuthentication($request, $token); - } -} diff --git a/vendor/symfony/security-guard/LICENSE b/vendor/symfony/security-guard/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/security-guard/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/security-guard/PasswordAuthenticatedInterface.php b/vendor/symfony/security-guard/PasswordAuthenticatedInterface.php deleted file mode 100644 index deebad3..0000000 --- a/vendor/symfony/security-guard/PasswordAuthenticatedInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', PasswordAuthenticatedInterface::class); - -/** - * An optional interface for "guard" authenticators that deal with user passwords. - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -interface PasswordAuthenticatedInterface -{ - /** - * Returns the clear-text password contained in credentials if any. - * - * @param mixed $credentials The user credentials - */ - public function getPassword($credentials): ?string; -} diff --git a/vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php b/vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php deleted file mode 100644 index 000c102..0000000 --- a/vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Provider; - -use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\AuthenticationExpiredException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Guard\AuthenticatorInterface; -use Symfony\Component\Security\Guard\PasswordAuthenticatedInterface; -use Symfony\Component\Security\Guard\Token\GuardTokenInterface; -use Symfony\Component\Security\Guard\Token\PreAuthenticationGuardToken; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', GuardAuthenticationProvider::class); - -/** - * Responsible for accepting the PreAuthenticationGuardToken and calling - * the correct authenticator to retrieve the authenticated token. - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class GuardAuthenticationProvider implements AuthenticationProviderInterface -{ - private $guardAuthenticators; - private $userProvider; - private $providerKey; - private $userChecker; - private $passwordHasher; - - /** - * @param iterable $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationListener - * @param string $providerKey The provider (i.e. firewall) key - * @param UserPasswordHasherInterface $passwordHasher - */ - public function __construct(iterable $guardAuthenticators, UserProviderInterface $userProvider, string $providerKey, UserCheckerInterface $userChecker, $passwordHasher = null) - { - $this->guardAuthenticators = $guardAuthenticators; - $this->userProvider = $userProvider; - $this->providerKey = $providerKey; - $this->userChecker = $userChecker; - $this->passwordHasher = $passwordHasher; - - if ($passwordHasher instanceof UserPasswordEncoderInterface) { - trigger_deprecation('symfony/security-core', '5.3', sprintf('Passing a "%s" instance to the "%s" constructor is deprecated, use "%s" instead.', UserPasswordEncoderInterface::class, __CLASS__, UserPasswordHasherInterface::class)); - } - } - - /** - * Finds the correct authenticator for the token and calls it. - * - * @param GuardTokenInterface $token - * - * @return TokenInterface - */ - public function authenticate(TokenInterface $token) - { - if (!$token instanceof GuardTokenInterface) { - throw new \InvalidArgumentException('GuardAuthenticationProvider only supports GuardTokenInterface.'); - } - - if (!$token instanceof PreAuthenticationGuardToken) { - /* - * The listener *only* passes PreAuthenticationGuardToken instances. - * This means that an authenticated token (e.g. PostAuthenticationGuardToken) - * is being passed here, which happens if that token becomes - * "not authenticated" (e.g. happens if the user changes between - * requests). In this case, the user should be logged out, so - * we will return an AnonymousToken to accomplish that. - */ - - // this should never happen - but technically, the token is - // authenticated... so it could just be returned - if ($token->isAuthenticated(false)) { - return $token; - } - - // this causes the user to be logged out - throw new AuthenticationExpiredException(); - } - - $guardAuthenticator = $this->findOriginatingAuthenticator($token); - - if (null === $guardAuthenticator) { - throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', $token->getGuardProviderKey(), $this->providerKey)); - } - - return $this->authenticateViaGuard($guardAuthenticator, $token); - } - - private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface - { - // get the user from the GuardAuthenticator - $user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider); - - if (null === $user) { - $e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator))); - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - $e->setUserIdentifier(method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()); - - throw $e; - } - - if (!$user instanceof UserInterface) { - throw new \UnexpectedValueException(sprintf('The "%s::getUser()" method must return a UserInterface. You returned "%s".', get_debug_type($guardAuthenticator), get_debug_type($user))); - } - - if ($guardAuthenticator instanceof PasswordAuthenticatedInterface && !$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-guard', '5.3', 'Not implementing the "%s" interface in class "%s" while using password-based guard authenticators is deprecated.', PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - $this->userChecker->checkPreAuth($user); - if (true !== $checkCredentialsResult = $guardAuthenticator->checkCredentials($token->getCredentials(), $user)) { - if (false !== $checkCredentialsResult) { - throw new \TypeError(sprintf('"%s::checkCredentials()" must return a boolean value.', get_debug_type($guardAuthenticator))); - } - - throw new BadCredentialsException(sprintf('Authentication failed because "%s::checkCredentials()" did not return true.', get_debug_type($guardAuthenticator))); - } - if ($this->userProvider instanceof PasswordUpgraderInterface && $guardAuthenticator instanceof PasswordAuthenticatedInterface && null !== $this->passwordHasher && (null !== $password = $guardAuthenticator->getPassword($token->getCredentials())) && $this->passwordHasher->needsRehash($user)) { - if ($this->passwordHasher instanceof UserPasswordEncoderInterface) { - // @deprecated since Symfony 5.3 - $this->userProvider->upgradePassword($user, $this->passwordHasher->encodePassword($user, $password)); - } else { - $this->userProvider->upgradePassword($user, $this->passwordHasher->hashPassword($user, $password)); - } - } - $this->userChecker->checkPostAuth($user); - - // turn the UserInterface into a TokenInterface - $authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey); - if (!$authenticatedToken instanceof TokenInterface) { - throw new \UnexpectedValueException(sprintf('The "%s::createAuthenticatedToken()" method must return a TokenInterface. You returned "%s".', get_debug_type($guardAuthenticator), get_debug_type($authenticatedToken))); - } - - return $authenticatedToken; - } - - private function findOriginatingAuthenticator(PreAuthenticationGuardToken $token): ?AuthenticatorInterface - { - // find the *one* GuardAuthenticator that this token originated from - foreach ($this->guardAuthenticators as $key => $guardAuthenticator) { - // get a key that's unique to *this* guard authenticator - // this MUST be the same as GuardAuthenticationListener - $uniqueGuardKey = $this->providerKey.'_'.$key; - - if ($uniqueGuardKey === $token->getGuardProviderKey()) { - return $guardAuthenticator; - } - } - - // no matching authenticator found - but there will be multiple GuardAuthenticationProvider - // instances that will be checked if you have multiple firewalls. - - return null; - } - - public function supports(TokenInterface $token) - { - if ($token instanceof PreAuthenticationGuardToken) { - return null !== $this->findOriginatingAuthenticator($token); - } - - return $token instanceof GuardTokenInterface; - } -} diff --git a/vendor/symfony/security-guard/README.md b/vendor/symfony/security-guard/README.md deleted file mode 100644 index 7316a8d..0000000 --- a/vendor/symfony/security-guard/README.md +++ /dev/null @@ -1,30 +0,0 @@ -Security Component - Guard -========================== - -The Guard component brings many layers of authentication together, making -it much easier to create complex authentication systems where you have -total control. - -Sponsor -------- - -The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2]. - -Learn Symfony faster by watching real projects being built and actively coding -along with them. SymfonyCasts bridges that learning gap, bringing you video -tutorials and coding challenges. Code on! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/security.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://symfonycasts.com -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/security-guard/Token/GuardTokenInterface.php b/vendor/symfony/security-guard/Token/GuardTokenInterface.php deleted file mode 100644 index a44413b..0000000 --- a/vendor/symfony/security-guard/Token/GuardTokenInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Token; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', GuardTokenInterface::class); - -/** - * A marker interface that both guard tokens implement. - * - * Any tokens passed to GuardAuthenticationProvider (i.e. any tokens that - * are handled by the guard auth system) must implement this - * interface. - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -interface GuardTokenInterface extends TokenInterface -{ -} diff --git a/vendor/symfony/security-guard/Token/PostAuthenticationGuardToken.php b/vendor/symfony/security-guard/Token/PostAuthenticationGuardToken.php deleted file mode 100644 index a9050a4..0000000 --- a/vendor/symfony/security-guard/Token/PostAuthenticationGuardToken.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Token; - -use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', PostAuthenticationGuardToken::class); - -/** - * Used as an "authenticated" token, though it could be set to not-authenticated later. - * - * If you're using Guard authentication, you *must* use a class that implements - * GuardTokenInterface as your authenticated token (like this class). - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class PostAuthenticationGuardToken extends AbstractToken implements GuardTokenInterface -{ - private $providerKey; - - /** - * @param string $providerKey The provider (firewall) key - * @param string[] $roles An array of roles - * - * @throws \InvalidArgumentException - */ - public function __construct(UserInterface $user, string $providerKey, array $roles) - { - parent::__construct($roles); - - if (empty($providerKey)) { - throw new \InvalidArgumentException('$providerKey (i.e. firewall key) must not be empty.'); - } - - $this->setUser($user); - $this->providerKey = $providerKey; - - // this token is meant to be used after authentication success, so it is always authenticated - // you could set it as non authenticated later if you need to - $this->setAuthenticated(true, false); - } - - /** - * This is meant to be only an authenticated token, where credentials - * have already been used and are thus cleared. - * - * {@inheritdoc} - */ - public function getCredentials() - { - return []; - } - - /** - * Returns the provider (firewall) key. - * - * @return string - */ - public function getProviderKey() - { - return $this->providerKey; - } - - public function getFirewallName(): string - { - return $this->getProviderKey(); - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->providerKey, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->providerKey, $parentData] = $data; - $parentData = \is_array($parentData) ? $parentData : unserialize($parentData); - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-guard/Token/PreAuthenticationGuardToken.php b/vendor/symfony/security-guard/Token/PreAuthenticationGuardToken.php deleted file mode 100644 index 8c8ceb2..0000000 --- a/vendor/symfony/security-guard/Token/PreAuthenticationGuardToken.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Guard\Token; - -use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; - -trigger_deprecation('symfony/security-guard', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', PreAuthenticationGuardToken::class); - -/** - * The token used by the guard auth system before authentication. - * - * The GuardAuthenticationListener creates this, which is then consumed - * immediately by the GuardAuthenticationProvider. If authentication is - * successful, a different authenticated token is returned - * - * @author Ryan Weaver - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class PreAuthenticationGuardToken extends AbstractToken implements GuardTokenInterface -{ - private $credentials; - private $guardProviderKey; - - /** - * @param mixed $credentials - * @param string $guardProviderKey Unique key that bind this token to a specific AuthenticatorInterface - */ - public function __construct($credentials, string $guardProviderKey) - { - $this->credentials = $credentials; - $this->guardProviderKey = $guardProviderKey; - - parent::__construct([]); - - // @deprecated since Symfony 5.4 - parent::setAuthenticated(false); - } - - public function getGuardProviderKey() - { - return $this->guardProviderKey; - } - - /** - * Returns the user credentials, which might be an array of anything you - * wanted to put in there (e.g. username, password, favoriteColor). - * - * @return mixed - */ - public function getCredentials() - { - return $this->credentials; - } - - /** - * @deprecated since Symfony 5.4 - */ - public function setAuthenticated(bool $authenticated) - { - throw new \LogicException('The PreAuthenticationGuardToken is *never* authenticated.'); - } -} diff --git a/vendor/symfony/security-guard/composer.json b/vendor/symfony/security-guard/composer.json deleted file mode 100644 index 4852ce9..0000000 --- a/vendor/symfony/security-guard/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "symfony/security-guard", - "type": "library", - "description": "Symfony Security Component - Guard", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/security-core": "^5.0", - "symfony/security-http": "^5.3", - "symfony/polyfill-php80": "^1.15" - }, - "require-dev": { - "psr/log": "^1|^2|^3" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Security\\Guard\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/security-http/AccessMap.php b/vendor/symfony/security-http/AccessMap.php deleted file mode 100644 index f87283f..0000000 --- a/vendor/symfony/security-http/AccessMap.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestMatcherInterface; - -/** - * AccessMap allows configuration of different access control rules for - * specific parts of the website. - * - * @author Fabien Potencier - */ -class AccessMap implements AccessMapInterface -{ - private $map = []; - - /** - * @param array $attributes An array of attributes to pass to the access decision manager (like roles) - * @param string|null $channel The channel to enforce (http, https, or null) - */ - public function add(RequestMatcherInterface $requestMatcher, array $attributes = [], string $channel = null) - { - $this->map[] = [$requestMatcher, $attributes, $channel]; - } - - /** - * {@inheritdoc} - */ - public function getPatterns(Request $request) - { - foreach ($this->map as $elements) { - if (null === $elements[0] || $elements[0]->matches($request)) { - return [$elements[1], $elements[2]]; - } - } - - return [null, null]; - } -} diff --git a/vendor/symfony/security-http/AccessMapInterface.php b/vendor/symfony/security-http/AccessMapInterface.php deleted file mode 100644 index 70a1134..0000000 --- a/vendor/symfony/security-http/AccessMapInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\Request; - -/** - * AccessMap allows configuration of different access control rules for - * specific parts of the website. - * - * @author Fabien Potencier - * @author Kris Wallsmith - */ -interface AccessMapInterface -{ - /** - * Returns security attributes and required channel for the supplied request. - * - * @return array{0: array|null, 1: string|null} A tuple of security attributes and the required channel - */ - public function getPatterns(Request $request); -} diff --git a/vendor/symfony/security-http/Attribute/CurrentUser.php b/vendor/symfony/security-http/Attribute/CurrentUser.php deleted file mode 100644 index 413f982..0000000 --- a/vendor/symfony/security-http/Attribute/CurrentUser.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Attribute; - -/** - * Indicates that a controller argument should receive the current logged user. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class CurrentUser -{ -} diff --git a/vendor/symfony/security-http/Authentication/AuthenticationFailureHandlerInterface.php b/vendor/symfony/security-http/Authentication/AuthenticationFailureHandlerInterface.php deleted file mode 100644 index 10ebac1..0000000 --- a/vendor/symfony/security-http/Authentication/AuthenticationFailureHandlerInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * Interface for custom authentication failure handlers. - * - * If you want to customize the failure handling process, instead of - * overwriting the respective listener globally, you can set a custom failure - * handler which implements this interface. - * - * @author Johannes M. Schmitt - */ -interface AuthenticationFailureHandlerInterface -{ - /** - * This is called when an interactive authentication attempt fails. This is - * called by authentication listeners inheriting from - * AbstractAuthenticationListener. - * - * @return Response - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception); -} diff --git a/vendor/symfony/security-http/Authentication/AuthenticationSuccessHandlerInterface.php b/vendor/symfony/security-http/Authentication/AuthenticationSuccessHandlerInterface.php deleted file mode 100644 index b1e6e27..0000000 --- a/vendor/symfony/security-http/Authentication/AuthenticationSuccessHandlerInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * Interface for a custom authentication success handler. - * - * If you want to customize the success handling process, instead of - * overwriting the respective listener globally, you can set a custom success - * handler which implements this interface. - * - * @author Johannes M. Schmitt - */ -interface AuthenticationSuccessHandlerInterface -{ - /** - * This is called when an interactive authentication attempt succeeds. This - * is called by authentication listeners inheriting from - * AbstractAuthenticationListener. - * - * @return Response - */ - public function onAuthenticationSuccess(Request $request, TokenInterface $token); -} diff --git a/vendor/symfony/security-http/Authentication/AuthenticationUtils.php b/vendor/symfony/security-http/Authentication/AuthenticationUtils.php deleted file mode 100644 index c7d6bfe..0000000 --- a/vendor/symfony/security-http/Authentication/AuthenticationUtils.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; - -/** - * Extracts Security Errors from Request. - * - * @author Boris Vujicic - */ -class AuthenticationUtils -{ - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - /** - * @return AuthenticationException|null - */ - public function getLastAuthenticationError(bool $clearSession = true) - { - $request = $this->getRequest(); - $authenticationException = null; - - if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { - $authenticationException = $request->attributes->get(Security::AUTHENTICATION_ERROR); - } elseif ($request->hasSession() && ($session = $request->getSession())->has(Security::AUTHENTICATION_ERROR)) { - $authenticationException = $session->get(Security::AUTHENTICATION_ERROR); - - if ($clearSession) { - $session->remove(Security::AUTHENTICATION_ERROR); - } - } - - return $authenticationException; - } - - /** - * @return string - */ - public function getLastUsername() - { - $request = $this->getRequest(); - - if ($request->attributes->has(Security::LAST_USERNAME)) { - return $request->attributes->get(Security::LAST_USERNAME, ''); - } - - return $request->hasSession() ? $request->getSession()->get(Security::LAST_USERNAME, '') : ''; - } - - /** - * @throws \LogicException - */ - private function getRequest(): Request - { - $request = $this->requestStack->getCurrentRequest(); - - if (null === $request) { - throw new \LogicException('Request should exist so it can be processed for error.'); - } - - return $request; - } -} diff --git a/vendor/symfony/security-http/Authentication/AuthenticatorManager.php b/vendor/symfony/security-http/Authentication/AuthenticatorManager.php deleted file mode 100644 index 82c8cd2..0000000 --- a/vendor/symfony/security-http/Authentication/AuthenticatorManager.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\AuthenticationEvents; -use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; -use Symfony\Component\Security\Core\Exception\AccountStatusException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator; -use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; -use Symfony\Component\Security\Http\Event\AuthenticationTokenCreatedEvent; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\Event\LoginFailureEvent; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * @author Wouter de Jong - * @author Ryan Weaver - * @author Amaury Leroux de Lens - */ -class AuthenticatorManager implements AuthenticatorManagerInterface, UserAuthenticatorInterface -{ - private $authenticators; - private $tokenStorage; - private $eventDispatcher; - private $eraseCredentials; - private $logger; - private $firewallName; - private $hideUserNotFoundExceptions; - private $requiredBadges; - - /** - * @param iterable $authenticators - */ - public function __construct(iterable $authenticators, TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher, string $firewallName, LoggerInterface $logger = null, bool $eraseCredentials = true, bool $hideUserNotFoundExceptions = true, array $requiredBadges = []) - { - $this->authenticators = $authenticators; - $this->tokenStorage = $tokenStorage; - $this->eventDispatcher = $eventDispatcher; - $this->firewallName = $firewallName; - $this->logger = $logger; - $this->eraseCredentials = $eraseCredentials; - $this->hideUserNotFoundExceptions = $hideUserNotFoundExceptions; - $this->requiredBadges = $requiredBadges; - } - - /** - * @param BadgeInterface[] $badges Optionally, pass some Passport badges to use for the manual login - */ - public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request, array $badges = []): ?Response - { - // create an authentication token for the User - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - $passport = new SelfValidatingPassport(new UserBadge(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), function () use ($user) { return $user; }), $badges); - $token = method_exists($authenticator, 'createToken') ? $authenticator->createToken($passport, $this->firewallName) : $authenticator->createAuthenticatedToken($passport, $this->firewallName); - - // announce the authentication token - $token = $this->eventDispatcher->dispatch(new AuthenticationTokenCreatedEvent($token, $passport))->getAuthenticatedToken(); - - // authenticate this in the system - return $this->handleAuthenticationSuccess($token, $passport, $request, $authenticator); - } - - public function supports(Request $request): ?bool - { - if (null !== $this->logger) { - $context = ['firewall_name' => $this->firewallName]; - - if ($this->authenticators instanceof \Countable || \is_array($this->authenticators)) { - $context['authenticators'] = \count($this->authenticators); - } - - $this->logger->debug('Checking for authenticator support.', $context); - } - - $authenticators = []; - $skippedAuthenticators = []; - $lazy = true; - foreach ($this->authenticators as $authenticator) { - if (null !== $this->logger) { - $this->logger->debug('Checking support on authenticator.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]); - } - - if (false !== $supports = $authenticator->supports($request)) { - $authenticators[] = $authenticator; - $lazy = $lazy && null === $supports; - } else { - if (null !== $this->logger) { - $this->logger->debug('Authenticator does not support the request.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]); - } - $skippedAuthenticators[] = $authenticator; - } - } - - if (!$authenticators) { - return false; - } - - $request->attributes->set('_security_authenticators', $authenticators); - $request->attributes->set('_security_skipped_authenticators', $skippedAuthenticators); - - return $lazy ? null : true; - } - - public function authenticateRequest(Request $request): ?Response - { - $authenticators = $request->attributes->get('_security_authenticators'); - $request->attributes->remove('_security_authenticators'); - $request->attributes->remove('_security_skipped_authenticators'); - - if (!$authenticators) { - return null; - } - - return $this->executeAuthenticators($authenticators, $request); - } - - /** - * @param AuthenticatorInterface[] $authenticators - */ - private function executeAuthenticators(array $authenticators, Request $request): ?Response - { - foreach ($authenticators as $authenticator) { - // recheck if the authenticator still supports the listener. supports() is called - // eagerly (before token storage is initialized), whereas authenticate() is called - // lazily (after initialization). - if (false === $authenticator->supports($request)) { - if (null !== $this->logger) { - $this->logger->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - - continue; - } - - $response = $this->executeAuthenticator($authenticator, $request); - if (null !== $response) { - if (null !== $this->logger) { - $this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - - return $response; - } - } - - return null; - } - - private function executeAuthenticator(AuthenticatorInterface $authenticator, Request $request): ?Response - { - $passport = null; - - try { - // get the passport from the Authenticator - $passport = $authenticator->authenticate($request); - - // check the passport (e.g. password checking) - $event = new CheckPassportEvent($authenticator, $passport); - $this->eventDispatcher->dispatch($event); - - // check if all badges are resolved - $resolvedBadges = []; - foreach ($passport->getBadges() as $badge) { - if (!$badge->isResolved()) { - throw new BadCredentialsException(sprintf('Authentication failed: Security badge "%s" is not resolved, did you forget to register the correct listeners?', get_debug_type($badge))); - } - - $resolvedBadges[] = \get_class($badge); - } - - $missingRequiredBadges = array_diff($this->requiredBadges, $resolvedBadges); - if ($missingRequiredBadges) { - throw new BadCredentialsException(sprintf('Authentication failed; Some badges marked as required by the firewall config are not available on the passport: "%s".', implode('", "', $missingRequiredBadges))); - } - - // create the authentication token - $authenticatedToken = method_exists($authenticator, 'createToken') ? $authenticator->createToken($passport, $this->firewallName) : $authenticator->createAuthenticatedToken($passport, $this->firewallName); - - // announce the authentication token - $authenticatedToken = $this->eventDispatcher->dispatch(new AuthenticationTokenCreatedEvent($authenticatedToken, $passport))->getAuthenticatedToken(); - - if (true === $this->eraseCredentials) { - $authenticatedToken->eraseCredentials(); - } - - $this->eventDispatcher->dispatch(new AuthenticationSuccessEvent($authenticatedToken), AuthenticationEvents::AUTHENTICATION_SUCCESS); - - if (null !== $this->logger) { - $this->logger->info('Authenticator successful!', ['token' => $authenticatedToken, 'authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - } catch (AuthenticationException $e) { - // oh no! Authentication failed! - $response = $this->handleAuthenticationFailure($e, $request, $authenticator, $passport); - if ($response instanceof Response) { - return $response; - } - - return null; - } - - // success! (sets the token on the token storage, etc) - $response = $this->handleAuthenticationSuccess($authenticatedToken, $passport, $request, $authenticator); - if ($response instanceof Response) { - return $response; - } - - if (null !== $this->logger) { - $this->logger->debug('Authenticator set no success response: request continues.', ['authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - - return null; - } - - private function handleAuthenticationSuccess(TokenInterface $authenticatedToken, PassportInterface $passport, Request $request, AuthenticatorInterface $authenticator): ?Response - { - // @deprecated since Symfony 5.3 - $user = $authenticatedToken->getUser(); - if ($user instanceof UserInterface && !method_exists($user, 'getUserIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in user class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($authenticatedToken->getUser())); - } - - $this->tokenStorage->setToken($authenticatedToken); - - $response = $authenticator->onAuthenticationSuccess($request, $authenticatedToken, $this->firewallName); - if ($authenticator instanceof InteractiveAuthenticatorInterface && $authenticator->isInteractive()) { - $loginEvent = new InteractiveLoginEvent($request, $authenticatedToken); - $this->eventDispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - - $this->eventDispatcher->dispatch($loginSuccessEvent = new LoginSuccessEvent($authenticator, $passport, $authenticatedToken, $request, $response, $this->firewallName)); - - return $loginSuccessEvent->getResponse(); - } - - /** - * Handles an authentication failure and returns the Response for the authenticator. - */ - private function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, AuthenticatorInterface $authenticator, ?PassportInterface $passport): ?Response - { - if (null !== $this->logger) { - $this->logger->info('Authenticator failed.', ['exception' => $authenticationException, 'authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - - // Avoid leaking error details in case of invalid user (e.g. user not found or invalid account status) - // to prevent user enumeration via response content comparison - if ($this->hideUserNotFoundExceptions && ($authenticationException instanceof UsernameNotFoundException || ($authenticationException instanceof AccountStatusException && !$authenticationException instanceof CustomUserMessageAccountStatusException))) { - $authenticationException = new BadCredentialsException('Bad credentials.', 0, $authenticationException); - } - - $response = $authenticator->onAuthenticationFailure($request, $authenticationException); - if (null !== $response && null !== $this->logger) { - $this->logger->debug('The "{authenticator}" authenticator set the failure response.', ['authenticator' => \get_class($authenticator instanceof TraceableAuthenticator ? $authenticator->getAuthenticator() : $authenticator)]); - } - - $this->eventDispatcher->dispatch($loginFailureEvent = new LoginFailureEvent($authenticationException, $authenticator, $request, $response, $this->firewallName, $passport)); - - // returning null is ok, it means they want the request to continue - return $loginFailureEvent->getResponse(); - } -} diff --git a/vendor/symfony/security-http/Authentication/AuthenticatorManagerInterface.php b/vendor/symfony/security-http/Authentication/AuthenticatorManagerInterface.php deleted file mode 100644 index 4bac7b7..0000000 --- a/vendor/symfony/security-http/Authentication/AuthenticatorManagerInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; - -/** - * @author Wouter de Jong - * @author Ryan Weaver - */ -interface AuthenticatorManagerInterface -{ - /** - * Called to see if authentication should be attempted on this request. - * - * @see FirewallListenerInterface::supports() - */ - public function supports(Request $request): ?bool; - - /** - * Tries to authenticate the request and returns a response - if any authenticator set one. - */ - public function authenticateRequest(Request $request): ?Response; -} diff --git a/vendor/symfony/security-http/Authentication/CustomAuthenticationFailureHandler.php b/vendor/symfony/security-http/Authentication/CustomAuthenticationFailureHandler.php deleted file mode 100644 index f49f180..0000000 --- a/vendor/symfony/security-http/Authentication/CustomAuthenticationFailureHandler.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * @author Fabien Potencier - */ -class CustomAuthenticationFailureHandler implements AuthenticationFailureHandlerInterface -{ - private $handler; - - /** - * @param array $options Options for processing a successful authentication attempt - */ - public function __construct(AuthenticationFailureHandlerInterface $handler, array $options) - { - $this->handler = $handler; - if (method_exists($handler, 'setOptions')) { - $this->handler->setOptions($options); - } - } - - /** - * {@inheritdoc} - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception) - { - return $this->handler->onAuthenticationFailure($request, $exception); - } -} diff --git a/vendor/symfony/security-http/Authentication/CustomAuthenticationSuccessHandler.php b/vendor/symfony/security-http/Authentication/CustomAuthenticationSuccessHandler.php deleted file mode 100644 index fd318b4..0000000 --- a/vendor/symfony/security-http/Authentication/CustomAuthenticationSuccessHandler.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * @author Fabien Potencier - */ -class CustomAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface -{ - private $handler; - - /** - * @param array $options Options for processing a successful authentication attempt - */ - public function __construct(AuthenticationSuccessHandlerInterface $handler, array $options, string $firewallName) - { - $this->handler = $handler; - if (method_exists($handler, 'setOptions')) { - $this->handler->setOptions($options); - } - - if (method_exists($handler, 'setFirewallName')) { - $this->handler->setFirewallName($firewallName); - } elseif (method_exists($handler, 'setProviderKey')) { - trigger_deprecation('symfony/security-http', '5.2', 'Method "%s::setProviderKey()" is deprecated, rename the method to "setFirewallName()" instead.', \get_class($handler)); - - $this->handler->setProviderKey($firewallName); - } - } - - /** - * {@inheritdoc} - */ - public function onAuthenticationSuccess(Request $request, TokenInterface $token) - { - return $this->handler->onAuthenticationSuccess($request, $token); - } -} diff --git a/vendor/symfony/security-http/Authentication/DefaultAuthenticationFailureHandler.php b/vendor/symfony/security-http/Authentication/DefaultAuthenticationFailureHandler.php deleted file mode 100644 index 31b5f64..0000000 --- a/vendor/symfony/security-http/Authentication/DefaultAuthenticationFailureHandler.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\ParameterBagUtils; - -/** - * Class with the default authentication failure handling logic. - * - * Can be optionally be extended from by the developer to alter the behavior - * while keeping the default behavior. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * @author Alexander - */ -class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandlerInterface -{ - protected $httpKernel; - protected $httpUtils; - protected $logger; - protected $options; - protected $defaultOptions = [ - 'failure_path' => null, - 'failure_forward' => false, - 'login_path' => '/login', - 'failure_path_parameter' => '_failure_path', - ]; - - public function __construct(HttpKernelInterface $httpKernel, HttpUtils $httpUtils, array $options = [], LoggerInterface $logger = null) - { - $this->httpKernel = $httpKernel; - $this->httpUtils = $httpUtils; - $this->logger = $logger; - $this->setOptions($options); - } - - /** - * Gets the options. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } - - public function setOptions(array $options) - { - $this->options = array_merge($this->defaultOptions, $options); - } - - /** - * {@inheritdoc} - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception) - { - if ($failureUrl = ParameterBagUtils::getRequestParameterValue($request, $this->options['failure_path_parameter'])) { - $this->options['failure_path'] = $failureUrl; - } - - if (null === $this->options['failure_path']) { - $this->options['failure_path'] = $this->options['login_path']; - } - - if ($this->options['failure_forward']) { - if (null !== $this->logger) { - $this->logger->debug('Authentication failure, forward triggered.', ['failure_path' => $this->options['failure_path']]); - } - - $subRequest = $this->httpUtils->createRequest($request, $this->options['failure_path']); - $subRequest->attributes->set(Security::AUTHENTICATION_ERROR, $exception); - - return $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - } - - if (null !== $this->logger) { - $this->logger->debug('Authentication failure, redirect triggered.', ['failure_path' => $this->options['failure_path']]); - } - - $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); - - return $this->httpUtils->createRedirectResponse($request, $this->options['failure_path']); - } -} diff --git a/vendor/symfony/security-http/Authentication/DefaultAuthenticationSuccessHandler.php b/vendor/symfony/security-http/Authentication/DefaultAuthenticationSuccessHandler.php deleted file mode 100644 index 0972af9..0000000 --- a/vendor/symfony/security-http/Authentication/DefaultAuthenticationSuccessHandler.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\ParameterBagUtils; -use Symfony\Component\Security\Http\Util\TargetPathTrait; - -/** - * Class with the default authentication success handling logic. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * @author Alexander - */ -class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface -{ - use TargetPathTrait; - - protected $httpUtils; - protected $options; - /** @deprecated since Symfony 5.2, use $firewallName instead */ - protected $providerKey; - protected $firewallName; - protected $defaultOptions = [ - 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - ]; - - /** - * @param array $options Options for processing a successful authentication attempt - */ - public function __construct(HttpUtils $httpUtils, array $options = []) - { - $this->httpUtils = $httpUtils; - $this->setOptions($options); - } - - /** - * {@inheritdoc} - */ - public function onAuthenticationSuccess(Request $request, TokenInterface $token) - { - return $this->httpUtils->createRedirectResponse($request, $this->determineTargetUrl($request)); - } - - /** - * Gets the options. - * - * @return array - */ - public function getOptions() - { - return $this->options; - } - - public function setOptions(array $options) - { - $this->options = array_merge($this->defaultOptions, $options); - } - - /** - * Get the provider key. - * - * @return string - * - * @deprecated since Symfony 5.2, use getFirewallName() instead - */ - public function getProviderKey() - { - if (1 !== \func_num_args() || true !== func_get_arg(0)) { - trigger_deprecation('symfony/security-core', '5.2', 'Method "%s()" is deprecated, use "getFirewallName()" instead.', __METHOD__); - } - - if ($this->providerKey !== $this->firewallName) { - trigger_deprecation('symfony/security-core', '5.2', 'The "%1$s::$providerKey" property is deprecated, use "%1$s::$firewallName" instead.', __CLASS__); - - return $this->providerKey; - } - - return $this->firewallName; - } - - public function setProviderKey(string $providerKey) - { - if (2 !== \func_num_args() || true !== func_get_arg(1)) { - trigger_deprecation('symfony/security-http', '5.2', 'Method "%s" is deprecated, use "setFirewallName()" instead.', __METHOD__); - } - - $this->providerKey = $providerKey; - } - - public function getFirewallName(): ?string - { - return $this->getProviderKey(true); - } - - public function setFirewallName(string $firewallName): void - { - $this->setProviderKey($firewallName, true); - - $this->firewallName = $firewallName; - } - - /** - * Builds the target URL according to the defined options. - * - * @return string - */ - protected function determineTargetUrl(Request $request) - { - if ($this->options['always_use_default_target_path']) { - return $this->options['default_target_path']; - } - - if ($targetUrl = ParameterBagUtils::getRequestParameterValue($request, $this->options['target_path_parameter'])) { - return $targetUrl; - } - - $firewallName = $this->getFirewallName(); - if (null !== $firewallName && $targetUrl = $this->getTargetPath($request->getSession(), $firewallName)) { - $this->removeTargetPath($request->getSession(), $firewallName); - - return $targetUrl; - } - - if ($this->options['use_referer'] && $targetUrl = $request->headers->get('Referer')) { - if (false !== $pos = strpos($targetUrl, '?')) { - $targetUrl = substr($targetUrl, 0, $pos); - } - if ($targetUrl && $targetUrl !== $this->httpUtils->generateUri($request, $this->options['login_path'])) { - return $targetUrl; - } - } - - return $this->options['default_target_path']; - } -} diff --git a/vendor/symfony/security-http/Authentication/NoopAuthenticationManager.php b/vendor/symfony/security-http/Authentication/NoopAuthenticationManager.php deleted file mode 100644 index c5a0d7b..0000000 --- a/vendor/symfony/security-http/Authentication/NoopAuthenticationManager.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * This class is used when the authenticator system is activated. - * - * This is used to not break AuthenticationChecker and ContextListener when - * using the authenticator system. - * - * @author Wouter de Jong - * - * @internal - */ -class NoopAuthenticationManager implements AuthenticationManagerInterface -{ - public function authenticate(TokenInterface $token): TokenInterface - { - return $token; - } -} diff --git a/vendor/symfony/security-http/Authentication/UserAuthenticatorInterface.php b/vendor/symfony/security-http/Authentication/UserAuthenticatorInterface.php deleted file mode 100644 index a59a792..0000000 --- a/vendor/symfony/security-http/Authentication/UserAuthenticatorInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authentication; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; - -/** - * @author Wouter de Jong - */ -interface UserAuthenticatorInterface -{ - /** - * Convenience method to programmatically login a user and return a - * Response *if any* for success. - * - * @param BadgeInterface[] $badges Optionally, pass some Passport badges to use for the manual login - */ - public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request, array $badges = []): ?Response; -} diff --git a/vendor/symfony/security-http/Authenticator/AbstractAuthenticator.php b/vendor/symfony/security-http/Authenticator/AbstractAuthenticator.php deleted file mode 100644 index 673274d..0000000 --- a/vendor/symfony/security-http/Authenticator/AbstractAuthenticator.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Component\Security\Http\Authenticator\Token\PostAuthenticationToken; - -/** - * An optional base class that creates the necessary tokens for you. - * - * @author Ryan Weaver - */ -abstract class AbstractAuthenticator implements AuthenticatorInterface -{ - /** - * Shortcut to create a PostAuthenticationToken for you, if you don't really - * care about which authenticated token you're using. - */ - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - if (self::class !== (new \ReflectionMethod($this, 'createAuthenticatedToken'))->getDeclaringClass()->getName() && self::class === (new \ReflectionMethod($this, 'createToken'))->getDeclaringClass()->getName()) { - return $this->createAuthenticatedToken($passport, $firewallName); - } - - return new PostAuthenticationToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - // @deprecated since Symfony 5.4 - if (!$passport instanceof UserPassportInterface) { - throw new LogicException(sprintf('Passport does not contain a user, overwrite "createToken()" in "%s" to create a custom authentication token.', static::class)); - } - - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return new PostAuthenticationToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } -} diff --git a/vendor/symfony/security-http/Authenticator/AbstractLoginFormAuthenticator.php b/vendor/symfony/security-http/Authenticator/AbstractLoginFormAuthenticator.php deleted file mode 100644 index 25413b7..0000000 --- a/vendor/symfony/security-http/Authenticator/AbstractLoginFormAuthenticator.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -/** - * A base class to make form login authentication easier! - * - * @author Ryan Weaver - */ -abstract class AbstractLoginFormAuthenticator extends AbstractAuthenticator implements AuthenticationEntryPointInterface, InteractiveAuthenticatorInterface -{ - /** - * Return the URL to the login page. - */ - abstract protected function getLoginUrl(Request $request): string; - - /** - * {@inheritdoc} - * - * Override to change the request conditions that have to be - * matched in order to handle the login form submit. - * - * This default implementation handles all POST requests to the - * login path (@see getLoginUrl()). - */ - public function supports(Request $request): bool - { - return $request->isMethod('POST') && $this->getLoginUrl($request) === $request->getPathInfo(); - } - - /** - * Override to change what happens after a bad username/password is submitted. - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response - { - if ($request->hasSession()) { - $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); - } - - $url = $this->getLoginUrl($request); - - return new RedirectResponse($url); - } - - /** - * Override to control what happens when the user hits a secure page - * but isn't logged in yet. - */ - public function start(Request $request, AuthenticationException $authException = null): Response - { - $url = $this->getLoginUrl($request); - - return new RedirectResponse($url); - } - - public function isInteractive(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/AbstractPreAuthenticatedAuthenticator.php b/vendor/symfony/security-http/Authenticator/AbstractPreAuthenticatedAuthenticator.php deleted file mode 100644 index e28d669..0000000 --- a/vendor/symfony/security-http/Authenticator/AbstractPreAuthenticatedAuthenticator.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PreAuthenticatedUserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; - -/** - * The base authenticator for authenticators to use pre-authenticated - * requests (e.g. using certificates). - * - * @author Wouter de Jong - * @author Fabien Potencier - * - * @internal - */ -abstract class AbstractPreAuthenticatedAuthenticator implements InteractiveAuthenticatorInterface -{ - private $userProvider; - private $tokenStorage; - private $firewallName; - private $logger; - - public function __construct(UserProviderInterface $userProvider, TokenStorageInterface $tokenStorage, string $firewallName, LoggerInterface $logger = null) - { - $this->userProvider = $userProvider; - $this->tokenStorage = $tokenStorage; - $this->firewallName = $firewallName; - $this->logger = $logger; - } - - /** - * Returns the username of the pre-authenticated user. - * - * This authenticator is skipped if null is returned or a custom - * BadCredentialsException is thrown. - */ - abstract protected function extractUsername(Request $request): ?string; - - public function supports(Request $request): ?bool - { - try { - $username = $this->extractUsername($request); - } catch (BadCredentialsException $e) { - $this->clearToken($e); - - if (null !== $this->logger) { - $this->logger->debug('Skipping pre-authenticated authenticator as a BadCredentialsException is thrown.', ['exception' => $e, 'authenticator' => static::class]); - } - - return false; - } - - if (null === $username) { - if (null !== $this->logger) { - $this->logger->debug('Skipping pre-authenticated authenticator no username could be extracted.', ['authenticator' => static::class]); - } - - return false; - } - - // do not overwrite already stored tokens from the same user (i.e. from the session) - $token = $this->tokenStorage->getToken(); - - if ($token instanceof PreAuthenticatedToken && $this->firewallName === $token->getFirewallName() && $token->getUserIdentifier() === $username) { - if (null !== $this->logger) { - $this->logger->debug('Skipping pre-authenticated authenticator as the user already has an existing session.', ['authenticator' => static::class]); - } - - return false; - } - - $request->attributes->set('_pre_authenticated_username', $username); - - return true; - } - - public function authenticate(Request $request): Passport - { - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - $method = 'loadUserByIdentifier'; - if (!method_exists($this->userProvider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $method = 'loadUserByUsername'; - } - - return new SelfValidatingPassport( - new UserBadge($request->attributes->get('_pre_authenticated_username'), [$this->userProvider, $method]), - [new PreAuthenticatedUserBadge()] - ); - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return $this->createToken($passport, $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return new PreAuthenticatedToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return null; // let the original request continue - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - $this->clearToken($exception); - - return null; - } - - public function isInteractive(): bool - { - return true; - } - - private function clearToken(AuthenticationException $exception): void - { - $token = $this->tokenStorage->getToken(); - if ($token instanceof PreAuthenticatedToken && $this->firewallName === $token->getFirewallName()) { - $this->tokenStorage->setToken(null); - - if (null !== $this->logger) { - $this->logger->info('Cleared pre-authenticated token due to an exception.', ['exception' => $exception]); - } - } - } -} diff --git a/vendor/symfony/security-http/Authenticator/AuthenticatorInterface.php b/vendor/symfony/security-http/Authenticator/AuthenticatorInterface.php deleted file mode 100644 index 940448b..0000000 --- a/vendor/symfony/security-http/Authenticator/AuthenticatorInterface.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; - -/** - * The interface for all authenticators. - * - * @author Ryan Weaver - * @author Amaury Leroux de Lens - * @author Wouter de Jong - * - * @method TokenInterface createToken(Passport $passport, string $firewallName) Creates a token for the given user. - * If you don't care about which token class is used, you can skip this method by extending - * the AbstractAuthenticator class from your authenticator. - */ -interface AuthenticatorInterface -{ - /** - * Does the authenticator support the given Request? - * - * If this returns true, authenticate() will be called. If false, the authenticator will be skipped. - * - * Returning null means authenticate() can be called lazily when accessing the token storage. - */ - public function supports(Request $request): ?bool; - - /** - * Create a passport for the current request. - * - * The passport contains the user, credentials and any additional information - * that has to be checked by the Symfony Security system. For example, a login - * form authenticator will probably return a passport containing the user, the - * presented password and the CSRF token value. - * - * You may throw any AuthenticationException in this method in case of error (e.g. - * a UserNotFoundException when the user cannot be found). - * - * @throws AuthenticationException - * - * @return Passport - */ - public function authenticate(Request $request); /*: Passport;*/ - - /** - * Create an authenticated token for the given user. - * - * If you don't care about which token class is used or don't really - * understand what a "token" is, you can skip this method by extending - * the AbstractAuthenticator class from your authenticator. - * - * @see AbstractAuthenticator - * - * @param PassportInterface $passport The passport returned from authenticate() - * - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface; - - /** - * Called when authentication executed and was successful! - * - * This should return the Response sent back to the user, like a - * RedirectResponse to the last page they visited. - * - * If you return null, the current request will continue, and the user - * will be authenticated. This makes sense, for example, with an API. - */ - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response; - - /** - * Called when authentication executed, but failed (e.g. wrong username password). - * - * This should return the Response sent back to the user, like a - * RedirectResponse to the login page or a 403 response. - * - * If you return null, the request will continue, but the user will - * not be authenticated. This is probably not what you want to do. - */ - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response; -} diff --git a/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php b/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php deleted file mode 100644 index 4b77d9c..0000000 --- a/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticator.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Debug; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Component\Security\Http\EntryPoint\Exception\NotAnEntryPointException; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * Collects info about an authenticator for debugging purposes. - * - * @author Robin Chalas - */ -final class TraceableAuthenticator implements AuthenticatorInterface, InteractiveAuthenticatorInterface, AuthenticationEntryPointInterface -{ - private $authenticator; - private $passport; - private $duration; - private $stub; - - public function __construct(AuthenticatorInterface $authenticator) - { - $this->authenticator = $authenticator; - } - - public function getInfo(): array - { - $class = \get_class($this->authenticator instanceof GuardBridgeAuthenticator ? $this->authenticator->getGuardAuthenticator() : $this->authenticator); - - return [ - 'supports' => true, - 'passport' => $this->passport, - 'duration' => $this->duration, - 'stub' => $this->stub ?? $this->stub = class_exists(ClassStub::class) ? new ClassStub($class) : $class, - ]; - } - - public function supports(Request $request): ?bool - { - return $this->authenticator->supports($request); - } - - public function authenticate(Request $request): PassportInterface - { - $startTime = microtime(true); - $this->passport = $this->authenticator->authenticate($request); - $this->duration = microtime(true) - $startTime; - - return $this->passport; - } - - public function createToken(PassportInterface $passport, string $firewallName): TokenInterface - { - return method_exists($this->authenticator, 'createToken') ? $this->authenticator->createToken($passport, $firewallName) : $this->authenticator->createAuthenticatedToken($passport, $firewallName); - } - - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - return $this->authenticator->createAuthenticatedToken($passport, $firewallName); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return $this->authenticator->onAuthenticationSuccess($request, $token, $firewallName); - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - return $this->authenticator->onAuthenticationFailure($request, $exception); - } - - public function start(Request $request, AuthenticationException $authException = null): Response - { - if (!$this->authenticator instanceof AuthenticationEntryPointInterface) { - throw new NotAnEntryPointException(); - } - - return $this->authenticator->start($request, $authException); - } - - public function isInteractive(): bool - { - return $this->authenticator instanceof InteractiveAuthenticatorInterface && $this->authenticator->isInteractive(); - } - - /** - * @internal - */ - public function getAuthenticator(): AuthenticatorInterface - { - return $this->authenticator; - } - - public function __call($method, $args) - { - return $this->authenticator->{$method}(...$args); - } -} diff --git a/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php b/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php deleted file mode 100644 index 3286ce2..0000000 --- a/vendor/symfony/security-http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Debug; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Http\Firewall\AbstractListener; -use Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * Decorates the AuthenticatorManagerListener to collect information about security authenticators. - * - * @author Robin Chalas - */ -final class TraceableAuthenticatorManagerListener extends AbstractListener -{ - private $authenticationManagerListener; - private $authenticatorsInfo = []; - private $hasVardumper; - - public function __construct(AuthenticatorManagerListener $authenticationManagerListener) - { - $this->authenticationManagerListener = $authenticationManagerListener; - $this->hasVardumper = class_exists(ClassStub::class); - } - - public function supports(Request $request): ?bool - { - return $this->authenticationManagerListener->supports($request); - } - - public function authenticate(RequestEvent $event): void - { - $request = $event->getRequest(); - - if (!$authenticators = $request->attributes->get('_security_authenticators')) { - return; - } - - foreach ($request->attributes->get('_security_skipped_authenticators') as $skippedAuthenticator) { - $this->authenticatorsInfo[] = [ - 'supports' => false, - 'stub' => $this->hasVardumper ? new ClassStub(\get_class($skippedAuthenticator)) : \get_class($skippedAuthenticator), - 'passport' => null, - 'duration' => 0, - ]; - } - - foreach ($authenticators as $key => $authenticator) { - $authenticators[$key] = new TraceableAuthenticator($authenticator); - } - - $request->attributes->set('_security_authenticators', $authenticators); - - $this->authenticationManagerListener->authenticate($event); - - foreach ($authenticators as $authenticator) { - $this->authenticatorsInfo[] = $authenticator->getInfo(); - } - } - - public function getAuthenticatorManagerListener(): AuthenticatorManagerListener - { - return $this->authenticationManagerListener; - } - - public function getAuthenticatorsInfo(): array - { - return $this->authenticatorsInfo; - } -} diff --git a/vendor/symfony/security-http/Authenticator/FormLoginAuthenticator.php b/vendor/symfony/security-http/Authenticator/FormLoginAuthenticator.php deleted file mode 100644 index 2609d0d..0000000 --- a/vendor/symfony/security-http/Authenticator/FormLoginAuthenticator.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\ParameterBagUtils; - -/** - * @author Wouter de Jong - * @author Fabien Potencier - * - * @final - */ -class FormLoginAuthenticator extends AbstractLoginFormAuthenticator -{ - private $httpUtils; - private $userProvider; - private $successHandler; - private $failureHandler; - private $options; - private $httpKernel; - - public function __construct(HttpUtils $httpUtils, UserProviderInterface $userProvider, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options) - { - $this->httpUtils = $httpUtils; - $this->userProvider = $userProvider; - $this->successHandler = $successHandler; - $this->failureHandler = $failureHandler; - $this->options = array_merge([ - 'username_parameter' => '_username', - 'password_parameter' => '_password', - 'check_path' => '/login_check', - 'post_only' => true, - 'form_only' => false, - 'enable_csrf' => false, - 'csrf_parameter' => '_csrf_token', - 'csrf_token_id' => 'authenticate', - ], $options); - } - - protected function getLoginUrl(Request $request): string - { - return $this->httpUtils->generateUri($request, $this->options['login_path']); - } - - public function supports(Request $request): bool - { - return ($this->options['post_only'] ? $request->isMethod('POST') : true) - && $this->httpUtils->checkRequestPath($request, $this->options['check_path']) - && ($this->options['form_only'] ? 'form' === $request->getContentType() : true); - } - - public function authenticate(Request $request): Passport - { - $credentials = $this->getCredentials($request); - - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - $method = 'loadUserByIdentifier'; - if (!method_exists($this->userProvider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $method = 'loadUserByUsername'; - } - - $passport = new Passport( - new UserBadge($credentials['username'], [$this->userProvider, $method]), - new PasswordCredentials($credentials['password']), - [new RememberMeBadge()] - ); - if ($this->options['enable_csrf']) { - $passport->addBadge(new CsrfTokenBadge($this->options['csrf_token_id'], $credentials['csrf_token'])); - } - - if ($this->userProvider instanceof PasswordUpgraderInterface) { - $passport->addBadge(new PasswordUpgradeBadge($credentials['password'], $this->userProvider)); - } - - return $passport; - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return $this->createToken($passport, $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return new UsernamePasswordToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return $this->successHandler->onAuthenticationSuccess($request, $token); - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response - { - return $this->failureHandler->onAuthenticationFailure($request, $exception); - } - - private function getCredentials(Request $request): array - { - $credentials = []; - $credentials['csrf_token'] = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); - - if ($this->options['post_only']) { - $credentials['username'] = ParameterBagUtils::getParameterBagValue($request->request, $this->options['username_parameter']); - $credentials['password'] = ParameterBagUtils::getParameterBagValue($request->request, $this->options['password_parameter']) ?? ''; - } else { - $credentials['username'] = ParameterBagUtils::getRequestParameterValue($request, $this->options['username_parameter']); - $credentials['password'] = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']) ?? ''; - } - - if (!\is_string($credentials['username']) && (!\is_object($credentials['username']) || !method_exists($credentials['username'], '__toString'))) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($credentials['username']))); - } - - $credentials['username'] = trim($credentials['username']); - - if (\strlen($credentials['username']) > Security::MAX_USERNAME_LENGTH) { - throw new BadCredentialsException('Invalid username.'); - } - - $request->getSession()->set(Security::LAST_USERNAME, $credentials['username']); - - return $credentials; - } - - public function setHttpKernel(HttpKernelInterface $httpKernel): void - { - $this->httpKernel = $httpKernel; - } - - public function start(Request $request, AuthenticationException $authException = null): Response - { - if (!$this->options['use_forward']) { - return parent::start($request, $authException); - } - - $subRequest = $this->httpUtils->createRequest($request, $this->options['login_path']); - $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - if (200 === $response->getStatusCode()) { - $response->setStatusCode(401); - } - - return $response; - } -} diff --git a/vendor/symfony/security-http/Authenticator/HttpBasicAuthenticator.php b/vendor/symfony/security-http/Authenticator/HttpBasicAuthenticator.php deleted file mode 100644 index 892fce4..0000000 --- a/vendor/symfony/security-http/Authenticator/HttpBasicAuthenticator.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -/** - * @author Wouter de Jong - * @author Fabien Potencier - * - * @final - */ -class HttpBasicAuthenticator implements AuthenticatorInterface, AuthenticationEntryPointInterface -{ - private $realmName; - private $userProvider; - private $logger; - - public function __construct(string $realmName, UserProviderInterface $userProvider, LoggerInterface $logger = null) - { - $this->realmName = $realmName; - $this->userProvider = $userProvider; - $this->logger = $logger; - } - - public function start(Request $request, AuthenticationException $authException = null): Response - { - $response = new Response(); - $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', $this->realmName)); - $response->setStatusCode(401); - - return $response; - } - - public function supports(Request $request): ?bool - { - return $request->headers->has('PHP_AUTH_USER'); - } - - public function authenticate(Request $request): PassportInterface - { - $username = $request->headers->get('PHP_AUTH_USER'); - $password = $request->headers->get('PHP_AUTH_PW', ''); - - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - $method = 'loadUserByIdentifier'; - if (!method_exists($this->userProvider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $method = 'loadUserByUsername'; - } - - $passport = new Passport( - new UserBadge($username, [$this->userProvider, $method]), - new PasswordCredentials($password) - ); - if ($this->userProvider instanceof PasswordUpgraderInterface) { - $passport->addBadge(new PasswordUpgradeBadge($password, $this->userProvider)); - } - - return $passport; - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return $this->createToken($passport, $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return new UsernamePasswordToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return null; - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - if (null !== $this->logger) { - $this->logger->info('Basic authentication failed for user.', ['username' => $request->headers->get('PHP_AUTH_USER'), 'exception' => $exception]); - } - - return $this->start($request, $exception); - } -} diff --git a/vendor/symfony/security-http/Authenticator/InteractiveAuthenticatorInterface.php b/vendor/symfony/security-http/Authenticator/InteractiveAuthenticatorInterface.php deleted file mode 100644 index 71b6ade..0000000 --- a/vendor/symfony/security-http/Authenticator/InteractiveAuthenticatorInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -/** - * This is an extension of the authenticator interface that must - * be used by interactive authenticators. - * - * Interactive login requires explicit user action (e.g. a login - * form or HTTP basic authentication). Implementing this interface - * will dispatch the InteractiveLoginEvent upon successful login. - * - * @author Wouter de Jong - */ -interface InteractiveAuthenticatorInterface extends AuthenticatorInterface -{ - /** - * Should return true to make this authenticator perform - * an interactive login. - */ - public function isInteractive(): bool; -} diff --git a/vendor/symfony/security-http/Authenticator/JsonLoginAuthenticator.php b/vendor/symfony/security-http/Authenticator/JsonLoginAuthenticator.php deleted file mode 100644 index 30da36a..0000000 --- a/vendor/symfony/security-http/Authenticator/JsonLoginAuthenticator.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Provides a stateless implementation of an authentication via - * a JSON document composed of a username and a password. - * - * @author Kévin Dunglas - * @author Wouter de Jong - * - * @final - */ -class JsonLoginAuthenticator implements InteractiveAuthenticatorInterface -{ - private $options; - private $httpUtils; - private $userProvider; - private $propertyAccessor; - private $successHandler; - private $failureHandler; - - /** - * @var TranslatorInterface|null - */ - private $translator; - - public function __construct(HttpUtils $httpUtils, UserProviderInterface $userProvider, AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, array $options = [], PropertyAccessorInterface $propertyAccessor = null) - { - $this->options = array_merge(['username_path' => 'username', 'password_path' => 'password'], $options); - $this->httpUtils = $httpUtils; - $this->successHandler = $successHandler; - $this->failureHandler = $failureHandler; - $this->userProvider = $userProvider; - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - public function supports(Request $request): ?bool - { - if (false === strpos($request->getRequestFormat() ?? '', 'json') && false === strpos($request->getContentType() ?? '', 'json')) { - return false; - } - - if (isset($this->options['check_path']) && !$this->httpUtils->checkRequestPath($request, $this->options['check_path'])) { - return false; - } - - return true; - } - - public function authenticate(Request $request): PassportInterface - { - try { - $credentials = $this->getCredentials($request); - } catch (BadRequestHttpException $e) { - $request->setRequestFormat('json'); - - throw $e; - } - - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - $method = 'loadUserByIdentifier'; - if (!method_exists($this->userProvider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $method = 'loadUserByUsername'; - } - - $passport = new Passport( - new UserBadge($credentials['username'], [$this->userProvider, $method]), - new PasswordCredentials($credentials['password']) - ); - if ($this->userProvider instanceof PasswordUpgraderInterface) { - $passport->addBadge(new PasswordUpgradeBadge($credentials['password'], $this->userProvider)); - } - - return $passport; - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return $this->createToken($passport, $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return new UsernamePasswordToken($passport->getUser(), $firewallName, $passport->getUser()->getRoles()); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - if (null === $this->successHandler) { - return null; // let the original request continue - } - - return $this->successHandler->onAuthenticationSuccess($request, $token); - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - if (null === $this->failureHandler) { - if (null !== $this->translator) { - $errorMessage = $this->translator->trans($exception->getMessageKey(), $exception->getMessageData(), 'security'); - } else { - $errorMessage = strtr($exception->getMessageKey(), $exception->getMessageData()); - } - - return new JsonResponse(['error' => $errorMessage], JsonResponse::HTTP_UNAUTHORIZED); - } - - return $this->failureHandler->onAuthenticationFailure($request, $exception); - } - - public function isInteractive(): bool - { - return true; - } - - public function setTranslator(TranslatorInterface $translator) - { - $this->translator = $translator; - } - - private function getCredentials(Request $request) - { - $data = json_decode($request->getContent()); - if (!$data instanceof \stdClass) { - throw new BadRequestHttpException('Invalid JSON.'); - } - - $credentials = []; - try { - $credentials['username'] = $this->propertyAccessor->getValue($data, $this->options['username_path']); - - if (!\is_string($credentials['username'])) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string.', $this->options['username_path'])); - } - - if (\strlen($credentials['username']) > Security::MAX_USERNAME_LENGTH) { - throw new BadCredentialsException('Invalid username.'); - } - } catch (AccessException $e) { - throw new BadRequestHttpException(sprintf('The key "%s" must be provided.', $this->options['username_path']), $e); - } - - try { - $credentials['password'] = $this->propertyAccessor->getValue($data, $this->options['password_path']); - - if (!\is_string($credentials['password'])) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string.', $this->options['password_path'])); - } - } catch (AccessException $e) { - throw new BadRequestHttpException(sprintf('The key "%s" must be provided.', $this->options['password_path']), $e); - } - - return $credentials; - } -} diff --git a/vendor/symfony/security-http/Authenticator/LoginLinkAuthenticator.php b/vendor/symfony/security-http/Authenticator/LoginLinkAuthenticator.php deleted file mode 100644 index 098349c..0000000 --- a/vendor/symfony/security-http/Authenticator/LoginLinkAuthenticator.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\LoginLink\Exception\InvalidLoginLinkAuthenticationException; -use Symfony\Component\Security\Http\LoginLink\Exception\InvalidLoginLinkExceptionInterface; -use Symfony\Component\Security\Http\LoginLink\LoginLinkHandlerInterface; - -/** - * @author Ryan Weaver - */ -final class LoginLinkAuthenticator extends AbstractAuthenticator implements InteractiveAuthenticatorInterface -{ - private $loginLinkHandler; - private $httpUtils; - private $successHandler; - private $failureHandler; - private $options; - - public function __construct(LoginLinkHandlerInterface $loginLinkHandler, HttpUtils $httpUtils, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options) - { - $this->loginLinkHandler = $loginLinkHandler; - $this->httpUtils = $httpUtils; - $this->successHandler = $successHandler; - $this->failureHandler = $failureHandler; - $this->options = $options + ['check_post_only' => false]; - } - - public function supports(Request $request): ?bool - { - return ($this->options['check_post_only'] ? $request->isMethod('POST') : true) - && $this->httpUtils->checkRequestPath($request, $this->options['check_route']); - } - - public function authenticate(Request $request): PassportInterface - { - $username = $request->get('user'); - if (!$username) { - throw new InvalidLoginLinkAuthenticationException('Missing user from link.'); - } - - return new SelfValidatingPassport( - new UserBadge($username, function () use ($request) { - try { - $user = $this->loginLinkHandler->consumeLoginLink($request); - } catch (InvalidLoginLinkExceptionInterface $e) { - throw new InvalidLoginLinkAuthenticationException('Login link could not be validated.', 0, $e); - } - - return $user; - }), - [new RememberMeBadge()] - ); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return $this->successHandler->onAuthenticationSuccess($request, $token); - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response - { - return $this->failureHandler->onAuthenticationFailure($request, $exception); - } - - public function isInteractive(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/BadgeInterface.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/BadgeInterface.php deleted file mode 100644 index 009449f..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/BadgeInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -/** - * Passport badges allow to add more information to a passport (e.g. a CSRF token). - * - * @author Wouter de Jong - */ -interface BadgeInterface -{ - /** - * Checks if this badge is resolved by the security system. - * - * After authentication, all badges must return `true` in this method in order - * for the authentication to succeed. - */ - public function isResolved(): bool; -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/CsrfTokenBadge.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/CsrfTokenBadge.php deleted file mode 100644 index a4114a0..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/CsrfTokenBadge.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -use Symfony\Component\Security\Http\EventListener\CsrfProtectionListener; - -/** - * Adds automatic CSRF tokens checking capabilities to this authenticator. - * - * @see CsrfProtectionListener - * - * @author Wouter de Jong - * - * @final - */ -class CsrfTokenBadge implements BadgeInterface -{ - private $resolved = false; - private $csrfTokenId; - private $csrfToken; - - /** - * @param string $csrfTokenId An arbitrary string used to generate the value of the CSRF token. - * Using a different string for each authenticator improves its security. - * @param string|null $csrfToken The CSRF token presented in the request, if any - */ - public function __construct(string $csrfTokenId, ?string $csrfToken) - { - $this->csrfTokenId = $csrfTokenId; - $this->csrfToken = $csrfToken; - } - - public function getCsrfTokenId(): string - { - return $this->csrfTokenId; - } - - public function getCsrfToken(): ?string - { - return $this->csrfToken; - } - - /** - * @internal - */ - public function markResolved(): void - { - $this->resolved = true; - } - - public function isResolved(): bool - { - return $this->resolved; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/PasswordUpgradeBadge.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/PasswordUpgradeBadge.php deleted file mode 100644 index 3488146..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/PasswordUpgradeBadge.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; - -/** - * Adds automatic password migration, if enabled and required in the password encoder. - * - * @see PasswordUpgraderInterface - * - * @author Wouter de Jong - * - * @final - */ -class PasswordUpgradeBadge implements BadgeInterface -{ - private $plaintextPassword; - private $passwordUpgrader; - - /** - * @param string $plaintextPassword The presented password, used in the rehash - * @param PasswordUpgraderInterface|null $passwordUpgrader The password upgrader, defaults to the UserProvider if null - */ - public function __construct(string $plaintextPassword, PasswordUpgraderInterface $passwordUpgrader = null) - { - $this->plaintextPassword = $plaintextPassword; - $this->passwordUpgrader = $passwordUpgrader; - } - - public function getAndErasePlaintextPassword(): string - { - $password = $this->plaintextPassword; - if (null === $password) { - throw new LogicException('The password is erased as another listener already used this badge.'); - } - - $this->plaintextPassword = null; - - return $password; - } - - public function getPasswordUpgrader(): ?PasswordUpgraderInterface - { - return $this->passwordUpgrader; - } - - public function isResolved(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/PreAuthenticatedUserBadge.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/PreAuthenticatedUserBadge.php deleted file mode 100644 index 642f83f..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/PreAuthenticatedUserBadge.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -use Symfony\Component\Security\Http\Authenticator\AbstractPreAuthenticatedAuthenticator; - -/** - * Marks the authentication as being pre-authenticated. - * - * This disables pre-authentication user checkers. - * - * @see AbstractPreAuthenticatedAuthenticator - * - * @author Wouter de Jong - * - * @final - */ -class PreAuthenticatedUserBadge implements BadgeInterface -{ - public function isResolved(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/RememberMeBadge.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/RememberMeBadge.php deleted file mode 100644 index d961ef6..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/RememberMeBadge.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -use Symfony\Component\Security\Http\EventListener\CheckRememberMeConditionsListener; - -/** - * Adds support for remember me to this authenticator. - * - * The presence of this badge doesn't create the remember-me cookie. The actual - * cookie is only created if this badge is enabled. By default, this is done - * by the {@see CheckRememberMeConditionsListener} if all conditions are met. - * - * @author Wouter de Jong - * - * @final - */ -class RememberMeBadge implements BadgeInterface -{ - private $enabled = false; - - /** - * Enables remember-me cookie creation. - * - * In most cases, {@see CheckRememberMeConditionsListener} enables this - * automatically if always_remember_me is true or the remember_me_parameter - * exists in the request. - * - * @return $this - */ - public function enable(): self - { - $this->enabled = true; - - return $this; - } - - /** - * Disables remember-me cookie creation. - * - * The default is disabled, this can be called to suppress creation - * after it was enabled. - * - * @return $this - */ - public function disable(): self - { - $this->enabled = false; - - return $this; - } - - public function isEnabled(): bool - { - return $this->enabled; - } - - public function isResolved(): bool - { - return true; // remember me does not need to be explicitly resolved - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Badge/UserBadge.php b/vendor/symfony/security-http/Authenticator/Passport/Badge/UserBadge.php deleted file mode 100644 index 5e8dbdc..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Badge/UserBadge.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Badge; - -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\AuthenticationServiceException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\EventListener\UserProviderListener; - -/** - * Represents the user in the authentication process. - * - * It uses an identifier (e.g. email, or username) and - * "user loader" to load the related User object. - * - * @author Wouter de Jong - */ -class UserBadge implements BadgeInterface -{ - private $userIdentifier; - private $userLoader; - private $user; - - /** - * Initializes the user badge. - * - * You must provide a $userIdentifier. This is a unique string representing the - * user for this authentication (e.g. the email if authentication is done using - * email + password; or a string combining email+company if authentication is done - * based on email *and* company name). This string can be used for e.g. login throttling. - * - * Optionally, you may pass a user loader. This callable receives the $userIdentifier - * as argument and must return a UserInterface object (otherwise an AuthenticationServiceException - * is thrown). If this is not set, the default user provider will be used with - * $userIdentifier as username. - */ - public function __construct(string $userIdentifier, callable $userLoader = null) - { - $this->userIdentifier = $userIdentifier; - $this->userLoader = $userLoader; - } - - public function getUserIdentifier(): string - { - return $this->userIdentifier; - } - - /** - * @throws AuthenticationException when the user cannot be found - */ - public function getUser(): UserInterface - { - if (null !== $this->user) { - return $this->user; - } - - if (null === $this->userLoader) { - throw new \LogicException(sprintf('No user loader is configured, did you forget to register the "%s" listener?', UserProviderListener::class)); - } - - $user = ($this->userLoader)($this->userIdentifier); - - // No user has been found via the $this->userLoader callback - if (null === $user) { - $exception = new UserNotFoundException(); - $exception->setUserIdentifier($this->userIdentifier); - - throw $exception; - } - - if (!$user instanceof UserInterface) { - throw new AuthenticationServiceException(sprintf('The user provider must return a UserInterface object, "%s" given.', get_debug_type($user))); - } - - return $this->user = $user; - } - - public function getUserLoader(): ?callable - { - return $this->userLoader; - } - - public function setUserLoader(callable $userLoader): void - { - $this->userLoader = $userLoader; - } - - public function isResolved(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Credentials/CredentialsInterface.php b/vendor/symfony/security-http/Authenticator/Passport/Credentials/CredentialsInterface.php deleted file mode 100644 index c22af0c..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Credentials/CredentialsInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Credentials; - -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; - -/** - * Credentials are a special badge used to explicitly mark the - * credential check of an authenticator. - * - * @author Wouter de Jong - */ -interface CredentialsInterface extends BadgeInterface -{ -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Credentials/CustomCredentials.php b/vendor/symfony/security-http/Authenticator/Passport/Credentials/CustomCredentials.php deleted file mode 100644 index 6dba836..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Credentials/CustomCredentials.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Credentials; - -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Implements credentials checking using a custom checker function. - * - * @author Wouter de Jong - * - * @final - */ -class CustomCredentials implements CredentialsInterface -{ - private $customCredentialsChecker; - private $credentials; - private $resolved = false; - - /** - * @param callable $customCredentialsChecker the check function. If this function does not return `true`, a - * BadCredentialsException is thrown. You may also throw a more - * specific exception in the function. - * @param mixed $credentials - */ - public function __construct(callable $customCredentialsChecker, $credentials) - { - $this->customCredentialsChecker = $customCredentialsChecker; - $this->credentials = $credentials; - } - - public function executeCustomChecker(UserInterface $user): void - { - $checker = $this->customCredentialsChecker; - - if (true !== $checker($this->credentials, $user)) { - throw new BadCredentialsException('Credentials check failed as the callable passed to CustomCredentials did not return "true".'); - } - - $this->resolved = true; - } - - public function isResolved(): bool - { - return $this->resolved; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Credentials/PasswordCredentials.php b/vendor/symfony/security-http/Authenticator/Passport/Credentials/PasswordCredentials.php deleted file mode 100644 index 1c27ac9..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Credentials/PasswordCredentials.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport\Credentials; - -use Symfony\Component\Security\Core\Exception\LogicException; - -/** - * Implements password credentials. - * - * These plaintext passwords are checked by the UserPasswordEncoder during - * authentication. - * - * @author Wouter de Jong - * - * @final - */ -class PasswordCredentials implements CredentialsInterface -{ - private $password; - private $resolved = false; - - public function __construct(string $password) - { - $this->password = $password; - } - - public function getPassword(): string - { - if (null === $this->password) { - throw new LogicException('The credentials are erased as another listener already verified these credentials.'); - } - - return $this->password; - } - - /** - * @internal - */ - public function markResolved(): void - { - $this->resolved = true; - $this->password = null; - } - - public function isResolved(): bool - { - return $this->resolved; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/Passport.php b/vendor/symfony/security-http/Authenticator/Passport/Passport.php deleted file mode 100644 index 24ed029..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/Passport.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport; - -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\CredentialsInterface; - -/** - * The default implementation for passports. - * - * @author Wouter de Jong - */ -class Passport implements UserPassportInterface -{ - protected $user; - - private $badges = []; - private $attributes = []; - - /** - * @param CredentialsInterface $credentials the credentials to check for this authentication, use - * SelfValidatingPassport if no credentials should be checked - * @param BadgeInterface[] $badges - */ - public function __construct(UserBadge $userBadge, CredentialsInterface $credentials, array $badges = []) - { - $this->addBadge($userBadge); - $this->addBadge($credentials); - foreach ($badges as $badge) { - $this->addBadge($badge); - } - } - - /** - * {@inheritdoc} - */ - public function getUser(): UserInterface - { - if (null === $this->user) { - if (!$this->hasBadge(UserBadge::class)) { - throw new \LogicException('Cannot get the Security user, no username or UserBadge configured for this passport.'); - } - - $this->user = $this->getBadge(UserBadge::class)->getUser(); - } - - return $this->user; - } - - /** - * @return $this - */ - public function addBadge(BadgeInterface $badge): PassportInterface - { - $this->badges[\get_class($badge)] = $badge; - - return $this; - } - - public function hasBadge(string $badgeFqcn): bool - { - return isset($this->badges[$badgeFqcn]); - } - - public function getBadge(string $badgeFqcn): ?BadgeInterface - { - return $this->badges[$badgeFqcn] ?? null; - } - - /** - * @return array, BadgeInterface> - */ - public function getBadges(): array - { - return $this->badges; - } - - /** - * @param mixed $value - */ - public function setAttribute(string $name, $value): void - { - $this->attributes[$name] = $value; - } - - /** - * @param mixed $default - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return $this->attributes[$name] ?? $default; - } - - public function getAttributes(): array - { - return $this->attributes; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/PassportInterface.php b/vendor/symfony/security-http/Authenticator/Passport/PassportInterface.php deleted file mode 100644 index 14198b8..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/PassportInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport; - -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; - -/** - * A Passport contains all security-related information that needs to be - * validated during authentication. - * - * A passport badge can be used to add any additional information to the - * passport. - * - * @author Wouter de Jong - * - * @deprecated since Symfony 5.4, use {@link Passport} instead - */ -interface PassportInterface -{ - /** - * Adds a new security badge. - * - * A passport can hold only one instance of the same security badge. - * This method replaces the current badge if it is already set on this - * passport. - * - * @return $this - */ - public function addBadge(BadgeInterface $badge): self; - - public function hasBadge(string $badgeFqcn): bool; - - public function getBadge(string $badgeFqcn): ?BadgeInterface; - - /** - * @return array, BadgeInterface> - */ - public function getBadges(): array; -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/PassportTrait.php b/vendor/symfony/security-http/Authenticator/Passport/PassportTrait.php deleted file mode 100644 index 2a00014..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/PassportTrait.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport; - -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" trait is deprecated, you must extend from "%s" instead.', PassportTrait::class, Passport::class); - -/** - * @author Wouter de Jong - * - * @deprecated since Symfony 5.4, use {@see Passport} instead - */ -trait PassportTrait -{ - private $badges = []; - - /** - * @return $this - */ - public function addBadge(BadgeInterface $badge): PassportInterface - { - $this->badges[\get_class($badge)] = $badge; - - return $this; - } - - public function hasBadge(string $badgeFqcn): bool - { - return isset($this->badges[$badgeFqcn]); - } - - public function getBadge(string $badgeFqcn): ?BadgeInterface - { - return $this->badges[$badgeFqcn] ?? null; - } - - /** - * @return array, BadgeInterface> - */ - public function getBadges(): array - { - return $this->badges; - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php b/vendor/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php deleted file mode 100644 index 23e7600..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport; - -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; - -/** - * An implementation used when there are no credentials to be checked (e.g. - * API token authentication). - * - * @author Wouter de Jong - */ -class SelfValidatingPassport extends Passport -{ - /** - * @param BadgeInterface[] $badges - */ - public function __construct(UserBadge $userBadge, array $badges = []) - { - $this->addBadge($userBadge); - foreach ($badges as $badge) { - $this->addBadge($badge); - } - } -} diff --git a/vendor/symfony/security-http/Authenticator/Passport/UserPassportInterface.php b/vendor/symfony/security-http/Authenticator/Passport/UserPassportInterface.php deleted file mode 100644 index 319c295..0000000 --- a/vendor/symfony/security-http/Authenticator/Passport/UserPassportInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Passport; - -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Represents a passport for a Security User. - * - * @author Wouter de Jong - * - * @deprecated since Symfony 5.4, use {@link Passport} instead - */ -interface UserPassportInterface extends PassportInterface -{ - /** - * @throws AuthenticationException when the user cannot be found - */ - public function getUser(): UserInterface; -} diff --git a/vendor/symfony/security-http/Authenticator/RememberMeAuthenticator.php b/vendor/symfony/security-http/Authenticator/RememberMeAuthenticator.php deleted file mode 100644 index cca50c8..0000000 --- a/vendor/symfony/security-http/Authenticator/RememberMeAuthenticator.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\CookieTheftException; -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; -use Symfony\Component\Security\Http\RememberMe\RememberMeDetails; -use Symfony\Component\Security\Http\RememberMe\RememberMeHandlerInterface; -use Symfony\Component\Security\Http\RememberMe\ResponseListener; - -/** - * The RememberMe *Authenticator* performs remember me authentication. - * - * This authenticator is executed whenever a user's session - * expired and a remember-me cookie was found. This authenticator - * then "re-authenticates" the user using the information in the - * cookie. - * - * @author Johannes M. Schmitt - * @author Wouter de Jong - * - * @final - */ -class RememberMeAuthenticator implements InteractiveAuthenticatorInterface -{ - private $rememberMeHandler; - private $secret; - private $tokenStorage; - private $cookieName; - private $logger; - - public function __construct(RememberMeHandlerInterface $rememberMeHandler, string $secret, TokenStorageInterface $tokenStorage, string $cookieName, LoggerInterface $logger = null) - { - $this->rememberMeHandler = $rememberMeHandler; - $this->secret = $secret; - $this->tokenStorage = $tokenStorage; - $this->cookieName = $cookieName; - $this->logger = $logger; - } - - public function supports(Request $request): ?bool - { - // do not overwrite already stored tokens (i.e. from the session) - if (null !== $this->tokenStorage->getToken()) { - return false; - } - - if (($cookie = $request->attributes->get(ResponseListener::COOKIE_ATTR_NAME)) && null === $cookie->getValue()) { - return false; - } - - if (!$request->cookies->has($this->cookieName)) { - return false; - } - - if (null !== $this->logger) { - $this->logger->debug('Remember-me cookie detected.'); - } - - // the `null` return value indicates that this authenticator supports lazy firewalls - return null; - } - - public function authenticate(Request $request): PassportInterface - { - $rawCookie = $request->cookies->get($this->cookieName); - if (!$rawCookie) { - throw new \LogicException('No remember-me cookie is found.'); - } - - $rememberMeCookie = RememberMeDetails::fromRawCookie($rawCookie); - - return new SelfValidatingPassport(new UserBadge($rememberMeCookie->getUserIdentifier(), function () use ($rememberMeCookie) { - return $this->rememberMeHandler->consumeRememberMeCookie($rememberMeCookie); - })); - } - - /** - * @deprecated since Symfony 5.4, use {@link createToken()} instead - */ - public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use "%s::createToken()" instead.', __METHOD__, __CLASS__); - - return $this->createToken($passport, $firewallName); - } - - public function createToken(Passport $passport, string $firewallName): TokenInterface - { - return new RememberMeToken($passport->getUser(), $firewallName, $this->secret); - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response - { - return null; // let the original request continue - } - - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response - { - if (null !== $this->logger) { - if ($exception instanceof UsernameNotFoundException) { - $this->logger->info('User for remember-me cookie not found.', ['exception' => $exception]); - } elseif ($exception instanceof UnsupportedUserException) { - $this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $exception]); - } elseif (!$exception instanceof CookieTheftException) { - $this->logger->debug('Remember me authentication failed.', ['exception' => $exception]); - } - } - - return null; - } - - public function isInteractive(): bool - { - return true; - } -} diff --git a/vendor/symfony/security-http/Authenticator/RemoteUserAuthenticator.php b/vendor/symfony/security-http/Authenticator/RemoteUserAuthenticator.php deleted file mode 100644 index d856b54..0000000 --- a/vendor/symfony/security-http/Authenticator/RemoteUserAuthenticator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -/** - * This authenticator authenticates a remote user. - * - * @author Wouter de Jong - * @author Fabien Potencier - * @author Maxime Douailin - * - * @final - * - * @internal in Symfony 5.1 - */ -class RemoteUserAuthenticator extends AbstractPreAuthenticatedAuthenticator -{ - private $userKey; - - public function __construct(UserProviderInterface $userProvider, TokenStorageInterface $tokenStorage, string $firewallName, string $userKey = 'REMOTE_USER', LoggerInterface $logger = null) - { - parent::__construct($userProvider, $tokenStorage, $firewallName, $logger); - - $this->userKey = $userKey; - } - - protected function extractUsername(Request $request): ?string - { - if (!$request->server->has($this->userKey)) { - throw new BadCredentialsException(sprintf('User key was not found: "%s".', $this->userKey)); - } - - return $request->server->get($this->userKey); - } -} diff --git a/vendor/symfony/security-http/Authenticator/Token/PostAuthenticationToken.php b/vendor/symfony/security-http/Authenticator/Token/PostAuthenticationToken.php deleted file mode 100644 index 6bbec6f..0000000 --- a/vendor/symfony/security-http/Authenticator/Token/PostAuthenticationToken.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator\Token; - -use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; -use Symfony\Component\Security\Core\User\UserInterface; - -class PostAuthenticationToken extends AbstractToken -{ - private $firewallName; - - /** - * @param string[] $roles An array of roles - * - * @throws \InvalidArgumentException - */ - public function __construct(UserInterface $user, string $firewallName, array $roles) - { - parent::__construct($roles); - - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - - $this->setUser($user); - $this->firewallName = $firewallName; - - // @deprecated since Symfony 5.4 - if (method_exists($this, 'setAuthenticated')) { - // this token is meant to be used after authentication success, so it is always authenticated - $this->setAuthenticated(true, false); - } - } - - /** - * This is meant to be only a token, where credentials - * have already been used and are thus cleared. - * - * {@inheritdoc} - */ - public function getCredentials() - { - return []; - } - - public function getFirewallName(): string - { - return $this->firewallName; - } - - /** - * {@inheritdoc} - */ - public function __serialize(): array - { - return [$this->firewallName, parent::__serialize()]; - } - - /** - * {@inheritdoc} - */ - public function __unserialize(array $data): void - { - [$this->firewallName, $parentData] = $data; - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/security-http/Authenticator/X509Authenticator.php b/vendor/symfony/security-http/Authenticator/X509Authenticator.php deleted file mode 100644 index 79e6883..0000000 --- a/vendor/symfony/security-http/Authenticator/X509Authenticator.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authenticator; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -/** - * This authenticator authenticates pre-authenticated (by the - * webserver) X.509 certificates. - * - * @author Wouter de Jong - * @author Fabien Potencier - * - * @final - */ -class X509Authenticator extends AbstractPreAuthenticatedAuthenticator -{ - private $userKey; - private $credentialsKey; - - public function __construct(UserProviderInterface $userProvider, TokenStorageInterface $tokenStorage, string $firewallName, string $userKey = 'SSL_CLIENT_S_DN_Email', string $credentialsKey = 'SSL_CLIENT_S_DN', LoggerInterface $logger = null) - { - parent::__construct($userProvider, $tokenStorage, $firewallName, $logger); - - $this->userKey = $userKey; - $this->credentialsKey = $credentialsKey; - } - - protected function extractUsername(Request $request): string - { - $username = null; - if ($request->server->has($this->userKey)) { - $username = $request->server->get($this->userKey); - } elseif ( - $request->server->has($this->credentialsKey) - && preg_match('#emailAddress=([^,/@]++@[^,/]++)#', $request->server->get($this->credentialsKey), $matches) - ) { - $username = $matches[1]; - } - - if (null === $username) { - throw new BadCredentialsException(sprintf('SSL credentials not found: %s, %s', $this->userKey, $this->credentialsKey)); - } - - return $username; - } -} diff --git a/vendor/symfony/security-http/Authorization/AccessDeniedHandlerInterface.php b/vendor/symfony/security-http/Authorization/AccessDeniedHandlerInterface.php deleted file mode 100644 index 871c877..0000000 --- a/vendor/symfony/security-http/Authorization/AccessDeniedHandlerInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Authorization; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; - -/** - * This is used by the ExceptionListener to translate an AccessDeniedException - * to a Response object. - * - * @author Johannes M. Schmitt - */ -interface AccessDeniedHandlerInterface -{ - /** - * Handles an access denied failure. - * - * @return Response|null - */ - public function handle(Request $request, AccessDeniedException $accessDeniedException); -} diff --git a/vendor/symfony/security-http/CHANGELOG.md b/vendor/symfony/security-http/CHANGELOG.md deleted file mode 100644 index 1071015..0000000 --- a/vendor/symfony/security-http/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate the `$authenticationEntryPoint` argument of `ChannelListener`, and add `$httpPort` and `$httpsPort` arguments - * Deprecate `RetryAuthenticationEntryPoint`, this code is now inlined in the `ChannelListener` - * Deprecate `FormAuthenticationEntryPoint` and `BasicAuthenticationEntryPoint`, in the new system the `FormLoginAuthenticator` - and `HttpBasicAuthenticator` should be used instead - * Deprecate `AbstractRememberMeServices`, `PersistentTokenBasedRememberMeServices`, `RememberMeServicesInterface`, - `TokenBasedRememberMeServices`, use the remember me handler alternatives instead - * Deprecate the `$authManager` argument of `AccessListener` - * Deprecate not setting the `$exceptionOnNoToken` argument of `AccessListener` to `false` - * Deprecate `DeauthenticatedEvent`, use `TokenDeauthenticatedEvent` instead - * Deprecate `CookieClearingLogoutHandler`, `SessionLogoutHandler` and `CsrfTokenClearingLogoutHandler`. - Use `CookieClearingLogoutListener`, `SessionLogoutListener` and `CsrfTokenClearingLogoutListener` instead - * Deprecate `PassportInterface`, `UserPassportInterface` and `PassportTrait`, use `Passport` instead - -5.3 ---- - -The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md diff --git a/vendor/symfony/security-http/Controller/UserValueResolver.php b/vendor/symfony/security-http/Controller/UserValueResolver.php deleted file mode 100644 index 9d10f32..0000000 --- a/vendor/symfony/security-http/Controller/UserValueResolver.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Controller; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Attribute\CurrentUser; - -/** - * Supports the argument type of {@see UserInterface}. - * - * @author Iltar van der Berg - */ -final class UserValueResolver implements ArgumentValueResolverInterface -{ - private $tokenStorage; - - public function __construct(TokenStorageInterface $tokenStorage) - { - $this->tokenStorage = $tokenStorage; - } - - public function supports(Request $request, ArgumentMetadata $argument): bool - { - // with the attribute, the type can be any UserInterface implementation - // otherwise, the type must be UserInterface - if (UserInterface::class !== $argument->getType() && !$argument->getAttributes(CurrentUser::class, ArgumentMetadata::IS_INSTANCEOF)) { - return false; - } - - $token = $this->tokenStorage->getToken(); - if (!$token instanceof TokenInterface) { - return false; - } - - $user = $token->getUser(); - - // in case it's not an object we cannot do anything with it; E.g. "anon." - // @deprecated since 5.4 - return $user instanceof UserInterface; - } - - public function resolve(Request $request, ArgumentMetadata $argument): iterable - { - yield $this->tokenStorage->getToken()->getUser(); - } -} diff --git a/vendor/symfony/security-http/EntryPoint/AuthenticationEntryPointInterface.php b/vendor/symfony/security-http/EntryPoint/AuthenticationEntryPointInterface.php deleted file mode 100644 index 91271d1..0000000 --- a/vendor/symfony/security-http/EntryPoint/AuthenticationEntryPointInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EntryPoint; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * Implement this interface for any classes that will be called to "start" - * the authentication process (see method for more details). - * - * @author Fabien Potencier - */ -interface AuthenticationEntryPointInterface -{ - /** - * Returns a response that directs the user to authenticate. - * - * This is called when an anonymous request accesses a resource that - * requires authentication. The job of this method is to return some - * response that "helps" the user start into the authentication process. - * - * Examples: - * - * - For a form login, you might redirect to the login page - * - * return new RedirectResponse('/login'); - * - * - For an API token authentication system, you return a 401 response - * - * return new Response('Auth header required', 401); - * - * @return Response - */ - public function start(Request $request, AuthenticationException $authException = null); -} diff --git a/vendor/symfony/security-http/EntryPoint/BasicAuthenticationEntryPoint.php b/vendor/symfony/security-http/EntryPoint/BasicAuthenticationEntryPoint.php deleted file mode 100644 index 53a0293..0000000 --- a/vendor/symfony/security-http/EntryPoint/BasicAuthenticationEntryPoint.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EntryPoint; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Authenticator\HttpBasicAuthenticator; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use the new security system with "%s" instead.', BasicAuthenticationEntryPoint::class, HttpBasicAuthenticator::class); - -/** - * BasicAuthenticationEntryPoint starts an HTTP Basic authentication. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.4 - */ -class BasicAuthenticationEntryPoint implements AuthenticationEntryPointInterface -{ - private $realmName; - - public function __construct(string $realmName) - { - $this->realmName = $realmName; - } - - /** - * {@inheritdoc} - */ - public function start(Request $request, AuthenticationException $authException = null) - { - $response = new Response(); - $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', $this->realmName)); - $response->setStatusCode(401); - - return $response; - } -} diff --git a/vendor/symfony/security-http/EntryPoint/Exception/NotAnEntryPointException.php b/vendor/symfony/security-http/EntryPoint/Exception/NotAnEntryPointException.php deleted file mode 100644 index e421dcf..0000000 --- a/vendor/symfony/security-http/EntryPoint/Exception/NotAnEntryPointException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EntryPoint\Exception; - -/** - * Thrown by generic decorators when a decorated authenticator does not implement - * {@see AuthenticationEntryPointInterface}. - * - * @author Robin Chalas - */ -class NotAnEntryPointException extends \RuntimeException -{ -} diff --git a/vendor/symfony/security-http/EntryPoint/FormAuthenticationEntryPoint.php b/vendor/symfony/security-http/EntryPoint/FormAuthenticationEntryPoint.php deleted file mode 100644 index 32cc5a0..0000000 --- a/vendor/symfony/security-http/EntryPoint/FormAuthenticationEntryPoint.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EntryPoint; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Authenticator\FormLoginAuthenticator; -use Symfony\Component\Security\Http\HttpUtils; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use the new security system with "%s" instead.', FormAuthenticationEntryPoint::class, FormLoginAuthenticator::class); - -/** - * FormAuthenticationEntryPoint starts an authentication via a login form. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.4 - */ -class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface -{ - private $loginPath; - private $useForward; - private $httpKernel; - private $httpUtils; - - /** - * @param string $loginPath The path to the login form - * @param bool $useForward Whether to forward or redirect to the login form - */ - public function __construct(HttpKernelInterface $kernel, HttpUtils $httpUtils, string $loginPath, bool $useForward = false) - { - $this->httpKernel = $kernel; - $this->httpUtils = $httpUtils; - $this->loginPath = $loginPath; - $this->useForward = $useForward; - } - - /** - * {@inheritdoc} - */ - public function start(Request $request, AuthenticationException $authException = null) - { - if ($this->useForward) { - $subRequest = $this->httpUtils->createRequest($request, $this->loginPath); - - $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); - if (200 === $response->getStatusCode()) { - $response->setStatusCode(401); - } - - return $response; - } - - return $this->httpUtils->createRedirectResponse($request, $this->loginPath); - } -} diff --git a/vendor/symfony/security-http/EntryPoint/RetryAuthenticationEntryPoint.php b/vendor/symfony/security-http/EntryPoint/RetryAuthenticationEntryPoint.php deleted file mode 100644 index 55e86f9..0000000 --- a/vendor/symfony/security-http/EntryPoint/RetryAuthenticationEntryPoint.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EntryPoint; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Firewall\ChannelListener; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" directly (and optionally configure the HTTP(s) ports there).', RetryAuthenticationEntryPoint::class, ChannelListener::class); - -/** - * RetryAuthenticationEntryPoint redirects URL based on the configured scheme. - * - * This entry point is not intended to work with HTTP post requests. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.4 - */ -class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface -{ - private $httpPort; - private $httpsPort; - - public function __construct(int $httpPort = 80, int $httpsPort = 443) - { - $this->httpPort = $httpPort; - $this->httpsPort = $httpsPort; - } - - /** - * {@inheritdoc} - */ - public function start(Request $request, AuthenticationException $authException = null) - { - $scheme = $request->isSecure() ? 'http' : 'https'; - if ('http' === $scheme && 80 != $this->httpPort) { - $port = ':'.$this->httpPort; - } elseif ('https' === $scheme && 443 != $this->httpsPort) { - $port = ':'.$this->httpsPort; - } else { - $port = ''; - } - - $qs = $request->getQueryString(); - if (null !== $qs) { - $qs = '?'.$qs; - } - - $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$request->getPathInfo().$qs; - - return new RedirectResponse($url, 301); - } -} diff --git a/vendor/symfony/security-http/Event/AuthenticationTokenCreatedEvent.php b/vendor/symfony/security-http/Event/AuthenticationTokenCreatedEvent.php deleted file mode 100644 index 632f3ec..0000000 --- a/vendor/symfony/security-http/Event/AuthenticationTokenCreatedEvent.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * When a newly authenticated security token was created, before it becomes effective in the security system. - * - * @author Christian Scheb - */ -class AuthenticationTokenCreatedEvent extends Event -{ - private $authenticatedToken; - private $passport; - - /** - * @param Passport $passport - */ - public function __construct(TokenInterface $token, PassportInterface $passport) - { - if (!$passport instanceof Passport) { - trigger_deprecation('symfony/security-http', '5.4', 'Not passing an instance of "%s" as "$passport" argument of "%s()" is deprecated, "%s" given.', Passport::class, __METHOD__, get_debug_type($passport)); - } - - $this->authenticatedToken = $token; - $this->passport = $passport; - } - - public function getAuthenticatedToken(): TokenInterface - { - return $this->authenticatedToken; - } - - public function setAuthenticatedToken(TokenInterface $authenticatedToken): void - { - $this->authenticatedToken = $authenticatedToken; - } - - public function getPassport(): PassportInterface - { - return $this->passport; - } -} diff --git a/vendor/symfony/security-http/Event/CheckPassportEvent.php b/vendor/symfony/security-http/Event/CheckPassportEvent.php deleted file mode 100644 index a3fe109..0000000 --- a/vendor/symfony/security-http/Event/CheckPassportEvent.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This event is dispatched when the credentials have to be checked. - * - * Listeners to this event must validate the user and the - * credentials (e.g. default listeners do password verification and - * user checking) - * - * @author Wouter de Jong - */ -class CheckPassportEvent extends Event -{ - private $authenticator; - private $passport; - - /** - * @param Passport $passport - */ - public function __construct(AuthenticatorInterface $authenticator, PassportInterface $passport) - { - if (!$passport instanceof Passport) { - trigger_deprecation('symfony/security-http', '5.4', 'Not passing an instance of "%s" as "$passport" argument of "%s()" is deprecated, "%s" given.', Passport::class, __METHOD__, get_debug_type($passport)); - } - - $this->authenticator = $authenticator; - $this->passport = $passport; - } - - public function getAuthenticator(): AuthenticatorInterface - { - return $this->authenticator; - } - - public function getPassport(): PassportInterface - { - return $this->passport; - } -} diff --git a/vendor/symfony/security-http/Event/DeauthenticatedEvent.php b/vendor/symfony/security-http/Event/DeauthenticatedEvent.php deleted file mode 100644 index f064cce..0000000 --- a/vendor/symfony/security-http/Event/DeauthenticatedEvent.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Deauthentication happens in case the user has changed when trying to - * refresh the token. - * - * Use {@see TokenDeauthenticatedEvent} if you want to cover all cases where - * a session is deauthenticated. - * - * @author Hamza Amrouche - * - * @deprecated since Symfony 5.4, use TokenDeauthenticatedEvent instead - */ -final class DeauthenticatedEvent extends Event -{ - private $originalToken; - private $refreshedToken; - - public function __construct(TokenInterface $originalToken, TokenInterface $refreshedToken, bool $triggerDeprecation = true) - { - if ($triggerDeprecation) { - @trigger_deprecation('symfony/security-http', '5.4', 'Class "%s" is deprecated, use "%s" instead.', __CLASS__, TokenDeauthenticatedEvent::class); - } - - $this->originalToken = $originalToken; - $this->refreshedToken = $refreshedToken; - } - - public function getRefreshedToken(): TokenInterface - { - @trigger_deprecation('symfony/security-http', '5.4', 'Class "%s" is deprecated, use "%s" instead.', __CLASS__, TokenDeauthenticatedEvent::class); - - return $this->refreshedToken; - } - - public function getOriginalToken(): TokenInterface - { - @trigger_deprecation('symfony/security-http', '5.4', 'Class "%s" is deprecated, use "%s" instead.', __CLASS__, TokenDeauthenticatedEvent::class); - - return $this->originalToken; - } -} diff --git a/vendor/symfony/security-http/Event/InteractiveLoginEvent.php b/vendor/symfony/security-http/Event/InteractiveLoginEvent.php deleted file mode 100644 index 3ba9863..0000000 --- a/vendor/symfony/security-http/Event/InteractiveLoginEvent.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * @author Fabien Potencier - */ -final class InteractiveLoginEvent extends Event -{ - private $request; - private $authenticationToken; - - public function __construct(Request $request, TokenInterface $authenticationToken) - { - $this->request = $request; - $this->authenticationToken = $authenticationToken; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function getAuthenticationToken(): TokenInterface - { - return $this->authenticationToken; - } -} diff --git a/vendor/symfony/security-http/Event/LazyResponseEvent.php b/vendor/symfony/security-http/Event/LazyResponseEvent.php deleted file mode 100644 index 319be37..0000000 --- a/vendor/symfony/security-http/Event/LazyResponseEvent.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\Security\Core\Exception\LazyResponseException; - -/** - * Wraps a lazily computed response in a signaling exception. - * - * @author Nicolas Grekas - */ -final class LazyResponseEvent extends RequestEvent -{ - private $event; - - public function __construct(parent $event) - { - $this->event = $event; - } - - /** - * {@inheritdoc} - */ - public function setResponse(Response $response) - { - $this->stopPropagation(); - $this->event->stopPropagation(); - - throw new LazyResponseException($response); - } - - /** - * {@inheritdoc} - */ - public function getKernel(): HttpKernelInterface - { - return $this->event->getKernel(); - } - - /** - * {@inheritdoc} - */ - public function getRequest(): Request - { - return $this->event->getRequest(); - } - - /** - * {@inheritdoc} - */ - public function getRequestType(): int - { - return $this->event->getRequestType(); - } - - /** - * {@inheritdoc} - */ - public function isMainRequest(): bool - { - return $this->event->isMainRequest(); - } - - /** - * {@inheritdoc} - */ - public function isMasterRequest(): bool - { - trigger_deprecation('symfony/security-http', '5.3', '"%s()" is deprecated, use "isMainRequest()" instead.', __METHOD__); - - return $this->event->isMainRequest(); - } -} diff --git a/vendor/symfony/security-http/Event/LoginFailureEvent.php b/vendor/symfony/security-http/Event/LoginFailureEvent.php deleted file mode 100644 index 1d58c1d..0000000 --- a/vendor/symfony/security-http/Event/LoginFailureEvent.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This event is dispatched after an error during authentication. - * - * Listeners to this event can change state based on authentication - * failure (e.g. to implement login throttling). - * - * @author Wouter de Jong - */ -class LoginFailureEvent extends Event -{ - private $exception; - private $authenticator; - private $request; - private $response; - private $firewallName; - private $passport; - - /** - * @param Passport|null $passport - */ - public function __construct(AuthenticationException $exception, AuthenticatorInterface $authenticator, Request $request, ?Response $response, string $firewallName, PassportInterface $passport = null) - { - if (null !== $passport && !$passport instanceof Passport) { - trigger_deprecation('symfony/security-http', '5.4', 'Not passing an instance of "%s" or "null" as "$passport" argument of "%s()" is deprecated, "%s" given.', Passport::class, __METHOD__, get_debug_type($passport)); - } - - $this->exception = $exception; - $this->authenticator = $authenticator; - $this->request = $request; - $this->response = $response; - $this->firewallName = $firewallName; - $this->passport = $passport; - } - - public function getException(): AuthenticationException - { - return $this->exception; - } - - public function getAuthenticator(): AuthenticatorInterface - { - return $this->authenticator; - } - - public function getFirewallName(): string - { - return $this->firewallName; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function setResponse(?Response $response) - { - $this->response = $response; - } - - public function getResponse(): ?Response - { - return $this->response; - } - - public function getPassport(): ?PassportInterface - { - return $this->passport; - } -} diff --git a/vendor/symfony/security-http/Event/LoginSuccessEvent.php b/vendor/symfony/security-http/Event/LoginSuccessEvent.php deleted file mode 100644 index d2272fe..0000000 --- a/vendor/symfony/security-http/Event/LoginSuccessEvent.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Passport; -use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This event is dispatched after authentication has successfully completed. - * - * At this stage, the authenticator created a token and - * generated an authentication success response. Listeners to - * this event can do actions related to successful authentication - * (such as migrating the password). - * - * @author Wouter de Jong - */ -class LoginSuccessEvent extends Event -{ - private $authenticator; - private $passport; - private $authenticatedToken; - private $request; - private $response; - private $firewallName; - - /** - * @param Passport $passport - */ - public function __construct(AuthenticatorInterface $authenticator, PassportInterface $passport, TokenInterface $authenticatedToken, Request $request, ?Response $response, string $firewallName) - { - if (!$passport instanceof Passport) { - trigger_deprecation('symfony/security-http', '5.4', 'Not passing an instance of "%s" as "$passport" argument of "%s()" is deprecated, "%s" given.', Passport::class, __METHOD__, get_debug_type($passport)); - } - - $this->authenticator = $authenticator; - $this->passport = $passport; - $this->authenticatedToken = $authenticatedToken; - $this->request = $request; - $this->response = $response; - $this->firewallName = $firewallName; - } - - public function getAuthenticator(): AuthenticatorInterface - { - return $this->authenticator; - } - - public function getPassport(): PassportInterface - { - return $this->passport; - } - - public function getUser(): UserInterface - { - // @deprecated since Symfony 5.4, passport will always have a user in 6.0 - if (!$this->passport instanceof UserPassportInterface) { - throw new LogicException(sprintf('Cannot call "%s" as the authenticator ("%s") did not set a user.', __METHOD__, \get_class($this->authenticator))); - } - - return $this->passport->getUser(); - } - - public function getAuthenticatedToken(): TokenInterface - { - return $this->authenticatedToken; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function getFirewallName(): string - { - return $this->firewallName; - } - - public function setResponse(?Response $response): void - { - $this->response = $response; - } - - public function getResponse(): ?Response - { - return $this->response; - } -} diff --git a/vendor/symfony/security-http/Event/LogoutEvent.php b/vendor/symfony/security-http/Event/LogoutEvent.php deleted file mode 100644 index 3c521f1..0000000 --- a/vendor/symfony/security-http/Event/LogoutEvent.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * @author Wouter de Jong - */ -class LogoutEvent extends Event -{ - private $request; - private $response; - private $token; - - public function __construct(Request $request, ?TokenInterface $token) - { - $this->request = $request; - $this->token = $token; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function getToken(): ?TokenInterface - { - return $this->token; - } - - public function setResponse(Response $response): void - { - $this->response = $response; - } - - public function getResponse(): ?Response - { - return $this->response; - } -} diff --git a/vendor/symfony/security-http/Event/SwitchUserEvent.php b/vendor/symfony/security-http/Event/SwitchUserEvent.php deleted file mode 100644 index 1bea6c8..0000000 --- a/vendor/symfony/security-http/Event/SwitchUserEvent.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * SwitchUserEvent. - * - * @author Fabien Potencier - */ -final class SwitchUserEvent extends Event -{ - private $request; - private $targetUser; - private $token; - - public function __construct(Request $request, UserInterface $targetUser, TokenInterface $token = null) - { - $this->request = $request; - $this->targetUser = $targetUser; - $this->token = $token; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function getTargetUser(): UserInterface - { - return $this->targetUser; - } - - public function getToken(): ?TokenInterface - { - return $this->token; - } - - public function setToken(TokenInterface $token) - { - $this->token = $token; - } -} diff --git a/vendor/symfony/security-http/Event/TokenDeauthenticatedEvent.php b/vendor/symfony/security-http/Event/TokenDeauthenticatedEvent.php deleted file mode 100644 index b09f4ec..0000000 --- a/vendor/symfony/security-http/Event/TokenDeauthenticatedEvent.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Event; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * This event is dispatched when the current security token is deauthenticated - * when trying to reference the token. - * - * This includes changes in the user ({@see DeauthenticatedEvent}), but - * also cases where there is no user provider available to refresh the user. - * - * Use this event if you want to trigger some actions whenever a user is - * deauthenticated and redirected back to the authentication entry point - * (e.g. clearing all remember-me cookies). - * - * @author Wouter de Jong - */ -final class TokenDeauthenticatedEvent extends Event -{ - private $originalToken; - private $request; - - public function __construct(TokenInterface $originalToken, Request $request) - { - $this->originalToken = $originalToken; - $this->request = $request; - } - - public function getOriginalToken(): TokenInterface - { - return $this->originalToken; - } - - public function getRequest(): Request - { - return $this->request; - } -} diff --git a/vendor/symfony/security-http/EventListener/CheckCredentialsListener.php b/vendor/symfony/security-http/EventListener/CheckCredentialsListener.php deleted file mode 100644 index 812419d..0000000 --- a/vendor/symfony/security-http/EventListener/CheckCredentialsListener.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\CustomCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; - -/** - * This listeners uses the interfaces of authenticators to - * determine how to check credentials. - * - * @author Wouter de Jong - * - * @final - */ -class CheckCredentialsListener implements EventSubscriberInterface -{ - private $hasherFactory; - - /** - * @param PasswordHasherFactoryInterface $hasherFactory - */ - public function __construct($hasherFactory) - { - if ($hasherFactory instanceof EncoderFactoryInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Passing a "%s" instance to the "%s" constructor is deprecated, use "%s" instead.', EncoderFactoryInterface::class, __CLASS__, PasswordHasherFactoryInterface::class); - } - - $this->hasherFactory = $hasherFactory; - } - - public function checkPassport(CheckPassportEvent $event): void - { - $passport = $event->getPassport(); - if ($passport instanceof UserPassportInterface && $passport->hasBadge(PasswordCredentials::class)) { - // Use the password hasher to validate the credentials - $user = $passport->getUser(); - - if (!$user instanceof PasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-http', '5.3', 'Not implementing the "%s" interface in class "%s" while using password-based authentication is deprecated.', PasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - /** @var PasswordCredentials $badge */ - $badge = $passport->getBadge(PasswordCredentials::class); - - if ($badge->isResolved()) { - return; - } - - $presentedPassword = $badge->getPassword(); - if ('' === $presentedPassword) { - throw new BadCredentialsException('The presented password cannot be empty.'); - } - - if (null === $user->getPassword()) { - throw new BadCredentialsException('The presented password is invalid.'); - } - - $salt = method_exists($user, 'getSalt') ? $user->getSalt() : ''; - if ($salt && !$user instanceof LegacyPasswordAuthenticatedUserInterface) { - trigger_deprecation('symfony/security-http', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user)); - } - - // @deprecated since Symfony 5.3 - if ($this->hasherFactory instanceof EncoderFactoryInterface) { - if (!$this->hasherFactory->getEncoder($user)->isPasswordValid($user->getPassword(), $presentedPassword, $salt)) { - throw new BadCredentialsException('The presented password is invalid.'); - } - } else { - if (!$this->hasherFactory->getPasswordHasher($user)->verify($user->getPassword(), $presentedPassword, $salt)) { - throw new BadCredentialsException('The presented password is invalid.'); - } - } - - $badge->markResolved(); - - if (!$passport->hasBadge(PasswordUpgradeBadge::class)) { - $passport->addBadge(new PasswordUpgradeBadge($presentedPassword)); - } - - return; - } - - if ($passport->hasBadge(CustomCredentials::class)) { - /** @var CustomCredentials $badge */ - $badge = $passport->getBadge(CustomCredentials::class); - if ($badge->isResolved()) { - return; - } - - $badge->executeCustomChecker($passport->getUser()); - - return; - } - } - - public static function getSubscribedEvents(): array - { - return [CheckPassportEvent::class => 'checkPassport']; - } -} diff --git a/vendor/symfony/security-http/EventListener/CheckRememberMeConditionsListener.php b/vendor/symfony/security-http/EventListener/CheckRememberMeConditionsListener.php deleted file mode 100644 index cd738cc..0000000 --- a/vendor/symfony/security-http/EventListener/CheckRememberMeConditionsListener.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; -use Symfony\Component\Security\Http\ParameterBagUtils; - -/** - * Checks if all conditions are met for remember me. - * - * The conditions that must be met for this listener to enable remember me: - * A) This badge is present in the Passport - * B) The remember_me key under your firewall is configured - * C) The "remember me" functionality is activated. This is usually - * done by having a _remember_me checkbox in your form, but - * can be configured by the "always_remember_me" and "remember_me_parameter" - * parameters under the "remember_me" firewall key (or "always_remember_me" - * is enabled) - * - * @author Wouter de Jong - * - * @final - */ -class CheckRememberMeConditionsListener implements EventSubscriberInterface -{ - private $options; - private $logger; - - public function __construct(array $options = [], LoggerInterface $logger = null) - { - $this->options = $options + ['always_remember_me' => false, 'remember_me_parameter' => '_remember_me']; - $this->logger = $logger; - } - - public function onSuccessfulLogin(LoginSuccessEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport->hasBadge(RememberMeBadge::class)) { - return; - } - - /** @var RememberMeBadge $badge */ - $badge = $passport->getBadge(RememberMeBadge::class); - if (!$this->options['always_remember_me']) { - $parameter = ParameterBagUtils::getRequestParameterValue($event->getRequest(), $this->options['remember_me_parameter']); - if (!('true' === $parameter || 'on' === $parameter || '1' === $parameter || 'yes' === $parameter || true === $parameter)) { - if (null !== $this->logger) { - $this->logger->debug('Remember me disabled; request does not contain remember me parameter ("{parameter}").', ['parameter' => $this->options['remember_me_parameter']]); - } - - return; - } - } - - $badge->enable(); - } - - public static function getSubscribedEvents(): array - { - return [LoginSuccessEvent::class => ['onSuccessfulLogin', -32]]; - } -} diff --git a/vendor/symfony/security-http/EventListener/CookieClearingLogoutListener.php b/vendor/symfony/security-http/EventListener/CookieClearingLogoutListener.php deleted file mode 100644 index d178b92..0000000 --- a/vendor/symfony/security-http/EventListener/CookieClearingLogoutListener.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; - -/** - * This listener clears the passed cookies when a user logs out. - * - * @author Johannes M. Schmitt - * - * @final - */ -class CookieClearingLogoutListener implements EventSubscriberInterface -{ - private $cookies; - - /** - * @param array $cookies An array of cookies (keys are names, values contain path and domain) to unset - */ - public function __construct(array $cookies) - { - $this->cookies = $cookies; - } - - public function onLogout(LogoutEvent $event): void - { - if (!$response = $event->getResponse()) { - return; - } - - foreach ($this->cookies as $cookieName => $cookieData) { - $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain'], $cookieData['secure'] ?? false, true, $cookieData['samesite'] ?? null); - } - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => ['onLogout', -255], - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/CsrfProtectionListener.php b/vendor/symfony/security-http/EventListener/CsrfProtectionListener.php deleted file mode 100644 index 91f46f3..0000000 --- a/vendor/symfony/security-http/EventListener/CsrfProtectionListener.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; - -/** - * @author Wouter de Jong - * - * @final - */ -class CsrfProtectionListener implements EventSubscriberInterface -{ - private $csrfTokenManager; - - public function __construct(CsrfTokenManagerInterface $csrfTokenManager) - { - $this->csrfTokenManager = $csrfTokenManager; - } - - public function checkPassport(CheckPassportEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport->hasBadge(CsrfTokenBadge::class)) { - return; - } - - /** @var CsrfTokenBadge $badge */ - $badge = $passport->getBadge(CsrfTokenBadge::class); - if ($badge->isResolved()) { - return; - } - - $csrfToken = new CsrfToken($badge->getCsrfTokenId(), $badge->getCsrfToken()); - - if (false === $this->csrfTokenManager->isTokenValid($csrfToken)) { - throw new InvalidCsrfTokenException('Invalid CSRF token.'); - } - - $badge->markResolved(); - } - - public static function getSubscribedEvents(): array - { - return [CheckPassportEvent::class => ['checkPassport', 512]]; - } -} diff --git a/vendor/symfony/security-http/EventListener/CsrfTokenClearingLogoutListener.php b/vendor/symfony/security-http/EventListener/CsrfTokenClearingLogoutListener.php deleted file mode 100644 index 984041e..0000000 --- a/vendor/symfony/security-http/EventListener/CsrfTokenClearingLogoutListener.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Csrf\TokenStorage\ClearableTokenStorageInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; - -/** - * @author Christian Flothmann - * - * @final - */ -class CsrfTokenClearingLogoutListener implements EventSubscriberInterface -{ - private $csrfTokenStorage; - - public function __construct(ClearableTokenStorageInterface $csrfTokenStorage) - { - $this->csrfTokenStorage = $csrfTokenStorage; - } - - public function onLogout(LogoutEvent $event): void - { - $this->csrfTokenStorage->clear(); - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => 'onLogout', - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/DefaultLogoutListener.php b/vendor/symfony/security-http/EventListener/DefaultLogoutListener.php deleted file mode 100644 index 8a9e000..0000000 --- a/vendor/symfony/security-http/EventListener/DefaultLogoutListener.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\HttpUtils; - -/** - * Default logout listener will redirect users to a configured path. - * - * @author Fabien Potencier - * @author Alexander - * - * @final - */ -class DefaultLogoutListener implements EventSubscriberInterface -{ - private $httpUtils; - private $targetUrl; - - public function __construct(HttpUtils $httpUtils, string $targetUrl = '/') - { - $this->httpUtils = $httpUtils; - $this->targetUrl = $targetUrl; - } - - public function onLogout(LogoutEvent $event): void - { - if (null !== $event->getResponse()) { - return; - } - - $event->setResponse($this->httpUtils->createRedirectResponse($event->getRequest(), $this->targetUrl)); - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => ['onLogout', 64], - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/LoginThrottlingListener.php b/vendor/symfony/security-http/EventListener/LoginThrottlingListener.php deleted file mode 100644 index 2284f93..0000000 --- a/vendor/symfony/security-http/EventListener/LoginThrottlingListener.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Exception\TooManyLoginAttemptsAuthenticationException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; - -/** - * @author Wouter de Jong - */ -final class LoginThrottlingListener implements EventSubscriberInterface -{ - private $requestStack; - private $limiter; - - public function __construct(RequestStack $requestStack, RequestRateLimiterInterface $limiter) - { - $this->requestStack = $requestStack; - $this->limiter = $limiter; - } - - public function checkPassport(CheckPassportEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport->hasBadge(UserBadge::class)) { - return; - } - - $request = $this->requestStack->getMainRequest(); - $request->attributes->set(Security::LAST_USERNAME, $passport->getBadge(UserBadge::class)->getUserIdentifier()); - - $limit = $this->limiter->consume($request); - if (!$limit->isAccepted()) { - throw new TooManyLoginAttemptsAuthenticationException(ceil(($limit->getRetryAfter()->getTimestamp() - time()) / 60)); - } - } - - public function onSuccessfulLogin(LoginSuccessEvent $event): void - { - $this->limiter->reset($event->getRequest()); - } - - public static function getSubscribedEvents(): array - { - return [ - CheckPassportEvent::class => ['checkPassport', 2080], - LoginSuccessEvent::class => 'onSuccessfulLogin', - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/PasswordMigratingListener.php b/vendor/symfony/security-http/EventListener/PasswordMigratingListener.php deleted file mode 100644 index 2650d45..0000000 --- a/vendor/symfony/security-http/EventListener/PasswordMigratingListener.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; -use Symfony\Component\PasswordHasher\PasswordHasherInterface; -use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; -use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PasswordUpgradeBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; - -/** - * @author Wouter de Jong - * - * @final - */ -class PasswordMigratingListener implements EventSubscriberInterface -{ - private $hasherFactory; - - /** - * @param PasswordHasherFactoryInterface $hasherFactory - */ - public function __construct($hasherFactory) - { - if ($hasherFactory instanceof EncoderFactoryInterface) { - trigger_deprecation('symfony/security-core', '5.3', 'Passing a "%s" instance to the "%s" constructor is deprecated, use "%s" instead.', EncoderFactoryInterface::class, __CLASS__, PasswordHasherFactoryInterface::class); - } - - $this->hasherFactory = $hasherFactory; - } - - public function onLoginSuccess(LoginSuccessEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport instanceof UserPassportInterface || !$passport->hasBadge(PasswordUpgradeBadge::class)) { - return; - } - - /** @var PasswordUpgradeBadge $badge */ - $badge = $passport->getBadge(PasswordUpgradeBadge::class); - $plaintextPassword = $badge->getAndErasePlaintextPassword(); - - if ('' === $plaintextPassword) { - return; - } - - $user = $passport->getUser(); - if (null === $user->getPassword()) { - return; - } - - $passwordHasher = $this->hasherFactory instanceof EncoderFactoryInterface ? $this->hasherFactory->getEncoder($user) : $this->hasherFactory->getPasswordHasher($user); - if (!$passwordHasher->needsRehash($user->getPassword())) { - return; - } - - $passwordUpgrader = $badge->getPasswordUpgrader(); - - if (null === $passwordUpgrader) { - if (!$passport->hasBadge(UserBadge::class)) { - return; - } - - /** @var UserBadge $userBadge */ - $userBadge = $passport->getBadge(UserBadge::class); - $userLoader = $userBadge->getUserLoader(); - if (\is_array($userLoader) && $userLoader[0] instanceof PasswordUpgraderInterface) { - $passwordUpgrader = $userLoader[0]; - } elseif (!$userLoader instanceof \Closure - || !($passwordUpgrader = (new \ReflectionFunction($userLoader))->getClosureThis()) instanceof PasswordUpgraderInterface - ) { - return; - } - } - - $passwordUpgrader->upgradePassword($user, $passwordHasher instanceof PasswordHasherInterface ? $passwordHasher->hash($plaintextPassword, $user->getSalt()) : $passwordHasher->encodePassword($plaintextPassword, $user->getSalt())); - } - - public static function getSubscribedEvents(): array - { - return [LoginSuccessEvent::class => 'onLoginSuccess']; - } -} diff --git a/vendor/symfony/security-http/EventListener/RememberMeListener.php b/vendor/symfony/security-http/EventListener/RememberMeListener.php deleted file mode 100644 index 510eca6..0000000 --- a/vendor/symfony/security-http/EventListener/RememberMeListener.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge; -use Symfony\Component\Security\Http\Event\LoginFailureEvent; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\Event\TokenDeauthenticatedEvent; -use Symfony\Component\Security\Http\RememberMe\RememberMeHandlerInterface; - -/** - * The RememberMe *listener* creates and deletes remember-me cookies. - * - * Upon login success or failure and support for remember me - * in the firewall and authenticator, this listener will create - * a remember-me cookie. - * Upon login failure, all remember-me cookies are removed. - * - * @author Wouter de Jong - * - * @final - */ -class RememberMeListener implements EventSubscriberInterface -{ - private $rememberMeHandler; - private $logger; - - public function __construct(RememberMeHandlerInterface $rememberMeHandler, LoggerInterface $logger = null) - { - $this->rememberMeHandler = $rememberMeHandler; - $this->logger = $logger; - } - - public function onSuccessfulLogin(LoginSuccessEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport->hasBadge(RememberMeBadge::class)) { - if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: your authenticator does not support it.', ['authenticator' => \get_class($event->getAuthenticator())]); - } - - return; - } - - // Make sure any old remember-me cookies are cancelled - $this->rememberMeHandler->clearRememberMeCookie(); - - /** @var RememberMeBadge $badge */ - $badge = $passport->getBadge(RememberMeBadge::class); - if (!$badge->isEnabled()) { - if (null !== $this->logger) { - $this->logger->debug('Remember me skipped: the RememberMeBadge is not enabled.'); - } - - return; - } - - if (null !== $this->logger) { - $this->logger->debug('Remember-me was requested; setting cookie.'); - } - - $this->rememberMeHandler->createRememberMeCookie($event->getUser()); - } - - public function clearCookie(): void - { - $this->rememberMeHandler->clearRememberMeCookie(); - } - - public static function getSubscribedEvents(): array - { - return [ - LoginSuccessEvent::class => ['onSuccessfulLogin', -64], - LoginFailureEvent::class => 'clearCookie', - LogoutEvent::class => 'clearCookie', - TokenDeauthenticatedEvent::class => 'clearCookie', - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/RememberMeLogoutListener.php b/vendor/symfony/security-http/EventListener/RememberMeLogoutListener.php deleted file mode 100644 index b97558f..0000000 --- a/vendor/symfony/security-http/EventListener/RememberMeLogoutListener.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated.', RememberMeLogoutListener::class); - -/** - * @author Wouter de Jong - * - * @final - * - * @deprecated since Symfony 5.4 - */ -class RememberMeLogoutListener implements EventSubscriberInterface -{ - private $rememberMeServices; - - public function __construct(RememberMeServicesInterface $rememberMeServices) - { - if (!method_exists($rememberMeServices, 'logout')) { - trigger_deprecation('symfony/security-core', '5.1', '"%s" should implement the "logout(Request $request, Response $response, TokenInterface $token)" method, this method will be added to the "%s" in version 6.0.', \get_class($rememberMeServices), RememberMeServicesInterface::class); - } - - $this->rememberMeServices = $rememberMeServices; - } - - public function onLogout(LogoutEvent $event): void - { - if (!method_exists($this->rememberMeServices, 'logout')) { - return; - } - - if (!$event->getToken()) { - return; - } - - if (null === $event->getResponse()) { - throw new LogicException(sprintf('No response was set for this logout action. Make sure the DefaultLogoutListener or another listener has set the response before "%s" is called.', __CLASS__)); - } - - $this->rememberMeServices->logout($event->getRequest(), $event->getResponse(), $event->getToken()); - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => 'onLogout', - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/SessionLogoutListener.php b/vendor/symfony/security-http/EventListener/SessionLogoutListener.php deleted file mode 100644 index 06b84d6..0000000 --- a/vendor/symfony/security-http/EventListener/SessionLogoutListener.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; - -/** - * Handler for clearing invalidating the current session. - * - * @author Johannes M. Schmitt - * - * @final - */ -class SessionLogoutListener implements EventSubscriberInterface -{ - public function onLogout(LogoutEvent $event): void - { - if ($event->getRequest()->hasSession()) { - $event->getRequest()->getSession()->invalidate(); - } - } - - public static function getSubscribedEvents(): array - { - return [ - LogoutEvent::class => 'onLogout', - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/SessionStrategyListener.php b/vendor/symfony/security-http/EventListener/SessionStrategyListener.php deleted file mode 100644 index b1ba288..0000000 --- a/vendor/symfony/security-http/EventListener/SessionStrategyListener.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Http\Event\LoginSuccessEvent; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; - -/** - * Migrates/invalidates the session after successful login. - * - * This should be registered as subscriber to any "stateful" firewalls. - * - * @see SessionAuthenticationStrategy - * - * @author Wouter de Jong - */ -class SessionStrategyListener implements EventSubscriberInterface -{ - private $sessionAuthenticationStrategy; - - public function __construct(SessionAuthenticationStrategyInterface $sessionAuthenticationStrategy) - { - $this->sessionAuthenticationStrategy = $sessionAuthenticationStrategy; - } - - public function onSuccessfulLogin(LoginSuccessEvent $event): void - { - $request = $event->getRequest(); - $token = $event->getAuthenticatedToken(); - - if (!$request->hasSession() || !$request->hasPreviousSession()) { - return; - } - - $this->sessionAuthenticationStrategy->onAuthentication($request, $token); - } - - public static function getSubscribedEvents(): array - { - return [LoginSuccessEvent::class => 'onSuccessfulLogin']; - } -} diff --git a/vendor/symfony/security-http/EventListener/UserCheckerListener.php b/vendor/symfony/security-http/EventListener/UserCheckerListener.php deleted file mode 100644 index 55be8b7..0000000 --- a/vendor/symfony/security-http/EventListener/UserCheckerListener.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\PreAuthenticatedUserBadge; -use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; - -/** - * @author Wouter de Jong - * - * @final - */ -class UserCheckerListener implements EventSubscriberInterface -{ - private $userChecker; - - public function __construct(UserCheckerInterface $userChecker) - { - $this->userChecker = $userChecker; - } - - public function preCheckCredentials(CheckPassportEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport instanceof UserPassportInterface || $passport->hasBadge(PreAuthenticatedUserBadge::class)) { - return; - } - - $this->userChecker->checkPreAuth($passport->getUser()); - } - - public function postCheckCredentials(AuthenticationSuccessEvent $event): void - { - $user = $event->getAuthenticationToken()->getUser(); - if (!$user instanceof UserInterface) { - return; - } - - $this->userChecker->checkPostAuth($user); - } - - public static function getSubscribedEvents(): array - { - return [ - CheckPassportEvent::class => ['preCheckCredentials', 256], - AuthenticationSuccessEvent::class => ['postCheckCredentials', 256], - ]; - } -} diff --git a/vendor/symfony/security-http/EventListener/UserProviderListener.php b/vendor/symfony/security-http/EventListener/UserProviderListener.php deleted file mode 100644 index a340878..0000000 --- a/vendor/symfony/security-http/EventListener/UserProviderListener.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\EventListener; - -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; -use Symfony\Component\Security\Http\Event\CheckPassportEvent; - -/** - * Configures the user provider as user loader, if no user load - * has been explicitly set. - * - * @author Wouter de Jong - * - * @final - */ -class UserProviderListener -{ - private $userProvider; - - public function __construct(UserProviderInterface $userProvider) - { - $this->userProvider = $userProvider; - } - - public function checkPassport(CheckPassportEvent $event): void - { - $passport = $event->getPassport(); - if (!$passport->hasBadge(UserBadge::class)) { - return; - } - - /** @var UserBadge $badge */ - $badge = $passport->getBadge(UserBadge::class); - if (null !== $badge->getUserLoader()) { - return; - } - - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($this->userProvider, 'loadUserByIdentifier')) { - $badge->setUserLoader([$this->userProvider, 'loadUserByIdentifier']); - } else { - trigger_deprecation('symfony/security-http', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $badge->setUserLoader([$this->userProvider, 'loadUserByUsername']); - } - } -} diff --git a/vendor/symfony/security-http/Firewall.php b/vendor/symfony/security-http/Firewall.php deleted file mode 100644 index be758a6..0000000 --- a/vendor/symfony/security-http/Firewall.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * Firewall uses a FirewallMap to register security listeners for the given - * request. - * - * It allows for different security strategies within the same application - * (a Basic authentication for the /api, and a web based authentication for - * everything else for instance). - * - * @author Fabien Potencier - */ -class Firewall implements EventSubscriberInterface -{ - private $map; - private $dispatcher; - - /** - * @var \SplObjectStorage - */ - private $exceptionListeners; - - public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher) - { - $this->map = $map; - $this->dispatcher = $dispatcher; - $this->exceptionListeners = new \SplObjectStorage(); - } - - public function onKernelRequest(RequestEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - // register listeners for this firewall - $listeners = $this->map->getListeners($event->getRequest()); - - $authenticationListeners = $listeners[0]; - $exceptionListener = $listeners[1]; - $logoutListener = $listeners[2]; - - if (null !== $exceptionListener) { - $this->exceptionListeners[$event->getRequest()] = $exceptionListener; - $exceptionListener->register($this->dispatcher); - } - - // Authentication listeners are pre-sorted by SortFirewallListenersPass - $authenticationListeners = function () use ($authenticationListeners, $logoutListener) { - if (null !== $logoutListener) { - $logoutListenerPriority = $this->getListenerPriority($logoutListener); - } - - foreach ($authenticationListeners as $listener) { - $listenerPriority = $this->getListenerPriority($listener); - - // Yielding the LogoutListener at the correct position - if (null !== $logoutListener && $listenerPriority < $logoutListenerPriority) { - yield $logoutListener; - $logoutListener = null; - } - - yield $listener; - } - - // When LogoutListener has the lowest priority of all listeners - if (null !== $logoutListener) { - yield $logoutListener; - } - }; - - $this->callListeners($event, $authenticationListeners()); - } - - public function onKernelFinishRequest(FinishRequestEvent $event) - { - $request = $event->getRequest(); - - if (isset($this->exceptionListeners[$request])) { - $this->exceptionListeners[$request]->unregister($this->dispatcher); - unset($this->exceptionListeners[$request]); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents() - { - return [ - KernelEvents::REQUEST => ['onKernelRequest', 8], - KernelEvents::FINISH_REQUEST => 'onKernelFinishRequest', - ]; - } - - protected function callListeners(RequestEvent $event, iterable $listeners) - { - foreach ($listeners as $listener) { - $listener($event); - - if ($event->hasResponse()) { - break; - } - } - } - - private function getListenerPriority(object $logoutListener): int - { - return $logoutListener instanceof FirewallListenerInterface ? $logoutListener->getPriority() : 0; - } -} diff --git a/vendor/symfony/security-http/Firewall/AbstractAuthenticationListener.php b/vendor/symfony/security-http/Firewall/AbstractAuthenticationListener.php deleted file mode 100644 index 33e2c08..0000000 --- a/vendor/symfony/security-http/Firewall/AbstractAuthenticationListener.php +++ /dev/null @@ -1,229 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\SessionUnavailableException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AbstractAuthenticationListener::class); - -/** - * The AbstractAuthenticationListener is the preferred base class for all - * browser-/HTTP-based authentication requests. - * - * Subclasses likely have to implement the following: - * - an TokenInterface to hold authentication related data - * - an AuthenticationProvider to perform the actual authentication of the - * token, retrieve the UserInterface implementation from a database, and - * perform the specific account checks using the UserChecker - * - * By default, this listener only is active for a specific path, e.g. - * /login_check. If you want to change this behavior, you can overwrite the - * requiresAuthentication() method. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -abstract class AbstractAuthenticationListener extends AbstractListener -{ - protected $options; - protected $logger; - protected $authenticationManager; - protected $providerKey; - protected $httpUtils; - - private $tokenStorage; - private $sessionStrategy; - private $dispatcher; - private $successHandler; - private $failureHandler; - private $rememberMeServices; - - /** - * @throws \InvalidArgumentException - */ - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) - { - if (empty($providerKey)) { - throw new \InvalidArgumentException('$providerKey must not be empty.'); - } - - $this->tokenStorage = $tokenStorage; - $this->authenticationManager = $authenticationManager; - $this->sessionStrategy = $sessionStrategy; - $this->providerKey = $providerKey; - $this->successHandler = $successHandler; - $this->failureHandler = $failureHandler; - $this->options = array_merge([ - 'check_path' => '/login_check', - 'login_path' => '/login', - 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - 'failure_path' => null, - 'failure_forward' => false, - 'require_previous_session' => true, - ], $options); - $this->logger = $logger; - $this->dispatcher = $dispatcher; - $this->httpUtils = $httpUtils; - } - - /** - * Sets the RememberMeServices implementation to use. - */ - public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) - { - $this->rememberMeServices = $rememberMeServices; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return $this->requiresAuthentication($request); - } - - /** - * Handles form based authentication. - * - * @throws \RuntimeException - * @throws SessionUnavailableException - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - if (!$request->hasSession()) { - throw new \RuntimeException('This authentication method requires a session.'); - } - - try { - if ($this->options['require_previous_session'] && !$request->hasPreviousSession()) { - throw new SessionUnavailableException('Your session has timed out, or you have disabled cookies.'); - } - - if (null === $returnValue = $this->attemptAuthentication($request)) { - return; - } - - if ($returnValue instanceof TokenInterface) { - $this->sessionStrategy->onAuthentication($request, $returnValue); - - $response = $this->onSuccess($request, $returnValue); - } elseif ($returnValue instanceof Response) { - $response = $returnValue; - } else { - throw new \RuntimeException('attemptAuthentication() must either return a Response, an implementation of TokenInterface, or null.'); - } - } catch (AuthenticationException $e) { - $response = $this->onFailure($request, $e); - } - - $event->setResponse($response); - } - - /** - * Whether this request requires authentication. - * - * The default implementation only processes requests to a specific path, - * but a subclass could change this to only authenticate requests where a - * certain parameters is present. - * - * @return bool - */ - protected function requiresAuthentication(Request $request) - { - return $this->httpUtils->checkRequestPath($request, $this->options['check_path']); - } - - /** - * Performs authentication. - * - * @return TokenInterface|Response|null The authenticated token, null if full authentication is not possible, or a Response - * - * @throws AuthenticationException if the authentication fails - */ - abstract protected function attemptAuthentication(Request $request); - - private function onFailure(Request $request, AuthenticationException $failed): Response - { - if (null !== $this->logger) { - $this->logger->info('Authentication request failed.', ['exception' => $failed]); - } - - $token = $this->tokenStorage->getToken(); - if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getFirewallName()) { - $this->tokenStorage->setToken(null); - } - - $response = $this->failureHandler->onAuthenticationFailure($request, $failed); - - if (!$response instanceof Response) { - throw new \RuntimeException('Authentication Failure Handler did not return a Response.'); - } - - return $response; - } - - private function onSuccess(Request $request, TokenInterface $token): Response - { - if (null !== $this->logger) { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - $this->logger->info('User has been authenticated successfully.', ['username' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()]); - } - - $this->tokenStorage->setToken($token); - - $session = $request->getSession(); - $session->remove(Security::AUTHENTICATION_ERROR); - $session->remove(Security::LAST_USERNAME); - - if (null !== $this->dispatcher) { - $loginEvent = new InteractiveLoginEvent($request, $token); - $this->dispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - - $response = $this->successHandler->onAuthenticationSuccess($request, $token); - - if (!$response instanceof Response) { - throw new \RuntimeException('Authentication Success Handler did not return a Response.'); - } - - if (null !== $this->rememberMeServices) { - $this->rememberMeServices->loginSuccess($request, $response, $token); - } - - return $response; - } -} diff --git a/vendor/symfony/security-http/Firewall/AbstractListener.php b/vendor/symfony/security-http/Firewall/AbstractListener.php deleted file mode 100644 index cbc8f93..0000000 --- a/vendor/symfony/security-http/Firewall/AbstractListener.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Symfony\Component\HttpKernel\Event\RequestEvent; - -/** - * A base class for listeners that can tell whether they should authenticate incoming requests. - * - * @author Nicolas Grekas - */ -abstract class AbstractListener implements FirewallListenerInterface -{ - final public function __invoke(RequestEvent $event) - { - if (false !== $this->supports($event->getRequest())) { - $this->authenticate($event); - } - } - - public static function getPriority(): int - { - return 0; // Default - } -} diff --git a/vendor/symfony/security-http/Firewall/AbstractPreAuthenticatedListener.php b/vendor/symfony/security-http/Firewall/AbstractPreAuthenticatedListener.php deleted file mode 100644 index b698e1e..0000000 --- a/vendor/symfony/security-http/Firewall/AbstractPreAuthenticatedListener.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AbstractPreAuthenticatedListener::class); - -/** - * AbstractPreAuthenticatedListener is the base class for all listener that - * authenticates users based on a pre-authenticated request (like a certificate - * for instance). - * - * @author Fabien Potencier - * - * @internal - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -abstract class AbstractPreAuthenticatedListener extends AbstractListener -{ - protected $logger; - private $tokenStorage; - private $authenticationManager; - private $providerKey; - private $dispatcher; - private $sessionStrategy; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) - { - $this->tokenStorage = $tokenStorage; - $this->authenticationManager = $authenticationManager; - $this->providerKey = $providerKey; - $this->logger = $logger; - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - try { - $request->attributes->set('_pre_authenticated_data', $this->getPreAuthenticatedData($request)); - } catch (BadCredentialsException $e) { - $this->clearToken($e); - - return false; - } - - return true; - } - - /** - * Handles pre-authentication. - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - [$user, $credentials] = $request->attributes->get('_pre_authenticated_data'); - $request->attributes->remove('_pre_authenticated_data'); - - if (null !== $this->logger) { - $this->logger->debug('Checking current security token.', ['token' => (string) $this->tokenStorage->getToken()]); - } - - if (null !== $token = $this->tokenStorage->getToken()) { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - if ($token instanceof PreAuthenticatedToken && $this->providerKey == $token->getFirewallName() && $token->isAuthenticated() && (method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()) === $user) { - return; - } - } - - if (null !== $this->logger) { - $this->logger->debug('Trying to pre-authenticate user.', ['username' => (string) $user]); - } - - try { - $token = $this->authenticationManager->authenticate(new PreAuthenticatedToken($user, $credentials, $this->providerKey)); - - if (null !== $this->logger) { - $this->logger->info('Pre-authentication successful.', ['token' => (string) $token]); - } - - $this->migrateSession($request, $token); - - $this->tokenStorage->setToken($token); - - if (null !== $this->dispatcher) { - $loginEvent = new InteractiveLoginEvent($request, $token); - $this->dispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - } catch (AuthenticationException $e) { - $this->clearToken($e); - } - } - - /** - * Call this method if your authentication token is stored to a session. - * - * @final - */ - public function setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy) - { - $this->sessionStrategy = $sessionStrategy; - } - - /** - * Clears a PreAuthenticatedToken for this provider (if present). - */ - private function clearToken(AuthenticationException $exception) - { - $token = $this->tokenStorage->getToken(); - if ($token instanceof PreAuthenticatedToken && $this->providerKey === $token->getFirewallName()) { - $this->tokenStorage->setToken(null); - - if (null !== $this->logger) { - $this->logger->info('Cleared security token due to an exception.', ['exception' => $exception]); - } - } - } - - /** - * Gets the user and credentials from the Request. - * - * @return array An array composed of the user and the credentials - */ - abstract protected function getPreAuthenticatedData(Request $request); - - private function migrateSession(Request $request, TokenInterface $token) - { - if (!$this->sessionStrategy || !$request->hasSession() || !$request->hasPreviousSession()) { - return; - } - - $this->sessionStrategy->onAuthentication($request, $token); - } -} diff --git a/vendor/symfony/security-http/Firewall/AccessListener.php b/vendor/symfony/security-http/Firewall/AccessListener.php deleted file mode 100644 index 1ea6ee1..0000000 --- a/vendor/symfony/security-http/Firewall/AccessListener.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\NullToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; -use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; -use Symfony\Component\Security\Http\AccessMapInterface; -use Symfony\Component\Security\Http\Authentication\NoopAuthenticationManager; -use Symfony\Component\Security\Http\Event\LazyResponseEvent; - -/** - * AccessListener enforces access control rules. - * - * @author Fabien Potencier - * - * @final - */ -class AccessListener extends AbstractListener -{ - private $tokenStorage; - private $accessDecisionManager; - private $map; - private $authManager; - private $exceptionOnNoToken; - - public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionManagerInterface $accessDecisionManager, AccessMapInterface $map, /*bool*/ $exceptionOnNoToken = true) - { - if ($exceptionOnNoToken instanceof AuthenticationManagerInterface) { - trigger_deprecation('symfony/security-http', '5.4', 'The $authManager argument of "%s" is deprecated.', __METHOD__); - $authManager = $exceptionOnNoToken; - $exceptionOnNoToken = \func_num_args() > 4 ? func_get_arg(4) : true; - } - - if (false !== $exceptionOnNoToken) { - trigger_deprecation('symfony/security-http', '5.4', 'Not setting the $exceptionOnNoToken argument of "%s" to "false" is deprecated.', __METHOD__); - } - - $this->tokenStorage = $tokenStorage; - $this->accessDecisionManager = $accessDecisionManager; - $this->map = $map; - $this->authManager = $authManager ?? (class_exists(AuthenticationManagerInterface::class) ? new NoopAuthenticationManager() : null); - $this->exceptionOnNoToken = $exceptionOnNoToken; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - [$attributes] = $this->map->getPatterns($request); - $request->attributes->set('_access_control_attributes', $attributes); - - if ($attributes && ( - (\defined(AuthenticatedVoter::class.'::IS_AUTHENTICATED_ANONYMOUSLY') ? [AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY] !== $attributes : true) - && [AuthenticatedVoter::PUBLIC_ACCESS] !== $attributes - )) { - return true; - } - - return null; - } - - /** - * Handles access authorization. - * - * @throws AccessDeniedException - * @throws AuthenticationCredentialsNotFoundException when the token storage has no authentication token and $exceptionOnNoToken is set to true - */ - public function authenticate(RequestEvent $event) - { - if (!$event instanceof LazyResponseEvent && null === ($token = $this->tokenStorage->getToken()) && $this->exceptionOnNoToken) { - throw new AuthenticationCredentialsNotFoundException('A Token was not found in the TokenStorage.'); - } - - $request = $event->getRequest(); - - $attributes = $request->attributes->get('_access_control_attributes'); - $request->attributes->remove('_access_control_attributes'); - - if (!$attributes || (( - (\defined(AuthenticatedVoter::class.'::IS_AUTHENTICATED_ANONYMOUSLY') ? [AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY] === $attributes : false) - || [AuthenticatedVoter::PUBLIC_ACCESS] === $attributes - ) && $event instanceof LazyResponseEvent)) { - return; - } - - if ($event instanceof LazyResponseEvent) { - $token = $this->tokenStorage->getToken(); - } - - if (null === $token) { - if ($this->exceptionOnNoToken) { - throw new AuthenticationCredentialsNotFoundException('A Token was not found in the TokenStorage.'); - } - - $token = new NullToken(); - } - - // @deprecated since Symfony 5.4 - if (method_exists($token, 'isAuthenticated') && !$token->isAuthenticated(false)) { - trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s()" is deprecated, return null from "getUser()" instead.'); - - if ($this->authManager) { - $token = $this->authManager->authenticate($token); - $this->tokenStorage->setToken($token); - } - } - - if (!$this->accessDecisionManager->decide($token, $attributes, $request, true)) { - throw $this->createAccessDeniedException($request, $attributes); - } - } - - private function createAccessDeniedException(Request $request, array $attributes) - { - $exception = new AccessDeniedException(); - $exception->setAttributes($attributes); - $exception->setSubject($request); - - return $exception; - } - - public static function getPriority(): int - { - return -255; - } -} diff --git a/vendor/symfony/security-http/Firewall/AnonymousAuthenticationListener.php b/vendor/symfony/security-http/Firewall/AnonymousAuthenticationListener.php deleted file mode 100644 index 8f175ae..0000000 --- a/vendor/symfony/security-http/Firewall/AnonymousAuthenticationListener.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AnonymousAuthenticationListener::class); - -// Help opcache.preload discover always-needed symbols -class_exists(AnonymousToken::class); - -/** - * AnonymousAuthenticationListener automatically adds a Token if none is - * already present. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class AnonymousAuthenticationListener extends AbstractListener -{ - private $tokenStorage; - private $secret; - private $authenticationManager; - private $logger; - - public function __construct(TokenStorageInterface $tokenStorage, string $secret, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null) - { - $this->tokenStorage = $tokenStorage; - $this->secret = $secret; - $this->authenticationManager = $authenticationManager; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return null; // always run authenticate() lazily with lazy firewalls - } - - /** - * Handles anonymous authentication. - */ - public function authenticate(RequestEvent $event) - { - if (null !== $this->tokenStorage->getToken()) { - return; - } - - try { - $token = new AnonymousToken($this->secret, 'anon.', []); - if (null !== $this->authenticationManager) { - $token = $this->authenticationManager->authenticate($token); - } - - $this->tokenStorage->setToken($token); - - if (null !== $this->logger) { - $this->logger->info('Populated the TokenStorage with an anonymous Token.'); - } - } catch (AuthenticationException $failed) { - if (null !== $this->logger) { - $this->logger->info('Anonymous authentication failed.', ['exception' => $failed]); - } - } - } -} diff --git a/vendor/symfony/security-http/Firewall/AuthenticatorManagerListener.php b/vendor/symfony/security-http/Firewall/AuthenticatorManagerListener.php deleted file mode 100644 index 408f80c..0000000 --- a/vendor/symfony/security-http/Firewall/AuthenticatorManagerListener.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Http\Authentication\AuthenticatorManagerInterface; - -/** - * Firewall authentication listener that delegates to the authenticator system. - * - * @author Wouter de Jong - */ -class AuthenticatorManagerListener extends AbstractListener -{ - private $authenticatorManager; - - public function __construct(AuthenticatorManagerInterface $authenticationManager) - { - $this->authenticatorManager = $authenticationManager; - } - - public function supports(Request $request): ?bool - { - return $this->authenticatorManager->supports($request); - } - - public function authenticate(RequestEvent $event): void - { - $request = $event->getRequest(); - $response = $this->authenticatorManager->authenticateRequest($request); - if (null === $response) { - return; - } - - $event->setResponse($response); - } -} diff --git a/vendor/symfony/security-http/Firewall/BasicAuthenticationListener.php b/vendor/symfony/security-http/Firewall/BasicAuthenticationListener.php deleted file mode 100644 index 8113e9f..0000000 --- a/vendor/symfony/security-http/Firewall/BasicAuthenticationListener.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', AnonymousAuthenticationListener::class); - -/** - * BasicAuthenticationListener implements Basic HTTP authentication. - * - * @author Fabien Potencier - * - * @final - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class BasicAuthenticationListener extends AbstractListener -{ - private $tokenStorage; - private $authenticationManager; - private $providerKey; - private $authenticationEntryPoint; - private $logger; - private $ignoreFailure; - private $sessionStrategy; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null) - { - if (empty($providerKey)) { - throw new \InvalidArgumentException('$providerKey must not be empty.'); - } - - $this->tokenStorage = $tokenStorage; - $this->authenticationManager = $authenticationManager; - $this->providerKey = $providerKey; - $this->authenticationEntryPoint = $authenticationEntryPoint; - $this->logger = $logger; - $this->ignoreFailure = false; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return null !== $request->headers->get('PHP_AUTH_USER'); - } - - /** - * Handles basic authentication. - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - if (null === $username = $request->headers->get('PHP_AUTH_USER')) { - return; - } - - if (null !== $token = $this->tokenStorage->getToken()) { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - if ($token instanceof UsernamePasswordToken && $token->isAuthenticated(false) && (method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()) === $username) { - return; - } - } - - if (null !== $this->logger) { - $this->logger->info('Basic authentication Authorization header found for user.', ['username' => $username]); - } - - try { - $token = $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $request->headers->get('PHP_AUTH_PW'), $this->providerKey)); - - $this->migrateSession($request, $token); - - $this->tokenStorage->setToken($token); - } catch (AuthenticationException $e) { - $token = $this->tokenStorage->getToken(); - if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getFirewallName()) { - $this->tokenStorage->setToken(null); - } - - if (null !== $this->logger) { - $this->logger->info('Basic authentication failed for user.', ['username' => $username, 'exception' => $e]); - } - - if ($this->ignoreFailure) { - return; - } - - $event->setResponse($this->authenticationEntryPoint->start($request, $e)); - } - } - - /** - * Call this method if your authentication token is stored to a session. - * - * @final - */ - public function setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy) - { - $this->sessionStrategy = $sessionStrategy; - } - - private function migrateSession(Request $request, TokenInterface $token) - { - if (!$this->sessionStrategy || !$request->hasSession() || !$request->hasPreviousSession()) { - return; - } - - $this->sessionStrategy->onAuthentication($request, $token); - } -} diff --git a/vendor/symfony/security-http/Firewall/ChannelListener.php b/vendor/symfony/security-http/Firewall/ChannelListener.php deleted file mode 100644 index f466cdc..0000000 --- a/vendor/symfony/security-http/Firewall/ChannelListener.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Http\AccessMapInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; - -/** - * ChannelListener switches the HTTP protocol based on the access control - * configuration. - * - * @author Fabien Potencier - * - * @final - */ -class ChannelListener extends AbstractListener -{ - private $map; - private $authenticationEntryPoint = null; - private $logger; - private $httpPort; - private $httpsPort; - - public function __construct(AccessMapInterface $map, /*LoggerInterface*/ $logger = null, /*int*/ $httpPort = 80, /*int*/ $httpsPort = 443) - { - if ($logger instanceof AuthenticationEntryPointInterface) { - trigger_deprecation('symfony/security-http', '5.4', 'The "$authenticationEntryPoint" argument of "%s()" is deprecated.', __METHOD__); - - $this->authenticationEntryPoint = $logger; - $nrOfArgs = \func_num_args(); - $logger = $nrOfArgs > 2 ? func_get_arg(2) : null; - $httpPort = $nrOfArgs > 3 ? func_get_arg(3) : 80; - $httpsPort = $nrOfArgs > 4 ? func_get_arg(4) : 443; - } - - if (null !== $logger && !$logger instanceof LoggerInterface) { - throw new \TypeError(sprintf('Argument "$logger" of "%s()" must be instance of "%s", "%s" given.', __METHOD__, LoggerInterface::class, get_debug_type($logger))); - } - - $this->map = $map; - $this->logger = $logger; - $this->httpPort = $httpPort; - $this->httpsPort = $httpsPort; - } - - /** - * Handles channel management. - */ - public function supports(Request $request): ?bool - { - [, $channel] = $this->map->getPatterns($request); - - if ('https' === $channel && !$request->isSecure()) { - if (null !== $this->logger) { - if ('https' === $request->headers->get('X-Forwarded-Proto')) { - $this->logger->info('Redirecting to HTTPS. ("X-Forwarded-Proto" header is set to "https" - did you set "trusted_proxies" correctly?)'); - } elseif (str_contains($request->headers->get('Forwarded', ''), 'proto=https')) { - $this->logger->info('Redirecting to HTTPS. ("Forwarded" header is set to "proto=https" - did you set "trusted_proxies" correctly?)'); - } else { - $this->logger->info('Redirecting to HTTPS.'); - } - } - - return true; - } - - if ('http' === $channel && $request->isSecure()) { - if (null !== $this->logger) { - $this->logger->info('Redirecting to HTTP.'); - } - - return true; - } - - return false; - } - - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - $event->setResponse($this->createRedirectResponse($request)); - } - - private function createRedirectResponse(Request $request): RedirectResponse - { - if (null !== $this->authenticationEntryPoint) { - return $this->authenticationEntryPoint->start($request); - } - - $scheme = $request->isSecure() ? 'http' : 'https'; - if ('http' === $scheme && 80 != $this->httpPort) { - $port = ':'.$this->httpPort; - } elseif ('https' === $scheme && 443 != $this->httpsPort) { - $port = ':'.$this->httpsPort; - } else { - $port = ''; - } - - $qs = $request->getQueryString(); - if (null !== $qs) { - $qs = '?'.$qs; - } - - $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$request->getPathInfo().$qs; - - return new RedirectResponse($url, 301); - } -} diff --git a/vendor/symfony/security-http/Firewall/ContextListener.php b/vendor/symfony/security-http/Firewall/ContextListener.php deleted file mode 100644 index e09af80..0000000 --- a/vendor/symfony/security-http/Firewall/ContextListener.php +++ /dev/null @@ -1,402 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; -use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\EquatableInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Event\DeauthenticatedEvent; -use Symfony\Component\Security\Http\Event\TokenDeauthenticatedEvent; -use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * ContextListener manages the SecurityContext persistence through a session. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - * - * @final - */ -class ContextListener extends AbstractListener -{ - private $tokenStorage; - private $sessionKey; - private $logger; - private $userProviders; - private $dispatcher; - private $registered; - private $trustResolver; - private $rememberMeServices; - private $sessionTrackerEnabler; - - /** - * @param iterable $userProviders - */ - public function __construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null, callable $sessionTrackerEnabler = null) - { - if (empty($contextKey)) { - throw new \InvalidArgumentException('$contextKey must not be empty.'); - } - - $this->tokenStorage = $tokenStorage; - $this->userProviders = $userProviders; - $this->sessionKey = '_security_'.$contextKey; - $this->logger = $logger; - $this->dispatcher = class_exists(Event::class) ? LegacyEventDispatcherProxy::decorate($dispatcher) : $dispatcher; - - $this->trustResolver = $trustResolver ?? new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class); - $this->sessionTrackerEnabler = $sessionTrackerEnabler; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return null; // always run authenticate() lazily with lazy firewalls - } - - /** - * Reads the Security Token from the session. - */ - public function authenticate(RequestEvent $event) - { - if (!$this->registered && null !== $this->dispatcher && $event->isMainRequest()) { - $this->dispatcher->addListener(KernelEvents::RESPONSE, [$this, 'onKernelResponse']); - $this->registered = true; - } - - $request = $event->getRequest(); - $session = $request->hasPreviousSession() && $request->hasSession() ? $request->getSession() : null; - - $request->attributes->set('_security_firewall_run', $this->sessionKey); - - if (null !== $session) { - $usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : 0; - $usageIndexReference = \PHP_INT_MIN; - $sessionId = $request->cookies->all()[$session->getName()] ?? null; - $token = $session->get($this->sessionKey); - - // sessionId = true is used in the tests - if ($this->sessionTrackerEnabler && \in_array($sessionId, [true, $session->getId()], true)) { - $usageIndexReference = $usageIndexValue; - } else { - $usageIndexReference = $usageIndexReference - \PHP_INT_MIN + $usageIndexValue; - } - } - - if (null === $session || null === $token) { - if ($this->sessionTrackerEnabler) { - ($this->sessionTrackerEnabler)(); - } - - $this->tokenStorage->setToken(null); - - return; - } - - $token = $this->safelyUnserialize($token); - - if (null !== $this->logger) { - $this->logger->debug('Read existing security token from the session.', [ - 'key' => $this->sessionKey, - 'token_class' => \is_object($token) ? \get_class($token) : null, - ]); - } - - if ($token instanceof TokenInterface) { - $originalToken = $token; - $token = $this->refreshUser($token); - - if (!$token) { - if ($this->logger) { - $this->logger->debug('Token was deauthenticated after trying to refresh it.'); - } - - if ($this->dispatcher) { - $this->dispatcher->dispatch(new TokenDeauthenticatedEvent($originalToken, $request)); - } - - if ($this->rememberMeServices) { - $this->rememberMeServices->loginFail($request); - } - } - } elseif (null !== $token) { - if (null !== $this->logger) { - $this->logger->warning('Expected a security token from the session, got something else.', ['key' => $this->sessionKey, 'received' => $token]); - } - - $token = null; - } - - if ($this->sessionTrackerEnabler) { - ($this->sessionTrackerEnabler)(); - } - - $this->tokenStorage->setToken($token); - } - - /** - * Writes the security token into the session. - */ - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - - if (!$request->hasSession() || $request->attributes->get('_security_firewall_run') !== $this->sessionKey) { - return; - } - - if ($this->dispatcher) { - $this->dispatcher->removeListener(KernelEvents::RESPONSE, [$this, 'onKernelResponse']); - } - $this->registered = false; - $session = $request->getSession(); - $sessionId = $session->getId(); - $usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : null; - $token = $this->tokenStorage->getToken(); - - // @deprecated always use isAuthenticated() in 6.0 - $notAuthenticated = method_exists($this->trustResolver, 'isAuthenticated') ? !$this->trustResolver->isAuthenticated($token) : (null === $token || $this->trustResolver->isAnonymous($token)); - if ($notAuthenticated) { - if ($request->hasPreviousSession()) { - $session->remove($this->sessionKey); - } - } else { - $session->set($this->sessionKey, serialize($token)); - - if (null !== $this->logger) { - $this->logger->debug('Stored the security token in the session.', ['key' => $this->sessionKey]); - } - } - - if ($this->sessionTrackerEnabler && $session->getId() === $sessionId) { - $usageIndexReference = $usageIndexValue; - } - } - - /** - * Refreshes the user by reloading it from the user provider. - * - * @throws \RuntimeException - */ - protected function refreshUser(TokenInterface $token): ?TokenInterface - { - $user = $token->getUser(); - if (!$user instanceof UserInterface) { - return $token; - } - - $userNotFoundByProvider = false; - $userDeauthenticated = false; - $userClass = \get_class($user); - - foreach ($this->userProviders as $provider) { - if (!$provider instanceof UserProviderInterface) { - throw new \InvalidArgumentException(sprintf('User provider "%s" must implement "%s".', get_debug_type($provider), UserProviderInterface::class)); - } - - if (!$provider->supportsClass($userClass)) { - continue; - } - - try { - $refreshedUser = $provider->refreshUser($user); - $newToken = clone $token; - $newToken->setUser($refreshedUser, false); - - // tokens can be deauthenticated if the user has been changed. - if ($token instanceof AbstractToken && $this->hasUserChanged($user, $newToken)) { - $userDeauthenticated = true; - // @deprecated since Symfony 5.4 - if (method_exists($newToken, 'setAuthenticated')) { - $newToken->setAuthenticated(false, false); - } - - if (null !== $this->logger) { - // @deprecated since Symfony 5.3, change to $refreshedUser->getUserIdentifier() in 6.0 - $this->logger->debug('Cannot refresh token because user has changed.', ['username' => method_exists($refreshedUser, 'getUserIdentifier') ? $refreshedUser->getUserIdentifier() : $refreshedUser->getUsername(), 'provider' => \get_class($provider)]); - } - - continue; - } - - $token->setUser($refreshedUser); - - if (null !== $this->logger) { - // @deprecated since Symfony 5.3, change to $refreshedUser->getUserIdentifier() in 6.0 - $context = ['provider' => \get_class($provider), 'username' => method_exists($refreshedUser, 'getUserIdentifier') ? $refreshedUser->getUserIdentifier() : $refreshedUser->getUsername()]; - - if ($token instanceof SwitchUserToken) { - $originalToken = $token->getOriginalToken(); - // @deprecated since Symfony 5.3, change to $originalToken->getUserIdentifier() in 6.0 - $context['impersonator_username'] = method_exists($originalToken, 'getUserIdentifier') ? $originalToken->getUserIdentifier() : $originalToken->getUsername(); - } - - $this->logger->debug('User was reloaded from a user provider.', $context); - } - - return $token; - } catch (UnsupportedUserException $e) { - // let's try the next user provider - } catch (UserNotFoundException $e) { - if (null !== $this->logger) { - $this->logger->warning('Username could not be found in the selected user provider.', ['username' => method_exists($e, 'getUserIdentifier') ? $e->getUserIdentifier() : $e->getUsername(), 'provider' => \get_class($provider)]); - } - - $userNotFoundByProvider = true; - } - } - - if ($userDeauthenticated) { - // @deprecated since Symfony 5.4 - if ($this->dispatcher) { - $this->dispatcher->dispatch(new DeauthenticatedEvent($token, $newToken, false), DeauthenticatedEvent::class); - } - - return null; - } - - if ($userNotFoundByProvider) { - return null; - } - - throw new \RuntimeException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $userClass)); - } - - private function safelyUnserialize(string $serializedToken) - { - $token = null; - $prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { - if (__FILE__ === $file) { - throw new \ErrorException($msg, 0x37313BC, $type, $file, $line); - } - - return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false; - }); - - try { - $token = unserialize($serializedToken); - } catch (\ErrorException $e) { - if (0x37313BC !== $e->getCode()) { - throw $e; - } - if ($this->logger) { - $this->logger->warning('Failed to unserialize the security token from the session.', ['key' => $this->sessionKey, 'received' => $serializedToken, 'exception' => $e]); - } - } finally { - restore_error_handler(); - ini_set('unserialize_callback_func', $prevUnserializeHandler); - } - - return $token; - } - - /** - * @param string|\Stringable|UserInterface $originalUser - */ - private static function hasUserChanged($originalUser, TokenInterface $refreshedToken): bool - { - $refreshedUser = $refreshedToken->getUser(); - - if ($originalUser instanceof UserInterface) { - if (!$refreshedUser instanceof UserInterface) { - return true; - } else { - // noop - } - } elseif ($refreshedUser instanceof UserInterface) { - return true; - } else { - return (string) $originalUser !== (string) $refreshedUser; - } - - if ($originalUser instanceof EquatableInterface) { - return !(bool) $originalUser->isEqualTo($refreshedUser); - } - - // @deprecated since Symfony 5.3, check for PasswordAuthenticatedUserInterface on both user objects before comparing passwords - if ($originalUser->getPassword() !== $refreshedUser->getPassword()) { - return true; - } - - // @deprecated since Symfony 5.3, check for LegacyPasswordAuthenticatedUserInterface on both user objects before comparing salts - if ($originalUser->getSalt() !== $refreshedUser->getSalt()) { - return true; - } - - $userRoles = array_map('strval', (array) $refreshedUser->getRoles()); - - if ($refreshedToken instanceof SwitchUserToken) { - $userRoles[] = 'ROLE_PREVIOUS_ADMIN'; - } - - if ( - \count($userRoles) !== \count($refreshedToken->getRoleNames()) || - \count($userRoles) !== \count(array_intersect($userRoles, $refreshedToken->getRoleNames())) - ) { - return true; - } - - // @deprecated since Symfony 5.3, drop getUsername() in 6.0 - $userIdentifier = function ($refreshedUser) { - return method_exists($refreshedUser, 'getUserIdentifier') ? $refreshedUser->getUserIdentifier() : $refreshedUser->getUsername(); - }; - if ($userIdentifier($originalUser) !== $userIdentifier($refreshedUser)) { - return true; - } - - return false; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - throw new \ErrorException('Class not found: '.$class, 0x37313BC); - } - - /** - * @deprecated since Symfony 5.4 - */ - public function setRememberMeServices(RememberMeServicesInterface $rememberMeServices) - { - trigger_deprecation('symfony/security-http', '5.4', 'Method "%s()" is deprecated, use the new remember me handlers instead.', __METHOD__); - - $this->rememberMeServices = $rememberMeServices; - } -} diff --git a/vendor/symfony/security-http/Firewall/ExceptionListener.php b/vendor/symfony/security-http/Firewall/ExceptionListener.php deleted file mode 100644 index 32a1b60..0000000 --- a/vendor/symfony/security-http/Firewall/ExceptionListener.php +++ /dev/null @@ -1,250 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\ExceptionEvent; -use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\Exception\AccountStatusException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException; -use Symfony\Component\Security\Core\Exception\LazyResponseException; -use Symfony\Component\Security\Core\Exception\LogoutException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\Authorization\AccessDeniedHandlerInterface; -use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; -use Symfony\Component\Security\Http\EntryPoint\Exception\NotAnEntryPointException; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\Util\TargetPathTrait; - -/** - * ExceptionListener catches authentication exception and converts them to - * Response instances. - * - * @author Fabien Potencier - * - * @final - */ -class ExceptionListener -{ - use TargetPathTrait; - - private $tokenStorage; - private $firewallName; - private $accessDeniedHandler; - private $authenticationEntryPoint; - private $authenticationTrustResolver; - private $errorPage; - private $logger; - private $httpUtils; - private $stateless; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, string $firewallName, AuthenticationEntryPointInterface $authenticationEntryPoint = null, string $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, bool $stateless = false) - { - $this->tokenStorage = $tokenStorage; - $this->accessDeniedHandler = $accessDeniedHandler; - $this->httpUtils = $httpUtils; - $this->firewallName = $firewallName; - $this->authenticationEntryPoint = $authenticationEntryPoint; - $this->authenticationTrustResolver = $trustResolver; - $this->errorPage = $errorPage; - $this->logger = $logger; - $this->stateless = $stateless; - } - - /** - * Registers a onKernelException listener to take care of security exceptions. - */ - public function register(EventDispatcherInterface $dispatcher) - { - $dispatcher->addListener(KernelEvents::EXCEPTION, [$this, 'onKernelException'], 1); - } - - /** - * Unregisters the dispatcher. - */ - public function unregister(EventDispatcherInterface $dispatcher) - { - $dispatcher->removeListener(KernelEvents::EXCEPTION, [$this, 'onKernelException']); - } - - /** - * Handles security related exceptions. - */ - public function onKernelException(ExceptionEvent $event) - { - $exception = $event->getThrowable(); - do { - if ($exception instanceof AuthenticationException) { - $this->handleAuthenticationException($event, $exception); - - return; - } - - if ($exception instanceof AccessDeniedException) { - $this->handleAccessDeniedException($event, $exception); - - return; - } - - if ($exception instanceof LazyResponseException) { - $event->setResponse($exception->getResponse()); - - return; - } - - if ($exception instanceof LogoutException) { - $this->handleLogoutException($event, $exception); - - return; - } - } while (null !== $exception = $exception->getPrevious()); - } - - private function handleAuthenticationException(ExceptionEvent $event, AuthenticationException $exception): void - { - if (null !== $this->logger) { - $this->logger->info('An AuthenticationException was thrown; redirecting to authentication entry point.', ['exception' => $exception]); - } - - try { - $event->setResponse($this->startAuthentication($event->getRequest(), $exception)); - $event->allowCustomResponseCode(); - } catch (\Exception $e) { - $event->setThrowable($e); - } - } - - private function handleAccessDeniedException(ExceptionEvent $event, AccessDeniedException $exception) - { - $event->setThrowable(new AccessDeniedHttpException($exception->getMessage(), $exception)); - - $token = $this->tokenStorage->getToken(); - if (!$this->authenticationTrustResolver->isFullFledged($token)) { - if (null !== $this->logger) { - $this->logger->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]); - } - - try { - $insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception); - if (null !== $token) { - $insufficientAuthenticationException->setToken($token); - } - - $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException)); - } catch (\Exception $e) { - $event->setThrowable($e); - } - - return; - } - - if (null !== $this->logger) { - $this->logger->debug('Access denied, the user is neither anonymous, nor remember-me.', ['exception' => $exception]); - } - - try { - if (null !== $this->accessDeniedHandler) { - $response = $this->accessDeniedHandler->handle($event->getRequest(), $exception); - - if ($response instanceof Response) { - $event->setResponse($response); - } - } elseif (null !== $this->errorPage) { - $subRequest = $this->httpUtils->createRequest($event->getRequest(), $this->errorPage); - $subRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $exception); - - $event->setResponse($event->getKernel()->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true)); - $event->allowCustomResponseCode(); - } - } catch (\Exception $e) { - if (null !== $this->logger) { - $this->logger->error('An exception was thrown when handling an AccessDeniedException.', ['exception' => $e]); - } - - $event->setThrowable(new \RuntimeException('Exception thrown when handling an exception.', 0, $e)); - } - } - - private function handleLogoutException(ExceptionEvent $event, LogoutException $exception): void - { - $event->setThrowable(new AccessDeniedHttpException($exception->getMessage(), $exception)); - - if (null !== $this->logger) { - $this->logger->info('A LogoutException was thrown; wrapping with AccessDeniedHttpException', ['exception' => $exception]); - } - } - - private function startAuthentication(Request $request, AuthenticationException $authException): Response - { - if (null === $this->authenticationEntryPoint) { - $this->throwUnauthorizedException($authException); - } - - if (null !== $this->logger) { - $this->logger->debug('Calling Authentication entry point.'); - } - - if (!$this->stateless) { - $this->setTargetPath($request); - } - - if ($authException instanceof AccountStatusException) { - // remove the security token to prevent infinite redirect loops - $this->tokenStorage->setToken(null); - - if (null !== $this->logger) { - $this->logger->info('The security token was removed due to an AccountStatusException.', ['exception' => $authException]); - } - } - - try { - $response = $this->authenticationEntryPoint->start($request, $authException); - } catch (NotAnEntryPointException $e) { - $this->throwUnauthorizedException($authException); - } - - if (!$response instanceof Response) { - $given = get_debug_type($response); - - throw new \LogicException(sprintf('The "%s::start()" method must return a Response object ("%s" returned).', get_debug_type($this->authenticationEntryPoint), $given)); - } - - return $response; - } - - protected function setTargetPath(Request $request) - { - // session isn't required when using HTTP basic authentication mechanism for example - if ($request->hasSession() && $request->isMethodSafe() && !$request->isXmlHttpRequest()) { - $this->saveTargetPath($request->getSession(), $this->firewallName, $request->getUri()); - } - } - - private function throwUnauthorizedException(AuthenticationException $authException) - { - if (null !== $this->logger) { - $this->logger->notice(sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall "%s" if you want to modify the response.', Response::HTTP_UNAUTHORIZED, $this->firewallName)); - } - - throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode()); - } -} diff --git a/vendor/symfony/security-http/Firewall/FirewallListenerInterface.php b/vendor/symfony/security-http/Firewall/FirewallListenerInterface.php deleted file mode 100644 index 485d767..0000000 --- a/vendor/symfony/security-http/Firewall/FirewallListenerInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; - -/** - * Can be implemented by firewall listeners. - * - * @author Christian Scheb - * @author Nicolas Grekas - * @author Robin Chalas - */ -interface FirewallListenerInterface -{ - /** - * Tells whether the authenticate() method should be called or not depending on the incoming request. - * - * Returning null means authenticate() can be called lazily when accessing the token storage. - */ - public function supports(Request $request): ?bool; - - /** - * Does whatever is required to authenticate the request, typically calling $event->setResponse() internally. - */ - public function authenticate(RequestEvent $event); - - /** - * Defines the priority of the listener. - * The higher the number, the earlier a listener is executed. - */ - public static function getPriority(): int; -} diff --git a/vendor/symfony/security-http/Firewall/LogoutListener.php b/vendor/symfony/security-http/Firewall/LogoutListener.php deleted file mode 100644 index 69af6d8..0000000 --- a/vendor/symfony/security-http/Firewall/LogoutListener.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\LogicException; -use Symfony\Component\Security\Core\Exception\LogoutException; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Security\Http\Event\LogoutEvent; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; -use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface; -use Symfony\Component\Security\Http\ParameterBagUtils; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * LogoutListener logout users. - * - * @author Fabien Potencier - * - * @final - */ -class LogoutListener extends AbstractListener -{ - private $tokenStorage; - private $options; - private $httpUtils; - private $csrfTokenManager; - private $eventDispatcher; - - /** - * @param EventDispatcherInterface $eventDispatcher - * @param array $options An array of options to process a logout attempt - */ - public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $httpUtils, $eventDispatcher, array $options = [], CsrfTokenManagerInterface $csrfTokenManager = null) - { - if (!$eventDispatcher instanceof EventDispatcherInterface) { - trigger_deprecation('symfony/security-http', '5.1', 'Passing a logout success handler to "%s" is deprecated, pass an instance of "%s" instead.', __METHOD__, EventDispatcherInterface::class); - - if (!$eventDispatcher instanceof LogoutSuccessHandlerInterface) { - throw new \TypeError(sprintf('Argument 3 of "%s" must be instance of "%s" or "%s", "%s" given.', __METHOD__, EventDispatcherInterface::class, LogoutSuccessHandlerInterface::class, get_debug_type($eventDispatcher))); - } - - $successHandler = $eventDispatcher; - $eventDispatcher = new EventDispatcher(); - $eventDispatcher->addListener(LogoutEvent::class, function (LogoutEvent $event) use ($successHandler) { - $event->setResponse($r = $successHandler->onLogoutSuccess($event->getRequest())); - }); - } - - $this->tokenStorage = $tokenStorage; - $this->httpUtils = $httpUtils; - $this->options = array_merge([ - 'csrf_parameter' => '_csrf_token', - 'csrf_token_id' => 'logout', - 'logout_path' => '/logout', - ], $options); - $this->csrfTokenManager = $csrfTokenManager; - $this->eventDispatcher = $eventDispatcher; - } - - /** - * @deprecated since Symfony 5.1 - */ - public function addHandler(LogoutHandlerInterface $handler) - { - trigger_deprecation('symfony/security-http', '5.1', 'Calling "%s" is deprecated, register a listener on the "%s" event instead.', __METHOD__, LogoutEvent::class); - - $this->eventDispatcher->addListener(LogoutEvent::class, function (LogoutEvent $event) use ($handler) { - if (null === $event->getResponse()) { - throw new LogicException(sprintf('No response was set for this logout action. Make sure the DefaultLogoutListener or another listener has set the response before "%s" is called.', __CLASS__)); - } - - $handler->logout($event->getRequest(), $event->getResponse(), $event->getToken()); - }); - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return $this->requiresLogout($request); - } - - /** - * Performs the logout if requested. - * - * If a CsrfTokenManagerInterface instance is available, it will be used to - * validate the request. - * - * @throws LogoutException if the CSRF token is invalid - * @throws \RuntimeException if the LogoutSuccessHandlerInterface instance does not return a response - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - if (null !== $this->csrfTokenManager) { - $csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); - - if (!\is_string($csrfToken) || false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) { - throw new LogoutException('Invalid CSRF token.'); - } - } - - $logoutEvent = new LogoutEvent($request, $this->tokenStorage->getToken()); - $this->eventDispatcher->dispatch($logoutEvent); - - $response = $logoutEvent->getResponse(); - if (!$response instanceof Response) { - throw new \RuntimeException('No logout listener set the Response, make sure at least the DefaultLogoutListener is registered.'); - } - - $this->tokenStorage->setToken(null); - - $event->setResponse($response); - } - - /** - * Whether this request is asking for logout. - * - * The default implementation only processed requests to a specific path, - * but a subclass could change this to logout requests where - * certain parameters is present. - */ - protected function requiresLogout(Request $request): bool - { - return isset($this->options['logout_path']) && $this->httpUtils->checkRequestPath($request, $this->options['logout_path']); - } - - public static function getPriority(): int - { - return -127; - } -} diff --git a/vendor/symfony/security-http/Firewall/RememberMeListener.php b/vendor/symfony/security-http/Firewall/RememberMeListener.php deleted file mode 100644 index fe59505..0000000 --- a/vendor/symfony/security-http/Firewall/RememberMeListener.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', RememberMeListener::class); - -/** - * RememberMeListener implements authentication capabilities via a cookie. - * - * @author Johannes M. Schmitt - * - * @final - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class RememberMeListener extends AbstractListener -{ - private $tokenStorage; - private $rememberMeServices; - private $authenticationManager; - private $logger; - private $dispatcher; - private $catchExceptions = true; - private $sessionStrategy; - - public function __construct(TokenStorageInterface $tokenStorage, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, bool $catchExceptions = true, SessionAuthenticationStrategyInterface $sessionStrategy = null) - { - $this->tokenStorage = $tokenStorage; - $this->rememberMeServices = $rememberMeServices; - $this->authenticationManager = $authenticationManager; - $this->logger = $logger; - $this->dispatcher = $dispatcher; - $this->catchExceptions = $catchExceptions; - $this->sessionStrategy = $sessionStrategy ?? new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE); - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - return null; // always run authenticate() lazily with lazy firewalls - } - - /** - * Handles remember-me cookie based authentication. - */ - public function authenticate(RequestEvent $event) - { - if (null !== $this->tokenStorage->getToken()) { - return; - } - - $request = $event->getRequest(); - try { - if (null === $token = $this->rememberMeServices->autoLogin($request)) { - return; - } - } catch (AuthenticationException $e) { - if (null !== $this->logger) { - $this->logger->warning( - 'The token storage was not populated with remember-me token as the' - .' RememberMeServices was not able to create a token from the remember' - .' me information.', ['exception' => $e] - ); - } - - $this->rememberMeServices->loginFail($request); - - if (!$this->catchExceptions) { - throw $e; - } - - return; - } - - try { - $token = $this->authenticationManager->authenticate($token); - if ($request->hasSession() && $request->getSession()->isStarted()) { - $this->sessionStrategy->onAuthentication($request, $token); - } - $this->tokenStorage->setToken($token); - - if (null !== $this->dispatcher) { - $loginEvent = new InteractiveLoginEvent($request, $token); - $this->dispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - - if (null !== $this->logger) { - $this->logger->debug('Populated the token storage with a remember-me token.'); - } - } catch (AuthenticationException $e) { - if (null !== $this->logger) { - $this->logger->warning( - 'The token storage was not populated with remember-me token as the' - .' AuthenticationManager rejected the AuthenticationToken returned' - .' by the RememberMeServices.', ['exception' => $e] - ); - } - - $this->rememberMeServices->loginFail($request, $e); - - if (!$this->catchExceptions) { - throw $e; - } - } - } -} diff --git a/vendor/symfony/security-http/Firewall/RemoteUserAuthenticationListener.php b/vendor/symfony/security-http/Firewall/RemoteUserAuthenticationListener.php deleted file mode 100644 index d4b0389..0000000 --- a/vendor/symfony/security-http/Firewall/RemoteUserAuthenticationListener.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', RemoteUserAuthenticationListener::class); - -/** - * REMOTE_USER authentication listener. - * - * @author Fabien Potencier - * @author Maxime Douailin - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class RemoteUserAuthenticationListener extends AbstractPreAuthenticatedListener -{ - private $userKey; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, string $userKey = 'REMOTE_USER', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) - { - parent::__construct($tokenStorage, $authenticationManager, $providerKey, $logger, $dispatcher); - - $this->userKey = $userKey; - } - - /** - * {@inheritdoc} - */ - protected function getPreAuthenticatedData(Request $request) - { - if (!$request->server->has($this->userKey)) { - throw new BadCredentialsException(sprintf('User key was not found: "%s".', $this->userKey)); - } - - return [$request->server->get($this->userKey), null]; - } -} diff --git a/vendor/symfony/security-http/Firewall/SwitchUserListener.php b/vendor/symfony/security-http/Firewall/SwitchUserListener.php deleted file mode 100644 index 250d9ef..0000000 --- a/vendor/symfony/security-http/Firewall/SwitchUserListener.php +++ /dev/null @@ -1,235 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface; -use Symfony\Component\Security\Core\Exception\AccessDeniedException; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserCheckerInterface; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Event\SwitchUserEvent; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -/** - * SwitchUserListener allows a user to impersonate another one temporarily - * (like the Unix su command). - * - * @author Fabien Potencier - * - * @final - */ -class SwitchUserListener extends AbstractListener -{ - public const EXIT_VALUE = '_exit'; - - private $tokenStorage; - private $provider; - private $userChecker; - private $firewallName; - private $accessDecisionManager; - private $usernameParameter; - private $role; - private $logger; - private $dispatcher; - private $stateless; - - public function __construct(TokenStorageInterface $tokenStorage, UserProviderInterface $provider, UserCheckerInterface $userChecker, string $firewallName, AccessDecisionManagerInterface $accessDecisionManager, LoggerInterface $logger = null, string $usernameParameter = '_switch_user', string $role = 'ROLE_ALLOWED_TO_SWITCH', EventDispatcherInterface $dispatcher = null, bool $stateless = false) - { - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - - $this->tokenStorage = $tokenStorage; - $this->provider = $provider; - $this->userChecker = $userChecker; - $this->firewallName = $firewallName; - $this->accessDecisionManager = $accessDecisionManager; - $this->usernameParameter = $usernameParameter; - $this->role = $role; - $this->logger = $logger; - $this->dispatcher = $dispatcher; - $this->stateless = $stateless; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request): ?bool - { - // usernames can be falsy - $username = $request->get($this->usernameParameter); - - if (null === $username || '' === $username) { - $username = $request->headers->get($this->usernameParameter); - } - - // if it's still "empty", nothing to do. - if (null === $username || '' === $username) { - return false; - } - - $request->attributes->set('_switch_user_username', $username); - - return true; - } - - /** - * Handles the switch to another user. - * - * @throws \LogicException if switching to a user failed - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - - $username = $request->attributes->get('_switch_user_username'); - $request->attributes->remove('_switch_user_username'); - - if (null === $this->tokenStorage->getToken()) { - throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); - } - - if (self::EXIT_VALUE === $username) { - $this->tokenStorage->setToken($this->attemptExitUser($request)); - } else { - try { - $this->tokenStorage->setToken($this->attemptSwitchUser($request, $username)); - } catch (AuthenticationException $e) { - // Generate 403 in any conditions to prevent user enumeration vulnerabilities - throw new AccessDeniedException('Switch User failed: '.$e->getMessage(), $e); - } - } - - if (!$this->stateless) { - $request->query->remove($this->usernameParameter); - $request->server->set('QUERY_STRING', http_build_query($request->query->all(), '', '&')); - $response = new RedirectResponse($request->getUri(), 302); - - $event->setResponse($response); - } - } - - /** - * Attempts to switch to another user and returns the new token if successfully switched. - * - * @throws \LogicException - * @throws AccessDeniedException - */ - private function attemptSwitchUser(Request $request, string $username): ?TokenInterface - { - $token = $this->tokenStorage->getToken(); - $originalToken = $this->getOriginalToken($token); - - if (null !== $originalToken) { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - if ((method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()) === $username) { - return $token; - } - - // User already switched, exit before seamlessly switching to another user - $token = $this->attemptExitUser($request); - } - - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - $currentUsername = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(); - $nonExistentUsername = '_'.md5(random_bytes(8).$username); - - // To protect against user enumeration via timing measurements - // we always load both successfully and unsuccessfully - $methodName = 'loadUserByIdentifier'; - if (!method_exists($this->provider, $methodName)) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->provider)); - - $methodName = 'loadUserByUsername'; - } - try { - $user = $this->provider->$methodName($username); - - try { - $this->provider->$methodName($nonExistentUsername); - } catch (\Exception $e) { - } - } catch (AuthenticationException $e) { - $this->provider->$methodName($currentUsername); - - throw $e; - } - - if (false === $this->accessDecisionManager->decide($token, [$this->role], $user)) { - $exception = new AccessDeniedException(); - $exception->setAttributes($this->role); - - throw $exception; - } - - if (null !== $this->logger) { - $this->logger->info('Attempting to switch to user.', ['username' => $username]); - } - - $this->userChecker->checkPostAuth($user); - - $roles = $user->getRoles(); - $roles[] = 'ROLE_PREVIOUS_ADMIN'; - $originatedFromUri = str_replace('/&', '/?', preg_replace('#[&?]'.$this->usernameParameter.'=[^&]*#', '', $request->getRequestUri())); - $token = new SwitchUserToken($user, $this->firewallName, $roles, $token, $originatedFromUri); - - if (null !== $this->dispatcher) { - $switchEvent = new SwitchUserEvent($request, $token->getUser(), $token); - $this->dispatcher->dispatch($switchEvent, SecurityEvents::SWITCH_USER); - // use the token from the event in case any listeners have replaced it. - $token = $switchEvent->getToken(); - } - - return $token; - } - - /** - * Attempts to exit from an already switched user and returns the original token. - * - * @throws AuthenticationCredentialsNotFoundException - */ - private function attemptExitUser(Request $request): TokenInterface - { - if (null === ($currentToken = $this->tokenStorage->getToken()) || null === $original = $this->getOriginalToken($currentToken)) { - throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.'); - } - - if (null !== $this->dispatcher && $original->getUser() instanceof UserInterface) { - $user = $this->provider->refreshUser($original->getUser()); - $original->setUser($user); - $switchEvent = new SwitchUserEvent($request, $user, $original); - $this->dispatcher->dispatch($switchEvent, SecurityEvents::SWITCH_USER); - $original = $switchEvent->getToken(); - } - - return $original; - } - - private function getOriginalToken(TokenInterface $token): ?TokenInterface - { - if ($token instanceof SwitchUserToken) { - return $token->getOriginalToken(); - } - - return null; - } -} diff --git a/vendor/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php b/vendor/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php deleted file mode 100644 index ad98464..0000000 --- a/vendor/symfony/security-http/Firewall/UsernamePasswordFormAuthenticationListener.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Csrf\CsrfToken; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\ParameterBagUtils; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', UsernamePasswordFormAuthenticationListener::class); - -/** - * UsernamePasswordFormAuthenticationListener is the default implementation of - * an authentication via a simple form composed of a username and a password. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationListener -{ - private $csrfTokenManager; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null) - { - parent::__construct($tokenStorage, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, array_merge([ - 'username_parameter' => '_username', - 'password_parameter' => '_password', - 'csrf_parameter' => '_csrf_token', - 'csrf_token_id' => 'authenticate', - 'post_only' => true, - ], $options), $logger, $dispatcher); - - $this->csrfTokenManager = $csrfTokenManager; - } - - /** - * {@inheritdoc} - */ - protected function requiresAuthentication(Request $request) - { - if ($this->options['post_only'] && !$request->isMethod('POST')) { - return false; - } - - return parent::requiresAuthentication($request); - } - - /** - * {@inheritdoc} - */ - protected function attemptAuthentication(Request $request) - { - if (null !== $this->csrfTokenManager) { - $csrfToken = ParameterBagUtils::getRequestParameterValue($request, $this->options['csrf_parameter']); - - if (!\is_string($csrfToken) || false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['csrf_token_id'], $csrfToken))) { - throw new InvalidCsrfTokenException('Invalid CSRF token.'); - } - } - - if ($this->options['post_only']) { - $username = ParameterBagUtils::getParameterBagValue($request->request, $this->options['username_parameter']); - $password = ParameterBagUtils::getParameterBagValue($request->request, $this->options['password_parameter']); - } else { - $username = ParameterBagUtils::getRequestParameterValue($request, $this->options['username_parameter']); - $password = ParameterBagUtils::getRequestParameterValue($request, $this->options['password_parameter']); - } - - if (!\is_string($username) && (!\is_object($username) || !method_exists($username, '__toString'))) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], get_debug_type($username))); - } - - $username = trim($username); - - if (\strlen($username) > Security::MAX_USERNAME_LENGTH) { - throw new BadCredentialsException('Invalid username.'); - } - - if (null === $password) { - throw new \LogicException(sprintf('The key "%s" cannot be null; check that the password field name of the form matches.', $this->options['password_parameter'])); - } - - $request->getSession()->set(Security::LAST_USERNAME, $username); - - return $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $password, $this->providerKey)); - } -} diff --git a/vendor/symfony/security-http/Firewall/UsernamePasswordJsonAuthenticationListener.php b/vendor/symfony/security-http/Firewall/UsernamePasswordJsonAuthenticationListener.php deleted file mode 100644 index 9679b33..0000000 --- a/vendor/symfony/security-http/Firewall/UsernamePasswordJsonAuthenticationListener.php +++ /dev/null @@ -1,235 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Component\Security\Core\Security; -use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface; -use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\HttpUtils; -use Symfony\Component\Security\Http\SecurityEvents; -use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', UsernamePasswordJsonAuthenticationListener::class); - -/** - * UsernamePasswordJsonAuthenticationListener is a stateless implementation of - * an authentication via a JSON document composed of a username and a password. - * - * @author Kévin Dunglas - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class UsernamePasswordJsonAuthenticationListener extends AbstractListener -{ - private $tokenStorage; - private $authenticationManager; - private $httpUtils; - private $providerKey; - private $successHandler; - private $failureHandler; - private $options; - private $logger; - private $eventDispatcher; - private $propertyAccessor; - private $sessionStrategy; - - /** - * @var TranslatorInterface|null - */ - private $translator; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, array $options = [], LoggerInterface $logger = null, EventDispatcherInterface $eventDispatcher = null, PropertyAccessorInterface $propertyAccessor = null) - { - $this->tokenStorage = $tokenStorage; - $this->authenticationManager = $authenticationManager; - $this->httpUtils = $httpUtils; - $this->providerKey = $providerKey; - $this->successHandler = $successHandler; - $this->failureHandler = $failureHandler; - $this->logger = $logger; - $this->eventDispatcher = $eventDispatcher; - $this->options = array_merge(['username_path' => 'username', 'password_path' => 'password'], $options); - $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); - } - - public function supports(Request $request): ?bool - { - if (!str_contains($request->getRequestFormat() ?? '', 'json') - && !str_contains($request->getContentType() ?? '', 'json') - ) { - return false; - } - - if (isset($this->options['check_path']) && !$this->httpUtils->checkRequestPath($request, $this->options['check_path'])) { - return false; - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestEvent $event) - { - $request = $event->getRequest(); - $data = json_decode($request->getContent()); - - try { - if (!$data instanceof \stdClass) { - throw new BadRequestHttpException('Invalid JSON.'); - } - - try { - $username = $this->propertyAccessor->getValue($data, $this->options['username_path']); - } catch (AccessException $e) { - throw new BadRequestHttpException(sprintf('The key "%s" must be provided.', $this->options['username_path']), $e); - } - - try { - $password = $this->propertyAccessor->getValue($data, $this->options['password_path']); - } catch (AccessException $e) { - throw new BadRequestHttpException(sprintf('The key "%s" must be provided.', $this->options['password_path']), $e); - } - - if (!\is_string($username)) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string.', $this->options['username_path'])); - } - - if (\strlen($username) > Security::MAX_USERNAME_LENGTH) { - throw new BadCredentialsException('Invalid username.'); - } - - if (!\is_string($password)) { - throw new BadRequestHttpException(sprintf('The key "%s" must be a string.', $this->options['password_path'])); - } - - $token = new UsernamePasswordToken($username, $password, $this->providerKey); - - $authenticatedToken = $this->authenticationManager->authenticate($token); - $response = $this->onSuccess($request, $authenticatedToken); - } catch (AuthenticationException $e) { - $response = $this->onFailure($request, $e); - } catch (BadRequestHttpException $e) { - $request->setRequestFormat('json'); - - throw $e; - } - - if (null === $response) { - return; - } - - $event->setResponse($response); - } - - private function onSuccess(Request $request, TokenInterface $token): ?Response - { - if (null !== $this->logger) { - // @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0 - $this->logger->info('User has been authenticated successfully.', ['username' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()]); - } - - $this->migrateSession($request, $token); - - $this->tokenStorage->setToken($token); - - if (null !== $this->eventDispatcher) { - $loginEvent = new InteractiveLoginEvent($request, $token); - $this->eventDispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN); - } - - if (!$this->successHandler) { - return null; // let the original request succeeds - } - - $response = $this->successHandler->onAuthenticationSuccess($request, $token); - - if (!$response instanceof Response) { - throw new \RuntimeException('Authentication Success Handler did not return a Response.'); - } - - return $response; - } - - private function onFailure(Request $request, AuthenticationException $failed): Response - { - if (null !== $this->logger) { - $this->logger->info('Authentication request failed.', ['exception' => $failed]); - } - - $token = $this->tokenStorage->getToken(); - if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getFirewallName()) { - $this->tokenStorage->setToken(null); - } - - if (!$this->failureHandler) { - if (null !== $this->translator) { - $errorMessage = $this->translator->trans($failed->getMessageKey(), $failed->getMessageData(), 'security'); - } else { - $errorMessage = strtr($failed->getMessageKey(), $failed->getMessageData()); - } - - return new JsonResponse(['error' => $errorMessage], 401); - } - - $response = $this->failureHandler->onAuthenticationFailure($request, $failed); - - if (!$response instanceof Response) { - throw new \RuntimeException('Authentication Failure Handler did not return a Response.'); - } - - return $response; - } - - /** - * Call this method if your authentication token is stored to a session. - * - * @final - */ - public function setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy) - { - $this->sessionStrategy = $sessionStrategy; - } - - public function setTranslator(TranslatorInterface $translator) - { - $this->translator = $translator; - } - - private function migrateSession(Request $request, TokenInterface $token) - { - if (!$this->sessionStrategy || !$request->hasSession() || !$request->hasPreviousSession()) { - return; - } - - $this->sessionStrategy->onAuthentication($request, $token); - } -} diff --git a/vendor/symfony/security-http/Firewall/X509AuthenticationListener.php b/vendor/symfony/security-http/Firewall/X509AuthenticationListener.php deleted file mode 100644 index 07a287e..0000000 --- a/vendor/symfony/security-http/Firewall/X509AuthenticationListener.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Firewall; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/security-http', '5.3', 'The "%s" class is deprecated, use the new authenticator system instead.', X509AuthenticationListener::class); - -/** - * X509 authentication listener. - * - * @author Fabien Potencier - * - * @deprecated since Symfony 5.3, use the new authenticator system instead - */ -class X509AuthenticationListener extends AbstractPreAuthenticatedListener -{ - private $userKey; - private $credentialKey; - - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, string $userKey = 'SSL_CLIENT_S_DN_Email', string $credentialKey = 'SSL_CLIENT_S_DN', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) - { - parent::__construct($tokenStorage, $authenticationManager, $providerKey, $logger, $dispatcher); - - $this->userKey = $userKey; - $this->credentialKey = $credentialKey; - } - - /** - * {@inheritdoc} - */ - protected function getPreAuthenticatedData(Request $request) - { - $user = null; - if ($request->server->has($this->userKey)) { - $user = $request->server->get($this->userKey); - } elseif ( - $request->server->has($this->credentialKey) - && preg_match('#emailAddress=([^,/@]++@[^,/]++)#', $request->server->get($this->credentialKey), $matches) - ) { - $user = $matches[1]; - } - - if (null === $user) { - throw new BadCredentialsException(sprintf('SSL credentials not found: "%s", "%s".', $this->userKey, $this->credentialKey)); - } - - return [$user, $request->server->get($this->credentialKey, '')]; - } -} diff --git a/vendor/symfony/security-http/FirewallMap.php b/vendor/symfony/security-http/FirewallMap.php deleted file mode 100644 index cc9d853..0000000 --- a/vendor/symfony/security-http/FirewallMap.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestMatcherInterface; -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\LogoutListener; - -/** - * FirewallMap allows configuration of different firewalls for specific parts - * of the website. - * - * @author Fabien Potencier - */ -class FirewallMap implements FirewallMapInterface -{ - /** - * @var list, ExceptionListener|null, LogoutListener|null}> - */ - private $map = []; - - /** - * @param list $listeners - */ - public function add(RequestMatcherInterface $requestMatcher = null, array $listeners = [], ExceptionListener $exceptionListener = null, LogoutListener $logoutListener = null) - { - $this->map[] = [$requestMatcher, $listeners, $exceptionListener, $logoutListener]; - } - - /** - * {@inheritdoc} - */ - public function getListeners(Request $request) - { - foreach ($this->map as $elements) { - if (null === $elements[0] || $elements[0]->matches($request)) { - return [$elements[1], $elements[2], $elements[3]]; - } - } - - return [[], null, null]; - } -} diff --git a/vendor/symfony/security-http/FirewallMapInterface.php b/vendor/symfony/security-http/FirewallMapInterface.php deleted file mode 100644 index 480ea8a..0000000 --- a/vendor/symfony/security-http/FirewallMapInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Http\Firewall\ExceptionListener; -use Symfony\Component\Security\Http\Firewall\LogoutListener; - -/** - * This interface must be implemented by firewall maps. - * - * @author Johannes M. Schmitt - */ -interface FirewallMapInterface -{ - /** - * Returns the authentication listeners, and the exception listener to use - * for the given request. - * - * If there are no authentication listeners, the first inner array must be - * empty. - * - * If there is no exception listener, the second element of the outer array - * must be null. - * - * If there is no logout listener, the third element of the outer array - * must be null. - * - * @return array{iterable, ExceptionListener, LogoutListener} - */ - public function getListeners(Request $request); -} diff --git a/vendor/symfony/security-http/HttpUtils.php b/vendor/symfony/security-http/HttpUtils.php deleted file mode 100644 index 6a1cb94..0000000 --- a/vendor/symfony/security-http/HttpUtils.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Security\Core\Security; - -/** - * Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs. - * - * @author Fabien Potencier - */ -class HttpUtils -{ - private $urlGenerator; - private $urlMatcher; - private $domainRegexp; - private $secureDomainRegexp; - - /** - * @param UrlMatcherInterface|RequestMatcherInterface $urlMatcher The URL or Request matcher - * @param string|null $domainRegexp A regexp the target of HTTP redirections must match, scheme included - * @param string|null $secureDomainRegexp A regexp the target of HTTP redirections must match when the scheme is "https" - * - * @throws \InvalidArgumentException - */ - public function __construct(UrlGeneratorInterface $urlGenerator = null, $urlMatcher = null, string $domainRegexp = null, string $secureDomainRegexp = null) - { - $this->urlGenerator = $urlGenerator; - if (null !== $urlMatcher && !$urlMatcher instanceof UrlMatcherInterface && !$urlMatcher instanceof RequestMatcherInterface) { - throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); - } - $this->urlMatcher = $urlMatcher; - $this->domainRegexp = $domainRegexp; - $this->secureDomainRegexp = $secureDomainRegexp; - } - - /** - * Creates a redirect Response. - * - * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) - * @param int $status The status code - * - * @return RedirectResponse - */ - public function createRedirectResponse(Request $request, string $path, int $status = 302) - { - if (null !== $this->secureDomainRegexp && 'https' === $this->urlMatcher->getContext()->getScheme() && preg_match('#^https?:[/\\\\]{2,}+[^/]++#i', $path, $host) && !preg_match(sprintf($this->secureDomainRegexp, preg_quote($request->getHttpHost())), $host[0])) { - $path = '/'; - } - if (null !== $this->domainRegexp && preg_match('#^https?:[/\\\\]{2,}+[^/]++#i', $path, $host) && !preg_match(sprintf($this->domainRegexp, preg_quote($request->getHttpHost())), $host[0])) { - $path = '/'; - } - - return new RedirectResponse($this->generateUri($request, $path), $status); - } - - /** - * Creates a Request. - * - * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) - * - * @return Request - */ - public function createRequest(Request $request, string $path) - { - $newRequest = Request::create($this->generateUri($request, $path), 'get', [], $request->cookies->all(), [], $request->server->all()); - - static $setSession; - - if (null === $setSession) { - $setSession = \Closure::bind(static function ($newRequest, $request) { $newRequest->session = $request->session; }, null, Request::class); - } - $setSession($newRequest, $request); - - if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { - $newRequest->attributes->set(Security::AUTHENTICATION_ERROR, $request->attributes->get(Security::AUTHENTICATION_ERROR)); - } - if ($request->attributes->has(Security::ACCESS_DENIED_ERROR)) { - $newRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $request->attributes->get(Security::ACCESS_DENIED_ERROR)); - } - if ($request->attributes->has(Security::LAST_USERNAME)) { - $newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME)); - } - - if ($request->get('_format')) { - $newRequest->attributes->set('_format', $request->get('_format')); - } - if ($request->getDefaultLocale() !== $request->getLocale()) { - $newRequest->setLocale($request->getLocale()); - } - - return $newRequest; - } - - /** - * Checks that a given path matches the Request. - * - * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) - * - * @return bool true if the path is the same as the one from the Request, false otherwise - */ - public function checkRequestPath(Request $request, string $path) - { - if ('/' !== $path[0]) { - try { - // matching a request is more powerful than matching a URL path + context, so try that first - if ($this->urlMatcher instanceof RequestMatcherInterface) { - $parameters = $this->urlMatcher->matchRequest($request); - } else { - $parameters = $this->urlMatcher->match($request->getPathInfo()); - } - - return isset($parameters['_route']) && $path === $parameters['_route']; - } catch (MethodNotAllowedException $e) { - return false; - } catch (ResourceNotFoundException $e) { - return false; - } - } - - return $path === rawurldecode($request->getPathInfo()); - } - - /** - * Generates a URI, based on the given path or absolute URL. - * - * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) - * - * @return string - * - * @throws \LogicException - */ - public function generateUri(Request $request, string $path) - { - if (str_starts_with($path, 'http') || !$path) { - return $path; - } - - if ('/' === $path[0]) { - return $request->getUriForPath($path); - } - - if (null === $this->urlGenerator) { - throw new \LogicException('You must provide a UrlGeneratorInterface instance to be able to use routes.'); - } - - $url = $this->urlGenerator->generate($path, $request->attributes->all(), UrlGeneratorInterface::ABSOLUTE_URL); - - // unnecessary query string parameters must be removed from URL - // (ie. query parameters that are presents in $attributes) - // fortunately, they all are, so we have to remove entire query string - $position = strpos($url, '?'); - if (false !== $position) { - $fragment = parse_url($url, \PHP_URL_FRAGMENT); - $url = substr($url, 0, $position); - // fragment must be preserved - if ($fragment) { - $url .= "#$fragment"; - } - } - - return $url; - } -} diff --git a/vendor/symfony/security-http/Impersonate/ImpersonateUrlGenerator.php b/vendor/symfony/security-http/Impersonate/ImpersonateUrlGenerator.php deleted file mode 100644 index b560e55..0000000 --- a/vendor/symfony/security-http/Impersonate/ImpersonateUrlGenerator.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Impersonate; - -use Symfony\Bundle\SecurityBundle\Security\FirewallMap; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken; -use Symfony\Component\Security\Http\Firewall\SwitchUserListener; - -/** - * Provides generator functions for the impersonate url exit. - * - * @author Amrouche Hamza - * @author Damien Fayet - */ -class ImpersonateUrlGenerator -{ - private $requestStack; - private $tokenStorage; - private $firewallMap; - - public function __construct(RequestStack $requestStack, FirewallMap $firewallMap, TokenStorageInterface $tokenStorage) - { - $this->requestStack = $requestStack; - $this->tokenStorage = $tokenStorage; - $this->firewallMap = $firewallMap; - } - - public function generateExitPath(string $targetUri = null): string - { - return $this->buildExitPath($targetUri); - } - - public function generateExitUrl(string $targetUri = null): string - { - if (null === $request = $this->requestStack->getCurrentRequest()) { - return ''; - } - - return $request->getUriForPath($this->buildExitPath($targetUri)); - } - - private function isImpersonatedUser(): bool - { - return $this->tokenStorage->getToken() instanceof SwitchUserToken; - } - - private function buildExitPath(string $targetUri = null): string - { - if (null === ($request = $this->requestStack->getCurrentRequest()) || !$this->isImpersonatedUser()) { - return ''; - } - - if (null === $switchUserConfig = $this->firewallMap->getFirewallConfig($request)->getSwitchUser()) { - throw new \LogicException('Unable to generate the impersonate exit URL without a firewall configured for the user switch.'); - } - - if (null === $targetUri) { - $targetUri = $request->getRequestUri(); - } - - $targetUri .= (parse_url($targetUri, \PHP_URL_QUERY) ? '&' : '?').http_build_query([$switchUserConfig['parameter'] => SwitchUserListener::EXIT_VALUE], '', '&'); - - return $targetUri; - } -} diff --git a/vendor/symfony/security-http/LICENSE b/vendor/symfony/security-http/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/security-http/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/security-http/LoginLink/Exception/ExpiredLoginLinkException.php b/vendor/symfony/security-http/LoginLink/Exception/ExpiredLoginLinkException.php deleted file mode 100644 index 7971ddb..0000000 --- a/vendor/symfony/security-http/LoginLink/Exception/ExpiredLoginLinkException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink\Exception; - -use Symfony\Component\Security\Core\Signature\Exception\ExpiredSignatureException; - -/** - * @author Ryan Weaver - */ -class ExpiredLoginLinkException extends ExpiredSignatureException implements InvalidLoginLinkExceptionInterface -{ -} diff --git a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php b/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php deleted file mode 100644 index a4f64ba..0000000 --- a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkAuthenticationException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink\Exception; - -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * Thrown when a login link is invalid. - * - * @author Ryan Weaver - */ -class InvalidLoginLinkAuthenticationException extends AuthenticationException -{ - /** - * {@inheritdoc} - */ - public function getMessageKey() - { - return 'Invalid or expired login link.'; - } -} diff --git a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkException.php b/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkException.php deleted file mode 100644 index 5683c18..0000000 --- a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink\Exception; - -/** - * @author Ryan Weaver - */ -class InvalidLoginLinkException extends \RuntimeException implements InvalidLoginLinkExceptionInterface -{ -} diff --git a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkExceptionInterface.php b/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkExceptionInterface.php deleted file mode 100644 index e32e8dc..0000000 --- a/vendor/symfony/security-http/LoginLink/Exception/InvalidLoginLinkExceptionInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink\Exception; - -/** - * @author Ryan Weaver - */ -interface InvalidLoginLinkExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/security-http/LoginLink/LoginLinkDetails.php b/vendor/symfony/security-http/LoginLink/LoginLinkDetails.php deleted file mode 100644 index 9057a09..0000000 --- a/vendor/symfony/security-http/LoginLink/LoginLinkDetails.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink; - -/** - * @author Ryan Weaver - */ -class LoginLinkDetails -{ - private $url; - private $expiresAt; - - public function __construct(string $url, \DateTimeImmutable $expiresAt) - { - $this->url = $url; - $this->expiresAt = $expiresAt; - } - - public function getUrl(): string - { - return $this->url; - } - - public function getExpiresAt(): \DateTimeImmutable - { - return $this->expiresAt; - } - - public function __toString() - { - return $this->url; - } -} diff --git a/vendor/symfony/security-http/LoginLink/LoginLinkHandler.php b/vendor/symfony/security-http/LoginLink/LoginLinkHandler.php deleted file mode 100644 index b55e8aa..0000000 --- a/vendor/symfony/security-http/LoginLink/LoginLinkHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\Signature\Exception\ExpiredSignatureException; -use Symfony\Component\Security\Core\Signature\Exception\InvalidSignatureException; -use Symfony\Component\Security\Core\Signature\SignatureHasher; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\LoginLink\Exception\ExpiredLoginLinkException; -use Symfony\Component\Security\Http\LoginLink\Exception\InvalidLoginLinkException; - -/** - * @author Ryan Weaver - */ -final class LoginLinkHandler implements LoginLinkHandlerInterface -{ - private $urlGenerator; - private $userProvider; - private $options; - private $signatureHashUtil; - - public function __construct(UrlGeneratorInterface $urlGenerator, UserProviderInterface $userProvider, SignatureHasher $signatureHashUtil, array $options) - { - $this->urlGenerator = $urlGenerator; - $this->userProvider = $userProvider; - $this->signatureHashUtil = $signatureHashUtil; - $this->options = array_merge([ - 'route_name' => null, - 'lifetime' => 600, - ], $options); - } - - public function createLoginLink(UserInterface $user, Request $request = null): LoginLinkDetails - { - $expires = time() + $this->options['lifetime']; - $expiresAt = new \DateTimeImmutable('@'.$expires); - - $parameters = [ - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - 'user' => method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), - 'expires' => $expires, - 'hash' => $this->signatureHashUtil->computeSignatureHash($user, $expires), - ]; - - if ($request) { - $currentRequestContext = $this->urlGenerator->getContext(); - $this->urlGenerator->setContext( - (new RequestContext()) - ->fromRequest($request) - ->setParameter('_locale', $request->getLocale()) - ); - } - - try { - $url = $this->urlGenerator->generate( - $this->options['route_name'], - $parameters, - UrlGeneratorInterface::ABSOLUTE_URL - ); - } finally { - if ($request) { - $this->urlGenerator->setContext($currentRequestContext); - } - } - - return new LoginLinkDetails($url, $expiresAt); - } - - public function consumeLoginLink(Request $request): UserInterface - { - $userIdentifier = $request->get('user'); - - try { - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($this->userProvider, 'loadUserByIdentifier')) { - $user = $this->userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $user = $this->userProvider->loadUserByUsername($userIdentifier); - } - } catch (UserNotFoundException $exception) { - throw new InvalidLoginLinkException('User not found.', 0, $exception); - } - - $hash = $request->get('hash'); - $expires = $request->get('expires'); - - try { - $this->signatureHashUtil->verifySignatureHash($user, $expires, $hash); - } catch (ExpiredSignatureException $e) { - throw new ExpiredLoginLinkException(ucfirst(str_ireplace('signature', 'login link', $e->getMessage())), 0, $e); - } catch (InvalidSignatureException $e) { - throw new InvalidLoginLinkException(ucfirst(str_ireplace('signature', 'login link', $e->getMessage())), 0, $e); - } - - return $user; - } -} diff --git a/vendor/symfony/security-http/LoginLink/LoginLinkHandlerInterface.php b/vendor/symfony/security-http/LoginLink/LoginLinkHandlerInterface.php deleted file mode 100644 index b0ee6ef..0000000 --- a/vendor/symfony/security-http/LoginLink/LoginLinkHandlerInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * A class that is able to create and handle "magic" login links. - * - * @author Ryan Weaver - */ -interface LoginLinkHandlerInterface -{ - /** - * Generate a link that can be used to authenticate as the given user. - */ - public function createLoginLink(UserInterface $user, Request $request = null): LoginLinkDetails; - - /** - * Validates if this request contains a login link and returns the associated User. - * - * Throw InvalidLoginLinkExceptionInterface if the link is invalid. - */ - public function consumeLoginLink(Request $request): UserInterface; -} diff --git a/vendor/symfony/security-http/LoginLink/LoginLinkNotification.php b/vendor/symfony/security-http/LoginLink/LoginLinkNotification.php deleted file mode 100644 index 85cdd79..0000000 --- a/vendor/symfony/security-http/LoginLink/LoginLinkNotification.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\LoginLink; - -use Symfony\Bridge\Twig\Mime\NotificationEmail; -use Symfony\Component\Notifier\Message\EmailMessage; -use Symfony\Component\Notifier\Message\SmsMessage; -use Symfony\Component\Notifier\Notification\EmailNotificationInterface; -use Symfony\Component\Notifier\Notification\Notification; -use Symfony\Component\Notifier\Notification\SmsNotificationInterface; -use Symfony\Component\Notifier\Recipient\EmailRecipientInterface; -use Symfony\Component\Notifier\Recipient\SmsRecipientInterface; - -/** - * Use this notification to ease sending login link - * emails/SMS using the Notifier component. - * - * @author Wouter de Jong - */ -class LoginLinkNotification extends Notification implements EmailNotificationInterface, SmsNotificationInterface -{ - private $loginLinkDetails; - - public function __construct(LoginLinkDetails $loginLinkDetails, string $subject, array $channels = []) - { - parent::__construct($subject, $channels); - - $this->loginLinkDetails = $loginLinkDetails; - } - - public function asEmailMessage(EmailRecipientInterface $recipient, string $transport = null): ?EmailMessage - { - if (!class_exists(NotificationEmail::class)) { - throw new \LogicException(sprintf('The "%s" method requires "symfony/twig-bridge:>4.4".', __METHOD__)); - } - - $email = NotificationEmail::asPublicEmail() - ->to($recipient->getEmail()) - ->subject($this->getSubject()) - ->content($this->getContent() ?: $this->getDefaultContent('button below')) - ->action('Sign in', $this->loginLinkDetails->getUrl()) - ; - - return new EmailMessage($email); - } - - public function asSmsMessage(SmsRecipientInterface $recipient, string $transport = null): ?SmsMessage - { - return new SmsMessage($recipient->getPhone(), $this->getDefaultContent('link').' '.$this->loginLinkDetails->getUrl()); - } - - private function getDefaultContent(string $target): string - { - $duration = $this->loginLinkDetails->getExpiresAt()->getTimestamp() - time(); - $durationString = floor($duration / 60).' minute'.($duration > 60 ? 's' : ''); - if (($hours = $duration / 3600) >= 1) { - $durationString = floor($hours).' hour'.($hours >= 2 ? 's' : ''); - } - - return sprintf('Click on the %s to confirm you want to sign in. This link will expire in %s.', $target, $durationString); - } -} diff --git a/vendor/symfony/security-http/Logout/CookieClearingLogoutHandler.php b/vendor/symfony/security-http/Logout/CookieClearingLogoutHandler.php deleted file mode 100644 index 2adb5b3..0000000 --- a/vendor/symfony/security-http/Logout/CookieClearingLogoutHandler.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Http\EventListener\CookieClearingLogoutListener; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', CookieClearingLogoutHandler::class, CookieClearingLogoutListener::class); - -/** - * This handler clears the passed cookies when a user logs out. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.4, use {@link CookieClearingLogoutListener} instead - */ -class CookieClearingLogoutHandler implements LogoutHandlerInterface -{ - private $cookies; - - /** - * @param array $cookies An array of cookie names to unset - */ - public function __construct(array $cookies) - { - $this->cookies = $cookies; - } - - /** - * Implementation for the LogoutHandlerInterface. Deletes all requested cookies. - */ - public function logout(Request $request, Response $response, TokenInterface $token) - { - foreach ($this->cookies as $cookieName => $cookieData) { - $response->headers->clearCookie($cookieName, $cookieData['path'], $cookieData['domain'], $cookieData['secure'] ?? false, true, $cookieData['samesite'] ?? null); - } - } -} diff --git a/vendor/symfony/security-http/Logout/CsrfTokenClearingLogoutHandler.php b/vendor/symfony/security-http/Logout/CsrfTokenClearingLogoutHandler.php deleted file mode 100644 index 2678da7..0000000 --- a/vendor/symfony/security-http/Logout/CsrfTokenClearingLogoutHandler.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Csrf\TokenStorage\ClearableTokenStorageInterface; -use Symfony\Component\Security\Http\EventListener\CsrfTokenClearingLogoutListener; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', CsrfTokenClearingLogoutHandler::class, CsrfTokenClearingLogoutListener::class); - -/** - * @author Christian Flothmann - * - * @deprecated since Symfony 5.4, use {@link CsrfTokenClearingLogoutListener} instead - */ -class CsrfTokenClearingLogoutHandler implements LogoutHandlerInterface -{ - private $csrfTokenStorage; - - public function __construct(ClearableTokenStorageInterface $csrfTokenStorage) - { - $this->csrfTokenStorage = $csrfTokenStorage; - } - - public function logout(Request $request, Response $response, TokenInterface $token) - { - $this->csrfTokenStorage->clear(); - } -} diff --git a/vendor/symfony/security-http/Logout/DefaultLogoutSuccessHandler.php b/vendor/symfony/security-http/Logout/DefaultLogoutSuccessHandler.php deleted file mode 100644 index dbf30ce..0000000 --- a/vendor/symfony/security-http/Logout/DefaultLogoutSuccessHandler.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Http\EventListener\DefaultLogoutListener; -use Symfony\Component\Security\Http\HttpUtils; - -trigger_deprecation('symfony/security-http', '5.1', 'The "%s" class is deprecated, use "%s" instead.', DefaultLogoutSuccessHandler::class, DefaultLogoutListener::class); - -/** - * Default logout success handler will redirect users to a configured path. - * - * @author Fabien Potencier - * @author Alexander - * - * @deprecated since Symfony 5.1 - */ -class DefaultLogoutSuccessHandler implements LogoutSuccessHandlerInterface -{ - protected $httpUtils; - protected $targetUrl; - - public function __construct(HttpUtils $httpUtils, string $targetUrl = '/') - { - $this->httpUtils = $httpUtils; - $this->targetUrl = $targetUrl; - } - - /** - * {@inheritdoc} - */ - public function onLogoutSuccess(Request $request) - { - return $this->httpUtils->createRedirectResponse($request, $this->targetUrl); - } -} diff --git a/vendor/symfony/security-http/Logout/LogoutHandlerInterface.php b/vendor/symfony/security-http/Logout/LogoutHandlerInterface.php deleted file mode 100644 index 4c19b45..0000000 --- a/vendor/symfony/security-http/Logout/LogoutHandlerInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * Interface that needs to be implemented by LogoutHandlers. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.1 - */ -interface LogoutHandlerInterface -{ - /** - * This method is called by the LogoutListener when a user has requested - * to be logged out. Usually, you would unset session variables, or remove - * cookies, etc. - */ - public function logout(Request $request, Response $response, TokenInterface $token); -} diff --git a/vendor/symfony/security-http/Logout/LogoutSuccessHandlerInterface.php b/vendor/symfony/security-http/Logout/LogoutSuccessHandlerInterface.php deleted file mode 100644 index 90d9605..0000000 --- a/vendor/symfony/security-http/Logout/LogoutSuccessHandlerInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Http\Event\LogoutEvent; - -trigger_deprecation('symfony/security-http', '5.1', 'The "%s" interface is deprecated, create a listener for the "%s" event instead.', LogoutSuccessHandlerInterface::class, LogoutEvent::class); - -/** - * LogoutSuccesshandlerInterface. - * - * In contrast to the LogoutHandlerInterface, this interface can return a response - * which is then used instead of the default behavior. - * - * If you want to only perform some logout related clean-up task, use the - * LogoutHandlerInterface instead. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.1 - */ -interface LogoutSuccessHandlerInterface -{ - /** - * Creates a Response object to send upon a successful logout. - * - * @return Response - */ - public function onLogoutSuccess(Request $request); -} diff --git a/vendor/symfony/security-http/Logout/LogoutUrlGenerator.php b/vendor/symfony/security-http/Logout/LogoutUrlGenerator.php deleted file mode 100644 index 296f60c..0000000 --- a/vendor/symfony/security-http/Logout/LogoutUrlGenerator.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; - -/** - * Provides generator functions for the logout URL. - * - * @author Fabien Potencier - * @author Jeremy Mikola - */ -class LogoutUrlGenerator -{ - private $requestStack; - private $router; - private $tokenStorage; - private $listeners = []; - /** @var string|null */ - private $currentFirewallName; - /** @var string|null */ - private $currentFirewallContext; - - public function __construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) - { - $this->requestStack = $requestStack; - $this->router = $router; - $this->tokenStorage = $tokenStorage; - } - - /** - * Registers a firewall's LogoutListener, allowing its URL to be generated. - * - * @param string $key The firewall key - * @param string $logoutPath The path that starts the logout process - * @param string|null $csrfTokenId The ID of the CSRF token - * @param string|null $csrfParameter The CSRF token parameter name - * @param string|null $context The listener context - */ - public function registerListener(string $key, string $logoutPath, ?string $csrfTokenId, ?string $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null, string $context = null) - { - $this->listeners[$key] = [$logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager, $context]; - } - - /** - * Generates the absolute logout path for the firewall. - * - * @return string - */ - public function getLogoutPath(string $key = null) - { - return $this->generateLogoutUrl($key, UrlGeneratorInterface::ABSOLUTE_PATH); - } - - /** - * Generates the absolute logout URL for the firewall. - * - * @return string - */ - public function getLogoutUrl(string $key = null) - { - return $this->generateLogoutUrl($key, UrlGeneratorInterface::ABSOLUTE_URL); - } - - public function setCurrentFirewall(?string $key, string $context = null) - { - $this->currentFirewallName = $key; - $this->currentFirewallContext = $context; - } - - /** - * Generates the logout URL for the firewall. - */ - private function generateLogoutUrl(?string $key, int $referenceType): string - { - [$logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager] = $this->getListener($key); - - if (null === $logoutPath) { - throw new \LogicException('Unable to generate the logout URL without a path.'); - } - - $parameters = null !== $csrfTokenManager ? [$csrfParameter => (string) $csrfTokenManager->getToken($csrfTokenId)] : []; - - if ('/' === $logoutPath[0]) { - if (!$this->requestStack) { - throw new \LogicException('Unable to generate the logout URL without a RequestStack.'); - } - - $request = $this->requestStack->getCurrentRequest(); - - $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath; - - if (!empty($parameters)) { - $url .= '?'.http_build_query($parameters, '', '&'); - } - } else { - if (!$this->router) { - throw new \LogicException('Unable to generate the logout URL without a Router.'); - } - - $url = $this->router->generate($logoutPath, $parameters, $referenceType); - } - - return $url; - } - - /** - * @throws \InvalidArgumentException if no LogoutListener is registered for the key or could not be found automatically - */ - private function getListener(?string $key): array - { - if (null !== $key) { - if (isset($this->listeners[$key])) { - return $this->listeners[$key]; - } - - throw new \InvalidArgumentException(sprintf('No LogoutListener found for firewall key "%s".', $key)); - } - - // Fetch the current provider key from token, if possible - if (null !== $this->tokenStorage) { - $token = $this->tokenStorage->getToken(); - - // @deprecated since Symfony 5.4 - if ($token instanceof AnonymousToken) { - throw new \InvalidArgumentException('Unable to generate a logout url for an anonymous token.'); - } - - if (null !== $token) { - if (method_exists($token, 'getFirewallName')) { - $key = $token->getFirewallName(); - } elseif (method_exists($token, 'getProviderKey')) { - trigger_deprecation('symfony/security-http', '5.2', 'Method "%s::getProviderKey()" has been deprecated, rename it to "getFirewallName()" instead.', \get_class($token)); - - $key = $token->getProviderKey(); - } - - if (isset($this->listeners[$key])) { - return $this->listeners[$key]; - } - } - } - - // Fetch from injected current firewall information, if possible - if (isset($this->listeners[$this->currentFirewallName])) { - return $this->listeners[$this->currentFirewallName]; - } - - foreach ($this->listeners as $listener) { - if (isset($listener[4]) && $this->currentFirewallContext === $listener[4]) { - return $listener; - } - } - - throw new \InvalidArgumentException('Unable to find the current firewall LogoutListener, please provide the provider key manually.'); - } -} diff --git a/vendor/symfony/security-http/Logout/SessionLogoutHandler.php b/vendor/symfony/security-http/Logout/SessionLogoutHandler.php deleted file mode 100644 index 09e4ea0..0000000 --- a/vendor/symfony/security-http/Logout/SessionLogoutHandler.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Logout; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Http\EventListener\SessionLogoutListener; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', SessionLogoutHandler::class, SessionLogoutListener::class); - -/** - * Handler for clearing invalidating the current session. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.4, use {@link SessionLogoutListener} instead - */ -class SessionLogoutHandler implements LogoutHandlerInterface -{ - /** - * Invalidate the current session. - */ - public function logout(Request $request, Response $response, TokenInterface $token) - { - $request->getSession()->invalidate(); - } -} diff --git a/vendor/symfony/security-http/ParameterBagUtils.php b/vendor/symfony/security-http/ParameterBagUtils.php deleted file mode 100644 index db7ac6e..0000000 --- a/vendor/symfony/security-http/ParameterBagUtils.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\HttpFoundation\ParameterBag; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\PropertyAccess\Exception\AccessException; -use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; -use Symfony\Component\PropertyAccess\PropertyAccess; - -/** - * @internal - */ -final class ParameterBagUtils -{ - private static $propertyAccessor; - - /** - * Returns a "parameter" value. - * - * Paths like foo[bar] will be evaluated to find deeper items in nested data structures. - * - * @return mixed - * - * @throws InvalidArgumentException when the given path is malformed - */ - public static function getParameterBagValue(ParameterBag $parameters, string $path) - { - if (false === $pos = strpos($path, '[')) { - return $parameters->all()[$path] ?? null; - } - - $root = substr($path, 0, $pos); - - if (null === $value = $parameters->all()[$root] ?? null) { - return null; - } - - if (null === self::$propertyAccessor) { - self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); - } - - try { - return self::$propertyAccessor->getValue($value, substr($path, $pos)); - } catch (AccessException $e) { - return null; - } - } - - /** - * Returns a request "parameter" value. - * - * Paths like foo[bar] will be evaluated to find deeper items in nested data structures. - * - * @return mixed - * - * @throws InvalidArgumentException when the given path is malformed - */ - public static function getRequestParameterValue(Request $request, string $path) - { - if (false === $pos = strpos($path, '[')) { - return $request->get($path); - } - - $root = substr($path, 0, $pos); - - if (null === $value = $request->get($root)) { - return null; - } - - if (null === self::$propertyAccessor) { - self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); - } - - try { - return self::$propertyAccessor->getValue($value, substr($path, $pos)); - } catch (AccessException $e) { - return null; - } - } -} diff --git a/vendor/symfony/security-http/README.md b/vendor/symfony/security-http/README.md deleted file mode 100644 index 91a7583..0000000 --- a/vendor/symfony/security-http/README.md +++ /dev/null @@ -1,37 +0,0 @@ -Security Component - HTTP Integration -===================================== - -The Security HTTP component provides an HTTP integration of the Security Core -component. It allows securing (parts of) your application using firewalls and -provides authenticators to authenticate visitors. - -Getting Started ---------------- - -``` -$ composer require symfony/security-http -``` - -Sponsor -------- - -The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2]. - -Learn Symfony faster by watching real projects being built and actively coding -along with them. SymfonyCasts bridges that learning gap, bringing you video -tutorials and coding challenges. Code on! - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/security.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://symfonycasts.com -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/security-http/RateLimiter/DefaultLoginRateLimiter.php b/vendor/symfony/security-http/RateLimiter/DefaultLoginRateLimiter.php deleted file mode 100644 index 7b773f2..0000000 --- a/vendor/symfony/security-http/RateLimiter/DefaultLoginRateLimiter.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RateLimiter; - -use Symfony\Component\HttpFoundation\RateLimiter\AbstractRequestRateLimiter; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\RateLimiterFactory; -use Symfony\Component\Security\Core\Security; - -/** - * A default login throttling limiter. - * - * This limiter prevents breadth-first attacks by enforcing - * a limit on username+IP and a (higher) limit on IP. - * - * @author Wouter de Jong - */ -final class DefaultLoginRateLimiter extends AbstractRequestRateLimiter -{ - private $globalFactory; - private $localFactory; - - public function __construct(RateLimiterFactory $globalFactory, RateLimiterFactory $localFactory) - { - $this->globalFactory = $globalFactory; - $this->localFactory = $localFactory; - } - - protected function getLimiters(Request $request): array - { - $username = $request->attributes->get(Security::LAST_USERNAME, ''); - $username = preg_match('//u', $username) ? mb_strtolower($username, 'UTF-8') : strtolower($username); - - return [ - $this->globalFactory->create($request->getClientIp()), - $this->localFactory->create($username.'-'.$request->getClientIp()), - ]; - } -} diff --git a/vendor/symfony/security-http/RememberMe/AbstractRememberMeHandler.php b/vendor/symfony/security-http/RememberMe/AbstractRememberMeHandler.php deleted file mode 100644 index 97918c8..0000000 --- a/vendor/symfony/security-http/RememberMe/AbstractRememberMeHandler.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -/** - * @author Wouter de Jong - */ -abstract class AbstractRememberMeHandler implements RememberMeHandlerInterface -{ - private $userProvider; - protected $requestStack; - protected $options; - protected $logger; - - public function __construct(UserProviderInterface $userProvider, RequestStack $requestStack, array $options = [], LoggerInterface $logger = null) - { - $this->userProvider = $userProvider; - $this->requestStack = $requestStack; - $this->options = $options + [ - 'name' => 'REMEMBERME', - 'lifetime' => 31536000, - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => true, - 'samesite' => null, - 'always_remember_me' => false, - 'remember_me_parameter' => '_remember_me', - ]; - $this->logger = $logger; - } - - /** - * Checks if the RememberMeDetails is a valid cookie to login the given User. - * - * This method should also: - * - Create a new remember-me cookie to be sent with the response (using {@see createCookie()}); - * - If you store the token somewhere else (e.g. in a database), invalidate the stored token. - * - * @throws AuthenticationException throw this exception if the remember me details are not accepted - */ - abstract protected function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void; - - /** - * {@inheritdoc} - */ - public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface - { - try { - // @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0 - $method = 'loadUserByIdentifier'; - if (!method_exists($this->userProvider, 'loadUserByIdentifier')) { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider)); - - $method = 'loadUserByUsername'; - } - - $user = $this->userProvider->$method($rememberMeDetails->getUserIdentifier()); - } catch (AuthenticationException $e) { - throw $e; - } - - if (!$user instanceof UserInterface) { - throw new \LogicException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', get_debug_type($user))); - } - - $this->processRememberMe($rememberMeDetails, $user); - - if (null !== $this->logger) { - $this->logger->info('Remember-me cookie accepted.'); - } - - return $user; - } - - /** - * {@inheritdoc} - */ - public function clearRememberMeCookie(): void - { - if (null !== $this->logger) { - $this->logger->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]); - } - - $this->createCookie(null); - } - - /** - * Creates the remember-me cookie using the correct configuration. - * - * @param RememberMeDetails|null $rememberMeDetails The details for the cookie, or null to clear the remember-me cookie - */ - protected function createCookie(?RememberMeDetails $rememberMeDetails) - { - $request = $this->requestStack->getMainRequest(); - if (!$request) { - throw new \LogicException('Cannot create the remember-me cookie; no master request available.'); - } - - // the ResponseListener configures the cookie saved in this attribute on the final response object - $request->attributes->set(ResponseListener::COOKIE_ATTR_NAME, new Cookie( - $this->options['name'], - $rememberMeDetails ? $rememberMeDetails->toString() : null, - $rememberMeDetails ? $rememberMeDetails->getExpires() : 1, - $this->options['path'], - $this->options['domain'], - $this->options['secure'] ?? $request->isSecure(), - $this->options['httponly'], - false, - $this->options['samesite'] - )); - } -} diff --git a/vendor/symfony/security-http/RememberMe/AbstractRememberMeServices.php b/vendor/symfony/security-http/RememberMe/AbstractRememberMeServices.php deleted file mode 100644 index f18a4c2..0000000 --- a/vendor/symfony/security-http/RememberMe/AbstractRememberMeServices.php +++ /dev/null @@ -1,309 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\CookieTheftException; -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UserNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; -use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface; -use Symfony\Component\Security\Http\ParameterBagUtils; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', AbstractRememberMeServices::class, AbstractRememberMeHandler::class); - -/** - * Base class implementing the RememberMeServicesInterface. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.4, use {@see AbstractRememberMeHandler} instead - */ -abstract class AbstractRememberMeServices implements RememberMeServicesInterface, LogoutHandlerInterface -{ - public const COOKIE_DELIMITER = ':'; - - protected $logger; - protected $options = [ - 'secure' => false, - 'httponly' => true, - 'samesite' => null, - 'path' => null, - 'domain' => null, - ]; - private $firewallName; - private $secret; - private $userProviders; - - /** - * @throws \InvalidArgumentException - */ - public function __construct(iterable $userProviders, string $secret, string $firewallName, array $options = [], LoggerInterface $logger = null) - { - if (empty($secret)) { - throw new \InvalidArgumentException('$secret must not be empty.'); - } - if ('' === $firewallName) { - throw new \InvalidArgumentException('$firewallName must not be empty.'); - } - if (!\is_array($userProviders) && !$userProviders instanceof \Countable) { - $userProviders = iterator_to_array($userProviders, false); - } - if (0 === \count($userProviders)) { - throw new \InvalidArgumentException('You must provide at least one user provider.'); - } - - $this->userProviders = $userProviders; - $this->secret = $secret; - $this->firewallName = $firewallName; - $this->options = array_merge($this->options, $options); - $this->logger = $logger; - } - - /** - * Returns the parameter that is used for checking whether remember-me - * services have been requested. - * - * @return string - */ - public function getRememberMeParameter() - { - return $this->options['remember_me_parameter']; - } - - /** - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Implementation of RememberMeServicesInterface. Detects whether a remember-me - * cookie was set, decodes it, and hands it to subclasses for further processing. - * - * @throws CookieTheftException - * @throws \RuntimeException - */ - final public function autoLogin(Request $request): ?TokenInterface - { - if (($cookie = $request->attributes->get(self::COOKIE_ATTR_NAME)) && null === $cookie->getValue()) { - return null; - } - - if (null === $cookie = $request->cookies->get($this->options['name'])) { - return null; - } - - if (null !== $this->logger) { - $this->logger->debug('Remember-me cookie detected.'); - } - - $cookieParts = $this->decodeCookie($cookie); - - try { - $user = $this->processAutoLoginCookie($cookieParts, $request); - - if (!$user instanceof UserInterface) { - throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.'); - } - - if (null !== $this->logger) { - $this->logger->info('Remember-me cookie accepted.'); - } - - return new RememberMeToken($user, $this->firewallName, $this->secret); - } catch (CookieTheftException $e) { - $this->loginFail($request, $e); - - throw $e; - } catch (UserNotFoundException $e) { - if (null !== $this->logger) { - $this->logger->info('User for remember-me cookie not found.', ['exception' => $e]); - } - - $this->loginFail($request, $e); - } catch (UnsupportedUserException $e) { - if (null !== $this->logger) { - $this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $e]); - } - - $this->loginFail($request, $e); - } catch (AuthenticationException $e) { - if (null !== $this->logger) { - $this->logger->debug('Remember-Me authentication failed.', ['exception' => $e]); - } - - $this->loginFail($request, $e); - } catch (\Exception $e) { - $this->loginFail($request, $e); - - throw $e; - } - - return null; - } - - /** - * Implementation for LogoutHandlerInterface. Deletes the cookie. - */ - public function logout(Request $request, Response $response, TokenInterface $token) - { - $this->cancelCookie($request); - } - - /** - * Implementation for RememberMeServicesInterface. Deletes the cookie when - * an attempted authentication fails. - */ - final public function loginFail(Request $request, \Exception $exception = null) - { - $this->cancelCookie($request); - $this->onLoginFail($request, $exception); - } - - /** - * Implementation for RememberMeServicesInterface. This is called when an - * authentication is successful. - */ - final public function loginSuccess(Request $request, Response $response, TokenInterface $token) - { - // Make sure any old remember-me cookies are cancelled - $this->cancelCookie($request); - - if (!$token->getUser() instanceof UserInterface) { - if (null !== $this->logger) { - $this->logger->debug('Remember-me ignores token since it does not contain a UserInterface implementation.'); - } - - return; - } - - if (!$this->isRememberMeRequested($request)) { - if (null !== $this->logger) { - $this->logger->debug('Remember-me was not requested.'); - } - - return; - } - - if (null !== $this->logger) { - $this->logger->debug('Remember-me was requested; setting cookie.'); - } - - // Remove attribute from request that sets a NULL cookie. - // It was set by $this->cancelCookie() - // (cancelCookie does other things too for some RememberMeServices - // so we should still call it at the start of this method) - $request->attributes->remove(self::COOKIE_ATTR_NAME); - - $this->onLoginSuccess($request, $response, $token); - } - - /** - * Subclasses should validate the cookie and do any additional processing - * that is required. This is called from autoLogin(). - * - * @return UserInterface - */ - abstract protected function processAutoLoginCookie(array $cookieParts, Request $request); - - protected function onLoginFail(Request $request, \Exception $exception = null) - { - } - - /** - * This is called after a user has been logged in successfully, and has - * requested remember-me capabilities. The implementation usually sets a - * cookie and possibly stores a persistent record of it. - */ - abstract protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token); - - final protected function getUserProvider(string $class): UserProviderInterface - { - foreach ($this->userProviders as $provider) { - if ($provider->supportsClass($class)) { - return $provider; - } - } - - throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $class)); - } - - /** - * Decodes the raw cookie value. - * - * @return array - */ - protected function decodeCookie(string $rawCookie) - { - return explode(self::COOKIE_DELIMITER, base64_decode($rawCookie)); - } - - /** - * Encodes the cookie parts. - * - * @return string - * - * @throws \InvalidArgumentException When $cookieParts contain the cookie delimiter. Extending class should either remove or escape it. - */ - protected function encodeCookie(array $cookieParts) - { - foreach ($cookieParts as $cookiePart) { - if (str_contains($cookiePart, self::COOKIE_DELIMITER)) { - throw new \InvalidArgumentException(sprintf('$cookieParts should not contain the cookie delimiter "%s".', self::COOKIE_DELIMITER)); - } - } - - return base64_encode(implode(self::COOKIE_DELIMITER, $cookieParts)); - } - - /** - * Deletes the remember-me cookie. - */ - protected function cancelCookie(Request $request) - { - if (null !== $this->logger) { - $this->logger->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]); - } - - $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'] ?? $request->isSecure(), $this->options['httponly'], false, $this->options['samesite'])); - } - - /** - * Checks whether remember-me capabilities were requested. - * - * @return bool - */ - protected function isRememberMeRequested(Request $request) - { - if (true === $this->options['always_remember_me']) { - return true; - } - - $parameter = ParameterBagUtils::getRequestParameterValue($request, $this->options['remember_me_parameter']); - - if (null === $parameter && null !== $this->logger) { - $this->logger->debug('Did not send remember-me cookie.', ['parameter' => $this->options['remember_me_parameter']]); - } - - return 'true' === $parameter || 'on' === $parameter || '1' === $parameter || 'yes' === $parameter || true === $parameter; - } -} diff --git a/vendor/symfony/security-http/RememberMe/PersistentRememberMeHandler.php b/vendor/symfony/security-http/RememberMe/PersistentRememberMeHandler.php deleted file mode 100644 index 191d2ed..0000000 --- a/vendor/symfony/security-http/RememberMe/PersistentRememberMeHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; -use Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface; -use Symfony\Component\Security\Core\Authentication\RememberMe\TokenVerifierInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\CookieTheftException; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -/** - * Implements remember-me tokens using a {@see TokenProviderInterface}. - * - * This requires storing remember-me tokens in a database. This allows - * more control over the invalidation of remember-me tokens. See - * {@see SignatureRememberMeHandler} if you don't want to use a database. - * - * @author Wouter de Jong - */ -final class PersistentRememberMeHandler extends AbstractRememberMeHandler -{ - private $tokenProvider; - private $tokenVerifier; - private $secret; - - public function __construct(TokenProviderInterface $tokenProvider, string $secret, UserProviderInterface $userProvider, RequestStack $requestStack, array $options, LoggerInterface $logger = null, TokenVerifierInterface $tokenVerifier = null) - { - parent::__construct($userProvider, $requestStack, $options, $logger); - - if (!$tokenVerifier && $tokenProvider instanceof TokenVerifierInterface) { - $tokenVerifier = $tokenProvider; - } - $this->tokenProvider = $tokenProvider; - $this->tokenVerifier = $tokenVerifier; - $this->secret = $secret; - } - - /** - * {@inheritdoc} - */ - public function createRememberMeCookie(UserInterface $user): void - { - $series = base64_encode(random_bytes(64)); - $tokenValue = $this->generateHash(base64_encode(random_bytes(64))); - $token = new PersistentToken(\get_class($user), method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), $series, $tokenValue, new \DateTime()); - - $this->tokenProvider->createNewToken($token); - $this->createCookie(RememberMeDetails::fromPersistentToken($token, time() + $this->options['lifetime'])); - } - - /** - * {@inheritdoc} - */ - public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void - { - if (!str_contains($rememberMeDetails->getValue(), ':')) { - throw new AuthenticationException('The cookie is incorrectly formatted.'); - } - - [$series, $tokenValue] = explode(':', $rememberMeDetails->getValue()); - $persistentToken = $this->tokenProvider->loadTokenBySeries($series); - - if ($this->tokenVerifier) { - $isTokenValid = $this->tokenVerifier->verifyToken($persistentToken, $tokenValue); - } else { - $isTokenValid = hash_equals($persistentToken->getTokenValue(), $tokenValue); - } - if (!$isTokenValid) { - throw new CookieTheftException('This token was already used. The account is possibly compromised.'); - } - - if ($persistentToken->getLastUsed()->getTimestamp() + $this->options['lifetime'] < time()) { - throw new AuthenticationException('The cookie has expired.'); - } - - // if a token was regenerated less than a minute ago, there is no need to regenerate it - // if multiple concurrent requests reauthenticate a user we do not want to update the token several times - if ($persistentToken->getLastUsed()->getTimestamp() + 60 < time()) { - $tokenValue = $this->generateHash(base64_encode(random_bytes(64))); - $tokenLastUsed = new \DateTime(); - if ($this->tokenVerifier) { - $this->tokenVerifier->updateExistingToken($persistentToken, $tokenValue, $tokenLastUsed); - } - $this->tokenProvider->updateToken($series, $tokenValue, $tokenLastUsed); - } - - $this->createCookie($rememberMeDetails->withValue($series.':'.$tokenValue)); - } - - /** - * {@inheritdoc} - */ - public function clearRememberMeCookie(): void - { - parent::clearRememberMeCookie(); - - $cookie = $this->requestStack->getMainRequest()->cookies->get($this->options['name']); - if (null === $cookie) { - return; - } - - $rememberMeDetails = RememberMeDetails::fromRawCookie($cookie); - [$series, ] = explode(':', $rememberMeDetails->getValue()); - $this->tokenProvider->deleteTokenBySeries($series); - } - - /** - * @internal - */ - public function getTokenProvider(): TokenProviderInterface - { - return $this->tokenProvider; - } - - private function generateHash(string $tokenValue): string - { - return hash_hmac('sha256', $tokenValue, $this->secret); - } -} diff --git a/vendor/symfony/security-http/RememberMe/PersistentTokenBasedRememberMeServices.php b/vendor/symfony/security-http/RememberMe/PersistentTokenBasedRememberMeServices.php deleted file mode 100644 index 2bf9d3c..0000000 --- a/vendor/symfony/security-http/RememberMe/PersistentTokenBasedRememberMeServices.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; -use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentTokenInterface; -use Symfony\Component\Security\Core\Authentication\RememberMe\TokenProviderInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Exception\CookieTheftException; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', PersistentTokenBasedRememberMeServices::class, PersistentRememberMeHandler::class); - -/** - * Concrete implementation of the RememberMeServicesInterface which needs - * an implementation of TokenProviderInterface for providing remember-me - * capabilities. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.4, use {@see PersistentRememberMeHandler} instead - */ -class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices -{ - private const HASHED_TOKEN_PREFIX = 'sha256_'; - - /** @var TokenProviderInterface */ - private $tokenProvider; - - public function setTokenProvider(TokenProviderInterface $tokenProvider) - { - $this->tokenProvider = $tokenProvider; - } - - /** - * {@inheritdoc} - */ - protected function cancelCookie(Request $request) - { - // Delete cookie on the client - parent::cancelCookie($request); - - // Delete cookie from the tokenProvider - if (null !== ($cookie = $request->cookies->get($this->options['name'])) - && 2 === \count($parts = $this->decodeCookie($cookie)) - ) { - [$series] = $parts; - $this->tokenProvider->deleteTokenBySeries($series); - } - } - - /** - * {@inheritdoc} - */ - protected function processAutoLoginCookie(array $cookieParts, Request $request) - { - if (2 !== \count($cookieParts)) { - throw new AuthenticationException('The cookie is invalid.'); - } - - [$series, $tokenValue] = $cookieParts; - $persistentToken = $this->tokenProvider->loadTokenBySeries($series); - - if (!$this->isTokenValueValid($persistentToken, $tokenValue)) { - throw new CookieTheftException('This token was already used. The account is possibly compromised.'); - } - - if ($persistentToken->getLastUsed()->getTimestamp() + $this->options['lifetime'] < time()) { - throw new AuthenticationException('The cookie has expired.'); - } - - $tokenValue = base64_encode(random_bytes(64)); - $this->tokenProvider->updateToken($series, $this->generateHash($tokenValue), new \DateTime()); - $request->attributes->set(self::COOKIE_ATTR_NAME, - new Cookie( - $this->options['name'], - $this->encodeCookie([$series, $tokenValue]), - time() + $this->options['lifetime'], - $this->options['path'], - $this->options['domain'], - $this->options['secure'] ?? $request->isSecure(), - $this->options['httponly'], - false, - $this->options['samesite'] - ) - ); - - $userProvider = $this->getUserProvider($persistentToken->getClass()); - // @deprecated since Symfony 5.3, change to $persistentToken->getUserIdentifier() in 6.0 - if (method_exists($persistentToken, 'getUserIdentifier')) { - $userIdentifier = $persistentToken->getUserIdentifier(); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier()" in persistent token "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($persistentToken)); - - $userIdentifier = $persistentToken->getUsername(); - } - - // @deprecated since Symfony 5.3, change to $userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($userProvider, 'loadUserByIdentifier')) { - return $userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($userProvider)); - - return $userProvider->loadUserByUsername($userIdentifier); - } - } - - /** - * {@inheritdoc} - */ - protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token) - { - $series = base64_encode(random_bytes(64)); - $tokenValue = base64_encode(random_bytes(64)); - - $this->tokenProvider->createNewToken( - new PersistentToken( - \get_class($user = $token->getUser()), - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), - $series, - $this->generateHash($tokenValue), - new \DateTime() - ) - ); - - $response->headers->setCookie( - new Cookie( - $this->options['name'], - $this->encodeCookie([$series, $tokenValue]), - time() + $this->options['lifetime'], - $this->options['path'], - $this->options['domain'], - $this->options['secure'] ?? $request->isSecure(), - $this->options['httponly'], - false, - $this->options['samesite'] - ) - ); - } - - private function generateHash(string $tokenValue): string - { - return self::HASHED_TOKEN_PREFIX.hash_hmac('sha256', $tokenValue, $this->getSecret()); - } - - private function isTokenValueValid(PersistentTokenInterface $persistentToken, string $tokenValue): bool - { - if (0 === strpos($persistentToken->getTokenValue(), self::HASHED_TOKEN_PREFIX)) { - return hash_equals($persistentToken->getTokenValue(), $this->generateHash($tokenValue)); - } - - return hash_equals($persistentToken->getTokenValue(), $tokenValue); - } -} diff --git a/vendor/symfony/security-http/RememberMe/RememberMeDetails.php b/vendor/symfony/security-http/RememberMe/RememberMeDetails.php deleted file mode 100644 index ba9b118..0000000 --- a/vendor/symfony/security-http/RememberMe/RememberMeDetails.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; -use Symfony\Component\Security\Core\Exception\AuthenticationException; - -/** - * @author Wouter de Jong - */ -class RememberMeDetails -{ - public const COOKIE_DELIMITER = ':'; - - private $userFqcn; - private $userIdentifier; - private $expires; - private $value; - - public function __construct(string $userFqcn, string $userIdentifier, int $expires, string $value) - { - $this->userFqcn = $userFqcn; - $this->userIdentifier = $userIdentifier; - $this->expires = $expires; - $this->value = $value; - } - - public static function fromRawCookie(string $rawCookie): self - { - $cookieParts = explode(self::COOKIE_DELIMITER, base64_decode($rawCookie), 4); - if (false === $cookieParts[1] = base64_decode($cookieParts[1], true)) { - throw new AuthenticationException('The user identifier contains a character from outside the base64 alphabet.'); - } - if (4 !== \count($cookieParts)) { - throw new AuthenticationException('The cookie contains invalid data.'); - } - - return new static(...$cookieParts); - } - - public static function fromPersistentToken(PersistentToken $persistentToken, int $expires): self - { - return new static($persistentToken->getClass(), $persistentToken->getUserIdentifier(), $expires, $persistentToken->getSeries().':'.$persistentToken->getTokenValue()); - } - - public function withValue(string $value): self - { - $details = clone $this; - $details->value = $value; - - return $details; - } - - public function getUserFqcn(): string - { - return $this->userFqcn; - } - - public function getUserIdentifier(): string - { - return $this->userIdentifier; - } - - public function getExpires(): int - { - return $this->expires; - } - - public function getValue(): string - { - return $this->value; - } - - public function toString(): string - { - // $userIdentifier is encoded because it might contain COOKIE_DELIMITER, we assume other values don't - return base64_encode(implode(self::COOKIE_DELIMITER, [$this->userFqcn, base64_encode($this->userIdentifier), $this->expires, $this->value])); - } -} diff --git a/vendor/symfony/security-http/RememberMe/RememberMeHandlerInterface.php b/vendor/symfony/security-http/RememberMe/RememberMeHandlerInterface.php deleted file mode 100644 index 046fddb..0000000 --- a/vendor/symfony/security-http/RememberMe/RememberMeHandlerInterface.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Handles creating and validating remember-me cookies. - * - * If you want to add a custom implementation, you want to extend from - * {@see AbstractRememberMeHandler} instead. - * - * @author Wouter de Jong - */ -interface RememberMeHandlerInterface -{ - /** - * Creates a remember-me cookie. - * - * The actual cookie should be set as an attribute on the main request, - * which is transformed into a response cookie by {@see ResponseListener}. - */ - public function createRememberMeCookie(UserInterface $user): void; - - /** - * Validates the remember-me cookie and returns the associated User. - * - * Every cookie should only be used once. This means that this method should also: - * - Create a new remember-me cookie to be sent with the response (using the - * {@see ResponseListener::COOKIE_ATTR_NAME} request attribute); - * - If you store the token somewhere else (e.g. in a database), invalidate the - * stored token. - * - * @throws AuthenticationException - */ - public function consumeRememberMeCookie(RememberMeDetails $rememberMeDetails): UserInterface; - - /** - * Clears the remember-me cookie. - * - * This should set a cookie with a `null` value on the request attribute. - */ - public function clearRememberMeCookie(): void; -} diff --git a/vendor/symfony/security-http/RememberMe/RememberMeServicesInterface.php b/vendor/symfony/security-http/RememberMe/RememberMeServicesInterface.php deleted file mode 100644 index 239cad7..0000000 --- a/vendor/symfony/security-http/RememberMe/RememberMeServicesInterface.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" interface is deprecated, use "%s" instead.', RememberMeServicesInterface::class, RememberMeHandlerInterface::class); - -/** - * Interface that needs to be implemented by classes which provide remember-me - * capabilities. - * - * We provide two implementations out-of-the-box: - * - TokenBasedRememberMeServices (does not require a TokenProvider) - * - PersistentTokenBasedRememberMeServices (requires a TokenProvider) - * - * @author Johannes M. Schmitt - * - * @method logout(Request $request, Response $response, TokenInterface $token) - * - * @deprecated since Symfony 5.4, use {@see RememberMeHandlerInterface} instead - */ -interface RememberMeServicesInterface -{ - /** - * This attribute name can be used by the implementation if it needs to set - * a cookie on the Request when there is no actual Response, yet. - */ - public const COOKIE_ATTR_NAME = '_security_remember_me_cookie'; - - /** - * This method will be called whenever the TokenStorage does not contain - * a TokenInterface object and the framework wishes to provide an implementation - * with an opportunity to authenticate the request using remember-me capabilities. - * - * No attempt whatsoever is made to determine whether the browser has requested - * remember-me services or presented a valid cookie. Any and all such determinations - * are left to the implementation of this method. - * - * If a browser has presented an unauthorised cookie for whatever reason, - * make sure to throw an AuthenticationException as this will consequentially - * result in a call to loginFail() and therefore an invalidation of the cookie. - * - * @return TokenInterface|null - */ - public function autoLogin(Request $request); - - /** - * Called whenever an interactive authentication attempt was made, but the - * credentials supplied by the user were missing or otherwise invalid. - * - * This method needs to take care of invalidating the cookie. - */ - public function loginFail(Request $request, \Exception $exception = null); - - /** - * Called whenever an interactive authentication attempt is successful - * (e.g. a form login). - * - * An implementation may always set a remember-me cookie in the Response, - * although this is not recommended. - * - * Instead, implementations should typically look for a request parameter - * (such as an HTTP POST parameter) that indicates the browser has explicitly - * requested for the authentication to be remembered. - */ - public function loginSuccess(Request $request, Response $response, TokenInterface $token); -} diff --git a/vendor/symfony/security-http/RememberMe/ResponseListener.php b/vendor/symfony/security-http/RememberMe/ResponseListener.php deleted file mode 100644 index 82eab69..0000000 --- a/vendor/symfony/security-http/RememberMe/ResponseListener.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Adds remember-me cookies to the Response. - * - * @author Johannes M. Schmitt - * - * @final - */ -class ResponseListener implements EventSubscriberInterface -{ - /** - * This attribute name can be used by the implementation if it needs to set - * a cookie on the Request when there is no actual Response, yet. - */ - public const COOKIE_ATTR_NAME = '_security_remember_me_cookie'; - - public function onKernelResponse(ResponseEvent $event) - { - if (!$event->isMainRequest()) { - return; - } - - $request = $event->getRequest(); - $response = $event->getResponse(); - - if ($request->attributes->has(self::COOKIE_ATTR_NAME)) { - $response->headers->setCookie($request->attributes->get(self::COOKIE_ATTR_NAME)); - } - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [KernelEvents::RESPONSE => 'onKernelResponse']; - } -} diff --git a/vendor/symfony/security-http/RememberMe/SignatureRememberMeHandler.php b/vendor/symfony/security-http/RememberMe/SignatureRememberMeHandler.php deleted file mode 100644 index 834b3e1..0000000 --- a/vendor/symfony/security-http/RememberMe/SignatureRememberMeHandler.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\Signature\Exception\ExpiredSignatureException; -use Symfony\Component\Security\Core\Signature\Exception\InvalidSignatureException; -use Symfony\Component\Security\Core\Signature\SignatureHasher; -use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Component\Security\Core\User\UserProviderInterface; - -/** - * Implements safe remember-me cookies using the {@see SignatureHasher}. - * - * This handler doesn't require a database for the remember-me tokens. - * However, it cannot invalidate a specific user session, all sessions for - * that user will be invalidated instead. Use {@see PersistentRememberMeHandler} - * if you need this. - * - * @author Wouter de Jong - */ -final class SignatureRememberMeHandler extends AbstractRememberMeHandler -{ - private $signatureHasher; - - public function __construct(SignatureHasher $signatureHasher, UserProviderInterface $userProvider, RequestStack $requestStack, array $options, LoggerInterface $logger = null) - { - parent::__construct($userProvider, $requestStack, $options, $logger); - - $this->signatureHasher = $signatureHasher; - } - - /** - * {@inheritdoc} - */ - public function createRememberMeCookie(UserInterface $user): void - { - $expires = time() + $this->options['lifetime']; - $value = $this->signatureHasher->computeSignatureHash($user, $expires); - - $details = new RememberMeDetails(\get_class($user), method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), $expires, $value); - $this->createCookie($details); - } - - /** - * {@inheritdoc} - */ - public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInterface $user): void - { - try { - $this->signatureHasher->verifySignatureHash($user, $rememberMeDetails->getExpires(), $rememberMeDetails->getValue()); - } catch (InvalidSignatureException $e) { - throw new AuthenticationException('The cookie\'s hash is invalid.', 0, $e); - } catch (ExpiredSignatureException $e) { - throw new AuthenticationException('The cookie has expired.', 0, $e); - } - - $this->createRememberMeCookie($user); - } -} diff --git a/vendor/symfony/security-http/RememberMe/TokenBasedRememberMeServices.php b/vendor/symfony/security-http/RememberMe/TokenBasedRememberMeServices.php deleted file mode 100644 index 2fa5966..0000000 --- a/vendor/symfony/security-http/RememberMe/TokenBasedRememberMeServices.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\RememberMe; - -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\User\UserInterface; - -trigger_deprecation('symfony/security-http', '5.4', 'The "%s" class is deprecated, use "%s" instead.', TokenBasedRememberMeServices::class, SignatureRememberMeHandler::class); - -/** - * Concrete implementation of the RememberMeServicesInterface providing - * remember-me capabilities without requiring a TokenProvider. - * - * @author Johannes M. Schmitt - * - * @deprecated since Symfony 5.4, use {@see SignatureRememberMeHandler} instead - */ -class TokenBasedRememberMeServices extends AbstractRememberMeServices -{ - /** - * {@inheritdoc} - */ - protected function processAutoLoginCookie(array $cookieParts, Request $request) - { - if (4 !== \count($cookieParts)) { - throw new AuthenticationException('The cookie is invalid.'); - } - - [$class, $userIdentifier, $expires, $hash] = $cookieParts; - if (false === $userIdentifier = base64_decode($userIdentifier, true)) { - throw new AuthenticationException('$userIdentifier contains a character from outside the base64 alphabet.'); - } - try { - $userProvider = $this->getUserProvider($class); - // @deprecated since Symfony 5.3, change to $userProvider->loadUserByIdentifier() in 6.0 - if (method_exists($userProvider, 'loadUserByIdentifier')) { - $user = $userProvider->loadUserByIdentifier($userIdentifier); - } else { - trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($userProvider)); - - $user = $userProvider->loadUserByUsername($userIdentifier); - } - } catch (\Exception $e) { - if (!$e instanceof AuthenticationException) { - $e = new AuthenticationException($e->getMessage(), $e->getCode(), $e); - } - - throw $e; - } - - if (!$user instanceof UserInterface) { - throw new \RuntimeException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', get_debug_type($user))); - } - - if (true !== hash_equals($this->generateCookieHash($class, $userIdentifier, $expires, $user->getPassword()), $hash)) { - throw new AuthenticationException('The cookie\'s hash is invalid.'); - } - - if ($expires < time()) { - throw new AuthenticationException('The cookie has expired.'); - } - - return $user; - } - - /** - * {@inheritdoc} - */ - protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token) - { - $user = $token->getUser(); - $expires = time() + $this->options['lifetime']; - // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0 - $value = $this->generateCookieValue(\get_class($user), method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), $expires, $user->getPassword()); - - $response->headers->setCookie( - new Cookie( - $this->options['name'], - $value, - $expires, - $this->options['path'], - $this->options['domain'], - $this->options['secure'] ?? $request->isSecure(), - $this->options['httponly'], - false, - $this->options['samesite'] - ) - ); - } - - /** - * Generates the cookie value. - * - * @param int $expires The Unix timestamp when the cookie expires - * @param string|null $password The encoded password - * - * @return string - */ - protected function generateCookieValue(string $class, string $userIdentifier, int $expires, ?string $password) - { - // $userIdentifier is encoded because it might contain COOKIE_DELIMITER, - // we assume other values don't - return $this->encodeCookie([ - $class, - base64_encode($userIdentifier), - $expires, - $this->generateCookieHash($class, $userIdentifier, $expires, $password), - ]); - } - - /** - * Generates a hash for the cookie to ensure it is not being tampered with. - * - * @param int $expires The Unix timestamp when the cookie expires - * @param string|null $password The encoded password - * - * @return string - */ - protected function generateCookieHash(string $class, string $userIdentifier, int $expires, ?string $password) - { - return hash_hmac('sha256', $class.self::COOKIE_DELIMITER.$userIdentifier.self::COOKIE_DELIMITER.$expires.self::COOKIE_DELIMITER.$password, $this->getSecret()); - } -} diff --git a/vendor/symfony/security-http/SecurityEvents.php b/vendor/symfony/security-http/SecurityEvents.php deleted file mode 100644 index 2e3755e..0000000 --- a/vendor/symfony/security-http/SecurityEvents.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http; - -use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use Symfony\Component\Security\Http\Event\SwitchUserEvent; - -final class SecurityEvents -{ - /** - * The INTERACTIVE_LOGIN event occurs after a user has actively logged - * into your website. It is important to distinguish this action from - * non-interactive authentication methods, such as: - * - authentication based on your session. - * - authentication using an HTTP basic or HTTP digest header. - * - * @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent") - */ - public const INTERACTIVE_LOGIN = 'security.interactive_login'; - - /** - * The SWITCH_USER event occurs before switch to another user and - * before exit from an already switched user. - * - * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent") - */ - public const SWITCH_USER = 'security.switch_user'; - - /** - * Event aliases. - * - * These aliases can be consumed by RegisterListenersPass. - */ - public const ALIASES = [ - InteractiveLoginEvent::class => self::INTERACTIVE_LOGIN, - SwitchUserEvent::class => self::SWITCH_USER, - ]; -} diff --git a/vendor/symfony/security-http/Session/SessionAuthenticationStrategy.php b/vendor/symfony/security-http/Session/SessionAuthenticationStrategy.php deleted file mode 100644 index a4bb888..0000000 --- a/vendor/symfony/security-http/Session/SessionAuthenticationStrategy.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Session; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * The default session strategy implementation. - * - * Supports the following strategies: - * NONE: the session is not changed - * MIGRATE: the session id is updated, attributes are kept - * INVALIDATE: the session id is updated, attributes are lost - * - * @author Johannes M. Schmitt - */ -class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface -{ - public const NONE = 'none'; - public const MIGRATE = 'migrate'; - public const INVALIDATE = 'invalidate'; - - private $strategy; - - public function __construct(string $strategy) - { - $this->strategy = $strategy; - } - - /** - * {@inheritdoc} - */ - public function onAuthentication(Request $request, TokenInterface $token) - { - switch ($this->strategy) { - case self::NONE: - return; - - case self::MIGRATE: - // Note: this logic is duplicated in several authentication listeners - // until Symfony 5.0 due to a security fix with BC compat - $request->getSession()->migrate(true); - - return; - - case self::INVALIDATE: - $request->getSession()->invalidate(); - - return; - - default: - throw new \RuntimeException(sprintf('Invalid session authentication strategy "%s".', $this->strategy)); - } - } -} diff --git a/vendor/symfony/security-http/Session/SessionAuthenticationStrategyInterface.php b/vendor/symfony/security-http/Session/SessionAuthenticationStrategyInterface.php deleted file mode 100644 index a45f852..0000000 --- a/vendor/symfony/security-http/Session/SessionAuthenticationStrategyInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Session; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; - -/** - * SessionAuthenticationStrategyInterface. - * - * Implementation are responsible for updating the session after an interactive - * authentication attempt was successful. - * - * @author Johannes M. Schmitt - */ -interface SessionAuthenticationStrategyInterface -{ - /** - * This performs any necessary changes to the session. - * - * This method should be called before the TokenStorage is populated with a - * Token. It should be used by authentication listeners when a session is used. - */ - public function onAuthentication(Request $request, TokenInterface $token); -} diff --git a/vendor/symfony/security-http/Util/TargetPathTrait.php b/vendor/symfony/security-http/Util/TargetPathTrait.php deleted file mode 100644 index 67dcc99..0000000 --- a/vendor/symfony/security-http/Util/TargetPathTrait.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Http\Util; - -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Trait to get (and set) the URL the user last visited before being forced to authenticate. - */ -trait TargetPathTrait -{ - /** - * Sets the target path the user should be redirected to after authentication. - * - * Usually, you do not need to set this directly. - */ - private function saveTargetPath(SessionInterface $session, string $firewallName, string $uri) - { - $session->set('_security.'.$firewallName.'.target_path', $uri); - } - - /** - * Returns the URL (if any) the user visited that forced them to login. - */ - private function getTargetPath(SessionInterface $session, string $firewallName): ?string - { - return $session->get('_security.'.$firewallName.'.target_path'); - } - - /** - * Removes the target path from the session. - */ - private function removeTargetPath(SessionInterface $session, string $firewallName) - { - $session->remove('_security.'.$firewallName.'.target_path'); - } -} diff --git a/vendor/symfony/security-http/composer.json b/vendor/symfony/security-http/composer.json deleted file mode 100644 index dc0deba..0000000 --- a/vendor/symfony/security-http/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "symfony/security-http", - "type": "library", - "description": "Symfony Security Component - HTTP Integration", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/security-core": "^5.4|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/property-access": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/event-dispatcher": "<4.3", - "symfony/security-bundle": "<5.3", - "symfony/security-csrf": "<4.4" - }, - "suggest": { - "symfony/security-csrf": "For using tokens to protect authentication/logout attempts", - "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Security\\Http\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/service-contracts/.gitignore b/vendor/symfony/service-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/service-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/service-contracts/Attribute/Required.php b/vendor/symfony/service-contracts/Attribute/Required.php deleted file mode 100644 index 9df8511..0000000 --- a/vendor/symfony/service-contracts/Attribute/Required.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -/** - * A required dependency. - * - * This attribute indicates that a property holds a required dependency. The annotated property or method should be - * considered during the instantiation process of the containing class. - * - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class Required -{ -} diff --git a/vendor/symfony/service-contracts/Attribute/SubscribedService.php b/vendor/symfony/service-contracts/Attribute/SubscribedService.php deleted file mode 100644 index 10d1bc3..0000000 --- a/vendor/symfony/service-contracts/Attribute/SubscribedService.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -use Symfony\Contracts\Service\ServiceSubscriberTrait; - -/** - * Use with {@see ServiceSubscriberTrait} to mark a method's return type - * as a subscribed service. - * - * @author Kevin Bond - */ -#[\Attribute(\Attribute::TARGET_METHOD)] -final class SubscribedService -{ - /** - * @param string|null $key The key to use for the service - * If null, use "ClassName::methodName" - */ - public function __construct( - public ?string $key = null - ) { - } -} diff --git a/vendor/symfony/service-contracts/CHANGELOG.md b/vendor/symfony/service-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/service-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/service-contracts/LICENSE b/vendor/symfony/service-contracts/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/service-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/service-contracts/README.md b/vendor/symfony/service-contracts/README.md deleted file mode 100644 index 41e054a..0000000 --- a/vendor/symfony/service-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Service Contracts -========================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/service-contracts/ResetInterface.php b/vendor/symfony/service-contracts/ResetInterface.php deleted file mode 100644 index 1af1075..0000000 --- a/vendor/symfony/service-contracts/ResetInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * Provides a way to reset an object to its initial state. - * - * When calling the "reset()" method on an object, it should be put back to its - * initial state. This usually means clearing any internal buffers and forwarding - * the call to internal dependencies. All properties of the object should be put - * back to the same state it had when it was first ready to use. - * - * This method could be called, for example, to recycle objects that are used as - * services, so that they can be used to handle several requests in the same - * process loop (note that we advise making your services stateless instead of - * implementing this interface when possible.) - */ -interface ResetInterface -{ - public function reset(); -} diff --git a/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/vendor/symfony/service-contracts/ServiceLocatorTrait.php deleted file mode 100644 index 74dfa43..0000000 --- a/vendor/symfony/service-contracts/ServiceLocatorTrait.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ContainerExceptionInterface::class); -class_exists(NotFoundExceptionInterface::class); - -/** - * A trait to help implement ServiceProviderInterface. - * - * @author Robin Chalas - * @author Nicolas Grekas - */ -trait ServiceLocatorTrait -{ - private $factories; - private $loading = []; - private $providedTypes; - - /** - * @param callable[] $factories - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has(string $id) - { - return isset($this->factories[$id]); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $id) - { - if (!isset($this->factories[$id])) { - throw $this->createNotFoundException($id); - } - - if (isset($this->loading[$id])) { - $ids = array_values($this->loading); - $ids = \array_slice($this->loading, array_search($id, $ids)); - $ids[] = $id; - - throw $this->createCircularReferenceException($id, $ids); - } - - $this->loading[$id] = $id; - try { - return $this->factories[$id]($this); - } finally { - unset($this->loading[$id]); - } - } - - /** - * {@inheritdoc} - */ - public function getProvidedServices(): array - { - if (null === $this->providedTypes) { - $this->providedTypes = []; - - foreach ($this->factories as $name => $factory) { - if (!\is_callable($factory)) { - $this->providedTypes[$name] = '?'; - } else { - $type = (new \ReflectionFunction($factory))->getReturnType(); - - $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; - } - } - } - - return $this->providedTypes; - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if (!$alternatives = array_keys($this->factories)) { - $message = 'is empty...'; - } else { - $last = array_pop($alternatives); - if ($alternatives) { - $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last); - } else { - $message = sprintf('only knows about the "%s" service.', $last); - } - } - - if ($this->loading) { - $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message); - } else { - $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message); - } - - return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface { - }; - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface { - }; - } -} diff --git a/vendor/symfony/service-contracts/ServiceProviderInterface.php b/vendor/symfony/service-contracts/ServiceProviderInterface.php deleted file mode 100644 index c60ad0b..0000000 --- a/vendor/symfony/service-contracts/ServiceProviderInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; - -/** - * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. - * - * @author Nicolas Grekas - * @author Mateusz Sip - */ -interface ServiceProviderInterface extends ContainerInterface -{ - /** - * Returns an associative array of service types keyed by the identifiers provided by the current container. - * - * Examples: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface - * * ['foo' => '?'] means the container provides service name "foo" of unspecified type - * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null - * - * @return string[] The provided service types, keyed by service names - */ - public function getProvidedServices(): array; -} diff --git a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php deleted file mode 100644 index 098ab90..0000000 --- a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. - * - * The getSubscribedServices method returns an array of service types required by such instances, - * optionally keyed by the service names used internally. Service types that start with an interrogation - * mark "?" are optional, while the other ones are mandatory service dependencies. - * - * The injected service locators SHOULD NOT allow access to any other services not specified by the method. - * - * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. - * This interface does not dictate any injection method for these service locators, although constructor - * injection is recommended. - * - * @author Nicolas Grekas - */ -interface ServiceSubscriberInterface -{ - /** - * Returns an array of service types required by such instances, optionally keyed by the service names used internally. - * - * For mandatory dependencies: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name - * internally to fetch a service which must implement Psr\Log\LoggerInterface. - * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name - * internally to fetch an iterable of Psr\Log\LoggerInterface instances. - * * ['Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] - * - * otherwise: - * - * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency - * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency - * * ['?Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] - * - * @return string[] The required service types, optionally keyed by service names - */ - public static function getSubscribedServices(); -} diff --git a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php deleted file mode 100644 index f7fc2df..0000000 --- a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\Attribute\SubscribedService; - -/** - * Implementation of ServiceSubscriberInterface that determines subscribed services from - * method return types. Service ids are available as "ClassName::methodName". - * - * @author Kevin Bond - */ -trait ServiceSubscriberTrait -{ - /** @var ContainerInterface */ - protected $container; - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices(): array - { - static $services; - - if (null !== $services) { - return $services; - } - - $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; - $attributeOptIn = false; - - if (\PHP_VERSION_ID >= 80000) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!$attribute = $method->getAttributes(SubscribedService::class)[0] ?? null) { - continue; - } - - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name)); - } - - if (!$returnType = $method->getReturnType()) { - throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); - } - - $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - - if ($returnType->allowsNull()) { - $serviceId = '?'.$serviceId; - } - - $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId; - $attributeOptIn = true; - } - } - - if (!$attributeOptIn) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - continue; - } - - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) { - continue; - } - - if ($returnType->isBuiltin()) { - continue; - } - - if (\PHP_VERSION_ID >= 80000) { - trigger_deprecation('symfony/service-contracts', '2.5', 'Using "%s" in "%s" without using the "%s" attribute on any method is deprecated.', ServiceSubscriberTrait::class, self::class, SubscribedService::class); - } - - $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType); - } - } - - return $services; - } - - /** - * @required - * - * @return ContainerInterface|null - */ - public function setContainer(ContainerInterface $container) - { - $this->container = $container; - - if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - return parent::setContainer($container); - } - - return null; - } -} diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php deleted file mode 100644 index 2a1b565..0000000 --- a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Test; - -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\ServiceLocatorTrait; - -abstract class ServiceLocatorTest extends TestCase -{ - /** - * @return ContainerInterface - */ - protected function getServiceLocator(array $factories) - { - return new class($factories) implements ContainerInterface { - use ServiceLocatorTrait; - }; - } - - public function testHas() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - function () { return 'dummy'; }, - ]); - - $this->assertTrue($locator->has('foo')); - $this->assertTrue($locator->has('bar')); - $this->assertFalse($locator->has('dummy')); - } - - public function testGet() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('baz', $locator->get('bar')); - } - - public function testGetDoesNotMemoize() - { - $i = 0; - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$i) { - ++$i; - - return 'bar'; - }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame(2, $i); - } - - public function testThrowsOnUndefinedInternalService() - { - if (!$this->getExpectedException()) { - $this->expectException(\Psr\Container\NotFoundExceptionInterface::class); - $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); - } - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); - } - - public function testThrowsOnCircularReference() - { - $this->expectException(\Psr\Container\ContainerExceptionInterface::class); - $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - 'bar' => function () use (&$locator) { return $locator->get('baz'); }, - 'baz' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); - } -} diff --git a/vendor/symfony/service-contracts/composer.json b/vendor/symfony/service-contracts/composer.json deleted file mode 100644 index f058637..0000000 --- a/vendor/symfony/service-contracts/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/service-contracts", - "type": "library", - "description": "Generic abstractions related to writing services", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Service\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/string/AbstractString.php b/vendor/symfony/string/AbstractString.php deleted file mode 100644 index cf21fef..0000000 --- a/vendor/symfony/string/AbstractString.php +++ /dev/null @@ -1,795 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a string of abstract characters. - * - * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters). - * This class is the abstract type to use as a type-hint when the logic you want to - * implement doesn't care about the exact variant it deals with. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -abstract class AbstractString implements \Stringable, \JsonSerializable -{ - public const PREG_PATTERN_ORDER = \PREG_PATTERN_ORDER; - public const PREG_SET_ORDER = \PREG_SET_ORDER; - public const PREG_OFFSET_CAPTURE = \PREG_OFFSET_CAPTURE; - public const PREG_UNMATCHED_AS_NULL = \PREG_UNMATCHED_AS_NULL; - - public const PREG_SPLIT = 0; - public const PREG_SPLIT_NO_EMPTY = \PREG_SPLIT_NO_EMPTY; - public const PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE; - public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE; - - protected $string = ''; - protected $ignoreCase = false; - - abstract public function __construct(string $string = ''); - - /** - * Unwraps instances of AbstractString back to strings. - * - * @return string[]|array - */ - public static function unwrap(array $values): array - { - foreach ($values as $k => $v) { - if ($v instanceof self) { - $values[$k] = $v->__toString(); - } elseif (\is_array($v) && $values[$k] !== $v = static::unwrap($v)) { - $values[$k] = $v; - } - } - - return $values; - } - - /** - * Wraps (and normalizes) strings in instances of AbstractString. - * - * @return static[]|array - */ - public static function wrap(array $values): array - { - $i = 0; - $keys = null; - - foreach ($values as $k => $v) { - if (\is_string($k) && '' !== $k && $k !== $j = (string) new static($k)) { - $keys = $keys ?? array_keys($values); - $keys[$i] = $j; - } - - if (\is_string($v)) { - $values[$k] = new static($v); - } elseif (\is_array($v) && $values[$k] !== $v = static::wrap($v)) { - $values[$k] = $v; - } - - ++$i; - } - - return null !== $keys ? array_combine($keys, $values) : $values; - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function after($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = \PHP_INT_MAX; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOf($n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - $str->string = $n; - } - } - - if (\PHP_INT_MAX === $i) { - return $str; - } - - if (!$includeNeedle) { - $i += $str->length(); - } - - return $this->slice($i); - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function afterLast($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = null; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOfLast($n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - $str->string = $n; - } - } - - if (null === $i) { - return $str; - } - - if (!$includeNeedle) { - $i += $str->length(); - } - - return $this->slice($i); - } - - /** - * @return static - */ - abstract public function append(string ...$suffix): self; - - /** - * @param string|string[] $needle - * - * @return static - */ - public function before($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = \PHP_INT_MAX; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOf($n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - $str->string = $n; - } - } - - if (\PHP_INT_MAX === $i) { - return $str; - } - - if ($includeNeedle) { - $i += $str->length(); - } - - return $this->slice(0, $i); - } - - /** - * @param string|string[] $needle - * - * @return static - */ - public function beforeLast($needle, bool $includeNeedle = false, int $offset = 0): self - { - $str = clone $this; - $i = null; - - foreach ((array) $needle as $n) { - $n = (string) $n; - $j = $this->indexOfLast($n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - $str->string = $n; - } - } - - if (null === $i) { - return $str; - } - - if ($includeNeedle) { - $i += $str->length(); - } - - return $this->slice(0, $i); - } - - /** - * @return int[] - */ - public function bytesAt(int $offset): array - { - $str = $this->slice($offset, 1); - - return '' === $str->string ? [] : array_values(unpack('C*', $str->string)); - } - - /** - * @return static - */ - abstract public function camel(): self; - - /** - * @return static[] - */ - abstract public function chunk(int $length = 1): array; - - /** - * @return static - */ - public function collapseWhitespace(): self - { - $str = clone $this; - $str->string = trim(preg_replace('/(?:\s{2,}+|[^\S ])/', ' ', $str->string)); - - return $str; - } - - /** - * @param string|string[] $needle - */ - public function containsAny($needle): bool - { - return null !== $this->indexOf($needle); - } - - /** - * @param string|string[] $suffix - */ - public function endsWith($suffix): bool - { - if (!\is_array($suffix) && !$suffix instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($suffix as $s) { - if ($this->endsWith((string) $s)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - public function ensureEnd(string $suffix): self - { - if (!$this->endsWith($suffix)) { - return $this->append($suffix); - } - - $suffix = preg_quote($suffix); - $regex = '{('.$suffix.')(?:'.$suffix.')++$}D'; - - return $this->replaceMatches($regex.($this->ignoreCase ? 'i' : ''), '$1'); - } - - /** - * @return static - */ - public function ensureStart(string $prefix): self - { - $prefix = new static($prefix); - - if (!$this->startsWith($prefix)) { - return $this->prepend($prefix); - } - - $str = clone $this; - $i = $prefixLen = $prefix->length(); - - while ($this->indexOf($prefix, $i) === $i) { - $str = $str->slice($prefixLen); - $i += $prefixLen; - } - - return $str; - } - - /** - * @param string|string[] $string - */ - public function equalsTo($string): bool - { - if (!\is_array($string) && !$string instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($string as $s) { - if ($this->equalsTo((string) $s)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - abstract public function folded(): self; - - /** - * @return static - */ - public function ignoreCase(): self - { - $str = clone $this; - $str->ignoreCase = true; - - return $str; - } - - /** - * @param string|string[] $needle - */ - public function indexOf($needle, int $offset = 0): ?int - { - if (!\is_array($needle) && !$needle instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - $i = \PHP_INT_MAX; - - foreach ($needle as $n) { - $j = $this->indexOf((string) $n, $offset); - - if (null !== $j && $j < $i) { - $i = $j; - } - } - - return \PHP_INT_MAX === $i ? null : $i; - } - - /** - * @param string|string[] $needle - */ - public function indexOfLast($needle, int $offset = 0): ?int - { - if (!\is_array($needle) && !$needle instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - $i = null; - - foreach ($needle as $n) { - $j = $this->indexOfLast((string) $n, $offset); - - if (null !== $j && $j >= $i) { - $i = $offset = $j; - } - } - - return $i; - } - - public function isEmpty(): bool - { - return '' === $this->string; - } - - /** - * @return static - */ - abstract public function join(array $strings, string $lastGlue = null): self; - - public function jsonSerialize(): string - { - return $this->string; - } - - abstract public function length(): int; - - /** - * @return static - */ - abstract public function lower(): self; - - /** - * Matches the string using a regular expression. - * - * Pass PREG_PATTERN_ORDER or PREG_SET_ORDER as $flags to get all occurrences matching the regular expression. - * - * @return array All matches in a multi-dimensional array ordered according to flags - */ - abstract public function match(string $regexp, int $flags = 0, int $offset = 0): array; - - /** - * @return static - */ - abstract public function padBoth(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function padEnd(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function padStart(int $length, string $padStr = ' '): self; - - /** - * @return static - */ - abstract public function prepend(string ...$prefix): self; - - /** - * @return static - */ - public function repeat(int $multiplier): self - { - if (0 > $multiplier) { - throw new InvalidArgumentException(sprintf('Multiplier must be positive, %d given.', $multiplier)); - } - - $str = clone $this; - $str->string = str_repeat($str->string, $multiplier); - - return $str; - } - - /** - * @return static - */ - abstract public function replace(string $from, string $to): self; - - /** - * @param string|callable $to - * - * @return static - */ - abstract public function replaceMatches(string $fromRegexp, $to): self; - - /** - * @return static - */ - abstract public function reverse(): self; - - /** - * @return static - */ - abstract public function slice(int $start = 0, int $length = null): self; - - /** - * @return static - */ - abstract public function snake(): self; - - /** - * @return static - */ - abstract public function splice(string $replacement, int $start = 0, int $length = null): self; - - /** - * @return static[] - */ - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (null === $flags) { - throw new \TypeError('Split behavior when $flags is null must be implemented by child classes.'); - } - - if ($this->ignoreCase) { - $delimiter .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $chunks = preg_split($delimiter, $this->string, $limit, $flags)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Splitting failed with '.$k.'.'); - } - } - - throw new RuntimeException('Splitting failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - - if (self::PREG_SPLIT_OFFSET_CAPTURE & $flags) { - foreach ($chunks as &$chunk) { - $str->string = $chunk[0]; - $chunk[0] = clone $str; - } - } else { - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - } - - return $chunks; - } - - /** - * @param string|string[] $prefix - */ - public function startsWith($prefix): bool - { - if (!\is_array($prefix) && !$prefix instanceof \Traversable) { - throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); - } - - foreach ($prefix as $prefix) { - if ($this->startsWith((string) $prefix)) { - return true; - } - } - - return false; - } - - /** - * @return static - */ - abstract public function title(bool $allWords = false): self; - - public function toByteString(string $toEncoding = null): ByteString - { - $b = new ByteString(); - - $toEncoding = \in_array($toEncoding, ['utf8', 'utf-8', 'UTF8'], true) ? 'UTF-8' : $toEncoding; - - if (null === $toEncoding || $toEncoding === $fromEncoding = $this instanceof AbstractUnicodeString || preg_match('//u', $b->string) ? 'UTF-8' : 'Windows-1252') { - $b->string = $this->string; - - return $b; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - try { - $b->string = mb_convert_encoding($this->string, $toEncoding, 'UTF-8'); - } catch (InvalidArgumentException $e) { - if (!\function_exists('iconv')) { - throw $e; - } - - $b->string = iconv('UTF-8', $toEncoding, $this->string); - } - } finally { - restore_error_handler(); - } - - return $b; - } - - public function toCodePointString(): CodePointString - { - return new CodePointString($this->string); - } - - public function toString(): string - { - return $this->string; - } - - public function toUnicodeString(): UnicodeString - { - return new UnicodeString($this->string); - } - - /** - * @return static - */ - abstract public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @return static - */ - abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @param string|string[] $prefix - * - * @return static - */ - public function trimPrefix($prefix): self - { - if (\is_array($prefix) || $prefix instanceof \Traversable) { - foreach ($prefix as $s) { - $t = $this->trimPrefix($s); - - if ($t->string !== $this->string) { - return $t; - } - } - - return clone $this; - } - - $str = clone $this; - - if ($prefix instanceof self) { - $prefix = $prefix->string; - } else { - $prefix = (string) $prefix; - } - - if ('' !== $prefix && \strlen($this->string) >= \strlen($prefix) && 0 === substr_compare($this->string, $prefix, 0, \strlen($prefix), $this->ignoreCase)) { - $str->string = substr($this->string, \strlen($prefix)); - } - - return $str; - } - - /** - * @return static - */ - abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; - - /** - * @param string|string[] $suffix - * - * @return static - */ - public function trimSuffix($suffix): self - { - if (\is_array($suffix) || $suffix instanceof \Traversable) { - foreach ($suffix as $s) { - $t = $this->trimSuffix($s); - - if ($t->string !== $this->string) { - return $t; - } - } - - return clone $this; - } - - $str = clone $this; - - if ($suffix instanceof self) { - $suffix = $suffix->string; - } else { - $suffix = (string) $suffix; - } - - if ('' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase)) { - $str->string = substr($this->string, 0, -\strlen($suffix)); - } - - return $str; - } - - /** - * @return static - */ - public function truncate(int $length, string $ellipsis = '', bool $cut = true): self - { - $stringLength = $this->length(); - - if ($stringLength <= $length) { - return clone $this; - } - - $ellipsisLength = '' !== $ellipsis ? (new static($ellipsis))->length() : 0; - - if ($length < $ellipsisLength) { - $ellipsisLength = 0; - } - - if (!$cut) { - if (null === $length = $this->indexOf([' ', "\r", "\n", "\t"], ($length ?: 1) - 1)) { - return clone $this; - } - - $length += $ellipsisLength; - } - - $str = $this->slice(0, $length - $ellipsisLength); - - return $ellipsisLength ? $str->trimEnd()->append($ellipsis) : $str; - } - - /** - * @return static - */ - abstract public function upper(): self; - - /** - * Returns the printable length on a terminal. - */ - abstract public function width(bool $ignoreAnsiDecoration = true): int; - - /** - * @return static - */ - public function wordwrap(int $width = 75, string $break = "\n", bool $cut = false): self - { - $lines = '' !== $break ? $this->split($break) : [clone $this]; - $chars = []; - $mask = ''; - - if (1 === \count($lines) && '' === $lines[0]->string) { - return $lines[0]; - } - - foreach ($lines as $i => $line) { - if ($i) { - $chars[] = $break; - $mask .= '#'; - } - - foreach ($line->chunk() as $char) { - $chars[] = $char->string; - $mask .= ' ' === $char->string ? ' ' : '?'; - } - } - - $string = ''; - $j = 0; - $b = $i = -1; - $mask = wordwrap($mask, $width, '#', $cut); - - while (false !== $b = strpos($mask, '#', $b + 1)) { - for (++$i; $i < $b; ++$i) { - $string .= $chars[$j]; - unset($chars[$j++]); - } - - if ($break === $chars[$j] || ' ' === $chars[$j]) { - unset($chars[$j++]); - } - - $string .= $break; - } - - $str = clone $this; - $str->string = $string.implode('', $chars); - - return $str; - } - - public function __sleep(): array - { - return ['string']; - } - - public function __clone() - { - $this->ignoreCase = false; - } - - public function __toString(): string - { - return $this->string; - } -} diff --git a/vendor/symfony/string/AbstractUnicodeString.php b/vendor/symfony/string/AbstractUnicodeString.php deleted file mode 100644 index db810cb..0000000 --- a/vendor/symfony/string/AbstractUnicodeString.php +++ /dev/null @@ -1,620 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a string of abstract Unicode characters. - * - * Unicode defines 3 types of "characters" (bytes, code points and grapheme clusters). - * This class is the abstract type to use as a type-hint when the logic you want to - * implement is Unicode-aware but doesn't care about code points vs grapheme clusters. - * - * @author Nicolas Grekas - * - * @throws ExceptionInterface - */ -abstract class AbstractUnicodeString extends AbstractString -{ - public const NFC = \Normalizer::NFC; - public const NFD = \Normalizer::NFD; - public const NFKC = \Normalizer::NFKC; - public const NFKD = \Normalizer::NFKD; - - // all ASCII letters sorted by typical frequency of occurrence - private const ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - // the subset of folded case mappings that is not in lower case mappings - private const FOLD_FROM = ['İ', 'µ', 'ſ', "\xCD\x85", 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', "\xE1\xBE\xBE", 'ß', 'İ', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'և', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ẞ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'ᾐ', 'ᾑ', 'ᾒ', 'ᾓ', 'ᾔ', 'ᾕ', 'ᾖ', 'ᾗ', 'ᾘ', 'ᾙ', 'ᾚ', 'ᾛ', 'ᾜ', 'ᾝ', 'ᾞ', 'ᾟ', 'ᾠ', 'ᾡ', 'ᾢ', 'ᾣ', 'ᾤ', 'ᾥ', 'ᾦ', 'ᾧ', 'ᾨ', 'ᾩ', 'ᾪ', 'ᾫ', 'ᾬ', 'ᾭ', 'ᾮ', 'ᾯ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'ᾼ', 'ῂ', 'ῃ', 'ῄ', 'ῆ', 'ῇ', 'ῌ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῲ', 'ῳ', 'ῴ', 'ῶ', 'ῷ', 'ῼ', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ']; - private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'i̇', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ']; - - // the subset of upper case mappings that map one code point to many code points - private const UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ']; - private const UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂']; - - // the subset of https://github.com/unicode-org/cldr/blob/master/common/transforms/Latin-ASCII.xml that is not in NFKD - private const TRANSLIT_FROM = ['Æ', 'Ð', 'Ø', 'Þ', 'ß', 'æ', 'ð', 'ø', 'þ', 'Đ', 'đ', 'Ħ', 'ħ', 'ı', 'ĸ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'ʼn', 'Ŋ', 'ŋ', 'Œ', 'œ', 'Ŧ', 'ŧ', 'ƀ', 'Ɓ', 'Ƃ', 'ƃ', 'Ƈ', 'ƈ', 'Ɖ', 'Ɗ', 'Ƌ', 'ƌ', 'Ɛ', 'Ƒ', 'ƒ', 'Ɠ', 'ƕ', 'Ɩ', 'Ɨ', 'Ƙ', 'ƙ', 'ƚ', 'Ɲ', 'ƞ', 'Ƣ', 'ƣ', 'Ƥ', 'ƥ', 'ƫ', 'Ƭ', 'ƭ', 'Ʈ', 'Ʋ', 'Ƴ', 'ƴ', 'Ƶ', 'ƶ', 'DŽ', 'Dž', 'dž', 'Ǥ', 'ǥ', 'ȡ', 'Ȥ', 'ȥ', 'ȴ', 'ȵ', 'ȶ', 'ȷ', 'ȸ', 'ȹ', 'Ⱥ', 'Ȼ', 'ȼ', 'Ƚ', 'Ⱦ', 'ȿ', 'ɀ', 'Ƀ', 'Ʉ', 'Ɇ', 'ɇ', 'Ɉ', 'ɉ', 'Ɍ', 'ɍ', 'Ɏ', 'ɏ', 'ɓ', 'ɕ', 'ɖ', 'ɗ', 'ɛ', 'ɟ', 'ɠ', 'ɡ', 'ɢ', 'ɦ', 'ɧ', 'ɨ', 'ɪ', 'ɫ', 'ɬ', 'ɭ', 'ɱ', 'ɲ', 'ɳ', 'ɴ', 'ɶ', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆']; - private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))']; - - private static $transliterators = []; - private static $tableZero; - private static $tableWide; - - /** - * @return static - */ - public static function fromCodePoints(int ...$codes): self - { - $string = ''; - - foreach ($codes as $code) { - if (0x80 > $code %= 0x200000) { - $string .= \chr($code); - } elseif (0x800 > $code) { - $string .= \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $string .= \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $string .= \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - } - - return new static($string); - } - - /** - * Generic UTF-8 to ASCII transliteration. - * - * Install the intl extension for best results. - * - * @param string[]|\Transliterator[]|\Closure[] $rules See "*-Latin" rules from Transliterator::listIDs() - */ - public function ascii(array $rules = []): self - { - $str = clone $this; - $s = $str->string; - $str->string = ''; - - array_unshift($rules, 'nfd'); - $rules[] = 'latin-ascii'; - - if (\function_exists('transliterator_transliterate')) { - $rules[] = 'any-latin/bgn'; - } - - $rules[] = 'nfkd'; - $rules[] = '[:nonspacing mark:] remove'; - - while (\strlen($s) - 1 > $i = strspn($s, self::ASCII)) { - if (0 < --$i) { - $str->string .= substr($s, 0, $i); - $s = substr($s, $i); - } - - if (!$rule = array_shift($rules)) { - $rules = []; // An empty rule interrupts the next ones - } - - if ($rule instanceof \Transliterator) { - $s = $rule->transliterate($s); - } elseif ($rule instanceof \Closure) { - $s = $rule($s); - } elseif ($rule) { - if ('nfd' === $rule = strtolower($rule)) { - normalizer_is_normalized($s, self::NFD) ?: $s = normalizer_normalize($s, self::NFD); - } elseif ('nfkd' === $rule) { - normalizer_is_normalized($s, self::NFKD) ?: $s = normalizer_normalize($s, self::NFKD); - } elseif ('[:nonspacing mark:] remove' === $rule) { - $s = preg_replace('/\p{Mn}++/u', '', $s); - } elseif ('latin-ascii' === $rule) { - $s = str_replace(self::TRANSLIT_FROM, self::TRANSLIT_TO, $s); - } elseif ('de-ascii' === $rule) { - $s = preg_replace("/([AUO])\u{0308}(?=\p{Ll})/u", '$1e', $s); - $s = str_replace(["a\u{0308}", "o\u{0308}", "u\u{0308}", "A\u{0308}", "O\u{0308}", "U\u{0308}"], ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], $s); - } elseif (\function_exists('transliterator_transliterate')) { - if (null === $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule)) { - if ('any-latin/bgn' === $rule) { - $rule = 'any-latin'; - $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule); - } - - if (null === $transliterator) { - throw new InvalidArgumentException(sprintf('Unknown transliteration rule "%s".', $rule)); - } - - self::$transliterators['any-latin/bgn'] = $transliterator; - } - - $s = $transliterator->transliterate($s); - } - } elseif (!\function_exists('iconv')) { - $s = preg_replace('/[^\x00-\x7F]/u', '?', $s); - } else { - $s = @preg_replace_callback('/[^\x00-\x7F]/u', static function ($c) { - $c = (string) iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]); - - if ('' === $c && '' === iconv('UTF-8', 'ASCII//TRANSLIT', '²')) { - throw new \LogicException(sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class)); - } - - return 1 < \strlen($c) ? ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?'); - }, $s); - } - } - - $str->string .= $s; - - return $str; - } - - public function camel(): parent - { - $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) { - return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); - }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); - - return $str; - } - - /** - * @return int[] - */ - public function codePointsAt(int $offset): array - { - $str = $this->slice($offset, 1); - - if ('' === $str->string) { - return []; - } - - $codePoints = []; - - foreach (preg_split('//u', $str->string, -1, \PREG_SPLIT_NO_EMPTY) as $c) { - $codePoints[] = mb_ord($c, 'UTF-8'); - } - - return $codePoints; - } - - public function folded(bool $compat = true): parent - { - $str = clone $this; - - if (!$compat || \PHP_VERSION_ID < 70300 || !\defined('Normalizer::NFKC_CF')) { - $str->string = normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC); - $str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $this->string), 'UTF-8'); - } else { - $str->string = normalizer_normalize($str->string, \Normalizer::NFKC_CF); - } - - return $str; - } - - public function join(array $strings, string $lastGlue = null): parent - { - $str = clone $this; - - $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue.array_pop($strings) : ''; - $str->string = implode($this->string, $strings).$tail; - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function lower(): parent - { - $str = clone $this; - $str->string = mb_strtolower(str_replace('İ', 'i̇', $str->string), 'UTF-8'); - - return $str; - } - - public function match(string $regexp, int $flags = 0, int $offset = 0): array - { - $match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match'; - - if ($this->ignoreCase) { - $regexp .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $match($regexp.'u', $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - return $matches; - } - - /** - * @return static - */ - public function normalize(int $form = self::NFC): self - { - if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD])) { - throw new InvalidArgumentException('Unsupported normalization form.'); - } - - $str = clone $this; - normalizer_is_normalized($str->string, $form) ?: $str->string = normalizer_normalize($str->string, $form); - - return $str; - } - - public function padBoth(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_BOTH); - } - - public function padEnd(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_RIGHT); - } - - public function padStart(int $length, string $padStr = ' '): parent - { - if ('' === $padStr || !preg_match('//u', $padStr)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $pad = clone $this; - $pad->string = $padStr; - - return $this->pad($length, $pad, \STR_PAD_LEFT); - } - - public function replaceMatches(string $fromRegexp, $to): parent - { - if ($this->ignoreCase) { - $fromRegexp .= 'i'; - } - - if (\is_array($to) || $to instanceof \Closure) { - if (!\is_callable($to)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); - } - - $replace = 'preg_replace_callback'; - $to = static function (array $m) use ($to): string { - $to = $to($m); - - if ('' !== $to && (!\is_string($to) || !preg_match('//u', $to))) { - throw new InvalidArgumentException('Replace callback must return a valid UTF-8 string.'); - } - - return $to; - }; - } elseif ('' !== $to && !preg_match('//u', $to)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } else { - $replace = 'preg_replace'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (null === $string = $replace($fromRegexp.'u', $to, $this->string)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - $str->string = $string; - - return $str; - } - - public function reverse(): parent - { - $str = clone $this; - $str->string = implode('', array_reverse(preg_split('/(\X)/u', $str->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY))); - - return $str; - } - - public function snake(): parent - { - $str = $this->camel()->title(); - $str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8'); - - return $str; - } - - public function title(bool $allWords = false): parent - { - $str = clone $this; - - $limit = $allWords ? -1 : 1; - - $str->string = preg_replace_callback('/\b./u', static function (array $m): string { - return mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); - }, $str->string, $limit); - - return $str; - } - - public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{^[$chars]++|[$chars]++$}uD", '', $str->string); - - return $str; - } - - public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{[$chars]++$}uD", '', $str->string); - - return $str; - } - - public function trimPrefix($prefix): parent - { - if (!$this->ignoreCase) { - return parent::trimPrefix($prefix); - } - - $str = clone $this; - - if ($prefix instanceof \Traversable) { - $prefix = iterator_to_array($prefix, false); - } elseif ($prefix instanceof parent) { - $prefix = $prefix->string; - } - - $prefix = implode('|', array_map('preg_quote', (array) $prefix)); - $str->string = preg_replace("{^(?:$prefix)}iuD", '', $this->string); - - return $str; - } - - public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent - { - if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { - throw new InvalidArgumentException('Invalid UTF-8 chars.'); - } - $chars = preg_quote($chars); - - $str = clone $this; - $str->string = preg_replace("{^[$chars]++}uD", '', $str->string); - - return $str; - } - - public function trimSuffix($suffix): parent - { - if (!$this->ignoreCase) { - return parent::trimSuffix($suffix); - } - - $str = clone $this; - - if ($suffix instanceof \Traversable) { - $suffix = iterator_to_array($suffix, false); - } elseif ($suffix instanceof parent) { - $suffix = $suffix->string; - } - - $suffix = implode('|', array_map('preg_quote', (array) $suffix)); - $str->string = preg_replace("{(?:$suffix)$}iuD", '', $this->string); - - return $str; - } - - public function upper(): parent - { - $str = clone $this; - $str->string = mb_strtoupper($str->string, 'UTF-8'); - - if (\PHP_VERSION_ID < 70300) { - $str->string = str_replace(self::UPPER_FROM, self::UPPER_TO, $str->string); - } - - return $str; - } - - public function width(bool $ignoreAnsiDecoration = true): int - { - $width = 0; - $s = str_replace(["\x00", "\x05", "\x07"], '', $this->string); - - if (false !== strpos($s, "\r")) { - $s = str_replace(["\r\n", "\r"], "\n", $s); - } - - if (!$ignoreAnsiDecoration) { - $s = preg_replace('/[\p{Cc}\x7F]++/u', '', $s); - } - - foreach (explode("\n", $s) as $s) { - if ($ignoreAnsiDecoration) { - $s = preg_replace('/(?:\x1B(?: - \[ [\x30-\x3F]*+ [\x20-\x2F]*+ [0x40-\x7E] - | [P\]X^_] .*? \x1B\\\\ - | [\x41-\x7E] - )|[\p{Cc}\x7F]++)/xu', '', $s); - } - - // Non printable characters have been dropped, so wcswidth cannot logically return -1. - $width += $this->wcswidth($s); - } - - return $width; - } - - /** - * @return static - */ - private function pad(int $len, self $pad, int $type): parent - { - $sLen = $this->length(); - - if ($len <= $sLen) { - return clone $this; - } - - $padLen = $pad->length(); - $freeLen = $len - $sLen; - $len = $freeLen % $padLen; - - switch ($type) { - case \STR_PAD_RIGHT: - return $this->append(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - case \STR_PAD_LEFT: - return $this->prepend(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - case \STR_PAD_BOTH: - $freeLen /= 2; - - $rightLen = ceil($freeLen); - $len = $rightLen % $padLen; - $str = $this->append(str_repeat($pad->string, intdiv($rightLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - $leftLen = floor($freeLen); - $len = $leftLen % $padLen; - - return $str->prepend(str_repeat($pad->string, intdiv($leftLen, $padLen)).($len ? $pad->slice(0, $len) : '')); - - default: - throw new InvalidArgumentException('Invalid padding type.'); - } - } - - /** - * Based on https://github.com/jquast/wcwidth, a Python implementation of https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c. - */ - private function wcswidth(string $string): int - { - $width = 0; - - foreach (preg_split('//u', $string, -1, \PREG_SPLIT_NO_EMPTY) as $c) { - $codePoint = mb_ord($c, 'UTF-8'); - - if (0 === $codePoint // NULL - || 0x034F === $codePoint // COMBINING GRAPHEME JOINER - || (0x200B <= $codePoint && 0x200F >= $codePoint) // ZERO WIDTH SPACE to RIGHT-TO-LEFT MARK - || 0x2028 === $codePoint // LINE SEPARATOR - || 0x2029 === $codePoint // PARAGRAPH SEPARATOR - || (0x202A <= $codePoint && 0x202E >= $codePoint) // LEFT-TO-RIGHT EMBEDDING to RIGHT-TO-LEFT OVERRIDE - || (0x2060 <= $codePoint && 0x2063 >= $codePoint) // WORD JOINER to INVISIBLE SEPARATOR - ) { - continue; - } - - // Non printable characters - if (32 > $codePoint // C0 control characters - || (0x07F <= $codePoint && 0x0A0 > $codePoint) // C1 control characters and DEL - ) { - return -1; - } - - if (null === self::$tableZero) { - self::$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php'; - } - - if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) { - $lbound = 0; - while ($ubound >= $lbound) { - $mid = floor(($lbound + $ubound) / 2); - - if ($codePoint > self::$tableZero[$mid][1]) { - $lbound = $mid + 1; - } elseif ($codePoint < self::$tableZero[$mid][0]) { - $ubound = $mid - 1; - } else { - continue 2; - } - } - } - - if (null === self::$tableWide) { - self::$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php'; - } - - if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) { - $lbound = 0; - while ($ubound >= $lbound) { - $mid = floor(($lbound + $ubound) / 2); - - if ($codePoint > self::$tableWide[$mid][1]) { - $lbound = $mid + 1; - } elseif ($codePoint < self::$tableWide[$mid][0]) { - $ubound = $mid - 1; - } else { - $width += 2; - - continue 2; - } - } - } - - ++$width; - } - - return $width; - } -} diff --git a/vendor/symfony/string/ByteString.php b/vendor/symfony/string/ByteString.php deleted file mode 100644 index bbf8614..0000000 --- a/vendor/symfony/string/ByteString.php +++ /dev/null @@ -1,506 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; -use Symfony\Component\String\Exception\RuntimeException; - -/** - * Represents a binary-safe string of bytes. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class ByteString extends AbstractString -{ - private const ALPHABET_ALPHANUMERIC = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; - - public function __construct(string $string = '') - { - $this->string = $string; - } - - /* - * The following method was derived from code of the Hack Standard Library (v4.40 - 2020-05-03) - * - * https://github.com/hhvm/hsl/blob/80a42c02f036f72a42f0415e80d6b847f4bf62d5/src/random/private.php#L16 - * - * Code subject to the MIT license (https://github.com/hhvm/hsl/blob/master/LICENSE). - * - * Copyright (c) 2004-2020, Facebook, Inc. (https://www.facebook.com/) - */ - - public static function fromRandom(int $length = 16, string $alphabet = null): self - { - if ($length <= 0) { - throw new InvalidArgumentException(sprintf('A strictly positive length is expected, "%d" given.', $length)); - } - - $alphabet = $alphabet ?? self::ALPHABET_ALPHANUMERIC; - $alphabetSize = \strlen($alphabet); - $bits = (int) ceil(log($alphabetSize, 2.0)); - if ($bits <= 0 || $bits > 56) { - throw new InvalidArgumentException('The length of the alphabet must in the [2^1, 2^56] range.'); - } - - $ret = ''; - while ($length > 0) { - $urandomLength = (int) ceil(2 * $length * $bits / 8.0); - $data = random_bytes($urandomLength); - $unpackedData = 0; - $unpackedBits = 0; - for ($i = 0; $i < $urandomLength && $length > 0; ++$i) { - // Unpack 8 bits - $unpackedData = ($unpackedData << 8) | \ord($data[$i]); - $unpackedBits += 8; - - // While we have enough bits to select a character from the alphabet, keep - // consuming the random data - for (; $unpackedBits >= $bits && $length > 0; $unpackedBits -= $bits) { - $index = ($unpackedData & ((1 << $bits) - 1)); - $unpackedData >>= $bits; - // Unfortunately, the alphabet size is not necessarily a power of two. - // Worst case, it is 2^k + 1, which means we need (k+1) bits and we - // have around a 50% chance of missing as k gets larger - if ($index < $alphabetSize) { - $ret .= $alphabet[$index]; - --$length; - } - } - } - } - - return new static($ret); - } - - public function bytesAt(int $offset): array - { - $str = $this->string[$offset] ?? ''; - - return '' === $str ? [] : [\ord($str)]; - } - - public function append(string ...$suffix): parent - { - $str = clone $this; - $str->string .= 1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix); - - return $str; - } - - public function camel(): parent - { - $str = clone $this; - $str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $str = clone $this; - $chunks = []; - - foreach (str_split($this->string, $length) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof parent) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - return '' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase); - } - - public function equalsTo($string): bool - { - if ($string instanceof parent) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - if ('' !== $string && $this->ignoreCase) { - return 0 === strcasecmp($string, $this->string); - } - - return $string === $this->string; - } - - public function folded(): parent - { - $str = clone $this; - $str->string = strtolower($str->string); - - return $str; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof parent) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? stripos($this->string, $needle, $offset) : strpos($this->string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof parent) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? strripos($this->string, $needle, $offset) : strrpos($this->string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function isUtf8(): bool - { - return '' === $this->string || preg_match('//u', $this->string); - } - - public function join(array $strings, string $lastGlue = null): parent - { - $str = clone $this; - - $tail = null !== $lastGlue && 1 < \count($strings) ? $lastGlue.array_pop($strings) : ''; - $str->string = implode($this->string, $strings).$tail; - - return $str; - } - - public function length(): int - { - return \strlen($this->string); - } - - public function lower(): parent - { - $str = clone $this; - $str->string = strtolower($str->string); - - return $str; - } - - public function match(string $regexp, int $flags = 0, int $offset = 0): array - { - $match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match'; - - if ($this->ignoreCase) { - $regexp .= 'i'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (false === $match($regexp, $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - return $matches; - } - - public function padBoth(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_BOTH); - - return $str; - } - - public function padEnd(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_RIGHT); - - return $str; - } - - public function padStart(int $length, string $padStr = ' '): parent - { - $str = clone $this; - $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_LEFT); - - return $str; - } - - public function prepend(string ...$prefix): parent - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$str->string; - - return $str; - } - - public function replace(string $from, string $to): parent - { - $str = clone $this; - - if ('' !== $from) { - $str->string = $this->ignoreCase ? str_ireplace($from, $to, $this->string) : str_replace($from, $to, $this->string); - } - - return $str; - } - - public function replaceMatches(string $fromRegexp, $to): parent - { - if ($this->ignoreCase) { - $fromRegexp .= 'i'; - } - - if (\is_array($to)) { - if (!\is_callable($to)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); - } - - $replace = 'preg_replace_callback'; - } else { - $replace = $to instanceof \Closure ? 'preg_replace_callback' : 'preg_replace'; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - if (null === $string = $replace($fromRegexp, $to, $this->string)) { - $lastError = preg_last_error(); - - foreach (get_defined_constants(true)['pcre'] as $k => $v) { - if ($lastError === $v && '_ERROR' === substr($k, -6)) { - throw new RuntimeException('Matching failed with '.$k.'.'); - } - } - - throw new RuntimeException('Matching failed with unknown error code.'); - } - } finally { - restore_error_handler(); - } - - $str = clone $this; - $str->string = $string; - - return $str; - } - - public function reverse(): parent - { - $str = clone $this; - $str->string = strrev($str->string); - - return $str; - } - - public function slice(int $start = 0, int $length = null): parent - { - $str = clone $this; - $str->string = (string) substr($this->string, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function snake(): parent - { - $str = $this->camel()->title(); - $str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string)); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): parent - { - $str = clone $this; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? \PHP_INT_MAX) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter, $limit, $flags); - } - - $str = clone $this; - $chunks = $this->ignoreCase - ? preg_split('{'.preg_quote($delimiter).'}iD', $this->string, $limit) - : explode($delimiter, $this->string, $limit); - - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof parent) { - $prefix = $prefix->string; - } elseif (!\is_string($prefix)) { - return parent::startsWith($prefix); - } - - return '' !== $prefix && 0 === ($this->ignoreCase ? strncasecmp($this->string, $prefix, \strlen($prefix)) : strncmp($this->string, $prefix, \strlen($prefix))); - } - - public function title(bool $allWords = false): parent - { - $str = clone $this; - $str->string = $allWords ? ucwords($str->string) : ucfirst($str->string); - - return $str; - } - - public function toUnicodeString(string $fromEncoding = null): UnicodeString - { - return new UnicodeString($this->toCodePointString($fromEncoding)->string); - } - - public function toCodePointString(string $fromEncoding = null): CodePointString - { - $u = new CodePointString(); - - if (\in_array($fromEncoding, [null, 'utf8', 'utf-8', 'UTF8', 'UTF-8'], true) && preg_match('//u', $this->string)) { - $u->string = $this->string; - - return $u; - } - - set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); - - try { - try { - $validEncoding = false !== mb_detect_encoding($this->string, $fromEncoding ?? 'Windows-1252', true); - } catch (InvalidArgumentException $e) { - if (!\function_exists('iconv')) { - throw $e; - } - - $u->string = iconv($fromEncoding ?? 'Windows-1252', 'UTF-8', $this->string); - - return $u; - } - } finally { - restore_error_handler(); - } - - if (!$validEncoding) { - throw new InvalidArgumentException(sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252')); - } - - $u->string = mb_convert_encoding($this->string, 'UTF-8', $fromEncoding ?? 'Windows-1252'); - - return $u; - } - - public function trim(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = trim($str->string, $chars); - - return $str; - } - - public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = rtrim($str->string, $chars); - - return $str; - } - - public function trimStart(string $chars = " \t\n\r\0\x0B\x0C"): parent - { - $str = clone $this; - $str->string = ltrim($str->string, $chars); - - return $str; - } - - public function upper(): parent - { - $str = clone $this; - $str->string = strtoupper($str->string); - - return $str; - } - - public function width(bool $ignoreAnsiDecoration = true): int - { - $string = preg_match('//u', $this->string) ? $this->string : preg_replace('/[\x80-\xFF]/', '?', $this->string); - - return (new CodePointString($string))->width($ignoreAnsiDecoration); - } -} diff --git a/vendor/symfony/string/CHANGELOG.md b/vendor/symfony/string/CHANGELOG.md deleted file mode 100644 index 53af364..0000000 --- a/vendor/symfony/string/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add `trimSuffix()` and `trimPrefix()` methods - -5.3 ---- - - * Made `AsciiSlugger` fallback to parent locale's symbolsMap - -5.2.0 ------ - - * added a `FrenchInflector` class - -5.1.0 ------ - - * added the `AbstractString::reverse()` method - * made `AbstractString::width()` follow POSIX.1-2001 - * added `LazyString` which provides memoizing stringable objects - * The component is not marked as `@experimental` anymore - * added the `s()` helper method to get either an `UnicodeString` or `ByteString` instance, - depending of the input string UTF-8 compliancy - * added `$cut` parameter to `Symfony\Component\String\AbstractString::truncate()` - * added `AbstractString::containsAny()` - * allow passing a string of custom characters to `ByteString::fromRandom()` - -5.0.0 ------ - - * added the component as experimental diff --git a/vendor/symfony/string/CodePointString.php b/vendor/symfony/string/CodePointString.php deleted file mode 100644 index 8ab9209..0000000 --- a/vendor/symfony/string/CodePointString.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; - -/** - * Represents a string of Unicode code points encoded as UTF-8. - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class CodePointString extends AbstractUnicodeString -{ - public function __construct(string $string = '') - { - if ('' !== $string && !preg_match('//u', $string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $this->string = $string; - } - - public function append(string ...$suffix): AbstractString - { - $str = clone $this; - $str->string .= 1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix); - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $rx = '/('; - while (65535 < $length) { - $rx .= '.{65535}'; - $length -= 65535; - } - $rx .= '.{'.$length.'})/us'; - - $str = clone $this; - $chunks = []; - - foreach (preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function codePointsAt(int $offset): array - { - $str = $offset ? $this->slice($offset, 1) : $this; - - return '' === $str->string ? [] : [mb_ord($str->string, 'UTF-8')]; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof AbstractString) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - if ('' === $suffix || !preg_match('//u', $suffix)) { - return false; - } - - if ($this->ignoreCase) { - return preg_match('{'.preg_quote($suffix).'$}iuD', $this->string); - } - - return \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix)); - } - - public function equalsTo($string): bool - { - if ($string instanceof AbstractString) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - if ('' !== $string && $this->ignoreCase) { - return \strlen($string) === \strlen($this->string) && 0 === mb_stripos($this->string, $string, 0, 'UTF-8'); - } - - return $string === $this->string; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? mb_stripos($this->string, $needle, $offset, 'UTF-8') : mb_strpos($this->string, $needle, $offset, 'UTF-8'); - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - if ('' === $needle) { - return null; - } - - $i = $this->ignoreCase ? mb_strripos($this->string, $needle, $offset, 'UTF-8') : mb_strrpos($this->string, $needle, $offset, 'UTF-8'); - - return false === $i ? null : $i; - } - - public function length(): int - { - return mb_strlen($this->string, 'UTF-8'); - } - - public function prepend(string ...$prefix): AbstractString - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$this->string; - - if (!preg_match('//u', $str->string)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function replace(string $from, string $to): AbstractString - { - $str = clone $this; - - if ('' === $from || !preg_match('//u', $from)) { - return $str; - } - - if ('' !== $to && !preg_match('//u', $to)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - if ($this->ignoreCase) { - $str->string = implode($to, preg_split('{'.preg_quote($from).'}iuD', $this->string)); - } else { - $str->string = str_replace($from, $to, $this->string); - } - - return $str; - } - - public function slice(int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - $str->string = mb_substr($this->string, $start, $length, 'UTF-8'); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): AbstractString - { - if (!preg_match('//u', $replacement)) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - $str = clone $this; - $start = $start ? \strlen(mb_substr($this->string, 0, $start, 'UTF-8')) : 0; - $length = $length ? \strlen(mb_substr($this->string, $start, $length, 'UTF-8')) : $length; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX); - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? \PHP_INT_MAX) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter.'u', $limit, $flags); - } - - if (!preg_match('//u', $delimiter)) { - throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.'); - } - - $str = clone $this; - $chunks = $this->ignoreCase - ? preg_split('{'.preg_quote($delimiter).'}iuD', $this->string, $limit) - : explode($delimiter, $this->string, $limit); - - foreach ($chunks as &$chunk) { - $str->string = $chunk; - $chunk = clone $str; - } - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof AbstractString) { - $prefix = $prefix->string; - } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { - return parent::startsWith($prefix); - } else { - $prefix = (string) $prefix; - } - - if ('' === $prefix || !preg_match('//u', $prefix)) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos($this->string, $prefix, 0, 'UTF-8'); - } - - return 0 === strncmp($this->string, $prefix, \strlen($prefix)); - } -} diff --git a/vendor/symfony/string/Exception/ExceptionInterface.php b/vendor/symfony/string/Exception/ExceptionInterface.php deleted file mode 100644 index 3619786..0000000 --- a/vendor/symfony/string/Exception/ExceptionInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/string/Exception/InvalidArgumentException.php b/vendor/symfony/string/Exception/InvalidArgumentException.php deleted file mode 100644 index 6aa586b..0000000 --- a/vendor/symfony/string/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/string/Exception/RuntimeException.php b/vendor/symfony/string/Exception/RuntimeException.php deleted file mode 100644 index 77cb091..0000000 --- a/vendor/symfony/string/Exception/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Exception; - -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/string/Inflector/EnglishInflector.php b/vendor/symfony/string/Inflector/EnglishInflector.php deleted file mode 100644 index 9f2fac6..0000000 --- a/vendor/symfony/string/Inflector/EnglishInflector.php +++ /dev/null @@ -1,511 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -final class EnglishInflector implements InflectorInterface -{ - /** - * Map English plural to singular suffixes. - * - * @see http://english-zone.com/spelling/plurals.html - */ - private const PLURAL_MAP = [ - // First entry: plural suffix, reversed - // Second entry: length of plural suffix - // Third entry: Whether the suffix may succeed a vocal - // Fourth entry: Whether the suffix may succeed a consonant - // Fifth entry: singular suffix, normal - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['a', 1, true, true, ['on', 'um']], - - // nebulae (nebula) - ['ea', 2, true, true, 'a'], - - // services (service) - ['secivres', 8, true, true, 'service'], - - // mice (mouse), lice (louse) - ['eci', 3, false, true, 'ouse'], - - // geese (goose) - ['esee', 4, false, true, 'oose'], - - // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) - ['i', 1, true, true, 'us'], - - // men (man), women (woman) - ['nem', 3, true, true, 'man'], - - // children (child) - ['nerdlihc', 8, true, true, 'child'], - - // oxen (ox) - ['nexo', 4, false, false, 'ox'], - - // indices (index), appendices (appendix), prices (price) - ['seci', 4, false, true, ['ex', 'ix', 'ice']], - - // selfies (selfie) - ['seifles', 7, true, true, 'selfie'], - - // zombies (zombie) - ['seibmoz', 7, true, true, 'zombie'], - - // movies (movie) - ['seivom', 6, true, true, 'movie'], - - // conspectuses (conspectus), prospectuses (prospectus) - ['sesutcep', 8, true, true, 'pectus'], - - // feet (foot) - ['teef', 4, true, true, 'foot'], - - // geese (goose) - ['eseeg', 5, true, true, 'goose'], - - // teeth (tooth) - ['hteet', 5, true, true, 'tooth'], - - // news (news) - ['swen', 4, true, true, 'news'], - - // series (series) - ['seires', 6, true, true, 'series'], - - // babies (baby) - ['sei', 3, false, true, 'y'], - - // accesses (access), addresses (address), kisses (kiss) - ['sess', 4, true, false, 'ss'], - - // analyses (analysis), ellipses (ellipsis), fungi (fungus), - // neuroses (neurosis), theses (thesis), emphases (emphasis), - // oases (oasis), crises (crisis), houses (house), bases (base), - // atlases (atlas) - ['ses', 3, true, true, ['s', 'se', 'sis']], - - // objectives (objective), alternative (alternatives) - ['sevit', 5, true, true, 'tive'], - - // drives (drive) - ['sevird', 6, false, true, 'drive'], - - // lives (life), wives (wife) - ['sevi', 4, false, true, 'ife'], - - // moves (move) - ['sevom', 5, true, true, 'move'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf), caves (cave), staves (staff) - ['sev', 3, true, true, ['f', 've', 'ff']], - - // axes (axis), axes (ax), axes (axe) - ['sexa', 4, false, false, ['ax', 'axe', 'axis']], - - // indexes (index), matrixes (matrix) - ['sex', 3, true, false, 'x'], - - // quizzes (quiz) - ['sezz', 4, true, false, 'z'], - - // bureaus (bureau) - ['suae', 4, false, true, 'eau'], - - // fees (fee), trees (tree), employees (employee) - ['see', 3, true, true, 'ee'], - - // edges (edge) - ['segd', 4, true, true, 'dge'], - - // roses (rose), garages (garage), cassettes (cassette), - // waltzes (waltz), heroes (hero), bushes (bush), arches (arch), - // shoes (shoe) - ['se', 2, true, true, ['', 'e']], - - // tags (tag) - ['s', 1, true, true, ''], - - // chateaux (chateau) - ['xuae', 4, false, true, 'eau'], - - // people (person) - ['elpoep', 6, true, true, 'person'], - ]; - - /** - * Map English singular to plural suffixes. - * - * @see http://english-zone.com/spelling/plurals.html - */ - private const SINGULAR_MAP = [ - // First entry: singular suffix, reversed - // Second entry: length of singular suffix - // Third entry: Whether the suffix may succeed a vocal - // Fourth entry: Whether the suffix may succeed a consonant - // Fifth entry: plural suffix, normal - - // criterion (criteria) - ['airetirc', 8, false, false, 'criterion'], - - // nebulae (nebula) - ['aluben', 6, false, false, 'nebulae'], - - // children (child) - ['dlihc', 5, true, true, 'children'], - - // prices (price) - ['eci', 3, false, true, 'ices'], - - // services (service) - ['ecivres', 7, true, true, 'services'], - - // lives (life), wives (wife) - ['efi', 3, false, true, 'ives'], - - // selfies (selfie) - ['eifles', 6, true, true, 'selfies'], - - // movies (movie) - ['eivom', 5, true, true, 'movies'], - - // lice (louse) - ['esuol', 5, false, true, 'lice'], - - // mice (mouse) - ['esuom', 5, false, true, 'mice'], - - // geese (goose) - ['esoo', 4, false, true, 'eese'], - - // houses (house), bases (base) - ['es', 2, true, true, 'ses'], - - // geese (goose) - ['esoog', 5, true, true, 'geese'], - - // caves (cave) - ['ev', 2, true, true, 'ves'], - - // drives (drive) - ['evird', 5, false, true, 'drives'], - - // objectives (objective), alternative (alternatives) - ['evit', 4, true, true, 'tives'], - - // moves (move) - ['evom', 4, true, true, 'moves'], - - // staves (staff) - ['ffats', 5, true, true, 'staves'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf) - ['ff', 2, true, true, 'ffs'], - - // hooves (hoof), dwarves (dwarf), elves (elf), leaves (leaf) - ['f', 1, true, true, ['fs', 'ves']], - - // arches (arch) - ['hc', 2, true, true, 'ches'], - - // bushes (bush) - ['hs', 2, true, true, 'shes'], - - // teeth (tooth) - ['htoot', 5, true, true, 'teeth'], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['mu', 2, true, true, 'a'], - - // men (man), women (woman) - ['nam', 3, true, true, 'men'], - - // people (person) - ['nosrep', 6, true, true, ['persons', 'people']], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['noi', 3, true, true, 'ions'], - - // coupon (coupons) - ['nop', 3, true, true, 'pons'], - - // seasons (season), treasons (treason), poisons (poison), lessons (lesson) - ['nos', 3, true, true, 'sons'], - - // bacteria (bacterium), criteria (criterion), phenomena (phenomenon) - ['no', 2, true, true, 'a'], - - // echoes (echo) - ['ohce', 4, true, true, 'echoes'], - - // heroes (hero) - ['oreh', 4, true, true, 'heroes'], - - // atlases (atlas) - ['salta', 5, true, true, 'atlases'], - - // irises (iris) - ['siri', 4, true, true, 'irises'], - - // analyses (analysis), ellipses (ellipsis), neuroses (neurosis) - // theses (thesis), emphases (emphasis), oases (oasis), - // crises (crisis) - ['sis', 3, true, true, 'ses'], - - // accesses (access), addresses (address), kisses (kiss) - ['ss', 2, true, false, 'sses'], - - // syllabi (syllabus) - ['suballys', 8, true, true, 'syllabi'], - - // buses (bus) - ['sub', 3, true, true, 'buses'], - - // circuses (circus) - ['suc', 3, true, true, 'cuses'], - - // conspectuses (conspectus), prospectuses (prospectus) - ['sutcep', 6, true, true, 'pectuses'], - - // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) - ['su', 2, true, true, 'i'], - - // news (news) - ['swen', 4, true, true, 'news'], - - // feet (foot) - ['toof', 4, true, true, 'feet'], - - // chateaux (chateau), bureaus (bureau) - ['uae', 3, false, true, ['eaus', 'eaux']], - - // oxen (ox) - ['xo', 2, false, false, 'oxen'], - - // hoaxes (hoax) - ['xaoh', 4, true, false, 'hoaxes'], - - // indices (index) - ['xedni', 5, false, true, ['indicies', 'indexes']], - - // boxes (box) - ['xo', 2, false, true, 'oxes'], - - // indexes (index), matrixes (matrix) - ['x', 1, true, false, ['cies', 'xes']], - - // appendices (appendix) - ['xi', 2, false, true, 'ices'], - - // babies (baby) - ['y', 1, false, true, 'ies'], - - // quizzes (quiz) - ['ziuq', 4, true, false, 'quizzes'], - - // waltzes (waltz) - ['z', 1, true, true, 'zes'], - ]; - - /** - * A list of words which should not be inflected, reversed. - */ - private const UNINFLECTED = [ - '', - - // data - 'atad', - - // deer - 'reed', - - // feedback - 'kcabdeef', - - // fish - 'hsif', - - // info - 'ofni', - - // moose - 'esoom', - - // series - 'seires', - - // sheep - 'peehs', - - // species - 'seiceps', - ]; - - /** - * {@inheritdoc} - */ - public function singularize(string $plural): array - { - $pluralRev = strrev($plural); - $lowerPluralRev = strtolower($pluralRev); - $pluralLength = \strlen($lowerPluralRev); - - // Check if the word is one which is not inflected, return early if so - if (\in_array($lowerPluralRev, self::UNINFLECTED, true)) { - return [$plural]; - } - - // The outer loop iterates over the entries of the plural table - // The inner loop $j iterates over the characters of the plural suffix - // in the plural table to compare them with the characters of the actual - // given plural suffix - foreach (self::PLURAL_MAP as $map) { - $suffix = $map[0]; - $suffixLength = $map[1]; - $j = 0; - - // Compare characters in the plural table and of the suffix of the - // given plural one by one - while ($suffix[$j] === $lowerPluralRev[$j]) { - // Let $j point to the next character - ++$j; - - // Successfully compared the last character - // Add an entry with the singular suffix to the singular array - if ($j === $suffixLength) { - // Is there any character preceding the suffix in the plural string? - if ($j < $pluralLength) { - $nextIsVocal = false !== strpos('aeiou', $lowerPluralRev[$j]); - - if (!$map[2] && $nextIsVocal) { - // suffix may not succeed a vocal but next char is one - break; - } - - if (!$map[3] && !$nextIsVocal) { - // suffix may not succeed a consonant but next char is one - break; - } - } - - $newBase = substr($plural, 0, $pluralLength - $suffixLength); - $newSuffix = $map[4]; - - // Check whether the first character in the plural suffix - // is uppercased. If yes, uppercase the first character in - // the singular suffix too - $firstUpper = ctype_upper($pluralRev[$j - 1]); - - if (\is_array($newSuffix)) { - $singulars = []; - - foreach ($newSuffix as $newSuffixEntry) { - $singulars[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); - } - - return $singulars; - } - - return [$newBase.($firstUpper ? ucfirst($newSuffix) : $newSuffix)]; - } - - // Suffix is longer than word - if ($j === $pluralLength) { - break; - } - } - } - - // Assume that plural and singular is identical - return [$plural]; - } - - /** - * {@inheritdoc} - */ - public function pluralize(string $singular): array - { - $singularRev = strrev($singular); - $lowerSingularRev = strtolower($singularRev); - $singularLength = \strlen($lowerSingularRev); - - // Check if the word is one which is not inflected, return early if so - if (\in_array($lowerSingularRev, self::UNINFLECTED, true)) { - return [$singular]; - } - - // The outer loop iterates over the entries of the singular table - // The inner loop $j iterates over the characters of the singular suffix - // in the singular table to compare them with the characters of the actual - // given singular suffix - foreach (self::SINGULAR_MAP as $map) { - $suffix = $map[0]; - $suffixLength = $map[1]; - $j = 0; - - // Compare characters in the singular table and of the suffix of the - // given plural one by one - - while ($suffix[$j] === $lowerSingularRev[$j]) { - // Let $j point to the next character - ++$j; - - // Successfully compared the last character - // Add an entry with the plural suffix to the plural array - if ($j === $suffixLength) { - // Is there any character preceding the suffix in the plural string? - if ($j < $singularLength) { - $nextIsVocal = false !== strpos('aeiou', $lowerSingularRev[$j]); - - if (!$map[2] && $nextIsVocal) { - // suffix may not succeed a vocal but next char is one - break; - } - - if (!$map[3] && !$nextIsVocal) { - // suffix may not succeed a consonant but next char is one - break; - } - } - - $newBase = substr($singular, 0, $singularLength - $suffixLength); - $newSuffix = $map[4]; - - // Check whether the first character in the singular suffix - // is uppercased. If yes, uppercase the first character in - // the singular suffix too - $firstUpper = ctype_upper($singularRev[$j - 1]); - - if (\is_array($newSuffix)) { - $plurals = []; - - foreach ($newSuffix as $newSuffixEntry) { - $plurals[] = $newBase.($firstUpper ? ucfirst($newSuffixEntry) : $newSuffixEntry); - } - - return $plurals; - } - - return [$newBase.($firstUpper ? ucfirst($newSuffix) : $newSuffix)]; - } - - // Suffix is longer than word - if ($j === $singularLength) { - break; - } - } - } - - // Assume that plural is singular with a trailing `s` - return [$singular.'s']; - } -} diff --git a/vendor/symfony/string/Inflector/FrenchInflector.php b/vendor/symfony/string/Inflector/FrenchInflector.php deleted file mode 100644 index 42f6125..0000000 --- a/vendor/symfony/string/Inflector/FrenchInflector.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -/** - * French inflector. - * - * This class does only inflect nouns; not adjectives nor composed words like "soixante-dix". - */ -final class FrenchInflector implements InflectorInterface -{ - /** - * A list of all rules for pluralise. - * - * @see https://la-conjugaison.nouvelobs.com/regles/grammaire/le-pluriel-des-noms-121.php - */ - private const PLURALIZE_REGEXP = [ - // First entry: regexp - // Second entry: replacement - - // Words finishing with "s", "x" or "z" are invariables - // Les mots finissant par "s", "x" ou "z" sont invariables - ['/(s|x|z)$/i', '\1'], - - // Words finishing with "eau" are pluralized with a "x" - // Les mots finissant par "eau" prennent tous un "x" au pluriel - ['/(eau)$/i', '\1x'], - - // Words finishing with "au" are pluralized with a "x" excepted "landau" - // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau" - ['/^(landau)$/i', '\1s'], - ['/(au)$/i', '\1x'], - - // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu" - // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu" - ['/^(pneu|bleu|émeu)$/i', '\1s'], - ['/(eu)$/i', '\1x'], - - // Words finishing with "al" are pluralized with a "aux" excepted - // Les mots finissant en "al" se terminent en "aux" sauf - ['/^(bal|carnaval|caracal|chacal|choral|corral|étal|festival|récital|val)$/i', '\1s'], - ['/al$/i', '\1aux'], - - // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux - ['/^(aspir|b|cor|ém|ferm|soupir|trav|vant|vitr)ail$/i', '\1aux'], - - // Bijou, caillou, chou, genou, hibou, joujou et pou qui prennent un x au pluriel - ['/^(bij|caill|ch|gen|hib|jouj|p)ou$/i', '\1oux'], - - // Invariable words - ['/^(cinquante|soixante|mille)$/i', '\1'], - - // French titles - ['/^(mon|ma)(sieur|dame|demoiselle|seigneur)$/', 'mes\2s'], - ['/^(Mon|Ma)(sieur|dame|demoiselle|seigneur)$/', 'Mes\2s'], - ]; - - /** - * A list of all rules for singularize. - */ - private const SINGULARIZE_REGEXP = [ - // First entry: regexp - // Second entry: replacement - - // Aspirail, bail, corail, émail, fermail, soupirail, travail, vantail et vitrail font leur pluriel en -aux - ['/((aspir|b|cor|ém|ferm|soupir|trav|vant|vitr))aux$/i', '\1ail'], - - // Words finishing with "eau" are pluralized with a "x" - // Les mots finissant par "eau" prennent tous un "x" au pluriel - ['/(eau)x$/i', '\1'], - - // Words finishing with "al" are pluralized with a "aux" expected - // Les mots finissant en "al" se terminent en "aux" sauf - ['/(amir|anim|arsen|boc|can|capit|capor|chev|crist|génér|hopit|hôpit|idé|journ|littor|loc|m|mét|minér|princip|radic|termin)aux$/i', '\1al'], - - // Words finishing with "au" are pluralized with a "x" excepted "landau" - // Les mots finissant par "au" prennent un "x" au pluriel sauf "landau" - ['/(au)x$/i', '\1'], - - // Words finishing with "eu" are pluralized with a "x" excepted "pneu", "bleu", "émeu" - // Les mots finissant en "eu" prennent un "x" au pluriel sauf "pneu", "bleu", "émeu" - ['/(eu)x$/i', '\1'], - - // Words finishing with "ou" are pluralized with a "s" excepted bijou, caillou, chou, genou, hibou, joujou, pou - // Les mots finissant par "ou" prennent un "s" sauf bijou, caillou, chou, genou, hibou, joujou, pou - ['/(bij|caill|ch|gen|hib|jouj|p)oux$/i', '\1ou'], - - // French titles - ['/^mes(dame|demoiselle)s$/', 'ma\1'], - ['/^Mes(dame|demoiselle)s$/', 'Ma\1'], - ['/^mes(sieur|seigneur)s$/', 'mon\1'], - ['/^Mes(sieur|seigneur)s$/', 'Mon\1'], - - //Default rule - ['/s$/i', ''], - ]; - - /** - * A list of words which should not be inflected. - * This list is only used by singularize. - */ - private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; - - /** - * {@inheritdoc} - */ - public function singularize(string $plural): array - { - if ($this->isInflectedWord($plural)) { - return [$plural]; - } - - foreach (self::SINGULARIZE_REGEXP as $rule) { - [$regexp, $replace] = $rule; - - if (1 === preg_match($regexp, $plural)) { - return [preg_replace($regexp, $replace, $plural)]; - } - } - - return [$plural]; - } - - /** - * {@inheritdoc} - */ - public function pluralize(string $singular): array - { - if ($this->isInflectedWord($singular)) { - return [$singular]; - } - - foreach (self::PLURALIZE_REGEXP as $rule) { - [$regexp, $replace] = $rule; - - if (1 === preg_match($regexp, $singular)) { - return [preg_replace($regexp, $replace, $singular)]; - } - } - - return [$singular.'s']; - } - - private function isInflectedWord(string $word): bool - { - return 1 === preg_match(self::UNINFLECTED, $word); - } -} diff --git a/vendor/symfony/string/Inflector/InflectorInterface.php b/vendor/symfony/string/Inflector/InflectorInterface.php deleted file mode 100644 index 67f2834..0000000 --- a/vendor/symfony/string/Inflector/InflectorInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Inflector; - -interface InflectorInterface -{ - /** - * Returns the singular forms of a string. - * - * If the method can't determine the form with certainty, several possible singulars are returned. - * - * @return string[] - */ - public function singularize(string $plural): array; - - /** - * Returns the plural forms of a string. - * - * If the method can't determine the form with certainty, several possible plurals are returned. - * - * @return string[] - */ - public function pluralize(string $singular): array; -} diff --git a/vendor/symfony/string/LICENSE b/vendor/symfony/string/LICENSE deleted file mode 100644 index 9c907a4..0000000 --- a/vendor/symfony/string/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/string/LazyString.php b/vendor/symfony/string/LazyString.php deleted file mode 100644 index b3801db..0000000 --- a/vendor/symfony/string/LazyString.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -/** - * A string whose value is computed lazily by a callback. - * - * @author Nicolas Grekas - */ -class LazyString implements \Stringable, \JsonSerializable -{ - private $value; - - /** - * @param callable|array $callback A callable or a [Closure, method] lazy-callable - * - * @return static - */ - public static function fromCallable($callback, ...$arguments): self - { - if (!\is_callable($callback) && !(\is_array($callback) && isset($callback[0]) && $callback[0] instanceof \Closure && 2 >= \count($callback))) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, get_debug_type($callback))); - } - - $lazyString = new static(); - $lazyString->value = static function () use (&$callback, &$arguments, &$value): string { - if (null !== $arguments) { - if (!\is_callable($callback)) { - $callback[0] = $callback[0](); - $callback[1] = $callback[1] ?? '__invoke'; - } - $value = $callback(...$arguments); - $callback = self::getPrettyName($callback); - $arguments = null; - } - - return $value ?? ''; - }; - - return $lazyString; - } - - /** - * @param string|int|float|bool|\Stringable $value - * - * @return static - */ - public static function fromStringable($value): self - { - if (!self::isStringable($value)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a scalar or a stringable object, "%s" given.', __METHOD__, get_debug_type($value))); - } - - if (\is_object($value)) { - return static::fromCallable([$value, '__toString']); - } - - $lazyString = new static(); - $lazyString->value = (string) $value; - - return $lazyString; - } - - /** - * Tells whether the provided value can be cast to string. - */ - final public static function isStringable($value): bool - { - return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : is_scalar($value)); - } - - /** - * Casts scalars and stringable objects to strings. - * - * @param object|string|int|float|bool $value - * - * @throws \TypeError When the provided value is not stringable - */ - final public static function resolve($value): string - { - return $value; - } - - /** - * @return string - */ - public function __toString() - { - if (\is_string($this->value)) { - return $this->value; - } - - try { - return $this->value = ($this->value)(); - } catch (\Throwable $e) { - if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) { - $type = explode(', ', $e->getMessage()); - $type = substr(array_pop($type), 0, -\strlen(' returned')); - $r = new \ReflectionFunction($this->value); - $callback = $r->getStaticVariables()['callback']; - - $e = new \TypeError(sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type)); - } - - if (\PHP_VERSION_ID < 70400) { - // leverage the ErrorHandler component with graceful fallback when it's not available - return trigger_error($e, \E_USER_ERROR); - } - - throw $e; - } - } - - public function __sleep(): array - { - $this->__toString(); - - return ['value']; - } - - public function jsonSerialize(): string - { - return $this->__toString(); - } - - private function __construct() - { - } - - private static function getPrettyName(callable $callback): string - { - if (\is_string($callback)) { - return $callback; - } - - if (\is_array($callback)) { - $class = \is_object($callback[0]) ? get_debug_type($callback[0]) : $callback[0]; - $method = $callback[1]; - } elseif ($callback instanceof \Closure) { - $r = new \ReflectionFunction($callback); - - if (false !== strpos($r->name, '{closure}') || !$class = $r->getClosureScopeClass()) { - return $r->name; - } - - $class = $class->name; - $method = $r->name; - } else { - $class = get_debug_type($callback); - $method = '__invoke'; - } - - return $class.'::'.$method; - } -} diff --git a/vendor/symfony/string/README.md b/vendor/symfony/string/README.md deleted file mode 100644 index 9c7e1e1..0000000 --- a/vendor/symfony/string/README.md +++ /dev/null @@ -1,14 +0,0 @@ -String Component -================ - -The String component provides an object-oriented API to strings and deals -with bytes, UTF-8 code points and grapheme clusters in a unified way. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/string.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php b/vendor/symfony/string/Resources/data/wcswidth_table_wide.php deleted file mode 100644 index 43c802d..0000000 --- a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php +++ /dev/null @@ -1,1135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -if (!\function_exists(u::class)) { - function u(?string $string = ''): UnicodeString - { - return new UnicodeString($string ?? ''); - } -} - -if (!\function_exists(b::class)) { - function b(?string $string = ''): ByteString - { - return new ByteString($string ?? ''); - } -} - -if (!\function_exists(s::class)) { - /** - * @return UnicodeString|ByteString - */ - function s(?string $string = ''): AbstractString - { - $string = $string ?? ''; - - return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string); - } -} diff --git a/vendor/symfony/string/Slugger/AsciiSlugger.php b/vendor/symfony/string/Slugger/AsciiSlugger.php deleted file mode 100644 index 5aecfeb..0000000 --- a/vendor/symfony/string/Slugger/AsciiSlugger.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Slugger; - -use Symfony\Component\String\AbstractUnicodeString; -use Symfony\Component\String\UnicodeString; -use Symfony\Contracts\Translation\LocaleAwareInterface; - -if (!interface_exists(LocaleAwareInterface::class)) { - throw new \LogicException('You cannot use the "Symfony\Component\String\Slugger\AsciiSlugger" as the "symfony/translation-contracts" package is not installed. Try running "composer require symfony/translation-contracts".'); -} - -/** - * @author Titouan Galopin - */ -class AsciiSlugger implements SluggerInterface, LocaleAwareInterface -{ - private const LOCALE_TO_TRANSLITERATOR_ID = [ - 'am' => 'Amharic-Latin', - 'ar' => 'Arabic-Latin', - 'az' => 'Azerbaijani-Latin', - 'be' => 'Belarusian-Latin', - 'bg' => 'Bulgarian-Latin', - 'bn' => 'Bengali-Latin', - 'de' => 'de-ASCII', - 'el' => 'Greek-Latin', - 'fa' => 'Persian-Latin', - 'he' => 'Hebrew-Latin', - 'hy' => 'Armenian-Latin', - 'ka' => 'Georgian-Latin', - 'kk' => 'Kazakh-Latin', - 'ky' => 'Kirghiz-Latin', - 'ko' => 'Korean-Latin', - 'mk' => 'Macedonian-Latin', - 'mn' => 'Mongolian-Latin', - 'or' => 'Oriya-Latin', - 'ps' => 'Pashto-Latin', - 'ru' => 'Russian-Latin', - 'sr' => 'Serbian-Latin', - 'sr_Cyrl' => 'Serbian-Latin', - 'th' => 'Thai-Latin', - 'tk' => 'Turkmen-Latin', - 'uk' => 'Ukrainian-Latin', - 'uz' => 'Uzbek-Latin', - 'zh' => 'Han-Latin', - ]; - - private $defaultLocale; - private $symbolsMap = [ - 'en' => ['@' => 'at', '&' => 'and'], - ]; - - /** - * Cache of transliterators per locale. - * - * @var \Transliterator[] - */ - private $transliterators = []; - - /** - * @param array|\Closure|null $symbolsMap - */ - public function __construct(string $defaultLocale = null, $symbolsMap = null) - { - if (null !== $symbolsMap && !\is_array($symbolsMap) && !$symbolsMap instanceof \Closure) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be array, Closure or null, "%s" given.', __METHOD__, \gettype($symbolsMap))); - } - - $this->defaultLocale = $defaultLocale; - $this->symbolsMap = $symbolsMap ?? $this->symbolsMap; - } - - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->defaultLocale = $locale; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->defaultLocale; - } - - /** - * {@inheritdoc} - */ - public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString - { - $locale = $locale ?? $this->defaultLocale; - - $transliterator = []; - if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) { - // Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl) - $transliterator = ['de-ASCII']; - } elseif (\function_exists('transliterator_transliterate') && $locale) { - $transliterator = (array) $this->createTransliterator($locale); - } - - if ($this->symbolsMap instanceof \Closure) { - // If the symbols map is passed as a closure, there is no need to fallback to the parent locale - // as the closure can just provide substitutions for all locales of interest. - $symbolsMap = $this->symbolsMap; - array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) { - return $symbolsMap($s, $locale); - }); - } - - $unicodeString = (new UnicodeString($string))->ascii($transliterator); - - if (\is_array($this->symbolsMap)) { - $map = null; - if (isset($this->symbolsMap[$locale])) { - $map = $this->symbolsMap[$locale]; - } else { - $parent = self::getParentLocale($locale); - if ($parent && isset($this->symbolsMap[$parent])) { - $map = $this->symbolsMap[$parent]; - } - } - if ($map) { - foreach ($map as $char => $replace) { - $unicodeString = $unicodeString->replace($char, ' '.$replace.' '); - } - } - } - - return $unicodeString - ->replaceMatches('/[^A-Za-z0-9]++/', $separator) - ->trim($separator) - ; - } - - private function createTransliterator(string $locale): ?\Transliterator - { - if (\array_key_exists($locale, $this->transliterators)) { - return $this->transliterators[$locale]; - } - - // Exact locale supported, cache and return - if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$locale] ?? null) { - return $this->transliterators[$locale] = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id); - } - - // Locale not supported and no parent, fallback to any-latin - if (!$parent = self::getParentLocale($locale)) { - return $this->transliterators[$locale] = null; - } - - // Try to use the parent locale (ie. try "de" for "de_AT") and cache both locales - if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$parent] ?? null) { - $transliterator = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id); - } - - return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null; - } - - private static function getParentLocale(?string $locale): ?string - { - if (!$locale) { - return null; - } - if (false === $str = strrchr($locale, '_')) { - // no parent locale - return null; - } - - return substr($locale, 0, -\strlen($str)); - } -} diff --git a/vendor/symfony/string/Slugger/SluggerInterface.php b/vendor/symfony/string/Slugger/SluggerInterface.php deleted file mode 100644 index c679ed9..0000000 --- a/vendor/symfony/string/Slugger/SluggerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String\Slugger; - -use Symfony\Component\String\AbstractUnicodeString; - -/** - * Creates a URL-friendly slug from a given string. - * - * @author Titouan Galopin - */ -interface SluggerInterface -{ - /** - * Creates a slug for the given string and locale, using appropriate transliteration when needed. - */ - public function slug(string $string, string $separator = '-', string $locale = null): AbstractUnicodeString; -} diff --git a/vendor/symfony/string/UnicodeString.php b/vendor/symfony/string/UnicodeString.php deleted file mode 100644 index 9b906c6..0000000 --- a/vendor/symfony/string/UnicodeString.php +++ /dev/null @@ -1,377 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\String; - -use Symfony\Component\String\Exception\ExceptionInterface; -use Symfony\Component\String\Exception\InvalidArgumentException; - -/** - * Represents a string of Unicode grapheme clusters encoded as UTF-8. - * - * A letter followed by combining characters (accents typically) form what Unicode defines - * as a grapheme cluster: a character as humans mean it in written texts. This class knows - * about the concept and won't split a letter apart from its combining accents. It also - * ensures all string comparisons happen on their canonically-composed representation, - * ignoring e.g. the order in which accents are listed when a letter has many of them. - * - * @see https://unicode.org/reports/tr15/ - * - * @author Nicolas Grekas - * @author Hugo Hamon - * - * @throws ExceptionInterface - */ -class UnicodeString extends AbstractUnicodeString -{ - public function __construct(string $string = '') - { - $this->string = normalizer_is_normalized($string) ? $string : normalizer_normalize($string); - - if (false === $this->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - } - - public function append(string ...$suffix): AbstractString - { - $str = clone $this; - $str->string = $this->string.(1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix)); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function chunk(int $length = 1): array - { - if (1 > $length) { - throw new InvalidArgumentException('The chunk length must be greater than zero.'); - } - - if ('' === $this->string) { - return []; - } - - $rx = '/('; - while (65535 < $length) { - $rx .= '\X{65535}'; - $length -= 65535; - } - $rx .= '\X{'.$length.'})/u'; - - $str = clone $this; - $chunks = []; - - foreach (preg_split($rx, $this->string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY) as $chunk) { - $str->string = $chunk; - $chunks[] = clone $str; - } - - return $chunks; - } - - public function endsWith($suffix): bool - { - if ($suffix instanceof AbstractString) { - $suffix = $suffix->string; - } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { - return parent::endsWith($suffix); - } else { - $suffix = (string) $suffix; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($suffix, $form) ?: $suffix = normalizer_normalize($suffix, $form); - - if ('' === $suffix || false === $suffix) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos(grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix)), $suffix, 0, 'UTF-8'); - } - - return $suffix === grapheme_extract($this->string, \strlen($suffix), \GRAPHEME_EXTR_MAXBYTES, \strlen($this->string) - \strlen($suffix)); - } - - public function equalsTo($string): bool - { - if ($string instanceof AbstractString) { - $string = $string->string; - } elseif (\is_array($string) || $string instanceof \Traversable) { - return parent::equalsTo($string); - } else { - $string = (string) $string; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($string, $form) ?: $string = normalizer_normalize($string, $form); - - if ('' !== $string && false !== $string && $this->ignoreCase) { - return \strlen($string) === \strlen($this->string) && 0 === mb_stripos($this->string, $string, 0, 'UTF-8'); - } - - return $string === $this->string; - } - - public function indexOf($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOf($needle, $offset); - } else { - $needle = (string) $needle; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($needle, $form) ?: $needle = normalizer_normalize($needle, $form); - - if ('' === $needle || false === $needle) { - return null; - } - - try { - $i = $this->ignoreCase ? grapheme_stripos($this->string, $needle, $offset) : grapheme_strpos($this->string, $needle, $offset); - } catch (\ValueError $e) { - return null; - } - - return false === $i ? null : $i; - } - - public function indexOfLast($needle, int $offset = 0): ?int - { - if ($needle instanceof AbstractString) { - $needle = $needle->string; - } elseif (\is_array($needle) || $needle instanceof \Traversable) { - return parent::indexOfLast($needle, $offset); - } else { - $needle = (string) $needle; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($needle, $form) ?: $needle = normalizer_normalize($needle, $form); - - if ('' === $needle || false === $needle) { - return null; - } - - $string = $this->string; - - if (0 > $offset) { - // workaround https://bugs.php.net/74264 - if (0 > $offset += grapheme_strlen($needle)) { - $string = grapheme_substr($string, 0, $offset); - } - $offset = 0; - } - - $i = $this->ignoreCase ? grapheme_strripos($string, $needle, $offset) : grapheme_strrpos($string, $needle, $offset); - - return false === $i ? null : $i; - } - - public function join(array $strings, string $lastGlue = null): AbstractString - { - $str = parent::join($strings, $lastGlue); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - return $str; - } - - public function length(): int - { - return grapheme_strlen($this->string); - } - - /** - * @return static - */ - public function normalize(int $form = self::NFC): parent - { - $str = clone $this; - - if (\in_array($form, [self::NFC, self::NFKC], true)) { - normalizer_is_normalized($str->string, $form) ?: $str->string = normalizer_normalize($str->string, $form); - } elseif (!\in_array($form, [self::NFD, self::NFKD], true)) { - throw new InvalidArgumentException('Unsupported normalization form.'); - } elseif (!normalizer_is_normalized($str->string, $form)) { - $str->string = normalizer_normalize($str->string, $form); - $str->ignoreCase = null; - } - - return $str; - } - - public function prepend(string ...$prefix): AbstractString - { - $str = clone $this; - $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$this->string; - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function replace(string $from, string $to): AbstractString - { - $str = clone $this; - normalizer_is_normalized($from) ?: $from = normalizer_normalize($from); - - if ('' !== $from && false !== $from) { - $tail = $str->string; - $result = ''; - $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos'; - - while ('' !== $tail && false !== $i = $indexOf($tail, $from)) { - $slice = grapheme_substr($tail, 0, $i); - $result .= $slice.$to; - $tail = substr($tail, \strlen($slice) + \strlen($from)); - } - - $str->string = $result.$tail; - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - } - - return $str; - } - - public function replaceMatches(string $fromRegexp, $to): AbstractString - { - $str = parent::replaceMatches($fromRegexp, $to); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - return $str; - } - - public function slice(int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - - if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { - $start = 0; - } - $str->string = (string) grapheme_substr($this->string, $start, $length ?? 2147483647); - - return $str; - } - - public function splice(string $replacement, int $start = 0, int $length = null): AbstractString - { - $str = clone $this; - - if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { - $start = 0; - } - $start = $start ? \strlen(grapheme_substr($this->string, 0, $start)) : 0; - $length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? 2147483647)) : $length; - $str->string = substr_replace($this->string, $replacement, $start, $length ?? 2147483647); - normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); - - if (false === $str->string) { - throw new InvalidArgumentException('Invalid UTF-8 string.'); - } - - return $str; - } - - public function split(string $delimiter, int $limit = null, int $flags = null): array - { - if (1 > $limit = $limit ?? 2147483647) { - throw new InvalidArgumentException('Split limit must be a positive integer.'); - } - - if ('' === $delimiter) { - throw new InvalidArgumentException('Split delimiter is empty.'); - } - - if (null !== $flags) { - return parent::split($delimiter.'u', $limit, $flags); - } - - normalizer_is_normalized($delimiter) ?: $delimiter = normalizer_normalize($delimiter); - - if (false === $delimiter) { - throw new InvalidArgumentException('Split delimiter is not a valid UTF-8 string.'); - } - - $str = clone $this; - $tail = $this->string; - $chunks = []; - $indexOf = $this->ignoreCase ? 'grapheme_stripos' : 'grapheme_strpos'; - - while (1 < $limit && false !== $i = $indexOf($tail, $delimiter)) { - $str->string = grapheme_substr($tail, 0, $i); - $chunks[] = clone $str; - $tail = substr($tail, \strlen($str->string) + \strlen($delimiter)); - --$limit; - } - - $str->string = $tail; - $chunks[] = clone $str; - - return $chunks; - } - - public function startsWith($prefix): bool - { - if ($prefix instanceof AbstractString) { - $prefix = $prefix->string; - } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { - return parent::startsWith($prefix); - } else { - $prefix = (string) $prefix; - } - - $form = null === $this->ignoreCase ? \Normalizer::NFD : \Normalizer::NFC; - normalizer_is_normalized($prefix, $form) ?: $prefix = normalizer_normalize($prefix, $form); - - if ('' === $prefix || false === $prefix) { - return false; - } - - if ($this->ignoreCase) { - return 0 === mb_stripos(grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES), $prefix, 0, 'UTF-8'); - } - - return $prefix === grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES); - } - - public function __wakeup() - { - if (!\is_string($this->string)) { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - normalizer_is_normalized($this->string) ?: $this->string = normalizer_normalize($this->string); - } - - public function __clone() - { - if (null === $this->ignoreCase) { - normalizer_is_normalized($this->string) ?: $this->string = normalizer_normalize($this->string); - } - - $this->ignoreCase = false; - } -} diff --git a/vendor/symfony/string/composer.json b/vendor/symfony/string/composer.json deleted file mode 100644 index 2b88fd5..0000000 --- a/vendor/symfony/string/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "symfony/string", - "type": "library", - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "keywords": ["string", "utf8", "utf-8", "grapheme", "i18n", "unicode"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\String\\": "" }, - "files": [ "Resources/functions.php" ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/translation-contracts/.gitignore b/vendor/symfony/translation-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/translation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/translation-contracts/CHANGELOG.md b/vendor/symfony/translation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/translation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/translation-contracts/LICENSE b/vendor/symfony/translation-contracts/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/translation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/translation-contracts/LocaleAwareInterface.php b/vendor/symfony/translation-contracts/LocaleAwareInterface.php deleted file mode 100644 index 693f92b..0000000 --- a/vendor/symfony/translation-contracts/LocaleAwareInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -interface LocaleAwareInterface -{ - /** - * Sets the current locale. - * - * @param string $locale The locale - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function setLocale(string $locale); - - /** - * Returns the current locale. - * - * @return string - */ - public function getLocale(); -} diff --git a/vendor/symfony/translation-contracts/README.md b/vendor/symfony/translation-contracts/README.md deleted file mode 100644 index 42e5c51..0000000 --- a/vendor/symfony/translation-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Translation Contracts -============================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/translation-contracts/Test/TranslatorTest.php b/vendor/symfony/translation-contracts/Test/TranslatorTest.php deleted file mode 100644 index 8903676..0000000 --- a/vendor/symfony/translation-contracts/Test/TranslatorTest.php +++ /dev/null @@ -1,390 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; - -/** - * Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms - * and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms. - * - * See also https://developer.mozilla.org/en/Localization_and_Plurals which mentions 15 rules having a maximum of 6 forms. - * The mozilla code is also interesting to check for. - * - * As mentioned by chx http://drupal.org/node/1273968 we can cover all by testing number from 0 to 199 - * - * The goal to cover all languages is to far fetched so this test case is smaller. - * - * @author Clemens Tolboom clemens@build2be.nl - */ -class TranslatorTest extends TestCase -{ - private $defaultLocale; - - protected function setUp(): void - { - $this->defaultLocale = \Locale::getDefault(); - \Locale::setDefault('en'); - } - - protected function tearDown(): void - { - \Locale::setDefault($this->defaultLocale); - } - - /** - * @return TranslatorInterface - */ - public function getTranslator() - { - return new class() implements TranslatorInterface { - use TranslatorTrait; - }; - } - - /** - * @dataProvider getTransTests - */ - public function testTrans($expected, $id, $parameters) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, $parameters)); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithExplicitLocale($expected, $id, $number) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - /** - * @requires extension intl - * - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithDefaultLocale($expected, $id, $number) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithEnUsPosix($expected, $id, $number) - { - $translator = $this->getTranslator(); - $translator->setLocale('en_US_POSIX'); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - public function testGetSetLocale() - { - $translator = $this->getTranslator(); - - $this->assertEquals('en', $translator->getLocale()); - } - - /** - * @requires extension intl - */ - public function testGetLocaleReturnsDefaultLocaleIfNotSet() - { - $translator = $this->getTranslator(); - - \Locale::setDefault('pt_BR'); - $this->assertEquals('pt_BR', $translator->getLocale()); - - \Locale::setDefault('en'); - $this->assertEquals('en', $translator->getLocale()); - } - - public function getTransTests() - { - return [ - ['Symfony is great!', 'Symfony is great!', []], - ['Symfony is awesome!', 'Symfony is %what%!', ['%what%' => 'awesome']], - ]; - } - - public function getTransChoiceTests() - { - return [ - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - ['There are 0 apples', 'There is 1 apple|There are %count% apples', 0], - ['There is 1 apple', 'There is 1 apple|There are %count% apples', 1], - ['There are 10 apples', 'There is 1 apple|There are %count% apples', 10], - // custom validation messages may be coded with a fixed value - ['There are 2 apples', 'There are 2 apples', 2], - ]; - } - - /** - * @dataProvider getInternal - */ - public function testInterval($expected, $number, $interval) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($interval.' foo|[1,Inf[ bar', ['%count%' => $number])); - } - - public function getInternal() - { - return [ - ['foo', 3, '{1,2, 3 ,4}'], - ['bar', 10, '{1,2, 3 ,4}'], - ['bar', 3, '[1,2]'], - ['foo', 1, '[1,2]'], - ['foo', 2, '[1,2]'], - ['bar', 1, ']1,2['], - ['bar', 2, ']1,2['], - ['foo', log(0), '[-Inf,2['], - ['foo', -log(0), '[-2,+Inf]'], - ]; - } - - /** - * @dataProvider getChooseTests - */ - public function testChoose($expected, $id, $number, $locale = null) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number], null, $locale)); - } - - public function testReturnMessageIfExactlyOneStandardRuleIsGiven() - { - $translator = $this->getTranslator(); - - $this->assertEquals('There are two apples', $translator->trans('There are two apples', ['%count%' => 2])); - } - - /** - * @dataProvider getNonMatchingMessages - */ - public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) - { - $this->expectException(\InvalidArgumentException::class); - $translator = $this->getTranslator(); - - $translator->trans($id, ['%count%' => $number]); - } - - public function getNonMatchingMessages() - { - return [ - ['{0} There are no apples|{1} There is one apple', 2], - ['{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['{1} There is one apple|]2,Inf] There are %count% apples', 2], - ['{0} There are no apples|There is one apple', 2], - ]; - } - - public function getChooseTests() - { - return [ - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - - ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1], - - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - - ['There are 0 apples', 'There is one apple|There are %count% apples', 0], - ['There is one apple', 'There is one apple|There are %count% apples', 1], - ['There are 10 apples', 'There is one apple|There are %count% apples', 10], - - ['There are 0 apples', 'one: There is one apple|more: There are %count% apples', 0], - ['There is one apple', 'one: There is one apple|more: There are %count% apples', 1], - ['There are 10 apples', 'one: There is one apple|more: There are %count% apples', 10], - - ['There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0], - ['There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1], - ['There are 10 apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10], - - ['', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1], - - // Indexed only tests which are Gettext PoFile* compatible strings. - ['There are 0 apples', 'There is one apple|There are %count% apples', 0], - ['There is one apple', 'There is one apple|There are %count% apples', 1], - ['There are 2 apples', 'There is one apple|There are %count% apples', 2], - - // Tests for float numbers - ['There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7], - ['There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1], - ['There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7], - ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], - ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0], - ['There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], - - // Test texts with new-lines - // with double-quotes and \n in id & double-quotes and actual newlines in text - ["This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 0], - // with double-quotes and \n in id and single-quotes and actual newlines in text - ["This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1], - ["This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5], - // with double-quotes and id split accros lines - ['This is a text with a - new-line in it. Selector = 1.', '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1], - // with single-quotes and id split accros lines - ['This is a text with a - new-line in it. Selector > 1.', '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5], - // with single-quotes and \n in text - ['This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0], - // with double-quotes and id split accros lines - ["This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1], - // esacape pipe - ['This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0], - // Empty plural set (2 plural forms) from a .PO file - ['', '|', 1], - // Empty plural set (3 plural forms) from a .PO file - ['', '||', 1], - - // Floating values - ['1.5 liters', '%count% liter|%count% liters', 1.5], - ['1.5 litre', '%count% litre|%count% litres', 1.5, 'fr'], - - // Negative values - ['-1 degree', '%count% degree|%count% degrees', -1], - ['-1 degré', '%count% degré|%count% degrés', -1], - ['-1.5 degrees', '%count% degree|%count% degrees', -1.5], - ['-1.5 degré', '%count% degré|%count% degrés', -1.5, 'fr'], - ['-2 degrees', '%count% degree|%count% degrees', -2], - ['-2 degrés', '%count% degré|%count% degrés', -2], - ]; - } - - /** - * @dataProvider failingLangcodes - */ - public function testFailedLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($langCodes); - $this->validateMatrix($nplural, $matrix, false); - } - - /** - * @dataProvider successLangcodes - */ - public function testLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($langCodes); - $this->validateMatrix($nplural, $matrix); - } - - /** - * This array should contain all currently known langcodes. - * - * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. - * - * @return array - */ - public function successLangcodes() - { - return [ - ['1', ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky']], - ['2', ['nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM', 'en_US_POSIX']], - ['3', ['be', 'bs', 'cs', 'hr']], - ['4', ['cy', 'mt', 'sl']], - ['6', ['ar']], - ]; - } - - /** - * This array should be at least empty within the near future. - * - * This both depends on a complete list trying to add above as understanding - * the plural rules of the current failing languages. - * - * @return array with nplural together with langcodes - */ - public function failingLangcodes() - { - return [ - ['1', ['fa']], - ['2', ['jbo']], - ['3', ['cbs']], - ['4', ['gd', 'kw']], - ['5', ['ga']], - ]; - } - - /** - * We validate only on the plural coverage. Thus the real rules is not tested. - * - * @param string $nplural Plural expected - * @param array $matrix Containing langcodes and their plural index values - * @param bool $expectSuccess - */ - protected function validateMatrix($nplural, $matrix, $expectSuccess = true) - { - foreach ($matrix as $langCode => $data) { - $indexes = array_flip($data); - if ($expectSuccess) { - $this->assertEquals($nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); - } else { - $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); - } - } - } - - protected function generateTestData($langCodes) - { - $translator = new class() { - use TranslatorTrait { - getPluralizationRule as public; - } - }; - - $matrix = []; - foreach ($langCodes as $langCode) { - for ($count = 0; $count < 200; ++$count) { - $plural = $translator->getPluralizationRule($count, $langCode); - $matrix[$langCode][$count] = $plural; - } - } - - return $matrix; - } -} diff --git a/vendor/symfony/translation-contracts/TranslatableInterface.php b/vendor/symfony/translation-contracts/TranslatableInterface.php deleted file mode 100644 index 47fd6fa..0000000 --- a/vendor/symfony/translation-contracts/TranslatableInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Nicolas Grekas - */ -interface TranslatableInterface -{ - public function trans(TranslatorInterface $translator, string $locale = null): string; -} diff --git a/vendor/symfony/translation-contracts/TranslatorInterface.php b/vendor/symfony/translation-contracts/TranslatorInterface.php deleted file mode 100644 index 77b7a9c..0000000 --- a/vendor/symfony/translation-contracts/TranslatorInterface.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Fabien Potencier - * - * @method string getLocale() Returns the default locale - */ -interface TranslatorInterface -{ - /** - * Translates the given message. - * - * When a number is provided as a parameter named "%count%", the message is parsed for plural - * forms and a translation is chosen according to this number using the following rules: - * - * Given a message with different plural translations separated by a - * pipe (|), this method returns the correct portion of the message based - * on the given number, locale and the pluralization rules in the message - * itself. - * - * The message supports two different types of pluralization rules: - * - * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples - * indexed: There is one apple|There are %count% apples - * - * The indexed solution can also contain labels (e.g. one: There is one apple). - * This is purely for making the translations more clear - it does not - * affect the functionality. - * - * The two methods can also be mixed: - * {0} There are no apples|one: There is one apple|more: There are %count% apples - * - * An interval can represent a finite set of numbers: - * {1,2,3,4} - * - * An interval can represent numbers between two numbers: - * [1, +Inf] - * ]-1,2[ - * - * The left delimiter can be [ (inclusive) or ] (exclusive). - * The right delimiter can be [ (exclusive) or ] (inclusive). - * Beside numbers, you can use -Inf and +Inf for the infinite. - * - * @see https://en.wikipedia.org/wiki/ISO_31-11 - * - * @param string $id The message id (may also be an object that can be cast to string) - * @param array $parameters An array of parameters for the message - * @param string|null $domain The domain for the message or null to use the default - * @param string|null $locale The locale or null to use the default - * - * @return string - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null); -} diff --git a/vendor/symfony/translation-contracts/TranslatorTrait.php b/vendor/symfony/translation-contracts/TranslatorTrait.php deleted file mode 100644 index 405ce8d..0000000 --- a/vendor/symfony/translation-contracts/TranslatorTrait.php +++ /dev/null @@ -1,262 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * A trait to help implement TranslatorInterface and LocaleAwareInterface. - * - * @author Fabien Potencier - */ -trait TranslatorTrait -{ - private $locale; - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $this->locale = $locale; - } - - /** - * {@inheritdoc} - * - * @return string - */ - public function getLocale() - { - return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string - { - if (null === $id || '' === $id) { - return ''; - } - - if (!isset($parameters['%count%']) || !is_numeric($parameters['%count%'])) { - return strtr($id, $parameters); - } - - $number = (float) $parameters['%count%']; - $locale = $locale ?: $this->getLocale(); - - $parts = []; - if (preg_match('/^\|++$/', $id)) { - $parts = explode('|', $id); - } elseif (preg_match_all('/(?:\|\||[^\|])++/', $id, $matches)) { - $parts = $matches[0]; - } - - $intervalRegexp = <<<'EOF' -/^(?P - ({\s* - (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) - \s*}) - - | - - (?P[\[\]]) - \s* - (?P-Inf|\-?\d+(\.\d+)?) - \s*,\s* - (?P\+?Inf|\-?\d+(\.\d+)?) - \s* - (?P[\[\]]) -)\s*(?P.*?)$/xs -EOF; - - $standardRules = []; - foreach ($parts as $part) { - $part = trim(str_replace('||', '|', $part)); - - // try to match an explicit rule, then fallback to the standard ones - if (preg_match($intervalRegexp, $part, $matches)) { - if ($matches[2]) { - foreach (explode(',', $matches[3]) as $n) { - if ($number == $n) { - return strtr($matches['message'], $parameters); - } - } - } else { - $leftNumber = '-Inf' === $matches['left'] ? -\INF : (float) $matches['left']; - $rightNumber = is_numeric($matches['right']) ? (float) $matches['right'] : \INF; - - if (('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) - && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) - ) { - return strtr($matches['message'], $parameters); - } - } - } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { - $standardRules[] = $matches[1]; - } else { - $standardRules[] = $part; - } - } - - $position = $this->getPluralizationRule($number, $locale); - - if (!isset($standardRules[$position])) { - // when there's exactly one rule given, and that rule is a standard - // rule, use this rule - if (1 === \count($parts) && isset($standardRules[0])) { - return strtr($standardRules[0], $parameters); - } - - $message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number); - - if (class_exists(InvalidArgumentException::class)) { - throw new InvalidArgumentException($message); - } - - throw new \InvalidArgumentException($message); - } - - return strtr($standardRules[$position], $parameters); - } - - /** - * Returns the plural position to use for the given locale and number. - * - * The plural rules are derived from code of the Zend Framework (2010-09-25), - * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - */ - private function getPluralizationRule(float $number, string $locale): int - { - $number = abs($number); - - switch ('pt_BR' !== $locale && 'en_US_POSIX' !== $locale && \strlen($locale) > 3 ? substr($locale, 0, strrpos($locale, '_')) : $locale) { - case 'af': - case 'bn': - case 'bg': - case 'ca': - case 'da': - case 'de': - case 'el': - case 'en': - case 'en_US_POSIX': - case 'eo': - case 'es': - case 'et': - case 'eu': - case 'fa': - case 'fi': - case 'fo': - case 'fur': - case 'fy': - case 'gl': - case 'gu': - case 'ha': - case 'he': - case 'hu': - case 'is': - case 'it': - case 'ku': - case 'lb': - case 'ml': - case 'mn': - case 'mr': - case 'nah': - case 'nb': - case 'ne': - case 'nl': - case 'nn': - case 'no': - case 'oc': - case 'om': - case 'or': - case 'pa': - case 'pap': - case 'ps': - case 'pt': - case 'so': - case 'sq': - case 'sv': - case 'sw': - case 'ta': - case 'te': - case 'tk': - case 'ur': - case 'zu': - return (1 == $number) ? 0 : 1; - - case 'am': - case 'bh': - case 'fil': - case 'fr': - case 'gun': - case 'hi': - case 'hy': - case 'ln': - case 'mg': - case 'nso': - case 'pt_BR': - case 'ti': - case 'wa': - return ($number < 2) ? 0 : 1; - - case 'be': - case 'bs': - case 'hr': - case 'ru': - case 'sh': - case 'sr': - case 'uk': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'cs': - case 'sk': - return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); - - case 'ga': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2); - - case 'lt': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'sl': - return (1 == $number % 100) ? 0 : ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3)); - - case 'mk': - return (1 == $number % 10) ? 0 : 1; - - case 'mt': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); - - case 'lv': - return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2); - - case 'pl': - return (1 == $number) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); - - case 'cy': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3)); - - case 'ro': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); - - case 'ar': - return (0 == $number) ? 0 : ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); - - default: - return 0; - } - } -} diff --git a/vendor/symfony/translation-contracts/composer.json b/vendor/symfony/translation-contracts/composer.json deleted file mode 100644 index 65fe243..0000000 --- a/vendor/symfony/translation-contracts/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/translation-contracts", - "type": "library", - "description": "Generic abstractions related to translation", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Translation\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/twig-bridge/AppVariable.php b/vendor/symfony/twig-bridge/AppVariable.php deleted file mode 100644 index 23683eb..0000000 --- a/vendor/symfony/twig-bridge/AppVariable.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Core\User\UserInterface; - -/** - * Exposes some Symfony parameters and services as an "app" global variable. - * - * @author Fabien Potencier - */ -class AppVariable -{ - private $tokenStorage; - private $requestStack; - private $environment; - private $debug; - - public function setTokenStorage(TokenStorageInterface $tokenStorage) - { - $this->tokenStorage = $tokenStorage; - } - - public function setRequestStack(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - public function setEnvironment(string $environment) - { - $this->environment = $environment; - } - - public function setDebug(bool $debug) - { - $this->debug = $debug; - } - - /** - * Returns the current token. - * - * @return TokenInterface|null - * - * @throws \RuntimeException When the TokenStorage is not available - */ - public function getToken() - { - if (null === $tokenStorage = $this->tokenStorage) { - throw new \RuntimeException('The "app.token" variable is not available.'); - } - - return $tokenStorage->getToken(); - } - - /** - * Returns the current user. - * - * @return UserInterface|null - * - * @see TokenInterface::getUser() - */ - public function getUser() - { - if (null === $tokenStorage = $this->tokenStorage) { - throw new \RuntimeException('The "app.user" variable is not available.'); - } - - if (!$token = $tokenStorage->getToken()) { - return null; - } - - $user = $token->getUser(); - - // @deprecated since Symfony 5.4, $user will always be a UserInterface instance - return \is_object($user) ? $user : null; - } - - /** - * Returns the current request. - * - * @return Request|null - */ - public function getRequest() - { - if (null === $this->requestStack) { - throw new \RuntimeException('The "app.request" variable is not available.'); - } - - return $this->requestStack->getCurrentRequest(); - } - - /** - * Returns the current session. - * - * @return Session|null - */ - public function getSession() - { - if (null === $this->requestStack) { - throw new \RuntimeException('The "app.session" variable is not available.'); - } - $request = $this->getRequest(); - - return $request && $request->hasSession() ? $request->getSession() : null; - } - - /** - * Returns the current app environment. - * - * @return string - */ - public function getEnvironment() - { - if (null === $this->environment) { - throw new \RuntimeException('The "app.environment" variable is not available.'); - } - - return $this->environment; - } - - /** - * Returns the current app debug mode. - * - * @return bool - */ - public function getDebug() - { - if (null === $this->debug) { - throw new \RuntimeException('The "app.debug" variable is not available.'); - } - - return $this->debug; - } - - /** - * Returns some or all the existing flash messages: - * * getFlashes() returns all the flash messages - * * getFlashes('notice') returns a simple array with flash messages of that type - * * getFlashes(['notice', 'error']) returns a nested array of type => messages. - * - * @return array - */ - public function getFlashes($types = null) - { - try { - if (null === $session = $this->getSession()) { - return []; - } - } catch (\RuntimeException $e) { - return []; - } - - if (null === $types || '' === $types || [] === $types) { - return $session->getFlashBag()->all(); - } - - if (\is_string($types)) { - return $session->getFlashBag()->get($types); - } - - $result = []; - foreach ($types as $type) { - $result[$type] = $session->getFlashBag()->get($type); - } - - return $result; - } -} diff --git a/vendor/symfony/twig-bridge/CHANGELOG.md b/vendor/symfony/twig-bridge/CHANGELOG.md deleted file mode 100644 index 535df0c..0000000 --- a/vendor/symfony/twig-bridge/CHANGELOG.md +++ /dev/null @@ -1,169 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - -* Add `github` format & autodetection to render errors as annotations when - running the Twig linter command in a Github Actions environment. - -5.3 ---- - - * Add a new `markAsPublic` method on `NotificationEmail` to change the `importance` context option to null after creation - * Add a new `fragment_uri()` helper to generate the URI of a fragment - * Add support of Bootstrap 5 for form theming - * Add a new `serialize` filter to serialize objects using the Serializer component - -5.2.0 ------ - - * added the `impersonation_exit_url()` and `impersonation_exit_path()` functions. They return a URL that allows to switch back to the original user. - * added the `workflow_transition()` function to easily retrieve a specific transition object - * added support for translating `TranslatableInterface` objects - * added the `t()` function to easily create `TranslatableMessage` objects - * Added support for extracting messages from the `t()` function - * Added `field_*` Twig functions to access string values from Form fields - * changed the `importance` context option of `NotificationEmail` to allow `null` - -5.0.0 ------ - - * removed `TwigEngine` class, use `\Twig\Environment` instead. - * removed `transChoice` filter and token - * `HttpFoundationExtension` requires a `UrlHelper` on instantiation - * removed support for implicit STDIN usage in the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit. - * added form theme for Foundation 6 - * added support for Foundation 6 switches: add the `switch-input` class to the attributes of a `CheckboxType` - -4.4.0 ------ - - * added a new `TwigErrorRenderer` for `html` format, integrated with the `ErrorHandler` component - * marked all classes extending twig as `@final` - * deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the - `DebugCommand::__construct()` method, swap the variables position. - * the `LintCommand` lints all the templates stored in all configured Twig paths if none argument is provided - * deprecated accepting STDIN implicitly when using the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit. - * added `--show-deprecations` option to the `lint:twig` command - * added support for Bootstrap4 switches: add the `switch-custom` class to the label attributes of a `CheckboxType` - * Marked the `TwigDataCollector` class as `@final`. - -4.3.0 ------ - - * added the `form_parent()` function that allows to reliably retrieve the parent form in Twig templates - * added the `workflow_transition_blockers()` function - * deprecated the `$requestStack` and `$requestContext` arguments of the - `HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper` - instance as the only argument instead - -4.2.0 ------ - - * add bundle name suggestion on wrongly overridden templates paths - * added `name` argument in `debug:twig` command and changed `filter` argument as `--filter` option - * deprecated the `transchoice` tag and filter, use the `trans` ones instead with a `%count%` parameter - -4.1.0 ------ - - * add a `workflow_metadata` function - -3.4.0 ------ - - * added an `only` keyword to `form_theme` tag to disable usage of default themes when rendering a form - * deprecated `Symfony\Bridge\Twig\Form\TwigRenderer` - * deprecated `DebugCommand::set/getTwigEnvironment`. Pass an instance of - `Twig\Environment` as first argument of the constructor instead - * deprecated `LintCommand::set/getTwigEnvironment`. Pass an instance of - `Twig\Environment` as first argument of the constructor instead - -3.3.0 ------ - - * added a `workflow_has_marked_place` function - * added a `workflow_marked_places` function - -3.2.0 ------ - - * added `AppVariable::getToken()` - * Deprecated the possibility to inject the Form `TwigRenderer` into the `FormExtension`. - * [BC BREAK] Registering the `FormExtension` without configuring a runtime loader for the `TwigRenderer` - doesn't work anymore. - - Before: - - ```php - use Symfony\Bridge\Twig\Extension\FormExtension; - use Symfony\Bridge\Twig\Form\TwigRenderer; - use Symfony\Bridge\Twig\Form\TwigRendererEngine; - - // ... - $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig']); - $rendererEngine->setEnvironment($twig); - $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager))); - ``` - - After: - - ```php - // ... - $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig'], $twig); - // require Twig 1.30+ - $twig->addRuntimeLoader(new \Twig\RuntimeLoader\FactoryRuntimeLoader([ - TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { - return new TwigRenderer($rendererEngine, $csrfTokenManager); - }, - ])); - $twig->addExtension(new FormExtension()); - ``` - * Deprecated the `TwigRendererEngineInterface` interface. - * added WorkflowExtension (provides `workflow_can` and `workflow_transitions`) - -2.7.0 ------ - - * added LogoutUrlExtension (provides `logout_url` and `logout_path`) - * added an HttpFoundation extension (provides the `absolute_url` and the `relative_path` functions) - * added AssetExtension (provides the `asset` and `asset_version` functions) - * Added possibility to extract translation messages from a file or files besides extracting from a directory - -2.5.0 ------ - - * moved command `twig:lint` from `TwigBundle` - -2.4.0 ------ - - * added stopwatch tag to time templates with the WebProfilerBundle - -2.3.0 ------ - - * added helpers form(), form_start() and form_end() - * deprecated form_enctype() in favor of form_start() - -2.2.0 ------ - - * added a `controller` function to help generating controller references - * added a `render_esi` and a `render_hinclude` function - * [BC BREAK] restricted the `render` tag to only accept URIs or ControllerReference instances (the signature changed) - * added a `render` function to render a request - * The `app` global variable is now injected even when using the twig service directly. - * Added an optional parameter to the `path` and `url` function which allows to generate - relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file"). - -2.1.0 ------ - - * added global variables access in a form theme - * added TwigEngine - * added TwigExtractor - * added a csrf_token function - * added a way to specify a default domain for a Twig template (via the - 'trans_default_domain' tag) diff --git a/vendor/symfony/twig-bridge/Command/DebugCommand.php b/vendor/symfony/twig-bridge/Command/DebugCommand.php deleted file mode 100644 index d4c7821..0000000 --- a/vendor/symfony/twig-bridge/Command/DebugCommand.php +++ /dev/null @@ -1,600 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Twig\Environment; -use Twig\Loader\ChainLoader; -use Twig\Loader\FilesystemLoader; - -/** - * Lists twig functions, filters, globals and tests present in the current project. - * - * @author Jordi Boggiano - */ -class DebugCommand extends Command -{ - protected static $defaultName = 'debug:twig'; - protected static $defaultDescription = 'Show a list of twig functions, filters, globals and tests'; - - private $twig; - private $projectDir; - private $bundlesMetadata; - private $twigDefaultPath; - private $filesystemLoaders; - private $fileLinkFormatter; - - public function __construct(Environment $twig, string $projectDir = null, array $bundlesMetadata = [], string $twigDefaultPath = null, FileLinkFormatter $fileLinkFormatter = null) - { - parent::__construct(); - - $this->twig = $twig; - $this->projectDir = $projectDir; - $this->bundlesMetadata = $bundlesMetadata; - $this->twigDefaultPath = $twigDefaultPath; - $this->fileLinkFormatter = $fileLinkFormatter; - } - - protected function configure() - { - $this - ->setDefinition([ - new InputArgument('name', InputArgument::OPTIONAL, 'The template name'), - new InputOption('filter', null, InputOption::VALUE_REQUIRED, 'Show details for all entries matching this filter'), - new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (text or json)', 'text'), - ]) - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% command outputs a list of twig functions, -filters, globals and tests. - - php %command.full_name% - -The command lists all functions, filters, etc. - - php %command.full_name% @Twig/Exception/error.html.twig - -The command lists all paths that match the given template name. - - php %command.full_name% --filter=date - -The command lists everything that contains the word date. - - php %command.full_name% --format=json - -The command lists everything in a machine readable json format. -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $name = $input->getArgument('name'); - $filter = $input->getOption('filter'); - - if (null !== $name && [] === $this->getFilesystemLoaders()) { - throw new InvalidArgumentException(sprintf('Argument "name" not supported, it requires the Twig loader "%s".', FilesystemLoader::class)); - } - - switch ($input->getOption('format')) { - case 'text': - $name ? $this->displayPathsText($io, $name) : $this->displayGeneralText($io, $filter); - break; - case 'json': - $name ? $this->displayPathsJson($io, $name) : $this->displayGeneralJson($io, $filter); - break; - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues(array_keys($this->getLoaderPaths())); - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['text', 'json']); - } - } - - private function displayPathsText(SymfonyStyle $io, string $name) - { - $file = new \ArrayIterator($this->findTemplateFiles($name)); - $paths = $this->getLoaderPaths($name); - - $io->section('Matched File'); - if ($file->valid()) { - if ($fileLink = $this->getFileLink($file->key())) { - $io->block($file->current(), 'OK', sprintf('fg=black;bg=green;href=%s', $fileLink), ' ', true); - } else { - $io->success($file->current()); - } - $file->next(); - - if ($file->valid()) { - $io->section('Overridden Files'); - do { - if ($fileLink = $this->getFileLink($file->key())) { - $io->text(sprintf('* %s', $fileLink, $file->current())); - } else { - $io->text(sprintf('* %s', $file->current())); - } - $file->next(); - } while ($file->valid()); - } - } else { - $alternatives = []; - - if ($paths) { - $shortnames = []; - $dirs = []; - foreach (current($paths) as $path) { - $dirs[] = $this->isAbsolutePath($path) ? $path : $this->projectDir.'/'.$path; - } - foreach (Finder::create()->files()->followLinks()->in($dirs) as $file) { - $shortnames[] = str_replace('\\', '/', $file->getRelativePathname()); - } - - [$namespace, $shortname] = $this->parseTemplateName($name); - $alternatives = $this->findAlternatives($shortname, $shortnames); - if (FilesystemLoader::MAIN_NAMESPACE !== $namespace) { - $alternatives = array_map(function ($shortname) use ($namespace) { - return '@'.$namespace.'/'.$shortname; - }, $alternatives); - } - } - - $this->error($io, sprintf('Template name "%s" not found', $name), $alternatives); - } - - $io->section('Configured Paths'); - if ($paths) { - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } else { - $alternatives = []; - $namespace = $this->parseTemplateName($name)[0]; - - if (FilesystemLoader::MAIN_NAMESPACE === $namespace) { - $message = 'No template paths configured for your application'; - } else { - $message = sprintf('No template paths configured for "@%s" namespace', $namespace); - foreach ($this->getFilesystemLoaders() as $loader) { - $namespaces = $loader->getNamespaces(); - foreach ($this->findAlternatives($namespace, $namespaces) as $namespace) { - $alternatives[] = '@'.$namespace; - } - } - } - - $this->error($io, $message, $alternatives); - - if (!$alternatives && $paths = $this->getLoaderPaths()) { - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } - } - } - - private function displayPathsJson(SymfonyStyle $io, string $name) - { - $files = $this->findTemplateFiles($name); - $paths = $this->getLoaderPaths($name); - - if ($files) { - $data['matched_file'] = array_shift($files); - if ($files) { - $data['overridden_files'] = $files; - } - } else { - $data['matched_file'] = sprintf('Template name "%s" not found', $name); - } - $data['loader_paths'] = $paths; - - $io->writeln(json_encode($data)); - } - - private function displayGeneralText(SymfonyStyle $io, string $filter = null) - { - $decorated = $io->isDecorated(); - $types = ['functions', 'filters', 'tests', 'globals']; - foreach ($types as $index => $type) { - $items = []; - foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) { - if (!$filter || str_contains($name, $filter)) { - $items[$name] = $name.$this->getPrettyMetadata($type, $entity, $decorated); - } - } - - if (!$items) { - continue; - } - - $io->section(ucfirst($type)); - - ksort($items); - $io->listing($items); - } - - if (!$filter && $paths = $this->getLoaderPaths()) { - $io->section('Loader Paths'); - $io->table(['Namespace', 'Paths'], $this->buildTableRows($paths)); - } - - if ($wrongBundles = $this->findWrongBundleOverrides()) { - foreach ($this->buildWarningMessages($wrongBundles) as $message) { - $io->warning($message); - } - } - } - - private function displayGeneralJson(SymfonyStyle $io, ?string $filter) - { - $decorated = $io->isDecorated(); - $types = ['functions', 'filters', 'tests', 'globals']; - $data = []; - foreach ($types as $type) { - foreach ($this->twig->{'get'.ucfirst($type)}() as $name => $entity) { - if (!$filter || str_contains($name, $filter)) { - $data[$type][$name] = $this->getMetadata($type, $entity); - } - } - } - if (isset($data['tests'])) { - $data['tests'] = array_keys($data['tests']); - } - - if (!$filter && $paths = $this->getLoaderPaths($filter)) { - $data['loader_paths'] = $paths; - } - - if ($wrongBundles = $this->findWrongBundleOverrides()) { - $data['warnings'] = $this->buildWarningMessages($wrongBundles); - } - - $data = json_encode($data, \JSON_PRETTY_PRINT); - $io->writeln($decorated ? OutputFormatter::escape($data) : $data); - } - - private function getLoaderPaths(string $name = null): array - { - $loaderPaths = []; - foreach ($this->getFilesystemLoaders() as $loader) { - $namespaces = $loader->getNamespaces(); - if (null !== $name) { - $namespace = $this->parseTemplateName($name)[0]; - $namespaces = array_intersect([$namespace], $namespaces); - } - - foreach ($namespaces as $namespace) { - $paths = array_map([$this, 'getRelativePath'], $loader->getPaths($namespace)); - - if (FilesystemLoader::MAIN_NAMESPACE === $namespace) { - $namespace = '(None)'; - } else { - $namespace = '@'.$namespace; - } - - $loaderPaths[$namespace] = array_merge($loaderPaths[$namespace] ?? [], $paths); - } - } - - return $loaderPaths; - } - - private function getMetadata(string $type, $entity) - { - if ('globals' === $type) { - return $entity; - } - if ('tests' === $type) { - return null; - } - if ('functions' === $type || 'filters' === $type) { - $cb = $entity->getCallable(); - if (null === $cb) { - return null; - } - if (\is_array($cb)) { - if (!method_exists($cb[0], $cb[1])) { - return null; - } - $refl = new \ReflectionMethod($cb[0], $cb[1]); - } elseif (\is_object($cb) && method_exists($cb, '__invoke')) { - $refl = new \ReflectionMethod($cb, '__invoke'); - } elseif (\function_exists($cb)) { - $refl = new \ReflectionFunction($cb); - } elseif (\is_string($cb) && preg_match('{^(.+)::(.+)$}', $cb, $m) && method_exists($m[1], $m[2])) { - $refl = new \ReflectionMethod($m[1], $m[2]); - } else { - throw new \UnexpectedValueException('Unsupported callback type.'); - } - - $args = $refl->getParameters(); - - // filter out context/environment args - if ($entity->needsEnvironment()) { - array_shift($args); - } - if ($entity->needsContext()) { - array_shift($args); - } - - if ('filters' === $type) { - // remove the value the filter is applied on - array_shift($args); - } - - // format args - $args = array_map(function (\ReflectionParameter $param) { - if ($param->isDefaultValueAvailable()) { - return $param->getName().' = '.json_encode($param->getDefaultValue()); - } - - return $param->getName(); - }, $args); - - return $args; - } - - return null; - } - - private function getPrettyMetadata(string $type, $entity, bool $decorated): ?string - { - if ('tests' === $type) { - return ''; - } - - try { - $meta = $this->getMetadata($type, $entity); - if (null === $meta) { - return '(unknown?)'; - } - } catch (\UnexpectedValueException $e) { - return sprintf(' %s', $decorated ? OutputFormatter::escape($e->getMessage()) : $e->getMessage()); - } - - if ('globals' === $type) { - if (\is_object($meta)) { - return ' = object('.\get_class($meta).')'; - } - - $description = substr(@json_encode($meta), 0, 50); - - return sprintf(' = %s', $decorated ? OutputFormatter::escape($description) : $description); - } - - if ('functions' === $type) { - return '('.implode(', ', $meta).')'; - } - - if ('filters' === $type) { - return $meta ? '('.implode(', ', $meta).')' : ''; - } - - return null; - } - - private function findWrongBundleOverrides(): array - { - $alternatives = []; - $bundleNames = []; - - if ($this->twigDefaultPath && $this->projectDir) { - $folders = glob($this->twigDefaultPath.'/bundles/*', \GLOB_ONLYDIR); - $relativePath = ltrim(substr($this->twigDefaultPath.'/bundles/', \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - $bundleNames = array_reduce($folders, function ($carry, $absolutePath) use ($relativePath) { - if (str_starts_with($absolutePath, $this->projectDir)) { - $name = basename($absolutePath); - $path = ltrim($relativePath.$name, \DIRECTORY_SEPARATOR); - $carry[$name] = $path; - } - - return $carry; - }, $bundleNames); - } - - if ($notFoundBundles = array_diff_key($bundleNames, $this->bundlesMetadata)) { - $alternatives = []; - foreach ($notFoundBundles as $notFoundBundle => $path) { - $alternatives[$path] = $this->findAlternatives($notFoundBundle, array_keys($this->bundlesMetadata)); - } - } - - return $alternatives; - } - - private function buildWarningMessages(array $wrongBundles): array - { - $messages = []; - foreach ($wrongBundles as $path => $alternatives) { - $message = sprintf('Path "%s" not matching any bundle found', $path); - if ($alternatives) { - if (1 === \count($alternatives)) { - $message .= sprintf(", did you mean \"%s\"?\n", $alternatives[0]); - } else { - $message .= ", did you mean one of these:\n"; - foreach ($alternatives as $bundle) { - $message .= sprintf(" - %s\n", $bundle); - } - } - } - $messages[] = trim($message); - } - - return $messages; - } - - private function error(SymfonyStyle $io, string $message, array $alternatives = []): void - { - if ($alternatives) { - if (1 === \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - $io->block($message, null, 'fg=white;bg=red', ' ', true); - } - - private function findTemplateFiles(string $name): array - { - [$namespace, $shortname] = $this->parseTemplateName($name); - - $files = []; - foreach ($this->getFilesystemLoaders() as $loader) { - foreach ($loader->getPaths($namespace) as $path) { - if (!$this->isAbsolutePath($path)) { - $path = $this->projectDir.'/'.$path; - } - $filename = $path.'/'.$shortname; - - if (is_file($filename)) { - if (false !== $realpath = realpath($filename)) { - $files[$realpath] = $this->getRelativePath($realpath); - } else { - $files[$filename] = $this->getRelativePath($filename); - } - } - } - } - - return $files; - } - - private function parseTemplateName(string $name, string $default = FilesystemLoader::MAIN_NAMESPACE): array - { - if (isset($name[0]) && '@' === $name[0]) { - if (false === ($pos = strpos($name, '/')) || $pos === \strlen($name) - 1) { - throw new InvalidArgumentException(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); - } - - $namespace = substr($name, 1, $pos - 1); - $shortname = substr($name, $pos + 1); - - return [$namespace, $shortname]; - } - - return [$default, $name]; - } - - private function buildTableRows(array $loaderPaths): array - { - $rows = []; - $firstNamespace = true; - $prevHasSeparator = false; - - foreach ($loaderPaths as $namespace => $paths) { - if (!$firstNamespace && !$prevHasSeparator && \count($paths) > 1) { - $rows[] = ['', '']; - } - $firstNamespace = false; - foreach ($paths as $path) { - $rows[] = [$namespace, $path.\DIRECTORY_SEPARATOR]; - $namespace = ''; - } - if (\count($paths) > 1) { - $rows[] = ['', '']; - $prevHasSeparator = true; - } else { - $prevHasSeparator = false; - } - } - if ($prevHasSeparator) { - array_pop($rows); - } - - return $rows; - } - - private function findAlternatives(string $name, array $collection): array - { - $alternatives = []; - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $threshold = 1e3; - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - private function getRelativePath(string $path): string - { - if (null !== $this->projectDir && str_starts_with($path, $this->projectDir)) { - return ltrim(substr($path, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - - return $path; - } - - private function isAbsolutePath(string $file): bool - { - return strspn($file, '/\\', 0, 1) || (\strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && strspn($file, '/\\', 2, 1)) || null !== parse_url($file, \PHP_URL_SCHEME); - } - - /** - * @return FilesystemLoader[] - */ - private function getFilesystemLoaders(): array - { - if (null !== $this->filesystemLoaders) { - return $this->filesystemLoaders; - } - $this->filesystemLoaders = []; - - $loader = $this->twig->getLoader(); - if ($loader instanceof FilesystemLoader) { - $this->filesystemLoaders[] = $loader; - } elseif ($loader instanceof ChainLoader) { - foreach ($loader->getLoaders() as $l) { - if ($l instanceof FilesystemLoader) { - $this->filesystemLoaders[] = $l; - } - } - } - - return $this->filesystemLoaders; - } - - private function getFileLink(string $absolutePath): string - { - if (null === $this->fileLinkFormatter) { - return ''; - } - - return (string) $this->fileLinkFormatter->format($absolutePath, 1); - } -} diff --git a/vendor/symfony/twig-bridge/Command/LintCommand.php b/vendor/symfony/twig-bridge/Command/LintCommand.php deleted file mode 100644 index b91110b..0000000 --- a/vendor/symfony/twig-bridge/Command/LintCommand.php +++ /dev/null @@ -1,296 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Command; - -use Symfony\Component\Console\CI\GithubActionReporter; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Finder\Finder; -use Twig\Environment; -use Twig\Error\Error; -use Twig\Loader\ArrayLoader; -use Twig\Loader\FilesystemLoader; -use Twig\Source; - -/** - * Command that will validate your template syntax and output encountered errors. - * - * @author Marc Weistroff - * @author Jérôme Tamarelle - */ -class LintCommand extends Command -{ - protected static $defaultName = 'lint:twig'; - protected static $defaultDescription = 'Lint a Twig template and outputs encountered errors'; - - private $twig; - - /** - * @var string|null - */ - private $format; - - public function __construct(Environment $twig) - { - parent::__construct(); - - $this->twig = $twig; - } - - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') - ->addOption('show-deprecations', null, InputOption::VALUE_NONE, 'Show deprecations as errors') - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->setHelp(<<<'EOF' -The %command.name% command lints a template and outputs to STDOUT -the first encountered syntax error. - -You can validate the syntax of contents passed from STDIN: - - cat filename | php %command.full_name% - - -Or the syntax of a file: - - php %command.full_name% filename - -Or of a whole directory: - - php %command.full_name% dirname - php %command.full_name% dirname --format=json - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = $input->getArgument('filename'); - $showDeprecations = $input->getOption('show-deprecations'); - $this->format = $input->getOption('format'); - - if (null === $this->format) { - $this->format = GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; - } - - if (['-'] === $filenames) { - return $this->display($input, $output, $io, [$this->validate(file_get_contents('php://stdin'), uniqid('sf_', true))]); - } - - if (!$filenames) { - $loader = $this->twig->getLoader(); - if ($loader instanceof FilesystemLoader) { - $paths = []; - foreach ($loader->getNamespaces() as $namespace) { - $paths[] = $loader->getPaths($namespace); - } - $filenames = array_merge(...$paths); - } - - if (!$filenames) { - throw new RuntimeException('Please provide a filename or pipe template content to STDIN.'); - } - } - - if ($showDeprecations) { - $prevErrorHandler = set_error_handler(static function ($level, $message, $file, $line) use (&$prevErrorHandler) { - if (\E_USER_DEPRECATED === $level) { - $templateLine = 0; - if (preg_match('/ at line (\d+)[ .]/', $message, $matches)) { - $templateLine = $matches[1]; - } - - throw new Error($message, $templateLine); - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }); - } - - try { - $filesInfo = $this->getFilesInfo($filenames); - } finally { - if ($showDeprecations) { - restore_error_handler(); - } - } - - return $this->display($input, $output, $io, $filesInfo); - } - - private function getFilesInfo(array $filenames): array - { - $filesInfo = []; - foreach ($filenames as $filename) { - foreach ($this->findFiles($filename) as $file) { - $filesInfo[] = $this->validate(file_get_contents($file), $file); - } - } - - return $filesInfo; - } - - protected function findFiles(string $filename) - { - if (is_file($filename)) { - return [$filename]; - } elseif (is_dir($filename)) { - return Finder::create()->files()->in($filename)->name('*.twig'); - } - - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - private function validate(string $template, string $file): array - { - $realLoader = $this->twig->getLoader(); - try { - $temporaryLoader = new ArrayLoader([$file => $template]); - $this->twig->setLoader($temporaryLoader); - $nodeTree = $this->twig->parse($this->twig->tokenize(new Source($template, $file))); - $this->twig->compile($nodeTree); - $this->twig->setLoader($realLoader); - } catch (Error $e) { - $this->twig->setLoader($realLoader); - - return ['template' => $template, 'file' => $file, 'line' => $e->getTemplateLine(), 'valid' => false, 'exception' => $e]; - } - - return ['template' => $template, 'file' => $file, 'valid' => true]; - } - - private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files) - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($output, $io, $files); - case 'json': - return $this->displayJson($output, $files); - case 'github': - return $this->displayTxt($output, $io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); - } - } - - private function displayTxt(OutputInterface $output, SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false) - { - $errors = 0; - $githubReporter = $errorAsGithubAnnotations ? new GithubActionReporter($output) : null; - - foreach ($filesInfo as $info) { - if ($info['valid'] && $output->isVerbose()) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$errors; - $this->renderException($io, $info['template'], $info['exception'], $info['file'], $githubReporter); - } - } - - if (0 === $errors) { - $io->success(sprintf('All %d Twig files contain valid syntax.', \count($filesInfo))); - } else { - $io->warning(sprintf('%d Twig files have valid syntax and %d contain errors.', \count($filesInfo) - $errors, $errors)); - } - - return min($errors, 1); - } - - private function displayJson(OutputInterface $output, array $filesInfo) - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - unset($v['template']); - if (!$v['valid']) { - $v['message'] = $v['exception']->getMessage(); - unset($v['exception']); - ++$errors; - } - }); - - $output->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null) - { - $line = $exception->getTemplateLine(); - - if ($githubReporter) { - $githubReporter->error($exception->getRawMessage(), $file, $line <= 0 ? null : $line); - } - - if ($file) { - $output->text(sprintf(' ERROR in %s (line %s)', $file, $line)); - } else { - $output->text(sprintf(' ERROR (line %s)', $line)); - } - - // If the line is not known (this might happen for deprecations if we fail at detecting the line for instance), - // we render the message without context, to ensure the message is displayed. - if ($line <= 0) { - $output->text(sprintf(' >> %s ', $exception->getRawMessage())); - - return; - } - - foreach ($this->getContext($template, $line) as $lineNumber => $code) { - $output->text(sprintf( - '%s %-6s %s', - $lineNumber === $line ? ' >> ' : ' ', - $lineNumber, - $code - )); - if ($lineNumber === $line) { - $output->text(sprintf(' >> %s ', $exception->getRawMessage())); - } - } - } - - private function getContext(string $template, int $line, int $context = 3) - { - $lines = explode("\n", $template); - - $position = max(0, $line - $context); - $max = min(\count($lines), $line - 1 + $context); - - $result = []; - while ($position < $max) { - $result[$position + 1] = $lines[$position]; - ++$position; - } - - return $result; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); - } - } -} diff --git a/vendor/symfony/twig-bridge/DataCollector/TwigDataCollector.php b/vendor/symfony/twig-bridge/DataCollector/TwigDataCollector.php deleted file mode 100644 index 4a46978..0000000 --- a/vendor/symfony/twig-bridge/DataCollector/TwigDataCollector.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Twig\Environment; -use Twig\Error\LoaderError; -use Twig\Markup; -use Twig\Profiler\Dumper\HtmlDumper; -use Twig\Profiler\Profile; - -/** - * @author Fabien Potencier - * - * @final - */ -class TwigDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $profile; - private $twig; - private $computed; - - public function __construct(Profile $profile, Environment $twig = null) - { - $this->profile = $profile; - $this->twig = $twig; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->profile->reset(); - $this->computed = null; - $this->data = []; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $this->data['profile'] = serialize($this->profile); - $this->data['template_paths'] = []; - - if (null === $this->twig) { - return; - } - - $templateFinder = function (Profile $profile) use (&$templateFinder) { - if ($profile->isTemplate()) { - try { - $template = $this->twig->load($name = $profile->getName()); - } catch (LoaderError $e) { - $template = null; - } - - if (null !== $template && '' !== $path = $template->getSourceContext()->getPath()) { - $this->data['template_paths'][$name] = $path; - } - } - - foreach ($profile as $p) { - $templateFinder($p); - } - }; - $templateFinder($this->profile); - } - - public function getTime() - { - return $this->getProfile()->getDuration() * 1000; - } - - public function getTemplateCount() - { - return $this->getComputedData('template_count'); - } - - public function getTemplatePaths() - { - return $this->data['template_paths']; - } - - public function getTemplates() - { - return $this->getComputedData('templates'); - } - - public function getBlockCount() - { - return $this->getComputedData('block_count'); - } - - public function getMacroCount() - { - return $this->getComputedData('macro_count'); - } - - public function getHtmlCallGraph() - { - $dumper = new HtmlDumper(); - $dump = $dumper->dump($this->getProfile()); - - // needed to remove the hardcoded CSS styles - $dump = str_replace([ - '', - '', - '', - '', - ], [ - '', - '', - '', - '', - ], $dump); - - return new Markup($dump, 'UTF-8'); - } - - public function getProfile() - { - if (null === $this->profile) { - $this->profile = unserialize($this->data['profile'], ['allowed_classes' => ['Twig_Profiler_Profile', 'Twig\Profiler\Profile']]); - } - - return $this->profile; - } - - private function getComputedData(string $index) - { - if (null === $this->computed) { - $this->computed = $this->computeData($this->getProfile()); - } - - return $this->computed[$index]; - } - - private function computeData(Profile $profile) - { - $data = [ - 'template_count' => 0, - 'block_count' => 0, - 'macro_count' => 0, - ]; - - $templates = []; - foreach ($profile as $p) { - $d = $this->computeData($p); - - $data['template_count'] += ($p->isTemplate() ? 1 : 0) + $d['template_count']; - $data['block_count'] += ($p->isBlock() ? 1 : 0) + $d['block_count']; - $data['macro_count'] += ($p->isMacro() ? 1 : 0) + $d['macro_count']; - - if ($p->isTemplate()) { - if (!isset($templates[$p->getTemplate()])) { - $templates[$p->getTemplate()] = 1; - } else { - ++$templates[$p->getTemplate()]; - } - } - - foreach ($d['templates'] as $template => $count) { - if (!isset($templates[$template])) { - $templates[$template] = $count; - } else { - $templates[$template] += $count; - } - } - } - $data['templates'] = $templates; - - return $data; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'twig'; - } -} diff --git a/vendor/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php b/vendor/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php deleted file mode 100644 index b0ccd68..0000000 --- a/vendor/symfony/twig-bridge/ErrorRenderer/TwigErrorRenderer.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\ErrorRenderer; - -use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\RequestStack; -use Twig\Environment; - -/** - * Provides the ability to render custom Twig-based HTML error pages - * in non-debug mode, otherwise falls back to HtmlErrorRenderer. - * - * @author Yonel Ceruto - */ -class TwigErrorRenderer implements ErrorRendererInterface -{ - private $twig; - private $fallbackErrorRenderer; - private $debug; - - /** - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - */ - public function __construct(Environment $twig, HtmlErrorRenderer $fallbackErrorRenderer = null, $debug = false) - { - if (!\is_bool($debug) && !\is_callable($debug)) { - throw new \TypeError(sprintf('Argument 3 passed to "%s()" must be a boolean or a callable, "%s" given.', __METHOD__, get_debug_type($debug))); - } - - $this->twig = $twig; - $this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer(); - $this->debug = $debug; - } - - /** - * {@inheritdoc} - */ - public function render(\Throwable $exception): FlattenException - { - $exception = $this->fallbackErrorRenderer->render($exception); - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - - if ($debug || !$template = $this->findTemplate($exception->getStatusCode())) { - return $exception; - } - - return $exception->setAsString($this->twig->render($template, [ - 'exception' => $exception, - 'status_code' => $exception->getStatusCode(), - 'status_text' => $exception->getStatusText(), - ])); - } - - public static function isDebug(RequestStack $requestStack, bool $debug): \Closure - { - return static function () use ($requestStack, $debug): bool { - if (!$request = $requestStack->getCurrentRequest()) { - return $debug; - } - - return $debug && $request->attributes->getBoolean('showException', true); - }; - } - - private function findTemplate(int $statusCode): ?string - { - $template = sprintf('@Twig/Exception/error%s.html.twig', $statusCode); - if ($this->twig->getLoader()->exists($template)) { - return $template; - } - - $template = '@Twig/Exception/error.html.twig'; - if ($this->twig->getLoader()->exists($template)) { - return $template; - } - - return null; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/AssetExtension.php b/vendor/symfony/twig-bridge/Extension/AssetExtension.php deleted file mode 100644 index 694821f..0000000 --- a/vendor/symfony/twig-bridge/Extension/AssetExtension.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Asset\Packages; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony Asset component. - * - * @author Fabien Potencier - */ -final class AssetExtension extends AbstractExtension -{ - private $packages; - - public function __construct(Packages $packages) - { - $this->packages = $packages; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('asset', [$this, 'getAssetUrl']), - new TwigFunction('asset_version', [$this, 'getAssetVersion']), - ]; - } - - /** - * Returns the public url/path of an asset. - * - * If the package used to generate the path is an instance of - * UrlPackage, you will always get a URL and not a path. - */ - public function getAssetUrl(string $path, string $packageName = null): string - { - return $this->packages->getUrl($path, $packageName); - } - - /** - * Returns the version of an asset. - */ - public function getAssetVersion(string $path, string $packageName = null): string - { - return $this->packages->getVersion($path, $packageName); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/CodeExtension.php b/vendor/symfony/twig-bridge/Extension/CodeExtension.php deleted file mode 100644 index 15b7069..0000000 --- a/vendor/symfony/twig-bridge/Extension/CodeExtension.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * Twig extension relate to PHP code and used by the profiler and the default exception templates. - * - * @author Fabien Potencier - */ -final class CodeExtension extends AbstractExtension -{ - private $fileLinkFormat; - private $charset; - private $projectDir; - - /** - * @param string|FileLinkFormatter $fileLinkFormat The format for links to source files - */ - public function __construct($fileLinkFormat, string $projectDir, string $charset) - { - $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->projectDir = str_replace('\\', '/', $projectDir).'/'; - $this->charset = $charset; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('abbr_class', [$this, 'abbrClass'], ['is_safe' => ['html']]), - new TwigFilter('abbr_method', [$this, 'abbrMethod'], ['is_safe' => ['html']]), - new TwigFilter('format_args', [$this, 'formatArgs'], ['is_safe' => ['html']]), - new TwigFilter('format_args_as_text', [$this, 'formatArgsAsText']), - new TwigFilter('file_excerpt', [$this, 'fileExcerpt'], ['is_safe' => ['html']]), - new TwigFilter('format_file', [$this, 'formatFile'], ['is_safe' => ['html']]), - new TwigFilter('format_file_from_text', [$this, 'formatFileFromText'], ['is_safe' => ['html']]), - new TwigFilter('format_log_message', [$this, 'formatLogMessage'], ['is_safe' => ['html']]), - new TwigFilter('file_link', [$this, 'getFileLink']), - new TwigFilter('file_relative', [$this, 'getFileRelative']), - ]; - } - - public function abbrClass(string $class): string - { - $parts = explode('\\', $class); - $short = array_pop($parts); - - return sprintf('%s', $class, $short); - } - - public function abbrMethod(string $method): string - { - if (str_contains($method, '::')) { - [$class, $method] = explode('::', $method, 2); - $result = sprintf('%s::%s()', $this->abbrClass($class), $method); - } elseif ('Closure' === $method) { - $result = sprintf('%1$s', $method); - } else { - $result = sprintf('%1$s()', $method); - } - - return $result; - } - - /** - * Formats an array as a string. - */ - public function formatArgs(array $args): string - { - $result = []; - foreach ($args as $key => $item) { - if ('object' === $item[0]) { - $parts = explode('\\', $item[1]); - $short = array_pop($parts); - $formattedValue = sprintf('object(%s)', $item[1], $short); - } elseif ('array' === $item[0]) { - $formattedValue = sprintf('array(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('null' === $item[0]) { - $formattedValue = 'null'; - } elseif ('boolean' === $item[0]) { - $formattedValue = ''.strtolower(var_export($item[1], true)).''; - } elseif ('resource' === $item[0]) { - $formattedValue = 'resource'; - } else { - $formattedValue = str_replace("\n", '', htmlspecialchars(var_export($item[1], true), \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset)); - } - - $result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); - } - - return implode(', ', $result); - } - - /** - * Formats an array as a string. - */ - public function formatArgsAsText(array $args): string - { - return strip_tags($this->formatArgs($args)); - } - - /** - * Returns an excerpt of a code file around the given line number. - */ - public function fileExcerpt(string $file, int $line, int $srcContext = 3): ?string - { - if (is_file($file) && is_readable($file)) { - // highlight_file could throw warnings - // see https://bugs.php.net/25725 - $code = @highlight_file($file, true); - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
    )++[^<]*+)
    #', function ($m) { - return "".str_replace('
    ', "

    ", $m[2]).''; - }, $code); - $content = explode('
    ', $code); - - $lines = []; - if (0 > $srcContext) { - $srcContext = \count($content); - } - - for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, \count($content)); $i <= $max; ++$i) { - $lines[] = ''.self::fixCodeMarkup($content[$i - 1]).'
  • '; - } - - return '
      '.implode("\n", $lines).'
    '; - } - - return null; - } - - /** - * Formats a file path. - */ - public function formatFile(string $file, int $line, string $text = null): string - { - $file = trim($file); - - if (null === $text) { - $text = $file; - if (null !== $rel = $this->getFileRelative($text)) { - $rel = explode('/', $rel, 2); - $text = sprintf('%s%s', $this->projectDir, $rel[0], '/'.($rel[1] ?? '')); - } - } - - if (0 < $line) { - $text .= ' at line '.$line; - } - - if (false !== $link = $this->getFileLink($file, $line)) { - return sprintf('%s', htmlspecialchars($link, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset), $text); - } - - return $text; - } - - /** - * Returns the link for a given file/line pair. - * - * @return string|false - */ - public function getFileLink(string $file, int $line) - { - if ($fmt = $this->fileLinkFormat) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } - - public function getFileRelative(string $file): ?string - { - $file = str_replace('\\', '/', $file); - - if (null !== $this->projectDir && str_starts_with($file, $this->projectDir)) { - return ltrim(substr($file, \strlen($this->projectDir)), '/'); - } - - return null; - } - - public function formatFileFromText(string $text): string - { - return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { - return 'in '.$this->formatFile($match[2], $match[3]); - }, $text); - } - - /** - * @internal - */ - public function formatLogMessage(string $message, array $context): string - { - if ($context && str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (is_scalar($val)) { - $replacements['{'.$key.'}'] = $val; - } - } - - if ($replacements) { - $message = strtr($message, $replacements); - } - } - - return htmlspecialchars($message, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset); - } - - protected static function fixCodeMarkup(string $line): string - { - // ending tag from previous line - $opening = strpos($line, ''); - if (false !== $closing && (false === $opening || $closing < $opening)) { - $line = substr_replace($line, '', $closing, 7); - } - - // missing tag at the end of line - $opening = strpos($line, ''); - if (false !== $opening && (false === $closing || $closing > $opening)) { - $line .= ''; - } - - return trim($line); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/CsrfExtension.php b/vendor/symfony/twig-bridge/Extension/CsrfExtension.php deleted file mode 100644 index 646a487..0000000 --- a/vendor/symfony/twig-bridge/Extension/CsrfExtension.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * @author Christian Flothmann - * @author Titouan Galopin - */ -final class CsrfExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('csrf_token', [CsrfRuntime::class, 'getCsrfToken']), - ]; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/CsrfRuntime.php b/vendor/symfony/twig-bridge/Extension/CsrfRuntime.php deleted file mode 100644 index c3d5da6..0000000 --- a/vendor/symfony/twig-bridge/Extension/CsrfRuntime.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; - -/** - * @author Christian Flothmann - * @author Titouan Galopin - */ -final class CsrfRuntime -{ - private $csrfTokenManager; - - public function __construct(CsrfTokenManagerInterface $csrfTokenManager) - { - $this->csrfTokenManager = $csrfTokenManager; - } - - public function getCsrfToken(string $tokenId): string - { - return $this->csrfTokenManager->getToken($tokenId)->getValue(); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/DumpExtension.php b/vendor/symfony/twig-bridge/Extension/DumpExtension.php deleted file mode 100644 index 46ad8ea..0000000 --- a/vendor/symfony/twig-bridge/Extension/DumpExtension.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\DumpTokenParser; -use Symfony\Component\VarDumper\Cloner\ClonerInterface; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Twig\Environment; -use Twig\Extension\AbstractExtension; -use Twig\Template; -use Twig\TwigFunction; - -/** - * Provides integration of the dump() function with Twig. - * - * @author Nicolas Grekas - */ -final class DumpExtension extends AbstractExtension -{ - private $cloner; - private $dumper; - - public function __construct(ClonerInterface $cloner, HtmlDumper $dumper = null) - { - $this->cloner = $cloner; - $this->dumper = $dumper; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('dump', [$this, 'dump'], ['is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true]), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [new DumpTokenParser()]; - } - - public function dump(Environment $env, array $context): ?string - { - if (!$env->isDebug()) { - return null; - } - - if (2 === \func_num_args()) { - $vars = []; - foreach ($context as $key => $value) { - if (!$value instanceof Template) { - $vars[$key] = $value; - } - } - - $vars = [$vars]; - } else { - $vars = \func_get_args(); - unset($vars[0], $vars[1]); - } - - $dump = fopen('php://memory', 'r+'); - $this->dumper = $this->dumper ?? new HtmlDumper(); - $this->dumper->setCharset($env->getCharset()); - - foreach ($vars as $value) { - $this->dumper->dump($this->cloner->cloneVar($value), $dump); - } - - return stream_get_contents($dump, -1, 0); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/ExpressionExtension.php b/vendor/symfony/twig-bridge/Extension/ExpressionExtension.php deleted file mode 100644 index 8d2a35c..0000000 --- a/vendor/symfony/twig-bridge/Extension/ExpressionExtension.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\ExpressionLanguage\Expression; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * ExpressionExtension gives a way to create Expressions from a template. - * - * @author Fabien Potencier - */ -final class ExpressionExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('expression', [$this, 'createExpression']), - ]; - } - - public function createExpression(string $expression): Expression - { - return new Expression($expression); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/FormExtension.php b/vendor/symfony/twig-bridge/Extension/FormExtension.php deleted file mode 100644 index 7f0b1ed..0000000 --- a/vendor/symfony/twig-bridge/Extension/FormExtension.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser; -use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView; -use Symfony\Component\Form\ChoiceList\View\ChoiceView; -use Symfony\Component\Form\FormError; -use Symfony\Component\Form\FormView; -use Symfony\Contracts\Translation\TranslatorInterface; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; -use Twig\TwigFunction; -use Twig\TwigTest; - -/** - * FormExtension extends Twig with form capabilities. - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -final class FormExtension extends AbstractExtension -{ - private $translator; - - public function __construct(TranslatorInterface $translator = null) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [ - // {% form_theme form "SomeBundle::widgets.twig" %} - new FormThemeTokenParser(), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('form_widget', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_errors', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_label', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_help', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_row', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_rest', null, ['node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_start', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('form_end', null, ['node_class' => 'Symfony\Bridge\Twig\Node\RenderBlockNode', 'is_safe' => ['html']]), - new TwigFunction('csrf_token', ['Symfony\Component\Form\FormRenderer', 'renderCsrfToken']), - new TwigFunction('form_parent', 'Symfony\Bridge\Twig\Extension\twig_get_form_parent'), - new TwigFunction('field_name', [$this, 'getFieldName']), - new TwigFunction('field_value', [$this, 'getFieldValue']), - new TwigFunction('field_label', [$this, 'getFieldLabel']), - new TwigFunction('field_help', [$this, 'getFieldHelp']), - new TwigFunction('field_errors', [$this, 'getFieldErrors']), - new TwigFunction('field_choices', [$this, 'getFieldChoices']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('humanize', ['Symfony\Component\Form\FormRenderer', 'humanize']), - new TwigFilter('form_encode_currency', ['Symfony\Component\Form\FormRenderer', 'encodeCurrency'], ['is_safe' => ['html'], 'needs_environment' => true]), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTests(): array - { - return [ - new TwigTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'), - new TwigTest('rootform', 'Symfony\Bridge\Twig\Extension\twig_is_root_form'), - ]; - } - - public function getFieldName(FormView $view): string - { - $view->setRendered(); - - return $view->vars['full_name']; - } - - /** - * @return string|array - */ - public function getFieldValue(FormView $view) - { - return $view->vars['value']; - } - - public function getFieldLabel(FormView $view): ?string - { - if (false === $label = $view->vars['label']) { - return null; - } - - if (!$label && $labelFormat = $view->vars['label_format']) { - $label = str_replace(['%id%', '%name%'], [$view->vars['id'], $view->vars['name']], $labelFormat); - } elseif (!$label) { - $label = ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $view->vars['name'])))); - } - - return $this->createFieldTranslation( - $label, - $view->vars['label_translation_parameters'] ?: [], - $view->vars['translation_domain'] - ); - } - - public function getFieldHelp(FormView $view): ?string - { - return $this->createFieldTranslation( - $view->vars['help'], - $view->vars['help_translation_parameters'] ?: [], - $view->vars['translation_domain'] - ); - } - - /** - * @return string[] - */ - public function getFieldErrors(FormView $view): iterable - { - /** @var FormError $error */ - foreach ($view->vars['errors'] as $error) { - yield $error->getMessage(); - } - } - - /** - * @return string[]|string[][] - */ - public function getFieldChoices(FormView $view): iterable - { - yield from $this->createFieldChoicesList($view->vars['choices'], $view->vars['choice_translation_domain']); - } - - private function createFieldChoicesList(iterable $choices, $translationDomain): iterable - { - foreach ($choices as $choice) { - $translatableLabel = $this->createFieldTranslation($choice->label, [], $translationDomain); - - if ($choice instanceof ChoiceGroupView) { - yield $translatableLabel => $this->createFieldChoicesList($choice, $translationDomain); - - continue; - } - - /* @var ChoiceView $choice */ - yield $translatableLabel => $choice->value; - } - } - - private function createFieldTranslation(?string $value, array $parameters, $domain): ?string - { - if (!$this->translator || !$value || false === $domain) { - return $value; - } - - return $this->translator->trans($value, $parameters, $domain); - } -} - -/** - * Returns whether a choice is selected for a given form value. - * - * This is a function and not callable due to performance reasons. - * - * @param string|array $selectedValue The selected value to compare - * - * @see ChoiceView::isSelected() - */ -function twig_is_selected_choice(ChoiceView $choice, $selectedValue): bool -{ - if (\is_array($selectedValue)) { - return \in_array($choice->value, $selectedValue, true); - } - - return $choice->value === $selectedValue; -} - -/** - * @internal - */ -function twig_is_root_form(FormView $formView): bool -{ - return null === $formView->parent; -} - -/** - * @internal - */ -function twig_get_form_parent(FormView $formView): ?FormView -{ - return $formView->parent; -} diff --git a/vendor/symfony/twig-bridge/Extension/HttpFoundationExtension.php b/vendor/symfony/twig-bridge/Extension/HttpFoundationExtension.php deleted file mode 100644 index a9ee05c..0000000 --- a/vendor/symfony/twig-bridge/Extension/HttpFoundationExtension.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\UrlHelper; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony HttpFoundation component. - * - * @author Fabien Potencier - */ -final class HttpFoundationExtension extends AbstractExtension -{ - private $urlHelper; - - public function __construct(UrlHelper $urlHelper) - { - $this->urlHelper = $urlHelper; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('absolute_url', [$this, 'generateAbsoluteUrl']), - new TwigFunction('relative_path', [$this, 'generateRelativePath']), - ]; - } - - /** - * Returns the absolute URL for the given absolute or relative path. - * - * This method returns the path unchanged if no request is available. - * - * @see Request::getUriForPath() - */ - public function generateAbsoluteUrl(string $path): string - { - return $this->urlHelper->getAbsoluteUrl($path); - } - - /** - * Returns a relative path based on the current Request. - * - * This method returns the path unchanged if no request is available. - * - * @see Request::getRelativeUriForPath() - */ - public function generateRelativePath(string $path): string - { - return $this->urlHelper->getRelativePath($path); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/HttpKernelExtension.php b/vendor/symfony/twig-bridge/Extension/HttpKernelExtension.php deleted file mode 100644 index 1af9ddb..0000000 --- a/vendor/symfony/twig-bridge/Extension/HttpKernelExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Provides integration with the HttpKernel component. - * - * @author Fabien Potencier - */ -final class HttpKernelExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('render', [HttpKernelRuntime::class, 'renderFragment'], ['is_safe' => ['html']]), - new TwigFunction('render_*', [HttpKernelRuntime::class, 'renderFragmentStrategy'], ['is_safe' => ['html']]), - new TwigFunction('fragment_uri', [HttpKernelRuntime::class, 'generateFragmentUri']), - new TwigFunction('controller', static::class.'::controller'), - ]; - } - - public static function controller(string $controller, array $attributes = [], array $query = []): ControllerReference - { - return new ControllerReference($controller, $attributes, $query); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/HttpKernelRuntime.php b/vendor/symfony/twig-bridge/Extension/HttpKernelRuntime.php deleted file mode 100644 index ab83054..0000000 --- a/vendor/symfony/twig-bridge/Extension/HttpKernelRuntime.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Fragment\FragmentHandler; -use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface; - -/** - * Provides integration with the HttpKernel component. - * - * @author Fabien Potencier - */ -final class HttpKernelRuntime -{ - private $handler; - private $fragmentUriGenerator; - - public function __construct(FragmentHandler $handler, FragmentUriGeneratorInterface $fragmentUriGenerator = null) - { - $this->handler = $handler; - $this->fragmentUriGenerator = $fragmentUriGenerator; - } - - /** - * Renders a fragment. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @see FragmentHandler::render() - */ - public function renderFragment($uri, array $options = []): string - { - $strategy = $options['strategy'] ?? 'inline'; - unset($options['strategy']); - - return $this->handler->render($uri, $strategy, $options); - } - - /** - * Renders a fragment. - * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * - * @see FragmentHandler::render() - */ - public function renderFragmentStrategy(string $strategy, $uri, array $options = []): string - { - return $this->handler->render($uri, $strategy, $options); - } - - public function generateFragmentUri(ControllerReference $controller, bool $absolute = false, bool $strict = true, bool $sign = true): string - { - if (null === $this->fragmentUriGenerator) { - throw new \LogicException(sprintf('An instance of "%s" must be provided to use "%s()".', FragmentUriGeneratorInterface::class, __METHOD__)); - } - - return $this->fragmentUriGenerator->generate($controller, null, $absolute, $strict, $sign); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/LogoutUrlExtension.php b/vendor/symfony/twig-bridge/Extension/LogoutUrlExtension.php deleted file mode 100644 index 071b9ff..0000000 --- a/vendor/symfony/twig-bridge/Extension/LogoutUrlExtension.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * LogoutUrlHelper provides generator functions for the logout URL to Twig. - * - * @author Jeremy Mikola - */ -final class LogoutUrlExtension extends AbstractExtension -{ - private $generator; - - public function __construct(LogoutUrlGenerator $generator) - { - $this->generator = $generator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('logout_url', [$this, 'getLogoutUrl']), - new TwigFunction('logout_path', [$this, 'getLogoutPath']), - ]; - } - - /** - * Generates the relative logout URL for the firewall. - * - * @param string|null $key The firewall key or null to use the current firewall key - */ - public function getLogoutPath(string $key = null): string - { - return $this->generator->getLogoutPath($key); - } - - /** - * Generates the absolute logout URL for the firewall. - * - * @param string|null $key The firewall key or null to use the current firewall key - */ - public function getLogoutUrl(string $key = null): string - { - return $this->generator->getLogoutUrl($key); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/ProfilerExtension.php b/vendor/symfony/twig-bridge/Extension/ProfilerExtension.php deleted file mode 100644 index 51d6eba..0000000 --- a/vendor/symfony/twig-bridge/Extension/ProfilerExtension.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\Stopwatch\StopwatchEvent; -use Twig\Extension\ProfilerExtension as BaseProfilerExtension; -use Twig\Profiler\Profile; - -/** - * @author Fabien Potencier - */ -final class ProfilerExtension extends BaseProfilerExtension -{ - private $stopwatch; - - /** - * @var \SplObjectStorage - */ - private $events; - - public function __construct(Profile $profile, Stopwatch $stopwatch = null) - { - parent::__construct($profile); - - $this->stopwatch = $stopwatch; - $this->events = new \SplObjectStorage(); - } - - public function enter(Profile $profile): void - { - if ($this->stopwatch && $profile->isTemplate()) { - $this->events[$profile] = $this->stopwatch->start($profile->getName(), 'template'); - } - - parent::enter($profile); - } - - public function leave(Profile $profile): void - { - parent::leave($profile); - - if ($this->stopwatch && $profile->isTemplate()) { - $this->events[$profile]->stop(); - unset($this->events[$profile]); - } - } -} diff --git a/vendor/symfony/twig-bridge/Extension/RoutingExtension.php b/vendor/symfony/twig-bridge/Extension/RoutingExtension.php deleted file mode 100644 index 800c22f..0000000 --- a/vendor/symfony/twig-bridge/Extension/RoutingExtension.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Extension\AbstractExtension; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Node; -use Twig\TwigFunction; - -/** - * Provides integration of the Routing component with Twig. - * - * @author Fabien Potencier - */ -final class RoutingExtension extends AbstractExtension -{ - private $generator; - - public function __construct(UrlGeneratorInterface $generator) - { - $this->generator = $generator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('url', [$this, 'getUrl'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]), - new TwigFunction('path', [$this, 'getPath'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]), - ]; - } - - public function getPath(string $name, array $parameters = [], bool $relative = false): string - { - return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH); - } - - public function getUrl(string $name, array $parameters = [], bool $schemeRelative = false): string - { - return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); - } - - /** - * Determines at compile time whether the generated URL will be safe and thus - * saving the unneeded automatic escaping for performance reasons. - * - * The URL generation process percent encodes non-alphanumeric characters. So there is no risk - * that malicious/invalid characters are part of the URL. The only character within an URL that - * must be escaped in html is the ampersand ("&") which separates query params. So we cannot mark - * the URL generation as always safe, but only when we are sure there won't be multiple query - * params. This is the case when there are none or only one constant parameter given. - * E.g. we know beforehand this will be safe: - * - path('route') - * - path('route', {'param': 'value'}) - * But the following may not: - * - path('route', var) - * - path('route', {'param': ['val1', 'val2'] }) // a sub-array - * - path('route', {'param1': 'value1', 'param2': 'value2'}) - * If param1 and param2 reference placeholder in the route, it would still be safe. But we don't know. - * - * @param Node $argsNode The arguments of the path/url function - * - * @return array An array with the contexts the URL is safe - */ - public function isUrlGenerationSafe(Node $argsNode): array - { - // support named arguments - $paramsNode = $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : ( - $argsNode->hasNode(1) ? $argsNode->getNode(1) : null - ); - - if (null === $paramsNode || $paramsNode instanceof ArrayExpression && \count($paramsNode) <= 2 && - (!$paramsNode->hasNode(1) || $paramsNode->getNode(1) instanceof ConstantExpression) - ) { - return ['html']; - } - - return []; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/SecurityExtension.php b/vendor/symfony/twig-bridge/Extension/SecurityExtension.php deleted file mode 100644 index 0e58fc0..0000000 --- a/vendor/symfony/twig-bridge/Extension/SecurityExtension.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Security\Acl\Voter\FieldVote; -use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException; -use Symfony\Component\Security\Http\Impersonate\ImpersonateUrlGenerator; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * SecurityExtension exposes security context features. - * - * @author Fabien Potencier - */ -final class SecurityExtension extends AbstractExtension -{ - private $securityChecker; - - private $impersonateUrlGenerator; - - public function __construct(AuthorizationCheckerInterface $securityChecker = null, ImpersonateUrlGenerator $impersonateUrlGenerator = null) - { - $this->securityChecker = $securityChecker; - $this->impersonateUrlGenerator = $impersonateUrlGenerator; - } - - /** - * @param mixed $object - */ - public function isGranted($role, $object = null, string $field = null): bool - { - if (null === $this->securityChecker) { - return false; - } - - if (null !== $field) { - $object = new FieldVote($object, $field); - } - - try { - return $this->securityChecker->isGranted($role, $object); - } catch (AuthenticationCredentialsNotFoundException $e) { - return false; - } - } - - public function getImpersonateExitUrl(string $exitTo = null): string - { - if (null === $this->impersonateUrlGenerator) { - return ''; - } - - return $this->impersonateUrlGenerator->generateExitUrl($exitTo); - } - - public function getImpersonateExitPath(string $exitTo = null): string - { - if (null === $this->impersonateUrlGenerator) { - return ''; - } - - return $this->impersonateUrlGenerator->generateExitPath($exitTo); - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('is_granted', [$this, 'isGranted']), - new TwigFunction('impersonation_exit_url', [$this, 'getImpersonateExitUrl']), - new TwigFunction('impersonation_exit_path', [$this, 'getImpersonateExitPath']), - ]; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/SerializerExtension.php b/vendor/symfony/twig-bridge/Extension/SerializerExtension.php deleted file mode 100644 index f38571e..0000000 --- a/vendor/symfony/twig-bridge/Extension/SerializerExtension.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * @author Jesse Rushlow - */ -final class SerializerExtension extends AbstractExtension -{ - public function getFilters(): array - { - return [ - new TwigFilter('serialize', [SerializerRuntime::class, 'serialize']), - ]; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/SerializerRuntime.php b/vendor/symfony/twig-bridge/Extension/SerializerRuntime.php deleted file mode 100644 index 3a4087a..0000000 --- a/vendor/symfony/twig-bridge/Extension/SerializerRuntime.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Serializer\SerializerInterface; -use Twig\Extension\RuntimeExtensionInterface; - -/** - * @author Jesse Rushlow - */ -final class SerializerRuntime implements RuntimeExtensionInterface -{ - private $serializer; - - public function __construct(SerializerInterface $serializer) - { - $this->serializer = $serializer; - } - - public function serialize($data, string $format = 'json', array $context = []): string - { - return $this->serializer->serialize($data, $format, $context); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php b/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php deleted file mode 100644 index 80a25a9..0000000 --- a/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\TokenParser\StopwatchTokenParser; -use Symfony\Component\Stopwatch\Stopwatch; -use Twig\Extension\AbstractExtension; -use Twig\TokenParser\TokenParserInterface; - -/** - * Twig extension for the stopwatch helper. - * - * @author Wouter J - */ -final class StopwatchExtension extends AbstractExtension -{ - private $stopwatch; - private $enabled; - - public function __construct(Stopwatch $stopwatch = null, bool $enabled = true) - { - $this->stopwatch = $stopwatch; - $this->enabled = $enabled; - } - - public function getStopwatch(): Stopwatch - { - return $this->stopwatch; - } - - /** - * @return TokenParserInterface[] - */ - public function getTokenParsers(): array - { - return [ - /* - * {% stopwatch foo %} - * Some stuff which will be recorded on the timeline - * {% endstopwatch %} - */ - new StopwatchTokenParser(null !== $this->stopwatch && $this->enabled), - ]; - } -} diff --git a/vendor/symfony/twig-bridge/Extension/TranslationExtension.php b/vendor/symfony/twig-bridge/Extension/TranslationExtension.php deleted file mode 100644 index c2797d8..0000000 --- a/vendor/symfony/twig-bridge/Extension/TranslationExtension.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultDomainNodeVisitor; -use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor; -use Symfony\Bridge\Twig\TokenParser\TransDefaultDomainTokenParser; -use Symfony\Bridge\Twig\TokenParser\TransTokenParser; -use Symfony\Component\Translation\TranslatableMessage; -use Symfony\Contracts\Translation\TranslatableInterface; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; -use Twig\TwigFunction; - -// Help opcache.preload discover always-needed symbols -class_exists(TranslatorInterface::class); -class_exists(TranslatorTrait::class); - -/** - * Provides integration of the Translation component with Twig. - * - * @author Fabien Potencier - */ -final class TranslationExtension extends AbstractExtension -{ - private $translator; - private $translationNodeVisitor; - - public function __construct(TranslatorInterface $translator = null, TranslationNodeVisitor $translationNodeVisitor = null) - { - $this->translator = $translator; - $this->translationNodeVisitor = $translationNodeVisitor; - } - - public function getTranslator(): TranslatorInterface - { - if (null === $this->translator) { - if (!interface_exists(TranslatorInterface::class)) { - throw new \LogicException(sprintf('You cannot use the "%s" if the Translation Contracts are not available. Try running "composer require symfony/translation".', __CLASS__)); - } - - $this->translator = new class() implements TranslatorInterface { - use TranslatorTrait; - }; - } - - return $this->translator; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('t', [$this, 'createTranslatable']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('trans', [$this, 'trans']), - ]; - } - - /** - * {@inheritdoc} - */ - public function getTokenParsers(): array - { - return [ - // {% trans %}Symfony is great!{% endtrans %} - new TransTokenParser(), - - // {% trans_default_domain "foobar" %} - new TransDefaultDomainTokenParser(), - ]; - } - - /** - * {@inheritdoc} - */ - public function getNodeVisitors(): array - { - return [$this->getTranslationNodeVisitor(), new TranslationDefaultDomainNodeVisitor()]; - } - - public function getTranslationNodeVisitor(): TranslationNodeVisitor - { - return $this->translationNodeVisitor ?: $this->translationNodeVisitor = new TranslationNodeVisitor(); - } - - /** - * @param string|\Stringable|TranslatableInterface|null $message - * @param array|string $arguments Can be the locale as a string when $message is a TranslatableInterface - */ - public function trans($message, $arguments = [], string $domain = null, string $locale = null, int $count = null): string - { - if ($message instanceof TranslatableInterface) { - if ([] !== $arguments && !\is_string($arguments)) { - throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a locale passed as a string when the message is a "%s", "%s" given.', __METHOD__, TranslatableInterface::class, get_debug_type($arguments))); - } - - return $message->trans($this->getTranslator(), $locale ?? (\is_string($arguments) ? $arguments : null)); - } - - if (!\is_array($arguments)) { - throw new \TypeError(sprintf('Unless the message is a "%s", argument 2 passed to "%s()" must be an array of parameters, "%s" given.', TranslatableInterface::class, __METHOD__, get_debug_type($arguments))); - } - - if ('' === $message = (string) $message) { - return ''; - } - - if (null !== $count) { - $arguments['%count%'] = $count; - } - - return $this->getTranslator()->trans($message, $arguments, $domain, $locale); - } - - public function createTranslatable(string $message, array $parameters = [], string $domain = null): TranslatableMessage - { - if (!class_exists(TranslatableMessage::class)) { - throw new \LogicException(sprintf('You cannot use the "%s" as the Translation Component is not installed. Try running "composer require symfony/translation".', __CLASS__)); - } - - return new TranslatableMessage($message, $parameters, $domain); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/WebLinkExtension.php b/vendor/symfony/twig-bridge/Extension/WebLinkExtension.php deleted file mode 100644 index 652a757..0000000 --- a/vendor/symfony/twig-bridge/Extension/WebLinkExtension.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\WebLink\GenericLinkProvider; -use Symfony\Component\WebLink\Link; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * Twig extension for the Symfony WebLink component. - * - * @author Kévin Dunglas - */ -final class WebLinkExtension extends AbstractExtension -{ - private $requestStack; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('link', [$this, 'link']), - new TwigFunction('preload', [$this, 'preload']), - new TwigFunction('dns_prefetch', [$this, 'dnsPrefetch']), - new TwigFunction('preconnect', [$this, 'preconnect']), - new TwigFunction('prefetch', [$this, 'prefetch']), - new TwigFunction('prerender', [$this, 'prerender']), - ]; - } - - /** - * Adds a "Link" HTTP header. - * - * @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch") - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The relation URI - */ - public function link(string $uri, string $rel, array $attributes = []): string - { - if (!$request = $this->requestStack->getMainRequest()) { - return $uri; - } - - $link = new Link($rel, $uri); - foreach ($attributes as $key => $value) { - $link = $link->withAttribute($key, $value); - } - - $linkProvider = $request->attributes->get('_links', new GenericLinkProvider()); - $request->attributes->set('_links', $linkProvider->withLink($link)); - - return $uri; - } - - /** - * Preloads a resource. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['crossorigin' => 'use-credentials']") - * - * @return string The path of the asset - */ - public function preload(string $uri, array $attributes = []): string - { - return $this->link($uri, 'preload', $attributes); - } - - /** - * Resolves a resource origin as early as possible. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function dnsPrefetch(string $uri, array $attributes = []): string - { - return $this->link($uri, 'dns-prefetch', $attributes); - } - - /** - * Initiates a early connection to a resource (DNS resolution, TCP handshake, TLS negotiation). - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function preconnect(string $uri, array $attributes = []): string - { - return $this->link($uri, 'preconnect', $attributes); - } - - /** - * Indicates to the client that it should prefetch this resource. - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function prefetch(string $uri, array $attributes = []): string - { - return $this->link($uri, 'prefetch', $attributes); - } - - /** - * Indicates to the client that it should prerender this resource . - * - * @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]") - * - * @return string The path of the asset - */ - public function prerender(string $uri, array $attributes = []): string - { - return $this->link($uri, 'prerender', $attributes); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/WorkflowExtension.php b/vendor/symfony/twig-bridge/Extension/WorkflowExtension.php deleted file mode 100644 index 9b5911e..0000000 --- a/vendor/symfony/twig-bridge/Extension/WorkflowExtension.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Workflow\Registry; -use Symfony\Component\Workflow\Transition; -use Symfony\Component\Workflow\TransitionBlockerList; -use Twig\Extension\AbstractExtension; -use Twig\TwigFunction; - -/** - * WorkflowExtension. - * - * @author Grégoire Pineau - * @author Carlos Pereira De Amorim - */ -final class WorkflowExtension extends AbstractExtension -{ - private $workflowRegistry; - - public function __construct(Registry $workflowRegistry) - { - $this->workflowRegistry = $workflowRegistry; - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('workflow_can', [$this, 'canTransition']), - new TwigFunction('workflow_transitions', [$this, 'getEnabledTransitions']), - new TwigFunction('workflow_transition', [$this, 'getEnabledTransition']), - new TwigFunction('workflow_has_marked_place', [$this, 'hasMarkedPlace']), - new TwigFunction('workflow_marked_places', [$this, 'getMarkedPlaces']), - new TwigFunction('workflow_metadata', [$this, 'getMetadata']), - new TwigFunction('workflow_transition_blockers', [$this, 'buildTransitionBlockerList']), - ]; - } - - /** - * Returns true if the transition is enabled. - */ - public function canTransition(object $subject, string $transitionName, string $name = null): bool - { - return $this->workflowRegistry->get($subject, $name)->can($subject, $transitionName); - } - - /** - * Returns all enabled transitions. - * - * @return Transition[] - */ - public function getEnabledTransitions(object $subject, string $name = null): array - { - return $this->workflowRegistry->get($subject, $name)->getEnabledTransitions($subject); - } - - public function getEnabledTransition(object $subject, string $transition, string $name = null): ?Transition - { - return $this->workflowRegistry->get($subject, $name)->getEnabledTransition($subject, $transition); - } - - /** - * Returns true if the place is marked. - */ - public function hasMarkedPlace(object $subject, string $placeName, string $name = null): bool - { - return $this->workflowRegistry->get($subject, $name)->getMarking($subject)->has($placeName); - } - - /** - * Returns marked places. - * - * @return string[]|int[] - */ - public function getMarkedPlaces(object $subject, bool $placesNameOnly = true, string $name = null): array - { - $places = $this->workflowRegistry->get($subject, $name)->getMarking($subject)->getPlaces(); - - if ($placesNameOnly) { - return array_keys($places); - } - - return $places; - } - - /** - * Returns the metadata for a specific subject. - * - * @param string|Transition|null $metadataSubject Use null to get workflow metadata - * Use a string (the place name) to get place metadata - * Use a Transition instance to get transition metadata - */ - public function getMetadata(object $subject, string $key, $metadataSubject = null, string $name = null) - { - return $this - ->workflowRegistry - ->get($subject, $name) - ->getMetadataStore() - ->getMetadata($key, $metadataSubject) - ; - } - - public function buildTransitionBlockerList(object $subject, string $transitionName, string $name = null): TransitionBlockerList - { - $workflow = $this->workflowRegistry->get($subject, $name); - - return $workflow->buildTransitionBlockerList($subject, $transitionName); - } -} diff --git a/vendor/symfony/twig-bridge/Extension/YamlExtension.php b/vendor/symfony/twig-bridge/Extension/YamlExtension.php deleted file mode 100644 index 63df133..0000000 --- a/vendor/symfony/twig-bridge/Extension/YamlExtension.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Extension; - -use Symfony\Component\Yaml\Dumper as YamlDumper; -use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; - -/** - * Provides integration of the Yaml component with Twig. - * - * @author Fabien Potencier - */ -final class YamlExtension extends AbstractExtension -{ - /** - * {@inheritdoc} - */ - public function getFilters(): array - { - return [ - new TwigFilter('yaml_encode', [$this, 'encode']), - new TwigFilter('yaml_dump', [$this, 'dump']), - ]; - } - - public function encode($input, int $inline = 0, int $dumpObjects = 0): string - { - static $dumper; - - if (null === $dumper) { - $dumper = new YamlDumper(); - } - - if (\defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) { - return $dumper->dump($input, $inline, 0, $dumpObjects); - } - - return $dumper->dump($input, $inline, 0, false, $dumpObjects); - } - - public function dump($value, int $inline = 0, int $dumpObjects = 0): string - { - if (\is_resource($value)) { - return '%Resource%'; - } - - if (\is_array($value) || \is_object($value)) { - return '%'.\gettype($value).'% '.$this->encode($value, $inline, $dumpObjects); - } - - return $this->encode($value, $inline, $dumpObjects); - } -} diff --git a/vendor/symfony/twig-bridge/Form/TwigRendererEngine.php b/vendor/symfony/twig-bridge/Form/TwigRendererEngine.php deleted file mode 100644 index b17da34..0000000 --- a/vendor/symfony/twig-bridge/Form/TwigRendererEngine.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Form; - -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\FormView; -use Twig\Environment; -use Twig\Template; - -/** - * @author Bernhard Schussek - */ -class TwigRendererEngine extends AbstractRendererEngine -{ - /** - * @var Environment - */ - private $environment; - - /** - * @var Template - */ - private $template; - - public function __construct(array $defaultThemes, Environment $environment) - { - parent::__construct($defaultThemes); - $this->environment = $environment; - } - - /** - * {@inheritdoc} - */ - public function renderBlock(FormView $view, $resource, string $blockName, array $variables = []) - { - $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - - $context = $this->environment->mergeGlobals($variables); - - ob_start(); - - // By contract,This method can only be called after getting the resource - // (which is passed to the method). Getting a resource for the first time - // (with an empty cache) is guaranteed to invoke loadResourcesFromTheme(), - // where the property $template is initialized. - - // We do not call renderBlock here to avoid too many nested level calls - // (XDebug limits the level to 100 by default) - $this->template->displayBlock($blockName, $context, $this->resources[$cacheKey]); - - return ob_get_clean(); - } - - /** - * Loads the cache with the resource for a given block name. - * - * This implementation eagerly loads all blocks of the themes assigned to the given view - * and all of its ancestors views. This is necessary, because Twig receives the - * list of blocks later. At that point, all blocks must already be loaded, for the - * case that the function "block()" is used in the Twig template. - * - * @see getResourceForBlock() - * - * @return bool - */ - protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName) - { - // The caller guarantees that $this->resources[$cacheKey][$block] is - // not set, but it doesn't have to check whether $this->resources[$cacheKey] - // is set. If $this->resources[$cacheKey] is set, all themes for this - // $cacheKey are already loaded (due to the eager population, see doc comment). - if (isset($this->resources[$cacheKey])) { - // As said in the previous, the caller guarantees that - // $this->resources[$cacheKey][$block] is not set. Since the themes are - // already loaded, it can only be a non-existing block. - $this->resources[$cacheKey][$blockName] = false; - - return false; - } - - // Recursively try to find the block in the themes assigned to $view, - // then of its parent view, then of the parent view of the parent and so on. - // When the root view is reached in this recursion, also the default - // themes are taken into account. - - // Check each theme whether it contains the searched block - if (isset($this->themes[$cacheKey])) { - for ($i = \count($this->themes[$cacheKey]) - 1; $i >= 0; --$i) { - $this->loadResourcesFromTheme($cacheKey, $this->themes[$cacheKey][$i]); - // CONTINUE LOADING (see doc comment) - } - } - - // Check the default themes once we reach the root view without success - if (!$view->parent) { - if (!isset($this->useDefaultThemes[$cacheKey]) || $this->useDefaultThemes[$cacheKey]) { - for ($i = \count($this->defaultThemes) - 1; $i >= 0; --$i) { - $this->loadResourcesFromTheme($cacheKey, $this->defaultThemes[$i]); - // CONTINUE LOADING (see doc comment) - } - } - } - - // Proceed with the themes of the parent view - if ($view->parent) { - $parentCacheKey = $view->parent->vars[self::CACHE_KEY_VAR]; - - if (!isset($this->resources[$parentCacheKey])) { - $this->loadResourceForBlockName($parentCacheKey, $view->parent, $blockName); - } - - // EAGER CACHE POPULATION (see doc comment) - foreach ($this->resources[$parentCacheKey] as $nestedBlockName => $resource) { - if (!isset($this->resources[$cacheKey][$nestedBlockName])) { - $this->resources[$cacheKey][$nestedBlockName] = $resource; - } - } - } - - // Even though we loaded the themes, it can happen that none of them - // contains the searched block - if (!isset($this->resources[$cacheKey][$blockName])) { - // Cache that we didn't find anything to speed up further accesses - $this->resources[$cacheKey][$blockName] = false; - } - - return false !== $this->resources[$cacheKey][$blockName]; - } - - /** - * Loads the resources for all blocks in a theme. - * - * @param mixed $theme The theme to load the block from. This parameter - * is passed by reference, because it might be necessary - * to initialize the theme first. Any changes made to - * this variable will be kept and be available upon - * further calls to this method using the same theme. - */ - protected function loadResourcesFromTheme(string $cacheKey, &$theme) - { - if (!$theme instanceof Template) { - /* @var Template $theme */ - $theme = $this->environment->load($theme)->unwrap(); - } - - if (null === $this->template) { - // Store the first Template instance that we find so that - // we can call displayBlock() later on. It doesn't matter *which* - // template we use for that, since we pass the used blocks manually - // anyway. - $this->template = $theme; - } - - // Use a separate variable for the inheritance traversal, because - // theme is a reference and we don't want to change it. - $currentTheme = $theme; - - $context = $this->environment->mergeGlobals([]); - - // The do loop takes care of template inheritance. - // Add blocks from all templates in the inheritance tree, but avoid - // overriding blocks already set. - do { - foreach ($currentTheme->getBlocks() as $block => $blockData) { - if (!isset($this->resources[$cacheKey][$block])) { - // The resource given back is the key to the bucket that - // contains this block. - $this->resources[$cacheKey][$block] = $blockData; - } - } - } while (false !== $currentTheme = $currentTheme->getParent($context)); - } -} diff --git a/vendor/symfony/twig-bridge/LICENSE b/vendor/symfony/twig-bridge/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/twig-bridge/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/twig-bridge/Mime/BodyRenderer.php b/vendor/symfony/twig-bridge/Mime/BodyRenderer.php deleted file mode 100644 index 47901d3..0000000 --- a/vendor/symfony/twig-bridge/Mime/BodyRenderer.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use League\HTMLToMarkdown\HtmlConverter; -use Symfony\Component\Mime\BodyRendererInterface; -use Symfony\Component\Mime\Exception\InvalidArgumentException; -use Symfony\Component\Mime\Message; -use Twig\Environment; - -/** - * @author Fabien Potencier - */ -final class BodyRenderer implements BodyRendererInterface -{ - private $twig; - private $context; - private $converter; - - public function __construct(Environment $twig, array $context = []) - { - $this->twig = $twig; - $this->context = $context; - if (class_exists(HtmlConverter::class)) { - $this->converter = new HtmlConverter([ - 'hard_break' => true, - 'strip_tags' => true, - 'remove_nodes' => 'head style', - ]); - } - } - - public function render(Message $message): void - { - if (!$message instanceof TemplatedEmail) { - return; - } - - $messageContext = $message->getContext(); - - $previousRenderingKey = $messageContext[__CLASS__] ?? null; - unset($messageContext[__CLASS__]); - $currentRenderingKey = $this->getFingerPrint($message); - if ($previousRenderingKey === $currentRenderingKey) { - return; - } - - if (isset($messageContext['email'])) { - throw new InvalidArgumentException(sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message))); - } - - $vars = array_merge($this->context, $messageContext, [ - 'email' => new WrappedTemplatedEmail($this->twig, $message), - ]); - - if ($template = $message->getTextTemplate()) { - $message->text($this->twig->render($template, $vars)); - } - - if ($template = $message->getHtmlTemplate()) { - $message->html($this->twig->render($template, $vars)); - } - - // if text body is empty, compute one from the HTML body - if (!$message->getTextBody() && null !== $html = $message->getHtmlBody()) { - $message->text($this->convertHtmlToText(\is_resource($html) ? stream_get_contents($html) : $html)); - } - $message->context($message->getContext() + [__CLASS__ => $currentRenderingKey]); - } - - private function getFingerPrint(TemplatedEmail $message): string - { - $messageContext = $message->getContext(); - unset($messageContext[__CLASS__]); - - $payload = [$messageContext, $message->getTextTemplate(), $message->getHtmlTemplate()]; - try { - $serialized = serialize($payload); - } catch (\Exception $e) { - // Serialization of 'Closure' is not allowed - // Happens when context contain a closure, in that case, we assume that context always change. - $serialized = random_bytes(8); - } - - return md5($serialized); - } - - private function convertHtmlToText(string $html): string - { - if (null !== $this->converter) { - return $this->converter->convert($html); - } - - return strip_tags(preg_replace('{<(head|style)\b.*?}is', '', $html)); - } -} diff --git a/vendor/symfony/twig-bridge/Mime/NotificationEmail.php b/vendor/symfony/twig-bridge/Mime/NotificationEmail.php deleted file mode 100644 index 3bdcd71..0000000 --- a/vendor/symfony/twig-bridge/Mime/NotificationEmail.php +++ /dev/null @@ -1,250 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\Mime\Header\Headers; -use Symfony\Component\Mime\Part\AbstractPart; -use Twig\Extra\CssInliner\CssInlinerExtension; -use Twig\Extra\Inky\InkyExtension; -use Twig\Extra\Markdown\MarkdownExtension; - -/** - * @author Fabien Potencier - */ -class NotificationEmail extends TemplatedEmail -{ - public const IMPORTANCE_URGENT = 'urgent'; - public const IMPORTANCE_HIGH = 'high'; - public const IMPORTANCE_MEDIUM = 'medium'; - public const IMPORTANCE_LOW = 'low'; - - private $theme = 'default'; - private $context = [ - 'importance' => self::IMPORTANCE_LOW, - 'content' => '', - 'exception' => false, - 'action_text' => null, - 'action_url' => null, - 'markdown' => false, - 'raw' => false, - 'footer_text' => 'Notification e-mail sent by Symfony', - ]; - - public function __construct(Headers $headers = null, AbstractPart $body = null) - { - $missingPackages = []; - if (!class_exists(CssInlinerExtension::class)) { - $missingPackages['twig/cssinliner-extra'] = 'CSS Inliner'; - } - - if (!class_exists(InkyExtension::class)) { - $missingPackages['twig/inky-extra'] = 'Inky'; - } - - if ($missingPackages) { - throw new \LogicException(sprintf('You cannot use "%s" if the "%s" Twig extension%s not available; try running "%s".', static::class, implode('" and "', $missingPackages), \count($missingPackages) > 1 ? 's are' : ' is', 'composer require '.implode(' ', array_keys($missingPackages)))); - } - - parent::__construct($headers, $body); - } - - /** - * Creates a NotificationEmail instance that is appropriate to send to normal (non-admin) users. - */ - public static function asPublicEmail(Headers $headers = null, AbstractPart $body = null): self - { - $email = new static($headers, $body); - $email->markAsPublic(); - - return $email; - } - - /** - * @return $this - */ - public function markAsPublic(): self - { - $this->context['importance'] = null; - $this->context['footer_text'] = null; - - return $this; - } - - /** - * @return $this - */ - public function markdown(string $content) - { - if (!class_exists(MarkdownExtension::class)) { - throw new \LogicException(sprintf('You cannot use "%s" if the Markdown Twig extension is not available; try running "composer require twig/markdown-extra".', __METHOD__)); - } - - $this->context['markdown'] = true; - - return $this->content($content); - } - - /** - * @return $this - */ - public function content(string $content, bool $raw = false) - { - $this->context['content'] = $content; - $this->context['raw'] = $raw; - - return $this; - } - - /** - * @return $this - */ - public function action(string $text, string $url) - { - $this->context['action_text'] = $text; - $this->context['action_url'] = $url; - - return $this; - } - - /** - * @return $this - */ - public function importance(string $importance) - { - $this->context['importance'] = $importance; - - return $this; - } - - /** - * @param \Throwable|FlattenException $exception - * - * @return $this - */ - public function exception($exception) - { - if (!$exception instanceof \Throwable && !$exception instanceof FlattenException) { - throw new \LogicException(sprintf('"%s" accepts "%s" or "%s" instances.', __METHOD__, \Throwable::class, FlattenException::class)); - } - - $exceptionAsString = $this->getExceptionAsString($exception); - - $this->context['exception'] = true; - $this->attach($exceptionAsString, 'exception.txt', 'text/plain'); - $this->importance(self::IMPORTANCE_URGENT); - - if (!$this->getSubject()) { - $this->subject($exception->getMessage()); - } - - return $this; - } - - /** - * @return $this - */ - public function theme(string $theme) - { - $this->theme = $theme; - - return $this; - } - - public function getTextTemplate(): ?string - { - if ($template = parent::getTextTemplate()) { - return $template; - } - - return '@email/'.$this->theme.'/notification/body.txt.twig'; - } - - public function getHtmlTemplate(): ?string - { - if ($template = parent::getHtmlTemplate()) { - return $template; - } - - return '@email/'.$this->theme.'/notification/body.html.twig'; - } - - public function getContext(): array - { - return array_merge($this->context, parent::getContext()); - } - - public function getPreparedHeaders(): Headers - { - $headers = parent::getPreparedHeaders(); - - $importance = $this->context['importance'] ?? self::IMPORTANCE_LOW; - $this->priority($this->determinePriority($importance)); - if ($this->context['importance']) { - $headers->setHeaderBody('Text', 'Subject', sprintf('[%s] %s', strtoupper($importance), $this->getSubject())); - } - - return $headers; - } - - private function determinePriority(string $importance): int - { - switch ($importance) { - case self::IMPORTANCE_URGENT: - return self::PRIORITY_HIGHEST; - case self::IMPORTANCE_HIGH: - return self::PRIORITY_HIGH; - case self::IMPORTANCE_MEDIUM: - return self::PRIORITY_NORMAL; - case self::IMPORTANCE_LOW: - default: - return self::PRIORITY_LOW; - } - } - - private function getExceptionAsString($exception): string - { - if (class_exists(FlattenException::class)) { - $exception = $exception instanceof FlattenException ? $exception : FlattenException::createFromThrowable($exception); - - return $exception->getAsString(); - } - - $message = \get_class($exception); - if ('' !== $exception->getMessage()) { - $message .= ': '.$exception->getMessage(); - } - - $message .= ' in '.$exception->getFile().':'.$exception->getLine()."\n"; - $message .= "Stack trace:\n".$exception->getTraceAsString()."\n\n"; - - return rtrim($message); - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->context, parent::__serialize()]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - [$this->context, $parentData] = $data; - - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/twig-bridge/Mime/TemplatedEmail.php b/vendor/symfony/twig-bridge/Mime/TemplatedEmail.php deleted file mode 100644 index 6dd9202..0000000 --- a/vendor/symfony/twig-bridge/Mime/TemplatedEmail.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\Mime\Email; - -/** - * @author Fabien Potencier - */ -class TemplatedEmail extends Email -{ - private $htmlTemplate; - private $textTemplate; - private $context = []; - - /** - * @return $this - */ - public function textTemplate(?string $template) - { - $this->textTemplate = $template; - - return $this; - } - - /** - * @return $this - */ - public function htmlTemplate(?string $template) - { - $this->htmlTemplate = $template; - - return $this; - } - - public function getTextTemplate(): ?string - { - return $this->textTemplate; - } - - public function getHtmlTemplate(): ?string - { - return $this->htmlTemplate; - } - - /** - * @return $this - */ - public function context(array $context) - { - $this->context = $context; - - return $this; - } - - public function getContext(): array - { - return $this->context; - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->htmlTemplate, $this->textTemplate, $this->context, parent::__serialize()]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - [$this->htmlTemplate, $this->textTemplate, $this->context, $parentData] = $data; - - parent::__unserialize($parentData); - } -} diff --git a/vendor/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php b/vendor/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php deleted file mode 100644 index f172691..0000000 --- a/vendor/symfony/twig-bridge/Mime/WrappedTemplatedEmail.php +++ /dev/null @@ -1,194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Mime; - -use Symfony\Component\Mime\Address; -use Twig\Environment; - -/** - * @internal - * - * @author Fabien Potencier - */ -final class WrappedTemplatedEmail -{ - private $twig; - private $message; - - public function __construct(Environment $twig, TemplatedEmail $message) - { - $this->twig = $twig; - $this->message = $message; - } - - public function toName(): string - { - return $this->message->getTo()[0]->getName(); - } - - public function image(string $image, string $contentType = null): string - { - $file = $this->twig->getLoader()->getSourceContext($image); - if ($path = $file->getPath()) { - $this->message->embedFromPath($path, $image, $contentType); - } else { - $this->message->embed($file->getCode(), $image, $contentType); - } - - return 'cid:'.$image; - } - - public function attach(string $file, string $name = null, string $contentType = null): void - { - $file = $this->twig->getLoader()->getSourceContext($file); - if ($path = $file->getPath()) { - $this->message->attachFromPath($path, $name, $contentType); - } else { - $this->message->attach($file->getCode(), $name, $contentType); - } - } - - /** - * @return $this - */ - public function setSubject(string $subject): self - { - $this->message->subject($subject); - - return $this; - } - - public function getSubject(): ?string - { - return $this->message->getSubject(); - } - - /** - * @return $this - */ - public function setReturnPath(string $address): self - { - $this->message->returnPath($address); - - return $this; - } - - public function getReturnPath(): string - { - return $this->message->getReturnPath(); - } - - /** - * @return $this - */ - public function addFrom(string $address, string $name = ''): self - { - $this->message->addFrom(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getFrom(): array - { - return $this->message->getFrom(); - } - - /** - * @return $this - */ - public function addReplyTo(string $address): self - { - $this->message->addReplyTo($address); - - return $this; - } - - /** - * @return Address[] - */ - public function getReplyTo(): array - { - return $this->message->getReplyTo(); - } - - /** - * @return $this - */ - public function addTo(string $address, string $name = ''): self - { - $this->message->addTo(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getTo(): array - { - return $this->message->getTo(); - } - - /** - * @return $this - */ - public function addCc(string $address, string $name = ''): self - { - $this->message->addCc(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getCc(): array - { - return $this->message->getCc(); - } - - /** - * @return $this - */ - public function addBcc(string $address, string $name = ''): self - { - $this->message->addBcc(new Address($address, $name)); - - return $this; - } - - /** - * @return Address[] - */ - public function getBcc(): array - { - return $this->message->getBcc(); - } - - /** - * @return $this - */ - public function setPriority(int $priority): self - { - $this->message->priority($priority); - - return $this; - } - - public function getPriority(): int - { - return $this->message->getPriority(); - } -} diff --git a/vendor/symfony/twig-bridge/Node/DumpNode.php b/vendor/symfony/twig-bridge/Node/DumpNode.php deleted file mode 100644 index 68c0055..0000000 --- a/vendor/symfony/twig-bridge/Node/DumpNode.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Node; - -/** - * @author Julien Galenski - */ -final class DumpNode extends Node -{ - private $varPrefix; - - public function __construct(string $varPrefix, ?Node $values, int $lineno, string $tag = null) - { - $nodes = []; - if (null !== $values) { - $nodes['values'] = $values; - } - - parent::__construct($nodes, [], $lineno, $tag); - $this->varPrefix = $varPrefix; - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write("if (\$this->env->isDebug()) {\n") - ->indent(); - - if (!$this->hasNode('values')) { - // remove embedded templates (macros) from the context - $compiler - ->write(sprintf('$%svars = [];'."\n", $this->varPrefix)) - ->write(sprintf('foreach ($context as $%1$skey => $%1$sval) {'."\n", $this->varPrefix)) - ->indent() - ->write(sprintf('if (!$%sval instanceof \Twig\Template) {'."\n", $this->varPrefix)) - ->indent() - ->write(sprintf('$%1$svars[$%1$skey] = $%1$sval;'."\n", $this->varPrefix)) - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n") - ->addDebugInfo($this) - ->write(sprintf('\Symfony\Component\VarDumper\VarDumper::dump($%svars);'."\n", $this->varPrefix)); - } elseif (($values = $this->getNode('values')) && 1 === $values->count()) { - $compiler - ->addDebugInfo($this) - ->write('\Symfony\Component\VarDumper\VarDumper::dump(') - ->subcompile($values->getNode(0)) - ->raw(");\n"); - } else { - $compiler - ->addDebugInfo($this) - ->write('\Symfony\Component\VarDumper\VarDumper::dump(['."\n") - ->indent(); - foreach ($values as $node) { - $compiler->write(''); - if ($node->hasAttribute('name')) { - $compiler - ->string($node->getAttribute('name')) - ->raw(' => '); - } - $compiler - ->subcompile($node) - ->raw(",\n"); - } - $compiler - ->outdent() - ->write("]);\n"); - } - - $compiler - ->outdent() - ->write("}\n"); - } -} diff --git a/vendor/symfony/twig-bridge/Node/FormThemeNode.php b/vendor/symfony/twig-bridge/Node/FormThemeNode.php deleted file mode 100644 index e373112..0000000 --- a/vendor/symfony/twig-bridge/Node/FormThemeNode.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Symfony\Component\Form\FormRenderer; -use Twig\Compiler; -use Twig\Node\Node; - -/** - * @author Fabien Potencier - */ -final class FormThemeNode extends Node -{ - public function __construct(Node $form, Node $resources, int $lineno, string $tag = null, bool $only = false) - { - parent::__construct(['form' => $form, 'resources' => $resources], ['only' => $only], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('$this->env->getRuntime(') - ->string(FormRenderer::class) - ->raw(')->setTheme(') - ->subcompile($this->getNode('form')) - ->raw(', ') - ->subcompile($this->getNode('resources')) - ->raw(', ') - ->raw(false === $this->getAttribute('only') ? 'true' : 'false') - ->raw(");\n"); - } -} diff --git a/vendor/symfony/twig-bridge/Node/RenderBlockNode.php b/vendor/symfony/twig-bridge/Node/RenderBlockNode.php deleted file mode 100644 index 4d4cf61..0000000 --- a/vendor/symfony/twig-bridge/Node/RenderBlockNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\FunctionExpression; - -/** - * Compiles a call to {@link \Symfony\Component\Form\FormRendererInterface::renderBlock()}. - * - * The function name is used as block name. For example, if the function name - * is "foo", the block "foo" will be rendered. - * - * @author Bernhard Schussek - */ -final class RenderBlockNode extends FunctionExpression -{ - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - $arguments = iterator_to_array($this->getNode('arguments')); - $compiler->write('$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->renderBlock('); - - if (isset($arguments[0])) { - $compiler->subcompile($arguments[0]); - $compiler->raw(', \''.$this->getAttribute('name').'\''); - - if (isset($arguments[1])) { - $compiler->raw(', '); - $compiler->subcompile($arguments[1]); - } - } - - $compiler->raw(')'); - } -} diff --git a/vendor/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php b/vendor/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php deleted file mode 100644 index 9967639..0000000 --- a/vendor/symfony/twig-bridge/Node/SearchAndRenderBlockNode.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FunctionExpression; - -/** - * @author Bernhard Schussek - */ -final class SearchAndRenderBlockNode extends FunctionExpression -{ - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - $compiler->raw('$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->searchAndRenderBlock('); - - preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches); - - $arguments = iterator_to_array($this->getNode('arguments')); - $blockNameSuffix = $matches[1]; - - if (isset($arguments[0])) { - $compiler->subcompile($arguments[0]); - $compiler->raw(', \''.$blockNameSuffix.'\''); - - if (isset($arguments[1])) { - if ('label' === $blockNameSuffix) { - // The "label" function expects the label in the second and - // the variables in the third argument - $label = $arguments[1]; - $variables = $arguments[2] ?? null; - $lineno = $label->getTemplateLine(); - - if ($label instanceof ConstantExpression) { - // If the label argument is given as a constant, we can either - // strip it away if it is empty, or integrate it into the array - // of variables at compile time. - $labelIsExpression = false; - - // Only insert the label into the array if it is not empty - if (!twig_test_empty($label->getAttribute('value'))) { - $originalVariables = $variables; - $variables = new ArrayExpression([], $lineno); - $labelKey = new ConstantExpression('label', $lineno); - - if (null !== $originalVariables) { - foreach ($originalVariables->getKeyValuePairs() as $pair) { - // Don't copy the original label attribute over if it exists - if ((string) $labelKey !== (string) $pair['key']) { - $variables->addElement($pair['value'], $pair['key']); - } - } - } - - // Insert the label argument into the array - $variables->addElement($label, $labelKey); - } - } else { - // The label argument is not a constant, but some kind of - // expression. This expression needs to be evaluated at runtime. - // Depending on the result (whether it is null or not), the - // label in the arguments should take precedence over the label - // in the attributes or not. - $labelIsExpression = true; - } - } else { - // All other functions than "label" expect the variables - // in the second argument - $label = null; - $variables = $arguments[1]; - $labelIsExpression = false; - } - - if (null !== $variables || $labelIsExpression) { - $compiler->raw(', '); - - if (null !== $variables) { - $compiler->subcompile($variables); - } - - if ($labelIsExpression) { - if (null !== $variables) { - $compiler->raw(' + '); - } - - // Check at runtime whether the label is empty. - // If not, add it to the array at runtime. - $compiler->raw('(twig_test_empty($_label_ = '); - $compiler->subcompile($label); - $compiler->raw(') ? [] : ["label" => $_label_])'); - } - } - } - } - - $compiler->raw(')'); - } -} diff --git a/vendor/symfony/twig-bridge/Node/StopwatchNode.php b/vendor/symfony/twig-bridge/Node/StopwatchNode.php deleted file mode 100644 index cfa4d8a..0000000 --- a/vendor/symfony/twig-bridge/Node/StopwatchNode.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Node; - -/** - * Represents a stopwatch node. - * - * @author Wouter J - */ -final class StopwatchNode extends Node -{ - public function __construct(Node $name, Node $body, AssignNameExpression $var, int $lineno = 0, string $tag = null) - { - parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('var')) - ->raw(' = ') - ->subcompile($this->getNode('name')) - ->write(";\n") - ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->start(") - ->subcompile($this->getNode('var')) - ->raw(", 'template');\n") - ->subcompile($this->getNode('body')) - ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->stop(") - ->subcompile($this->getNode('var')) - ->raw(");\n") - ; - } -} diff --git a/vendor/symfony/twig-bridge/Node/TransDefaultDomainNode.php b/vendor/symfony/twig-bridge/Node/TransDefaultDomainNode.php deleted file mode 100644 index df29f0a..0000000 --- a/vendor/symfony/twig-bridge/Node/TransDefaultDomainNode.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Node; - -/** - * @author Fabien Potencier - */ -final class TransDefaultDomainNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno = 0, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - // noop as this node is just a marker for TranslationDefaultDomainNodeVisitor - } -} diff --git a/vendor/symfony/twig-bridge/Node/TransNode.php b/vendor/symfony/twig-bridge/Node/TransNode.php deleted file mode 100644 index 8a126ba..0000000 --- a/vendor/symfony/twig-bridge/Node/TransNode.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Node; - -use Twig\Compiler; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\NameExpression; -use Twig\Node\Node; -use Twig\Node\TextNode; - -/** - * @author Fabien Potencier - */ -final class TransNode extends Node -{ - public function __construct(Node $body, Node $domain = null, AbstractExpression $count = null, AbstractExpression $vars = null, AbstractExpression $locale = null, int $lineno = 0, string $tag = null) - { - $nodes = ['body' => $body]; - if (null !== $domain) { - $nodes['domain'] = $domain; - } - if (null !== $count) { - $nodes['count'] = $count; - } - if (null !== $vars) { - $nodes['vars'] = $vars; - } - if (null !== $locale) { - $nodes['locale'] = $locale; - } - - parent::__construct($nodes, [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $defaults = new ArrayExpression([], -1); - if ($this->hasNode('vars') && ($vars = $this->getNode('vars')) instanceof ArrayExpression) { - $defaults = $this->getNode('vars'); - $vars = null; - } - [$msg, $defaults] = $this->compileString($this->getNode('body'), $defaults, (bool) $vars); - - $compiler - ->write('echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans(') - ->subcompile($msg) - ; - - $compiler->raw(', '); - - if (null !== $vars) { - $compiler - ->raw('array_merge(') - ->subcompile($defaults) - ->raw(', ') - ->subcompile($this->getNode('vars')) - ->raw(')') - ; - } else { - $compiler->subcompile($defaults); - } - - $compiler->raw(', '); - - if (!$this->hasNode('domain')) { - $compiler->repr('messages'); - } else { - $compiler->subcompile($this->getNode('domain')); - } - - if ($this->hasNode('locale')) { - $compiler - ->raw(', ') - ->subcompile($this->getNode('locale')) - ; - } elseif ($this->hasNode('count')) { - $compiler->raw(', null'); - } - - if ($this->hasNode('count')) { - $compiler - ->raw(', ') - ->subcompile($this->getNode('count')) - ; - } - - $compiler->raw(");\n"); - } - - private function compileString(Node $body, ArrayExpression $vars, bool $ignoreStrictCheck = false): array - { - if ($body instanceof ConstantExpression) { - $msg = $body->getAttribute('value'); - } elseif ($body instanceof TextNode) { - $msg = $body->getAttribute('data'); - } else { - return [$body, $vars]; - } - - preg_match_all('/(?getTemplateLine()); - if (!$vars->hasElement($key)) { - if ('count' === $var && $this->hasNode('count')) { - $vars->addElement($this->getNode('count'), $key); - } else { - $varExpr = new NameExpression($var, $body->getTemplateLine()); - $varExpr->setAttribute('ignore_strict_check', $ignoreStrictCheck); - $vars->addElement($varExpr, $key); - } - } - } - - return [new ConstantExpression(str_replace('%%', '%', trim($msg)), $body->getTemplateLine()), $vars]; - } -} diff --git a/vendor/symfony/twig-bridge/NodeVisitor/Scope.php b/vendor/symfony/twig-bridge/NodeVisitor/Scope.php deleted file mode 100644 index 765b4b6..0000000 --- a/vendor/symfony/twig-bridge/NodeVisitor/Scope.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -/** - * @author Jean-François Simon - */ -class Scope -{ - private $parent; - private $data = []; - private $left = false; - - public function __construct(self $parent = null) - { - $this->parent = $parent; - } - - /** - * Opens a new child scope. - * - * @return self - */ - public function enter() - { - return new self($this); - } - - /** - * Closes current scope and returns parent one. - * - * @return self|null - */ - public function leave() - { - $this->left = true; - - return $this->parent; - } - - /** - * Stores data into current scope. - * - * @return $this - * - * @throws \LogicException - */ - public function set(string $key, $value) - { - if ($this->left) { - throw new \LogicException('Left scope is not mutable.'); - } - - $this->data[$key] = $value; - - return $this; - } - - /** - * Tests if a data is visible from current scope. - * - * @return bool - */ - public function has(string $key) - { - if (\array_key_exists($key, $this->data)) { - return true; - } - - if (null === $this->parent) { - return false; - } - - return $this->parent->has($key); - } - - /** - * Returns data visible from current scope. - * - * @return mixed - */ - public function get(string $key, $default = null) - { - if (\array_key_exists($key, $this->data)) { - return $this->data[$key]; - } - - if (null === $this->parent) { - return $default; - } - - return $this->parent->get($key, $default); - } -} diff --git a/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php deleted file mode 100644 index 213365e..0000000 --- a/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Environment; -use Twig\Node\BlockNode; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FilterExpression; -use Twig\Node\Expression\NameExpression; -use Twig\Node\ModuleNode; -use Twig\Node\Node; -use Twig\Node\SetNode; -use Twig\NodeVisitor\AbstractNodeVisitor; - -/** - * @author Fabien Potencier - */ -final class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor -{ - private $scope; - - public function __construct() - { - $this->scope = new Scope(); - } - - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node - { - if ($node instanceof BlockNode || $node instanceof ModuleNode) { - $this->scope = $this->scope->enter(); - } - - if ($node instanceof TransDefaultDomainNode) { - if ($node->getNode('expr') instanceof ConstantExpression) { - $this->scope->set('domain', $node->getNode('expr')); - - return $node; - } else { - $var = $this->getVarName(); - $name = new AssignNameExpression($var, $node->getTemplateLine()); - $this->scope->set('domain', new NameExpression($var, $node->getTemplateLine())); - - return new SetNode(false, new Node([$name]), new Node([$node->getNode('expr')]), $node->getTemplateLine()); - } - } - - if (!$this->scope->has('domain')) { - return $node; - } - - if ($node instanceof FilterExpression && 'trans' === $node->getNode('filter')->getAttribute('value')) { - $arguments = $node->getNode('arguments'); - if ($this->isNamedArguments($arguments)) { - if (!$arguments->hasNode('domain') && !$arguments->hasNode(1)) { - $arguments->setNode('domain', $this->scope->get('domain')); - } - } elseif (!$arguments->hasNode(1)) { - if (!$arguments->hasNode(0)) { - $arguments->setNode(0, new ArrayExpression([], $node->getTemplateLine())); - } - - $arguments->setNode(1, $this->scope->get('domain')); - } - } elseif ($node instanceof TransNode) { - if (!$node->hasNode('domain')) { - $node->setNode('domain', $this->scope->get('domain')); - } - } - - return $node; - } - - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof TransDefaultDomainNode) { - return null; - } - - if ($node instanceof BlockNode || $node instanceof ModuleNode) { - $this->scope = $this->scope->leave(); - } - - return $node; - } - - /** - * {@inheritdoc} - */ - public function getPriority(): int - { - return -10; - } - - private function isNamedArguments(Node $arguments): bool - { - foreach ($arguments as $name => $node) { - if (!\is_int($name)) { - return true; - } - } - - return false; - } - - private function getVarName(): string - { - return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false)); - } -} diff --git a/vendor/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php b/vendor/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php deleted file mode 100644 index d42245e..0000000 --- a/vendor/symfony/twig-bridge/NodeVisitor/TranslationNodeVisitor.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\NodeVisitor; - -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Environment; -use Twig\Node\Expression\Binary\ConcatBinary; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Expression\FilterExpression; -use Twig\Node\Expression\FunctionExpression; -use Twig\Node\Node; -use Twig\NodeVisitor\AbstractNodeVisitor; - -/** - * TranslationNodeVisitor extracts translation messages. - * - * @author Fabien Potencier - */ -final class TranslationNodeVisitor extends AbstractNodeVisitor -{ - public const UNDEFINED_DOMAIN = '_undefined'; - - private $enabled = false; - private $messages = []; - - public function enable(): void - { - $this->enabled = true; - $this->messages = []; - } - - public function disable(): void - { - $this->enabled = false; - $this->messages = []; - } - - public function getMessages(): array - { - return $this->messages; - } - - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node - { - if (!$this->enabled) { - return $node; - } - - if ( - $node instanceof FilterExpression && - 'trans' === $node->getNode('filter')->getAttribute('value') && - $node->getNode('node') instanceof ConstantExpression - ) { - // extract constant nodes with a trans filter - $this->messages[] = [ - $node->getNode('node')->getAttribute('value'), - $this->getReadDomainFromArguments($node->getNode('arguments'), 1), - ]; - } elseif ( - $node instanceof FunctionExpression && - 't' === $node->getAttribute('name') - ) { - $nodeArguments = $node->getNode('arguments'); - - if ($nodeArguments->getIterator()->current() instanceof ConstantExpression) { - $this->messages[] = [ - $this->getReadMessageFromArguments($nodeArguments, 0), - $this->getReadDomainFromArguments($nodeArguments, 2), - ]; - } - } elseif ($node instanceof TransNode) { - // extract trans nodes - $this->messages[] = [ - $node->getNode('body')->getAttribute('data'), - $node->hasNode('domain') ? $this->getReadDomainFromNode($node->getNode('domain')) : null, - ]; - } elseif ( - $node instanceof FilterExpression && - 'trans' === $node->getNode('filter')->getAttribute('value') && - $node->getNode('node') instanceof ConcatBinary && - $message = $this->getConcatValueFromNode($node->getNode('node'), null) - ) { - $this->messages[] = [ - $message, - $this->getReadDomainFromArguments($node->getNode('arguments'), 1), - ]; - } - - return $node; - } - - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node - { - return $node; - } - - /** - * {@inheritdoc} - */ - public function getPriority(): int - { - return 0; - } - - private function getReadMessageFromArguments(Node $arguments, int $index): ?string - { - if ($arguments->hasNode('message')) { - $argument = $arguments->getNode('message'); - } elseif ($arguments->hasNode($index)) { - $argument = $arguments->getNode($index); - } else { - return null; - } - - return $this->getReadMessageFromNode($argument); - } - - private function getReadMessageFromNode(Node $node): ?string - { - if ($node instanceof ConstantExpression) { - return $node->getAttribute('value'); - } - - return null; - } - - private function getReadDomainFromArguments(Node $arguments, int $index): ?string - { - if ($arguments->hasNode('domain')) { - $argument = $arguments->getNode('domain'); - } elseif ($arguments->hasNode($index)) { - $argument = $arguments->getNode($index); - } else { - return null; - } - - return $this->getReadDomainFromNode($argument); - } - - private function getReadDomainFromNode(Node $node): ?string - { - if ($node instanceof ConstantExpression) { - return $node->getAttribute('value'); - } - - return self::UNDEFINED_DOMAIN; - } - - private function getConcatValueFromNode(Node $node, ?string $value): ?string - { - if ($node instanceof ConcatBinary) { - foreach ($node as $nextNode) { - if ($nextNode instanceof ConcatBinary) { - $nextValue = $this->getConcatValueFromNode($nextNode, $value); - if (null === $nextValue) { - return null; - } - $value .= $nextValue; - } elseif ($nextNode instanceof ConstantExpression) { - $value .= $nextNode->getAttribute('value'); - } else { - // this is a node we cannot process (variable, or translation in translation) - return null; - } - } - } elseif ($node instanceof ConstantExpression) { - $value .= $node->getAttribute('value'); - } - - return $value; - } -} diff --git a/vendor/symfony/twig-bridge/README.md b/vendor/symfony/twig-bridge/README.md deleted file mode 100644 index 533d573..0000000 --- a/vendor/symfony/twig-bridge/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Twig Bridge -=========== - -The Twig bridge provides integration for [Twig](https://twig.symfony.com/) with -various Symfony components. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig b/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig deleted file mode 100644 index 9027546..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends "@email/zurb_2/notification/body.html.twig" %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig b/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig deleted file mode 100644 index 37671b1..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/default/notification/body.txt.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends "@email/zurb_2/notification/body.txt.twig" %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css b/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css deleted file mode 100644 index b826813..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/main.css +++ /dev/null @@ -1,1667 +0,0 @@ -/* - * Copyright (c) 2017 ZURB, inc. -- MIT License - * - * https://raw.githubusercontent.com/foundation/foundation-emails/v2.2.1/dist/foundation-emails.css - */ - -.wrapper { - width: 100%; -} - -#outlook a { - padding: 0; -} - -body { - width: 100% !important; - min-width: 100%; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - margin: 0; - Margin: 0; - padding: 0; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.ExternalClass { - width: 100%; -} - -.ExternalClass, -.ExternalClass p, -.ExternalClass span, -.ExternalClass font, -.ExternalClass td, -.ExternalClass div { - line-height: 100%; -} - -#backgroundTable { - margin: 0; - Margin: 0; - padding: 0; - width: 100% !important; - line-height: 100% !important; -} - -img { - outline: none; - text-decoration: none; - -ms-interpolation-mode: bicubic; - width: auto; - max-width: 100%; - clear: both; - display: block; -} - -center { - width: 100%; - min-width: 580px; -} - -a img { - border: none; -} - -p { - margin: 0 0 0 10px; - Margin: 0 0 0 10px; -} - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td { - word-wrap: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - border-collapse: collapse !important; -} - -table, -tr, -td { - padding: 0; - vertical-align: top; - text-align: left; -} - -@media only screen { - html { - min-height: 100%; - background: #f3f3f3; - } -} - -table.body { - background: #f3f3f3; - height: 100%; - width: 100%; -} - -table.container { - background: #fefefe; - width: 580px; - margin: 0 auto; - Margin: 0 auto; - text-align: inherit; -} - -table.row { - padding: 0; - width: 100%; - position: relative; -} - -table.spacer { - width: 100%; -} - -table.spacer td { - mso-line-height-rule: exactly; -} - -table.container table.row { - display: table; -} - -td.columns, -td.column, -th.columns, -th.column { - margin: 0 auto; - Margin: 0 auto; - padding-left: 16px; - padding-bottom: 16px; -} - -td.columns .column, -td.columns .columns, -td.column .column, -td.column .columns, -th.columns .column, -th.columns .columns, -th.column .column, -th.column .columns { - padding-left: 0 !important; - padding-right: 0 !important; -} - -td.columns .column center, -td.columns .columns center, -td.column .column center, -td.column .columns center, -th.columns .column center, -th.columns .columns center, -th.column .column center, -th.column .columns center { - min-width: none !important; -} - -td.columns.last, -td.column.last, -th.columns.last, -th.column.last { - padding-right: 16px; -} - -td.columns table:not(.button), -td.column table:not(.button), -th.columns table:not(.button), -th.column table:not(.button) { - width: 100%; -} - -td.large-1, -th.large-1 { - width: 32.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-1.first, -th.large-1.first { - padding-left: 16px; -} - -td.large-1.last, -th.large-1.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-1, -.collapse>tbody>tr>th.large-1 { - padding-right: 0; - padding-left: 0; - width: 48.33333px; -} - -.collapse td.large-1.first, -.collapse th.large-1.first, -.collapse td.large-1.last, -.collapse th.large-1.last { - width: 56.33333px; -} - -td.large-1 center, -th.large-1 center { - min-width: 0.33333px; -} - -.body .columns td.large-1, -.body .column td.large-1, -.body .columns th.large-1, -.body .column th.large-1 { - width: 8.33333%; -} - -td.large-2, -th.large-2 { - width: 80.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-2.first, -th.large-2.first { - padding-left: 16px; -} - -td.large-2.last, -th.large-2.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-2, -.collapse>tbody>tr>th.large-2 { - padding-right: 0; - padding-left: 0; - width: 96.66667px; -} - -.collapse td.large-2.first, -.collapse th.large-2.first, -.collapse td.large-2.last, -.collapse th.large-2.last { - width: 104.66667px; -} - -td.large-2 center, -th.large-2 center { - min-width: 48.66667px; -} - -.body .columns td.large-2, -.body .column td.large-2, -.body .columns th.large-2, -.body .column th.large-2 { - width: 16.66667%; -} - -td.large-3, -th.large-3 { - width: 129px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-3.first, -th.large-3.first { - padding-left: 16px; -} - -td.large-3.last, -th.large-3.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-3, -.collapse>tbody>tr>th.large-3 { - padding-right: 0; - padding-left: 0; - width: 145px; -} - -.collapse td.large-3.first, -.collapse th.large-3.first, -.collapse td.large-3.last, -.collapse th.large-3.last { - width: 153px; -} - -td.large-3 center, -th.large-3 center { - min-width: 97px; -} - -.body .columns td.large-3, -.body .column td.large-3, -.body .columns th.large-3, -.body .column th.large-3 { - width: 25%; -} - -td.large-4, -th.large-4 { - width: 177.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-4.first, -th.large-4.first { - padding-left: 16px; -} - -td.large-4.last, -th.large-4.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-4, -.collapse>tbody>tr>th.large-4 { - padding-right: 0; - padding-left: 0; - width: 193.33333px; -} - -.collapse td.large-4.first, -.collapse th.large-4.first, -.collapse td.large-4.last, -.collapse th.large-4.last { - width: 201.33333px; -} - -td.large-4 center, -th.large-4 center { - min-width: 145.33333px; -} - -.body .columns td.large-4, -.body .column td.large-4, -.body .columns th.large-4, -.body .column th.large-4 { - width: 33.33333%; -} - -td.large-5, -th.large-5 { - width: 225.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-5.first, -th.large-5.first { - padding-left: 16px; -} - -td.large-5.last, -th.large-5.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-5, -.collapse>tbody>tr>th.large-5 { - padding-right: 0; - padding-left: 0; - width: 241.66667px; -} - -.collapse td.large-5.first, -.collapse th.large-5.first, -.collapse td.large-5.last, -.collapse th.large-5.last { - width: 249.66667px; -} - -td.large-5 center, -th.large-5 center { - min-width: 193.66667px; -} - -.body .columns td.large-5, -.body .column td.large-5, -.body .columns th.large-5, -.body .column th.large-5 { - width: 41.66667%; -} - -td.large-6, -th.large-6 { - width: 274px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-6.first, -th.large-6.first { - padding-left: 16px; -} - -td.large-6.last, -th.large-6.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-6, -.collapse>tbody>tr>th.large-6 { - padding-right: 0; - padding-left: 0; - width: 290px; -} - -.collapse td.large-6.first, -.collapse th.large-6.first, -.collapse td.large-6.last, -.collapse th.large-6.last { - width: 298px; -} - -td.large-6 center, -th.large-6 center { - min-width: 242px; -} - -.body .columns td.large-6, -.body .column td.large-6, -.body .columns th.large-6, -.body .column th.large-6 { - width: 50%; -} - -td.large-7, -th.large-7 { - width: 322.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-7.first, -th.large-7.first { - padding-left: 16px; -} - -td.large-7.last, -th.large-7.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-7, -.collapse>tbody>tr>th.large-7 { - padding-right: 0; - padding-left: 0; - width: 338.33333px; -} - -.collapse td.large-7.first, -.collapse th.large-7.first, -.collapse td.large-7.last, -.collapse th.large-7.last { - width: 346.33333px; -} - -td.large-7 center, -th.large-7 center { - min-width: 290.33333px; -} - -.body .columns td.large-7, -.body .column td.large-7, -.body .columns th.large-7, -.body .column th.large-7 { - width: 58.33333%; -} - -td.large-8, -th.large-8 { - width: 370.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-8.first, -th.large-8.first { - padding-left: 16px; -} - -td.large-8.last, -th.large-8.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-8, -.collapse>tbody>tr>th.large-8 { - padding-right: 0; - padding-left: 0; - width: 386.66667px; -} - -.collapse td.large-8.first, -.collapse th.large-8.first, -.collapse td.large-8.last, -.collapse th.large-8.last { - width: 394.66667px; -} - -td.large-8 center, -th.large-8 center { - min-width: 338.66667px; -} - -.body .columns td.large-8, -.body .column td.large-8, -.body .columns th.large-8, -.body .column th.large-8 { - width: 66.66667%; -} - -td.large-9, -th.large-9 { - width: 419px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-9.first, -th.large-9.first { - padding-left: 16px; -} - -td.large-9.last, -th.large-9.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-9, -.collapse>tbody>tr>th.large-9 { - padding-right: 0; - padding-left: 0; - width: 435px; -} - -.collapse td.large-9.first, -.collapse th.large-9.first, -.collapse td.large-9.last, -.collapse th.large-9.last { - width: 443px; -} - -td.large-9 center, -th.large-9 center { - min-width: 387px; -} - -.body .columns td.large-9, -.body .column td.large-9, -.body .columns th.large-9, -.body .column th.large-9 { - width: 75%; -} - -td.large-10, -th.large-10 { - width: 467.33333px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-10.first, -th.large-10.first { - padding-left: 16px; -} - -td.large-10.last, -th.large-10.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-10, -.collapse>tbody>tr>th.large-10 { - padding-right: 0; - padding-left: 0; - width: 483.33333px; -} - -.collapse td.large-10.first, -.collapse th.large-10.first, -.collapse td.large-10.last, -.collapse th.large-10.last { - width: 491.33333px; -} - -td.large-10 center, -th.large-10 center { - min-width: 435.33333px; -} - -.body .columns td.large-10, -.body .column td.large-10, -.body .columns th.large-10, -.body .column th.large-10 { - width: 83.33333%; -} - -td.large-11, -th.large-11 { - width: 515.66667px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-11.first, -th.large-11.first { - padding-left: 16px; -} - -td.large-11.last, -th.large-11.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-11, -.collapse>tbody>tr>th.large-11 { - padding-right: 0; - padding-left: 0; - width: 531.66667px; -} - -.collapse td.large-11.first, -.collapse th.large-11.first, -.collapse td.large-11.last, -.collapse th.large-11.last { - width: 539.66667px; -} - -td.large-11 center, -th.large-11 center { - min-width: 483.66667px; -} - -.body .columns td.large-11, -.body .column td.large-11, -.body .columns th.large-11, -.body .column th.large-11 { - width: 91.66667%; -} - -td.large-12, -th.large-12 { - width: 564px; - padding-left: 8px; - padding-right: 8px; -} - -td.large-12.first, -th.large-12.first { - padding-left: 16px; -} - -td.large-12.last, -th.large-12.last { - padding-right: 16px; -} - -.collapse>tbody>tr>td.large-12, -.collapse>tbody>tr>th.large-12 { - padding-right: 0; - padding-left: 0; - width: 580px; -} - -.collapse td.large-12.first, -.collapse th.large-12.first, -.collapse td.large-12.last, -.collapse th.large-12.last { - width: 588px; -} - -td.large-12 center, -th.large-12 center { - min-width: 532px; -} - -.body .columns td.large-12, -.body .column td.large-12, -.body .columns th.large-12, -.body .column th.large-12 { - width: 100%; -} - -td.large-offset-1, -td.large-offset-1.first, -td.large-offset-1.last, -th.large-offset-1, -th.large-offset-1.first, -th.large-offset-1.last { - padding-left: 64.33333px; -} - -td.large-offset-2, -td.large-offset-2.first, -td.large-offset-2.last, -th.large-offset-2, -th.large-offset-2.first, -th.large-offset-2.last { - padding-left: 112.66667px; -} - -td.large-offset-3, -td.large-offset-3.first, -td.large-offset-3.last, -th.large-offset-3, -th.large-offset-3.first, -th.large-offset-3.last { - padding-left: 161px; -} - -td.large-offset-4, -td.large-offset-4.first, -td.large-offset-4.last, -th.large-offset-4, -th.large-offset-4.first, -th.large-offset-4.last { - padding-left: 209.33333px; -} - -td.large-offset-5, -td.large-offset-5.first, -td.large-offset-5.last, -th.large-offset-5, -th.large-offset-5.first, -th.large-offset-5.last { - padding-left: 257.66667px; -} - -td.large-offset-6, -td.large-offset-6.first, -td.large-offset-6.last, -th.large-offset-6, -th.large-offset-6.first, -th.large-offset-6.last { - padding-left: 306px; -} - -td.large-offset-7, -td.large-offset-7.first, -td.large-offset-7.last, -th.large-offset-7, -th.large-offset-7.first, -th.large-offset-7.last { - padding-left: 354.33333px; -} - -td.large-offset-8, -td.large-offset-8.first, -td.large-offset-8.last, -th.large-offset-8, -th.large-offset-8.first, -th.large-offset-8.last { - padding-left: 402.66667px; -} - -td.large-offset-9, -td.large-offset-9.first, -td.large-offset-9.last, -th.large-offset-9, -th.large-offset-9.first, -th.large-offset-9.last { - padding-left: 451px; -} - -td.large-offset-10, -td.large-offset-10.first, -td.large-offset-10.last, -th.large-offset-10, -th.large-offset-10.first, -th.large-offset-10.last { - padding-left: 499.33333px; -} - -td.large-offset-11, -td.large-offset-11.first, -td.large-offset-11.last, -th.large-offset-11, -th.large-offset-11.first, -th.large-offset-11.last { - padding-left: 547.66667px; -} - -td.expander, -th.expander { - visibility: hidden; - width: 0; - padding: 0 !important; -} - -table.container.radius { - border-radius: 0; - border-collapse: separate; -} - -.block-grid { - width: 100%; - max-width: 580px; -} - -.block-grid td { - display: inline-block; - padding: 8px; -} - -.up-2 td { - width: 274px !important; -} - -.up-3 td { - width: 177px !important; -} - -.up-4 td { - width: 129px !important; -} - -.up-5 td { - width: 100px !important; -} - -.up-6 td { - width: 80px !important; -} - -.up-7 td { - width: 66px !important; -} - -.up-8 td { - width: 56px !important; -} - -table.text-center, -th.text-center, -td.text-center, -h1.text-center, -h2.text-center, -h3.text-center, -h4.text-center, -h5.text-center, -h6.text-center, -p.text-center, -span.text-center { - text-align: center; -} - -table.text-left, -th.text-left, -td.text-left, -h1.text-left, -h2.text-left, -h3.text-left, -h4.text-left, -h5.text-left, -h6.text-left, -p.text-left, -span.text-left { - text-align: left; -} - -table.text-right, -th.text-right, -td.text-right, -h1.text-right, -h2.text-right, -h3.text-right, -h4.text-right, -h5.text-right, -h6.text-right, -p.text-right, -span.text-right { - text-align: right; -} - -span.text-center { - display: block; - width: 100%; - text-align: center; -} - -@media only screen and (max-width: 596px) { - .small-float-center { - margin: 0 auto !important; - float: none !important; - text-align: center !important; - } - .small-text-center { - text-align: center !important; - } - .small-text-left { - text-align: left !important; - } - .small-text-right { - text-align: right !important; - } -} - -img.float-left { - float: left; - text-align: left; -} - -img.float-right { - float: right; - text-align: right; -} - -img.float-center, -img.text-center { - margin: 0 auto; - Margin: 0 auto; - float: none; - text-align: center; -} - -table.float-center, -td.float-center, -th.float-center { - margin: 0 auto; - Margin: 0 auto; - float: none; - text-align: center; -} - -.hide-for-large { - display: none !important; - mso-hide: all; - overflow: hidden; - max-height: 0; - font-size: 0; - width: 0; - line-height: 0; -} - -@media only screen and (max-width: 596px) { - .hide-for-large { - display: block !important; - width: auto !important; - overflow: visible !important; - max-height: none !important; - font-size: inherit !important; - line-height: inherit !important; - } -} - -table.body table.container .hide-for-large * { - mso-hide: all; -} - -@media only screen and (max-width: 596px) { - table.body table.container .hide-for-large, - table.body table.container .row.hide-for-large { - display: table !important; - width: 100% !important; - } -} - -@media only screen and (max-width: 596px) { - table.body table.container .callout-inner.hide-for-large { - display: table-cell !important; - width: 100% !important; - } -} - -@media only screen and (max-width: 596px) { - table.body table.container .show-for-large { - display: none !important; - width: 0; - mso-hide: all; - overflow: hidden; - } -} - -body, -table.body, -h1, -h2, -h3, -h4, -h5, -h6, -p, -td, -th, -a { - color: #0a0a0a; - font-family: Helvetica, Arial, sans-serif; - font-weight: normal; - padding: 0; - margin: 0; - Margin: 0; - text-align: left; - line-height: 1.3; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - color: inherit; - word-wrap: normal; - font-family: Helvetica, Arial, sans-serif; - font-weight: normal; - margin-bottom: 10px; - Margin-bottom: 10px; -} - -h1 { - font-size: 34px; -} - -h2 { - font-size: 30px; -} - -h3 { - font-size: 28px; -} - -h4 { - font-size: 24px; -} - -h5 { - font-size: 20px; -} - -h6 { - font-size: 18px; -} - -body, -table.body, -p, -td, -th { - font-size: 16px; - line-height: 1.3; -} - -p { - margin-bottom: 10px; - Margin-bottom: 10px; -} - -p.lead { - font-size: 20px; - line-height: 1.6; -} - -p.subheader { - margin-top: 4px; - margin-bottom: 8px; - Margin-top: 4px; - Margin-bottom: 8px; - font-weight: normal; - line-height: 1.4; - color: #8a8a8a; -} - -small { - font-size: 80%; - color: #cacaca; -} - -a { - color: #2199e8; - text-decoration: none; -} - -a:hover { - color: #147dc2; -} - -a:active { - color: #147dc2; -} - -a:visited { - color: #2199e8; -} - -h1 a, -h1 a:visited, -h2 a, -h2 a:visited, -h3 a, -h3 a:visited, -h4 a, -h4 a:visited, -h5 a, -h5 a:visited, -h6 a, -h6 a:visited { - color: #2199e8; -} - -pre { - background: #f3f3f3; - margin: 30px 0; - Margin: 30px 0; -} - -pre code { - color: #cacaca; -} - -pre code span.callout { - color: #8a8a8a; - font-weight: bold; -} - -pre code span.callout-strong { - color: #ff6908; - font-weight: bold; -} - -table.hr { - width: 100%; -} - -table.hr th { - height: 0; - max-width: 580px; - border-top: 0; - border-right: 0; - border-bottom: 1px solid #0a0a0a; - border-left: 0; - margin: 20px auto; - Margin: 20px auto; - clear: both; -} - -.stat { - font-size: 40px; - line-height: 1; -} - -p+.stat { - margin-top: -16px; - Margin-top: -16px; -} - -span.preheader { - display: none !important; - visibility: hidden; - mso-hide: all !important; - font-size: 1px; - color: #f3f3f3; - line-height: 1px; - max-height: 0px; - max-width: 0px; - opacity: 0; - overflow: hidden; -} - -table.button { - width: auto; - margin: 0 0 16px 0; - Margin: 0 0 16px 0; -} - -table.button table td { - text-align: left; - color: #fefefe; - background: #2199e8; - border: 2px solid #2199e8; -} - -table.button table td a { - font-family: Helvetica, Arial, sans-serif; - font-size: 16px; - font-weight: bold; - color: #fefefe; - text-decoration: none; - display: inline-block; - padding: 8px 16px 8px 16px; - border: 0 solid #2199e8; - border-radius: 3px; -} - -table.button.radius table td { - border-radius: 3px; - border: none; -} - -table.button.rounded table td { - border-radius: 500px; - border: none; -} - -table.button:hover table tr td a, -table.button:active table tr td a, -table.button table tr td a:visited, -table.button.tiny:hover table tr td a, -table.button.tiny:active table tr td a, -table.button.tiny table tr td a:visited, -table.button.small:hover table tr td a, -table.button.small:active table tr td a, -table.button.small table tr td a:visited, -table.button.large:hover table tr td a, -table.button.large:active table tr td a, -table.button.large table tr td a:visited { - color: #fefefe; -} - -table.button.tiny table td, -table.button.tiny table a { - padding: 4px 8px 4px 8px; -} - -table.button.tiny table a { - font-size: 10px; - font-weight: normal; -} - -table.button.small table td, -table.button.small table a { - padding: 5px 10px 5px 10px; - font-size: 12px; -} - -table.button.large table a { - padding: 10px 20px 10px 20px; - font-size: 20px; -} - -table.button.expand, -table.button.expanded { - width: 100% !important; -} - -table.button.expand table, -table.button.expanded table { - width: 100%; -} - -table.button.expand table a, -table.button.expanded table a { - text-align: center; - width: 100%; - padding-left: 0; - padding-right: 0; -} - -table.button.expand center, -table.button.expanded center { - min-width: 0; -} - -table.button:hover table td, -table.button:visited table td, -table.button:active table td { - background: #147dc2; - color: #fefefe; -} - -table.button:hover table a, -table.button:visited table a, -table.button:active table a { - border: 0 solid #147dc2; -} - -table.button.secondary table td { - background: #777777; - color: #fefefe; - border: 0px solid #777777; -} - -table.button.secondary table a { - color: #fefefe; - border: 0 solid #777777; -} - -table.button.secondary:hover table td { - background: #919191; - color: #fefefe; -} - -table.button.secondary:hover table a { - border: 0 solid #919191; -} - -table.button.secondary:hover table td a { - color: #fefefe; -} - -table.button.secondary:active table td a { - color: #fefefe; -} - -table.button.secondary table td a:visited { - color: #fefefe; -} - -table.button.success table td { - background: #3adb76; - border: 0px solid #3adb76; -} - -table.button.success table a { - border: 0 solid #3adb76; -} - -table.button.success:hover table td { - background: #23bf5d; -} - -table.button.success:hover table a { - border: 0 solid #23bf5d; -} - -table.button.alert table td { - background: #ec5840; - border: 0px solid #ec5840; -} - -table.button.alert table a { - border: 0 solid #ec5840; -} - -table.button.alert:hover table td { - background: #e23317; -} - -table.button.alert:hover table a { - border: 0 solid #e23317; -} - -table.button.warning table td { - background: #ffae00; - border: 0px solid #ffae00; -} - -table.button.warning table a { - border: 0px solid #ffae00; -} - -table.button.warning:hover table td { - background: #cc8b00; -} - -table.button.warning:hover table a { - border: 0px solid #cc8b00; -} - -table.callout { - margin-bottom: 16px; - Margin-bottom: 16px; -} - -th.callout-inner { - width: 100%; - border: 1px solid #cbcbcb; - padding: 10px; - background: #fefefe; -} - -th.callout-inner.primary { - background: #def0fc; - border: 1px solid #444444; - color: #0a0a0a; -} - -th.callout-inner.secondary { - background: #ebebeb; - border: 1px solid #444444; - color: #0a0a0a; -} - -th.callout-inner.success { - background: #e1faea; - border: 1px solid #1b9448; - color: #fefefe; -} - -th.callout-inner.warning { - background: #fff3d9; - border: 1px solid #996800; - color: #fefefe; -} - -th.callout-inner.alert { - background: #fce6e2; - border: 1px solid #b42912; - color: #fefefe; -} - -.thumbnail { - border: solid 4px #fefefe; - box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.2); - display: inline-block; - line-height: 0; - max-width: 100%; - transition: box-shadow 200ms ease-out; - border-radius: 3px; - margin-bottom: 16px; -} - -.thumbnail:hover, -.thumbnail:focus { - box-shadow: 0 0 6px 1px rgba(33, 153, 232, 0.5); -} - -table.menu { - width: 580px; -} - -table.menu td.menu-item, -table.menu th.menu-item { - padding: 10px; - padding-right: 10px; -} - -table.menu td.menu-item a, -table.menu th.menu-item a { - color: #2199e8; -} - -table.menu.vertical td.menu-item, -table.menu.vertical th.menu-item { - padding: 10px; - padding-right: 0; - display: block; -} - -table.menu.vertical td.menu-item a, -table.menu.vertical th.menu-item a { - width: 100%; -} - -table.menu.vertical td.menu-item table.menu.vertical td.menu-item, -table.menu.vertical td.menu-item table.menu.vertical th.menu-item, -table.menu.vertical th.menu-item table.menu.vertical td.menu-item, -table.menu.vertical th.menu-item table.menu.vertical th.menu-item { - padding-left: 10px; -} - -table.menu.text-center a { - text-align: center; -} - -.menu[align="center"] { - width: auto !important; -} - -body.outlook p { - display: inline !important; -} - -@media only screen and (max-width: 596px) { - table.body img { - width: auto; - height: auto; - } - table.body center { - min-width: 0 !important; - } - table.body .container { - width: 95% !important; - } - table.body .columns, - table.body .column { - height: auto !important; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-left: 16px !important; - padding-right: 16px !important; - } - table.body .columns .column, - table.body .columns .columns, - table.body .column .column, - table.body .column .columns { - padding-left: 0 !important; - padding-right: 0 !important; - } - table.body .collapse .columns, - table.body .collapse .column { - padding-left: 0 !important; - padding-right: 0 !important; - } - td.small-1, - th.small-1 { - display: inline-block !important; - width: 8.33333% !important; - } - td.small-2, - th.small-2 { - display: inline-block !important; - width: 16.66667% !important; - } - td.small-3, - th.small-3 { - display: inline-block !important; - width: 25% !important; - } - td.small-4, - th.small-4 { - display: inline-block !important; - width: 33.33333% !important; - } - td.small-5, - th.small-5 { - display: inline-block !important; - width: 41.66667% !important; - } - td.small-6, - th.small-6 { - display: inline-block !important; - width: 50% !important; - } - td.small-7, - th.small-7 { - display: inline-block !important; - width: 58.33333% !important; - } - td.small-8, - th.small-8 { - display: inline-block !important; - width: 66.66667% !important; - } - td.small-9, - th.small-9 { - display: inline-block !important; - width: 75% !important; - } - td.small-10, - th.small-10 { - display: inline-block !important; - width: 83.33333% !important; - } - td.small-11, - th.small-11 { - display: inline-block !important; - width: 91.66667% !important; - } - td.small-12, - th.small-12 { - display: inline-block !important; - width: 100% !important; - } - .columns td.small-12, - .column td.small-12, - .columns th.small-12, - .column th.small-12 { - display: block !important; - width: 100% !important; - } - table.body td.small-offset-1, - table.body th.small-offset-1 { - margin-left: 8.33333% !important; - Margin-left: 8.33333% !important; - } - table.body td.small-offset-2, - table.body th.small-offset-2 { - margin-left: 16.66667% !important; - Margin-left: 16.66667% !important; - } - table.body td.small-offset-3, - table.body th.small-offset-3 { - margin-left: 25% !important; - Margin-left: 25% !important; - } - table.body td.small-offset-4, - table.body th.small-offset-4 { - margin-left: 33.33333% !important; - Margin-left: 33.33333% !important; - } - table.body td.small-offset-5, - table.body th.small-offset-5 { - margin-left: 41.66667% !important; - Margin-left: 41.66667% !important; - } - table.body td.small-offset-6, - table.body th.small-offset-6 { - margin-left: 50% !important; - Margin-left: 50% !important; - } - table.body td.small-offset-7, - table.body th.small-offset-7 { - margin-left: 58.33333% !important; - Margin-left: 58.33333% !important; - } - table.body td.small-offset-8, - table.body th.small-offset-8 { - margin-left: 66.66667% !important; - Margin-left: 66.66667% !important; - } - table.body td.small-offset-9, - table.body th.small-offset-9 { - margin-left: 75% !important; - Margin-left: 75% !important; - } - table.body td.small-offset-10, - table.body th.small-offset-10 { - margin-left: 83.33333% !important; - Margin-left: 83.33333% !important; - } - table.body td.small-offset-11, - table.body th.small-offset-11 { - margin-left: 91.66667% !important; - Margin-left: 91.66667% !important; - } - table.body table.columns td.expander, - table.body table.columns th.expander { - display: none !important; - } - table.body .right-text-pad, - table.body .text-pad-right { - padding-left: 10px !important; - } - table.body .left-text-pad, - table.body .text-pad-left { - padding-right: 10px !important; - } - table.menu { - width: 100% !important; - } - table.menu td, - table.menu th { - width: auto !important; - display: inline-block !important; - } - table.menu.vertical td, - table.menu.vertical th, - table.menu.small-vertical td, - table.menu.small-vertical th { - display: block !important; - } - table.menu[align="center"] { - width: auto !important; - } - table.button.small-expand, - table.button.small-expanded { - width: 100% !important; - } - table.button.small-expand table, - table.button.small-expanded table { - width: 100%; - } - table.button.small-expand table a, - table.button.small-expanded table a { - text-align: center !important; - width: 100% !important; - padding-left: 0 !important; - padding-right: 0 !important; - } - table.button.small-expand center, - table.button.small-expanded center { - min-width: 0; - } -} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig b/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig deleted file mode 100644 index 0a52d36..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% apply inky_to_html|inline_css %} - - - - - - - - - - - - {% block lead %} - {% if importance is not null %}{{ importance|upper }}{% endif %} -

    - {{ email.subject }} -

    - {% endblock %} - - {% block content %} - {% if markdown %} - {{ include('@email/zurb_2/notification/content_markdown.html.twig') }} - {% else %} - {{ (raw ? content|raw : content)|nl2br }} - {% endif %} - {% endblock %} - - {% block action %} - {% if action_url %} - - - {% endif %} - {% endblock %} - - {% block exception %} - {% if exception %} - -

    Exception stack trace attached.

    - {% endif %} - {% endblock %} -
    -
    - - - - {% block footer %} - {% if footer_text is defined and footer_text is not null %} - - - {% block footer_content %} -

    {{ footer_text }}

    - {% endblock %} -
    -
    - {% endif %} - {% endblock %} -
    -
    -
    - - -{% endapply %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig b/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig deleted file mode 100644 index c98bb08..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/body.txt.twig +++ /dev/null @@ -1,20 +0,0 @@ -{% block lead %} -{{ email.subject }} -{% endblock %} - -{% block content %} -{{ content }} -{% endblock %} - -{% block action %} -{% if action_url %} -{{ action_text }}: {{ action_url }} -{% endif %} -{% endblock %} - -{% block exception %} -{% if exception %} -Exception stack trace attached. -{{ exception }} -{% endif %} -{% endblock %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig b/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig deleted file mode 100644 index 120b2ca..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/content_markdown.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ content|markdown_to_html }} diff --git a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css b/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css deleted file mode 100644 index 2e68dcd..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Email/zurb_2/notification/local.css +++ /dev/null @@ -1,19 +0,0 @@ -body { - background: #f3f3f3; -} - -.wrapper.secondary { - background: #f3f3f3; -} - -.container.body_alert { - border-top: 8px solid #ec5840; -} - -.container.body_warning { - border-top: 8px solid #ffae00; -} - -.container.body_default { - border-top: 8px solid #aaaaaa; -} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig deleted file mode 100644 index 49cd804..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig +++ /dev/null @@ -1,71 +0,0 @@ -{% use "bootstrap_3_layout.html.twig" %} - -{% block form_start -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %} - {{- parent() -}} -{%- endblock form_start %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} -col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    -{##} -{%- endblock form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block form_group_class -%} -col-sm-10 -{%- endblock form_group_class %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig deleted file mode 100644 index 865f907..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_3_layout.html.twig +++ /dev/null @@ -1,216 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block form_widget_simple -%} - {% if type is not defined or type not in ['file', 'hidden'] %} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-default') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block checkbox_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {% if 'checkbox-inline' in parent_label_class %} - {{- form_label(form, null, { widget: parent() }) -}} - {% else -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'radio-inline' in parent_label_class -%} - {{- form_label(form, null, { widget: parent() }) -}} - {%- else -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock radio_widget %} - -{% block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed %} - -{# Labels #} - -{% block form_label -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' control-label')|trim}) -%} - {{- parent() -}} -{%- endblock form_label %} - -{% block choice_label -%} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%} - {{- block('form_label') -}} -{% endblock %} - -{% block checkbox_label -%} - {%- set label_attr = label_attr|merge({'for': id}) -%} - - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {%- set label_attr = label_attr|merge({'for': id}) -%} - - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{% block checkbox_radio_label -%} - {# Do not display the label if widget is not defined in order to prevent double label rendering #} - {%- if widget is defined -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - - {#- if statement must be kept on the same line, to force the space between widget and label -#} - {{- widget|raw }} {% if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{ label -}} - {%- else -%} - {{ label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{ label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{ label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) }} {# -#} - {{ form_widget(form, widget_attr) }} {# -#} - {{- form_help(form) -}} - {{ form_errors(form) }} {# -#} - {# -#} -{%- endblock form_row %} - -{% block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{% block choice_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock choice_row %} - -{% block date_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock date_row %} - -{% block time_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock time_row %} - -{% block datetime_row -%} - {% set force_error = true %} - {{- block('form_row') }} -{%- endblock datetime_row %} - -{% block checkbox_row -%} - - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock checkbox_row %} - -{% block radio_row -%} - - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock radio_row %} - -{# Errors #} - -{% block form_errors -%} - {% if errors|length > 0 -%} - {% if form is not rootform %}{% else %}
    {% endif %} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {% if form is not rootform %}{% else %}
    {% endif %} - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-block')|trim}) -%} - - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_help %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig deleted file mode 100644 index a75e364..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig +++ /dev/null @@ -1,87 +0,0 @@ -{% use "bootstrap_4_layout.html.twig" %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- if expanded is not defined or not expanded -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- endif -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} -col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- if expanded is defined and expanded -%} - {{ block('fieldset_form_row') }} - {%- else -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} -
    - {##} - {%- endif -%} -{%- endblock form_row %} - -{% block fieldset_form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} -
    -
    -{##} -{%- endblock fieldset_form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block form_group_class -%} -col-sm-10 -{%- endblock form_group_class %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig deleted file mode 100644 index 0e80840..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_4_layout.html.twig +++ /dev/null @@ -1,371 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block money_widget -%} - {%- set prepend = not (money_pattern starts with '{{') -%} - {%- set append = not (money_pattern ends with '}}') -%} - {%- if prepend or append -%} -
    - {%- if prepend -%} -
    - {{ money_pattern|form_encode_currency }} -
    - {%- endif -%} - {{- block('form_widget_simple') -}} - {%- if append -%} -
    - {{ money_pattern|form_encode_currency }} -
    - {%- endif -%} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock money_widget %} - -{% block datetime_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {{- parent() -}} -{%- endblock time_widget %} - -{% block dateinterval_widget -%} - {%- if widget != 'single_text' and not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control is-invalid')|trim}) -%} - {% set valid = true %} - {%- endif -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {%- if with_years -%} -
    - {{ form_label(form.years) }} - {{ form_widget(form.years) }} -
    - {%- endif -%} - {%- if with_months -%} -
    - {{ form_label(form.months) }} - {{ form_widget(form.months) }} -
    - {%- endif -%} - {%- if with_weeks -%} -
    - {{ form_label(form.weeks) }} - {{ form_widget(form.weeks) }} -
    - {%- endif -%} - {%- if with_days -%} -
    - {{ form_label(form.days) }} - {{ form_widget(form.days) }} -
    - {%- endif -%} - {%- if with_hours -%} -
    - {{ form_label(form.hours) }} - {{ form_widget(form.hours) }} -
    - {%- endif -%} - {%- if with_minutes -%} -
    - {{ form_label(form.minutes) }} - {{ form_widget(form.minutes) }} -
    - {%- endif -%} - {%- if with_seconds -%} -
    - {{ form_label(form.seconds) }} - {{ form_widget(form.seconds) }} -
    - {%- endif -%} - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} -
    - {{ symbol|default('%') }} -
    -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block file_widget -%} - <{{ element|default('div') }} class="custom-file"> - {%- set type = type|default('file') -%} - {%- set input_lang = 'en' -%} - {% if app is defined and app.request is defined %}{%- set input_lang = app.request.locale -%}{%- endif -%} - {%- set attr = {lang: input_lang} | merge(attr) -%} - {{- block('form_widget_simple') -}} - {%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim })|filter((value, key) => key != 'id') -%} - - -{% endblock %} - -{% block form_widget_simple -%} - {%- if type is not defined or type != 'hidden' -%} - {%- set className = ' form-control' -%} - {%- if type|default('') == 'file' -%} - {%- set className = ' custom-file-input' -%} - {%- elseif type|default('') == 'range' -%} - {%- set className = ' form-control-range' -%} - {%- endif -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ className)|trim}) -%} - {%- endif -%} - {%- if type is defined and (type == 'range' or type == 'color') %} - {# Attribute "required" is not supported #} - {%- set required = false -%} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block widget_attributes -%} - {%- if not valid -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) %} - {%- endif -%} - {{ parent() }} -{%- endblock widget_attributes %} - -{% block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-secondary') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{% block submit_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%} - {{- parent() -}} -{%- endblock submit_widget %} - -{% block checkbox_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'checkbox-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- elseif 'switch-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if 'radio-custom' in parent_label_class -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    - {%- endif -%} -{%- endblock radio_widget %} - -{% block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed %} - -{% block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - valid: valid, - }) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{% block form_label -%} - {% if label is not same as(false) -%} - {%- if compound is defined and compound -%} - {%- set element = 'legend' -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- else -%} - {%- set label_attr = label_attr|merge({for: id}) -%} - {%- endif -%} - {% if required -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} - {%- endif -%} - {% if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}> - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {% block form_label_errors %}{{- form_errors(form) -}}{% endblock form_label_errors %} - {%- else -%} - {%- if errors|length > 0 -%} -
    - {{- form_errors(form) -}} -
    - {%- endif -%} - {%- endif -%} -{%- endblock form_label %} - -{% block checkbox_radio_label -%} - {#- Do not display the label if widget is not defined in order to prevent double label rendering -#} - {%- if widget is defined -%} - {% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class or 'switch-custom' in parent_label_class) %} - {% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class or 'switch-custom' in label_attr.class) %} - {%- if is_parent_custom or is_custom -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' custom-control-label')|trim}) -%} - {%- else %} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%} - {%- endif %} - {%- if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {%- set label = name|humanize -%} - {%- endif -%} - {%- endif -%} - - {{ widget|raw }} - - {%- if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {{- form_errors(form) -}} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- if compound is defined and compound -%} - {%- set element = 'fieldset' -%} - {%- endif -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - <{{ element|default('div') }}{% with {attr: row_attr|merge({class: (row_attr.class|default('') ~ ' form-group')|trim})} %}{{ block('attributes') }}{% endwith %}> - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - -{%- endblock form_row %} - -{# Errors #} - -{% block form_errors -%} - {%- if errors|length > 0 -%} - - {%- for error in errors -%} - - {{ 'Error'|trans({}, 'validators') }} {{ error.message }} - - {%- endfor -%} - - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' form-text text-muted')|trim}) -%} - - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_help %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig deleted file mode 100644 index 3c24166..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig +++ /dev/null @@ -1,130 +0,0 @@ -{% use "bootstrap_5_layout.html.twig" %} - -{# Labels #} - -{% block form_label -%} - {%- if label is same as(false) -%} -
    - {%- else -%} - {%- set row_class = row_class|default(row_attr.class|default('')) -%} - {%- if 'form-floating' not in row_class and 'input-group' not in row_class -%} - {%- if expanded is not defined or not expanded -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} - {%- endif -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} - {%- endif -%} - {{- parent() -}} - {%- endif -%} -{%- endblock form_label %} - -{% block form_label_class -%} - col-sm-2 -{%- endblock form_label_class %} - -{# Rows #} - -{% block form_row -%} - {%- if expanded is defined and expanded -%} - {{ block('fieldset_form_row') }} - {%- else -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - {%- set row_class = row_class|default(row_attr.class|default('mb-3')) -%} - {%- set is_form_floating = is_form_floating|default('form-floating' in row_class) -%} - {%- set is_input_group = is_input_group|default('input-group' in row_class) -%} - {#- Remove behavior class from the main container -#} - {%- set row_class = row_class|replace({'form-floating': '', 'input-group': ''}) -%} - - {%- if is_form_floating or is_input_group -%} -
    -
    - {%- if is_form_floating -%} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} -
    - {%- elseif is_input_group -%} -
    - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {#- Hack to properly display help with input group -#} - {{- form_help(form) -}} -
    - {%- endif -%} - {%- if not is_input_group -%} - {{- form_help(form) -}} - {%- endif -%} - {{- form_errors(form) -}} -
    - {%- else -%} - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    - {%- endif -%} - {##} - {%- endif -%} -{%- endblock form_row %} - -{% block fieldset_form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    -
    - -{%- endblock fieldset_form_row %} - -{% block submit_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock submit_row %} - -{% block reset_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock reset_row %} - -{% block button_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} -
    {#--#} - -{%- endblock button_row %} - -{% block checkbox_row -%} - {#--#} -
    {#--#} -
    - {{- form_widget(form) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    {#--#} - -{%- endblock checkbox_row %} - -{% block form_group_class -%} - col-sm-10 -{%- endblock form_group_class %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig deleted file mode 100644 index eef6f60..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_5_layout.html.twig +++ /dev/null @@ -1,374 +0,0 @@ -{% use "bootstrap_base_layout.html.twig" %} - -{# Widgets #} - -{% block money_widget -%} - {%- set prepend = not (money_pattern starts with '{{') -%} - {%- set append = not (money_pattern ends with '}}') -%} - {%- if prepend or append -%} -
    - {%- if prepend -%} - {{ money_pattern|form_encode_currency }} - {%- endif -%} - {{- block('form_widget_simple') -}} - {%- if append -%} - {{ money_pattern|form_encode_currency }} - {%- endif -%} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock money_widget %} - -{% block date_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif %} - {%- if label is not same as(false) -%} -
    - {{- form_label(form.year) -}} - {{- form_label(form.month) -}} - {{- form_label(form.day) -}} -
    - {%- endif -%} -
    - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} -
    - {%- if datetime is not defined or not datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- if label is not same as(false) -%} -
    - {{- form_label(form.hour) -}} - {%- if with_minutes -%}{{ form_label(form.minute) }}{%- endif -%} - {%- if with_seconds -%}{{ form_label(form.second) }}{%- endif -%} -
    - {%- endif -%} - {% if with_minutes or with_seconds %} -
    - {% endif %} - {{- form_widget(form.hour) -}} - {%- if with_minutes -%} - : - {{- form_widget(form.minute) -}} - {%- endif -%} - {%- if with_seconds -%} - : - {{- form_widget(form.second) -}} - {%- endif -%} - {% if with_minutes or with_seconds %} -
    - {% endif %} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock time_widget %} - -{% block datetime_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} -
    - {{- form_widget(form.date, { datetime: true } ) -}} - {{- form_errors(form.date) -}} - {{- form_widget(form.time, { datetime: true } ) -}} - {{- form_errors(form.time) -}} -
    - {%- endif -%} -{%- endblock datetime_widget %} - -{% block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) -%} - {% set valid = true %} - {% endif %} -
    - {%- if with_years -%} -
    - {{ form_label(form.years) }} - {{ form_widget(form.years) }} -
    - {%- endif -%} - {%- if with_months -%} -
    - {{ form_label(form.months) }} - {{ form_widget(form.months) }} -
    - {%- endif -%} - {%- if with_weeks -%} -
    - {{ form_label(form.weeks) }} - {{ form_widget(form.weeks) }} -
    - {%- endif -%} - {%- if with_days -%} -
    - {{ form_label(form.days) }} - {{ form_widget(form.days) }} -
    - {%- endif -%} - {%- if with_hours -%} -
    - {{ form_label(form.hours) }} - {{ form_widget(form.hours) }} -
    - {%- endif -%} - {%- if with_minutes -%} -
    - {{ form_label(form.minutes) }} - {{ form_widget(form.minutes) }} -
    - {%- endif -%} - {%- if with_seconds -%} -
    - {{ form_label(form.seconds) }} - {{ form_widget(form.seconds) }} -
    - {%- endif -%} - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block form_widget_simple -%} - {%- if type is not defined or type != 'hidden' %} - {%- set widget_class = ' form-control' %} - {%- if type|default('') == 'color' -%} - {%- set widget_class = widget_class ~ ' form-control-color' -%} - {%- elseif type|default('') == 'range' -%} - {%- set widget_class = ' form-range' -%} - {%- endif -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ widget_class)|trim}) -%} - {% endif -%} - {%- if type is defined and type in ['range', 'color'] %} - {# Attribute "required" is not supported #} - {% set required = false %} - {% endif -%} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{%- block widget_attributes -%} - {%- if not valid %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' is-invalid')|trim}) %} - {% endif -%} - {{ parent() }} -{%- endblock widget_attributes -%} - -{%- block button_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-secondary') ~ ' btn')|trim}) -%} - {{- parent() -}} -{%- endblock button_widget %} - -{%- block submit_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('btn-primary'))|trim}) -%} - {{- parent() -}} -{%- endblock submit_widget %} - -{%- block checkbox_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- set row_class = 'form-check' -%} - {%- if 'checkbox-inline' in parent_label_class %} - {% set row_class = row_class ~ ' form-check-inline' %} - {% endif -%} - {%- if 'checkbox-switch' in parent_label_class %} - {% set row_class = row_class ~ ' form-switch' %} - {% endif -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    -{%- endblock checkbox_widget %} - -{%- block radio_widget -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- set row_class = 'form-check' -%} - {%- if 'radio-inline' in parent_label_class -%} - {%- set row_class = row_class ~ ' form-check-inline' -%} - {%- endif -%} -
    - {{- form_label(form, null, { widget: parent() }) -}} -
    -{%- endblock radio_widget %} - -{%- block choice_widget_collapsed -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-select')|trim}) -%} - {{- parent() -}} -{%- endblock choice_widget_collapsed -%} - -{%- block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - valid: valid, - }) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{%- block form_label -%} - {% if label is not same as(false) -%} - {%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%} - {%- if compound is defined and compound -%} - {%- set element = 'legend' -%} - {%- if 'col-form-label' not in parent_label_class -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label' )|trim}) -%} - {%- endif -%} - {%- else -%} - {%- set row_class = row_class|default(row_attr.class|default('')) -%} - {%- set label_attr = label_attr|merge({for: id}) -%} - {%- if 'col-form-label' not in parent_label_class -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ('input-group' in row_class ? ' input-group-text' : ' form-label') )|trim}) -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {{- parent() -}} -{%- endblock form_label %} - -{%- block checkbox_radio_label -%} - {#- Do not display the label if widget is not defined in order to prevent double label rendering -#} - {%- if widget is defined -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%} - {%- if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {%- if required -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%} - {%- endif -%} - {%- if parent_label_class is defined -%} - {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) -%} - {%- endif -%} - {%- if label is not same as(false) and label is empty -%} - {%- if label_format is not empty -%} - {%- set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) -%} - {%- else -%} - {%- set label = name|humanize -%} - {%- endif -%} - {%- endif -%} - - {{ widget|raw }} - - {%- if label is not same as(false) -%} - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{%- block form_row -%} - {%- if compound is defined and compound -%} - {%- set element = 'fieldset' -%} - {%- endif -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - {%- set row_class = row_class|default(row_attr.class|default('mb-3')|trim) -%} - <{{ element|default('div') }}{% with {attr: row_attr|merge({class: row_class})} %}{{ block('attributes') }}{% endwith %}> - {%- if 'form-floating' in row_class -%} - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} - {%- else -%} - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {%- endif -%} - {{- form_help(form) -}} - {{- form_errors(form) -}} - -{%- endblock form_row %} - -{%- block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{# Errors #} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} - {%- for error in errors -%} -
    {{ error.message }}
    - {%- endfor -%} - {%- endif %} -{%- endblock form_errors %} - -{# Help #} - -{%- block form_help -%} - {% set row_class = row_attr.class|default('') %} - {% set help_class = ' form-text' %} - {% if 'input-group' in row_class %} - {#- Hack to properly display help with input group -#} - {% set help_class = ' input-group-text' %} - {% endif %} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ help_class ~ ' mb-0')|trim}) -%} - {%- endif -%} - {{- parent() -}} -{%- endblock form_help %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig deleted file mode 100644 index b8cb8c4..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/bootstrap_base_layout.html.twig +++ /dev/null @@ -1,208 +0,0 @@ -{% use "form_div_layout.html.twig" %} - -{# Widgets #} - -{% block textarea_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) %} - {{- parent() -}} -{%- endblock textarea_widget %} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block datetime_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {{- form_errors(form.date) -}} - {{- form_errors(form.time) -}} - -
    - {%- if form.date.year is defined %}{{ form_label(form.date.year) }}{% endif -%} - {%- if form.date.month is defined %}{{ form_label(form.date.month) }}{% endif -%} - {%- if form.date.day is defined %}{{ form_label(form.date.day) }}{% endif -%} - {%- if form.time.hour is defined %}{{ form_label(form.time.hour) }}{% endif -%} - {%- if form.time.minute is defined %}{{ form_label(form.time.minute) }}{% endif -%} - {%- if form.time.second is defined %}{{ form_label(form.time.second) }}{% endif -%} -
    - - {{- form_widget(form.date, { datetime: true } ) -}} - {{- form_widget(form.time, { datetime: true } ) -}} -
    - {%- endif -%} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif %} - {%- if label is not same as(false) -%} -
    - {{ form_label(form.year) }} - {{ form_label(form.month) }} - {{ form_label(form.day) }} -
    - {%- endif -%} - - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} - {%- if datetime is not defined or not datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock date_widget %} - -{% block time_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- if label is not same as(false) -%}
    {{ form_label(form.hour) }}
    {%- endif -%} - {{- form_widget(form.hour) -}} - {%- if with_minutes -%}:{%- if label is not same as(false) -%}
    {{ form_label(form.minute) }}
    {%- endif -%}{{ form_widget(form.minute) }}{%- endif -%} - {%- if with_seconds -%}:{%- if label is not same as(false) -%}
    {{ form_label(form.second) }}
    {%- endif -%}{{ form_widget(form.second) }}{%- endif -%} - {%- if datetime is not defined or false == datetime -%} -
    - {%- endif -%} - {%- endif -%} -{%- endblock time_widget %} - -{%- block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-inline')|trim}) -%} -
    - {{- form_errors(form) -}} -
    - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - -
    - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget -%} - -{% block choice_widget_expanded -%} - {%- if '-inline' in label_attr.class|default('') -%} - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - }) -}} - {% endfor -%} - {%- else -%} -
    - {%- for child in form %} - {{- form_widget(child, { - parent_label_class: label_attr.class|default(''), - translation_domain: choice_translation_domain, - }) -}} - {%- endfor -%} -
    - {%- endif -%} -{%- endblock choice_widget_expanded %} - -{# Labels #} - -{% block choice_label -%} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {%- set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': '', 'checkbox-custom': '', 'radio-custom': '', 'switch-custom': ''})|trim}) -%} - {{- block('form_label') -}} -{% endblock choice_label %} - -{% block checkbox_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{# Rows #} - -{% block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row %} - -{% block choice_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock choice_row %} - -{% block date_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock date_row %} - -{% block time_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock time_row %} - -{% block datetime_row -%} - {%- set force_error = true -%} - {{- block('form_row') -}} -{%- endblock datetime_row %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig deleted file mode 100644 index 94f87dc..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig +++ /dev/null @@ -1,476 +0,0 @@ -{# Widgets #} - -{%- block form_widget -%} - {% if compound %} - {{- block('form_widget_compound') -}} - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock form_widget -%} - -{%- block form_widget_simple -%} - {%- set type = type|default('text') -%} - {%- if type == 'range' or type == 'color' -%} - {# Attribute "required" is not supported #} - {%- set required = false -%} - {%- endif -%} - -{%- endblock form_widget_simple -%} - -{%- block form_widget_compound -%} -
    - {%- if form is rootform -%} - {{ form_errors(form) }} - {%- endif -%} - {{- block('form_rows') -}} - {{- form_rest(form) -}} -
    -{%- endblock form_widget_compound -%} - -{%- block collection_widget -%} - {% if prototype is defined and not prototype.rendered %} - {%- set attr = attr|merge({'data-prototype': form_row(prototype) }) -%} - {% endif %} - {{- block('form_widget') -}} -{%- endblock collection_widget -%} - -{%- block textarea_widget -%} - -{%- endblock textarea_widget -%} - -{%- block choice_widget -%} - {% if expanded %} - {{- block('choice_widget_expanded') -}} - {% else %} - {{- block('choice_widget_collapsed') -}} - {% endif %} -{%- endblock choice_widget -%} - -{%- block choice_widget_expanded -%} -
    - {%- for child in form %} - {{- form_widget(child) -}} - {{- form_label(child, null, {translation_domain: choice_translation_domain}) -}} - {% endfor -%} -
    -{%- endblock choice_widget_expanded -%} - -{%- block choice_widget_collapsed -%} - {%- if required and placeholder is none and not placeholder_in_choices and not multiple and (attr.size is not defined or attr.size <= 1) -%} - {% set required = false %} - {%- endif -%} - -{%- endblock choice_widget_collapsed -%} - -{%- block choice_widget_options -%} - {% for group_label, choice in options %} - {%- if choice is iterable -%} - - {% set options = choice %} - {{- block('choice_widget_options') -}} - - {%- else -%} - - {%- endif -%} - {% endfor %} -{%- endblock choice_widget_options -%} - -{%- block checkbox_widget -%} - -{%- endblock checkbox_widget -%} - -{%- block radio_widget -%} - -{%- endblock radio_widget -%} - -{%- block datetime_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {%- else -%} -
    - {{- form_errors(form.date) -}} - {{- form_errors(form.time) -}} - {{- form_widget(form.date) -}} - {{- form_widget(form.time) -}} -
    - {%- endif -%} -{%- endblock datetime_widget -%} - -{%- block date_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} -
    - {{- date_pattern|replace({ - '{{ year }}': form_widget(form.year), - '{{ month }}': form_widget(form.month), - '{{ day }}': form_widget(form.day), - })|raw -}} -
    - {%- endif -%} -{%- endblock date_widget -%} - -{%- block time_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} - {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} -
    - {{ form_widget(form.hour, vars) }}{% if with_minutes %}:{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second, vars) }}{% endif %} -
    - {%- endif -%} -{%- endblock time_widget -%} - -{%- block dateinterval_widget -%} - {%- if widget == 'single_text' -%} - {{- block('form_widget_simple') -}} - {%- else -%} -
    - {{- form_errors(form) -}} - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - - {%- if with_years %}{% endif -%} - {%- if with_months %}{% endif -%} - {%- if with_weeks %}{% endif -%} - {%- if with_days %}{% endif -%} - {%- if with_hours %}{% endif -%} - {%- if with_minutes %}{% endif -%} - {%- if with_seconds %}{% endif -%} - - - - {%- if with_invert %}{{ form_widget(form.invert) }}{% endif -%} -
    - {%- endif -%} -{%- endblock dateinterval_widget -%} - -{%- block number_widget -%} - {# type="number" doesn't work with floats in localized formats #} - {%- set type = type|default('text') -%} - {{ block('form_widget_simple') }} -{%- endblock number_widget -%} - -{%- block integer_widget -%} - {%- set type = type|default('number') -%} - {{ block('form_widget_simple') }} -{%- endblock integer_widget -%} - -{%- block money_widget -%} - {{ money_pattern|form_encode_currency(block('form_widget_simple')) }} -{%- endblock money_widget -%} - -{%- block url_widget -%} - {%- set type = type|default('url') -%} - {{ block('form_widget_simple') }} -{%- endblock url_widget -%} - -{%- block search_widget -%} - {%- set type = type|default('search') -%} - {{ block('form_widget_simple') }} -{%- endblock search_widget -%} - -{%- block percent_widget -%} - {%- set type = type|default('text') -%} - {{ block('form_widget_simple') }}{% if symbol %} {{ symbol|default('%') }}{% endif %} -{%- endblock percent_widget -%} - -{%- block password_widget -%} - {%- set type = type|default('password') -%} - {{ block('form_widget_simple') }} -{%- endblock password_widget -%} - -{%- block hidden_widget -%} - {%- set type = type|default('hidden') -%} - {{ block('form_widget_simple') }} -{%- endblock hidden_widget -%} - -{%- block email_widget -%} - {%- set type = type|default('email') -%} - {{ block('form_widget_simple') }} -{%- endblock email_widget -%} - -{%- block range_widget -%} - {% set type = type|default('range') %} - {{- block('form_widget_simple') -}} -{%- endblock range_widget %} - -{%- block button_widget -%} - {%- if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- elseif label is not same as(false) -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - -{%- endblock button_widget -%} - -{%- block submit_widget -%} - {%- set type = type|default('submit') -%} - {{ block('button_widget') }} -{%- endblock submit_widget -%} - -{%- block reset_widget -%} - {%- set type = type|default('reset') -%} - {{ block('button_widget') }} -{%- endblock reset_widget -%} - -{%- block tel_widget -%} - {%- set type = type|default('tel') -%} - {{ block('form_widget_simple') }} -{%- endblock tel_widget -%} - -{%- block color_widget -%} - {%- set type = type|default('color') -%} - {{ block('form_widget_simple') }} -{%- endblock color_widget -%} - -{%- block week_widget -%} - {%- if widget == 'single_text' -%} - {{ block('form_widget_simple') }} - {%- else -%} - {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} -
    - {{ form_widget(form.year, vars) }}-{{ form_widget(form.week, vars) }} -
    - {%- endif -%} -{%- endblock week_widget -%} - -{# Labels #} - -{%- block form_label -%} - {% if label is not same as(false) -%} - {% if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif -%} - {% if required -%} - {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %} - {%- endif -%} - {% if label is empty -%} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {%- endif -%} - <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}> - {%- if translation_domain is same as(false) -%} - {%- if label_html is same as(false) -%} - {{- label -}} - {%- else -%} - {{- label|raw -}} - {%- endif -%} - {%- else -%} - {%- if label_html is same as(false) -%} - {{- label|trans(label_translation_parameters, translation_domain) -}} - {%- else -%} - {{- label|trans(label_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} - - {%- endif -%} -{%- endblock form_label -%} - -{%- block button_label -%}{%- endblock -%} - -{# Help #} - -{% block form_help -%} - {%- if help is not empty -%} - {%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%} -

    - {%- if translation_domain is same as(false) -%} - {%- if help_html is same as(false) -%} - {{- help -}} - {%- else -%} - {{- help|raw -}} - {%- endif -%} - {%- else -%} - {%- if help_html is same as(false) -%} - {{- help|trans(help_translation_parameters, translation_domain) -}} - {%- else -%} - {{- help|trans(help_translation_parameters, translation_domain)|raw -}} - {%- endif -%} - {%- endif -%} -

    - {%- endif -%} -{%- endblock form_help %} - -{# Rows #} - -{%- block repeated_row -%} - {# - No need to render the errors here, as all errors are mapped - to the first child (see RepeatedTypeValidatorExtension). - #} - {{- block('form_rows') -}} -{%- endblock repeated_row -%} - -{%- block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_label(form) -}} - {{- form_errors(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - -{%- endblock form_row -%} - -{%- block button_row -%} - - {{- form_widget(form) -}} - -{%- endblock button_row -%} - -{%- block hidden_row -%} - {{ form_widget(form) }} -{%- endblock hidden_row -%} - -{# Misc #} - -{%- block form -%} - {{ form_start(form) }} - {{- form_widget(form) -}} - {{ form_end(form) }} -{%- endblock form -%} - -{%- block form_start -%} - {%- do form.setMethodRendered() -%} - {% set method = method|upper %} - {%- if method in ["GET", "POST"] -%} - {% set form_method = method %} - {%- else -%} - {% set form_method = "POST" %} - {%- endif -%} - - {%- if form_method != method -%} - - {%- endif -%} -{%- endblock form_start -%} - -{%- block form_end -%} - {%- if not render_rest is defined or render_rest -%} - {{ form_rest(form) }} - {%- endif -%} - -{%- endblock form_end -%} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {%- endif -%} -{%- endblock form_errors -%} - -{%- block form_rest -%} - {% for child in form -%} - {% if not child.rendered %} - {{- form_row(child) -}} - {% endif %} - {%- endfor -%} - - {% if not form.methodRendered and form is rootform %} - {%- do form.setMethodRendered() -%} - {% set method = method|upper %} - {%- if method in ["GET", "POST"] -%} - {% set form_method = method %} - {%- else -%} - {% set form_method = "POST" %} - {%- endif -%} - - {%- if form_method != method -%} - - {%- endif -%} - {% endif -%} -{% endblock form_rest %} - -{# Support #} - -{%- block form_rows -%} - {% for child in form|filter(child => not child.rendered) %} - {{- form_row(child) -}} - {% endfor %} -{%- endblock form_rows -%} - -{%- block widget_attributes -%} - id="{{ id }}" name="{{ full_name }}" - {%- if disabled %} disabled="disabled"{% endif -%} - {%- if required %} required="required"{% endif -%} - {{ block('attributes') }} -{%- endblock widget_attributes -%} - -{%- block widget_container_attributes -%} - {%- if id is not empty %}id="{{ id }}"{% endif -%} - {{ block('attributes') }} -{%- endblock widget_container_attributes -%} - -{%- block button_attributes -%} - id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif -%} - {{ block('attributes') }} -{%- endblock button_attributes -%} - -{% block attributes -%} - {%- for attrname, attrvalue in attr -%} - {{- " " -}} - {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ translation_domain is same as(false) or attrvalue is null ? attrvalue : attrvalue|trans(attr_translation_parameters, translation_domain) }}" - {%- elseif attrvalue is same as(true) -%} - {{- attrname }}="{{ attrname }}" - {%- elseif attrvalue is not same as(false) -%} - {{- attrname }}="{{ attrvalue }}" - {%- endif -%} - {%- endfor -%} -{%- endblock attributes -%} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig deleted file mode 100644 index 00a51ab..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/form_table_layout.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% use "form_div_layout.html.twig" %} - -{%- block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - - {{- form_label(form) -}} - - - {{- form_errors(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - - -{%- endblock form_row -%} - -{%- block button_row -%} - - - - {{- form_widget(form) -}} - - -{%- endblock button_row -%} - -{%- block hidden_row -%} - {%- set style = row_attr.style is defined ? (row_attr.style ~ (row_attr.style|trim|last != ';' ? '; ')) -%} - - - {{- form_widget(form) -}} - - -{%- endblock hidden_row -%} - -{%- block form_widget_compound -%} - - {%- if form is rootform and errors|length > 0 -%} - - - - {%- endif -%} - {{- block('form_rows') -}} - {{- form_rest(form) -}} -
    - {{- form_errors(form) -}} -
    -{%- endblock form_widget_compound -%} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig deleted file mode 100644 index f8c51b8..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/foundation_5_layout.html.twig +++ /dev/null @@ -1,340 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{# Based on Foundation 5 Doc #} -{# Widgets #} - -{% block form_widget_simple -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock form_widget_simple %} - -{% block textarea_widget -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock textarea_widget %} - -{% block button_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' button')|trim}) %} - {{- parent() -}} -{%- endblock button_widget %} - -{% block money_widget -%} -
    - {% set prepend = '{{' == money_pattern[0:2] %} - {% if not prepend %} -
    - {{ money_pattern|form_encode_currency }} -
    - {% endif %} -
    - {{- block('form_widget_simple') -}} -
    - {% if prepend %} -
    - {{ money_pattern|form_encode_currency }} -
    - {% endif %} -
    -{%- endblock money_widget %} - -{% block percent_widget -%} -
    - {%- if symbol -%} -
    - {{- block('form_widget_simple') -}} -
    -
    - {{ symbol|default('%') }} -
    - {%- else -%} -
    - {{- block('form_widget_simple') -}} -
    - {%- endif -%} -
    -{%- endblock percent_widget %} - -{% block datetime_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} -
    -
    {{ form_errors(form.date) }}
    -
    {{ form_errors(form.time) }}
    -
    -
    -
    {{ form_widget(form.date, { datetime: true } ) }}
    -
    {{ form_widget(form.time, { datetime: true } ) }}
    -
    - {% endif %} -{%- endblock datetime_widget %} - -{% block date_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} - {% if datetime is not defined or not datetime %} -
    - {% endif %} - {{- date_pattern|replace({ - '{{ year }}': '
    ' ~ form_widget(form.year) ~ '
    ', - '{{ month }}': '
    ' ~ form_widget(form.month) ~ '
    ', - '{{ day }}': '
    ' ~ form_widget(form.day) ~ '
    ', - })|raw -}} - {% if datetime is not defined or not datetime %} -
    - {% endif %} - {% endif %} -{%- endblock date_widget %} - -{% block time_widget -%} - {% if widget == 'single_text' %} - {{- block('form_widget_simple') -}} - {% else %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' row')|trim}) %} - {% if datetime is not defined or false == datetime %} -
    - {% endif %} - {% if with_seconds %} -
    {{ form_widget(form.hour) }}
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.minute) }} -
    -
    -
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.second) }} -
    -
    -
    - {% else %} -
    {{ form_widget(form.hour) }}
    -
    -
    -
    - : -
    -
    - {{ form_widget(form.minute) }} -
    -
    -
    - {% endif %} - {% if datetime is not defined or false == datetime %} -
    - {% endif %} - {% endif %} -{%- endblock time_widget %} - -{% block choice_widget_collapsed -%} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - - {% if multiple -%} - {% set attr = attr|merge({style: (attr.style|default('') ~ ' height: auto; background-image: none;')|trim}) %} - {% endif %} - - {% if required and placeholder is none and not placeholder_in_choices and not multiple -%} - {% set required = false %} - {%- endif -%} - -{%- endblock choice_widget_collapsed %} - -{% block choice_widget_expanded -%} - {% if '-inline' in label_attr.class|default('') %} -
      - {% for child in form %} -
    • {{ form_widget(child, { - parent_label_class: label_attr.class|default(''), - }) }}
    • - {% endfor %} -
    - {% else %} -
    - {% for child in form %} - {{ form_widget(child, { - parent_label_class: label_attr.class|default(''), - }) }} - {% endfor %} -
    - {% endif %} -{%- endblock choice_widget_expanded %} - -{% block checkbox_widget -%} - {% set parent_label_class = parent_label_class|default('') %} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {% if 'checkbox-inline' in parent_label_class %} - {{ form_label(form, null, { widget: parent() }) }} - {% else %} -
    - {{ form_label(form, null, { widget: parent() }) }} -
    - {% endif %} -{%- endblock checkbox_widget %} - -{% block radio_widget -%} - {% set parent_label_class = parent_label_class|default('') %} - {% if 'radio-inline' in parent_label_class %} - {{ form_label(form, null, { widget: parent() }) }} - {% else %} - {% if errors|length > 0 -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' error')|trim}) %} - {% endif %} -
    - {{ form_label(form, null, { widget: parent() }) }} -
    - {% endif %} -{%- endblock radio_widget %} - -{# Labels #} - -{% block form_label -%} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {{- parent() -}} -{%- endblock form_label %} - -{% block choice_label -%} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {# remove the checkbox-inline and radio-inline class, it's only useful for embed labels #} - {% set label_attr = label_attr|merge({class: label_attr.class|default('')|replace({'checkbox-inline': '', 'radio-inline': ''})|trim}) %} - {{- block('form_label') -}} -{%- endblock choice_label %} - -{% block checkbox_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock checkbox_label %} - -{% block radio_label -%} - {{- block('checkbox_radio_label') -}} -{%- endblock radio_label %} - -{% block checkbox_radio_label -%} - {% if required %} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %} - {% endif %} - {% if errors|length > 0 -%} - {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %} - {% endif %} - {% if label is empty %} - {%- if label_format is not empty -%} - {% set label = label_format|replace({ - '%name%': name, - '%id%': id, - }) %} - {%- else -%} - {% set label = name|humanize %} - {%- endif -%} - {% endif %} - - {{ widget|raw }} - {{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }} - -{%- endblock checkbox_radio_label %} - -{# Rows #} - -{% block form_row -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - -
    - {{- form_label(form) -}} - {{- form_widget(form, widget_attr) -}} - {{- form_help(form) -}} - {{- form_errors(form) -}} -
    - -{%- endblock form_row %} - -{% block choice_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock choice_row %} - -{% block date_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock date_row %} - -{% block time_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock time_row %} - -{% block datetime_row -%} - {% set force_error = true %} - {{ block('form_row') }} -{%- endblock datetime_row %} - -{% block checkbox_row -%} - -
    - {{ form_widget(form) }} - {{- form_help(form) -}} - {{ form_errors(form) }} -
    - -{%- endblock checkbox_row %} - -{% block radio_row -%} - -
    - {{ form_widget(form) }} - {{- form_help(form) -}} - {{ form_errors(form) }} -
    - -{%- endblock radio_row %} - -{# Errors #} - -{% block form_errors -%} - {% if errors|length > 0 -%} - {% if form is not rootform %}{% else %}
    {% endif %} - {%- for error in errors -%} - {{ error.message }} - {% if not loop.last %}, {% endif %} - {%- endfor -%} - {% if form is not rootform %}{% else %}
    {% endif %} - {%- endif %} -{%- endblock form_errors %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig deleted file mode 100644 index 04ed730..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/foundation_6_layout.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{%- block checkbox_row -%} - {%- set parent_class = parent_class|default(attr.class|default('')) -%} - {%- if 'switch-input' in parent_class -%} - {{- form_label(form) -}} - {%- set attr = attr|merge({class: (attr.class|default('') ~ ' switch-input')|trim}) -%} - {{- form_widget(form) -}} - - {{- form_errors(form) -}} - {%- else -%} - {{- block('form_row') -}} - {%- endif -%} -{%- endblock checkbox_row -%} - -{% block money_widget -%} - {% set prepend = not (money_pattern starts with '{{') %} - {% set append = not (money_pattern ends with '}}') %} - {% if prepend or append %} -
    - {% if prepend %} - {{ money_pattern|form_encode_currency }} - {% endif %} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' input-group-field')|trim}) %} - {{- block('form_widget_simple') -}} - {% if append %} - {{ money_pattern|form_encode_currency }} - {% endif %} -
    - {% else %} - {{- block('form_widget_simple') -}} - {% endif %} -{%- endblock money_widget %} - -{% block percent_widget -%} - {%- if symbol -%} -
    - {% set attr = attr|merge({class: (attr.class|default('') ~ ' input-group-field')|trim}) %} - {{- block('form_widget_simple') -}} - {{ symbol|default('%') }} -
    - {%- else -%} - {{- block('form_widget_simple') -}} - {%- endif -%} -{%- endblock percent_widget %} - -{% block button_widget -%} - {% set attr = attr|merge({class: (attr.class|default('') ~ ' button')|trim}) %} - {{- parent() -}} -{%- endblock button_widget %} diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig deleted file mode 100644 index 7f31e70..0000000 --- a/vendor/symfony/twig-bridge/Resources/views/Form/tailwind_2_layout.html.twig +++ /dev/null @@ -1,69 +0,0 @@ -{% use 'form_div_layout.html.twig' %} - -{%- block form_row -%} - {%- set row_attr = row_attr|merge({ class: row_attr.class|default(row_class|default('mb-6')) }) -%} - {{- parent() -}} -{%- endblock form_row -%} - -{%- block widget_attributes -%} - {%- set attr = attr|merge({ class: attr.class|default(widget_class|default('mt-1 w-full')) ~ (disabled ? ' ' ~ widget_disabled_class|default('border-gray-300 text-gray-500')) ~ (errors|length ? ' ' ~ widget_errors_class|default('border-red-700')) }) -%} - {{- parent() -}} -{%- endblock widget_attributes -%} - -{%- block form_label -%} - {%- set label_attr = label_attr|merge({ class: label_attr.class|default(label_class|default('block text-gray-800')) }) -%} - {{- parent() -}} -{%- endblock form_label -%} - -{%- block form_help -%} - {%- set help_attr = help_attr|merge({ class: help_attr.class|default(help_class|default('mt-1 text-gray-600')) }) -%} - {{- parent() -}} -{%- endblock form_help -%} - -{%- block form_errors -%} - {%- if errors|length > 0 -%} -
      - {%- for error in errors -%} -
    • {{ error.message }}
    • - {%- endfor -%} -
    - {%- endif -%} -{%- endblock form_errors -%} - -{%- block choice_widget_expanded -%} - {%- set attr = attr|merge({ class: attr.class|default('mt-2') }) -%} -
    - {%- for child in form %} -
    - {{- form_widget(child) -}} - {{- form_label(child, null, { translation_domain: choice_translation_domain }) -}} -
    - {% endfor -%} -
    -{%- endblock choice_widget_expanded -%} - -{%- block checkbox_row -%} - {%- set row_attr = row_attr|merge({ class: row_attr.class|default(row_class|default('mb-6')) }) -%} - {%- set widget_attr = {} -%} - {%- if help is not empty -%} - {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} - {%- endif -%} - - {{- form_errors(form) -}} -
    - {{- form_widget(form, widget_attr) -}} - {{- form_label(form) -}} -
    - {{- form_help(form) -}} - -{%- endblock checkbox_row -%} - -{%- block checkbox_widget -%} - {%- set widget_class = widget_class|default('mr-2') -%} - {{- parent() -}} -{%- endblock checkbox_widget -%} - -{%- block radio_widget -%} - {%- set widget_class = widget_class|default('mr-2') -%} - {{- parent() -}} -{%- endblock radio_widget -%} diff --git a/vendor/symfony/twig-bridge/TokenParser/DumpTokenParser.php b/vendor/symfony/twig-bridge/TokenParser/DumpTokenParser.php deleted file mode 100644 index 341dc41..0000000 --- a/vendor/symfony/twig-bridge/TokenParser/DumpTokenParser.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\DumpNode; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'dump' tag. - * - * Dump variables with: - * - * {% dump %} - * {% dump foo %} - * {% dump foo, bar %} - * - * @author Julien Galenski - */ -final class DumpTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $values = null; - if (!$this->parser->getStream()->test(Token::BLOCK_END_TYPE)) { - $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); - } - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DumpNode($this->parser->getVarName(), $values, $token->getLine(), $this->getTag()); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'dump'; - } -} diff --git a/vendor/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php b/vendor/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php deleted file mode 100644 index ef5dacb..0000000 --- a/vendor/symfony/twig-bridge/TokenParser/FormThemeTokenParser.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\FormThemeNode; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'form_theme' tag. - * - * @author Fabien Potencier - */ -final class FormThemeTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - $form = $this->parser->getExpressionParser()->parseExpression(); - $only = false; - - if ($this->parser->getStream()->test(Token::NAME_TYPE, 'with')) { - $this->parser->getStream()->next(); - $resources = $this->parser->getExpressionParser()->parseExpression(); - - if ($this->parser->getStream()->nextIf(Token::NAME_TYPE, 'only')) { - $only = true; - } - } else { - $resources = new ArrayExpression([], $stream->getCurrent()->getLine()); - do { - $resources->addElement($this->parser->getExpressionParser()->parseExpression()); - } while (!$stream->test(Token::BLOCK_END_TYPE)); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return new FormThemeNode($form, $resources, $lineno, $this->getTag(), $only); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'form_theme'; - } -} diff --git a/vendor/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php b/vendor/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php deleted file mode 100644 index a70e94b..0000000 --- a/vendor/symfony/twig-bridge/TokenParser/StopwatchTokenParser.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\StopwatchNode; -use Twig\Node\Expression\AssignNameExpression; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the stopwatch tag. - * - * @author Wouter J - */ -final class StopwatchTokenParser extends AbstractTokenParser -{ - protected $stopwatchIsAvailable; - - public function __construct(bool $stopwatchIsAvailable) - { - $this->stopwatchIsAvailable = $stopwatchIsAvailable; - } - - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - // {% stopwatch 'bar' %} - $name = $this->parser->getExpressionParser()->parseExpression(); - - $stream->expect(Token::BLOCK_END_TYPE); - - // {% endstopwatch %} - $body = $this->parser->subparse([$this, 'decideStopwatchEnd'], true); - $stream->expect(Token::BLOCK_END_TYPE); - - if ($this->stopwatchIsAvailable) { - return new StopwatchNode($name, $body, new AssignNameExpression($this->parser->getVarName(), $token->getLine()), $lineno, $this->getTag()); - } - - return $body; - } - - public function decideStopwatchEnd(Token $token): bool - { - return $token->test('endstopwatch'); - } - - public function getTag(): string - { - return 'stopwatch'; - } -} diff --git a/vendor/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php b/vendor/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php deleted file mode 100644 index 19b8204..0000000 --- a/vendor/symfony/twig-bridge/TokenParser/TransDefaultDomainTokenParser.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\TransDefaultDomainNode; -use Twig\Node\Node; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'trans_default_domain' tag. - * - * @author Fabien Potencier - */ -final class TransDefaultDomainTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $expr = $this->parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new TransDefaultDomainNode($expr, $token->getLine(), $this->getTag()); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'trans_default_domain'; - } -} diff --git a/vendor/symfony/twig-bridge/TokenParser/TransTokenParser.php b/vendor/symfony/twig-bridge/TokenParser/TransTokenParser.php deleted file mode 100644 index ffe8828..0000000 --- a/vendor/symfony/twig-bridge/TokenParser/TransTokenParser.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\TokenParser; - -use Symfony\Bridge\Twig\Node\TransNode; -use Twig\Error\SyntaxError; -use Twig\Node\Expression\AbstractExpression; -use Twig\Node\Expression\ArrayExpression; -use Twig\Node\Node; -use Twig\Node\TextNode; -use Twig\Token; -use Twig\TokenParser\AbstractTokenParser; - -/** - * Token Parser for the 'trans' tag. - * - * @author Fabien Potencier - */ -final class TransTokenParser extends AbstractTokenParser -{ - /** - * {@inheritdoc} - */ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - - $count = null; - $vars = new ArrayExpression([], $lineno); - $domain = null; - $locale = null; - if (!$stream->test(Token::BLOCK_END_TYPE)) { - if ($stream->test('count')) { - // {% trans count 5 %} - $stream->next(); - $count = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('with')) { - // {% trans with vars %} - $stream->next(); - $vars = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('from')) { - // {% trans from "messages" %} - $stream->next(); - $domain = $this->parser->getExpressionParser()->parseExpression(); - } - - if ($stream->test('into')) { - // {% trans into "fr" %} - $stream->next(); - $locale = $this->parser->getExpressionParser()->parseExpression(); - } elseif (!$stream->test(Token::BLOCK_END_TYPE)) { - throw new SyntaxError('Unexpected token. Twig was looking for the "with", "from", or "into" keyword.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - - // {% trans %}message{% endtrans %} - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideTransFork'], true); - - if (!$body instanceof TextNode && !$body instanceof AbstractExpression) { - throw new SyntaxError('A message inside a trans tag must be a simple text.', $body->getTemplateLine(), $stream->getSourceContext()); - } - - $stream->expect(Token::BLOCK_END_TYPE); - - return new TransNode($body, $domain, $count, $vars, $locale, $lineno, $this->getTag()); - } - - public function decideTransFork(Token $token): bool - { - return $token->test(['endtrans']); - } - - /** - * {@inheritdoc} - */ - public function getTag(): string - { - return 'trans'; - } -} diff --git a/vendor/symfony/twig-bridge/Translation/TwigExtractor.php b/vendor/symfony/twig-bridge/Translation/TwigExtractor.php deleted file mode 100644 index e79ec69..0000000 --- a/vendor/symfony/twig-bridge/Translation/TwigExtractor.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig\Translation; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Translation\Extractor\AbstractFileExtractor; -use Symfony\Component\Translation\Extractor\ExtractorInterface; -use Symfony\Component\Translation\MessageCatalogue; -use Twig\Environment; -use Twig\Error\Error; -use Twig\Source; - -/** - * TwigExtractor extracts translation messages from a twig template. - * - * @author Michel Salib - * @author Fabien Potencier - */ -class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface -{ - /** - * Default domain for found messages. - * - * @var string - */ - private $defaultDomain = 'messages'; - - /** - * Prefix for found message. - * - * @var string - */ - private $prefix = ''; - - private $twig; - - public function __construct(Environment $twig) - { - $this->twig = $twig; - } - - /** - * {@inheritdoc} - */ - public function extract($resource, MessageCatalogue $catalogue) - { - foreach ($this->extractFiles($resource) as $file) { - try { - $this->extractTemplate(file_get_contents($file->getPathname()), $catalogue); - } catch (Error $e) { - // ignore errors, these should be fixed by using the linter - } - } - } - - /** - * {@inheritdoc} - */ - public function setPrefix(string $prefix) - { - $this->prefix = $prefix; - } - - protected function extractTemplate(string $template, MessageCatalogue $catalogue) - { - $visitor = $this->twig->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->getTranslationNodeVisitor(); - $visitor->enable(); - - $this->twig->parse($this->twig->tokenize(new Source($template, ''))); - - foreach ($visitor->getMessages() as $message) { - $catalogue->set(trim($message[0]), $this->prefix.trim($message[0]), $message[1] ?: $this->defaultDomain); - } - - $visitor->disable(); - } - - /** - * @return bool - */ - protected function canBeExtracted(string $file) - { - return $this->isFile($file) && 'twig' === pathinfo($file, \PATHINFO_EXTENSION); - } - - /** - * {@inheritdoc} - */ - protected function extractFromDirectory($directory) - { - $finder = new Finder(); - - return $finder->files()->name('*.twig')->in($directory); - } -} diff --git a/vendor/symfony/twig-bridge/UndefinedCallableHandler.php b/vendor/symfony/twig-bridge/UndefinedCallableHandler.php deleted file mode 100644 index 608bbaa..0000000 --- a/vendor/symfony/twig-bridge/UndefinedCallableHandler.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Twig; - -use Symfony\Bundle\FullStack; -use Twig\Error\SyntaxError; -use Twig\TwigFilter; -use Twig\TwigFunction; - -/** - * @internal - */ -class UndefinedCallableHandler -{ - private const FILTER_COMPONENTS = [ - 'humanize' => 'form', - 'trans' => 'translation', - 'yaml_encode' => 'yaml', - 'yaml_dump' => 'yaml', - ]; - - private const FUNCTION_COMPONENTS = [ - 'asset' => 'asset', - 'asset_version' => 'asset', - 'dump' => 'debug-bundle', - 'encore_entry_link_tags' => 'webpack-encore-bundle', - 'encore_entry_script_tags' => 'webpack-encore-bundle', - 'expression' => 'expression-language', - 'form_widget' => 'form', - 'form_errors' => 'form', - 'form_label' => 'form', - 'form_help' => 'form', - 'form_row' => 'form', - 'form_rest' => 'form', - 'form' => 'form', - 'form_start' => 'form', - 'form_end' => 'form', - 'csrf_token' => 'form', - 'logout_url' => 'security-http', - 'logout_path' => 'security-http', - 'is_granted' => 'security-core', - 'link' => 'web-link', - 'preload' => 'web-link', - 'dns_prefetch' => 'web-link', - 'preconnect' => 'web-link', - 'prefetch' => 'web-link', - 'prerender' => 'web-link', - 'workflow_can' => 'workflow', - 'workflow_transitions' => 'workflow', - 'workflow_has_marked_place' => 'workflow', - 'workflow_marked_places' => 'workflow', - ]; - - private const FULL_STACK_ENABLE = [ - 'form' => 'enable "framework.form"', - 'security-core' => 'add the "SecurityBundle"', - 'security-http' => 'add the "SecurityBundle"', - 'web-link' => 'enable "framework.web_link"', - 'workflow' => 'enable "framework.workflows"', - ]; - - /** - * @return TwigFilter|false - */ - public static function onUndefinedFilter(string $name) - { - if (!isset(self::FILTER_COMPONENTS[$name])) { - return false; - } - - throw new SyntaxError(self::onUndefined($name, 'filter', self::FILTER_COMPONENTS[$name])); - } - - /** - * @return TwigFunction|false - */ - public static function onUndefinedFunction(string $name) - { - if (!isset(self::FUNCTION_COMPONENTS[$name])) { - return false; - } - - if ('webpack-encore-bundle' === self::FUNCTION_COMPONENTS[$name]) { - return new TwigFunction($name, static function () { return ''; }); - } - - throw new SyntaxError(self::onUndefined($name, 'function', self::FUNCTION_COMPONENTS[$name])); - } - - private static function onUndefined(string $name, string $type, string $component): string - { - if (class_exists(FullStack::class) && isset(self::FULL_STACK_ENABLE[$component])) { - return sprintf('Did you forget to %s? Unknown %s "%s".', self::FULL_STACK_ENABLE[$component], $type, $name); - } - - return sprintf('Did you forget to run "composer require symfony/%s"? Unknown %s "%s".', $component, $type, $name); - } -} diff --git a/vendor/symfony/twig-bridge/composer.json b/vendor/symfony/twig-bridge/composer.json deleted file mode 100644 index 63b0726..0000000 --- a/vendor/symfony/twig-bridge/composer.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "symfony/twig-bridge", - "type": "symfony-bridge", - "description": "Provides integration for Twig with various Symfony components", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12", - "egulias/email-validator": "^2.1.10|^3", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^5.3|^6.0", - "symfony/http-foundation": "^5.3|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.2|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/security-acl": "^2.8|^3.0", - "symfony/security-core": "^4.4|^5.0|^6.0", - "symfony/security-csrf": "^4.4|^5.0|^6.0", - "symfony/security-http": "^4.4|^5.0|^6.0", - "symfony/serializer": "^5.2|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/console": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "symfony/workflow": "^5.2|^6.0", - "twig/cssinliner-extra": "^2.12|^3", - "twig/inky-extra": "^2.12|^3", - "twig/markdown-extra": "^2.12|^3" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/console": "<5.3", - "symfony/form": "<5.3", - "symfony/http-foundation": "<5.3", - "symfony/http-kernel": "<4.4", - "symfony/translation": "<5.2", - "symfony/workflow": "<5.2" - }, - "suggest": { - "symfony/finder": "", - "symfony/asset": "For using the AssetExtension", - "symfony/form": "For using the FormExtension", - "symfony/http-kernel": "For using the HttpKernelExtension", - "symfony/routing": "For using the RoutingExtension", - "symfony/translation": "For using the TranslationExtension", - "symfony/yaml": "For using the YamlExtension", - "symfony/security-core": "For using the SecurityExtension", - "symfony/security-csrf": "For using the CsrfExtension", - "symfony/security-http": "For using the LogoutUrlExtension", - "symfony/stopwatch": "For using the StopwatchExtension", - "symfony/var-dumper": "For using the DumpExtension", - "symfony/expression-language": "For using the ExpressionExtension", - "symfony/web-link": "For using the WebLinkExtension" - }, - "autoload": { - "psr-4": { "Symfony\\Bridge\\Twig\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/twig-bundle/CHANGELOG.md b/vendor/symfony/twig-bundle/CHANGELOG.md deleted file mode 100644 index 83a6ccc..0000000 --- a/vendor/symfony/twig-bundle/CHANGELOG.md +++ /dev/null @@ -1,94 +0,0 @@ -CHANGELOG -========= - -5.3 ---- - - * Add support for the new `serialize` filter (from Twig Bridge) - -5.2.0 ------ - - * deprecated the public `twig` service to private - -5.0.0 ------ - - * updated default value for the `strict_variables` option to `%kernel.debug%` parameter - * removed support to load templates from the legacy directories `src/Resources/views/` and `src/Resources//views/` - * removed `TwigEngine` class, use `Twig\Environment` instead - * removed `FilesystemLoader` and `NativeFilesystemLoader`, use Twig notation for templates instead - * removed `twig.exception_controller` configuration option, use `framework.error_controller` option instead - * removed `ExceptionController`, `PreviewErrorController` and all built-in error templates in favor of the new error renderer mechanism - -4.4.0 ------ - - * marked the `TemplateIterator` as `internal` - * added HTML comment to beginning and end of `exception_full.html.twig` - * deprecated `ExceptionController` and `PreviewErrorController` controllers, use `ErrorController` from the `HttpKernel` component instead - * deprecated all built-in error templates in favor of the new error renderer mechanism - * deprecated `twig.exception_controller` configuration option, set it to "null" and use `framework.error_controller` configuration instead - -4.2.0 ------ - - * deprecated support for legacy templates directories `src/Resources/views/` and `src/Resources//views/`, use `templates/` and `templates/bundles//` instead. - -4.1.0 ------ - - * added priority to Twig extensions - * deprecated relying on the default value (`false`) of the `twig.strict_variables` configuration option. The `%kernel.debug%` parameter will be the new default in 5.0 - -4.0.0 ------ - - * removed `ContainerAwareRuntimeLoader` - -3.4.0 ------ - - * added exclusive Twig namespace only for root bundles - * deprecated `Symfony\Bundle\TwigBundle\Command\DebugCommand`, use `Symfony\Bridge\Twig\Command\DebugCommand` instead - * deprecated relying on the `ContainerAwareInterface` implementation for `Symfony\Bundle\TwigBundle\Command\LintCommand` - * added option to configure default path templates (via `default_path`) - -3.3.0 ------ - - * Deprecated `ContainerAwareRuntimeLoader` - -2.7.0 ------ - - * made it possible to configure the default formats for both the `date` and the `number_format` filter - * added support for the new Asset component (from Twig bridge) - * deprecated the assets extension (use the one from the Twig bridge instead) - -2.6.0 ------ - - * [BC BREAK] changed exception.json.twig to match same structure as error.json.twig making clients independent of runtime environment. - -2.3.0 ------ - - * added option to configure a custom template escaping guesser (via `autoescape_service` and `autoescape_service_method`) - -2.2.0 ------ - - * moved the exception controller to be a service (`twig.controller.exception:showAction` vs `Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController::showAction`) - * added support for multiple loaders via the "twig.loader" tag. - * added automatic registration of namespaced paths for registered bundles - * added support for namespaced paths - -2.1.0 ------ - - * added a new setting ("paths") to configure more paths for the Twig filesystem loader - * added contextual escaping based on the template file name (disabled if you explicitly pass an autoescape option) - * added a command that extracts translation messages from templates - * added the real template name when an error occurs in a Twig template - * added the twig:lint command that will validate a Twig template syntax. diff --git a/vendor/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php b/vendor/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php deleted file mode 100644 index 4a15dcf..0000000 --- a/vendor/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\CacheWarmer; - -use Psr\Container\ContainerInterface; -use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Twig\Environment; -use Twig\Error\Error; - -/** - * Generates the Twig cache for all templates. - * - * @author Fabien Potencier - */ -class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface -{ - private $container; - private $twig; - private $iterator; - - public function __construct(ContainerInterface $container, iterable $iterator) - { - // As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected. - $this->container = $container; - $this->iterator = $iterator; - } - - /** - * {@inheritdoc} - * - * @return string[] A list of template files to preload on PHP 7.4+ - */ - public function warmUp(string $cacheDir) - { - if (null === $this->twig) { - $this->twig = $this->container->get('twig'); - } - - $files = []; - - foreach ($this->iterator as $template) { - try { - $template = $this->twig->load($template); - - if (\is_callable([$template, 'unwrap'])) { - $files[] = (new \ReflectionClass($template->unwrap()))->getFileName(); - } - } catch (Error $e) { - /* - * Problem during compilation, give up for this template (e.g. syntax errors). - * Failing silently here allows to ignore templates that rely on functions that aren't available in - * the current environment. For example, the WebProfilerBundle shouldn't be available in the prod - * environment, but some templates that are never used in prod might rely on functions the bundle provides. - * As we can't detect which templates are "really" important, we try to load all of them and ignore - * errors. Error checks may be performed by calling the lint:twig command. - */ - } - } - - return $files; - } - - /** - * {@inheritdoc} - */ - public function isOptional() - { - return true; - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices() - { - return [ - 'twig' => Environment::class, - ]; - } -} diff --git a/vendor/symfony/twig-bundle/Command/LintCommand.php b/vendor/symfony/twig-bundle/Command/LintCommand.php deleted file mode 100644 index a0a52e2..0000000 --- a/vendor/symfony/twig-bundle/Command/LintCommand.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\Command; - -use Symfony\Bridge\Twig\Command\LintCommand as BaseLintCommand; -use Symfony\Component\Finder\Finder; - -/** - * Command that will validate your template syntax and output encountered errors. - * - * @author Marc Weistroff - * @author Jérôme Tamarelle - */ -final class LintCommand extends BaseLintCommand -{ - protected static $defaultName = 'lint:twig'; - protected static $defaultDescription = 'Lint a Twig template and outputs encountered errors'; - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this - ->setHelp( - $this->getHelp().<<<'EOF' - -Or all template files in a bundle: - - php %command.full_name% @AcmeDemoBundle - -EOF - ) - ; - } - - protected function findFiles(string $filename): iterable - { - if (str_starts_with($filename, '@')) { - $dir = $this->getApplication()->getKernel()->locateResource($filename); - - return Finder::create()->files()->in($dir)->name('*.twig'); - } - - return parent::findFiles($filename); - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php b/vendor/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php deleted file mode 100644 index 12724e0..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/ExtensionPass.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\Asset\Packages; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Workflow\Workflow; -use Symfony\Component\Yaml\Yaml; - -/** - * @author Jean-François Simon - */ -class ExtensionPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!class_exists(Packages::class)) { - $container->removeDefinition('twig.extension.assets'); - } - - if (!class_exists(Expression::class)) { - $container->removeDefinition('twig.extension.expression'); - } - - if (!interface_exists(UrlGeneratorInterface::class)) { - $container->removeDefinition('twig.extension.routing'); - } - - if (!class_exists(Yaml::class)) { - $container->removeDefinition('twig.extension.yaml'); - } - - $viewDir = \dirname((new \ReflectionClass(\Symfony\Bridge\Twig\Extension\FormExtension::class))->getFileName(), 2).'/Resources/views'; - $templateIterator = $container->getDefinition('twig.template_iterator'); - $templatePaths = $templateIterator->getArgument(1); - $loader = $container->getDefinition('twig.loader.native_filesystem'); - - if ($container->has('mailer')) { - $emailPath = $viewDir.'/Email'; - $loader->addMethodCall('addPath', [$emailPath, 'email']); - $loader->addMethodCall('addPath', [$emailPath, '!email']); - $templatePaths[$emailPath] = 'email'; - } - - if ($container->has('form.extension')) { - $container->getDefinition('twig.extension.form')->addTag('twig.extension'); - - $coreThemePath = $viewDir.'/Form'; - $loader->addMethodCall('addPath', [$coreThemePath]); - $templatePaths[$coreThemePath] = null; - } - - $templateIterator->replaceArgument(1, $templatePaths); - - if ($container->has('router')) { - $container->getDefinition('twig.extension.routing')->addTag('twig.extension'); - } - - if ($container->has('fragment.handler')) { - $container->getDefinition('twig.extension.httpkernel')->addTag('twig.extension'); - $container->getDefinition('twig.runtime.httpkernel')->addTag('twig.runtime'); - - if ($container->hasDefinition('fragment.renderer.hinclude')) { - $container->getDefinition('fragment.renderer.hinclude') - ->addTag('kernel.fragment_renderer', ['alias' => 'hinclude']) - ; - } - } - - if ($container->has('request_stack')) { - $container->getDefinition('twig.extension.httpfoundation')->addTag('twig.extension'); - } - - if ($container->getParameter('kernel.debug')) { - $container->getDefinition('twig.extension.profiler')->addTag('twig.extension'); - - // only register if the improved version from DebugBundle is *not* present - if (!$container->has('twig.extension.dump')) { - $container->getDefinition('twig.extension.debug')->addTag('twig.extension'); - } - } - - if ($container->has('web_link.add_link_header_listener')) { - $container->getDefinition('twig.extension.weblink')->addTag('twig.extension'); - } - - $container->setAlias('twig.loader.filesystem', new Alias('twig.loader.native_filesystem', false)); - - if ($container->has('assets.packages')) { - $container->getDefinition('twig.extension.assets')->addTag('twig.extension'); - } - - if ($container->hasDefinition('twig.extension.yaml')) { - $container->getDefinition('twig.extension.yaml')->addTag('twig.extension'); - } - - if (class_exists(\Symfony\Component\Stopwatch\Stopwatch::class)) { - $container->getDefinition('twig.extension.debug.stopwatch')->addTag('twig.extension'); - } - - if ($container->hasDefinition('twig.extension.expression')) { - $container->getDefinition('twig.extension.expression')->addTag('twig.extension'); - } - - if (!class_exists(Workflow::class) || !$container->has('workflow.registry')) { - $container->removeDefinition('workflow.twig_extension'); - } else { - $container->getDefinition('workflow.twig_extension')->addTag('twig.extension'); - } - - if ($container->has('serializer')) { - $container->getDefinition('twig.runtime.serializer')->addTag('twig.runtime'); - $container->getDefinition('twig.extension.serializer')->addTag('twig.extension'); - } - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php b/vendor/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php deleted file mode 100644 index 82cf1c1..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/RuntimeLoaderPass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Registers Twig runtime services. - */ -class RuntimeLoaderPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition('twig.runtime_loader')) { - return; - } - - $definition = $container->getDefinition('twig.runtime_loader'); - $mapping = []; - foreach ($container->findTaggedServiceIds('twig.runtime', true) as $id => $attributes) { - $def = $container->getDefinition($id); - $mapping[$def->getClass()] = new Reference($id); - } - - $definition->replaceArgument(0, ServiceLocatorTagPass::register($container, $mapping)); - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php b/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php deleted file mode 100644 index 45413dc..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigEnvironmentPass.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Adds tagged twig.extension services to twig service. - * - * @author Fabien Potencier - */ -class TwigEnvironmentPass implements CompilerPassInterface -{ - use PriorityTaggedServiceTrait; - - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('twig')) { - return; - } - - $definition = $container->getDefinition('twig'); - - // Extensions must always be registered before everything else. - // For instance, global variable definitions must be registered - // afterward. If not, the globals from the extensions will never - // be registered. - $currentMethodCalls = $definition->getMethodCalls(); - $twigBridgeExtensionsMethodCalls = []; - $othersExtensionsMethodCalls = []; - foreach ($this->findAndSortTaggedServices('twig.extension', $container) as $extension) { - $methodCall = ['addExtension', [$extension]]; - $extensionClass = $container->getDefinition((string) $extension)->getClass(); - - if (\is_string($extensionClass) && str_starts_with($extensionClass, 'Symfony\Bridge\Twig\Extension')) { - $twigBridgeExtensionsMethodCalls[] = $methodCall; - } else { - $othersExtensionsMethodCalls[] = $methodCall; - } - } - - if (!empty($twigBridgeExtensionsMethodCalls) || !empty($othersExtensionsMethodCalls)) { - $definition->setMethodCalls(array_merge($twigBridgeExtensionsMethodCalls, $othersExtensionsMethodCalls, $currentMethodCalls)); - } - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php b/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php deleted file mode 100644 index a422f66..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds services tagged twig.loader as Twig loaders. - * - * @author Daniel Leech - */ -class TwigLoaderPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container) - { - if (false === $container->hasDefinition('twig')) { - return; - } - - $prioritizedLoaders = []; - $found = 0; - - foreach ($container->findTaggedServiceIds('twig.loader', true) as $id => $attributes) { - $priority = $attributes[0]['priority'] ?? 0; - $prioritizedLoaders[$priority][] = $id; - ++$found; - } - - if (!$found) { - throw new LogicException('No twig loaders found. You need to tag at least one loader with "twig.loader".'); - } - - if (1 === $found) { - $container->setAlias('twig.loader', $id); - } else { - $chainLoader = $container->getDefinition('twig.loader.chain'); - krsort($prioritizedLoaders); - - foreach ($prioritizedLoaders as $loaders) { - foreach ($loaders as $loader) { - $chainLoader->addMethodCall('addLoader', [new Reference($loader)]); - } - } - - $container->setAlias('twig.loader', 'twig.loader.chain'); - } - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Configuration.php b/vendor/symfony/twig-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index 76faa01..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection; - -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * TwigExtension configuration structure. - * - * @author Jeremy Mikola - */ -class Configuration implements ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('twig'); - $rootNode = $treeBuilder->getRootNode(); - - $rootNode->beforeNormalization() - ->ifTrue(function ($v) { return \is_array($v) && \array_key_exists('exception_controller', $v); }) - ->then(function ($v) { - if (isset($v['exception_controller'])) { - throw new InvalidConfigurationException('Option "exception_controller" under "twig" must be null or unset, use "error_controller" under "framework" instead.'); - } - - unset($v['exception_controller']); - - return $v; - }) - ->end(); - - $this->addFormThemesSection($rootNode); - $this->addGlobalsSection($rootNode); - $this->addTwigOptions($rootNode); - $this->addTwigFormatOptions($rootNode); - - return $treeBuilder; - } - - private function addFormThemesSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('form_theme') - ->children() - ->arrayNode('form_themes') - ->addDefaultChildrenIfNoneSet() - ->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end() - ->example(['@My/form.html.twig']) - ->validate() - ->ifTrue(function ($v) { return !\in_array('form_div_layout.html.twig', $v); }) - ->then(function ($v) { - return array_merge(['form_div_layout.html.twig'], $v); - }) - ->end() - ->end() - ->end() - ; - } - - private function addGlobalsSection(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('global') - ->children() - ->arrayNode('globals') - ->normalizeKeys(false) - ->useAttributeAsKey('key') - ->example(['foo' => '@bar', 'pi' => 3.14]) - ->prototype('array') - ->normalizeKeys(false) - ->beforeNormalization() - ->ifTrue(function ($v) { return \is_string($v) && str_starts_with($v, '@'); }) - ->then(function ($v) { - if (str_starts_with($v, '@@')) { - return substr($v, 1); - } - - return ['id' => substr($v, 1), 'type' => 'service']; - }) - ->end() - ->beforeNormalization() - ->ifTrue(function ($v) { - if (\is_array($v)) { - $keys = array_keys($v); - sort($keys); - - return $keys !== ['id', 'type'] && $keys !== ['value']; - } - - return true; - }) - ->then(function ($v) { return ['value' => $v]; }) - ->end() - ->children() - ->scalarNode('id')->end() - ->scalarNode('type') - ->validate() - ->ifNotInArray(['service']) - ->thenInvalid('The %s type is not supported') - ->end() - ->end() - ->variableNode('value')->end() - ->end() - ->end() - ->end() - ->end() - ; - } - - private function addTwigOptions(ArrayNodeDefinition $rootNode) - { - $rootNode - ->fixXmlConfig('path') - ->children() - ->variableNode('autoescape')->defaultValue('name')->end() - ->scalarNode('autoescape_service')->defaultNull()->end() - ->scalarNode('autoescape_service_method')->defaultNull()->end() - ->scalarNode('base_template_class')->example('Twig\Template')->cannotBeEmpty()->end() - ->scalarNode('cache')->defaultValue('%kernel.cache_dir%/twig')->end() - ->scalarNode('charset')->defaultValue('%kernel.charset%')->end() - ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() - ->booleanNode('strict_variables')->defaultValue('%kernel.debug%')->end() - ->scalarNode('auto_reload')->end() - ->integerNode('optimizations')->min(-1)->end() - ->scalarNode('default_path') - ->info('The default path used to load templates') - ->defaultValue('%kernel.project_dir%/templates') - ->end() - ->arrayNode('paths') - ->normalizeKeys(false) - ->useAttributeAsKey('paths') - ->beforeNormalization() - ->always() - ->then(function ($paths) { - $normalized = []; - foreach ($paths as $path => $namespace) { - if (\is_array($namespace)) { - // xml - $path = $namespace['value']; - $namespace = $namespace['namespace']; - } - - // path within the default namespace - if (ctype_digit((string) $path)) { - $path = $namespace; - $namespace = null; - } - - $normalized[$path] = $namespace; - } - - return $normalized; - }) - ->end() - ->prototype('variable')->end() - ->end() - ->end() - ; - } - - private function addTwigFormatOptions(ArrayNodeDefinition $rootNode) - { - $rootNode - ->children() - ->arrayNode('date') - ->info('The default format options used by the date filter') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('format')->defaultValue('F j, Y H:i')->end() - ->scalarNode('interval_format')->defaultValue('%d days')->end() - ->scalarNode('timezone') - ->info('The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used') - ->defaultNull() - ->end() - ->end() - ->end() - ->arrayNode('number_format') - ->info('The default format options for the number_format filter') - ->addDefaultsIfNotSet() - ->children() - ->integerNode('decimals')->defaultValue(0)->end() - ->scalarNode('decimal_point')->defaultValue('.')->end() - ->scalarNode('thousands_separator')->defaultValue(',')->end() - ->end() - ->end() - ->end() - ; - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php b/vendor/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php deleted file mode 100644 index 07ec691..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/Configurator/EnvironmentConfigurator.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection\Configurator; - -use Symfony\Bridge\Twig\UndefinedCallableHandler; -use Twig\Environment; - -// BC/FC with namespaced Twig -class_exists(Environment::class); - -/** - * Twig environment configurator. - * - * @author Christian Flothmann - */ -class EnvironmentConfigurator -{ - private $dateFormat; - private $intervalFormat; - private $timezone; - private $decimals; - private $decimalPoint; - private $thousandsSeparator; - - public function __construct(string $dateFormat, string $intervalFormat, ?string $timezone, int $decimals, string $decimalPoint, string $thousandsSeparator) - { - $this->dateFormat = $dateFormat; - $this->intervalFormat = $intervalFormat; - $this->timezone = $timezone; - $this->decimals = $decimals; - $this->decimalPoint = $decimalPoint; - $this->thousandsSeparator = $thousandsSeparator; - } - - public function configure(Environment $environment) - { - $environment->getExtension('Twig\Extension\CoreExtension')->setDateFormat($this->dateFormat, $this->intervalFormat); - - if (null !== $this->timezone) { - $environment->getExtension('Twig\Extension\CoreExtension')->setTimezone($this->timezone); - } - - $environment->getExtension('Twig\Extension\CoreExtension')->setNumberFormat($this->decimals, $this->decimalPoint, $this->thousandsSeparator); - - // wrap UndefinedCallableHandler in closures for lazy-autoloading - $environment->registerUndefinedFilterCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFilter($name); }); - $environment->registerUndefinedFunctionCallback(function ($name) { return UndefinedCallableHandler::onUndefinedFunction($name); }); - } -} diff --git a/vendor/symfony/twig-bundle/DependencyInjection/TwigExtension.php b/vendor/symfony/twig-bundle/DependencyInjection/TwigExtension.php deleted file mode 100644 index 4cec780..0000000 --- a/vendor/symfony/twig-bundle/DependencyInjection/TwigExtension.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\DependencyInjection; - -use Composer\InstalledVersions; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Form\AbstractRendererEngine; -use Symfony\Component\Form\Form; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\Mailer\Mailer; -use Symfony\Component\Translation\Translator; -use Symfony\Contracts\Service\ResetInterface; -use Twig\Extension\ExtensionInterface; -use Twig\Extension\RuntimeExtensionInterface; -use Twig\Loader\LoaderInterface; - -/** - * TwigExtension. - * - * @author Fabien Potencier - * @author Jeremy Mikola - */ -class TwigExtension extends Extension -{ - public function load(array $configs, ContainerBuilder $container) - { - if (!class_exists(InstalledVersions::class)) { - trigger_deprecation('symfony/twig-bundle', '5.4', 'Configuring Symfony without the Composer Runtime API is deprecated. Consider upgrading to Composer 2.1 or later.'); - } - - $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('twig.php'); - - if ($container::willBeAvailable('symfony/form', Form::class, ['symfony/twig-bundle'], true)) { - $loader->load('form.php'); - - if (is_subclass_of(AbstractRendererEngine::class, ResetInterface::class)) { - $container->getDefinition('twig.form.engine')->addTag('kernel.reset', [ - 'method' => 'reset', - ]); - } - } - - if ($container::willBeAvailable('symfony/console', Application::class, ['symfony/twig-bundle'], true)) { - $loader->load('console.php'); - } - - if ($container::willBeAvailable('symfony/mailer', Mailer::class, ['symfony/twig-bundle'], true)) { - $loader->load('mailer.php'); - } - - if (!$container::willBeAvailable('symfony/translation', Translator::class, ['symfony/twig-bundle'], true)) { - $container->removeDefinition('twig.translation.extractor'); - } - - foreach ($configs as $key => $config) { - if (isset($config['globals'])) { - foreach ($config['globals'] as $name => $value) { - if (\is_array($value) && isset($value['key'])) { - $configs[$key]['globals'][$name] = [ - 'key' => $name, - 'value' => $value, - ]; - } - } - } - } - - $configuration = $this->getConfiguration($configs, $container); - - $config = $this->processConfiguration($configuration, $configs); - - $container->setParameter('twig.form.resources', $config['form_themes']); - $container->setParameter('twig.default_path', $config['default_path']); - $defaultTwigPath = $container->getParameterBag()->resolveValue($config['default_path']); - - $envConfiguratorDefinition = $container->getDefinition('twig.configurator.environment'); - $envConfiguratorDefinition->replaceArgument(0, $config['date']['format']); - $envConfiguratorDefinition->replaceArgument(1, $config['date']['interval_format']); - $envConfiguratorDefinition->replaceArgument(2, $config['date']['timezone']); - $envConfiguratorDefinition->replaceArgument(3, $config['number_format']['decimals']); - $envConfiguratorDefinition->replaceArgument(4, $config['number_format']['decimal_point']); - $envConfiguratorDefinition->replaceArgument(5, $config['number_format']['thousands_separator']); - - $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.native_filesystem'); - - // register user-configured paths - foreach ($config['paths'] as $path => $namespace) { - if (!$namespace) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path]); - } else { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, $namespace]); - } - } - - // paths are modified in ExtensionPass if forms are enabled - $container->getDefinition('twig.template_iterator')->replaceArgument(1, $config['paths']); - - foreach ($this->getBundleTemplatePaths($container, $config) as $name => $paths) { - $namespace = $this->normalizeBundleName($name); - foreach ($paths as $path) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, $namespace]); - } - - if ($paths) { - // the last path must be the bundle views directory - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$path, '!'.$namespace]); - } - } - - if (file_exists($defaultTwigPath)) { - $twigFilesystemLoaderDefinition->addMethodCall('addPath', [$defaultTwigPath]); - } - $container->addResource(new FileExistenceResource($defaultTwigPath)); - - if (!empty($config['globals'])) { - $def = $container->getDefinition('twig'); - foreach ($config['globals'] as $key => $global) { - if (isset($global['type']) && 'service' === $global['type']) { - $def->addMethodCall('addGlobal', [$key, new Reference($global['id'])]); - } else { - $def->addMethodCall('addGlobal', [$key, $global['value']]); - } - } - } - - if (isset($config['autoescape_service']) && isset($config['autoescape_service_method'])) { - $config['autoescape'] = [new Reference($config['autoescape_service']), $config['autoescape_service_method']]; - } - - $container->getDefinition('twig')->replaceArgument(1, array_intersect_key($config, [ - 'debug' => true, - 'charset' => true, - 'base_template_class' => true, - 'strict_variables' => true, - 'autoescape' => true, - 'cache' => true, - 'auto_reload' => true, - 'optimizations' => true, - ])); - - $container->registerForAutoconfiguration(\Twig_ExtensionInterface::class)->addTag('twig.extension'); - $container->registerForAutoconfiguration(\Twig_LoaderInterface::class)->addTag('twig.loader'); - $container->registerForAutoconfiguration(ExtensionInterface::class)->addTag('twig.extension'); - $container->registerForAutoconfiguration(LoaderInterface::class)->addTag('twig.loader'); - $container->registerForAutoconfiguration(RuntimeExtensionInterface::class)->addTag('twig.runtime'); - - if (false === $config['cache']) { - $container->removeDefinition('twig.template_cache_warmer'); - } - } - - private function getBundleTemplatePaths(ContainerBuilder $container, array $config): array - { - $bundleHierarchy = []; - foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { - $defaultOverrideBundlePath = $container->getParameterBag()->resolveValue($config['default_path']).'/bundles/'.$name; - - if (file_exists($defaultOverrideBundlePath)) { - $bundleHierarchy[$name][] = $defaultOverrideBundlePath; - } - $container->addResource(new FileExistenceResource($defaultOverrideBundlePath)); - - if (file_exists($dir = $bundle['path'].'/Resources/views') || file_exists($dir = $bundle['path'].'/templates')) { - $bundleHierarchy[$name][] = $dir; - } - $container->addResource(new FileExistenceResource($dir)); - } - - return $bundleHierarchy; - } - - private function normalizeBundleName(string $name): string - { - if (str_ends_with($name, 'Bundle')) { - $name = substr($name, 0, -6); - } - - return $name; - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return __DIR__.'/../Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/twig'; - } -} diff --git a/vendor/symfony/twig-bundle/LICENSE b/vendor/symfony/twig-bundle/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/twig-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/twig-bundle/README.md b/vendor/symfony/twig-bundle/README.md deleted file mode 100644 index 3ae2985..0000000 --- a/vendor/symfony/twig-bundle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -TwigBundle -========== - -TwigBundle provides a tight integration of Twig into the Symfony full-stack -framework. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/twig-bundle/Resources/config/console.php b/vendor/symfony/twig-bundle/Resources/config/console.php deleted file mode 100644 index 0dc7ebd..0000000 --- a/vendor/symfony/twig-bundle/Resources/config/console.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Command\DebugCommand; -use Symfony\Bundle\TwigBundle\Command\LintCommand; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.command.debug', DebugCommand::class) - ->args([ - service('twig'), - param('kernel.project_dir'), - param('kernel.bundles_metadata'), - param('twig.default_path'), - service('debug.file_link_formatter')->nullOnInvalid(), - ]) - ->tag('console.command') - - ->set('twig.command.lint', LintCommand::class) - ->args([service('twig')]) - ->tag('console.command') - ; -}; diff --git a/vendor/symfony/twig-bundle/Resources/config/form.php b/vendor/symfony/twig-bundle/Resources/config/form.php deleted file mode 100644 index 9f2efdf..0000000 --- a/vendor/symfony/twig-bundle/Resources/config/form.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Extension\FormExtension; -use Symfony\Bridge\Twig\Form\TwigRendererEngine; -use Symfony\Component\Form\FormRenderer; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.extension.form', FormExtension::class) - ->args([service('translator')->nullOnInvalid()]) - - ->set('twig.form.engine', TwigRendererEngine::class) - ->args([param('twig.form.resources'), service('twig')]) - - ->set('twig.form.renderer', FormRenderer::class) - ->args([service('twig.form.engine'), service('security.csrf.token_manager')->nullOnInvalid()]) - ->tag('twig.runtime') - ; -}; diff --git a/vendor/symfony/twig-bundle/Resources/config/mailer.php b/vendor/symfony/twig-bundle/Resources/config/mailer.php deleted file mode 100644 index 1444481..0000000 --- a/vendor/symfony/twig-bundle/Resources/config/mailer.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bridge\Twig\Mime\BodyRenderer; -use Symfony\Component\Mailer\EventListener\MessageListener; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig.mailer.message_listener', MessageListener::class) - ->args([null, service('twig.mime_body_renderer')]) - ->tag('kernel.event_subscriber') - - ->set('twig.mime_body_renderer', BodyRenderer::class) - ->args([service('twig')]) - ; -}; diff --git a/vendor/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd b/vendor/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd deleted file mode 100644 index 429c91d..0000000 --- a/vendor/symfony/twig-bundle/Resources/config/schema/twig-1.0.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/twig-bundle/Resources/config/twig.php b/vendor/symfony/twig-bundle/Resources/config/twig.php deleted file mode 100644 index 3bc7f66..0000000 --- a/vendor/symfony/twig-bundle/Resources/config/twig.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Psr\Container\ContainerInterface; -use Symfony\Bridge\Twig\AppVariable; -use Symfony\Bridge\Twig\DataCollector\TwigDataCollector; -use Symfony\Bridge\Twig\ErrorRenderer\TwigErrorRenderer; -use Symfony\Bridge\Twig\Extension\AssetExtension; -use Symfony\Bridge\Twig\Extension\CodeExtension; -use Symfony\Bridge\Twig\Extension\ExpressionExtension; -use Symfony\Bridge\Twig\Extension\HttpFoundationExtension; -use Symfony\Bridge\Twig\Extension\HttpKernelExtension; -use Symfony\Bridge\Twig\Extension\HttpKernelRuntime; -use Symfony\Bridge\Twig\Extension\ProfilerExtension; -use Symfony\Bridge\Twig\Extension\RoutingExtension; -use Symfony\Bridge\Twig\Extension\SerializerExtension; -use Symfony\Bridge\Twig\Extension\SerializerRuntime; -use Symfony\Bridge\Twig\Extension\StopwatchExtension; -use Symfony\Bridge\Twig\Extension\TranslationExtension; -use Symfony\Bridge\Twig\Extension\WebLinkExtension; -use Symfony\Bridge\Twig\Extension\WorkflowExtension; -use Symfony\Bridge\Twig\Extension\YamlExtension; -use Symfony\Bridge\Twig\Translation\TwigExtractor; -use Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheWarmer; -use Symfony\Bundle\TwigBundle\DependencyInjection\Configurator\EnvironmentConfigurator; -use Symfony\Bundle\TwigBundle\TemplateIterator; -use Twig\Cache\FilesystemCache; -use Twig\Environment; -use Twig\Extension\CoreExtension; -use Twig\Extension\DebugExtension; -use Twig\Extension\EscaperExtension; -use Twig\Extension\OptimizerExtension; -use Twig\Extension\StagingExtension; -use Twig\ExtensionSet; -use Twig\Loader\ChainLoader; -use Twig\Loader\FilesystemLoader; -use Twig\Profiler\Profile; -use Twig\RuntimeLoader\ContainerRuntimeLoader; -use Twig\Template; -use Twig\TemplateWrapper; - -return static function (ContainerConfigurator $container) { - $container->services() - ->set('twig', Environment::class) - ->public() - ->args([service('twig.loader'), abstract_arg('Twig options')]) - ->call('addGlobal', ['app', service('twig.app_variable')]) - ->call('addRuntimeLoader', [service('twig.runtime_loader')]) - ->configurator([service('twig.configurator.environment'), 'configure']) - ->tag('container.preload', ['class' => FilesystemCache::class]) - ->tag('container.preload', ['class' => CoreExtension::class]) - ->tag('container.preload', ['class' => EscaperExtension::class]) - ->tag('container.preload', ['class' => OptimizerExtension::class]) - ->tag('container.preload', ['class' => StagingExtension::class]) - ->tag('container.preload', ['class' => ExtensionSet::class]) - ->tag('container.preload', ['class' => Template::class]) - ->tag('container.preload', ['class' => TemplateWrapper::class]) - ->tag('container.private', ['package' => 'symfony/twig-bundle', 'version' => '5.2']) - - ->alias('Twig_Environment', 'twig') - ->alias(Environment::class, 'twig') - - ->set('twig.app_variable', AppVariable::class) - ->call('setEnvironment', [param('kernel.environment')]) - ->call('setDebug', [param('kernel.debug')]) - ->call('setTokenStorage', [service('security.token_storage')->ignoreOnInvalid()]) - ->call('setRequestStack', [service('request_stack')->ignoreOnInvalid()]) - - ->set('twig.template_iterator', TemplateIterator::class) - ->args([service('kernel'), abstract_arg('Twig paths'), param('twig.default_path')]) - - ->set('twig.template_cache_warmer', TemplateCacheWarmer::class) - ->args([service(ContainerInterface::class), service('twig.template_iterator')]) - ->tag('kernel.cache_warmer') - ->tag('container.service_subscriber', ['id' => 'twig']) - - ->set('twig.loader.native_filesystem', FilesystemLoader::class) - ->args([[], param('kernel.project_dir')]) - ->tag('twig.loader') - - ->set('twig.loader.chain', ChainLoader::class) - - ->set('twig.extension.profiler', ProfilerExtension::class) - ->args([service('twig.profile'), service('debug.stopwatch')->ignoreOnInvalid()]) - - ->set('twig.profile', Profile::class) - - ->set('data_collector.twig', TwigDataCollector::class) - ->args([service('twig.profile'), service('twig')]) - ->tag('data_collector', ['template' => '@WebProfiler/Collector/twig.html.twig', 'id' => 'twig', 'priority' => 257]) - - ->set('twig.extension.trans', TranslationExtension::class) - ->args([service('translator')->nullOnInvalid()]) - ->tag('twig.extension') - - ->set('twig.extension.assets', AssetExtension::class) - ->args([service('assets.packages')]) - - ->set('twig.extension.code', CodeExtension::class) - ->args([service('debug.file_link_formatter')->ignoreOnInvalid(), param('kernel.project_dir'), param('kernel.charset')]) - ->tag('twig.extension') - - ->set('twig.extension.routing', RoutingExtension::class) - ->args([service('router')]) - - ->set('twig.extension.yaml', YamlExtension::class) - - ->set('twig.extension.debug.stopwatch', StopwatchExtension::class) - ->args([service('debug.stopwatch')->ignoreOnInvalid(), param('kernel.debug')]) - - ->set('twig.extension.expression', ExpressionExtension::class) - - ->set('twig.extension.httpkernel', HttpKernelExtension::class) - - ->set('twig.runtime.httpkernel', HttpKernelRuntime::class) - ->args([service('fragment.handler'), service('fragment.uri_generator')->ignoreOnInvalid()]) - - ->set('twig.extension.httpfoundation', HttpFoundationExtension::class) - ->args([service('url_helper')]) - - ->set('twig.extension.debug', DebugExtension::class) - - ->set('twig.extension.weblink', WebLinkExtension::class) - ->args([service('request_stack')]) - - ->set('twig.translation.extractor', TwigExtractor::class) - ->args([service('twig')]) - ->tag('translation.extractor', ['alias' => 'twig']) - - ->set('workflow.twig_extension', WorkflowExtension::class) - ->args([service('workflow.registry')]) - - ->set('twig.configurator.environment', EnvironmentConfigurator::class) - ->args([ - abstract_arg('date format, set in TwigExtension'), - abstract_arg('interval format, set in TwigExtension'), - abstract_arg('timezone, set in TwigExtension'), - abstract_arg('decimals, set in TwigExtension'), - abstract_arg('decimal point, set in TwigExtension'), - abstract_arg('thousands separator, set in TwigExtension'), - ]) - - ->set('twig.runtime_loader', ContainerRuntimeLoader::class) - ->args([abstract_arg('runtime locator')]) - - ->set('twig.error_renderer.html', TwigErrorRenderer::class) - ->decorate('error_renderer.html') - ->args([ - service('twig'), - service('twig.error_renderer.html.inner'), - inline_service('bool') - ->factory([TwigErrorRenderer::class, 'isDebug']) - ->args([service('request_stack'), param('kernel.debug')]), - ]) - - ->set('twig.runtime.serializer', SerializerRuntime::class) - ->args([service('serializer')]) - - ->set('twig.extension.serializer', SerializerExtension::class) - ; -}; diff --git a/vendor/symfony/twig-bundle/TemplateIterator.php b/vendor/symfony/twig-bundle/TemplateIterator.php deleted file mode 100644 index 8cc0ffc..0000000 --- a/vendor/symfony/twig-bundle/TemplateIterator.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * Iterator for all templates in bundles and in the application Resources directory. - * - * @author Fabien Potencier - * - * @internal - * - * @implements \IteratorAggregate - */ -class TemplateIterator implements \IteratorAggregate -{ - private $kernel; - private $templates; - private $paths; - private $defaultPath; - - /** - * @param array $paths Additional Twig paths to warm - * @param string|null $defaultPath The directory where global templates can be stored - */ - public function __construct(KernelInterface $kernel, array $paths = [], string $defaultPath = null) - { - $this->kernel = $kernel; - $this->paths = $paths; - $this->defaultPath = $defaultPath; - } - - public function getIterator(): \Traversable - { - if (null !== $this->templates) { - return $this->templates; - } - - $templates = null !== $this->defaultPath ? [$this->findTemplatesInDirectory($this->defaultPath, null, ['bundles'])] : []; - - foreach ($this->kernel->getBundles() as $bundle) { - $name = $bundle->getName(); - if (str_ends_with($name, 'Bundle')) { - $name = substr($name, 0, -6); - } - - $bundleTemplatesDir = is_dir($bundle->getPath().'/Resources/views') ? $bundle->getPath().'/Resources/views' : $bundle->getPath().'/templates'; - - $templates[] = $this->findTemplatesInDirectory($bundleTemplatesDir, $name); - if (null !== $this->defaultPath) { - $templates[] = $this->findTemplatesInDirectory($this->defaultPath.'/bundles/'.$bundle->getName(), $name); - } - } - - foreach ($this->paths as $dir => $namespace) { - $templates[] = $this->findTemplatesInDirectory($dir, $namespace); - } - - return $this->templates = new \ArrayIterator(array_unique(array_merge([], ...$templates))); - } - - /** - * Find templates in the given directory. - * - * @return string[] - */ - private function findTemplatesInDirectory(string $dir, string $namespace = null, array $excludeDirs = []): array - { - if (!is_dir($dir)) { - return []; - } - - $templates = []; - foreach (Finder::create()->files()->followLinks()->in($dir)->exclude($excludeDirs) as $file) { - $templates[] = (null !== $namespace ? '@'.$namespace.'/' : '').str_replace('\\', '/', $file->getRelativePathname()); - } - - return $templates; - } -} diff --git a/vendor/symfony/twig-bundle/TwigBundle.php b/vendor/symfony/twig-bundle/TwigBundle.php deleted file mode 100644 index 3910dd5..0000000 --- a/vendor/symfony/twig-bundle/TwigBundle.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle; - -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\RuntimeLoaderPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigEnvironmentPass; -use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass; -use Symfony\Component\Console\Application; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class TwigBundle extends Bundle -{ - public function build(ContainerBuilder $container) - { - parent::build($container); - - // ExtensionPass must be run before the FragmentRendererPass as it adds tags that are processed later - $container->addCompilerPass(new ExtensionPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); - $container->addCompilerPass(new TwigEnvironmentPass()); - $container->addCompilerPass(new TwigLoaderPass()); - $container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING); - } - - public function registerCommands(Application $application) - { - // noop - } -} diff --git a/vendor/symfony/twig-bundle/composer.json b/vendor/symfony/twig-bundle/composer.json deleted file mode 100644 index 5635bb4..0000000 --- a/vendor/symfony/twig-bundle/composer.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "symfony/twig-bundle", - "type": "symfony-bundle", - "description": "Provides a tight integration of Twig into the Symfony full-stack framework", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/twig-bridge": "^5.3|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "symfony/asset": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/translation": "^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.0|^6.0", - "symfony/web-link": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.10.4", - "doctrine/cache": "^1.0|^2.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.3", - "symfony/framework-bundle": "<5.0", - "symfony/service-contracts": ">=3.0", - "symfony/translation": "<5.0" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\TwigBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/validator/CHANGELOG.md b/vendor/symfony/validator/CHANGELOG.md deleted file mode 100644 index 35f7a3e..0000000 --- a/vendor/symfony/validator/CHANGELOG.md +++ /dev/null @@ -1,355 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add a `Cidr` constraint to validate CIDR notations - * Add a `CssColor` constraint to validate CSS colors - * Add support for `ConstraintViolationList::createFromMessage()` - * Add error's uid to `Count` and `Length` constraints with "exactly" option enabled - -5.3 ---- - - * Add the `normalizer` option to the `Unique` constraint - * Add `Validation::createIsValidCallable()` that returns true/false instead of throwing exceptions - -5.2.0 ------ - - * added a `Cascade` constraint to ease validating nested typed object properties - * deprecated the `allowEmptyString` option of the `Length` constraint - - Before: - - ```php - use Symfony\Component\Validator\Constraints as Assert; - - /** - * @Assert\Length(min=5, allowEmptyString=true) - */ - ``` - - After: - - ```php - use Symfony\Component\Validator\Constraints as Assert; - - /** - * @Assert\AtLeastOneOf({ - * @Assert\Blank(), - * @Assert\Length(min=5) - * }) - */ - ``` - * added the `Isin` constraint and validator - * added the `ULID` constraint and validator - * added support for UUIDv6 in `Uuid` constraint - * enabled the validator to load constraints from PHP attributes - * deprecated the `NumberConstraintTrait` trait - * deprecated setting or creating a Doctrine annotation reader via `ValidatorBuilder::enableAnnotationMapping()`, pass `true` as first parameter and additionally call `setDoctrineAnnotationReader()` or `addDefaultDoctrineAnnotationReader()` to set up the annotation reader - -5.1.0 ------ - - * added the `Hostname` constraint and validator - * added the `alpha3` option to the `Country` and `Language` constraints - * allow to define a reusable set of constraints by extending the `Compound` constraint - * added `Sequentially` constraint, to sequentially validate a set of constraints (any violation raised will prevent further validation of the nested constraints) - * added the `divisibleBy` option to the `Count` constraint - * added the `ExpressionLanguageSyntax` constraint - -5.0.0 ------ - - * an `ExpressionLanguage` instance or null must be passed as the first argument of `ExpressionValidator::__construct()` - * removed the `checkDNS` and `dnsMessage` options of the `Url` constraint - * removed the `checkMX`, `checkHost` and `strict` options of the `Email` constraint - * removed support for validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator` - * removed support for using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` - * removed support for using the `Email` constraint without `egulias/email-validator` - * removed support for using the `Expression` constraint without `symfony/expression-language` - * changed default value of `canonicalize` option of `Locale` constraint to `true` - * removed `ValidatorBuilderInterface` - * passing a null message when instantiating a `ConstraintViolation` is not allowed - * changed the default value of `Length::$allowEmptyString` to `false` and made it optional - * removed `Symfony\Component\Validator\Mapping\Cache\CacheInterface` in favor of PSR-6. - * removed `ValidatorBuilder::setMetadataCache`, use `ValidatorBuilder::setMappingCache` instead. - -4.4.0 ------ - - * [BC BREAK] using null as `$classValidatorRegexp` value in `PropertyInfoLoader::__construct` will not enable auto-mapping for all classes anymore, use `'{.*}'` instead. - * added `EnableAutoMapping` and `DisableAutoMapping` constraints to enable or disable auto mapping for class or a property - * using anything else than a `string` as the code of a `ConstraintViolation` is deprecated, a `string` type-hint will - be added to the constructor of the `ConstraintViolation` class and to the `ConstraintViolationBuilder::setCode()` - method in 5.0 - * deprecated passing an `ExpressionLanguage` instance as the second argument of `ExpressionValidator::__construct()`. Pass it as the first argument instead. - * added the `compared_value_path` parameter in violations when using any - comparison constraint with the `propertyPath` option. - * added support for checking an array of types in `TypeValidator` - * added a new `allowEmptyString` option to the `Length` constraint to allow rejecting empty strings when `min` is set, by setting it to `false`. - * Added new `minPropertyPath` and `maxPropertyPath` options - to `Range` constraint in order to get the value to compare - from an array or object - * added the `min_limit_path` and `max_limit_path` parameters in violations when using - `Range` constraint with respectively the `minPropertyPath` and - `maxPropertyPath` options - * added a new `notInRangeMessage` option to the `Range` constraint that will - be used in the violation builder when both `min` and `max` are not null - * added ability to use stringable objects as violation messages - * Overriding the methods `ConstraintValidatorTestCase::setUp()` and `ConstraintValidatorTestCase::tearDown()` without the `void` return-type is deprecated. - * deprecated `Symfony\Component\Validator\Mapping\Cache\CacheInterface` in favor of PSR-6. - * deprecated `ValidatorBuilder::setMetadataCache`, use `ValidatorBuilder::setMappingCache` instead. - * Marked the `ValidatorDataCollector` class as `@final`. - -4.3.0 ------ - - * added `Timezone` constraint - * added `NotCompromisedPassword` constraint - * added options `iban` and `ibanPropertyPath` to Bic constraint - * added UATP cards support to `CardSchemeValidator` - * added option `allowNull` to NotBlank constraint - * added `Json` constraint - * added `Unique` constraint - * added a new `normalizer` option to the string constraints and to the `NotBlank` constraint - * added `Positive` constraint - * added `PositiveOrZero` constraint - * added `Negative` constraint - * added `NegativeOrZero` constraint - -4.2.0 ------ - - * added a new `UnexpectedValueException` that can be thrown by constraint validators, these exceptions are caught by - the validator and are converted into constraint violations - * added `DivisibleBy` constraint - * decoupled from `symfony/translation` by using `Symfony\Contracts\Translation\TranslatorInterface` - * deprecated `ValidatorBuilderInterface` - * made `ValidatorBuilder::setTranslator()` final - * marked `format` the default option in `DateTime` constraint - * deprecated validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`. - * deprecated using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` - * deprecated using the `Email` constraint without `egulias/email-validator` - * deprecated using the `Expression` constraint without `symfony/expression-language` - -4.1.0 ------ - - * Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint. - * added a `values` option to the `Expression` constraint - * Deprecated use of `Locale` constraint without setting `true` at "canonicalize" option, which will be the default value in 5.0 - -4.0.0 ------ - - * Setting the `strict` option of the `Choice` constraint to anything but `true` - is not supported anymore. - * removed the `DateTimeValidator::PATTERN` constant - * removed the `AbstractConstraintValidatorTest` class - * removed support for setting the `checkDNS` option of the `Url` constraint to `true` - -3.4.0 ------ - - * added support for validation groups to the `Valid` constraint - * not setting the `strict` option of the `Choice` constraint to `true` is - deprecated and will throw an exception in Symfony 4.0 - * setting the `checkDNS` option of the `Url` constraint to `true` is deprecated in favor of - the `Url::CHECK_DNS_TYPE_*` constants values and will throw an exception in Symfony 4.0 - * added min/max amount of pixels check to `Image` constraint via `minPixels` and `maxPixels` - * added a new "propertyPath" option to comparison constraints in order to get the value to compare from an array or object - -3.3.0 ------ - - * added `AddValidatorInitializersPass` - * added `AddConstraintValidatorsPass` - * added `ContainerConstraintValidatorFactory` - -3.2.0 ------ - - * deprecated `Tests\Constraints\AbstractConstraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase` - * added support for PHP constants in YAML configuration files - -3.1.0 ------ - - * deprecated `DateTimeValidator::PATTERN` constant - * added a `format` option to the `DateTime` constraint - -2.8.0 ------ - - * added the BIC (SWIFT-Code) validator - -2.7.0 ------ - - * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` - * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent - -2.6.0 ------ - - * [BC BREAK] `FileValidator` disallow empty files - * [BC BREAK] `UserPasswordValidator` source message change - * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()` - * added `ConstraintViolation::getConstraint()` - * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string - * deprecated `ClassMetadata::hasMemberMetadatas()` - * deprecated `ClassMetadata::getMemberMetadatas()` - * deprecated `ClassMetadata::addMemberMetadata()` - * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()` - * added generic "payload" option to all constraints for attaching domain-specific data - * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()` - -2.5.0 ------ - - * deprecated `ApcCache` in favor of `DoctrineCache` - * added `DoctrineCache` to adapt any Doctrine cache - * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable` - * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array - * `Callback` can now be put onto properties (useful when you pass a closure to the constraint) - * deprecated `ClassBasedInterface` - * deprecated `MetadataInterface` - * deprecated `PropertyMetadataInterface` - * deprecated `PropertyMetadataContainerInterface` - * deprecated `Mapping\ElementMetadata` - * added `Mapping\MetadataInterface` - * added `Mapping\ClassMetadataInterface` - * added `Mapping\PropertyMetadataInterface` - * added `Mapping\GenericMetadata` - * added `Mapping\CascadingStrategy` - * added `Mapping\TraversalStrategy` - * deprecated `Mapping\ClassMetadata::accept()` - * deprecated `Mapping\MemberMetadata::accept()` - * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()` - * deprecated `MetadataFactoryInterface` - * deprecated `Mapping\BlackholeMetadataFactory` - * deprecated `Mapping\ClassMetadataFactory` - * added `Mapping\Factory\MetadataFactoryInterface` - * added `Mapping\Factory\BlackHoleMetadataFactory` - * added `Mapping\Factory\LazyLoadingMetadataFactory` - * deprecated `ExecutionContextInterface` - * deprecated `ExecutionContext` - * deprecated `GlobalExecutionContextInterface` - * added `Context\ExecutionContextInterface` - * added `Context\ExecutionContext` - * added `Context\ExecutionContextFactoryInterface` - * added `Context\ExecutionContextFactory` - * deprecated `ValidatorInterface` - * deprecated `Validator` - * deprecated `ValidationVisitorInterface` - * deprecated `ValidationVisitor` - * added `Validator\ValidatorInterface` - * added `Validator\RecursiveValidator` - * added `Validator\ContextualValidatorInterface` - * added `Validator\RecursiveContextualValidator` - * added `Violation\ConstraintViolationBuilderInterface` - * added `Violation\ConstraintViolationBuilder` - * added `ConstraintViolation::getParameters()` - * added `ConstraintViolation::getPlural()` - * added `Constraints\Traverse` - * deprecated `$deep` property in `Constraints\Valid` - * added `ValidatorBuilderInterface::setApiVersion()` - * added `Validation::API_VERSION_2_4` - * added `Validation::API_VERSION_2_5` - * added `Exception\OutOfBoundsException` - * added `Exception\UnsupportedMetadataException` - * made `Exception\ValidatorException` extend `Exception\RuntimeException` - * added `Util\PropertyPath` - * made the PropertyAccess component an optional dependency - * deprecated `ValidatorBuilder::setPropertyAccessor()` - * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead - -2.4.0 ------ - - * added a constraint the uses the expression language - * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator - -2.3.29 ------- - - * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) - -2.3.0 ------ - - * added the ISBN, ISSN, and IBAN validators - * copied the constraints `Optional` and `Required` to the - `Symfony\Component\Validator\Constraints\` namespace and deprecated the original - classes. - * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo) - -2.2.0 ------ - - * added a CardScheme validator - * added a Luhn validator - * moved @api-tags from `Validator` to `ValidatorInterface` - * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface` - * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface` - * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface` - * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext` - * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private - * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface` - * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor` - * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface` - * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface` - * deprecated `ExecutionContext::addViolationAtPath` - * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt` - * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName` - * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName` - * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue` - * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue` - * improved `ValidatorInterface::validateValue` to accept arrays of constraints - * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface` - * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`. - As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead. - * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference` - are ignored for arrays now. Arrays are always traversed recursively. - * added dependency to Translation component - * violation messages are now translated with a TranslatorInterface implementation - * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation` - * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext` - * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker` - * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor` - * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator` - * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface` - * improved the Validator to support pluralized messages by default - * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version - * added ExceptionInterface, BadMethodCallException and InvalidArgumentException - -2.1.0 ------ - - * added support for `ctype_*` assertions in `TypeValidator` - * improved the ImageValidator with min width, max width, min height, and max height constraints - * added support for MIME with wildcard in FileValidator - * changed Collection validator to add "missing" and "extra" errors to - individual fields - * changed default value for `extraFieldsMessage` and `missingFieldsMessage` - in Collection constraint - * made ExecutionContext immutable - * deprecated Constraint methods `setMessage`, `getMessageTemplate` and - `getMessageParameters` - * added support for dynamic group sequences with the GroupSequenceProvider pattern - * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to - `validate`, its return value was dropped. ConstraintValidator still contains - `isValid` for BC - * [BC BREAK] collections in fields annotated with `Valid` are not traversed - recursively anymore by default. `Valid` contains a new property `deep` - which enables the BC behavior. - * added Count constraint - * added Length constraint - * added Range constraint - * deprecated the Min and Max constraints - * deprecated the MinLength and MaxLength constraints - * added Validation and ValidatorBuilderInterface - * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory diff --git a/vendor/symfony/validator/Command/DebugCommand.php b/vendor/symfony/validator/Command/DebugCommand.php deleted file mode 100644 index ad0ebba..0000000 --- a/vendor/symfony/validator/Command/DebugCommand.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\Dumper; -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Finder\Exception\DirectoryNotFoundException; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; - -/** - * A console command to debug Validators information. - * - * @author Loïc Frémont - */ -class DebugCommand extends Command -{ - protected static $defaultName = 'debug:validator'; - protected static $defaultDescription = 'Display validation constraints for classes'; - - private $validator; - - public function __construct(MetadataFactoryInterface $validator) - { - parent::__construct(); - - $this->validator = $validator; - } - - protected function configure() - { - $this - ->addArgument('class', InputArgument::REQUIRED, 'A fully qualified class name or a path') - ->addOption('show-all', null, InputOption::VALUE_NONE, 'Show all classes even if they have no validation constraints') - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -The %command.name% 'App\Entity\Dummy' command dumps the validators for the dummy class. - -The %command.name% src/ command dumps the validators for the `src` directory. -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $class = $input->getArgument('class'); - - if (class_exists($class)) { - $this->dumpValidatorsForClass($input, $output, $class); - - return 0; - } - - try { - foreach ($this->getResourcesByPath($class) as $class) { - $this->dumpValidatorsForClass($input, $output, $class); - } - } catch (DirectoryNotFoundException $exception) { - $io = new SymfonyStyle($input, $output); - $io->error(sprintf('Neither class nor path were found with "%s" argument.', $input->getArgument('class'))); - - return 1; - } - - return 0; - } - - private function dumpValidatorsForClass(InputInterface $input, OutputInterface $output, string $class): void - { - $io = new SymfonyStyle($input, $output); - $title = sprintf('%s', $class); - $rows = []; - $dump = new Dumper($output); - - foreach ($this->getConstrainedPropertiesData($class) as $propertyName => $constraintsData) { - foreach ($constraintsData as $data) { - $rows[] = [ - $propertyName, - $data['class'], - implode(', ', $data['groups']), - $dump($data['options']), - ]; - } - } - - if (!$rows) { - if (false === $input->getOption('show-all')) { - return; - } - - $io->section($title); - $io->text('No validators were found for this class.'); - - return; - } - - $io->section($title); - - $table = new Table($output); - $table->setHeaders(['Property', 'Name', 'Groups', 'Options']); - $table->setRows($rows); - $table->setColumnMaxWidth(3, 80); - $table->render(); - } - - private function getConstrainedPropertiesData(string $class): array - { - $data = []; - - /** @var ClassMetadataInterface $classMetadata */ - $classMetadata = $this->validator->getMetadataFor($class); - - foreach ($classMetadata->getConstrainedProperties() as $constrainedProperty) { - $data[$constrainedProperty] = $this->getPropertyData($classMetadata, $constrainedProperty); - } - - return $data; - } - - private function getPropertyData(ClassMetadataInterface $classMetadata, string $constrainedProperty): array - { - $data = []; - - $propertyMetadata = $classMetadata->getPropertyMetadata($constrainedProperty); - foreach ($propertyMetadata as $metadata) { - foreach ($metadata->getConstraints() as $constraint) { - $data[] = [ - 'class' => \get_class($constraint), - 'groups' => $constraint->groups, - 'options' => $this->getConstraintOptions($constraint), - ]; - } - } - - return $data; - } - - private function getConstraintOptions(Constraint $constraint): array - { - $options = []; - - foreach (array_keys(get_object_vars($constraint)) as $propertyName) { - // Groups are dumped on a specific column. - if ('groups' === $propertyName) { - continue; - } - - $options[$propertyName] = $constraint->$propertyName; - } - - ksort($options); - - return $options; - } - - private function getResourcesByPath(string $path): array - { - $finder = new Finder(); - $finder->files()->in($path)->name('*.php')->sortByName(true); - $classes = []; - - foreach ($finder as $file) { - $fileContent = file_get_contents($file->getRealPath()); - - preg_match('/namespace (.+);/', $fileContent, $matches); - - $namespace = $matches[1] ?? null; - - if (!preg_match('/class +([^{ ]+)/', $fileContent, $matches)) { - // no class found - continue; - } - - $className = trim($matches[1]); - - if (null !== $namespace) { - $classes[] = $namespace.'\\'.$className; - } else { - $classes[] = $className; - } - } - - return $classes; - } -} diff --git a/vendor/symfony/validator/Constraint.php b/vendor/symfony/validator/Constraint.php deleted file mode 100644 index 27ddcb8..0000000 --- a/vendor/symfony/validator/Constraint.php +++ /dev/null @@ -1,313 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\InvalidArgumentException; -use Symfony\Component\Validator\Exception\InvalidOptionsException; -use Symfony\Component\Validator\Exception\MissingOptionsException; - -/** - * Contains the properties of a constraint definition. - * - * A constraint can be defined on a class, a property or a getter method. - * The Constraint class encapsulates all the configuration required for - * validating this class, property or getter result successfully. - * - * Constraint instances are immutable and serializable. - * - * @author Bernhard Schussek - */ -abstract class Constraint -{ - /** - * The name of the group given to all constraints with no explicit group. - */ - public const DEFAULT_GROUP = 'Default'; - - /** - * Marks a constraint that can be put onto classes. - */ - public const CLASS_CONSTRAINT = 'class'; - - /** - * Marks a constraint that can be put onto properties. - */ - public const PROPERTY_CONSTRAINT = 'property'; - - /** - * Maps error codes to the names of their constants. - */ - protected static $errorNames = []; - - /** - * Domain-specific data attached to a constraint. - * - * @var mixed - */ - public $payload; - - /** - * The groups that the constraint belongs to. - * - * @var string[] - */ - public $groups; - - /** - * Returns the name of the given error code. - * - * @return string - * - * @throws InvalidArgumentException If the error code does not exist - */ - public static function getErrorName(string $errorCode) - { - if (!isset(static::$errorNames[$errorCode])) { - throw new InvalidArgumentException(sprintf('The error code "%s" does not exist for constraint of type "%s".', $errorCode, static::class)); - } - - return static::$errorNames[$errorCode]; - } - - /** - * Initializes the constraint with options. - * - * You should pass an associative array. The keys should be the names of - * existing properties in this class. The values should be the value for these - * properties. - * - * Alternatively you can override the method getDefaultOption() to return the - * name of an existing property. If no associative array is passed, this - * property is set instead. - * - * You can force that certain options are set by overriding - * getRequiredOptions() to return the names of these options. If any - * option is not set here, an exception is thrown. - * - * @param mixed $options The options (as associative array) - * or the value for the default - * option (any other type) - * @param string[] $groups An array of validation groups - * @param mixed $payload Domain-specific data attached to a constraint - * - * @throws InvalidOptionsException When you pass the names of non-existing - * options - * @throws MissingOptionsException When you don't pass any of the options - * returned by getRequiredOptions() - * @throws ConstraintDefinitionException When you don't pass an associative - * array, but getDefaultOption() returns - * null - */ - public function __construct($options = null, array $groups = null, $payload = null) - { - unset($this->groups); // enable lazy initialization - - $options = $this->normalizeOptions($options); - if (null !== $groups) { - $options['groups'] = $groups; - } - $options['payload'] = $payload ?? $options['payload'] ?? null; - - foreach ($options as $name => $value) { - $this->$name = $value; - } - } - - protected function normalizeOptions($options): array - { - $normalizedOptions = []; - $defaultOption = $this->getDefaultOption(); - $invalidOptions = []; - $missingOptions = array_flip((array) $this->getRequiredOptions()); - $knownOptions = get_class_vars(static::class); - - if (\is_array($options) && isset($options['value']) && !property_exists($this, 'value')) { - if (null === $defaultOption) { - throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".', static::class)); - } - - $options[$defaultOption] = $options['value']; - unset($options['value']); - } - - if (\is_array($options)) { - reset($options); - } - if ($options && \is_array($options) && \is_string(key($options))) { - foreach ($options as $option => $value) { - if (\array_key_exists($option, $knownOptions)) { - $normalizedOptions[$option] = $value; - unset($missingOptions[$option]); - } else { - $invalidOptions[] = $option; - } - } - } elseif (null !== $options && !(\is_array($options) && 0 === \count($options))) { - if (null === $defaultOption) { - throw new ConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".', static::class)); - } - - if (\array_key_exists($defaultOption, $knownOptions)) { - $normalizedOptions[$defaultOption] = $options; - unset($missingOptions[$defaultOption]); - } else { - $invalidOptions[] = $defaultOption; - } - } - - if (\count($invalidOptions) > 0) { - throw new InvalidOptionsException(sprintf('The options "%s" do not exist in constraint "%s".', implode('", "', $invalidOptions), static::class), $invalidOptions); - } - - if (\count($missingOptions) > 0) { - throw new MissingOptionsException(sprintf('The options "%s" must be set for constraint "%s".', implode('", "', array_keys($missingOptions)), static::class), array_keys($missingOptions)); - } - - return $normalizedOptions; - } - - /** - * Sets the value of a lazily initialized option. - * - * Corresponding properties are added to the object on first access. Hence - * this method will be called at most once per constraint instance and - * option name. - * - * @param mixed $value The value to set - * - * @throws InvalidOptionsException If an invalid option name is given - */ - public function __set(string $option, $value) - { - if ('groups' === $option) { - $this->groups = (array) $value; - - return; - } - - throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]); - } - - /** - * Returns the value of a lazily initialized option. - * - * Corresponding properties are added to the object on first access. Hence - * this method will be called at most once per constraint instance and - * option name. - * - * @return mixed - * - * @throws InvalidOptionsException If an invalid option name is given - */ - public function __get(string $option) - { - if ('groups' === $option) { - $this->groups = [self::DEFAULT_GROUP]; - - return $this->groups; - } - - throw new InvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]); - } - - /** - * @return bool - */ - public function __isset(string $option) - { - return 'groups' === $option; - } - - /** - * Adds the given group if this constraint is in the Default group. - */ - public function addImplicitGroupName(string $group) - { - if (null === $this->groups && \array_key_exists('groups', (array) $this)) { - throw new \LogicException(sprintf('"%s::$groups" is set to null. Did you forget to call "%s::__construct()"?', static::class, self::class)); - } - - if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) { - $this->groups[] = $group; - } - } - - /** - * Returns the name of the default option. - * - * Override this method to define a default option. - * - * @return string|null - * - * @see __construct() - */ - public function getDefaultOption() - { - return null; - } - - /** - * Returns the name of the required options. - * - * Override this method if you want to define required options. - * - * @return string[] - * - * @see __construct() - */ - public function getRequiredOptions() - { - return []; - } - - /** - * Returns the name of the class that validates this constraint. - * - * By default, this is the fully qualified name of the constraint class - * suffixed with "Validator". You can override this method to change that - * behavior. - * - * @return string - */ - public function validatedBy() - { - return static::class.'Validator'; - } - - /** - * Returns whether the constraint can be put onto classes, properties or - * both. - * - * This method should return one or more of the constants - * Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT. - * - * @return string|string[] One or more constant values - */ - public function getTargets() - { - return self::PROPERTY_CONSTRAINT; - } - - /** - * Optimizes the serialized value to minimize storage space. - * - * @internal - */ - public function __sleep(): array - { - // Initialize "groups" option if it is not set - $this->groups; - - return array_keys(get_object_vars($this)); - } -} diff --git a/vendor/symfony/validator/ConstraintValidator.php b/vendor/symfony/validator/ConstraintValidator.php deleted file mode 100644 index 1473c69..0000000 --- a/vendor/symfony/validator/ConstraintValidator.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Context\ExecutionContextInterface; - -/** - * Base class for constraint validators. - * - * @author Bernhard Schussek - */ -abstract class ConstraintValidator implements ConstraintValidatorInterface -{ - /** - * Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter} - * (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s"). - */ - public const PRETTY_DATE = 1; - - /** - * Whether to cast objects with a "__toString()" method to strings. - */ - public const OBJECT_TO_STRING = 2; - - /** - * @var ExecutionContextInterface - */ - protected $context; - - /** - * {@inheritdoc} - */ - public function initialize(ExecutionContextInterface $context) - { - $this->context = $context; - } - - /** - * Returns a string representation of the type of the value. - * - * This method should be used if you pass the type of a value as - * message parameter to a constraint violation. Note that such - * parameters should usually not be included in messages aimed at - * non-technical people. - * - * @param mixed $value The value to return the type of - * - * @return string - */ - protected function formatTypeOf($value) - { - return get_debug_type($value); - } - - /** - * Returns a string representation of the value. - * - * This method returns the equivalent PHP tokens for most scalar types - * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped - * in double quotes ("). Objects, arrays and resources are formatted as - * "object", "array" and "resource". If the $format bitmask contains - * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted - * with the {@link \IntlDateFormatter}. If it is not available, they will be - * formatted as RFC-3339 dates ("Y-m-d H:i:s"). - * - * Be careful when passing message parameters to a constraint violation - * that (may) contain objects, arrays or resources. These parameters - * should only be displayed for technical users. Non-technical users - * won't know what an "object", "array" or "resource" is and will be - * confused by the violation message. - * - * @param mixed $value The value to format as string - * @param int $format A bitwise combination of the format - * constants in this class - * - * @return string - */ - protected function formatValue($value, int $format = 0) - { - if (($format & self::PRETTY_DATE) && $value instanceof \DateTimeInterface) { - if (class_exists(\IntlDateFormatter::class)) { - $formatter = new \IntlDateFormatter(\Locale::getDefault(), \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, 'UTC'); - - return $formatter->format(new \DateTime( - $value->format('Y-m-d H:i:s.u'), - new \DateTimeZone('UTC') - )); - } - - return $value->format('Y-m-d H:i:s'); - } - - if (\is_object($value)) { - if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) { - return $value->__toString(); - } - - return 'object'; - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (null === $value) { - return 'null'; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - return (string) $value; - } - - /** - * Returns a string representation of a list of values. - * - * Each of the values is converted to a string using - * {@link formatValue()}. The values are then concatenated with commas. - * - * @param array $values A list of values - * @param int $format A bitwise combination of the format - * constants in this class - * - * @return string - * - * @see formatValue() - */ - protected function formatValues(array $values, int $format = 0) - { - foreach ($values as $key => $value) { - $values[$key] = $this->formatValue($value, $format); - } - - return implode(', ', $values); - } -} diff --git a/vendor/symfony/validator/ConstraintValidatorFactory.php b/vendor/symfony/validator/ConstraintValidatorFactory.php deleted file mode 100644 index 45f3ca9..0000000 --- a/vendor/symfony/validator/ConstraintValidatorFactory.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Constraints\ExpressionValidator; - -/** - * Default implementation of the ConstraintValidatorFactoryInterface. - * - * This enforces the convention that the validatedBy() method on any - * Constraint will return the class name of the ConstraintValidator that - * should validate the Constraint. - * - * @author Bernhard Schussek - */ -class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface -{ - protected $validators = []; - - public function __construct() - { - } - - /** - * {@inheritdoc} - */ - public function getInstance(Constraint $constraint) - { - $className = $constraint->validatedBy(); - - if (!isset($this->validators[$className])) { - $this->validators[$className] = 'validator.expression' === $className - ? new ExpressionValidator() - : new $className(); - } - - return $this->validators[$className]; - } -} diff --git a/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php b/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php deleted file mode 100644 index b647645..0000000 --- a/vendor/symfony/validator/ConstraintValidatorFactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * Specifies an object able to return the correct ConstraintValidatorInterface - * instance given a Constraint object. - */ -interface ConstraintValidatorFactoryInterface -{ - /** - * Given a Constraint, this returns the ConstraintValidatorInterface - * object that should be used to verify its validity. - * - * @return ConstraintValidatorInterface - */ - public function getInstance(Constraint $constraint); -} diff --git a/vendor/symfony/validator/ConstraintValidatorInterface.php b/vendor/symfony/validator/ConstraintValidatorInterface.php deleted file mode 100644 index 308c1e6..0000000 --- a/vendor/symfony/validator/ConstraintValidatorInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Context\ExecutionContextInterface; - -/** - * @author Bernhard Schussek - */ -interface ConstraintValidatorInterface -{ - /** - * Initializes the constraint validator. - */ - public function initialize(ExecutionContextInterface $context); - - /** - * Checks if the passed value is valid. - * - * @param mixed $value The value that should be validated - */ - public function validate($value, Constraint $constraint); -} diff --git a/vendor/symfony/validator/ConstraintViolation.php b/vendor/symfony/validator/ConstraintViolation.php deleted file mode 100644 index 33aa42a..0000000 --- a/vendor/symfony/validator/ConstraintViolation.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * Default implementation of {@ConstraintViolationInterface}. - * - * @author Bernhard Schussek - */ -class ConstraintViolation implements ConstraintViolationInterface -{ - private $message; - private $messageTemplate; - private $parameters; - private $plural; - private $root; - private $propertyPath; - private $invalidValue; - private $constraint; - private $code; - private $cause; - - /** - * Creates a new constraint violation. - * - * @param string|\Stringable $message The violation message as a string or a stringable object - * @param string|null $messageTemplate The raw violation message - * @param array $parameters The parameters to substitute in the - * raw violation message - * @param mixed $root The value originally passed to the - * validator - * @param string|null $propertyPath The property path from the root - * value to the invalid value - * @param mixed $invalidValue The invalid value that caused this - * violation - * @param int|null $plural The number for determining the plural - * form when translating the message - * @param string|null $code The error code of the violation - * @param Constraint|null $constraint The constraint whose validation - * caused the violation - * @param mixed $cause The cause of the violation - */ - public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, string $code = null, Constraint $constraint = null, $cause = null) - { - if (!\is_string($message) && !(\is_object($message) && method_exists($message, '__toString'))) { - throw new \TypeError('Constraint violation message should be a string or an object which implements the __toString() method.'); - } - - $this->message = $message; - $this->messageTemplate = $messageTemplate; - $this->parameters = $parameters; - $this->plural = $plural; - $this->root = $root; - $this->propertyPath = $propertyPath; - $this->invalidValue = $invalidValue; - $this->constraint = $constraint; - $this->code = $code; - $this->cause = $cause; - } - - /** - * Converts the violation into a string for debugging purposes. - * - * @return string - */ - public function __toString() - { - if (\is_object($this->root)) { - $class = 'Object('.\get_class($this->root).')'; - } elseif (\is_array($this->root)) { - $class = 'Array'; - } else { - $class = (string) $this->root; - } - - $propertyPath = (string) $this->propertyPath; - - if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) { - $class .= '.'; - } - - if (null !== ($code = $this->code) && '' !== $code) { - $code = ' (code '.$code.')'; - } - - return $class.$propertyPath.":\n ".$this->getMessage().$code; - } - - /** - * {@inheritdoc} - */ - public function getMessageTemplate() - { - return (string) $this->messageTemplate; - } - - /** - * {@inheritdoc} - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * {@inheritdoc} - */ - public function getPlural() - { - return $this->plural; - } - - /** - * {@inheritdoc} - */ - public function getMessage() - { - return $this->message; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->root; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath() - { - return (string) $this->propertyPath; - } - - /** - * {@inheritdoc} - */ - public function getInvalidValue() - { - return $this->invalidValue; - } - - /** - * Returns the constraint whose validation caused the violation. - * - * @return Constraint|null - */ - public function getConstraint() - { - return $this->constraint; - } - - /** - * Returns the cause of the violation. - * - * @return mixed - */ - public function getCause() - { - return $this->cause; - } - - /** - * {@inheritdoc} - */ - public function getCode() - { - return $this->code; - } -} diff --git a/vendor/symfony/validator/ConstraintViolationInterface.php b/vendor/symfony/validator/ConstraintViolationInterface.php deleted file mode 100644 index fd7d414..0000000 --- a/vendor/symfony/validator/ConstraintViolationInterface.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * A violation of a constraint that happened during validation. - * - * For each constraint that fails during validation one or more violations are - * created. The violations store the violation message, the path to the failing - * element in the validation graph and the root element that was originally - * passed to the validator. For example, take the following graph: - * - * (Person)---(firstName: string) - * \ - * (address: Address)---(street: string) - * - * If the Person object is validated and validation fails for the - * "firstName" property, the generated violation has the Person - * instance as root and the property path "firstName". If validation fails - * for the "street" property of the related Address instance, the root - * element is still the person, but the property path is "address.street". - * - * @author Bernhard Schussek - */ -interface ConstraintViolationInterface -{ - /** - * Returns the violation message. - * - * @return string|\Stringable - */ - public function getMessage(); - - /** - * Returns the raw violation message. - * - * The raw violation message contains placeholders for the parameters - * returned by {@link getParameters}. Typically you'll pass the - * message template and parameters to a translation engine. - * - * @return string The raw violation message - */ - public function getMessageTemplate(); - - /** - * Returns the parameters to be inserted into the raw violation message. - * - * @return array a possibly empty list of parameters indexed by the names - * that appear in the message template - * - * @see getMessageTemplate() - */ - public function getParameters(); - - /** - * Returns a number for pluralizing the violation message. - * - * For example, the message template could have different translation based - * on a parameter "choices": - * - *
      - *
    • Please select exactly one entry. (choices=1)
    • - *
    • Please select two entries. (choices=2)
    • - *
    - * - * This method returns the value of the parameter for choosing the right - * pluralization form (in this case "choices"). - * - * @return int|null The number to use to pluralize of the message - */ - public function getPlural(); - - /** - * Returns the root element of the validation. - * - * @return mixed The value that was passed originally to the validator when - * the validation was started. Because the validator traverses - * the object graph, the value at which the violation occurs - * is not necessarily the value that was originally validated. - */ - public function getRoot(); - - /** - * Returns the property path from the root element to the violation. - * - * @return string The property path indicates how the validator reached - * the invalid value from the root element. If the root - * element is a Person instance with a property - * "address" that contains an Address instance - * with an invalid property "street", the generated property - * path is "address.street". Property access is denoted by - * dots, while array access is denoted by square brackets, - * for example "addresses[1].street". - */ - public function getPropertyPath(); - - /** - * Returns the value that caused the violation. - * - * @return mixed the invalid value that caused the validated constraint to - * fail - */ - public function getInvalidValue(); - - /** - * Returns a machine-digestible error code for the violation. - * - * @return string|null - */ - public function getCode(); -} diff --git a/vendor/symfony/validator/ConstraintViolationList.php b/vendor/symfony/validator/ConstraintViolationList.php deleted file mode 100644 index 3d459b2..0000000 --- a/vendor/symfony/validator/ConstraintViolationList.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * Default implementation of {@ConstraintViolationListInterface}. - * - * @author Bernhard Schussek - * - * @implements \IteratorAggregate - */ -class ConstraintViolationList implements \IteratorAggregate, ConstraintViolationListInterface -{ - /** - * @var list - */ - private $violations = []; - - /** - * Creates a new constraint violation list. - * - * @param iterable $violations The constraint violations to add to the list - */ - public function __construct(iterable $violations = []) - { - foreach ($violations as $violation) { - $this->add($violation); - } - } - - public static function createFromMessage(string $message): self - { - $self = new self(); - $self->add(new ConstraintViolation($message, '', [], null, '', null)); - - return $self; - } - - /** - * Converts the violation into a string for debugging purposes. - * - * @return string - */ - public function __toString() - { - $string = ''; - - foreach ($this->violations as $violation) { - $string .= $violation."\n"; - } - - return $string; - } - - /** - * {@inheritdoc} - */ - public function add(ConstraintViolationInterface $violation) - { - $this->violations[] = $violation; - } - - /** - * {@inheritdoc} - */ - public function addAll(ConstraintViolationListInterface $otherList) - { - foreach ($otherList as $violation) { - $this->violations[] = $violation; - } - } - - /** - * {@inheritdoc} - */ - public function get(int $offset) - { - if (!isset($this->violations[$offset])) { - throw new \OutOfBoundsException(sprintf('The offset "%s" does not exist.', $offset)); - } - - return $this->violations[$offset]; - } - - /** - * {@inheritdoc} - */ - public function has(int $offset) - { - return isset($this->violations[$offset]); - } - - /** - * {@inheritdoc} - */ - public function set(int $offset, ConstraintViolationInterface $violation) - { - $this->violations[$offset] = $violation; - } - - /** - * {@inheritdoc} - */ - public function remove(int $offset) - { - unset($this->violations[$offset]); - } - - /** - * {@inheritdoc} - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->violations); - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->violations); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) - { - return $this->has($offset); - } - - /** - * {@inheritdoc} - * - * @return ConstraintViolationInterface - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $violation) - { - if (null === $offset) { - $this->add($violation); - } else { - $this->set($offset, $violation); - } - } - - /** - * {@inheritdoc} - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - $this->remove($offset); - } - - /** - * Creates iterator for errors with specific codes. - * - * @param string|string[] $codes The codes to find - * - * @return static - */ - public function findByCodes($codes) - { - $codes = (array) $codes; - $violations = []; - foreach ($this as $violation) { - if (\in_array($violation->getCode(), $codes, true)) { - $violations[] = $violation; - } - } - - return new static($violations); - } -} diff --git a/vendor/symfony/validator/ConstraintViolationListInterface.php b/vendor/symfony/validator/ConstraintViolationListInterface.php deleted file mode 100644 index f994668..0000000 --- a/vendor/symfony/validator/ConstraintViolationListInterface.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * A list of constraint violations. - * - * @author Bernhard Schussek - * - * @extends \ArrayAccess - * @extends \Traversable - */ -interface ConstraintViolationListInterface extends \Traversable, \Countable, \ArrayAccess -{ - /** - * Adds a constraint violation to this list. - */ - public function add(ConstraintViolationInterface $violation); - - /** - * Merges an existing violation list into this list. - */ - public function addAll(self $otherList); - - /** - * Returns the violation at a given offset. - * - * @param int $offset The offset of the violation - * - * @return ConstraintViolationInterface - * - * @throws \OutOfBoundsException if the offset does not exist - */ - public function get(int $offset); - - /** - * Returns whether the given offset exists. - * - * @param int $offset The violation offset - * - * @return bool - */ - public function has(int $offset); - - /** - * Sets a violation at a given offset. - * - * @param int $offset The violation offset - */ - public function set(int $offset, ConstraintViolationInterface $violation); - - /** - * Removes a violation at a given offset. - * - * @param int $offset The offset to remove - */ - public function remove(int $offset); -} diff --git a/vendor/symfony/validator/Constraints/AbstractComparison.php b/vendor/symfony/validator/Constraints/AbstractComparison.php deleted file mode 100644 index d492655..0000000 --- a/vendor/symfony/validator/Constraints/AbstractComparison.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * Used for the comparison of values. - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -abstract class AbstractComparison extends Constraint -{ - public $message; - public $value; - public $propertyPath; - - /** - * {@inheritdoc} - * - * @param mixed $value the value to compare or a set of options - */ - public function __construct($value = null, $propertyPath = null, string $message = null, array $groups = null, $payload = null, array $options = []) - { - if (\is_array($value)) { - $options = array_merge($value, $options); - } elseif (null !== $value) { - $options['value'] = $value; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->propertyPath = $propertyPath ?? $this->propertyPath; - - if (null === $this->value && null === $this->propertyPath) { - throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', static::class)); - } - - if (null !== $this->value && null !== $this->propertyPath) { - throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', static::class)); - } - - if (null !== $this->propertyPath && !class_exists(PropertyAccess::class)) { - throw new LogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', static::class)); - } - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'value'; - } -} diff --git a/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php b/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php deleted file mode 100644 index c3a117d..0000000 --- a/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * Provides a base class for the validation of property comparisons. - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -abstract class AbstractComparisonValidator extends ConstraintValidator -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof AbstractComparison) { - throw new UnexpectedTypeException($constraint, AbstractComparison::class); - } - - if (null === $value) { - return; - } - - if ($path = $constraint->propertyPath) { - if (null === $object = $this->context->getObject()) { - return; - } - - try { - $comparedValue = $this->getPropertyAccessor()->getValue($object, $path); - } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e); - } - } else { - $comparedValue = $constraint->value; - } - - // Convert strings to DateTimes if comparing another DateTime - // This allows to compare with any date/time value supported by - // the DateTime constructor: - // https://php.net/datetime.formats - if (\is_string($comparedValue) && $value instanceof \DateTimeInterface) { - // If $value is immutable, convert the compared value to a DateTimeImmutable too, otherwise use DateTime - $dateTimeClass = $value instanceof \DateTimeImmutable ? \DateTimeImmutable::class : \DateTime::class; - - try { - $comparedValue = new $dateTimeClass($comparedValue); - } catch (\Exception $e) { - throw new ConstraintDefinitionException(sprintf('The compared value "%s" could not be converted to a "%s" instance in the "%s" constraint.', $comparedValue, $dateTimeClass, get_debug_type($constraint))); - } - } - - if (!$this->compareValues($value, $comparedValue)) { - $violationBuilder = $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING | self::PRETTY_DATE)) - ->setParameter('{{ compared_value }}', $this->formatValue($comparedValue, self::OBJECT_TO_STRING | self::PRETTY_DATE)) - ->setParameter('{{ compared_value_type }}', $this->formatTypeOf($comparedValue)) - ->setCode($this->getErrorCode()); - - if (null !== $path) { - $violationBuilder->setParameter('{{ compared_value_path }}', $path); - } - - $violationBuilder->addViolation(); - } - } - - private function getPropertyAccessor(): PropertyAccessorInterface - { - if (null === $this->propertyAccessor) { - $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); - } - - return $this->propertyAccessor; - } - - /** - * Compares the two given values to find if their relationship is valid. - * - * @param mixed $value1 The first value to compare - * @param mixed $value2 The second value to compare - * - * @return bool - */ - abstract protected function compareValues($value1, $value2); - - /** - * Returns the error code used if the comparison fails. - * - * @return string|null - */ - protected function getErrorCode() - { - return null; - } -} diff --git a/vendor/symfony/validator/Constraints/All.php b/vendor/symfony/validator/Constraints/All.php deleted file mode 100644 index 5b42976..0000000 --- a/vendor/symfony/validator/Constraints/All.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class All extends Composite -{ - public $constraints = []; - - public function __construct($constraints = null, array $groups = null, $payload = null) - { - parent::__construct($constraints ?? [], $groups, $payload); - } - - public function getDefaultOption() - { - return 'constraints'; - } - - public function getRequiredOptions() - { - return ['constraints']; - } - - protected function getCompositeOption() - { - return 'constraints'; - } -} diff --git a/vendor/symfony/validator/Constraints/AllValidator.php b/vendor/symfony/validator/Constraints/AllValidator.php deleted file mode 100644 index 611ac8d..0000000 --- a/vendor/symfony/validator/Constraints/AllValidator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class AllValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof All) { - throw new UnexpectedTypeException($constraint, All::class); - } - - if (null === $value) { - return; - } - - if (!\is_array($value) && !$value instanceof \Traversable) { - throw new UnexpectedValueException($value, 'iterable'); - } - - $context = $this->context; - - $validator = $context->getValidator()->inContext($context); - - foreach ($value as $key => $element) { - $validator->atPath('['.$key.']')->validate($element, $constraint->constraints); - } - } -} diff --git a/vendor/symfony/validator/Constraints/AtLeastOneOf.php b/vendor/symfony/validator/Constraints/AtLeastOneOf.php deleted file mode 100644 index f01ed9c..0000000 --- a/vendor/symfony/validator/Constraints/AtLeastOneOf.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Przemysław Bogusz - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AtLeastOneOf extends Composite -{ - public const AT_LEAST_ONE_OF_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c'; - - protected static $errorNames = [ - self::AT_LEAST_ONE_OF_ERROR => 'AT_LEAST_ONE_OF_ERROR', - ]; - - public $constraints = []; - public $message = 'This value should satisfy at least one of the following constraints:'; - public $messageCollection = 'Each element of this collection should satisfy its own set of constraints.'; - public $includeInternalMessages = true; - - public function __construct($constraints = null, array $groups = null, $payload = null, string $message = null, string $messageCollection = null, bool $includeInternalMessages = null) - { - parent::__construct($constraints ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - $this->messageCollection = $messageCollection ?? $this->messageCollection; - $this->includeInternalMessages = $includeInternalMessages ?? $this->includeInternalMessages; - } - - public function getDefaultOption() - { - return 'constraints'; - } - - public function getRequiredOptions() - { - return ['constraints']; - } - - protected function getCompositeOption() - { - return 'constraints'; - } -} diff --git a/vendor/symfony/validator/Constraints/AtLeastOneOfValidator.php b/vendor/symfony/validator/Constraints/AtLeastOneOfValidator.php deleted file mode 100644 index 9555851..0000000 --- a/vendor/symfony/validator/Constraints/AtLeastOneOfValidator.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Przemysław Bogusz - */ -class AtLeastOneOfValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof AtLeastOneOf) { - throw new UnexpectedTypeException($constraint, AtLeastOneOf::class); - } - - $validator = $this->context->getValidator(); - - $messages = [$constraint->message]; - - foreach ($constraint->constraints as $key => $item) { - $executionContext = clone $this->context; - $executionContext->setNode($value, $this->context->getObject(), $this->context->getMetadata(), $this->context->getPropertyPath()); - $violations = $validator->inContext($executionContext)->validate($value, $item, $this->context->getGroup())->getViolations(); - - if (\count($this->context->getViolations()) === \count($violations)) { - return; - } - - if ($constraint->includeInternalMessages) { - $message = ' ['.($key + 1).'] '; - - if ($item instanceof All || $item instanceof Collection) { - $message .= $constraint->messageCollection; - } else { - $message .= $violations->get(\count($violations) - 1)->getMessage(); - } - - $messages[] = $message; - } - } - - $this->context->buildViolation(implode('', $messages)) - ->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR) - ->addViolation() - ; - } -} diff --git a/vendor/symfony/validator/Constraints/Bic.php b/vendor/symfony/validator/Constraints/Bic.php deleted file mode 100644 index 1cd98b4..0000000 --- a/vendor/symfony/validator/Constraints/Bic.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Countries; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyPathInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Michael Hirschler - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Bic extends Constraint -{ - public const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; - public const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; - public const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; - public const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; - public const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; - public const INVALID_IBAN_COUNTRY_CODE_ERROR = '29a2c3bb-587b-4996-b6f5-53081364cea5'; - - protected static $errorNames = [ - self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::INVALID_BANK_CODE_ERROR => 'INVALID_BANK_CODE_ERROR', - self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', - self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', - ]; - - public $message = 'This is not a valid Business Identifier Code (BIC).'; - public $ibanMessage = 'This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.'; - public $iban; - public $ibanPropertyPath; - - /** - * {@inheritdoc} - * - * @param string|PropertyPathInterface|null $ibanPropertyPath - */ - public function __construct(array $options = null, string $message = null, string $iban = null, $ibanPropertyPath = null, string $ibanMessage = null, array $groups = null, $payload = null) - { - if (!class_exists(Countries::class)) { - throw new LogicException('The Intl component is required to use the Bic constraint. Try running "composer require symfony/intl".'); - } - if (null !== $ibanPropertyPath && !\is_string($ibanPropertyPath) && !$ibanPropertyPath instanceof PropertyPathInterface) { - throw new \TypeError(sprintf('"%s": Expected argument $ibanPropertyPath to be either null, a string or an instance of "%s", got "%s".', __METHOD__, PropertyPathInterface::class, get_debug_type($ibanPropertyPath))); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->ibanMessage = $ibanMessage ?? $this->ibanMessage; - $this->iban = $iban ?? $this->iban; - $this->ibanPropertyPath = $ibanPropertyPath ?? $this->ibanPropertyPath; - - if (null !== $this->iban && null !== $this->ibanPropertyPath) { - throw new ConstraintDefinitionException('The "iban" and "ibanPropertyPath" options of the Iban constraint cannot be used at the same time.'); - } - - if (null !== $this->ibanPropertyPath && !class_exists(PropertyAccess::class)) { - throw new LogicException(sprintf('The "symfony/property-access" component is required to use the "%s" constraint with the "ibanPropertyPath" option.', self::class)); - } - } -} diff --git a/vendor/symfony/validator/Constraints/BicValidator.php b/vendor/symfony/validator/Constraints/BicValidator.php deleted file mode 100644 index ff87b6e..0000000 --- a/vendor/symfony/validator/Constraints/BicValidator.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Countries; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessor; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\LogicException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Michael Hirschler - * - * @see https://en.wikipedia.org/wiki/ISO_9362#Structure - */ -class BicValidator extends ConstraintValidator -{ - private const BIC_COUNTRY_TO_IBAN_COUNTRY_MAP = [ - // Reference: https://www.ecbs.org/iban/france-bank-account-number.html - 'GF' => 'FR', // French Guiana - 'PF' => 'FR', // French Polynesia - 'TF' => 'FR', // French Southern Territories - 'GP' => 'FR', // Guadeloupe - 'MQ' => 'FR', // Martinique - 'YT' => 'FR', // Mayotte - 'NC' => 'FR', // New Caledonia - 'RE' => 'FR', // Reunion - 'PM' => 'FR', // Saint Pierre and Miquelon - 'WF' => 'FR', // Wallis and Futuna Islands - // Reference: https://www.ecbs.org/iban/united-kingdom-uk-bank-account-number.html - 'JE' => 'GB', // Jersey - 'IM' => 'GB', // Isle of Man - 'GG' => 'GB', // Guernsey - 'VG' => 'GB', // British Virgin Islands - ]; - - private $propertyAccessor; - - public function __construct(PropertyAccessor $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Bic) { - throw new UnexpectedTypeException($constraint, Bic::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $canonicalize = str_replace(' ', '', $value); - - // the bic must be either 8 or 11 characters long - if (!\in_array(\strlen($canonicalize), [8, 11])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Bic::INVALID_LENGTH_ERROR) - ->addViolation(); - - return; - } - - // must contain alphanumeric values only - if (!ctype_alnum($canonicalize)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Bic::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - // first 4 letters must be alphabetic (bank code) - if (!ctype_alpha(substr($canonicalize, 0, 4))) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Bic::INVALID_BANK_CODE_ERROR) - ->addViolation(); - - return; - } - - if (!Countries::exists(substr($canonicalize, 4, 2))) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Bic::INVALID_COUNTRY_CODE_ERROR) - ->addViolation(); - - return; - } - - // should contain uppercase characters only - if (strtoupper($canonicalize) !== $canonicalize) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Bic::INVALID_CASE_ERROR) - ->addViolation(); - - return; - } - - // check against an IBAN - $iban = $constraint->iban; - $path = $constraint->ibanPropertyPath; - if ($path && null !== $object = $this->context->getObject()) { - try { - $iban = $this->getPropertyAccessor()->getValue($object, $path); - } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e); - } - } - if (!$iban) { - return; - } - $ibanCountryCode = substr($iban, 0, 2); - if (ctype_alpha($ibanCountryCode) && !$this->bicAndIbanCountriesMatch(substr($canonicalize, 4, 2), $ibanCountryCode)) { - $this->context->buildViolation($constraint->ibanMessage) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setParameter('{{ iban }}', $iban) - ->setCode(Bic::INVALID_IBAN_COUNTRY_CODE_ERROR) - ->addViolation(); - } - } - - private function getPropertyAccessor(): PropertyAccessor - { - if (null === $this->propertyAccessor) { - if (!class_exists(PropertyAccess::class)) { - throw new LogicException('Unable to use property path as the Symfony PropertyAccess component is not installed.'); - } - $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); - } - - return $this->propertyAccessor; - } - - private function bicAndIbanCountriesMatch(string $bicCountryCode, string $ibanCountryCode): bool - { - return $ibanCountryCode === $bicCountryCode || $ibanCountryCode === (self::BIC_COUNTRY_TO_IBAN_COUNTRY_MAP[$bicCountryCode] ?? null); - } -} diff --git a/vendor/symfony/validator/Constraints/Blank.php b/vendor/symfony/validator/Constraints/Blank.php deleted file mode 100644 index a9ee525..0000000 --- a/vendor/symfony/validator/Constraints/Blank.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Blank extends Constraint -{ - public const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; - - protected static $errorNames = [ - self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', - ]; - - public $message = 'This value should be blank.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/BlankValidator.php b/vendor/symfony/validator/Constraints/BlankValidator.php deleted file mode 100644 index 3fd7fcc..0000000 --- a/vendor/symfony/validator/Constraints/BlankValidator.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class BlankValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Blank) { - throw new UnexpectedTypeException($constraint, Blank::class); - } - - if ('' !== $value && null !== $value) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Blank::NOT_BLANK_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Callback.php b/vendor/symfony/validator/Constraints/Callback.php deleted file mode 100644 index 7b9c3c3..0000000 --- a/vendor/symfony/validator/Constraints/Callback.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Callback extends Constraint -{ - /** - * @var string|callable - */ - public $callback; - - /** - * {@inheritdoc} - * - * @param array|string|callable $callback The callback or a set of options - */ - public function __construct($callback = null, array $groups = null, $payload = null, array $options = []) - { - // Invocation through annotations with an array parameter only - if (\is_array($callback) && 1 === \count($callback) && isset($callback['value'])) { - $callback = $callback['value']; - } - - if (!\is_array($callback) || (!isset($callback['callback']) && !isset($callback['groups']) && !isset($callback['payload']))) { - $options['callback'] = $callback; - } else { - $options = array_merge($callback, $options); - } - - parent::__construct($options, $groups, $payload); - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'callback'; - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; - } -} diff --git a/vendor/symfony/validator/Constraints/CallbackValidator.php b/vendor/symfony/validator/Constraints/CallbackValidator.php deleted file mode 100644 index 71cff2a..0000000 --- a/vendor/symfony/validator/Constraints/CallbackValidator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * Validator for Callback constraint. - * - * @author Bernhard Schussek - */ -class CallbackValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($object, Constraint $constraint) - { - if (!$constraint instanceof Callback) { - throw new UnexpectedTypeException($constraint, Callback::class); - } - - $method = $constraint->callback; - if ($method instanceof \Closure) { - $method($object, $this->context, $constraint->payload); - } elseif (\is_array($method)) { - if (!\is_callable($method)) { - if (isset($method[0]) && \is_object($method[0])) { - $method[0] = \get_class($method[0]); - } - throw new ConstraintDefinitionException(json_encode($method).' targeted by Callback constraint is not a valid callable.'); - } - - $method($object, $this->context, $constraint->payload); - } elseif (null !== $object) { - if (!method_exists($object, $method)) { - throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class "%s".', $method, get_debug_type($object))); - } - - $reflMethod = new \ReflectionMethod($object, $method); - - if ($reflMethod->isStatic()) { - $reflMethod->invoke(null, $object, $this->context, $constraint->payload); - } else { - $reflMethod->invoke($object, $this->context, $constraint->payload); - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/CardScheme.php b/vendor/symfony/validator/Constraints/CardScheme.php deleted file mode 100644 index e9d66b9..0000000 --- a/vendor/symfony/validator/Constraints/CardScheme.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * Metadata for the CardSchemeValidator. - * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Tim Nagel - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class CardScheme extends Constraint -{ - public const AMEX = 'AMEX'; - public const CHINA_UNIONPAY = 'CHINA_UNIONPAY'; - public const DINERS = 'DINERS'; - public const DISCOVER = 'DISCOVER'; - public const INSTAPAYMENT = 'INSTAPAYMENT'; - public const JCB = 'JCB'; - public const LASER = 'LASER'; - public const MAESTRO = 'MAESTRO'; - public const MASTERCARD = 'MASTERCARD'; - public const MIR = 'MIR'; - public const UATP = 'UATP'; - public const VISA = 'VISA'; - - public const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; - public const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; - - protected static $errorNames = [ - self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - ]; - - public $message = 'Unsupported card type or invalid card number.'; - public $schemes; - - /** - * {@inheritdoc} - * - * @param array|string $schemes The schemes to validate against or a set of options - */ - public function __construct($schemes, string $message = null, array $groups = null, $payload = null, array $options = []) - { - if (\is_array($schemes) && \is_string(key($schemes))) { - $options = array_merge($schemes, $options); - } else { - $options['value'] = $schemes; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } - - public function getDefaultOption() - { - return 'schemes'; - } - - public function getRequiredOptions() - { - return ['schemes']; - } -} diff --git a/vendor/symfony/validator/Constraints/CardSchemeValidator.php b/vendor/symfony/validator/Constraints/CardSchemeValidator.php deleted file mode 100644 index faef7ec..0000000 --- a/vendor/symfony/validator/Constraints/CardSchemeValidator.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * Validates that a card number belongs to a specified scheme. - * - * @author Tim Nagel - * @author Bernhard Schussek - * - * @see https://en.wikipedia.org/wiki/Payment_card_number - * @see https://www.regular-expressions.info/creditcard.html - */ -class CardSchemeValidator extends ConstraintValidator -{ - protected $schemes = [ - // American Express card numbers start with 34 or 37 and have 15 digits. - CardScheme::AMEX => [ - '/^3[47][0-9]{13}$/', - ], - // China UnionPay cards start with 62 and have between 16 and 19 digits. - // Please note that these cards do not follow Luhn Algorithm as a checksum. - CardScheme::CHINA_UNIONPAY => [ - '/^62[0-9]{14,17}$/', - ], - // Diners Club card numbers begin with 300 through 305, 36 or 38. All have 14 digits. - // There are Diners Club cards that begin with 5 and have 16 digits. - // These are a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard. - CardScheme::DINERS => [ - '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', - ], - // Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65. - // All have 16 digits. - CardScheme::DISCOVER => [ - '/^6011[0-9]{12}$/', - '/^64[4-9][0-9]{13}$/', - '/^65[0-9]{14}$/', - '/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/', - ], - // InstaPayment cards begin with 637 through 639 and have 16 digits. - CardScheme::INSTAPAYMENT => [ - '/^63[7-9][0-9]{13}$/', - ], - // JCB cards beginning with 2131 or 1800 have 15 digits. - // JCB cards beginning with 35 have 16 digits. - CardScheme::JCB => [ - '/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/', - ], - // Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits. - CardScheme::LASER => [ - '/^(6304|670[69]|6771)[0-9]{12,15}$/', - ], - // Maestro international cards begin with 675900..675999 and have between 12 and 19 digits. - // Maestro UK cards begin with either 500000..509999 or 560000..699999 and have between 12 and 19 digits. - CardScheme::MAESTRO => [ - '/^(6759[0-9]{2})[0-9]{6,13}$/', - '/^(50[0-9]{4})[0-9]{6,13}$/', - '/^5[6-9][0-9]{10,17}$/', - '/^6[0-9]{11,18}$/', - ], - // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. - // October 2016 MasterCard numbers can also start with 222100 through 272099. - CardScheme::MASTERCARD => [ - '/^5[1-5][0-9]{14}$/', - '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', - ], - // Payment system MIR numbers start with 220, then 1 digit from 0 to 4, then between 12 and 15 digits - CardScheme::MIR => [ - '/^220[0-4][0-9]{12,15}$/', - ], - // All UATP card numbers start with a 1 and have a length of 15 digits. - CardScheme::UATP => [ - '/^1[0-9]{14}$/', - ], - // All Visa card numbers start with a 4 and have a length of 13, 16, or 19 digits. - CardScheme::VISA => [ - '/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/', - ], - ]; - - /** - * Validates a creditcard belongs to a specified scheme. - * - * @param mixed $value - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof CardScheme) { - throw new UnexpectedTypeException($constraint, CardScheme::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_numeric($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(CardScheme::NOT_NUMERIC_ERROR) - ->addViolation(); - - return; - } - - $schemes = array_flip((array) $constraint->schemes); - $schemeRegexes = array_intersect_key($this->schemes, $schemes); - - foreach ($schemeRegexes as $regexes) { - foreach ($regexes as $regex) { - if (preg_match($regex, $value)) { - return; - } - } - } - - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(CardScheme::INVALID_FORMAT_ERROR) - ->addViolation(); - } -} diff --git a/vendor/symfony/validator/Constraints/Cascade.php b/vendor/symfony/validator/Constraints/Cascade.php deleted file mode 100644 index 2458d5c..0000000 --- a/vendor/symfony/validator/Constraints/Cascade.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @Annotation - * @Target({"CLASS"}) - * - * @author Jules Pietri - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class Cascade extends Constraint -{ - public function __construct(array $options = null) - { - if (\is_array($options) && \array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__)); - } - - parent::__construct($options); - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return self::CLASS_CONSTRAINT; - } -} diff --git a/vendor/symfony/validator/Constraints/Choice.php b/vendor/symfony/validator/Constraints/Choice.php deleted file mode 100644 index b5bcc6d..0000000 --- a/vendor/symfony/validator/Constraints/Choice.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Choice extends Constraint -{ - public const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; - public const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; - public const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; - - protected static $errorNames = [ - self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', - self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', - self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', - ]; - - public $choices; - public $callback; - public $multiple = false; - public $strict = true; - public $min; - public $max; - public $message = 'The value you selected is not a valid choice.'; - public $multipleMessage = 'One or more of the given values is invalid.'; - public $minMessage = 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.'; - public $maxMessage = 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'; - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'choices'; - } - - public function __construct( - $options = [], - array $choices = null, - $callback = null, - bool $multiple = null, - bool $strict = null, - int $min = null, - int $max = null, - string $message = null, - string $multipleMessage = null, - string $minMessage = null, - string $maxMessage = null, - $groups = null, - $payload = null - ) { - if (\is_array($options) && $options && array_is_list($options)) { - $choices = $choices ?? $options; - $options = []; - } - if (null !== $choices) { - $options['value'] = $choices; - } - - parent::__construct($options, $groups, $payload); - - $this->callback = $callback ?? $this->callback; - $this->multiple = $multiple ?? $this->multiple; - $this->strict = $strict ?? $this->strict; - $this->min = $min ?? $this->min; - $this->max = $max ?? $this->max; - $this->message = $message ?? $this->message; - $this->multipleMessage = $multipleMessage ?? $this->multipleMessage; - $this->minMessage = $minMessage ?? $this->minMessage; - $this->maxMessage = $maxMessage ?? $this->maxMessage; - } -} diff --git a/vendor/symfony/validator/Constraints/ChoiceValidator.php b/vendor/symfony/validator/Constraints/ChoiceValidator.php deleted file mode 100644 index a1c47a6..0000000 --- a/vendor/symfony/validator/Constraints/ChoiceValidator.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * ChoiceValidator validates that the value is one of the expected values. - * - * @author Fabien Potencier - * @author Florian Eckerstorfer - * @author Bernhard Schussek - */ -class ChoiceValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Choice) { - throw new UnexpectedTypeException($constraint, Choice::class); - } - - if (!\is_array($constraint->choices) && !$constraint->callback) { - throw new ConstraintDefinitionException('Either "choices" or "callback" must be specified on constraint Choice.'); - } - - if (null === $value) { - return; - } - - if ($constraint->multiple && !\is_array($value)) { - throw new UnexpectedValueException($value, 'array'); - } - - if ($constraint->callback) { - if (!\is_callable($choices = [$this->context->getObject(), $constraint->callback]) - && !\is_callable($choices = [$this->context->getClassName(), $constraint->callback]) - && !\is_callable($choices = $constraint->callback) - ) { - throw new ConstraintDefinitionException('The Choice constraint expects a valid callback.'); - } - $choices = $choices(); - } else { - $choices = $constraint->choices; - } - - if (true !== $constraint->strict) { - throw new \RuntimeException('The "strict" option of the Choice constraint should not be used.'); - } - - if ($constraint->multiple) { - foreach ($value as $_value) { - if (!\in_array($_value, $choices, true)) { - $this->context->buildViolation($constraint->multipleMessage) - ->setParameter('{{ value }}', $this->formatValue($_value)) - ->setParameter('{{ choices }}', $this->formatValues($choices)) - ->setCode(Choice::NO_SUCH_CHOICE_ERROR) - ->setInvalidValue($_value) - ->addViolation(); - - return; - } - } - - $count = \count($value); - - if (null !== $constraint->min && $count < $constraint->min) { - $this->context->buildViolation($constraint->minMessage) - ->setParameter('{{ limit }}', $constraint->min) - ->setPlural((int) $constraint->min) - ->setCode(Choice::TOO_FEW_ERROR) - ->addViolation(); - - return; - } - - if (null !== $constraint->max && $count > $constraint->max) { - $this->context->buildViolation($constraint->maxMessage) - ->setParameter('{{ limit }}', $constraint->max) - ->setPlural((int) $constraint->max) - ->setCode(Choice::TOO_MANY_ERROR) - ->addViolation(); - - return; - } - } elseif (!\in_array($value, $choices, true)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setParameter('{{ choices }}', $this->formatValues($choices)) - ->setCode(Choice::NO_SUCH_CHOICE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Cidr.php b/vendor/symfony/validator/Constraints/Cidr.php deleted file mode 100644 index 387c599..0000000 --- a/vendor/symfony/validator/Constraints/Cidr.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * Validates that a value is a valid CIDR notation. - * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Sorin Pop - * @author Calin Bolea - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Cidr extends Constraint -{ - public const INVALID_CIDR_ERROR = '5649e53a-5afb-47c5-a360-ffbab3be8567'; - public const OUT_OF_RANGE_ERROR = 'b9f14a51-acbd-401a-a078-8c6b204ab32f'; - - protected static $errorNames = [ - self::INVALID_CIDR_ERROR => 'INVALID_CIDR_ERROR', - self::OUT_OF_RANGE_ERROR => 'OUT_OF_RANGE_VIOLATION', - ]; - - private const NET_MAXES = [ - Ip::ALL => 128, - Ip::V4 => 32, - Ip::V6 => 128, - ]; - - public $version = Ip::ALL; - - public $message = 'This value is not a valid CIDR notation.'; - - public $netmaskRangeViolationMessage = 'The value of the netmask should be between {{ min }} and {{ max }}.'; - - public $netmaskMin = 0; - - public $netmaskMax; - - public function __construct( - array $options = null, - string $version = null, - int $netmaskMin = null, - int $netmaskMax = null, - string $message = null, - array $groups = null, - $payload = null - ) { - $this->version = $version ?? $options['version'] ?? $this->version; - - if (!\in_array($this->version, array_keys(self::NET_MAXES))) { - throw new ConstraintDefinitionException(sprintf('The option "version" must be one of "%s".', implode('", "', array_keys(self::NET_MAXES)))); - } - - $this->netmaskMin = $netmaskMin ?? $options['netmaskMin'] ?? $this->netmaskMin; - $this->netmaskMax = $netmaskMax ?? $options['netmaskMax'] ?? self::NET_MAXES[$this->version]; - $this->message = $message ?? $this->message; - - unset($options['netmaskMin'], $options['netmaskMax'], $options['version']); - - if ($this->netmaskMin < 0 || $this->netmaskMax > self::NET_MAXES[$this->version] || $this->netmaskMin > $this->netmaskMax) { - throw new ConstraintDefinitionException(sprintf('The netmask range must be between 0 and %d.', self::NET_MAXES[$this->version])); - } - - parent::__construct($options, $groups, $payload); - } -} diff --git a/vendor/symfony/validator/Constraints/CidrValidator.php b/vendor/symfony/validator/Constraints/CidrValidator.php deleted file mode 100644 index c90ebcf..0000000 --- a/vendor/symfony/validator/Constraints/CidrValidator.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -class CidrValidator extends ConstraintValidator -{ - public function validate($value, Constraint $constraint): void - { - if (!$constraint instanceof Cidr) { - throw new UnexpectedTypeException($constraint, Cidr::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!\is_string($value)) { - throw new UnexpectedValueException($value, 'string'); - } - - $cidrParts = explode('/', $value, 2); - - if (!isset($cidrParts[1]) - || !ctype_digit($cidrParts[1]) - || '' === $cidrParts[0] - ) { - $this->context - ->buildViolation($constraint->message) - ->setCode(Cidr::INVALID_CIDR_ERROR) - ->addViolation(); - - return; - } - - $ipAddress = $cidrParts[0]; - $netmask = (int) $cidrParts[1]; - - $validV4 = Ip::V6 !== $constraint->version - && filter_var($ipAddress, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) - && $netmask <= 32; - - $validV6 = Ip::V4 !== $constraint->version - && filter_var($ipAddress, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6); - - if (!$validV4 && !$validV6) { - $this->context - ->buildViolation($constraint->message) - ->setCode(Cidr::INVALID_CIDR_ERROR) - ->addViolation(); - - return; - } - - if ($netmask < $constraint->netmaskMin || $netmask > $constraint->netmaskMax) { - $this->context - ->buildViolation($constraint->netmaskRangeViolationMessage) - ->setParameter('{{ min }}', $constraint->netmaskMin) - ->setParameter('{{ max }}', $constraint->netmaskMax) - ->setCode(Cidr::OUT_OF_RANGE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Collection.php b/vendor/symfony/validator/Constraints/Collection.php deleted file mode 100644 index 3f4adb5..0000000 --- a/vendor/symfony/validator/Constraints/Collection.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Collection extends Composite -{ - public const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; - public const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; - - protected static $errorNames = [ - self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', - self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR', - ]; - - public $fields = []; - public $allowExtraFields = false; - public $allowMissingFields = false; - public $extraFieldsMessage = 'This field was not expected.'; - public $missingFieldsMessage = 'This field is missing.'; - - /** - * {@inheritdoc} - */ - public function __construct($fields = null, array $groups = null, $payload = null, bool $allowExtraFields = null, bool $allowMissingFields = null, string $extraFieldsMessage = null, string $missingFieldsMessage = null) - { - // no known options set? $fields is the fields array - if (\is_array($fields) - && !array_intersect(array_keys($fields), ['groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'])) { - $fields = ['fields' => $fields]; - } - - parent::__construct($fields, $groups, $payload); - - $this->allowExtraFields = $allowExtraFields ?? $this->allowExtraFields; - $this->allowMissingFields = $allowMissingFields ?? $this->allowMissingFields; - $this->extraFieldsMessage = $extraFieldsMessage ?? $this->extraFieldsMessage; - $this->missingFieldsMessage = $missingFieldsMessage ?? $this->missingFieldsMessage; - } - - /** - * {@inheritdoc} - */ - protected function initializeNestedConstraints() - { - parent::initializeNestedConstraints(); - - if (!\is_array($this->fields)) { - throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint "%s".', __CLASS__)); - } - - foreach ($this->fields as $fieldName => $field) { - // the XmlFileLoader and YamlFileLoader pass the field Optional - // and Required constraint as an array with exactly one element - if (\is_array($field) && 1 == \count($field)) { - $this->fields[$fieldName] = $field = $field[0]; - } - - if (!$field instanceof Optional && !$field instanceof Required) { - $this->fields[$fieldName] = new Required($field); - } - } - } - - public function getRequiredOptions() - { - return ['fields']; - } - - protected function getCompositeOption() - { - return 'fields'; - } -} diff --git a/vendor/symfony/validator/Constraints/CollectionValidator.php b/vendor/symfony/validator/Constraints/CollectionValidator.php deleted file mode 100644 index 7cea7d0..0000000 --- a/vendor/symfony/validator/Constraints/CollectionValidator.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class CollectionValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Collection) { - throw new UnexpectedTypeException($constraint, Collection::class); - } - - if (null === $value) { - return; - } - - if (!\is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) { - throw new UnexpectedValueException($value, 'array|(Traversable&ArrayAccess)'); - } - - // We need to keep the initialized context when CollectionValidator - // calls itself recursively (Collection constraints can be nested). - // Since the context of the validator is overwritten when initialize() - // is called for the nested constraint, the outer validator is - // acting on the wrong context when the nested validation terminates. - // - // A better solution - which should be approached in Symfony 3.0 - is to - // remove the initialize() method and pass the context as last argument - // to validate() instead. - $context = $this->context; - - foreach ($constraint->fields as $field => $fieldConstraint) { - // bug fix issue #2779 - $existsInArray = \is_array($value) && \array_key_exists($field, $value); - $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field); - - if ($existsInArray || $existsInArrayAccess) { - if (\count($fieldConstraint->constraints) > 0) { - $context->getValidator() - ->inContext($context) - ->atPath('['.$field.']') - ->validate($value[$field], $fieldConstraint->constraints); - } - } elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) { - $context->buildViolation($constraint->missingFieldsMessage) - ->atPath('['.$field.']') - ->setParameter('{{ field }}', $this->formatValue($field)) - ->setInvalidValue(null) - ->setCode(Collection::MISSING_FIELD_ERROR) - ->addViolation(); - } - } - - if (!$constraint->allowExtraFields) { - foreach ($value as $field => $fieldValue) { - if (!isset($constraint->fields[$field])) { - $context->buildViolation($constraint->extraFieldsMessage) - ->atPath('['.$field.']') - ->setParameter('{{ field }}', $this->formatValue($field)) - ->setInvalidValue($fieldValue) - ->setCode(Collection::NO_SUCH_FIELD_ERROR) - ->addViolation(); - } - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/Composite.php b/vendor/symfony/validator/Constraints/Composite.php deleted file mode 100644 index 2f6eadf..0000000 --- a/vendor/symfony/validator/Constraints/Composite.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * A constraint that is composed of other constraints. - * - * You should never use the nested constraint instances anywhere else, because - * their groups are adapted when passed to the constructor of this class. - * - * If you want to create your own composite constraint, extend this class and - * let {@link getCompositeOption()} return the name of the property which - * contains the nested constraints. - * - * @author Bernhard Schussek - */ -abstract class Composite extends Constraint -{ - /** - * {@inheritdoc} - * - * The groups of the composite and its nested constraints are made - * consistent using the following strategy: - * - * - If groups are passed explicitly to the composite constraint, but - * not to the nested constraints, the options of the composite - * constraint are copied to the nested constraints; - * - * - If groups are passed explicitly to the nested constraints, but not - * to the composite constraint, the groups of all nested constraints - * are merged and used as groups for the composite constraint; - * - * - If groups are passed explicitly to both the composite and its nested - * constraints, the groups of the nested constraints must be a subset - * of the groups of the composite constraint. If not, a - * {@link ConstraintDefinitionException} is thrown. - * - * All this is done in the constructor, because constraints can then be - * cached. When constraints are loaded from the cache, no more group - * checks need to be done. - */ - public function __construct($options = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->initializeNestedConstraints(); - - /* @var Constraint[] $nestedConstraints */ - $compositeOption = $this->getCompositeOption(); - $nestedConstraints = $this->$compositeOption; - - if (!\is_array($nestedConstraints)) { - $nestedConstraints = [$nestedConstraints]; - } - - foreach ($nestedConstraints as $constraint) { - if (!$constraint instanceof Constraint) { - if (\is_object($constraint)) { - $constraint = \get_class($constraint); - } - - throw new ConstraintDefinitionException(sprintf('The value "%s" is not an instance of Constraint in constraint "%s".', $constraint, static::class)); - } - - if ($constraint instanceof Valid) { - throw new ConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint "%s". You can only declare the Valid constraint directly on a field or method.', static::class)); - } - } - - if (!isset(((array) $this)['groups'])) { - $mergedGroups = []; - - foreach ($nestedConstraints as $constraint) { - foreach ($constraint->groups as $group) { - $mergedGroups[$group] = true; - } - } - - // prevent empty composite constraint to have empty groups - $this->groups = array_keys($mergedGroups) ?: [self::DEFAULT_GROUP]; - $this->$compositeOption = $nestedConstraints; - - return; - } - - foreach ($nestedConstraints as $constraint) { - if (isset(((array) $constraint)['groups'])) { - $excessGroups = array_diff($constraint->groups, $this->groups); - - if (\count($excessGroups) > 0) { - throw new ConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint "%s" should also be passed to its containing constraint "%s".', implode('", "', $excessGroups), get_debug_type($constraint), static::class)); - } - } else { - $constraint->groups = $this->groups; - } - } - - $this->$compositeOption = $nestedConstraints; - } - - /** - * {@inheritdoc} - * - * Implicit group names are forwarded to nested constraints. - */ - public function addImplicitGroupName(string $group) - { - parent::addImplicitGroupName($group); - - /** @var Constraint[] $nestedConstraints */ - $nestedConstraints = $this->{$this->getCompositeOption()}; - - foreach ($nestedConstraints as $constraint) { - $constraint->addImplicitGroupName($group); - } - } - - /** - * Returns the name of the property that contains the nested constraints. - * - * @return string - */ - abstract protected function getCompositeOption(); - - /** - * @internal Used by metadata - * - * @return Constraint[] - */ - public function getNestedConstraints() - { - /* @var Constraint[] $nestedConstraints */ - return $this->{$this->getCompositeOption()}; - } - - /** - * Initializes the nested constraints. - * - * This method can be overwritten in subclasses to clean up the nested - * constraints passed to the constructor. - * - * @see Collection::initializeNestedConstraints() - */ - protected function initializeNestedConstraints() - { - } -} diff --git a/vendor/symfony/validator/Constraints/Compound.php b/vendor/symfony/validator/Constraints/Compound.php deleted file mode 100644 index 54dcd6c..0000000 --- a/vendor/symfony/validator/Constraints/Compound.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * Extend this class to create a reusable set of constraints. - * - * @author Maxime Steinhausser - */ -abstract class Compound extends Composite -{ - /** @var Constraint[] */ - public $constraints = []; - - public function __construct($options = null) - { - if (isset($options[$this->getCompositeOption()])) { - throw new ConstraintDefinitionException(sprintf('You can\'t redefine the "%s" option. Use the "%s::getConstraints()" method instead.', $this->getCompositeOption(), __CLASS__)); - } - - $this->constraints = $this->getConstraints($this->normalizeOptions($options)); - - parent::__construct($options); - } - - final protected function getCompositeOption(): string - { - return 'constraints'; - } - - final public function validatedBy(): string - { - return CompoundValidator::class; - } - - /** - * @return Constraint[] - */ - abstract protected function getConstraints(array $options): array; -} diff --git a/vendor/symfony/validator/Constraints/CompoundValidator.php b/vendor/symfony/validator/Constraints/CompoundValidator.php deleted file mode 100644 index 2ba993f..0000000 --- a/vendor/symfony/validator/Constraints/CompoundValidator.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Maxime Steinhausser - */ -class CompoundValidator extends ConstraintValidator -{ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Compound) { - throw new UnexpectedTypeException($constraint, Compound::class); - } - - $context = $this->context; - - $validator = $context->getValidator()->inContext($context); - - $validator->validate($value, $constraint->constraints); - } -} diff --git a/vendor/symfony/validator/Constraints/Count.php b/vendor/symfony/validator/Constraints/Count.php deleted file mode 100644 index 0d75903..0000000 --- a/vendor/symfony/validator/Constraints/Count.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\MissingOptionsException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Count extends Constraint -{ - public const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; - public const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; - public const NOT_EQUAL_COUNT_ERROR = '9fe5d43f-3784-4ece-a0e1-473fc02dadbc'; - public const NOT_DIVISIBLE_BY_ERROR = DivisibleBy::NOT_DIVISIBLE_BY; - - protected static $errorNames = [ - self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', - self::TOO_MANY_ERROR => 'TOO_MANY_ERROR', - self::NOT_EQUAL_COUNT_ERROR => 'NOT_EQUAL_COUNT_ERROR', - self::NOT_DIVISIBLE_BY_ERROR => 'NOT_DIVISIBLE_BY_ERROR', - ]; - - public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'; - public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'; - public $exactMessage = 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.'; - public $divisibleByMessage = 'The number of elements in this collection should be a multiple of {{ compared_value }}.'; - public $min; - public $max; - public $divisibleBy; - - /** - * {@inheritdoc} - * - * @param int|array|null $exactly The expected exact count or a set of options - */ - public function __construct( - $exactly = null, - int $min = null, - int $max = null, - int $divisibleBy = null, - string $exactMessage = null, - string $minMessage = null, - string $maxMessage = null, - string $divisibleByMessage = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (\is_array($exactly)) { - $options = array_merge($exactly, $options); - $exactly = $options['value'] ?? null; - } - - $min = $min ?? $options['min'] ?? null; - $max = $max ?? $options['max'] ?? null; - - unset($options['value'], $options['min'], $options['max']); - - if (null !== $exactly && null === $min && null === $max) { - $min = $max = $exactly; - } - - parent::__construct($options, $groups, $payload); - - $this->min = $min; - $this->max = $max; - $this->divisibleBy = $divisibleBy ?? $this->divisibleBy; - $this->exactMessage = $exactMessage ?? $this->exactMessage; - $this->minMessage = $minMessage ?? $this->minMessage; - $this->maxMessage = $maxMessage ?? $this->maxMessage; - $this->divisibleByMessage = $divisibleByMessage ?? $this->divisibleByMessage; - - if (null === $this->min && null === $this->max && null === $this->divisibleBy) { - throw new MissingOptionsException(sprintf('Either option "min", "max" or "divisibleBy" must be given for constraint "%s".', __CLASS__), ['min', 'max', 'divisibleBy']); - } - } -} diff --git a/vendor/symfony/validator/Constraints/CountValidator.php b/vendor/symfony/validator/Constraints/CountValidator.php deleted file mode 100644 index ff991ac..0000000 --- a/vendor/symfony/validator/Constraints/CountValidator.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class CountValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Count) { - throw new UnexpectedTypeException($constraint, Count::class); - } - - if (null === $value) { - return; - } - - if (!\is_array($value) && !$value instanceof \Countable) { - throw new UnexpectedValueException($value, 'array|\Countable'); - } - - $count = \count($value); - - if (null !== $constraint->max && $count > $constraint->max) { - $exactlyOptionEnabled = $constraint->min == $constraint->max; - - $this->context->buildViolation($exactlyOptionEnabled ? $constraint->exactMessage : $constraint->maxMessage) - ->setParameter('{{ count }}', $count) - ->setParameter('{{ limit }}', $constraint->max) - ->setInvalidValue($value) - ->setPlural((int) $constraint->max) - ->setCode($exactlyOptionEnabled ? Count::NOT_EQUAL_COUNT_ERROR : Count::TOO_MANY_ERROR) - ->addViolation(); - - return; - } - - if (null !== $constraint->min && $count < $constraint->min) { - $exactlyOptionEnabled = $constraint->min == $constraint->max; - - $this->context->buildViolation($exactlyOptionEnabled ? $constraint->exactMessage : $constraint->minMessage) - ->setParameter('{{ count }}', $count) - ->setParameter('{{ limit }}', $constraint->min) - ->setInvalidValue($value) - ->setPlural((int) $constraint->min) - ->setCode($exactlyOptionEnabled ? Count::NOT_EQUAL_COUNT_ERROR : Count::TOO_FEW_ERROR) - ->addViolation(); - - return; - } - - if (null !== $constraint->divisibleBy) { - $this->context - ->getValidator() - ->inContext($this->context) - ->validate($count, [ - new DivisibleBy([ - 'value' => $constraint->divisibleBy, - 'message' => $constraint->divisibleByMessage, - ]), - ], $this->context->getGroup()); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Country.php b/vendor/symfony/validator/Constraints/Country.php deleted file mode 100644 index ccd815c..0000000 --- a/vendor/symfony/validator/Constraints/Country.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Countries; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Country extends Constraint -{ - public const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; - - protected static $errorNames = [ - self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', - ]; - - public $message = 'This value is not a valid country.'; - public $alpha3 = false; - - public function __construct( - array $options = null, - string $message = null, - bool $alpha3 = null, - array $groups = null, - $payload = null - ) { - if (!class_exists(Countries::class)) { - throw new LogicException('The Intl component is required to use the Country constraint. Try running "composer require symfony/intl".'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->alpha3 = $alpha3 ?? $this->alpha3; - } -} diff --git a/vendor/symfony/validator/Constraints/CountryValidator.php b/vendor/symfony/validator/Constraints/CountryValidator.php deleted file mode 100644 index 895cca3..0000000 --- a/vendor/symfony/validator/Constraints/CountryValidator.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Countries; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid country code. - * - * @author Bernhard Schussek - */ -class CountryValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Country) { - throw new UnexpectedTypeException($constraint, Country::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if ($constraint->alpha3 ? !Countries::alpha3CodeExists($value) : !Countries::exists($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Country::NO_SUCH_COUNTRY_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/CssColor.php b/vendor/symfony/validator/Constraints/CssColor.php deleted file mode 100644 index e1510da..0000000 --- a/vendor/symfony/validator/Constraints/CssColor.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Mathieu Santostefano - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class CssColor extends Constraint -{ - public const HEX_LONG = 'hex_long'; - public const HEX_LONG_WITH_ALPHA = 'hex_long_with_alpha'; - public const HEX_SHORT = 'hex_short'; - public const HEX_SHORT_WITH_ALPHA = 'hex_short_with_alpha'; - public const BASIC_NAMED_COLORS = 'basic_named_colors'; - public const EXTENDED_NAMED_COLORS = 'extended_named_colors'; - public const SYSTEM_COLORS = 'system_colors'; - public const KEYWORDS = 'keywords'; - public const RGB = 'rgb'; - public const RGBA = 'rgba'; - public const HSL = 'hsl'; - public const HSLA = 'hsla'; - public const INVALID_FORMAT_ERROR = '454ab47b-aacf-4059-8f26-184b2dc9d48d'; - - protected static $errorNames = [ - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - ]; - - /** - * @var string[] - */ - private static $validationModes = [ - self::HEX_LONG, - self::HEX_LONG_WITH_ALPHA, - self::HEX_SHORT, - self::HEX_SHORT_WITH_ALPHA, - self::BASIC_NAMED_COLORS, - self::EXTENDED_NAMED_COLORS, - self::SYSTEM_COLORS, - self::KEYWORDS, - self::RGB, - self::RGBA, - self::HSL, - self::HSLA, - ]; - - public $message = 'This value is not a valid CSS color.'; - public $formats; - - /** - * @param array|string $formats The types of CSS colors allowed (e.g. hexadecimal only, RGB and HSL only, etc.). - */ - public function __construct($formats = [], string $message = null, array $groups = null, $payload = null, array $options = null) - { - $validationModesAsString = implode(', ', self::$validationModes); - - if (!$formats) { - $options['value'] = self::$validationModes; - } elseif (\is_array($formats) && \is_string(key($formats))) { - $options = array_merge($formats, $options ?? []); - } elseif (\is_array($formats)) { - if ([] === array_intersect(self::$validationModes, $formats)) { - throw new InvalidArgumentException(sprintf('The "formats" parameter value is not valid. It must contain one or more of the following values: "%s".', $validationModesAsString)); - } - - $options['value'] = $formats; - } elseif (\is_string($formats)) { - if (!\in_array($formats, self::$validationModes)) { - throw new InvalidArgumentException(sprintf('The "formats" parameter value is not valid. It must contain one or more of the following values: "%s".', $validationModesAsString)); - } - - $options['value'] = [$formats]; - } else { - throw new InvalidArgumentException('The "formats" parameter type is not valid. It should be a string or an array.'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } - - public function getDefaultOption(): string - { - return 'formats'; - } - - public function getRequiredOptions(): array - { - return ['formats']; - } -} diff --git a/vendor/symfony/validator/Constraints/CssColorValidator.php b/vendor/symfony/validator/Constraints/CssColorValidator.php deleted file mode 100644 index b34ef93..0000000 --- a/vendor/symfony/validator/Constraints/CssColorValidator.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Mathieu Santostefano - */ -class CssColorValidator extends ConstraintValidator -{ - private const PATTERN_HEX_LONG = '/^#[0-9a-f]{6}$/i'; - private const PATTERN_HEX_LONG_WITH_ALPHA = '/^#[0-9a-f]{8}$/i'; - private const PATTERN_HEX_SHORT = '/^#[0-9a-f]{3}$/i'; - private const PATTERN_HEX_SHORT_WITH_ALPHA = '/^#[0-9a-f]{4}$/i'; - // List comes from https://www.w3.org/wiki/CSS/Properties/color/keywords#Basic_Colors - private const PATTERN_BASIC_NAMED_COLORS = '/^(black|silver|gray|white|maroon|red|purple|fuchsia|green|lime|olive|yellow|navy|blue|teal|aqua)$/i'; - // List comes from https://www.w3.org/wiki/CSS/Properties/color/keywords#Extended_colors - private const PATTERN_EXTENDED_NAMED_COLORS = '/^(aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$/i'; - // List comes from https://drafts.csswg.org/css-color/#css-system-colors - private const PATTERN_SYSTEM_COLORS = '/^(Canvas|CanvasText|LinkText|VisitedText|ActiveText|ButtonFace|ButtonText|ButtonBorder|Field|FieldText|Highlight|HighlightText|SelectedItem|SelectedItemText|Mark|MarkText|GrayText)$/i'; - private const PATTERN_KEYWORDS = '/^(transparent|currentColor)$/i'; - private const PATTERN_RGB = '/^rgb\(\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d)\s*\)$/i'; - private const PATTERN_RGBA = '/^rgba\(\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),\s*(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),\s*(0|0?\.\d+|1(\.0)?)\s*\)$/i'; - private const PATTERN_HSL = '/^hsl\(\s*(0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),\s*(0|100|\d{1,2})%,\s*(0|100|\d{1,2})%\s*\)$/i'; - private const PATTERN_HSLA = '/^hsla\(\s*(0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),\s*(0|100|\d{1,2})%,\s*(0|100|\d{1,2})%,\s*(0|0?\.\d+|1(\.0)?)\s*\)$/i'; - - private const COLOR_PATTERNS = [ - CssColor::HEX_LONG => self::PATTERN_HEX_LONG, - CssColor::HEX_LONG_WITH_ALPHA => self::PATTERN_HEX_LONG_WITH_ALPHA, - CssColor::HEX_SHORT => self::PATTERN_HEX_SHORT, - CssColor::HEX_SHORT_WITH_ALPHA => self::PATTERN_HEX_SHORT_WITH_ALPHA, - CssColor::BASIC_NAMED_COLORS => self::PATTERN_BASIC_NAMED_COLORS, - CssColor::EXTENDED_NAMED_COLORS => self::PATTERN_EXTENDED_NAMED_COLORS, - CssColor::SYSTEM_COLORS => self::PATTERN_SYSTEM_COLORS, - CssColor::KEYWORDS => self::PATTERN_KEYWORDS, - CssColor::RGB => self::PATTERN_RGB, - CssColor::RGBA => self::PATTERN_RGBA, - CssColor::HSL => self::PATTERN_HSL, - CssColor::HSLA => self::PATTERN_HSLA, - ]; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint): void - { - if (!$constraint instanceof CssColor) { - throw new UnexpectedTypeException($constraint, CssColor::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!\is_string($value)) { - throw new UnexpectedValueException($value, 'string'); - } - - $formats = array_flip((array) $constraint->formats); - $formatRegexes = array_intersect_key(self::COLOR_PATTERNS, $formats); - - foreach ($formatRegexes as $regex) { - if (preg_match($regex, (string) $value)) { - return; - } - } - - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(CssColor::INVALID_FORMAT_ERROR) - ->addViolation(); - } -} diff --git a/vendor/symfony/validator/Constraints/Currency.php b/vendor/symfony/validator/Constraints/Currency.php deleted file mode 100644 index cac2dff..0000000 --- a/vendor/symfony/validator/Constraints/Currency.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Currencies; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Miha Vrhovnik - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Currency extends Constraint -{ - public const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; - - protected static $errorNames = [ - self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', - ]; - - public $message = 'This value is not a valid currency.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - if (!class_exists(Currencies::class)) { - throw new LogicException('The Intl component is required to use the Currency constraint. Try running "composer require symfony/intl".'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/CurrencyValidator.php b/vendor/symfony/validator/Constraints/CurrencyValidator.php deleted file mode 100644 index 4f294e4..0000000 --- a/vendor/symfony/validator/Constraints/CurrencyValidator.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Currencies; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid currency. - * - * @author Miha Vrhovnik - * @author Bernhard Schussek - */ -class CurrencyValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Currency) { - throw new UnexpectedTypeException($constraint, Currency::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (!Currencies::exists($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Currency::NO_SUCH_CURRENCY_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Date.php b/vendor/symfony/validator/Constraints/Date.php deleted file mode 100644 index 7c9666f..0000000 --- a/vendor/symfony/validator/Constraints/Date.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Date extends Constraint -{ - public const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; - public const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; - - protected static $errorNames = [ - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', - ]; - - public $message = 'This value is not a valid date.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/DateTime.php b/vendor/symfony/validator/Constraints/DateTime.php deleted file mode 100644 index 94c3dd6..0000000 --- a/vendor/symfony/validator/Constraints/DateTime.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class DateTime extends Constraint -{ - public const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; - public const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; - public const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; - - protected static $errorNames = [ - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - self::INVALID_DATE_ERROR => 'INVALID_DATE_ERROR', - self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', - ]; - - public $format = 'Y-m-d H:i:s'; - public $message = 'This value is not a valid datetime.'; - - /** - * {@inheritdoc} - * - * @param string|array|null $format - */ - public function __construct($format = null, string $message = null, array $groups = null, $payload = null, array $options = []) - { - if (\is_array($format)) { - $options = array_merge($format, $options); - } elseif (null !== $format) { - $options['value'] = $format; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } - - public function getDefaultOption() - { - return 'format'; - } -} diff --git a/vendor/symfony/validator/Constraints/DateTimeValidator.php b/vendor/symfony/validator/Constraints/DateTimeValidator.php deleted file mode 100644 index e93f795..0000000 --- a/vendor/symfony/validator/Constraints/DateTimeValidator.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - * @author Diego Saint Esteben - */ -class DateTimeValidator extends DateValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof DateTime) { - throw new UnexpectedTypeException($constraint, DateTime::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - \DateTime::createFromFormat($constraint->format, $value); - - $errors = \DateTime::getLastErrors(); - - if (0 < $errors['error_count']) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(DateTime::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - - if (str_ends_with($constraint->format, '+')) { - $errors['warnings'] = array_filter($errors['warnings'], function ($warning) { - return 'Trailing data' !== $warning; - }); - } - - foreach ($errors['warnings'] as $warning) { - if ('The parsed date was invalid' === $warning) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(DateTime::INVALID_DATE_ERROR) - ->addViolation(); - } elseif ('The parsed time was invalid' === $warning) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(DateTime::INVALID_TIME_ERROR) - ->addViolation(); - } else { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(DateTime::INVALID_FORMAT_ERROR) - ->addViolation(); - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/DateValidator.php b/vendor/symfony/validator/Constraints/DateValidator.php deleted file mode 100644 index 3f18cac..0000000 --- a/vendor/symfony/validator/Constraints/DateValidator.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class DateValidator extends ConstraintValidator -{ - public const PATTERN = '/^(?\d{4})-(?\d{2})-(?\d{2})$/'; - - /** - * Checks whether a date is valid. - * - * @internal - */ - public static function checkDate(int $year, int $month, int $day): bool - { - return checkdate($month, $day, $year); - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Date) { - throw new UnexpectedTypeException($constraint, Date::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (!preg_match(static::PATTERN, $value, $matches)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Date::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - - if (!self::checkDate( - $matches['year'] ?? $matches[1], - $matches['month'] ?? $matches[2], - $matches['day'] ?? $matches[3] - )) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Date::INVALID_DATE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/DisableAutoMapping.php b/vendor/symfony/validator/Constraints/DisableAutoMapping.php deleted file mode 100644 index 9a91f00..0000000 --- a/vendor/symfony/validator/Constraints/DisableAutoMapping.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * Disables auto mapping. - * - * Using the annotations on a property has higher precedence than using it on a class, - * which has higher precedence than any configuration that might be defined outside the class. - * - * @Annotation - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)] -class DisableAutoMapping extends Constraint -{ - public function __construct(array $options = null) - { - if (\is_array($options) && \array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__)); - } - - parent::__construct($options); - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; - } -} diff --git a/vendor/symfony/validator/Constraints/DivisibleBy.php b/vendor/symfony/validator/Constraints/DivisibleBy.php deleted file mode 100644 index d3f5cd7..0000000 --- a/vendor/symfony/validator/Constraints/DivisibleBy.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Colin O'Dell - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class DivisibleBy extends AbstractComparison -{ - public const NOT_DIVISIBLE_BY = '6d99d6c3-1464-4ccf-bdc7-14d083cf455c'; - - protected static $errorNames = [ - self::NOT_DIVISIBLE_BY => 'NOT_DIVISIBLE_BY', - ]; - - public $message = 'This value should be a multiple of {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/DivisibleByValidator.php b/vendor/symfony/validator/Constraints/DivisibleByValidator.php deleted file mode 100644 index de77430..0000000 --- a/vendor/symfony/validator/Constraints/DivisibleByValidator.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates that values are a multiple of the given number. - * - * @author Colin O'Dell - */ -class DivisibleByValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - if (!is_numeric($value1)) { - throw new UnexpectedValueException($value1, 'numeric'); - } - - if (!is_numeric($value2)) { - throw new UnexpectedValueException($value2, 'numeric'); - } - - if (!$value2 = abs($value2)) { - return false; - } - if (\is_int($value1 = abs($value1)) && \is_int($value2)) { - return 0 === ($value1 % $value2); - } - if (!$remainder = fmod($value1, $value2)) { - return true; - } - if (\is_float($value2) && \INF !== $value2) { - $quotient = $value1 / $value2; - $rounded = round($quotient); - - return sprintf('%.12e', $quotient) === sprintf('%.12e', $rounded); - } - - return sprintf('%.12e', $value2) === sprintf('%.12e', $remainder); - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return DivisibleBy::NOT_DIVISIBLE_BY; - } -} diff --git a/vendor/symfony/validator/Constraints/Email.php b/vendor/symfony/validator/Constraints/Email.php deleted file mode 100644 index 7976cc4..0000000 --- a/vendor/symfony/validator/Constraints/Email.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Egulias\EmailValidator\EmailValidator as StrictEmailValidator; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Email extends Constraint -{ - public const VALIDATION_MODE_HTML5 = 'html5'; - public const VALIDATION_MODE_STRICT = 'strict'; - public const VALIDATION_MODE_LOOSE = 'loose'; - - public const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; - - protected static $errorNames = [ - self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', - ]; - - /** - * @var string[] - * - * @internal - */ - public static $validationModes = [ - self::VALIDATION_MODE_HTML5, - self::VALIDATION_MODE_STRICT, - self::VALIDATION_MODE_LOOSE, - ]; - - public $message = 'This value is not a valid email address.'; - public $mode; - public $normalizer; - - public function __construct( - array $options = null, - string $message = null, - string $mode = null, - callable $normalizer = null, - array $groups = null, - $payload = null - ) { - if (\is_array($options) && \array_key_exists('mode', $options) && !\in_array($options['mode'], self::$validationModes, true)) { - throw new InvalidArgumentException('The "mode" parameter value is not valid.'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->mode = $mode ?? $this->mode; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (self::VALIDATION_MODE_STRICT === $this->mode && !class_exists(StrictEmailValidator::class)) { - throw new LogicException(sprintf('The "egulias/email-validator" component is required to use the "%s" constraint in strict mode.', __CLASS__)); - } - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/EmailValidator.php b/vendor/symfony/validator/Constraints/EmailValidator.php deleted file mode 100644 index c879ee4..0000000 --- a/vendor/symfony/validator/Constraints/EmailValidator.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Egulias\EmailValidator\EmailValidator as EguliasEmailValidator; -use Egulias\EmailValidator\Validation\EmailValidation; -use Egulias\EmailValidator\Validation\NoRFCWarningsValidation; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class EmailValidator extends ConstraintValidator -{ - private const PATTERN_HTML5 = '/^[a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/'; - private const PATTERN_LOOSE = '/^.+\@\S+\.\S+$/'; - - private const EMAIL_PATTERNS = [ - Email::VALIDATION_MODE_LOOSE => self::PATTERN_LOOSE, - Email::VALIDATION_MODE_HTML5 => self::PATTERN_HTML5, - ]; - - private $defaultMode; - - public function __construct(string $defaultMode = Email::VALIDATION_MODE_LOOSE) - { - if (!\in_array($defaultMode, Email::$validationModes, true)) { - throw new \InvalidArgumentException('The "defaultMode" parameter value is not valid.'); - } - - $this->defaultMode = $defaultMode; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Email) { - throw new UnexpectedTypeException($constraint, Email::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - if ('' === $value) { - return; - } - - if (null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - if (null === $constraint->mode) { - $constraint->mode = $this->defaultMode; - } - - if (!\in_array($constraint->mode, Email::$validationModes, true)) { - throw new \InvalidArgumentException(sprintf('The "%s::$mode" parameter value is not valid.', get_debug_type($constraint))); - } - - if (Email::VALIDATION_MODE_STRICT === $constraint->mode) { - $strictValidator = new EguliasEmailValidator(); - - if (interface_exists(EmailValidation::class) && !$strictValidator->isValid($value, new NoRFCWarningsValidation())) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Email::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } elseif (!interface_exists(EmailValidation::class) && !$strictValidator->isValid($value, false, true)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Email::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - } elseif (!preg_match(self::EMAIL_PATTERNS[$constraint->mode], $value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Email::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - } -} diff --git a/vendor/symfony/validator/Constraints/EnableAutoMapping.php b/vendor/symfony/validator/Constraints/EnableAutoMapping.php deleted file mode 100644 index 3136fd3..0000000 --- a/vendor/symfony/validator/Constraints/EnableAutoMapping.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * Enables auto mapping. - * - * Using the annotations on a property has higher precedence than using it on a class, - * which has higher precedence than any configuration that might be defined outside the class. - * - * @Annotation - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)] -class EnableAutoMapping extends Constraint -{ - public function __construct(array $options = null) - { - if (\is_array($options) && \array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__)); - } - - parent::__construct($options); - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return [self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT]; - } -} diff --git a/vendor/symfony/validator/Constraints/EqualTo.php b/vendor/symfony/validator/Constraints/EqualTo.php deleted file mode 100644 index 09ab4f0..0000000 --- a/vendor/symfony/validator/Constraints/EqualTo.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class EqualTo extends AbstractComparison -{ - public const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; - - protected static $errorNames = [ - self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', - ]; - - public $message = 'This value should be equal to {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/EqualToValidator.php b/vendor/symfony/validator/Constraints/EqualToValidator.php deleted file mode 100644 index fe1f362..0000000 --- a/vendor/symfony/validator/Constraints/EqualToValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are equal (==). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class EqualToValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return $value1 == $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return EqualTo::NOT_EQUAL_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/Existence.php b/vendor/symfony/validator/Constraints/Existence.php deleted file mode 100644 index 903cf63..0000000 --- a/vendor/symfony/validator/Constraints/Existence.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @author Bernhard Schussek - */ -abstract class Existence extends Composite -{ - public $constraints = []; - - public function getDefaultOption() - { - return 'constraints'; - } - - protected function getCompositeOption() - { - return 'constraints'; - } -} diff --git a/vendor/symfony/validator/Constraints/Expression.php b/vendor/symfony/validator/Constraints/Expression.php deleted file mode 100644 index 01cf429..0000000 --- a/vendor/symfony/validator/Constraints/Expression.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\ExpressionLanguage\Expression as ExpressionObject; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class Expression extends Constraint -{ - public const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; - - protected static $errorNames = [ - self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', - ]; - - public $message = 'This value is not valid.'; - public $expression; - public $values = []; - - /** - * {@inheritdoc} - * - * @param string|ExpressionObject|array $expression The expression to evaluate or an array of options - */ - public function __construct( - $expression, - string $message = null, - array $values = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (!class_exists(ExpressionLanguage::class)) { - throw new LogicException(sprintf('The "symfony/expression-language" component is required to use the "%s" constraint.', __CLASS__)); - } - - if (\is_array($expression)) { - $options = array_merge($expression, $options); - } elseif (!\is_string($expression) && !$expression instanceof ExpressionObject) { - throw new \TypeError(sprintf('"%s": Expected argument $expression to be either a string, an instance of "%s" or an array, got "%s".', __METHOD__, ExpressionObject::class, get_debug_type($expression))); - } else { - $options['value'] = $expression; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->values = $values ?? $this->values; - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'expression'; - } - - /** - * {@inheritdoc} - */ - public function getRequiredOptions() - { - return ['expression']; - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; - } - - /** - * {@inheritdoc} - */ - public function validatedBy() - { - return 'validator.expression'; - } -} diff --git a/vendor/symfony/validator/Constraints/ExpressionLanguageSyntax.php b/vendor/symfony/validator/Constraints/ExpressionLanguageSyntax.php deleted file mode 100644 index d5c1f6f..0000000 --- a/vendor/symfony/validator/Constraints/ExpressionLanguageSyntax.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Andrey Sevastianov - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class ExpressionLanguageSyntax extends Constraint -{ - public const EXPRESSION_LANGUAGE_SYNTAX_ERROR = '1766a3f3-ff03-40eb-b053-ab7aa23d988a'; - - protected static $errorNames = [ - self::EXPRESSION_LANGUAGE_SYNTAX_ERROR => 'EXPRESSION_LANGUAGE_SYNTAX_ERROR', - ]; - - public $message = 'This value should be a valid expression.'; - public $service; - public $allowedVariables; - - public function __construct(array $options = null, string $message = null, string $service = null, array $allowedVariables = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->service = $service ?? $this->service; - $this->allowedVariables = $allowedVariables ?? $this->allowedVariables; - } - - /** - * {@inheritdoc} - */ - public function validatedBy() - { - return $this->service ?? static::class.'Validator'; - } -} diff --git a/vendor/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php b/vendor/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php deleted file mode 100644 index 4b67da2..0000000 --- a/vendor/symfony/validator/Constraints/ExpressionLanguageSyntaxValidator.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\ExpressionLanguage\SyntaxError; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Andrey Sevastianov - */ -class ExpressionLanguageSyntaxValidator extends ConstraintValidator -{ - private $expressionLanguage; - - public function __construct(ExpressionLanguage $expressionLanguage = null) - { - $this->expressionLanguage = $expressionLanguage; - } - - /** - * {@inheritdoc} - */ - public function validate($expression, Constraint $constraint): void - { - if (!$constraint instanceof ExpressionLanguageSyntax) { - throw new UnexpectedTypeException($constraint, ExpressionLanguageSyntax::class); - } - - if (!\is_string($expression)) { - throw new UnexpectedValueException($expression, 'string'); - } - - if (null === $this->expressionLanguage) { - $this->expressionLanguage = new ExpressionLanguage(); - } - - try { - $this->expressionLanguage->lint($expression, $constraint->allowedVariables); - } catch (SyntaxError $exception) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ syntax_error }}', $this->formatValue($exception->getMessage())) - ->setInvalidValue((string) $expression) - ->setCode(ExpressionLanguageSyntax::EXPRESSION_LANGUAGE_SYNTAX_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/ExpressionValidator.php b/vendor/symfony/validator/Constraints/ExpressionValidator.php deleted file mode 100644 index 3ae47f4..0000000 --- a/vendor/symfony/validator/Constraints/ExpressionValidator.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Fabien Potencier - * @author Bernhard Schussek - */ -class ExpressionValidator extends ConstraintValidator -{ - private $expressionLanguage; - - public function __construct(ExpressionLanguage $expressionLanguage = null) - { - $this->expressionLanguage = $expressionLanguage; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Expression) { - throw new UnexpectedTypeException($constraint, Expression::class); - } - - $variables = $constraint->values; - $variables['value'] = $value; - $variables['this'] = $this->context->getObject(); - - if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING)) - ->setCode(Expression::EXPRESSION_FAILED_ERROR) - ->addViolation(); - } - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (null === $this->expressionLanguage) { - $this->expressionLanguage = new ExpressionLanguage(); - } - - return $this->expressionLanguage; - } -} diff --git a/vendor/symfony/validator/Constraints/File.php b/vendor/symfony/validator/Constraints/File.php deleted file mode 100644 index b5a446e..0000000 --- a/vendor/symfony/validator/Constraints/File.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @property int $maxSize - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class File extends Constraint -{ - // Check the Image constraint for clashes if adding new constants here - - public const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; - public const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; - public const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; - public const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; - public const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; - - protected static $errorNames = [ - self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', - self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', - self::EMPTY_ERROR => 'EMPTY_ERROR', - self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', - self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', - ]; - - public $binaryFormat; - public $mimeTypes = []; - public $notFoundMessage = 'The file could not be found.'; - public $notReadableMessage = 'The file is not readable.'; - public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'; - public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'; - public $disallowEmptyMessage = 'An empty file is not allowed.'; - - public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'; - public $uploadFormSizeErrorMessage = 'The file is too large.'; - public $uploadPartialErrorMessage = 'The file was only partially uploaded.'; - public $uploadNoFileErrorMessage = 'No file was uploaded.'; - public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.'; - public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.'; - public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.'; - public $uploadErrorMessage = 'The file could not be uploaded.'; - - protected $maxSize; - - /** - * {@inheritdoc} - * - * @param int|string|null $maxSize - * @param string[]|string|null $mimeTypes - */ - public function __construct( - array $options = null, - $maxSize = null, - bool $binaryFormat = null, - $mimeTypes = null, - string $notFoundMessage = null, - string $notReadableMessage = null, - string $maxSizeMessage = null, - string $mimeTypesMessage = null, - string $disallowEmptyMessage = null, - - string $uploadIniSizeErrorMessage = null, - string $uploadFormSizeErrorMessage = null, - string $uploadPartialErrorMessage = null, - string $uploadNoFileErrorMessage = null, - string $uploadNoTmpDirErrorMessage = null, - string $uploadCantWriteErrorMessage = null, - string $uploadExtensionErrorMessage = null, - string $uploadErrorMessage = null, - array $groups = null, - $payload = null - ) { - if (null !== $maxSize && !\is_int($maxSize) && !\is_string($maxSize)) { - throw new \TypeError(sprintf('"%s": Expected argument $maxSize to be either null, an integer or a string, got "%s".', __METHOD__, get_debug_type($maxSize))); - } - if (null !== $mimeTypes && !\is_array($mimeTypes) && !\is_string($mimeTypes)) { - throw new \TypeError(sprintf('"%s": Expected argument $mimeTypes to be either null, an array or a string, got "%s".', __METHOD__, get_debug_type($mimeTypes))); - } - - parent::__construct($options, $groups, $payload); - - $this->maxSize = $maxSize ?? $this->maxSize; - $this->binaryFormat = $binaryFormat ?? $this->binaryFormat; - $this->mimeTypes = $mimeTypes ?? $this->mimeTypes; - $this->notFoundMessage = $notFoundMessage ?? $this->notFoundMessage; - $this->notReadableMessage = $notReadableMessage ?? $this->notReadableMessage; - $this->maxSizeMessage = $maxSizeMessage ?? $this->maxSizeMessage; - $this->mimeTypesMessage = $mimeTypesMessage ?? $this->mimeTypesMessage; - $this->disallowEmptyMessage = $disallowEmptyMessage ?? $this->disallowEmptyMessage; - $this->uploadIniSizeErrorMessage = $uploadIniSizeErrorMessage ?? $this->uploadIniSizeErrorMessage; - $this->uploadFormSizeErrorMessage = $uploadFormSizeErrorMessage ?? $this->uploadFormSizeErrorMessage; - $this->uploadPartialErrorMessage = $uploadPartialErrorMessage ?? $this->uploadPartialErrorMessage; - $this->uploadNoFileErrorMessage = $uploadNoFileErrorMessage ?? $this->uploadNoFileErrorMessage; - $this->uploadNoTmpDirErrorMessage = $uploadNoTmpDirErrorMessage ?? $this->uploadNoTmpDirErrorMessage; - $this->uploadCantWriteErrorMessage = $uploadCantWriteErrorMessage ?? $this->uploadCantWriteErrorMessage; - $this->uploadExtensionErrorMessage = $uploadExtensionErrorMessage ?? $this->uploadExtensionErrorMessage; - $this->uploadErrorMessage = $uploadErrorMessage ?? $this->uploadErrorMessage; - - if (null !== $this->maxSize) { - $this->normalizeBinaryFormat($this->maxSize); - } - } - - public function __set(string $option, $value) - { - if ('maxSize' === $option) { - $this->normalizeBinaryFormat($value); - - return; - } - - parent::__set($option, $value); - } - - public function __get(string $option) - { - if ('maxSize' === $option) { - return $this->maxSize; - } - - return parent::__get($option); - } - - public function __isset(string $option) - { - if ('maxSize' === $option) { - return true; - } - - return parent::__isset($option); - } - - /** - * @param int|string $maxSize - */ - private function normalizeBinaryFormat($maxSize) - { - $factors = [ - 'k' => 1000, - 'ki' => 1 << 10, - 'm' => 1000 * 1000, - 'mi' => 1 << 20, - 'g' => 1000 * 1000 * 1000, - 'gi' => 1 << 30, - ]; - if (ctype_digit((string) $maxSize)) { - $this->maxSize = (int) $maxSize; - $this->binaryFormat = $this->binaryFormat ?? false; - } elseif (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) { - $this->maxSize = $matches[1] * $factors[$unit = strtolower($matches[2])]; - $this->binaryFormat = $this->binaryFormat ?? (2 === \strlen($unit)); - } else { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size.', $maxSize)); - } - } -} diff --git a/vendor/symfony/validator/Constraints/FileValidator.php b/vendor/symfony/validator/Constraints/FileValidator.php deleted file mode 100644 index cebb6ed..0000000 --- a/vendor/symfony/validator/Constraints/FileValidator.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\HttpFoundation\File\File as FileObject; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\Mime\MimeTypes; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\LogicException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class FileValidator extends ConstraintValidator -{ - public const KB_BYTES = 1000; - public const MB_BYTES = 1000000; - public const KIB_BYTES = 1024; - public const MIB_BYTES = 1048576; - - private const SUFFICES = [ - 1 => 'bytes', - self::KB_BYTES => 'kB', - self::MB_BYTES => 'MB', - self::KIB_BYTES => 'KiB', - self::MIB_BYTES => 'MiB', - ]; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof File) { - throw new UnexpectedTypeException($constraint, File::class); - } - - if (null === $value || '' === $value) { - return; - } - - if ($value instanceof UploadedFile && !$value->isValid()) { - switch ($value->getError()) { - case \UPLOAD_ERR_INI_SIZE: - $iniLimitSize = UploadedFile::getMaxFilesize(); - if ($constraint->maxSize && $constraint->maxSize < $iniLimitSize) { - $limitInBytes = $constraint->maxSize; - $binaryFormat = $constraint->binaryFormat; - } else { - $limitInBytes = $iniLimitSize; - $binaryFormat = $constraint->binaryFormat ?? true; - } - - [, $limitAsString, $suffix] = $this->factorizeSizes(0, $limitInBytes, $binaryFormat); - $this->context->buildViolation($constraint->uploadIniSizeErrorMessage) - ->setParameter('{{ limit }}', $limitAsString) - ->setParameter('{{ suffix }}', $suffix) - ->setCode((string) \UPLOAD_ERR_INI_SIZE) - ->addViolation(); - - return; - case \UPLOAD_ERR_FORM_SIZE: - $this->context->buildViolation($constraint->uploadFormSizeErrorMessage) - ->setCode((string) \UPLOAD_ERR_FORM_SIZE) - ->addViolation(); - - return; - case \UPLOAD_ERR_PARTIAL: - $this->context->buildViolation($constraint->uploadPartialErrorMessage) - ->setCode((string) \UPLOAD_ERR_PARTIAL) - ->addViolation(); - - return; - case \UPLOAD_ERR_NO_FILE: - $this->context->buildViolation($constraint->uploadNoFileErrorMessage) - ->setCode((string) \UPLOAD_ERR_NO_FILE) - ->addViolation(); - - return; - case \UPLOAD_ERR_NO_TMP_DIR: - $this->context->buildViolation($constraint->uploadNoTmpDirErrorMessage) - ->setCode((string) \UPLOAD_ERR_NO_TMP_DIR) - ->addViolation(); - - return; - case \UPLOAD_ERR_CANT_WRITE: - $this->context->buildViolation($constraint->uploadCantWriteErrorMessage) - ->setCode((string) \UPLOAD_ERR_CANT_WRITE) - ->addViolation(); - - return; - case \UPLOAD_ERR_EXTENSION: - $this->context->buildViolation($constraint->uploadExtensionErrorMessage) - ->setCode((string) \UPLOAD_ERR_EXTENSION) - ->addViolation(); - - return; - default: - $this->context->buildViolation($constraint->uploadErrorMessage) - ->setCode((string) $value->getError()) - ->addViolation(); - - return; - } - } - - if (!is_scalar($value) && !$value instanceof FileObject && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $path = $value instanceof FileObject ? $value->getPathname() : (string) $value; - - if (!is_file($path)) { - $this->context->buildViolation($constraint->notFoundMessage) - ->setParameter('{{ file }}', $this->formatValue($path)) - ->setCode(File::NOT_FOUND_ERROR) - ->addViolation(); - - return; - } - - if (!is_readable($path)) { - $this->context->buildViolation($constraint->notReadableMessage) - ->setParameter('{{ file }}', $this->formatValue($path)) - ->setCode(File::NOT_READABLE_ERROR) - ->addViolation(); - - return; - } - - $sizeInBytes = filesize($path); - $basename = $value instanceof UploadedFile ? $value->getClientOriginalName() : basename($path); - - if (0 === $sizeInBytes) { - $this->context->buildViolation($constraint->disallowEmptyMessage) - ->setParameter('{{ file }}', $this->formatValue($path)) - ->setParameter('{{ name }}', $this->formatValue($basename)) - ->setCode(File::EMPTY_ERROR) - ->addViolation(); - - return; - } - - if ($constraint->maxSize) { - $limitInBytes = $constraint->maxSize; - - if ($sizeInBytes > $limitInBytes) { - [$sizeAsString, $limitAsString, $suffix] = $this->factorizeSizes($sizeInBytes, $limitInBytes, $constraint->binaryFormat); - $this->context->buildViolation($constraint->maxSizeMessage) - ->setParameter('{{ file }}', $this->formatValue($path)) - ->setParameter('{{ size }}', $sizeAsString) - ->setParameter('{{ limit }}', $limitAsString) - ->setParameter('{{ suffix }}', $suffix) - ->setParameter('{{ name }}', $this->formatValue($basename)) - ->setCode(File::TOO_LARGE_ERROR) - ->addViolation(); - - return; - } - } - - if ($constraint->mimeTypes) { - if ($value instanceof FileObject) { - $mime = $value->getMimeType(); - } elseif (class_exists(MimeTypes::class)) { - $mime = MimeTypes::getDefault()->guessMimeType($path); - } elseif (!class_exists(FileObject::class)) { - throw new LogicException('You cannot validate the mime-type of files as the Mime component is not installed. Try running "composer require symfony/mime".'); - } else { - $mime = (new FileObject($value))->getMimeType(); - } - - $mimeTypes = (array) $constraint->mimeTypes; - - foreach ($mimeTypes as $mimeType) { - if ($mimeType === $mime) { - return; - } - - if ($discrete = strstr($mimeType, '/*', true)) { - if (strstr($mime, '/', true) === $discrete) { - return; - } - } - } - - $this->context->buildViolation($constraint->mimeTypesMessage) - ->setParameter('{{ file }}', $this->formatValue($path)) - ->setParameter('{{ type }}', $this->formatValue($mime)) - ->setParameter('{{ types }}', $this->formatValues($mimeTypes)) - ->setParameter('{{ name }}', $this->formatValue($basename)) - ->setCode(File::INVALID_MIME_TYPE_ERROR) - ->addViolation(); - } - } - - private static function moreDecimalsThan(string $double, int $numberOfDecimals): bool - { - return \strlen($double) > \strlen(round($double, $numberOfDecimals)); - } - - /** - * Convert the limit to the smallest possible number - * (i.e. try "MB", then "kB", then "bytes"). - * - * @param int|float $limit - */ - private function factorizeSizes(int $size, $limit, bool $binaryFormat): array - { - if ($binaryFormat) { - $coef = self::MIB_BYTES; - $coefFactor = self::KIB_BYTES; - } else { - $coef = self::MB_BYTES; - $coefFactor = self::KB_BYTES; - } - - $limitAsString = (string) ($limit / $coef); - - // Restrict the limit to 2 decimals (without rounding! we - // need the precise value) - while (self::moreDecimalsThan($limitAsString, 2)) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - } - - // Convert size to the same measure, but round to 2 decimals - $sizeAsString = (string) round($size / $coef, 2); - - // If the size and limit produce the same string output - // (due to rounding), reduce the coefficient - while ($sizeAsString === $limitAsString) { - $coef /= $coefFactor; - $limitAsString = (string) ($limit / $coef); - $sizeAsString = (string) round($size / $coef, 2); - } - - return [$sizeAsString, $limitAsString, self::SUFFICES[$coef]]; - } -} diff --git a/vendor/symfony/validator/Constraints/GreaterThan.php b/vendor/symfony/validator/Constraints/GreaterThan.php deleted file mode 100644 index 4164875..0000000 --- a/vendor/symfony/validator/Constraints/GreaterThan.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class GreaterThan extends AbstractComparison -{ - public const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; - - protected static $errorNames = [ - self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ]; - - public $message = 'This value should be greater than {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php b/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php deleted file mode 100644 index 86ff44e..0000000 --- a/vendor/symfony/validator/Constraints/GreaterThanOrEqual.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class GreaterThanOrEqual extends AbstractComparison -{ - public const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; - - protected static $errorNames = [ - self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ]; - - public $message = 'This value should be greater than or equal to {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php b/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php deleted file mode 100644 index 290408a..0000000 --- a/vendor/symfony/validator/Constraints/GreaterThanOrEqualValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are greater than or equal to the previous (>=). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class GreaterThanOrEqualValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return null === $value2 || $value1 >= $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return GreaterThanOrEqual::TOO_LOW_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/GreaterThanValidator.php b/vendor/symfony/validator/Constraints/GreaterThanValidator.php deleted file mode 100644 index 062503a..0000000 --- a/vendor/symfony/validator/Constraints/GreaterThanValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are greater than the previous (>). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class GreaterThanValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return null === $value2 || $value1 > $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return GreaterThan::TOO_LOW_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/GroupSequence.php b/vendor/symfony/validator/Constraints/GroupSequence.php deleted file mode 100644 index 522c5fd..0000000 --- a/vendor/symfony/validator/Constraints/GroupSequence.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * A sequence of validation groups. - * - * When validating a group sequence, each group will only be validated if all - * of the previous groups in the sequence succeeded. For example: - * - * $validator->validate($address, null, new GroupSequence(['Basic', 'Strict'])); - * - * In the first step, all constraints that belong to the group "Basic" will be - * validated. If none of the constraints fail, the validator will then validate - * the constraints in group "Strict". This is useful, for example, if "Strict" - * contains expensive checks that require a lot of CPU or slow, external - * services. You usually don't want to run expensive checks if any of the cheap - * checks fail. - * - * When adding metadata to a class, you can override the "Default" group of - * that class with a group sequence: - * /** - * * @GroupSequence({"Address", "Strict"}) - * *\/ - * class Address - * { - * // ... - * } - * - * Whenever you validate that object in the "Default" group, the group sequence - * will be validated: - * - * $validator->validate($address); - * - * If you want to execute the constraints of the "Default" group for a class - * with an overridden default group, pass the class name as group name instead: - * - * $validator->validate($address, null, "Address") - * - * @Annotation - * @Target({"CLASS", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class GroupSequence -{ - /** - * The groups in the sequence. - * - * @var array - */ - public $groups; - - /** - * The group in which cascaded objects are validated when validating - * this sequence. - * - * By default, cascaded objects are validated in each of the groups of - * the sequence. - * - * If a class has a group sequence attached, that sequence replaces the - * "Default" group. When validating that class in the "Default" group, the - * group sequence is used instead, but still the "Default" group should be - * cascaded to other objects. - * - * @var string|GroupSequence - */ - public $cascadedGroup; - - /** - * Creates a new group sequence. - * - * @param array $groups The groups in the sequence - */ - public function __construct(array $groups) - { - // Support for Doctrine annotations - $this->groups = $groups['value'] ?? $groups; - } -} diff --git a/vendor/symfony/validator/Constraints/GroupSequenceProvider.php b/vendor/symfony/validator/Constraints/GroupSequenceProvider.php deleted file mode 100644 index 489a449..0000000 --- a/vendor/symfony/validator/Constraints/GroupSequenceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Annotation to define a group sequence provider. - * - * @Annotation - * @Target({"CLASS", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class GroupSequenceProvider -{ -} diff --git a/vendor/symfony/validator/Constraints/Hostname.php b/vendor/symfony/validator/Constraints/Hostname.php deleted file mode 100644 index d0d02d1..0000000 --- a/vendor/symfony/validator/Constraints/Hostname.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Dmitrii Poddubnyi - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Hostname extends Constraint -{ - public const INVALID_HOSTNAME_ERROR = '7057ffdb-0af4-4f7e-bd5e-e9acfa6d7a2d'; - - protected static $errorNames = [ - self::INVALID_HOSTNAME_ERROR => 'INVALID_HOSTNAME_ERROR', - ]; - - public $message = 'This value is not a valid hostname.'; - public $requireTld = true; - - public function __construct( - array $options = null, - string $message = null, - bool $requireTld = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->requireTld = $requireTld ?? $this->requireTld; - } -} diff --git a/vendor/symfony/validator/Constraints/HostnameValidator.php b/vendor/symfony/validator/Constraints/HostnameValidator.php deleted file mode 100644 index 144d57e..0000000 --- a/vendor/symfony/validator/Constraints/HostnameValidator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Dmitrii Poddubnyi - */ -class HostnameValidator extends ConstraintValidator -{ - /** - * https://tools.ietf.org/html/rfc2606. - */ - private const RESERVED_TLDS = [ - 'example', - 'invalid', - 'localhost', - 'test', - ]; - - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Hostname) { - throw new UnexpectedTypeException($constraint, Hostname::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - if ('' === $value) { - return; - } - if (!$this->isValid($value) || ($constraint->requireTld && !$this->hasValidTld($value))) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Hostname::INVALID_HOSTNAME_ERROR) - ->addViolation(); - } - } - - private function isValid(string $domain): bool - { - return false !== filter_var($domain, \FILTER_VALIDATE_DOMAIN, \FILTER_FLAG_HOSTNAME); - } - - private function hasValidTld(string $domain): bool - { - return false !== strpos($domain, '.') && !\in_array(substr($domain, strrpos($domain, '.') + 1), self::RESERVED_TLDS, true); - } -} diff --git a/vendor/symfony/validator/Constraints/Iban.php b/vendor/symfony/validator/Constraints/Iban.php deleted file mode 100644 index 2f7a61e..0000000 --- a/vendor/symfony/validator/Constraints/Iban.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Manuel Reinhard - * @author Michael Schummel - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Iban extends Constraint -{ - public const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; - public const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; - public const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; - public const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; - public const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; - - protected static $errorNames = [ - self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - self::NOT_SUPPORTED_COUNTRY_CODE_ERROR => 'NOT_SUPPORTED_COUNTRY_CODE_ERROR', - ]; - - public $message = 'This is not a valid International Bank Account Number (IBAN).'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/IbanValidator.php b/vendor/symfony/validator/Constraints/IbanValidator.php deleted file mode 100644 index 0f39a3a..0000000 --- a/vendor/symfony/validator/Constraints/IbanValidator.php +++ /dev/null @@ -1,259 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Manuel Reinhard - * @author Michael Schummel - * @author Bernhard Schussek - * - * @see http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ - */ -class IbanValidator extends ConstraintValidator -{ - /** - * IBAN country specific formats. - * - * The first 2 characters from an IBAN format are the two-character ISO country code. - * The following 2 characters represent the check digits calculated from the rest of the IBAN characters. - * The rest are up to thirty alphanumeric characters for - * a BBAN (Basic Bank Account Number) which has a fixed length per country and, - * included within it, a bank identifier with a fixed position and a fixed length per country - * - * @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf - */ - private const FORMATS = [ - 'AD' => 'AD\d{2}\d{4}\d{4}[\dA-Z]{12}', // Andorra - 'AE' => 'AE\d{2}\d{3}\d{16}', // United Arab Emirates - 'AL' => 'AL\d{2}\d{8}[\dA-Z]{16}', // Albania - 'AO' => 'AO\d{2}\d{21}', // Angola - 'AT' => 'AT\d{2}\d{5}\d{11}', // Austria - 'AX' => 'FI\d{2}\d{6}\d{7}\d{1}', // Aland Islands - 'AZ' => 'AZ\d{2}[A-Z]{4}[\dA-Z]{20}', // Azerbaijan - 'BA' => 'BA\d{2}\d{3}\d{3}\d{8}\d{2}', // Bosnia and Herzegovina - 'BE' => 'BE\d{2}\d{3}\d{7}\d{2}', // Belgium - 'BF' => 'BF\d{2}\d{23}', // Burkina Faso - 'BG' => 'BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}', // Bulgaria - 'BH' => 'BH\d{2}[A-Z]{4}[\dA-Z]{14}', // Bahrain - 'BI' => 'BI\d{2}\d{12}', // Burundi - 'BJ' => 'BJ\d{2}[A-Z]{1}\d{23}', // Benin - 'BY' => 'BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}', // Belarus - https://bank.codes/iban/structure/belarus/ - 'BL' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Barthelemy - 'BR' => 'BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]', // Brazil - 'CG' => 'CG\d{2}\d{23}', // Congo - 'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland - 'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast - 'CM' => 'CM\d{2}\d{23}', // Cameron - 'CR' => 'CR\d{2}0\d{3}\d{14}', // Costa Rica - 'CV' => 'CV\d{2}\d{21}', // Cape Verde - 'CY' => 'CY\d{2}\d{3}\d{5}[\dA-Z]{16}', // Cyprus - 'CZ' => 'CZ\d{2}\d{20}', // Czech Republic - 'DE' => 'DE\d{2}\d{8}\d{10}', // Germany - 'DO' => 'DO\d{2}[\dA-Z]{4}\d{20}', // Dominican Republic - 'DK' => 'DK\d{2}\d{4}\d{10}', // Denmark - 'DZ' => 'DZ\d{2}\d{20}', // Algeria - 'EE' => 'EE\d{2}\d{2}\d{2}\d{11}\d{1}', // Estonia - 'ES' => 'ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}', // Spain (also includes Canary Islands, Ceuta and Melilla) - 'FI' => 'FI\d{2}\d{6}\d{7}\d{1}', // Finland - 'FO' => 'FO\d{2}\d{4}\d{9}\d{1}', // Faroe Islands - 'FR' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // France - 'GF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Guyana - 'GB' => 'GB\d{2}[A-Z]{4}\d{6}\d{8}', // United Kingdom of Great Britain and Northern Ireland - 'GE' => 'GE\d{2}[A-Z]{2}\d{16}', // Georgia - 'GI' => 'GI\d{2}[A-Z]{4}[\dA-Z]{15}', // Gibraltar - 'GL' => 'GL\d{2}\d{4}\d{9}\d{1}', // Greenland - 'GP' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Guadeloupe - 'GR' => 'GR\d{2}\d{3}\d{4}[\dA-Z]{16}', // Greece - 'GT' => 'GT\d{2}[\dA-Z]{4}[\dA-Z]{20}', // Guatemala - 'HR' => 'HR\d{2}\d{7}\d{10}', // Croatia - 'HU' => 'HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}', // Hungary - 'IE' => 'IE\d{2}[A-Z]{4}\d{6}\d{8}', // Ireland - 'IL' => 'IL\d{2}\d{3}\d{3}\d{13}', // Israel - 'IR' => 'IR\d{2}\d{22}', // Iran - 'IS' => 'IS\d{2}\d{4}\d{2}\d{6}\d{10}', // Iceland - 'IT' => 'IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // Italy - 'JO' => 'JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}', // Jordan - 'KW' => 'KW\d{2}[A-Z]{4}\d{22}', // KUWAIT - 'KZ' => 'KZ\d{2}\d{3}[\dA-Z]{13}', // Kazakhstan - 'LB' => 'LB\d{2}\d{4}[\dA-Z]{20}', // LEBANON - 'LI' => 'LI\d{2}\d{5}[\dA-Z]{12}', // Liechtenstein (Principality of) - 'LT' => 'LT\d{2}\d{5}\d{11}', // Lithuania - 'LU' => 'LU\d{2}\d{3}[\dA-Z]{13}', // Luxembourg - 'LV' => 'LV\d{2}[A-Z]{4}[\dA-Z]{13}', // Latvia - 'MC' => 'MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Monaco - 'MD' => 'MD\d{2}[\dA-Z]{2}[\dA-Z]{18}', // Moldova - 'ME' => 'ME\d{2}\d{3}\d{13}\d{2}', // Montenegro - 'MF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Martin (French part) - 'MG' => 'MG\d{2}\d{23}', // Madagascar - 'MK' => 'MK\d{2}\d{3}[\dA-Z]{10}\d{2}', // Macedonia, Former Yugoslav Republic of - 'ML' => 'ML\d{2}[A-Z]{1}\d{23}', // Mali - 'MQ' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Martinique - 'MR' => 'MR13\d{5}\d{5}\d{11}\d{2}', // Mauritania - 'MT' => 'MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}', // Malta - 'MU' => 'MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}', // Mauritius - 'MZ' => 'MZ\d{2}\d{21}', // Mozambique - 'NC' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // New Caledonia - 'NL' => 'NL\d{2}[A-Z]{4}\d{10}', // The Netherlands - 'NO' => 'NO\d{2}\d{4}\d{6}\d{1}', // Norway - 'PF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Polynesia - 'PK' => 'PK\d{2}[A-Z]{4}[\dA-Z]{16}', // Pakistan - 'PL' => 'PL\d{2}\d{8}\d{16}', // Poland - 'PM' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Saint Pierre et Miquelon - 'PS' => 'PS\d{2}[A-Z]{4}[\dA-Z]{21}', // Palestine, State of - 'PT' => 'PT\d{2}\d{4}\d{4}\d{11}\d{2}', // Portugal (plus Azores and Madeira) - 'QA' => 'QA\d{2}[A-Z]{4}[\dA-Z]{21}', // Qatar - 'RE' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Reunion - 'RO' => 'RO\d{2}[A-Z]{4}[\dA-Z]{16}', // Romania - 'RS' => 'RS\d{2}\d{3}\d{13}\d{2}', // Serbia - 'SA' => 'SA\d{2}\d{2}[\dA-Z]{18}', // Saudi Arabia - 'SE' => 'SE\d{2}\d{3}\d{16}\d{1}', // Sweden - 'SI' => 'SI\d{2}\d{5}\d{8}\d{2}', // Slovenia - 'SK' => 'SK\d{2}\d{4}\d{6}\d{10}', // Slovak Republic - 'SM' => 'SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}', // San Marino - 'SN' => 'SN\d{2}[A-Z]{1}\d{23}', // Senegal - 'TF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // French Southern Territories - 'TL' => 'TL\d{2}\d{3}\d{14}\d{2}', // Timor-Leste - 'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia - 'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey - 'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine - 'VA' => 'VA\d{2}\d{3}\d{15}', // Vatican City State - 'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British - 'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands - 'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo - 'YT' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Mayotte - ]; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Iban) { - throw new UnexpectedTypeException($constraint, Iban::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - // Remove spaces and convert to uppercase - $canonicalized = str_replace(' ', '', strtoupper($value)); - - // The IBAN must contain only digits and characters... - if (!ctype_alnum($canonicalized)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Iban::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - // ...start with a two-letter country code - $countryCode = substr($canonicalized, 0, 2); - - if (!ctype_alpha($countryCode)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Iban::INVALID_COUNTRY_CODE_ERROR) - ->addViolation(); - - return; - } - - // ...have a format available - if (!\array_key_exists($countryCode, self::FORMATS)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR) - ->addViolation(); - - return; - } - - // ...and have a valid format - if (!preg_match('/^'.self::FORMATS[$countryCode].'$/', $canonicalized) - ) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Iban::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - - // Move the first four characters to the end - // e.g. CH93 0076 2011 6238 5295 7 - // -> 0076 2011 6238 5295 7 CH93 - $canonicalized = substr($canonicalized, 4).substr($canonicalized, 0, 4); - - // Convert all remaining letters to their ordinals - // The result is an integer, which is too large for PHP's int - // data type, so we store it in a string instead. - // e.g. 0076 2011 6238 5295 7 CH93 - // -> 0076 2011 6238 5295 7 121893 - $checkSum = self::toBigInt($canonicalized); - - // Do a modulo-97 operation on the large integer - // We cannot use PHP's modulo operator, so we calculate the - // modulo step-wisely instead - if (1 !== self::bigModulo97($checkSum)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Iban::CHECKSUM_FAILED_ERROR) - ->addViolation(); - } - } - - private static function toBigInt(string $string): string - { - $chars = str_split($string); - $bigInt = ''; - - foreach ($chars as $char) { - // Convert uppercase characters to ordinals, starting with 10 for "A" - if (ctype_upper($char)) { - $bigInt .= (\ord($char) - 55); - - continue; - } - - // Simply append digits - $bigInt .= $char; - } - - return $bigInt; - } - - private static function bigModulo97(string $bigInt): int - { - $parts = str_split($bigInt, 7); - $rest = 0; - - foreach ($parts as $part) { - $rest = ($rest.$part) % 97; - } - - return $rest; - } -} diff --git a/vendor/symfony/validator/Constraints/IdenticalTo.php b/vendor/symfony/validator/Constraints/IdenticalTo.php deleted file mode 100644 index b3d6b92..0000000 --- a/vendor/symfony/validator/Constraints/IdenticalTo.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class IdenticalTo extends AbstractComparison -{ - public const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; - - protected static $errorNames = [ - self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', - ]; - - public $message = 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/IdenticalToValidator.php b/vendor/symfony/validator/Constraints/IdenticalToValidator.php deleted file mode 100644 index 304f71f..0000000 --- a/vendor/symfony/validator/Constraints/IdenticalToValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are identical (===). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class IdenticalToValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return $value1 === $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return IdenticalTo::NOT_IDENTICAL_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/Image.php b/vendor/symfony/validator/Constraints/Image.php deleted file mode 100644 index 83fc9f9..0000000 --- a/vendor/symfony/validator/Constraints/Image.php +++ /dev/null @@ -1,193 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Benjamin Dulau - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Image extends File -{ - public const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; - public const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; - public const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; - public const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; - public const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; - public const TOO_FEW_PIXEL_ERROR = '1b06b97d-ae48-474e-978f-038a74854c43'; - public const TOO_MANY_PIXEL_ERROR = 'ee0804e8-44db-4eac-9775-be91aaf72ce1'; - public const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; - public const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; - public const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; - public const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; - public const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; - public const CORRUPTED_IMAGE_ERROR = '5d4163f3-648f-4e39-87fd-cc5ea7aad2d1'; - - // Include the mapping from the base class - - protected static $errorNames = [ - self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', - self::NOT_READABLE_ERROR => 'NOT_READABLE_ERROR', - self::EMPTY_ERROR => 'EMPTY_ERROR', - self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', - self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR', - self::SIZE_NOT_DETECTED_ERROR => 'SIZE_NOT_DETECTED_ERROR', - self::TOO_WIDE_ERROR => 'TOO_WIDE_ERROR', - self::TOO_NARROW_ERROR => 'TOO_NARROW_ERROR', - self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - self::TOO_FEW_PIXEL_ERROR => 'TOO_FEW_PIXEL_ERROR', - self::TOO_MANY_PIXEL_ERROR => 'TOO_MANY_PIXEL_ERROR', - self::RATIO_TOO_BIG_ERROR => 'RATIO_TOO_BIG_ERROR', - self::RATIO_TOO_SMALL_ERROR => 'RATIO_TOO_SMALL_ERROR', - self::SQUARE_NOT_ALLOWED_ERROR => 'SQUARE_NOT_ALLOWED_ERROR', - self::LANDSCAPE_NOT_ALLOWED_ERROR => 'LANDSCAPE_NOT_ALLOWED_ERROR', - self::PORTRAIT_NOT_ALLOWED_ERROR => 'PORTRAIT_NOT_ALLOWED_ERROR', - self::CORRUPTED_IMAGE_ERROR => 'CORRUPTED_IMAGE_ERROR', - ]; - - public $mimeTypes = 'image/*'; - public $minWidth; - public $maxWidth; - public $maxHeight; - public $minHeight; - public $maxRatio; - public $minRatio; - public $minPixels; - public $maxPixels; - public $allowSquare = true; - public $allowLandscape = true; - public $allowPortrait = true; - public $detectCorrupted = false; - - // The constant for a wrong MIME type is taken from the parent class. - public $mimeTypesMessage = 'This file is not a valid image.'; - public $sizeNotDetectedMessage = 'The size of the image could not be detected.'; - public $maxWidthMessage = 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.'; - public $minWidthMessage = 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.'; - public $maxHeightMessage = 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.'; - public $minHeightMessage = 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.'; - public $minPixelsMessage = 'The image has too few pixels ({{ pixels }} pixels). Minimum amount expected is {{ min_pixels }} pixels.'; - public $maxPixelsMessage = 'The image has too many pixels ({{ pixels }} pixels). Maximum amount expected is {{ max_pixels }} pixels.'; - public $maxRatioMessage = 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.'; - public $minRatioMessage = 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.'; - public $allowSquareMessage = 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.'; - public $allowLandscapeMessage = 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.'; - public $allowPortraitMessage = 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.'; - public $corruptedMessage = 'The image file is corrupted.'; - - /** - * {@inheritdoc} - * - * @param int|float $maxRatio - * @param int|float $minRatio - * @param int|float $minPixels - * @param int|float $maxPixels - */ - public function __construct( - array $options = null, - $maxSize = null, - bool $binaryFormat = null, - array $mimeTypes = null, - int $minWidth = null, - int $maxWidth = null, - int $maxHeight = null, - int $minHeight = null, - $maxRatio = null, - $minRatio = null, - $minPixels = null, - $maxPixels = null, - bool $allowSquare = null, - bool $allowLandscape = null, - bool $allowPortrait = null, - bool $detectCorrupted = null, - string $notFoundMessage = null, - string $notReadableMessage = null, - string $maxSizeMessage = null, - string $mimeTypesMessage = null, - string $disallowEmptyMessage = null, - string $uploadIniSizeErrorMessage = null, - string $uploadFormSizeErrorMessage = null, - string $uploadPartialErrorMessage = null, - string $uploadNoFileErrorMessage = null, - string $uploadNoTmpDirErrorMessage = null, - string $uploadCantWriteErrorMessage = null, - string $uploadExtensionErrorMessage = null, - string $uploadErrorMessage = null, - string $sizeNotDetectedMessage = null, - string $maxWidthMessage = null, - string $minWidthMessage = null, - string $maxHeightMessage = null, - string $minHeightMessage = null, - string $minPixelsMessage = null, - string $maxPixelsMessage = null, - string $maxRatioMessage = null, - string $minRatioMessage = null, - string $allowSquareMessage = null, - string $allowLandscapeMessage = null, - string $allowPortraitMessage = null, - string $corruptedMessage = null, - array $groups = null, - $payload = null - ) { - parent::__construct( - $options, - $maxSize, - $binaryFormat, - $mimeTypes, - $notFoundMessage, - $notReadableMessage, - $maxSizeMessage, - $mimeTypesMessage, - $disallowEmptyMessage, - $uploadIniSizeErrorMessage, - $uploadFormSizeErrorMessage, - $uploadPartialErrorMessage, - $uploadNoFileErrorMessage, - $uploadNoTmpDirErrorMessage, - $uploadCantWriteErrorMessage, - $uploadExtensionErrorMessage, - $uploadErrorMessage, - $groups, - $payload - ); - - $this->minWidth = $minWidth ?? $this->minWidth; - $this->maxWidth = $maxWidth ?? $this->maxWidth; - $this->maxHeight = $maxHeight ?? $this->maxHeight; - $this->minHeight = $minHeight ?? $this->minHeight; - $this->maxRatio = $maxRatio ?? $this->maxRatio; - $this->minRatio = $minRatio ?? $this->minRatio; - $this->minPixels = $minPixels ?? $this->minPixels; - $this->maxPixels = $maxPixels ?? $this->maxPixels; - $this->allowSquare = $allowSquare ?? $this->allowSquare; - $this->allowLandscape = $allowLandscape ?? $this->allowLandscape; - $this->allowPortrait = $allowPortrait ?? $this->allowPortrait; - $this->detectCorrupted = $detectCorrupted ?? $this->detectCorrupted; - $this->sizeNotDetectedMessage = $sizeNotDetectedMessage ?? $this->sizeNotDetectedMessage; - $this->maxWidthMessage = $maxWidthMessage ?? $this->maxWidthMessage; - $this->minWidthMessage = $minWidthMessage ?? $this->minWidthMessage; - $this->maxHeightMessage = $maxHeightMessage ?? $this->maxHeightMessage; - $this->minHeightMessage = $minHeightMessage ?? $this->minHeightMessage; - $this->minPixelsMessage = $minPixelsMessage ?? $this->minPixelsMessage; - $this->maxPixelsMessage = $maxPixelsMessage ?? $this->maxPixelsMessage; - $this->maxRatioMessage = $maxRatioMessage ?? $this->maxRatioMessage; - $this->minRatioMessage = $minRatioMessage ?? $this->minRatioMessage; - $this->allowSquareMessage = $allowSquareMessage ?? $this->allowSquareMessage; - $this->allowLandscapeMessage = $allowLandscapeMessage ?? $this->allowLandscapeMessage; - $this->allowPortraitMessage = $allowPortraitMessage ?? $this->allowPortraitMessage; - $this->corruptedMessage = $corruptedMessage ?? $this->corruptedMessage; - } -} diff --git a/vendor/symfony/validator/Constraints/ImageValidator.php b/vendor/symfony/validator/Constraints/ImageValidator.php deleted file mode 100644 index f199f1d..0000000 --- a/vendor/symfony/validator/Constraints/ImageValidator.php +++ /dev/null @@ -1,237 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\LogicException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * Validates whether a value is a valid image file and is valid - * against minWidth, maxWidth, minHeight and maxHeight constraints. - * - * @author Benjamin Dulau - * @author Bernhard Schussek - */ -class ImageValidator extends FileValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Image) { - throw new UnexpectedTypeException($constraint, Image::class); - } - - $violations = \count($this->context->getViolations()); - - parent::validate($value, $constraint); - - $failed = \count($this->context->getViolations()) !== $violations; - - if ($failed || null === $value || '' === $value) { - return; - } - - if (null === $constraint->minWidth && null === $constraint->maxWidth - && null === $constraint->minHeight && null === $constraint->maxHeight - && null === $constraint->minPixels && null === $constraint->maxPixels - && null === $constraint->minRatio && null === $constraint->maxRatio - && $constraint->allowSquare && $constraint->allowLandscape && $constraint->allowPortrait - && !$constraint->detectCorrupted) { - return; - } - - $size = @getimagesize($value); - - if (empty($size) || (0 === $size[0]) || (0 === $size[1])) { - $this->context->buildViolation($constraint->sizeNotDetectedMessage) - ->setCode(Image::SIZE_NOT_DETECTED_ERROR) - ->addViolation(); - - return; - } - - $width = $size[0]; - $height = $size[1]; - - if ($constraint->minWidth) { - if (!ctype_digit((string) $constraint->minWidth)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum width.', $constraint->minWidth)); - } - - if ($width < $constraint->minWidth) { - $this->context->buildViolation($constraint->minWidthMessage) - ->setParameter('{{ width }}', $width) - ->setParameter('{{ min_width }}', $constraint->minWidth) - ->setCode(Image::TOO_NARROW_ERROR) - ->addViolation(); - - return; - } - } - - if ($constraint->maxWidth) { - if (!ctype_digit((string) $constraint->maxWidth)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum width.', $constraint->maxWidth)); - } - - if ($width > $constraint->maxWidth) { - $this->context->buildViolation($constraint->maxWidthMessage) - ->setParameter('{{ width }}', $width) - ->setParameter('{{ max_width }}', $constraint->maxWidth) - ->setCode(Image::TOO_WIDE_ERROR) - ->addViolation(); - - return; - } - } - - if ($constraint->minHeight) { - if (!ctype_digit((string) $constraint->minHeight)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum height.', $constraint->minHeight)); - } - - if ($height < $constraint->minHeight) { - $this->context->buildViolation($constraint->minHeightMessage) - ->setParameter('{{ height }}', $height) - ->setParameter('{{ min_height }}', $constraint->minHeight) - ->setCode(Image::TOO_LOW_ERROR) - ->addViolation(); - - return; - } - } - - if ($constraint->maxHeight) { - if (!ctype_digit((string) $constraint->maxHeight)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum height.', $constraint->maxHeight)); - } - - if ($height > $constraint->maxHeight) { - $this->context->buildViolation($constraint->maxHeightMessage) - ->setParameter('{{ height }}', $height) - ->setParameter('{{ max_height }}', $constraint->maxHeight) - ->setCode(Image::TOO_HIGH_ERROR) - ->addViolation(); - } - } - - $pixels = $width * $height; - - if (null !== $constraint->minPixels) { - if (!ctype_digit((string) $constraint->minPixels)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum amount of pixels.', $constraint->minPixels)); - } - - if ($pixels < $constraint->minPixels) { - $this->context->buildViolation($constraint->minPixelsMessage) - ->setParameter('{{ pixels }}', $pixels) - ->setParameter('{{ min_pixels }}', $constraint->minPixels) - ->setParameter('{{ height }}', $height) - ->setParameter('{{ width }}', $width) - ->setCode(Image::TOO_FEW_PIXEL_ERROR) - ->addViolation(); - } - } - - if (null !== $constraint->maxPixels) { - if (!ctype_digit((string) $constraint->maxPixels)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum amount of pixels.', $constraint->maxPixels)); - } - - if ($pixels > $constraint->maxPixels) { - $this->context->buildViolation($constraint->maxPixelsMessage) - ->setParameter('{{ pixels }}', $pixels) - ->setParameter('{{ max_pixels }}', $constraint->maxPixels) - ->setParameter('{{ height }}', $height) - ->setParameter('{{ width }}', $width) - ->setCode(Image::TOO_MANY_PIXEL_ERROR) - ->addViolation(); - } - } - - $ratio = round($width / $height, 2); - - if (null !== $constraint->minRatio) { - if (!is_numeric((string) $constraint->minRatio)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid minimum ratio.', $constraint->minRatio)); - } - - if ($ratio < round($constraint->minRatio, 2)) { - $this->context->buildViolation($constraint->minRatioMessage) - ->setParameter('{{ ratio }}', $ratio) - ->setParameter('{{ min_ratio }}', round($constraint->minRatio, 2)) - ->setCode(Image::RATIO_TOO_SMALL_ERROR) - ->addViolation(); - } - } - - if (null !== $constraint->maxRatio) { - if (!is_numeric((string) $constraint->maxRatio)) { - throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum ratio.', $constraint->maxRatio)); - } - - if ($ratio > round($constraint->maxRatio, 2)) { - $this->context->buildViolation($constraint->maxRatioMessage) - ->setParameter('{{ ratio }}', $ratio) - ->setParameter('{{ max_ratio }}', round($constraint->maxRatio, 2)) - ->setCode(Image::RATIO_TOO_BIG_ERROR) - ->addViolation(); - } - } - - if (!$constraint->allowSquare && $width == $height) { - $this->context->buildViolation($constraint->allowSquareMessage) - ->setParameter('{{ width }}', $width) - ->setParameter('{{ height }}', $height) - ->setCode(Image::SQUARE_NOT_ALLOWED_ERROR) - ->addViolation(); - } - - if (!$constraint->allowLandscape && $width > $height) { - $this->context->buildViolation($constraint->allowLandscapeMessage) - ->setParameter('{{ width }}', $width) - ->setParameter('{{ height }}', $height) - ->setCode(Image::LANDSCAPE_NOT_ALLOWED_ERROR) - ->addViolation(); - } - - if (!$constraint->allowPortrait && $width < $height) { - $this->context->buildViolation($constraint->allowPortraitMessage) - ->setParameter('{{ width }}', $width) - ->setParameter('{{ height }}', $height) - ->setCode(Image::PORTRAIT_NOT_ALLOWED_ERROR) - ->addViolation(); - } - - if ($constraint->detectCorrupted) { - if (!\function_exists('imagecreatefromstring')) { - throw new LogicException('Corrupted images detection requires installed and enabled GD extension.'); - } - - $resource = @imagecreatefromstring(file_get_contents($value)); - - if (false === $resource) { - $this->context->buildViolation($constraint->corruptedMessage) - ->setCode(Image::CORRUPTED_IMAGE_ERROR) - ->addViolation(); - - return; - } - - imagedestroy($resource); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Ip.php b/vendor/symfony/validator/Constraints/Ip.php deleted file mode 100644 index 0e41240..0000000 --- a/vendor/symfony/validator/Constraints/Ip.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * Validates that a value is a valid IP address. - * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - * @author Joseph Bielawski - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Ip extends Constraint -{ - public const V4 = '4'; - public const V6 = '6'; - public const ALL = 'all'; - - // adds FILTER_FLAG_NO_PRIV_RANGE flag (skip private ranges) - public const V4_NO_PRIV = '4_no_priv'; - public const V6_NO_PRIV = '6_no_priv'; - public const ALL_NO_PRIV = 'all_no_priv'; - - // adds FILTER_FLAG_NO_RES_RANGE flag (skip reserved ranges) - public const V4_NO_RES = '4_no_res'; - public const V6_NO_RES = '6_no_res'; - public const ALL_NO_RES = 'all_no_res'; - - // adds FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags (skip both) - public const V4_ONLY_PUBLIC = '4_public'; - public const V6_ONLY_PUBLIC = '6_public'; - public const ALL_ONLY_PUBLIC = 'all_public'; - - public const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; - - protected static $versions = [ - self::V4, - self::V6, - self::ALL, - - self::V4_NO_PRIV, - self::V6_NO_PRIV, - self::ALL_NO_PRIV, - - self::V4_NO_RES, - self::V6_NO_RES, - self::ALL_NO_RES, - - self::V4_ONLY_PUBLIC, - self::V6_ONLY_PUBLIC, - self::ALL_ONLY_PUBLIC, - ]; - - protected static $errorNames = [ - self::INVALID_IP_ERROR => 'INVALID_IP_ERROR', - ]; - - public $version = self::V4; - - public $message = 'This is not a valid IP address.'; - - public $normalizer; - - /** - * {@inheritdoc} - */ - public function __construct( - array $options = null, - string $version = null, - string $message = null, - callable $normalizer = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->version = $version ?? $this->version; - $this->message = $message ?? $this->message; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (!\in_array($this->version, self::$versions)) { - throw new ConstraintDefinitionException(sprintf('The option "version" must be one of "%s".', implode('", "', self::$versions))); - } - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/IpValidator.php b/vendor/symfony/validator/Constraints/IpValidator.php deleted file mode 100644 index e48d41e..0000000 --- a/vendor/symfony/validator/Constraints/IpValidator.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid IP address. - * - * @author Bernhard Schussek - * @author Joseph Bielawski - */ -class IpValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Ip) { - throw new UnexpectedTypeException($constraint, Ip::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - switch ($constraint->version) { - case Ip::V4: - $flag = \FILTER_FLAG_IPV4; - break; - - case Ip::V6: - $flag = \FILTER_FLAG_IPV6; - break; - - case Ip::V4_NO_PRIV: - $flag = \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_PRIV_RANGE; - break; - - case Ip::V6_NO_PRIV: - $flag = \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_PRIV_RANGE; - break; - - case Ip::ALL_NO_PRIV: - $flag = \FILTER_FLAG_NO_PRIV_RANGE; - break; - - case Ip::V4_NO_RES: - $flag = \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_RES_RANGE; - break; - - case Ip::V6_NO_RES: - $flag = \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_RES_RANGE; - break; - - case Ip::ALL_NO_RES: - $flag = \FILTER_FLAG_NO_RES_RANGE; - break; - - case Ip::V4_ONLY_PUBLIC: - $flag = \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE; - break; - - case Ip::V6_ONLY_PUBLIC: - $flag = \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE; - break; - - case Ip::ALL_ONLY_PUBLIC: - $flag = \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE; - break; - - default: - $flag = 0; - break; - } - - if (!filter_var($value, \FILTER_VALIDATE_IP, $flag)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Ip::INVALID_IP_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/IsFalse.php b/vendor/symfony/validator/Constraints/IsFalse.php deleted file mode 100644 index 460aafc..0000000 --- a/vendor/symfony/validator/Constraints/IsFalse.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class IsFalse extends Constraint -{ - public const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; - - protected static $errorNames = [ - self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', - ]; - - public $message = 'This value should be false.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/IsFalseValidator.php b/vendor/symfony/validator/Constraints/IsFalseValidator.php deleted file mode 100644 index 79c4234..0000000 --- a/vendor/symfony/validator/Constraints/IsFalseValidator.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class IsFalseValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof IsFalse) { - throw new UnexpectedTypeException($constraint, IsFalse::class); - } - - if (null === $value || false === $value || 0 === $value || '0' === $value) { - return; - } - - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(IsFalse::NOT_FALSE_ERROR) - ->addViolation(); - } -} diff --git a/vendor/symfony/validator/Constraints/IsNull.php b/vendor/symfony/validator/Constraints/IsNull.php deleted file mode 100644 index 2a8439f..0000000 --- a/vendor/symfony/validator/Constraints/IsNull.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class IsNull extends Constraint -{ - public const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; - - protected static $errorNames = [ - self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', - ]; - - public $message = 'This value should be null.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/IsNullValidator.php b/vendor/symfony/validator/Constraints/IsNullValidator.php deleted file mode 100644 index b6e7817..0000000 --- a/vendor/symfony/validator/Constraints/IsNullValidator.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class IsNullValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof IsNull) { - throw new UnexpectedTypeException($constraint, IsNull::class); - } - - if (null !== $value) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(IsNull::NOT_NULL_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/IsTrue.php b/vendor/symfony/validator/Constraints/IsTrue.php deleted file mode 100644 index 7b95475..0000000 --- a/vendor/symfony/validator/Constraints/IsTrue.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class IsTrue extends Constraint -{ - public const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; - - protected static $errorNames = [ - self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', - ]; - - public $message = 'This value should be true.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/IsTrueValidator.php b/vendor/symfony/validator/Constraints/IsTrueValidator.php deleted file mode 100644 index 6088f6d..0000000 --- a/vendor/symfony/validator/Constraints/IsTrueValidator.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class IsTrueValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof IsTrue) { - throw new UnexpectedTypeException($constraint, IsTrue::class); - } - - if (null === $value) { - return; - } - - if (true !== $value && 1 !== $value && '1' !== $value) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(IsTrue::NOT_TRUE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Isbn.php b/vendor/symfony/validator/Constraints/Isbn.php deleted file mode 100644 index b95dfeb..0000000 --- a/vendor/symfony/validator/Constraints/Isbn.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author The Whole Life To Learn - * @author Manuel Reinhard - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Isbn extends Constraint -{ - public const ISBN_10 = 'isbn10'; - public const ISBN_13 = 'isbn13'; - - public const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; - public const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; - public const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; - public const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; - public const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; - - protected static $errorNames = [ - self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', - self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR', - ]; - - public $isbn10Message = 'This value is not a valid ISBN-10.'; - public $isbn13Message = 'This value is not a valid ISBN-13.'; - public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'; - public $type; - public $message; - - /** - * {@inheritdoc} - * - * @param string|array|null $type The ISBN standard to validate or a set of options - */ - public function __construct( - $type = null, - string $message = null, - string $isbn10Message = null, - string $isbn13Message = null, - string $bothIsbnMessage = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (\is_array($type)) { - $options = array_merge($type, $options); - } elseif (null !== $type) { - $options['value'] = $type; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->isbn10Message = $isbn10Message ?? $this->isbn10Message; - $this->isbn13Message = $isbn13Message ?? $this->isbn13Message; - $this->bothIsbnMessage = $bothIsbnMessage ?? $this->bothIsbnMessage; - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'type'; - } -} diff --git a/vendor/symfony/validator/Constraints/IsbnValidator.php b/vendor/symfony/validator/Constraints/IsbnValidator.php deleted file mode 100644 index d015a1d..0000000 --- a/vendor/symfony/validator/Constraints/IsbnValidator.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether the value is a valid ISBN-10 or ISBN-13. - * - * @author The Whole Life To Learn - * @author Manuel Reinhard - * @author Bernhard Schussek - * - * @see https://en.wikipedia.org/wiki/Isbn - */ -class IsbnValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Isbn) { - throw new UnexpectedTypeException($constraint, Isbn::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - $canonical = str_replace('-', '', $value); - - // Explicitly validate against ISBN-10 - if (Isbn::ISBN_10 === $constraint->type) { - if (true !== ($code = $this->validateIsbn10($canonical))) { - $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode($code) - ->addViolation(); - } - - return; - } - - // Explicitly validate against ISBN-13 - if (Isbn::ISBN_13 === $constraint->type) { - if (true !== ($code = $this->validateIsbn13($canonical))) { - $this->context->buildViolation($this->getMessage($constraint, $constraint->type)) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode($code) - ->addViolation(); - } - - return; - } - - // Try both ISBNs - - // First, try ISBN-10 - $code = $this->validateIsbn10($canonical); - - // The ISBN can only be an ISBN-13 if the value was too long for ISBN-10 - if (Isbn::TOO_LONG_ERROR === $code) { - // Try ISBN-13 now - $code = $this->validateIsbn13($canonical); - - // If too short, this means we have 11 or 12 digits - if (Isbn::TOO_SHORT_ERROR === $code) { - $code = Isbn::TYPE_NOT_RECOGNIZED_ERROR; - } - } - - if (true !== $code) { - $this->context->buildViolation($this->getMessage($constraint)) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode($code) - ->addViolation(); - } - } - - protected function validateIsbn10(string $isbn) - { - // Choose an algorithm so that ERROR_INVALID_CHARACTERS is preferred - // over ERROR_TOO_SHORT/ERROR_TOO_LONG - // Otherwise "0-45122-5244" passes, but "0-45122_5244" reports - // "too long" - - // Error priority: - // 1. ERROR_INVALID_CHARACTERS - // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG - // 3. ERROR_CHECKSUM_FAILED - - $checkSum = 0; - - for ($i = 0; $i < 10; ++$i) { - // If we test the length before the loop, we get an ERROR_TOO_SHORT - // when actually an ERROR_INVALID_CHARACTERS is wanted, e.g. for - // "0-45122_5244" (typo) - if (!isset($isbn[$i])) { - return Isbn::TOO_SHORT_ERROR; - } - - if ('X' === $isbn[$i]) { - $digit = 10; - } elseif (ctype_digit($isbn[$i])) { - $digit = $isbn[$i]; - } else { - return Isbn::INVALID_CHARACTERS_ERROR; - } - - $checkSum += $digit * (10 - $i); - } - - if (isset($isbn[$i])) { - return Isbn::TOO_LONG_ERROR; - } - - return 0 === $checkSum % 11 ? true : Isbn::CHECKSUM_FAILED_ERROR; - } - - protected function validateIsbn13(string $isbn) - { - // Error priority: - // 1. ERROR_INVALID_CHARACTERS - // 2. ERROR_TOO_SHORT/ERROR_TOO_LONG - // 3. ERROR_CHECKSUM_FAILED - - if (!ctype_digit($isbn)) { - return Isbn::INVALID_CHARACTERS_ERROR; - } - - $length = \strlen($isbn); - - if ($length < 13) { - return Isbn::TOO_SHORT_ERROR; - } - - if ($length > 13) { - return Isbn::TOO_LONG_ERROR; - } - - $checkSum = 0; - - for ($i = 0; $i < 13; $i += 2) { - $checkSum += $isbn[$i]; - } - - for ($i = 1; $i < 12; $i += 2) { - $checkSum += $isbn[$i] * 3; - } - - return 0 === $checkSum % 10 ? true : Isbn::CHECKSUM_FAILED_ERROR; - } - - protected function getMessage(Isbn $constraint, string $type = null) - { - if (null !== $constraint->message) { - return $constraint->message; - } elseif (Isbn::ISBN_10 === $type) { - return $constraint->isbn10Message; - } elseif (Isbn::ISBN_13 === $type) { - return $constraint->isbn13Message; - } - - return $constraint->bothIsbnMessage; - } -} diff --git a/vendor/symfony/validator/Constraints/Isin.php b/vendor/symfony/validator/Constraints/Isin.php deleted file mode 100644 index 08fa60d..0000000 --- a/vendor/symfony/validator/Constraints/Isin.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Laurent Masforné - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Isin extends Constraint -{ - public const VALIDATION_LENGTH = 12; - public const VALIDATION_PATTERN = '/[A-Z]{2}[A-Z0-9]{9}[0-9]{1}/'; - - public const INVALID_LENGTH_ERROR = '88738dfc-9ed5-ba1e-aebe-402a2a9bf58e'; - public const INVALID_PATTERN_ERROR = '3d08ce0-ded9-a93d-9216-17ac21265b65e'; - public const INVALID_CHECKSUM_ERROR = '32089b-0ee1-93ba-399e-aa232e62f2d29d'; - - protected static $errorNames = [ - self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', - self::INVALID_PATTERN_ERROR => 'INVALID_PATTERN_ERROR', - self::INVALID_CHECKSUM_ERROR => 'INVALID_CHECKSUM_ERROR', - ]; - - public $message = 'This value is not a valid International Securities Identification Number (ISIN).'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/IsinValidator.php b/vendor/symfony/validator/Constraints/IsinValidator.php deleted file mode 100644 index d5e4d9d..0000000 --- a/vendor/symfony/validator/Constraints/IsinValidator.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Laurent Masforné - * - * @see https://en.wikipedia.org/wiki/International_Securities_Identification_Number - */ -class IsinValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Isin) { - throw new UnexpectedTypeException($constraint, Isin::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = strtoupper($value); - - if (Isin::VALIDATION_LENGTH !== \strlen($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Isin::INVALID_LENGTH_ERROR) - ->addViolation(); - - return; - } - - if (!preg_match(Isin::VALIDATION_PATTERN, $value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Isin::INVALID_PATTERN_ERROR) - ->addViolation(); - - return; - } - - if (!$this->isCorrectChecksum($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Isin::INVALID_CHECKSUM_ERROR) - ->addViolation(); - } - } - - private function isCorrectChecksum(string $input): bool - { - $characters = str_split($input); - foreach ($characters as $i => $char) { - $characters[$i] = \intval($char, 36); - } - $number = implode('', $characters); - - return 0 === $this->context->getValidator()->validate($number, new Luhn())->count(); - } -} diff --git a/vendor/symfony/validator/Constraints/Issn.php b/vendor/symfony/validator/Constraints/Issn.php deleted file mode 100644 index b3b7b21..0000000 --- a/vendor/symfony/validator/Constraints/Issn.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Antonio J. García Lagar - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Issn extends Constraint -{ - public const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; - public const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; - public const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; - public const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; - public const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; - public const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; - - protected static $errorNames = [ - self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', - self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', - self::MISSING_HYPHEN_ERROR => 'MISSING_HYPHEN_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::INVALID_CASE_ERROR => 'INVALID_CASE_ERROR', - self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - ]; - - public $message = 'This value is not a valid ISSN.'; - public $caseSensitive = false; - public $requireHyphen = false; - - public function __construct( - array $options = null, - string $message = null, - bool $caseSensitive = null, - bool $requireHyphen = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->caseSensitive = $caseSensitive ?? $this->caseSensitive; - $this->requireHyphen = $requireHyphen ?? $this->requireHyphen; - } -} diff --git a/vendor/symfony/validator/Constraints/IssnValidator.php b/vendor/symfony/validator/Constraints/IssnValidator.php deleted file mode 100644 index aa83201..0000000 --- a/vendor/symfony/validator/Constraints/IssnValidator.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether the value is a valid ISSN. - * - * @author Antonio J. García Lagar - * @author Bernhard Schussek - * - * @see https://en.wikipedia.org/wiki/Issn - */ -class IssnValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Issn) { - throw new UnexpectedTypeException($constraint, Issn::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - $canonical = $value; - - // 1234-567X - // ^ - if (isset($canonical[4]) && '-' === $canonical[4]) { - // remove hyphen - $canonical = substr($canonical, 0, 4).substr($canonical, 5); - } elseif ($constraint->requireHyphen) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::MISSING_HYPHEN_ERROR) - ->addViolation(); - - return; - } - - $length = \strlen($canonical); - - if ($length < 8) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::TOO_SHORT_ERROR) - ->addViolation(); - - return; - } - - if ($length > 8) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::TOO_LONG_ERROR) - ->addViolation(); - - return; - } - - // 1234567X - // ^^^^^^^ digits only - if (!ctype_digit(substr($canonical, 0, 7))) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - // 1234567X - // ^ digit, x or X - if (!ctype_digit($canonical[7]) && 'x' !== $canonical[7] && 'X' !== $canonical[7]) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - // 1234567X - // ^ case-sensitive? - if ($constraint->caseSensitive && 'x' === $canonical[7]) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::INVALID_CASE_ERROR) - ->addViolation(); - - return; - } - - // Calculate a checksum. "X" equals 10. - $checkSum = 'X' === $canonical[7] || 'x' === $canonical[7] ? 10 : $canonical[7]; - - for ($i = 0; $i < 7; ++$i) { - // Multiply the first digit by 8, the second by 7, etc. - $checkSum += (8 - $i) * (int) $canonical[$i]; - } - - if (0 !== $checkSum % 11) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Issn::CHECKSUM_FAILED_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Json.php b/vendor/symfony/validator/Constraints/Json.php deleted file mode 100644 index 4388858..0000000 --- a/vendor/symfony/validator/Constraints/Json.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Imad ZAIRIG - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Json extends Constraint -{ - public const INVALID_JSON_ERROR = '0789c8ad-2d2b-49a4-8356-e2ce63998504'; - - protected static $errorNames = [ - self::INVALID_JSON_ERROR => 'INVALID_JSON_ERROR', - ]; - - public $message = 'This value should be valid JSON.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/JsonValidator.php b/vendor/symfony/validator/Constraints/JsonValidator.php deleted file mode 100644 index e553ae3..0000000 --- a/vendor/symfony/validator/Constraints/JsonValidator.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Imad ZAIRIG - */ -class JsonValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Json) { - throw new UnexpectedTypeException($constraint, Json::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedTypeException($value, 'string'); - } - - $value = (string) $value; - - json_decode($value); - - if (\JSON_ERROR_NONE !== json_last_error()) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Json::INVALID_JSON_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Language.php b/vendor/symfony/validator/Constraints/Language.php deleted file mode 100644 index a8204da..0000000 --- a/vendor/symfony/validator/Constraints/Language.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Languages; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Language extends Constraint -{ - public const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; - - protected static $errorNames = [ - self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', - ]; - - public $message = 'This value is not a valid language.'; - public $alpha3 = false; - - public function __construct( - array $options = null, - string $message = null, - bool $alpha3 = null, - array $groups = null, - $payload = null - ) { - if (!class_exists(Languages::class)) { - throw new LogicException('The Intl component is required to use the Language constraint. Try running "composer require symfony/intl".'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->alpha3 = $alpha3 ?? $this->alpha3; - } -} diff --git a/vendor/symfony/validator/Constraints/LanguageValidator.php b/vendor/symfony/validator/Constraints/LanguageValidator.php deleted file mode 100644 index 911a713..0000000 --- a/vendor/symfony/validator/Constraints/LanguageValidator.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Languages; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid language code. - * - * @author Bernhard Schussek - */ -class LanguageValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Language) { - throw new UnexpectedTypeException($constraint, Language::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if ($constraint->alpha3 ? !Languages::alpha3CodeExists($value) : !Languages::exists($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Language::NO_SUCH_LANGUAGE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Length.php b/vendor/symfony/validator/Constraints/Length.php deleted file mode 100644 index 29a89a3..0000000 --- a/vendor/symfony/validator/Constraints/Length.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; -use Symfony\Component\Validator\Exception\MissingOptionsException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Length extends Constraint -{ - public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; - public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; - public const NOT_EQUAL_LENGTH_ERROR = '4b6f5c76-22b4-409d-af16-fbe823ba9332'; - public const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; - - protected static $errorNames = [ - self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', - self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', - self::NOT_EQUAL_LENGTH_ERROR => 'NOT_EQUAL_LENGTH_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - ]; - - public $maxMessage = 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.'; - public $minMessage = 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.'; - public $exactMessage = 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'; - public $charsetMessage = 'This value does not match the expected {{ charset }} charset.'; - public $max; - public $min; - public $charset = 'UTF-8'; - public $normalizer; - public $allowEmptyString = false; - - /** - * {@inheritdoc} - * - * @param int|array|null $exactly The expected exact length or a set of options - */ - public function __construct( - $exactly = null, - int $min = null, - int $max = null, - string $charset = null, - callable $normalizer = null, - string $exactMessage = null, - string $minMessage = null, - string $maxMessage = null, - string $charsetMessage = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (\is_array($exactly)) { - $options = array_merge($exactly, $options); - $exactly = $options['value'] ?? null; - } - - $min = $min ?? $options['min'] ?? null; - $max = $max ?? $options['max'] ?? null; - - unset($options['value'], $options['min'], $options['max']); - - if (null !== $exactly && null === $min && null === $max) { - $min = $max = $exactly; - } - - parent::__construct($options, $groups, $payload); - - $this->min = $min; - $this->max = $max; - $this->charset = $charset ?? $this->charset; - $this->normalizer = $normalizer ?? $this->normalizer; - $this->exactMessage = $exactMessage ?? $this->exactMessage; - $this->minMessage = $minMessage ?? $this->minMessage; - $this->maxMessage = $maxMessage ?? $this->maxMessage; - $this->charsetMessage = $charsetMessage ?? $this->charsetMessage; - - if (null === $this->min && null === $this->max) { - throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint "%s".', __CLASS__), ['min', 'max']); - } - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - - if (isset($options['allowEmptyString'])) { - trigger_deprecation('symfony/validator', '5.2', sprintf('The "allowEmptyString" option of the "%s" constraint is deprecated.', self::class)); - } - } -} diff --git a/vendor/symfony/validator/Constraints/LengthValidator.php b/vendor/symfony/validator/Constraints/LengthValidator.php deleted file mode 100644 index c4bbffe..0000000 --- a/vendor/symfony/validator/Constraints/LengthValidator.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class LengthValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Length) { - throw new UnexpectedTypeException($constraint, Length::class); - } - - if (null === $value || ('' === $value && $constraint->allowEmptyString)) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $stringValue = (string) $value; - - if (null !== $constraint->normalizer) { - $stringValue = ($constraint->normalizer)($stringValue); - } - - try { - $invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset); - } catch (\ValueError $e) { - if (!str_starts_with($e->getMessage(), 'mb_check_encoding(): Argument #2 ($encoding) must be a valid encoding')) { - throw $e; - } - - $invalidCharset = true; - } - - if ($invalidCharset) { - $this->context->buildViolation($constraint->charsetMessage) - ->setParameter('{{ value }}', $this->formatValue($stringValue)) - ->setParameter('{{ charset }}', $constraint->charset) - ->setInvalidValue($value) - ->setCode(Length::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - $length = mb_strlen($stringValue, $constraint->charset); - - if (null !== $constraint->max && $length > $constraint->max) { - $exactlyOptionEnabled = $constraint->min == $constraint->max; - - $this->context->buildViolation($exactlyOptionEnabled ? $constraint->exactMessage : $constraint->maxMessage) - ->setParameter('{{ value }}', $this->formatValue($stringValue)) - ->setParameter('{{ limit }}', $constraint->max) - ->setInvalidValue($value) - ->setPlural((int) $constraint->max) - ->setCode($exactlyOptionEnabled ? Length::NOT_EQUAL_LENGTH_ERROR : Length::TOO_LONG_ERROR) - ->addViolation(); - - return; - } - - if (null !== $constraint->min && $length < $constraint->min) { - $exactlyOptionEnabled = $constraint->min == $constraint->max; - - $this->context->buildViolation($exactlyOptionEnabled ? $constraint->exactMessage : $constraint->minMessage) - ->setParameter('{{ value }}', $this->formatValue($stringValue)) - ->setParameter('{{ limit }}', $constraint->min) - ->setInvalidValue($value) - ->setPlural((int) $constraint->min) - ->setCode($exactlyOptionEnabled ? Length::NOT_EQUAL_LENGTH_ERROR : Length::TOO_SHORT_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/LessThan.php b/vendor/symfony/validator/Constraints/LessThan.php deleted file mode 100644 index acd6c9e..0000000 --- a/vendor/symfony/validator/Constraints/LessThan.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class LessThan extends AbstractComparison -{ - public const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; - - protected static $errorNames = [ - self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - ]; - - public $message = 'This value should be less than {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/LessThanOrEqual.php b/vendor/symfony/validator/Constraints/LessThanOrEqual.php deleted file mode 100644 index 6f72845..0000000 --- a/vendor/symfony/validator/Constraints/LessThanOrEqual.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class LessThanOrEqual extends AbstractComparison -{ - public const TOO_HIGH_ERROR = '30fbb013-d015-4232-8b3b-8f3be97a7e14'; - - protected static $errorNames = [ - self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - ]; - - public $message = 'This value should be less than or equal to {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php b/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php deleted file mode 100644 index f7f4c8b..0000000 --- a/vendor/symfony/validator/Constraints/LessThanOrEqualValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are less than or equal to the previous (<=). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class LessThanOrEqualValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return null === $value2 || $value1 <= $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return LessThanOrEqual::TOO_HIGH_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/LessThanValidator.php b/vendor/symfony/validator/Constraints/LessThanValidator.php deleted file mode 100644 index 64e1075..0000000 --- a/vendor/symfony/validator/Constraints/LessThanValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are less than the previous (<). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class LessThanValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return null === $value2 || $value1 < $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return LessThan::TOO_HIGH_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/Locale.php b/vendor/symfony/validator/Constraints/Locale.php deleted file mode 100644 index 43c46cc..0000000 --- a/vendor/symfony/validator/Constraints/Locale.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Locales; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\LogicException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Locale extends Constraint -{ - public const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; - - protected static $errorNames = [ - self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', - ]; - - public $message = 'This value is not a valid locale.'; - public $canonicalize = true; - - public function __construct( - array $options = null, - string $message = null, - bool $canonicalize = null, - array $groups = null, - $payload = null - ) { - if (!class_exists(Locales::class)) { - throw new LogicException('The Intl component is required to use the Locale constraint. Try running "composer require symfony/intl".'); - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->canonicalize = $canonicalize ?? $this->canonicalize; - } -} diff --git a/vendor/symfony/validator/Constraints/LocaleValidator.php b/vendor/symfony/validator/Constraints/LocaleValidator.php deleted file mode 100644 index 860273d..0000000 --- a/vendor/symfony/validator/Constraints/LocaleValidator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Locales; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid locale code. - * - * @author Bernhard Schussek - */ -class LocaleValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Locale) { - throw new UnexpectedTypeException($constraint, Locale::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $inputValue = (string) $value; - $value = $inputValue; - if ($constraint->canonicalize) { - $value = \Locale::canonicalize($value); - } - - if (!Locales::exists($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($inputValue)) - ->setCode(Locale::NO_SUCH_LOCALE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Luhn.php b/vendor/symfony/validator/Constraints/Luhn.php deleted file mode 100644 index b2d2c29..0000000 --- a/vendor/symfony/validator/Constraints/Luhn.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * Metadata for the LuhnValidator. - * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Tim Nagel - * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Luhn extends Constraint -{ - public const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; - public const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; - - protected static $errorNames = [ - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', - ]; - - public $message = 'Invalid card number.'; - - public function __construct( - array $options = null, - string $message = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/LuhnValidator.php b/vendor/symfony/validator/Constraints/LuhnValidator.php deleted file mode 100644 index 0f568fa..0000000 --- a/vendor/symfony/validator/Constraints/LuhnValidator.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates a PAN using the LUHN Algorithm. - * - * For a list of example card numbers that are used to test this - * class, please see the LuhnValidatorTest class. - * - * @see http://en.wikipedia.org/wiki/Luhn_algorithm - * - * @author Tim Nagel - * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ - * @author Bernhard Schussek - */ -class LuhnValidator extends ConstraintValidator -{ - /** - * Validates a credit card number with the Luhn algorithm. - * - * @param mixed $value - * - * @throws UnexpectedTypeException when the given credit card number is no string - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Luhn) { - throw new UnexpectedTypeException($constraint, Luhn::class); - } - - if (null === $value || '' === $value) { - return; - } - - // Work with strings only, because long numbers are represented as floats - // internally and don't work with strlen() - if (!\is_string($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (!ctype_digit($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Luhn::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - $checkSum = 0; - $length = \strlen($value); - - // Starting with the last digit and walking left, add every second - // digit to the check sum - // e.g. 7 9 9 2 7 3 9 8 7 1 3 - // ^ ^ ^ ^ ^ ^ - // = 7 + 9 + 7 + 9 + 7 + 3 - for ($i = $length - 1; $i >= 0; $i -= 2) { - $checkSum += $value[$i]; - } - - // Starting with the second last digit and walking left, double every - // second digit and add it to the check sum - // For doubles greater than 9, sum the individual digits - // e.g. 7 9 9 2 7 3 9 8 7 1 3 - // ^ ^ ^ ^ ^ - // = 1+8 + 4 + 6 + 1+6 + 2 - for ($i = $length - 2; $i >= 0; $i -= 2) { - $checkSum += array_sum(str_split((int) $value[$i] * 2)); - } - - if (0 === $checkSum || 0 !== $checkSum % 10) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Luhn::CHECKSUM_FAILED_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Negative.php b/vendor/symfony/validator/Constraints/Negative.php deleted file mode 100644 index c13ebcb..0000000 --- a/vendor/symfony/validator/Constraints/Negative.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Jan Schädlich - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Negative extends LessThan -{ - use ZeroComparisonConstraintTrait; - - public $message = 'This value should be negative.'; -} diff --git a/vendor/symfony/validator/Constraints/NegativeOrZero.php b/vendor/symfony/validator/Constraints/NegativeOrZero.php deleted file mode 100644 index 5be735c..0000000 --- a/vendor/symfony/validator/Constraints/NegativeOrZero.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Jan Schädlich - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NegativeOrZero extends LessThanOrEqual -{ - use ZeroComparisonConstraintTrait; - - public $message = 'This value should be either negative or zero.'; -} diff --git a/vendor/symfony/validator/Constraints/NotBlank.php b/vendor/symfony/validator/Constraints/NotBlank.php deleted file mode 100644 index 6f98d5a..0000000 --- a/vendor/symfony/validator/Constraints/NotBlank.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NotBlank extends Constraint -{ - public const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; - - protected static $errorNames = [ - self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', - ]; - - public $message = 'This value should not be blank.'; - public $allowNull = false; - public $normalizer; - - public function __construct(array $options = null, string $message = null, bool $allowNull = null, callable $normalizer = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - $this->allowNull = $allowNull ?? $this->allowNull; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/NotBlankValidator.php b/vendor/symfony/validator/Constraints/NotBlankValidator.php deleted file mode 100644 index 86af061..0000000 --- a/vendor/symfony/validator/Constraints/NotBlankValidator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - * @author Kévin Dunglas - */ -class NotBlankValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof NotBlank) { - throw new UnexpectedTypeException($constraint, NotBlank::class); - } - - if ($constraint->allowNull && null === $value) { - return; - } - - if (\is_string($value) && null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - if (false === $value || (empty($value) && '0' != $value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(NotBlank::IS_BLANK_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/NotCompromisedPassword.php b/vendor/symfony/validator/Constraints/NotCompromisedPassword.php deleted file mode 100644 index 213bde2..0000000 --- a/vendor/symfony/validator/Constraints/NotCompromisedPassword.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * Checks if a password has been leaked in a data breach. - * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NotCompromisedPassword extends Constraint -{ - public const COMPROMISED_PASSWORD_ERROR = 'd9bcdbfe-a9d6-4bfa-a8ff-da5fd93e0f6d'; - - protected static $errorNames = [self::COMPROMISED_PASSWORD_ERROR => 'COMPROMISED_PASSWORD_ERROR']; - - public $message = 'This password has been leaked in a data breach, it must not be used. Please use another password.'; - public $threshold = 1; - public $skipOnError = false; - - public function __construct( - array $options = null, - string $message = null, - int $threshold = null, - bool $skipOnError = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->threshold = $threshold ?? $this->threshold; - $this->skipOnError = $skipOnError ?? $this->skipOnError; - } -} diff --git a/vendor/symfony/validator/Constraints/NotCompromisedPasswordValidator.php b/vendor/symfony/validator/Constraints/NotCompromisedPasswordValidator.php deleted file mode 100644 index adcdb7a..0000000 --- a/vendor/symfony/validator/Constraints/NotCompromisedPasswordValidator.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\HttpClient\HttpClient; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * Checks if a password has been leaked in a data breach using haveibeenpwned.com's API. - * Use a k-anonymity model to protect the password being searched for. - * - * @see https://haveibeenpwned.com/API/v2#SearchingPwnedPasswordsByRange - * - * @author Kévin Dunglas - */ -class NotCompromisedPasswordValidator extends ConstraintValidator -{ - private const DEFAULT_API_ENDPOINT = 'https://api.pwnedpasswords.com/range/%s'; - - private $httpClient; - private $charset; - private $enabled; - private $endpoint; - - public function __construct(HttpClientInterface $httpClient = null, string $charset = 'UTF-8', bool $enabled = true, string $endpoint = null) - { - if (null === $httpClient && !class_exists(HttpClient::class)) { - throw new \LogicException(sprintf('The "%s" class requires the "HttpClient" component. Try running "composer require symfony/http-client".', self::class)); - } - - $this->httpClient = $httpClient ?? HttpClient::create(); - $this->charset = $charset; - $this->enabled = $enabled; - $this->endpoint = $endpoint ?? self::DEFAULT_API_ENDPOINT; - } - - /** - * {@inheritdoc} - * - * @throws ExceptionInterface - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof NotCompromisedPassword) { - throw new UnexpectedTypeException($constraint, NotCompromisedPassword::class); - } - - if (!$this->enabled) { - return; - } - - if (null !== $value && !is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - if ('' === $value) { - return; - } - - if ('UTF-8' !== $this->charset) { - $value = mb_convert_encoding($value, 'UTF-8', $this->charset); - } - - $hash = strtoupper(sha1($value)); - $hashPrefix = substr($hash, 0, 5); - $url = sprintf($this->endpoint, $hashPrefix); - - try { - $result = $this->httpClient->request('GET', $url)->getContent(); - } catch (ExceptionInterface $e) { - if ($constraint->skipOnError) { - return; - } - - throw $e; - } - - foreach (explode("\r\n", $result) as $line) { - [$hashSuffix, $count] = explode(':', $line); - - if ($hashPrefix.$hashSuffix === $hash && $constraint->threshold <= (int) $count) { - $this->context->buildViolation($constraint->message) - ->setCode(NotCompromisedPassword::COMPROMISED_PASSWORD_ERROR) - ->addViolation(); - - return; - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/NotEqualTo.php b/vendor/symfony/validator/Constraints/NotEqualTo.php deleted file mode 100644 index 4b2accd..0000000 --- a/vendor/symfony/validator/Constraints/NotEqualTo.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NotEqualTo extends AbstractComparison -{ - public const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; - - protected static $errorNames = [ - self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', - ]; - - public $message = 'This value should not be equal to {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/NotEqualToValidator.php b/vendor/symfony/validator/Constraints/NotEqualToValidator.php deleted file mode 100644 index b80c5ea..0000000 --- a/vendor/symfony/validator/Constraints/NotEqualToValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values are all unequal (!=). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class NotEqualToValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return $value1 != $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return NotEqualTo::IS_EQUAL_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/NotIdenticalTo.php b/vendor/symfony/validator/Constraints/NotIdenticalTo.php deleted file mode 100644 index 82ee014..0000000 --- a/vendor/symfony/validator/Constraints/NotIdenticalTo.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NotIdenticalTo extends AbstractComparison -{ - public const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; - - protected static $errorNames = [ - self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', - ]; - - public $message = 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'; -} diff --git a/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php b/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php deleted file mode 100644 index 3ea8b5a..0000000 --- a/vendor/symfony/validator/Constraints/NotIdenticalToValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Validates values aren't identical (!==). - * - * @author Daniel Holmes - * @author Bernhard Schussek - */ -class NotIdenticalToValidator extends AbstractComparisonValidator -{ - /** - * {@inheritdoc} - */ - protected function compareValues($value1, $value2) - { - return $value1 !== $value2; - } - - /** - * {@inheritdoc} - */ - protected function getErrorCode() - { - return NotIdenticalTo::IS_IDENTICAL_ERROR; - } -} diff --git a/vendor/symfony/validator/Constraints/NotNull.php b/vendor/symfony/validator/Constraints/NotNull.php deleted file mode 100644 index 85783c7..0000000 --- a/vendor/symfony/validator/Constraints/NotNull.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class NotNull extends Constraint -{ - public const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; - - protected static $errorNames = [ - self::IS_NULL_ERROR => 'IS_NULL_ERROR', - ]; - - public $message = 'This value should not be null.'; - - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - parent::__construct($options ?? [], $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/NotNullValidator.php b/vendor/symfony/validator/Constraints/NotNullValidator.php deleted file mode 100644 index d02fcc4..0000000 --- a/vendor/symfony/validator/Constraints/NotNullValidator.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class NotNullValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof NotNull) { - throw new UnexpectedTypeException($constraint, NotNull::class); - } - - if (null === $value) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(NotNull::IS_NULL_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/NumberConstraintTrait.php b/vendor/symfony/validator/Constraints/NumberConstraintTrait.php deleted file mode 100644 index 3229871..0000000 --- a/vendor/symfony/validator/Constraints/NumberConstraintTrait.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -trigger_deprecation('symfony/validator', '5.2', '%s is deprecated.', NumberConstraintTrait::class); - -/** - * @author Jan Schädlich - * - * @deprecated since Symfony 5.2 - */ -trait NumberConstraintTrait -{ - private function configureNumberConstraintOptions($options): array - { - if (null === $options) { - $options = []; - } elseif (!\is_array($options)) { - $options = [$this->getDefaultOption() => $options]; - } - - if (isset($options['propertyPath'])) { - throw new ConstraintDefinitionException(sprintf('The "propertyPath" option of the "%s" constraint cannot be set.', static::class)); - } - - if (isset($options['value'])) { - throw new ConstraintDefinitionException(sprintf('The "value" option of the "%s" constraint cannot be set.', static::class)); - } - - $options['value'] = 0; - - return $options; - } -} diff --git a/vendor/symfony/validator/Constraints/Optional.php b/vendor/symfony/validator/Constraints/Optional.php deleted file mode 100644 index dab8b43..0000000 --- a/vendor/symfony/validator/Constraints/Optional.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"ANNOTATION"}) - * - * @author Bernhard Schussek - */ -class Optional extends Existence -{ -} diff --git a/vendor/symfony/validator/Constraints/Positive.php b/vendor/symfony/validator/Constraints/Positive.php deleted file mode 100644 index 951e944..0000000 --- a/vendor/symfony/validator/Constraints/Positive.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Jan Schädlich - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Positive extends GreaterThan -{ - use ZeroComparisonConstraintTrait; - - public $message = 'This value should be positive.'; -} diff --git a/vendor/symfony/validator/Constraints/PositiveOrZero.php b/vendor/symfony/validator/Constraints/PositiveOrZero.php deleted file mode 100644 index a7669c6..0000000 --- a/vendor/symfony/validator/Constraints/PositiveOrZero.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Jan Schädlich - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class PositiveOrZero extends GreaterThanOrEqual -{ - use ZeroComparisonConstraintTrait; - - public $message = 'This value should be either positive or zero.'; -} diff --git a/vendor/symfony/validator/Constraints/Range.php b/vendor/symfony/validator/Constraints/Range.php deleted file mode 100644 index 906057e..0000000 --- a/vendor/symfony/validator/Constraints/Range.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyPathInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\LogicException; -use Symfony\Component\Validator\Exception\MissingOptionsException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Range extends Constraint -{ - public const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; - public const NOT_IN_RANGE_ERROR = '04b91c99-a946-4221-afc5-e65ebac401eb'; - public const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; - public const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; - - protected static $errorNames = [ - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::NOT_IN_RANGE_ERROR => 'NOT_IN_RANGE_ERROR', - self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', - self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', - ]; - - public $notInRangeMessage = 'This value should be between {{ min }} and {{ max }}.'; - public $minMessage = 'This value should be {{ limit }} or more.'; - public $maxMessage = 'This value should be {{ limit }} or less.'; - public $invalidMessage = 'This value should be a valid number.'; - public $invalidDateTimeMessage = 'This value should be a valid datetime.'; - public $min; - public $minPropertyPath; - public $max; - public $maxPropertyPath; - - /** - * @internal - */ - public $deprecatedMinMessageSet = false; - - /** - * @internal - */ - public $deprecatedMaxMessageSet = false; - - /** - * {@inheritdoc} - * - * @param string|PropertyPathInterface|null $minPropertyPath - * @param string|PropertyPathInterface|null $maxPropertyPath - */ - public function __construct( - array $options = null, - string $notInRangeMessage = null, - string $minMessage = null, - string $maxMessage = null, - string $invalidMessage = null, - string $invalidDateTimeMessage = null, - $min = null, - $minPropertyPath = null, - $max = null, - $maxPropertyPath = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->notInRangeMessage = $notInRangeMessage ?? $this->notInRangeMessage; - $this->minMessage = $minMessage ?? $this->minMessage; - $this->maxMessage = $maxMessage ?? $this->maxMessage; - $this->invalidMessage = $invalidMessage ?? $this->invalidMessage; - $this->invalidDateTimeMessage = $invalidDateTimeMessage ?? $this->invalidDateTimeMessage; - $this->min = $min ?? $this->min; - $this->minPropertyPath = $minPropertyPath ?? $this->minPropertyPath; - $this->max = $max ?? $this->max; - $this->maxPropertyPath = $maxPropertyPath ?? $this->maxPropertyPath; - - if (null === $this->min && null === $this->minPropertyPath && null === $this->max && null === $this->maxPropertyPath) { - throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint "%s".', __CLASS__), ['min', 'minPropertyPath', 'max', 'maxPropertyPath']); - } - - if (null !== $this->min && null !== $this->minPropertyPath) { - throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "min" or "minPropertyPath" options to be set, not both.', static::class)); - } - - if (null !== $this->max && null !== $this->maxPropertyPath) { - throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "max" or "maxPropertyPath" options to be set, not both.', static::class)); - } - - if ((null !== $this->minPropertyPath || null !== $this->maxPropertyPath) && !class_exists(PropertyAccess::class)) { - throw new LogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "minPropertyPath" or "maxPropertyPath" option.', static::class)); - } - - if (null !== $this->min && null !== $this->max) { - $this->deprecatedMinMessageSet = isset($options['minMessage']) || null !== $minMessage; - $this->deprecatedMaxMessageSet = isset($options['maxMessage']) || null !== $maxMessage; - - // BC layer, should throw a ConstraintDefinitionException in 6.0 - if ($this->deprecatedMinMessageSet || $this->deprecatedMaxMessageSet) { - trigger_deprecation('symfony/validator', '4.4', '"minMessage" and "maxMessage" are deprecated when the "min" and "max" options are both set. Use "notInRangeMessage" instead.'); - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/RangeValidator.php b/vendor/symfony/validator/Constraints/RangeValidator.php deleted file mode 100644 index e24cd87..0000000 --- a/vendor/symfony/validator/Constraints/RangeValidator.php +++ /dev/null @@ -1,211 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessorInterface; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class RangeValidator extends ConstraintValidator -{ - private $propertyAccessor; - - public function __construct(PropertyAccessorInterface $propertyAccessor = null) - { - $this->propertyAccessor = $propertyAccessor; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Range) { - throw new UnexpectedTypeException($constraint, Range::class); - } - - if (null === $value) { - return; - } - - $min = $this->getLimit($constraint->minPropertyPath, $constraint->min, $constraint); - $max = $this->getLimit($constraint->maxPropertyPath, $constraint->max, $constraint); - - if (!is_numeric($value) && !$value instanceof \DateTimeInterface) { - if ($this->isParsableDatetimeString($min) && $this->isParsableDatetimeString($max)) { - $this->context->buildViolation($constraint->invalidDateTimeMessage) - ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) - ->setCode(Range::INVALID_CHARACTERS_ERROR) - ->addViolation(); - } else { - $this->context->buildViolation($constraint->invalidMessage) - ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) - ->setCode(Range::INVALID_CHARACTERS_ERROR) - ->addViolation(); - } - - return; - } - - // Convert strings to DateTimes if comparing another DateTime - // This allows to compare with any date/time value supported by - // the DateTime constructor: - // https://php.net/datetime.formats - if ($value instanceof \DateTimeInterface) { - $dateTimeClass = null; - - if (\is_string($min)) { - $dateTimeClass = $value instanceof \DateTimeImmutable ? \DateTimeImmutable::class : \DateTime::class; - - try { - $min = new $dateTimeClass($min); - } catch (\Exception $e) { - throw new ConstraintDefinitionException(sprintf('The min value "%s" could not be converted to a "%s" instance in the "%s" constraint.', $min, $dateTimeClass, get_debug_type($constraint))); - } - } - - if (\is_string($max)) { - $dateTimeClass = $dateTimeClass ?: ($value instanceof \DateTimeImmutable ? \DateTimeImmutable::class : \DateTime::class); - - try { - $max = new $dateTimeClass($max); - } catch (\Exception $e) { - throw new ConstraintDefinitionException(sprintf('The max value "%s" could not be converted to a "%s" instance in the "%s" constraint.', $max, $dateTimeClass, get_debug_type($constraint))); - } - } - } - - $hasLowerLimit = null !== $min; - $hasUpperLimit = null !== $max; - - if ($hasLowerLimit && $hasUpperLimit && ($value < $min || $value > $max)) { - $message = $constraint->notInRangeMessage; - $code = Range::NOT_IN_RANGE_ERROR; - - if ($value < $min && $constraint->deprecatedMinMessageSet) { - $message = $constraint->minMessage; - $code = Range::TOO_LOW_ERROR; - } - - if ($value > $max && $constraint->deprecatedMaxMessageSet) { - $message = $constraint->maxMessage; - $code = Range::TOO_HIGH_ERROR; - } - - $violationBuilder = $this->context->buildViolation($message) - ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) - ->setParameter('{{ min }}', $this->formatValue($min, self::PRETTY_DATE)) - ->setParameter('{{ max }}', $this->formatValue($max, self::PRETTY_DATE)) - ->setCode($code); - - if (null !== $constraint->maxPropertyPath) { - $violationBuilder->setParameter('{{ max_limit_path }}', $constraint->maxPropertyPath); - } - - if (null !== $constraint->minPropertyPath) { - $violationBuilder->setParameter('{{ min_limit_path }}', $constraint->minPropertyPath); - } - - $violationBuilder->addViolation(); - - return; - } - - if ($hasUpperLimit && $value > $max) { - $violationBuilder = $this->context->buildViolation($constraint->maxMessage) - ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) - ->setParameter('{{ limit }}', $this->formatValue($max, self::PRETTY_DATE)) - ->setCode(Range::TOO_HIGH_ERROR); - - if (null !== $constraint->maxPropertyPath) { - $violationBuilder->setParameter('{{ max_limit_path }}', $constraint->maxPropertyPath); - } - - if (null !== $constraint->minPropertyPath) { - $violationBuilder->setParameter('{{ min_limit_path }}', $constraint->minPropertyPath); - } - - $violationBuilder->addViolation(); - - return; - } - - if ($hasLowerLimit && $value < $min) { - $violationBuilder = $this->context->buildViolation($constraint->minMessage) - ->setParameter('{{ value }}', $this->formatValue($value, self::PRETTY_DATE)) - ->setParameter('{{ limit }}', $this->formatValue($min, self::PRETTY_DATE)) - ->setCode(Range::TOO_LOW_ERROR); - - if (null !== $constraint->maxPropertyPath) { - $violationBuilder->setParameter('{{ max_limit_path }}', $constraint->maxPropertyPath); - } - - if (null !== $constraint->minPropertyPath) { - $violationBuilder->setParameter('{{ min_limit_path }}', $constraint->minPropertyPath); - } - - $violationBuilder->addViolation(); - } - } - - private function getLimit(?string $propertyPath, $default, Constraint $constraint) - { - if (null === $propertyPath) { - return $default; - } - - if (null === $object = $this->context->getObject()) { - return $default; - } - - try { - return $this->getPropertyAccessor()->getValue($object, $propertyPath); - } catch (NoSuchPropertyException $e) { - throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $propertyPath, get_debug_type($constraint)).$e->getMessage(), 0, $e); - } - } - - private function getPropertyAccessor(): PropertyAccessorInterface - { - if (null === $this->propertyAccessor) { - $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); - } - - return $this->propertyAccessor; - } - - private function isParsableDatetimeString($boundary): bool - { - if (null === $boundary) { - return true; - } - - if (!\is_string($boundary)) { - return false; - } - - try { - new \DateTime($boundary); - } catch (\Exception $e) { - return false; - } - - return true; - } -} diff --git a/vendor/symfony/validator/Constraints/Regex.php b/vendor/symfony/validator/Constraints/Regex.php deleted file mode 100644 index 63bbd8d..0000000 --- a/vendor/symfony/validator/Constraints/Regex.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Regex extends Constraint -{ - public const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; - - protected static $errorNames = [ - self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', - ]; - - public $message = 'This value is not valid.'; - public $pattern; - public $htmlPattern; - public $match = true; - public $normalizer; - - /** - * {@inheritdoc} - * - * @param string|array $pattern The pattern to evaluate or an array of options - */ - public function __construct( - $pattern, - string $message = null, - string $htmlPattern = null, - bool $match = null, - callable $normalizer = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (\is_array($pattern)) { - $options = array_merge($pattern, $options); - } elseif (null !== $pattern) { - $options['value'] = $pattern; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->htmlPattern = $htmlPattern ?? $this->htmlPattern; - $this->match = $match ?? $this->match; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'pattern'; - } - - /** - * {@inheritdoc} - */ - public function getRequiredOptions() - { - return ['pattern']; - } - - /** - * Converts the htmlPattern to a suitable format for HTML5 pattern. - * Example: /^[a-z]+$/ would be converted to [a-z]+ - * However, if options are specified, it cannot be converted. - * - * @see http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute - * - * @return string|null - */ - public function getHtmlPattern() - { - // If htmlPattern is specified, use it - if (null !== $this->htmlPattern) { - return empty($this->htmlPattern) - ? null - : $this->htmlPattern; - } - - // Quit if delimiters not at very beginning/end (e.g. when options are passed) - if ($this->pattern[0] !== $this->pattern[\strlen($this->pattern) - 1]) { - return null; - } - - $delimiter = $this->pattern[0]; - - // Unescape the delimiter - $pattern = str_replace('\\'.$delimiter, $delimiter, substr($this->pattern, 1, -1)); - - // If the pattern is inverted, we can wrap it in - // ((?!pattern).)* - if (!$this->match) { - return '((?!'.$pattern.').)*'; - } - - // If the pattern contains an or statement, wrap the pattern in - // .*(pattern).* and quit. Otherwise we'd need to parse the pattern - if (str_contains($pattern, '|')) { - return '.*('.$pattern.').*'; - } - - // Trim leading ^, otherwise prepend .* - $pattern = '^' === $pattern[0] ? substr($pattern, 1) : '.*'.$pattern; - - // Trim trailing $, otherwise append .* - $pattern = '$' === $pattern[\strlen($pattern) - 1] ? substr($pattern, 0, -1) : $pattern.'.*'; - - return $pattern; - } -} diff --git a/vendor/symfony/validator/Constraints/RegexValidator.php b/vendor/symfony/validator/Constraints/RegexValidator.php deleted file mode 100644 index 7fadf76..0000000 --- a/vendor/symfony/validator/Constraints/RegexValidator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value match or not given regexp pattern. - * - * @author Bernhard Schussek - * @author Joseph Bielawski - */ -class RegexValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Regex) { - throw new UnexpectedTypeException($constraint, Regex::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - if ($constraint->match xor preg_match($constraint->pattern, $value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Regex::REGEX_FAILED_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Required.php b/vendor/symfony/validator/Constraints/Required.php deleted file mode 100644 index bd77a90..0000000 --- a/vendor/symfony/validator/Constraints/Required.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * @Annotation - * @Target({"ANNOTATION"}) - * - * @author Bernhard Schussek - */ -class Required extends Existence -{ -} diff --git a/vendor/symfony/validator/Constraints/Sequentially.php b/vendor/symfony/validator/Constraints/Sequentially.php deleted file mode 100644 index 36a801a..0000000 --- a/vendor/symfony/validator/Constraints/Sequentially.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -/** - * Use this constraint to sequentially validate nested constraints. - * Validation for the nested constraints collection will stop at first violation. - * - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Maxime Steinhausser - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Sequentially extends Composite -{ - public $constraints = []; - - public function __construct($constraints = null, array $groups = null, $payload = null) - { - parent::__construct($constraints ?? [], $groups, $payload); - } - - public function getDefaultOption() - { - return 'constraints'; - } - - public function getRequiredOptions() - { - return ['constraints']; - } - - protected function getCompositeOption() - { - return 'constraints'; - } - - public function getTargets() - { - return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; - } -} diff --git a/vendor/symfony/validator/Constraints/SequentiallyValidator.php b/vendor/symfony/validator/Constraints/SequentiallyValidator.php deleted file mode 100644 index 434d2ab..0000000 --- a/vendor/symfony/validator/Constraints/SequentiallyValidator.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Maxime Steinhausser - */ -class SequentiallyValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Sequentially) { - throw new UnexpectedTypeException($constraint, Sequentially::class); - } - - $context = $this->context; - - $validator = $context->getValidator()->inContext($context); - - $originalCount = $validator->getViolations()->count(); - - foreach ($constraint->constraints as $c) { - if ($originalCount !== $validator->validate($value, $c)->getViolations()->count()) { - break; - } - } - } -} diff --git a/vendor/symfony/validator/Constraints/Time.php b/vendor/symfony/validator/Constraints/Time.php deleted file mode 100644 index 366d623..0000000 --- a/vendor/symfony/validator/Constraints/Time.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Time extends Constraint -{ - public const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; - public const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; - - protected static $errorNames = [ - self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', - self::INVALID_TIME_ERROR => 'INVALID_TIME_ERROR', - ]; - - public $message = 'This value is not a valid time.'; - - public function __construct( - array $options = null, - string $message = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/TimeValidator.php b/vendor/symfony/validator/Constraints/TimeValidator.php deleted file mode 100644 index 5a71e44..0000000 --- a/vendor/symfony/validator/Constraints/TimeValidator.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class TimeValidator extends ConstraintValidator -{ - public const PATTERN = '/^(\d{2}):(\d{2}):(\d{2})$/'; - - /** - * Checks whether a time is valid. - * - * @internal - */ - public static function checkTime(int $hour, int $minute, float $second): bool - { - return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; - } - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Time) { - throw new UnexpectedTypeException($constraint, Time::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (!preg_match(static::PATTERN, $value, $matches)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Time::INVALID_FORMAT_ERROR) - ->addViolation(); - - return; - } - - if (!self::checkTime($matches[1], $matches[2], $matches[3])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Time::INVALID_TIME_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Timezone.php b/vendor/symfony/validator/Constraints/Timezone.php deleted file mode 100644 index 409fbc1..0000000 --- a/vendor/symfony/validator/Constraints/Timezone.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Javier Spagnoletti - * @author Hugo Hamon - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Timezone extends Constraint -{ - public const TIMEZONE_IDENTIFIER_ERROR = '5ce113e6-5e64-4ea2-90fe-d2233956db13'; - public const TIMEZONE_IDENTIFIER_IN_ZONE_ERROR = 'b57767b1-36c0-40ac-a3d7-629420c775b8'; - public const TIMEZONE_IDENTIFIER_IN_COUNTRY_ERROR = 'c4a22222-dc92-4fc0-abb0-d95b268c7d0b'; - public const TIMEZONE_IDENTIFIER_INTL_ERROR = '45863c26-88dc-41ba-bf53-c73bd1f7e90d'; - - public $zone = \DateTimeZone::ALL; - public $countryCode; - public $intlCompatible = false; - public $message = 'This value is not a valid timezone.'; - - protected static $errorNames = [ - self::TIMEZONE_IDENTIFIER_ERROR => 'TIMEZONE_IDENTIFIER_ERROR', - self::TIMEZONE_IDENTIFIER_IN_ZONE_ERROR => 'TIMEZONE_IDENTIFIER_IN_ZONE_ERROR', - self::TIMEZONE_IDENTIFIER_IN_COUNTRY_ERROR => 'TIMEZONE_IDENTIFIER_IN_COUNTRY_ERROR', - self::TIMEZONE_IDENTIFIER_INTL_ERROR => 'TIMEZONE_IDENTIFIER_INTL_ERROR', - ]; - - /** - * {@inheritdoc} - * - * @param int|array|null $zone A combination of {@see \DateTimeZone} class constants or a set of options - */ - public function __construct( - $zone = null, - string $message = null, - string $countryCode = null, - bool $intlCompatible = null, - array $groups = null, - $payload = null, - array $options = [] - ) { - if (\is_array($zone)) { - $options = array_merge($zone, $options); - } elseif (null !== $zone) { - $options['value'] = $zone; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->countryCode = $countryCode ?? $this->countryCode; - $this->intlCompatible = $intlCompatible ?? $this->intlCompatible; - - if (null === $this->countryCode) { - if (0 >= $this->zone || \DateTimeZone::ALL_WITH_BC < $this->zone) { - throw new ConstraintDefinitionException('The option "zone" must be a valid range of "\DateTimeZone" constants.'); - } - } elseif (\DateTimeZone::PER_COUNTRY !== (\DateTimeZone::PER_COUNTRY & $this->zone)) { - throw new ConstraintDefinitionException('The option "countryCode" can only be used when the "zone" option is configured with "\DateTimeZone::PER_COUNTRY".'); - } - if ($this->intlCompatible && !class_exists(\IntlTimeZone::class)) { - throw new ConstraintDefinitionException('The option "intlCompatible" can only be used when the PHP intl extension is available.'); - } - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'zone'; - } -} diff --git a/vendor/symfony/validator/Constraints/TimezoneValidator.php b/vendor/symfony/validator/Constraints/TimezoneValidator.php deleted file mode 100644 index ab6b4ee..0000000 --- a/vendor/symfony/validator/Constraints/TimezoneValidator.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Intl\Exception\MissingResourceException; -use Symfony\Component\Intl\Timezones; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether a value is a valid timezone identifier. - * - * @author Javier Spagnoletti - * @author Hugo Hamon - */ -class TimezoneValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Timezone) { - throw new UnexpectedTypeException($constraint, Timezone::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if ($constraint->intlCompatible && 'Etc/Unknown' === \IntlTimeZone::createTimeZone($value)->getID()) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Timezone::TIMEZONE_IDENTIFIER_INTL_ERROR) - ->addViolation(); - - return; - } - - if ( - \in_array($value, self::getPhpTimezones($constraint->zone, $constraint->countryCode), true) || - \in_array($value, self::getIntlTimezones($constraint->zone, $constraint->countryCode), true) - ) { - return; - } - - if ($constraint->countryCode) { - $code = Timezone::TIMEZONE_IDENTIFIER_IN_COUNTRY_ERROR; - } elseif (\DateTimeZone::ALL !== $constraint->zone) { - $code = Timezone::TIMEZONE_IDENTIFIER_IN_ZONE_ERROR; - } else { - $code = Timezone::TIMEZONE_IDENTIFIER_ERROR; - } - - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode($code) - ->addViolation(); - } - - private static function getPhpTimezones(int $zone, string $countryCode = null): array - { - if (null !== $countryCode) { - try { - return @\DateTimeZone::listIdentifiers($zone, $countryCode) ?: []; - } catch (\ValueError $e) { - return []; - } - } - - return \DateTimeZone::listIdentifiers($zone); - } - - private static function getIntlTimezones(int $zone, string $countryCode = null): array - { - if (!class_exists(Timezones::class)) { - return []; - } - - if (null !== $countryCode) { - try { - return Timezones::forCountryCode($countryCode); - } catch (MissingResourceException $e) { - return []; - } - } - - $timezones = Timezones::getIds(); - - if (\DateTimeZone::ALL === (\DateTimeZone::ALL & $zone)) { - return $timezones; - } - - $filtered = []; - foreach ((new \ReflectionClass(\DateTimeZone::class))->getConstants() as $const => $flag) { - if ($flag !== ($flag & $zone)) { - continue; - } - - $filtered[] = array_filter($timezones, static function ($id) use ($const) { - return 0 === stripos($id, $const.'/'); - }); - } - - return $filtered ? array_merge(...$filtered) : []; - } -} diff --git a/vendor/symfony/validator/Constraints/Traverse.php b/vendor/symfony/validator/Constraints/Traverse.php deleted file mode 100644 index fe6527d..0000000 --- a/vendor/symfony/validator/Constraints/Traverse.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @Annotation - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class Traverse extends Constraint -{ - public $traverse = true; - - /** - * @param bool|array|null $traverse - */ - public function __construct($traverse = null) - { - if (\is_array($traverse) && \array_key_exists('groups', $traverse)) { - throw new ConstraintDefinitionException(sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__)); - } - - parent::__construct($traverse); - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'traverse'; - } - - /** - * {@inheritdoc} - */ - public function getTargets() - { - return self::CLASS_CONSTRAINT; - } -} diff --git a/vendor/symfony/validator/Constraints/Type.php b/vendor/symfony/validator/Constraints/Type.php deleted file mode 100644 index 220c219..0000000 --- a/vendor/symfony/validator/Constraints/Type.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Type extends Constraint -{ - public const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; - - protected static $errorNames = [ - self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', - ]; - - public $message = 'This value should be of type {{ type }}.'; - public $type; - - /** - * {@inheritdoc} - * - * @param string|array $type One ore multiple types to validate against or a set of options - */ - public function __construct($type, string $message = null, array $groups = null, $payload = null, array $options = []) - { - if (\is_array($type) && \is_string(key($type))) { - $options = array_merge($type, $options); - } elseif (null !== $type) { - $options['value'] = $type; - } - - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } - - /** - * {@inheritdoc} - */ - public function getDefaultOption() - { - return 'type'; - } - - /** - * {@inheritdoc} - */ - public function getRequiredOptions() - { - return ['type']; - } -} diff --git a/vendor/symfony/validator/Constraints/TypeValidator.php b/vendor/symfony/validator/Constraints/TypeValidator.php deleted file mode 100644 index 0a938c6..0000000 --- a/vendor/symfony/validator/Constraints/TypeValidator.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Bernhard Schussek - */ -class TypeValidator extends ConstraintValidator -{ - private const VALIDATION_FUNCTIONS = [ - 'bool' => 'is_bool', - 'boolean' => 'is_bool', - 'int' => 'is_int', - 'integer' => 'is_int', - 'long' => 'is_int', - 'float' => 'is_float', - 'double' => 'is_float', - 'real' => 'is_float', - 'numeric' => 'is_numeric', - 'string' => 'is_string', - 'scalar' => 'is_scalar', - 'array' => 'is_array', - 'iterable' => 'is_iterable', - 'countable' => 'is_countable', - 'callable' => 'is_callable', - 'object' => 'is_object', - 'resource' => 'is_resource', - 'null' => 'is_null', - 'alnum' => 'ctype_alnum', - 'alpha' => 'ctype_alpha', - 'cntrl' => 'ctype_cntrl', - 'digit' => 'ctype_digit', - 'graph' => 'ctype_graph', - 'lower' => 'ctype_lower', - 'print' => 'ctype_print', - 'punct' => 'ctype_punct', - 'space' => 'ctype_space', - 'upper' => 'ctype_upper', - 'xdigit' => 'ctype_xdigit', - ]; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Type) { - throw new UnexpectedTypeException($constraint, Type::class); - } - - if (null === $value) { - return; - } - - $types = (array) $constraint->type; - - foreach ($types as $type) { - $type = strtolower($type); - if (isset(self::VALIDATION_FUNCTIONS[$type]) && self::VALIDATION_FUNCTIONS[$type]($value)) { - return; - } - - if ($value instanceof $type) { - return; - } - } - - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setParameter('{{ type }}', implode('|', $types)) - ->setCode(Type::INVALID_TYPE_ERROR) - ->addViolation(); - } -} diff --git a/vendor/symfony/validator/Constraints/Ulid.php b/vendor/symfony/validator/Constraints/Ulid.php deleted file mode 100644 index d1644b8..0000000 --- a/vendor/symfony/validator/Constraints/Ulid.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * - * @author Laurent Clouet - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Ulid extends Constraint -{ - public const TOO_SHORT_ERROR = '7b44804e-37d5-4df4-9bdd-b738d4a45bb4'; - public const TOO_LONG_ERROR = '9608249f-6da1-4d53-889e-9864b58c4d37'; - public const INVALID_CHARACTERS_ERROR = 'e4155739-5135-4258-9c81-ae7b44b5311e'; - public const TOO_LARGE_ERROR = 'df8cfb9a-ce6d-4a69-ae5a-eea7ab6f278b'; - - protected static $errorNames = [ - self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', - self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR', - ]; - - public $message = 'This is not a valid ULID.'; - - public function __construct( - array $options = null, - string $message = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - } -} diff --git a/vendor/symfony/validator/Constraints/UlidValidator.php b/vendor/symfony/validator/Constraints/UlidValidator.php deleted file mode 100644 index 45f85b8..0000000 --- a/vendor/symfony/validator/Constraints/UlidValidator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether the value is a valid ULID (Universally Unique Lexicographically Sortable Identifier). - * Cf https://github.com/ulid/spec for ULID specifications. - * - * @author Laurent Clouet - */ -class UlidValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Ulid) { - throw new UnexpectedTypeException($constraint, Ulid::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (26 !== \strlen($value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(26 > \strlen($value) ? Ulid::TOO_SHORT_ERROR : Ulid::TOO_LONG_ERROR) - ->addViolation(); - } - - if (\strlen($value) !== strspn($value, '0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz')) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Ulid::INVALID_CHARACTERS_ERROR) - ->addViolation(); - } - - // Largest valid ULID is '7ZZZZZZZZZZZZZZZZZZZZZZZZZ' - // Cf https://github.com/ulid/spec#overflow-errors-when-parsing-base32-strings - if ($value[0] > '7') { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Ulid::TOO_LARGE_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Unique.php b/vendor/symfony/validator/Constraints/Unique.php deleted file mode 100644 index 6280e97..0000000 --- a/vendor/symfony/validator/Constraints/Unique.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Yevgeniy Zholkevskiy - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Unique extends Constraint -{ - public const IS_NOT_UNIQUE = '7911c98d-b845-4da0-94b7-a8dac36bc55a'; - - protected static $errorNames = [ - self::IS_NOT_UNIQUE => 'IS_NOT_UNIQUE', - ]; - - public $message = 'This collection should contain only unique elements.'; - public $normalizer; - - public function __construct( - array $options = null, - string $message = null, - callable $normalizer = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/UniqueValidator.php b/vendor/symfony/validator/Constraints/UniqueValidator.php deleted file mode 100644 index 2758a3f..0000000 --- a/vendor/symfony/validator/Constraints/UniqueValidator.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Yevgeniy Zholkevskiy - */ -class UniqueValidator extends ConstraintValidator -{ - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Unique) { - throw new UnexpectedTypeException($constraint, Unique::class); - } - - if (null === $value) { - return; - } - - if (!\is_array($value) && !$value instanceof \IteratorAggregate) { - throw new UnexpectedValueException($value, 'array|IteratorAggregate'); - } - - $collectionElements = []; - $normalizer = $this->getNormalizer($constraint); - foreach ($value as $element) { - $element = $normalizer($element); - - if (\in_array($element, $collectionElements, true)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Unique::IS_NOT_UNIQUE) - ->addViolation(); - - return; - } - $collectionElements[] = $element; - } - } - - private function getNormalizer(Unique $unique): callable - { - if (null === $unique->normalizer) { - return static function ($value) { - return $value; - }; - } - - return $unique->normalizer; - } -} diff --git a/vendor/symfony/validator/Constraints/Url.php b/vendor/symfony/validator/Constraints/Url.php deleted file mode 100644 index 23cd77c..0000000 --- a/vendor/symfony/validator/Constraints/Url.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Url extends Constraint -{ - public const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; - - protected static $errorNames = [ - self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', - ]; - - public $message = 'This value is not a valid URL.'; - public $protocols = ['http', 'https']; - public $relativeProtocol = false; - public $normalizer; - - public function __construct( - array $options = null, - string $message = null, - array $protocols = null, - bool $relativeProtocol = null, - callable $normalizer = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->protocols = $protocols ?? $this->protocols; - $this->relativeProtocol = $relativeProtocol ?? $this->relativeProtocol; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/UrlValidator.php b/vendor/symfony/validator/Constraints/UrlValidator.php deleted file mode 100644 index a72eac6..0000000 --- a/vendor/symfony/validator/Constraints/UrlValidator.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * @author Bernhard Schussek - */ -class UrlValidator extends ConstraintValidator -{ - public const PATTERN = '~^ - (%s):// # protocol - (((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+:)?((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+)@)? # basic auth - ( - (?: - (?:xn--[a-z0-9-]++\.)*+xn--[a-z0-9-]++ # a domain name using punycode - | - (?:[\pL\pN\pS\pM\-\_]++\.)+[\pL\pN\pM]++ # a multi-level domain name - | - [a-z0-9\-\_]++ # a single-level domain name - )\.? - | # or - \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address - | # or - \[ - (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) - \] # an IPv6 address - ) - (:[0-9]+)? # a port (optional) - (?:/ (?:[\pL\pN\-._\~!$&\'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path - (?:\? (?:[\pL\pN\-._\~!$&\'\[\]()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional) - (?:\# (?:[\pL\pN\-._\~!$&\'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional) - $~ixu'; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Url) { - throw new UnexpectedTypeException($constraint, Url::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - if ('' === $value) { - return; - } - - if (null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - $pattern = $constraint->relativeProtocol ? str_replace('(%s):', '(?:(%s):)?', static::PATTERN) : static::PATTERN; - $pattern = sprintf($pattern, implode('|', $constraint->protocols)); - - if (!preg_match($pattern, $value)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Url::INVALID_URL_ERROR) - ->addViolation(); - - return; - } - } -} diff --git a/vendor/symfony/validator/Constraints/Uuid.php b/vendor/symfony/validator/Constraints/Uuid.php deleted file mode 100644 index 84f83f8..0000000 --- a/vendor/symfony/validator/Constraints/Uuid.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\InvalidArgumentException; - -/** - * @Annotation - * - * @author Colin O'Dell - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Uuid extends Constraint -{ - public const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; - public const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; - public const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; - public const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; - public const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; - public const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; - - protected static $errorNames = [ - self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', - self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', - self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', - self::INVALID_HYPHEN_PLACEMENT_ERROR => 'INVALID_HYPHEN_PLACEMENT_ERROR', - self::INVALID_VERSION_ERROR => 'INVALID_VERSION_ERROR', - self::INVALID_VARIANT_ERROR => 'INVALID_VARIANT_ERROR', - ]; - - // Possible versions defined by RFC 4122 - public const V1_MAC = 1; - public const V2_DCE = 2; - public const V3_MD5 = 3; - public const V4_RANDOM = 4; - public const V5_SHA1 = 5; - public const V6_SORTABLE = 6; - - public const ALL_VERSIONS = [ - self::V1_MAC, - self::V2_DCE, - self::V3_MD5, - self::V4_RANDOM, - self::V5_SHA1, - self::V6_SORTABLE, - ]; - - /** - * Message to display when validation fails. - * - * @var string - */ - public $message = 'This is not a valid UUID.'; - - /** - * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122. - * - * Set this to `false` to allow legacy formats with different dash positioning or wrapping characters - * - * @var bool - */ - public $strict = true; - - /** - * Array of allowed versions (see version constants above). - * - * All UUID versions are allowed by default - * - * @var int[] - */ - public $versions = self::ALL_VERSIONS; - - public $normalizer; - - /** - * {@inheritdoc} - * - * @param int[]|null $versions - */ - public function __construct( - array $options = null, - string $message = null, - array $versions = null, - bool $strict = null, - callable $normalizer = null, - array $groups = null, - $payload = null - ) { - parent::__construct($options, $groups, $payload); - - $this->message = $message ?? $this->message; - $this->versions = $versions ?? $this->versions; - $this->strict = $strict ?? $this->strict; - $this->normalizer = $normalizer ?? $this->normalizer; - - if (null !== $this->normalizer && !\is_callable($this->normalizer)) { - throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer))); - } - } -} diff --git a/vendor/symfony/validator/Constraints/UuidValidator.php b/vendor/symfony/validator/Constraints/UuidValidator.php deleted file mode 100644 index 0662966..0000000 --- a/vendor/symfony/validator/Constraints/UuidValidator.php +++ /dev/null @@ -1,258 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; - -/** - * Validates whether the value is a valid UUID (also known as GUID). - * - * Strict validation will allow a UUID as specified per RFC 4122. - * Loose validation will allow any type of UUID. - * - * @author Colin O'Dell - * @author Bernhard Schussek - * - * @see http://tools.ietf.org/html/rfc4122 - * @see https://en.wikipedia.org/wiki/Universally_unique_identifier - */ -class UuidValidator extends ConstraintValidator -{ - // The strict pattern matches UUIDs like this: - // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx - - // Roughly speaking: - // x = any hexadecimal character - // M = any allowed version {1..6} - // N = any allowed variant {8, 9, a, b} - - public const STRICT_LENGTH = 36; - public const STRICT_FIRST_HYPHEN_POSITION = 8; - public const STRICT_LAST_HYPHEN_POSITION = 23; - public const STRICT_VERSION_POSITION = 14; - public const STRICT_VARIANT_POSITION = 19; - - // The loose pattern validates similar yet non-compliant UUIDs. - // Hyphens are completely optional. If present, they should only appear - // between every fourth character: - // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx - // xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx - // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - // The value can also be wrapped with characters like []{}: - // {xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx} - - // Neither the version nor the variant is validated by this pattern. - - public const LOOSE_MAX_LENGTH = 39; - public const LOOSE_FIRST_HYPHEN_POSITION = 4; - - /** - * {@inheritdoc} - */ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Uuid) { - throw new UnexpectedTypeException($constraint, Uuid::class); - } - - if (null === $value || '' === $value) { - return; - } - - if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - throw new UnexpectedValueException($value, 'string'); - } - - $value = (string) $value; - - if (null !== $constraint->normalizer) { - $value = ($constraint->normalizer)($value); - } - - if ($constraint->strict) { - $this->validateStrict($value, $constraint); - - return; - } - - $this->validateLoose($value, $constraint); - } - - private function validateLoose(string $value, Uuid $constraint) - { - // Error priority: - // 1. ERROR_INVALID_CHARACTERS - // 2. ERROR_INVALID_HYPHEN_PLACEMENT - // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG - - // Trim any wrapping characters like [] or {} used by some legacy systems - $trimmed = trim($value, '[]{}'); - - // Position of the next expected hyphen - $h = self::LOOSE_FIRST_HYPHEN_POSITION; - - // Expected length - $l = self::LOOSE_MAX_LENGTH; - - for ($i = 0; $i < $l; ++$i) { - // Check length - if (!isset($trimmed[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::TOO_SHORT_ERROR) - ->addViolation(); - - return; - } - - // Hyphens must occur every fifth position - // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx - // ^ ^ ^ ^ ^ ^ ^ - if ('-' === $trimmed[$i]) { - if ($i !== $h) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) - ->addViolation(); - - return; - } - - $h += 5; - - continue; - } - - // Missing hyphens are ignored - if ($i === $h) { - $h += 4; - --$l; - } - - // Check characters - if (!ctype_xdigit($trimmed[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - } - - // Check length again - if (isset($trimmed[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::TOO_LONG_ERROR) - ->addViolation(); - } - } - - private function validateStrict(string $value, Uuid $constraint) - { - // Error priority: - // 1. ERROR_INVALID_CHARACTERS - // 2. ERROR_INVALID_HYPHEN_PLACEMENT - // 3. ERROR_TOO_SHORT/ERROR_TOO_LONG - // 4. ERROR_INVALID_VERSION - // 5. ERROR_INVALID_VARIANT - - // Position of the next expected hyphen - $h = self::STRICT_FIRST_HYPHEN_POSITION; - - for ($i = 0; $i < self::STRICT_LENGTH; ++$i) { - // Check length - if (!isset($value[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::TOO_SHORT_ERROR) - ->addViolation(); - - return; - } - - // Check hyphen placement - // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - // ^ ^ ^ ^ - if ('-' === $value[$i]) { - if ($i !== $h) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) - ->addViolation(); - - return; - } - - // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - // ^ - if ($h < self::STRICT_LAST_HYPHEN_POSITION) { - $h += 5; - } - - continue; - } - - // Check characters - if (!ctype_xdigit($value[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_CHARACTERS_ERROR) - ->addViolation(); - - return; - } - - // Missing hyphen - if ($i === $h) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) - ->addViolation(); - - return; - } - } - - // Check length again - if (isset($value[$i])) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::TOO_LONG_ERROR) - ->addViolation(); - } - - // Check version - if (!\in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_VERSION_ERROR) - ->addViolation(); - } - - // Check variant - first two bits must equal "10" - // 0b10xx - // & 0b1100 (12) - // = 0b1000 (8) - if (8 !== (hexdec($value[self::STRICT_VARIANT_POSITION]) & 12)) { - $this->context->buildViolation($constraint->message) - ->setParameter('{{ value }}', $this->formatValue($value)) - ->setCode(Uuid::INVALID_VARIANT_ERROR) - ->addViolation(); - } - } -} diff --git a/vendor/symfony/validator/Constraints/Valid.php b/vendor/symfony/validator/Constraints/Valid.php deleted file mode 100644 index 9ee69fd..0000000 --- a/vendor/symfony/validator/Constraints/Valid.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; - -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * - * @author Bernhard Schussek - */ -#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Valid extends Constraint -{ - public $traverse = true; - - public function __get(string $option) - { - if ('groups' === $option) { - // when this is reached, no groups have been configured - return null; - } - - return parent::__get($option); - } - - /** - * {@inheritdoc} - */ - public function addImplicitGroupName(string $group) - { - if (null !== $this->groups) { - parent::addImplicitGroupName($group); - } - } -} diff --git a/vendor/symfony/validator/Constraints/ValidValidator.php b/vendor/symfony/validator/Constraints/ValidValidator.php deleted file mode 100644 index 85eabb8..0000000 --- a/vendor/symfony/validator/Constraints/ValidValidator.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; - -/** - * @author Christian Flothmann - */ -class ValidValidator extends ConstraintValidator -{ - public function validate($value, Constraint $constraint) - { - if (!$constraint instanceof Valid) { - throw new UnexpectedTypeException($constraint, Valid::class); - } - - if (null === $value) { - return; - } - - $this->context - ->getValidator() - ->inContext($this->context) - ->validate($value, null, $this->context->getGroup()); - } -} diff --git a/vendor/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php b/vendor/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php deleted file mode 100644 index b65fcf2..0000000 --- a/vendor/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Constraints; - -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * @internal - * - * @author Jan Schädlich - * @author Alexander M. Turek - */ -trait ZeroComparisonConstraintTrait -{ - public function __construct(array $options = null, string $message = null, array $groups = null, $payload = null) - { - if (null === $options) { - $options = []; - } - - if (isset($options['propertyPath'])) { - throw new ConstraintDefinitionException(sprintf('The "propertyPath" option of the "%s" constraint cannot be set.', static::class)); - } - - if (isset($options['value'])) { - throw new ConstraintDefinitionException(sprintf('The "value" option of the "%s" constraint cannot be set.', static::class)); - } - - parent::__construct(0, null, $message, $groups, $payload, $options); - } - - public function validatedBy(): string - { - return parent::class.'Validator'; - } -} diff --git a/vendor/symfony/validator/ContainerConstraintValidatorFactory.php b/vendor/symfony/validator/ContainerConstraintValidatorFactory.php deleted file mode 100644 index 0b5baed..0000000 --- a/vendor/symfony/validator/ContainerConstraintValidatorFactory.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Validator\Exception\UnexpectedTypeException; -use Symfony\Component\Validator\Exception\ValidatorException; - -/** - * Uses a service container to create constraint validators. - * - * @author Kris Wallsmith - */ -class ContainerConstraintValidatorFactory implements ConstraintValidatorFactoryInterface -{ - private $container; - private $validators; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - $this->validators = []; - } - - /** - * {@inheritdoc} - * - * @throws ValidatorException When the validator class does not exist - * @throws UnexpectedTypeException When the validator is not an instance of ConstraintValidatorInterface - */ - public function getInstance(Constraint $constraint) - { - $name = $constraint->validatedBy(); - - if (!isset($this->validators[$name])) { - if ($this->container->has($name)) { - $this->validators[$name] = $this->container->get($name); - } else { - if (!class_exists($name)) { - throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, get_debug_type($constraint))); - } - - $this->validators[$name] = new $name(); - } - } - - if (!$this->validators[$name] instanceof ConstraintValidatorInterface) { - throw new UnexpectedTypeException($this->validators[$name], ConstraintValidatorInterface::class); - } - - return $this->validators[$name]; - } -} diff --git a/vendor/symfony/validator/Context/ExecutionContext.php b/vendor/symfony/validator/Context/ExecutionContext.php deleted file mode 100644 index c640da3..0000000 --- a/vendor/symfony/validator/Context/ExecutionContext.php +++ /dev/null @@ -1,372 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Context; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\ConstraintViolationListInterface; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\Mapping\MemberMetadata; -use Symfony\Component\Validator\Mapping\MetadataInterface; -use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; -use Symfony\Component\Validator\Util\PropertyPath; -use Symfony\Component\Validator\Validator\LazyProperty; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; -use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * The context used and created by {@link ExecutionContextFactory}. - * - * @author Bernhard Schussek - * - * @see ExecutionContextInterface - * - * @internal since version 2.5. Code against ExecutionContextInterface instead. - */ -class ExecutionContext implements ExecutionContextInterface -{ - /** - * @var ValidatorInterface - */ - private $validator; - - /** - * The root value of the validated object graph. - * - * @var mixed - */ - private $root; - - /** - * @var TranslatorInterface - */ - private $translator; - - /** - * @var string|null - */ - private $translationDomain; - - /** - * The violations generated in the current context. - * - * @var ConstraintViolationList - */ - private $violations; - - /** - * The currently validated value. - * - * @var mixed - */ - private $value; - - /** - * The currently validated object. - * - * @var object|null - */ - private $object; - - /** - * The property path leading to the current value. - * - * @var string - */ - private $propertyPath = ''; - - /** - * The current validation metadata. - * - * @var MetadataInterface|null - */ - private $metadata; - - /** - * The currently validated group. - * - * @var string|null - */ - private $group; - - /** - * The currently validated constraint. - * - * @var Constraint|null - */ - private $constraint; - - /** - * Stores which objects have been validated in which group. - * - * @var bool[][] - */ - private $validatedObjects = []; - - /** - * Stores which class constraint has been validated for which object. - * - * @var bool[] - */ - private $validatedConstraints = []; - - /** - * Stores which objects have been initialized. - * - * @var bool[] - */ - private $initializedObjects; - - /** - * @var \SplObjectStorage - */ - private $cachedObjectsRefs; - - /** - * @param mixed $root The root value of the validated object graph - * - * @internal Called by {@link ExecutionContextFactory}. Should not be used in user code. - */ - public function __construct(ValidatorInterface $validator, $root, TranslatorInterface $translator, string $translationDomain = null) - { - $this->validator = $validator; - $this->root = $root; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->violations = new ConstraintViolationList(); - $this->cachedObjectsRefs = new \SplObjectStorage(); - } - - /** - * {@inheritdoc} - */ - public function setNode($value, ?object $object, MetadataInterface $metadata = null, string $propertyPath) - { - $this->value = $value; - $this->object = $object; - $this->metadata = $metadata; - $this->propertyPath = $propertyPath; - } - - /** - * {@inheritdoc} - */ - public function setGroup(?string $group) - { - $this->group = $group; - } - - /** - * {@inheritdoc} - */ - public function setConstraint(Constraint $constraint) - { - $this->constraint = $constraint; - } - - /** - * {@inheritdoc} - */ - public function addViolation(string $message, array $parameters = []) - { - $this->violations->add(new ConstraintViolation( - $this->translator->trans($message, $parameters, $this->translationDomain), - $message, - $parameters, - $this->root, - $this->propertyPath, - $this->getValue(), - null, - null, - $this->constraint - )); - } - - /** - * {@inheritdoc} - */ - public function buildViolation(string $message, array $parameters = []): ConstraintViolationBuilderInterface - { - return new ConstraintViolationBuilder( - $this->violations, - $this->constraint, - $message, - $parameters, - $this->root, - $this->propertyPath, - $this->getValue(), - $this->translator, - $this->translationDomain - ); - } - - /** - * {@inheritdoc} - */ - public function getViolations(): ConstraintViolationListInterface - { - return $this->violations; - } - - /** - * {@inheritdoc} - */ - public function getValidator(): ValidatorInterface - { - return $this->validator; - } - - /** - * {@inheritdoc} - */ - public function getRoot() - { - return $this->root; - } - - /** - * {@inheritdoc} - */ - public function getValue() - { - if ($this->value instanceof LazyProperty) { - return $this->value->getPropertyValue(); - } - - return $this->value; - } - - /** - * {@inheritdoc} - */ - public function getObject() - { - return $this->object; - } - - /** - * {@inheritdoc} - */ - public function getMetadata(): ?MetadataInterface - { - return $this->metadata; - } - - /** - * {@inheritdoc} - */ - public function getGroup(): ?string - { - return $this->group; - } - - public function getConstraint(): ?Constraint - { - return $this->constraint; - } - - /** - * {@inheritdoc} - */ - public function getClassName(): ?string - { - return $this->metadata instanceof MemberMetadata || $this->metadata instanceof ClassMetadataInterface ? $this->metadata->getClassName() : null; - } - - /** - * {@inheritdoc} - */ - public function getPropertyName(): ?string - { - return $this->metadata instanceof PropertyMetadataInterface ? $this->metadata->getPropertyName() : null; - } - - /** - * {@inheritdoc} - */ - public function getPropertyPath(string $subPath = ''): string - { - return PropertyPath::append($this->propertyPath, $subPath); - } - - /** - * {@inheritdoc} - */ - public function markGroupAsValidated(string $cacheKey, string $groupHash) - { - if (!isset($this->validatedObjects[$cacheKey])) { - $this->validatedObjects[$cacheKey] = []; - } - - $this->validatedObjects[$cacheKey][$groupHash] = true; - } - - /** - * {@inheritdoc} - */ - public function isGroupValidated(string $cacheKey, string $groupHash): bool - { - return isset($this->validatedObjects[$cacheKey][$groupHash]); - } - - /** - * {@inheritdoc} - */ - public function markConstraintAsValidated(string $cacheKey, string $constraintHash) - { - $this->validatedConstraints[$cacheKey.':'.$constraintHash] = true; - } - - /** - * {@inheritdoc} - */ - public function isConstraintValidated(string $cacheKey, string $constraintHash): bool - { - return isset($this->validatedConstraints[$cacheKey.':'.$constraintHash]); - } - - /** - * {@inheritdoc} - */ - public function markObjectAsInitialized(string $cacheKey) - { - $this->initializedObjects[$cacheKey] = true; - } - - /** - * {@inheritdoc} - */ - public function isObjectInitialized(string $cacheKey): bool - { - return isset($this->initializedObjects[$cacheKey]); - } - - /** - * @internal - */ - public function generateCacheKey(object $object): string - { - if (!isset($this->cachedObjectsRefs[$object])) { - $this->cachedObjectsRefs[$object] = spl_object_hash($object); - } - - return $this->cachedObjectsRefs[$object]; - } - - public function __clone() - { - $this->violations = clone $this->violations; - } -} diff --git a/vendor/symfony/validator/Context/ExecutionContextFactory.php b/vendor/symfony/validator/Context/ExecutionContextFactory.php deleted file mode 100644 index 623bd16..0000000 --- a/vendor/symfony/validator/Context/ExecutionContextFactory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Context; - -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Creates new {@link ExecutionContext} instances. - * - * @author Bernhard Schussek - * - * @internal version 2.5. Code against ExecutionContextFactoryInterface instead. - */ -class ExecutionContextFactory implements ExecutionContextFactoryInterface -{ - private $translator; - private $translationDomain; - - public function __construct(TranslatorInterface $translator, string $translationDomain = null) - { - $this->translator = $translator; - $this->translationDomain = $translationDomain; - } - - /** - * {@inheritdoc} - */ - public function createContext(ValidatorInterface $validator, $root) - { - return new ExecutionContext( - $validator, - $root, - $this->translator, - $this->translationDomain - ); - } -} diff --git a/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php b/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php deleted file mode 100644 index a300086..0000000 --- a/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Context; - -use Symfony\Component\Validator\Validator\ValidatorInterface; - -/** - * Creates instances of {@link ExecutionContextInterface}. - * - * You can use a custom factory if you want to customize the execution context - * that is passed through the validation run. - * - * @author Bernhard Schussek - */ -interface ExecutionContextFactoryInterface -{ - /** - * Creates a new execution context. - * - * @param mixed $root The root value of the validated - * object graph - * - * @return ExecutionContextInterface - */ - public function createContext(ValidatorInterface $validator, $root); -} diff --git a/vendor/symfony/validator/Context/ExecutionContextInterface.php b/vendor/symfony/validator/Context/ExecutionContextInterface.php deleted file mode 100644 index 093aa71..0000000 --- a/vendor/symfony/validator/Context/ExecutionContextInterface.php +++ /dev/null @@ -1,339 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Context; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintViolationListInterface; -use Symfony\Component\Validator\Mapping; -use Symfony\Component\Validator\Mapping\MetadataInterface; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; - -/** - * The context of a validation run. - * - * The context collects all violations generated during the validation. By - * default, validators execute all validations in a new context: - * - * $violations = $validator->validate($object); - * - * When you make another call to the validator, while the validation is in - * progress, the violations will be isolated from each other: - * - * public function validate($value, Constraint $constraint) - * { - * $validator = $this->context->getValidator(); - * - * // The violations are not added to $this->context - * $violations = $validator->validate($value); - * } - * - * However, if you want to add the violations to the current context, use the - * {@link ValidatorInterface::inContext()} method: - * - * public function validate($value, Constraint $constraint) - * { - * $validator = $this->context->getValidator(); - * - * // The violations are added to $this->context - * $validator - * ->inContext($this->context) - * ->validate($value) - * ; - * } - * - * Additionally, the context provides information about the current state of - * the validator, such as the currently validated class, the name of the - * currently validated property and more. These values change over time, so you - * cannot store a context and expect that the methods still return the same - * results later on. - * - * @author Bernhard Schussek - */ -interface ExecutionContextInterface -{ - /** - * Adds a violation at the current node of the validation graph. - * - * @param string|\Stringable $message The error message as a string or a stringable object - * @param array $params The parameters substituted in the error message - */ - public function addViolation(string $message, array $params = []); - - /** - * Returns a builder for adding a violation with extended information. - * - * Call {@link ConstraintViolationBuilderInterface::addViolation()} to - * add the violation when you're done with the configuration: - * - * $context->buildViolation('Please enter a number between %min% and %max%.') - * ->setParameter('%min%', '3') - * ->setParameter('%max%', '10') - * ->setTranslationDomain('number_validation') - * ->addViolation(); - * - * @param string|\Stringable $message The error message as a string or a stringable object - * @param array $parameters The parameters substituted in the error message - * - * @return ConstraintViolationBuilderInterface - */ - public function buildViolation(string $message, array $parameters = []); - - /** - * Returns the validator. - * - * Useful if you want to validate additional constraints: - * - * public function validate($value, Constraint $constraint) - * { - * $validator = $this->context->getValidator(); - * - * $violations = $validator->validate($value, new Length(['min' => 3])); - * - * if (count($violations) > 0) { - * // ... - * } - * } - * - * @return ValidatorInterface - */ - public function getValidator(); - - /** - * Returns the currently validated object. - * - * If the validator is currently validating a class constraint, the - * object of that class is returned. If it is validating a property or - * getter constraint, the object that the property/getter belongs to is - * returned. - * - * In other cases, null is returned. - * - * @return object|null - */ - public function getObject(); - - /** - * Sets the currently validated value. - * - * @param mixed $value The validated value - * @param object|null $object The currently validated object - * @param string $propertyPath The property path to the current value - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function setNode($value, ?object $object, MetadataInterface $metadata = null, string $propertyPath); - - /** - * Sets the currently validated group. - * - * @param string|null $group The validated group - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function setGroup(?string $group); - - /** - * Sets the currently validated constraint. - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function setConstraint(Constraint $constraint); - - /** - * Marks an object as validated in a specific validation group. - * - * @param string $cacheKey The hash of the object - * @param string $groupHash The group's name or hash, if it is group - * sequence - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function markGroupAsValidated(string $cacheKey, string $groupHash); - - /** - * Returns whether an object was validated in a specific validation group. - * - * @param string $cacheKey The hash of the object - * @param string $groupHash The group's name or hash, if it is group - * sequence - * - * @return bool - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function isGroupValidated(string $cacheKey, string $groupHash); - - /** - * Marks a constraint as validated for an object. - * - * @param string $cacheKey The hash of the object - * @param string $constraintHash The hash of the constraint - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function markConstraintAsValidated(string $cacheKey, string $constraintHash); - - /** - * Returns whether a constraint was validated for an object. - * - * @param string $cacheKey The hash of the object - * @param string $constraintHash The hash of the constraint - * - * @return bool - * - * @internal Used by the validator engine. Should not be called by user - * code. - */ - public function isConstraintValidated(string $cacheKey, string $constraintHash); - - /** - * Marks that an object was initialized. - * - * @param string $cacheKey The hash of the object - * - * @internal Used by the validator engine. Should not be called by user - * code. - * - * @see ObjectInitializerInterface - */ - public function markObjectAsInitialized(string $cacheKey); - - /** - * Returns whether an object was initialized. - * - * @param string $cacheKey The hash of the object - * - * @return bool - * - * @internal Used by the validator engine. Should not be called by user - * code. - * - * @see ObjectInitializerInterface - */ - public function isObjectInitialized(string $cacheKey); - - /** - * Returns the violations generated by the validator so far. - * - * @return ConstraintViolationListInterface - */ - public function getViolations(); - - /** - * Returns the value at which validation was started in the object graph. - * - * The validator, when given an object, traverses the properties and - * related objects and their properties. The root of the validation is the - * object from which the traversal started. - * - * The current value is returned by {@link getValue}. - * - * @return mixed - */ - public function getRoot(); - - /** - * Returns the value that the validator is currently validating. - * - * If you want to retrieve the object that was originally passed to the - * validator, use {@link getRoot}. - * - * @return mixed - */ - public function getValue(); - - /** - * Returns the metadata for the currently validated value. - * - * With the core implementation, this method returns a - * {@link Mapping\ClassMetadataInterface} instance if the current value is an object, - * a {@link Mapping\PropertyMetadata} instance if the current value is - * the value of a property and a {@link Mapping\GetterMetadata} instance if - * the validated value is the result of a getter method. - * - * If the validated value is neither of these, for example if the validator - * has been called with a plain value and constraint, this method returns - * null. - * - * @return MetadataInterface|null - */ - public function getMetadata(); - - /** - * Returns the validation group that is currently being validated. - * - * @return string|null - */ - public function getGroup(); - - /** - * Returns the class name of the current node. - * - * If the metadata of the current node does not implement - * {@link Mapping\ClassMetadataInterface} or if no metadata is available for the - * current node, this method returns null. - * - * @return string|null - */ - public function getClassName(); - - /** - * Returns the property name of the current node. - * - * If the metadata of the current node does not implement - * {@link PropertyMetadataInterface} or if no metadata is available for the - * current node, this method returns null. - * - * @return string|null - */ - public function getPropertyName(); - - /** - * Returns the property path to the value that the validator is currently - * validating. - * - * For example, take the following object graph: - * - *
    -     * (Person)---($address: Address)---($street: string)
    -     * 
    - * - * When the Person instance is passed to the validator, the - * property path is initially empty. When the $address property - * of that person is validated, the property path is "address". When - * the $street property of the related Address instance - * is validated, the property path is "address.street". - * - * Properties of objects are prefixed with a dot in the property path. - * Indices of arrays or objects implementing the {@link \ArrayAccess} - * interface are enclosed in brackets. For example, if the property in - * the previous example is $addresses and contains an array - * of Address instance, the property path generated for the - * $street property of one of these addresses is for example - * "addresses[0].street". - * - * @param string $subPath Optional. The suffix appended to the current - * property path. - * - * @return string The current property path. The result may be an empty - * string if the validator is currently validating the - * root value of the validation graph. - */ - public function getPropertyPath(string $subPath = ''); -} diff --git a/vendor/symfony/validator/DataCollector/ValidatorDataCollector.php b/vendor/symfony/validator/DataCollector/ValidatorDataCollector.php deleted file mode 100644 index 2b36267..0000000 --- a/vendor/symfony/validator/DataCollector/ValidatorDataCollector.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\DataCollector; - -use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Component\Validator\Validator\TraceableValidator; -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Caster\ClassStub; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Maxime Steinhausser - * - * @final - */ -class ValidatorDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $validator; - - public function __construct(TraceableValidator $validator) - { - $this->validator = $validator; - $this->reset(); - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Throwable $exception = null) - { - // Everything is collected once, on kernel terminate. - } - - public function reset() - { - $this->data = [ - 'calls' => $this->cloneVar([]), - 'violations_count' => 0, - ]; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $collected = $this->validator->getCollectedData(); - $this->data['calls'] = $this->cloneVar($collected); - $this->data['violations_count'] = array_reduce($collected, function ($previous, $item) { - return $previous + \count($item['violations']); - }, 0); - } - - public function getCalls(): Data - { - return $this->data['calls']; - } - - public function getViolationsCount(): int - { - return $this->data['violations_count']; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'validator'; - } - - protected function getCasters(): array - { - return parent::getCasters() + [ - \Exception::class => function (\Exception $e, array $a, Stub $s) { - foreach (["\0Exception\0previous", "\0Exception\0trace"] as $k) { - if (isset($a[$k])) { - unset($a[$k]); - ++$s->cut; - } - } - - return $a; - }, - FormInterface::class => function (FormInterface $f, array $a) { - return [ - Caster::PREFIX_VIRTUAL.'name' => $f->getName(), - Caster::PREFIX_VIRTUAL.'type_class' => new ClassStub(\get_class($f->getConfig()->getType()->getInnerType())), - Caster::PREFIX_VIRTUAL.'data' => $f->getData(), - ]; - }, - ]; - } -} diff --git a/vendor/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php b/vendor/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php deleted file mode 100644 index dca06ee..0000000 --- a/vendor/symfony/validator/DependencyInjection/AddAutoMappingConfigurationPass.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Injects the automapping configuration as last argument of loaders tagged with the "validator.auto_mapper" tag. - * - * @author Kévin Dunglas - */ -class AddAutoMappingConfigurationPass implements CompilerPassInterface -{ - private $validatorBuilderService; - private $tag; - - public function __construct(string $validatorBuilderService = 'validator.builder', string $tag = 'validator.auto_mapper') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->validatorBuilderService = $validatorBuilderService; - $this->tag = $tag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasParameter('validator.auto_mapping') || !$container->hasDefinition($this->validatorBuilderService)) { - return; - } - - $config = $container->getParameter('validator.auto_mapping'); - - $globalNamespaces = []; - $servicesToNamespaces = []; - foreach ($config as $namespace => $value) { - if ([] === $value['services']) { - $globalNamespaces[] = $namespace; - - continue; - } - - foreach ($value['services'] as $service) { - $servicesToNamespaces[$service][] = $namespace; - } - } - - $validatorBuilder = $container->getDefinition($this->validatorBuilderService); - foreach ($container->findTaggedServiceIds($this->tag) as $id => $tags) { - $regexp = $this->getRegexp(array_merge($globalNamespaces, $servicesToNamespaces[$id] ?? [])); - $validatorBuilder->addMethodCall('addLoader', [new Reference($id)]); - $container->getDefinition($id)->setArgument('$classValidatorRegexp', $regexp); - } - - $container->getParameterBag()->remove('validator.auto_mapping'); - } - - /** - * Builds a regexp to check if a class is auto-mapped. - */ - private function getRegexp(array $patterns): ?string - { - if (!$patterns) { - return null; - } - - $regexps = []; - foreach ($patterns as $pattern) { - // Escape namespace - $regex = preg_quote(ltrim($pattern, '\\')); - - // Wildcards * and ** - $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']); - - // If this class does not end by a slash, anchor the end - if (!str_ends_with($regex, '\\')) { - $regex .= '$'; - } - - $regexps[] = '^'.$regex; - } - - return sprintf('{%s}', implode('|', $regexps)); - } -} diff --git a/vendor/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php b/vendor/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php deleted file mode 100644 index a3c6559..0000000 --- a/vendor/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Johannes M. Schmitt - * @author Robin Chalas - */ -class AddConstraintValidatorsPass implements CompilerPassInterface -{ - private $validatorFactoryServiceId; - private $constraintValidatorTag; - - public function __construct(string $validatorFactoryServiceId = 'validator.validator_factory', string $constraintValidatorTag = 'validator.constraint_validator') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->validatorFactoryServiceId = $validatorFactoryServiceId; - $this->constraintValidatorTag = $constraintValidatorTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->validatorFactoryServiceId)) { - return; - } - - $validators = []; - foreach ($container->findTaggedServiceIds($this->constraintValidatorTag, true) as $id => $attributes) { - $definition = $container->getDefinition($id); - - if (isset($attributes[0]['alias'])) { - $validators[$attributes[0]['alias']] = new Reference($id); - } - - $validators[$definition->getClass()] = new Reference($id); - } - - $container - ->getDefinition($this->validatorFactoryServiceId) - ->replaceArgument(0, ServiceLocatorTagPass::register($container, $validators)) - ; - } -} diff --git a/vendor/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php b/vendor/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php deleted file mode 100644 index 0ea8eef..0000000 --- a/vendor/symfony/validator/DependencyInjection/AddValidatorInitializersPass.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Fabien Potencier - * @author Robin Chalas - */ -class AddValidatorInitializersPass implements CompilerPassInterface -{ - private $builderService; - private $initializerTag; - - public function __construct(string $builderService = 'validator.builder', string $initializerTag = 'validator.initializer') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/validator', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->builderService = $builderService; - $this->initializerTag = $initializerTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->builderService)) { - return; - } - - $initializers = []; - foreach ($container->findTaggedServiceIds($this->initializerTag, true) as $id => $attributes) { - $initializers[] = new Reference($id); - } - - $container->getDefinition($this->builderService)->addMethodCall('addObjectInitializers', [$initializers]); - } -} diff --git a/vendor/symfony/validator/Exception/BadMethodCallException.php b/vendor/symfony/validator/Exception/BadMethodCallException.php deleted file mode 100644 index 939161b..0000000 --- a/vendor/symfony/validator/Exception/BadMethodCallException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * Base BadMethodCallException for the Validator component. - * - * @author Bernhard Schussek - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/validator/Exception/ConstraintDefinitionException.php b/vendor/symfony/validator/Exception/ConstraintDefinitionException.php deleted file mode 100644 index b24fdd6..0000000 --- a/vendor/symfony/validator/Exception/ConstraintDefinitionException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class ConstraintDefinitionException extends ValidatorException -{ -} diff --git a/vendor/symfony/validator/Exception/ExceptionInterface.php b/vendor/symfony/validator/Exception/ExceptionInterface.php deleted file mode 100644 index 390e8c0..0000000 --- a/vendor/symfony/validator/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * Base ExceptionInterface for the Validator component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/validator/Exception/GroupDefinitionException.php b/vendor/symfony/validator/Exception/GroupDefinitionException.php deleted file mode 100644 index ab7e91d..0000000 --- a/vendor/symfony/validator/Exception/GroupDefinitionException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class GroupDefinitionException extends ValidatorException -{ -} diff --git a/vendor/symfony/validator/Exception/InvalidArgumentException.php b/vendor/symfony/validator/Exception/InvalidArgumentException.php deleted file mode 100644 index 22da39b..0000000 --- a/vendor/symfony/validator/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * Base InvalidArgumentException for the Validator component. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/validator/Exception/InvalidOptionsException.php b/vendor/symfony/validator/Exception/InvalidOptionsException.php deleted file mode 100644 index 79d064f..0000000 --- a/vendor/symfony/validator/Exception/InvalidOptionsException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class InvalidOptionsException extends ValidatorException -{ - private $options; - - public function __construct(string $message, array $options) - { - parent::__construct($message); - - $this->options = $options; - } - - public function getOptions() - { - return $this->options; - } -} diff --git a/vendor/symfony/validator/Exception/LogicException.php b/vendor/symfony/validator/Exception/LogicException.php deleted file mode 100644 index 41d0975..0000000 --- a/vendor/symfony/validator/Exception/LogicException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/validator/Exception/MappingException.php b/vendor/symfony/validator/Exception/MappingException.php deleted file mode 100644 index 4c8c057..0000000 --- a/vendor/symfony/validator/Exception/MappingException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class MappingException extends ValidatorException -{ -} diff --git a/vendor/symfony/validator/Exception/MissingOptionsException.php b/vendor/symfony/validator/Exception/MissingOptionsException.php deleted file mode 100644 index 61de567..0000000 --- a/vendor/symfony/validator/Exception/MissingOptionsException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class MissingOptionsException extends ValidatorException -{ - private $options; - - public function __construct(string $message, array $options) - { - parent::__construct($message); - - $this->options = $options; - } - - public function getOptions() - { - return $this->options; - } -} diff --git a/vendor/symfony/validator/Exception/NoSuchMetadataException.php b/vendor/symfony/validator/Exception/NoSuchMetadataException.php deleted file mode 100644 index 4cac74c..0000000 --- a/vendor/symfony/validator/Exception/NoSuchMetadataException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * @author Bernhard Schussek - */ -class NoSuchMetadataException extends ValidatorException -{ -} diff --git a/vendor/symfony/validator/Exception/OutOfBoundsException.php b/vendor/symfony/validator/Exception/OutOfBoundsException.php deleted file mode 100644 index 30906e8..0000000 --- a/vendor/symfony/validator/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * Base OutOfBoundsException for the Validator component. - * - * @author Bernhard Schussek - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/validator/Exception/RuntimeException.php b/vendor/symfony/validator/Exception/RuntimeException.php deleted file mode 100644 index df4a50c..0000000 --- a/vendor/symfony/validator/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * Base RuntimeException for the Validator component. - * - * @author Bernhard Schussek - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/validator/Exception/UnexpectedTypeException.php b/vendor/symfony/validator/Exception/UnexpectedTypeException.php deleted file mode 100644 index 86a7c03..0000000 --- a/vendor/symfony/validator/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class UnexpectedTypeException extends ValidatorException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, get_debug_type($value))); - } -} diff --git a/vendor/symfony/validator/Exception/UnexpectedValueException.php b/vendor/symfony/validator/Exception/UnexpectedValueException.php deleted file mode 100644 index 7a7f7f7..0000000 --- a/vendor/symfony/validator/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * @author Christian Flothmann - */ -class UnexpectedValueException extends UnexpectedTypeException -{ - private $expectedType; - - public function __construct($value, string $expectedType) - { - parent::__construct($value, $expectedType); - - $this->expectedType = $expectedType; - } - - public function getExpectedType(): string - { - return $this->expectedType; - } -} diff --git a/vendor/symfony/validator/Exception/UnsupportedMetadataException.php b/vendor/symfony/validator/Exception/UnsupportedMetadataException.php deleted file mode 100644 index aff569b..0000000 --- a/vendor/symfony/validator/Exception/UnsupportedMetadataException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -/** - * @author Bernhard Schussek - */ -class UnsupportedMetadataException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/validator/Exception/ValidationFailedException.php b/vendor/symfony/validator/Exception/ValidationFailedException.php deleted file mode 100644 index ca0314c..0000000 --- a/vendor/symfony/validator/Exception/ValidationFailedException.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -use Symfony\Component\Validator\ConstraintViolationListInterface; - -/** - * @author Jan Vernieuwe - */ -class ValidationFailedException extends RuntimeException -{ - private $violations; - private $value; - - public function __construct($value, ConstraintViolationListInterface $violations) - { - $this->violations = $violations; - $this->value = $value; - parent::__construct($violations); - } - - public function getValue() - { - return $this->value; - } - - public function getViolations(): ConstraintViolationListInterface - { - return $this->violations; - } -} diff --git a/vendor/symfony/validator/Exception/ValidatorException.php b/vendor/symfony/validator/Exception/ValidatorException.php deleted file mode 100644 index 28bd470..0000000 --- a/vendor/symfony/validator/Exception/ValidatorException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Exception; - -class ValidatorException extends RuntimeException -{ -} diff --git a/vendor/symfony/validator/GroupSequenceProviderInterface.php b/vendor/symfony/validator/GroupSequenceProviderInterface.php deleted file mode 100644 index 0374a8b..0000000 --- a/vendor/symfony/validator/GroupSequenceProviderInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Constraints\GroupSequence; - -/** - * Defines the interface for a group sequence provider. - */ -interface GroupSequenceProviderInterface -{ - /** - * Returns which validation groups should be used for a certain state - * of the object. - * - * @return string[]|string[][]|GroupSequence - */ - public function getGroupSequence(); -} diff --git a/vendor/symfony/validator/LICENSE b/vendor/symfony/validator/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/validator/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/validator/Mapping/AutoMappingStrategy.php b/vendor/symfony/validator/Mapping/AutoMappingStrategy.php deleted file mode 100644 index 4012ddc..0000000 --- a/vendor/symfony/validator/Mapping/AutoMappingStrategy.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -/** - * Specifies how the auto-mapping feature should behave. - * - * @author Maxime Steinhausser - */ -final class AutoMappingStrategy -{ - /** - * Nothing explicitly set, rely on auto-mapping configured regex. - */ - public const NONE = 0; - - /** - * Explicitly enabled. - */ - public const ENABLED = 1; - - /** - * Explicitly disabled. - */ - public const DISABLED = 2; - - /** - * Not instantiable. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/validator/Mapping/CascadingStrategy.php b/vendor/symfony/validator/Mapping/CascadingStrategy.php deleted file mode 100644 index 6bab8ac..0000000 --- a/vendor/symfony/validator/Mapping/CascadingStrategy.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -/** - * Specifies whether an object should be cascaded. - * - * Cascading is relevant for any node type but class nodes. If such a node - * contains an object of value, and if cascading is enabled, then the node - * traverser will try to find class metadata for that object and validate the - * object against that metadata. - * - * If no metadata is found for a cascaded object, and if that object implements - * {@link \Traversable}, the node traverser will iterate over the object and - * cascade each object or collection contained within, unless iteration is - * prohibited by the specified {@link TraversalStrategy}. - * - * Although the constants currently represent a boolean switch, they are - * implemented as bit mask in order to allow future extensions. - * - * @author Bernhard Schussek - * - * @see TraversalStrategy - */ -class CascadingStrategy -{ - /** - * Specifies that a node should not be cascaded. - */ - public const NONE = 1; - - /** - * Specifies that a node should be cascaded. - */ - public const CASCADE = 2; - - /** - * Not instantiable. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/validator/Mapping/ClassMetadata.php b/vendor/symfony/validator/Mapping/ClassMetadata.php deleted file mode 100644 index 31f5484..0000000 --- a/vendor/symfony/validator/Mapping/ClassMetadata.php +++ /dev/null @@ -1,513 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Cascade; -use Symfony\Component\Validator\Constraints\Composite; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\Constraints\Traverse; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\GroupDefinitionException; - -/** - * Default implementation of {@link ClassMetadataInterface}. - * - * This class supports serialization and cloning. - * - * @author Bernhard Schussek - * @author Fabien Potencier - */ -class ClassMetadata extends GenericMetadata implements ClassMetadataInterface -{ - /** - * @var string - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getClassName()} instead. - */ - public $name; - - /** - * @var string - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getDefaultGroup()} instead. - */ - public $defaultGroup; - - /** - * @var MemberMetadata[][] - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getPropertyMetadata()} instead. - */ - public $members = []; - - /** - * @var PropertyMetadata[] - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getPropertyMetadata()} instead. - */ - public $properties = []; - - /** - * @var GetterMetadata[] - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getPropertyMetadata()} instead. - */ - public $getters = []; - - /** - * @var array - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getGroupSequence()} instead. - */ - public $groupSequence = []; - - /** - * @var bool - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link isGroupSequenceProvider()} instead. - */ - public $groupSequenceProvider = false; - - /** - * The strategy for traversing traversable objects. - * - * By default, only instances of {@link \Traversable} are traversed. - * - * @var int - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getTraversalStrategy()} instead. - */ - public $traversalStrategy = TraversalStrategy::IMPLICIT; - - /** - * @var \ReflectionClass - */ - private $reflClass; - - public function __construct(string $class) - { - $this->name = $class; - // class name without namespace - if (false !== $nsSep = strrpos($class, '\\')) { - $this->defaultGroup = substr($class, $nsSep + 1); - } else { - $this->defaultGroup = $class; - } - } - - /** - * {@inheritdoc} - */ - public function __sleep() - { - $parentProperties = parent::__sleep(); - - // Don't store the cascading strategy. Classes never cascade. - unset($parentProperties[array_search('cascadingStrategy', $parentProperties)]); - - return array_merge($parentProperties, [ - 'getters', - 'groupSequence', - 'groupSequenceProvider', - 'members', - 'name', - 'properties', - 'defaultGroup', - ]); - } - - /** - * {@inheritdoc} - */ - public function getClassName() - { - return $this->name; - } - - /** - * Returns the name of the default group for this class. - * - * For each class, the group "Default" is an alias for the group - * "", where is the non-namespaced name of the - * class. All constraints implicitly or explicitly assigned to group - * "Default" belong to both of these groups, unless the class defines - * a group sequence. - * - * If a class defines a group sequence, validating the class in "Default" - * will validate the group sequence. The constraints assigned to "Default" - * can still be validated by validating the class in "". - * - * @return string - */ - public function getDefaultGroup() - { - return $this->defaultGroup; - } - - /** - * {@inheritdoc} - * - * If the constraint {@link Cascade} is added, the cascading strategy will be - * changed to {@link CascadingStrategy::CASCADE}. - * - * If the constraint {@link Traverse} is added, the traversal strategy will be - * changed. Depending on the $traverse property of that constraint, - * the traversal strategy will be set to one of the following: - * - * - {@link TraversalStrategy::IMPLICIT} by default - * - {@link TraversalStrategy::NONE} if $traverse is disabled - * - {@link TraversalStrategy::TRAVERSE} if $traverse is enabled - */ - public function addConstraint(Constraint $constraint) - { - $this->checkConstraint($constraint); - - if ($constraint instanceof Traverse) { - if ($constraint->traverse) { - // If traverse is true, traversal should be explicitly enabled - $this->traversalStrategy = TraversalStrategy::TRAVERSE; - } else { - // If traverse is false, traversal should be explicitly disabled - $this->traversalStrategy = TraversalStrategy::NONE; - } - - // The constraint is not added - return $this; - } - - if ($constraint instanceof Cascade) { - if (\PHP_VERSION_ID < 70400) { - throw new ConstraintDefinitionException(sprintf('The constraint "%s" requires PHP 7.4.', Cascade::class)); - } - - $this->cascadingStrategy = CascadingStrategy::CASCADE; - - foreach ($this->getReflectionClass()->getProperties() as $property) { - if ($property->hasType() && (('array' === $type = $property->getType()->getName()) || class_exists(($type)))) { - $this->addPropertyConstraint($property->getName(), new Valid()); - } - } - - // The constraint is not added - return $this; - } - - $constraint->addImplicitGroupName($this->getDefaultGroup()); - - parent::addConstraint($constraint); - - return $this; - } - - /** - * Adds a constraint to the given property. - * - * @return $this - */ - public function addPropertyConstraint(string $property, Constraint $constraint) - { - if (!isset($this->properties[$property])) { - $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); - - $this->addPropertyMetadata($this->properties[$property]); - } - - $constraint->addImplicitGroupName($this->getDefaultGroup()); - - $this->properties[$property]->addConstraint($constraint); - - return $this; - } - - /** - * @param Constraint[] $constraints - * - * @return $this - */ - public function addPropertyConstraints(string $property, array $constraints) - { - foreach ($constraints as $constraint) { - $this->addPropertyConstraint($property, $constraint); - } - - return $this; - } - - /** - * Adds a constraint to the getter of the given property. - * - * The name of the getter is assumed to be the name of the property with an - * uppercased first letter and the prefix "get", "is" or "has". - * - * @return $this - */ - public function addGetterConstraint(string $property, Constraint $constraint) - { - if (!isset($this->getters[$property])) { - $this->getters[$property] = new GetterMetadata($this->getClassName(), $property); - - $this->addPropertyMetadata($this->getters[$property]); - } - - $constraint->addImplicitGroupName($this->getDefaultGroup()); - - $this->getters[$property]->addConstraint($constraint); - - return $this; - } - - /** - * Adds a constraint to the getter of the given property. - * - * @return $this - */ - public function addGetterMethodConstraint(string $property, string $method, Constraint $constraint) - { - if (!isset($this->getters[$property])) { - $this->getters[$property] = new GetterMetadata($this->getClassName(), $property, $method); - - $this->addPropertyMetadata($this->getters[$property]); - } - - $constraint->addImplicitGroupName($this->getDefaultGroup()); - - $this->getters[$property]->addConstraint($constraint); - - return $this; - } - - /** - * @param Constraint[] $constraints - * - * @return $this - */ - public function addGetterConstraints(string $property, array $constraints) - { - foreach ($constraints as $constraint) { - $this->addGetterConstraint($property, $constraint); - } - - return $this; - } - - /** - * @param Constraint[] $constraints - * - * @return $this - */ - public function addGetterMethodConstraints(string $property, string $method, array $constraints) - { - foreach ($constraints as $constraint) { - $this->addGetterMethodConstraint($property, $method, $constraint); - } - - return $this; - } - - /** - * Merges the constraints of the given metadata into this object. - */ - public function mergeConstraints(self $source) - { - if ($source->isGroupSequenceProvider()) { - $this->setGroupSequenceProvider(true); - } - - foreach ($source->getConstraints() as $constraint) { - $this->addConstraint(clone $constraint); - } - - foreach ($source->getConstrainedProperties() as $property) { - foreach ($source->getPropertyMetadata($property) as $member) { - $member = clone $member; - - foreach ($member->getConstraints() as $constraint) { - if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) { - $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint; - } - - $constraint->addImplicitGroupName($this->getDefaultGroup()); - } - - $this->addPropertyMetadata($member); - - if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) { - $property = $member->getPropertyName(); - - if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) { - $this->properties[$property] = $member; - } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) { - $this->getters[$property] = $member; - } - } - } - } - } - - /** - * {@inheritdoc} - */ - public function hasPropertyMetadata(string $property) - { - return \array_key_exists($property, $this->members); - } - - /** - * {@inheritdoc} - */ - public function getPropertyMetadata(string $property) - { - return $this->members[$property] ?? []; - } - - /** - * {@inheritdoc} - */ - public function getConstrainedProperties() - { - return array_keys($this->members); - } - - /** - * Sets the default group sequence for this class. - * - * @param string[]|GroupSequence $groupSequence An array of group names - * - * @return $this - * - * @throws GroupDefinitionException - */ - public function setGroupSequence($groupSequence) - { - if ($this->isGroupSequenceProvider()) { - throw new GroupDefinitionException('Defining a static group sequence is not allowed with a group sequence provider.'); - } - - if (\is_array($groupSequence)) { - $groupSequence = new GroupSequence($groupSequence); - } - - if (\in_array(Constraint::DEFAULT_GROUP, $groupSequence->groups, true)) { - throw new GroupDefinitionException(sprintf('The group "%s" is not allowed in group sequences.', Constraint::DEFAULT_GROUP)); - } - - if (!\in_array($this->getDefaultGroup(), $groupSequence->groups, true)) { - throw new GroupDefinitionException(sprintf('The group "%s" is missing in the group sequence.', $this->getDefaultGroup())); - } - - $this->groupSequence = $groupSequence; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function hasGroupSequence() - { - return $this->groupSequence && \count($this->groupSequence->groups) > 0; - } - - /** - * {@inheritdoc} - */ - public function getGroupSequence() - { - return $this->groupSequence; - } - - /** - * Returns a ReflectionClass instance for this class. - * - * @return \ReflectionClass - */ - public function getReflectionClass() - { - if (!$this->reflClass) { - $this->reflClass = new \ReflectionClass($this->getClassName()); - } - - return $this->reflClass; - } - - /** - * Sets whether a group sequence provider should be used. - * - * @throws GroupDefinitionException - */ - public function setGroupSequenceProvider(bool $active) - { - if ($this->hasGroupSequence()) { - throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence.'); - } - - if (!$this->getReflectionClass()->implementsInterface('Symfony\Component\Validator\GroupSequenceProviderInterface')) { - throw new GroupDefinitionException(sprintf('Class "%s" must implement GroupSequenceProviderInterface.', $this->name)); - } - - $this->groupSequenceProvider = $active; - } - - /** - * {@inheritdoc} - */ - public function isGroupSequenceProvider() - { - return $this->groupSequenceProvider; - } - - /** - * {@inheritdoc} - */ - public function getCascadingStrategy() - { - return $this->cascadingStrategy; - } - - private function addPropertyMetadata(PropertyMetadataInterface $metadata) - { - $property = $metadata->getPropertyName(); - - $this->members[$property][] = $metadata; - } - - private function checkConstraint(Constraint $constraint) - { - if (!\in_array(Constraint::CLASS_CONSTRAINT, (array) $constraint->getTargets(), true)) { - throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', get_debug_type($constraint))); - } - - if ($constraint instanceof Composite) { - foreach ($constraint->getNestedConstraints() as $nestedConstraint) { - $this->checkConstraint($nestedConstraint); - } - } - } -} diff --git a/vendor/symfony/validator/Mapping/ClassMetadataInterface.php b/vendor/symfony/validator/Mapping/ClassMetadataInterface.php deleted file mode 100644 index 99764c5..0000000 --- a/vendor/symfony/validator/Mapping/ClassMetadataInterface.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\GroupSequenceProviderInterface; - -/** - * Stores all metadata needed for validating objects of specific class. - * - * Most importantly, the metadata stores the constraints against which an object - * and its properties should be validated. - * - * Additionally, the metadata stores whether the "Default" group is overridden - * by a group sequence for that class and whether instances of that class - * should be traversed or not. - * - * @author Bernhard Schussek - * - * @see MetadataInterface - * @see GroupSequence - * @see GroupSequenceProviderInterface - * @see TraversalStrategy - */ -interface ClassMetadataInterface extends MetadataInterface -{ - /** - * Returns the names of all constrained properties. - * - * @return string[] - */ - public function getConstrainedProperties(); - - /** - * Returns whether the "Default" group is overridden by a group sequence. - * - * If it is, you can access the group sequence with {@link getGroupSequence()}. - * - * @return bool - */ - public function hasGroupSequence(); - - /** - * Returns the group sequence that overrides the "Default" group for this - * class. - * - * @return GroupSequence|null - */ - public function getGroupSequence(); - - /** - * Returns whether the "Default" group is overridden by a dynamic group - * sequence obtained by the validated objects. - * - * If this method returns true, the class must implement - * {@link GroupSequenceProviderInterface}. - * This interface will be used to obtain the group sequence when an object - * of this class is validated. - * - * @return bool - */ - public function isGroupSequenceProvider(); - - /** - * Check if there's any metadata attached to the given named property. - * - * @param string $property The property name - * - * @return bool - */ - public function hasPropertyMetadata(string $property); - - /** - * Returns all metadata instances for the given named property. - * - * If your implementation does not support properties, throw an exception - * in this method (for example a BadMethodCallException). - * - * @param string $property The property name - * - * @return PropertyMetadataInterface[] - */ - public function getPropertyMetadata(string $property); - - /** - * Returns the name of the backing PHP class. - * - * @return string - */ - public function getClassName(); -} diff --git a/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php b/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php deleted file mode 100644 index ec21d54..0000000 --- a/vendor/symfony/validator/Mapping/Factory/BlackHoleMetadataFactory.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Factory; - -use Symfony\Component\Validator\Exception\LogicException; - -/** - * Metadata factory that does not store metadata. - * - * This implementation is useful if you want to validate values against - * constraints only and you don't need to add constraints to classes and - * properties. - * - * @author Fabien Potencier - */ -class BlackHoleMetadataFactory implements MetadataFactoryInterface -{ - /** - * {@inheritdoc} - */ - public function getMetadataFor($value) - { - throw new LogicException('This class does not support metadata.'); - } - - /** - * {@inheritdoc} - */ - public function hasMetadataFor($value) - { - return false; - } -} diff --git a/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php deleted file mode 100644 index 42ed050..0000000 --- a/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Factory; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Validator\Exception\NoSuchMetadataException; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; - -/** - * Creates new {@link ClassMetadataInterface} instances. - * - * Whenever {@link getMetadataFor()} is called for the first time with a given - * class name or object of that class, a new metadata instance is created and - * returned. On subsequent requests for the same class, the same metadata - * instance will be returned. - * - * You can optionally pass a {@link LoaderInterface} instance to the constructor. - * Whenever a new metadata instance is created, it is passed to the loader, - * which can configure the metadata based on configuration loaded from the - * filesystem or a database. If you want to use multiple loaders, wrap them in a - * {@link LoaderChain}. - * - * You can also optionally pass a {@link CacheInterface} instance to the - * constructor. This cache will be used for persisting the generated metadata - * between multiple PHP requests. - * - * @author Bernhard Schussek - */ -class LazyLoadingMetadataFactory implements MetadataFactoryInterface -{ - protected $loader; - protected $cache; - - /** - * The loaded metadata, indexed by class name. - * - * @var ClassMetadata[] - */ - protected $loadedClasses = []; - - public function __construct(LoaderInterface $loader = null, CacheItemPoolInterface $cache = null) - { - $this->loader = $loader; - $this->cache = $cache; - } - - /** - * {@inheritdoc} - * - * If the method was called with the same class name (or an object of that - * class) before, the same metadata instance is returned. - * - * If the factory was configured with a cache, this method will first look - * for an existing metadata instance in the cache. If an existing instance - * is found, it will be returned without further ado. - * - * Otherwise, a new metadata instance is created. If the factory was - * configured with a loader, the metadata is passed to the - * {@link LoaderInterface::loadClassMetadata()} method for further - * configuration. At last, the new object is returned. - */ - public function getMetadataFor($value) - { - if (!\is_object($value) && !\is_string($value)) { - throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: "%s".', get_debug_type($value))); - } - - $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); - - if (isset($this->loadedClasses[$class])) { - return $this->loadedClasses[$class]; - } - - if (!class_exists($class) && !interface_exists($class, false)) { - throw new NoSuchMetadataException(sprintf('The class or interface "%s" does not exist.', $class)); - } - - $cacheItem = null === $this->cache ? null : $this->cache->getItem($this->escapeClassName($class)); - if ($cacheItem && $cacheItem->isHit()) { - $metadata = $cacheItem->get(); - - // Include constraints from the parent class - $this->mergeConstraints($metadata); - - return $this->loadedClasses[$class] = $metadata; - } - - $metadata = new ClassMetadata($class); - - if (null !== $this->loader) { - $this->loader->loadClassMetadata($metadata); - } - - if (null !== $cacheItem) { - $this->cache->save($cacheItem->set($metadata)); - } - - // Include constraints from the parent class - $this->mergeConstraints($metadata); - - return $this->loadedClasses[$class] = $metadata; - } - - private function mergeConstraints(ClassMetadata $metadata) - { - if ($metadata->getReflectionClass()->isInterface()) { - return; - } - - // Include constraints from the parent class - if ($parent = $metadata->getReflectionClass()->getParentClass()) { - $metadata->mergeConstraints($this->getMetadataFor($parent->name)); - } - - // Include constraints from all directly implemented interfaces - foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) { - if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { - continue; - } - - if ($parent && \in_array($interface->getName(), $parent->getInterfaceNames(), true)) { - continue; - } - - $metadata->mergeConstraints($this->getMetadataFor($interface->name)); - } - } - - /** - * {@inheritdoc} - */ - public function hasMetadataFor($value) - { - if (!\is_object($value) && !\is_string($value)) { - return false; - } - - $class = ltrim(\is_object($value) ? \get_class($value) : $value, '\\'); - - return class_exists($class) || interface_exists($class, false); - } - - /** - * Replaces backslashes by dots in a class name. - */ - private function escapeClassName(string $class): string - { - if (str_contains($class, '@')) { - // anonymous class: replace all PSR6-reserved characters - return str_replace(["\0", '\\', '/', '@', ':', '{', '}', '(', ')'], '.', $class); - } - - return str_replace('\\', '.', $class); - } -} diff --git a/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php b/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php deleted file mode 100644 index d3517c5..0000000 --- a/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Factory; - -use Symfony\Component\Validator\Exception\NoSuchMetadataException; -use Symfony\Component\Validator\Mapping\MetadataInterface; - -/** - * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. - * - * @author Bernhard Schussek - */ -interface MetadataFactoryInterface -{ - /** - * Returns the metadata for the given value. - * - * @param mixed $value Some value - * - * @return MetadataInterface - * - * @throws NoSuchMetadataException If no metadata exists for the given value - */ - public function getMetadataFor($value); - - /** - * Returns whether the class is able to return metadata for the given value. - * - * @param mixed $value Some value - * - * @return bool - */ - public function hasMetadataFor($value); -} diff --git a/vendor/symfony/validator/Mapping/GenericMetadata.php b/vendor/symfony/validator/Mapping/GenericMetadata.php deleted file mode 100644 index 06971e8..0000000 --- a/vendor/symfony/validator/Mapping/GenericMetadata.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Cascade; -use Symfony\Component\Validator\Constraints\DisableAutoMapping; -use Symfony\Component\Validator\Constraints\EnableAutoMapping; -use Symfony\Component\Validator\Constraints\Traverse; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * A generic container of {@link Constraint} objects. - * - * This class supports serialization and cloning. - * - * @author Bernhard Schussek - */ -class GenericMetadata implements MetadataInterface -{ - /** - * @var Constraint[] - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getConstraints()} and {@link findConstraints()} instead. - */ - public $constraints = []; - - /** - * @var array - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link findConstraints()} instead. - */ - public $constraintsByGroup = []; - - /** - * The strategy for cascading objects. - * - * By default, objects are not cascaded. - * - * @var int - * - * @see CascadingStrategy - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getCascadingStrategy()} instead. - */ - public $cascadingStrategy = CascadingStrategy::NONE; - - /** - * The strategy for traversing traversable objects. - * - * By default, traversable objects are not traversed. - * - * @var int - * - * @see TraversalStrategy - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getTraversalStrategy()} instead. - */ - public $traversalStrategy = TraversalStrategy::NONE; - - /** - * Is auto-mapping enabled? - * - * @var int - * - * @see AutoMappingStrategy - * - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getAutoMappingStrategy()} instead. - */ - public $autoMappingStrategy = AutoMappingStrategy::NONE; - - /** - * Returns the names of the properties that should be serialized. - * - * @return string[] - */ - public function __sleep() - { - return [ - 'constraints', - 'constraintsByGroup', - 'cascadingStrategy', - 'traversalStrategy', - 'autoMappingStrategy', - ]; - } - - /** - * Clones this object. - */ - public function __clone() - { - $constraints = $this->constraints; - - $this->constraints = []; - $this->constraintsByGroup = []; - - foreach ($constraints as $constraint) { - $this->addConstraint(clone $constraint); - } - } - - /** - * Adds a constraint. - * - * If the constraint {@link Valid} is added, the cascading strategy will be - * changed to {@link CascadingStrategy::CASCADE}. Depending on the - * $traverse property of that constraint, the traversal strategy - * will be set to one of the following: - * - * - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled - * - {@link TraversalStrategy::NONE} if $traverse is disabled - * - * @return $this - * - * @throws ConstraintDefinitionException When trying to add the {@link Cascade} - * or {@link Traverse} constraint - */ - public function addConstraint(Constraint $constraint) - { - if ($constraint instanceof Traverse || $constraint instanceof Cascade) { - throw new ConstraintDefinitionException(sprintf('The constraint "%s" can only be put on classes. Please use "Symfony\Component\Validator\Constraints\Valid" instead.', get_debug_type($constraint))); - } - - if ($constraint instanceof Valid && null === $constraint->groups) { - $this->cascadingStrategy = CascadingStrategy::CASCADE; - - if ($constraint->traverse) { - $this->traversalStrategy = TraversalStrategy::IMPLICIT; - } else { - $this->traversalStrategy = TraversalStrategy::NONE; - } - - return $this; - } - - if ($constraint instanceof DisableAutoMapping || $constraint instanceof EnableAutoMapping) { - $this->autoMappingStrategy = $constraint instanceof EnableAutoMapping ? AutoMappingStrategy::ENABLED : AutoMappingStrategy::DISABLED; - - // The constraint is not added - return $this; - } - - $this->constraints[] = $constraint; - - foreach ($constraint->groups as $group) { - $this->constraintsByGroup[$group][] = $constraint; - } - - return $this; - } - - /** - * Adds an list of constraints. - * - * @param Constraint[] $constraints The constraints to add - * - * @return $this - */ - public function addConstraints(array $constraints) - { - foreach ($constraints as $constraint) { - $this->addConstraint($constraint); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getConstraints() - { - return $this->constraints; - } - - /** - * Returns whether this element has any constraints. - * - * @return bool - */ - public function hasConstraints() - { - return \count($this->constraints) > 0; - } - - /** - * {@inheritdoc} - * - * Aware of the global group (* group). - */ - public function findConstraints(string $group) - { - return $this->constraintsByGroup[$group] ?? []; - } - - /** - * {@inheritdoc} - */ - public function getCascadingStrategy() - { - return $this->cascadingStrategy; - } - - /** - * {@inheritdoc} - */ - public function getTraversalStrategy() - { - return $this->traversalStrategy; - } - - /** - * @see AutoMappingStrategy - */ - public function getAutoMappingStrategy(): int - { - return $this->autoMappingStrategy; - } -} diff --git a/vendor/symfony/validator/Mapping/GetterMetadata.php b/vendor/symfony/validator/Mapping/GetterMetadata.php deleted file mode 100644 index 0be3329..0000000 --- a/vendor/symfony/validator/Mapping/GetterMetadata.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Exception\ValidatorException; - -/** - * Stores all metadata needed for validating a class property via its getter - * method. - * - * A property getter is any method that is equal to the property's name, - * prefixed with "get", "is" or "has". That method will be used to access the - * property's value. - * - * The getter will be invoked by reflection, so the access of private and - * protected getters is supported. - * - * This class supports serialization and cloning. - * - * @author Bernhard Schussek - * - * @see PropertyMetadataInterface - */ -class GetterMetadata extends MemberMetadata -{ - /** - * @param string $class The class the getter is defined on - * @param string $property The property which the getter returns - * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) - * - * @throws ValidatorException - */ - public function __construct(string $class, string $property, string $method = null) - { - if (null === $method) { - $getMethod = 'get'.ucfirst($property); - $isMethod = 'is'.ucfirst($property); - $hasMethod = 'has'.ucfirst($property); - - if (method_exists($class, $getMethod)) { - $method = $getMethod; - } elseif (method_exists($class, $isMethod)) { - $method = $isMethod; - } elseif (method_exists($class, $hasMethod)) { - $method = $hasMethod; - } else { - throw new ValidatorException(sprintf('Neither of these methods exist in class "%s": "%s", "%s", "%s".', $class, $getMethod, $isMethod, $hasMethod)); - } - } elseif (!method_exists($class, $method)) { - throw new ValidatorException(sprintf('The "%s()" method does not exist in class "%s".', $method, $class)); - } - - parent::__construct($class, $method, $property); - } - - /** - * {@inheritdoc} - */ - public function getPropertyValue($object) - { - return $this->newReflectionMember($object)->invoke($object); - } - - /** - * {@inheritdoc} - */ - protected function newReflectionMember($objectOrClassName) - { - return new \ReflectionMethod($objectOrClassName, $this->getName()); - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php b/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php deleted file mode 100644 index 9f6667f..0000000 --- a/vendor/symfony/validator/Mapping/Loader/AbstractLoader.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\MappingException; - -/** - * Base loader for validation metadata. - * - * This loader supports the loading of constraints from Symfony's default - * namespace (see {@link DEFAULT_NAMESPACE}) using the short class names of - * those constraints. Constraints can also be loaded using their fully - * qualified class names. At last, namespace aliases can be defined to load - * constraints with the syntax "alias:ShortName". - * - * @author Bernhard Schussek - */ -abstract class AbstractLoader implements LoaderInterface -{ - /** - * The namespace to load constraints from by default. - */ - public const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; - - protected $namespaces = []; - - /** - * Adds a namespace alias. - * - * The namespace alias can be used to reference constraints from specific - * namespaces in {@link newConstraint()}: - * - * $this->addNamespaceAlias('mynamespace', '\\Acme\\Package\\Constraints\\'); - * - * $constraint = $this->newConstraint('mynamespace:NotNull'); - */ - protected function addNamespaceAlias(string $alias, string $namespace) - { - $this->namespaces[$alias] = $namespace; - } - - /** - * Creates a new constraint instance for the given constraint name. - * - * @param string $name The constraint name. Either a constraint relative - * to the default constraint namespace, or a fully - * qualified class name. Alternatively, the constraint - * may be preceded by a namespace alias and a colon. - * The namespace alias must have been defined using - * {@link addNamespaceAlias()}. - * @param mixed $options The constraint options - * - * @return Constraint - * - * @throws MappingException If the namespace prefix is undefined - */ - protected function newConstraint(string $name, $options = null) - { - if (str_contains($name, '\\') && class_exists($name)) { - $className = $name; - } elseif (str_contains($name, ':')) { - [$prefix, $className] = explode(':', $name, 2); - - if (!isset($this->namespaces[$prefix])) { - throw new MappingException(sprintf('Undefined namespace prefix "%s".', $prefix)); - } - - $className = $this->namespaces[$prefix].$className; - } else { - $className = self::DEFAULT_NAMESPACE.$name; - } - - return new $className($options); - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php b/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php deleted file mode 100644 index 6968927..0000000 --- a/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Callback; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\Constraints\GroupSequenceProvider; -use Symfony\Component\Validator\Exception\MappingException; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Loads validation metadata using a Doctrine annotation {@link Reader} or using PHP 8 attributes. - * - * @author Bernhard Schussek - * @author Alexander M. Turek - */ -class AnnotationLoader implements LoaderInterface -{ - protected $reader; - - public function __construct(Reader $reader = null) - { - $this->reader = $reader; - } - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata) - { - $reflClass = $metadata->getReflectionClass(); - $className = $reflClass->name; - $success = false; - - foreach ($this->getAnnotations($reflClass) as $constraint) { - if ($constraint instanceof GroupSequence) { - $metadata->setGroupSequence($constraint->groups); - } elseif ($constraint instanceof GroupSequenceProvider) { - $metadata->setGroupSequenceProvider(true); - } elseif ($constraint instanceof Constraint) { - $metadata->addConstraint($constraint); - } - - $success = true; - } - - foreach ($reflClass->getProperties() as $property) { - if ($property->getDeclaringClass()->name === $className) { - foreach ($this->getAnnotations($property) as $constraint) { - if ($constraint instanceof Constraint) { - $metadata->addPropertyConstraint($property->name, $constraint); - } - - $success = true; - } - } - } - - foreach ($reflClass->getMethods() as $method) { - if ($method->getDeclaringClass()->name === $className) { - foreach ($this->getAnnotations($method) as $constraint) { - if ($constraint instanceof Callback) { - $constraint->callback = $method->getName(); - - $metadata->addConstraint($constraint); - } elseif ($constraint instanceof Constraint) { - if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) { - $metadata->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint); - } else { - throw new MappingException(sprintf('The constraint on "%s::%s()" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name)); - } - } - - $success = true; - } - } - } - - return $success; - } - - /** - * @param \ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflection - */ - private function getAnnotations(object $reflection): iterable - { - if (\PHP_VERSION_ID >= 80000) { - foreach ($reflection->getAttributes(GroupSequence::class) as $attribute) { - yield $attribute->newInstance(); - } - foreach ($reflection->getAttributes(GroupSequenceProvider::class) as $attribute) { - yield $attribute->newInstance(); - } - foreach ($reflection->getAttributes(Constraint::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - yield $attribute->newInstance(); - } - } - if (!$this->reader) { - return; - } - - if ($reflection instanceof \ReflectionClass) { - yield from $this->reader->getClassAnnotations($reflection); - } - if ($reflection instanceof \ReflectionMethod) { - yield from $this->reader->getMethodAnnotations($reflection); - } - if ($reflection instanceof \ReflectionProperty) { - yield from $this->reader->getPropertyAnnotations($reflection); - } - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/AutoMappingTrait.php b/vendor/symfony/validator/Mapping/Loader/AutoMappingTrait.php deleted file mode 100644 index f76442f..0000000 --- a/vendor/symfony/validator/Mapping/Loader/AutoMappingTrait.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Mapping\AutoMappingStrategy; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Utility methods to create auto mapping loaders. - * - * @author Kévin Dunglas - */ -trait AutoMappingTrait -{ - private function isAutoMappingEnabledForClass(ClassMetadata $metadata, string $classValidatorRegexp = null): bool - { - // Check if AutoMapping constraint is set first - if (AutoMappingStrategy::NONE !== $strategy = $metadata->getAutoMappingStrategy()) { - return AutoMappingStrategy::ENABLED === $strategy; - } - - // Fallback on the config - return null !== $classValidatorRegexp && preg_match($classValidatorRegexp, $metadata->getClassName()); - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/FileLoader.php b/vendor/symfony/validator/Mapping/Loader/FileLoader.php deleted file mode 100644 index 0fc0172..0000000 --- a/vendor/symfony/validator/Mapping/Loader/FileLoader.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Exception\MappingException; - -/** - * Base loader for loading validation metadata from a file. - * - * @author Bernhard Schussek - * - * @see YamlFileLoader - * @see XmlFileLoader - */ -abstract class FileLoader extends AbstractLoader -{ - protected $file; - - /** - * Creates a new loader. - * - * @param string $file The mapping file to load - * - * @throws MappingException If the file does not exist or is not readable - */ - public function __construct(string $file) - { - if (!is_file($file)) { - throw new MappingException(sprintf('The mapping file "%s" does not exist.', $file)); - } - - if (!is_readable($file)) { - throw new MappingException(sprintf('The mapping file "%s" is not readable.', $file)); - } - - if (!stream_is_local($this->file)) { - throw new MappingException(sprintf('The mapping file "%s" is not a local file.', $file)); - } - - $this->file = $file; - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/FilesLoader.php b/vendor/symfony/validator/Mapping/Loader/FilesLoader.php deleted file mode 100644 index f6574f4..0000000 --- a/vendor/symfony/validator/Mapping/Loader/FilesLoader.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -/** - * Base loader for loading validation metadata from a list of files. - * - * @author Bulat Shakirzyanov - * @author Bernhard Schussek - * - * @see YamlFilesLoader - * @see XmlFilesLoader - */ -abstract class FilesLoader extends LoaderChain -{ - /** - * Creates a new loader. - * - * @param array $paths An array of file paths - */ - public function __construct(array $paths) - { - parent::__construct($this->getFileLoaders($paths)); - } - - /** - * Returns an array of file loaders for the given file paths. - * - * @return LoaderInterface[] - */ - protected function getFileLoaders(array $paths) - { - $loaders = []; - - foreach ($paths as $path) { - $loaders[] = $this->getFileLoaderInstance($path); - } - - return $loaders; - } - - /** - * Creates a loader for the given file path. - * - * @return LoaderInterface - */ - abstract protected function getFileLoaderInstance(string $path); -} diff --git a/vendor/symfony/validator/Mapping/Loader/LoaderChain.php b/vendor/symfony/validator/Mapping/Loader/LoaderChain.php deleted file mode 100644 index b3d6184..0000000 --- a/vendor/symfony/validator/Mapping/Loader/LoaderChain.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Exception\MappingException; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Loads validation metadata from multiple {@link LoaderInterface} instances. - * - * Pass the loaders when constructing the chain. Once - * {@link loadClassMetadata()} is called, that method will be called on all - * loaders in the chain. - * - * @author Bernhard Schussek - */ -class LoaderChain implements LoaderInterface -{ - protected $loaders; - - /** - * @param LoaderInterface[] $loaders The metadata loaders to use - * - * @throws MappingException If any of the loaders has an invalid type - */ - public function __construct(array $loaders) - { - foreach ($loaders as $loader) { - if (!$loader instanceof LoaderInterface) { - throw new MappingException(sprintf('Class "%s" is expected to implement LoaderInterface.', get_debug_type($loader))); - } - } - - $this->loaders = $loaders; - } - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata) - { - $success = false; - - foreach ($this->loaders as $loader) { - $success = $loader->loadClassMetadata($metadata) || $success; - } - - return $success; - } - - /** - * @return LoaderInterface[] - */ - public function getLoaders() - { - return $this->loaders; - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php b/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php deleted file mode 100644 index 974214c..0000000 --- a/vendor/symfony/validator/Mapping/Loader/LoaderInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Loads validation metadata into {@link ClassMetadata} instances. - * - * @author Bernhard Schussek - */ -interface LoaderInterface -{ - /** - * Loads validation metadata into a {@link ClassMetadata} instance. - * - * @return bool - */ - public function loadClassMetadata(ClassMetadata $metadata); -} diff --git a/vendor/symfony/validator/Mapping/Loader/PropertyInfoLoader.php b/vendor/symfony/validator/Mapping/Loader/PropertyInfoLoader.php deleted file mode 100644 index 118c159..0000000 --- a/vendor/symfony/validator/Mapping/Loader/PropertyInfoLoader.php +++ /dev/null @@ -1,179 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; -use Symfony\Component\PropertyInfo\Type as PropertyInfoType; -use Symfony\Component\Validator\Constraints\All; -use Symfony\Component\Validator\Constraints\NotBlank; -use Symfony\Component\Validator\Constraints\NotNull; -use Symfony\Component\Validator\Constraints\Type; -use Symfony\Component\Validator\Mapping\AutoMappingStrategy; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Guesses and loads the appropriate constraints using PropertyInfo. - * - * @author Kévin Dunglas - */ -final class PropertyInfoLoader implements LoaderInterface -{ - use AutoMappingTrait; - - private $listExtractor; - private $typeExtractor; - private $accessExtractor; - private $classValidatorRegexp; - - public function __construct(PropertyListExtractorInterface $listExtractor, PropertyTypeExtractorInterface $typeExtractor, PropertyAccessExtractorInterface $accessExtractor, string $classValidatorRegexp = null) - { - $this->listExtractor = $listExtractor; - $this->typeExtractor = $typeExtractor; - $this->accessExtractor = $accessExtractor; - $this->classValidatorRegexp = $classValidatorRegexp; - } - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata): bool - { - $className = $metadata->getClassName(); - if (!$properties = $this->listExtractor->getProperties($className)) { - return false; - } - - $loaded = false; - $enabledForClass = $this->isAutoMappingEnabledForClass($metadata, $this->classValidatorRegexp); - foreach ($properties as $property) { - if (false === $this->accessExtractor->isWritable($className, $property)) { - continue; - } - - if (!property_exists($className, $property)) { - continue; - } - - $types = $this->typeExtractor->getTypes($className, $property); - if (null === $types) { - continue; - } - - $enabledForProperty = $enabledForClass; - $hasTypeConstraint = false; - $hasNotNullConstraint = false; - $hasNotBlankConstraint = false; - $allConstraint = null; - foreach ($metadata->getPropertyMetadata($property) as $propertyMetadata) { - // Enabling or disabling auto-mapping explicitly always takes precedence - if (AutoMappingStrategy::DISABLED === $propertyMetadata->getAutoMappingStrategy()) { - continue 2; - } - - if (AutoMappingStrategy::ENABLED === $propertyMetadata->getAutoMappingStrategy()) { - $enabledForProperty = true; - } - - foreach ($propertyMetadata->getConstraints() as $constraint) { - if ($constraint instanceof Type) { - $hasTypeConstraint = true; - } elseif ($constraint instanceof NotNull) { - $hasNotNullConstraint = true; - } elseif ($constraint instanceof NotBlank) { - $hasNotBlankConstraint = true; - } elseif ($constraint instanceof All) { - $allConstraint = $constraint; - } - } - } - - if (!$enabledForProperty) { - continue; - } - - $loaded = true; - $builtinTypes = []; - $nullable = false; - $scalar = true; - foreach ($types as $type) { - $builtinTypes[] = $type->getBuiltinType(); - - if ($scalar && !\in_array($type->getBuiltinType(), [PropertyInfoType::BUILTIN_TYPE_INT, PropertyInfoType::BUILTIN_TYPE_FLOAT, PropertyInfoType::BUILTIN_TYPE_STRING, PropertyInfoType::BUILTIN_TYPE_BOOL], true)) { - $scalar = false; - } - - if (!$nullable && $type->isNullable()) { - $nullable = true; - } - } - if (!$hasTypeConstraint) { - if (1 === \count($builtinTypes)) { - if ($types[0]->isCollection() && \count($collectionValueType = $types[0]->getCollectionValueTypes()) > 0) { - [$collectionValueType] = $collectionValueType; - $this->handleAllConstraint($property, $allConstraint, $collectionValueType, $metadata); - } - - $metadata->addPropertyConstraint($property, $this->getTypeConstraint($builtinTypes[0], $types[0])); - } elseif ($scalar) { - $metadata->addPropertyConstraint($property, new Type(['type' => 'scalar'])); - } - } - - if (!$nullable && !$hasNotBlankConstraint && !$hasNotNullConstraint) { - $metadata->addPropertyConstraint($property, new NotNull()); - } - } - - return $loaded; - } - - private function getTypeConstraint(string $builtinType, PropertyInfoType $type): Type - { - if (PropertyInfoType::BUILTIN_TYPE_OBJECT === $builtinType && null !== $className = $type->getClassName()) { - return new Type(['type' => $className]); - } - - return new Type(['type' => $builtinType]); - } - - private function handleAllConstraint(string $property, ?All $allConstraint, PropertyInfoType $propertyInfoType, ClassMetadata $metadata) - { - $containsTypeConstraint = false; - $containsNotNullConstraint = false; - if (null !== $allConstraint) { - foreach ($allConstraint->constraints as $constraint) { - if ($constraint instanceof Type) { - $containsTypeConstraint = true; - } elseif ($constraint instanceof NotNull) { - $containsNotNullConstraint = true; - } - } - } - - $constraints = []; - if (!$containsNotNullConstraint && !$propertyInfoType->isNullable()) { - $constraints[] = new NotNull(); - } - - if (!$containsTypeConstraint) { - $constraints[] = $this->getTypeConstraint($propertyInfoType->getBuiltinType(), $propertyInfoType); - } - - if (null === $allConstraint) { - $metadata->addPropertyConstraint($property, new All(['constraints' => $constraints])); - } else { - $allConstraint->constraints = array_merge($allConstraint->constraints, $constraints); - } - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php b/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php deleted file mode 100644 index 256700e..0000000 --- a/vendor/symfony/validator/Mapping/Loader/StaticMethodLoader.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Exception\MappingException; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Loads validation metadata by calling a static method on the loaded class. - * - * @author Bernhard Schussek - */ -class StaticMethodLoader implements LoaderInterface -{ - protected $methodName; - - /** - * Creates a new loader. - * - * @param string $methodName The name of the static method to call - */ - public function __construct(string $methodName = 'loadValidatorMetadata') - { - $this->methodName = $methodName; - } - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata) - { - /** @var \ReflectionClass $reflClass */ - $reflClass = $metadata->getReflectionClass(); - - if (!$reflClass->isInterface() && $reflClass->hasMethod($this->methodName)) { - $reflMethod = $reflClass->getMethod($this->methodName); - - if ($reflMethod->isAbstract()) { - return false; - } - - if (!$reflMethod->isStatic()) { - throw new MappingException(sprintf('The method "%s::%s()" should be static.', $reflClass->name, $this->methodName)); - } - - if ($reflMethod->getDeclaringClass()->name != $reflClass->name) { - return false; - } - - $reflMethod->invoke(null, $metadata); - - return true; - } - - return false; - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php b/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php deleted file mode 100644 index 66cfe8f..0000000 --- a/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\MappingException; -use Symfony\Component\Validator\Mapping\ClassMetadata; - -/** - * Loads validation metadata from an XML file. - * - * @author Bernhard Schussek - */ -class XmlFileLoader extends FileLoader -{ - /** - * The XML nodes of the mapping file. - * - * @var \SimpleXMLElement[]|null - */ - protected $classes; - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata) - { - if (null === $this->classes) { - $this->loadClassesFromXml(); - } - - if (isset($this->classes[$metadata->getClassName()])) { - $classDescription = $this->classes[$metadata->getClassName()]; - - $this->loadClassMetadataFromXml($metadata, $classDescription); - - return true; - } - - return false; - } - - /** - * Return the names of the classes mapped in this file. - * - * @return string[] - */ - public function getMappedClasses() - { - if (null === $this->classes) { - $this->loadClassesFromXml(); - } - - return array_keys($this->classes); - } - - /** - * Parses a collection of "constraint" XML nodes. - * - * @param \SimpleXMLElement $nodes The XML nodes - * - * @return Constraint[] - */ - protected function parseConstraints(\SimpleXMLElement $nodes) - { - $constraints = []; - - foreach ($nodes as $node) { - if (\count($node) > 0) { - if (\count($node->value) > 0) { - $options = $this->parseValues($node->value); - } elseif (\count($node->constraint) > 0) { - $options = $this->parseConstraints($node->constraint); - } elseif (\count($node->option) > 0) { - $options = $this->parseOptions($node->option); - } else { - $options = []; - } - } elseif ('' !== (string) $node) { - $options = XmlUtils::phpize(trim($node)); - } else { - $options = null; - } - - $constraints[] = $this->newConstraint((string) $node['name'], $options); - } - - return $constraints; - } - - /** - * Parses a collection of "value" XML nodes. - * - * @param \SimpleXMLElement $nodes The XML nodes - * - * @return array - */ - protected function parseValues(\SimpleXMLElement $nodes) - { - $values = []; - - foreach ($nodes as $node) { - if (\count($node) > 0) { - if (\count($node->value) > 0) { - $value = $this->parseValues($node->value); - } elseif (\count($node->constraint) > 0) { - $value = $this->parseConstraints($node->constraint); - } else { - $value = []; - } - } else { - $value = trim($node); - } - - if (isset($node['key'])) { - $values[(string) $node['key']] = $value; - } else { - $values[] = $value; - } - } - - return $values; - } - - /** - * Parses a collection of "option" XML nodes. - * - * @param \SimpleXMLElement $nodes The XML nodes - * - * @return array - */ - protected function parseOptions(\SimpleXMLElement $nodes) - { - $options = []; - - foreach ($nodes as $node) { - if (\count($node) > 0) { - if (\count($node->value) > 0) { - $value = $this->parseValues($node->value); - } elseif (\count($node->constraint) > 0) { - $value = $this->parseConstraints($node->constraint); - } else { - $value = []; - } - } else { - $value = XmlUtils::phpize($node); - if (\is_string($value)) { - $value = trim($value); - } - } - - $options[(string) $node['name']] = $value; - } - - return $options; - } - - /** - * Loads the XML class descriptions from the given file. - * - * @return \SimpleXMLElement - * - * @throws MappingException If the file could not be loaded - */ - protected function parseFile(string $path) - { - try { - $dom = XmlUtils::loadFile($path, __DIR__.'/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd'); - } catch (\Exception $e) { - throw new MappingException($e->getMessage(), $e->getCode(), $e); - } - - return simplexml_import_dom($dom); - } - - private function loadClassesFromXml() - { - // This method may throw an exception. Do not modify the class' - // state before it completes - $xml = $this->parseFile($this->file); - - $this->classes = []; - - foreach ($xml->namespace as $namespace) { - $this->addNamespaceAlias((string) $namespace['prefix'], trim((string) $namespace)); - } - - foreach ($xml->class as $class) { - $this->classes[(string) $class['name']] = $class; - } - } - - private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription) - { - if (\count($classDescription->{'group-sequence-provider'}) > 0) { - $metadata->setGroupSequenceProvider(true); - } - - foreach ($classDescription->{'group-sequence'} as $groupSequence) { - if (\count($groupSequence->value) > 0) { - $metadata->setGroupSequence($this->parseValues($groupSequence[0]->value)); - } - } - - foreach ($this->parseConstraints($classDescription->constraint) as $constraint) { - $metadata->addConstraint($constraint); - } - - foreach ($classDescription->property as $property) { - foreach ($this->parseConstraints($property->constraint) as $constraint) { - $metadata->addPropertyConstraint((string) $property['name'], $constraint); - } - } - - foreach ($classDescription->getter as $getter) { - foreach ($this->parseConstraints($getter->constraint) as $constraint) { - $metadata->addGetterConstraint((string) $getter['property'], $constraint); - } - } - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php b/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php deleted file mode 100644 index 5a242b0..0000000 --- a/vendor/symfony/validator/Mapping/Loader/XmlFilesLoader.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -/** - * Loads validation metadata from a list of XML files. - * - * @author Bulat Shakirzyanov - * @author Bernhard Schussek - * - * @see FilesLoader - */ -class XmlFilesLoader extends FilesLoader -{ - /** - * {@inheritdoc} - */ - public function getFileLoaderInstance(string $file) - { - return new XmlFileLoader($file); - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php deleted file mode 100644 index 8d44ad6..0000000 --- a/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php +++ /dev/null @@ -1,189 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Yaml; - -/** - * Loads validation metadata from a YAML file. - * - * @author Bernhard Schussek - */ -class YamlFileLoader extends FileLoader -{ - /** - * An array of YAML class descriptions. - * - * @var array - */ - protected $classes = null; - - /** - * Caches the used YAML parser. - * - * @var YamlParser - */ - private $yamlParser; - - /** - * {@inheritdoc} - */ - public function loadClassMetadata(ClassMetadata $metadata) - { - if (null === $this->classes) { - $this->loadClassesFromYaml(); - } - - if (isset($this->classes[$metadata->getClassName()])) { - $classDescription = $this->classes[$metadata->getClassName()]; - - $this->loadClassMetadataFromYaml($metadata, $classDescription); - - return true; - } - - return false; - } - - /** - * Return the names of the classes mapped in this file. - * - * @return string[] - */ - public function getMappedClasses() - { - if (null === $this->classes) { - $this->loadClassesFromYaml(); - } - - return array_keys($this->classes); - } - - /** - * Parses a collection of YAML nodes. - * - * @param array $nodes The YAML nodes - * - * @return array - */ - protected function parseNodes(array $nodes) - { - $values = []; - - foreach ($nodes as $name => $childNodes) { - if (is_numeric($name) && \is_array($childNodes) && 1 === \count($childNodes)) { - $options = current($childNodes); - - if (\is_array($options)) { - $options = $this->parseNodes($options); - } - - $values[] = $this->newConstraint(key($childNodes), $options); - } else { - if (\is_array($childNodes)) { - $childNodes = $this->parseNodes($childNodes); - } - - $values[$name] = $childNodes; - } - } - - return $values; - } - - /** - * Loads the YAML class descriptions from the given file. - * - * @throws \InvalidArgumentException If the file could not be loaded or did - * not contain a YAML array - */ - private function parseFile(string $path): array - { - try { - $classes = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT); - } catch (ParseException $e) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $path).$e->getMessage(), 0, $e); - } - - // empty file - if (null === $classes) { - return []; - } - - // not an array - if (!\is_array($classes)) { - throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $this->file)); - } - - return $classes; - } - - private function loadClassesFromYaml() - { - if (null === $this->yamlParser) { - $this->yamlParser = new YamlParser(); - } - - $this->classes = $this->parseFile($this->file); - - if (isset($this->classes['namespaces'])) { - foreach ($this->classes['namespaces'] as $alias => $namespace) { - $this->addNamespaceAlias($alias, $namespace); - } - - unset($this->classes['namespaces']); - } - } - - private function loadClassMetadataFromYaml(ClassMetadata $metadata, array $classDescription) - { - if (isset($classDescription['group_sequence_provider'])) { - $metadata->setGroupSequenceProvider( - (bool) $classDescription['group_sequence_provider'] - ); - } - - if (isset($classDescription['group_sequence'])) { - $metadata->setGroupSequence($classDescription['group_sequence']); - } - - if (isset($classDescription['constraints']) && \is_array($classDescription['constraints'])) { - foreach ($this->parseNodes($classDescription['constraints']) as $constraint) { - $metadata->addConstraint($constraint); - } - } - - if (isset($classDescription['properties']) && \is_array($classDescription['properties'])) { - foreach ($classDescription['properties'] as $property => $constraints) { - if (null !== $constraints) { - foreach ($this->parseNodes($constraints) as $constraint) { - $metadata->addPropertyConstraint($property, $constraint); - } - } - } - } - - if (isset($classDescription['getters']) && \is_array($classDescription['getters'])) { - foreach ($classDescription['getters'] as $getter => $constraints) { - if (null !== $constraints) { - foreach ($this->parseNodes($constraints) as $constraint) { - $metadata->addGetterConstraint($getter, $constraint); - } - } - } - } - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php b/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php deleted file mode 100644 index f32c67c..0000000 --- a/vendor/symfony/validator/Mapping/Loader/YamlFilesLoader.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping\Loader; - -/** - * Loads validation metadata from a list of YAML files. - * - * @author Bulat Shakirzyanov - * @author Bernhard Schussek - * - * @see FilesLoader - */ -class YamlFilesLoader extends FilesLoader -{ - /** - * {@inheritdoc} - */ - public function getFileLoaderInstance(string $file) - { - return new YamlFileLoader($file); - } -} diff --git a/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd b/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd deleted file mode 100644 index 1ca840b..0000000 --- a/vendor/symfony/validator/Mapping/Loader/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/validator/Mapping/MemberMetadata.php b/vendor/symfony/validator/Mapping/MemberMetadata.php deleted file mode 100644 index 33934c6..0000000 --- a/vendor/symfony/validator/Mapping/MemberMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Composite; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; - -/** - * Stores all metadata needed for validating a class property. - * - * The method of accessing the property's value must be specified by subclasses - * by implementing the {@link newReflectionMember()} method. - * - * This class supports serialization and cloning. - * - * @author Bernhard Schussek - * - * @see PropertyMetadataInterface - */ -abstract class MemberMetadata extends GenericMetadata implements PropertyMetadataInterface -{ - /** - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getClassName()} instead. - */ - public $class; - - /** - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getName()} instead. - */ - public $name; - - /** - * @internal This property is public in order to reduce the size of the - * class' serialized representation. Do not access it. Use - * {@link getPropertyName()} instead. - */ - public $property; - - /** - * @var \ReflectionMethod[]|\ReflectionProperty[] - */ - private $reflMember = []; - - /** - * @param string $class The name of the class this member is defined on - * @param string $name The name of the member - * @param string $property The property the member belongs to - */ - public function __construct(string $class, string $name, string $property) - { - $this->class = $class; - $this->name = $name; - $this->property = $property; - } - - /** - * {@inheritdoc} - */ - public function addConstraint(Constraint $constraint) - { - $this->checkConstraint($constraint); - - parent::addConstraint($constraint); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function __sleep() - { - return array_merge(parent::__sleep(), [ - 'class', - 'name', - 'property', - ]); - } - - /** - * Returns the name of the member. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function getClassName() - { - return $this->class; - } - - /** - * {@inheritdoc} - */ - public function getPropertyName() - { - return $this->property; - } - - /** - * Returns whether this member is public. - * - * @param object|string $objectOrClassName The object or the class name - * - * @return bool - */ - public function isPublic($objectOrClassName) - { - return $this->getReflectionMember($objectOrClassName)->isPublic(); - } - - /** - * Returns whether this member is protected. - * - * @param object|string $objectOrClassName The object or the class name - * - * @return bool - */ - public function isProtected($objectOrClassName) - { - return $this->getReflectionMember($objectOrClassName)->isProtected(); - } - - /** - * Returns whether this member is private. - * - * @param object|string $objectOrClassName The object or the class name - * - * @return bool - */ - public function isPrivate($objectOrClassName) - { - return $this->getReflectionMember($objectOrClassName)->isPrivate(); - } - - /** - * Returns the reflection instance for accessing the member's value. - * - * @param object|string $objectOrClassName The object or the class name - * - * @return \ReflectionMethod|\ReflectionProperty - */ - public function getReflectionMember($objectOrClassName) - { - $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); - if (!isset($this->reflMember[$className])) { - $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName); - } - - return $this->reflMember[$className]; - } - - /** - * Creates a new reflection instance for accessing the member's value. - * - * @param object|string $objectOrClassName The object or the class name - * - * @return \ReflectionMethod|\ReflectionProperty - */ - abstract protected function newReflectionMember($objectOrClassName); - - private function checkConstraint(Constraint $constraint) - { - if (!\in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets(), true)) { - throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on properties or getters.', get_debug_type($constraint))); - } - - if ($constraint instanceof Composite) { - foreach ($constraint->getNestedConstraints() as $nestedConstraint) { - $this->checkConstraint($nestedConstraint); - } - } - } -} diff --git a/vendor/symfony/validator/Mapping/MetadataInterface.php b/vendor/symfony/validator/Mapping/MetadataInterface.php deleted file mode 100644 index efb32ce..0000000 --- a/vendor/symfony/validator/Mapping/MetadataInterface.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Constraint; - -/** - * A container for validation metadata. - * - * Most importantly, the metadata stores the constraints against which an object - * and its properties should be validated. - * - * Additionally, the metadata stores whether objects should be validated - * against their class' metadata and whether traversable objects should be - * traversed or not. - * - * @author Bernhard Schussek - * - * @see CascadingStrategy - * @see TraversalStrategy - */ -interface MetadataInterface -{ - /** - * Returns the strategy for cascading objects. - * - * @return int - * - * @see CascadingStrategy - */ - public function getCascadingStrategy(); - - /** - * Returns the strategy for traversing traversable objects. - * - * @return int - * - * @see TraversalStrategy - */ - public function getTraversalStrategy(); - - /** - * Returns all constraints of this element. - * - * @return Constraint[] - */ - public function getConstraints(); - - /** - * Returns all constraints for a given validation group. - * - * @param string $group The validation group - * - * @return Constraint[] - */ - public function findConstraints(string $group); -} diff --git a/vendor/symfony/validator/Mapping/PropertyMetadata.php b/vendor/symfony/validator/Mapping/PropertyMetadata.php deleted file mode 100644 index 8c18e5d..0000000 --- a/vendor/symfony/validator/Mapping/PropertyMetadata.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -use Symfony\Component\Validator\Exception\ValidatorException; - -/** - * Stores all metadata needed for validating a class property. - * - * The value of the property is obtained by directly accessing the property. - * The property will be accessed by reflection, so the access of private and - * protected properties is supported. - * - * This class supports serialization and cloning. - * - * @author Bernhard Schussek - * - * @see PropertyMetadataInterface - */ -class PropertyMetadata extends MemberMetadata -{ - /** - * @param string $class The class this property is defined on - * @param string $name The name of this property - * - * @throws ValidatorException - */ - public function __construct(string $class, string $name) - { - if (!property_exists($class, $name)) { - throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $name, $class)); - } - - parent::__construct($class, $name, $name); - } - - /** - * {@inheritdoc} - */ - public function getPropertyValue($object) - { - $reflProperty = $this->getReflectionMember($object); - - if (\PHP_VERSION_ID >= 70400 && $reflProperty->hasType() && !$reflProperty->isInitialized($object)) { - // There is no way to check if a property has been unset or if it is uninitialized. - // When trying to access an uninitialized property, __get method is triggered. - - // If __get method is not present, no fallback is possible - // Otherwise we need to catch an Error in case we are trying to access an uninitialized but set property. - if (!method_exists($object, '__get')) { - return null; - } - - try { - return $reflProperty->getValue($object); - } catch (\Error $e) { - return null; - } - } - - return $reflProperty->getValue($object); - } - - /** - * {@inheritdoc} - */ - protected function newReflectionMember($objectOrClassName) - { - $originalClass = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName); - - while (!property_exists($objectOrClassName, $this->getName())) { - $objectOrClassName = get_parent_class($objectOrClassName); - - if (false === $objectOrClassName) { - throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass)); - } - } - - $member = new \ReflectionProperty($objectOrClassName, $this->getName()); - $member->setAccessible(true); - - return $member; - } -} diff --git a/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php b/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php deleted file mode 100644 index f4bbbb9..0000000 --- a/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -/** - * Stores all metadata needed for validating the value of a class property. - * - * Most importantly, the metadata stores the constraints against which the - * property's value should be validated. - * - * Additionally, the metadata stores whether objects stored in the property - * should be validated against their class' metadata and whether traversable - * objects should be traversed or not. - * - * @author Bernhard Schussek - * - * @see MetadataInterface - * @see CascadingStrategy - * @see TraversalStrategy - */ -interface PropertyMetadataInterface extends MetadataInterface -{ - /** - * Returns the name of the property. - * - * @return string - */ - public function getPropertyName(); - - /** - * Extracts the value of the property from the given container. - * - * @param mixed $containingValue The container to extract the property value from - * - * @return mixed - */ - public function getPropertyValue($containingValue); -} diff --git a/vendor/symfony/validator/Mapping/TraversalStrategy.php b/vendor/symfony/validator/Mapping/TraversalStrategy.php deleted file mode 100644 index 0df5a7e..0000000 --- a/vendor/symfony/validator/Mapping/TraversalStrategy.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Mapping; - -/** - * Specifies whether and how a traversable object should be traversed. - * - * If the node traverser traverses a node whose value is an instance of - * {@link \Traversable}, and if that node is either a class node or if - * cascading is enabled, then the node's traversal strategy will be checked. - * Depending on the requested traversal strategy, the node traverser will - * iterate over the object and cascade each object or collection returned by - * the iterator. - * - * The traversal strategy is ignored for arrays. Arrays are always iterated. - * - * @author Bernhard Schussek - * - * @see CascadingStrategy - */ -class TraversalStrategy -{ - /** - * Specifies that a node's value should be iterated only if it is an - * instance of {@link \Traversable}. - */ - public const IMPLICIT = 1; - - /** - * Specifies that a node's value should never be iterated. - */ - public const NONE = 2; - - /** - * Specifies that a node's value should always be iterated. If the value is - * not an instance of {@link \Traversable}, an exception should be thrown. - */ - public const TRAVERSE = 4; - - /** - * Not instantiable. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/validator/ObjectInitializerInterface.php b/vendor/symfony/validator/ObjectInitializerInterface.php deleted file mode 100644 index 6f3ac5e..0000000 --- a/vendor/symfony/validator/ObjectInitializerInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -/** - * Prepares an object for validation. - * - * Concrete implementations of this interface are used by {@link Validator\ContextualValidatorInterface} - * to initialize objects just before validating them. - * - * @author Fabien Potencier - * @author Bernhard Schussek - */ -interface ObjectInitializerInterface -{ - public function initialize(object $object); -} diff --git a/vendor/symfony/validator/README.md b/vendor/symfony/validator/README.md deleted file mode 100644 index 8f3fd0e..0000000 --- a/vendor/symfony/validator/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Validator Component -=================== - -The Validator component provides tools to validate values following the -[JSR-303 Bean Validation specification][1]. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/validator.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://jcp.org/en/jsr/detail?id=303 diff --git a/vendor/symfony/validator/Resources/translations/validators.af.xlf b/vendor/symfony/validator/Resources/translations/validators.af.xlf deleted file mode 100644 index 61b9eac..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.af.xlf +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - This value should be false. - Hierdie waarde moet vals wees. - - - This value should be true. - Hierdie waarde moet waar wees. - - - This value should be of type {{ type }}. - Hierdie waarde moet van die soort {{type}} wees. - - - This value should be blank. - Hierdie waarde moet leeg wees. - - - The value you selected is not a valid choice. - Die waarde wat jy gekies het is nie 'n geldige keuse nie. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Jy moet ten minste {{ limit }} kies.|Jy moet ten minste {{ limit }} keuses kies. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Jy moet by die meeste {{ limit }} keuse kies.|Jy moet by die meeste {{ limit }} keuses kies. - - - One or more of the given values is invalid. - Een of meer van die gegewe waardes is ongeldig. - - - This field was not expected. - Die veld is nie verwag nie. - - - This field is missing. - Hierdie veld ontbreek. - - - This value is not a valid date. - Hierdie waarde is nie 'n geldige datum nie. - - - This value is not a valid datetime. - Hierdie waarde is nie 'n geldige datum en tyd nie. - - - This value is not a valid email address. - Hierdie waarde is nie 'n geldige e-pos adres nie. - - - The file could not be found. - Die lêer kon nie gevind word nie. - - - The file is not readable. - Die lêer kan nie gelees word nie. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Die lêer is te groot ({{ size }} {{ suffix }}). Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Die MIME-tipe van die lêer is ongeldig ({{ type }}). Toegelaat MIME-tipes is {{ types }}. - - - This value should be {{ limit }} or less. - Hierdie waarde moet {{ limit }} of minder wees. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Hierdie waarde is te lank. Dit moet {{ limit }} karakter of minder wees.|Hierdie waarde is te lank. Dit moet {{ limit }} karakters of minder wees. - - - This value should be {{ limit }} or more. - Hierdie waarde moet {{ limit }} of meer wees. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Hierdie waarde is te kort. Dit moet {{ limit }} karakter of meer wees.|Hierdie waarde is te kort. Dit moet {{ limit }} karakters of meer wees. - - - This value should not be blank. - Hierdie waarde moet nie leeg wees nie. - - - This value should not be null. - Hierdie waarde moet nie nul wees nie. - - - This value should be null. - Hierdie waarde moet nul wees. - - - This value is not valid. - Hierdie waarde is nie geldig nie. - - - This value is not a valid time. - Hierdie waarde is nie 'n geldige tyd nie. - - - This value is not a valid URL. - Hierdie waarde is nie 'n geldige URL nie. - - - The two values should be equal. - Die twee waardes moet gelyk wees. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Die lêer is te groot. Toegelaat maksimum grootte is {{ limit }} {{ suffix }}. - - - The file is too large. - Die lêer is te groot. - - - The file could not be uploaded. - Die lêer kan nie opgelaai word nie. - - - This value should be a valid number. - Hierdie waarde moet 'n geldige nommer wees. - - - This file is not a valid image. - Hierdie lêer is nie 'n geldige beeld nie. - - - This is not a valid IP address. - Hierdie is nie 'n geldige IP-adres nie. - - - This value is not a valid language. - Hierdie waarde is nie 'n geldige taal nie. - - - This value is not a valid locale. - Hierdie waarde is nie 'n geldige land instelling nie. - - - This value is not a valid country. - Hierdie waarde is nie 'n geldige land nie. - - - This value is already used. - Hierdie waarde word reeds gebruik. - - - The size of the image could not be detected. - Die grootte van die beeld kon nie opgespoor word nie. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Die beeld breedte is te groot ({{ width }}px). Toegelaat maksimum breedte is {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Die beeld breedte is te klein ({{ width }}px). Minimum breedte verwag is {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Die beeld hoogte is te groot ({{ height }}px). Toegelaat maksimum hoogte is {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Die beeld hoogte is te klein ({{ height }}px). Minimum hoogte verwag is {{ min_height }}px. - - - This value should be the user's current password. - Hierdie waarde moet die huidige wagwoord van die gebruiker wees. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Hierdie waarde moet presies {{ limit }} karakter wees.|Hierdie waarde moet presies {{ limit }} karakters wees. - - - The file was only partially uploaded. - Die lêer is slegs gedeeltelik opgelaai. - - - No file was uploaded. - Geen lêer is opgelaai nie. - - - No temporary folder was configured in php.ini. - Geen tydelike lêer is ingestel in php.ini nie. - - - Cannot write temporary file to disk. - Kan nie tydelike lêer skryf op skyf nie. - - - A PHP extension caused the upload to fail. - 'n PHP-uitbreiding veroorsaak die oplaai van die lêer om te misluk. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Hierdie versameling moet {{ limit }} element of meer bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Hierdie versameling moet {{ limit }} element of minder bevat.|Hierdie versameling moet {{ limit }} elemente of meer bevat. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Hierdie versameling moet presies {{ limit }} element bevat.|Hierdie versameling moet presies {{ limit }} elemente bevat. - - - Invalid card number. - Ongeldige kredietkaart nommer. - - - Unsupported card type or invalid card number. - Nie-ondersteunde tipe kaart of ongeldige kredietkaart nommer. - - - This is not a valid International Bank Account Number (IBAN). - Hierdie is nie 'n geldige Internationale Bank Rekening Nommer (IBAN) nie. - - - This value is not a valid ISBN-10. - Hierdie waarde is nie 'n geldige ISBN-10 nie. - - - This value is not a valid ISBN-13. - Hierdie waarde is nie 'n geldige ISBN-13 nie. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Hierdie waarde is nie 'n geldige ISBN-10 of ISBN-13 nie. - - - This value is not a valid ISSN. - Hierdie waarde is nie 'n geldige ISSN nie. - - - This value is not a valid currency. - Hierdie waarde is nie 'n geldige geldeenheid nie. - - - This value should be equal to {{ compared_value }}. - Hierdie waarde moet gelyk aan {{ compared_value }} wees. - - - This value should be greater than {{ compared_value }}. - Hierdie waarde moet meer as {{ compared_value }} wees. - - - This value should be greater than or equal to {{ compared_value }}. - Hierdie waarde moet meer of gelyk aan {{ compared_value }} wees. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Hierdie waarde moet identies aan {{ compared_value_type }} {{ compared_value }} wees. - - - This value should be less than {{ compared_value }}. - Hierdie waarde moet minder as {{ compared_value }} wees. - - - This value should be less than or equal to {{ compared_value }}. - Hierdie waarde moet minder of gelyk aan {{ compared_value }} wees. - - - This value should not be equal to {{ compared_value }}. - Hierdie waarde moet nie dieselfde as {{ compared_value }} wees nie. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Hierdie waarde moet nie identies as {{ compared_value_type }} {{ compared_value }} wees nie. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Die beeld aspek is te groot ({{ ratio }}). Die maksimum toegelate aspek is {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Die beeld aspek is te klein ({{ ratio }}). Die minimum toegelate aspek is {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Die beeld is vierkantig ({{ width }}x{{ height }}px). Vierkantige beelde word nie toegelaat nie. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Die beeld is landskap georiënteerd ({{ width }}x{{ height }}px). Landskap georiënteerde beelde word nie toegelaat nie. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Die beeld dis portret georiënteerd ({{ width }}x{{ height }}px). Portret georiënteerde beelde word nie toegelaat nie. - - - An empty file is not allowed. - 'n Leë lêer word nie toegelaat nie. - - - The host could not be resolved. - Die gasheer kon nie opgelos word nie. - - - This value does not match the expected {{ charset }} charset. - Die waarde stem nie ooreen met die verwagte {{ charset }} karakterstel nie. - - - This is not a valid Business Identifier Code (BIC). - Hierdie is nie 'n geldige Besigheids Identifikasie Kode (BIC) nie. - - - Error - Fout - - - This is not a valid UUID. - Hierdie is nie 'n geldige UUID nie. - - - This value should be a multiple of {{ compared_value }}. - Hierdie waarde moet 'n veelvoud van {{ compared_value }} wees. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Hierdie Besigheids Identifikasie Kode (BIK) is nie geassosieer met IBAN {{ iban }} nie. - - - This value should be valid JSON. - Hierdie waarde moet geldige JSON wees. - - - This collection should contain only unique elements. - Hierdie versameling moet net unieke elemente bevat. - - - This value should be positive. - Hierdie waarde moet positief wees. - - - This value should be either positive or zero. - Hierdie waarde moet positief of nul wees. - - - This value should be negative. - Hierdie waarde moet negatief wees. - - - This value should be either negative or zero. - Hierdie waarde moet negatief of nul wees. - - - This value is not a valid timezone. - Hierdie waarde is nie 'n geldige tydsone nie. - - - This value should be between {{ min }} and {{ max }}. - Hierdie waarde moet tussen {{ min }} en {{ max }} wees. - - - This value is not a valid hostname. - Hierdie waarde is nie 'n geldige gasheernaam nie. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Die hoeveelheid elemente in hierdie versameling moet 'n meelvoud van {{ compared_value }} wees. - - - This value should satisfy at least one of the following constraints: - Hierdie waarde moet voldoen aan ten minste een van hierdie beperkings: - - - Each element of this collection should satisfy its own set of constraints. - Elke element van hierdie versameling moet voldoen aan hulle eie beperkings. - - - This value is not a valid International Securities Identification Number (ISIN). - Hierdie waarde is nie 'n geldige Internasionale veiligheidsidentifikasienommer (ISIN) nie. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.ar.xlf b/vendor/symfony/validator/Resources/translations/validators.ar.xlf deleted file mode 100644 index 6aa0d59..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.ar.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - هذه القيمة يجب أن تكون خاطئة. - - - This value should be true. - هذه القيمة يجب أن تكون حقيقية. - - - This value should be of type {{ type }}. - هذه القيمة يجب ان تكون من نوع {{ type }}. - - - This value should be blank. - هذه القيمة يجب ان تكون فارغة. - - - The value you selected is not a valid choice. - القيمة المختارة ليست خيارا صحيحا. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيارات على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل.|يجب ان تختار {{ limit }} اختيار على الاقل. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيارات على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر.|يجب ان تختار {{ limit }} اختيار على الاكثر. - - - One or more of the given values is invalid. - واحد أو أكثر من القيم المعطاه خاطئ. - - - This field was not expected. - لم يكن من المتوقع هذا المجال. - - - This field is missing. - هذا المجال مفقود. - - - This value is not a valid date. - هذه القيمة ليست تاريخا صالحا. - - - This value is not a valid datetime. - هذه القيمة ليست تاريخا و وقتا صالحا. - - - This value is not a valid email address. - هذه القيمة ليست عنوان بريد إلكتروني صحيح. - - - The file could not be found. - لا يمكن العثور على الملف. - - - The file is not readable. - الملف غير قابل للقراءة. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - الملف كبير جدا ({{ size }} {{ suffix }}).اقصى مساحه مسموح بها ({{ limit }} {{ suffix }}). - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - نوع الملف غير صحيح ({{ type }}). الانواع المسموح بها هى {{ types }}. - - - This value should be {{ limit }} or less. - هذه القيمة يجب ان تكون {{ limit }} او اقل. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حروف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل.|هذه القيمة طويلة جدا. يجب ان تكون {{ limit }} حرف او اقل. - - - This value should be {{ limit }} or more. - هذه القيمة يجب ان تكون {{ limit }} او اكثر. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حروف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر.|هذه القيمة قصيرة جدا. يجب ان تكون {{ limit }} حرف او اكثر. - - - This value should not be blank. - هذه القيمة يجب الا تكون فارغة. - - - This value should not be null. - هذه القيمة يجب الا تكون فارغة. - - - This value should be null. - هذه القيمة يجب ان تكون فارغة. - - - This value is not valid. - هذه القيمة غير صحيحة. - - - This value is not a valid time. - هذه القيمة ليست وقت صحيح. - - - This value is not a valid URL. - هذه القيمة ليست رابط الكترونى صحيح. - - - The two values should be equal. - القيمتان يجب ان تكونا متساويتان. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - الملف كبير جدا. اقصى مساحه مسموح بها {{ limit }} {{ suffix }}. - - - The file is too large. - الملف كبير جدا. - - - The file could not be uploaded. - لم استطع استقبال الملف. - - - This value should be a valid number. - هذه القيمة يجب ان تكون رقم. - - - This file is not a valid image. - هذا الملف ليس صورة صحيحة. - - - This is not a valid IP address. - هذه القيمة ليست عنوان رقمى صحيح. - - - This value is not a valid language. - هذه القيمة ليست لغة صحيحة. - - - This value is not a valid locale. - هذه القيمة ليست موقع صحيح. - - - This value is not a valid country. - هذه القيمة ليست بلدا صالحا. - - - This value is already used. - هذه القيمة مستخدمة بالفعل. - - - The size of the image could not be detected. - لم استطع معرفة حجم الصورة. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - عرض الصورة كبير جدا ({{ width }}px). اقصى عرض مسموح به هو{{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - عرض الصورة صغير جدا ({{ width }}px). اقل عرض مسموح به هو{{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - طول الصورة كبير جدا ({{ height }}px). اقصى طول مسموح به هو{{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - طول الصورة صغير جدا ({{ height }}px). اقل طول مسموح به هو{{ min_height }}px. - - - This value should be the user's current password. - هذه القيمة يجب ان تكون كلمة سر المستخدم الحالية. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حروف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط.|هذه القيمة يجب ان تحتوى على {{ limit }} حرف فقط. - - - The file was only partially uploaded. - تم استقبال جزء من الملف فقط. - - - No file was uploaded. - لم يتم ارسال اى ملف. - - - No temporary folder was configured in php.ini. - لم يتم تهيئة حافظة مؤقتة فى ملف php.ini. - - - Cannot write temporary file to disk. - لم استطع كتابة الملف المؤقت. - - - A PHP extension caused the upload to fail. - احد اضافات PHP تسببت فى فشل استقبال الملف. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اكثر. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر او اقل. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عناصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط.|هذه المجموعة يجب ان تحتوى على {{ limit }} عنصر فقط. - - - Invalid card number. - رقم البطاقه غير صحيح. - - - Unsupported card type or invalid card number. - نوع البطاقه غير مدعوم او الرقم غير صحيح. - - - This is not a valid International Bank Account Number (IBAN). - الرقم IBAN (رقم الحساب المصرفي الدولي) الذي تم إدخاله غير صالح. - - - This value is not a valid ISBN-10. - هذه القيمة ليست ISBN-10 صالحة. - - - This value is not a valid ISBN-13. - هذه القيمة ليست ISBN-13 صالحة. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - هذه القيمة ليست ISBN-10 صالحة ولا ISBN-13 صالحة. - - - This value is not a valid ISSN. - هذه القيمة ليست ISSN صالحة. - - - This value is not a valid currency. - العُملة غير صحيحة. - - - This value should be equal to {{ compared_value }}. - القيمة يجب ان تساوي {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - القيمة يجب ان تكون اعلي من {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - القيمة يجب ان تكون مساوية او اعلي من {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - القيمة يجب ان تطابق {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - القيمة يجب ان تكون اقل من {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - القيمة يجب ان تساوي او تقل عن {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - القيمة يجب ان لا تساوي {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - القيمة يجب ان لا تطابق {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - نسبة العرض على الارتفاع للصورة كبيرة جدا ({{ ratio }}). الحد الأقصى للنسبة المسموح به هو {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - نسبة العرض على الارتفاع للصورة صغيرة جدا ({{ ratio }}). الحد الأدنى للنسبة المسموح به هو {{ max_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - الصورة مربعة ({{ width }}x{{ height }}px). الصور المربعة غير مسموح بها. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - الصورة في وضع أفقي ({{ width }}x{{ height }}px). الصور في وضع أفقي غير مسموح بها. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - الصورة في وضع عمودي ({{ width }}x{{ height }}px). الصور في وضع عمودي غير مسموح بها. - - - An empty file is not allowed. - ملف فارغ غير مسموح به. - - - The host could not be resolved. - يتعذر الإتصال بالنطاق. - - - This value does not match the expected {{ charset }} charset. - هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - هذه القيمة ليست رمز معرّف نشاط تجاري صالح (BIC). - - - Error - خطأ - - - This is not a valid UUID. - هذا ليس UUID صالح. - - - This value should be a multiple of {{ compared_value }}. - هذه القيمة يجب أن تكون مضاعف ل {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - رمز المعرّف نشاط تجاري (BIC) هذا لا يرتبط مع IBAN {{ iban }}. - - - This value should be valid JSON. - هذه القيمة يجب أن تكون صالحة ل JSON. - - - This collection should contain only unique elements. - يجب أن تحتوي هذه المجموعة علي عناصر فريدة فقط. - - - This value should be positive. - يجب أن تكون هذه القيمة موجبة. - - - This value should be either positive or zero. - يجب أن تكون هذه القيمة إما موجبة او صفر. - - - This value should be negative. - يجب أن تكون هذه القيمة سالبة. - - - This value should be either negative or zero. - يجب أن تكون هذه القيمة إما سالبة او صفر. - - - This value is not a valid timezone. - هذه القيمة ليست منطقة زمنية صحيحة. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - تم تسريب كلمة المرور هذه في خرق للبيانات، ويجب عدم استخدامها. يرجي استخدام كلمة مرور أخري. - - - This value should be between {{ min }} and {{ max }}. - يجب أن تكون هذه القيمة بين {{ min }} و {{ max }}. - - - This value is not a valid hostname. - هذه القيمة ليست اسم مضيف صالح. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - يجب أن يكون عدد العناصر في هذه المجموعة مضاعف {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - يجب أن تستوفي هذه القيمة واحدة من القيود التالية: - - - Each element of this collection should satisfy its own set of constraints. - يجب أن يفي كل عنصر من عناصر هذه المجموعة بمجموعة القيود الخاصة به. - - - This value is not a valid International Securities Identification Number (ISIN). - صالح (ISIN) هذه القيمة ليست رقم تعريف الأوراق المالية الدولي. - - - This value should be a valid expression. - يجب أن تكون هذه القيمة تعبيرًا صالحًا. - - - This value is not a valid CSS color. - هذه القيمة ليست لون CSS صالحًا. - - - This value is not a valid CIDR notation. - هذه القيمة ليست تدوين CIDR صالحًا. - - - The value of the netmask should be between {{ min }} and {{ max }}. - يجب أن تكون قيمة netmask بين {{ min }} و {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.az.xlf b/vendor/symfony/validator/Resources/translations/validators.az.xlf deleted file mode 100644 index 5948087..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.az.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Bu dəyər false olmalıdır. - - - This value should be true. - Bu dəyər true olmalıdır. - - - This value should be of type {{ type }}. - Bu dəyərin tipi {{ type }} olmalıdır. - - - This value should be blank. - Bu dəyər boş olmalıdır. - - - The value you selected is not a valid choice. - Seçdiyiniz dəyər düzgün bir seçim değil. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Ən az {{ limit }} seçim qeyd edilməlidir. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Ən çox {{ limit }} seçim qeyd edilməlidir. - - - One or more of the given values is invalid. - Təqdim edilən dəyərlərdən bir və ya bir neçəsi yanlışdır. - - - This field was not expected. - Bu sahə gözlənilmirdi. - - - This field is missing. - Bu sahə əksikdir. - - - This value is not a valid date. - Bu dəyər düzgün bir tarix deyil. - - - This value is not a valid datetime. - Bu dəyər düzgün bir tarixsaat deyil. - - - This value is not a valid email address. - Bu dəyər düzgün bir e-poçt adresi deyil. - - - The file could not be found. - Fayl tapılmadı. - - - The file is not readable. - Fayl oxunabilən deyil. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fayl çox böyükdür ({{ size }} {{ suffix }}). İcazə verilən maksimum fayl ölçüsü {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Faylın mime tipi yanlışdr ({{ type }}). İcazə verilən mime tipləri {{ types }}. - - - This value should be {{ limit }} or less. - Bu dəyər {{ limit }} və ya altında olmalıdır. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Bu dəyər çox uzundur. {{ limit }} və ya daha az simvol olmalıdır. - - - This value should be {{ limit }} or more. - Bu dəyər {{ limit }} veya daha fazla olmalıdır. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Bu dəyər çox qısadır. {{ limit }} və ya daha çox simvol olmalıdır. - - - This value should not be blank. - Bu dəyər boş olmamalıdır. - - - This value should not be null. - Bu dəyər boş olmamalıdır. - - - This value should be null. - Bu dəyər boş olmamalıdır. - - - This value is not valid. - Bu dəyər doğru deyil. - - - This value is not a valid time. - Bu dəyər doğru bir saat deyil. - - - This value is not a valid URL. - Bu dəyər doğru bir URL değil. - - - The two values should be equal. - İki dəyər eyni olmalıdır. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fayl çox böyükdür. İcazə verilən ən böyük fayl ölçüsü {{ limit }} {{ suffix }}. - - - The file is too large. - Fayl çox böyükdür. - - - The file could not be uploaded. - Fayl yüklənəbilmir. - - - This value should be a valid number. - Bu dəyər rəqəm olmalıdır. - - - This file is not a valid image. - Bu fayl düzgün bir şəkil deyil. - - - This is not a valid IP address. - Bu düzgün bir IP adresi deyil. - - - This value is not a valid language. - Bu dəyər düzgün bir dil deyil. - - - This value is not a valid locale. - Bu dəyər düzgün bir dil deyil. - - - This value is not a valid country. - Bu dəyər düzgün bir ölkə deyil. - - - This value is already used. - Bu dəyər hal-hazırda istifadədədir. - - - The size of the image could not be detected. - Şəklin ölçüsü hesablana bilmir. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Şəklin genişliyi çox böyükdür ({{ width }}px). İcazə verilən ən böyük genişlik {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Şəklin genişliyi çox kiçikdir ({{ width }}px). Ən az {{ min_width }}px olmalıdır. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Şəklin yüksəkliyi çox böyükdür ({{ height }}px). İcazə verilən ən böyük yüksəklik {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Şəklin yüksəkliyi çox kiçikdir ({{ height }}px). Ən az {{ min_height }}px olmalıdır. - - - This value should be the user's current password. - Bu dəyər istifadəçinin hazırkı parolu olmalıdır. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Bu dəyər tam olaraq {{ limit }} simvol olmaldır. - - - The file was only partially uploaded. - Fayl qismən yükləndi. - - - No file was uploaded. - Fayl yüklənmədi. - - - No temporary folder was configured in php.ini. - php.ini'də müvəqqəti qovluq quraşdırılmayıb. - - - Cannot write temporary file to disk. - Müvəqqəti fayl diskə yazıla bilmir. - - - A PHP extension caused the upload to fail. - Bir PHP əlavəsi faylın yüklənməsinə mane oldu. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Bu kolleksiyada {{ limit }} və ya daha çox element olmalıdır. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Bu kolleksiyada {{ limit }} və ya daha az element olmalıdır. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Bu kolleksiyada tam olaraq {{ limit }} element olmalıdır. - - - Invalid card number. - Yanlış kart nömrəsi. - - - Unsupported card type or invalid card number. - Dəstəklənməyən kart tipi və ya yanlış kart nömrəsi. - - - This is not a valid International Bank Account Number (IBAN). - Bu dəyər doğru bir Beynəlxalq Bank Hesap Nömrəsi (IBAN) deyil. - - - This value is not a valid ISBN-10. - Bu dəyər doğru bir ISBN-10 deyil. - - - This value is not a valid ISBN-13. - Bu dəyər doğru bir ISBN-13 deyil. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Bu dəyər doğru bir ISBN-10 və ya ISBN-13 deyil. - - - This value is not a valid ISSN. - Bu dəyər doğru bir ISSN deyil. - - - This value is not a valid currency. - Bu dəyər doğru bir valyuta deyil. - - - This value should be equal to {{ compared_value }}. - Bu dəyər {{ compared_value }} ilə bərabər olmalıdır. - - - This value should be greater than {{ compared_value }}. - Bu dəyər {{ compared_value }} dəyərindən büyük olmalıdır. - - - This value should be greater than or equal to {{ compared_value }}. - Bu dəyər {{ compared_value }} ilə bərabər və ya daha böyük olmaldır. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Bu dəyər {{ compared_value_type }} {{ compared_value }} ilə eyni olmalıdır. - - - This value should be less than {{ compared_value }}. - Bu dəyər {{ compared_value }} dəyərindən kiçik olmalıdır. - - - This value should be less than or equal to {{ compared_value }}. - Bu dəyər {{ compared_value }} dəyərindən kiçik və ya bərabər olmalıdır. - - - This value should not be equal to {{ compared_value }}. - Bu değer {{ compared_value }} ile eşit olmamalıdır. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Bu dəyər {{ compared_value_type }} {{ compared_value }} ilə eyni olmamalıdır. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Şəkil nisbəti çox büyükdür ({{ ratio }}). İcazə verilən maksimum nisbət: {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Şəkil nisbəti çox balacadır ({{ ratio }}). İcazə verilən minimum nisbət: {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Şəkil kvadratdır ({{ width }}x{{ height }}px). Kvadrat şəkillərə icazə verilmir. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Şəkil albom rejimindədir ({{ width }}x{{ height }}px). Albom rejimli şəkillərə icazə verilmir. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Şəkil portret rejimindədir ({{ width }}x{{ height }}px). Portret rejimli şəkillərə icazə verilmir. - - - An empty file is not allowed. - Boş fayla icazə verilmir. - - - The host could not be resolved. - Ünvan tapılmadı. - - - This value does not match the expected {{ charset }} charset. - Bu dəyər gözlənilən {{ charset }} simvol cədvəli ilə uyğun gəlmir. - - - This is not a valid Business Identifier Code (BIC). - Bu dəyər doğru bir Biznes Təyinedici Kodu (BIC) deyil. - - - Error - Xəta - - - This is not a valid UUID. - Bu dəyər doğru bir UUID deyil. - - - This value should be a multiple of {{ compared_value }}. - Bu dəyər {{ compare_value }} dəyərinin bölənlərindən biri olmalıdır. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Bu Biznes Təyinedici Kodu (BIC) {{ iban }} IBAN kodu ilə əlaqəli deyil. - - - This value should be valid JSON. - Bu dəyər doğru bir JSON olmalıdır. - - - This collection should contain only unique elements. - Bu kolleksiyada sadəcə unikal elementlər olmalıdır. - - - This value should be positive. - Bu dəyər müsbət olmalıdır. - - - This value should be either positive or zero. - Bu dəyər müsbət və ya sıfır olmalıdır. - - - This value should be negative. - Bu dəyər mənfi olmaldır. - - - This value should be either negative or zero. - Bu dəyər mənfi və ya sıfır olmaldır. - - - This value is not a valid timezone. - Bu dəyər doğru bir zaman zolağı deyil. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Bu parol data oğurluğunda tapıldığı üçün işlədilməməlidir. Zəhmət olmasa, başqa parol seçin. - - - This value should be between {{ min }} and {{ max }}. - Bu dəyər {{ min }} və {{ max }} arasında olmaldır. - - - This value is not a valid hostname. - Bu dəyər doğru bir host adı deyil. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Bu kolleksiyadakı elementlerin sayı {{ compared_value }} tam bölünəni olmalıdır. - - - This value should satisfy at least one of the following constraints: - Bu dəyər aşağıdakı məcburiyyətlərdən birini qarşılamalıdır: - - - Each element of this collection should satisfy its own set of constraints. - Bu kolleksiyadakı hər element öz məcburiyyətlərini qarşılamalıdır. - - - This value is not a valid International Securities Identification Number (ISIN). - Bu dəyər doğru bir Qiymətli Kağızın Beynəlxalq İdentifikasiya Kodu (ISIN) deyil. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.be.xlf b/vendor/symfony/validator/Resources/translations/validators.be.xlf deleted file mode 100644 index 6489556..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.be.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Значэнне павінна быць Не. - - - This value should be true. - Значэнне павінна быць Так. - - - This value should be of type {{ type }}. - Тып значэння павінен быць {{ type }}. - - - This value should be blank. - Значэнне павінна быць пустым. - - - The value you selected is not a valid choice. - Абранае вамі значэнне не сапраўднае. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Вы павінны выбраць хаця б {{ limit }} варыянт.|Вы павінны выбраць хаця б {{ limit }} варыянтаў. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Вы павінны выбраць не больш за {{ limit }} варыянт.|Вы павінны выбраць не больш за {{ limit }} варыянтаў. - - - One or more of the given values is invalid. - Адзін або некалькі пазначаных значэнняў з'яўляецца несапраўдным. - - - This field was not expected. - Гэта поле не чакаецца. - - - This field is missing. - Гэта поле адсутнічае. - - - This value is not a valid date. - Гэта значэнне не з'яўляецца карэктнай датай. - - - This value is not a valid datetime. - Гэта значэнне не з'яўляецца карэктнай датай i часом. - - - This value is not a valid email address. - Гэта значэнне не з'яўляецца карэктным адрасам электроннай пошты. - - - The file could not be found. - Файл не знойдзен. - - - The file is not readable. - Файл не чытаецца. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файл занадта вялікі ({{ size }} {{ suffix }}). Максімальна дазволены памер {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - MIME-тып файлу некарэкты ({{ type }}). Дазволеныя MIME-тыпы файлу {{ types }}. - - - This value should be {{ limit }} or less. - Значэнне павінна быць {{ limit }} або менш. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Значэнне занадта доўгае. Яно павінна мець {{ limit }} сімвал або менш.|Значэнне занадта доўгае. Яно павінна мець {{ limit }} сімвалаў або менш. - - - This value should be {{ limit }} or more. - Значэнне павінна быць {{ limit }} або больш. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Значэнне занадта кароткае. Яно павінна мець прынамсі {{ limit }} сімвал.|Значэнне занадта кароткае. Яно павінна мець прынамсі {{ limit }} сімвалаў. - - - This value should not be blank. - Значэнне не павінна быць пустым. - - - This value should not be null. - Значэнне не павінна быць null. - - - This value should be null. - Значэнне павінна быць null. - - - This value is not valid. - Значэнне з'яўляецца не сапраўдным. - - - This value is not a valid time. - Значэнне не з'яўляецца сапраўдным часам. - - - This value is not a valid URL. - Значэнне не з'яўляецца сапраўдным URL-адрасам. - - - The two values should be equal. - Абодва значэнні павінны быць аднолькавымі. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файл занадта вялікі. Максімальна дазволены памер {{ limit }} {{ suffix }}. - - - The file is too large. - Файл занадта вялікі. - - - The file could not be uploaded. - Немагчыма запампаваць файл. - - - This value should be a valid number. - Значэнне павінна быць лікам. - - - This file is not a valid image. - Гэты файл не з'яўляецца сапраўднай выявай. - - - This is not a valid IP address. - Значэнне не з'яўляецца сапраўдным IP-адрасам. - - - This value is not a valid language. - Значэнне не з'яўляецца сапраўдным мовай. - - - This value is not a valid locale. - Значэнне не з'яўляецца сапраўднай лакаллю. - - - This value is not a valid country. - Значэнне не з'яўляецца сапраўднай краінай. - - - This value is already used. - Гэта значэнне ўжо выкарыстоўваецца. - - - The size of the image could not be detected. - Немагчыма вызначыць памер выявы. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Гэта выява занадта вялікая ({{ width }}px). Дазваляецца максімальная шырыня {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Гэта выява занадта маленькая ({{ width }}px). Дазваляецца мінімальная шырыня {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Гэты выява занадта вялікая ({{ width }}px). Дазваляецца максімальная вышыня {{ max_width }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Гэта выява занадта маленькая ({{ width }}px). Дазваляецца мінімальная вышыня {{ min_width }}px. - - - This value should be the user's current password. - Значэнне павінна быць цяперашнім паролем карыстальніка. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Значэнне павінна мець {{ limit }} сімвал.|Значэнне павінна мець {{ limit }} сімвалаў. - - - The file was only partially uploaded. - Файл быў запампаваны толькі часткова. - - - No file was uploaded. - Файл не быў запампаваны. - - - No temporary folder was configured in php.ini. - У php.ini не была налажана часовая папка, або часовая папка не існуе. - - - Cannot write temporary file to disk. - Немагчыма запісаць часовы файл на дыск. - - - A PHP extension caused the upload to fail. - Пашырэнне PHP выклікала памылку загрузкі. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Калекцыя павінна змяшчаць прынамсі {{ limit }} элемент.|Калекцыя павінна змяшчаць прынамсі {{ limit }} элементаў. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Калекцыя павінна змяшчаць {{ limit }} або менш элемент.|Калекцыя павінна змяшчаць {{ limit }} або менш элементаў. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Калекцыя павінна змяшчаць роўна {{ limit }} элемент.|Калекцыя павінна змяшчаць роўна {{ limit }} элементаў. - - - Invalid card number. - Несапраўдны нумар карты. - - - Unsupported card type or invalid card number. - Тып карты не падтрымліваецца або несапраўдны нумар карты. - - - This is not a valid International Bank Account Number (IBAN). - Несапраўдны міжнародны нумар банкаўскага рахунку (IBAN). - - - This value is not a valid ISBN-10. - Гэта значэнне не з'яўляецца сапраўдным ISBN-10. - - - This value is not a valid ISBN-13. - Гэта значэнне не з'яўляецца сапраўдным ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Гэта значэнне не з'яўляецца сапраўдным ISBN-10 або ISBN-13. - - - This value is not a valid ISSN. - Гэта значэнне не з'яўляецца сапраўдным ISSN. - - - This value is not a valid currency. - Гэта значэнне не з'яўляецца сапраўднай валютай. - - - This value should be equal to {{ compared_value }}. - Значэнне павінна раўняцца {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Значэнне павінна быць больш чым {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Значэнне павінна быць больш чым або раўняцца {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Значэнне павінна быць ідэнтычным {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Значэнне павінна быць менш чым {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Значэнне павінна быць менш чым або раўняцца {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Значэнне не павінна раўняцца {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Значэнне не павінна быць ідэнтычным {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Суадносіны бакоў выявы з'яўляецца занадта вялікім ({{ ratio }}). Дазваляецца максімальныя суадносіны {{max_ratio}} . - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Суадносіны бакоў выявы з'яўляецца занадта маленькімі ({{ ratio }}). Дазваляецца мінімальныя суадносіны {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Выява квадратная ({{width}}x{{height}}px). Квадратныя выявы не дазволены. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Выява ў альбомнай арыентацыі ({{ width }}x{{ height }}px). Выявы ў альбомнай арыентацыі не дазволены. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Выява ў партрэтнай арыентацыі ({{ width }}x{{ height }}px). Выявы ў партрэтнай арыентацыі не дазволены. - - - An empty file is not allowed. - Пусты файл не дазволены. - - - The host could not be resolved. - Не магчыма знайсці імя хоста. - - - This value does not match the expected {{ charset }} charset. - Гэта значэнне не супадае з чаканай {{ charset }} кадыроўкай. - - - This is not a valid Business Identifier Code (BIC). - Несапраўдны банкаўскі ідэнтыфікацыйны код (BIC). - - - Error - Памылка - - - This is not a valid UUID. - Гэта несапраўдны UUID. - - - This value should be a multiple of {{ compared_value }}. - Значэнне павінна быць кратным {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Банкаўскі ідэнтыфікацыйны код (BIC) не звязан з IBAN {{ iban }}. - - - This value should be valid JSON. - Гэта значэнне павінна быць у фармаце JSON. - - - This collection should contain only unique elements. - Калекцыя павінна змяшчаць толькі ўнікальныя элементы. - - - This value should be positive. - Значэнне павінна быць дадатным. - - - This value should be either positive or zero. - Значэнне павінна быць дадатным ці нуль. - - - This value should be negative. - Значэнне павінна быць адмоўным. - - - This value should be either negative or zero. - Значэнне павінна быць адмоўным ці нуль. - - - This value is not a valid timezone. - Значэнне не з'яўляецца сапраўдным гадзінным поясам. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Гэты пароль быў выкрадзены ў выніку ўзлому дадзеных, таму яго нельга выкарыстоўваць. Калі ласка, выкарыстоўвайце іншы пароль. - - - This value should be between {{ min }} and {{ max }}. - Значэнне павінна быць паміж {{min}} і {{max}}. - - - This value is not a valid hostname. - Значэнне не з'яўляецца карэктным імем хаста. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Колькасць элементаў у гэтай калекцыі павінна быць кратным {{compared_value}}. - - - This value should satisfy at least one of the following constraints: - Значэнне павінна задавальняць як мінімум аднаму з наступных абмежаванняў: - - - Each element of this collection should satisfy its own set of constraints. - Кожны элемент гэтай калекцыі павінен задавальняць свайму ўласнаму набору абмежаванняў. - - - This value is not a valid International Securities Identification Number (ISIN). - Значэнне не з'яўляецца карэктным міжнародным ідэнтыфікацыйным нумарам каштоўных папер (ISIN). - - - This value should be a valid expression. - Значэнне не з'яўляецца сапраўдным выразам. - - - This value is not a valid CSS color. - Значэнне не з'яўляецца дапушчальным колерам CSS. - - - This value is not a valid CIDR notation. - Значэнне не з'яўляецца сапраўднай натацыяй CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Значэнне сеткавай маскі павінна быць ад {{min}} да {{max}}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.bg.xlf b/vendor/symfony/validator/Resources/translations/validators.bg.xlf deleted file mode 100644 index 455ff81..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.bg.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Стойността трябва да бъде лъжа (false). - - - This value should be true. - Стойността трябва да бъде истина (true). - - - This value should be of type {{ type }}. - Стойността трябва да бъде от тип {{ type }}. - - - This value should be blank. - Стойността трябва да бъде празна. - - - The value you selected is not a valid choice. - Избраната стойност е невалидна. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Трябва да изберете поне {{ limit }} опция.|Трябва да изберете поне {{ limit }} опции. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Трябва да изберете най-много {{ limit }} опция.|Трябва да изберете най-много {{ limit }} опции. - - - One or more of the given values is invalid. - Една или повече от зададените стойности е невалидна. - - - This field was not expected. - Полето не се е очаквало. - - - This field is missing. - Полето липсва. - - - This value is not a valid date. - Стойността не е валидна дата. - - - This value is not a valid datetime. - Стойността не е валидна дата и час. - - - This value is not a valid email address. - Стойността не е валиден имейл адрес. - - - The file could not be found. - Файлът не беше открит. - - - The file is not readable. - Файлът не може да бъде прочетен. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файлът е твърде голям ({{ size }} {{ suffix }}). Максималният размер е {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime типа на файла е невалиден ({{ type }}). Разрешени mime типове са {{ types }}. - - - This value should be {{ limit }} or less. - Стойността трябва да бъде {{ limit }} или по-малко. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символ.|Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символа. - - - This value should be {{ limit }} or more. - Стойността трябва да бъде {{ limit }} или повече. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символ.|Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символа. - - - This value should not be blank. - Стойността не трябва да бъде празна. - - - This value should not be null. - Стойността не трябва да бъде null. - - - This value should be null. - Стойността трябва да бъде null. - - - This value is not valid. - Стойността не е валидна. - - - This value is not a valid time. - Стойността не е валидно време. - - - This value is not a valid URL. - Стойността не е валиден URL. - - - The two values should be equal. - Двете стойности трябва да бъдат равни. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файлът е твърде голям. Разрешеният максимален размер е {{ limit }} {{ suffix }}. - - - The file is too large. - Файлът е твърде голям. - - - The file could not be uploaded. - Файлът не може да бъде качен. - - - This value should be a valid number. - Стойността трябва да бъде валиден номер. - - - This file is not a valid image. - Файлът не е валидно изображение. - - - This is not a valid IP address. - Това не е валиден IP адрес. - - - This value is not a valid language. - Стойността не е валиден език. - - - This value is not a valid locale. - Стойността не е валидна локализация. - - - This value is not a valid country. - Стойността не е валидна държава. - - - This value is already used. - Стойността вече е в употреба. - - - The size of the image could not be detected. - Размера на изображението не може да бъде определен. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Изображението е твърде широко ({{ width }}px). Широчината трябва да бъде максимум {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Изображението е с твърде малка широчина ({{ width }}px). Широчината трябва да бъде минимум {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Изображението е с твърде голяма височина ({{ height }}px). Височината трябва да бъде максимум {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Изображението е с твърде малка височина ({{ height }}px). Височина трябва да бъде минимум {{ min_height }}px. - - - This value should be the user's current password. - Стойността трябва да бъде текущата потребителска парола. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Стойността трябва да бъде точно {{ limit }} символ.|Стойността трябва да бъде точно {{ limit }} символа. - - - The file was only partially uploaded. - Файлът е качен частично. - - - No file was uploaded. - Файлът не беше качен. - - - No temporary folder was configured in php.ini. - Не е посочена директория за временни файлове в php.ini. - - - Cannot write temporary file to disk. - Не може да запише временен файл на диска. - - - A PHP extension caused the upload to fail. - PHP разширение предизвика прекъсване на качването. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Колекцията трябва да съдържа поне {{ limit }} елемент.|Колекцията трябва да съдържа поне {{ limit }} елемента. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Колекцията трябва да съдържа най-много {{ limit }} елемент.|Колекцията трябва да съдържа най-много {{ limit }} елемента. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Колекцията трябва да съдържа точно {{ limit }} елемент.|Колекцията трябва да съдържа точно {{ limit }} елемента. - - - Invalid card number. - Невалиден номер на карта. - - - Unsupported card type or invalid card number. - Неподдържан тип карта или невалиден номер на карта. - - - This is not a valid International Bank Account Number (IBAN). - Това не е валиден Международен номер на банкова сметка (IBAN). - - - This value is not a valid ISBN-10. - Стойността не е валиден ISBN-10. - - - This value is not a valid ISBN-13. - Стойността не е валиден ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Стойността не е нито валиден ISBN-10, нито валиден ISBN-13. - - - This value is not a valid ISSN. - Стойността не е валиден ISSN. - - - This value is not a valid currency. - Стойността не е валидна валута. - - - This value should be equal to {{ compared_value }}. - Стойността трябва да бъде равна на {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Стойността трябва да бъде по-голяма от {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Стойността трябва да бъде по-голяма или равна на {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Стойността трябва да бъде идентична с {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Стойността трябва да бъде по-малка {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Стойността трябва да бъде по-малка или равна на {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Стойността не трябва да бъде равна на {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Стойността не трябва да бъде идентична с {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Изображението е с твърде голяма пропорция ({{ ratio }}). Максималната пропорция трябва да е {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Изображението е с твърде малка пропорция ({{ ratio }}). Минималната пропорция трябва да е {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Изображението е квадрат ({{ width }}x{{ height }}px). Такива изображения не са разрешени. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Изображението е с пейзажна ориентация ({{ width }}x{{ height }}px). Изображения с такава ориентация не са разрешени. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Изображението е с портретна ориентация ({{ width }}x{{ height }}px). Изображения с такава ориентация не са разрешени. - - - An empty file is not allowed. - Празни файлове не са разрешени. - - - The host could not be resolved. - Хостът е недостъпен. - - - This value does not match the expected {{ charset }} charset. - Стойността не съвпада с очакваната {{ charset }} кодировка. - - - This is not a valid Business Identifier Code (BIC). - Това не е валиден Бизнес идентификационен код (BIC). - - - Error - Грешка - - - This is not a valid UUID. - Това не е валиден UUID. - - - This value should be a multiple of {{ compared_value }}. - Стойността трябва да бъде кратно число на {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Бизнес идентификационния код (BIC) не е свързан с IBAN {{ iban }}. - - - This value should be valid JSON. - Стойността трябва да е валиден JSON. - - - This collection should contain only unique elements. - Колекцията трябва да съдържа само уникални елементи. - - - This value should be positive. - Стойността трябва да бъде положително число. - - - This value should be either positive or zero. - Стойността трябва бъде положително число или нула. - - - This value should be negative. - Стойността трябва да бъде отрицателно число. - - - This value should be either negative or zero. - Стойността трябва да бъде отрицателно число или нула. - - - This value is not a valid timezone. - Стойността не е валидна часова зона. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Тази парола е компрометирана, не трябва да бъде използвана. Моля използвайте друга парола. - - - This value should be between {{ min }} and {{ max }}. - Стойността трябва да бъде между {{ min }} и {{ max }}. - - - This value is not a valid hostname. - Стойността не е валиден hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Броят на елементите в тази колекция трябва да бъде кратен на {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Стойността трябва да отговаря на поне едно от следните ограничения: - - - Each element of this collection should satisfy its own set of constraints. - Всеки елемент от тази колекция трябва да отговаря на собствения си набор от ограничения. - - - This value is not a valid International Securities Identification Number (ISIN). - Стойността не е валиден Международен идентификационен номер на ценни книжа (ISIN). - - - This value should be a valid expression. - Стойността трябва да бъде валиден израз. - - - This value is not a valid CSS color. - Стойността не е валиден CSS цвят. - - - This value is not a valid CIDR notation. - Стойността не е валидна CIDR нотация. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Стойността на мрежовата маска трябва да бъде между {{ min }} и {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.bs.xlf b/vendor/symfony/validator/Resources/translations/validators.bs.xlf deleted file mode 100644 index 43102cc..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.bs.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Ova vrijednost bi trebalo da bude "netačno" (false). - - - This value should be true. - Ova vrijednost bi trebalo da bude "tačno" (true). - - - This value should be of type {{ type }}. - Ova vrijednost bi trebalo da bude tipa {{ type }}. - - - This value should be blank. - Ova vrijednost bi trebalo da bude prazna. - - - The value you selected is not a valid choice. - Odabrana vrijednost nije validan izbor. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Morate odabrati barem {{ limit }} mogućnost.|Morate odabrati barem {{ limit }} mogućnosti.|Morate odabrati barem {{ limit }} mogućnosti. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Morate odabrati najviše {{ limit }} mogućnost.|Morate odabrati najviše {{ limit }} mogućnosti.|Morate odabrati najviše {{ limit }} mogućnosti. - - - One or more of the given values is invalid. - Jedna ili više datih vrijednosti nisu validne. - - - This field was not expected. - Ovo polje nije očekivano. - - - This field is missing. - Ovo polje nedostaje. - - - This value is not a valid date. - Ova vrijednost nije ispravan datum. - - - This value is not a valid datetime. - Ova vrijednost nije ispravnog datum-vrijeme (datetime) formata. - - - This value is not a valid email address. - Ova vrijednost nije ispravna e-mail adresa. - - - The file could not be found. - Ova datoteka ne može biti pronađena. - - - The file is not readable. - Ova datoteka nije čitljiva. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Ova datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. - - - This value should be {{ limit }} or less. - Ova vrijednost bi trebalo da bude {{ limit }} ili manje. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ova vrijednost je predugačka. Trebalo bi da ima {{ limit }} karakter ili manje.|Ova vrijednost je predugačka. Trebalo bi da ima {{ limit }} karaktera ili manje.|Ova vrijednost je predugačka. Trebalo bi da ima {{ limit }} karaktera ili manje. - - - This value should be {{ limit }} or more. - Ova vrijednost bi trebalo da bude {{ limit }} ili više. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ova vrijednost je prekratka. Trebalo bi da ima {{ limit }} karakter ili više.|Ova vrijednost je prekratka. Trebalo bi da ima {{ limit }} karaktera ili više.|Ova vrijednost je prekratka. Trebalo bi da ima {{ limit }} karaktera ili više. - - - This value should not be blank. - Ova vrijednost ne bi trebalo da bude prazna. - - - This value should not be null. - Ova vrijednost ne bi trebalo da bude null. - - - This value should be null. - Ova vrijednost bi trebalo da bude null. - - - This value is not valid. - Ova vrijednost nije ispravna. - - - This value is not a valid time. - Ova vrijednost nije ispravno vrijeme. - - - This value is not a valid URL. - Ova vrijednost nije ispravan URL. - - - The two values should be equal. - Obje vrijednosti bi trebalo da budu jednake. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The file is too large. - Ova datoteka je prevelika. - - - The file could not be uploaded. - Ova datoteka ne može biti prenijeta (uploaded). - - - This value should be a valid number. - Ova vrijednost bi trebalo da bude ispravan broj. - - - This file is not a valid image. - Ova datoteka nije validna slika. - - - This is not a valid IP address. - Ovo nije ispravna IP adresa. - - - This value is not a valid language. - Ova vrijednost nije validan jezik. - - - This value is not a valid locale. - Ova vrijednost nije validna regionalna oznaka. - - - This value is not a valid country. - Ova vrijednost nije validna država. - - - This value is already used. - Ova vrijednost je već upotrebljena. - - - The size of the image could not be detected. - Nije moguće otkriti veličinu ove slike. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Širina slike je prevelika ({{ width }}px). Najveća dozvoljena širina je {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Širina slike je premala ({{ width }}px). Najmanja dozvoljena širina je {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Dužina slike je prevelika ({{ height }}px). Najveća dozvoljena dužina je {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Dužina slike je premala ({{ height }}px). Najmanja dozvoljena dužina je {{ min_height }}px. - - - This value should be the user's current password. - Ova vrijednost bi trebalo da bude trenutna korisnička lozinka. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ova vrijednost bi trebalo da ima tačno {{ limit }} karakter.|Ova vrijednost bi trebalo da ima tačno {{ limit }} karaktera. - - - The file was only partially uploaded. - Datoteka je samo djelimično prenijeta (uploaded). - - - No file was uploaded. - Nijedna datoteka nije prenijeta (uploaded). - - - No temporary folder was configured in php.ini. - Privremeni direktorijum nije konfigurisan u datoteci php.ini. - - - Cannot write temporary file to disk. - Privremenu datoteku nije moguće upisati na disk. - - - A PHP extension caused the upload to fail. - Prenos datoteke nije uspio zbog PHP ekstenzije. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ova kolekcija bi trebalo da sadrži tačno {{ limit }} element.|Ova kolekcija bi trebalo da sadrži tačno {{ limit }} elementa.|Ova kolekcija bi trebalo da sadrži tačno {{ limit }} elemenata. - - - Invalid card number. - Broj kartice je neispravan. - - - Unsupported card type or invalid card number. - Tip kartice nije podržan ili je broj kartice neispravan. - - - This is not a valid International Bank Account Number (IBAN). - Ova vrijednost nije ispravan međunarodni broj bankovnog računa (IBAN). - - - This value is not a valid ISBN-10. - Ova vrijednost nije ispravan ISBN-10. - - - This value is not a valid ISBN-13. - Ova vrijednost nije ispravan ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ova vrijednost nije ispravan ISBN-10 niti ISBN-13. - - - This value is not a valid ISSN. - Ova vrijednost nije ispravan ISSN. - - - This value is not a valid currency. - Ova vrijednost nije ispravna valuta. - - - This value should be equal to {{ compared_value }}. - Ova vrijednost bi trebalo da bude jednaka {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ova vrijednost bi trebalo da bude veća od {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ova vrijednost bi trebalo da bude jednaka ili veća od {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrijednost bi trebalo da bude identična {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ova vrijednost bi trebalo da bude manja od {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ova vrijednost bi trebalo da bude jednaka ili manja od {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ova vrijednost bi trebalo da bude različita od {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrijednost bi trebalo da bude identična sa {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Razmjera ove slike je prevelika ({{ ratio }}). Maksimalna dozvoljena razmjera je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Razmjera ove slike je premala ({{ ratio }}). Minimalna očekivana razmjera je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Ova slika je kvadratnog oblika ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Ova slika je orijentisana horizontalno (landscape) ({{ width }}x{{ height }}px). Horizontalno orijentisane slike nisu dozvoljene. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Ova slika je orijentisana vertikalno (portrait) ({{ width }}x{{ height }}px). Vertikalno orijentisane slike nisu dozvoljene. - - - An empty file is not allowed. - Prazna datoteka nije dozvoljena. - - - The host could not be resolved. - Nije moguće odrediti poslužitelja (host). - - - This value does not match the expected {{ charset }} charset. - Ova vrijednost ne odgovara očekivanom {{ charset }} setu karaktera (charset). - - - This is not a valid Business Identifier Code (BIC). - Ovo nije validan poslovni identifikacioni kod (BIC). - - - Error - Greška - - - This is not a valid UUID. - Ovo nije validan UUID. - - - This value should be a multiple of {{ compared_value }}. - Ova vrijednost bi trebalo da bude djeljiva sa {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ovaj poslovni identifikacioni kod (BIC) nije povezan sa IBAN-om {{ iban }}. - - - This value should be valid JSON. - Ova vrijednost bi trebalo da bude validan JSON. - - - This collection should contain only unique elements. - Ova kolekcija bi trebala da sadrži samo jedinstvene elemente. - - - This value should be positive. - Ova vrijednost bi trebalo da bude pozitivna. - - - This value should be either positive or zero. - Ova vrijednost bi trebalo da bude pozitivna ili jednaka nuli. - - - This value should be negative. - Ova vrijednost bi trebalo da bude negativna. - - - This value should be either negative or zero. - Ova vrijednost bi trebalo da bude negativna ili jednaka nuli. - - - This value is not a valid timezone. - Ova vrijednost nije validna vremenska zona. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ova lozinka je procurila u nekom od slučajeva kompromitovanja podataka, nemojte je koristiti. Koristite drugu lozinku. - - - This value should be between {{ min }} and {{ max }}. - Ova vrijednosti bi trebala biti između {{ min }} i {{ max }}. - - - This value is not a valid hostname. - Ova vrijednost nije ispravno ime poslužitelja (hostname). - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Broj elemenata u ovoj kolekciji bi trebalo da bude djeljiv sa {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ova vrijednost bi trebalo da zadovoljava namjanje jedno od narednih ograničenja: - - - Each element of this collection should satisfy its own set of constraints. - Svaki element ove kolekcije bi trebalo da zadovolji sopstveni skup ograničenja. - - - This value is not a valid International Securities Identification Number (ISIN). - Ova vrijednost nije ispravna međunarodna identifikaciona oznaka hartija od vrijednosti (ISIN). - - - This value should be a valid expression. - Ova vrijednost bi trebala biti važeći izraz. - - - This value is not a valid CSS color. - Ova vrijednost nije važeća CSS boja. - - - This value is not a valid CIDR notation. - Ova vrijednost nije važeća CIDR notacija. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Vrijednost NetMask bi trebala biti između {{min}} i {{max}}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.ca.xlf b/vendor/symfony/validator/Resources/translations/validators.ca.xlf deleted file mode 100644 index 04f3e9a..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.ca.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Aquest valor hauria de ser fals. - - - This value should be true. - Aquest valor hauria de ser cert. - - - This value should be of type {{ type }}. - Aquest valor hauria de ser del tipus {{ type }}. - - - This value should be blank. - Aquest valor hauria d'estar buit. - - - The value you selected is not a valid choice. - El valor seleccionat no és una opció vàlida. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Ha de seleccionar almenys {{ limit }} opció.|Ha de seleccionar almenys {{ limit }} opcions. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Ha de seleccionar com a màxim {{ limit }} opció.|Ha de seleccionar com a màxim {{ limit }} opcions. - - - One or more of the given values is invalid. - Un o més dels valors facilitats són incorrectes. - - - This field was not expected. - Aquest camp no s'esperava. - - - This field is missing. - Aquest camp està desaparegut. - - - This value is not a valid date. - Aquest valor no és una data vàlida. - - - This value is not a valid datetime. - Aquest valor no és una data i hora vàlida. - - - This value is not a valid email address. - Aquest valor no és una adreça d'email vàlida. - - - The file could not be found. - No s'ha pogut trobar l'arxiu. - - - The file is not readable. - No es pot llegir l'arxiu. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - L'arxiu és massa gran ({{ size }} {{ suffix }}). La grandària màxima permesa és {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - El tipus mime de l'arxiu no és vàlid ({{ type }}). Els tipus mime vàlids són {{ types }}. - - - This value should be {{ limit }} or less. - Aquest valor hauria de ser {{ limit }} o menys. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcter o menys.|Aquest valor és massa llarg. Hauria de tenir {{ limit }} caràcters o menys. - - - This value should be {{ limit }} or more. - Aquest valor hauria de ser {{ limit }} o més. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Aquest valor és massa curt. Hauria de tenir {{ limit }} caràcters o més. - - - This value should not be blank. - Aquest valor no hauria d'estar buit. - - - This value should not be null. - Aquest valor no hauria de ser null. - - - This value should be null. - Aquest valor hauria de ser null. - - - This value is not valid. - Aquest valor no és vàlid. - - - This value is not a valid time. - Aquest valor no és una hora vàlida. - - - This value is not a valid URL. - Aquest valor no és una URL vàlida. - - - The two values should be equal. - Els dos valors haurien de ser iguals. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}. - - - The file is too large. - L'arxiu és massa gran. - - - The file could not be uploaded. - No es pot pujar l'arxiu. - - - This value should be a valid number. - Aquest valor hauria de ser un nombre vàlid. - - - This file is not a valid image. - L'arxiu no és una imatge vàlida. - - - This is not a valid IP address. - Això no és una adreça IP vàlida. - - - This value is not a valid language. - Aquest valor no és un idioma vàlid. - - - This value is not a valid locale. - Aquest valor no és una localització vàlida. - - - This value is not a valid country. - Aquest valor no és un país vàlid. - - - This value is already used. - Aquest valor ja s'ha utilitzat. - - - The size of the image could not be detected. - No s'ha pogut determinar la grandària de la imatge. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa són {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida són {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa són {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida són {{ min_height }}px. - - - This value should be the user's current password. - Aquest valor hauria de ser la contrasenya actual de l'usuari. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Aquest valor hauria de tenir exactament {{ limit }} caràcter.|Aquest valor hauria de tenir exactament {{ limit }} caràcters. - - - The file was only partially uploaded. - L'arxiu va ser només pujat parcialment. - - - No file was uploaded. - Cap arxiu va ser pujat. - - - No temporary folder was configured in php.ini. - Cap carpeta temporal va ser configurada en php.ini. - - - Cannot write temporary file to disk. - No es va poder escriure l'arxiu temporal en el disc. - - - A PHP extension caused the upload to fail. - Una extensió de PHP va fer que la pujada fallara. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Aquesta col·lecció ha de contenir {{ limit }} element o més.|Aquesta col·lecció ha de contenir {{ limit }} elements o més. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Aquesta col·lecció ha de contenir {{ limit }} element o menys.|Aquesta col·lecció ha de contenir {{ limit }} elements o menys. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Aquesta col·lecció ha de contenir exactament {{ limit }} element.|Aquesta col·lecció ha de contenir exactament {{ limit }} elements. - - - Invalid card number. - Número de targeta invàlid. - - - Unsupported card type or invalid card number. - Tipus de targeta no suportada o número de targeta invàlid. - - - This is not a valid International Bank Account Number (IBAN). - Això no és un nombre de compte bancari internacional (IBAN) vàlid. - - - This value is not a valid ISBN-10. - Aquest valor no és un ISBN-10 vàlid. - - - This value is not a valid ISBN-13. - Aquest valor no és un ISBN-13 vàlid. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Aquest valor no és ni un ISBN-10 vàlid ni un ISBN-13 vàlid. - - - This value is not a valid ISSN. - Aquest valor no és un ISSN vàlid. - - - This value is not a valid currency. - Aquest valor no és una divisa vàlida. - - - This value should be equal to {{ compared_value }}. - Aquest valor hauria de ser igual a {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Aquest valor hauria de ser més gran a {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Aquest valor hauria de ser major o igual a {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Aquest valor hauria de ser idèntic a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Aquest valor hauria de ser menor a {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Aquest valor hauria de ser menor o igual a {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Aquest valor no hauria de ser igual a {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Aquest valor no hauria de idèntic a {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - La proporció de l'imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - La proporció de l'imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ max_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - L'imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - L'imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - L'imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. - - - An empty file is not allowed. - No està permès un fixter buit. - - - The host could not be resolved. - No s'ha pogut resoldre l'amfitrió. - - - This value does not match the expected {{ charset }} charset. - Aquest valor no coincideix amb l'esperat {{ charset }} joc de caràcters. - - - This is not a valid Business Identifier Code (BIC). - Aquest no és un codi d'identificació bancari (BIC) vàlid. - - - Error - Error - - - This is not a valid UUID. - Aquest valor no és un UUID vàlid. - - - This value should be a multiple of {{ compared_value }}. - Aquest valor ha de ser múltiple de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Aquest Codi d'identificació bancari (BIC) no està associat amb l'IBAN {{ iban }}. - - - This value should be valid JSON. - Aquest valor hauria de ser un JSON vàlid. - - - This collection should contain only unique elements. - Aquesta col·lecció només hauria de contenir elements únics. - - - This value should be positive. - Aquest valor hauria de ser positiu. - - - This value should be either positive or zero. - Aquest valor ha de ser positiu o zero. - - - This value should be negative. - Aquest valor ha de ser negatiu. - - - This value should be either negative or zero. - Aquest valor ha de ser negatiu o zero. - - - This value is not a valid timezone. - Aquest valor no és una zona horària vàlida. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Aquesta contrasenya s'ha filtrat en cas de violació de dades, no s'ha d'utilitzar. Utilitzeu una altra contrasenya. - - - This value should be between {{ min }} and {{ max }}. - Aquest valor ha d'estar entre {{ min }} i {{ max }}. - - - This value is not a valid hostname. - Aquest valor no és un nom d'amfitrió vàlid. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - El nombre d'elements d'aquesta col·lecció ha de ser múltiple de {{compared_value}}. - - - This value should satisfy at least one of the following constraints: - Aquest valor ha de satisfer almenys una de les restriccions següents: - - - Each element of this collection should satisfy its own set of constraints. - Cada element d'aquesta col·lecció hauria de satisfer el seu propi conjunt de restriccions. - - - This value is not a valid International Securities Identification Number (ISIN). - Aquest valor no és un número d'identificació de valors internacionals (ISIN) vàlid. - - - This value should be a valid expression. - Aquest valor hauria de ser una expressió vàlida. - - - This value is not a valid CSS color. - Aquest valor no és un color CSS vàlid. - - - This value is not a valid CIDR notation. - Aquest valor no és una notació CIDR vàlida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - El valor de la màscara de xarxa hauria d'estar entre {{ min }} i {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.cs.xlf b/vendor/symfony/validator/Resources/translations/validators.cs.xlf deleted file mode 100644 index 7541019..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.cs.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Tato hodnota musí být nepravdivá (false). - - - This value should be true. - Tato hodnota musí být pravdivá (true). - - - This value should be of type {{ type }}. - Tato hodnota musí být typu {{ type }}. - - - This value should be blank. - Tato hodnota musí být prázdná. - - - The value you selected is not a valid choice. - Vybraná hodnota není platnou možností. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Musí být vybrána nejméně {{ limit }} možnost.|Musí být vybrány nejméně {{ limit }} možnosti.|Musí být vybráno nejméně {{ limit }} možností. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Musí být vybrána maximálně {{ limit }} možnost.|Musí být vybrány maximálně {{ limit }} možnosti.|Musí být vybráno maximálně {{ limit }} možností. - - - One or more of the given values is invalid. - Některé z uvedených hodnot jsou neplatné. - - - This field was not expected. - Toto pole nebylo očekáváno. - - - This field is missing. - Toto pole chybí. - - - This value is not a valid date. - Tato hodnota není platné datum. - - - This value is not a valid datetime. - Tato hodnota není platné datum s časovým údajem. - - - This value is not a valid email address. - Tato hodnota není platná e-mailová adresa. - - - The file could not be found. - Soubor nebyl nalezen. - - - The file is not readable. - Soubor je nečitelný. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Soubor je příliš velký ({{ size }} {{ suffix }}). Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Neplatný mime typ souboru ({{ type }}). Povolené mime typy souborů jsou {{ types }}. - - - This value should be {{ limit }} or less. - Tato hodnota musí být {{ limit }} nebo méně. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znak.|Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znaky.|Tato hodnota je příliš dlouhá. Musí obsahovat maximálně {{ limit }} znaků. - - - This value should be {{ limit }} or more. - Tato hodnota musí být {{ limit }} nebo více. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znak.|Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znaky.|Tato hodnota je příliš krátká. Musí obsahovat minimálně {{ limit }} znaků. - - - This value should not be blank. - Tato hodnota nesmí být prázdná. - - - This value should not be null. - Tato hodnota nesmí být null. - - - This value should be null. - Tato hodnota musí být null. - - - This value is not valid. - Tato hodnota není platná. - - - This value is not a valid time. - Tato hodnota není platný časový údaj. - - - This value is not a valid URL. - Tato hodnota není platná URL adresa. - - - The two values should be equal. - Tyto dvě hodnoty musí být stejné. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Soubor je příliš velký. Maximální povolená velikost souboru je {{ limit }} {{ suffix }}. - - - The file is too large. - Soubor je příliš velký. - - - The file could not be uploaded. - Soubor se nepodařilo nahrát. - - - This value should be a valid number. - Tato hodnota musí být číslo. - - - This file is not a valid image. - Tento soubor není obrázek. - - - This is not a valid IP address. - Toto není platná IP adresa. - - - This value is not a valid language. - Tento jazyk neexistuje. - - - This value is not a valid locale. - Tato lokalizace neexistuje. - - - This value is not a valid country. - Tato země neexistuje. - - - This value is already used. - Tato hodnota je již používána. - - - The size of the image could not be detected. - Nepodařily se zjistit rozměry obrázku. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Obrázek je příliš široký ({{ width }}px). Maximální povolená šířka obrázku je {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Obrázek je příliš úzký ({{ width }}px). Minimální šířka musí být {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Obrázek je příliš vysoký ({{ height }}px). Maximální povolená výška obrázku je {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Obrázek je příliš nízký ({{ height }}px). Minimální výška obrázku musí být {{ min_height }}px. - - - This value should be the user's current password. - Tato hodnota musí být aktuální heslo uživatele. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Tato hodnota musí mít přesně {{ limit }} znak.|Tato hodnota musí mít přesně {{ limit }} znaky.|Tato hodnota musí mít přesně {{ limit }} znaků. - - - The file was only partially uploaded. - Byla nahrána jen část souboru. - - - No file was uploaded. - Žádný soubor nebyl nahrán. - - - No temporary folder was configured in php.ini. - V php.ini není nastavena cesta k adresáři pro dočasné soubory. - - - Cannot write temporary file to disk. - Dočasný soubor se nepodařilo zapsat na disk. - - - A PHP extension caused the upload to fail. - Rozšíření PHP zabránilo nahrání souboru. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Tato kolekce musí obsahovat minimálně {{ limit }} prvek.|Tato kolekce musí obsahovat minimálně {{ limit }} prvky.|Tato kolekce musí obsahovat minimálně {{ limit }} prvků. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Tato kolekce musí obsahovat maximálně {{ limit }} prvek.|Tato kolekce musí obsahovat maximálně {{ limit }} prvky.|Tato kolekce musí obsahovat maximálně {{ limit }} prvků. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Tato kolekce musí obsahovat přesně {{ limit }} prvek.|Tato kolekce musí obsahovat přesně {{ limit }} prvky.|Tato kolekce musí obsahovat přesně {{ limit }} prvků. - - - Invalid card number. - Neplatné číslo karty. - - - Unsupported card type or invalid card number. - Nepodporovaný typ karty nebo neplatné číslo karty. - - - This is not a valid International Bank Account Number (IBAN). - Toto je neplatný IBAN. - - - This value is not a valid ISBN-10. - Tato hodnota není platné ISBN-10. - - - This value is not a valid ISBN-13. - Tato hodnota není platné ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Tato hodnota není platné ISBN-10 ani ISBN-13. - - - This value is not a valid ISSN. - Tato hodnota není platné ISSN. - - - This value is not a valid currency. - Tato měna neexistuje. - - - This value should be equal to {{ compared_value }}. - Tato hodnota musí být rovna {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Tato hodnota musí být větší než {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Tato hodnota musí být větší nebo rovna {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Tato hodnota musí být typu {{ compared_value_type }} a zároveň musí být rovna {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Tato hodnota musí být menší než {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Tato hodnota musí být menší nebo rovna {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Tato hodnota nesmí být rovna {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Tato hodnota nesmí být typu {{ compared_value_type }} a zároveň nesmí být rovna {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Poměr stran obrázku je příliš velký ({{ ratio }}). Maximální povolený poměr stran obrázku je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Poměr stran obrázku je příliš malý ({{ ratio }}). Minimální povolený poměr stran obrázku je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Strany obrázku jsou čtvercové ({{ width }}x{{ height }}px). Čtvercové obrázky nejsou povolené. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Obrázek je orientovaný na šířku ({{ width }}x{{ height }}px). Obrázky orientované na šířku nejsou povolené. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Obrázek je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nejsou povolené. - - - An empty file is not allowed. - Soubor nesmí být prázdný. - - - The host could not be resolved. - Hostitele nebylo možné rozpoznat. - - - This value does not match the expected {{ charset }} charset. - Tato hodnota neodpovídá očekávané znakové sadě {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Tato hodnota není platný identifikační kód podniku (BIC). - - - Error - Chyba - - - This is not a valid UUID. - Tato hodnota není platné UUID. - - - This value should be a multiple of {{ compared_value }}. - Tato hodnota musí být násobek hodnoty {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Bankovní identifikační kód (BIC) neodpovídá mezinárodnímu číslu účtu (IBAN) {{ iban }}. - - - This value should be valid JSON. - Tato hodnota musí být validní JSON. - - - This collection should contain only unique elements. - Tato kolekce musí obsahovat pouze unikátní prvky. - - - This value should be positive. - Tato hodnota musí být kladná. - - - This value should be either positive or zero. - Tato hodnota musí být buď kladná nebo nula. - - - This value should be negative. - Tato hodnota musí být záporná. - - - This value should be either negative or zero. - Tato hodnota musí být buď záporná nebo nula. - - - This value is not a valid timezone. - Tato časová zóna neexistuje. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Zadané heslo bylo součástí úniku dat, takže ho není možné použít. Použijte prosím jiné heslo. - - - This value should be between {{ min }} and {{ max }}. - Hodnota musí být mezi {{ min }} a {{ max }}. - - - This value is not a valid hostname. - Tato hodnota není platný hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Počet prvků v této kolekci musí být násobek {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Tato hodnota musí splňovat alespoň jedno z následujících omezení: - - - Each element of this collection should satisfy its own set of constraints. - Každý prvek v této kolekci musí splňovat svá vlastní omezení. - - - This value is not a valid International Securities Identification Number (ISIN). - Tato hodnota není platné mezinárodní identifikační číslo cenného papíru (ISIN). - - - This value should be a valid expression. - Tato hodnota musí být platný výraz. - - - This value is not a valid CSS color. - Tato hodnota není platná barva CSS. - - - This value is not a valid CIDR notation. - Tato hodnota není platná notace CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Hodnota masky sítě musí být mezi {{ min }} a {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.cy.xlf b/vendor/symfony/validator/Resources/translations/validators.cy.xlf deleted file mode 100644 index 752b6c2..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.cy.xlf +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - This value should be false. - Dylid bod y gwerth hwn yn ffug. - - - This value should be true. - Dylid bod y gwerth hwn yn wir. - - - This value should be of type {{ type }}. - Dylid bod y gwerth hwn bod o fath {{ type }}. - - - This value should be blank. - Dylid bod y gwerth hwn yn wag. - - - The value you selected is not a valid choice. - Nid yw'r gwerth â ddewiswyd yn ddilys. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Rhaid dewis o leiaf {{ limit }} opsiwn. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Rhaid dewis dim mwy na {{ limit }} opsiwn. - - - One or more of the given values is invalid. - Mae un neu fwy o'r gwerthoedd a roddwyd yn annilys. - - - This field was not expected. - Nid oedd disgwyl y maes hwn. - - - This field is missing. - Mae'r maes hwn ar goll. - - - This value is not a valid date. - Nid yw'r gwerth yn ddyddiad dilys. - - - This value is not a valid datetime. - Nid yw'r gwerth yn datetime dilys. - - - This value is not a valid email address. - Nid yw'r gwerth yn gyfeiriad ebost dilys. - - - The file could not be found. - Ni ddarganfyddwyd y ffeil. - - - The file is not readable. - Ni ellir darllen y ffeil. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Mae'r ffeil yn rhy fawr ({{ size }} {{ suffix }}). Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Nid yw math mime y ffeil yn ddilys ({{ type }}). Dyma'r mathau â ganiateir {{ types }}. - - - This value should be {{ limit }} or less. - Dylai'r gwerth hwn fod yn {{ limit }} neu lai. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Mae'r gwerth hwn rhy hir. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu lai. - - - This value should be {{ limit }} or more. - Dylai'r gwerth hwn fod yn {{ limit }} neu fwy. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Mae'r gwerth hwn yn rhy fyr. Dylai gynnwys {{ limit }} nodyn cyfrifiadurol neu fwy. - - - This value should not be blank. - Ni ddylai'r gwerth hwn fod yn wag. - - - This value should not be null. - Ni ddylai'r gwerth hwn fod yn null. - - - This value should be null. - Dylai'r gwerth fod yn null. - - - This value is not valid. - Nid yw'r gwerth hwn yn ddilys. - - - This value is not a valid time. - Nid yw'r gwerth hwn yn amser dilys. - - - This value is not a valid URL. - Nid yw'r gwerth hwn yn URL dilys. - - - The two values should be equal. - Rhaid i'r ddau werth fod yn gyfystyr a'u gilydd. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Mae'r ffeil yn rhy fawr. Yr uchafswm â ganiateir yw {{ limit }} {{ suffix }}. - - - The file is too large. - Mae'r ffeil yn rhy fawr. - - - The file could not be uploaded. - Methwyd ag uwchlwytho'r ffeil. - - - This value should be a valid number. - Dylai'r gwerth hwn fod yn rif dilys. - - - This file is not a valid image. - Nid yw'r ffeil hon yn ddelwedd dilys. - - - This is not a valid IP address. - Nid yw hwn yn gyfeiriad IP dilys. - - - This value is not a valid language. - Nid yw'r gwerth hwn yn iaith ddilys. - - - This value is not a valid locale. - Nid yw'r gwerth hwn yn locale dilys. - - - This value is not a valid country. - Nid yw'r gwerth hwn yn wlad dilys. - - - This value is already used. - Mae'r gwerth hwn eisoes yn cael ei ddefnyddio. - - - The size of the image could not be detected. - Methwyd â darganfod maint y ddelwedd. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Mae lled y ddelwedd yn rhy fawr ({{ width }}px). Y lled mwyaf â ganiateir yw {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Mae lled y ddelwedd yn rhy fach ({{ width }}px). Y lled lleiaf â ganiateir yw {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Mae uchder y ddelwedd yn rhy fawr ({{ width }}px). Yr uchder mwyaf â ganiateir yw {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Mae uchder y ddelwedd yn rhy fach ({{ width }}px). Yr uchder lleiaf â ganiateir yw {{ min_height }}px. - - - This value should be the user's current password. - Dylaid bod y gwerth hwn yn gyfrinair presenol y defnyddiwr. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Dylai'r gwerth hwn fod yn union {{ limit }} nodyn cyfrifiadurol o hyd. - - - The file was only partially uploaded. - Dim ond rhan o'r ffeil ag uwchlwythwyd. - - - No file was uploaded. - Ni uwchlwythwyd unrhyw ffeil. - - - No temporary folder was configured in php.ini. - Nid oes ffolder dros-dro wedi'i gosod yn php.ini. - - - Cannot write temporary file to disk. - Methwyd ag ysgrifennu'r ffeil dros-dro ar ddisg. - - - A PHP extension caused the upload to fail. - Methwyd ag uwchlwytho oherwydd ategyn PHP. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu fwy. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Dylai'r casgliad hwn gynnwys {{ limit }} elfen neu lai. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Dylai'r casgliad hwn gynnwys union {{ limit }} elfen. - - - Invalid card number. - Nid oedd rhif y cerdyn yn ddilys. - - - Unsupported card type or invalid card number. - Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys. - - - This is not a valid International Bank Account Number (IBAN). - Nid yw hwn yn Rhif Cyfrif Banc Rhyngwladol (IBAN) dilys. - - - This value is not a valid ISBN-10. - Nid yw'r gwerth hwn yn ISBN-10 dilys. - - - This value is not a valid ISBN-13. - Nid yw'r gwerth hwn yn ISBN-13 dilys. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Nid yw'r gwerth hwn yn Rhif ISBN-10 dilys nac yn ISBN-13 dilys. - - - This value is not a valid ISSN. - Nid yw'r gwerth hwn yn ISSN dilys. - - - This value is not a valid currency. - Nid yw'r gwerth hwn yn arian dilys. - - - This value should be equal to {{ compared_value }}. - Dylai'r gwerth hwn fod yn gyfartal â {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Dylai'r gwerth hwn fod yn fwy na {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Dylai'r gwerth hwn fod yn fwy na neu'n hafal i {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Dylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Dylai'r gwerth hwn fod yn llai na {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Dylai'r gwerth hwn fod yn llai na neu'n hafal i {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ni ddylai'r gwerth hwn fod yn hafal i {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ni ddylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Mae'r gymhareb delwedd yn rhy fawr ({{ ratio }}). Y gymhareb uchaf a ganiateir yw {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Mae'r gymhareb delwedd yn rhy fach ({{ ratio }}). Y gymhareb isaf a ddisgwylir yw {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Mae'r ddelwedd yn sgwâr ({{ width }}x{{ height }}px). Ni chaniateir delweddau sgwâr. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Mae'r ddelwedd mewn fformat tirlun ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat tirlun. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Mae'r ddelwedd mewn fformat portread ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat portread. - - - An empty file is not allowed. - Ni chaniateir ffeil wag. - - - The host could not be resolved. - Ni fu modd datrys y gwesteiwr. - - - This value does not match the expected {{ charset }} charset. - Nid yw'r gwerth hwn yn cyfateb â'r {{ charset }} set nodau ddisgwyliedig. - - - This is not a valid Business Identifier Code (BIC). - Nid yw hwn yn God Adnabod Busnes (BIC) dilys. - - - Error - Gwall - - - This is not a valid UUID. - Nid yw hyn yn UUID dilys. - - - This value should be a multiple of {{ compared_value }}. - Dylai'r gwerth hwn fod yn luosrif o {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Nid yw'r Cod Adnabod Busnes (BIC) hwn yn gysylltiedig ag IBAN {{ iban }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.da.xlf b/vendor/symfony/validator/Resources/translations/validators.da.xlf deleted file mode 100644 index b76624e..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.da.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Værdien skal være falsk. - - - This value should be true. - Værdien skal være sand. - - - This value should be of type {{ type }}. - Værdien skal være af typen {{ type }}. - - - This value should be blank. - Værdien skal være blank. - - - The value you selected is not a valid choice. - Den valgte værdi er ikke gyldig. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Du skal vælge mindst én mulighed.|Du skal vælge mindst {{ limit }} muligheder. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Du kan højst vælge én mulighed.|Du kan højst vælge {{ limit }} muligheder. - - - One or more of the given values is invalid. - En eller flere af de angivne værdier er ugyldige. - - - This field was not expected. - Feltet blev ikke forventet. - - - This field is missing. - Dette felt mangler. - - - This value is not a valid date. - Værdien er ikke en gyldig dato. - - - This value is not a valid datetime. - Værdien er ikke et gyldigt tidspunkt. - - - This value is not a valid email address. - Værdien er ikke en gyldig e-mailadresse. - - - The file could not be found. - Filen kunne ikke findes. - - - The file is not readable. - Filen kan ikke læses. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor ({{ size }} {{ suffix }}). Maksimale tilladte størrelse er {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Filens MIME-type er ugyldig ({{ type }}). Tilladte MIME-typer er {{ types }}. - - - This value should be {{ limit }} or less. - Værdien skal være {{ limit }} eller mindre. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Værdien er for lang. Den må højst indeholde {{ limit }} tegn. - - - This value should be {{ limit }} or more. - Værdien skal være {{ limit }} eller mere. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Værdien er for kort. Den skal indeholde mindst {{ limit }} tegn. - - - This value should not be blank. - Værdien må ikke være blank. - - - This value should not be null. - Værdien må ikke være tom (null). - - - This value should be null. - Værdien skal være tom (null). - - - This value is not valid. - Værdien er ikke gyldig. - - - This value is not a valid time. - Værdien er ikke et gyldigt klokkeslæt. - - - This value is not a valid URL. - Værdien er ikke en gyldig URL. - - - The two values should be equal. - De to værdier skal være ens. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor. Den maksimale størrelse er {{ limit }} {{ suffix }}. - - - The file is too large. - Filen er for stor. - - - The file could not be uploaded. - Filen kunne ikke uploades. - - - This value should be a valid number. - Værdien skal være et gyldigt tal. - - - This file is not a valid image. - Filen er ikke gyldigt billede. - - - This is not a valid IP address. - Dette er ikke en gyldig IP-adresse. - - - This value is not a valid language. - Værdien er ikke et gyldigt sprog. - - - This value is not a valid locale. - Værdien er ikke en gyldig lokalitet. - - - This value is not a valid country. - Værdien er ikke et gyldigt land. - - - This value is already used. - Værdien er allerede i brug. - - - The size of the image could not be detected. - Størrelsen på billedet kunne ikke detekteres. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Billedet er for bredt ({{ width }}px). Største tilladte bredde er {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Billedet er for smalt ({{ width }}px). Mindste forventede bredde er {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Billedet er for højt ({{ height }}px). Største tilladte højde er {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Billedet er for lavt ({{ height }}px). Mindste forventede højde er {{ min_height }}px. - - - This value should be the user's current password. - Værdien skal være brugerens nuværende adgangskode. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Værdien skal være på præcis {{ limit }} tegn. - - - The file was only partially uploaded. - Filen blev kun delvist uploadet. - - - No file was uploaded. - Ingen fil blev uploadet. - - - No temporary folder was configured in php.ini. - Ingen midlertidig mappe er konfigureret i php.ini. - - - Cannot write temporary file to disk. - Kan ikke skrive midlertidig fil til disk. - - - A PHP extension caused the upload to fail. - En PHP-udvidelse forårsagede fejl i upload. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Denne samling skal indeholde mindst ét element.|Denne samling skal indeholde mindst {{ limit }} elementer. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Denne samling skal indeholde højst ét element.|Denne samling skal indeholde højst {{ limit }} elementer. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Denne samling skal indeholde præcis ét element.|Denne samling skal indeholde præcis {{ limit }} elementer. - - - Invalid card number. - Ugyldigt kortnummer. - - - Unsupported card type or invalid card number. - Ikke-understøttet korttype eller ugyldigt kortnummer. - - - This is not a valid International Bank Account Number (IBAN). - Det er ikke et gyldigt International Bank Account Number (IBAN). - - - This value is not a valid ISBN-10. - Værdien er ikke en gyldig ISBN-10. - - - This value is not a valid ISBN-13. - Værdien er ikke en gyldig ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Værdien er hverken en gyldig ISBN-10 eller en gyldig ISBN-13. - - - This value is not a valid ISSN. - Værdien er ikke en gyldig ISSN. - - - This value is not a valid currency. - Denne værdi er ikke en gyldig valuta. - - - This value should be equal to {{ compared_value }}. - Denne værdi skal være lig med {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Denne værdi skal være større end {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Denne værdi skal være større end eller lig med {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Denne værdi skal være identisk med {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Denne værdi skal være mindre end {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Denne værdi skal være mindre end eller lig med {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Denne værdi bør ikke være lig med {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Denne værdi bør ikke være identisk med {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Billedforholdet er for stort ({{ratio}}). Tilladt maksimumsforhold er {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Billedforholdet er for lille ({{ ratio }}). Minimumsforventet forventet er {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Billedet er firkantet ({{ width }} x {{ height }} px). Firkantede billeder er ikke tilladt. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Billedet er landskabsorienteret ({{width}} x {{height}} px). Landskabsorienterede billeder er ikke tilladt - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Billedet er portrætorienteret ({{ width }}x{{ height }}px). Portrætorienterede billeder er ikke tilladt. - - - An empty file is not allowed. - En tom fil er ikke tilladt. - - - The host could not be resolved. - Værten kunne ikke løses. - - - This value does not match the expected {{ charset }} charset. - Denne værdi stemmer ikke overens med den forventede {{ charset }} charset. - - - This is not a valid Business Identifier Code (BIC). - Dette er ikke en gyldig Business Identifier Code (BIC).a - - - Error - Fejl - - - This is not a valid UUID. - Dette er ikke en gyldig UUID. - - - This value should be a multiple of {{ compared_value }}. - Denne værdi skal være et multiplikation af {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Denne Business Identifier Code (BIC) er ikke forbundet med IBAN {{ iban }}. - - - This value should be valid JSON. - Denne værdi skal være gyldig JSON. - - - This collection should contain only unique elements. - Denne samling bør kun indeholde unikke elementer. - - - This value should be positive. - Denne værdi skal være positiv. - - - This value should be either positive or zero. - Denne værdi skal være enten positiv eller nul. - - - This value should be negative. - Denne værdi skal være negativ. - - - This value should be either negative or zero. - Denne værdi skal være enten negativ eller nul. - - - This value is not a valid timezone. - Denne værdi er ikke en gyldig tidszone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Denne adgangskode er blevet lækket i et databrud, det må ikke bruges. Brug venligst en anden adgangskode. - - - This value should be between {{ min }} and {{ max }}. - Værdien skal være mellem {{ min }} og {{ max }}. - - - This value is not a valid hostname. - Værdien er ikke et gyldigt værtsnavn. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Antallet af elementer i denne samling skal være en multiplikation af {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Værdien skal overholde mindst én af følgende krav: - - - Each element of this collection should satisfy its own set of constraints. - Hvert element i denne samling skal overholde dens egne krav. - - - This value is not a valid International Securities Identification Number (ISIN). - Værdien er ikke et gyldig International Securities Identification Number (ISIN). - - - This value should be a valid expression. - Værdien skal være et gyldigt udtryk. - - - This value is not a valid CSS color. - Værdien skal være en gyldig CSS farve. - - - This value is not a valid CIDR notation. - Værdien er ikke en gyldig CIDR notation. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Værdien af netmasken skal være mellem {{ min }} og {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.de.xlf b/vendor/symfony/validator/Resources/translations/validators.de.xlf deleted file mode 100644 index 00be24f..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.de.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Dieser Wert sollte false sein. - - - This value should be true. - Dieser Wert sollte true sein. - - - This value should be of type {{ type }}. - Dieser Wert sollte vom Typ {{ type }} sein. - - - This value should be blank. - Dieser Wert sollte leer sein. - - - The value you selected is not a valid choice. - Sie haben einen ungültigen Wert ausgewählt. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Sie müssen mindestens {{ limit }} Möglichkeit wählen.|Sie müssen mindestens {{ limit }} Möglichkeiten wählen. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Sie dürfen höchstens {{ limit }} Möglichkeit wählen.|Sie dürfen höchstens {{ limit }} Möglichkeiten wählen. - - - One or more of the given values is invalid. - Einer oder mehrere der angegebenen Werte sind ungültig. - - - This field was not expected. - Dieses Feld wurde nicht erwartet. - - - This field is missing. - Dieses Feld fehlt. - - - This value is not a valid date. - Dieser Wert entspricht keiner gültigen Datumsangabe. - - - This value is not a valid datetime. - Dieser Wert entspricht keiner gültigen Datums- und Zeitangabe. - - - This value is not a valid email address. - Dieser Wert ist keine gültige E-Mail-Adresse. - - - The file could not be found. - Die Datei wurde nicht gefunden. - - - The file is not readable. - Die Datei ist nicht lesbar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Die Datei ist zu groß ({{ size }} {{ suffix }}). Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Der Dateityp ist ungültig ({{ type }}). Erlaubte Dateitypen sind {{ types }}. - - - This value should be {{ limit }} or less. - Dieser Wert sollte kleiner oder gleich {{ limit }} sein. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu lang. Sie sollte höchstens {{ limit }} Zeichen haben. - - - This value should be {{ limit }} or more. - Dieser Wert sollte größer oder gleich {{ limit }} sein. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben.|Diese Zeichenkette ist zu kurz. Sie sollte mindestens {{ limit }} Zeichen haben. - - - This value should not be blank. - Dieser Wert sollte nicht leer sein. - - - This value should not be null. - Dieser Wert sollte nicht null sein. - - - This value should be null. - Dieser Wert sollte null sein. - - - This value is not valid. - Dieser Wert ist nicht gültig. - - - This value is not a valid time. - Dieser Wert entspricht keiner gültigen Zeitangabe. - - - This value is not a valid URL. - Dieser Wert ist keine gültige URL. - - - The two values should be equal. - Die beiden Werte sollten identisch sein. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Die Datei ist zu groß. Die maximal zulässige Größe beträgt {{ limit }} {{ suffix }}. - - - The file is too large. - Die Datei ist zu groß. - - - The file could not be uploaded. - Die Datei konnte nicht hochgeladen werden. - - - This value should be a valid number. - Dieser Wert sollte eine gültige Zahl sein. - - - This file is not a valid image. - Diese Datei ist kein gültiges Bild. - - - This is not a valid IP address. - Dies ist keine gültige IP-Adresse. - - - This value is not a valid language. - Dieser Wert entspricht keiner gültigen Sprache. - - - This value is not a valid locale. - Dieser Wert entspricht keinem gültigen Gebietsschema. - - - This value is not a valid country. - Dieser Wert entspricht keinem gültigen Land. - - - This value is already used. - Dieser Wert wird bereits verwendet. - - - The size of the image could not be detected. - Die Größe des Bildes konnte nicht ermittelt werden. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Die Bildbreite ist zu groß ({{ width }}px). Die maximal zulässige Breite beträgt {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Die Bildbreite ist zu gering ({{ width }}px). Die erwartete Mindestbreite beträgt {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Die Bildhöhe ist zu groß ({{ height }}px). Die maximal zulässige Höhe beträgt {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Die Bildhöhe ist zu gering ({{ height }}px). Die erwartete Mindesthöhe beträgt {{ min_height }}px. - - - This value should be the user's current password. - Dieser Wert sollte dem aktuellen Benutzerpasswort entsprechen. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Dieser Wert sollte genau {{ limit }} Zeichen lang sein.|Dieser Wert sollte genau {{ limit }} Zeichen lang sein. - - - The file was only partially uploaded. - Die Datei wurde nur teilweise hochgeladen. - - - No file was uploaded. - Es wurde keine Datei hochgeladen. - - - No temporary folder was configured in php.ini. - Es wurde kein temporärer Ordner in der php.ini konfiguriert oder der temporäre Ordner existiert nicht. - - - Cannot write temporary file to disk. - Kann die temporäre Datei nicht speichern. - - - A PHP extension caused the upload to fail. - Eine PHP-Erweiterung verhinderte den Upload. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder mehr Elemente beinhalten. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten.|Diese Sammlung sollte {{ limit }} oder weniger Elemente beinhalten. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Diese Sammlung sollte genau {{ limit }} Element beinhalten.|Diese Sammlung sollte genau {{ limit }} Elemente beinhalten. - - - Invalid card number. - Ungültige Kartennummer. - - - Unsupported card type or invalid card number. - Nicht unterstützer Kartentyp oder ungültige Kartennummer. - - - This is not a valid International Bank Account Number (IBAN). - Dieser Wert ist keine gültige internationale Bankkontonummer (IBAN). - - - This value is not a valid ISBN-10. - Dieser Wert entspricht keiner gültigen ISBN-10. - - - This value is not a valid ISBN-13. - Dieser Wert entspricht keiner gültigen ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Dieser Wert ist weder eine gültige ISBN-10 noch eine gültige ISBN-13. - - - This value is not a valid ISSN. - Dieser Wert ist keine gültige ISSN. - - - This value is not a valid currency. - Dieser Wert ist keine gültige Währung. - - - This value should be equal to {{ compared_value }}. - Dieser Wert sollte gleich {{ compared_value }} sein. - - - This value should be greater than {{ compared_value }}. - Dieser Wert sollte größer als {{ compared_value }} sein. - - - This value should be greater than or equal to {{ compared_value }}. - Dieser Wert sollte größer oder gleich {{ compared_value }} sein. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Dieser Wert sollte identisch sein mit {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Dieser Wert sollte kleiner als {{ compared_value }} sein. - - - This value should be less than or equal to {{ compared_value }}. - Dieser Wert sollte kleiner oder gleich {{ compared_value }} sein. - - - This value should not be equal to {{ compared_value }}. - Dieser Wert sollte nicht {{ compared_value }} sein. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Dieser Wert sollte nicht identisch sein mit {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Das Seitenverhältnis des Bildes ist zu groß ({{ ratio }}). Der erlaubte Maximalwert ist {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Das Seitenverhältnis des Bildes ist zu klein ({{ ratio }}). Der erwartete Minimalwert ist {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Das Bild ist quadratisch ({{ width }}x{{ height }}px). Quadratische Bilder sind nicht erlaubt. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Das Bild ist im Querformat ({{ width }}x{{ height }}px). Bilder im Querformat sind nicht erlaubt. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Das Bild ist im Hochformat ({{ width }}x{{ height }}px). Bilder im Hochformat sind nicht erlaubt. - - - An empty file is not allowed. - Eine leere Datei ist nicht erlaubt. - - - The host could not be resolved. - Der Hostname konnte nicht aufgelöst werden. - - - This value does not match the expected {{ charset }} charset. - Dieser Wert entspricht nicht dem erwarteten Zeichensatz {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Dieser Wert ist kein gültiger BIC. - - - Error - Fehler - - - This is not a valid UUID. - Dies ist keine gültige UUID. - - - This value should be a multiple of {{ compared_value }}. - Dieser Wert sollte ein Vielfaches von {{ compared_value }} sein. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Diese internationale Bankleitzahl (BIC) ist nicht mit der IBAN {{ iban }} assoziiert. - - - This value should be valid JSON. - Dieser Wert sollte gültiges JSON sein. - - - This collection should contain only unique elements. - Diese Sammlung darf keine doppelten Elemente enthalten. - - - This value should be positive. - Diese Zahl sollte positiv sein. - - - This value should be either positive or zero. - Diese Zahl sollte entweder positiv oder 0 sein. - - - This value should be negative. - Diese Zahl sollte negativ sein. - - - This value should be either negative or zero. - Diese Zahl sollte entweder negativ oder 0 sein. - - - This value is not a valid timezone. - Dieser Wert ist keine gültige Zeitzone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dieses Passwort ist Teil eines Datenlecks, es darf nicht verwendet werden. - - - This value should be between {{ min }} and {{ max }}. - Dieser Wert sollte zwischen {{ min }} und {{ max }} sein. - - - This value is not a valid hostname. - Dieser Wert ist kein gültiger Hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Die Anzahl an Elementen in dieser Sammlung sollte ein Vielfaches von {{ compared_value }} sein. - - - This value should satisfy at least one of the following constraints: - Dieser Wert sollte eine der folgenden Bedingungen erfüllen: - - - Each element of this collection should satisfy its own set of constraints. - Jedes Element dieser Sammlung sollte seine eigene Menge an Bedingungen erfüllen. - - - This value is not a valid International Securities Identification Number (ISIN). - Dieser Wert ist keine gültige Internationale Wertpapierkennnummer (ISIN). - - - This value should be a valid expression. - Dieser Wert sollte eine gültige Expression sein. - - - This value is not a valid CSS color. - Dieser Wert ist keine gültige CSS-Farbe. - - - This value is not a valid CIDR notation. - Dieser Wert entspricht nicht der CIDR-Notation. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Der Wert der Subnetzmaske sollte zwischen {{ min }} und {{ max }} liegen. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.el.xlf b/vendor/symfony/validator/Resources/translations/validators.el.xlf deleted file mode 100644 index 768986d..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.el.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Αυτή η τιμή πρέπει να είναι ψευδής. - - - This value should be true. - Αυτή η τιμή πρέπει να είναι αληθής. - - - This value should be of type {{ type }}. - Αυτή η τιμή πρέπει να είναι τύπου {{ type }}. - - - This value should be blank. - Αυτή η τιμή πρέπει να είναι κενή. - - - The value you selected is not a valid choice. - Η τιμή που επιλέχθηκε δεν αντιστοιχεί σε έγκυρη επιλογή. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Πρέπει να επιλέξτε τουλάχιστον {{ limit }} επιλογή.|Πρέπει να επιλέξτε τουλάχιστον {{ limit }} επιλογές. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Πρέπει να επιλέξτε το πολύ {{ limit }} επιλογή.|Πρέπει να επιλέξτε το πολύ {{ limit }} επιλογές. - - - One or more of the given values is invalid. - Μια ή περισσότερες τιμές δεν είναι έγκυρες. - - - This field was not expected. - Αυτό το πεδίο δεν ήταν αναμενόμενο. - - - This field is missing. - Λείπει αυτό το πεδίο. - - - This value is not a valid date. - Η τιμή δεν αντιστοιχεί σε έγκυρη ημερομηνία. - - - This value is not a valid datetime. - Η τιμή δεν αντιστοιχεί σε έγκυρη ημερομηνία και ώρα. - - - This value is not a valid email address. - Η τιμή δεν αντιστοιχεί σε έγκυρο email. - - - The file could not be found. - Το αρχείο δε μπορεί να βρεθεί. - - - The file is not readable. - Το αρχείο δεν είναι αναγνώσιμο. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Το αρχείο είναι πολύ μεγάλο ({{ size }} {{ suffix }}). Το μέγιστο επιτρεπτό μέγεθος είναι {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Ο τύπος mime του αρχείου δεν είναι έγκυρος ({{ type }}). Οι έγκυροι τύποι mime είναι {{ types }}. - - - This value should be {{ limit }} or less. - Αυτή η τιμή θα έπρεπε να είναι {{ limit }} ή λιγότερο. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Αυτή η τιμή είναι πολύ μεγάλη. Θα έπρεπε να έχει {{ limit }} χαρακτήρα ή λιγότερο.|Αυτή η τιμή είναι πολύ μεγάλη. Θα έπρεπε να έχει {{ limit }} χαρακτήρες ή λιγότερο. - - - This value should be {{ limit }} or more. - Αυτή η τιμή θα έπρεπε να είναι {{ limit }} ή περισσότερο. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Αυτή η τιμή είναι πολύ μικρή. Θα έπρεπε να έχει {{ limit }} χαρακτήρα ή περισσότερο.|Αυτή η τιμή είναι πολύ μικρή. Θα έπρεπε να έχει {{ limit }} χαρακτήρες ή περισσότερο. - - - This value should not be blank. - Αυτή η τιμή δεν πρέπει να είναι κενή. - - - This value should not be null. - Αυτή η τιμή δεν πρέπει να είναι μηδενική. - - - This value should be null. - Αυτή η τιμή πρέπει να είναι μηδενική. - - - This value is not valid. - Αυτή η τιμή δεν είναι έγκυρη. - - - This value is not a valid time. - Αυτή η τιμή δεν αντιστοιχεί σε έγκυρη ώρα. - - - This value is not a valid URL. - Αυτή η τιμή δεν αντιστοιχεί σε έγκυρο URL. - - - The two values should be equal. - Οι δύο τιμές θα πρέπει να είναι ίδιες. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Το αρχείο είναι πολύ μεγάλο. Το μέγιστο επιτρεπτό μέγεθος είναι {{ limit }} {{ suffix }}. - - - The file is too large. - Το αρχείο είναι πολύ μεγάλο. - - - The file could not be uploaded. - Το αρχείο δε μπορεί να ανέβει. - - - This value should be a valid number. - Αυτή η τιμή θα πρέπει να είναι ένας έγκυρος αριθμός. - - - This file is not a valid image. - Το αρχείο δεν αποτελεί έγκυρη εικόνα. - - - This is not a valid IP address. - Αυτό δεν είναι μια έγκυρη διεύθυνση IP. - - - This value is not a valid language. - Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη γλώσσα. - - - This value is not a valid locale. - Αυτή η τιμή δεν αντιστοιχεί σε έγκυρο κωδικό τοποθεσίας. - - - This value is not a valid country. - Αυτή η τιμή δεν αντιστοιχεί σε μια έγκυρη χώρα. - - - This value is already used. - Αυτή η τιμή χρησιμοποιείται ήδη. - - - The size of the image could not be detected. - Το μέγεθος της εικόνας δεν ήταν δυνατό να ανιχνευθεί. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Το πλάτος της εικόνας είναι πολύ μεγάλο ({{ width }}px). Το μέγιστο επιτρεπτό πλάτος είναι {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Το πλάτος της εικόνας είναι πολύ μικρό ({{ width }}px). Το ελάχιστο επιτρεπτό πλάτος είναι {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Το ύψος της εικόνας είναι πολύ μεγάλο ({{ height }}px). Το μέγιστο επιτρεπτό ύψος είναι {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Το ύψος της εικόνας είναι πολύ μικρό ({{ height }}px). Το ελάχιστο επιτρεπτό ύψος είναι {{ min_height }}px. - - - This value should be the user's current password. - Αυτή η τιμή θα έπρεπε να είναι ο τρέχων κωδικός. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Αυτή η τιμή θα έπρεπε να έχει ακριβώς {{ limit }} χαρακτήρα.|Αυτή η τιμή θα έπρεπε να έχει ακριβώς {{ limit }} χαρακτήρες. - - - The file was only partially uploaded. - Το αρχείο δεν ανέβηκε ολόκληρο. - - - No file was uploaded. - Δεν ανέβηκε κανένα αρχείο. - - - No temporary folder was configured in php.ini. - Κανένας προσωρινός φάκελος δεν έχει ρυθμιστεί στο php.ini. - - - Cannot write temporary file to disk. - Αδυναμία εγγραφής προσωρινού αρχείου στο δίσκο. - - - A PHP extension caused the upload to fail. - Μια επέκταση PHP προκάλεσε αδυναμία ανεβάσματος. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχείο ή περισσότερα.|Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχεία ή περισσότερα. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχείo ή λιγότερα.|Αυτή η συλλογή θα πρέπει να περιέχει {{ limit }} στοιχεία ή λιγότερα. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Αυτή η συλλογή θα πρέπει να περιέχει ακριβώς {{ limit }} στοιχείo.|Αυτή η συλλογή θα πρέπει να περιέχει ακριβώς {{ limit }} στοιχεία. - - - Invalid card number. - Μη έγκυρος αριθμός κάρτας. - - - Unsupported card type or invalid card number. - Μη υποστηριζόμενος τύπος κάρτας ή μη έγκυρος αριθμός κάρτας. - - - This is not a valid International Bank Account Number (IBAN). - Αυτό δεν αντιστοιχεί σε έγκυρο διεθνή αριθμό τραπεζικού λογαριασμού (IBAN). - - - This value is not a valid ISBN-10. - Αυτό δεν είναι έγκυρος κωδικός ISBN-10. - - - This value is not a valid ISBN-13. - Αυτό δεν είναι έγκυρος κωδικός ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Αυτό δεν είναι ούτε έγκυρος κωδικός ISBN-10 ούτε έγκυρος κωδικός ISBN-13. - - - This value is not a valid ISSN. - Αυτό δεν είναι έγκυρος κωδικός ISSN. - - - This value is not a valid currency. - Αυτό δεν αντιστοιχεί σε έγκυρο νόμισμα. - - - This value should be equal to {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι ίση με {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι μεγαλύτερη από {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι μεγαλύτερη ή ίση με {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι μικρότερη από {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Αυτή η τιμή θα πρέπει να είναι μικρότερη ή ίση με {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Αυτή η τιμή δεν θα πρέπει να είναι ίση με {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Αυτή η τιμή δεν πρέπει να είναι πανομοιότυπη με {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Η αναλογία πλάτους-ύψους της εικόνας είναι πολύ μεγάλη ({{ ratio }}). Μέγιστη επιτρεπτή αναλογία {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Η αναλογία πλάτους-ύψους της εικόνας είναι πολύ μικρή ({{ ratio }}). Ελάχιστη επιτρεπτή αναλογία {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Η εικόνα είναι τετράγωνη ({{ width }}x{{ height }}px). Δεν επιτρέπονται τετράγωνες εικόνες. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Η εικόνα έχει οριζόντιο προσανατολισμό ({{ width }}x{{ height }}px). Δεν επιτρέπονται εικόνες με οριζόντιο προσανατολισμό. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Η εικόνα έχει κάθετο προσανατολισμό ({{ width }}x{{ height }}px). Δεν επιτρέπονται εικόνες με κάθετο προσανατολισμό. - - - An empty file is not allowed. - Δεν επιτρέπεται κενό αρχείο. - - - The host could not be resolved. - Η διεύθυνση δεν μπόρεσε να επιλυθεί. - - - This value does not match the expected {{ charset }} charset. - Αυτή η τιμή δεν ταιριάζει στο αναμενόμενο {{ charset }} σύνολο χαρακτήρων. - - - This is not a valid Business Identifier Code (BIC). - Αυτός δεν είναι ένας έγκυρος κωδικός BIC. - - - Error - Σφάλμα - - - This is not a valid UUID. - Αυτό δεν είναι ένα έγκυρο UUID. - - - This value should be a multiple of {{ compared_value }}. - Αυτή η τιμή θα έπρεπε να είναι πολλαπλάσιο του {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Αυτός ο κωδικός BIC δεν σχετίζεται με το IBAN {{ iban }}. - - - This value should be valid JSON. - Αυτή η τιμή θα πρέπει να είναι έγκυρο JSON. - - - This collection should contain only unique elements. - Αυτή η συλλογή θα πρέπει να περιέχει μόνο μοναδικά στοιχεία. - - - This value should be positive. - Αυτή η τιμή θα πρέπει να είναι θετική. - - - This value should be either positive or zero. - Αυτή η τιμή θα πρέπει να είναι θετική ή μηδενική. - - - This value should be negative. - Αυτή η τιμή θα πρέπει να είναι αρνητική. - - - This value should be either negative or zero. - Αυτή η τιμή θα πρέπει να είναι αρνητική ή μηδενική. - - - This value is not a valid timezone. - Αυτή η τιμή θα δεν είναι έγκυρη ζώνη ώρας. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Αυτός ο κωδικός πρόσβασης έχει διαρρεύσει σε παραβίαση δεδομένων. Παρακαλούμε να χρησιμοποιήσετε έναν άλλο κωδικό. - - - This value should be between {{ min }} and {{ max }}. - Αυτή η τιμή θα πρέπει να είναι μεταξύ {{ min }} και {{ max }}. - - - This value is not a valid hostname. - Αυτή η τιμή δεν είναι έγκυρο όνομα υποδοχής. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Το νούμερο των στοιχείων σε αυτή τη συλλογή θα πρέπει να είναι πολλαπλάσιο του {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Αυτή η τιμή θα πρέπει να ικανοποιεί τουλάχιστον έναν από τους παρακάτω περιορισμούς: - - - Each element of this collection should satisfy its own set of constraints. - Κάθε στοιχείο σε αυτή τη συλλογή θα πρέπει να ικανοποιεί το δικό του σύνολο περιορισμών. - - - This value is not a valid International Securities Identification Number (ISIN). - Αυτή η τιμή δεν είναι έγκυρο International Securities Identification Number (ISIN). - - - This value should be a valid expression. - Αυτή η τιμή θα πρέπει να είναι μία έγκυρη έκφραση. - - - This value is not a valid CSS color. - Αυτή η τιμή δεν είναι έγκυρο χρώμα CSS. - - - This value is not a valid CIDR notation. - Αυτή η τιμή δεν είναι έγκυρη CIDR σημειογραφία. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Η τιμή του netmask πρέπει να είναι ανάμεσα σε {{ min }} και {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.en.xlf b/vendor/symfony/validator/Resources/translations/validators.en.xlf deleted file mode 100644 index 34c5421..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.en.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - This value should be false. - - - This value should be true. - This value should be true. - - - This value should be of type {{ type }}. - This value should be of type {{ type }}. - - - This value should be blank. - This value should be blank. - - - The value you selected is not a valid choice. - The value you selected is not a valid choice. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - - - One or more of the given values is invalid. - One or more of the given values is invalid. - - - This field was not expected. - This field was not expected. - - - This field is missing. - This field is missing. - - - This value is not a valid date. - This value is not a valid date. - - - This value is not a valid datetime. - This value is not a valid datetime. - - - This value is not a valid email address. - This value is not a valid email address. - - - The file could not be found. - The file could not be found. - - - The file is not readable. - The file is not readable. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - - - This value should be {{ limit }} or less. - This value should be {{ limit }} or less. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - - - This value should be {{ limit }} or more. - This value should be {{ limit }} or more. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - - - This value should not be blank. - This value should not be blank. - - - This value should not be null. - This value should not be null. - - - This value should be null. - This value should be null. - - - This value is not valid. - This value is not valid. - - - This value is not a valid time. - This value is not a valid time. - - - This value is not a valid URL. - This value is not a valid URL. - - - The two values should be equal. - The two values should be equal. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - - - The file is too large. - The file is too large. - - - The file could not be uploaded. - The file could not be uploaded. - - - This value should be a valid number. - This value should be a valid number. - - - This file is not a valid image. - This file is not a valid image. - - - This is not a valid IP address. - This is not a valid IP address. - - - This value is not a valid language. - This value is not a valid language. - - - This value is not a valid locale. - This value is not a valid locale. - - - This value is not a valid country. - This value is not a valid country. - - - This value is already used. - This value is already used. - - - The size of the image could not be detected. - The size of the image could not be detected. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - - - This value should be the user's current password. - This value should be the user's current password. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - - - The file was only partially uploaded. - The file was only partially uploaded. - - - No file was uploaded. - No file was uploaded. - - - No temporary folder was configured in php.ini. - No temporary folder was configured in php.ini, or the configured folder does not exist. - - - Cannot write temporary file to disk. - Cannot write temporary file to disk. - - - A PHP extension caused the upload to fail. - A PHP extension caused the upload to fail. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - - - Invalid card number. - Invalid card number. - - - Unsupported card type or invalid card number. - Unsupported card type or invalid card number. - - - This is not a valid International Bank Account Number (IBAN). - This is not a valid International Bank Account Number (IBAN). - - - This value is not a valid ISBN-10. - This value is not a valid ISBN-10. - - - This value is not a valid ISBN-13. - This value is not a valid ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - This value is neither a valid ISBN-10 nor a valid ISBN-13. - - - This value is not a valid ISSN. - This value is not a valid ISSN. - - - This value is not a valid currency. - This value is not a valid currency. - - - This value should be equal to {{ compared_value }}. - This value should be equal to {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - This value should be greater than {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - This value should be greater than or equal to {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - This value should be less than {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - This value should be less than or equal to {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - This value should not be equal to {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - - - An empty file is not allowed. - An empty file is not allowed. - - - The host could not be resolved. - The host could not be resolved. - - - This value does not match the expected {{ charset }} charset. - This value does not match the expected {{ charset }} charset. - - - This is not a valid Business Identifier Code (BIC). - This is not a valid Business Identifier Code (BIC). - - - Error - Error - - - This is not a valid UUID. - This is not a valid UUID. - - - This value should be a multiple of {{ compared_value }}. - This value should be a multiple of {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - - - This value should be valid JSON. - This value should be valid JSON. - - - This collection should contain only unique elements. - This collection should contain only unique elements. - - - This value should be positive. - This value should be positive. - - - This value should be either positive or zero. - This value should be either positive or zero. - - - This value should be negative. - This value should be negative. - - - This value should be either negative or zero. - This value should be either negative or zero. - - - This value is not a valid timezone. - This value is not a valid timezone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - This password has been leaked in a data breach, it must not be used. Please use another password. - - - This value should be between {{ min }} and {{ max }}. - This value should be between {{ min }} and {{ max }}. - - - This value is not a valid hostname. - This value is not a valid hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - The number of elements in this collection should be a multiple of {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - This value should satisfy at least one of the following constraints: - - - Each element of this collection should satisfy its own set of constraints. - Each element of this collection should satisfy its own set of constraints. - - - This value is not a valid International Securities Identification Number (ISIN). - This value is not a valid International Securities Identification Number (ISIN). - - - This value should be a valid expression. - This value should be a valid expression. - - - This value is not a valid CSS color. - This value is not a valid CSS color. - - - This value is not a valid CIDR notation. - This value is not a valid CIDR notation. - - - The value of the netmask should be between {{ min }} and {{ max }}. - The value of the netmask should be between {{ min }} and {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.es.xlf b/vendor/symfony/validator/Resources/translations/validators.es.xlf deleted file mode 100644 index 897d0a4..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.es.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Este valor debería ser falso. - - - This value should be true. - Este valor debería ser verdadero. - - - This value should be of type {{ type }}. - Este valor debería ser de tipo {{ type }}. - - - This value should be blank. - Este valor debería estar vacío. - - - The value you selected is not a valid choice. - El valor seleccionado no es una opción válida. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Debe seleccionar al menos {{ limit }} opción.|Debe seleccionar al menos {{ limit }} opciones. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opciones. - - - One or more of the given values is invalid. - Uno o más de los valores indicados no son válidos. - - - This field was not expected. - Este campo no se esperaba. - - - This field is missing. - Este campo está desaparecido. - - - This value is not a valid date. - Este valor no es una fecha válida. - - - This value is not a valid datetime. - Este valor no es una fecha y hora válidas. - - - This value is not a valid email address. - Este valor no es una dirección de email válida. - - - The file could not be found. - No se pudo encontrar el archivo. - - - The file is not readable. - No se puede leer el archivo. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - El archivo es demasiado grande ({{ size }} {{ suffix }}). El tamaño máximo permitido es {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - El tipo mime del archivo no es válido ({{ type }}). Los tipos mime válidos son {{ types }}. - - - This value should be {{ limit }} or less. - Este valor debería ser {{ limit }} o menos. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Este valor es demasiado largo. Debería tener {{ limit }} carácter o menos.|Este valor es demasiado largo. Debería tener {{ limit }} caracteres o menos. - - - This value should be {{ limit }} or more. - Este valor debería ser {{ limit }} o más. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Este valor es demasiado corto. Debería tener {{ limit }} carácter o más.|Este valor es demasiado corto. Debería tener {{ limit }} caracteres o más. - - - This value should not be blank. - Este valor no debería estar vacío. - - - This value should not be null. - Este valor no debería ser nulo. - - - This value should be null. - Este valor debería ser nulo. - - - This value is not valid. - Este valor no es válido. - - - This value is not a valid time. - Este valor no es una hora válida. - - - This value is not a valid URL. - Este valor no es una URL válida. - - - The two values should be equal. - Los dos valores deberían ser iguales. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - El archivo es demasiado grande. El tamaño máximo permitido es {{ limit }} {{ suffix }}. - - - The file is too large. - El archivo es demasiado grande. - - - The file could not be uploaded. - No se pudo subir el archivo. - - - This value should be a valid number. - Este valor debería ser un número válido. - - - This file is not a valid image. - El archivo no es una imagen válida. - - - This is not a valid IP address. - Esto no es una dirección IP válida. - - - This value is not a valid language. - Este valor no es un idioma válido. - - - This value is not a valid locale. - Este valor no es una localización válida. - - - This value is not a valid country. - Este valor no es un país válido. - - - This value is already used. - Este valor ya se ha utilizado. - - - The size of the image could not be detected. - No se pudo determinar el tamaño de la imagen. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - El ancho de la imagen es demasiado grande ({{ width }}px). El ancho máximo permitido es de {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - El ancho de la imagen es demasiado pequeño ({{ width }}px). El ancho mínimo requerido es {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - La altura de la imagen es demasiado grande ({{ height }}px). La altura máxima permitida es de {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - La altura de la imagen es demasiado pequeña ({{ height }}px). La altura mínima requerida es de {{ min_height }}px. - - - This value should be the user's current password. - Este valor debería ser la contraseña actual del usuario. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Este valor debería tener exactamente {{ limit }} carácter.|Este valor debería tener exactamente {{ limit }} caracteres. - - - The file was only partially uploaded. - El archivo fue sólo subido parcialmente. - - - No file was uploaded. - Ningún archivo fue subido. - - - No temporary folder was configured in php.ini. - Ninguna carpeta temporal fue configurada en php.ini o la carpeta configurada no existe. - - - Cannot write temporary file to disk. - No se pudo escribir el archivo temporal en el disco. - - - A PHP extension caused the upload to fail. - Una extensión de PHP hizo que la subida fallara. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Esta colección debe contener {{ limit }} elemento o más.|Esta colección debe contener {{ limit }} elementos o más. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Esta colección debe contener {{ limit }} elemento o menos.|Esta colección debe contener {{ limit }} elementos o menos. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Esta colección debe contener exactamente {{ limit }} elemento.|Esta colección debe contener exactamente {{ limit }} elementos. - - - Invalid card number. - Número de tarjeta inválido. - - - Unsupported card type or invalid card number. - Tipo de tarjeta no soportado o número de tarjeta inválido. - - - This is not a valid International Bank Account Number (IBAN). - Esto no es un International Bank Account Number (IBAN) válido. - - - This value is not a valid ISBN-10. - Este valor no es un ISBN-10 válido. - - - This value is not a valid ISBN-13. - Este valor no es un ISBN-13 válido. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Este valor no es ni un ISBN-10 válido ni un ISBN-13 válido. - - - This value is not a valid ISSN. - Este valor no es un ISSN válido. - - - This value is not a valid currency. - Este valor no es una divisa válida. - - - This value should be equal to {{ compared_value }}. - Este valor debería ser igual que {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Este valor debería ser mayor que {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Este valor debería ser mayor o igual que {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Este valor debería ser menor que {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Este valor debería ser menor o igual que {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Este valor debería ser distinto de {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor no debería ser idéntico a {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - La proporción de la imagen es demasiado grande ({{ ratio }}). La máxima proporción permitida es {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - La proporción de la imagen es demasiado pequeña ({{ ratio }}). La mínima proporción permitida es {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - La imagen es cuadrada ({{ width }}x{{ height }}px). Las imágenes cuadradas no están permitidas. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - La imagen está orientada horizontalmente ({{ width }}x{{ height }}px). Las imágenes orientadas horizontalmente no están permitidas. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - La imagen está orientada verticalmente ({{ width }}x{{ height }}px). Las imágenes orientadas verticalmente no están permitidas. - - - An empty file is not allowed. - No está permitido un archivo vacío. - - - The host could not be resolved. - No se puede resolver el host. - - - This value does not match the expected {{ charset }} charset. - La codificación de caracteres para este valor debería ser {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - No es un Código de Identificación Bancaria (BIC) válido. - - - Error - Error - - - This is not a valid UUID. - Este valor no es un UUID válido. - - - This value should be a multiple of {{ compared_value }}. - Este valor debería ser múltiplo de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Este Código de Identificación Bancaria (BIC) no está asociado con el IBAN {{ iban }}. - - - This value should be valid JSON. - Este valor debería ser un JSON válido. - - - This collection should contain only unique elements. - Esta colección debería tener exclusivamente elementos únicos. - - - This value should be positive. - Este valor debería ser positivo. - - - This value should be either positive or zero. - Este valor debería ser positivo o igual a cero. - - - This value should be negative. - Este valor debería ser negativo. - - - This value should be either negative or zero. - Este valor debería ser negativo o igual a cero. - - - This value is not a valid timezone. - Este valor no es una zona horaria válida. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Esta contraseña no se puede utilizar porque está incluida en un listado de contraseñas públicas obtenido gracias a fallos de seguridad de otros sitios y aplicaciones. Por favor utilice otra contraseña. - - - This value should be between {{ min }} and {{ max }}. - Este valor debería estar entre {{ min }} y {{ max }}. - - - This value is not a valid hostname. - Este valor no es un nombre de host válido. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Este valor debería satisfacer al menos una de las siguientes restricciones: - - - Each element of this collection should satisfy its own set of constraints. - Cada elemento de esta colección debería satisfacer su propio conjunto de restricciones. - - - This value is not a valid International Securities Identification Number (ISIN). - Este valor no es un número de identificación internacional de valores (ISIN) válido. - - - This value should be a valid expression. - Este valor debería ser una expresión válida. - - - This value is not a valid CSS color. - Este valor no es un color CSS válido. - - - This value is not a valid CIDR notation. - Este valor no es una notación CIDR válida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - El valor de la máscara de red debería estar entre {{ min }} y {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.et.xlf b/vendor/symfony/validator/Resources/translations/validators.et.xlf deleted file mode 100644 index b323dcd..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.et.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Väärtus peaks olema väär. - - - This value should be true. - Väärtus peaks oleme tõene. - - - This value should be of type {{ type }}. - Väärtus peaks olema {{ type }}-tüüpi. - - - This value should be blank. - Väärtus peaks olema tühi. - - - The value you selected is not a valid choice. - Väärtus peaks olema üks etteantud valikutest. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Valima peaks vähemalt {{ limit }} valikut. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Valima peaks mitte rohkem kui {{ limit }} valikut. - - - One or more of the given values is invalid. - Üks või rohkem väärtustest on vigane. - - - This field was not expected. - See väli ei olnud oodatud. - - - This field is missing. - See väli on puudu. - - - This value is not a valid date. - Väärtus pole korrektne kuupäev. - - - This value is not a valid datetime. - Väärtus pole korrektne kuupäev ja kellaeg. - - - This value is not a valid email address. - Väärtus pole korrektne e-maili aadress. - - - The file could not be found. - Faili ei leita. - - - The file is not readable. - Fail ei ole loetav. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fail on liiga suur ({{ size }} {{ suffix }}). Suurim lubatud suurus on {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Faili sisutüüp on vigane ({{ type }}). Lubatud sisutüübid on {{ types }}. - - - This value should be {{ limit }} or less. - Väärtus peaks olema {{ limit }} või vähem. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Väärtus on liiga pikk. Pikkus peaks olema {{ limit }} tähemärki või vähem. - - - This value should be {{ limit }} or more. - Väärtus peaks olema {{ limit }} või rohkem. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Väärtus on liiga lühike. Pikkus peaks olema {{ limit }} tähemärki või rohkem. - - - This value should not be blank. - Väärtus ei tohiks olla tühi. - - - This value should not be null. - Väärtus ei tohiks olla 'null'. - - - This value should be null. - Väärtus peaks olema 'null'. - - - This value is not valid. - Väärtus on vigane. - - - This value is not a valid time. - Väärtus pole korrektne aeg. - - - This value is not a valid URL. - Väärtus pole korrektne URL. - - - The two values should be equal. - Väärtused peaksid olema võrdsed. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fail on liiga suur. Maksimaalne lubatud suurus on {{ limit }} {{ suffix }}. - - - The file is too large. - Fail on liiga suur. - - - The file could not be uploaded. - Faili ei saa üles laadida. - - - This value should be a valid number. - Väärtus peaks olema korrektne number. - - - This file is not a valid image. - Fail ei ole korrektne pilt. - - - This is not a valid IP address. - IP aadress pole korrektne. - - - This value is not a valid language. - Väärtus pole korrektne keel. - - - This value is not a valid locale. - Väärtus pole korrektne asukohakeel. - - - This value is not a valid country. - Väärtus pole olemasolev riik. - - - This value is already used. - Väärtust on juba kasutatud. - - - The size of the image could not be detected. - Pildi suurust polnud võimalik tuvastada. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Pilt on liiga lai ({{ width }}px). Suurim lubatud laius on {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Pilt on liiga kitsas ({{ width }}px). Vähim lubatud laius on {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Pilt on liiga pikk ({{ height }}px). Lubatud suurim pikkus on {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Pilt pole piisavalt pikk ({{ height }}px). Lubatud vähim pikkus on {{ min_height }}px. - - - This value should be the user's current password. - Väärtus peaks olema kasutaja kehtiv salasõna. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Väärtus peaks olema täpselt {{ limit }} tähemärk pikk.|Väärtus peaks olema täpselt {{ limit }} tähemärki pikk. - - - The file was only partially uploaded. - Fail ei laetud täielikult üles. - - - No file was uploaded. - Ühtegi faili ei laetud üles. - - - No temporary folder was configured in php.ini. - Ühtegi ajutist kausta polnud php.ini-s seadistatud. - - - Cannot write temporary file to disk. - Ajutist faili ei saa kettale kirjutada. - - - A PHP extension caused the upload to fail. - PHP laiendi tõttu ebaõnnestus faili üleslaadimine. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Kogumikus peaks olema vähemalt {{ limit }} element.|Kogumikus peaks olema vähemalt {{ limit }} elementi. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Kogumikus peaks olema ülimalt {{ limit }} element.|Kogumikus peaks olema ülimalt {{ limit }} elementi. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Kogumikus peaks olema täpselt {{ limit }} element.|Kogumikus peaks olema täpselt {{ limit }}|elementi. - - - Invalid card number. - Vigane kaardi number. - - - Unsupported card type or invalid card number. - Kaardi tüüpi ei toetata või kaardi number on vigane. - - - This is not a valid International Bank Account Number (IBAN). - Väärtus pole korrektne IBAN-number. - - - This value is not a valid ISBN-10. - Väärtus pole korrektne ISBN-10. - - - This value is not a valid ISBN-13. - Väärtus pole korrektne ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Väärtus pole korrektne ISBN-10 ega ISBN-13. - - - This value is not a valid ISSN. - Väärtus pole korrektne ISSN. - - - This value is not a valid currency. - Väärtus pole korrektne valuuta. - - - This value should be equal to {{ compared_value }}. - Väärtus peaks olema võrdne {{ compared_value }}-ga. - - - This value should be greater than {{ compared_value }}. - Väärtus peaks olema suurem kui {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Väärtus peaks olema suurem kui või võrduma {{ compared_value }}-ga. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Väärtus peaks olema identne väärtusega {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Väärtus peaks olema väiksem kui {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Väärtus peaks olema väiksem kui või võrduma {{ compared_value }}-ga. - - - This value should not be equal to {{ compared_value }}. - Väärtus ei tohiks võrduda {{ compared_value }}-ga. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Väärtus ei tohiks olla identne väärtusega {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Kuvasuhe on liiga suur ({{ ratio }}). Lubatud maksimaalne suhe on {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Kuvasuhe on liiga väike ({{ ratio }}). Oodatav minimaalne suhe on {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Pilt on ruudukujuline ({{ width }}x{{ height }}px). Ruudukujulised pildid pole lubatud. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Pilt on horisontaalselt orienteeritud ({{ width }}x{{ height }}px). Maastikulised pildid pole lubatud. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Pilt on vertikaalselt orienteeritud ({{ width }}x{{ height }}px). Portreepildid pole lubatud. - - - An empty file is not allowed. - Tühi fail pole lubatud. - - - The host could not be resolved. - Sellist domeeni ei õnnestunud leida. - - - This value does not match the expected {{ charset }} charset. - See väärtus ei ühti eeldatava tähemärgiga {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - See ei ole kehtiv ettevõtte identifitseerimiskood (BIC). - - - Error - Viga - - - This is not a valid UUID. - See pole kehtiv UUID. - - - This value should be a multiple of {{ compared_value }}. - See väärtus peaks olema väärtuse {{ compared_value }} kordne. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - See ettevõtte identifitseerimiskood (BIC) ei ole seotud IBAN-iga {{ iban }}. - - - This value should be valid JSON. - See väärtus peaks olema kehtiv JSON. - - - This collection should contain only unique elements. - See kogu peaks sisaldama ainult unikaalseid elemente. - - - This value should be positive. - See väärtus peaks olema positiivne. - - - This value should be either positive or zero. - See väärtus peaks olema kas positiivne või null. - - - This value should be negative. - See väärtus peaks olema negatiivne. - - - This value should be either negative or zero. - See väärtus peaks olema kas negatiivne või null. - - - This value is not a valid timezone. - See väärtus pole kehtiv ajavöönd. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - See parool on lekkinud andmerikkumise korral, seda ei tohi kasutada. Palun kasutage muud parooli. - - - This value should be between {{ min }} and {{ max }}. - See väärtus peaks olema vahemikus {{ min }} kuni {{ max }}. - - - This value is not a valid hostname. - See väärtus pole korrektne domeeninimi. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Selles kogus olevate elementide arv peab olema arvu {{ compared_value }} kordne. - - - This value should satisfy at least one of the following constraints: - See väärtus peab vastama vähemalt ühele järgmistest tingimustest: - - - Each element of this collection should satisfy its own set of constraints. - Kõik väärtused selles kogus peavad vastama oma tingimustele. - - - This value is not a valid International Securities Identification Number (ISIN). - See väärtus pole korrektne ISIN-kood. - - - This value should be a valid expression. - See väärtus pole korrektne avaldis. - - - This value is not a valid CSS color. - See väärtus pole korrektne CSS-i värv. - - - This value is not a valid CIDR notation. - See väärtus pole korrektne CIDR võrguaadress. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Võrgumaski väärtus peaks olema vahemikus {{ min }} kuni {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.eu.xlf b/vendor/symfony/validator/Resources/translations/validators.eu.xlf deleted file mode 100644 index ec58c60..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.eu.xlf +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - This value should be false. - Balio hau faltsua izan beharko litzateke. - - - This value should be true. - Balio hau egia izan beharko litzateke. - - - This value should be of type {{ type }}. - Balio hau {{ type }} motakoa izan beharko litzateke. - - - This value should be blank. - Balio hau hutsik egon beharko litzateke. - - - The value you selected is not a valid choice. - Hautatu duzun balioa ez da aukera egoki bat. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Gutxienez aukera {{ limit }} hautatu behar duzu.|Gutxienez {{ limit }} aukera hautatu behar dituzu. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Gehienez aukera {{ limit }} hautatu behar duzu.|Gehienez {{ limit }} aukera hautatu behar dituzu. - - - One or more of the given values is invalid. - Emandako balioetatik gutxienez bat ez da egokia. - - - This field was not expected. - Eremu hau ez zen espero. - - - This field is missing. - Eremu hau falta da. - - - This value is not a valid date. - Balio hau ez da data egoki bat. - - - This value is not a valid datetime. - Balio hau ez da data-ordu egoki bat. - - - This value is not a valid email address. - Balio hau ez da posta elektroniko egoki bat. - - - The file could not be found. - Ezin izan da fitxategia aurkitu. - - - The file is not readable. - Fitxategia ez da irakurgarria. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fitxategia handiegia da ({{ size }} {{ suffix }}). Baimendutako tamaina handiena {{ limit }} {{ suffix }} da. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Fitxategiaren mime mota ez da egokia ({{ type }}). Hauek dira baimendutako mime motak: {{ types }}. - - - This value should be {{ limit }} or less. - Balio hau gehienez {{ limit }} izan beharko litzateke. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Balio hau luzeegia da. Gehienez karaktere {{ limit }} eduki beharko luke.|Balio hau luzeegia da. Gehienez {{ limit }} karaktere eduki beharko lituzke. - - - This value should be {{ limit }} or more. - Balio hau gutxienez {{ limit }} izan beharko litzateke. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Balio hau motzegia da. Karaktere {{ limit }} gutxienez eduki beharko luke.|Balio hau motzegia da. Gutxienez {{ limit }} karaktere eduki beharko lituzke. - - - This value should not be blank. - Balio hau ez litzateke hutsik egon behar. - - - This value should not be null. - Balio hau ez litzateke nulua izan behar. - - - This value should be null. - Balio hau nulua izan beharko litzateke. - - - This value is not valid. - Balio hau ez da egokia. - - - This value is not a valid time. - Balio hau ez da ordu egoki bat. - - - This value is not a valid URL. - Balio hau ez da baliabideen kokatzaile uniforme (URL) egoki bat. - - - The two values should be equal. - Bi balioak berdinak izan beharko lirateke. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fitxategia handiegia da. Baimendutako tamaina handiena {{ limit }} {{ suffix }} da. - - - The file is too large. - Fitxategia handiegia da. - - - The file could not be uploaded. - Ezin izan da fitxategia igo. - - - This value should be a valid number. - Balio hau zenbaki egoki bat izan beharko litzateke. - - - This file is not a valid image. - Fitxategi hau ez da irudi egoki bat. - - - This is not a valid IP address. - Honako hau ez da IP helbide egoki bat. - - - This value is not a valid language. - Balio hau ez da hizkuntza egoki bat. - - - This value is not a valid locale. - Balio hau ez da kokapen egoki bat. - - - This value is not a valid country. - Balio hau ez da herrialde egoki bat. - - - This value is already used. - Balio hau jadanik erabilia izan da. - - - The size of the image could not be detected. - Ezin izan da irudiaren tamaina detektatu. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Irudiaren zabalera handiegia da ({{ width }}px). Onartutako gehienezko zabalera {{ max_width }}px dira. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Irudiaren zabalera txikiegia da ({{ width }}px). Onartutako gutxieneko zabalera {{ min_width }}px dira. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Irudiaren altuera handiegia da ({{ height }}px). Onartutako gehienezko altuera {{ max_height }}px dira. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Irudiaren altuera txikiegia da ({{ height }}px). Onartutako gutxieneko altuera {{ min_height }}px dira. - - - This value should be the user's current password. - Balio hau uneko erabiltzailearen pasahitza izan beharko litzateke. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Balio honek zehazki karaktere {{ limit }} izan beharko luke.|Balio honek zehazki {{ limit }} karaktere izan beharko lituzke. - - - The file was only partially uploaded. - Fitxategiaren zati bat bakarrik igo da. - - - No file was uploaded. - Ez da fitxategirik igo. - - - No temporary folder was configured in php.ini. - Ez da aldi baterako karpetarik konfiguratu php.ini fitxategian. - - - Cannot write temporary file to disk. - Ezin izan da aldi baterako fitxategia diskoan idatzi. - - - A PHP extension caused the upload to fail. - PHP luzapen batek igoeraren hutsa eragin du. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Bilduma honek gutxienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gutxienez {{ limit }} elementu eduki beharko lituzke. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Bilduma honek gehienez elementu {{ limit }} eduki beharko luke.|Bilduma honek gehienez {{ limit }} elementu eduki beharko lituzke. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Bilduma honek zehazki elementu {{ limit }} eduki beharko luke.|Bilduma honek zehazki {{ limit }} elementu eduki beharko lituzke. - - - Invalid card number. - Txartel zenbaki baliogabea. - - - Unsupported card type or invalid card number. - Txartel mota onartezina edo txartel zenbaki baliogabea. - - - This is not a valid International Bank Account Number (IBAN). - Hau ez da baliozko banku internazionaleko kontu zenbaki (IBAN) bat. - - - This value is not a valid ISBN-10. - Balio hau ez da onartutako ISBN-10 bat. - - - This value is not a valid ISBN-13. - Balio hau ez da onartutako ISBN-13 bat. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Balio hau ez da onartutako ISBN-10 edo ISBN-13 bat. - - - This value is not a valid ISSN. - Balio hau ez da onartutako ISSN bat. - - - This value is not a valid currency. - Balio hau ez da baliozko moneta bat. - - - This value should be equal to {{ compared_value }}. - Balio hau {{ compared_value }}-(r)en berbera izan beharko litzateke. - - - This value should be greater than {{ compared_value }}. - Balio hau {{ compared_value }} baino handiagoa izan beharko litzateke. - - - This value should be greater than or equal to {{ compared_value }}. - Balio hau {{ compared_value }}-(r)en berdina edota handiagoa izan beharko litzateke. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Balio hau {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan beharko litzateke. - - - This value should be less than {{ compared_value }}. - Balio hau {{ compared_value }} baino txikiagoa izan beharko litzateke. - - - This value should be less than or equal to {{ compared_value }}. - Balio hau {{ compared_value }}-(r)en berdina edota txikiagoa izan beharko litzateke. - - - This value should not be equal to {{ compared_value }}. - Balio hau ez litzateke {{ compared_value }}-(r)en berdina izan behar. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Balio hau ez litzateke {{ compared_value_type }} {{ compared_value }}-(r)en berbera izan behar. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Irudiaren proportzioa oso handia da ({{ ratio }}). Onartutako proportzio handienda {{ max_ratio }} da. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Irudiaren proportzioa oso txikia da ({{ ratio }}). Onartutako proportzio txikiena {{ min_ratio }} da. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Irudia karratua da ({{ width }}x{{ height }}px). Karratuak diren irudiak ez dira onartzen. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Irudia horizontalki bideratua dago ({{ width }}x{{ height }}px). Horizontalki bideratutako irudiak ez dira onartzen. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Irudia bertikalki bideratua dago ({{ width }}x{{ height }}px). Bertikalki bideratutako irudiak ez dira onartzen. - - - An empty file is not allowed. - Hutsik dagoen fitxategia ez da onartzen. - - - The host could not be resolved. - Host-a ezin da ebatzi. - - - This value does not match the expected {{ charset }} charset. - Balio honen karaktere kodea ez da esperotakoa {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Ez da balizko Banku Identifikazioko Kodea (BIC). - - - Error - Errore - - - This is not a valid UUID. - Balio hau ez da onartutako UUID bat. - - - This value should be a multiple of {{ compared_value }}. - Balio honek {{ compared_value }}-ren multiploa izan beharko luke. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Banku Identifikazioko Kode hau ez dago lotuta {{ IBAN }} IBAN-rekin. - - - This value should be valid JSON. - Balio honek baliozko JSON bat izan behar luke. - - - This collection should contain only unique elements. - Bilduma honek elementu bakarrak soilik izan beharko lituzke. - - - This value should be positive. - Balio honek positiboa izan beharko luke. - - - This value should be either positive or zero. - Balio honek positiboa edo zero izan behar luke. - - - This value should be negative. - Balio honek negatiboa izan behar luke. - - - This value should be either negative or zero. - Balio honek negatiboa edo zero izan behar luke. - - - This value is not a valid timezone. - Balio hori ez da baliozko ordu-eremua. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Pasahitz hori ezin da erabili, beste gune eta aplikazio batzuetako segurtasun-akatsei esker lortutako pasahitz publikoen zerrendan sartuta dagoelako. Mesedez, erabili beste pasahitz bat. - - - This value should be between {{ min }} and {{ max }}. - Balio honek {{ min }} eta {{ max }} artean egon behar luke. - - - This value is not a valid hostname. - Balio hori ez da ostalari-izen onargarria. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Bilduma honetako elementu-kopuruak {{ compared_value }}-ren multiploa izan behar luke. - - - This value should satisfy at least one of the following constraints: - Balio honek, gutxienez, murrizketa hauetako bat bete behar du: - - - Each element of this collection should satisfy its own set of constraints. - Bilduma honetako elementu bakoitzak bere murriztapen-multzoa bete behar du. - - - This value is not a valid International Securities Identification Number (ISIN). - Balio hori ez da baliozko baloreen nazioarteko identifikazio-zenbaki bat (ISIN). - - - This value should be a valid expression. - Balio hori baliozko adierazpena izan beharko litzateke. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.fa.xlf b/vendor/symfony/validator/Resources/translations/validators.fa.xlf deleted file mode 100644 index b72bc6e..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.fa.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - این مقدار باید نادرست (False) باشد. - - - This value should be true. - این مقدار باید درست (True) باشد. - - - This value should be of type {{ type }}. - این مقدار باید از نوع {{ type }} باشد. - - - This value should be blank. - این مقدار باید خالی باشد. - - - The value you selected is not a valid choice. - مقدار انتخاب شده یک گزینه معتبر نمی‌باشد. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - شما باید حداقل {{ limit }} گزینه انتخاب نمایید.|شما باید حداقل {{ limit }} گزینه انتخاب نمایید. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - شما باید حداکثر {{ limit }} گزینه انتخاب نمایید.|شما باید حداکثر {{ limit }} گزینه انتخاب نمایید. - - - One or more of the given values is invalid. - یک یا چند مقدار داده شده نامعتبر است. - - - The fields {{ fields }} were not expected. - فیلدهای {{ fields }} مورد انتظار نبود. - - - The fields {{ fields }} are missing. - فیلدهای {{ fields }} مفقود شده اند. - - - This value is not a valid date. - این مقدار یک تاریخ معتبر نمی‌باشد. - - - This value is not a valid datetime. - این مقدار یک تاریخ و زمان معتبر نمی‌باشد. - - - This value is not a valid email address. - این یک آدرس رایانامه (ایمیل) معتبر نمی‌باشد. - - - The file could not be found. - فایل یافت نشد. - - - The file is not readable. - فایل قابل خواندن نیست. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - فایل بیش از اندازه بزرگ است({{ size }} {{ suffix }}). بیشینه (حداکثر) اندازه مجاز برابر با {{ limit }} {{ suffix }} می‌باشد. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - نوع mime این فایل نامعتبر است({{ type }}). انواع mime مجاز {{ types }} هستند. - - - This value should be {{ limit }} or less. - این مقدار باید کوچکتر و یا مساوی {{ limit }} باشد. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - این مقدار بسیار طولانی است. باید دارای {{limit}} کاراکتر یا کمتر باشد. | این مقدار بسیار طولانی است. باید دارای {{limit}} کاراکتر یا کمتر باشد. - - - This value should be {{ limit }} or more. - این مقدار باید بزرگتر و یا مساوی {{ limit }} باشد. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - این مقدار بیش از اندازه کوتاه است. باید {{ limit }} کاراکتر یا بیشتر داشته باشد.|این مقدار بیش از اندازه کوتاه است. باید {{ limit }} کاراکتر یا بیشتر داشته باشد. - - - This value should not be blank. - این مقدار نباید خالی باشد. - - - This value should not be null. - این مقدار نباید خالی باشد. - - - This value should be null. - این مقدار باید خالی باشد. - - - This value is not valid. - این مقدار معتبر نمی‌باشد. - - - This value is not a valid time. - این مقدار یک زمان معتبر نمی‌باشد. - - - This value is not a valid URL. - این مقدار شامل یک URL معتبر نمی‌باشد. - - - The two values should be equal. - دو مقدار باید با یکدیگر برابر باشند. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - فایل بیش از اندازه بزرگ است. بیشینه (حداکثر) اندازه مجاز {{ limit }} {{ suffix }} است. - - - The file is too large. - فایل بیش از اندازه بزرگ است. - - - The file could not be uploaded. - بارگذاری فایل با شکست مواجه گردید. - - - This value should be a valid number. - این مقدار باید یک عدد معتبر باشد. - - - This file is not a valid image. - این فایل یک تصویر معتبر نمی‌باشد. - - - This is not a valid IP address. - این آدرس IP معتبر نیست. - - - This value is not a valid language. - این مقدار یک زبان معتبر نمی‌باشد. - - - This value is not a valid locale. - این مقدار یک محل (locale) معتبر نمی‌باشد. - - - This value is not a valid country. - این مقدار یک کشور معتبر نمی‌باشد. - - - This value is already used. - این مقدار قبلاً استفاده شده است. - - - The size of the image could not be detected. - اندازه تصویر قابل شناسایی نمی‌باشد. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - عرض تصویر بسیار بزرگ است({{ width }}px). بیشینه (حداکثر) عرض مجاز {{ max_width }}px می‌باشد. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - عرض تصویر بسیار کوچک است({{ width }}px). کمینه (حداقل) عرض مورد انتظار {{ min_width }}px می‌باشد. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - ارتفاع تصویر بسیار بزرگ است({{ height }}px). بیشینه (حداکثر) ارتفاع مجاز {{ max_height }}px می‌باشد. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - ارتفاع تصویر بسیار کوچک است({{ height }}px). کمینه (حداقل) ارتفاع مورد انتظار {{ min_height }}px می‌باشد. - - - This value should be the user's current password. - این مقدار باید رمزعبور فعلی کاربر باشد. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - این مقدار باید دقیقا {{ limit }} کاراکتر داشته باشد.| این مقدار باید دقیقا {{ limit }} کاراکتر داشته باشد. - - - The file was only partially uploaded. - فایل به صورت جزئی بارگذاری گردیده است. - - - No file was uploaded. - هیچ فایلی بارگذاری نشد. - - - No temporary folder was configured in php.ini. - پوشه موقتی در php.ini پیکربندی نگردیده است. - - - Cannot write temporary file to disk. - فایل موقتی را نمی‌توان در دیسک نوشت. - - - A PHP extension caused the upload to fail. - یک افزونه PHP باعث شد بارگذاری ناموفق باشد. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - این مجموعه باید حاوی {{ limit }} عنصر یا بیشتر باشد.|این مجموعه باید حاوی {{ limit }} عنصر یا بیشتر باشد. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - این مجموعه باید حاوی {{ limit }} عنصر یا کمتر باشد.|این مجموعه باید حاوی {{ limit }} عنصر یا کمتر باشد. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - این مجموعه باید دقیقا حاوی {{ limit }} عنصر باشد.|این مجموعه باید دقیقا حاوی {{ limit }} عنصر باشد. - - - Invalid card number. - شماره کارت نامعتبر است. - - - Unsupported card type or invalid card number. - نوع کارت پشتیبانی نمی‌شود و یا شماره کارت نامعتبر می‌باشد. - - - This is not a valid International Bank Account Number (IBAN). - این یک شماره حساب بانک بین المللی معتبر نمی‌باشد(IBAN). - - - This value is not a valid ISBN-10. - این مقدار یک ISBN-10 معتبر نمی‌باشد. - - - This value is not a valid ISBN-13. - این مقدار یک ISBN-13 معتبر نمی‌باشد. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - این مقدار یک ISBN-10 معتبر و یا ISBN-13 معتبر نمی‌باشد. - - - This value is not a valid ISSN. - این مقدار یک ISSN معتبر نمی‌باشد. - - - This value is not a valid currency. - این مقدار یک واحد پول معتبر نمی‌باشد. - - - This value should be equal to {{ compared_value }}. - این مقدار باید برابر با {{ compared_value }} باشد. - - - This value should be greater than {{ compared_value }}. - این مقدار باید از {{ compared_value }} بیشتر باشد. - - - This value should be greater than or equal to {{ compared_value }}. - این مقدار باید بزرگتر و یا مساوی با {{ compared_value }} باشد. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - این مقدار باید برابر {{ compared_value_type }} {{ compared_value }} باشد. - - - This value should be less than {{ compared_value }}. - این مقدار باید کمتر از {{ compared_value }} باشد. - - - This value should be less than or equal to {{ compared_value }}. - این مقدار باید کمتر و یا مساوی با {{ compared_value }} باشد. - - - This value should not be equal to {{ compared_value }}. - این مقدار نباید با {{ compared_value }} برابر باشد. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - این مقدار نباید برابر {{ compared_value_type }} {{ compared_value }} باشد. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - ابعاد ({{ ratio }}) عکس بیش از حد بزرگ است. بیشینه (حداکثر) ابعاد مجاز {{ max_ratio }} می‌باشد. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - ابعاد ({{ ratio }}) عکس بیش از حد کوچک است. کمینه (حداقل) ابعاد مورد انتظار {{ min_ratio }} می‌باشد. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - این تصویر یک مربع ({{ width }}x{{ height }}px) می‌باشد. تصاویر مربع شکل مجاز نمی‌باشند. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - این تصویر افقی ({{ width }}x{{ height }}px) می‌باشد. تصاویر افقی مجاز نمی‌باشند. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - این تصویر عمودی ({{ width }}x{{ height }}px) می‌باشد. تصاویر عمودی مجاز نمی‌باشند. - - - An empty file is not allowed. - فایل خالی مجاز نمی‌باشد. - - - The host could not be resolved. - میزبان (Host) شناسایی نشد. - - - This value does not match the expected {{ charset }} charset. - این مقدار مطابق charset مورد انتظار {{ charset }} نمی باشد. - - - This is not a valid Business Identifier Code (BIC). - این مقدار یک کد شناسایی کسب‌و‌کار معتبر (BIC) نیست. - - - Error - خطا - - - This is not a valid UUID. - این مقدار یک UUID معتبر نمی‌باشد. - - - This value should be a multiple of {{ compared_value }}. - این مقدار باید چند برابر {{ compared_value }} باشد. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - این کد شناسایی کسب‌و‌کار (BIC) با شماره حساب بانکی بین‌المللی (IBAN) {{ iban }} مرتبط نیست. - - - This value should be valid JSON. - این مقدار باید یک JSON معتبر باشد. - - - This collection should contain only unique elements. - این مجموعه باید فقط حاوی عناصر یکتا باشد. - - - This value should be positive. - این مقدار باید مثبت باشد. - - - This value should be either positive or zero. - این مقدار باید مثبت یا صفر باشد. - - - This value should be negative. - این مقدار باید منفی باشد. - - - This value should be either negative or zero. - این مقدار باید منفی یا صفر باشد. - - - This value is not a valid timezone. - این مقدار یک منطقه‌زمانی (timezone) معتبر نیست. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - این رمزعبور در یک رخنه‌ی اطلاعاتی نشت کرده است. لطفاً از یک رمزعبور دیگر استفاده کنید. - - - This value should be between {{ min }} and {{ max }}. - این مقدار باید بین {{ min }} و {{ max }} باشد - - - This value is not a valid hostname. - این مقدار یک hostname معتبر نیست. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - تعداد عناصر این مجموعه باید ضریبی از {{ compared_value }} باشد. - - - This value should satisfy at least one of the following constraints: - این مقدار باید حداقل یکی از محدودیت‌های زیر را ارضا کند: - - - Each element of this collection should satisfy its own set of constraints. - هر یک از عناصر این مجموعه باید دسته محدودیت‌های خودش را ارضا کند. - - - This value is not a valid International Securities Identification Number (ISIN). - این مقدار یک شماره شناسایی بین‌المللی اوراق بهادار (ISIN) معتبر نیست. - - - This value should be a valid expression. - این مقدار باید یک عبارت معتبر باشد. - - - This value is not a valid CSS color. - این مقدار یک رنگ معتبر در CSS نیست. - - - This value is not a valid CIDR notation. - این مقدار یک نماد معتبر در CIDR نیست. - - - The value of the netmask should be between {{ min }} and {{ max }}. - مقدار ماسک شبکه (NetMask) باید بین {{ min }} و {{ max }} باشد. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.fi.xlf b/vendor/symfony/validator/Resources/translations/validators.fi.xlf deleted file mode 100644 index 9a6bfe4..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.fi.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Arvon tulee olla epätosi. - - - This value should be true. - Arvon tulee olla tosi. - - - This value should be of type {{ type }}. - Arvon tulee olla tyyppiä {{ type }}. - - - This value should be blank. - Arvon tulee olla tyhjä. - - - The value you selected is not a valid choice. - Arvon tulee olla yksi annetuista vaihtoehdoista. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Sinun tulee valita vähintään {{ limit }} vaihtoehtoa. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Sinun tulee valitan enintään {{ limit }} vaihtoehtoa. - - - One or more of the given values is invalid. - Yksi tai useampi annetuista arvoista on virheellinen. - - - This field was not expected. - Tässä kentässä ei odotettu. - - - This field is missing. - Tämä kenttä puuttuu. - - - This value is not a valid date. - Annettu arvo ei ole kelvollinen päivämäärä. - - - This value is not a valid datetime. - Annettu arvo ei ole kelvollinen päivämäärä ja kellonaika. - - - This value is not a valid email address. - Annettu arvo ei ole kelvollinen sähköpostiosoite. - - - The file could not be found. - Tiedostoa ei löydy. - - - The file is not readable. - Tiedostoa ei voida lukea. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Tiedostonkoko ({{ size }} {{ suffix }}) on liian iso. Suurin sallittu tiedostonkoko on {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Tiedostotyyppi ({{ type }}) on virheellinen. Sallittuja tiedostotyyppejä ovat {{ types }}. - - - This value should be {{ limit }} or less. - Arvon tulee olla {{ limit }} tai vähemmän. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Liian pitkä syöte. Syöte saa olla enintään {{ limit }} merkkiä. - - - This value should be {{ limit }} or more. - Arvon tulee olla {{ limit }} tai enemmän. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Liian lyhyt syöte. Syötteen tulee olla vähintään {{ limit }} merkkiä. - - - This value should not be blank. - Kenttä ei voi olla tyhjä. - - - This value should not be null. - Syöte ei voi olla null. - - - This value should be null. - Syötteen tulee olla null. - - - This value is not valid. - Virheellinen arvo. - - - This value is not a valid time. - Annettu arvo ei ole kelvollinen kellonaika. - - - This value is not a valid URL. - Annettu arvo ei ole kelvollinen URL-osoite. - - - The two values should be equal. - Kahden annetun arvon tulee olla samat. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Annettu tiedosto on liian iso. Suurin sallittu tiedostokoko on {{ limit }} {{ suffix }}. - - - The file is too large. - Tiedosto on liian iso. - - - The file could not be uploaded. - Tiedoston siirto epäonnistui. - - - This value should be a valid number. - Tämän arvon tulee olla numero. - - - This file is not a valid image. - Tämä tiedosto ei ole kelvollinen kuva. - - - This is not a valid IP address. - Tämä ei ole kelvollinen IP-osoite. - - - This value is not a valid language. - Tämä arvo ei ole kelvollinen kieli. - - - This value is not a valid locale. - Tämä arvo ei ole kelvollinen kieli- ja alueasetus (locale). - - - This value is not a valid country. - Tämä arvo ei ole kelvollinen maa. - - - This value is already used. - Tämä arvo on jo käytetty. - - - The size of the image could not be detected. - Kuvan kokoa ei voitu tunnistaa. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Kuva on liian leveä ({{ width }}px). Sallittu maksimileveys on {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Kuva on liian kapea ({{ width }}px). Leveyden tulisi olla vähintään {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Kuva on liian korkea ({{ width }}px). Sallittu maksimikorkeus on {{ max_width }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Kuva on liian matala ({{ height }}px). Korkeuden tulisi olla vähintään {{ min_height }}px. - - - This value should be the user's current password. - Tämän arvon tulisi olla käyttäjän tämänhetkinen salasana. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Tämän arvon tulisi olla tasan yhden merkin pituinen.|Tämän arvon tulisi olla tasan {{ limit }} merkkiä pitkä. - - - The file was only partially uploaded. - Tiedosto ladattiin vain osittain. - - - No file was uploaded. - Tiedostoa ei ladattu. - - - No temporary folder was configured in php.ini. - Väliaikaishakemistoa ei ole asetettu php.ini -tiedostoon. - - - Cannot write temporary file to disk. - Väliaikaistiedostoa ei voitu kirjoittaa levylle. - - - A PHP extension caused the upload to fail. - PHP-laajennoksen vuoksi tiedoston lataus epäonnistui. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Tässä ryhmässä tulisi olla yksi tai useampi elementti.|Tässä ryhmässä tulisi olla vähintään {{ limit }} elementtiä. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Tässä ryhmässä tulisi olla enintään yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Tässä ryhmässä tulisi olla tasan yksi elementti.|Tässä ryhmässä tulisi olla enintään {{ limit }} elementtiä. - - - Invalid card number. - Virheellinen korttinumero. - - - Unsupported card type or invalid card number. - Tätä korttityyppiä ei tueta tai korttinumero on virheellinen. - - - This is not a valid International Bank Account Number (IBAN). - Arvo ei ole kelvollinen kansainvälinen pankkitilinumero (IBAN). - - - This value is not a valid ISBN-10. - Arvo ei ole kelvollinen ISBN-10. - - - This value is not a valid ISBN-13. - Arvo ei ole kelvollinen ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Arvo ei ole kelvollinen ISBN-10 tai kelvollinen ISBN-13. - - - This value is not a valid ISSN. - Arvo ei ole kelvollinen ISSN. - - - This value is not a valid currency. - Arvo ei ole kelvollinen valuutta. - - - This value should be equal to {{ compared_value }}. - Arvo ei ole sama kuin {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Arvon tulee olla suurempi kuin {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Arvon tulee olla suurempi tai yhtä suuri kuin {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Tämä arvo tulee olla sama kuin {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Arvon tulee olla pienempi kuin {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Arvon tulee olla pienempi tai yhtä suuri {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Arvon ei tule olla sama kuin {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Tämä arvo ei tule olla sama kuin {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Kuvasuhde on liian suuri ({{ ratio }}). Suurin sallittu suhde on {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Kuvasuhde on liian pieni ({{ ratio }}). Pienin sallittu arvo on {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Kuva on neliä ({{ width }}x{{ height }}px). Neliöt kuvat eivät ole sallittuja. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Kuva on vaakasuuntainen ({{ width }}x{{ height }}px). Vaakasuuntaiset kuvat eivät ole sallittuja. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Kuva on pystysuuntainen ({{ width }}x{{ height }}px). Pystysuuntaiset kuvat eivät ole sallittuja. - - - An empty file is not allowed. - Tyhjä tiedosto ei ole sallittu. - - - The host could not be resolved. - Palvelimeen ei saatu yhteyttä. - - - This value does not match the expected {{ charset }} charset. - Arvo ei vastaa odotettua merkistöä {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Arvo ei ole kelvollinen yritystunnus (BIC). - - - Error - Virhe - - - This is not a valid UUID. - Arvo ei ole kelvollinen UUID. - - - This value should be a multiple of {{ compared_value }}. - Tämän arvon tulisi olla kerrannainen {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Tämä yritystunnus (BIC) ei ole liitetty IBAN {{ iban }}. - - - This value should be valid JSON. - Arvon tulee olla kelvollinen JSON. - - - This collection should contain only unique elements. - Tämän ryhmän tulisi sisältää vain yksilöllisiä arvoja. - - - This value should be positive. - Arvon tulisi olla positiivinen. - - - This value should be either positive or zero. - Arvon tulisi olla joko positiivinen tai nolla. - - - This value should be negative. - Arvon tulisi olla negatiivinen. - - - This value should be either negative or zero. - Arvon tulisi olla joko negatiivinen tai nolla. - - - This value is not a valid timezone. - Arvo ei ole kelvollinen aikavyöhyke. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Tämä salasana on vuotanut tietomurrossa, sitä ei saa käyttää. Käytä toista salasanaa. - - - This value should be between {{ min }} and {{ max }}. - Arvon tulisi olla välillä {{ min }} - {{ max }}. - - - This value is not a valid hostname. - Arvo ei ole kelvollinen laitenimi (hostname). - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Ryhmässä olevien elementtien määrän pitää olla monikerta luvulle {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Tämän arvon tulee läpäistä vähintään yksi seuraavista tarkistuksista: - - - Each element of this collection should satisfy its own set of constraints. - Ryhmän jokaisen elementin tulee läpäistä omat tarkistuksensa. - - - This value is not a valid International Securities Identification Number (ISIN). - Tämä arvo ei ole kelvollinen ISIN-koodi (International Securities Identification Number). - - - This value should be a valid expression. - Tämän arvon on oltava kelvollinen lauseke. - - - This value is not a valid CSS color. - Tämä arvo ei ole kelvollinen CSS-värimääritys. - - - This value is not a valid CIDR notation. - Tämä arvo ei ole kelvollinen CIDR-merkintä. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Verkkomaskille annetun arvon tulisi olla {{ min }} ja {{ max }} välillä. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.fr.xlf b/vendor/symfony/validator/Resources/translations/validators.fr.xlf deleted file mode 100644 index 9212777..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.fr.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Cette valeur doit être fausse. - - - This value should be true. - Cette valeur doit être vraie. - - - This value should be of type {{ type }}. - Cette valeur doit être de type {{ type }}. - - - This value should be blank. - Cette valeur doit être vide. - - - The value you selected is not a valid choice. - Cette valeur doit être l'un des choix proposés. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Vous devez sélectionner au moins {{ limit }} choix.|Vous devez sélectionner au moins {{ limit }} choix. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Vous devez sélectionner au maximum {{ limit }} choix.|Vous devez sélectionner au maximum {{ limit }} choix. - - - One or more of the given values is invalid. - Une ou plusieurs des valeurs soumises sont invalides. - - - This field was not expected. - Ce champ n'a pas été prévu. - - - This field is missing. - Ce champ est manquant. - - - This value is not a valid date. - Cette valeur n'est pas une date valide. - - - This value is not a valid datetime. - Cette valeur n'est pas une date valide. - - - This value is not a valid email address. - Cette valeur n'est pas une adresse email valide. - - - The file could not be found. - Le fichier n'a pas été trouvé. - - - The file is not readable. - Le fichier n'est pas lisible. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Le fichier est trop volumineux ({{ size }} {{ suffix }}). Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Le type du fichier est invalide ({{ type }}). Les types autorisés sont {{ types }}. - - - This value should be {{ limit }} or less. - Cette valeur doit être inférieure ou égale à {{ limit }}. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractère.|Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractères. - - - This value should be {{ limit }} or more. - Cette valeur doit être supérieure ou égale à {{ limit }}. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractère.|Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractères. - - - This value should not be blank. - Cette valeur ne doit pas être vide. - - - This value should not be null. - Cette valeur ne doit pas être nulle. - - - This value should be null. - Cette valeur doit être nulle. - - - This value is not valid. - Cette valeur n'est pas valide. - - - This value is not a valid time. - Cette valeur n'est pas une heure valide. - - - This value is not a valid URL. - Cette valeur n'est pas une URL valide. - - - The two values should be equal. - Les deux valeurs doivent être identiques. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}. - - - The file is too large. - Le fichier est trop volumineux. - - - The file could not be uploaded. - Le téléchargement de ce fichier est impossible. - - - This value should be a valid number. - Cette valeur doit être un nombre. - - - This file is not a valid image. - Ce fichier n'est pas une image valide. - - - This is not a valid IP address. - Cette adresse IP n'est pas valide. - - - This value is not a valid language. - Cette langue n'est pas valide. - - - This value is not a valid locale. - Ce paramètre régional n'est pas valide. - - - This value is not a valid country. - Ce pays n'est pas valide. - - - This value is already used. - Cette valeur est déjà utilisée. - - - The size of the image could not be detected. - La taille de l'image n'a pas pu être détectée. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - La largeur de l'image est trop grande ({{ width }}px). La largeur maximale autorisée est de {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - La largeur de l'image est trop petite ({{ width }}px). La largeur minimale attendue est de {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - La hauteur de l'image est trop grande ({{ height }}px). La hauteur maximale autorisée est de {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - La hauteur de l'image est trop petite ({{ height }}px). La hauteur minimale attendue est de {{ min_height }}px. - - - This value should be the user's current password. - Cette valeur doit être le mot de passe actuel de l'utilisateur. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Cette chaîne doit avoir exactement {{ limit }} caractère.|Cette chaîne doit avoir exactement {{ limit }} caractères. - - - The file was only partially uploaded. - Le fichier a été partiellement transféré. - - - No file was uploaded. - Aucun fichier n'a été transféré. - - - No temporary folder was configured in php.ini. - Aucun répertoire temporaire n'a été configuré dans le php.ini, ou le répertoire configuré n'existe pas. - - - Cannot write temporary file to disk. - Impossible d'écrire le fichier temporaire sur le disque. - - - A PHP extension caused the upload to fail. - Une extension PHP a empêché le transfert du fichier. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Cette collection doit contenir {{ limit }} élément ou plus.|Cette collection doit contenir {{ limit }} éléments ou plus. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Cette collection doit contenir {{ limit }} élément ou moins.|Cette collection doit contenir {{ limit }} éléments ou moins. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Cette collection doit contenir exactement {{ limit }} élément.|Cette collection doit contenir exactement {{ limit }} éléments. - - - Invalid card number. - Numéro de carte invalide. - - - Unsupported card type or invalid card number. - Type de carte non supporté ou numéro invalide. - - - This is not a valid International Bank Account Number (IBAN). - Le numéro IBAN (International Bank Account Number) saisi n'est pas valide. - - - This value is not a valid ISBN-10. - Cette valeur n'est pas un code ISBN-10 valide. - - - This value is not a valid ISBN-13. - Cette valeur n'est pas un code ISBN-13 valide. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Cette valeur n'est ni un code ISBN-10, ni un code ISBN-13 valide. - - - This value is not a valid ISSN. - Cette valeur n'est pas un code ISSN valide. - - - This value is not a valid currency. - Cette valeur n'est pas une devise valide. - - - This value should be equal to {{ compared_value }}. - Cette valeur doit être égale à {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Cette valeur doit être supérieure à {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Cette valeur doit être supérieure ou égale à {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Cette valeur doit être inférieure à {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Cette valeur doit être inférieure ou égale à {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Cette valeur ne doit pas être égale à {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Le rapport largeur/hauteur de l'image est trop grand ({{ ratio }}). Le rapport maximal autorisé est {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Le rapport largeur/hauteur de l'image est trop petit ({{ ratio }}). Le rapport minimal attendu est {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - L'image est carrée ({{ width }}x{{ height }}px). Les images carrées ne sont pas autorisées. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - L'image est au format paysage ({{ width }}x{{ height }}px). Les images au format paysage ne sont pas autorisées. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - L'image est au format portrait ({{ width }}x{{ height }}px). Les images au format portrait ne sont pas autorisées. - - - An empty file is not allowed. - Un fichier vide n'est pas autorisé. - - - The host could not be resolved. - Le nom de domaine n'a pas pu être résolu. - - - This value does not match the expected {{ charset }} charset. - Cette valeur ne correspond pas au jeu de caractères {{ charset }} attendu. - - - This is not a valid Business Identifier Code (BIC). - Ce n'est pas un code universel d'identification des banques (BIC) valide. - - - Error - Erreur - - - This is not a valid UUID. - Ceci n'est pas un UUID valide. - - - This value should be a multiple of {{ compared_value }}. - Cette valeur doit être un multiple de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ce code d'identification d'entreprise (BIC) n'est pas associé à l'IBAN {{ iban }}. - - - This value should be valid JSON. - Cette valeur doit être un JSON valide. - - - This collection should contain only unique elements. - Cette collection ne doit pas comporter de doublons. - - - This value should be positive. - Cette valeur doit être strictement positive. - - - This value should be either positive or zero. - Cette valeur doit être supérieure ou égale à zéro. - - - This value should be negative. - Cette valeur doit être strictement négative. - - - This value should be either negative or zero. - Cette valeur doit être inférieure ou égale à zéro. - - - This value is not a valid timezone. - Cette valeur n'est pas un fuseau horaire valide. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ce mot de passe a été divulgué lors d'une fuite de données, il ne doit plus être utilisé. Veuillez utiliser un autre mot de passe. - - - This value should be between {{ min }} and {{ max }}. - Cette valeur doit être comprise entre {{ min }} et {{ max }}. - - - This value is not a valid hostname. - Cette valeur n'est pas un nom d'hôte valide. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Le nombre d'éléments de cette collection doit être un multiple de {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Cette valeur doit satisfaire à au moins une des contraintes suivantes : - - - Each element of this collection should satisfy its own set of constraints. - Chaque élément de cette collection doit satisfaire à son propre jeu de contraintes. - - - This value is not a valid International Securities Identification Number (ISIN). - Cette valeur n'est pas un code international de sécurité valide (ISIN). - - - This value should be a valid expression. - Cette valeur doit être une expression valide. - - - This value is not a valid CSS color. - Cette valeur n'est pas une couleur CSS valide. - - - This value is not a valid CIDR notation. - Cette valeur n'est pas une notation CIDR valide. - - - The value of the netmask should be between {{ min }} and {{ max }}. - La valeur du masque de réseau doit être comprise entre {{ min }} et {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.gl.xlf b/vendor/symfony/validator/Resources/translations/validators.gl.xlf deleted file mode 100644 index f8c5c04..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.gl.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Este valor debería ser falso. - - - This value should be true. - Este valor debería ser verdadeiro. - - - This value should be of type {{ type }}. - Este valor debería ser de tipo {{ type }}. - - - This value should be blank. - Este valor debería estar baleiro. - - - The value you selected is not a valid choice. - O valor seleccionado non é unha opción válida. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Debe seleccionar polo menos {{ limit }} opción.|Debe seleccionar polo menos {{ limit }} opcions. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Debe seleccionar como máximo {{ limit }} opción.|Debe seleccionar como máximo {{ limit }} opcions. - - - One or more of the given values is invalid. - Un ou máis dos valores indicados non son válidos. - - - This field was not expected. - Este campo non era esperado. - - - This field is missing. - Este campo falta. - - - This value is not a valid date. - Este valor non é unha data válida. - - - This value is not a valid datetime. - Este valor non é unha data e hora válidas. - - - This value is not a valid email address. - Este valor non é unha dirección de correo electrónico válida. - - - The file could not be found. - Non se puido atopar o arquivo. - - - The file is not readable. - O arquivo non se pode ler. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é demasiado grande ({{ size }} {{ suffix }}). O tamaño máximo permitido é {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - O tipo mime do arquivo non é válido ({{ type }}). Os tipos mime válidos son {{ types }}. - - - This value should be {{ limit }} or less. - Este valor debería ser {{ limit }} ou menos. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Este valor é demasiado longo. Debería ter {{ limit }} carácter ou menos.|Este valor é demasiado longo. Debería ter {{ limit }} caracteres ou menos. - - - This value should be {{ limit }} or more. - Este valor debería ser {{ limit }} ou máis. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Este valor é demasiado curto. Debería ter {{ limit }} carácter ou máis.|Este valor é demasiado corto. Debería ter {{ limit }} caracteres ou máis. - - - This value should not be blank. - Este valor non debería estar baleiro. - - - This value should not be null. - Este valor non debería ser null. - - - This value should be null. - Este valor debería ser null. - - - This value is not valid. - Este valor non é válido. - - - This value is not a valid time. - Este valor non é unha hora válida. - - - This value is not a valid URL. - Este valor non é unha URL válida. - - - The two values should be equal. - Os dous valores deberían ser iguais. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é demasiado grande. O tamaño máximo permitido é {{ limit }} {{ suffix }}. - - - The file is too large. - O arquivo é demasiado grande. - - - The file could not be uploaded. - No se puido cargar o arquivo. - - - This value should be a valid number. - Este valor debería ser un número válido. - - - This file is not a valid image. - O arquivo non é unha imaxe válida. - - - This is not a valid IP address. - Isto non é unha dirección IP válida. - - - This value is not a valid language. - Este valor non é un idioma válido. - - - This value is not a valid locale. - Este valor non é unha localización válida. - - - This value is not a valid country. - Este valor non é un país válido. - - - This value is already used. - Este valor xa está a ser empregado. - - - The size of the image could not be detected. - Non se puido determinar o tamaño da imaxe. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - A largura da imaxe é demasiado grande ({{ width }}px). A largura máxima permitida son {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - A largura da imaxe é demasiado pequena ({{ width }}px). A largura mínima requerida son {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - A altura da imaxe é demasiado grande ({{ height }}px). A altura máxima permitida son {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - A altura da imaxe é demasiado pequena ({{ height }}px). A altura mínima requerida son {{ min_height }}px. - - - This value should be the user's current password. - Este valor debería ser a contrasinal actual do usuario. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Este valor debería ter exactamente {{ limit }} carácter.|Este valor debería ter exactamente {{ limit }} caracteres. - - - The file was only partially uploaded. - O arquivo foi só subido parcialmente. - - - No file was uploaded. - Non se subiu ningún arquivo. - - - No temporary folder was configured in php.ini. - Ningunha carpeta temporal foi configurada en php.ini, ou a carpeta non existe. - - - Cannot write temporary file to disk. - Non se puido escribir o arquivo temporal no disco. - - - A PHP extension caused the upload to fail. - Unha extensión de PHP provocou que a subida fallara. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Esta colección debe conter {{ limit }} elemento ou máis.|Esta colección debe conter {{ limit }} elementos ou máis. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Esta colección debe conter {{ limit }} elemento ou menos.|Esta colección debe conter {{ limit }} elementos ou menos. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Esta colección debe conter exactamente {{ limit }} elemento.|Esta colección debe conter exactamente {{ limit }} elementos. - - - Invalid card number. - Número de tarxeta non válido. - - - Unsupported card type or invalid card number. - Tipo de tarxeta non soportado ou número de tarxeta non válido. - - - This is not a valid International Bank Account Number (IBAN). - Este valor non é un International Bank Account Number (IBAN) válido. - - - This value is not a valid ISBN-10. - Este valor non é un ISBN-10 válido. - - - This value is not a valid ISBN-13. - Este valor non é un ISBN-13 válido. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Este valor non é nin un ISBN-10 válido nin un ISBN-13 válido. - - - This value is not a valid ISSN. - Este valor non é un ISSN válido. - - - This value is not a valid currency. - Este valor non é unha moeda válida. - - - This value should be equal to {{ compared_value }}. - Este valor debería ser igual a {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Este valor debería ser maior que {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Este valor debería ser maior ou igual que {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor debería ser identico a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Este valor debería ser menor que {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Este valor debería ser menor ou igual que {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Este valor non debería ser igual a {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor non debería ser identico a {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - A proporción da imaxe é demasiado grande ({{ ratio }}). A proporción máxima permitida é {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - A proporción da é demasiado pequena ({{ ratio }}). A proporción mínima permitida é {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - A imaxe é cadrada ({{ width }}x{{ height }}px). As imáxenes cadradas non están permitidas. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - A imaxe está orientada horizontalmente ({{ width }}x{{ height }}px). As imáxenes orientadas horizontalmente non están permitidas. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - A imaxe está orientada verticalmente ({{ width }}x{{ height }}px). As imáxenes orientadas verticalmente non están permitidas. - - - An empty file is not allowed. - Non está permitido un arquivo baleiro. - - - The host could not be resolved. - Non se puido resolver o host. - - - This value does not match the expected {{ charset }} charset. - A codificación de caracteres para este valor debería ser {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Non é un Código de Identificación Bancaria (BIC) válido. - - - Error - Erro - - - This is not a valid UUID. - Isto non é un UUID válido. - - - This value should be a multiple of {{ compared_value }}. - Este valor debería ser multiplo de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Este Código de identificación bancaria (BIC) non está asociado co IBAN {{ iban }}. - - - This value should be valid JSON. - Este valor debería ser un JSON válido. - - - This collection should contain only unique elements. - Esta colección só debería ter elementos únicos. - - - This value should be positive. - Este valor debería ser positivo. - - - This value should be either positive or zero. - Este valor debe ser positivo ou igual a cero. - - - This value should be negative. - Este valor debe ser negativo. - - - This value should be either negative or zero. - Este valor debe ser negativo ou igual a cero. - - - This value is not a valid timezone. - Este valor non é unha zona horaria válida. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Este contrasinal non se pode usar porque está incluído nunha lista de contrasinais públicos obtidos grazas a fallos de seguridade noutros sitios e aplicacións. Utiliza outro contrasinal. - - - This value should be between {{ min }} and {{ max }}. - Este valor debe estar comprendido entre {{ min }} e {{ max }}. - - - This value is not a valid hostname. - Este valor non é un nome de host válido. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - O número de elementos desta colección debería ser múltiplo de {{compare_value}}. - - - This value should satisfy at least one of the following constraints: - Este valor debe cumprir polo menos unha das seguintes restricións: - - - Each element of this collection should satisfy its own set of constraints. - Cada elemento desta colección debe satisfacer o seu propio conxunto de restricións. - - - This value is not a valid International Securities Identification Number (ISIN). - Este valor non é un número de identificación de valores internacionais (ISIN) válido. - - - This value should be a valid expression. - Este valor debe ser unha expresión válida. - - - This value is not a valid CSS color. - Este valor non é unha cor CSS válida. - - - This value is not a valid CIDR notation. - Este valor non ten unha notación CIDR válida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - O valor da máscara de rede debería estar entre {{ min }} e {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.he.xlf b/vendor/symfony/validator/Resources/translations/validators.he.xlf deleted file mode 100644 index af82426..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.he.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - הערך צריך להיות שקר. - - - This value should be true. - הערך צריך להיות אמת. - - - This value should be of type {{ type }}. - הערך צריך להיות מסוג {{ type }}. - - - This value should be blank. - הערך צריך להיות ריק. - - - The value you selected is not a valid choice. - הערך שבחרת אינו חוקי. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - אתה צריך לבחור לפחות {{ limit }} אפשרויות.|אתה צריך לבחור לפחות {{ limit }} אפשרויות. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - אתה צריך לבחור לכל היותר {{ limit }} אפשרויות.|אתה צריך לבחור לכל היותר {{ limit }} אפשרויות. - - - One or more of the given values is invalid. - אחד או יותר מהערכים אינו חוקי. - - - This field was not expected. - שדה זה לא היה צפוי - - - This field is missing. - שדה זה חסר. - - - This value is not a valid date. - הערך אינו תאריך חוקי. - - - This value is not a valid datetime. - הערך אינו תאריך ושעה חוקיים. - - - This value is not a valid email address. - כתובת המייל אינה תקינה. - - - The file could not be found. - הקובץ לא נמצא. - - - The file is not readable. - לא ניתן לקרוא את הקובץ. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - הקובץ גדול מדי ({{ size }} {{ suffix }}). הגודל המרבי המותר הוא {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - סוג MIME של הקובץ אינו חוקי ({{ type }}). מותרים סוגי MIME {{ types }}. - - - This value should be {{ limit }} or less. - הערך צריך להכיל {{ limit }} תווים לכל היותר. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - הערך ארוך מידי. הוא צריך להכיל {{ limit }} תווים לכל היותר.|הערך ארוך מידי. הוא צריך להכיל {{ limit }} תווים לכל היותר. - - - This value should be {{ limit }} or more. - הערך צריך להכיל {{ limit }} תווים לפחות. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - הערך קצר מידי. הוא צריך להכיל {{ limit }} תווים לפחות.|הערך קצר מידי. הערך צריך להכיל {{ limit }} תווים לפחות. - - - This value should not be blank. - הערך לא אמור להיות ריק. - - - This value should not be null. - הערך לא אמור להיות ריק. - - - This value should be null. - הערך צריך להיות ריק. - - - This value is not valid. - הערך אינו חוקי. - - - This value is not a valid time. - הערך אינו זמן תקין. - - - This value is not a valid URL. - זאת אינה כתובת אתר תקינה. - - - The two values should be equal. - שני הערכים צריכים להיות שווים. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - הקובץ גדול מדי. הגודל המרבי המותר הוא {{ limit }} {{ suffix }}. - - - The file is too large. - הקובץ גדול מדי. - - - The file could not be uploaded. - לא ניתן לעלות את הקובץ. - - - This value should be a valid number. - הערך צריך להיות מספר חוקי. - - - This file is not a valid image. - הקובץ הזה אינו תמונה תקינה. - - - This is not a valid IP address. - זו אינה כתובת IP חוקית. - - - This value is not a valid language. - הערך אינו שפה חוקית. - - - This value is not a valid locale. - הערך אינו אזור תקף. - - - This value is not a valid country. - הערך אינו ארץ חוקית. - - - This value is already used. - הערך כבר בשימוש. - - - The size of the image could not be detected. - לא ניתן לקבוע את גודל התמונה. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - רוחב התמונה גדול מדי ({{ width }}px). הרוחב המקסימלי הוא {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - רוחב התמונה קטן מדי ({{ width }}px). הרוחב המינימלי הוא {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - גובה התמונה גדול מדי ({{ height }}px). הגובה המקסימלי הוא {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - גובה התמונה קטן מדי ({{ height }}px). הגובה המינימלי הוא {{ min_height }}px. - - - This value should be the user's current password. - הערך צריך להיות סיסמת המשתמש הנוכחי. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - הערך צריך להיות בדיוק {{ limit }} תווים.|הערך צריך להיות בדיוק {{ limit }} תווים. - - - The file was only partially uploaded. - הקובץ הועלה באופן חלקי. - - - No file was uploaded. - הקובץ לא הועלה. - - - No temporary folder was configured in php.ini. - לא הוגדרה תיקייה זמנית ב php.ini. - - - Cannot write temporary file to disk. - לא ניתן לכתוב קובץ זמני לדיסק. - - - A PHP extension caused the upload to fail. - סיומת PHP גרם להעלאה להיכשל. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - האוסף אמור להכיל {{ limit }} אלמנטים או יותר.|האוסף אמור להכיל {{ limit }} אלמנטים או יותר. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - האוסף אמור להכיל {{ limit }} אלמנטים או פחות.|האוסף אמור להכיל {{ limit }} אלמנטים או פחות. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - האוסף צריך להכיל בדיוק {{ limit }} אלמנטים.|האוסף צריך להכיל בדיוק {{ limit }} אלמנטים. - - - Invalid card number. - מספר הכרטיס אינו חוקי. - - - Unsupported card type or invalid card number. - סוג הכרטיס אינו נתמך או לא חוקי. - - - This is not a valid International Bank Account Number (IBAN). - מספר חשבון בנק בינלאומי אינו חוקי (IBAN). - - - This value is not a valid ISBN-10. - הערך אינו ערך ISBN-10 חוקי. - - - This value is not a valid ISBN-13. - הערך אינו ערך ISBN-13 חוקי. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - הערך אינו ערך ISBN-10 חוקי או ערך ISBN-13 חוקי. - - - This value is not a valid ISSN. - הערך אינו ערך ISSN חוקי. - - - This value is not a valid currency. - הערך אינו ערך מטבע חוקי. - - - This value should be equal to {{ compared_value }}. - הערך חייב להיות שווה ל {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - הערך חייב להיות גדול מ {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - הערך חייב להיות גדול או שווה ל {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - הערך חייב להיות זהה ל {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - הערך חייב להיות קטן מ {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - הערך חייב להיות קטן או שווה ל {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - הערך חייב להיות לא שווה ל {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - הערך חייב להיות לא זהה ל {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - היחס של התמונה הוא גדול מדי ({{ ratio }}). היחס המקסימלי האפשרי הוא {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - היחס של התמונה הוא קטן מדי ({{ ratio }}). היחס המינימלי האפשרי הוא {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - התמונה מרובעת ({{ width }}x{{ height }}px). אסורות תמונות מרובעות. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - התמונה היא לרוחב ({{ width }}x{{ height }}px). אסורות תמונות לרוחב. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - התמונה היא לאורך ({{ width }}x{{ height }}px). אסורות תמונות לאורך. - - - An empty file is not allowed. - אסור קובץ ריק. - - - The host could not be resolved. - לא הייתה אפשרות לזהות את המארח. - - - This value does not match the expected {{ charset }} charset. - הערך אינו תואם למערך התווים {{ charset }} הצפוי. - - - This is not a valid Business Identifier Code (BIC). - קוד זיהוי עסקי אינו חוקי (BIC). - - - Error - שגיאה - - - This is not a valid UUID. - הערך אינו ערך UUID חוקי. - - - This value should be a multiple of {{ compared_value }}. - הערך חייב להיות כפולה של {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - הקוד זיהוי עסקי (BIC) אינו משוייך ל IBAN {{ iban }}. - - - This value should be valid JSON. - הערך אינו ערך JSON תקין. - - - This collection should contain only unique elements. - האוסף חייב להכיל רק אלמנטים ייחודיים. - - - This value should be positive. - הערך חייב להיות חיובי. - - - This value should be either positive or zero. - הערך חייב להיות חיובי או אפס. - - - This value should be negative. - הערך חייב להיות שלילי. - - - This value should be either negative or zero. - הערך חייב להיות שלילי או אפס. - - - This value is not a valid timezone. - הערך אינו אזור זמן תקין. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - סיסמא זו הודלפה בהדלפת מידע, אסור להשתמש בה. אנא השתמש בסיסמה אחרת. - - - This value should be between {{ min }} and {{ max }}. - הערך חייב להיות בין {{ min }} ו- {{ max }}. - - - This value is not a valid hostname. - ערך זה אינו שם מארח חוקי. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - מספר האלמנטים באוסף זה צריך להיות מכפיל של {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - ערך זה אמור לעמוד לפחות באחד התנאים הבאים: - - - Each element of this collection should satisfy its own set of constraints. - כל אלמנט באוסף זה אמור לעמוד בקבוצת התנאים שלו. - - - This value is not a valid International Securities Identification Number (ISIN). - ערך זה אינו מספר זיהוי ניירות ערך בינלאומי תקף (ISIN). - - - This value should be a valid expression. - ערך זה חייב להיות ביטוי חוקי. - - - This value is not a valid CSS color. - ערך זה אינו צבע CSS חוקי. - - - This value is not a valid CIDR notation. - ערך זה אינו סימון CIDR חוקי. - - - The value of the netmask should be between {{ min }} and {{ max }}. - הערך של מסכת הרשת חייב להיות בין {{ min }} ו {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.hr.xlf b/vendor/symfony/validator/Resources/translations/validators.hr.xlf deleted file mode 100644 index 34384b4..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.hr.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Ova vrijednost treba biti netočna (false). - - - This value should be true. - Ova vrijednost treba biti točna (true). - - - This value should be of type {{ type }}. - Ova vrijednost treba biti tipa {{ type }}. - - - This value should be blank. - Ova vrijednost treba biti prazna. - - - The value you selected is not a valid choice. - Ova vrijednost nije valjan izbor. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Izaberite barem {{ limit }} mogućnosti. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Izaberite najviše {{ limit }} mogućnosti. - - - One or more of the given values is invalid. - Jedna ili više danih vrijednosti nije ispravna. - - - This field was not expected. - Ovo polje nije očekivano. - - - This field is missing. - Ovo polje nedostaje. - - - This value is not a valid date. - Ova vrijednost nije ispravan datum. - - - This value is not a valid datetime. - Ova vrijednost nije ispravnog datum-vrijeme formata. - - - This value is not a valid email address. - Ova vrijednost nije ispravna e-mail adresa. - - - The file could not be found. - Datoteka ne može biti pronađena. - - - The file is not readable. - Datoteka nije čitljiva. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }}. - - - This value should be {{ limit }} or less. - Ova vrijednost treba biti {{ limit }} ili manje. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ova vrijednost je predugačka. Treba imati {{ limit }} znakova ili manje. - - - This value should be {{ limit }} or more. - Ova vrijednost treba biti {{ limit }} ili više. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili više. - - - This value should not be blank. - Ova vrijednost ne bi trebala biti prazna. - - - This value should not be null. - Ova vrijednost ne bi trebala biti null. - - - This value should be null. - Ova vrijednost treba biti null. - - - This value is not valid. - Ova vrijednost nije ispravna. - - - This value is not a valid time. - Ova vrijednost nije ispravno vrijeme. - - - This value is not a valid URL. - Ova vrijednost nije ispravan URL. - - - The two values should be equal. - Obje vrijednosti trebaju biti jednake. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The file is too large. - Ova datoteka je prevelika. - - - The file could not be uploaded. - Ova datoteka ne može biti prenesena. - - - This value should be a valid number. - Ova vrijednost treba biti ispravan broj. - - - This file is not a valid image. - Ova datoteka nije ispravna slika. - - - This is not a valid IP address. - Ovo nije ispravna IP adresa. - - - This value is not a valid language. - Ova vrijednost nije ispravan jezik. - - - This value is not a valid locale. - Ova vrijednost nije ispravana regionalna oznaka. - - - This value is not a valid country. - Ova vrijednost nije ispravna država. - - - This value is already used. - Ova vrijednost je već iskorištena. - - - The size of the image could not be detected. - Veličina slike se ne može odrediti. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Širina slike je prevelika ({{ width }}px). Najveća dozvoljena širina je {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Širina slike je premala ({{ width }}px). Najmanja dozvoljena širina je {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Visina slike je prevelika ({{ height }}px). Najveća dozvoljena visina je {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Visina slike je premala ({{ height }}px). Najmanja dozvoljena visina je {{ min_height }}px. - - - This value should be the user's current password. - Ova vrijednost treba biti trenutna korisnička lozinka. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ova vrijednost treba imati točno {{ limit }} znakova. - - - The file was only partially uploaded. - Datoteka je samo djelomično prenesena. - - - No file was uploaded. - Niti jedna datoteka nije prenesena. - - - No temporary folder was configured in php.ini. - U php.ini datoteci nije konfiguriran privremeni direktorij. - - - Cannot write temporary file to disk. - Ne mogu zapisati privremenu datoteku na disk. - - - A PHP extension caused the upload to fail. - Prijenos datoteke nije uspio zbog PHP ekstenzije. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ova kolekcija treba sadržavati {{ limit }} ili više elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili više elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili više elemenata. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata.|Ova kolekcija treba sadržavati {{ limit }} ili manje elemenata. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ova kolekcija treba sadržavati točno {{ limit }} element.|Ova kolekcija treba sadržavati točno {{ limit }} elementa.|Ova kolekcija treba sadržavati točno {{ limit }} elemenata. - - - Invalid card number. - Neispravan broj kartice. - - - Unsupported card type or invalid card number. - Tip kartice nije podržan ili je broj kartice neispravan. - - - This is not a valid International Bank Account Number (IBAN). - Ova vrijednost nije ispravan međunarodni broj bankovnog računa (IBAN). - - - This value is not a valid ISBN-10. - Ova vrijednost nije ispravan ISBN-10. - - - This value is not a valid ISBN-13. - Ova vrijednost nije ispravan ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ova vrijednost nije ispravan ISBN-10 niti ISBN-13. - - - This value is not a valid ISSN. - Ova vrijednost nije ispravan ISSN. - - - This value is not a valid currency. - Ova vrijednost nije ispravna valuta. - - - This value should be equal to {{ compared_value }}. - Ova vrijednost treba biti jednaka {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ova vrijednost treba biti veća od {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ova vrijednost treba biti veća od ili jednaka {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrijednost treba biti {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ova vrijednost treba biti manja od {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ova vrijednost treba biti manja od ili jednaka {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ova vrijednost treba biti različita od {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrijednost treba biti različita od {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Omjer slike je prevelik ({{ ratio }}). Dozvoljeni maksimalni omjer je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Omjer slike je premali ({{ ratio }}). Minimalni očekivani omjer je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Slika je kvadratnog oblika ({{ width }}x{{ height }}px). Kvadratne slike nisu dozvoljene. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Slika je orijentirana horizontalno ({{ width }}x{{ height }}px). Horizontalno orijentirane slike nisu dozvoljene. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Slika je orijentirana vertikalno ({{ width }}x{{ height }}px). Vertikalno orijentirane slike nisu dozvoljene. - - - An empty file is not allowed. - Prazna datoteka nije dozvoljena. - - - The host could not be resolved. - Poslužitelj ne može biti pronađen. - - - This value does not match the expected {{ charset }} charset. - Ova vrijednost ne odgovara očekivanom {{ charset }} znakovnom skupu. - - - This is not a valid Business Identifier Code (BIC). - Ovo nije validan poslovni identifikacijski broj (BIC). - - - Error - Greška - - - This is not a valid UUID. - Ovo nije validan UUID. - - - This value should be a multiple of {{ compared_value }}. - Ova vrijednost treba biti višekratnik od {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Poslovni identifikacijski broj (BIC) nije povezan sa IBAN brojem {{ iban }}. - - - This value should be valid JSON. - Ova vrijednost treba biti validan JSON. - - - This collection should contain only unique elements. - Ova kolekcija treba sadržavati samo unikatne elemente. - - - This value should be positive. - Ova vrijednost treba biti pozitivna. - - - This value should be either positive or zero. - Ova vrijednost treba biti pozitivna ili jednaka nuli. - - - This value should be negative. - Ova vrijednost treba biti negativna. - - - This value should be either negative or zero. - Ova vrijednost treba biti negativna ili jednaka nuli. - - - This value is not a valid timezone. - Ova vrijednost nije validna vremenska zona. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ova lozinka je procurila u nekom od sigurnosnih propusta, te je potrebno koristiti drugu lozinku. - - - This value should be between {{ min }} and {{ max }}. - Ova vrijednost treba biti između {{ min }} i {{ max }}. - - - This value is not a valid hostname. - Ova vrijednost nije ispravno ime poslužitelja (engl. hostname). - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Broj elemenata u kolekciji treba biti djeljiv s {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ova vrijednost mora zadovoljiti jedan od sljedećih ograničenja: - - - Each element of this collection should satisfy its own set of constraints. - Svaki element ove kolekcije mora zadovoljiti vlastiti skup ograničenja. - - - This value is not a valid International Securities Identification Number (ISIN). - Ova vrijednost nije ispravan međunarodni identifikacijski broj vrijednosnih papira (ISIN). - - - This value should be a valid expression. - Ova vrijednost mora biti valjani izraz. - - - This value is not a valid CSS color. - Ova vrijednost nije važeća CSS boja. - - - This value is not a valid CIDR notation. - Ova vrijednost nije valjana CIDR notacija. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Vrijednost mrežne maske trebala bi biti između {{ min }} i {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.hu.xlf b/vendor/symfony/validator/Resources/translations/validators.hu.xlf deleted file mode 100644 index 30b0dbe..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.hu.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Ennek az értéknek hamisnak kell lennie. - - - This value should be true. - Ennek az értéknek igaznak kell lennie. - - - This value should be of type {{ type }}. - Ennek az értéknek {{ type }} típusúnak kell lennie. - - - This value should be blank. - Ennek az értéknek üresnek kell lennie. - - - The value you selected is not a valid choice. - A választott érték érvénytelen. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Legalább {{ limit }} értéket kell kiválasztani.|Legalább {{ limit }} értéket kell kiválasztani. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Legfeljebb {{ limit }} értéket lehet kiválasztani.|Legfeljebb {{ limit }} értéket lehet kiválasztani. - - - One or more of the given values is invalid. - A megadott értékek közül legalább egy érvénytelen. - - - This field was not expected. - Nem várt mező. - - - This field is missing. - Ez a mező hiányzik. - - - This value is not a valid date. - Ez az érték nem egy érvényes dátum. - - - This value is not a valid datetime. - Ez az érték nem egy érvényes időpont. - - - This value is not a valid email address. - Ez az érték nem egy érvényes e-mail cím. - - - The file could not be found. - A fájl nem található. - - - The file is not readable. - A fájl nem olvasható. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - A fájl túl nagy ({{ size }} {{ suffix }}). A legnagyobb megengedett méret {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - A fájl MIME típusa érvénytelen ({{ type }}). Az engedélyezett MIME típusok: {{ types }}. - - - This value should be {{ limit }} or less. - Ez az érték legfeljebb {{ limit }} lehet. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat.|Ez az érték túl hosszú. Legfeljebb {{ limit }} karaktert tartalmazhat. - - - This value should be {{ limit }} or more. - Ez az érték legalább {{ limit }} kell, hogy legyen. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia.|Ez az érték túl rövid. Legalább {{ limit }} karaktert kell tartalmaznia. - - - This value should not be blank. - Ez az érték nem lehet üres. - - - This value should not be null. - Ez az érték nem lehet null. - - - This value should be null. - Ennek az értéknek nullnak kell lennie. - - - This value is not valid. - Ez az érték nem érvényes. - - - This value is not a valid time. - Ez az érték nem egy érvényes időpont. - - - This value is not a valid URL. - Ez az érték nem egy érvényes URL. - - - The two values should be equal. - A két értéknek azonosnak kell lennie. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - A fájl túl nagy. A megengedett maximális méret: {{ limit }} {{ suffix }}. - - - The file is too large. - A fájl túl nagy. - - - The file could not be uploaded. - A fájl nem tölthető fel. - - - This value should be a valid number. - Ennek az értéknek érvényes számnak kell lennie. - - - This file is not a valid image. - Ez a fájl nem egy érvényes kép. - - - This is not a valid IP address. - Ez az érték nem egy érvényes IP cím. - - - This value is not a valid language. - Ez az érték nem egy érvényes nyelv. - - - This value is not a valid locale. - Ez az érték nem egy érvényes területi beállítás. - - - This value is not a valid country. - Ez az érték nem egy érvényes ország. - - - This value is already used. - Ez az érték már használatban van. - - - The size of the image could not be detected. - A kép méretét nem lehet megállapítani. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - A kép szélessége túl nagy ({{ width }}px). A megengedett legnagyobb szélesség {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - A kép szélessége túl kicsi ({{ width }}px). Az elvárt legkisebb szélesség {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - A kép magassága túl nagy ({{ height }}px). A megengedett legnagyobb magasság {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - A kép magassága túl kicsi ({{ height }}px). Az elvárt legkisebb magasság {{ min_height }}px. - - - This value should be the user's current password. - Ez az érték a felhasználó jelenlegi jelszavával kell megegyezzen. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia.|Ennek az értéknek pontosan {{ limit }} karaktert kell tartalmaznia. - - - The file was only partially uploaded. - A fájl csak részben lett feltöltve. - - - No file was uploaded. - Nem lett fájl feltöltve. - - - No temporary folder was configured in php.ini. - Nincs ideiglenes könyvtár beállítva a php.ini-ben. - - - Cannot write temporary file to disk. - Az ideiglenes fájl nem írható a lemezre. - - - A PHP extension caused the upload to fail. - Egy PHP bővítmény miatt a feltöltés nem sikerült. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek legalább {{ limit }} elemet kell tartalmaznia. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat.|Ez a gyűjtemény legfeljebb {{ limit }} elemet tartalmazhat. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia.|Ennek a gyűjteménynek pontosan {{ limit }} elemet kell tartalmaznia. - - - Invalid card number. - Érvénytelen kártyaszám. - - - Unsupported card type or invalid card number. - Nem támogatott kártyatípus vagy érvénytelen kártyaszám. - - - This is not a valid International Bank Account Number (IBAN). - Érvénytelen nemzetközi bankszámlaszám (IBAN). - - - This value is not a valid ISBN-10. - Ez az érték nem egy érvényes ISBN-10. - - - This value is not a valid ISBN-13. - Ez az érték nem egy érvényes ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ez az érték nem egy érvényes ISBN-10 vagy ISBN-13. - - - This value is not a valid ISSN. - Ez az érték nem egy érvényes ISSN. - - - This value is not a valid currency. - Ez az érték nem egy érvényes pénznem. - - - This value should be equal to {{ compared_value }}. - Ez az érték legyen {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ez az érték nagyobb legyen, mint {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ez az érték nagyobb vagy egyenlő legyen, mint {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ez az érték ugyanolyan legyen, mint {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ez az érték kisebb legyen, mint {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ez az érték kisebb vagy egyenlő legyen, mint {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ez az érték ne legyen {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ez az érték ne legyen ugyanolyan, mint {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - A képarány túl nagy ({{ ratio }}). A megengedett legnagyobb képarány {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - A képarány túl kicsi ({{ ratio }}). A megengedett legkisebb képarány {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - A kép négyzet alakú ({{ width }}x{{ height }}px). A négyzet alakú képek nem engedélyezettek. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - A kép fekvő tájolású ({{ width }}x{{ height }}px). A fekvő tájolású képek nem engedélyezettek. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - A kép álló tájolású ({{ width }}x{{ height }}px). Az álló tájolású képek nem engedélyezettek. - - - An empty file is not allowed. - Üres fájl nem megengedett. - - - The host could not be resolved. - Az állomásnevet nem lehet feloldani. - - - This value does not match the expected {{ charset }} charset. - Ez az érték nem az elvárt {{ charset }} karakterkódolást használja. - - - This is not a valid Business Identifier Code (BIC). - Érvénytelen nemzetközi bankazonosító kód (BIC/SWIFT). - - - Error - Hiba - - - This is not a valid UUID. - Érvénytelen egyedi azonosító (UUID). - - - This value should be a multiple of {{ compared_value }}. - Ennek az értéknek oszthatónak kell lennie a következővel: {{ compared_value }} - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ez a Bankazonosító kód (BIC) nem kapcsolódik az IBAN kódhoz ({{ iban }}). - - - This value should be valid JSON. - Ez az érték érvényes JSON kell, hogy legyen. - - - This value should be positive. - Ennek az értéknek pozitívnak kell lennie. - - - This value should be either positive or zero. - Ennek az értéknek pozitívnak vagy nullának kell lennie. - - - This value should be negative. - Ennek az értéknek negatívnak kell lennie. - - - This value should be either negative or zero. - Ennek az értéknek negatívnak vagy nullának kell lennie. - - - This collection should contain only unique elements. - Ez a gyűjtemény csak egyedi elemeket tartalmazhat. - - - This value is not a valid timezone. - Ez az érték nem egy érvényes időzóna. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ez a jelszó korábban egy adatvédelmi incidens során illetéktelenek kezébe került, így nem használható. Kérjük, használjon másik jelszót. - - - This value should be between {{ min }} and {{ max }}. - Ennek az értéknek {{ min }} és {{ max }} között kell lennie. - - - This value is not a valid hostname. - Ez az érték nem egy érvényes állomásnév (hosztnév). - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - A gyűjteményben lévő elemek számának oszthatónak kell lennie a következővel: {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ennek az értéknek meg kell felelni legalább egynek a következő feltételek közül: - - - Each element of this collection should satisfy its own set of constraints. - A gyűjtemény minden elemének meg kell felelni a saját feltételeinek. - - - This value is not a valid International Securities Identification Number (ISIN). - Ez az érték nem egy érvényes nemzetközi értékpapír-azonosító szám (ISIN). - - - This value should be a valid expression. - Ennek az értéknek érvényes kifejezésnek kell lennie. - - - This value is not a valid CSS color. - Ez az érték nem egy érvényes CSS szín. - - - This value is not a valid CIDR notation. - Ez az érték nem egy érvényes CIDR jelölés. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Ennek a netmask értéknek {{ min }} és {{ max }} között kell lennie. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.hy.xlf b/vendor/symfony/validator/Resources/translations/validators.hy.xlf deleted file mode 100644 index f53df12..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.hy.xlf +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - This value should be false. - Արժեքը պետք է լինի կեղծ։ - - - This value should be true. - Արժեքը պետք է լինի իրական։ - - - This value should be of type {{ type }}. - Արժեքը պետք է լինի {{ type }} տեսակի։ - - - This value should be blank. - Արժեքը պետք է լինի դատարկ։ - - - The value you selected is not a valid choice. - Ձեր ընտրած արժեքը անվավեր ընտրություն է։ - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Դուք պետք է ընտրեք ամենաքիչը {{ limit }} տարբերակներ։ - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Դուք պետք է ընտրեք ոչ ավելի քան {{ limit }} տարբերակներ։ - - - One or more of the given values is invalid. - Մեկ կամ ավելի տրված արժեքները անվավեր են։ - - - This field was not expected. - Այս դաշտը չի սպասվում։ - - - This field is missing. - Այս դաշտը բացակայում է։ - - - This value is not a valid date. - Արժեքը սխալ ամսաթիվ է։ - - - This value is not a valid datetime. - Ամսաթվի և ժամանակի արժեքը անվավեր է։ - - - This value is not a valid email address. - Անվավեր էլ֊փոստի արժեք։ - - - The file could not be found. - Նիշքը չի գտնվել։ - - - The file is not readable. - Նիշքը անընթեռնելի է։ - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Նիշքը չափազանց մեծ է ({{ size }} {{ suffix }}): Մաքսիմալ թույլատրելի չափսը՝ {{ limit }} {{ suffix }}։ - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - MIME-տեսակը անվավեր է է({{ type }}): Նիշքերի թույլատրելի MIME-տեսակներն են: {{ types }}։ - - - This value should be {{ limit }} or less. - Արժեքը պետք է լինի {{ limit }} կամ փոքր։ - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Արժեքը չափազանց երկար է: Պետք է լինի {{ limit }} կամ ավել սիմվոլներ։ - - - This value should be {{ limit }} or more. - Արժեքը պետ է լինի {{ limit }} կամ շատ։ - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Արժեքը չափազանց կարճ է: Պետք է լինի {{ limit }} կամ ավելի սիմվոլներ։ - - - This value should not be blank. - Արժեքը չպետք է դատարկ լինի։ - - - This value should not be null. - Արժեքը չպետք է լինի null։ - - - This value should be null. - Արժեքը պետք է լինի null։ - - - This value is not valid. - Անվավեր արժեք։ - - - This value is not a valid time. - Ժամանակի արժեքը անվավեր է։ - - - This value is not a valid URL. - Արժեքը URL չէ։ - - - The two values should be equal. - Երկու արժեքները պետք է նույնը լինեն։ - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Նիշքը չափազանց մեծ է: Մաքսիմալ թույլատրելի չափսը {{ limit }} {{ suffix }} է։ - - - The file is too large. - Նիշքը չափազանց մեծ է։ - - - The file could not be uploaded. - Նիշքը չի կարող բեռնվել։ - - - This value should be a valid number. - Արժեքը պետք է լինի թիվ։ - - - This file is not a valid image. - Նիշքը նկարի վավեր ֆորմատ չէ։ - - - This is not a valid IP address. - Արժեքը վավեր IP հասցե չէ։ - - - This value is not a valid language. - Արժեքը վավեր լեզու չէ։ - - - This value is not a valid locale. - Արժեքը չի հանդիսանում վավեր տեղայնացում։ - - - This value is not a valid country. - Արժեքը պետք է լինի երկիր։ - - - This value is already used. - Այդ արժեքն արդեն օգտագործվում է։ - - - The size of the image could not be detected. - Նկարի չափսերը չստացվեց որոշել։ - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Նկարի լայնությունը չափազանց մեծ է({{ width }}px). Մաքսիմալ չափն է {{ max_width }}px։ - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Նկարի լայնությունը չափազանց փոքր է ({{ width }}px). Մինիմալ չափն է {{ min_ width }}px։ - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Նկարի բարձրությունը չափազանց մեծ է ({{ height }}px). Մաքսիմալ չափն է {{ max_height }}px։ - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Նկարի բարձրությունը չափազանց փոքր է ({{ height }}px). Մինիմալ չափն է {{ min_height }}px։ - - - This value should be the user's current password. - Այս արժեքը պետք է լինի օգտագործողի ներկա ծածկագիրը։ - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Այս արժեքը պետք է ունենա ճիշտ {{ limit }} սիմվոլներ։ - - - The file was only partially uploaded. - Նիշքի մասնակի բեռնման սխալ։ - - - No file was uploaded. - Նիշքը չի բեռնվել։ - - - No temporary folder was configured in php.ini. - php.ini նիշքում ժամանակավոր պանակ նշված չէ։ - - - Cannot write temporary file to disk. - Ժամանակավոր նիշքը հնարավոր չէ գրել սկավառակի վրա։ - - - A PHP extension caused the upload to fail. - PHP ֆորմատը դարձել է բեռնման չհաջողման պատճառ։ - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Այս համախումբը պետք է պաուրակի {{ limit }} կամ ավելի տարրեր։|Այս հավելվածը պետք է պարունակի limit }} տարր կամ ավելին։|Այս համախումբը պետք է պարունակի {{ limit }} տարրերին կամ ավելի։ - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Այս համախումբը պետք է պաուրակի {{ limit }} տարրեր կամ քիչ։|Այս համախումբը պետք է պաուրակի {{ limit }} տարր կամ քիչ։|Այս համախումբը պետք է պաուրակի {{ limit }} տարրեր կամ քիչ։ - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Այս համախումբը պետք է պաուրակի ուղիղ {{ limit }} տարր։|Այս համախումբը պետք է պաուրակի ուղիղ {{ limit }} տարրեր։|Այս համախումբը պետք է պաուրակի {{ limit }} տարրեր։ - - - Invalid card number. - Քարտի սխալ համար: - - - Unsupported card type or invalid card number. - Չսպասարկվող կամ սխալ քարտի համար: - - - This is not a valid International Bank Account Number (IBAN). - Արժեքը վավեր միջազային բանկային հաշվի համար չէ (IBAN)։ - - - This value is not a valid ISBN-10. - Արժեքը ունի անվավեր ISBN-10 ձևաչափ։ - - - This value is not a valid ISBN-13. - Արժեքը ունի անվավեր ISBN-13 ձևաչափ։ - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Արժեքը չի համապատասխանում ISBN-10 և ISBN-13 ձևաչափերին։ - - - This value is not a valid ISSN. - Արժեքը չի համապաստասխանում ISSN ձևաչափին։ - - - This value is not a valid currency. - Արժեքը վավեր տարադրամ չէ։ - - - This value should be equal to {{ compared_value }}. - Արժեքը պետք է լինի {{ compared_value }}։ - - - This value should be greater than {{ compared_value }}. - Արժեքը պետք է մեծ լինի, քան {{ compared_value }}։ - - - This value should be greater than or equal to {{ compared_value }}. - Արժեքը պետք է լինի հավասար կամ մեծ քան {{ compared_value }}։ - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Արժեքը պետք է լինի ինչպես {{ compared_value_type }} {{ compared_value }}։ - - - This value should be less than {{ compared_value }}. - Արժեքը պետք է լինի փոքր քան {{ compared_value }}։ - - - This value should be less than or equal to {{ compared_value }}. - Արժեքը պետք է լինի փոքր կամ հավասար {{ compared_value }}։ - - - This value should not be equal to {{ compared_value }}. - Արժեքը պետք է լինի հավասար {{ compared_value }}։ - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Արժեքը պետք է լինի նունը {{ compared_value_type }} {{ compared_value }}: - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Պատկերի կողմերի հարաբերակցությունը խիստ մեծ է ({{ ratio }}). Մաքսիմալ հարաբերակցությունը՝ {{ max_ratio }}։ - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Պատկերի կողմերի հարաբերակցությունը խիստ փոքր է ({{ ratio }}). Մինիմալ հարաբերակցությունը՝ {{ min_ratio }}։ - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Պատկերը քառակուսի է({{ width }}x{{ height }}px)։ Քառակուսի նկարներ չեն թույլատրվում։ - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Պատկերը ալբոմային ուղղվածության է({{ width }}x{{ height }}px)․ դա չի թույլատրվում։ - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Պատկերը պորտրետային ուղղվածության է ({{ width }}x{{ height }}px)․ դա չի թույլատրվում։ - - - An empty file is not allowed. - Դատարկ նիշք չի թույլատրվում։ - - - The host could not be resolved. - Հոսթի անունը հնարավոր չի պարզել։ - - - This value does not match the expected {{ charset }} charset. - Արժեքը չի համընկնում {{ charset }} կոդավորման հետ։ - - - This is not a valid Business Identifier Code (BIC). - Սա վավեր Business Identifier Code (BIC) չէ։ - - - Error - Սխալ - - - This is not a valid UUID. - Սա վավեր UUID չէ։ - - - This value should be a multiple of {{ compared_value }}. - Այս արժեքը պետք է լինի բազմակի {{ compared_value }}։ - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Բիզնեսի նույնականացման կոդը (BIC) կապված չէ IBAN- ի հետ {{ iban }}։ - - - This value should be valid JSON. - Այս արժեքը պետք է լինի վավեր JSON։ - - - This collection should contain only unique elements. - Այս համախումբը պետք է պարունակի միայն եզակի տարրեր։ - - - This value should be positive. - Այս արժեքը պետք է լինի դրական։ - - - This value should be either positive or zero. - Այս արժեքը պետք է լինի դրական կամ զրոյական։ - - - This value should be negative. - Այս արժեքը պետք է լինի բացասական։ - - - This value should be either negative or zero. - Այս արժեքը պետք է լինի բացասական կամ զրոյական։ - - - This value is not a valid timezone. - Այս արժեքը վավեր ժամային գոտի չէ։ - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Գաղտնաբառը գտնվել է տվյալների արտահոսքում. այն չպետք է օգտագործվի: Խնդրում ենք օգտագործել մեկ այլ գաղտնաբառ։ - - - This value should be between {{ min }} and {{ max }}. - Այս արժեքը պետք է լինի {{ min }}-ի և {{ max }}-ի միջև։ - - - This value is not a valid hostname. - Այս հոստի անունը վավեր չէ։ - - - The number of elements in this collection should be a multiple of {{ compared_value }}․ - Այս համախմբի տարրերի քանակը պետք է հավասար լինի {{ compared_value }}-ի բազմապատիկներին։ - - - This value should satisfy at least one of the following constraints: - Այս արժեքը պետք է բավարարի հետևյալ սահմանափակումներից առնվազն մեկը։ - - - Each element of this collection should satisfy its own set of constraints. - Այս համախմբի յուրաքանչյուր տարր պետք է բավարարի իր սեփական սահմանափակումները։ - - - This value is not a valid International Securities Identification Number (ISIN). - Այս արժեքը արժեթղթերի նույնականացման միջազգային համարը վավեր չէ(ISIN)։ - - - This value should be a valid expression. - Այս արժեքը պետք է լինի վավեր արտահայտություն: - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.id.xlf b/vendor/symfony/validator/Resources/translations/validators.id.xlf deleted file mode 100644 index 1687f33..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.id.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Nilai ini harus bernilai salah. - - - This value should be true. - Nilai ini harus bernilai benar. - - - This value should be of type {{ type }}. - Nilai ini harus bertipe {{ type }}. - - - This value should be blank. - Nilai ini harus kosong. - - - The value you selected is not a valid choice. - Nilai yang dipilih tidak tepat. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Anda harus memilih paling tidak {{ limit }} pilihan. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Anda harus memilih paling banyak {{ limit }} pilihan. - - - One or more of the given values is invalid. - Satu atau lebih nilai yang diberikan tidak sah. - - - This field was not expected. - Ruas ini tidak diharapkan. - - - This field is missing. - Ruas ini hilang. - - - This value is not a valid date. - Nilai ini bukan merupakan tanggal yang sah. - - - This value is not a valid datetime. - Nilai ini bukan merupakan tanggal dan waktu yang sah. - - - This value is not a valid email address. - Nilai ini bukan alamat surel yang sah. - - - The file could not be found. - Berkas tidak dapat ditemukan. - - - The file is not readable. - Berkas tidak dapat dibaca. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Ukuran berkas terlalu besar ({{ size }} {{ suffix }}). Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Jenis berkas ({{ type }}) tidak sah. Jenis berkas yang diizinkan adalah {{ types }}. - - - This value should be {{ limit }} or less. - Nilai ini harus {{ limit }} atau kurang. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Nilai ini terlalu panjang. Seharusnya {{ limit }} karakter atau kurang. - - - This value should be {{ limit }} or more. - Nilai ini harus {{ limit }} atau lebih. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Nilai ini terlalu pendek. Seharusnya {{ limit }} karakter atau lebih. - - - This value should not be blank. - Nilai ini tidak boleh kosong. - - - This value should not be null. - Nilai ini tidak boleh 'null'. - - - This value should be null. - Nilai ini harus 'null'. - - - This value is not valid. - Nilai ini tidak sah. - - - This value is not a valid time. - Nilai ini bukan merupakan waktu yang sah. - - - This value is not a valid URL. - Nilai ini bukan URL yang sah. - - - The two values should be equal. - Isi keduanya harus sama. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Ukuran berkas terlalu besar. Ukuran maksimum yang diizinkan adalah {{ limit }} {{ suffix }}. - - - The file is too large. - Ukuran berkas terlalu besar. - - - The file could not be uploaded. - Berkas tidak dapat diunggah. - - - This value should be a valid number. - Nilai ini harus angka yang sah. - - - This file is not a valid image. - Berkas ini tidak termasuk citra. - - - This is not a valid IP address. - Ini bukan alamat IP yang sah. - - - This value is not a valid language. - Nilai ini bukan bahasa yang sah. - - - This value is not a valid locale. - Nilai ini bukan lokal yang sah. - - - This value is not a valid country. - Nilai ini bukan negara yang sah. - - - This value is already used. - Nilai ini sudah digunakan. - - - The size of the image could not be detected. - Ukuran dari citra tidak bisa dideteksi. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Lebar citra terlalu besar ({{ width }}px). Ukuran lebar maksimum adalah {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Lebar citra terlalu kecil ({{ width }}px). Ukuran lebar minimum yang diharapkan adalah {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Tinggi citra terlalu besar ({{ height }}px). Ukuran tinggi maksimum adalah {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Tinggi citra terlalu kecil ({{ height }}px). Ukuran tinggi minimum yang diharapkan adalah {{ min_height }}px. - - - This value should be the user's current password. - Nilai ini harus kata sandi pengguna saat ini. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Nilai ini harus memiliki tepat {{ limit }} karakter. - - - The file was only partially uploaded. - Berkas hanya terunggah sebagian. - - - No file was uploaded. - Tidak ada berkas terunggah. - - - No temporary folder was configured in php.ini. - Direktori sementara tidak dikonfiguasi pada php.ini. - - - Cannot write temporary file to disk. - Tidak dapat menuliskan berkas sementara ke dalam media penyimpanan. - - - A PHP extension caused the upload to fail. - Sebuah ekstensi PHP menyebabkan kegagalan unggah. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Kumpulan ini harus memiliki {{ limit }} elemen atau lebih. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Kumpulan ini harus memiliki kurang dari {{ limit }} elemen. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Kumpulan ini harus memiliki tepat {{ limit }} elemen. - - - Invalid card number. - Nomor kartu tidak sah. - - - Unsupported card type or invalid card number. - Jenis kartu tidak didukung atau nomor kartu tidak sah. - - - This is not a valid International Bank Account Number (IBAN). - Ini bukan Nomor Rekening Bank Internasional (IBAN) yang sah. - - - This value is not a valid ISBN-10. - Nilai ini bukan ISBN-10 yang sah. - - - This value is not a valid ISBN-13. - Nilai ini bukan ISBN-13 yang sah. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Nilai ini bukan ISBN-10 maupun ISBN-13 yang sah. - - - This value is not a valid ISSN. - Nilai ini bukan ISSN yang sah. - - - This value is not a valid currency. - Nilai ini bukan mata uang yang sah. - - - This value should be equal to {{ compared_value }}. - Nilai ini seharusnya sama dengan {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Nilai ini seharusnya lebih dari {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Nilai ini seharusnya lebih dari atau sama dengan {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Nilai ini seharusnya identik dengan {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Nilai ini seharusnya kurang dari {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Nilai ini seharusnya kurang dari atau sama dengan {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Nilai ini seharusnya tidak sama dengan {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Nilai ini seharusnya tidak identik dengan {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Rasio citra terlalu besar ({{ ratio }}). Rasio maksimum yang diizinkan adalah {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Rasio citra terlalu kecil ({{ ratio }}). Rasio minimum yang diharapkan adalah {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Citra persegi ({{ width }}x{{ height }}px). Citra persegi tidak diizinkan. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Citra berorientasi lanskap ({{ width }}x{{ height }}px). Citra berorientasi lanskap tidak diizinkan. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Citra berorientasi potret ({{ width }}x{{ height }}px). Citra berorientasi potret tidak diizinkan. - - - An empty file is not allowed. - Berkas kosong tidak diizinkan. - - - The host could not be resolved. - Host tidak dapat diselesaikan. - - - This value does not match the expected {{ charset }} charset. - Nilai ini tidak memenuhi set karakter {{ charset }} yang diharapkan. - - - This is not a valid Business Identifier Code (BIC). - Ini bukan Business Identifier Code (BIC) yang sah. - - - Error - Galat - - - This is not a valid UUID. - Ini bukan UUID yang sah. - - - This value should be a multiple of {{ compared_value }}. - Nilai ini harus kelipatan dari {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Business Identifier Code (BIC) ini tidak terkait dengan IBAN {{ iban }}. - - - This value should be valid JSON. - Nilai ini harus berisi JSON yang sah. - - - This collection should contain only unique elements. - Kumpulan ini harus mengandung elemen yang unik. - - - This value should be positive. - Nilai ini harus positif. - - - This value should be either positive or zero. - Nilai ini harus positif atau nol. - - - This value should be negative. - Nilai ini harus negatif. - - - This value should be either negative or zero. - Nilai ini harus negatif atau nol. - - - This value is not a valid timezone. - Nilai ini harus merupakan zona waktu yang sah. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Kata sandi ini telah bocor di data breach, harus tidak digunakan kembali. Silahkan gunakan kata sandi yang lain. - - - This value should be between {{ min }} and {{ max }}. - Nilai ini harus berada diantara {{ min }} dan {{ max }}. - - - This value is not a valid hostname. - Nilai ini bukan merupakan hostname yang sah. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Angka dari setiap elemen di dalam kumpulan ini harus kelipatan dari {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Nilai ini harus memenuhi setidaknya satu dari batasan berikut: - - - Each element of this collection should satisfy its own set of constraints. - Setiap elemen koleksi ini harus memenuhi batasannya sendiri. - - - This value is not a valid International Securities Identification Number (ISIN). - Nilai ini bukan merupakan International Securities Identification Number (ISIN) yang sah. - - - This value should be a valid expression. - Nilai ini harus berupa ekspresi yang sah. - - - This value is not a valid CSS color. - Nilai ini bukan merupakan warna CSS yang sah. - - - This value is not a valid CIDR notation. - Nilai ini bukan merupakan notasi CIDR yang sah. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Nilai dari netmask harus berada diantara {{ min }} dan {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.it.xlf b/vendor/symfony/validator/Resources/translations/validators.it.xlf deleted file mode 100644 index c7cd437..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.it.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Questo valore dovrebbe essere falso. - - - This value should be true. - Questo valore dovrebbe essere vero. - - - This value should be of type {{ type }}. - Questo valore dovrebbe essere di tipo {{ type }}. - - - This value should be blank. - Questo valore dovrebbe essere vuoto. - - - The value you selected is not a valid choice. - Questo valore dovrebbe essere una delle opzioni disponibili. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Si dovrebbe selezionare almeno {{ limit }} opzione.|Si dovrebbero selezionare almeno {{ limit }} opzioni. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Si dovrebbe selezionare al massimo {{ limit }} opzione.|Si dovrebbero selezionare al massimo {{ limit }} opzioni. - - - One or more of the given values is invalid. - Uno o più valori inseriti non sono validi. - - - This field was not expected. - Questo campo non è stato previsto. - - - This field is missing. - Questo campo è mancante. - - - This value is not a valid date. - Questo valore non è una data valida. - - - This value is not a valid datetime. - Questo valore non è una data e ora valida. - - - This value is not a valid email address. - Questo valore non è un indirizzo email valido. - - - The file could not be found. - Non è stato possibile trovare il file. - - - The file is not readable. - Il file non è leggibile. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Il file è troppo grande ({{ size }} {{ suffix }}). La dimensione massima consentita è {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Il mime type del file non è valido ({{ type }}). I tipi permessi sono {{ types }}. - - - This value should be {{ limit }} or less. - Questo valore dovrebbe essere {{ limit }} o inferiore. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} carattere.|Questo valore è troppo lungo. Dovrebbe essere al massimo di {{ limit }} caratteri. - - - This value should be {{ limit }} or more. - Questo valore dovrebbe essere {{ limit }} o superiore. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} carattere.|Questo valore è troppo corto. Dovrebbe essere almeno di {{ limit }} caratteri. - - - This value should not be blank. - Questo valore non dovrebbe essere vuoto. - - - This value should not be null. - Questo valore non dovrebbe essere nullo. - - - This value should be null. - Questo valore dovrebbe essere nullo. - - - This value is not valid. - Questo valore non è valido. - - - This value is not a valid time. - Questo valore non è un'ora valida. - - - This value is not a valid URL. - Questo valore non è un URL valido. - - - The two values should be equal. - I due valori dovrebbero essere uguali. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Il file è troppo grande. La dimensione massima è {{ limit }} {{ suffix }}. - - - The file is too large. - Il file è troppo grande. - - - The file could not be uploaded. - Il file non può essere caricato. - - - This value should be a valid number. - Questo valore dovrebbe essere un numero. - - - This file is not a valid image. - Questo file non è una immagine valida. - - - This is not a valid IP address. - Questo valore non è un indirizzo IP valido. - - - This value is not a valid language. - Questo valore non è una lingua valida. - - - This value is not a valid locale. - Questo valore non è una impostazione regionale valida. - - - This value is not a valid country. - Questo valore non è una nazione valida. - - - This value is already used. - Questo valore è già stato utilizzato. - - - The size of the image could not be detected. - La dimensione dell'immagine non può essere determinata. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - La larghezza dell'immagine è troppo grande ({{ width }}px). La larghezza massima è di {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - La larghezza dell'immagine è troppo piccola ({{ width }}px). La larghezza minima è di {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - L'altezza dell'immagine è troppo grande ({{ height }}px). L'altezza massima è di {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - L'altezza dell'immagine è troppo piccola ({{ height }}px). L'altezza minima è di {{ min_height }}px. - - - This value should be the user's current password. - Questo valore dovrebbe essere la password attuale dell'utente. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Questo valore dovrebbe contenere esattamente {{ limit }} carattere.|Questo valore dovrebbe contenere esattamente {{ limit }} caratteri. - - - The file was only partially uploaded. - Il file è stato caricato solo parzialmente. - - - No file was uploaded. - Nessun file è stato caricato. - - - No temporary folder was configured in php.ini. - Nessuna cartella temporanea è stata configurata nel php.ini. - - - Cannot write temporary file to disk. - Impossibile scrivere il file temporaneo sul disco. - - - A PHP extension caused the upload to fail. - Un'estensione PHP ha causato il fallimento del caricamento. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Questa collezione dovrebbe contenere almeno {{ limit }} elemento.|Questa collezione dovrebbe contenere almeno {{ limit }} elementi. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Questa collezione dovrebbe contenere massimo {{ limit }} elemento.|Questa collezione dovrebbe contenere massimo {{ limit }} elementi. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Questa collezione dovrebbe contenere esattamente {{ limit }} elemento.|Questa collezione dovrebbe contenere esattamente {{ limit }} elementi. - - - Invalid card number. - Numero di carta non valido. - - - Unsupported card type or invalid card number. - Tipo di carta non supportato o numero non valido. - - - This is not a valid International Bank Account Number (IBAN). - Questo valore non è un IBAN (International Bank Account Number) valido. - - - This value is not a valid ISBN-10. - Questo valore non è un codice ISBN-10 valido. - - - This value is not a valid ISBN-13. - Questo valore non è un codice ISBN-13 valido. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Questo valore non è un codice ISBN-10 o ISBN-13 valido. - - - This value is not a valid ISSN. - Questo valore non è un codice ISSN valido. - - - This value is not a valid currency. - Questo valore non è una valuta valida. - - - This value should be equal to {{ compared_value }}. - Questo valore dovrebbe essere uguale a {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Questo valore dovrebbe essere maggiore di {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Questo valore dovrebbe essere maggiore o uguale a {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Questo valore dovrebbe essere identico a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Questo valore dovrebbe essere minore di {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Questo valore dovrebbe essere minore o uguale a {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Questo valore dovrebbe essere diverso da {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Questo valore dovrebbe essere diverso da {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Il rapporto di aspetto dell'immagine è troppo grande ({{ ratio }}). Il rapporto massimo consentito è {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Il rapporto di aspetto dell'immagine è troppo piccolo ({{ ratio }}). Il rapporto minimo consentito è {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - L'immagine è quadrata ({{ width }}x{{ height }}px). Le immagini quadrate non sono consentite. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - L'immagine è orizzontale ({{ width }}x{{ height }}px). Le immagini orizzontali non sono consentite. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - L'immagine è verticale ({{ width }}x{{ height }}px). Le immagini verticali non sono consentite. - - - An empty file is not allowed. - Un file vuoto non è consentito. - - - The host could not be resolved. - L'host non può essere risolto. - - - This value does not match the expected {{ charset }} charset. - Questo valore non corrisponde al charset {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Questo valore non è un codice BIC valido. - - - Error - Errore - - - This is not a valid UUID. - Questo non è un UUID valido. - - - This value should be a multiple of {{ compared_value }}. - Questo valore dovrebbe essere un multiplo di {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Questo codice identificativo bancario (BIC) non è associato all'IBAN {{ iban }}. - - - This value should be valid JSON. - Questo valore dovrebbe essere un JSON valido. - - - This collection should contain only unique elements. - Questa collezione dovrebbe contenere solo elementi unici. - - - This value should be positive. - Questo valore dovrebbe essere positivo. - - - This value should be either positive or zero. - Questo valore dovrebbe essere positivo oppure zero. - - - This value should be negative. - Questo valore dovrebbe essere negativo. - - - This value should be either negative or zero. - Questo valore dovrebbe essere negativo oppure zero. - - - This value is not a valid timezone. - Questo valore non è un fuso orario valido. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Questa password è trapelata durante una compromissione di dati, non deve essere usata. Si prega di usare una password diversa. - - - This value should be between {{ min }} and {{ max }}. - Questo valore dovrebbe essere compreso tra {{ min }} e {{ max }}. - - - This value is not a valid hostname. - Questo valore non è un nome di host valido. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Il numero di elementi in questa collezione dovrebbe essere un multiplo di {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Questo valore dovrebbe soddisfare almeno uno dei vincoli seguenti: - - - Each element of this collection should satisfy its own set of constraints. - Ciascun elemento di questa collezione dovrebbe soddisfare il suo insieme di vincoli. - - - This value is not a valid International Securities Identification Number (ISIN). - Questo valore non è un codice identificativo internazionale di valori mobiliari (ISIN) valido. - - - This value should be a valid expression. - Questo valore dovrebbe essere un'espressione valida. - - - This value is not a valid CSS color. - Questo valore non è un colore CSS valido. - - - This value is not a valid CIDR notation. - Questo valore non è una notazione CIDR valida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Il valore della netmask dovrebbe essere compreso tra {{ min }} e {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.ja.xlf b/vendor/symfony/validator/Resources/translations/validators.ja.xlf deleted file mode 100644 index 9feed48..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.ja.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - falseでなければなりません。 - - - This value should be true. - trueでなければなりません。 - - - This value should be of type {{ type }}. - 型は{{ type }}でなければなりません。 - - - This value should be blank. - 空でなければなりません。 - - - The value you selected is not a valid choice. - 有効な選択肢ではありません。 - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - {{ limit }}個以上選択してください。 - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - {{ limit }}個以内で選択してください。 - - - One or more of the given values is invalid. - 無効な選択肢が含まれています。 - - - This field was not expected. - このフィールドは予期されていませんでした。 - - - This field is missing. - このフィールドは、欠落しています。 - - - This value is not a valid date. - 有効な日付ではありません。 - - - This value is not a valid datetime. - 有効な日時ではありません。 - - - This value is not a valid email address. - 有効なメールアドレスではありません。 - - - The file could not be found. - ファイルが見つかりません。 - - - The file is not readable. - ファイルを読み込めません。 - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - ファイルのサイズが大きすぎます({{ size }} {{ suffix }})。有効な最大サイズは{{ limit }} {{ suffix }}です。 - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - ファイルのMIMEタイプが無効です({{ type }})。有効なMIMEタイプは{{ types }}です。 - - - This value should be {{ limit }} or less. - {{ limit }}以下でなければなりません。 - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - 値が長すぎます。{{ limit }}文字以内でなければなりません。 - - - This value should be {{ limit }} or more. - {{ limit }}以上でなければなりません。 - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - 値が短すぎます。{{ limit }}文字以上でなければなりません。 - - - This value should not be blank. - 空であってはなりません。 - - - This value should not be null. - nullであってはなりません。 - - - This value should be null. - nullでなければなりません。 - - - This value is not valid. - 有効な値ではありません。 - - - This value is not a valid time. - 有効な時刻ではありません。 - - - This value is not a valid URL. - 有効なURLではありません。 - - - The two values should be equal. - 2つの値が同じでなければなりません。 - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - ファイルのサイズが大きすぎます。有効な最大サイズは{{ limit }} {{ suffix }}です。 - - - The file is too large. - ファイルのサイズが大きすぎます。 - - - The file could not be uploaded. - ファイルをアップロードできませんでした。 - - - This value should be a valid number. - 有効な数字ではありません。 - - - This file is not a valid image. - ファイルが画像ではありません。 - - - This is not a valid IP address. - 有効なIPアドレスではありません。 - - - This value is not a valid language. - 有効な言語名ではありません。 - - - This value is not a valid locale. - 有効なロケールではありません。 - - - This value is not a valid country. - 有効な国名ではありません。 - - - This value is already used. - 既に使用されています。 - - - The size of the image could not be detected. - 画像のサイズが検出できません。 - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - 画像の幅が大きすぎます({{ width }}ピクセル)。{{ max_width }}ピクセルまでにしてください。 - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - 画像の幅が小さすぎます({{ width }}ピクセル)。{{ min_width }}ピクセル以上にしてください。 - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - 画像の高さが大きすぎます({{ height }}ピクセル)。{{ max_height }}ピクセルまでにしてください。 - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - 画像の高さが小さすぎます({{ height }}ピクセル)。{{ min_height }}ピクセル以上にしてください。 - - - This value should be the user's current password. - ユーザーの現在のパスワードでなければなりません。 - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - ちょうど{{ limit }}文字でなければなりません。 - - - The file was only partially uploaded. - ファイルのアップロードは完全ではありません。 - - - No file was uploaded. - ファイルがアップロードされていません。 - - - No temporary folder was configured in php.ini. - php.iniで一時フォルダが設定されていません。 - - - Cannot write temporary file to disk. - 一時ファイルをディスクに書き込むことができません。 - - - A PHP extension caused the upload to fail. - PHP拡張によってアップロードに失敗しました。 - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - {{ limit }}個以上の要素を含んでなければいけません。 - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - 要素は{{ limit }}個までです。 - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - 要素はちょうど{{ limit }}個でなければなりません。 - - - Invalid card number. - 無効なカード番号です。 - - - Unsupported card type or invalid card number. - 未対応のカード種類又は無効なカード番号です。 - - - This is not a valid International Bank Account Number (IBAN). - 有効なIBANコードではありません。 - - - This value is not a valid ISBN-10. - 有効なISBN-10コードではありません。 - - - This value is not a valid ISBN-13. - 有効なISBN-13コードではありません。 - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - 有効なISBN-10コード又はISBN-13コードではありません。 - - - This value is not a valid ISSN. - 有効なISSNコードではありません。 - - - This value is not a valid currency. - 有効な貨幣ではありません。 - - - This value should be equal to {{ compared_value }}. - {{ compared_value }}と等しくなければなりません。 - - - This value should be greater than {{ compared_value }}. - {{ compared_value }}より大きくなければなりません。 - - - This value should be greater than or equal to {{ compared_value }}. - {{ compared_value }}以上でなければなりません。 - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - {{ compared_value_type }}としての{{ compared_value }}と等しくなければなりません。 - - - This value should be less than {{ compared_value }}. - {{ compared_value }}未満でなければなりません。 - - - This value should be less than or equal to {{ compared_value }}. - {{ compared_value }}以下でなければなりません。 - - - This value should not be equal to {{ compared_value }}. - {{ compared_value }}と等しくてはいけません。 - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - {{ compared_value_type }}としての{{ compared_value }}と等しくてはいけません。 - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - 画像のアスペクト比が大きすぎます({{ ratio }})。{{ max_ratio }}までにしてください。 - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - 画像のアスペクト比が小さすぎます({{ ratio }})。{{ min_ratio }}以上にしてください。 - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - 画像が正方形になっています({{ width }}x{{ height }}ピクセル)。正方形の画像は許可されていません。 - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - 画像が横向きになっています({{ width }}x{{ height }}ピクセル)。横向きの画像は許可されていません。 - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - 画像が縦向きになっています({{ width }}x{{ height }}ピクセル)。縦向きの画像は許可されていません。 - - - An empty file is not allowed. - 空のファイルは許可されていません。 - - - The host could not be resolved. - ホストを解決できませんでした。 - - - This value does not match the expected {{ charset }} charset. - この値は予期される文字コード({{ charset }})と異なります。 - - - This is not a valid Business Identifier Code (BIC). - 有効なSWIFTコードではありません。 - - - Error - エラー - - - This is not a valid UUID. - 有効なUUIDではありません。 - - - This value should be a multiple of {{ compared_value }}. - {{ compared_value }}の倍数でなければなりません。 - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - このSWIFTコードはIBANコード({{ iban }})に関連付けられていません。 - - - This value should be valid JSON. - JSONでなければなりません。 - - - This collection should contain only unique elements. - 要素は重複してはなりません。 - - - This value should be positive. - 正の数でなければなりません。 - - - This value should be either positive or zero. - 正の数、または0でなければなりません。 - - - This value should be negative. - 負の数でなければなりません。 - - - This value should be either negative or zero. - 負の数、または0でなければなりません。 - - - This value is not a valid timezone. - 有効なタイムゾーンではありません。 - - - This password has been leaked in a data breach, it must not be used. Please use another password. - このパスワードは漏洩している為使用できません。 - - - This value should be between {{ min }} and {{ max }}. - {{ min }}以上{{ max }}以下でなければなりません。 - - - This value is not a valid hostname. - 有効なホスト名ではありません。 - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - 要素の数は{{ compared_value }}の倍数でなければなりません。 - - - This value should satisfy at least one of the following constraints: - 以下の制約のうち少なくとも1つを満たす必要があります: - - - Each element of this collection should satisfy its own set of constraints. - コレクションの各要素は、それぞれの制約を満たす必要があります。 - - - This value is not a valid International Securities Identification Number (ISIN). - この値は有効な国際証券識別番号(ISIN)ではありません。 - - - This value should be a valid expression. - 式でなければなりません。 - - - This value is not a valid CSS color. - この値は有効なCSSカラーではありません。 - - - This value is not a valid CIDR notation. - この値は有効なCIDR表記ではありません。 - - - The value of the netmask should be between {{ min }} and {{ max }}. - ネットマスクの値は、{{ min }}から{{ max }}の間にある必要があります。 - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.lb.xlf b/vendor/symfony/validator/Resources/translations/validators.lb.xlf deleted file mode 100644 index f27bbd4..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.lb.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Dëse Wäert sollt falsch sinn. - - - This value should be true. - Dëse Wäert sollt wouer sinn. - - - This value should be of type {{ type }}. - Dëse Wäert sollt vum Typ {{ type }} sinn. - - - This value should be blank. - Dëse Wäert sollt eidel sinn. - - - The value you selected is not a valid choice. - Dëse Wäert sollt enger vun de Wielméiglechkeeten entspriechen. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Et muss mindestens {{ limit }} Méiglechkeet ausgewielt ginn.|Et musse mindestens {{ limit }} Méiglechkeeten ausgewielt ginn. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Et dierf héchstens {{ limit }} Méiglechkeet ausgewielt ginn.|Et dierfen héchstens {{ limit }} Méiglechkeeten ausgewielt ginn. - - - One or more of the given values is invalid. - Een oder méi vun de Wäerter ass ongëlteg. - - - This field was not expected. - D'Feld gouf net erwaart. - - - This field is missing. - D'Feld feelt. - - - This value is not a valid date. - Dëse Wäert entsprécht kenger gëlteger Datumsangab. - - - This value is not a valid datetime. - Dëse Wäert entsprécht kenger gëlteger Datums- an Zäitangab. - - - This value is not a valid email address. - Dëse Wäert ass keng gëlteg Email-Adress. - - - The file could not be found. - De Fichier gouf net fonnt. - - - The file is not readable. - De Fichier ass net liesbar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - De Fichier ass ze grouss ({{ size }} {{ suffix }}). Déi zougeloosse Maximalgréisst bedréit {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Den Typ vum Fichier ass ongëlteg ({{ type }}). Erlaabten Type sinn {{ types }}. - - - This value should be {{ limit }} or less. - Dëse Wäert soll méi kleng oder gläich {{ limit }} sinn. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Dës Zeecheketten ass ze laang. Se sollt héchstens {{ limit }} Zeechen hunn. - - - This value should be {{ limit }} or more. - Dëse Wäert sollt méi grouss oder gläich {{ limit }} sinn. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Dës Zeecheketten ass ze kuerz. Se sollt mindestens {{ limit }} Zeechen hunn. - - - This value should not be blank. - Dëse Wäert sollt net eidel sinn. - - - This value should not be null. - Dëst sollt keen Null-Wäert sinn. - - - This value should be null. - Dëst sollt keen Null-Wäert sinn. - - - This value is not valid. - Dëse Wäert ass net gëlteg. - - - This value is not a valid time. - Dëse Wäert entsprécht kenger gëlteger Zäitangab. - - - This value is not a valid URL. - Dëse Wäert ass keng gëlteg URL. - - - The two values should be equal. - Béid Wäerter sollten identesch sinn. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - De fichier ass ze grouss. Déi maximal Gréisst dierf {{ limit }} {{ suffix }} net depasséieren. - - - The file is too large. - De Fichier ass ze grouss. - - - The file could not be uploaded. - De Fichier konnt net eropgeluede ginn. - - - This value should be a valid number. - Dëse Wäert sollt eng gëlteg Zuel sinn. - - - This file is not a valid image. - Dëse Fichier ass kee gëltegt Bild. - - - This is not a valid IP address. - Dëst ass keng gëlteg IP-Adress. - - - This value is not a valid language. - Dëse Wäert entsprécht kenger gëlteger Sprooch. - - - This value is not a valid locale. - Dëse Wäert entsprécht kengem gëltege Gebittsschema. - - - This value is not a valid country. - Dëse Wäert entsprécht kengem gëltege Land. - - - This value is already used. - Dëse Wäert gëtt scho benotzt. - - - The size of the image could not be detected. - D'Gréisst vum Bild konnt net detektéiert ginn. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - D'Breet vum Bild ass ze grouss ({{ width }}px). Déi erlaabte maximal Breet ass {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - D'Breet vum Bild ass ze kleng ({{ width }}px). Déi minimal Breet ass {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - D'Héicht vum Bild ass ze grouss ({{ height }}px). Déi erlaabte maximal Héicht ass {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - D'Héicht vum Bild ass ze kleng ({{ height }}px). Déi minimal Héicht ass {{ min_height }}px. - - - This value should be the user's current password. - Dëse Wäert sollt dem aktuelle Benotzerpasswuert entspriechen. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Dëse Wäert sollt exakt {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn. - - - The file was only partially uploaded. - De Fichier gouf just deelweis eropgelueden. - - - No file was uploaded. - Et gouf kee Fichier eropgelueden. - - - No temporary folder was configured in php.ini. - Et gouf keen temporären Dossier an der php.ini konfiguréiert oder den temporären Dossier existéiert net. - - - Cannot write temporary file to disk. - Den temporäre Fichier kann net gespäichert ginn. - - - A PHP extension caused the upload to fail. - Eng PHP-Erweiderung huet den Upload verhënnert. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Dës Sammlung sollt {{ limit }} oder méi Elementer hunn. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Dës Sammlung sollt {{ limit }} oder manner Elementer hunn. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Dës Sammlung sollt exakt {{ limit }} Element hunn.|Dës Sammlung sollt exakt {{ limit }} Elementer hunn. - - - Invalid card number. - Ongëlteg Kaartennummer. - - - Unsupported card type or invalid card number. - Net ënnerstëtzte Kaartentyp oder ongëlteg Kaartennummer. - - - This is not a valid International Bank Account Number (IBAN). - Dëst ass keng gëlteg IBAN-Kontonummer. - - - This value is not a valid ISBN-10. - Dëse Wäert ass keng gëlteg ISBN-10. - - - This value is not a valid ISBN-13. - Dëse Wäert ass keng gëlteg ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Dëse Wäert ass weder eng gëlteg ISBN-10 nach eng gëlteg ISBN-13. - - - This value is not a valid ISSN. - Dëse Wäert ass keng gëlteg ISSN. - - - This value is not a valid currency. - Dëse Wäert ass keng gëlteg Währung. - - - This value should be equal to {{ compared_value }}. - Dëse Wäert sollt {{ compared_value }} sinn. - - - This value should be greater than {{ compared_value }}. - Dëse Wäert sollt méi grouss wéi {{ compared_value }} sinn. - - - This value should be greater than or equal to {{ compared_value }}. - Dëse Wäert sollt méi grouss wéi oder gläich {{ compared_value }} sinn. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Dëse Wäert sollt identesch si mat {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Dëse Wäert sollt méi kleng wéi {{ compared_value }} sinn. - - - This value should be less than or equal to {{ compared_value }}. - Dëse Wäert sollt méi kleng wéi oder gläich {{ compared_value }} sinn. - - - This value should not be equal to {{ compared_value }}. - Dëse Wäert sollt net {{ compared_value }} sinn. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Dëse Wäert sollt net identesch si mat {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - D'Säiteverhältnis vum Bild ass ze grouss ({{ ratio }}). Den erlaabte Maximalwäert ass {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - D'Säiteverhältnis vum Bild ass ze kleng ({{ ratio }}). Den erwaarte Minimalwäert ass {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - D'Bild ass quadratesch ({{ width }}x{{ height }}px). Quadratesch Biller sinn net erlaabt. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - D'Bild ass am Queeschformat ({{ width }}x{{ height }}px). Biller am Queeschformat sinn net erlaabt. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - D'Bild ass am Héichformat ({{ width }}x{{ height }}px). Biller am Héichformat sinn net erlaabt. - - - An empty file is not allowed. - En eidele Fichier ass net erlaabt. - - - The host could not be resolved. - Den Host-Numm konnt net opgeléist ginn. - - - This value does not match the expected {{ charset }} charset. - Dëse Wäert entsprécht net dem erwaarten Zeechesaz {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Dëst ass kee gëltege "Business Identifier Code" (BIC). - - - Error - Feeler - - - This is not a valid UUID. - Dëst ass keng gëlteg UUID. - - - This value should be a multiple of {{ compared_value }}. - Dëse Wäert sollt e puer vun {{ compared_value }} sinn. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Dëse "Business Identifier Code" (BIC) ass net mat IBAN verbonnen {{ iban }}. - - - This value should be valid JSON. - Dëse Wäert sollt gëlteg JSON. - - - This collection should contain only unique elements. - Dës Sammlung sollt just eenzegaarteg Elementer enthalen. - - - This value should be positive. - Dëse Wäert sollt positiv sinn. - - - This value should be either positive or zero. - Dëse Wäert sollt entweeder positiv oder null sinn. - - - This value should be negative. - Dëse Wäert sollt negativ sinn. - - - This value should be either negative or zero. - Dëse Wäert sollt entweeder negativ oder null sinn. - - - This value is not a valid timezone. - Dëse Wäert ass keng gëlteg Zäitzon. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dëst Passwuert war Deel vun engem Dateleck an dierf net benotzt ginn. Benotzt w.e.g. en anert Passwuert . - - - This value should be between {{ min }} and {{ max }}. - De Wäert sollt tëscht {{ min }} a(n) {{ max }} leien. - - - This value is not a valid hostname. - Dëse Wäert ass kee gëltegen Hostnumm. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - D'Unzuel un Elementer an dëser Sammlung sollt e multipel vu(n) {{ compared_value }} sinn. - - - This value should satisfy at least one of the following constraints: - Dëse Wäert sollt op d'mannst ee vun dësen Aschränkungen erfëllen: - - - Each element of this collection should satisfy its own set of constraints. - All Element aus dëser Sammlung sollt seng eegen Aschränkungen erfëllen. - - - This value is not a valid International Securities Identification Number (ISIN). - Dëse Wäert ass keng gëlteg International Wäertpabeiererkennnummer (ISIN). - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.lt.xlf b/vendor/symfony/validator/Resources/translations/validators.lt.xlf deleted file mode 100644 index 7a2c4c5..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.lt.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Reikšmė turi būti neigiama. - - - This value should be true. - Reikšmė turi būti teigiama. - - - This value should be of type {{ type }}. - Šios reikšmės tipas turi būti {{ type }}. - - - This value should be blank. - Ši reikšmė turi būti tuščia. - - - The value you selected is not a valid choice. - Neteisingas pasirinkimas. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Turite pasirinkti bent {{ limit }} variantą.|Turite pasirinkti bent {{ limit }} variantus.|Turite pasirinkti bent {{ limit }} variantų. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Turite pasirinkti ne daugiau kaip {{ limit }} variantą.|Turite pasirinkti ne daugiau kaip {{ limit }} variantus.|Turite pasirinkti ne daugiau kaip {{ limit }} variantų. - - - One or more of the given values is invalid. - Viena ar daugiau įvestų reikšmių yra netinkamos. - - - This field was not expected. - Nebuvo tikimasi Šis laukas. - - - This field is missing. - Šiame lauke yra dingęs. - - - This value is not a valid date. - Ši reikšmė nėra data. - - - This value is not a valid datetime. - Ši reikšmė nera data ir laikas. - - - This value is not a valid email address. - Ši reikšmė nėra tinkamas el. pašto adresas. - - - The file could not be found. - Byla nerasta. - - - The file is not readable. - Negalima nuskaityti bylos. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Byla yra per didelė ({{ size }} {{ suffix }}). Maksimalus dydis {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Netinkamas bylos tipas (mime type) ({{ type }}). Galimi bylų tipai {{ types }}. - - - This value should be {{ limit }} or less. - Reikšmė turi būti {{ limit }} arba mažiau. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių.|Per didelis simbolių skaičius. Turi susidaryti iš {{ limit }} arba mažiau simbolių. - - - This value should be {{ limit }} or more. - Reikšmė turi būti {{ limit }} arba daugiau. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių.|Per mažas simbolių skaičius. Turi susidaryti iš {{ limit }} arba daugiau simbolių. - - - This value should not be blank. - Ši reikšmė negali būti tuščia. - - - This value should not be null. - Ši reikšmė negali būti null. - - - This value should be null. - Ši reikšmė turi būti null. - - - This value is not valid. - Netinkama reikšmė. - - - This value is not a valid time. - Ši reikšmė nėra laikas. - - - This value is not a valid URL. - Ši reikšmė nėra tinkamas interneto adresas. - - - The two values should be equal. - Abi reikšmės turi būti identiškos. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Byla yra per didelė. Maksimalus dydis yra {{ limit }} {{ suffix }}. - - - The file is too large. - Byla per didelė. - - - The file could not be uploaded. - Byla negali būti įkelta. - - - This value should be a valid number. - Ši reikšmė turi būti skaičius. - - - This file is not a valid image. - Byla nėra paveikslėlis. - - - This is not a valid IP address. - Ši reikšmė nėra tinkamas IP adresas. - - - This value is not a valid language. - Ši reikšmė nėra tinkama kalba. - - - This value is not a valid locale. - Ši reikšmė nėra tinkama lokalė. - - - This value is not a valid country. - Ši reikšmė nėra tinkama šalis. - - - This value is already used. - Ši reikšmė jau yra naudojama. - - - The size of the image could not be detected. - Nepavyko nustatyti nuotraukos dydžio. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Nuotraukos plotis per didelis ({{ width }}px). Maksimalus leidžiamas plotis yra {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Nuotraukos plotis per mažas ({{ width }}px). Minimalus leidžiamas plotis yra {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Nuotraukos aukštis per didelis ({{ height }}px). Maksimalus leidžiamas aukštis yra {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Nuotraukos aukštis per mažas ({{ height }}px). Minimalus leidžiamas aukštis yra {{ min_height }}px. - - - This value should be the user's current password. - Ši reikšmė turi sutapti su dabartiniu naudotojo slaptažodžiu. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ši reikšmė turi turėti lygiai {{ limit }} simbolį.|Ši reikšmė turi turėti lygiai {{ limit }} simbolius.|Ši reikšmė turi turėti lygiai {{ limit }} simbolių. - - - The file was only partially uploaded. - Failas buvo tik dalinai įkeltas. - - - No file was uploaded. - Nebuvo įkelta jokių failų. - - - No temporary folder was configured in php.ini. - Nėra sukonfiguruoto jokio laikino katalogo php.ini faile. - - - Cannot write temporary file to disk. - Nepavyko išsaugoti laikino failo. - - - A PHP extension caused the upload to fail. - PHP plėtinys sutrukdė failo įkėlimą ir jis nepavyko. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Sąraše turi būti {{ limit }} arba daugiau įrašų.|Sąraše turi būti {{ limit }} arba daugiau įrašų.|Sąraše turi būti {{ limit }} arba daugiau įrašų. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Sąraše turi būti {{ limit }} arba mažiau įrašų.|Sąraše turi būti {{ limit }} arba mažiau įrašų.|Sąraše turi būti {{ limit }} arba mažiau įrašų. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Sąraše turi būti lygiai {{ limit }} įrašas.|Sąraše turi būti lygiai {{ limit }} įrašai.|Sąraše turi būti lygiai {{ limit }} įrašų. - - - Invalid card number. - Klaidingas kortelės numeris. - - - Unsupported card type or invalid card number. - Kortelės tipas nepalaikomas arba klaidingas kortelės numeris. - - - This is not a valid International Bank Account Number (IBAN). - Ši reišmė neatitinka tarptautinio banko sąskaitos numerio formato (IBAN). - - - This value is not a valid ISBN-10. - Ši reikšmė neatitinka ISBN-10 formato. - - - This value is not a valid ISBN-13. - Ši reikšmė neatitinka ISBN-13 formato. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ši reikšmė neatitinka nei ISBN-10, nei ISBN-13 formato. - - - This value is not a valid ISSN. - Ši reišmė neatitinka ISSN formato. - - - This value is not a valid currency. - Netinkamas valiutos formatas. - - - This value should be equal to {{ compared_value }}. - Ši reikšmė turi būti lygi {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ši reikšmė turi būti didesnė už {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ši reikšmė turi būti didesnė už arba lygi {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ši reikšmė turi būti identiška {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ši reikšmė turi būti mažesnė už {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ši reikšmė turi būti mažesnė už arba lygi {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ši reikšmė neturi būti lygi {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ši reikšmė neturi būti identiška {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Nuotraukos santykis yra per didelis ({{ ratio }}). Didžiausias leistinas santykis yra {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Nuotraukos santykis yra per mažas ({{ ratio }}). Mažiausias leistinas santykis yra {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Nuotrauka yra kvadratinė ({{ width }}x{{ height }}px). Kvadratinės nuotraukos nėra leistinos. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Nuotrauka orientuota į plotį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į plotį nėra leistinos. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Nuotrauka orientuota į aukštį ({{ width }}x{{ height }}px). Nuotraukos orientuotos į aukštį nėra leistinos. - - - An empty file is not allowed. - Failas negali būti tuščias. - - - The host could not be resolved. - Serveris nepasiekiamas. - - - This value does not match the expected {{ charset }} charset. - Ši reikšmė neatitinka {{ charset }} koduotės. - - - This is not a valid Business Identifier Code (BIC). - Bendrovės Identifikavimo Kodas (BIC) nėra tinkamas. - - - Error - Klaida - - - This is not a valid UUID. - Ši reikšmė nėra tinkamas UUID. - - - This value should be a multiple of {{ compared_value }}. - Ši reikšmė turi būti skaičiaus {{ compared_value }} kartotinis. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Šis bendrovės identifikavimo kodas (BIC) nesusijęs su IBAN {{ iban }}. - - - This value should be valid JSON. - Ši reikšmė turi būti tinkamo JSON formato. - - - This collection should contain only unique elements. - Sąraše turi būti tik unikalios reikšmės. - - - This value should be positive. - Reikšmė turi būti teigiama. - - - This value should be either positive or zero. - Reikšmė turi būti teigiama arba lygi nuliui. - - - This value should be negative. - Reikšmė turi būti neigiama. - - - This value should be either negative or zero. - Reikšmė turi būti neigiama arba lygi nuliui. - - - This value is not a valid timezone. - Reikšmė nėra tinkama laiko juosta. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Slaptažodis yra nutekėjęs duomenų saugumo pažeidime, jo naudoti negalima. Prašome naudoti kitą slaptažodį. - - - This value should be between {{ min }} and {{ max }}. - Ši reikšmė turi būti tarp {{ min }} ir {{ max }}. - - - This value is not a valid hostname. - Ši reikšmė nėra tinkamas svetainės adresas. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Šio sąrašo elementų skaičius turėtų būti skaičiaus {{ compared_value }} kartotinis. - - - This value should satisfy at least one of the following constraints: - Ši reikšmė turėtų atitikti bent vieną iš šių nurodymų: - - - Each element of this collection should satisfy its own set of constraints. - Kiekvienas šio sąrašo elementas turi atitikti savo nurodymų rinkinį. - - - This value is not a valid International Securities Identification Number (ISIN). - Ši reišmė neatitinka tarptautinio vertybinių popierių identifikavimo numerio formato (ISIN). - - - This value should be a valid expression. - Ši vertė turėtų būti teisinga išraiška. - - - This value is not a valid CSS color. - Ši reikšmė nėra tinkama CSS spalva. - - - This value is not a valid CIDR notation. - Ši vertė nėra tinkamas CIDR žymėjimas. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Tinklo kaukės reikšmė turi būti nuo {{ min }} iki {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.lv.xlf b/vendor/symfony/validator/Resources/translations/validators.lv.xlf deleted file mode 100644 index fc71d5f..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.lv.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Šai vērtībai ir jābūt nepatiesai. - - - This value should be true. - Šai vērtībai ir jābūt patiesai. - - - This value should be of type {{ type }}. - Šīs vērtības tipam ir jābūt {{ type }}. - - - This value should be blank. - Šai vērtībai ir jābūt tukšai. - - - The value you selected is not a valid choice. - Vērtība, kuru jūs izvēlējāties nav derīga izvēle. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Jums nav jāveic izvēle.|Jums ir jāveic vismaz {{ limit }} izvēle.|Jums ir jāveic vismaz {{ limit }} izvēles. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Jums nav jāveic izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēles. - - - One or more of the given values is invalid. - Viena vai vairākas no dotajām vērtībām ir nederīgas. - - - This field was not expected. - Šis lauks netika gaidīts. - - - This field is missing. - Šis lauks ir pazudis. - - - This value is not a valid date. - Šī vērtība ir nederīgs datums. - - - This value is not a valid datetime. - Šī vērtība ir nederīgs datums un laiks - - - This value is not a valid email address. - Šī vērtība ir nederīga e-pasta adrese. - - - The file could not be found. - Fails nav atrasts. - - - The file is not readable. - Fails nav lasāms. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fails ir pārāk liels ({{ size }} {{ suffix }}). Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Faila mime tips nav derīgs ({{ type }}). Atļautie mime tipi ir {{ types }}. - - - This value should be {{ limit }} or less. - Šai vērtībai ir jābūt ne vairāk kā {{ limit }}. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmēm. - - - This value should be {{ limit }} or more. - Šai vērtībai ir jābūt ne mazāk kā {{ limit }}. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmēm. - - - This value should not be blank. - Šai vērtībai nav jābūt tukšai. - - - This value should not be null. - Šai vērtībai nav jābūt null. - - - This value should be null. - Šai vērtībai ir jābūt null. - - - This value is not valid. - Šī vērtība ir nederīga. - - - This value is not a valid time. - Šī vērtība ir nederīgs laiks. - - - This value is not a valid URL. - Šī vērtība ir nederīgs URL. - - - The two values should be equal. - Abām vērtībām jābūt vienādam. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fails ir pārāk liels. Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}. - - - The file is too large. - Fails ir pārāk liels. - - - The file could not be uploaded. - Failu nevarēja augšupielādēt. - - - This value should be a valid number. - Šai vērtībai ir jābūt derīgam skaitlim. - - - This file is not a valid image. - Šis fails nav derīgs attēls. - - - This is not a valid IP address. - Šī nav derīga IP adrese. - - - This value is not a valid language. - Šī vērtība nav derīga valoda. - - - This value is not a valid locale. - Šī vērtība nav derīga lokalizācija. - - - This value is not a valid country. - Šī vērtība nav derīga valsts. - - - This value is already used. - Šī vērtība jau tiek izmantota. - - - The size of the image could not be detected. - Nevar noteikt attēla izmēru. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Attēla platums ir pārāk liels ({{ width }}px). Atļautais maksimālais platums ir {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Attēla platums ir pārāk mazs ({{ width }}px). Minimālais sagaidāmais platums ir {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Attēla augstums ir pārāk liels ({{ height }}px). Atļautais maksimālais augstums ir {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Attēla augstums ir pārāk mazs ({{ height }}px). Minimālais sagaidāmais augstums ir {{ min_height }}px. - - - This value should be the user's current password. - Šai vērtībai ir jābūt lietotāja pašreizējai parolei. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Šīs vērtības garums ir 0 rakstzīmju.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmei.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmēm. - - - The file was only partially uploaded. - Fails bija tikai daļēji augšupielādēts. - - - No file was uploaded. - Fails netika augšupielādēts. - - - No temporary folder was configured in php.ini. - Pagaidu mape php.ini failā nav nokonfigurēta. - - - Cannot write temporary file to disk. - Nevar ierakstīt pagaidu failu uz diska. - - - A PHP extension caused the upload to fail. - PHP paplašinājums izraisīja augšupielādes neizdošanos. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Šis krājums satur 0 elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementus. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Šis krājums satur 0 elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementus. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Šis krājums satur 0 elementu.|Šim krājumam jāsatur tieši {{ limit }} elementu.|Šim krājumam jāsatur tieši {{ limit }} elementus. - - - Invalid card number. - Nederīgs kartes numurs. - - - Unsupported card type or invalid card number. - Neatbalstīts kartes tips vai nederīgs kartes numurs. - - - This is not a valid International Bank Account Number (IBAN). - Šis nav derīgs starptautisks banku konta numurs (IBAN). - - - This value is not a valid ISBN-10. - Šī vērtība nav derīgs ISBN-10 numurs. - - - This value is not a valid ISBN-13. - Šī vērtība nav derīgs ISBN-13 numurs - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Šī vērtība neatbilst ne derīgam ISBN-10 numuram, ne derīgm ISBN-13 numuram. - - - This value is not a valid ISSN. - Šī vērtība nav derīgs ISSN numurs - - - This value is not a valid currency. - Šī vērtība nav derīga valūta - - - This value should be equal to {{ compared_value }}. - Šai vērtībai ir jābūt vienādai ar {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Šai vērtībai ir jābūt lielākai par {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Šai vērtībai ir jābūt lielākai vai vienādai ar {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Šai vērtībai ir jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Šai vērtībai ir jābūt mazākai par {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Šai vērtībai ir jābūt mazākai vai vienādai ar {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Šai vērtībai ir jābūt vienādai ar {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Šai vērtībai nav jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Attēla attiecība ir pārāk liela ({{ ratio }}). Atļautā maksimālā attiecība ir {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Attēla attiecība ir pārāk maza ({{ ratio }}). Minimālā sagaidāmā attiecība ir {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Šis attēls ir kvadrāts ({{ width }}x{{ height }}px). Kvadrātveida attēli nav atļauti. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Attēls ir orientēts kā ainava ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā ainavas nav atļauti. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Attēls ir orientēts kā portrets ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā portreti nav atļauti. - - - An empty file is not allowed. - Tukšs fails nav atļauts. - - - The host could not be resolved. - Resursdatora nosaukumu nevar atrisināt. - - - This value does not match the expected {{ charset }} charset. - Šī vērtība neatbilst sagaidāmajai rakstzīmju kopai {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Šī vērtība nav derīgs Biznesa Identifikācijas Kods (BIC). - - - Error - Kļūda - - - This is not a valid UUID. - Šis nav derīgs UUID. - - - This value should be a multiple of {{ compared_value }}. - Šai vērtībai jābūt vairākas reizes atkārtotai {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Šis Biznesa Identifikācijas Kods (BIC) neatbilst {{ iban }} konta numuram (IBAN). - - - This value should be valid JSON. - Šai vērtībai jābūt derīgam JSON. - - - This collection should contain only unique elements. - Šai kolekcijai jāsatur tikai unikāli elementi. - - - This value should be positive. - Šai vērtībai jābūt pozitīvai. - - - This value should be either positive or zero. - Šai vērtībai jābūt pozitīvai vai vienādai ar nulli. - - - This value should be negative. - Šai vērtībai jābūt negatīvai. - - - This value should be either negative or zero. - Šai vērtībai jābūt negatīvai vai vienādai ar nulli. - - - This value is not a valid timezone. - Šī vērtība nav derīga laika zona. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Šī parole tika publicēta datu noplūdē, viņu nedrīkst izmantot. Lūdzu, izvēlieties citu paroli. - - - This value should be between {{ min }} and {{ max }}. - Šai vērtībai jābūt starp {{ min }} un {{ max }}. - - - This value is not a valid hostname. - Šī vērtība nav derīgs tīmekļa servera nosaukums. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Elementu skaitam šajā kolekcijā jābūt {{ compared_value }} reizinājumam. - - - This value should satisfy at least one of the following constraints: - Šai vērtībai jāiekļaujas vismaz vienā no sekojošiem ierobežojumiem: - - - Each element of this collection should satisfy its own set of constraints. - Šīs kolekcijas katram elementam jāiekļaujas savā ierobežojumu kopā. - - - This value is not a valid International Securities Identification Number (ISIN). - Šī vērtība nav derīgs starptautiskais vērtspapīru identifikācijas numurs (ISIN). - - - This value should be a valid expression. - Šai vērtībai jābūt korektai izteiksmei. - - - This value is not a valid CSS color. - Šī vērtība nav korekta CSS krāsa. - - - This value is not a valid CIDR notation. - Šī vērtība nav korekts CIDR apzīmējums. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Tīkla maskas (netmask) vērtībai jābūt starp {{ min }} un {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.mn.xlf b/vendor/symfony/validator/Resources/translations/validators.mn.xlf deleted file mode 100644 index b767dc8..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.mn.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Энэ утга буруу байх ёстой. - - - This value should be true. - Энэ утга үнэн байх ёстой. - - - This value should be of type {{ type }}. - Энэ утга {{ type }} -н төрөл байх ёстой. - - - This value should be blank. - Энэ утга хоосон байх ёстой. - - - The value you selected is not a valid choice. - Сонгосон утга буруу байна. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Хамгийн багадаа {{ limit }} утга сонгогдсон байх ёстой. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Хамгийн ихдээ {{ limit }} утга сонгогдох боломжтой. - - - One or more of the given values is invalid. - Өгөгдсөн нэг эсвэл нэгээс олон утга буруу байна. - - - This field was not expected. - Энэ талбар нь хүлээгдэж байсан юм. - - - This field is missing. - Энэ талбар нь алга болсон байна. - - - This value is not a valid date. - Энэ утга буруу date төрөл байна . - - - This value is not a valid datetime. - Энэ утга буруу цаг төрөл байна. - - - This value is not a valid email address. - И-майл хаяг буруу байна. - - - The file could not be found. - Файл олдсонгүй. - - - The file is not readable. - Файл уншигдахуйц биш байна. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файл хэтэрхий том байна ({{ size }} {{ suffix }}). Зөвшөөрөгдөх дээд хэмжээ {{ limit }} {{ suffix }} байна. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Файлын MIME-төрөл нь буруу байна ({{ type }}). Зөвшөөрөгдөх MIME-төрлүүд {{ types }}. - - - This value should be {{ limit }} or less. - Энэ утга {{ limit }} юмуу эсвэл бага байна. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Энэ утга хэтэрхий урт байна. {{ limit }} тэмдэгтийн урттай юмуу эсвэл бага байна. - - - This value should be {{ limit }} or more. - Энэ утга {{ limit }} юмуу эсвэл их байна. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Энэ утга хэтэрхий богино байна. {{ limit }} тэмдэгт эсвэл их байна. - - - This value should not be blank. - Энэ утга хоосон байж болохгүй. - - - This value should not be null. - Энэ утга null байж болохгүй. - - - This value should be null. - Энэ утга null байна. - - - This value is not valid. - Энэ утга буруу байна. - - - This value is not a valid time. - Энэ утга буруу цаг төрөл байна. - - - This value is not a valid URL. - Энэ утга буруу URL байна . - - - The two values should be equal. - Хоёр утгууд ижил байх ёстой. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файл хэтэрхий том байна. Зөвшөөрөгдөх дээд хэмжээ нь {{ limit }} {{ suffix }} байна. - - - The file is too large. - Файл хэтэрхий том байна. - - - The file could not be uploaded. - Файл upload хийгдсэнгүй. - - - This value should be a valid number. - Энэ утга зөвхөн тоо байна. - - - This file is not a valid image. - Файл зураг биш байна. - - - This is not a valid IP address. - IP хаяг зөв биш байна. - - - This value is not a valid language. - Энэ утга үнэн зөв хэл биш байна. - - - This value is not a valid locale. - Энэ утга үнэн зөв байршил биш байна. - - - This value is not a valid country. - Энэ утга үнэн бодит улс биш байна. - - - This value is already used. - Энэ утга аль хэдийнээ хэрэглэгдсэн байна. - - - The size of the image could not be detected. - Зургийн хэмжээ тогтоогдож чадсангүй. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Зургийн өргөн хэтэрхий том байна ({{ width }}px). Өргөн нь хамгийн ихдээ {{ max_width }}px байх боломжтой. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Зургийн өргөн хэтэрхий жижиг байна ({{ width }}px). Өргөн нь хамгийн багадаа {{ min_width }}px байх боломжтой. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Зургийн өндөр хэтэрхий том байна ({{ height }}px). Өндөр нь хамгийн ихдээ {{ max_height }}px байх боломжтой. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Зургийн өндөр хэтэрхий жижиг байна ({{ height }}px). Өндөр нь хамгийн багадаа {{ min_height }}px байх боломжтой. - - - This value should be the user's current password. - Энэ утга хэрэглэгчийн одоогийн нууц үг байх ёстой. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Энэ утга яг {{ limit }} тэмдэгт байх ёстой.|Энэ утга яг {{ limit }} тэмдэгт байх ёстой. - - - The file was only partially uploaded. - Файлын зөвхөн хагас нь upload хийгдсэн. - - - No file was uploaded. - Ямар ч файл upload хийгдсэнгүй. - - - No temporary folder was configured in php.ini. - php.ini дээр түр зуурын хавтсыг тохируулаагүй байна, эсвэл тохируулсан хавтас байхгүй байна. - - - Cannot write temporary file to disk. - Түр зуурын файлыг диск руу бичиж болохгүй байна. - - - A PHP extension caused the upload to fail. - PHP extension нь upload -г амжилтгүй болгоод байна. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Энэ коллекц {{ limit }} ба түүнээс дээш тооны элемент агуулах ёстой.|Энэ коллекц {{ limit }} ба түүнээс дээш тооны элемент агуулах ёстой. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Энэ коллекц {{ limit }} ба түүнээс доош тооны элемент агуулах ёстой.|Энэ коллекц {{ limit }} ба түүнээс доош тооны элемент агуулах ёстой. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Энэ коллекц яг {{ limit }} элемент агуулах ёстой.|Энэ коллекц яг {{ limit }} элемент агуулах ёстой. - - - Invalid card number. - Картын дугаар буруу байна. - - - Unsupported card type or invalid card number. - Дэмжигдээгүй картын төрөл эсвэл картын дугаар буруу байна. - - - This is not a valid International Bank Account Number (IBAN). - Энэ утга үнэн зөв Олон Улсын Банкны Дансны Дугаар (IBAN) биш байна. - - - This value is not a valid ISBN-10. - Энэ утга үнэн зөв ISBN-10 биш байна. - - - This value is not a valid ISBN-13. - Энэ утга үнэн зөв ISBN-13 биш байна. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Энэ утга үнэн зөв ISBN-10 юмуу ISBN-13 биш байна. - - - This value is not a valid ISSN. - Энэ утга үнэн зөв ISSN биш байна. - - - This value is not a valid currency. - Энэ утга үнэн бодит валют биш байна. - - - This value should be equal to {{ compared_value }}. - Энэ утга {{ compared_value }} -тaй тэнцүү байх ёстой. - - - This value should be greater than {{ compared_value }}. - Энэ утга {{ compared_value }} -с их байх ёстой. - - - This value should be greater than or equal to {{ compared_value }}. - Энэ утга {{ compared_value }} -тай тэнцүү юмуу эсвэл их байх ёстой. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Энэ утга {{ compared_value_type }} {{ compared_value }} -тай яг ижил байх ёстой. - - - This value should be less than {{ compared_value }}. - Энэ утга {{ compared_value }} -с бага байх ёстой. - - - This value should be less than or equal to {{ compared_value }}. - Энэ утга {{ compared_value }} -тай ижил юмуу эсвэл бага байх ёстой. - - - This value should not be equal to {{ compared_value }}. - Энэ утга {{ compared_value }} -тай тэнцүү байх ёсгүй. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Энэ утга {{ compared_value_type }} {{ compared_value }} -тай яг ижил байх ёсгүй. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Зургийн харьцаа хэтэрхий том байна ({{ ratio }}). Харьцаа нь хамгийн ихдээ {{ max_ratio }} байна. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Зургийн харьцаа хэтэрхий жижиг байна ({{ ratio }}). Харьцаа нь хамгийн багадаа {{ min_ratio }} байна. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Зураг дөрвөлжин хэлбэртэй байна ({{ width }}x{{ height }}px). Дөрвөлжин зургууд оруулах боломжгүй. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Зураг хэвтээ байрлалтай байна ({{ width }}x{{ height }}px). Хэвтээ байрлалтай зургууд оруулах боломжгүй. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Зургууд босоо байрлалтай байна ({{ width }}x{{ height }}px). Босоо байрлалтай зургууд оруулах боломжгүй. - - - An empty file is not allowed. - Хоосон файл оруулах боломжгүй. - - - The host could not be resolved. - Хост зөв тохирогдоогүй байна. - - - This value does not match the expected {{ charset }} charset. - Энэ утга тооцоолсон {{ charset }} тэмдэгттэй таарахгүй байна. - - - This is not a valid Business Identifier Code (BIC). - Энэ утга үнэн зөв Business Identifier Code (BIC) биш байна. - - - Error - Алдаа - - - This is not a valid UUID. - Энэ утга үнэн зөв UUID биш байна. - - - This value should be a multiple of {{ compared_value }}. - Энэ утга {{ compared_value }} -н үржвэр байх ёстой. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Энэ Business Identifier Code (BIC) код нь IBAN {{ iban }} -тай холбоогүй байна. - - - This value should be valid JSON. - Энэ утга JSON байх ёстой. - - - This collection should contain only unique elements. - Энэ коллекц зөвхөн давтагдахгүй элементүүд агуулах ёстой. - - - This value should be positive. - Энэ утга эерэг байх ёстой. - - - This value should be either positive or zero. - Энэ утга тэг эсвэл эерэг байх ёстой. - - - This value should be negative. - Энэ утга сөрөг байх ёстой. - - - This value should be either negative or zero. - Энэ утга сөрөг эсвэл тэг байх ёстой. - - - This value is not a valid timezone. - Энэ утга үнэн зөв цагийн бүс биш байна. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Энэ нууц үгийн мэдээлэл алдагдсан байх магадлалтай учраас дахин ашиглагдах ёсгүй. Өөр нууц үг ашиглана уу. - - - This value should be between {{ min }} and {{ max }}. - Энэ утга {{ min }} -с {{ max }} хооронд байх ёстой. - - - This value is not a valid hostname. - Энэ утга буруу hostname байна. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Энэхүү цуглуулган дахь элемэнтийн тоо, {{ compared_value }}-н үржвэр байх ёстой. - - - This value should satisfy at least one of the following constraints: - Энэ утга доорх болзолуудын ядаж нэгийг хангах ёстой: - - - Each element of this collection should satisfy its own set of constraints. - Энэхүү цуглуулган дахь элемэнтүүд өөр өөрсдийн болзолуудаа хангах ёстой. - - - This value is not a valid International Securities Identification Number (ISIN). - Энэ утга зөв International Securities Identification Number (ISIN) биш байна. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.my.xlf b/vendor/symfony/validator/Resources/translations/validators.my.xlf deleted file mode 100644 index 7f45aae..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.my.xlf +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - This value should be false. - ဤတန်ဖိုးသည် false ဖြစ်ရမည်။ - - - This value should be true. - ဤတန်ဖိုးသည် true ဖြစ်ရမည်။ - - - This value should be of type {{ type }}. - ဤတန်ဖိုးသည် {{ type }} အမျိုးအစားဖြစ်ရမည်။ - - - This value should be blank. - ဤတန်ဖိုးသည် ကွပ်လပ်မဖြစ်သင့်ပါ။ - - - The value you selected is not a valid choice. - သင်ရွေးချယ်သောတန်ဖိုးသည် သင့်လျှော်သော် တန်ဖိုးမဟုတ်ပါ။ - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - သင်သည် အနည်းဆုံးရွေးချယ်မှု {{ limit }} ခုရွေးချယ်ရမည်။ - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - သင်သည်အများဆုံး {{ limit }} ခုသာရွေးချယ်ခွင့်ရှိသည်။ - - - One or more of the given values is invalid. - ပေးထားသောတန်ဖိုးတစ်ခု (သို့မဟုတ်) တစ်ခုထက်ပို၍မမှန်ကန်ပါ။ - - - This field was not expected. - ဤကွက်လပ်ကိုမမျှော်လင့်ထားပါ။ - - - This field is missing. - ဤကွက်လပ်ကိုမမျှော်လင့်ထားပါ။ - - - This value is not a valid date. - ဤတန်ဖိုးသည်မှန်ကန်သော်ရက်စွဲမဟုတ်ပါ။ - - - This value is not a valid datetime. - ဤတန်ဖိုးသည် မှန်ကန်သော် ရက်စွဲ/အချိန် မဟုတ်ပါ။ - - - This value is not a valid email address. - ဤတန်ဖိုးသည် မှန်ကန်သော် အီးမေးလိပ်စာ မဟုတ်ပါ။ - - - The file could not be found. - ဖိုင်ရှာမတွေ့ပါ။ - - - The file is not readable. - ဤဖိုင်ကို ဖတ်၍မရပါ။ - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - ဖိုင်အရွယ်အစား အလွန်ကြီးနေသည် ({{ size }} {{ suffix }}). ခွင့်ပြုထားသော အများဆုံး ဖိုင်ဆိုဒ်သည် {{ limit }} {{ suffix }} ဖြစ်သည်။ - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - ဖိုင်၏ mime အမျိုးအစားမမှန်ကန်ပါ ({{ type }})။ ခွင့်ပြုထားသော mime အမျိုးအစားများမှာ {{ types }}. - - - This value should be {{ limit }} or less. - ဤတန်ဖိုးသည် {{ limit }} (သို့မဟုတ်) {{ limit }} ထက်နည်းသင့်သည်။ - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - ဤတန်ဖိုးသည် အလွန်ရှည်လွန်းသည်။ ၎င်းတွင်အက္ခရာ {{ limit }} (သို့မဟုတ်) ၎င်းထက်နည်းသင့်သည်။ | ဤတန်ဖိုးသည် အလွန်ရှည်လွန်းသည်။ ၎င်းတွင်အက္ခရာ {{limit}} ခုနှင့်အထက်ရှိသင့်သည်။ - - - This value should be {{ limit }} or more. - ဤတန်ဖိုးသည် {{limit}} (သို့မဟုတ်) ထို့ထက်ပိုသင့်သည်။ - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - ဤတန်ဖိုးသည် အလွန်တိုလွန်းသည်။ ၎င်းတွင်အက္ခရာ {{limit}} (သို့မဟုတ်) ထို့ထက်ပိုရှိသင့်သည်။ | ဤတန်ဖိုးသည်တိုလွန်းသည်။ ၎င်းတွင်အက္ခရာ {{limit}} လုံးနှင့်အထက်ရှိသင့်သည်။ - - - This value should not be blank. - ဤတန်ဖိုးသည်ကွက်လပ်မဖြစ်သင့်ပါ။ - - - This value should not be null. - ဤတန်ဖိုးသည် null မဖြစ်သင့်ပါ။ - - - This value should be null. - ဤတန်ဖိုးသည် null ဖြစ်သင့်သည်။ - - - This value is not valid. - ဤတန်ဖိုးသည်မှန်ကန်သောတန်ဖိုးမဟုတ်ပါ။ - - - This value is not a valid time. - ဤတန်ဖိုးသည်မှန်ကန်သော အချိန်တန်ဖိုးမဟုတ်ပါ။ - - - This value is not a valid URL. - ဤတန်ဖိုးသည်မှန်ကန်သော URL တန်ဖိုးမဟုတ်ပါ။ - - - The two values should be equal. - တန်ဖိုးနှစ်ခုသည် တူညီသင့်သည်။ - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - ဤဖိုင်သည် အလွန်ကြီးသည်။ ခွင့်ပြုထားသည့်အများဆုံးဖိုင်အရွယ်အစားသည် {{ limit }} {{ suffix }} ဖြစ်သည်။ - - - The file is too large. - ဤဖိုင်သည် အလွန်ကြီးသည်။ - - - The file could not be uploaded. - ဤဖိုင်ကိုတင်၍မရပါ။ - - - This value should be a valid number. - ဤတန်ဖိုးသည်မှန်ကန်သောနံပါတ်ဖြစ်သင့်သည်။ - - - This file is not a valid image. - ဤဖိုင်သည်မှန်ကန်သော ဓါတ်ပုံမဟုတ်ပါ။ - - - This is not a valid IP address. - ၎င်းသည်တရားဝင် IP လိပ်စာမဟုတ်ပါ။ - - - This value is not a valid language. - ဤတန်ဖိုးသည် မှန်ကန်သောဘာသာစကားမဟုတ်ပါ။ - - - This value is not a valid locale. - ဤတန်ဖိုးသည်မှန်ကန်သောဘာသာပြန်မဟုတ်ပါ။ - - - This value is not a valid country. - ဤတန်ဖိုးသည်မှန်ကန်သောနိုင်ငံမဟုတ်ပါ။ - - - This value is already used. - ဤတန်ဖိုးသည် အသုံးပြုပြီးသားဖြစ်သည်။ - - - The size of the image could not be detected. - ဓါတ်ပုံအရွယ်အစားကိုရှာမတွေ့ပါ။ - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - ပုံ၏အလျားသည် ကြီးလွန်းသည် ({{ width }}px)။ ခွင့်ပြုထားသည့်အများဆုံးအလျားသည် {{max_width}}px ဖြစ်သည်။ - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - ပုံ၏အလျားသည် သေးလွန်းသည် ({{ width }}px)။ ခွင့်ပြုထားသည့်အနည်းဆုံးအလျားသည် {{max_width}}px ဖြစ်သည်။ - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - ပုံ၏အနံသည် ကြီးလွန်းသည် ({{ height }}px)။ ခွင့်ပြုထားသည့်အများဆုံးအနံသည် {{max_height}}px ဖြစ်သည်။ - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - ပုံ၏အနံသည် သေးလွန်းသည် ({{ height }}px)။ ခွင့်ပြုထားသည့်အနည်းဆုံးအနံသည် {{min_height}}px ဖြစ်သည်။ - - - This value should be the user's current password. - ဤတန်ဖိုးသည်အသုံးပြုသူ၏ လက်ရှိစကားဝှက်ဖြစ်သင့်သည်။ - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - ဤတန်ဖိုးသည်စာလုံး {{limit}} အတိအကျရှိသင့်သည်။ - - - The file was only partially uploaded. - ဤဖိုင်သည်တစ်စိတ်တစ်ပိုင်းသာ upload တင်ခဲ့သည်။ - - - No file was uploaded. - မည်သည့် ဖိုင်မျှ upload မလုပ်ခဲ့ပါ။ - - - No temporary folder was configured in php.ini. - php.ini တွင်ယာယီဖိုင်တွဲကိုပြင်ဆင်ထားခြင်းမရှိပါ၊ - - - Cannot write temporary file to disk. - ယာရီဖိုင်ကို disk မရေးနိုင်ပါ။ - - - A PHP extension caused the upload to fail. - PHP extension တစ်ခုကြောင့် upload တင်၍မရနိုင်ပါ။ - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - ဤ collection တွင် {{limit}} element (သို့မဟုတ်) ထို့ထက်မပိုသင့်ပါ။ - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - ဤ collection တွင် {{limit}} element (သို့မဟုတ်) ၎င်းထက်နည်းသင့်သည်။ - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - ဤစုစည်းမှုတွင် {{limit}} element အတိအကျပါသင့်သည်။ - - - Invalid card number. - ကဒ်နံပါတ်မမှန်ပါ။ - - - Unsupported card type or invalid card number. - ကဒ်အမျိုးအစားမမှန်ပါ (သို့မဟုတ်) ကဒ်နံပါတ်မမှန်ပါ။ - - - This is not a valid International Bank Account Number (IBAN). - ဤတန်ဖိုးသည် တရား၀င်နိုင်ငံတကာဘဏ်အကောင့်နံပါတ် (International Bank Account Number, IBAN) မဟုတ်ပါ။ - - - This value is not a valid ISBN-10. - ဤတန်ဖိုးသည် မှန်ကန်သော ISBN-10 တန်ဖိုးမဟုတ်ပါ၊ - - - This value is not a valid ISBN-13. - ဤတန်ဖိုးသည် မှန်ကန်သော ISBN-13 တန်ဖိုးမဟုတ်ပါ၊ - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - ဤတန်ဖိုးသည် သင့်လျှော်သော် ISBN-10 (သို့မဟုတ်) ISBN-13 တန်ဖိုးမဟုတ်ပါ၊ - - - This value is not a valid ISSN. - ဤတန်ဖိုးသည် သင့်လျှော်သော် ISSN တန်ဖိုးမဟုတ်ပါ။ - - - This value is not a valid currency. - ဤတန်ဖိုးသည် သင့်လျှော်သော် ငွေကြေးတန်ဖိုးမဟုတ်ပါ။ - - - This value should be equal to {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} နှင့်ညီသင့်သည်။ - - - This value should be greater than {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} ထက်ကြီးသင့်သည်။ - - - This value should be greater than or equal to {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} ထက်ကြီးသင့်သည် (သို့မဟုတ်) ဤတန်ဖိုးသည် {{ compared_value }} ညီသင့်သည်။ - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value_type }} {{ compared_value }} နှင့်ထပ်တူညီမျှသင့်သည်။ - - - This value should be less than {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} ထက်မနဲသောတဲ့ တန်ဖိုးဖြစ်သင့်သည်။ - - - This value should be less than or equal to {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} ထက် မနည်းသောတန်ဖိုး (သို့မဟုတ်) ညီမျှသောတန်ဖိုးဖြစ်သင့်သည်။ - - - This value should not be equal to {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value }} နှင့်မညီသင့်ပါ။ - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - ဤတန်ဖိုးသည် {{ compared_value_type }} {{ compared_value }} နှင့်ထပ်တူမညီမျှသင့်သည်။ - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - ဤဓာတ်ပုံအချိုးအစားသည်အလွန်ကြီးလွန်းသည်။ ({{ ratio }})။ ခွင့်ပြုထားသောဓာတ်ပုံအချိုးအသားသည် {{ max_ratio }} ဖြစ်သည်။ - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - ဤဓာတ်ပုံအချိုးအစားသည်အလွန်သေးလွန်းသည်။ ({{ ratio }})။ ခွင့်ပြုထားသောဓာတ်ပုံအချိုးအသားသည် {{ min_ratio }} ဖြစ်သည်။ - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - ဤဓာတ်ပုံသည် စတုရန်းဖြစ်နေသည် ({{ width }}x{{ height }}px)။ စတုရန်းဓာတ်ပုံများကို ခွင့်မပြုပါ။ - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - ဤဓာတ်ပုံသည် အလျှားလိုက်ဖြစ်နေသည် ({{ width }}x{{ height }}px). အလျှားလိုက်ဓာတ်ပုံများခွင့်မပြုပါ။ - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - ဤဓာတ်ပုံသည် ဒေါင်လိုက်ဖြစ်နေသည် ({{ width }}x{{ height }}px). ဒေါင်လိုက်ဓာတ်ပုံများခွင့်မပြုပါ။ - - - An empty file is not allowed. - ဖိုင်အလွတ်ကိုတင်ခွင့်မပြုပါ။ - - - The host could not be resolved. - host ဖြေရှင်း၍မနိုင်ပါ။ - - - This value does not match the expected {{ charset }} charset. - ဤတန်ဖိုးသည် မျှော်မှန်းထားသော {{ charset }} စားလုံးနှင့် ကိုက်ညီမှုမရှိပါ။ - - - This is not a valid Business Identifier Code (BIC). - ၎င်းသည်မှန်ကန်သော Business Identifier Code (BIC) မဟုတ်ပါ။ - - - Error - အမှား - - - This is not a valid UUID. - ဤတန်ဖိုးသည် သင့်လျှော်သော် UUID မဟုတ်ပါ။ - - - This value should be a multiple of {{ compared_value }}. - ဤတန်ဖိုးသည် {{compared_value}} ၏ စတူတန်ဖိုးဖြစ်သင့်သည်။ - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - ဤ Business Identifier Code (BIC) သည် IBAN {{ iban }} နှင့်ဆက်စပ်မှုမရှိပါ။ - - - This value should be valid JSON. - ဤတန်ဖိုးသည် သင့်လျှော်သော် JSON တန်ဖိုးဖြစ်သင့်သည်။ - - - This collection should contain only unique elements. - ဤ collection ကိုယ်ပိုင် elements များ ပါသင့်သည်။ - - - This value should be positive. - ဤတန်ဖိုးသည် အပေါင်းဖြစ်သင့်သည်။ - - - This value should be either positive or zero. - ဤတန်ဖိုးသည် အပေါင်း (သို့မဟုတ်) သုည ဖြစ်သင့်သည်။ - - - This value should be negative. - ဤတန်ဖိုးသည် အနုတ် ဖြစ်သင့်သည်။ - - - This value should be either negative or zero. - ဤတန်ဖိုးသည် အနုတ် (သို့မဟုတ်) သုည ဖြစ်သင့်သည်။ - - - This value is not a valid timezone. - ဤတန်ဖိုးသည် မှန်ကန်သော အချိန်ဇုန်မဟုတ်ပါ။ - - - This password has been leaked in a data breach, it must not be used. Please use another password. - ဤစကားဝှက် သည် ဒေတာပေါက်ကြားမှုတစ်ခုဖြစ်ခဲ့သည်။ ဤစကား၀ှက်ကိုအသုံးမပြုရပါ။ ကျေးဇူးပြု၍ အခြားစကားဝှက်ကိုသုံးပါ။ - - - This value should be between {{ min }} and {{ max }}. - ဤတန်ဖိုးသည် {{ min }} နှင့် {{ max }} ကြားရှိသင့်သည်။ - - - This value is not a valid hostname. - ဤတန်ဖိုးသည် သင့်လျှော်သော် hostname မဟုတ်ပါ။ - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - ဤ collection တွင်ပါပါ၀င်သော elements အရေအတွက်သည် {{ compared_value }} ၏ စတူဖြစ်သင့်သည်။ - - - This value should satisfy at least one of the following constraints: - ဤတန်ဖိုးသည် အောက်ပါကန့်သတ်ချက်များအနက်မှအနည်းဆုံးတစ်ခု ဖြည့်ဆည်းပေးသင့်သည်။ - - - Each element of this collection should satisfy its own set of constraints. - ဤ collection ၏ element တစ်ခုစီသည်၎င်း၏ကိုယ်ပိုင်ကန့်သတ်ချက်များကိုဖြည့်ဆည်းသင့်သည်။ - - - This value is not a valid International Securities Identification Number (ISIN). - ဤတန်ဖိုးသည် သင့်လျှော်သော် အပြည်ပြည်ဆိုင်ရာငွေချေးသက်သေခံနံပါတ် ,International Securities Identification Number (ISIN) မဟုတ်ပါ။ - - - This value should be a valid expression. - ဤတန်ဖိုးသည်မှန်ကန်သောစကားရပ်ဖြစ်သင့်သည်။ - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.nb.xlf b/vendor/symfony/validator/Resources/translations/validators.nb.xlf deleted file mode 100644 index 93132ec..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.nb.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Verdien må være usann. - - - This value should be true. - Verdien må være sann. - - - This value should be of type {{ type }}. - Verdien skal ha typen {{ type }}. - - - This value should be blank. - Verdien skal være blank. - - - The value you selected is not a valid choice. - Den valgte verdien er ikke gyldig. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Du må velge minst {{ limit }} valg. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Du kan maks velge {{ limit }} valg. - - - One or more of the given values is invalid. - En eller flere av de oppgitte verdiene er ugyldige. - - - This field was not expected. - Dette feltet var ikke forventet. - - - This field is missing. - Dette feltet mangler. - - - This value is not a valid date. - Verdien er ikke en gyldig dato. - - - This value is not a valid datetime. - Verdien er ikke en gyldig dato/tid. - - - This value is not a valid email address. - Verdien er ikke en gyldig e-postadresse. - - - The file could not be found. - Filen kunne ikke finnes. - - - The file is not readable. - Filen er ikke lesbar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}. - - - This value should be {{ limit }} or less. - Verdien må være {{ limit }} tegn lang eller mindre. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Verdien er for lang. Den må ha {{ limit }} tegn eller mindre. - - - This value should be {{ limit }} or more. - Verdien må være {{ limit }} eller mer. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Verdien er for kort. Den må ha {{ limit }} tegn eller flere. - - - This value should not be blank. - Verdien kan ikke være blank. - - - This value should not be null. - Verdien kan ikke være tom (null). - - - This value should be null. - Verdien skal være tom (null). - - - This value is not valid. - Verdien er ugyldig. - - - This value is not a valid time. - Verdien er ikke en gyldig tid. - - - This value is not a valid URL. - Verdien er ikke en gyldig URL. - - - The two values should be equal. - Verdiene skal være identiske. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}. - - - The file is too large. - Filen er for stor. - - - The file could not be uploaded. - Filen kunne ikke lastes opp. - - - This value should be a valid number. - Verdien skal være et gyldig tall. - - - This file is not a valid image. - Denne filen er ikke et gyldig bilde. - - - This is not a valid IP address. - Dette er ikke en gyldig IP adresse. - - - This value is not a valid language. - Verdien er ikke et gyldig språk. - - - This value is not a valid locale. - Verdien er ikke en gyldig lokalitet. - - - This value is not a valid country. - Verdien er ikke et gyldig navn på land. - - - This value is already used. - Verdien er allerede brukt. - - - The size of the image could not be detected. - Bildestørrelsen kunne ikke oppdages. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler. - - - This value should be the user's current password. - Verdien skal være brukerens sitt nåværende passord. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Verdien skal være nøyaktig {{ limit }} tegn. - - - The file was only partially uploaded. - Filen var kun delvis opplastet. - - - No file was uploaded. - Ingen fil var lastet opp. - - - No temporary folder was configured in php.ini. - Den midlertidige mappen (tmp) er ikke konfigurert i php.ini. - - - Cannot write temporary file to disk. - Kan ikke skrive midlertidig fil til disk. - - - A PHP extension caused the upload to fail. - En PHP-utvidelse forårsaket en feil under opplasting. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Denne samlingen må inneholde {{ limit }} element eller flere.|Denne samlingen må inneholde {{ limit }} elementer eller flere. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Denne samlingen må inneholde {{ limit }} element eller færre.|Denne samlingen må inneholde {{ limit }} elementer eller færre. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Denne samlingen må inneholde nøyaktig {{ limit }} element.|Denne samlingen må inneholde nøyaktig {{ limit }} elementer. - - - Invalid card number. - Ugyldig kortnummer. - - - Unsupported card type or invalid card number. - Korttypen er ikke støttet eller kortnummeret er ugyldig. - - - This is not a valid International Bank Account Number (IBAN). - Dette er ikke et gyldig IBAN-nummer. - - - This value is not a valid ISBN-10. - Verdien er ikke en gyldig ISBN-10. - - - This value is not a valid ISBN-13. - Verdien er ikke en gyldig ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Verdien er hverken en gyldig ISBN-10 eller ISBN-13. - - - This value is not a valid ISSN. - Verdien er ikke en gyldig ISSN. - - - This value is not a valid currency. - Verdien er ikke gyldig valuta. - - - This value should be equal to {{ compared_value }}. - Verdien skal være lik {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Verdien skal være større enn {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Verdien skal være større enn eller lik {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Verdien skal være mindre enn {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Verdien skal være mindre enn eller lik {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Verdien skal ikke være lik {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Bildet er i stående retning ({{ width }}x{{ height }}px). Bilder i stående retning er ikke tillatt. - - - An empty file is not allowed. - Tomme filer er ikke tilatt. - - - The host could not be resolved. - Vertsnavn kunne ikke løses. - - - This value does not match the expected {{ charset }} charset. - Verdien samsvarer ikke med forventet tegnsett {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Dette er ikke en gyldig BIC. - - - Error - Feil - - - This is not a valid UUID. - Dette er ikke en gyldig UUID. - - - This value should be a multiple of {{ compared_value }}. - Verdien skal være flertall av {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Business Identifier Code (BIC) er ikke tilknyttet en IBAN {{ iban }}. - - - This value should be valid JSON. - Verdien er ikke gyldig JSON. - - - This collection should contain only unique elements. - Samlingen kan kun inneholde unike elementer. - - - This value should be positive. - Denne verdien må være positiv. - - - This value should be either positive or zero. - Denne verdien må være positiv eller null. - - - This value should be negative. - Denne verdien må være negativ. - - - This value should be either negative or zero. - Denne verdien må være negativ eller null. - - - This value is not a valid timezone. - Verdien er ikke en gyldig tidssone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dette passordet er lekket i et datainnbrudd, det må ikke tas i bruk. Vennligst bruk et annet passord. - - - This value should be between {{ min }} and {{ max }}. - Verdien må være mellom {{ min }} og {{ max }}. - - - This value is not a valid hostname. - Denne verdien er ikke et gyldig vertsnavn. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Antall elementer i denne samlingen bør være et multiplum av {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Denne verdien skal tilfredsstille minst en av følgende begrensninger: - - - Each element of this collection should satisfy its own set of constraints. - Hvert element i denne samlingen skal tilfredsstille sitt eget sett med begrensninger. - - - This value is not a valid International Securities Identification Number (ISIN). - Denne verdien er ikke et gyldig International Securities Identification Number (ISIN). - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.nl.xlf b/vendor/symfony/validator/Resources/translations/validators.nl.xlf deleted file mode 100644 index 97d1da0..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.nl.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Deze waarde moet onwaar zijn. - - - This value should be true. - Deze waarde moet waar zijn. - - - This value should be of type {{ type }}. - Deze waarde moet van het type {{ type }} zijn. - - - This value should be blank. - Deze waarde moet leeg zijn. - - - The value you selected is not a valid choice. - De geselecteerde waarde is geen geldige optie. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Selecteer ten minste {{ limit }} optie.|Selecteer ten minste {{ limit }} opties. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Selecteer maximaal {{ limit }} optie.|Selecteer maximaal {{ limit }} opties. - - - One or more of the given values is invalid. - Eén of meer van de ingegeven waarden zijn ongeldig. - - - This field was not expected. - Dit veld werd niet verwacht. - - - This field is missing. - Dit veld ontbreekt. - - - This value is not a valid date. - Deze waarde is geen geldige datum. - - - This value is not a valid datetime. - Deze waarde is geen geldige datum en tijd. - - - This value is not a valid email address. - Deze waarde is geen geldig e-mailadres. - - - The file could not be found. - Het bestand kon niet gevonden worden. - - - The file is not readable. - Het bestand is niet leesbaar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}. - - - This value should be {{ limit }} or less. - Deze waarde moet {{ limit }} of minder zijn. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Deze waarde is te lang. Hij mag maximaal {{ limit }} teken bevatten.|Deze waarde is te lang. Hij mag maximaal {{ limit }} tekens bevatten. - - - This value should be {{ limit }} or more. - Deze waarde moet {{ limit }} of meer zijn. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Deze waarde is te kort. Hij moet tenminste {{ limit }} teken bevatten.|Deze waarde is te kort. Hij moet tenminste {{ limit }} tekens bevatten. - - - This value should not be blank. - Deze waarde mag niet leeg zijn. - - - This value should not be null. - Deze waarde mag niet null zijn. - - - This value should be null. - Deze waarde moet null zijn. - - - This value is not valid. - Deze waarde is niet geldig. - - - This value is not a valid time. - Deze waarde is geen geldige tijd. - - - This value is not a valid URL. - Deze waarde is geen geldige URL. - - - The two values should be equal. - De twee waarden moeten gelijk zijn. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}. - - - The file is too large. - Het bestand is te groot. - - - The file could not be uploaded. - Het bestand kon niet worden geüpload. - - - This value should be a valid number. - Deze waarde moet een geldig getal zijn. - - - This file is not a valid image. - Dit bestand is geen geldige afbeelding. - - - This is not a valid IP address. - Dit is geen geldig IP-adres. - - - This value is not a valid language. - Deze waarde is geen geldige taal. - - - This value is not a valid locale. - Deze waarde is geen geldige locale. - - - This value is not a valid country. - Deze waarde is geen geldig land. - - - This value is already used. - Deze waarde wordt al gebruikt. - - - The size of the image could not be detected. - De grootte van de afbeelding kon niet bepaald worden. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - De afbeelding is niet breed genoeg ({{ width }}px). De minimaal verwachte breedte is {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - De afbeelding is niet hoog genoeg ({{ height }}px). De minimaal verwachte hoogte is {{ min_height }}px. - - - This value should be the user's current password. - Deze waarde moet het huidige wachtwoord van de gebruiker zijn. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Deze waarde moet exact {{ limit }} teken lang zijn.|Deze waarde moet exact {{ limit }} tekens lang zijn. - - - The file was only partially uploaded. - Het bestand is slechts gedeeltelijk geüpload. - - - No file was uploaded. - Er is geen bestand geüpload. - - - No temporary folder was configured in php.ini. - Er is geen tijdelijke map geconfigureerd in php.ini, of de gespecificeerde map bestaat niet. - - - Cannot write temporary file to disk. - Kan het tijdelijke bestand niet wegschrijven op disk. - - - A PHP extension caused the upload to fail. - De upload is mislukt vanwege een PHP-extensie. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Deze collectie moet {{ limit }} element of meer bevatten.|Deze collectie moet {{ limit }} elementen of meer bevatten. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Deze collectie moet {{ limit }} element of minder bevatten.|Deze collectie moet {{ limit }} elementen of minder bevatten. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Deze collectie moet exact {{ limit }} element bevatten.|Deze collectie moet exact {{ limit }} elementen bevatten. - - - Invalid card number. - Ongeldig creditcardnummer. - - - Unsupported card type or invalid card number. - Niet-ondersteund type creditcard of ongeldig nummer. - - - This is not a valid International Bank Account Number (IBAN). - Dit is geen geldig internationaal bankrekeningnummer (IBAN). - - - This value is not a valid ISBN-10. - Deze waarde is geen geldige ISBN-10. - - - This value is not a valid ISBN-13. - Deze waarde is geen geldige ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Deze waarde is geen geldige ISBN-10 of ISBN-13 waarde. - - - This value is not a valid ISSN. - Deze waarde is geen geldige ISSN waarde. - - - This value is not a valid currency. - Deze waarde is geen geldige valuta. - - - This value should be equal to {{ compared_value }}. - Deze waarde moet gelijk zijn aan {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Deze waarde moet groter zijn dan {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Deze waarde moet groter dan of gelijk aan {{ compared_value }} zijn. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Deze waarde moet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Deze waarde moet minder zijn dan {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Deze waarde moet minder dan of gelijk aan {{ compared_value }} zijn. - - - This value should not be equal to {{ compared_value }}. - Deze waarde mag niet gelijk zijn aan {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Deze waarde mag niet identiek zijn aan {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - De afbeelding is vierkant ({{ width }}x{{ height }}px). Vierkante afbeeldingen zijn niet toegestaan. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - De afbeelding is liggend ({{ width }}x{{ height }}px). Liggende afbeeldingen zijn niet toegestaan. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - De afbeelding is staand ({{ width }}x{{ height }}px). Staande afbeeldingen zijn niet toegestaan. - - - An empty file is not allowed. - Lege bestanden zijn niet toegestaan. - - - The host could not be resolved. - De hostnaam kon niet worden bepaald. - - - This value does not match the expected {{ charset }} charset. - Deze waarde is niet in de verwachte tekencodering {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Dit is geen geldige bedrijfsidentificatiecode (BIC/SWIFT). - - - Error - Fout - - - This is not a valid UUID. - Dit is geen geldige UUID. - - - This value should be a multiple of {{ compared_value }}. - Deze waarde zou een meervoud van {{ compared_value }} moeten zijn. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Deze bedrijfsidentificatiecode (BIC) is niet gekoppeld aan IBAN {{ iban }}. - - - This value should be valid JSON. - Deze waarde moet geldige JSON zijn. - - - This collection should contain only unique elements. - Deze collectie moet alleen unieke elementen bevatten. - - - This value should be positive. - Deze waarde moet positief zijn. - - - This value should be either positive or zero. - Deze waarde moet positief of gelijk aan nul zijn. - - - This value should be negative. - Deze waarde moet negatief zijn. - - - This value should be either negative or zero. - Deze waarde moet negatief of gelijk aan nul zijn. - - - This value is not a valid timezone. - Deze waarde is geen geldige tijdzone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dit wachtwoord is gelekt vanwege een data-inbreuk, het moet niet worden gebruikt. Kies een ander wachtwoord. - - - This value should be between {{ min }} and {{ max }}. - Deze waarde moet zich tussen {{ min }} en {{ max }} bevinden. - - - This value is not a valid hostname. - Deze waarde is geen geldige hostnaam. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Het aantal elementen van deze collectie moet een veelvoud zijn van {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Deze waarde moet voldoen aan tenminste een van de volgende voorwaarden: - - - Each element of this collection should satisfy its own set of constraints. - Elk element van deze collectie moet voldoen aan zijn eigen set voorwaarden. - - - This value is not a valid International Securities Identification Number (ISIN). - Deze waarde is geen geldig International Securities Identification Number (ISIN). - - - This value should be a valid expression. - Deze waarde moet een geldige expressie zijn. - - - This value is not a valid CSS color. - Deze waarde is geen geldige CSS kleur. - - - This value is not a valid CIDR notation. - Deze waarde is geen geldige CIDR notatie. - - - The value of the netmask should be between {{ min }} and {{ max }}. - De waarde van de netmask moet zich tussen {{ min }} en {{ max }} bevinden. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.nn.xlf b/vendor/symfony/validator/Resources/translations/validators.nn.xlf deleted file mode 100644 index 8963ba2..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.nn.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Verdien skulle ha vore tom/nei. - - - This value should be true. - Verdien skulla ha vore satt/ja. - - - This value should be of type {{ type }}. - Verdien må vere av typen {{ type }}. - - - This value should be blank. - Verdien skal vere blank. - - - The value you selected is not a valid choice. - Verdien du valde er ikkje gyldig. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Du må gjere minst {{ limit }} val. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Du kan maksimalt gjere {{ limit }} val. - - - One or more of the given values is invalid. - Ein eller fleire av dei opplyste verdiane er ugyldige. - - - This field was not expected. - Dette feltet var ikkje forventa. - - - This field is missing. - Dette feltet mangler. - - - This value is not a valid date. - Verdien er ikkje ein gyldig dato. - - - This value is not a valid datetime. - Verdien er ikkje ein gyldig dato og tid. - - - This value is not a valid email address. - Verdien er ikkje ei gyldig e-postadresse. - - - The file could not be found. - Fila er ikkje funnen. - - - The file is not readable. - Fila kan ikkje lesast. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fila er for stor ({{ size }} {{ suffix }}). Maksimal storleik er {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime-typen av fila er ugyldig ({{ type }}). Tillatne mime-typar er {{ types }}. - - - This value should be {{ limit }} or less. - Verdien må vere {{ limit }} eller mindre. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Verdien er for lang. Den må vere {{ limit }} bokstavar eller mindre. - - - This value should be {{ limit }} or more. - Verdien må vere {{ limit }} eller meir. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Verdien er for kort. Den må ha {{ limit }} teikn eller fleire. - - - This value should not be blank. - Verdien kan ikkje vere blank. - - - This value should not be null. - Verdien kan ikkje vere tom (null). - - - This value should be null. - Verdien må vere tom (null). - - - This value is not valid. - Verdien er ikkje gyldig. - - - This value is not a valid time. - Verdien er ikkje ei gyldig tidseining. - - - This value is not a valid URL. - Verdien er ikkje ein gyldig URL. - - - The two values should be equal. - Dei to verdiane må vere like. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fila er for stor. Den maksimale storleiken er {{ limit }} {{ suffix }}. - - - The file is too large. - Fila er for stor. - - - The file could not be uploaded. - Fila kunne ikkje bli lasta opp. - - - This value should be a valid number. - Verdien må vere eit gyldig tal. - - - This file is not a valid image. - Fila er ikkje eit gyldig bilete. - - - This is not a valid IP address. - Dette er ikkje ei gyldig IP-adresse. - - - This value is not a valid language. - Verdien er ikkje eit gyldig språk. - - - This value is not a valid locale. - Verdien er ikkje ein gyldig lokalitet (språk/region). - - - This value is not a valid country. - Verdien er ikkje eit gyldig land. - - - This value is already used. - Verdien er allereie i bruk. - - - The size of the image could not be detected. - Storleiken på biletet kunne ikkje oppdagast. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Biletbreidda er for stor, ({{ width }} pikslar). Tillaten maksimumsbreidde er {{ max_width }} pikslar. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Biletbreidda er for liten, ({{ width }} pikslar). Forventa minimumsbreidde er {{ min_width }} pikslar. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Bilethøgda er for stor, ({{ height }} pikslar). Tillaten maksimumshøgde er {{ max_height }} pikslar. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Billethøgda er for låg, ({{ height }} pikslar). Forventa minimumshøgde er {{ min_height }} pikslar. - - - This value should be the user's current password. - Verdien må vere brukaren sitt noverande passord. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Verdien må vere nøyaktig {{ limit }} teikn. - - - The file was only partially uploaded. - Fila vart berre delvis lasta opp. - - - No file was uploaded. - Inga fil vart lasta opp. - - - No temporary folder was configured in php.ini. - Førebels mappe (tmp) er ikkje konfigurert i php.ini. - - - Cannot write temporary file to disk. - Kan ikkje skrive førebels fil til disk. - - - A PHP extension caused the upload to fail. - Ei PHP-udviding forårsaka feil under opplasting. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Denne samlinga må innehalde {{ limit }} element eller meir.|Denne samlinga må innehalde {{ limit }} element eller meir. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Denne samlinga må innehalde {{ limit }} element eller færre.|Denne samlinga må innehalde {{ limit }} element eller færre. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Denne samlinga må innehalde nøyaktig {{ limit }} element.|Denne samlinga må innehalde nøyaktig {{ limit }} element. - - - Invalid card number. - Ugyldig kortnummer. - - - Unsupported card type or invalid card number. - Korttypen er ikkje støtta, eller kortnummeret er ugyldig. - - - This is not a valid International Bank Account Number (IBAN). - Dette er ikkje eit gyldig internasjonalt bankkontonummer (IBAN). - - - This value is not a valid ISBN-10. - Verdien er ikkje eit gyldig ISBN-10. - - - This value is not a valid ISBN-13. - Verdien er ikkje eit gyldig ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Verdien er verken eit gyldig ISBN-10 eller eit gyldig ISBN-13. - - - This value is not a valid ISSN. - Verdien er ikkje eit gyldig ISSN. - - - This value is not a valid currency. - Verdien er ikkje ein gyldig valuta. - - - This value should be equal to {{ compared_value }}. - Verdien bør vera eins med {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Verdien bør vera større enn {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Verdien bør vera større enn eller eins med {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Verdien bør vera eins med {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Verdien bør vera mindre enn {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Verdi bør vera mindre enn eller eins med {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Verdi bør ikkje vera eins med {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Denne verdien bør ikkje vera eins med {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Sideforholdet til biletet er for stort ({{ ratio }}). Sideforholdet kan ikkje vere større enn {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Sideforholdet til biletet er for lite ({{ ratio }}). Sideforholdet kan ikkje vere mindre enn {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Biletet er kvadratisk ({{ width }}x{{ height }}px). Kvadratiske bilete er ikkje tillatne. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Biletet er landskapsorientert ({{ width }}x{{ height }}px). Landskapsorienterte bilete er ikkje tillatne. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Biletet er portrettorientert ({{ width }}x{{ height }}px). Portrettorienterte bilete er ikkje tillatne. - - - An empty file is not allowed. - Ei tom fil er ikkje tillate. - - - The host could not be resolved. - Verten kunne ikkje finnast. - - - This value does not match the expected {{ charset }} charset. - Verdien stemmer ikkje med forventa {{ charset }} charset. - - - This is not a valid Business Identifier Code (BIC). - Dette er ikkje ein gyldig Business Identifier Code (BIC). - - - Error - Feil - - - This is not a valid UUID. - Dette er ikkje ein gyldig UUID. - - - This value should be a multiple of {{ compared_value }}. - Verdien bør vera eit multipel av {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Denne Business Identifier Code (BIC) er ikkje kopla til IBAN {{ iban }}. - - - This value should be valid JSON. - Verdien bør vera gyldig JSON. - - - This collection should contain only unique elements. - Denne samlinga bør berre innehalda unike element. - - - This value should be positive. - Verdien bør vera positiv. - - - This value should be either positive or zero. - Verdien bør vera anten positiv eller null. - - - This value should be negative. - Verdien bør vera negativ. - - - This value should be either negative or zero. - Verdien bør vera negativ eller null. - - - This value is not a valid timezone. - Verdien er ikkje ei gyldig tidssone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dette passordet har lekt ut ved eit datainnbrot, det får ikkje nyttast. Gje opp eit anna passord. - - - This value should be between {{ min }} and {{ max }}. - Denne verdien bør liggje mellom {{ min }} og {{ max }}. - - - This value is not a valid hostname. - Verdien er ikkje eit gyldig vertsnamn. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Talet på element i denne samlinga bør vera eit multippel av {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Verdien burde oppfylla minst ein av følgjande avgrensingar: - - - Each element of this collection should satisfy its own set of constraints. - Kvart element i denne samlinga bør oppfylla sine eigne avgrensingar. - - - This value is not a valid International Securities Identification Number (ISIN). - Verdien er ikkje eit gyldig International Securities Identification Number (ISIN). - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.no.xlf b/vendor/symfony/validator/Resources/translations/validators.no.xlf deleted file mode 100644 index 93132ec..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.no.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Verdien må være usann. - - - This value should be true. - Verdien må være sann. - - - This value should be of type {{ type }}. - Verdien skal ha typen {{ type }}. - - - This value should be blank. - Verdien skal være blank. - - - The value you selected is not a valid choice. - Den valgte verdien er ikke gyldig. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Du må velge minst {{ limit }} valg. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Du kan maks velge {{ limit }} valg. - - - One or more of the given values is invalid. - En eller flere av de oppgitte verdiene er ugyldige. - - - This field was not expected. - Dette feltet var ikke forventet. - - - This field is missing. - Dette feltet mangler. - - - This value is not a valid date. - Verdien er ikke en gyldig dato. - - - This value is not a valid datetime. - Verdien er ikke en gyldig dato/tid. - - - This value is not a valid email address. - Verdien er ikke en gyldig e-postadresse. - - - The file could not be found. - Filen kunne ikke finnes. - - - The file is not readable. - Filen er ikke lesbar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor ({{ size }} {{ suffix }}). Tilatte maksimale størrelse {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mimetypen av filen er ugyldig ({{ type }}). Tilatte mimetyper er {{ types }}. - - - This value should be {{ limit }} or less. - Verdien må være {{ limit }} tegn lang eller mindre. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Verdien er for lang. Den må ha {{ limit }} tegn eller mindre. - - - This value should be {{ limit }} or more. - Verdien må være {{ limit }} eller mer. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Verdien er for kort. Den må ha {{ limit }} tegn eller flere. - - - This value should not be blank. - Verdien kan ikke være blank. - - - This value should not be null. - Verdien kan ikke være tom (null). - - - This value should be null. - Verdien skal være tom (null). - - - This value is not valid. - Verdien er ugyldig. - - - This value is not a valid time. - Verdien er ikke en gyldig tid. - - - This value is not a valid URL. - Verdien er ikke en gyldig URL. - - - The two values should be equal. - Verdiene skal være identiske. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Filen er for stor. Den maksimale størrelsen er {{ limit }} {{ suffix }}. - - - The file is too large. - Filen er for stor. - - - The file could not be uploaded. - Filen kunne ikke lastes opp. - - - This value should be a valid number. - Verdien skal være et gyldig tall. - - - This file is not a valid image. - Denne filen er ikke et gyldig bilde. - - - This is not a valid IP address. - Dette er ikke en gyldig IP adresse. - - - This value is not a valid language. - Verdien er ikke et gyldig språk. - - - This value is not a valid locale. - Verdien er ikke en gyldig lokalitet. - - - This value is not a valid country. - Verdien er ikke et gyldig navn på land. - - - This value is already used. - Verdien er allerede brukt. - - - The size of the image could not be detected. - Bildestørrelsen kunne ikke oppdages. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Bildebredden er for stor ({{ width }} piksler). Tillatt maksimumsbredde er {{ max_width }} piksler. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Bildebredden er for liten ({{ width }} piksler). Forventet minimumsbredde er {{ min_width }} piksler. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Bildehøyden er for stor ({{ height }} piksler). Tillatt maksimumshøyde er {{ max_height }} piksler. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Bildehøyden er for liten ({{ height }} piksler). Forventet minimumshøyde er {{ min_height }} piksler. - - - This value should be the user's current password. - Verdien skal være brukerens sitt nåværende passord. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Verdien skal være nøyaktig {{ limit }} tegn. - - - The file was only partially uploaded. - Filen var kun delvis opplastet. - - - No file was uploaded. - Ingen fil var lastet opp. - - - No temporary folder was configured in php.ini. - Den midlertidige mappen (tmp) er ikke konfigurert i php.ini. - - - Cannot write temporary file to disk. - Kan ikke skrive midlertidig fil til disk. - - - A PHP extension caused the upload to fail. - En PHP-utvidelse forårsaket en feil under opplasting. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Denne samlingen må inneholde {{ limit }} element eller flere.|Denne samlingen må inneholde {{ limit }} elementer eller flere. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Denne samlingen må inneholde {{ limit }} element eller færre.|Denne samlingen må inneholde {{ limit }} elementer eller færre. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Denne samlingen må inneholde nøyaktig {{ limit }} element.|Denne samlingen må inneholde nøyaktig {{ limit }} elementer. - - - Invalid card number. - Ugyldig kortnummer. - - - Unsupported card type or invalid card number. - Korttypen er ikke støttet eller kortnummeret er ugyldig. - - - This is not a valid International Bank Account Number (IBAN). - Dette er ikke et gyldig IBAN-nummer. - - - This value is not a valid ISBN-10. - Verdien er ikke en gyldig ISBN-10. - - - This value is not a valid ISBN-13. - Verdien er ikke en gyldig ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Verdien er hverken en gyldig ISBN-10 eller ISBN-13. - - - This value is not a valid ISSN. - Verdien er ikke en gyldig ISSN. - - - This value is not a valid currency. - Verdien er ikke gyldig valuta. - - - This value should be equal to {{ compared_value }}. - Verdien skal være lik {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Verdien skal være større enn {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Verdien skal være større enn eller lik {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Verdien skal være identisk med {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Verdien skal være mindre enn {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Verdien skal være mindre enn eller lik {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Verdien skal ikke være lik {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Verdien skal ikke være identisk med {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Bildeforholdet er for stort ({{ ratio }}). Tillatt bildeforhold er maks {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Bildeforholdet er for lite ({{ ratio }}). Forventet bildeforhold er minst {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Bildet er en kvadrat ({{ width }}x{{ height }}px). Kvadratiske bilder er ikke tillatt. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Bildet er i liggende retning ({{ width }}x{{ height }}px). Bilder i liggende retning er ikke tillatt. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Bildet er i stående retning ({{ width }}x{{ height }}px). Bilder i stående retning er ikke tillatt. - - - An empty file is not allowed. - Tomme filer er ikke tilatt. - - - The host could not be resolved. - Vertsnavn kunne ikke løses. - - - This value does not match the expected {{ charset }} charset. - Verdien samsvarer ikke med forventet tegnsett {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Dette er ikke en gyldig BIC. - - - Error - Feil - - - This is not a valid UUID. - Dette er ikke en gyldig UUID. - - - This value should be a multiple of {{ compared_value }}. - Verdien skal være flertall av {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Business Identifier Code (BIC) er ikke tilknyttet en IBAN {{ iban }}. - - - This value should be valid JSON. - Verdien er ikke gyldig JSON. - - - This collection should contain only unique elements. - Samlingen kan kun inneholde unike elementer. - - - This value should be positive. - Denne verdien må være positiv. - - - This value should be either positive or zero. - Denne verdien må være positiv eller null. - - - This value should be negative. - Denne verdien må være negativ. - - - This value should be either negative or zero. - Denne verdien må være negativ eller null. - - - This value is not a valid timezone. - Verdien er ikke en gyldig tidssone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Dette passordet er lekket i et datainnbrudd, det må ikke tas i bruk. Vennligst bruk et annet passord. - - - This value should be between {{ min }} and {{ max }}. - Verdien må være mellom {{ min }} og {{ max }}. - - - This value is not a valid hostname. - Denne verdien er ikke et gyldig vertsnavn. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Antall elementer i denne samlingen bør være et multiplum av {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Denne verdien skal tilfredsstille minst en av følgende begrensninger: - - - Each element of this collection should satisfy its own set of constraints. - Hvert element i denne samlingen skal tilfredsstille sitt eget sett med begrensninger. - - - This value is not a valid International Securities Identification Number (ISIN). - Denne verdien er ikke et gyldig International Securities Identification Number (ISIN). - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.pl.xlf b/vendor/symfony/validator/Resources/translations/validators.pl.xlf deleted file mode 100644 index b983b2d..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.pl.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Ta wartość powinna być fałszem. - - - This value should be true. - Ta wartość powinna być prawdą. - - - This value should be of type {{ type }}. - Ta wartość powinna być typu {{ type }}. - - - This value should be blank. - Ta wartość powinna być pusta. - - - The value you selected is not a valid choice. - Ta wartość powinna być jedną z podanych opcji. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Powinieneś wybrać co najmniej {{ limit }} opcję.|Powinieneś wybrać co najmniej {{ limit }} opcje.|Powinieneś wybrać co najmniej {{ limit }} opcji. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Powinieneś wybrać maksymalnie {{ limit }} opcję.|Powinieneś wybrać maksymalnie {{ limit }} opcje.|Powinieneś wybrać maksymalnie {{ limit }} opcji. - - - One or more of the given values is invalid. - Jedna lub więcej z podanych wartości jest nieprawidłowa. - - - This field was not expected. - Tego pola się nie spodziewano. - - - This field is missing. - Tego pola brakuje. - - - This value is not a valid date. - Ta wartość nie jest prawidłową datą. - - - This value is not a valid datetime. - Ta wartość nie jest prawidłową datą i czasem. - - - This value is not a valid email address. - Ta wartość nie jest prawidłowym adresem email. - - - The file could not be found. - Plik nie mógł zostać odnaleziony. - - - The file is not readable. - Nie można odczytać pliku. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Plik jest za duży ({{ size }} {{ suffix }}). Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Nieprawidłowy typ mime pliku ({{ type }}). Dozwolone typy mime to {{ types }}. - - - This value should be {{ limit }} or less. - Ta wartość powinna wynosić {{ limit }} lub mniej. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków.|Ta wartość jest zbyt długa. Powinna mieć {{ limit }} lub mniej znaków. - - - This value should be {{ limit }} or more. - Ta wartość powinna wynosić {{ limit }} lub więcej. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków.|Ta wartość jest zbyt krótka. Powinna mieć {{ limit }} lub więcej znaków. - - - This value should not be blank. - Ta wartość nie powinna być pusta. - - - This value should not be null. - Ta wartość nie powinna być nullem. - - - This value should be null. - Ta wartość powinna być nullem. - - - This value is not valid. - Ta wartość jest nieprawidłowa. - - - This value is not a valid time. - Ta wartość nie jest prawidłowym czasem. - - - This value is not a valid URL. - Ta wartość nie jest prawidłowym adresem URL. - - - The two values should be equal. - Obie wartości powinny być równe. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Plik jest za duży. Maksymalny dozwolony rozmiar to {{ limit }} {{ suffix }}. - - - The file is too large. - Plik jest za duży. - - - The file could not be uploaded. - Plik nie mógł być wgrany. - - - This value should be a valid number. - Ta wartość powinna być prawidłową liczbą. - - - This file is not a valid image. - Ten plik nie jest obrazem. - - - This is not a valid IP address. - To nie jest prawidłowy adres IP. - - - This value is not a valid language. - Ta wartość nie jest prawidłowym językiem. - - - This value is not a valid locale. - Ta wartość nie jest prawidłową lokalizacją. - - - This value is not a valid country. - Ta wartość nie jest prawidłową nazwą kraju. - - - This value is already used. - Ta wartość jest już wykorzystywana. - - - The size of the image could not be detected. - Nie można wykryć rozmiaru obrazka. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Szerokość obrazka jest zbyt duża ({{ width }}px). Maksymalna dopuszczalna szerokość to {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Szerokość obrazka jest zbyt mała ({{ width }}px). Oczekiwana minimalna szerokość to {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Wysokość obrazka jest zbyt duża ({{ height }}px). Maksymalna dopuszczalna wysokość to {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Wysokość obrazka jest zbyt mała ({{ height }}px). Oczekiwana minimalna wysokość to {{ min_height }}px. - - - This value should be the user's current password. - Ta wartość powinna być aktualnym hasłem użytkownika. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ta wartość powinna mieć dokładnie {{ limit }} znak.|Ta wartość powinna mieć dokładnie {{ limit }} znaki.|Ta wartość powinna mieć dokładnie {{ limit }} znaków. - - - The file was only partially uploaded. - Plik został wgrany tylko częściowo. - - - No file was uploaded. - Żaden plik nie został wgrany. - - - No temporary folder was configured in php.ini. - Nie skonfigurowano folderu tymczasowego w php.ini lub skonfigurowany folder nie istnieje. - - - Cannot write temporary file to disk. - Nie można zapisać pliku tymczasowego na dysku. - - - A PHP extension caused the upload to fail. - Rozszerzenie PHP spowodowało błąd podczas wgrywania. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ten zbiór powinien zawierać {{ limit }} lub więcej elementów. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ten zbiór powinien zawierać {{ limit }} lub mniej elementów. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ten zbiór powinien zawierać dokładnie {{ limit }} element.|Ten zbiór powinien zawierać dokładnie {{ limit }} elementy.|Ten zbiór powinien zawierać dokładnie {{ limit }} elementów. - - - Invalid card number. - Nieprawidłowy numer karty. - - - Unsupported card type or invalid card number. - Nieobsługiwany rodzaj karty lub nieprawidłowy numer karty. - - - This is not a valid International Bank Account Number (IBAN). - Nieprawidłowy międzynarodowy numer rachunku bankowego (IBAN). - - - This value is not a valid ISBN-10. - Ta wartość nie jest prawidłowym numerem ISBN-10. - - - This value is not a valid ISBN-13. - Ta wartość nie jest prawidłowym numerem ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ta wartość nie jest prawidłowym numerem ISBN-10 ani ISBN-13. - - - This value is not a valid ISSN. - Ta wartość nie jest prawidłowym numerem ISSN. - - - This value is not a valid currency. - Ta wartość nie jest prawidłową walutą. - - - This value should be equal to {{ compared_value }}. - Ta wartość powinna być równa {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ta wartość powinna być większa niż {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ta wartość powinna być większa bądź równa {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ta wartość powinna być identycznego typu {{ compared_value_type }} oraz wartości {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ta wartość powinna być mniejsza niż {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ta wartość powinna być mniejsza bądź równa {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ta wartość nie powinna być równa {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ta wartość nie powinna być identycznego typu {{ compared_value_type }} oraz wartości {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Proporcje obrazu są zbyt duże ({{ ratio }}). Maksymalne proporcje to {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Proporcje obrazu są zbyt małe ({{ ratio }}). Minimalne proporcje to {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Obraz jest kwadratem ({{ width }}x{{ height }}px). Kwadratowe obrazy nie są akceptowane. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Obraz jest panoramiczny ({{ width }}x{{ height }}px). Panoramiczne zdjęcia nie są akceptowane. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Obraz jest portretowy ({{ width }}x{{ height }}px). Portretowe zdjęcia nie są akceptowane. - - - An empty file is not allowed. - Plik nie może być pusty. - - - The host could not be resolved. - Nazwa hosta nie została rozpoznana. - - - This value does not match the expected {{ charset }} charset. - Ta wartość nie pasuje do oczekiwanego zestawu znaków {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Ta wartość nie jest poprawnym kodem BIC (Business Identifier Code). - - - Error - Błąd - - - This is not a valid UUID. - To nie jest poprawne UUID. - - - This value should be a multiple of {{ compared_value }}. - Ta wartość powinna być wielokrotnością {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ten kod BIC (Business Identifier Code) nie jest powiązany z międzynarodowym numerem rachunku bankowego (IBAN) {{ iban }}. - - - This value should be valid JSON. - Ta wartość powinna być prawidłowym formatem JSON. - - - This collection should contain only unique elements. - Ten zbiór powinien zawierać tylko unikalne elementy. - - - This value should be positive. - Ta wartość powinna być dodatnia. - - - This value should be either positive or zero. - Ta wartość powinna być dodatnia lub równa zero. - - - This value should be negative. - Ta wartość powinna być ujemna. - - - This value should be either negative or zero. - Ta wartość powinna być ujemna lub równa zero. - - - This value is not a valid timezone. - Ta wartość nie jest prawidłową strefą czasową. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - To hasło wyciekło w wyniku naruszenia danych i nie może być użyte. Proszę użyć innego hasła. - - - This value should be between {{ min }} and {{ max }}. - Ta wartość powinna być pomiędzy {{ min }} a {{ max }}. - - - This value is not a valid hostname. - Ta wartość nie jest prawidłową nazwą hosta. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Liczba elementów w tym zbiorze powinna być wielokrotnością {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ta wartość powinna spełniać co najmniej jedną z następujących reguł: - - - Each element of this collection should satisfy its own set of constraints. - Każdy element w tym zbiorze powinien spełniać własny zestaw reguł. - - - This value is not a valid International Securities Identification Number (ISIN). - Ta wartość nie jest prawidłowym Międzynarodowym Numerem Identyfikacyjnym Papierów Wartościowych (ISIN). - - - This value should be a valid expression. - Ta wartość powinna być prawidłowym wyrażeniem. - - - This value is not a valid CSS color. - Ta wartość nie jest prawidłowym kolorem CSS. - - - This value is not a valid CIDR notation. - Ta wartość nie jest prawidłową notacją CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Wartość maski podsieci powinna być pomiędzy {{ min }} i {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.pt.xlf b/vendor/symfony/validator/Resources/translations/validators.pt.xlf deleted file mode 100644 index 090add6..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.pt.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Este valor deveria ser falso. - - - This value should be true. - Este valor deveria ser verdadeiro. - - - This value should be of type {{ type }}. - Este valor deveria ser do tipo {{ type }}. - - - This value should be blank. - Este valor deveria ser vazio. - - - The value you selected is not a valid choice. - O valor selecionado não é uma opção válida. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Você deveria selecionar {{ limit }} opção no mínimo.|Você deveria selecionar {{ limit }} opções no mínimo. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Você deve selecionar, no máximo {{ limit }} opção.|Você deve selecionar, no máximo {{ limit }} opções. - - - One or more of the given values is invalid. - Um ou mais dos valores introduzidos não são válidos. - - - This field was not expected. - Este campo não era esperado. - - - This field is missing. - Este campo está faltando. - - - This value is not a valid date. - Este valor não é uma data válida. - - - This value is not a valid datetime. - Este valor não é uma data-hora válida. - - - This value is not a valid email address. - Este valor não é um endereço de e-mail válido. - - - The file could not be found. - O arquivo não pôde ser encontrado. - - - The file is not readable. - O arquivo não pôde ser lido. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é de {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}. - - - This value should be {{ limit }} or less. - Este valor deveria ser {{ limit }} ou menor. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - O valor é muito longo. Deveria ter {{ limit }} caracteres ou menos. - - - This value should be {{ limit }} or more. - Este valor deveria ser {{ limit }} ou mais. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - O valor é muito curto. Deveria de ter {{ limit }} caractere ou mais.|O valor é muito curto. Deveria de ter {{ limit }} caracteres ou mais. - - - This value should not be blank. - Este valor não deveria ser branco/vazio. - - - This value should not be null. - Este valor não deveria ser nulo. - - - This value should be null. - Este valor deveria ser nulo. - - - This value is not valid. - Este valor não é válido. - - - This value is not a valid time. - Este valor não é uma hora válida. - - - This value is not a valid URL. - Este valor não é um URL válido. - - - The two values should be equal. - Os dois valores deveriam ser iguais. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}. - - - The file is too large. - O ficheiro é muito grande. - - - The file could not be uploaded. - Não foi possível carregar o ficheiro. - - - This value should be a valid number. - Este valor deveria ser um número válido. - - - This file is not a valid image. - Este ficheiro não é uma imagem. - - - This is not a valid IP address. - Este endereço de IP não é válido. - - - This value is not a valid language. - Este valor não é uma linguagem válida. - - - This value is not a valid locale. - Este valor não é um 'locale' válido. - - - This value is not a valid country. - Este valor não é um País válido. - - - This value is already used. - Este valor já está a ser usado. - - - The size of the image could not be detected. - O tamanho da imagem não foi detetado. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - A largura da imagem ({{ width }}px) é muito grande. A largura máxima da imagem é: {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - A largura da imagem ({{ width }}px) é muito pequena. A largura miníma da imagem é de: {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - A altura da imagem ({{ height }}px) é muito grande. A altura máxima da imagem é de: {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - A altura da imagem ({{ height }}px) é muito pequena. A altura miníma da imagem é de: {{ min_height }}px. - - - This value should be the user's current password. - Este valor deveria ser a senha atual do usuário. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Este valor deve possuir exatamente {{ limit }} caracteres. - - - The file was only partially uploaded. - Só foi enviada uma parte do arquivo. - - - No file was uploaded. - Nenhum arquivo foi enviado. - - - No temporary folder was configured in php.ini. - Não existe uma pasta temporária configurada no arquivo php.ini. - - - Cannot write temporary file to disk. - Não foi possível escrever os arquivos temporários no disco. - - - A PHP extension caused the upload to fail. - Uma extensão PHP causou a falha no envio. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos. - - - Invalid card number. - Número de cartão inválido. - - - Unsupported card type or invalid card number. - Tipo de cartão não suportado ou número de cartão inválido. - - - This is not a valid International Bank Account Number (IBAN). - Este não é um Número Internacional de Conta Bancária (IBAN) válido. - - - This value is not a valid ISBN-10. - Este valor não é um ISBN-10 válido. - - - This value is not a valid ISBN-13. - Este valor não é um ISBN-13 válido. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Este valor não é um ISBN-10 ou ISBN-13 válido. - - - This value is not a valid ISSN. - Este valor não é um ISSN válido. - - - This value is not a valid currency. - Este não é um valor monetário válido. - - - This value should be equal to {{ compared_value }}. - Este valor deve ser igual a {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Este valor deve ser superior a {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Este valor deve ser igual ou superior a {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Este valor deve ser inferior a {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Este valor deve ser igual ou inferior a {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Este valor não deve ser igual a {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - O formato da imagem é muito grande ({{ ratio }}). O formato máximo é {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - O formato da imagem é muito pequeno ({{ ratio }}). O formato mínimo esperado é {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - A imagem é um quadrado ({{ width }}x{{ height }}px). Imagens quadradas não são permitidas. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - A imagem está em orientação de paisagem ({{ width }}x{{ height }}px). Imagens orientadas em paisagem não são permitidas. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - A imagem está em orientação de retrato ({{ width }}x{{ height }}px). Imagens orientadas em retrato não são permitidas. - - - An empty file is not allowed. - Um arquivo vazio não é permitido. - - - The host could not be resolved. - O host não pode ser resolvido. - - - This value does not match the expected {{ charset }} charset. - O valor não corresponde ao conjunto de caracteres {{ charset }} esperado. - - - This is not a valid Business Identifier Code (BIC). - O Código de Identificação de Empresa (BIC) não é válido. - - - Error - Erro - - - This is not a valid UUID. - Este valor não é um UUID válido. - - - This value should be a multiple of {{ compared_value }}. - Este valor deve ser um múltiplo de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - O Código de Identificação de Empresa (BIC) não está associado ao IBAN {{ iban }}. - - - This value should be valid JSON. - Este valor deve ser um JSON válido. - - - This collection should contain only unique elements. - Esta coleção deve conter só elementos únicos. - - - This value should be positive. - Este valor deve ser estritamente positivo. - - - This value should be either positive or zero. - Este valor deve ser superior ou igual a zero. - - - This value should be negative. - Este valor deve ser estritamente negativo. - - - This value should be either negative or zero. - Este valor deve ser inferior ou igual a zero. - - - This value is not a valid timezone. - Este valor não é um fuso horário válido. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Esta senha foi divulgada durante uma fuga de dados, não deve ser usada de novamente. Por favor usar uma senha outra. - - - This value should be between {{ min }} and {{ max }}. - Este valor deve situar-se entre {{ min }} e {{ max }}. - - - This value is not a valid hostname. - Este valor não é um nome de host válido. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - O número de elementos desta coleção deve ser um múltiplo de {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Este valor deve satisfazer pelo menos uma das seguintes restrições : - - - Each element of this collection should satisfy its own set of constraints. - Cada elemento desta coleção deve satisfazer o seu próprio conjunto de restrições. - - - This value is not a valid International Securities Identification Number (ISIN). - Este valor não é um Número Internacional de Identificação de Segurança (ISIN) válido. - - - This value should be a valid expression. - Este valor deve ser uma expressão válida. - - - This value is not a valid CSS color. - Este valor não é uma cor de CSS válida. - - - This value is not a valid CIDR notation. - Este valor não é uma notação CIDR válida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - O valor da máscara de rede deve estar entre {{ min }} e {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf b/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf deleted file mode 100644 index e88b81f..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Este valor deve ser falso. - - - This value should be true. - Este valor deve ser verdadeiro. - - - This value should be of type {{ type }}. - Este valor deve ser do tipo {{ type }}. - - - This value should be blank. - Este valor deve ser vazio. - - - The value you selected is not a valid choice. - O valor selecionado não é uma opção válida. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Você deve selecionar, no mínimo, {{ limit }} opção.|Você deve selecionar, no mínimo, {{ limit }} opções. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Você deve selecionar, no máximo, {{ limit }} opção.|Você deve selecionar, no máximo, {{ limit }} opções. - - - One or more of the given values is invalid. - Um ou mais valores informados são inválidos. - - - This field was not expected. - Este campo não era esperado. - - - This field is missing. - Este campo está ausente. - - - This value is not a valid date. - Este valor não é uma data válida. - - - This value is not a valid datetime. - Este valor não é uma data e hora válida. - - - This value is not a valid email address. - Este valor não é um endereço de e-mail válido. - - - The file could not be found. - O arquivo não foi encontrado. - - - The file is not readable. - O arquivo não pode ser lido. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é muito grande ({{ size }} {{ suffix }}). O tamanho máximo permitido é {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - O tipo mime do arquivo é inválido ({{ type }}). Os tipos mime permitidos são {{ types }}. - - - This value should be {{ limit }} or less. - Este valor deve ser {{ limit }} ou menos. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Este valor é muito longo. Deve ter {{ limit }} caractere ou menos.|Este valor é muito longo. Deve ter {{ limit }} caracteres ou menos. - - - This value should be {{ limit }} or more. - Este valor deve ser {{ limit }} ou mais. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Este valor é muito curto. Deve ter {{ limit }} caractere ou mais.|Este valor é muito curto. Deve ter {{ limit }} caracteres ou mais. - - - This value should not be blank. - Este valor não deve ser vazio. - - - This value should not be null. - Este valor não deve ser nulo. - - - This value should be null. - Este valor deve ser nulo. - - - This value is not valid. - Este valor não é válido. - - - This value is not a valid time. - Este valor não é uma hora válida. - - - This value is not a valid URL. - Este valor não é uma URL válida. - - - The two values should be equal. - Os dois valores devem ser iguais. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - O arquivo é muito grande. O tamanho máximo permitido é de {{ limit }} {{ suffix }}. - - - The file is too large. - O arquivo é muito grande. - - - The file could not be uploaded. - O arquivo não pode ser enviado. - - - This value should be a valid number. - Este valor deve ser um número válido. - - - This file is not a valid image. - Este arquivo não é uma imagem válida. - - - This is not a valid IP address. - Este não é um endereço de IP válido. - - - This value is not a valid language. - Este valor não é um idioma válido. - - - This value is not a valid locale. - Este valor não é uma localidade válida. - - - This value is not a valid country. - Este valor não é um país válido. - - - This value is already used. - Este valor já está sendo usado. - - - The size of the image could not be detected. - O tamanho da imagem não pode ser detectado. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - A largura da imagem é muito grande ({{ width }}px). A largura máxima permitida é de {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - A largura da imagem é muito pequena ({{ width }}px). A largura mínima esperada é de {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - A altura da imagem é muito grande ({{ height }}px). A altura máxima permitida é de {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - A altura da imagem é muito pequena ({{ height }}px). A altura mínima esperada é de {{ min_height }}px. - - - This value should be the user's current password. - Este valor deve ser a senha atual do usuário. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Este valor deve ter exatamente {{ limit }} caractere.|Este valor deve ter exatamente {{ limit }} caracteres. - - - The file was only partially uploaded. - O arquivo foi enviado apenas parcialmente. - - - No file was uploaded. - Nenhum arquivo foi enviado. - - - No temporary folder was configured in php.ini. - Nenhum diretório temporário foi configurado no php.ini. - - - Cannot write temporary file to disk. - Não foi possível escrever o arquivo temporário no disco. - - - A PHP extension caused the upload to fail. - Uma extensão PHP fez com que o envio falhasse. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Esta coleção deve conter {{ limit }} elemento ou mais.|Esta coleção deve conter {{ limit }} elementos ou mais. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Esta coleção deve conter {{ limit }} elemento ou menos.|Esta coleção deve conter {{ limit }} elementos ou menos. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Esta coleção deve conter exatamente {{ limit }} elemento.|Esta coleção deve conter exatamente {{ limit }} elementos. - - - Invalid card number. - Número de cartão inválido. - - - Unsupported card type or invalid card number. - Tipo de cartão não suportado ou número de cartão inválido. - - - This is not a valid International Bank Account Number (IBAN). - Este não é um Número Internacional de Conta Bancária (IBAN) válido. - - - This value is not a valid ISBN-10. - Este valor não é um ISBN-10 válido. - - - This value is not a valid ISBN-13. - Este valor não é um ISBN-13 válido. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Este valor não é um ISBN-10 e nem um ISBN-13 válido. - - - This value is not a valid ISSN. - Este valor não é um ISSN válido. - - - This value is not a valid currency. - Este não é um valor monetário válido. - - - This value should be equal to {{ compared_value }}. - Este valor deve ser igual a {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Este valor deve ser maior que {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Este valor deve ser maior ou igual a {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Este valor deve ser menor que {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Este valor deve ser menor ou igual a {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Este valor não deve ser igual a {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Este valor não deve ser idêntico a {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - A proporção da imagem é muito grande ({{ ratio }}). A proporção máxima permitida é {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - A proporção da imagem é muito pequena ({{ ratio }}). A proporção mínima esperada é {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - A imagem está num formato quadrado ({{ width }}x{{ height }}px). Imagens com formato quadrado não são permitidas. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - A imagem está orientada à paisagem ({{ width }}x{{ height }}px). Imagens orientadas à paisagem não são permitidas. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - A imagem está orientada ao retrato ({{ width }}x{{ height }}px). Imagens orientadas ao retrato não são permitidas. - - - An empty file is not allowed. - Arquivo vazio não é permitido. - - - The host could not be resolved. - O host não pôde ser resolvido. - - - This value does not match the expected {{ charset }} charset. - Este valor não corresponde ao charset {{ charset }} esperado. - - - This is not a valid Business Identifier Code (BIC). - Este não é um Código Identificador Bancário (BIC) válido. - - - Error - Erro - - - This is not a valid UUID. - Este não é um UUID válido. - - - This value should be a multiple of {{ compared_value }}. - Este valor deve ser múltiplo de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Este Código Identificador Bancário (BIC) não está associado ao IBAN {{ iban }}. - - - This value should be valid JSON. - Este valor deve ser um JSON válido. - - - This collection should contain only unique elements. - Esta coleção deve conter somente elementos únicos. - - - This value should be positive. - Este valor deve ser positivo. - - - This value should be either positive or zero. - Este valor deve ser positivo ou zero. - - - This value should be negative. - Este valor deve ser negativo. - - - This value should be either negative or zero. - Este valor deve ser negativo ou zero. - - - This value is not a valid timezone. - Este valor não representa um fuso horário válido. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Esta senha foi divulgada num vazamento de dados e não deve ser utilizada. Por favor, utilize outra senha. - - - This value should be between {{ min }} and {{ max }}. - Este valor deve estar entre {{ min }} e {{ max }}. - - - This value is not a valid hostname. - Este valor não é um nome de host válido. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - O número de elementos desta coleção deve ser um múltiplo de {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Este valor deve satisfazer pelo menos uma das seguintes restrições: - - - Each element of this collection should satisfy its own set of constraints. - Cada elemento desta coleção deve satisfazer seu próprio grupo de restrições. - - - This value is not a valid International Securities Identification Number (ISIN). - Este valor não é um Número de Identificação de Títulos Internacionais (ISIN) válido. - - - This value should be a valid expression. - Este valor deve ser uma expressão válida. - - - This value is not a valid CSS color. - Este valor não é uma cor CSS válida. - - - This value is not a valid CIDR notation. - Este valor não é uma notação CIDR válida. - - - The value of the netmask should be between {{ min }} and {{ max }}. - O valor da máscara de rede deve estar entre {{ min }} e {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.ro.xlf b/vendor/symfony/validator/Resources/translations/validators.ro.xlf deleted file mode 100644 index 7fba2cd..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.ro.xlf +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - This value should be false. - Această valoare ar trebui să fie falsă (false). - - - This value should be true. - Această valoare ar trebui să fie adevărată (true). - - - This value should be of type {{ type }}. - Această valoare ar trebui să fie de tipul {{ type }}. - - - This value should be blank. - Această valoare ar trebui sa fie goală. - - - The value you selected is not a valid choice. - Valoarea selectată nu este o opțiune validă. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Trebuie să selectați cel puțin {{ limit }} opțiune.|Trebuie să selectați cel puțin {{ limit }} opțiuni.|Trebuie să selectați cel puțin {{ limit }} de opțiuni - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Trebuie să selectați cel mult {{ limit }} opțiune.|Trebuie să selectați cel mult {{ limit }} opțiuni.|Trebuie să selectați cel mult {{ limit }} de opțiuni. - - - One or more of the given values is invalid. - Una sau mai multe dintre valorile furnizate sunt invalide. - - - This field was not expected. - Acest câmp nu era de aşteptat. - - - This field is missing. - Acest câmp este lipsă. - - - This value is not a valid date. - Această valoare nu reprezintă o dată validă. - - - This value is not a valid datetime. - Această valoare nu reprezintă o dată și oră validă. - - - This value is not a valid email address. - Această valoare nu reprezintă o adresă de e-mail validă. - - - The file could not be found. - Fișierul nu a putut fi găsit. - - - The file is not readable. - Fișierul nu poate fi citit. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fișierul este prea mare ({{ size }} {{ suffix }}). Dimensiunea maximă permisă este {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Tipul fișierului este invalid ({{ type }}). Tipurile permise de fișiere sunt ({{ types }}). - - - This value should be {{ limit }} or less. - Această valoare ar trebui să fie cel mult {{ limit }}. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caracter.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} caractere.|Această valoare este prea lungă. Ar trebui să aibă maxim {{ limit }} de caractere. - - - This value should be {{ limit }} or more. - Această valoare ar trebui să fie cel puțin {{ limit }}. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caracter.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} caractere.|Această valoare este prea scurtă. Ar trebui să aibă minim {{ limit }} de caractere. - - - This value should not be blank. - Această valoare nu ar trebui să fie goală. - - - This value should not be null. - Această valoare nu ar trebui să fie nulă (null). - - - This value should be null. - Această valoare ar trebui să fie nulă (null). - - - This value is not valid. - Această valoare nu este validă. - - - This value is not a valid time. - Această valoare nu reprezintă o oră validă. - - - This value is not a valid URL. - Această valoare nu reprezintă un URL (link) valid. - - - The two values should be equal. - Cele două valori ar trebui să fie egale. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fișierul este prea mare. Mărimea maximă permisă este {{ limit }} {{ suffix }}. - - - The file is too large. - Fișierul este prea mare. - - - The file could not be uploaded. - Fișierul nu a putut fi încărcat. - - - This value should be a valid number. - Această valoare nu reprezintă un număr valid. - - - This file is not a valid image. - Acest fișier nu este o imagine validă. - - - This is not a valid IP address. - Această valoare nu este o adresă IP validă. - - - This value is not a valid language. - Această valoare nu reprezintă o limbă corectă. - - - This value is not a valid locale. - Această valoare nu reprezintă un dialect (o limbă) corect. - - - This value is not a valid country. - Această valoare nu este o țară validă. - - - This value is already used. - Această valoare este folosită deja. - - - The size of the image could not be detected. - Mărimea imaginii nu a putut fi detectată. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Lățimea imaginii este prea mare ({{ width }}px). Lățimea maximă permisă este de {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Lățimea imaginii este prea mică ({{ width }}px). Lățimea minimă permisă este de {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Înălțimea imaginii este prea mare ({{ height }}px). Înălțimea maximă permisă este de {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Înălțimea imaginii este prea mică ({{ height }}px). Înălțimea minimă permisă este de {{ min_height }}px. - - - This value should be the user's current password. - Această valoare trebuie să fie parola curentă a utilizatorului. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Această valoare trebuie să conțină exact {{ limit }} caracter.|Această valoare trebuie să conțină exact {{ limit }} caractere.|Această valoare trebuie să conțină exact {{ limit }} de caractere. - - - The file was only partially uploaded. - Fișierul a fost încărcat parțial. - - - No file was uploaded. - Nu a fost încărcat nici un fișier. - - - No temporary folder was configured in php.ini. - Nu este configurat nici un director temporar in php.ini. - - - Cannot write temporary file to disk. - Nu a fost posibilă scrierea fișierului temporar pe disk. - - - A PHP extension caused the upload to fail. - O extensie PHP a prevenit încărcarea cu succes a fișierului. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Această colecție trebuie să conțină cel puțin {{ limit }} element.|Această colecție trebuie să conțină cel puțin {{ limit }} elemente.|Această colecție trebuie să conțină cel puțin {{ limit }} de elemente. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Această colecție trebuie să conțină cel mult {{ limit }} element.|Această colecție trebuie să conțină cel mult {{ limit }} elemente.|Această colecție trebuie să conțină cel mult {{ limit }} de elemente. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Această colecție trebuie să conțină {{ limit }} element.|Această colecție trebuie să conțină {{ limit }} elemente.|Această colecție trebuie să conțină {{ limit }} de elemente. - - - Invalid card number. - Numărul card invalid. - - - Unsupported card type or invalid card number. - Tipul sau numărul cardului nu sunt valide. - - - This is not a valid International Bank Account Number (IBAN). - Acesta nu este un cod IBAN (International Bank Account Number) valid. - - - This value is not a valid ISBN-10. - Această valoare nu este un cod ISBN-10 valid. - - - This value is not a valid ISBN-13. - Această valoare nu este un cod ISBN-13 valid. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Această valoare nu este un cod ISBN-10 sau ISBN-13 valid. - - - This value is not a valid ISSN. - Această valoare nu este un cod ISSN valid. - - - This value is not a valid currency. - Această valoare nu este o monedă validă. - - - This value should be equal to {{ compared_value }}. - Această valoare trebuie să fie egală cu {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Această valoare trebuie să fie mai mare de {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Această valoare trebuie să fie mai mare sau egală cu {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Această valoare trebuie identică cu {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Această valoare trebuie să fie mai mică de {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Această valoare trebuie să fie mai mică sau egală cu {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Această valoare nu trebuie să fie egală cu {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Această valoare nu trebuie să fie identică cu {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Raportul imaginii este prea mare ({{ ratio }}). Raportul maxim permis este {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Raportul imaginii este prea mic ({{ ratio }}). Raportul minim permis este {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Imaginea este un pătrat ({{ width }}x{{ height }}px). Imaginile pătrat nu sunt permise. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Imaginea are orientarea peisaj ({{ width }}x{{ height }}px). Imaginile cu orientare peisaj nu sunt permise. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Imaginea are orientarea portret ({{ width }}x{{ height }}px). Imaginile cu orientare portret nu sunt permise. - - - An empty file is not allowed. - Nu se permite un fișier gol. - - - The host could not be resolved. - Numele host nu a putut fi rezolvat către o adresă IP. - - - This value does not match the expected {{ charset }} charset. - Această valoare nu corespunde setului de caractere {{ charset }} așteptat. - - - This is not a valid Business Identifier Code (BIC). - Codul BIC (Business Identifier Code) nu este valid. - - - Error - Eroare - - - This is not a valid UUID. - Identificatorul universal unic (UUID) nu este valid. - - - This value should be a multiple of {{ compared_value }}. - Această valoare trebuie să fie un multiplu de {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Codul BIC (Business Identifier Code) nu este asociat cu codul IBAN {{ iban }}. - - - This value should be valid JSON. - Această valoare trebuie să fie un JSON valid. - - - This collection should contain only unique elements. - Acest set ar trebui să conțină numai elemente unice. - - - This value should be positive. - Această valoare ar trebui să fie pozitivă. - - - This value should be either positive or zero. - Această valoare trebuie să fie pozitivă sau zero. - - - This value should be negative. - Această valoare ar trebui să fie negativă. - - - This value should be either negative or zero. - Această valoare trebuie să fie negativă sau zero. - - - This value is not a valid timezone. - Această valoare nu este un fus orar valid. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Această parolă a fost compromisă și nu poate fi utilizată. Vă rugăm să utilizați o altă parolă. - - - This value should be between {{ min }} and {{ max }}. - Această valoare trebuie să fie între {{ min }} și {{ max }}. - - - This value is not a valid hostname. - Această valoare nu este un numele gazdei valid. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Numărul de elemente din această colecție ar trebui să fie un multiplu al {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Această valoare trebuie să îndeplinească cel puțin una dintre următoarele reguli: - - - Each element of this collection should satisfy its own set of constraints. - Fiecare element din acest set ar trebui să îndeplinească propriul set de reguli. - - - This value is not a valid International Securities Identification Number (ISIN). - Această valoare nu este un număr internațional de identificare (ISIN) valabil. - - - This value should be a valid expression. - Această valoare ar trebui să fie o expresie validă. - - - This value is not a valid CIDR notation. - Această valoare nu este o notație CIDR validă. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Valoarea netmask-ului trebuie sa fie intre {{ min }} si {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.ru.xlf b/vendor/symfony/validator/Resources/translations/validators.ru.xlf deleted file mode 100644 index 8705cbb..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.ru.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Значение должно быть ложным. - - - This value should be true. - Значение должно быть истинным. - - - This value should be of type {{ type }}. - Тип значения должен быть {{ type }}. - - - This value should be blank. - Значение должно быть пустым. - - - The value you selected is not a valid choice. - Выбранное Вами значение недопустимо. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Вы должны выбрать хотя бы {{ limit }} вариант.|Вы должны выбрать хотя бы {{ limit }} варианта.|Вы должны выбрать хотя бы {{ limit }} вариантов. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Вы должны выбрать не более чем {{ limit }} вариант.|Вы должны выбрать не более чем {{ limit }} варианта.|Вы должны выбрать не более чем {{ limit }} вариантов. - - - One or more of the given values is invalid. - Одно или несколько заданных значений недопустимо. - - - This field was not expected. - Это поле не ожидалось. - - - This field is missing. - Это поле отсутствует. - - - This value is not a valid date. - Значение не является правильной датой. - - - This value is not a valid datetime. - Значение даты и времени недопустимо. - - - This value is not a valid email address. - Значение адреса электронной почты недопустимо. - - - The file could not be found. - Файл не может быть найден. - - - The file is not readable. - Файл не может быть прочитан. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файл слишком большой ({{ size }} {{ suffix }}). Максимально допустимый размер {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - MIME-тип файла недопустим ({{ type }}). Допустимы MIME-типы файлов {{ types }}. - - - This value should be {{ limit }} or less. - Значение должно быть {{ limit }} или меньше. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Значение слишком длинное. Должно быть равно {{ limit }} символу или меньше.|Значение слишком длинное. Должно быть равно {{ limit }} символам или меньше.|Значение слишком длинное. Должно быть равно {{ limit }} символам или меньше. - - - This value should be {{ limit }} or more. - Значение должно быть {{ limit }} или больше. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Значение слишком короткое. Должно быть равно {{ limit }} символу или больше.|Значение слишком короткое. Должно быть равно {{ limit }} символам или больше.|Значение слишком короткое. Должно быть равно {{ limit }} символам или больше. - - - This value should not be blank. - Значение не должно быть пустым. - - - This value should not be null. - Значение не должно быть null. - - - This value should be null. - Значение должно быть null. - - - This value is not valid. - Значение недопустимо. - - - This value is not a valid time. - Значение времени недопустимо. - - - This value is not a valid URL. - Значение не является допустимым URL. - - - The two values should be equal. - Оба значения должны быть одинаковыми. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файл слишком большой. Максимально допустимый размер {{ limit }} {{ suffix }}. - - - The file is too large. - Файл слишком большой. - - - The file could not be uploaded. - Файл не может быть загружен. - - - This value should be a valid number. - Значение должно быть числом. - - - This file is not a valid image. - Файл не является допустимым форматом изображения. - - - This is not a valid IP address. - Значение не является допустимым IP адресом. - - - This value is not a valid language. - Значение не является допустимым языком. - - - This value is not a valid locale. - Значение не является допустимой локалью. - - - This value is not a valid country. - Значение не является допустимой страной. - - - This value is already used. - Это значение уже используется. - - - The size of the image could not be detected. - Не удалось определить размер изображения. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Ширина изображения слишком велика ({{ width }}px). Максимально допустимая ширина {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Ширина изображения слишком мала ({{ width }}px). Минимально допустимая ширина {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Высота изображения слишком велика ({{ height }}px). Максимально допустимая высота {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Высота изображения слишком мала ({{ height }}px). Минимально допустимая высота {{ min_height }}px. - - - This value should be the user's current password. - Значение должно быть текущим паролем пользователя. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Значение должно быть равно {{ limit }} символу.|Значение должно быть равно {{ limit }} символам.|Значение должно быть равно {{ limit }} символам. - - - The file was only partially uploaded. - Файл был загружен только частично. - - - No file was uploaded. - Файл не был загружен. - - - No temporary folder was configured in php.ini. - Не настроена временная директория в php.ini. - - - Cannot write temporary file to disk. - Невозможно записать временный файл на диск. - - - A PHP extension caused the upload to fail. - Расширение PHP вызвало ошибку при загрузке. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Эта коллекция должна содержать {{ limit }} элемент или больше.|Эта коллекция должна содержать {{ limit }} элемента или больше.|Эта коллекция должна содержать {{ limit }} элементов или больше. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Эта коллекция должна содержать {{ limit }} элемент или меньше.|Эта коллекция должна содержать {{ limit }} элемента или меньше.|Эта коллекция должна содержать {{ limit }} элементов или меньше. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Эта коллекция должна содержать ровно {{ limit }} элемент.|Эта коллекция должна содержать ровно {{ limit }} элемента.|Эта коллекция должна содержать ровно {{ limit }} элементов. - - - Invalid card number. - Неверный номер карты. - - - Unsupported card type or invalid card number. - Неподдерживаемый тип или неверный номер карты. - - - This is not a valid International Bank Account Number (IBAN). - Значение не является допустимым международным номером банковского счета (IBAN). - - - This value is not a valid ISBN-10. - Значение имеет неверный формат ISBN-10. - - - This value is not a valid ISBN-13. - Значение имеет неверный формат ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Значение не соответствует форматам ISBN-10 и ISBN-13. - - - This value is not a valid ISSN. - Значение не соответствует формату ISSN. - - - This value is not a valid currency. - Некорректный формат валюты. - - - This value should be equal to {{ compared_value }}. - Значение должно быть равно {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Значение должно быть больше чем {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Значение должно быть больше или равно {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Значение должно быть идентичным {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Значение должно быть меньше чем {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Значение должно быть меньше или равно {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Значение не должно быть равно {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Значение не должно быть идентичным {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Соотношение сторон изображения слишком велико ({{ ratio }}). Максимальное соотношение сторон {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Соотношение сторон изображения слишком мало ({{ ratio }}). Минимальное соотношение сторон {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Изображение квадратное ({{ width }}x{{ height }}px). Квадратные изображения не разрешены. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Изображение в альбомной ориентации ({{ width }}x{{ height }}px). Изображения в альбомной ориентации не разрешены. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Изображение в портретной ориентации ({{ width }}x{{ height }}px). Изображения в портретной ориентации не разрешены. - - - An empty file is not allowed. - Пустые файлы не разрешены. - - - The host could not be resolved. - Имя хоста не может быть разрешено. - - - This value does not match the expected {{ charset }} charset. - Значение не совпадает с ожидаемой {{ charset }} кодировкой. - - - This is not a valid Business Identifier Code (BIC). - Значение не соответствует формату BIC. - - - Error - Ошибка - - - This is not a valid UUID. - Значение не соответствует формату UUID. - - - This value should be a multiple of {{ compared_value }}. - Значение должно быть кратно {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Данный BIC не связан с IBAN {{ iban }}. - - - This value should be valid JSON. - Значение должно быть корректным JSON. - - - This collection should contain only unique elements. - Эта коллекция должна содержать только уникальные элементы. - - - This value should be positive. - Значение должно быть положительным. - - - This value should be either positive or zero. - Значение должно быть положительным или равным нулю. - - - This value should be negative. - Значение должно быть отрицательным. - - - This value should be either negative or zero. - Значение должно быть отрицательным или равным нулю. - - - This value is not a valid timezone. - Значение не является корректным часовым поясом. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Данный пароль был скомпрометирован в результате утечки данных и не должен быть использован. Пожалуйста, используйте другой пароль. - - - This value should be between {{ min }} and {{ max }}. - Значение должно быть между {{ min }} и {{ max }}. - - - This value is not a valid hostname. - Значение не является корректным именем хоста. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Количество элементов в этой коллекции должно быть кратным {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Значение должно удовлетворять как минимум одному из следующих ограничений: - - - Each element of this collection should satisfy its own set of constraints. - Каждый элемент этой коллекции должен удовлетворять своему собственному набору ограничений. - - - This value is not a valid International Securities Identification Number (ISIN). - Значение не является корректным международным идентификационным номером ценных бумаг (ISIN). - - - This value should be a valid expression. - Это значение должно быть корректным выражением. - - - This value is not a valid CSS color. - Значение не является корректным CSS цветом. - - - This value is not a valid CIDR notation. - Значение не соответствует нотации CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Значение маски подсети должно быть от {{ min }} до {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sk.xlf b/vendor/symfony/validator/Resources/translations/validators.sk.xlf deleted file mode 100644 index 55a8111..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sk.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Táto hodnota by mala byť nastavená na false. - - - This value should be true. - Táto hodnota by mala byť nastavená na true. - - - This value should be of type {{ type }}. - Táto hodnota by mala byť typu {{ type }}. - - - This value should be blank. - Táto hodnota by mala byť prázdna. - - - The value you selected is not a valid choice. - Táto hodnota by mala byť jednou z poskytnutých možností. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Mali by ste vybrať minimálne {{ limit }} možnosť.|Mali by ste vybrať minimálne {{ limit }} možnosti.|Mali by ste vybrať minimálne {{ limit }} možností. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Mali by ste vybrať najviac {{ limit }} možnosť.|Mali by ste vybrať najviac {{ limit }} možnosti.|Mali by ste vybrať najviac {{ limit }} možností. - - - One or more of the given values is invalid. - Niektoré z uvedených hodnôt sú neplatné. - - - This field was not expected. - Toto pole sa neočakáva. - - - This field is missing. - Toto pole chýba. - - - This value is not a valid date. - Tato hodnota nemá platný formát dátumu. - - - This value is not a valid datetime. - Táto hodnota nemá platný formát dátumu a času. - - - This value is not a valid email address. - Táto hodnota nie je platná emailová adresa. - - - The file could not be found. - Súbor sa nenašiel. - - - The file is not readable. - Súbor nie je čitateľný. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Súbor je príliš veľký ({{ size }} {{ suffix }}). Maximálna povolená veľkosť je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Súbor typu ({{ type }}) nie je podporovaný. Podporované typy sú {{ types }}. - - - This value should be {{ limit }} or less. - Táto hodnota by mala byť {{ limit }} alebo menej. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znak.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znaky.|Táto hodnota obsahuje viac znakov ako je povolené. Mala by obsahovať najviac {{ limit }} znakov. - - - This value should be {{ limit }} or more. - Táto hodnota by mala byť viac ako {{ limit }}. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znak.|Táto hodnota je príliš krátka. Musí obsahovať minimálne {{ limit }} znaky.|Táto hodnota je príliš krátka. Minimálny počet znakov je {{ limit }}. - - - This value should not be blank. - Táto hodnota by mala byť vyplnená. - - - This value should not be null. - Táto hodnota by nemala byť null. - - - This value should be null. - Táto hodnota by mala byť null. - - - This value is not valid. - Táto hodnota nie je platná. - - - This value is not a valid time. - Tato hodnota nemá správny formát času. - - - This value is not a valid URL. - Táto hodnota nie je platnou URL adresou. - - - The two values should be equal. - Tieto dve hodnoty by mali byť rovnaké. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Súbor je príliš veľký. Maximálna povolená veľkosť je {{ limit }} {{ suffix }}. - - - The file is too large. - Súbor je príliš veľký. - - - The file could not be uploaded. - Súbor sa nepodarilo nahrať. - - - This value should be a valid number. - Táto hodnota by mala byť číslo. - - - This file is not a valid image. - Tento súbor nie je obrázok. - - - This is not a valid IP address. - Toto nie je platná IP adresa. - - - This value is not a valid language. - Tento jazyk neexistuje. - - - This value is not a valid locale. - Táto lokalizácia neexistuje. - - - This value is not a valid country. - Táto krajina neexistuje. - - - This value is already used. - Táto hodnota sa už používa. - - - The size of the image could not be detected. - Nepodarilo sa zistiť rozmery obrázku. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Obrázok je príliš široký ({{ width }}px). Maximálna povolená šírka obrázku je {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Obrázok je príliš úzky ({{ width }}px). Minimálna šírka obrázku by mala byť {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - >Obrázok je príliš vysoký ({{ height }}px). Maximálna povolená výška obrázku je {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Obrázok je príliš nízky ({{ height }}px). Minimálna výška obrázku by mala byť {{ min_height }}px. - - - This value should be the user's current password. - Táto hodnota by mala byť aktuálne heslo používateľa. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Táto hodnota by mala mať presne {{ limit }} znak.|Táto hodnota by mala mať presne {{ limit }} znaky.|Táto hodnota by mala mať presne {{ limit }} znakov. - - - The file was only partially uploaded. - Bola nahraná len časť súboru. - - - No file was uploaded. - Žiadny súbor nebol nahraný. - - - No temporary folder was configured in php.ini. - V php.ini nie je nastavená cesta k addressáru pre dočasné súbory. - - - Cannot write temporary file to disk. - Dočasný súbor sa nepodarilo zapísať na disk. - - - A PHP extension caused the upload to fail. - Rozšírenie PHP zabránilo nahraniu súboru. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Táto kolekcia by mala obsahovať aspoň {{ limit }} prvok alebo viac.|Táto kolekcia by mala obsahovať aspoň {{ limit }} prvky alebo viac.|Táto kolekcia by mala obsahovať aspoň {{ limit }} prvkov alebo viac. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Táto kolekcia by mala maximálne {{ limit }} prvok.|Táto kolekcia by mala obsahovať maximálne {{ limit }} prvky.|Táto kolekcia by mala obsahovať maximálne {{ limit }} prvkov. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Táto kolekcia by mala obsahovať presne {{ limit }} prvok.|Táto kolekcia by mala obsahovať presne {{ limit }} prvky.|Táto kolekcia by mala obsahovať presne {{ limit }} prvkov. - - - Invalid card number. - Neplatné číslo karty. - - - Unsupported card type or invalid card number. - Nepodporovaný typ karty alebo neplatné číslo karty. - - - This is not a valid International Bank Account Number (IBAN). - Toto je neplatný IBAN. - - - This value is not a valid ISBN-10. - Táto hodnota je neplatné ISBN-10. - - - This value is not a valid ISBN-13. - Táto hodnota je neplatné ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Táto hodnota nie je platné ISBN-10 ani ISBN-13. - - - This value is not a valid ISSN. - Táto hodnota nie je platné ISSN. - - - This value is not a valid currency. - Táto hodnota nie je platná mena. - - - This value should be equal to {{ compared_value }}. - Táto hodnota by mala byť rovná {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Táto hodnota by mala byť väčšia ako {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Táto hodnota by mala byť väčšia alebo rovná {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Táto hodnota by mala byť typu {{ compared_value_type }} a zároveň by mala byť rovná {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Táto hodnota by mala byť menšia ako {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Táto hodnota by mala byť menšia alebo rovná {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Táto hodnota by nemala byť rovná {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Táto hodnota by nemala byť typu {{ compared_value_type }} a zároveň by nemala byť rovná {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Pomer strán obrázku je príliš veľký ({{ ratio }}). Maximálny povolený pomer strán obrázku je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Pomer strán obrázku je príliš malý ({{ ratio }}). Minimálny povolený pomer strán obrázku je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Strany obrázku sú štvorcové ({{ width }}x{{ height }}px). Štvorcové obrázky nie sú povolené. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Obrázok je orientovaný na šírku ({{ width }}x{{ height }}px). Obrázky orientované na šírku nie sú povolené. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Obrázok je orientovaný na výšku ({{ width }}x{{ height }}px). Obrázky orientované na výšku nie sú povolené. - - - An empty file is not allowed. - Súbor nesmie byť prázdny. - - - The host could not be resolved. - Hostiteľa nebolo možné rozpoznať. - - - This value does not match the expected {{ charset }} charset. - Táto hodnota nezodpovedá očakávanej znakovej sade {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Táto hodnota nie je platný identifikačný kód podniku (BIC). - - - Error - Chyba - - - This is not a valid UUID. - Táto hodnota nie je platný UUID. - - - This value should be a multiple of {{ compared_value }}. - Táto hodnota by mala byť násobkom {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Tento identifikačný kód podniku (BIC) nie je spojený s IBAN {{ iban }}. - - - This value should be valid JSON. - Táto hodnota by mala byť platný JSON. - - - This collection should contain only unique elements. - Táto kolekcia by mala obsahovať len unikátne prkvy. - - - This value should be positive. - Táto hodnota by mala byť kladná. - - - This value should be either positive or zero. - Táto hodnota by mala byť kladná alebo nulová. - - - This value should be negative. - Táto hodnota by mala byť záporná. - - - This value should be either negative or zero. - Táto hodnota by mala byť záporná alebo nulová. - - - This value is not a valid timezone. - Táto hodnota nie je platné časové pásmo. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Toto heslo uniklo pri narušení ochrany dát, nie je možné ho použiť. Prosím, použite iné heslo. - - - This value should be between {{ min }} and {{ max }}. - Táto hodnota by mala byť medzi {{ min }} a {{ max }}. - - - This value is not a valid hostname. - Táto hodnota nie je platný hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Počet prvkov v tejto kolekcii musí byť násobok {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Táto hodnota musí spĺňať aspoň jedno z nasledujúcich obmedzení: - - - Each element of this collection should satisfy its own set of constraints. - Každý prvok v tejto kolekcii musí spĺňať svoje vlastné obmedzenia. - - - This value is not a valid International Securities Identification Number (ISIN). - Táto hodnota nie je platné medzinárodné označenie cenného papiera (ISIN). - - - This value should be a valid expression. - Táto hodnota by mala byť platným výrazom. - - - This value is not a valid CSS color. - Táto hodnota nie je platná CSS farba. - - - This value is not a valid CIDR notation. - Táto hodnota nie je platnou notáciou CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Hodnota masky siete by mala byť medzi {{ min }} a {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sl.xlf b/vendor/symfony/validator/Resources/translations/validators.sl.xlf deleted file mode 100644 index b956911..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sl.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Vrednost bi morala biti nepravilna (false). - - - This value should be true. - Vrednost bi morala biti pravilna (true). - - - This value should be of type {{ type }}. - Vrednost mora biti naslednjega tipa {{ type }}. - - - This value should be blank. - Vrednost mora biti prazna. - - - The value you selected is not a valid choice. - Vrednost, ki ste jo izbrali, ni veljavna možnost. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Izbrati morate vsaj {{ limit }} možnost.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti.|Izbrati morate vsaj {{ limit }} možnosti. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Izberete lahko največ {{ limit }} možnost.|Izberete lahko največ {{ limit }} možnosti.|Izberete lahko največ {{ limit }} možnosti.|Izberete lahko največ {{ limit }} možnosti. - - - One or more of the given values is invalid. - Ena ali več podanih vrednosti ni veljavnih. - - - This field was not expected. - To polje ni bilo pričakovati. - - - This field is missing. - To polje manjka. - - - This value is not a valid date. - Ta vrednost ni veljaven datum. - - - This value is not a valid datetime. - Ta vrednost ni veljaven datum in čas. - - - This value is not a valid email address. - Ta vrednost ni veljaven e-poštni naslov. - - - The file could not be found. - Datoteke ni mogoče najti. - - - The file is not readable. - Datoteke ni mogoče prebrati. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Datoteka je prevelika ({{ size }} {{ suffix }}). Največja dovoljena velikost je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime tip datoteke je neveljaven ({{ type }}). Dovoljeni mime tipi so {{ types }}. - - - This value should be {{ limit }} or less. - Ta vrednost bi morala biti {{ limit }} ali manj. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ta vrednost je predolga. Morala bi imeti {{ limit }} znak ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znaka ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znake ali manj.|Ta vrednost je predolga. Morala bi imeti {{ limit }} znakov ali manj. - - - This value should be {{ limit }} or more. - Ta vrednost bi morala biti {{ limit }} ali več. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ta vrednost je prekratka. Morala bi imeti {{ limit }} znak ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znaka ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znake ali več.|Ta vrednost je prekratka. Morala bi imeti {{ limit }} znakov ali več. - - - This value should not be blank. - Ta vrednost ne bi smela biti prazna. - - - This value should not be null. - Ta vrednost ne bi smela biti nedefinirana (null). - - - This value should be null. - Ta vrednost bi morala biti nedefinirana (null). - - - This value is not valid. - Ta vrednost ni veljavna. - - - This value is not a valid time. - Ta vrednost ni veljaven čas. - - - This value is not a valid URL. - Ta vrednost ni veljaven URL. - - - The two values should be equal. - Ti dve vrednosti bi morali biti enaki. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Datoteka je prevelika. Največja dovoljena velikost je {{ limit }} {{ suffix }}. - - - The file is too large. - Datoteka je prevelika. - - - The file could not be uploaded. - Datoteke ni bilo mogoče naložiti. - - - This value should be a valid number. - Ta vrednost bi morala biti veljavna številka. - - - This file is not a valid image. - Ta datoteka ni veljavna slika. - - - This is not a valid IP address. - To ni veljaven IP naslov. - - - This value is not a valid language. - Ta vrednost ni veljaven jezik. - - - This value is not a valid locale. - Ta vrednost ni veljavna lokalnost. - - - This value is not a valid country. - Ta vrednost ni veljavna država. - - - This value is already used. - Ta vrednost je že uporabljena. - - - The size of the image could not be detected. - Velikosti slike ni bilo mogoče zaznati. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Širina slike je preširoka ({{ width }}px). Največja dovoljena širina je {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Širina slike je premajhna ({{ width }}px). Najmanjša predvidena širina je {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Višina slike je prevelika ({{ height }}px). Največja dovoljena višina je {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Višina slike je premajhna ({{ height }}px). Najmanjša predvidena višina je {{ min_height }}px. - - - This value should be the user's current password. - Ta vrednost bi morala biti trenutno uporabnikovo geslo. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ta vrednost bi morala imeti točno {{ limit }} znak.|Ta vrednost bi morala imeti točno {{ limit }} znaka.|Ta vrednost bi morala imeti točno {{ limit }} znake.|Ta vrednost bi morala imeti točno {{ limit }} znakov. - - - The file was only partially uploaded. - Datoteka je bila le delno naložena. - - - No file was uploaded. - Nobena datoteka ni bila naložena. - - - No temporary folder was configured in php.ini. - Začasna mapa ni nastavljena v php.ini. - - - Cannot write temporary file to disk. - Začasne datoteke ni bilo mogoče zapisati na disk. - - - A PHP extension caused the upload to fail. - PHP razširitev je vzrok, da nalaganje ni uspelo. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ta zbirka bi morala vsebovati {{ limit }} element ali več.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali več.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali več.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali več. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ta zbirka bi morala vsebovati {{ limit }} element ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementa ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elemente ali manj.|Ta zbirka bi morala vsebovati {{ limit }} elementov ali manj. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ta zbirka bi morala vsebovati točno {{ limit }} element.|Ta zbirka bi morala vsebovati točno {{ limit }} elementa.|Ta zbirka bi morala vsebovati točno {{ limit }} elemente.|Ta zbirka bi morala vsebovati točno {{ limit }} elementov. - - - Invalid card number. - Neveljavna številka kartice. - - - Unsupported card type or invalid card number. - Nepodprti tip kartice ali neveljavna številka kartice. - - - This is not a valid International Bank Account Number (IBAN). - To ni veljavna mednarodna številka bančnega računa (IBAN). - - - This value is not a valid ISBN-10. - Neveljavna vrednost po ISBN-10. - - - This value is not a valid ISBN-13. - Neveljavna vrednost po ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Neveljavna vrednost po ISBN-10 ali po ISBN-13. - - - This value is not a valid ISSN. - Neveljavna vrednost ISSN. - - - This value is not a valid currency. - Ta vrednost ni veljavna valuta. - - - This value should be equal to {{ compared_value }}. - Ta vrednost bi morala biti enaka {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ta vrednost bi morala biti večja od {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ta vrednost bi morala biti večja ali enaka {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ta vrednost bi morala biti identična {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ta vrednost bi morala biti manjša od {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ta vrednost bi morala biti manjša ali enaka {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ta vrednost ne bi smela biti enaka {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ta vrednost ne bi smela biti identična {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Razmerje slike je preveliko ({{ ratio }}). Največje dovoljeno razmerje je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Razmerje slike je premajhno ({{ ratio }}). Najmanjše pričakovano razmerje je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Slika je kvadrat ({{ width }}x{{ height }}px). Kvadratne slike niso dovoljene. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Slika je ležeče usmerjena ({{ width }}x{{ height }}px). Ležeče usmerjene slike niso dovoljene. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Slika je pokončno usmerjena ({{ width }}x{{ height }}px). Pokončno usmerjene slike niso dovoljene. - - - An empty file is not allowed. - Prazna datoteka ni dovoljena. - - - The host could not be resolved. - Gostitelja ni bilo mogoče prepoznati. - - - This value does not match the expected {{ charset }} charset. - Ta vrednost se ne ujema s pričakovanim naborom znakov {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - To ni veljavna identifikacijska koda podjetja (BIC). - - - Error - Napaka - - - This is not a valid UUID. - To ni veljaven UUID. - - - This value should be a multiple of {{ compared_value }}. - Ta vrednost bi morala biti večkratnik od {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ta poslovna identifikacijska koda (BIC) ni povezana z IBAN {{ iban }}. - - - This value should be valid JSON. - Ta vrednost bi morala biti veljaven JSON. - - - This collection should contain only unique elements. - Ta zbirka bi morala vsebovati samo edinstvene elemente. - - - This value should be positive. - Ta vrednost bi morala biti pozitivna. - - - This value should be either positive or zero. - Ta vrednost bi morala biti pozitivna ali enaka nič. - - - This value should be negative. - Ta vrednost bi morala biti negativna. - - - This value should be either negative or zero. - Ta vrednost bi morala biti negativna ali enaka nič. - - - This value is not a valid timezone. - Ta vrednost ni veljaven časovni pas. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - To geslo je ušlo pri kršitvi varnosti podatkov in ga ne smete uporabljati. Prosimo, uporabite drugo geslo. - - - This value should be between {{ min }} and {{ max }}. - Ta vrednost bi morala biti med {{ min }} in {{ max }}. - - - This value is not a valid hostname. - Ta vrednost ni veljavno ime gostitelja. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Število elementov v tej zbirki bi moralo biti mnogokratnik {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ta vrednost bi morala zadostiti vsaj eni izmed sledečih omejitev: - - - Each element of this collection should satisfy its own set of constraints. - Vsak element te zbirke bi moral zadostiti svojemu lastnemu naboru omejitev. - - - This value is not a valid International Securities Identification Number (ISIN). - Ta vrednost ni veljavna mednarodna identifikacijska koda vrednostnih papirjev (ISIN). - - - This value should be a valid expression. - Ta vrednost bi morala biti veljaven izraz. - - - This value is not a valid CSS color. - Ta vrednost ni veljavna barva CSS. - - - This value is not a valid CIDR notation. - Ta vrednost ni veljaven zapis CIDR. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Vrednost omrežne maske mora biti med {{ min }} in {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sq.xlf b/vendor/symfony/validator/Resources/translations/validators.sq.xlf deleted file mode 100644 index 6c0acb9..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sq.xlf +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - This value should be false. - Kjo vlerë duhet të jetë e pavërtetë (false). - - - This value should be true. - Kjo vlerë duhet të jetë e vërtetë (true). - - - This value should be of type {{ type }}. - Kjo vlerë duhet të jetë e llojit {{ type }}. - - - This value should be blank. - Kjo vlerë duhet të jetë e zbrazët. - - - The value you selected is not a valid choice. - Vlera që keni zgjedhur nuk është alternativë e vlefshme. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Duhet të zgjedhni së paku {{ limit }} alternativë.|Duhet të zgjedhni së paku {{ limit }} alternativa. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Duhet të zgjedhni më së shumti {{ limit }} alternativë.|Duhet të zgjedhni më së shumti {{ limit }} alternativa. - - - One or more of the given values is invalid. - Një apo më shumë nga vlerat e dhëna janë të pavlefshme. - - - This field was not expected. - Kjo fushë nuk pritej. - - - This field is missing. - Kjo fushë mungon. - - - This value is not a valid date. - Kjo vlerë nuk është datë e vlefshme. - - - This value is not a valid datetime. - Kjo vlerë nuk është datë-kohë e vlefshme. - - - This value is not a valid email address. - Kjo vlerë nuk është adresë email-i e vlefshme. - - - The file could not be found. - File nuk mund të gjindej. - - - The file is not readable. - File nuk është i lexueshëm. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - File është shumë i madh ({{ size }} {{ suffix }}). Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Lloji mime i file-it është i pavlefshëm ({{ type }}). Llojet mime të lejuara janë {{ types }}. - - - This value should be {{ limit }} or less. - Kjo vlerë duhet të jetë {{ limit }} ose më pak. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Kjo vlerë është shumë e gjatë. Duhet të përmbaj {{ limit }} karakter ose më pak.|Kjo vlerë është shumë e gjatë. Duhet të përmbaj {{ limit }} karaktere ose më pak. - - - This value should be {{ limit }} or more. - Kjo vlerë duhet të jetë {{ limit }} ose më shumë. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Kjo vlerë është shumë e shkurtër. Duhet të përmbaj {{ limit }} karakter ose më shumë.|Kjo vlerë është shumë e shkurtër. Duhet të përmbaj {{ limit }} karaktere ose më shumë. - - - This value should not be blank. - Kjo vlerë nuk duhet të jetë e zbrazët. - - - This value should not be null. - Kjo vlerë nuk duhet të jetë null. - - - This value should be null. - Kjo vlerë duhet të jetë null. - - - This value is not valid. - Kjo vlerë nuk është e vlefshme. - - - This value is not a valid time. - Kjo vlerë nuk është kohë e vlefshme. - - - This value is not a valid URL. - Kjo vlerë nuk është URL e vlefshme. - - - The two values should be equal. - Këto dy vlera duhet të jenë të barabarta. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Ky file është shumë i madh. Madhësia maksimale e lejuar është {{ limit }} {{ suffix }}. - - - The file is too large. - Ky file është shumë i madh. - - - The file could not be uploaded. - Ky file nuk mund të ngarkohet. - - - This value should be a valid number. - Kjo vlerë duhet të jetë numër i vlefshëm. - - - This file is not a valid image. - Ky file nuk është imazh i vlefshëm. - - - This is not a valid IP address. - Kjo adresë IP nuk është e vlefshme. - - - This value is not a valid language. - Kjo vlerë nuk është gjuhë e vlefshme. - - - This value is not a valid locale. - Kjo vlerë nuk është nje locale i vlefshëm. - - - This value is not a valid country. - Kjo vlerë nuk është shtet i vlefshëm. - - - This value is already used. - Kjo vlerë është tashmë në përdorim. - - - The size of the image could not be detected. - Madhësia e imazhit nuk mund të zbulohet. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Gjerësia e imazhit është shumë e madhe ({{ width }}px). Gjerësia maksimale e lejuar është {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Gjerësia e imazhit është shumë e vogël ({{ width }}px). Gjerësia minimale e pritur është {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Gjatësia e imazhit është shumë e madhe ({{ height }}px). Gjatësia maksimale e lejuar është {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Gjatësia e imazhit është shumë e vogël ({{ height }}px). Gjatësia minimale e pritur është {{ min_height }}px. - - - This value should be the user's current password. - Kjo vlerë duhet të jetë fjalëkalimi aktual i përdoruesit. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Kjo vlerë duhet të ketë saktësisht {{ limit }} karakter.|Kjo vlerë duhet të ketë saktësisht {{ limit }} karaktere. - - - The file was only partially uploaded. - Ky file është ngarkuar pjesërisht. - - - No file was uploaded. - Nuk është ngarkuar ndonjë file. - - - No temporary folder was configured in php.ini. - Asnjë folder i përkohshëm nuk është konfiguruar në php.ini. - - - Cannot write temporary file to disk. - Nuk mund të shkruhet file i përkohshëm në disk. - - - A PHP extension caused the upload to fail. - Një ekstension i PHP-së shkaktoi dështimin e ngarkimit. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ky koleksion duhet të përmbajë {{ limit }} element ose më shumë.|Ky koleksion duhet të përmbajë {{ limit }} elemente ose më shumë. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ky koleksion duhet të përmbajë {{ limit }} element ose më pak.|Ky koleksion duhet të përmbajë {{ limit }} elemente ose më pak. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ky koleksion duhet të përmbajë saktësisht {{ limit }} element.|Ky koleksion duhet të përmbajë saktësisht {{ limit }} elemente. - - - Invalid card number. - Numër karte i pavlefshëm. - - - Unsupported card type or invalid card number. - Lloj karte i papranuar ose numër karte i pavlefshëm. - - - This is not a valid International Bank Account Number (IBAN). - Ky nuk është një numër i vlefshëm ndërkombëtar i llogarisë bankare (IBAN). - - - This value is not a valid ISBN-10. - Kjo vlerë nuk është një ISBN-10 e vlefshme. - - - This value is not a valid ISBN-13. - Kjo vlerë nuk është një ISBN-13 e vlefshme. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Kjo vlerë nuk është as ISBN-10 e vlefshme as ISBN-13 e vlefshme. - - - This value is not a valid ISSN. - Kjo vlerë nuk është një ISSN e vlefshme. - - - This value is not a valid currency. - Kjo vlerë nuk është një monedhë e vlefshme. - - - This value should be equal to {{ compared_value }}. - Kjo vlerë duhet të jetë e barabartë me {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Kjo vlerë duhet të jetë më e madhe se {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Kjo vlerë duhet të jetë më e madhe ose e barabartë me {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Kjo vlerë duhet të jetë identike me {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Kjo vlerë duhet të jetë më vogël se {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Kjo vlerë duhet të jetë më e vogël ose e barabartë me {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Kjo vlerë nuk duhet të jetë e barabartë me {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Kjo vlerë nuk duhet të jetë identike me {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Raporti i imazhit është shumë i madh ({{ ratio }}). Raporti maksimal i lejuar është {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Raporti i imazhit është shumë i vogël ({{ ratio }}). Raporti minimal pritet të jetë {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Imazhi është katror ({{ width }}x{{ height }}px). Imazhet katrore nuk janë të lejuara. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Imazhi është i orientuar horizontalisht ({{ width }}x{{ height }}px). Imazhet e orientuara horizontalisht nuk lejohen. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Imazhi është i orientuar vertikalisht ({{ width }}x{{ height }}px). Imazhet orientuara vertikalisht nuk lejohen. - - - An empty file is not allowed. - Një file i zbrazët nuk lejohet. - - - The host could not be resolved. - Host-i nuk mund te zbulohej. - - - This value does not match the expected {{ charset }} charset. - Kjo vlerë nuk përputhet me kodifikimin e karaktereve {{ charset }} që pritej. - - - This is not a valid Business Identifier Code (BIC). - Ky nuk është një Kod Identifikues i Biznesit (BIC) i vleflshem. - - - Error - Gabim - - - This is not a valid UUID. - Ky nuk është një UUID i vlefshëm. - - - This value should be a multiple of {{ compared_value }}. - Kjo vlerë duhet të jetë një shumëfish i {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ky Kod Identifikues i Biznesit (BIC) nuk është i lidhur me IBAN {{ iban }}. - - - This value should be valid JSON. - Kjo vlerë duhet të jetë JSON i vlefshëm. - - - This collection should contain only unique elements. - Ky koleksion duhet të përmbajë vetëm elementë unikë. - - - This value should be positive. - Kjo vlerë duhet të jetë pozitive. - - - This value should be either positive or zero. - Kjo vlerë duhet të jetë pozitive ose zero. - - - This value should be negative. - Kjo vlerë duhet të jetë negative. - - - This value should be either negative or zero. - Kjo vlerë duhet të jetë negative ose zero. - - - This value is not a valid timezone. - Kjo vlerë nuk është një zonë e vlefshme kohore. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ky fjalëkalim është zbuluar në një shkelje të të dhënave, nuk duhet të përdoret. Ju lutemi përdorni një fjalëkalim tjetër. - - - This value should be between {{ min }} and {{ max }}. - Kjo vlerë duhet të jetë ndërmjet {{ min }} dhe {{ max }}. - - - This value is not a valid hostname. - Kjo vlerë nuk është një emër i vlefshëm hosti. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Numri i elementeve në këtë koleksion duhet të jetë një shumëfish i {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Kjo vlerë duhet të plotësojë të paktën njërën nga kufizimet e mëposhtme: - - - Each element of this collection should satisfy its own set of constraints. - Secili element i këtij koleksioni duhet të përmbushë kufizimet e veta. - - - This value is not a valid International Securities Identification Number (ISIN). - Kjo vlerë nuk është një numër i vlefshëm identifikues ndërkombëtar i sigurisë (ISIN). - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf b/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf deleted file mode 100644 index 03ef713..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Вредност треба да буде нетачна. - - - This value should be true. - Вредност треба да буде тачна. - - - This value should be of type {{ type }}. - Вредност треба да буде типа {{ type }}. - - - This value should be blank. - Вредност треба да буде празна. - - - The value you selected is not a valid choice. - Вредност треба да буде једна од понуђених. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Изаберите бар {{ limit }} могућност.|Изаберите бар {{ limit }} могућности.|Изаберите бар {{ limit }} могућности. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Изаберите највише {{ limit }} могућност.|Изаберите највише {{ limit }} могућности.|Изаберите највише {{ limit }} могућности. - - - One or more of the given values is invalid. - Једна или више вредности је невалидна. - - - This field was not expected. - Ово поље није било очекивано. - - - This field is missing. - Ово поље недостаје. - - - This value is not a valid date. - Вредност није валидан датум. - - - This value is not a valid datetime. - Вредност није валидан датум-време. - - - This value is not a valid email address. - Вредност није валидна адреса електронске поште. - - - The file could not be found. - Датотека не може бити пронађена. - - - The file is not readable. - Датотека није читљива. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Датотека је превелика ({{ size }} {{ suffix }}). Највећа дозвољена величина је {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Миме тип датотеке није валидан ({{ type }}). Дозвољени миме типови су {{ types }}. - - - This value should be {{ limit }} or less. - Вредност треба да буде {{ limit }} или мање. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Вредност је предугачка. Треба да има {{ limit }} карактер или мање.|Вредност је предугачка. Треба да има {{ limit }} карактера или мање.|Вредност је предугачка. Треба да има {{ limit }} карактера или мање. - - - This value should be {{ limit }} or more. - Вредност треба да буде {{ limit }} или више. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Вредност је прекратка. Треба да има {{ limit }} карактер или више.|Вредност је прекратка. Треба да има {{ limit }} карактера или више.|Вредност је прекратка. Треба да има {{ limit }} карактера или више. - - - This value should not be blank. - Вредност не треба да буде празна. - - - This value should not be null. - Вредност не треба да буде null. - - - This value should be null. - Вредност треба да буде null. - - - This value is not valid. - Вредност није валидна. - - - This value is not a valid time. - Вредност није валидно време. - - - This value is not a valid URL. - Вредност није валидан URL. - - - The two values should be equal. - Обе вредности треба да буду једнаке. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Датотека је превелика. Највећа дозвољена величина је {{ limit }} {{ suffix }}. - - - The file is too large. - Датотека је превелика. - - - The file could not be uploaded. - Датотека не може бити отпремљена. - - - This value should be a valid number. - Вредност треба да буде валидан број. - - - This file is not a valid image. - Ова датотека није валидна слика. - - - This is not a valid IP address. - Ово није валидна ИП адреса. - - - This value is not a valid language. - Вредност није валидан језик. - - - This value is not a valid locale. - Вредност није валидан локал. - - - This value is not a valid country. - Вредност није валидна земља. - - - This value is already used. - Вредност је већ искоришћена. - - - The size of the image could not be detected. - Величина слике не може бити одређена. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Ширина слике је превелика ({{ width }}px). Најећа дозвољена ширина је {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Ширина слике је премала ({{ width }}px). Најмања дозвољена ширина је {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Висина слике је превелика ({{ height }}px). Најећа дозвољена висина је {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Висина слике је премала ({{ height }}px). Најмања дозвољена висина је {{ min_height }}px. - - - This value should be the user's current password. - Вредност треба да буде тренутна корисничка лозинка. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Вредност треба да има тачно {{ limit }} карактер.|Вредност треба да има тачно {{ limit }} карактера.|Вредност треба да има тачно {{ limit }} карактера. - - - The file was only partially uploaded. - Датотека је само парцијално отпремљена. - - - No file was uploaded. - Датотека није отпремљена. - - - No temporary folder was configured in php.ini. - Привремени директоријум није конфигурисан у php.ini. - - - Cannot write temporary file to disk. - Немогуће писање привремене датотеке на диск. - - - A PHP extension caused the upload to fail. - PHP екстензија је проузроковала неуспех отпремања датотеке. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ова колекција треба да садржи {{ limit }} или више елемената.|Ова колекција треба да садржи {{ limit }} или више елемената.|Ова колекција треба да садржи {{ limit }} или више елемената. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ова колекција треба да садржи {{ limit }} или мање елемената.|Ова колекција треба да садржи {{ limit }} или мање елемената.|Ова колекција треба да садржи {{ limit }} или мање елемената. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ова колекција треба да садржи тачно {{ limit }} елемент.|Ова колекција треба да садржи тачно {{ limit }} елемента.|Ова колекција треба да садржи тачно {{ limit }} елемената. - - - Invalid card number. - Невалидан број картице. - - - Unsupported card type or invalid card number. - Невалидан број картице или тип картице није подржан. - - - This is not a valid International Bank Account Number (IBAN). - Ово није валидан међународни број банковног рачуна (IBAN). - - - This value is not a valid ISBN-10. - Ово није валидан ISBN-10. - - - This value is not a valid ISBN-13. - Ово није валидан ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ово није валидан ISBN-10 или ISBN-13. - - - This value is not a valid ISSN. - Ово није валидан ISSN. - - - This value is not a valid currency. - Ово није валидна валута. - - - This value should be equal to {{ compared_value }}. - Ова вредност треба да буде {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ова вредност треба да буде већа од {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ова вредност треба да буде већа или једнака {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ова вредност треба да буде идентична са {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ова вредност треба да буде мања од {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ова вредност треба да буде мања или једнака {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ова вредност не треба да буде једнака {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ова вредност не треба да буде идентична са {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Размера ове слике је превелика ({{ ratio }}). Максимална дозвољена размера је {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Размера ове слике је премала ({{ ratio }}). Минимална очекивана размера је {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Слика је квадратна ({{ width }}x{{ height }}px). Квадратне слике нису дозвољене. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Слика је оријентације пејзажа ({{ width }}x{{ height }}px). Пејзажна оријентација слика није дозвољена. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Слика је оријантације портрета ({{ width }}x{{ height }}px). Портретна оријентација слика није дозвољена. - - - An empty file is not allowed. - Празна датотека није дозвољена. - - - The host could not be resolved. - Име хоста не може бити разрешено. - - - This value does not match the expected {{ charset }} charset. - Вредност се не поклапа са очекиваним {{ charset }} сетом карактера. - - - This is not a valid Business Identifier Code (BIC). - Ово није валидан међународни идентификацијски код банке (BIC). - - - Error - Грешка - - - This is not a valid UUID. - Ово није валидан универзални уникатни идентификатор (UUID). - - - This value should be a multiple of {{ compared_value }}. - Ова вредност би требало да буде дељива са {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - BIC код није повезан са IBAN {{ iban }}. - - - This value should be valid JSON. - Ова вредност би требало да буде валидан JSON. - - - This collection should contain only unique elements. - Ова колекција би требала да садржи само јединствене елементе. - - - This value should be positive. - Ова вредност би требала бити позитивна. - - - This value should be either positive or zero. - Ова вредност би требала бити позитивна или нула. - - - This value should be negative. - Ова вредност би требала бити негативна. - - - This value should be either negative or zero. - Ова вредност би требала бити позитивна или нула. - - - This value is not a valid timezone. - Ова вредност није валидна временска зона. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ова лозинка је компромитована приликом претходних напада, немојте је користити. Користите другу лозинку. - - - This value should be between {{ min }} and {{ max }}. - Ова вредност треба да буде између {{ min }} и {{ max }}. - - - This value is not a valid hostname. - Ова вредност није исправно име хоста. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Број елемената у овој колекцији би требало да буде дељив са {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ова вредност би требало да задовољава најмање једно од наредних ограничења: - - - Each element of this collection should satisfy its own set of constraints. - Сваки елемент ове колекције би требало да задовољи сопствени скуп ограничења. - - - This value is not a valid International Securities Identification Number (ISIN). - Ова вредност није исправна међународна идентификациона ознака хартија од вредности (ISIN). - - - This value should be a valid expression. - Ова вредност треба да буде валидан израз. - - - This value is not a valid CSS color. - Ова вредност није исправна CSS боја. - - - This value is not a valid CIDR notation. - Ова вредност није исправна CIDR нотација. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Вредност мрежне маске треба бити између {{ min }} и {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf b/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf deleted file mode 100644 index 86453ad..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Vrednost bi trebalo da bude netačna. - - - This value should be true. - Vrednost bi trebalo da bude tačna. - - - This value should be of type {{ type }}. - Vrednost bi trebalo da bude tipa {{ type }}. - - - This value should be blank. - Vrednost bi trebalo da bude prazna. - - - The value you selected is not a valid choice. - Odabrana vrednost nije validan izbor. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Morate odabrati bar {{ limit }} mogućnost.|Morate odabrati bar {{ limit }} mogućnosti.|Morate odabrati bar {{ limit }} mogućnosti. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Morate odabrati najviše {{ limit }} mogućnost.|Morate odabrati najviše {{ limit }} mogućnosti.|Morate odabrati najviše {{ limit }} mogućnosti. - - - One or more of the given values is invalid. - Jedna ili više vrednosti nisu validne. - - - This field was not expected. - Ovo polje nije bilo očekivano. - - - This field is missing. - Ovo polje nedostaje. - - - This value is not a valid date. - Vrednost nije validan datum. - - - This value is not a valid datetime. - Vrednost nije validno vreme. - - - This value is not a valid email address. - Vrednost nije validna adresa elektronske pošte. - - - The file could not be found. - Datoteka ne može biti pronađena. - - - The file is not readable. - Datoteka nije čitljiva. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Datoteka je prevelika ({{ size }} {{ suffix }}). Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - MIME tip datoteke nije validan ({{ type }}). Dozvoljeni MIME tipovi su {{ types }}. - - - This value should be {{ limit }} or less. - Vrednost bi trebalo da bude {{ limit }} ili manje. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Vrednost je predugačka. Trebalo bi da ima {{ limit }} karakter ili manje.|Vrednost je predugačka. Trebalo bi da ima {{ limit }} karaktera ili manje.|Vrednost je predugačka. Trebalo bi da ima {{ limit }} karaktera ili manje. - - - This value should be {{ limit }} or more. - Vrednost bi trebalo da bude {{ limit }} ili više. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Vrednost je prekratka. Trebalo bi da ima {{ limit }} karakter ili više.|Vrednost je prekratka. Trebalo bi da ima {{ limit }} karaktera ili više.|Vrednost je prekratka. Trebalo bi da ima {{ limit }} karaktera ili više. - - - This value should not be blank. - Vrednost ne bi trebalo da bude prazna. - - - This value should not be null. - Vrednost ne bi trebalo da bude prazna. - - - This value should be null. - Vrednost bi trebalo da bude prazna. - - - This value is not valid. - Vrednost nije validna. - - - This value is not a valid time. - Vrednost nije validno vreme. - - - This value is not a valid URL. - Vrednost nije validan URL. - - - The two values should be equal. - Obe vrednosti bi trebalo da budu jednake. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} {{ suffix }}. - - - The file is too large. - Datoteka je prevelika. - - - The file could not be uploaded. - Datoteka ne može biti otpremljena. - - - This value should be a valid number. - Vrednost bi trebalo da bude validan broj. - - - This file is not a valid image. - Ova datoteka nije validna slika. - - - This is not a valid IP address. - Ovo nije validna IP adresa. - - - This value is not a valid language. - Vrednost nije validan jezik. - - - This value is not a valid locale. - Vrednost nije validna međunarodna oznaka jezika. - - - This value is not a valid country. - Vrednost nije validna država. - - - This value is already used. - Vrednost je već iskorišćena. - - - The size of the image could not be detected. - Veličina slike ne može biti određena. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Širina slike je prevelika ({{ width }} piksela). Najveća dozvoljena širina je {{ max_width }} piksela. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Širina slike je premala ({{ width }} piksela). Najmanja dozvoljena širina je {{ min_width }} piksela. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Visina slike je prevelika ({{ height }} piksela). Najveća dozvoljena visina je {{ max_height }} piksela. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Visina slike je premala ({{ height }} piksela). Najmanja dozvoljena visina je {{ min_height }} piksela. - - - This value should be the user's current password. - Vrednost bi trebalo da bude trenutna korisnička lozinka. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Vrednost bi trebalo da ima tačno {{ limit }} karakter.|Vrednost bi trebalo da ima tačno {{ limit }} karaktera.|Vrednost bi trebalo da ima tačno {{ limit }} karaktera. - - - The file was only partially uploaded. - Datoteka je samo parcijalno otpremljena. - - - No file was uploaded. - Datoteka nije otpremljena. - - - No temporary folder was configured in php.ini. - Privremeni direktorijum nije konfigurisan u php.ini. - - - Cannot write temporary file to disk. - Nemoguće pisanje privremene datoteke na disk. - - - A PHP extension caused the upload to fail. - PHP ekstenzija je prouzrokovala neuspeh otpremanja datoteke. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili više elemenata. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata.|Ova kolekcija bi trebalo da sadrži {{ limit }} ili manje elemenata. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ova kolekcija bi trebalo da sadrži tačno {{ limit }} element.|Ova kolekcija bi trebalo da sadrži tačno {{ limit }} elementa.|Ova kolekcija bi trebalo da sadrži tačno {{ limit }} elemenata. - - - Invalid card number. - Broj kartice nije validan. - - - Unsupported card type or invalid card number. - Tip kartice nije podržan ili broj kartice nije validan. - - - This is not a valid International Bank Account Number (IBAN). - Ovo nije validan međunarodni broj bankovnog računa (IBAN). - - - This value is not a valid ISBN-10. - Ovo nije validan ISBN-10. - - - This value is not a valid ISBN-13. - Ovo nije validan ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ovo nije validan ISBN-10 ili ISBN-13. - - - This value is not a valid ISSN. - Ovo nije validan ISSN. - - - This value is not a valid currency. - Ovo nije validna valuta. - - - This value should be equal to {{ compared_value }}. - Ova vrednost bi trebalo da bude jednaka {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ova vrednost bi trebalo da bude veća od {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ova vrednost bi trebalo da bude veća ili jednaka {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrednost bi trebalo da bude identična sa {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ova vrednost bi trebalo da bude manja od {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ova vrednost bi trebalo da bude manja ili jednaka {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ova vrednost ne bi trebalo da bude jednaka {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ova vrednost ne bi trebalo da bude identična sa {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Razmera ove slike je prevelika ({{ ratio }}). Maksimalna dozvoljena razmera je {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Razmera ove slike je premala ({{ ratio }}). Minimalna očekivana razmera je {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Slika je kvadratna ({{ width }}x{{ height }} piksela). Kvadratne slike nisu dozvoljene. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Slika je pejzažno orijentisana ({{ width }}x{{ height }} piksela). Pejzažna orijentisane slike nisu dozvoljene. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Slika je portretno orijentisana ({{ width }}x{{ height }} piksela). Portretno orijentisane slike nisu dozvoljene. - - - An empty file is not allowed. - Prazna datoteka nije dozvoljena. - - - The host could not be resolved. - Ime hosta ne može biti razrešeno. - - - This value does not match the expected {{ charset }} charset. - Vrednost se ne poklapa sa očekivanim {{ charset }} setom karaktera. - - - This is not a valid Business Identifier Code (BIC). - Ovo nije validan BIC. - - - Error - Greška - - - This is not a valid UUID. - Ovo nije validan univerzalni unikatni identifikator (UUID). - - - This value should be a multiple of {{ compared_value }}. - Ova vrednost bi trebalo da bude deljiva sa {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - BIC kod nije povezan sa IBAN {{ iban }}. - - - This value should be valid JSON. - Ova vrednost bi trebalo da bude validan JSON. - - - This collection should contain only unique elements. - Ova kolekcija bi trebala da sadrži samo jedinstvene elemente. - - - This value should be positive. - Ova vrednost bi trebala biti pozitivna. - - - This value should be either positive or zero. - Ova vrednost bi trebala biti pozitivna ili nula. - - - This value should be negative. - Ova vrednost bi trebala biti negativna. - - - This value should be either negative or zero. - Ova vrednost bi trebala biti negativna ili nula. - - - This value is not a valid timezone. - Ova vrednost nije validna vremenska zona. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ova lozinka je kompromitovana prilikom prethodnih napada, nemojte je koristiti. Koristite drugu lozinku. - - - This value should be between {{ min }} and {{ max }}. - Ova vrednost treba da bude između {{ min }} i {{ max }}. - - - This value is not a valid hostname. - Ova vrednost nije ispravno ime poslužitelja (hostname). - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Broj elemenata u ovoj kolekciji bi trebalo da bude deljiv sa {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ova vrednost bi trebalo da zadovoljava namjanje jedno od narednih ograničenja: - - - Each element of this collection should satisfy its own set of constraints. - Svaki element ove kolekcije bi trebalo da zadovolji sopstveni skup ograničenja. - - - This value is not a valid International Securities Identification Number (ISIN). - Ova vrednost nije ispravna međunarodna identifikaciona oznaka hartija od vrednosti (ISIN). - - - This value should be a valid expression. - Ova vrednost treba da bude validan izraz. - - - This value is not a valid CSS color. - Ova vrednost nije ispravna CSS boja. - - - This value is not a valid CIDR notation. - Ova vrednost nije ispravna CIDR notacija. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Vrednost mrežne maske treba biti između {{ min }} i {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.sv.xlf b/vendor/symfony/validator/Resources/translations/validators.sv.xlf deleted file mode 100644 index fca7bdc..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.sv.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Värdet ska vara falskt. - - - This value should be true. - Värdet ska vara sant. - - - This value should be of type {{ type }}. - Värdet ska vara av typen {{ type }}. - - - This value should be blank. - Värdet ska vara tomt. - - - The value you selected is not a valid choice. - Värdet ska vara ett av de givna valen. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Du måste välja minst {{ limit }} val.|Du måste välja minst {{ limit }} val. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Du kan som mest välja {{ limit }} val.|Du kan som mest välja {{ limit }} val. - - - One or more of the given values is invalid. - Ett eller fler av de angivna värdena är ogiltigt. - - - This field was not expected. - Det här fältet förväntades inte. - - - This field is missing. - Det här fältet saknas. - - - This value is not a valid date. - Värdet är inte ett giltigt datum. - - - This value is not a valid datetime. - Värdet är inte ett giltigt datum med tid. - - - This value is not a valid email address. - Värdet är inte en giltig e-postadress. - - - The file could not be found. - Filen kunde inte hittas. - - - The file is not readable. - Filen är inte läsbar. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Filen är för stor ({{ size }} {{ suffix }}). Största tillåtna storlek är {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Filens MIME-typ ({{ type }}) är ogiltig. De tillåtna typerna är {{ types }}. - - - This value should be {{ limit }} or less. - Värdet ska vara {{ limit }} eller mindre. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Värdet är för långt. Det ska ha {{ limit }} tecken eller färre.|Värdet är för långt. Det ska ha {{ limit }} tecken eller färre. - - - This value should be {{ limit }} or more. - Värdet ska vara {{ limit }} eller mer. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Värdet är för kort. Det ska ha {{ limit }} tecken eller mer.|Värdet är för kort. Det ska ha {{ limit }} tecken eller mer. - - - This value should not be blank. - Värdet kan inte vara tomt. - - - This value should not be null. - Värdet kan inte vara null. - - - This value should be null. - Värdet ska vara null. - - - This value is not valid. - Värdet är inte giltigt. - - - This value is not a valid time. - Värdet är inte en giltig tid. - - - This value is not a valid URL. - Värdet är inte en giltig URL. - - - The two values should be equal. - De två värdena måste vara lika. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Filen är för stor. Tillåten maximal storlek är {{ limit }} {{ suffix }}. - - - The file is too large. - Filen är för stor. - - - The file could not be uploaded. - Filen kunde inte laddas upp. - - - This value should be a valid number. - Värdet ska vara ett giltigt nummer. - - - This file is not a valid image. - Filen är ingen giltig bild. - - - This is not a valid IP address. - Det här är inte en giltig IP-adress. - - - This value is not a valid language. - Värdet är inte ett giltigt språk. - - - This value is not a valid locale. - Värdet är inte en giltig plats. - - - This value is not a valid country. - Värdet är inte ett giltigt land. - - - This value is already used. - Värdet används redan. - - - The size of the image could not be detected. - Det gick inte att fastställa storleken på bilden. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Bildens bredd är för stor ({{ width }}px). Tillåten maximal bredd är {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Bildens bredd är för liten ({{ width }}px). Minsta förväntade bredd är {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Bildens höjd är för stor ({{ height }}px). Tillåten maximal bredd är {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Bildens höjd är för liten ({{ height }}px). Minsta förväntade höjd är {{ min_height }}px. - - - This value should be the user's current password. - Värdet ska vara användarens nuvarande lösenord. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Värdet ska ha exakt {{ limit }} tecken.|Värdet ska ha exakt {{ limit }} tecken. - - - The file was only partially uploaded. - Filen laddades bara upp delvis. - - - No file was uploaded. - Ingen fil laddades upp. - - - No temporary folder was configured in php.ini. - Det finns ingen temporär mapp konfigurerad i php.ini. - - - Cannot write temporary file to disk. - Kan inte skriva temporär fil till disken. - - - A PHP extension caused the upload to fail. - En PHP extension gjorde att uppladdningen misslyckades. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Den här samlingen ska innehålla {{ limit }} element eller mer.|Den här samlingen ska innehålla {{ limit }} element eller mer. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Den här samlingen ska innehålla {{ limit }} element eller mindre.|Den här samlingen ska innehålla {{ limit }} element eller mindre. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Den här samlingen ska innehålla exakt {{ limit }} element.|Den här samlingen ska innehålla exakt {{ limit }} element. - - - Invalid card number. - Ogiltigt kortnummer. - - - Unsupported card type or invalid card number. - Okänd korttyp eller ogiltigt kortnummer. - - - This is not a valid International Bank Account Number (IBAN). - Det här är inte en giltig International Bank Account Number (IBANK). - - - This value is not a valid ISBN-10. - Värdet är inte en giltig ISBN-10. - - - This value is not a valid ISBN-13. - Värdet är inte en giltig ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Värdet är varken en giltig ISBN-10 eller en giltig ISBN-13. - - - This value is not a valid ISSN. - Värdet är inte en giltig ISSN. - - - This value is not a valid currency. - Värdet är inte en giltig valuta. - - - This value should be equal to {{ compared_value }}. - Värdet ska vara detsamma som {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Värdet ska vara större än {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Värdet ska bara större än eller detsamma som {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Värdet ska vara identiskt till {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Värdet ska vara mindre än {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Värdet ska vara mindre än eller detsamma som {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Värdet ska inte vara detsamma som {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Värdet ska inte vara identiskt med {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Förhållandet mellan bildens bredd och höjd är för stort ({{ ratio }}). Högsta tillåtna förhållande är {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Förhållandet mellan bildens bredd och höjd är för litet ({{ ratio }}). Minsta tillåtna förhållande är {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Bilden är kvadratisk ({{ width }}x{{ height }}px). Kvadratiska bilder tillåts inte. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Bilden är landskapsorienterad ({{ width }}x{{ height }}px). Landskapsorienterade bilder tillåts inte. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Bilden är porträttsorienterad ({{ width }}x{{ height }}px). Porträttsorienterade bilder tillåts inte. - - - An empty file is not allowed. - En tom fil är inte tillåten. - - - The host could not be resolved. - Värddatorn kunde inte hittas. - - - This value does not match the expected {{ charset }} charset. - Detta värde har inte den förväntade teckenkodningen {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Detta är inte en giltig BIC-kod. - - - Error - Fel - - - This is not a valid UUID. - Detta är inte ett giltigt UUID. - - - This value should be a multiple of {{ compared_value }}. - Detta värde ska vara en multipel av {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Denna BIC-koden är inte associerad med IBAN {{ iban }}. - - - This value should be valid JSON. - Detta värde ska vara giltig JSON. - - - This collection should contain only unique elements. - Denna samling bör endast innehålla unika element. - - - This value should be positive. - Detta värde bör vara positivt. - - - This value should be either positive or zero. - Detta värde bör vara antingen positivt eller noll. - - - This value should be negative. - Detta värde bör vara negativt. - - - This value should be either negative or zero. - Detta värde bör vara antingen negativt eller noll. - - - This value is not a valid timezone. - Detta värde är inte en giltig tidszon. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Det här lösenordet har läckt ut vid ett dataintrång, det får inte användas. Använd ett annat lösenord. - - - This value should be between {{ min }} and {{ max }}. - Detta värde bör ligga mellan {{ min }} och {{ max }}. - - - This value is not a valid hostname. - Värdet är inte ett giltigt servernamn. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Antalet element i samlingen ska vara en multipel av {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Det här värdet skall uppfylla minst ett av följande krav: - - - Each element of this collection should satisfy its own set of constraints. - Varje element i samlingen skall uppfylla sin egen uppsättning av krav. - - - This value is not a valid International Securities Identification Number (ISIN). - Det här värdet är inte ett giltigt "International Securities Identification Number" (ISIN). - - - This value should be a valid expression. - Det här värdet bör vara ett giltigt uttryck. - - - This value is not a valid CSS color. - Det här värdet är inte en giltig CSS-färg. - - - This value is not a valid CIDR notation. - Det här värdet är inte en giltig CIDR-notation. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Värdet på nätmasken bör vara mellan {{ min }} och {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.th.xlf b/vendor/symfony/validator/Resources/translations/validators.th.xlf deleted file mode 100644 index 26affc5..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.th.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - ค่านี้ควรเป็น false - - - This value should be true. - ค่านี้ควรเป็น true - - - This value should be of type {{ type }}. - ค่านี้ควรเป็น {{ type }} - - - This value should be blank. - ควรเป็นค่าว่าง - - - The value you selected is not a valid choice. - คุณเลือกค่าที่ไม่ตรงกับตัวเลือก - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - คุณต้องเลือกอย่างน้อย {{ limit }} ตัวเลือก - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - คุณเลือกได้มากที่สุด {{ limit }} ตัวเลือก - - - One or more of the given values is invalid. - มีบางค่าที่ส่งมาไม่ถูกต้อง - - - This field was not expected. - ไม่ควรมีฟิลด์นี้ - - - This field is missing. - ฟิลด์นี้หายไป - - - This value is not a valid date. - ค่าของวันที่ไม่ถูกต้อง - - - This value is not a valid datetime. - ค่าของวันที่และเวลาไม่ถูกต้อง - - - This value is not a valid email address. - ค่าของอีเมล์ไม่ถูกต้อง - - - The file could not be found. - ไม่พบไฟล์ - - - The file is not readable. - ไฟล์ไม่อยู่ในสถานะที่สามารถอ่านได้ - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - ไฟล์ใหญ่เกิน ({{ size }} {{ suffix }}) อนุญาตให้ใหญ่ที่สุดได้ไม่เกิน {{ limit }} {{ suffix }} - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime type ของไฟล์ไม่ถูกต้อง ({{ type }}) Mime types ที่อนุญาตคือ {{ types }} - - - This value should be {{ limit }} or less. - ค่านี้ควรจะเป็น {{ limit }} หรือน้อยกว่านั้น - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - ค่านี้ยาวเกินไป ควรจะมีแค่ {{ limit }} ตัวอักษรหรือน้อยกว่านั้น - - - This value should be {{ limit }} or more. - ค่านี้ควรจะมี {{ limit }} หรือมากกว่านั้น - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - ค่านี้สั้นเกินไป ควรจะมี {{ limit }} ตัวอักษรหรือมากกว่านั้น - - - This value should not be blank. - ค่านี้ไม่ควรเป็นค่าว่าง - - - This value should not be null. - ค่านี้ไม่ควรเป็นค่า null - - - This value should be null. - ค่านี้ควรเป็นค่า null - - - This value is not valid. - ค่านี้ไม่ถูกต้อง - - - This value is not a valid time. - ค่าของเวลาไม่ถูกต้อง - - - This value is not a valid URL. - ค่าของ URL ไม่ถูกต้อง - - - The two values should be equal. - ค่าทั้งสองค่าควรจะเหมือนกัน - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - ขนาดไฟล์ใหญ่เกินไป อนุญาตให้ไฟล์ขนาดใหญ่ได้ไม่เกิน {{ limit }} {{ suffix }} - - - The file is too large. - ขนาดไฟล์ใหญ่เกินไป - - - The file could not be uploaded. - ไม่สามารถอัปโหลดไฟล์ได้ - - - This value should be a valid number. - ค่าของตัวเลขไม่ถูกต้อง - - - This file is not a valid image. - ไฟล์นี้ไม่ใช่ไฟล์รูปภาพ - - - This is not a valid IP address. - ค่าของ IP ไม่ถูกต้อง - - - This value is not a valid language. - ค่าของภาษาไม่ถูกต้อง - - - This value is not a valid locale. - ค่าของภูมิภาค (Locale) ไม่ถูกต้อง - - - This value is not a valid country. - ค่าของประเทศไม่ถูกต้อง - - - This value is already used. - ค่านี้ถูกใช้งานไปแล้ว - - - The size of the image could not be detected. - ไม่สามารถตรวจสอบขนาดไฟล์ของภาพได้ - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - ความกว้างของภาพเกินขนาด ({{ width }}px) อนุญาตให้กว้างได้มากที่สุด {{ max_width }}px - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - ความกว้างของภาพต่ำเกินไป ({{ width }}px) อนุญาตให้ความกว้างไม่ต่ำกว่า {{ min_width }}px - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - ความสูงของภาพเกินขนาด ({{ height }}px) อนุญาตให้สูงได้มากที่สุด {{ max_height }}px - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - ความสูงของภาพเล็กเกินไป ({{ height }}px) อนุญาตให้ความสูงไม่ควรต่ำกว่า {{ min_height }}px - - - This value should be the user's current password. - ค่านี้ควรจะเป็นรหัสผ่านปัจจุบันของผู้ใช้ - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - ค่านี้ควรจะมีความยาว {{ limit }} ตัวอักษร - - - The file was only partially uploaded. - อัปโหลดไฟล์ได้เพียงบางส่วนเท่านั้น - - - No file was uploaded. - ไม่มีไฟล์ใดถูกอัปโหลด - - - No temporary folder was configured in php.ini. - ไม่พบการตั้งค่าโฟลเดอร์ชั่วคราว (temporary folder) ใน php.ini - - - Cannot write temporary file to disk. - ไม่สามารถเขียนไฟล์ชั่วคราว (temporary file) ลงดิสก์ได้ - - - A PHP extension caused the upload to fail. - PHP extension ทำให้การอัปโหลดมีปัญหา - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - คอเล็กชั่นนี้ควรจะประกอบไปด้วยอย่างน้อย {{ limit }} สมาชิก - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - คอเล็กชั่นนี้ไม่ควรมีสมาชิกเกิน {{ limit }} - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - คอเล็กชั่นนี้ควรจะมี {{ limit }} สมาชิกเท่านั้น - - - Invalid card number. - หมายเลขบัตรไม่ถูกต้อง - - - Unsupported card type or invalid card number. - ไม่รู้จักประเภทของบัตร หรือหมายเลขบัตรไม่ถูกต้อง - - - This is not a valid International Bank Account Number (IBAN). - ค่านี้ไม่ใช่ International Bank Account Number (IBAN) ที่ถูกต้อง - - - This value is not a valid ISBN-10. - ค่านี้ไม่ใช่ ISBN-10 ที่ถูกต้อง - - - This value is not a valid ISBN-13. - ค่านี้ไม่ใช่ ISBN-13 ที่ถูกต้อง - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - ค่านี้ไม่ใช่ ISBN-10 หรือ ISBN-13 ที่ถูกต้อง - - - This value is not a valid ISSN. - ค่านี้ไม่ใช่ ISSN ที่ถูกต้อง - - - This value is not a valid currency. - ค่านี้ไม่ใช่สกุลเงินที่ถูกต้อง - - - This value should be equal to {{ compared_value }}. - ค่านี้ควรตรงกับ {{ compared_value }} - - - This value should be greater than {{ compared_value }}. - ค่านี้ควรจะมากกว่า {{ compared_value }} - - - This value should be greater than or equal to {{ compared_value }}. - ค่านี้ควรจะมากกว่าหรือตรงกับ {{ compared_value }} - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - ค่านี้ควรจะเหมือนกันกับ {{ compared_value_type }} {{ compared_value }} - - - This value should be less than {{ compared_value }}. - ค่านี้ควรจะน้อยกว่า {{ compared_value }} - - - This value should be less than or equal to {{ compared_value }}. - ค่านี้ควรจะน้อยกว่าหรือเท่ากับ {{ compared_value }} - - - This value should not be equal to {{ compared_value }}. - ค่านี้ไม่ควรเท่ากันกับ {{ compared_value }} - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - ค่านี้ไม่ควรเหมือนกันกับ {{ compared_value_type }} {{ compared_value }} - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - สัดส่วนของภาพใหญ่เกิน ({{ ratio }}) สัดส่วนใหญ่ที่สุดที่ใช้ได้คือ {{ max_ratio }} - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - สัดส่วนของภาพเล็กเกิน ({{ ratio }}) สัดส่วนเล็กที่สุดที่ใช้ได้คือ {{ min_ratio }} - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - รูปภาพเป็นจุตรัส ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นสี่เหลี่ยมจตุรัส - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - ภาพนี้เป็นแนวนอน ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นแนวนอน - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - ภาพนี้เป็นแนวตั้ง ({{ width }}x{{ height }}px) ไม่อนุญาตภาพที่เป็นแนวตั้ง - - - An empty file is not allowed. - ไม่อนุญาตให้ใช้ไฟล์ว่าง - - - The host could not be resolved. - ไม่สามารถแก้ไขชื่อโฮสต์ - - - This value does not match the expected {{ charset }} charset. - ค่านี้ไม่ตรงกับการเข้ารหัส {{ charset }} - - - This is not a valid Business Identifier Code (BIC). - นี่ไม่ถูกต้องตามรหัสสำหรับระบุธุรกิจนี้ (BIC) - - - Error - เกิดข้อผิดพลาด - - - This is not a valid UUID. - นี่ไม่ใช่ UUID ที่ถูกต้อง - - - This value should be a multiple of {{ compared_value }}. - ค่านี้ควรเป็น {{ compared_value }} หลายตัว - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - รหัสสำหรับระบุธุรกิจนี้ (BIC) ไม่เกี่ยวข้องกับ IBAN {{ iban }} - - - This value should be valid JSON. - ค่านี้ควรอยู่ในรูปแบบ JSON ที่ถูกต้อง - - - This collection should contain only unique elements. - คอเล็กชั่นนี้ควรมีเฉพาะสมาชิกที่ไม่ซ้ำกันเท่านั้น - - - This value should be positive. - ค่านี้ควรเป็นค่าบวก - - - This value should be either positive or zero. - ค่านี้ควรเป็นค่าบวกหรือค่าศูนย์ - - - This value should be negative. - ค่านี้ควรเป็นค่าลบ - - - This value should be either negative or zero. - ค่านี้ควรเป็นค่าลบหรือค่าศูนย์ - - - This value is not a valid timezone. - ค่าเขตเวลาไม่ถูกต้อง - - - This password has been leaked in a data breach, it must not be used. Please use another password. - รหัสผ่านนี้ได้เคยรั่วไหลออกไปโดยถูกการละเมิดข้อมูล ซึ่งไม่ควรนำกลับมาใช้ กรุณาใช้รหัสผ่านอื่น - - - This value should be between {{ min }} and {{ max }}. - ค่านี้ควรอยู่ระหว่าง {{ min }} ถึง {{ max }} - - - This value is not a valid hostname. - ค่าโฮสต์เนมไม่ถูกต้อง - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - จำนวนของสมาชิกในคอเล็กชั่นควรเป็นพหุคูณของ {{ compared_value }} - - - This value should satisfy at least one of the following constraints: - ค่านี้ควรเป็นไปตามข้อจำกัดอย่างน้อยหนึ่งข้อจากข้อจำกัดเหล่านี้: - - - Each element of this collection should satisfy its own set of constraints. - สมาชิกแต่ละตัวในคอเล็กชั่นควรเป็นไปตามข้อจำกัดของคอเล็กชั่นนั้นๆ - - - This value is not a valid International Securities Identification Number (ISIN). - ค่ารหัสหลักทรัพย์สากล (ISIN) ไม่ถูกต้อง - - - This value should be a valid expression. - ค่านี้ควรเป็นนิพจน์ที่ถูกต้อง - - - This value is not a valid CSS color. - ค่านี้ไม่ใช่สี CSS ที่ถูกต้อง - - - This value is not a valid CIDR notation. - ค่านี้ไม่ใช่รูปแบบ CIDR ที่ถูกต้อง - - - The value of the netmask should be between {{ min }} and {{ max }}. - ค่าของ netmask ควรมีค่าระหว่าง {{ min }} ถึง {{ max }} - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.tl.xlf b/vendor/symfony/validator/Resources/translations/validators.tl.xlf deleted file mode 100644 index 74d5ed5..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.tl.xlf +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - This value should be false. - Ang halaga nito ay dapat na huwad. - - - This value should be true. - Ang halaga nito ay dapat totoo. - - - This value should be of type {{ type }}. - Ang halaga nito ay dapat sa uri {{ type }}. - - - This value should be blank. - Ang halaga nito ay dapat walang laman. - - - The value you selected is not a valid choice. - Ang halaga ng iyong pinili ay hindi balidong pagpili. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Kailangan mong pumili ng pinakamababang {{ limit }} ng pagpilian.|Kailangan mong pumili ng pinakamababang {{ limit }} ng mga pagpipilian. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Kailangan mong pumili ng pinakamataas {{ limit }} ng pagpipilian.|Kailangan mong pumili ng pinakamataas {{ limit }} ng mga pagpipilian. - - - One or more of the given values is invalid. - Isa o higit pang mga halaga na binigay ay hindi balido. - - - This field was not expected. - Ang larangang ito ay hindi inaasahan. - - - This field is missing. - Ang patlang na ito ay nawawala. - - - This value is not a valid date. - Ang halagang ito ay hindi balidong petsa. - - - This value is not a valid datetime. - Ang halagang ito ay hindi wastong petsa/oras. - - - This value is not a valid email address. - Ang halagang ito ay hindi balidong address ng email. - - - The file could not be found. - Ang file na ito ay hindi makita. - - - The file is not readable. - Ang file na ito ay hindi mabasa. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Ang file na ito ay masyadong malaki ({{ size }} {{ suffix }}). Ang pinakamalaking sukat {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Ang uri ng file ng mime ay hindi balido ({{ type }}). Ang mga pinapayagang uri ng mime ay ang {{ types }}. - - - This value should be {{ limit }} or less. - Ang halaga nito ay dapat na {{ limit }} or maliit pa. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} karakter o maliit pa.|Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} mga karakter o maliit pa. - - - This value should be {{ limit }} or more. - Ang halaga nito ay dapat na {{ limit }} o mas marami pa. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} karakter o marami pa.|Ang halaga nito ay masyadong maliit. Ito ay dapat na {{ limit }} mga karakter o marami pa. - - - This value should not be blank. - Ang halaga na ito ay dapat na may laman. - - - This value should not be null. - Meron dapt itong halaga. - - - This value should be null. - Wala dapat itong halaga. - - - This value is not valid. - Hindi balido ang halagang ito. - - - This value is not a valid time. - Ang halagang ito ay hindi wastong oras. - - - This value is not a valid URL. - Hindi ito isang balidong URL. - - - The two values should be equal. - Ang dalwang halaga ay dapat magkapareha. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Ang file ay masyadong malaki. Ang pinapayagan halaga lamang ay {{ limit}} {{ suffix }}. - - - The file is too large. - Ang file na ito ay masyadong malaki. - - - The file could not be uploaded. - Ang file na ito ay hindi ma-upload. - - - This value should be a valid number. - Ang halaga nito ay dapat na wastong numero. - - - This file is not a valid image. - Ang file na ito ay hindi wastong imahe. - - - This is not a valid IP address. - Ito ay hindi wastong IP address. - - - This value is not a valid language. - Ang halaga na ito ay hindi balidong wika. - - - This value is not a valid locale. - Ito ay isang hindi wastong locale na halaga. - - - This value is not a valid country. - ng halaga na ito ay hindi wastong bansa. - - - This value is already used. - Ang halaga na ito ay ginamit na. - - - The size of the image could not be detected. - Ang sukat ng imahe ay hindi madetect. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Ang lapad ng imahe ay masyadong malaki ({{ width }}px). Ang pinapayagang lapay ay {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Ang lapad ng imahe ay masyadong maliit ({{ width }}px). Ang pinakamaliit na pinapayagang lapad ay {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Ang haba ng imahe ay masyadong mataas ({{ height }}px). Ang pinakmataas na haba ay {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Ang haba ng imahe ay masyadong maliit ({{ height }}px). Ang inaasahang haba ay {{ min_height }}px. - - - This value should be the user's current password. - Ang halagang ito ay dapat na password ng kasalukuyang gumagamit. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Ang halagang ito ay dapat na eksakto sa {{ limit}} karakter.|Ang halagang ito ay dapat na eksakto sa {{ limit }} mga karakter. - - - The file was only partially uploaded. - Ang file na ito ay kahalating na upload lamang. - - - No file was uploaded. - Walang na upload na file. - - - No temporary folder was configured in php.ini. - Walang temporaryong folder ang naayos sa php.ini. - - - Cannot write temporary file to disk. - Temporaryong hindi makasulat ng file sa disk. - - - A PHP extension caused the upload to fail. - Ang dahilan ng pagkabigo ng pagupload ng files ay isang extension ng PHP. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o marami pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o marami pa. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} elemento o maliit pa.|Ang koleksyon na ito ay dapat magkaroon ng {{ limit }} mga elemento o maliit pa. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} elemento.|Ang koleksyong ito ay magkaroon ng eksaktong {{ limit }} mga elemento. - - - Invalid card number. - Hindi wastong numero ng kard. - - - Unsupported card type or invalid card number. - Hindi supportadong uri ng kard o hindi wastong numero ng kard. - - - This is not a valid International Bank Account Number (IBAN). - Ito ay hindi isang balidong International Bank Account Number (IBAN). - - - This value is not a valid ISBN-10. - Ang halagang ito ay hindi balidong SBN-10. - - - This value is not a valid ISBN-13. - Ang halagang ito ay hindi balidong ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Ang halagang ito ay pwdeng isang balidong ISBN-10 o isang balidong ISBN-13. - - - This value is not a valid ISSN. - Ang halangang ito ay hindi isang balidong ISSN. - - - This value is not a valid currency. - Ang halagang ito ay hindi balidong pera. - - - This value should be equal to {{ compared_value }}. - Ito ay hindi dapat magkapareho sa {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Ang halagang ito ay dapat tataas sa {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Ang halagang ito ay dapat mas mataas o magkapareha sa {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Ang halagang ito ay dapat kapareha ng {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Ang halagang ito ay dapat mas maliit sa {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Ang halagang ito ay dapat mas maliit o magkapareha sa {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Ang halagang ito ay hindi dapat magkapareha sa {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Ang ratio ng imahe ay masyadong malaki ({{ ratio }}). Ang pinakamalaking ratio ay {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Ang ratio ng imahe ay masyadong maliit ({{ ratio }}). Ang pinakamaliit na ratio ay {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Ang imahe ay kwadrado ({{ width }}x{{ height }}px). Ang mga kwadradong imahe ay hindi pwede. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Ang orientasyon ng imahe ay nakalandscape ({{ width }}x{{ height }}px). Ang mga imaheng nakalandscape ang orientasyon ay hindi pwede. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Ang orientasyon ng imahe ay nakaportrait ({{ width }}x{{ height }}px). Ang mga imaheng nakaportrait ang orientasyon ay hindi pwede. - - - An empty file is not allowed. - Ang file na walang laman ay hindi pwede. - - - The host could not be resolved. - Hindi maresolba ang host. - - - This value does not match the expected {{ charset }} charset. - Ang halaga ay hindi kapareha sa inaasahang {{ charset }} set ng karater. - - - This is not a valid Business Identifier Code (BIC). - Ito ay hindi isang balidong Business Identifier Code (BIC). - - - Error - Error - - - This is not a valid UUID. - Ito ay hindi wastong UUID. - - - This value should be a multiple of {{ compared_value }}. - Ang halagang ito ay dapat multiple ng {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ang Business Identifier Code (BIC) na ito ay walang kaugnayan sa IBAN {{ iban }}. - - - This value should be valid JSON. - Ang halagang ito ay dapat naka wastong JSON. - - - This collection should contain only unique elements. - Ang mga elemento ng koleksyong ito ay dapat magkakaiba. - - - This value should be positive. - Ang halagang ito ay dapat positibo. - - - This value should be either positive or zero. - Ang halagang ito ay dapat positibo o zero. - - - This value should be negative. - Ang halagang ito ay dapat negatibo. - - - This value should be either negative or zero. - Ang halagang ito ay dapat negatibo o zero. - - - This value is not a valid timezone. - Ang halagang ito ay hindi wastong timezone. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Naikalat ang password na ito sa isang data breach at hindi na dapat gamitin. Mangyaring gumamit ng ibang pang password. - - - This value should be between {{ min }} and {{ max }}. - Ang halagang ito ay dapat nasa pagitan ng {{ min }} at {{ max }}. - - - This value is not a valid hostname. - Ang halagang ito ay hindi wastong hostname. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Ang bilang ng mga elemento sa koleksyon na ito ay dapat multiple ng {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Ang halagang ito ay dapat masunod ang kahit na isang sumusunod na batayan. - - - Each element of this collection should satisfy its own set of constraints. - Ang bawat elemento sa koleksyon na ito ay dapat masunod ang nararapat na batayan. - - - This value is not a valid International Securities Identification Number (ISIN). - Ang halagang ito ay hindi wastong International Securities Identification Number (ISIN). - - - This value should be a valid expression. - Ang halagang ito ay dapat wastong ekspresyon. - - - This value is not a valid CSS color. - Ang halagang ito ay hindi wastong kulay ng CSS. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.tr.xlf b/vendor/symfony/validator/Resources/translations/validators.tr.xlf deleted file mode 100644 index 715137d..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.tr.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Bu değer olumsuz olmalıdır. - - - This value should be true. - Bu değer olumlu olmalıdır. - - - This value should be of type {{ type }}. - Bu değerin tipi {{ type }} olmalıdır. - - - This value should be blank. - Bu değer boş olmalıdır. - - - The value you selected is not a valid choice. - Seçtiğiniz değer geçerli bir seçenek değil. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - En az {{ limit }} seçenek belirtmelisiniz. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - En çok {{ limit }} seçenek belirtmelisiniz. - - - One or more of the given values is invalid. - Verilen değerlerden bir veya daha fazlası geçersiz. - - - This field was not expected. - Bu alan beklenen olmadı. - - - This field is missing. - Bu alan, eksik - - - This value is not a valid date. - Bu değer doğru bir tarih biçimi değildir. - - - This value is not a valid datetime. - Bu değer doğru bir tarihsaat biçimi değildir. - - - This value is not a valid email address. - Bu değer doğru bir e-mail adresi değildir. - - - The file could not be found. - Dosya bulunamadı. - - - The file is not readable. - Dosya okunabilir değil. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Dosya çok büyük ({{ size }} {{ suffix }}). İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Dosyanın mime tipi geçersiz ({{ type }}). İzin verilen mime tipleri {{ types }}. - - - This value should be {{ limit }} or less. - Bu değer {{ limit }} ve altında olmalıdır. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Bu değer çok uzun. {{ limit }} karakter veya daha az olmalıdır. - - - This value should be {{ limit }} or more. - Bu değer {{ limit }} veya daha fazla olmalıdır. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmalıdır. - - - This value should not be blank. - Bu değer boş bırakılmamalıdır. - - - This value should not be null. - Bu değer boş bırakılmamalıdır. - - - This value should be null. - Bu değer boş bırakılmalıdır. - - - This value is not valid. - Bu değer geçerli değil. - - - This value is not a valid time. - Bu değer doğru bir saat değil. - - - This value is not a valid URL. - Bu değer doğru bir URL değil. - - - The two values should be equal. - İki değer eşit olmalıdır. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Dosya çok büyük. İzin verilen en büyük dosya boyutu {{ limit }} {{ suffix }}. - - - The file is too large. - Dosya çok büyük. - - - The file could not be uploaded. - Dosya yüklenemiyor. - - - This value should be a valid number. - Bu değer geçerli bir rakam olmalıdır. - - - This file is not a valid image. - Bu dosya geçerli bir resim değildir. - - - This is not a valid IP address. - Bu geçerli bir IP adresi değildir. - - - This value is not a valid language. - Bu değer geçerli bir lisan değil. - - - This value is not a valid locale. - Bu değer geçerli bir yer değildir. - - - This value is not a valid country. - Bu değer geçerli bir ülke değildir. - - - This value is already used. - Bu değer şu anda kullanımda. - - - The size of the image could not be detected. - Resmin boyutu saptanamıyor. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Resmin genişliği çok büyük ({{ width }}px). İzin verilen en büyük genişlik {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Resmin genişliği çok küçük ({{ width }}px). En az {{ min_width }}px olmalıdır. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Resmin yüksekliği çok büyük ({{ height }}px). İzin verilen en büyük yükseklik {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Resmin yüksekliği çok küçük ({{ height }}px). En az {{ min_height }}px olmalıdır. - - - This value should be the user's current password. - Bu değer kullanıcının şu anki şifresi olmalıdır. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Bu değer tam olarak {{ limit }} karakter olmaldır. - - - The file was only partially uploaded. - Dosya sadece kısmen yüklendi. - - - No file was uploaded. - Hiçbir dosya yüklenmedi. - - - No temporary folder was configured in php.ini. - php.ini içerisinde geçici dizin tanımlanmadı. - - - Cannot write temporary file to disk. - Geçici dosya diske yazılamıyor. - - - A PHP extension caused the upload to fail. - Bir PHP eklentisi dosyanın yüklemesini başarısız kıldı. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Bu derlem {{ limit }} veya daha çok eleman içermelidir. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Bu derlem {{ limit }} veya daha az eleman içermelidir. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Bu derlem {{ limit }} eleman içermelidir. - - - Invalid card number. - Geçersiz kart numarası. - - - Unsupported card type or invalid card number. - Desteklenmeyen kart tipi veya geçersiz kart numarası. - - - This is not a valid International Bank Account Number (IBAN). - Bu geçerli bir Uluslararası Banka Hesap Numarası (IBAN) değildir. - - - This value is not a valid ISBN-10. - Bu değer geçerli bir ISBN-10 değildir. - - - This value is not a valid ISBN-13. - Bu değer geçerli bir ISBN-13 değildir. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Bu değer geçerli bir ISBN-10 veya ISBN-13 değildir. - - - This value is not a valid ISSN. - Bu değer geçerli bir ISSN değildir. - - - This value is not a valid currency. - Bu değer geçerli bir para birimi değil. - - - This value should be equal to {{ compared_value }}. - Bu değer {{ compared_value }} ile eşit olmalıdır. - - - This value should be greater than {{ compared_value }}. - Bu değer {{ compared_value }} değerinden büyük olmalıdır. - - - This value should be greater than or equal to {{ compared_value }}. - Bu değer {{ compared_value }} ile eşit veya büyük olmalıdır. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Bu değer {{ compared_value_type }} {{ compared_value }} ile aynı olmalıdır. - - - This value should be less than {{ compared_value }}. - Bu değer {{ compared_value }} değerinden düşük olmalıdır. - - - This value should be less than or equal to {{ compared_value }}. - .Bu değer {{ compared_value }} ile eşit veya düşük olmalıdır. - - - This value should not be equal to {{ compared_value }}. - Bu değer {{ compared_value }} ile eşit olmamalıdır. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Bu değer {{ compared_value_type }} {{ compared_value }} ile aynı olmamalıdır. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Resim oranı çok büyük ({{ ratio }}). İzin verilen maksimum oran: {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Resim oranı çok ufak ({{ ratio }}). Beklenen minimum oran {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Resim karesi ({{ width }}x{{ height }}px). Kare resimlerine izin verilmiyor. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Resim manzara odaklı ({{ width }}x{{ height }}px). Manzara odaklı resimlere izin verilmiyor. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Resim portre odaklı ({{ width }}x{{ height }}px). Portre odaklı resimlere izin verilmiyor. - - - An empty file is not allowed. - Boş bir dosyaya izin verilmiyor. - - - The host could not be resolved. - Sunucu çözülemedi. - - - This value does not match the expected {{ charset }} charset. - Bu değer beklenen {{ charset }} karakter kümesiyle eşleşmiyor. - - - This is not a valid Business Identifier Code (BIC). - Bu geçerli bir İşletme Tanımlayıcı Kodu (BIC) değildir. - - - Error - Hata - - - This is not a valid UUID. - Bu geçerli bir UUID değildir. - - - This value should be a multiple of {{ compared_value }}. - Bu değer {{ compare_value }} değerinin katlarından biri olmalıdır. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Bu İşletme Tanımlayıcı Kodu (BIC), IBAN {{ iban }} ile ilişkili değildir. - - - This value should be valid JSON. - Bu değer için geçerli olmalıdır JSON. - - - This collection should contain only unique elements. - Bu grup yalnızca benzersiz öğeler içermelidir. - - - This value should be positive. - Bu değer pozitif olmalı. - - - This value should be either positive or zero. - Bu değer pozitif veya sıfır olmalıdır. - - - This value should be negative. - Bu değer negatif olmalıdır. - - - This value should be either negative or zero. - Bu değer, negatif veya sıfır olmalıdır. - - - This value is not a valid timezone. - Bu değer, geçerli bir saat dilimi değil. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Bu parola, bir veri ihlali nedeniyle sızdırılmıştır ve kullanılmamalıdır. Lütfen başka bir şifre kullanın. - - - This value should be between {{ min }} and {{ max }}. - Bu değer arasında olmalıdır {{ min }} ve {{ max }}. - - - This value is not a valid hostname. - Bu değer, geçerli bir ana bilgisayar adı değil. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Bu gruptaki öğe sayısı birden fazla olmalıdır {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Bu değer aşağıdaki kısıtlamalardan birini karşılamalıdır: - - - Each element of this collection should satisfy its own set of constraints. - Bu gruptaki her öğe kendi kısıtlamalarını karşılamalıdır. - - - This value is not a valid International Securities Identification Number (ISIN). - Bu değer geçerli bir Uluslararası Menkul Kıymetler Kimlik Numarası değil (ISIN). - - - This value should be a valid expression. - Bu değer geçerli bir ifade olmalıdır. - - - This value is not a valid CSS color. - Bu değer geçerli bir CSS rengi değil. - - - This value is not a valid CIDR notation. - Bu değer geçerli bir CIDR yazımı değil. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Netmask'in değeri {{ min }} ve {{ max }} arasında olmaldır. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.uk.xlf b/vendor/symfony/validator/Resources/translations/validators.uk.xlf deleted file mode 100644 index c11f851..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.uk.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Значення повинно бути Ні. - - - This value should be true. - Значення повинно бути Так. - - - This value should be of type {{ type }}. - Тип значення повинен бути {{ type }}. - - - This value should be blank. - Значення повинно бути пустим. - - - The value you selected is not a valid choice. - Обране вами значення недопустиме. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Ви повинні обрати хоча б {{ limit }} варіант.|Ви повинні обрати хоча б {{ limit }} варіанти.|Ви повинні обрати хоча б {{ limit }} варіантів. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Ви повинні обрати не більше ніж {{ limit }} варіантів. - - - One or more of the given values is invalid. - Одне або кілька заданих значень є недопустимі. - - - This field was not expected. - Це поле не очікується. - - - This field is missing. - Це поле не вистачає. - - - This value is not a valid date. - Дане значення не є вірною датою. - - - This value is not a valid datetime. - Дане значення дати та часу недопустиме. - - - This value is not a valid email address. - Значення адреси электронної пошти недопустиме. - - - The file could not be found. - Файл не знайдено. - - - The file is not readable. - Файл не читається. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файл занадто великий ({{ size }} {{ suffix }}). Дозволений максимальний розмір {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - MIME-тип файлу недопустимий ({{ type }}). Допустимі MIME-типи файлів {{ types }}. - - - This value should be {{ limit }} or less. - Значення повинно бути {{ limit }} або менше. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Значення занадто довге. Повинно бути рівне {{ limit }} символу або менше.|Значення занадто довге. Повинно бути рівне {{ limit }} символам або менше.|Значення занадто довге. Повинно бути рівне {{ limit }} символам або менше. - - - This value should be {{ limit }} or more. - Значення повинно бути {{ limit }} або більше. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Значення занадто коротке. Повинно бути рівне {{ limit }} символу або більше.|Значення занадто коротке. Повинно бути рівне {{ limit }} символам або більше.|Значення занадто коротке. Повинно бути рівне {{ limit }} символам або більше. - - - This value should not be blank. - Значення не повинно бути пустим. - - - This value should not be null. - Значення не повинно бути null. - - - This value should be null. - Значення повинно бути null. - - - This value is not valid. - Значення недопустиме. - - - This value is not a valid time. - Значення часу недопустиме. - - - This value is not a valid URL. - Значення URL недопустиме. - - - The two values should be equal. - Обидва занчення повинні бути одинаковими. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файл занадто великий. Максимальний допустимий розмір {{ limit }} {{ suffix }}. - - - The file is too large. - Файл занадто великий. - - - The file could not be uploaded. - Файл не можливо завантажити. - - - This value should be a valid number. - Значення має бути допустимим числом. - - - This file is not a valid image. - Цей файл не є допустимим форматом зображення. - - - This is not a valid IP address. - Це некоректна IP адреса. - - - This value is not a valid language. - Це некоректна мова. - - - This value is not a valid locale. - Це некоректна локалізація. - - - This value is not a valid country. - Це некоректна країна. - - - This value is already used. - Це значення вже використовується. - - - The size of the image could not be detected. - Не вдалося визначити розмір зображення. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Ширина зображення занадто велика ({{ width }}px). Максимально допустима ширина {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Ширина зображення занадто мала ({{ width }}px). Мінімально допустима ширина {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Висота зображення занадто велика ({{ height }}px). Максимально допустима висота {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Висота зображення занадто мала ({{ height }}px). Мінімально допустима висота {{ min_height }}px. - - - This value should be the user's current password. - Значення має бути поточним паролем користувача. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Значення повиино бути рівним {{ limit }} символу.|Значення повиино бути рівним {{ limit }} символам.|Значення повиино бути рівним {{ limit }} символам. - - - The file was only partially uploaded. - Файл був завантажений лише частково. - - - No file was uploaded. - Файл не був завантажений. - - - No temporary folder was configured in php.ini. - Не налаштована тимчасова директорія в php.ini. - - - Cannot write temporary file to disk. - Неможливо записати тимчасовий файл на диск. - - - A PHP extension caused the upload to fail. - Розширення PHP викликало помилку при завантаженні. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ця колекція повинна містити {{ limit }} елемент чи більше.|Ця колекція повинна містити {{ limit }} елемента чи більше.|Ця колекція повинна містити {{ limit }} елементів чи більше. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ця колекція повинна містити {{ limit }} елемент чи менше.|Ця колекція повинна містити {{ limit }} елемента чи менше.|Ця колекція повинна містити {{ limit }} елементов чи менше. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ця колекція повинна містити рівно {{ limit }} елемент.|Ця колекція повинна містити рівно {{ limit }} елемента.|Ця колекція повинна містити рівно {{ limit }} елементів. - - - Invalid card number. - Невірний номер карти. - - - Unsupported card type or invalid card number. - Непідтримуваний тип карти або невірний номер карти. - - - This is not a valid International Bank Account Number (IBAN). - Це не дійсний міжнародний номер банківського рахунку (IBAN). - - - This value is not a valid ISBN-10. - Значення не у форматі ISBN-10. - - - This value is not a valid ISBN-13. - Значення не у форматі ISBN-13. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Значення не відповідає форматам ISBN-10 та ISBN-13. - - - This value is not a valid ISSN. - Значення має невірний формат ISSN. - - - This value is not a valid currency. - Значення має невірний формат валюти. - - - This value should be equal to {{ compared_value }}. - Значення повинно дорівнювати {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Значення має бути більше ніж {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Значення має бути більше або дорівнювати {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Значення має бути ідентичним {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Значення повинно бути менше ніж {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Значення повинно бути менше або дорівнювати {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Значення не повинно дорівнювати {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Значення не повинно бути ідентичним {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Співвідношення сторін зображення занадто велике ({{ ratio }}). Максимальне співвідношення сторін {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Співвідношення сторін зображення занадто мало ({{ ratio }}). Мінімальне співвідношення сторін {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Зображення квадратне ({{ width }}x{{ height }}px). Квадратні зображення не дозволені. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Зображення альбомної орієнтації ({{ width }}x{{ height }}px). Зображення альбомної орієнтації не дозволені. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Зображення в портретній орієнтації ({{ width }}x{{ height }}px). Зображення в портретної орієнтації не дозволені. - - - An empty file is not allowed. - Порожні файли не дозволені. - - - The host could not be resolved. - Ім'я хоста не знайдено. - - - This value does not match the expected {{ charset }} charset. - Значення не збігається з очікуваним {{ charset }} кодуванням. - - - This is not a valid Business Identifier Code (BIC). - Це не дійсний банківський код (BIC). - - - Error - Помилка - - - This is not a valid UUID. - Це не валідне значення UUID. - - - This value should be a multiple of {{ compared_value }}. - Це значення повинне бути кратним {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Банківський код (BIC) не пов’язаний із міжнародним номером банківського рахунку (IBAN) {{ iban }}. - - - This value should be valid JSON. - Значення має бути корректним JSON. - - - This collection should contain only unique elements. - Ця колекція повинна мати тільки унікальни значення. - - - This value should be positive. - Значення має бути позитивним. - - - This value should be either positive or zero. - Значення має бути позитивним або дорівнювати нулю. - - - This value should be negative. - Значення має бути негативним. - - - This value should be either negative or zero. - Значення має бути негативним або дорівнювати нулю. - - - This value is not a valid timezone. - Значення не є дійсним часовим поясом. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Цей пароль був скомпрометований в результаті витоку даних та не повинен використовуватися. Будь ласка, використовуйте інший пароль. - - - This value should be between {{ min }} and {{ max }}. - Значення має бути між {{ min }} та {{ max }}. - - - This value is not a valid hostname. - Значення не є дійсним іменем хоста. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Кількість елементів у цій колекції повинна бути кратною {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Значення повинно задовольняти хоча б одному з наступних обмежень: - - - Each element of this collection should satisfy its own set of constraints. - Кожен елемент цієї колекції повинен задовольняти власному набору обмежень. - - - This value is not a valid International Securities Identification Number (ISIN). - Це значення не є дійсним міжнародним ідентифікаційним номером цінних паперів (ISIN). - - - This value should be a valid expression. - Це значення має бути дійсним виразом. - - - This value is not a valid CSS color. - Це значення не є дійсним CSS кольором. - - - This value is not a valid CIDR notation. - Це значення не є дійсною CIDR нотаціею. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Значення в мережевій масці має бути між {{ min }} та {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.uz.xlf b/vendor/symfony/validator/Resources/translations/validators.uz.xlf deleted file mode 100644 index d1ecaf1..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.uz.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Qiymat noto'g'ri bo'lishi kerak. - - - This value should be true. - Qiymat to'g'ri bo'lishi kerak. - - - This value should be of type {{ type }}. - Qiymat turi {{ type }} bo'lishi kerak. - - - This value should be blank. - Qiymat bo'sh bo'lishi kerak. - - - The value you selected is not a valid choice. - Tanlangan qiymat to'g'ri emas. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Siz hech bo'lmaganda {{ limit }} ta qiymat tanlashingiz kerak.|Siz kamida {{ limit }} ta qiymat tanlashingiz kerak. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Siz {{ limit }} ta qiymatni tanlashingiz kerak.|Siz {{ limit }} dan ortiq qiymat tanlashingiz kerak. - - - One or more of the given values is invalid. - Belgilangan qiymatlarning bir yoki bir nechtasi noto'g'ri. - - - This field was not expected. - Ushbu maydon kutilmagan edi. - - - This field is missing. - Bu maydon majvud emas. - - - This value is not a valid date. - Ushbu sana noto'g'ri. - - - This value is not a valid datetime. - Sana va vaqt qiymati noto'g'ri. - - - This value is not a valid email address. - Elektron pochta manzili noto'g'ri. - - - The file could not be found. - Fayl topilmadi. - - - The file is not readable. - Faylni o'qib bo'lmadi. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Fayl hajmi katta ({{ size }} {{ suffix }}). Maksimal ruxsat etilgan hajim {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Faylning MIME turi noto'g'ri ({{ type }}). Ruxsat etilgan MIME turlar {{ types }}. - - - This value should be {{ limit }} or less. - Qiymat {{ limit }} ga teng yoki kam bo'lishi kerak. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Qiymat juda uzun. {{ limit }} ga teng yoki kam bo'lishi kerak.|Qiymat juda uzun. {{ limit }} yoki undan kam belgidan iborat bo'lishi kerak. - - - This value should be {{ limit }} or more. - Qiymat {{ limit }} yoki undan ortiq bo'lishi kerak. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Qiymat juda qisqa. {{ limit }} ta yoki undan ortiq belgidan iborat bo'lishi kerak.|Qiymat juda qisqa. {{ limit }} yoki undan ko'p belgidan iborat bo'lishi kerak - - - This value should not be blank. - Qiymatni bo'sh kirtish mumkin emas. - - - This value should not be null. - Qiymat null bo'lmasligi kerak. - - - This value should be null. - Qiymat null bo'lishi kerak. - - - This value is not valid. - Qiymat noto'g'ri. - - - This value is not a valid time. - Vaqt noto'g'ri. - - - This value is not a valid URL. - URL noto'g'ri - - - The two values should be equal. - Ikkala qiymat ham bir xil bo'lishi kerak. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Fayl hajmi katta. Maksimal ruxsat berilgan hajim {{ limit }} {{ suffix }}. - - - The file is too large. - Fayl hajmi katta. - - - The file could not be uploaded. - Faylni yuklab bo'lmadi. - - - This value should be a valid number. - Qiymat raqam bo'lishi kerak. - - - This file is not a valid image. - Fayl yaroqli rasm formati emas. - - - This is not a valid IP address. - Ip manzil noto'g'ri. - - - This value is not a valid language. - Noto'g'ri til. - - - This value is not a valid locale. - Ushbu qiymat mahalliy qiymat emas. - - - This value is not a valid country. - Mamlakat qiymati noto'g'ri. - - - This value is already used. - Ushbu qiymat allaqachon ishlatilgan. - - - The size of the image could not be detected. - Rasm o'lchamini aniqlab bo'lmadi. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Rasm kengligi juda katta ({{ width }}px). Maksimal ruxsat etilgan kenglik {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Rasm kengligi juda kichkina ({{ width }}px). Minimal ruxsat etilgan kenglik {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Rasm bo'yi juda katta ({{ height }}px). Maksimal ruxsat etilgan balandlik {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Rasm bo'yi juda kichkina ({{ height }}px). Minimal ruxsat etilgan balandlik {{ min_height }}px. - - - This value should be the user's current password. - Qiymat joriy foydalanuvchi paroli bo'lishi kerak. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Qiymat {{ limit }} ta belgidan iborat bo'lishi kerak.|Qiymat {{ limit }} belgidan iborat bo'lishi kerak. - - - The file was only partially uploaded. - Fayl faqat qisman yuklangan. - - - No file was uploaded. - Fayl yuklanmagan. - - - No temporary folder was configured in php.ini. - php.ini da vaqtinchalik katalog sozlanmagan. - - - Cannot write temporary file to disk. - Diskka vaqtinchalik faylni yozib bo'lmadi. - - - A PHP extension caused the upload to fail. - PHP kengaytmasi yuklash paytida xatolik yuz berdi. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Ushbu to'plam {{ limit }} ta yoki undan ko'p narsalarni o'z ichiga olishi kerak.|Ushbu to'plam {{ limit }} yoki undan ortiq narsalarni o'z ichiga olishi kerak. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Ushbu to'plam {{ limit }} ta yoki undan kam narsalarni o'z ichiga olishi kerak.|Ushbu to'plamda {{ limit }} yoki undan kam element bo'lishi kerak. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Ushbu to'plam to'liq {{ limit }} narsani o'z ichiga olishi kerak.|Ushbu to'plamda to'liq {{ limit }} ta ma'lumotlar bo'lishi kerak. - - - Invalid card number. - Kata raqami noto'g'ri. - - - Unsupported card type or invalid card number. - Qo'llab-quvvatlanmaydigan karta turi yoki yaroqsiz karta raqami. - - - This is not a valid International Bank Account Number (IBAN). - Qiymat haqiqiy xalqaro hisob raqamining raqami (IBAN) emas. - - - This value is not a valid ISBN-10. - Qiymat to'g'ri ISBN-10 formatida emas. - - - This value is not a valid ISBN-13. - Qiymat to'g'ri ISBN-13 formatida emas. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Qiymat ISBN-10 va ISBN-13 formatlariga mos kelmaydi. - - - This value is not a valid ISSN. - Qiymat ISSN formatiga mos kelmaydi. - - - This value is not a valid currency. - Noto'g'ri valyuta formati. - - - This value should be equal to {{ compared_value }}. - Qiymat {{ compared_value }} ga teng bo'lishi shart. - - - This value should be greater than {{ compared_value }}. - Qiymat {{ compared_value }} dan katta bo'lishi shart. - - - This value should be greater than or equal to {{ compared_value }}. - Qiymat {{ compared_value }} dan katta yoki teng bo'lishi shart. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Значение должно быть идентичным {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Qiymat bir xil bo'lishi kerak {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Qiymat {{ compared_value }} dan kichik yoki teng bo'lishi shart. - - - This value should not be equal to {{ compared_value }}. - Qiymat {{ compared_value }} ga teng bo'lmasligi kerak. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Qiymat bir xil bo'lishi kerak emas {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Rasmning tomonlari nisbati juda katta ({{ ratio }}). Maksimal tomonlar nisbati {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Rasmning format nisbati juda kichik ({{ ratio }}). Minimal tomonlar nisbati {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Rasm kvadrat shaklida ({{ width }}x{{ height }}px). Kvadrat shaklida tasvirlarga ruxsat berilmaydi. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Landshaft tasvir ({{ width }}x{{ height }}px). Landshaft rasmlarga ruxsat berilmaydi. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Portret rasm ({{ width }}x{{ height }}px). Portretlarga ruxsat berilmaydi. - - - An empty file is not allowed. - Bo'sh fayllarga ruxsat berilmagan. - - - The host could not be resolved. - Xost nomini nomiga ruxsat berilmagan. - - - This value does not match the expected {{ charset }} charset. - Qiymat kutilgan {{ charset }} kodlashiga mos kelmaydi. - - - This is not a valid Business Identifier Code (BIC). - Qiymat BIC formatida emas. - - - Error - Xatolik - - - This is not a valid UUID. - Qiymat UUID formatida emas. - - - This value should be a multiple of {{ compared_value }}. - Qiymat {{ compared_value }} ning ko'paytmasi bo'lishi kerak. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Ushbu BIC IBAN {{ iban }} bilan bog'liq emas.. - - - This value should be valid JSON. - Qiymat to'g'ri JSON bo'lishi kerak. - - - This collection should contain only unique elements. - Ushbu kolleksiyada takroriy elementlar bo'lmasligi kerak. - - - This value should be positive. - Qiymat musbat bo'lishi kerak. - - - This value should be either positive or zero. - Qiymat musbat yoki 0 ga teng bo'lishi kerak. - - - This value should be negative. - Qiymat manfiy bo'lishi kerak. - - - This value should be either negative or zero. - Qiymat manfiy yoki 0 ga teng bo'lishi kerak. - - - This value is not a valid timezone. - Qiymat to'g'ri vaqt zonasi emas. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Ushbu parol ma'lumotlarning tarqalishi tufayli buzilgan va uni ishlatmaslik kerak. Boshqa paroldan foydalaning. - - - This value should be between {{ min }} and {{ max }}. - Qiymat {{ min }} va {{ max }} oralig'ida bo'lishi shart. - - - This value is not a valid hostname. - Qiymat to'g'ri xost nomi emas. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Ushbu to'plamdagi narsalar soni {{ compared_value }} dan ko'p bo'lishi kerak. - - - This value should satisfy at least one of the following constraints: - Qiymat quyidagi cheklovlardan kamida bittasiga javob berishi kerak: - - - Each element of this collection should satisfy its own set of constraints. - Ushbu to'plamdagi har bir narsa o'ziga xos cheklovlarni qondirishi kerak. - - - This value is not a valid International Securities Identification Number (ISIN). - Qiymat Qimmatli qog'ozlarning xalqaro identifikatsiya raqami (ISIN) ga mos emas. - - - This value should be a valid expression. - Ushbu qiymat to'g'ri ifoda bo'lishi kerak. - - - This value is not a valid CSS color. - Bu qiymat haqiqiy CSS rangi emas. - - - This value is not a valid CIDR notation. - Qiymat CIDR belgisiga mos kelmaydi. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Tarmoq niqobining qiymati {{ min }} va {{ max }} oralig'ida bo'lishi kerak. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.vi.xlf b/vendor/symfony/validator/Resources/translations/validators.vi.xlf deleted file mode 100644 index 0020179..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.vi.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - Giá trị này phải là sai. - - - This value should be true. - Giá trị này phải là đúng. - - - This value should be of type {{ type }}. - Giá trị này phải là kiểu {{ type }}. - - - This value should be blank. - Giá trị này phải rỗng. - - - The value you selected is not a valid choice. - Giá trị bạn vừa chọn không hợp lệ. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Bạn phải chọn ít nhất {{ limit }} lựa chọn.|Bạn phải chọn ít nhất {{ limit }} lựa chọn. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Bạn phải chọn nhiều nhất {{ limit }} lựa chọn.|Bạn phải chọn nhiều nhất {{ limit }} lựa chọn. - - - One or more of the given values is invalid. - Một hoặc nhiều giá trị được chọn không hợp lệ. - - - This field was not expected. - Lĩnh vực này không được dự kiến. - - - This field is missing. - Lĩnh vực này bị thiếu. - - - This value is not a valid date. - Giá trị không phải là ngày hợp lệ. - - - This value is not a valid datetime. - Giá trị không phải là ngày tháng hợp lệ. - - - This value is not a valid email address. - Giá trị này không phải là email hợp lệ. - - - The file could not be found. - Tập tin không tìm thấy. - - - The file is not readable. - Tập tin không thể đọc được. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Tập tin quá lớn ({{ size }} {{ suffix }}). Kích thước tối đa cho phép {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Kiểu mime của tập tin không hợp lệ ({{ type }}). Kiểu hợp lệ là {{ types }}. - - - This value should be {{ limit }} or less. - Giá trị phải bằng hoặc nhỏ hơn {{ limit }}. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Giá trị quá dài. Phải bằng hoặc ít hơn {{ limit }} kí tự.|Giá trị quá dài. Phải bằng hoặc ít hơn {{ limit }} kí tự. - - - This value should be {{ limit }} or more. - Giá trị phải lớn hơn hoặc bằng {{ limit }}. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Giá trị quá ngắn. Phải hơn hoặc bằng {{ limit }} kí tự.|Giá trị quá ngắn. Phải hơn hoặc bằng {{ limit }} kí tự. - - - This value should not be blank. - Giá trị không được phép để trống. - - - This value should not be null. - Giá trị không được phép rỗng. - - - This value should be null. - Giá trị phải rỗng. - - - This value is not valid. - Giá trị không hợp lệ. - - - This value is not a valid time. - Giá trị không phải là thời gian hợp lệ. - - - This value is not a valid URL. - Giá trị không phải là địa chỉ URL hợp lệ. - - - The two values should be equal. - Hai giá trị phải bằng nhau. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Tập tin quá lớn. Kích thước tối đa cho phép là {{ limit }} {{ suffix }}. - - - The file is too large. - Tập tin quá lớn. - - - The file could not be uploaded. - Tập tin không thể tải lên. - - - This value should be a valid number. - Giá trị phải là con số. - - - This file is not a valid image. - Tập tin không phải là hình ảnh hợp lệ. - - - This is not a valid IP address. - Địa chỉ IP không hợp lệ. - - - This value is not a valid language. - Giá trị không phải là ngôn ngữ hợp lệ. - - - This value is not a valid locale. - Giá trị không phải là một bản địa địa phương hợp lệ. - - - This value is not a valid country. - Giá trị không phải là quốc gia hợp lệ. - - - This value is already used. - Giá trị đã được sử dụng. - - - The size of the image could not be detected. - Kích thước của hình ảnh không thể xác định. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Chiều rộng của hình quá lớn ({{ width }}px). Chiều rộng tối đa phải là {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Chiều rộng của hình quá thấp ({{ width }}px). Chiều rộng tối thiểu phải là {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Chiều cao của hình quá cao ({{ height }}px). Chiều cao tối đa phải là {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Chiều cao của hình quá thấp ({{ height }}px). Chiều cao tối thiểu phải là {{ min_height }}px. - - - This value should be the user's current password. - Giá trị này phải là mật khẩu hiện tại của người dùng. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Giá trị này phải có chính xác {{ limit }} kí tự.|Giá trị này phải có chính xác {{ limit }} kí tự. - - - The file was only partially uploaded. - Tập tin chỉ được tải lên một phần. - - - No file was uploaded. - Tập tin không được tải lên. - - - No temporary folder was configured in php.ini. - Thư mục tạm không được định nghĩa trong php.ini. - - - Cannot write temporary file to disk. - Không thể ghi tập tin tạm ra đĩa. - - - A PHP extension caused the upload to fail. - Một PHP extension đã phá hỏng quá trình tải lên của tập tin. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Danh sách phải chứa chính xác {{ limit }} thành phần.|Danh sách phải chứa chính xác {{ limit }} thành phần. - - - Invalid card number. - Số thẻ không hợp lệ. - - - Unsupported card type or invalid card number. - Thẻ không được hỗ trợ hoặc số thẻ không hợp lệ. - - - This is not a valid International Bank Account Number (IBAN). - Giá trị không phải là International Bank Account Number (IBAN) hợp lệ. - - - This value is not a valid ISBN-10. - Giá trị không phải là ISBN-10 hợp lệ. - - - This value is not a valid ISBN-13. - Giá trị không phải là ISBN-13 hợp lệ. - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - Giá trị không phải là ISBN-10 hoặc ISBN-13 hợp lệ. - - - This value is not a valid ISSN. - Giá trị không phải là ISSN hợp lệ. - - - This value is not a valid currency. - Giá trị không phải là đơn vị tiền tệ hợp lệ. - - - This value should be equal to {{ compared_value }}. - Giá trị phải bằng {{ compared_value }}. - - - This value should be greater than {{ compared_value }}. - Giá trị phải lớn hơn {{ compared_value }}. - - - This value should be greater than or equal to {{ compared_value }}. - Giá trị phải lớn hơn hoặc bằng {{ compared_value }}. - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - Giá trị phải giống {{ compared_value_type }} {{ compared_value }}. - - - This value should be less than {{ compared_value }}. - Giá trị phải bé hơn {{ compared_value }}. - - - This value should be less than or equal to {{ compared_value }}. - Giá trị phải nhỏ hơn hoặc bằng {{ compared_value }}. - - - This value should not be equal to {{ compared_value }}. - Giá trị không được phép bằng {{ compared_value }}. - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Giá trị không được phép giống như {{ compared_value_type }} {{ compared_value }}. - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - Tỷ lệ bức ảnh quá lớn ({{ ratio }}). Tỷ lệ tối đa cho phép là {{ max_ratio }}. - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - Tỷ lệ bức ảnh quá nhỏ ({{ ratio }}). Tỷ lệ tối thiểu mong muốn là {{ min_ratio }}. - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - Bức ảnh là hình vuông ({{ width }}x{{ height }}px). Ảnh hình vuông không được phép. - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - Bức ảnh theo chiều ngang ({{ width }}x{{ height }}px). Ảnh chiều ngang không được phép. - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - Bức ảnh theo chiều dọc ({{ width }}x{{ height }}px). Ảnh chiều dọc không được phép. - - - An empty file is not allowed. - Một file rỗng không được phép. - - - The host could not be resolved. - Máy chủ không thể được tìm thấy. - - - This value does not match the expected {{ charset }} charset. - Giá trị này không đúng định dạng bộ ký tự mong muốn {{ charset }}. - - - This is not a valid Business Identifier Code (BIC). - Giá trị này không đúng định dạng mã định danh doanh nghiệp (BIC). - - - Error - Lỗi - - - This is not a valid UUID. - Giá trị này không đúng định dạng UUID. - - - This value should be a multiple of {{ compared_value }}. - Giá trị này nên là bội số của {{ compared_value }}. - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Mã định danh doanh nghiệp (BIC) này không liên kết với IBAN {{ iban }}. - - - This value should be valid JSON. - Giá trị này nên đúng định dạng JSON. - - - This collection should contain only unique elements. - Danh sách này chỉ nên chứa các phần tử khác nhau. - - - This value should be positive. - Giá trị này có thể thực hiện được. - - - This value should be either positive or zero. - Giá trị này có thể thực hiện được hoặc bằng không. - - - This value should be negative. - Giá trị này nên bị từ chối. - - - This value should be either negative or zero. - Giá trị này nên bị từ chối hoặc bằng không. - - - This value is not a valid timezone. - Giá trị này không phải là múi giờ hợp lệ. - - - This password has been leaked in a data breach, it must not be used. Please use another password. - Mật khẩu này đã bị rò rỉ dữ liệu, không được sử dụng nữa. Xin vui lòng sử dụng mật khẩu khác. - - - This value should be between {{ min }} and {{ max }}. - Giá trị này nên thuộc giữa {{ min }} và {{ max }}. - - - This value is not a valid hostname. - Giá trị này không phải là tên máy chủ hợp lệ. - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - Số lượng các phần tử trong bộ sưu tập này nên là bội số của {{ compared_value }}. - - - This value should satisfy at least one of the following constraints: - Giá trị này nên thỏa mãn ít nhất một trong những ràng buộc sau: - - - Each element of this collection should satisfy its own set of constraints. - Mỗi phần tử trong bộ sưu tập này nên thỏa mãn những ràng buộc của nó. - - - This value is not a valid International Securities Identification Number (ISIN). - Giá trị này không phải là mã số chứng khoán quốc tế (ISIN) hợp lệ. - - - This value should be a valid expression. - Giá trị này phải là một biểu thức hợp lệ. - - - This value is not a valid CSS color. - Giá trị này không phải là màu CSS hợp lệ. - - - This value is not a valid CIDR notation. - Giá trị này không phải là ký hiệu CIDR hợp lệ. - - - The value of the netmask should be between {{ min }} and {{ max }}. - Giá trị của mặt nạ mạng phải nằm trong khoảng từ {{ min }} đến {{ max }}. - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf b/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf deleted file mode 100644 index a7d49ba..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - 该变量的值应为 false 。 - - - This value should be true. - 该变量的值应为 true 。 - - - This value should be of type {{ type }}. - 该变量的类型应为 {{ type }} 。 - - - This value should be blank. - 该变量值应为空。 - - - The value you selected is not a valid choice. - 选定变量的值不是有效的选项。 - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - 您至少要选择 {{ limit }} 个选项。 - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - 您最多能选择 {{ limit }} 个选项。 - - - One or more of the given values is invalid. - 一个或者多个给定的值无效。 - - - This field was not expected. - 此字段是多余的。 - - - This field is missing. - 此字段缺失。 - - - This value is not a valid date. - 该值不是一个有效的日期(date)。 - - - This value is not a valid datetime. - 该值不是一个有效的日期时间(datetime)。 - - - This value is not a valid email address. - 该值不是一个有效的邮件地址。 - - - The file could not be found. - 文件未找到。 - - - The file is not readable. - 文件不可读。 - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - 文件太大 ({{ size }} {{ suffix }})。文件大小不可以超过 {{ limit }} {{ suffix }} 。 - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - 无效的文件类型 ({{ type }}) 。允许的文件类型有 {{ types }} 。 - - - This value should be {{ limit }} or less. - 这个变量的值应该小于或等于 {{ limit }}。 - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - 字符串太长,长度不可超过 {{ limit }} 个字符。 - - - This value should be {{ limit }} or more. - 该变量的值应该大于或等于 {{ limit }}。 - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - 字符串太短,长度不可少于 {{ limit }} 个字符。 - - - This value should not be blank. - 该变量不应为空。 - - - This value should not be null. - 该变量不应为 null 。 - - - This value should be null. - 该变量应为空 null 。 - - - This value is not valid. - 该变量值无效 。 - - - This value is not a valid time. - 该值不是一个有效的时间。 - - - This value is not a valid URL. - 该值不是一个有效的 URL 。 - - - The two values should be equal. - 这两个变量的值应该相等。 - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - 文件太大,文件大小不可以超过 {{ limit }} {{ suffix }}。 - - - The file is too large. - 文件太大。 - - - The file could not be uploaded. - 无法上传此文件。 - - - This value should be a valid number. - 该值应该为有效的数字。 - - - This file is not a valid image. - 该文件不是有效的图片。 - - - This is not a valid IP address. - 该值不是有效的IP地址。 - - - This value is not a valid language. - 该值不是有效的语言名。 - - - This value is not a valid locale. - 该值不是有效的区域值(locale)。 - - - This value is not a valid country. - 该值不是有效的国家名。 - - - This value is already used. - 该值已经被使用。 - - - The size of the image could not be detected. - 不能解析图片大小。 - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - 图片太宽 ({{ width }}px),最大宽度为 {{ max_width }}px 。 - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - 图片宽度不够 ({{ width }}px),最小宽度为 {{ min_width }}px 。 - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - 图片太高 ({{ height }}px),最大高度为 {{ max_height }}px 。 - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - 图片高度不够 ({{ height }}px),最小高度为 {{ min_height }}px 。 - - - This value should be the user's current password. - 该变量的值应为用户当前的密码。 - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - 该变量应为 {{ limit }} 个字符。 - - - The file was only partially uploaded. - 该文件的上传不完整。 - - - No file was uploaded. - 没有上传任何文件。 - - - No temporary folder was configured in php.ini. - php.ini 里没有配置临时文件目录。 - - - Cannot write temporary file to disk. - 临时文件写入磁盘失败。 - - - A PHP extension caused the upload to fail. - 某个 PHP 扩展造成上传失败。 - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - 该集合最少应包含 {{ limit }} 个元素。 - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - 该集合最多包含 {{ limit }} 个元素。 - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - 该集合应包含 {{ limit }} 个元素 element 。 - - - Invalid card number. - 无效的信用卡号。 - - - Unsupported card type or invalid card number. - 不支持的信用卡类型或无效的信用卡号。 - - - This is not a valid International Bank Account Number (IBAN). - 该值不是有效的国际银行帐号(IBAN)。 - - - This value is not a valid ISBN-10. - 该值不是有效的10位国际标准书号(ISBN-10)。 - - - This value is not a valid ISBN-13. - 该值不是有效的13位国际标准书号(ISBN-13)。 - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - 该值不是有效的国际标准书号(ISBN-10 或 ISBN-13)。 - - - This value is not a valid ISSN. - 该值不是有效的国际标准期刊号(ISSN)。 - - - This value is not a valid currency. - 该值不是有效的货币名(currency)。 - - - This value should be equal to {{ compared_value }}. - 该值应等于 {{ compared_value }} 。 - - - This value should be greater than {{ compared_value }}. - 该值应大于 {{ compared_value }} 。 - - - This value should be greater than or equal to {{ compared_value }}. - 该值应大于或等于 {{ compared_value }} 。 - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - 该值应与 {{ compared_value_type }} {{ compared_value }} 相同。 - - - This value should be less than {{ compared_value }}. - 该值应小于 {{ compared_value }} 。 - - - This value should be less than or equal to {{ compared_value }}. - 该值应小于或等于 {{ compared_value }} 。 - - - This value should not be equal to {{ compared_value }}. - 该值不应先等于 {{ compared_value }} 。 - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - 该值不应与 {{ compared_value_type }} {{ compared_value }} 相同。 - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - 图片宽高比太大 ({{ ratio }})。允许的最大宽高比为 {{ max_ratio }}。 - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - 图片宽高比太小 ({{ ratio }})。允许的最大宽高比为 {{ min_ratio }}。 - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - 图片是方形的 ({{ width }}x{{ height }}px)。不允许使用方形的图片。 - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - 图片是横向的 ({{ width }}x{{ height }}px)。不允许使用横向的图片。 - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - 图片是纵向的 ({{ width }}x{{ height }}px)。不允许使用纵向的图片。 - - - An empty file is not allowed. - 不允许使用空文件。 - - - The host could not be resolved. - 主机名无法解析。 - - - This value does not match the expected {{ charset }} charset. - 该值不符合 {{ charset }} 编码。 - - - This is not a valid Business Identifier Code (BIC). - 这不是有效的业务标识符代码(BIC)。 - - - Error - 错误 - - - This is not a valid UUID. - 这不是有效的UUID。 - - - This value should be a multiple of {{ compared_value }}. - 此值应为 {{ compared_value }} 的倍数。 - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - 此业务标识符代码(BIC)与IBAN {{ iban }} 无关。 - - - This value should be valid JSON. - 该值应该是有效的JSON。 - - - This collection should contain only unique elements. - 该集合应仅包含独一无二的元素。 - - - This value should be positive. - 数值应为正数。 - - - This value should be either positive or zero. - 数值应是正数,或为零。 - - - This value should be negative. - 数值应为负数。 - - - This value should be either negative or zero. - 数值应是负数,或为零。 - - - This value is not a valid timezone. - 无效时区。 - - - This password has been leaked in a data breach, it must not be used. Please use another password. - 此密码已被泄露,切勿使用。请更换密码。 - - - This value should be between {{ min }} and {{ max }}. - 该数值应在 {{ min }} 和 {{ max }} 之间。 - - - This value is not a valid hostname. - 该值不是有效的主机名称。 - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - 该集合内的元素数量得是 {{ compared_value }} 的倍数。 - - - This value should satisfy at least one of the following constraints: - 该值需符合以下其中一个约束: - - - Each element of this collection should satisfy its own set of constraints. - 该集合内的每个元素需符合元素本身规定的约束。 - - - This value is not a valid International Securities Identification Number (ISIN). - 该值不是有效的国际证券识别码 (ISIN)。 - - - This value should be a valid expression. - 该值需为一个有效的表达式。 - - - This value is not a valid CSS color. - 该值不是有效的CSS颜色。 - - - This value is not a valid CIDR notation. - 该值不是一个有效的CIDR表示。 - - - The value of the netmask should be between {{ min }} and {{ max }}. - 网络掩码的值应当在 {{ min }} 和 {{ max }} 之间。 - - - - diff --git a/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf b/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf deleted file mode 100644 index b1f7fb4..0000000 --- a/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - This value should be false. - 該變數的值應為 false 。 - - - This value should be true. - 該變數的值應為 true 。 - - - This value should be of type {{ type }}. - 該變數的類型應為 {{ type }} 。 - - - This value should be blank. - 該變數應為空。 - - - The value you selected is not a valid choice. - 選定變數的值不是有效的選項。 - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - 您至少要選擇 {{ limit }} 個選項。 - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - 您最多能選擇 {{ limit }} 個選項。 - - - One or more of the given values is invalid. - 一個或者多個給定的值無效。 - - - This field was not expected. - 此字段是沒有預料到。 - - - This field is missing. - 此字段缺失。 - - - This value is not a valid date. - 該值不是一個有效的日期(date)。 - - - This value is not a valid datetime. - 該值不是一個有效的日期時間(datetime)。 - - - This value is not a valid email address. - 該值不是一個有效的郵件地址。 - - - The file could not be found. - 找不到檔案。 - - - The file is not readable. - 無法讀取檔案。 - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - 檔案太大 ({{ size }} {{ suffix }})。檔案大小不可以超過 {{ limit }} {{ suffix }} 。 - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - 無效的檔案類型 ({{ type }}) 。允許的檔案類型有 {{ types }} 。 - - - This value should be {{ limit }} or less. - 這個變數的值應該小於或等於 {{ limit }}。 - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - 字串太長,長度不可超過 {{ limit }} 個字元。 - - - This value should be {{ limit }} or more. - 該變數的值應該大於或等於 {{ limit }}。 - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - 字串太短,長度不可少於 {{ limit }} 個字元。 - - - This value should not be blank. - 該變數不應為空白。 - - - This value should not be null. - 該值不應為 null 。 - - - This value should be null. - 該值應為 null 。 - - - This value is not valid. - 無效的數值 。 - - - This value is not a valid time. - 該值不是一個有效的時間。 - - - This value is not a valid URL. - 該值不是一個有效的 URL 。 - - - The two values should be equal. - 這兩個變數的值應該相等。 - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - 檔案太大,檔案大小不可以超過 {{ limit }} {{ suffix }}。 - - - The file is too large. - 檔案太大。 - - - The file could not be uploaded. - 無法上傳此檔案。 - - - This value should be a valid number. - 該值應該為有效的數字。 - - - This file is not a valid image. - 該檔案不是有效的圖片。 - - - This is not a valid IP address. - 該值不是有效的IP地址。 - - - This value is not a valid language. - 該值不是有效的語言名。 - - - This value is not a valid locale. - 該值不是有效的區域值(locale)。 - - - This value is not a valid country. - 該值不是有效的國家名。 - - - This value is already used. - 該值已經被使用。 - - - The size of the image could not be detected. - 不能解析圖片大小。 - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - 圖片太寬 ({{ width }}px),最大寬度為 {{ max_width }}px 。 - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - 圖片寬度不夠 ({{ width }}px),最小寬度為 {{ min_width }}px 。 - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - 圖片太高 ({{ height }}px),最大高度為 {{ max_height }}px 。 - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - 圖片高度不夠 ({{ height }}px),最小高度為 {{ min_height }}px 。 - - - This value should be the user's current password. - 該變數的值應為用戶目前的密碼。 - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - 該變數應為 {{ limit }} 個字元。 - - - The file was only partially uploaded. - 該檔案的上傳不完整。 - - - No file was uploaded. - 沒有上傳任何檔案。 - - - No temporary folder was configured in php.ini. - php.ini 裡沒有配置臨時目錄。 - - - Cannot write temporary file to disk. - 暫存檔寫入磁碟失敗。 - - - A PHP extension caused the upload to fail. - 某個 PHP 擴展造成上傳失敗。 - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - 該集合最少應包含 {{ limit }} 個元素。 - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - 該集合最多包含 {{ limit }} 個元素。 - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - 該集合應包含 {{ limit }} 個元素 element 。 - - - Invalid card number. - 無效的信用卡號。 - - - Unsupported card type or invalid card number. - 不支援的信用卡類型或無效的信用卡號。 - - - This is not a valid International Bank Account Number (IBAN). - 該值不是有效的國際銀行帳號(IBAN)。 - - - This value is not a valid ISBN-10. - 該值不是有效的10位國際標準書號(ISBN-10)。 - - - This value is not a valid ISBN-13. - 該值不是有效的13位國際標準書號(ISBN-13)。 - - - This value is neither a valid ISBN-10 nor a valid ISBN-13. - 該值不是有效的國際標準書號(ISBN-10 或 ISBN-13)。 - - - This value is not a valid ISSN. - 該值不是有效的國際標準期刊號(ISSN)。 - - - This value is not a valid currency. - 該值不是有效的貨幣名(currency)。 - - - This value should be equal to {{ compared_value }}. - 該值應等於 {{ compared_value }} 。 - - - This value should be greater than {{ compared_value }}. - 該值應大於 {{ compared_value }} 。 - - - This value should be greater than or equal to {{ compared_value }}. - 該值應大於或等於 {{ compared_value }} 。 - - - This value should be identical to {{ compared_value_type }} {{ compared_value }}. - 該值應與 {{ compared_value_type }} {{ compared_value }} 相同。 - - - This value should be less than {{ compared_value }}. - 該值應小於 {{ compared_value }} 。 - - - This value should be less than or equal to {{ compared_value }}. - 該值應小於或等於 {{ compared_value }} 。 - - - This value should not be equal to {{ compared_value }}. - 該值應不等於 {{ compared_value }} 。 - - - This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - 該值不應與 {{ compared_value_type }} {{ compared_value }} 相同。 - - - The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - 圖像格式過大 ({{ ratio }})。 最大允許尺寸 {{ max_ratio }}。 - - - The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - 圖像格式過小 ({{ ratio }})。最小尺寸 {{ min_ratio }}。 - - - The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - 方形圖像 ({{ width }}x{{ height }}px)。不接受方形圖像。 - - - The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - 紀念冊布局圖像 ({{ width }}x{{ height }}px)。 不接受紀念冊布局圖像。 - - - The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - 書籍布局圖像 ({{ width }}x{{ height }}px)。不接受圖像書籍布局。 - - - An empty file is not allowed. - 不接受空白文件。 - - - The host could not be resolved. - 未找到服務器。 - - - This value does not match the expected {{ charset }} charset. - 該數值不符合預期 {{ charset }} 符號編碼。 - - - This is not a valid Business Identifier Code (BIC). - 無效企業識別碼 (BIC)。 - - - Error. - 錯誤。 - - - This is not a valid UUID. - 無效的通用唯壹標識符 (UUID)。 - - - This value should be a multiple of {{ compared_value }}. - 該值必須是倍數 {{ compared_value }}。 - - - This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - 該企業識別碼 (BIC) 與銀行賬戶國際編號不壹致 (IBAN) {{ iban }}。 - - - This value should be valid JSON. - 該數值必須序列化為JSON格式。 - - - This collection should contain only unique elements. - 該集合應僅包含唯壹元素。 - - - This value should be positive. - 數值應為正數。 - - - This value should be either positive or zero. - 數值應是正數,或為零。 - - - This value should be negative. - 數值應為負數。 - - - This value should be either negative or zero. - 數值應是負數,或為零。 - - - This value is not a valid timezone. - 無效時區。 - - - This password has been leaked in a data breach, it must not be used. Please use another password. - 此密碼已被泄露,切勿使用。請更換密碼。 - - - This value should be between {{ min }} and {{ max }}. - 該數值應在 {{ min }} 和 {{ max }} 之間。 - - - This value is not a valid hostname. - 該數值不是有效的主機名稱。 - - - The number of elements in this collection should be a multiple of {{ compared_value }}. - 該集合內的元素數量得是 {{ compared_value }} 的倍數。 - - - This value should satisfy at least one of the following constraints: - 該數值需符合以下其中一個約束: - - - Each element of this collection should satisfy its own set of constraints. - 該集合內的每個元素需符合元素本身規定的約束。 - - - This value is not a valid International Securities Identification Number (ISIN). - 該數值不是有效的國際證券識別碼 (ISIN)。 - - - This value should be a valid expression. - 該值需為一個有效的表達式。 - - - This value is not a valid CSS color. - 該值不是有效的CSS顏色。 - - - This value is not a valid CIDR notation. - 該值不是一個有效的CIDR表示。 - - - The value of the netmask should be between {{ min }} and {{ max }}. - 網絡掩碼的值應當在 {{ min }} 和 {{ max }} 之間。 - - - - diff --git a/vendor/symfony/validator/Test/ConstraintValidatorTestCase.php b/vendor/symfony/validator/Test/ConstraintValidatorTestCase.php deleted file mode 100644 index bee4639..0000000 --- a/vendor/symfony/validator/Test/ConstraintValidatorTestCase.php +++ /dev/null @@ -1,584 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Test; - -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\Constraint\IsIdentical; -use PHPUnit\Framework\Constraint\IsInstanceOf; -use PHPUnit\Framework\Constraint\IsNull; -use PHPUnit\Framework\Constraint\LogicalOr; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\NotNull; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\ConstraintValidatorInterface; -use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Component\Validator\ConstraintViolationInterface; -use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\ConstraintViolationListInterface; -use Symfony\Component\Validator\Context\ExecutionContext; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Mapping\PropertyMetadata; -use Symfony\Component\Validator\Validator\ContextualValidatorInterface; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * A test case to ease testing Constraint Validators. - * - * @author Bernhard Schussek - */ -abstract class ConstraintValidatorTestCase extends TestCase -{ - /** - * @var ExecutionContextInterface - */ - protected $context; - - /** - * @var ConstraintValidatorInterface - */ - protected $validator; - - protected $group; - protected $metadata; - protected $object; - protected $value; - protected $root; - protected $propertyPath; - protected $constraint; - protected $defaultTimezone; - private $defaultLocale; - private $expectedViolations; - private $call; - - protected function setUp(): void - { - $this->group = 'MyGroup'; - $this->metadata = null; - $this->object = null; - $this->value = 'InvalidValue'; - $this->root = 'root'; - $this->propertyPath = 'property.path'; - - // Initialize the context with some constraint so that we can - // successfully build a violation. - $this->constraint = new NotNull(); - - $this->context = $this->createContext(); - $this->validator = $this->createValidator(); - $this->validator->initialize($this->context); - - $this->defaultLocale = \Locale::getDefault(); - \Locale::setDefault('en'); - - $this->expectedViolations = []; - $this->call = 0; - - $this->setDefaultTimezone('UTC'); - } - - protected function tearDown(): void - { - $this->restoreDefaultTimezone(); - - \Locale::setDefault($this->defaultLocale); - } - - protected function setDefaultTimezone(?string $defaultTimezone) - { - // Make sure this method cannot be called twice before calling - // also restoreDefaultTimezone() - if (null === $this->defaultTimezone) { - $this->defaultTimezone = date_default_timezone_get(); - date_default_timezone_set($defaultTimezone); - } - } - - protected function restoreDefaultTimezone() - { - if (null !== $this->defaultTimezone) { - date_default_timezone_set($this->defaultTimezone); - $this->defaultTimezone = null; - } - } - - protected function createContext() - { - $translator = $this->createMock(TranslatorInterface::class); - $translator->expects($this->any())->method('trans')->willReturnArgument(0); - $validator = $this->createMock(ValidatorInterface::class); - $validator->expects($this->any()) - ->method('validate') - ->willReturnCallback(function () { - return $this->expectedViolations[$this->call++] ?? new ConstraintViolationList(); - }); - - $context = new ExecutionContext($validator, $this->root, $translator); - $context->setGroup($this->group); - $context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); - $context->setConstraint($this->constraint); - - $contextualValidator = $this->getMockBuilder(AssertingContextualValidator::class) - ->setConstructorArgs([$context]) - ->setMethods([ - 'atPath', - 'validate', - 'validateProperty', - 'validatePropertyValue', - 'getViolations', - ]) - ->getMock(); - $contextualValidator->expects($this->any()) - ->method('atPath') - ->willReturnCallback(function ($path) use ($contextualValidator) { - return $contextualValidator->doAtPath($path); - }); - $contextualValidator->expects($this->any()) - ->method('validate') - ->willReturnCallback(function ($value, $constraints = null, $groups = null) use ($contextualValidator) { - return $contextualValidator->doValidate($value, $constraints, $groups); - }); - $contextualValidator->expects($this->any()) - ->method('validateProperty') - ->willReturnCallback(function ($object, $propertyName, $groups = null) use ($contextualValidator) { - return $contextualValidator->validateProperty($object, $propertyName, $groups); - }); - $contextualValidator->expects($this->any()) - ->method('validatePropertyValue') - ->willReturnCallback(function ($objectOrClass, $propertyName, $value, $groups = null) use ($contextualValidator) { - return $contextualValidator->doValidatePropertyValue($objectOrClass, $propertyName, $value, $groups); - }); - $contextualValidator->expects($this->any()) - ->method('getViolations') - ->willReturnCallback(function () use ($contextualValidator) { - return $contextualValidator->doGetViolations(); - }); - $validator->expects($this->any()) - ->method('inContext') - ->with($context) - ->willReturn($contextualValidator); - - return $context; - } - - protected function setGroup(?string $group) - { - $this->group = $group; - $this->context->setGroup($group); - } - - protected function setObject($object) - { - $this->object = $object; - $this->metadata = \is_object($object) - ? new ClassMetadata(\get_class($object)) - : null; - - $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); - } - - protected function setProperty($object, $property) - { - $this->object = $object; - $this->metadata = \is_object($object) - ? new PropertyMetadata(\get_class($object), $property) - : null; - - $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); - } - - protected function setValue($value) - { - $this->value = $value; - $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); - } - - protected function setRoot($root) - { - $this->root = $root; - $this->context = $this->createContext(); - $this->validator->initialize($this->context); - } - - protected function setPropertyPath(string $propertyPath) - { - $this->propertyPath = $propertyPath; - $this->context->setNode($this->value, $this->object, $this->metadata, $this->propertyPath); - } - - protected function expectNoValidate() - { - $validator = $this->context->getValidator()->inContext($this->context); - $validator->expectNoValidate(); - } - - protected function expectValidateAt(int $i, string $propertyPath, $value, $group) - { - $validator = $this->context->getValidator()->inContext($this->context); - $validator->expectValidation($i, $propertyPath, $value, $group, function ($passedConstraints) { - $expectedConstraints = new LogicalOr(); - $expectedConstraints->setConstraints([new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class)]); - - Assert::assertThat($passedConstraints, $expectedConstraints); - }); - } - - protected function expectValidateValue(int $i, $value, array $constraints = [], $group = null) - { - $contextualValidator = $this->context->getValidator()->inContext($this->context); - $contextualValidator->expectValidation($i, null, $value, $group, function ($passedConstraints) use ($constraints) { - if (\is_array($constraints) && !\is_array($passedConstraints)) { - $passedConstraints = [$passedConstraints]; - } - - Assert::assertEquals($constraints, $passedConstraints); - }); - } - - protected function expectFailingValueValidation(int $i, $value, array $constraints, $group, ConstraintViolationInterface $violation) - { - $contextualValidator = $this->context->getValidator()->inContext($this->context); - $contextualValidator->expectValidation($i, null, $value, $group, function ($passedConstraints) use ($constraints) { - if (\is_array($constraints) && !\is_array($passedConstraints)) { - $passedConstraints = [$passedConstraints]; - } - - Assert::assertEquals($constraints, $passedConstraints); - }, $violation); - } - - protected function expectValidateValueAt(int $i, string $propertyPath, $value, $constraints, $group = null) - { - $contextualValidator = $this->context->getValidator()->inContext($this->context); - $contextualValidator->expectValidation($i, $propertyPath, $value, $group, function ($passedConstraints) use ($constraints) { - Assert::assertEquals($constraints, $passedConstraints); - }); - } - - protected function expectViolationsAt($i, $value, Constraint $constraint) - { - $context = $this->createContext(); - - $validatorClassname = $constraint->validatedBy(); - - $validator = new $validatorClassname(); - $validator->initialize($context); - $validator->validate($value, $constraint); - - $this->expectedViolations[] = $context->getViolations(); - - return $context->getViolations(); - } - - protected function assertNoViolation() - { - $this->assertSame(0, $violationsCount = \count($this->context->getViolations()), sprintf('0 violation expected. Got %u.', $violationsCount)); - } - - /** - * @return ConstraintViolationAssertion - */ - protected function buildViolation($message) - { - return new ConstraintViolationAssertion($this->context, $message, $this->constraint); - } - - abstract protected function createValidator(); -} - -final class ConstraintViolationAssertion -{ - /** - * @var ExecutionContextInterface - */ - private $context; - - /** - * @var ConstraintViolationAssertion[] - */ - private $assertions; - - private $message; - private $parameters = []; - private $invalidValue = 'InvalidValue'; - private $propertyPath = 'property.path'; - private $plural; - private $code; - private $constraint; - private $cause; - - /** - * @internal - */ - public function __construct(ExecutionContextInterface $context, string $message, Constraint $constraint = null, array $assertions = []) - { - $this->context = $context; - $this->message = $message; - $this->constraint = $constraint; - $this->assertions = $assertions; - } - - /** - * @return $this - */ - public function atPath(string $path) - { - $this->propertyPath = $path; - - return $this; - } - - /** - * @return $this - */ - public function setParameter(string $key, string $value) - { - $this->parameters[$key] = $value; - - return $this; - } - - /** - * @return $this - */ - public function setParameters(array $parameters) - { - $this->parameters = $parameters; - - return $this; - } - - /** - * @return $this - */ - public function setTranslationDomain($translationDomain) - { - // no-op for BC - - return $this; - } - - /** - * @return $this - */ - public function setInvalidValue($invalidValue) - { - $this->invalidValue = $invalidValue; - - return $this; - } - - /** - * @return $this - */ - public function setPlural(int $number) - { - $this->plural = $number; - - return $this; - } - - /** - * @return $this - */ - public function setCode(string $code) - { - $this->code = $code; - - return $this; - } - - /** - * @return $this - */ - public function setCause($cause) - { - $this->cause = $cause; - - return $this; - } - - public function buildNextViolation(string $message): self - { - $assertions = $this->assertions; - $assertions[] = $this; - - return new self($this->context, $message, $this->constraint, $assertions); - } - - public function assertRaised() - { - $expected = []; - foreach ($this->assertions as $assertion) { - $expected[] = $assertion->getViolation(); - } - $expected[] = $this->getViolation(); - - $violations = iterator_to_array($this->context->getViolations()); - - Assert::assertSame($expectedCount = \count($expected), $violationsCount = \count($violations), sprintf('%u violation(s) expected. Got %u.', $expectedCount, $violationsCount)); - - reset($violations); - - foreach ($expected as $violation) { - Assert::assertEquals($violation, current($violations)); - next($violations); - } - } - - private function getViolation(): ConstraintViolation - { - return new ConstraintViolation( - $this->message, - $this->message, - $this->parameters, - $this->context->getRoot(), - $this->propertyPath, - $this->invalidValue, - $this->plural, - $this->code, - $this->constraint, - $this->cause - ); - } -} - -/** - * @internal - */ -class AssertingContextualValidator implements ContextualValidatorInterface -{ - private $context; - private $expectNoValidate = false; - private $atPathCalls = -1; - private $expectedAtPath = []; - private $validateCalls = -1; - private $expectedValidate = []; - - public function __construct(ExecutionContextInterface $context) - { - $this->context = $context; - } - - public function __destruct() - { - if ($this->expectedAtPath) { - throw new ExpectationFailedException('Some expected validation calls for paths were not done.'); - } - - if ($this->expectedValidate) { - throw new ExpectationFailedException('Some expected validation calls for values were not done.'); - } - } - - public function atPath(string $path) - { - } - - /** - * @return $this - */ - public function doAtPath(string $path) - { - Assert::assertFalse($this->expectNoValidate, 'No validation calls have been expected.'); - - if (!isset($this->expectedAtPath[++$this->atPathCalls])) { - throw new ExpectationFailedException(sprintf('Validation for property path "%s" was not expected.', $path)); - } - - $expectedPath = $this->expectedAtPath[$this->atPathCalls]; - unset($this->expectedAtPath[$this->atPathCalls]); - - Assert::assertSame($expectedPath, $path); - - return $this; - } - - public function validate($value, $constraints = null, $groups = null) - { - } - - /** - * @return $this - */ - public function doValidate($value, $constraints = null, $groups = null) - { - Assert::assertFalse($this->expectNoValidate, 'No validation calls have been expected.'); - - if (!isset($this->expectedValidate[++$this->validateCalls])) { - return $this; - } - - [$expectedValue, $expectedGroup, $expectedConstraints, $violation] = $this->expectedValidate[$this->validateCalls]; - unset($this->expectedValidate[$this->validateCalls]); - - Assert::assertSame($expectedValue, $value); - $expectedConstraints($constraints); - Assert::assertSame($expectedGroup, $groups); - - if (null !== $violation) { - $this->context->addViolation($violation->getMessage(), $violation->getParameters()); - } - - return $this; - } - - public function validateProperty(object $object, string $propertyName, $groups = null) - { - } - - /** - * @return $this - */ - public function doValidateProperty(object $object, string $propertyName, $groups = null) - { - return $this; - } - - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null) - { - } - - /** - * @return $this - */ - public function doValidatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null) - { - return $this; - } - - public function getViolations(): ConstraintViolationListInterface - { - } - - public function doGetViolations() - { - return $this->context->getViolations(); - } - - public function expectNoValidate() - { - $this->expectNoValidate = true; - } - - public function expectValidation(string $call, ?string $propertyPath, $value, $group, callable $constraints, ConstraintViolationInterface $violation = null) - { - if (null !== $propertyPath) { - $this->expectedAtPath[$call] = $propertyPath; - } - - $this->expectedValidate[$call] = [$value, $group, $constraints, $violation]; - } -} diff --git a/vendor/symfony/validator/Util/PropertyPath.php b/vendor/symfony/validator/Util/PropertyPath.php deleted file mode 100644 index 973b6f2..0000000 --- a/vendor/symfony/validator/Util/PropertyPath.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Util; - -/** - * Contains utility methods for dealing with property paths. - * - * For more extensive functionality, use Symfony's PropertyAccess component. - * - * @author Bernhard Schussek - */ -class PropertyPath -{ - /** - * Appends a path to a given property path. - * - * If the base path is empty, the appended path will be returned unchanged. - * If the base path is not empty, and the appended path starts with a - * squared opening bracket ("["), the concatenation of the two paths is - * returned. Otherwise, the concatenation of the two paths is returned, - * separated by a dot ("."). - * - * @return string - */ - public static function append(string $basePath, string $subPath) - { - if ('' !== $subPath) { - if ('[' === $subPath[0]) { - return $basePath.$subPath; - } - - return '' !== $basePath ? $basePath.'.'.$subPath : $subPath; - } - - return $basePath; - } - - /** - * Not instantiable. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/validator/Validation.php b/vendor/symfony/validator/Validation.php deleted file mode 100644 index 4d08072..0000000 --- a/vendor/symfony/validator/Validation.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Symfony\Component\Validator\Exception\ValidationFailedException; -use Symfony\Component\Validator\Validator\ValidatorInterface; - -/** - * Entry point for the Validator component. - * - * @author Bernhard Schussek - */ -final class Validation -{ - /** - * Creates a callable chain of constraints. - * - * @param Constraint|ValidatorInterface|null $constraintOrValidator - * - * @return callable($value) - */ - public static function createCallable($constraintOrValidator = null, Constraint ...$constraints): callable - { - $validator = self::createIsValidCallable($constraintOrValidator, ...$constraints); - - return static function ($value) use ($validator) { - if (!$validator($value, $violations)) { - throw new ValidationFailedException($value, $violations); - } - - return $value; - }; - } - - /** - * Creates a callable that returns true/false instead of throwing validation exceptions. - * - * @param Constraint|ValidatorInterface|null $constraintOrValidator - * - * @return callable($value, &$violations = null): bool - */ - public static function createIsValidCallable($constraintOrValidator = null, Constraint ...$constraints): callable - { - $validator = $constraintOrValidator; - - if ($constraintOrValidator instanceof Constraint) { - $constraints = \func_get_args(); - $validator = null; - } elseif (null !== $constraintOrValidator && !$constraintOrValidator instanceof ValidatorInterface) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a "%s" or a "%s" object, "%s" given.', __METHOD__, Constraint::class, ValidatorInterface::class, get_debug_type($constraintOrValidator))); - } - - $validator = $validator ?? self::createValidator(); - - return static function ($value, &$violations = null) use ($constraints, $validator) { - $violations = $validator->validate($value, $constraints); - - return 0 === $violations->count(); - }; - } - - /** - * Creates a new validator. - * - * If you want to configure the validator, use - * {@link createValidatorBuilder()} instead. - */ - public static function createValidator(): ValidatorInterface - { - return self::createValidatorBuilder()->getValidator(); - } - - /** - * Creates a configurable builder for validator objects. - */ - public static function createValidatorBuilder(): ValidatorBuilder - { - return new ValidatorBuilder(); - } - - /** - * This class cannot be instantiated. - */ - private function __construct() - { - } -} diff --git a/vendor/symfony/validator/Validator/ContextualValidatorInterface.php b/vendor/symfony/validator/Validator/ContextualValidatorInterface.php deleted file mode 100644 index 1063a53..0000000 --- a/vendor/symfony/validator/Validator/ContextualValidatorInterface.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\ConstraintViolationListInterface; - -/** - * A validator in a specific execution context. - * - * @author Bernhard Schussek - */ -interface ContextualValidatorInterface -{ - /** - * Appends the given path to the property path of the context. - * - * If called multiple times, the path will always be reset to the context's - * original path with the given path appended to it. - * - * @return $this - */ - public function atPath(string $path); - - /** - * Validates a value against a constraint or a list of constraints. - * - * If no constraint is passed, the constraint - * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. - * - * @param mixed $value The value to validate - * @param Constraint|Constraint[]|null $constraints The constraint(s) to validate against - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return $this - */ - public function validate($value, $constraints = null, $groups = null); - - /** - * Validates a property of an object against the constraints specified - * for this property. - * - * @param string $propertyName The name of the validated property - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return $this - */ - public function validateProperty(object $object, string $propertyName, $groups = null); - - /** - * Validates a value against the constraints specified for an object's - * property. - * - * @param object|string $objectOrClass The object or its class name - * @param string $propertyName The name of the property - * @param mixed $value The value to validate against the property's constraints - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return $this - */ - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null); - - /** - * Returns the violations that have been generated so far in the context - * of the validator. - * - * @return ConstraintViolationListInterface - */ - public function getViolations(); -} diff --git a/vendor/symfony/validator/Validator/LazyProperty.php b/vendor/symfony/validator/Validator/LazyProperty.php deleted file mode 100644 index a70eeed..0000000 --- a/vendor/symfony/validator/Validator/LazyProperty.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -/** - * A wrapper for a callable initializing a property from a getter. - * - * @internal - */ -class LazyProperty -{ - private $propertyValueCallback; - - public function __construct(\Closure $propertyValueCallback) - { - $this->propertyValueCallback = $propertyValueCallback; - } - - public function getPropertyValue() - { - return ($this->propertyValueCallback)(); - } -} diff --git a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php b/vendor/symfony/validator/Validator/RecursiveContextualValidator.php deleted file mode 100644 index 7380171..0000000 --- a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php +++ /dev/null @@ -1,782 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\Composite; -use Symfony\Component\Validator\Constraints\Existence; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\Constraints\Valid; -use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; -use Symfony\Component\Validator\Context\ExecutionContext; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; -use Symfony\Component\Validator\Exception\NoSuchMetadataException; -use Symfony\Component\Validator\Exception\RuntimeException; -use Symfony\Component\Validator\Exception\UnexpectedValueException; -use Symfony\Component\Validator\Exception\UnsupportedMetadataException; -use Symfony\Component\Validator\Exception\ValidatorException; -use Symfony\Component\Validator\Mapping\CascadingStrategy; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; -use Symfony\Component\Validator\Mapping\GenericMetadata; -use Symfony\Component\Validator\Mapping\GetterMetadata; -use Symfony\Component\Validator\Mapping\MetadataInterface; -use Symfony\Component\Validator\Mapping\PropertyMetadataInterface; -use Symfony\Component\Validator\Mapping\TraversalStrategy; -use Symfony\Component\Validator\ObjectInitializerInterface; -use Symfony\Component\Validator\Util\PropertyPath; - -/** - * Recursive implementation of {@link ContextualValidatorInterface}. - * - * @author Bernhard Schussek - */ -class RecursiveContextualValidator implements ContextualValidatorInterface -{ - private $context; - private $defaultPropertyPath; - private $defaultGroups; - private $metadataFactory; - private $validatorFactory; - private $objectInitializers; - - /** - * Creates a validator for the given context. - * - * @param ObjectInitializerInterface[] $objectInitializers The object initializers - */ - public function __construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = []) - { - $this->context = $context; - $this->defaultPropertyPath = $context->getPropertyPath(); - $this->defaultGroups = [$context->getGroup() ?: Constraint::DEFAULT_GROUP]; - $this->metadataFactory = $metadataFactory; - $this->validatorFactory = $validatorFactory; - $this->objectInitializers = $objectInitializers; - } - - /** - * {@inheritdoc} - */ - public function atPath(string $path) - { - $this->defaultPropertyPath = $this->context->getPropertyPath($path); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validate($value, $constraints = null, $groups = null) - { - $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; - - $previousValue = $this->context->getValue(); - $previousObject = $this->context->getObject(); - $previousMetadata = $this->context->getMetadata(); - $previousPath = $this->context->getPropertyPath(); - $previousGroup = $this->context->getGroup(); - $previousConstraint = null; - - if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) { - $previousConstraint = $this->context->getConstraint(); - } - - // If explicit constraints are passed, validate the value against - // those constraints - if (null !== $constraints) { - // You can pass a single constraint or an array of constraints - // Make sure to deal with an array in the rest of the code - if (!\is_array($constraints)) { - $constraints = [$constraints]; - } - - $metadata = new GenericMetadata(); - $metadata->addConstraints($constraints); - - $this->validateGenericNode( - $value, - $previousObject, - \is_object($value) ? $this->generateCacheKey($value) : null, - $metadata, - $this->defaultPropertyPath, - $groups, - null, - TraversalStrategy::IMPLICIT, - $this->context - ); - - $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); - $this->context->setGroup($previousGroup); - - if (null !== $previousConstraint) { - $this->context->setConstraint($previousConstraint); - } - - return $this; - } - - // If an object is passed without explicit constraints, validate that - // object against the constraints defined for the object's class - if (\is_object($value)) { - $this->validateObject( - $value, - $this->defaultPropertyPath, - $groups, - TraversalStrategy::IMPLICIT, - $this->context - ); - - $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); - $this->context->setGroup($previousGroup); - - return $this; - } - - // If an array is passed without explicit constraints, validate each - // object in the array - if (\is_array($value)) { - $this->validateEachObjectIn( - $value, - $this->defaultPropertyPath, - $groups, - $this->context - ); - - $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); - $this->context->setGroup($previousGroup); - - return $this; - } - - throw new RuntimeException(sprintf('Cannot validate values of type "%s" automatically. Please provide a constraint.', get_debug_type($value))); - } - - /** - * {@inheritdoc} - */ - public function validateProperty(object $object, string $propertyName, $groups = null) - { - $classMetadata = $this->metadataFactory->getMetadataFor($object); - - if (!$classMetadata instanceof ClassMetadataInterface) { - throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', get_debug_type($classMetadata))); - } - - $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); - $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; - $cacheKey = $this->generateCacheKey($object); - $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); - - $previousValue = $this->context->getValue(); - $previousObject = $this->context->getObject(); - $previousMetadata = $this->context->getMetadata(); - $previousPath = $this->context->getPropertyPath(); - $previousGroup = $this->context->getGroup(); - - foreach ($propertyMetadatas as $propertyMetadata) { - $propertyValue = $propertyMetadata->getPropertyValue($object); - - $this->validateGenericNode( - $propertyValue, - $object, - $cacheKey.':'.\get_class($object).':'.$propertyName, - $propertyMetadata, - $propertyPath, - $groups, - null, - TraversalStrategy::IMPLICIT, - $this->context - ); - } - - $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); - $this->context->setGroup($previousGroup); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null) - { - $classMetadata = $this->metadataFactory->getMetadataFor($objectOrClass); - - if (!$classMetadata instanceof ClassMetadataInterface) { - throw new ValidatorException(sprintf('The metadata factory should return instances of "\Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', get_debug_type($classMetadata))); - } - - $propertyMetadatas = $classMetadata->getPropertyMetadata($propertyName); - $groups = $groups ? $this->normalizeGroups($groups) : $this->defaultGroups; - - if (\is_object($objectOrClass)) { - $object = $objectOrClass; - $class = \get_class($object); - $cacheKey = $this->generateCacheKey($objectOrClass); - $propertyPath = PropertyPath::append($this->defaultPropertyPath, $propertyName); - } else { - // $objectOrClass contains a class name - $object = null; - $class = $objectOrClass; - $cacheKey = null; - $propertyPath = $this->defaultPropertyPath; - } - - $previousValue = $this->context->getValue(); - $previousObject = $this->context->getObject(); - $previousMetadata = $this->context->getMetadata(); - $previousPath = $this->context->getPropertyPath(); - $previousGroup = $this->context->getGroup(); - - foreach ($propertyMetadatas as $propertyMetadata) { - $this->validateGenericNode( - $value, - $object, - $cacheKey.':'.$class.':'.$propertyName, - $propertyMetadata, - $propertyPath, - $groups, - null, - TraversalStrategy::IMPLICIT, - $this->context - ); - } - - $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); - $this->context->setGroup($previousGroup); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getViolations() - { - return $this->context->getViolations(); - } - - /** - * Normalizes the given group or list of groups to an array. - * - * @param string|GroupSequence|array $groups The groups to normalize - * - * @return array - */ - protected function normalizeGroups($groups) - { - if (\is_array($groups)) { - return $groups; - } - - return [$groups]; - } - - /** - * Validates an object against the constraints defined for its class. - * - * If no metadata is available for the class, but the class is an instance - * of {@link \Traversable} and the selected traversal strategy allows - * traversal, the object will be iterated and each nested object will be - * validated instead. - * - * @throws NoSuchMetadataException If the object has no associated metadata - * and does not implement {@link \Traversable} - * or if traversal is disabled via the - * $traversalStrategy argument - * @throws UnsupportedMetadataException If the metadata returned by the - * metadata factory does not implement - * {@link ClassMetadataInterface} - */ - private function validateObject(object $object, string $propertyPath, array $groups, int $traversalStrategy, ExecutionContextInterface $context) - { - try { - $classMetadata = $this->metadataFactory->getMetadataFor($object); - - if (!$classMetadata instanceof ClassMetadataInterface) { - throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".', get_debug_type($classMetadata))); - } - - $this->validateClassNode( - $object, - $this->generateCacheKey($object), - $classMetadata, - $propertyPath, - $groups, - null, - $traversalStrategy, - $context - ); - } catch (NoSuchMetadataException $e) { - // Rethrow if not Traversable - if (!$object instanceof \Traversable) { - throw $e; - } - - // Rethrow unless IMPLICIT or TRAVERSE - if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { - throw $e; - } - - $this->validateEachObjectIn( - $object, - $propertyPath, - $groups, - $context - ); - } - } - - /** - * Validates each object in a collection against the constraints defined - * for their classes. - * - * Nested arrays are also iterated. - */ - private function validateEachObjectIn(iterable $collection, string $propertyPath, array $groups, ExecutionContextInterface $context) - { - foreach ($collection as $key => $value) { - if (\is_array($value)) { - // Also traverse nested arrays - $this->validateEachObjectIn( - $value, - $propertyPath.'['.$key.']', - $groups, - $context - ); - - continue; - } - - // Scalar and null values in the collection are ignored - if (\is_object($value)) { - $this->validateObject( - $value, - $propertyPath.'['.$key.']', - $groups, - TraversalStrategy::IMPLICIT, - $context - ); - } - } - } - - /** - * Validates a class node. - * - * A class node is a combination of an object with a {@link ClassMetadataInterface} - * instance. Each class node (conceptionally) has zero or more succeeding - * property nodes: - * - * (Article:class node) - * \ - * ($title:property node) - * - * This method validates the passed objects against all constraints defined - * at class level. It furthermore triggers the validation of each of the - * class' properties against the constraints for that property. - * - * If the selected traversal strategy allows traversal, the object is - * iterated and each nested object is validated against its own constraints. - * The object is not traversed if traversal is disabled in the class - * metadata. - * - * If the passed groups contain the group "Default", the validator will - * check whether the "Default" group has been replaced by a group sequence - * in the class metadata. If this is the case, the group sequence is - * validated instead. - * - * @throws UnsupportedMetadataException If a property metadata does not - * implement {@link PropertyMetadataInterface} - * @throws ConstraintDefinitionException If traversal was enabled but the - * object does not implement - * {@link \Traversable} - * - * @see TraversalStrategy - */ - private function validateClassNode(object $object, ?string $cacheKey, ClassMetadataInterface $metadata, string $propertyPath, array $groups, ?array $cascadedGroups, int $traversalStrategy, ExecutionContextInterface $context) - { - $context->setNode($object, $object, $metadata, $propertyPath); - - if (!$context->isObjectInitialized($cacheKey)) { - foreach ($this->objectInitializers as $initializer) { - $initializer->initialize($object); - } - - $context->markObjectAsInitialized($cacheKey); - } - - foreach ($groups as $key => $group) { - // If the "Default" group is replaced by a group sequence, remember - // to cascade the "Default" group when traversing the group - // sequence - $defaultOverridden = false; - - // Use the object hash for group sequences - $groupHash = \is_object($group) ? $this->generateCacheKey($group, true) : $group; - - if ($context->isGroupValidated($cacheKey, $groupHash)) { - // Skip this group when validating the properties and when - // traversing the object - unset($groups[$key]); - - continue; - } - - $context->markGroupAsValidated($cacheKey, $groupHash); - - // Replace the "Default" group by the group sequence defined - // for the class, if applicable. - // This is done after checking the cache, so that - // spl_object_hash() isn't called for this sequence and - // "Default" is used instead in the cache. This is useful - // if the getters below return different group sequences in - // every call. - if (Constraint::DEFAULT_GROUP === $group) { - if ($metadata->hasGroupSequence()) { - // The group sequence is statically defined for the class - $group = $metadata->getGroupSequence(); - $defaultOverridden = true; - } elseif ($metadata->isGroupSequenceProvider()) { - // The group sequence is dynamically obtained from the validated - // object - /* @var \Symfony\Component\Validator\GroupSequenceProviderInterface $object */ - $group = $object->getGroupSequence(); - $defaultOverridden = true; - - if (!$group instanceof GroupSequence) { - $group = new GroupSequence($group); - } - } - } - - // If the groups (=[,G3,G4]) contain a group sequence - // (=), then call validateClassNode() with each entry of the - // group sequence and abort if necessary (G1, G2) - if ($group instanceof GroupSequence) { - $this->stepThroughGroupSequence( - $object, - $object, - $cacheKey, - $metadata, - $propertyPath, - $traversalStrategy, - $group, - $defaultOverridden ? Constraint::DEFAULT_GROUP : null, - $context - ); - - // Skip the group sequence when validating properties, because - // stepThroughGroupSequence() already validates the properties - unset($groups[$key]); - - continue; - } - - $this->validateInGroup($object, $cacheKey, $metadata, $group, $context); - } - - // If no more groups should be validated for the property nodes, - // we can safely quit - if (0 === \count($groups)) { - return; - } - - // Validate all properties against their constraints - foreach ($metadata->getConstrainedProperties() as $propertyName) { - // If constraints are defined both on the getter of a property as - // well as on the property itself, then getPropertyMetadata() - // returns two metadata objects, not just one - foreach ($metadata->getPropertyMetadata($propertyName) as $propertyMetadata) { - if (!$propertyMetadata instanceof PropertyMetadataInterface) { - throw new UnsupportedMetadataException(sprintf('The property metadata instances should implement "Symfony\Component\Validator\Mapping\PropertyMetadataInterface", got: "%s".', get_debug_type($propertyMetadata))); - } - - if ($propertyMetadata instanceof GetterMetadata) { - $propertyValue = new LazyProperty(static function () use ($propertyMetadata, $object) { - return $propertyMetadata->getPropertyValue($object); - }); - } else { - $propertyValue = $propertyMetadata->getPropertyValue($object); - } - - $this->validateGenericNode( - $propertyValue, - $object, - $cacheKey.':'.\get_class($object).':'.$propertyName, - $propertyMetadata, - PropertyPath::append($propertyPath, $propertyName), - $groups, - $cascadedGroups, - TraversalStrategy::IMPLICIT, - $context - ); - } - } - - // If no specific traversal strategy was requested when this method - // was called, use the traversal strategy of the class' metadata - if ($traversalStrategy & TraversalStrategy::IMPLICIT) { - $traversalStrategy = $metadata->getTraversalStrategy(); - } - - // Traverse only if IMPLICIT or TRAVERSE - if (!($traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE))) { - return; - } - - // If IMPLICIT, stop unless we deal with a Traversable - if ($traversalStrategy & TraversalStrategy::IMPLICIT && !$object instanceof \Traversable) { - return; - } - - // If TRAVERSE, fail if we have no Traversable - if (!$object instanceof \Traversable) { - throw new ConstraintDefinitionException(sprintf('Traversal was enabled for "%s", but this class does not implement "\Traversable".', get_debug_type($object))); - } - - $this->validateEachObjectIn( - $object, - $propertyPath, - $groups, - $context - ); - } - - /** - * Validates a node that is not a class node. - * - * Currently, two such node types exist: - * - * - property nodes, which consist of the value of an object's - * property together with a {@link PropertyMetadataInterface} instance - * - generic nodes, which consist of a value and some arbitrary - * constraints defined in a {@link MetadataInterface} container - * - * In both cases, the value is validated against all constraints defined - * in the passed metadata object. Then, if the value is an instance of - * {@link \Traversable} and the selected traversal strategy permits it, - * the value is traversed and each nested object validated against its own - * constraints. If the value is an array, it is traversed regardless of - * the given strategy. - * - * @see TraversalStrategy - */ - private function validateGenericNode($value, ?object $object, ?string $cacheKey, ?MetadataInterface $metadata, string $propertyPath, array $groups, ?array $cascadedGroups, int $traversalStrategy, ExecutionContextInterface $context) - { - $context->setNode($value, $object, $metadata, $propertyPath); - - foreach ($groups as $key => $group) { - if ($group instanceof GroupSequence) { - $this->stepThroughGroupSequence( - $value, - $object, - $cacheKey, - $metadata, - $propertyPath, - $traversalStrategy, - $group, - null, - $context - ); - - // Skip the group sequence when cascading, as the cascading - // logic is already done in stepThroughGroupSequence() - unset($groups[$key]); - - continue; - } - - $this->validateInGroup($value, $cacheKey, $metadata, $group, $context); - } - - if (0 === \count($groups)) { - return; - } - - if (null === $value) { - return; - } - - $cascadingStrategy = $metadata->getCascadingStrategy(); - - // Quit unless we cascade - if (!($cascadingStrategy & CascadingStrategy::CASCADE)) { - return; - } - - // If no specific traversal strategy was requested when this method - // was called, use the traversal strategy of the node's metadata - if ($traversalStrategy & TraversalStrategy::IMPLICIT) { - $traversalStrategy = $metadata->getTraversalStrategy(); - } - - // The $cascadedGroups property is set, if the "Default" group is - // overridden by a group sequence - // See validateClassNode() - $cascadedGroups = null !== $cascadedGroups && \count($cascadedGroups) > 0 ? $cascadedGroups : $groups; - - if ($value instanceof LazyProperty) { - $value = $value->getPropertyValue(); - - if (null === $value) { - return; - } - } - - if (\is_array($value)) { - // Arrays are always traversed, independent of the specified - // traversal strategy - $this->validateEachObjectIn( - $value, - $propertyPath, - $cascadedGroups, - $context - ); - - return; - } - - if (!\is_object($value)) { - throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: "%s".', \gettype($value))); - } - - $this->validateObject( - $value, - $propertyPath, - $cascadedGroups, - $traversalStrategy, - $context - ); - - // Currently, the traversal strategy can only be TRAVERSE for a - // generic node if the cascading strategy is CASCADE. Thus, traversable - // objects will always be handled within validateObject() and there's - // nothing more to do here. - - // see GenericMetadata::addConstraint() - } - - /** - * Sequentially validates a node's value in each group of a group sequence. - * - * If any of the constraints generates a violation, subsequent groups in the - * group sequence are skipped. - */ - private function stepThroughGroupSequence($value, ?object $object, ?string $cacheKey, ?MetadataInterface $metadata, string $propertyPath, int $traversalStrategy, GroupSequence $groupSequence, ?string $cascadedGroup, ExecutionContextInterface $context) - { - $violationCount = \count($context->getViolations()); - $cascadedGroups = $cascadedGroup ? [$cascadedGroup] : null; - - foreach ($groupSequence->groups as $groupInSequence) { - $groups = (array) $groupInSequence; - - if ($metadata instanceof ClassMetadataInterface) { - $this->validateClassNode( - $value, - $cacheKey, - $metadata, - $propertyPath, - $groups, - $cascadedGroups, - $traversalStrategy, - $context - ); - } else { - $this->validateGenericNode( - $value, - $object, - $cacheKey, - $metadata, - $propertyPath, - $groups, - $cascadedGroups, - $traversalStrategy, - $context - ); - } - - // Abort sequence validation if a violation was generated - if (\count($context->getViolations()) > $violationCount) { - break; - } - } - } - - /** - * Validates a node's value against all constraints in the given group. - * - * @param mixed $value The validated value - */ - private function validateInGroup($value, ?string $cacheKey, MetadataInterface $metadata, string $group, ExecutionContextInterface $context) - { - $context->setGroup($group); - - foreach ($metadata->findConstraints($group) as $constraint) { - if ($constraint instanceof Existence) { - continue; - } - - // Prevent duplicate validation of constraints, in the case - // that constraints belong to multiple validated groups - if (null !== $cacheKey) { - $constraintHash = $this->generateCacheKey($constraint, true); - // instanceof Valid: In case of using a Valid constraint with many groups - // it makes a reference object get validated by each group - if ($constraint instanceof Composite || $constraint instanceof Valid) { - $constraintHash .= $group; - } - - if ($context->isConstraintValidated($cacheKey, $constraintHash)) { - continue; - } - - $context->markConstraintAsValidated($cacheKey, $constraintHash); - } - - $context->setConstraint($constraint); - - $validator = $this->validatorFactory->getInstance($constraint); - $validator->initialize($context); - - if ($value instanceof LazyProperty) { - $value = $value->getPropertyValue(); - } - - try { - $validator->validate($value, $constraint); - } catch (UnexpectedValueException $e) { - $context->buildViolation('This value should be of type {{ type }}.') - ->setParameter('{{ type }}', $e->getExpectedType()) - ->addViolation(); - } - } - } - - private function generateCacheKey(object $object, bool $dependsOnPropertyPath = false): string - { - if ($this->context instanceof ExecutionContext) { - $cacheKey = $this->context->generateCacheKey($object); - } else { - $cacheKey = spl_object_hash($object); - } - - if ($dependsOnPropertyPath) { - $cacheKey .= $this->context->getPropertyPath(); - } - - return $cacheKey; - } -} diff --git a/vendor/symfony/validator/Validator/RecursiveValidator.php b/vendor/symfony/validator/Validator/RecursiveValidator.php deleted file mode 100644 index d57c908..0000000 --- a/vendor/symfony/validator/Validator/RecursiveValidator.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; -use Symfony\Component\Validator\Context\ExecutionContextFactoryInterface; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; -use Symfony\Component\Validator\ObjectInitializerInterface; - -/** - * Recursive implementation of {@link ValidatorInterface}. - * - * @author Bernhard Schussek - */ -class RecursiveValidator implements ValidatorInterface -{ - protected $contextFactory; - protected $metadataFactory; - protected $validatorFactory; - protected $objectInitializers; - - /** - * Creates a new validator. - * - * @param ObjectInitializerInterface[] $objectInitializers The object initializers - */ - public function __construct(ExecutionContextFactoryInterface $contextFactory, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = []) - { - $this->contextFactory = $contextFactory; - $this->metadataFactory = $metadataFactory; - $this->validatorFactory = $validatorFactory; - $this->objectInitializers = $objectInitializers; - } - - /** - * {@inheritdoc} - */ - public function startContext($root = null) - { - return new RecursiveContextualValidator( - $this->contextFactory->createContext($this, $root), - $this->metadataFactory, - $this->validatorFactory, - $this->objectInitializers - ); - } - - /** - * {@inheritdoc} - */ - public function inContext(ExecutionContextInterface $context) - { - return new RecursiveContextualValidator( - $context, - $this->metadataFactory, - $this->validatorFactory, - $this->objectInitializers - ); - } - - /** - * {@inheritdoc} - */ - public function getMetadataFor($object) - { - return $this->metadataFactory->getMetadataFor($object); - } - - /** - * {@inheritdoc} - */ - public function hasMetadataFor($object) - { - return $this->metadataFactory->hasMetadataFor($object); - } - - /** - * {@inheritdoc} - */ - public function validate($value, $constraints = null, $groups = null) - { - return $this->startContext($value) - ->validate($value, $constraints, $groups) - ->getViolations(); - } - - /** - * {@inheritdoc} - */ - public function validateProperty(object $object, string $propertyName, $groups = null) - { - return $this->startContext($object) - ->validateProperty($object, $propertyName, $groups) - ->getViolations(); - } - - /** - * {@inheritdoc} - */ - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null) - { - // If a class name is passed, take $value as root - return $this->startContext(\is_object($objectOrClass) ? $objectOrClass : $value) - ->validatePropertyValue($objectOrClass, $propertyName, $value, $groups) - ->getViolations(); - } -} diff --git a/vendor/symfony/validator/Validator/TraceableValidator.php b/vendor/symfony/validator/Validator/TraceableValidator.php deleted file mode 100644 index 8c1d966..0000000 --- a/vendor/symfony/validator/Validator/TraceableValidator.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Collects some data about validator calls. - * - * @author Maxime Steinhausser - */ -class TraceableValidator implements ValidatorInterface, ResetInterface -{ - private $validator; - private $collectedData = []; - - public function __construct(ValidatorInterface $validator) - { - $this->validator = $validator; - } - - /** - * @return array - */ - public function getCollectedData() - { - return $this->collectedData; - } - - public function reset() - { - $this->collectedData = []; - } - - /** - * {@inheritdoc} - */ - public function getMetadataFor($value) - { - return $this->validator->getMetadataFor($value); - } - - /** - * {@inheritdoc} - */ - public function hasMetadataFor($value) - { - return $this->validator->hasMetadataFor($value); - } - - /** - * {@inheritdoc} - */ - public function validate($value, $constraints = null, $groups = null) - { - $violations = $this->validator->validate($value, $constraints, $groups); - - $trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 7); - - $file = $trace[0]['file']; - $line = $trace[0]['line']; - - for ($i = 1; $i < 7; ++$i) { - if (isset($trace[$i]['class'], $trace[$i]['function']) - && 'validate' === $trace[$i]['function'] - && is_a($trace[$i]['class'], ValidatorInterface::class, true) - ) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - while (++$i < 7) { - if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - break; - } - } - break; - } - } - - $name = str_replace('\\', '/', $file); - $name = substr($name, strrpos($name, '/') + 1); - - $this->collectedData[] = [ - 'caller' => compact('name', 'file', 'line'), - 'context' => compact('value', 'constraints', 'groups'), - 'violations' => iterator_to_array($violations), - ]; - - return $violations; - } - - /** - * {@inheritdoc} - */ - public function validateProperty(object $object, string $propertyName, $groups = null) - { - return $this->validator->validateProperty($object, $propertyName, $groups); - } - - /** - * {@inheritdoc} - */ - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null) - { - return $this->validator->validatePropertyValue($objectOrClass, $propertyName, $value, $groups); - } - - /** - * {@inheritdoc} - */ - public function startContext() - { - return $this->validator->startContext(); - } - - /** - * {@inheritdoc} - */ - public function inContext(ExecutionContextInterface $context) - { - return $this->validator->inContext($context); - } -} diff --git a/vendor/symfony/validator/Validator/ValidatorInterface.php b/vendor/symfony/validator/Validator/ValidatorInterface.php deleted file mode 100644 index e6aa7d7..0000000 --- a/vendor/symfony/validator/Validator/ValidatorInterface.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Validator; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\ConstraintViolationListInterface; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; - -/** - * Validates PHP values against constraints. - * - * @author Bernhard Schussek - */ -interface ValidatorInterface extends MetadataFactoryInterface -{ - /** - * Validates a value against a constraint or a list of constraints. - * - * If no constraint is passed, the constraint - * {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. - * - * @param mixed $value The value to validate - * @param Constraint|Constraint[] $constraints The constraint(s) to validate against - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return ConstraintViolationListInterface A list of constraint violations - * If the list is empty, validation - * succeeded - */ - public function validate($value, $constraints = null, $groups = null); - - /** - * Validates a property of an object against the constraints specified - * for this property. - * - * @param string $propertyName The name of the validated property - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return ConstraintViolationListInterface A list of constraint violations - * If the list is empty, validation - * succeeded - */ - public function validateProperty(object $object, string $propertyName, $groups = null); - - /** - * Validates a value against the constraints specified for an object's - * property. - * - * @param object|string $objectOrClass The object or its class name - * @param string $propertyName The name of the property - * @param mixed $value The value to validate against the property's constraints - * @param string|GroupSequence|array|null $groups The validation groups to validate. If none is given, "Default" is assumed - * - * @return ConstraintViolationListInterface A list of constraint violations - * If the list is empty, validation - * succeeded - */ - public function validatePropertyValue($objectOrClass, string $propertyName, $value, $groups = null); - - /** - * Starts a new validation context and returns a validator for that context. - * - * The returned validator collects all violations generated within its - * context. You can access these violations with the - * {@link ContextualValidatorInterface::getViolations()} method. - * - * @return ContextualValidatorInterface - */ - public function startContext(); - - /** - * Returns a validator in the given execution context. - * - * The returned validator adds all generated violations to the given - * context. - * - * @return ContextualValidatorInterface - */ - public function inContext(ExecutionContextInterface $context); -} diff --git a/vendor/symfony/validator/ValidatorBuilder.php b/vendor/symfony/validator/ValidatorBuilder.php deleted file mode 100644 index 8df048b..0000000 --- a/vendor/symfony/validator/ValidatorBuilder.php +++ /dev/null @@ -1,444 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator; - -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\CachedReader; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; -use Doctrine\Common\Cache\ArrayCache; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Validator\Context\ExecutionContextFactory; -use Symfony\Component\Validator\Exception\LogicException; -use Symfony\Component\Validator\Exception\ValidatorException; -use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; -use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; -use Symfony\Component\Validator\Mapping\Loader\LoaderChain; -use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; -use Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader; -use Symfony\Component\Validator\Mapping\Loader\XmlFileLoader; -use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader; -use Symfony\Component\Validator\Validator\RecursiveValidator; -use Symfony\Component\Validator\Validator\ValidatorInterface; -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; - -// Help opcache.preload discover always-needed symbols -class_exists(TranslatorInterface::class); -class_exists(LocaleAwareInterface::class); -class_exists(TranslatorTrait::class); - -/** - * @author Bernhard Schussek - */ -class ValidatorBuilder -{ - private $initializers = []; - private $loaders = []; - private $xmlMappings = []; - private $yamlMappings = []; - private $methodMappings = []; - - /** - * @var Reader|null - */ - private $annotationReader; - private $enableAnnotationMapping = false; - - /** - * @var MetadataFactoryInterface|null - */ - private $metadataFactory; - - /** - * @var ConstraintValidatorFactoryInterface|null - */ - private $validatorFactory; - - /** - * @var CacheItemPoolInterface|null - */ - private $mappingCache; - - /** - * @var TranslatorInterface|null - */ - private $translator; - - /** - * @var string|null - */ - private $translationDomain; - - /** - * Adds an object initializer to the validator. - * - * @return $this - */ - public function addObjectInitializer(ObjectInitializerInterface $initializer) - { - $this->initializers[] = $initializer; - - return $this; - } - - /** - * Adds a list of object initializers to the validator. - * - * @param ObjectInitializerInterface[] $initializers - * - * @return $this - */ - public function addObjectInitializers(array $initializers) - { - $this->initializers = array_merge($this->initializers, $initializers); - - return $this; - } - - /** - * Adds an XML constraint mapping file to the validator. - * - * @return $this - */ - public function addXmlMapping(string $path) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->xmlMappings[] = $path; - - return $this; - } - - /** - * Adds a list of XML constraint mapping files to the validator. - * - * @param string[] $paths The paths to the mapping files - * - * @return $this - */ - public function addXmlMappings(array $paths) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->xmlMappings = array_merge($this->xmlMappings, $paths); - - return $this; - } - - /** - * Adds a YAML constraint mapping file to the validator. - * - * @param string $path The path to the mapping file - * - * @return $this - */ - public function addYamlMapping(string $path) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->yamlMappings[] = $path; - - return $this; - } - - /** - * Adds a list of YAML constraint mappings file to the validator. - * - * @param string[] $paths The paths to the mapping files - * - * @return $this - */ - public function addYamlMappings(array $paths) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->yamlMappings = array_merge($this->yamlMappings, $paths); - - return $this; - } - - /** - * Enables constraint mapping using the given static method. - * - * @return $this - */ - public function addMethodMapping(string $methodName) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->methodMappings[] = $methodName; - - return $this; - } - - /** - * Enables constraint mapping using the given static methods. - * - * @param string[] $methodNames The names of the methods - * - * @return $this - */ - public function addMethodMappings(array $methodNames) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->methodMappings = array_merge($this->methodMappings, $methodNames); - - return $this; - } - - /** - * Enables annotation based constraint mapping. - * - * @param bool $skipDoctrineAnnotations - * - * @return $this - */ - public function enableAnnotationMapping(/* bool $skipDoctrineAnnotations = true */) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot enable annotation mapping after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $skipDoctrineAnnotations = 1 > \func_num_args() ? false : func_get_arg(0); - if (false === $skipDoctrineAnnotations || null === $skipDoctrineAnnotations) { - trigger_deprecation('symfony/validator', '5.2', 'Not passing true as first argument to "%s" is deprecated. Pass true and call "addDefaultDoctrineAnnotationReader()" if you want to enable annotation mapping with Doctrine Annotations.', __METHOD__); - $this->addDefaultDoctrineAnnotationReader(); - } elseif ($skipDoctrineAnnotations instanceof Reader) { - trigger_deprecation('symfony/validator', '5.2', 'Passing an instance of "%s" as first argument to "%s" is deprecated. Pass true instead and call setDoctrineAnnotationReader() if you want to enable annotation mapping with Doctrine Annotations.', get_debug_type($skipDoctrineAnnotations), __METHOD__); - $this->setDoctrineAnnotationReader($skipDoctrineAnnotations); - } elseif (true !== $skipDoctrineAnnotations) { - throw new \TypeError(sprintf('"%s": Argument 1 is expected to be a boolean, "%s" given.', __METHOD__, get_debug_type($skipDoctrineAnnotations))); - } - - $this->enableAnnotationMapping = true; - - return $this; - } - - /** - * Disables annotation based constraint mapping. - * - * @return $this - */ - public function disableAnnotationMapping() - { - $this->enableAnnotationMapping = false; - $this->annotationReader = null; - - return $this; - } - - /** - * @return $this - */ - public function setDoctrineAnnotationReader(?Reader $reader): self - { - $this->annotationReader = $reader; - - return $this; - } - - /** - * @return $this - */ - public function addDefaultDoctrineAnnotationReader(): self - { - $this->annotationReader = $this->createAnnotationReader(); - - return $this; - } - - /** - * Sets the class metadata factory used by the validator. - * - * @return $this - */ - public function setMetadataFactory(MetadataFactoryInterface $metadataFactory) - { - if (\count($this->xmlMappings) > 0 || \count($this->yamlMappings) > 0 || \count($this->methodMappings) > 0 || $this->enableAnnotationMapping) { - throw new ValidatorException('You cannot set a custom metadata factory after adding custom mappings. You should do either of both.'); - } - - $this->metadataFactory = $metadataFactory; - - return $this; - } - - /** - * Sets the cache for caching class metadata. - * - * @return $this - */ - public function setMappingCache(CacheItemPoolInterface $cache) - { - if (null !== $this->metadataFactory) { - throw new ValidatorException('You cannot set a custom mapping cache after setting a custom metadata factory. Configure your metadata factory instead.'); - } - - $this->mappingCache = $cache; - - return $this; - } - - /** - * Sets the constraint validator factory used by the validator. - * - * @return $this - */ - public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory) - { - $this->validatorFactory = $validatorFactory; - - return $this; - } - - /** - * Sets the translator used for translating violation messages. - * - * @return $this - */ - public function setTranslator(TranslatorInterface $translator) - { - $this->translator = $translator; - - return $this; - } - - /** - * Sets the default translation domain of violation messages. - * - * The same message can have different translations in different domains. - * Pass the domain that is used for violation messages by default to this - * method. - * - * @return $this - */ - public function setTranslationDomain(?string $translationDomain) - { - $this->translationDomain = $translationDomain; - - return $this; - } - - /** - * @return $this - */ - public function addLoader(LoaderInterface $loader) - { - $this->loaders[] = $loader; - - return $this; - } - - /** - * @return LoaderInterface[] - */ - public function getLoaders() - { - $loaders = []; - - foreach ($this->xmlMappings as $xmlMapping) { - $loaders[] = new XmlFileLoader($xmlMapping); - } - - foreach ($this->yamlMappings as $yamlMappings) { - $loaders[] = new YamlFileLoader($yamlMappings); - } - - foreach ($this->methodMappings as $methodName) { - $loaders[] = new StaticMethodLoader($methodName); - } - - if ($this->enableAnnotationMapping) { - $loaders[] = new AnnotationLoader($this->annotationReader); - } - - return array_merge($loaders, $this->loaders); - } - - /** - * Builds and returns a new validator object. - * - * @return ValidatorInterface - */ - public function getValidator() - { - $metadataFactory = $this->metadataFactory; - - if (!$metadataFactory) { - $loaders = $this->getLoaders(); - $loader = null; - - if (\count($loaders) > 1) { - $loader = new LoaderChain($loaders); - } elseif (1 === \count($loaders)) { - $loader = $loaders[0]; - } - - $metadataFactory = new LazyLoadingMetadataFactory($loader, $this->mappingCache); - } - - $validatorFactory = $this->validatorFactory ?? new ConstraintValidatorFactory(); - $translator = $this->translator; - - if (null === $translator) { - $translator = new class() implements TranslatorInterface, LocaleAwareInterface { - use TranslatorTrait; - }; - // Force the locale to be 'en' when no translator is provided rather than relying on the Intl default locale - // This avoids depending on Intl or the stub implementation being available. It also ensures that Symfony - // validation messages are pluralized properly even when the default locale gets changed because they are in - // English. - $translator->setLocale('en'); - } - - $contextFactory = new ExecutionContextFactory($translator, $this->translationDomain); - - return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $this->initializers); - } - - private function createAnnotationReader(): Reader - { - if (!class_exists(AnnotationReader::class)) { - throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.'); - } - - if (class_exists(ArrayAdapter::class)) { - return new PsrCachedReader(new AnnotationReader(), new ArrayAdapter()); - } - - if (class_exists(CachedReader::class) && class_exists(ArrayCache::class)) { - trigger_deprecation('symfony/validator', '5.4', 'Enabling annotation based constraint mapping without having symfony/cache installed is deprecated.'); - - return new CachedReader(new AnnotationReader(), new ArrayCache()); - } - - throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.'); - } -} diff --git a/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php b/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php deleted file mode 100644 index 9e198c6..0000000 --- a/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Violation; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintViolation; -use Symfony\Component\Validator\ConstraintViolationList; -use Symfony\Component\Validator\Util\PropertyPath; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * Default implementation of {@link ConstraintViolationBuilderInterface}. - * - * @author Bernhard Schussek - * - * @internal since version 2.5. Code against ConstraintViolationBuilderInterface instead. - */ -class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface -{ - private $violations; - private $message; - private $parameters; - private $root; - private $invalidValue; - private $propertyPath; - private $translator; - private $translationDomain; - private $plural; - private $constraint; - private $code; - - /** - * @var mixed - */ - private $cause; - - /** - * @param string $message The error message as a string or a stringable object - */ - public function __construct(ConstraintViolationList $violations, ?Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null) - { - $this->violations = $violations; - $this->message = $message; - $this->parameters = $parameters; - $this->root = $root; - $this->propertyPath = $propertyPath; - $this->invalidValue = $invalidValue; - $this->translator = $translator; - $this->translationDomain = $translationDomain; - $this->constraint = $constraint; - } - - /** - * {@inheritdoc} - */ - public function atPath(string $path) - { - $this->propertyPath = PropertyPath::append($this->propertyPath, $path); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setParameter(string $key, string $value) - { - $this->parameters[$key] = $value; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setParameters(array $parameters) - { - $this->parameters = $parameters; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setTranslationDomain(string $translationDomain) - { - $this->translationDomain = $translationDomain; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setInvalidValue($invalidValue) - { - $this->invalidValue = $invalidValue; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setPlural(int $number) - { - $this->plural = $number; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setCode(?string $code) - { - $this->code = $code; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setCause($cause) - { - $this->cause = $cause; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function addViolation() - { - if (null === $this->plural) { - $translatedMessage = $this->translator->trans( - $this->message, - $this->parameters, - $this->translationDomain - ); - } else { - $translatedMessage = $this->translator->trans( - $this->message, - ['%count%' => $this->plural] + $this->parameters, - $this->translationDomain - ); - } - - $this->violations->add(new ConstraintViolation( - $translatedMessage, - $this->message, - $this->parameters, - $this->root, - $this->propertyPath, - $this->invalidValue, - $this->plural, - $this->code, - $this->constraint, - $this->cause - )); - } -} diff --git a/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php b/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php deleted file mode 100644 index 9ac1b8b..0000000 --- a/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Violation; - -/** - * Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} - * objects. - * - * Use the various methods on this interface to configure the built violation. - * Finally, call {@link addViolation()} to add the violation to the current - * execution context. - * - * @author Bernhard Schussek - */ -interface ConstraintViolationBuilderInterface -{ - /** - * Stores the property path at which the violation should be generated. - * - * The passed path will be appended to the current property path of the - * execution context. - * - * @param string $path The property path - * - * @return $this - */ - public function atPath(string $path); - - /** - * Sets a parameter to be inserted into the violation message. - * - * @param string $key The name of the parameter - * @param string $value The value to be inserted in the parameter's place - * - * @return $this - */ - public function setParameter(string $key, string $value); - - /** - * Sets all parameters to be inserted into the violation message. - * - * @param array $parameters An array with the parameter names as keys and - * the values to be inserted in their place as - * values - * - * @return $this - */ - public function setParameters(array $parameters); - - /** - * Sets the translation domain which should be used for translating the - * violation message. - * - * @param string $translationDomain The translation domain - * - * @return $this - * - * @see \Symfony\Contracts\Translation\TranslatorInterface - */ - public function setTranslationDomain(string $translationDomain); - - /** - * Sets the invalid value that caused this violation. - * - * @param mixed $invalidValue The invalid value - * - * @return $this - */ - public function setInvalidValue($invalidValue); - - /** - * Sets the number which determines how the plural form of the violation - * message is chosen when it is translated. - * - * @param int $number The number for determining the plural form - * - * @return $this - * - * @see \Symfony\Contracts\Translation\TranslatorInterface::trans() - */ - public function setPlural(int $number); - - /** - * Sets the violation code. - * - * @param string|null $code The violation code - * - * @return $this - */ - public function setCode(?string $code); - - /** - * Sets the cause of the violation. - * - * @param mixed $cause The cause of the violation - * - * @return $this - */ - public function setCause($cause); - - /** - * Adds the violation to the current execution context. - */ - public function addViolation(); -} diff --git a/vendor/symfony/validator/composer.json b/vendor/symfony/validator/composer.json deleted file mode 100644 index 0ce4d0d..0000000 --- a/vendor/symfony/validator/composer.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "symfony/validator", - "type": "library", - "description": "Provides tools to validate values", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/translation-contracts": "^1.1|^2|^3" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^5.1|^6.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/property-info": "^5.3|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.13", - "doctrine/cache": "^1.11|^2.0", - "egulias/email-validator": "^2.1.10|^3" - }, - "conflict": { - "doctrine/annotations": "<1.13", - "doctrine/cache": "<1.11", - "doctrine/lexer": "<1.1", - "phpunit/phpunit": "<5.4.3", - "symfony/dependency-injection": "<4.4", - "symfony/expression-language": "<5.1", - "symfony/http-kernel": "<4.4", - "symfony/intl": "<4.4", - "symfony/property-info": "<5.3", - "symfony/translation": "<4.4", - "symfony/yaml": "<4.4" - }, - "suggest": { - "psr/cache-implementation": "For using the mapping cache.", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/translation": "For translating validation errors.", - "symfony/yaml": "", - "symfony/config": "", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/property-access": "For accessing properties within comparison constraints", - "symfony/property-info": "To automatically add NotNull and Type constraints", - "symfony/expression-language": "For using the Expression validator and the ExpressionLanguageSyntax constraints" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Validator\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/var-dumper/CHANGELOG.md b/vendor/symfony/var-dumper/CHANGELOG.md deleted file mode 100644 index f58ed31..0000000 --- a/vendor/symfony/var-dumper/CHANGELOG.md +++ /dev/null @@ -1,72 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add ability to style integer and double values independently - * Add casters for Symfony's UUIDs and ULIDs - * Add support for `Fiber` - -5.2.0 ------ - - * added support for PHPUnit `--colors` option - * added `VAR_DUMPER_FORMAT=server` env var value support - * prevent replacing the handler when the `VAR_DUMPER_FORMAT` env var is set - -5.1.0 ------ - - * added `RdKafka` support - -4.4.0 ------ - - * added `VarDumperTestTrait::setUpVarDumper()` and `VarDumperTestTrait::tearDownVarDumper()` - to configure casters & flags to use in tests - * added `ImagineCaster` and infrastructure to dump images - * added the stamps of a message after it is dispatched in `TraceableMessageBus` and `MessengerDataCollector` collected data - * added `UuidCaster` - * made all casters final - * added support for the `NO_COLOR` env var (https://no-color.org/) - -4.3.0 ------ - - * added `DsCaster` to support dumping the contents of data structures from the Ds extension - -4.2.0 ------ - - * support selecting the format to use by setting the environment variable `VAR_DUMPER_FORMAT` to `html` or `cli` - -4.1.0 ------ - - * added a `ServerDumper` to send serialized Data clones to a server - * added a `ServerDumpCommand` and `DumpServer` to run a server collecting - and displaying dumps on a single place with multiple formats support - * added `CliDescriptor` and `HtmlDescriptor` descriptors for `server:dump` CLI and HTML formats support - -4.0.0 ------ - - * support for passing `\ReflectionClass` instances to the `Caster::castObject()` - method has been dropped, pass class names as strings instead - * the `Data::getRawData()` method has been removed - * the `VarDumperTestTrait::assertDumpEquals()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - * the `VarDumperTestTrait::assertDumpMatchesFormat()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - -3.4.0 ------ - - * added `AbstractCloner::setMinDepth()` function to ensure minimum tree depth - * deprecated `MongoCaster` - -2.7.0 ------ - - * deprecated `Cloner\Data::getLimitedClone()`. Use `withMaxDepth`, `withMaxItemsPerDepth` or `withRefHandles` instead. diff --git a/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/vendor/symfony/var-dumper/Caster/AmqpCaster.php deleted file mode 100644 index dc3b621..0000000 --- a/vendor/symfony/var-dumper/Caster/AmqpCaster.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Amqp related classes to array representation. - * - * @author Grégoire Pineau - * - * @final - */ -class AmqpCaster -{ - private const FLAGS = [ - \AMQP_DURABLE => 'AMQP_DURABLE', - \AMQP_PASSIVE => 'AMQP_PASSIVE', - \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', - \AMQP_AUTODELETE => 'AMQP_AUTODELETE', - \AMQP_INTERNAL => 'AMQP_INTERNAL', - \AMQP_NOLOCAL => 'AMQP_NOLOCAL', - \AMQP_AUTOACK => 'AMQP_AUTOACK', - \AMQP_IFEMPTY => 'AMQP_IFEMPTY', - \AMQP_IFUNUSED => 'AMQP_IFUNUSED', - \AMQP_MANDATORY => 'AMQP_MANDATORY', - \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', - \AMQP_MULTIPLE => 'AMQP_MULTIPLE', - \AMQP_NOWAIT => 'AMQP_NOWAIT', - \AMQP_REQUEUE => 'AMQP_REQUEUE', - ]; - - private const EXCHANGE_TYPES = [ - \AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', - \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', - \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', - \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ]; - - public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPConnection\x00login"])) { - return $a; - } - - // BC layer in the amqp lib - if (method_exists($c, 'getReadTimeout')) { - $timeout = $c->getReadTimeout(); - } else { - $timeout = $c->getTimeout(); - } - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'login' => $c->getLogin(), - $prefix.'password' => $c->getPassword(), - $prefix.'host' => $c->getHost(), - $prefix.'vhost' => $c->getVhost(), - $prefix.'port' => $c->getPort(), - $prefix.'read_timeout' => $timeout, - ]; - - return $a; - } - - public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'channel_id' => $c->getChannelId(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPChannel\x00connection"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'prefetch_size' => $c->getPrefetchSize(), - $prefix.'prefetch_count' => $c->getPrefetchCount(), - ]; - - return $a; - } - - public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPQueue\x00name"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPExchange\x00name"])) { - $a["\x00AMQPExchange\x00type"] = $type; - - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'type' => $type, - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPEnvelope\x00body"])) { - $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; - - return $a; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += [$prefix.'body' => $c->getBody()]; - } - - $a += [ - $prefix.'delivery_tag' => $c->getDeliveryTag(), - $prefix.'is_redelivery' => $c->isRedelivery(), - $prefix.'exchange_name' => $c->getExchangeName(), - $prefix.'routing_key' => $c->getRoutingKey(), - $prefix.'content_type' => $c->getContentType(), - $prefix.'content_encoding' => $c->getContentEncoding(), - $prefix.'headers' => $c->getHeaders(), - $prefix.'delivery_mode' => $deliveryMode, - $prefix.'priority' => $c->getPriority(), - $prefix.'correlation_id' => $c->getCorrelationId(), - $prefix.'reply_to' => $c->getReplyTo(), - $prefix.'expiration' => $c->getExpiration(), - $prefix.'message_id' => $c->getMessageId(), - $prefix.'timestamp' => $c->getTimeStamp(), - $prefix.'type' => $c->getType(), - $prefix.'user_id' => $c->getUserId(), - $prefix.'app_id' => $c->getAppId(), - ]; - - return $a; - } - - private static function extractFlags(int $flags): ConstStub - { - $flagsArray = []; - - foreach (self::FLAGS as $value => $name) { - if ($flags & $value) { - $flagsArray[] = $name; - } - } - - if (!$flagsArray) { - $flagsArray = ['AMQP_NOPARAM']; - } - - return new ConstStub(implode('|', $flagsArray), $flags); - } -} diff --git a/vendor/symfony/var-dumper/Caster/ArgsStub.php b/vendor/symfony/var-dumper/Caster/ArgsStub.php deleted file mode 100644 index f8b485b..0000000 --- a/vendor/symfony/var-dumper/Caster/ArgsStub.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a list of function arguments. - * - * @author Nicolas Grekas - */ -class ArgsStub extends EnumStub -{ - private static $parameters = []; - - public function __construct(array $args, string $function, ?string $class) - { - [$variadic, $params] = self::getParameters($function, $class); - - $values = []; - foreach ($args as $k => $v) { - $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; - } - if (null === $params) { - parent::__construct($values, false); - - return; - } - if (\count($values) < \count($params)) { - $params = \array_slice($params, 0, \count($values)); - } elseif (\count($values) > \count($params)) { - $values[] = new EnumStub(array_splice($values, \count($params)), false); - $params[] = $variadic; - } - if (['...'] === $params) { - $this->dumpKeys = false; - $this->value = $values[0]->value; - } else { - $this->value = array_combine($params, $values); - } - } - - private static function getParameters(string $function, ?string $class): array - { - if (isset(self::$parameters[$k = $class.'::'.$function])) { - return self::$parameters[$k]; - } - - try { - $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); - } catch (\ReflectionException $e) { - return [null, null]; - } - - $variadic = '...'; - $params = []; - foreach ($r->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - if ($v->isVariadic()) { - $variadic .= $k; - } else { - $params[] = $k; - } - } - - return self::$parameters[$k] = [$variadic, $params]; - } -} diff --git a/vendor/symfony/var-dumper/Caster/Caster.php b/vendor/symfony/var-dumper/Caster/Caster.php deleted file mode 100644 index 53f4461..0000000 --- a/vendor/symfony/var-dumper/Caster/Caster.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Helper for filtering out properties in casters. - * - * @author Nicolas Grekas - * - * @final - */ -class Caster -{ - public const EXCLUDE_VERBOSE = 1; - public const EXCLUDE_VIRTUAL = 2; - public const EXCLUDE_DYNAMIC = 4; - public const EXCLUDE_PUBLIC = 8; - public const EXCLUDE_PROTECTED = 16; - public const EXCLUDE_PRIVATE = 32; - public const EXCLUDE_NULL = 64; - public const EXCLUDE_EMPTY = 128; - public const EXCLUDE_NOT_IMPORTANT = 256; - public const EXCLUDE_STRICT = 512; - - public const PREFIX_VIRTUAL = "\0~\0"; - public const PREFIX_DYNAMIC = "\0+\0"; - public const PREFIX_PROTECTED = "\0*\0"; - - /** - * Casts objects to arrays and adds the dynamic property prefix. - * - * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not - */ - public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array - { - if ($hasDebugInfo) { - try { - $debugInfo = $obj->__debugInfo(); - } catch (\Exception $e) { - // ignore failing __debugInfo() - $hasDebugInfo = false; - } - } - - $a = $obj instanceof \Closure ? [] : (array) $obj; - - if ($obj instanceof \__PHP_Incomplete_Class) { - return $a; - } - - if ($a) { - static $publicProperties = []; - $debugClass = $debugClass ?? get_debug_type($obj); - - $i = 0; - $prefixedKeys = []; - foreach ($a as $k => $v) { - if ("\0" !== ($k[0] ?? '')) { - if (!isset($publicProperties[$class])) { - foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { - $publicProperties[$class][$prop->name] = true; - } - } - if (!isset($publicProperties[$class][$k])) { - $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; - } - } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { - $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); - } - ++$i; - } - if ($prefixedKeys) { - $keys = array_keys($a); - foreach ($prefixedKeys as $i => $k) { - $keys[$i] = $k; - } - $a = array_combine($keys, $a); - } - } - - if ($hasDebugInfo && \is_array($debugInfo)) { - foreach ($debugInfo as $k => $v) { - if (!isset($k[0]) || "\0" !== $k[0]) { - if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { - continue; - } - $k = self::PREFIX_VIRTUAL.$k; - } - - unset($a[$k]); - $a[$k] = $v; - } - } - - return $a; - } - - /** - * Filters out the specified properties. - * - * By default, a single match in the $filter bit field filters properties out, following an "or" logic. - * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. - * - * @param array $a The array containing the properties to filter - * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out - * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set - * @param int &$count Set to the number of removed properties - */ - public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array - { - $count = 0; - - foreach ($a as $k => $v) { - $type = self::EXCLUDE_STRICT & $filter; - - if (null === $v) { - $type |= self::EXCLUDE_NULL & $filter; - $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { - $type |= self::EXCLUDE_EMPTY & $filter; - } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_NOT_IMPORTANT; - } - if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_VERBOSE; - } - - if (!isset($k[1]) || "\0" !== $k[0]) { - $type |= self::EXCLUDE_PUBLIC & $filter; - } elseif ('~' === $k[1]) { - $type |= self::EXCLUDE_VIRTUAL & $filter; - } elseif ('+' === $k[1]) { - $type |= self::EXCLUDE_DYNAMIC & $filter; - } elseif ('*' === $k[1]) { - $type |= self::EXCLUDE_PROTECTED & $filter; - } else { - $type |= self::EXCLUDE_PRIVATE & $filter; - } - - if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { - unset($a[$k]); - ++$count; - } - } - - return $a; - } - - public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array - { - if (isset($a['__PHP_Incomplete_Class_Name'])) { - $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; - unset($a['__PHP_Incomplete_Class_Name']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ClassStub.php b/vendor/symfony/var-dumper/Caster/ClassStub.php deleted file mode 100644 index 48f8483..0000000 --- a/vendor/symfony/var-dumper/Caster/ClassStub.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP class identifier. - * - * @author Nicolas Grekas - */ -class ClassStub extends ConstStub -{ - /** - * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name - * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier - */ - public function __construct(string $identifier, $callable = null) - { - $this->value = $identifier; - - try { - if (null !== $callable) { - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - } elseif (\is_object($callable)) { - $r = [$callable, '__invoke']; - } elseif (\is_array($callable)) { - $r = $callable; - } elseif (false !== $i = strpos($callable, '::')) { - $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; - } else { - $r = new \ReflectionFunction($callable); - } - } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { - $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; - } else { - $r = new \ReflectionClass($identifier); - } - - if (\is_array($r)) { - try { - $r = new \ReflectionMethod($r[0], $r[1]); - } catch (\ReflectionException $e) { - $r = new \ReflectionClass($r[0]); - } - } - - if (str_contains($identifier, "@anonymous\0")) { - $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $identifier); - } - - if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { - $s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE); - $s = ReflectionCaster::getSignature($s); - - if (str_ends_with($identifier, '()')) { - $this->value = substr_replace($identifier, $s, -2); - } else { - $this->value .= $s; - } - } - } catch (\ReflectionException $e) { - return; - } finally { - if (0 < $i = strrpos($this->value, '\\')) { - $this->attr['ellipsis'] = \strlen($this->value) - $i; - $this->attr['ellipsis-type'] = 'class'; - $this->attr['ellipsis-tail'] = 1; - } - } - - if ($f = $r->getFileName()) { - $this->attr['file'] = $f; - $this->attr['line'] = $r->getStartLine(); - } - } - - public static function wrapCallable($callable) - { - if (\is_object($callable) || !\is_callable($callable)) { - return $callable; - } - - if (!\is_array($callable)) { - $callable = new static($callable, $callable); - } elseif (\is_string($callable[0])) { - $callable[0] = new static($callable[0], $callable); - } else { - $callable[1] = new static($callable[1], $callable); - } - - return $callable; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ConstStub.php b/vendor/symfony/var-dumper/Caster/ConstStub.php deleted file mode 100644 index 8b01797..0000000 --- a/vendor/symfony/var-dumper/Caster/ConstStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP constant and its value. - * - * @author Nicolas Grekas - */ -class ConstStub extends Stub -{ - public function __construct(string $name, $value = null) - { - $this->class = $name; - $this->value = 1 < \func_num_args() ? $value : $name; - } - - /** - * @return string - */ - public function __toString() - { - return (string) $this->value; - } -} diff --git a/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/vendor/symfony/var-dumper/Caster/CutArrayStub.php deleted file mode 100644 index 0e4fb36..0000000 --- a/vendor/symfony/var-dumper/Caster/CutArrayStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a cut array. - * - * @author Nicolas Grekas - */ -class CutArrayStub extends CutStub -{ - public $preservedSubset; - - public function __construct(array $value, array $preservedKeys) - { - parent::__construct($value); - - $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); - $this->cut -= \count($this->preservedSubset); - } -} diff --git a/vendor/symfony/var-dumper/Caster/CutStub.php b/vendor/symfony/var-dumper/Caster/CutStub.php deleted file mode 100644 index 464c6db..0000000 --- a/vendor/symfony/var-dumper/Caster/CutStub.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents the main properties of a PHP variable, pre-casted by a caster. - * - * @author Nicolas Grekas - */ -class CutStub extends Stub -{ - public function __construct($value) - { - $this->value = $value; - - switch (\gettype($value)) { - case 'object': - $this->type = self::TYPE_OBJECT; - $this->class = \get_class($value); - - if ($value instanceof \Closure) { - ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); - } - - $this->cut = -1; - break; - - case 'array': - $this->type = self::TYPE_ARRAY; - $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = \count($value); - break; - - case 'resource': - case 'unknown type': - case 'resource (closed)': - $this->type = self::TYPE_RESOURCE; - $this->handle = (int) $value; - if ('Unknown' === $this->class = @get_resource_type($value)) { - $this->class = 'Closed'; - } - $this->cut = -1; - break; - - case 'string': - $this->type = self::TYPE_STRING; - $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); - $this->value = ''; - break; - } - } -} diff --git a/vendor/symfony/var-dumper/Caster/DOMCaster.php b/vendor/symfony/var-dumper/Caster/DOMCaster.php deleted file mode 100644 index 4dd16e0..0000000 --- a/vendor/symfony/var-dumper/Caster/DOMCaster.php +++ /dev/null @@ -1,304 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DOM related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class DOMCaster -{ - private const ERROR_CODES = [ - \DOM_PHP_ERR => 'DOM_PHP_ERR', - \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', - \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', - \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', - \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', - \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', - \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', - \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', - \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', - \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', - \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', - \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', - \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', - \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', - \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', - \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', - \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ]; - - private const NODE_TYPES = [ - \XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', - \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', - \XML_TEXT_NODE => 'XML_TEXT_NODE', - \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', - \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', - \XML_ENTITY_NODE => 'XML_ENTITY_NODE', - \XML_PI_NODE => 'XML_PI_NODE', - \XML_COMMENT_NODE => 'XML_COMMENT_NODE', - \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', - \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', - \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', - \XML_NOTATION_NODE => 'XML_NOTATION_NODE', - \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', - \XML_DTD_NODE => 'XML_DTD_NODE', - \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', - \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', - \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', - \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ]; - - public static function castException(\DOMException $e, array $a, Stub $stub, bool $isNested) - { - $k = Caster::PREFIX_PROTECTED.'code'; - if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { - $a[$k] = new ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); - } - - return $a; - } - - public static function castLength($dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castImplementation(\DOMImplementation $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'Core' => '1.0', - Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ]; - - return $a; - } - - public static function castNode(\DOMNode $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'parentNode' => new CutStub($dom->parentNode), - 'childNodes' => $dom->childNodes, - 'firstChild' => new CutStub($dom->firstChild), - 'lastChild' => new CutStub($dom->lastChild), - 'previousSibling' => new CutStub($dom->previousSibling), - 'nextSibling' => new CutStub($dom->nextSibling), - 'attributes' => $dom->attributes, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'namespaceURI' => $dom->namespaceURI, - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, - 'textContent' => new CutStub($dom->textContent), - ]; - - return $a; - } - - public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'namespaceURI' => $dom->namespaceURI, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'parentNode' => new CutStub($dom->parentNode), - ]; - - return $a; - } - - public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - 'doctype' => $dom->doctype, - 'implementation' => $dom->implementation, - 'documentElement' => new CutStub($dom->documentElement), - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'xmlEncoding' => $dom->xmlEncoding, - 'standalone' => $dom->standalone, - 'xmlStandalone' => $dom->xmlStandalone, - 'version' => $dom->version, - 'xmlVersion' => $dom->xmlVersion, - 'strictErrorChecking' => $dom->strictErrorChecking, - 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, - 'config' => $dom->config, - 'formatOutput' => $dom->formatOutput, - 'validateOnParse' => $dom->validateOnParse, - 'resolveExternals' => $dom->resolveExternals, - 'preserveWhiteSpace' => $dom->preserveWhiteSpace, - 'recover' => $dom->recover, - 'substituteEntities' => $dom->substituteEntities, - ]; - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $formatOutput = $dom->formatOutput; - $dom->formatOutput = true; - $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; - $dom->formatOutput = $formatOutput; - } - - return $a; - } - - public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'data' => $dom->data, - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'name' => $dom->name, - 'specified' => $dom->specified, - 'value' => $dom->value, - 'ownerElement' => $dom->ownerElement, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castElement(\DOMElement $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'tagName' => $dom->tagName, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'wholeText' => $dom->wholeText, - ]; - - return $a; - } - - public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'typeName' => $dom->typeName, - 'typeNamespace' => $dom->typeNamespace, - ]; - - return $a; - } - - public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'severity' => $dom->severity, - 'message' => $dom->message, - 'type' => $dom->type, - 'relatedException' => $dom->relatedException, - 'related_data' => $dom->related_data, - 'location' => $dom->location, - ]; - - return $a; - } - - public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'lineNumber' => $dom->lineNumber, - 'columnNumber' => $dom->columnNumber, - 'offset' => $dom->offset, - 'relatedNode' => $dom->relatedNode, - 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, - ]; - - return $a; - } - - public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'name' => $dom->name, - 'entities' => $dom->entities, - 'notations' => $dom->notations, - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'internalSubset' => $dom->internalSubset, - ]; - - return $a; - } - - public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - ]; - - return $a; - } - - public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'notationName' => $dom->notationName, - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'version' => $dom->version, - ]; - - return $a; - } - - public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'target' => $dom->target, - 'data' => $dom->data, - ]; - - return $a; - } - - public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, bool $isNested) - { - $a += [ - 'document' => $dom->document, - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php deleted file mode 100644 index 99f5384..0000000 --- a/vendor/symfony/var-dumper/Caster/DateCaster.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DateTimeInterface related classes to array representation. - * - * @author Dany Maillard - * - * @final - */ -class DateCaster -{ - private const PERIOD_LIMIT = 3; - - public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) - { - $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); - $fromNow = (new \DateTime())->diff($d); - - $title = $d->format('l, F j, Y') - ."\n".self::formatInterval($fromNow).' from now' - .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') - ; - - unset( - $a[Caster::PREFIX_DYNAMIC.'date'], - $a[Caster::PREFIX_DYNAMIC.'timezone'], - $a[Caster::PREFIX_DYNAMIC.'timezone_type'] - ); - $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); - - $stub->class .= $d->format(' @U'); - - return $a; - } - - public static function castInterval(\DateInterval $interval, array $a, Stub $stub, bool $isNested, int $filter) - { - $now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); - $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; - - $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; - } - - private static function formatInterval(\DateInterval $i): string - { - $format = '%R '; - - if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { - $d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $i = $d->diff($d->add($i)); // recalculate carry over points - $format .= 0 < $i->days ? '%ad ' : ''; - } else { - $format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : ''); - } - - $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : ''; - $format = '%R ' === $format ? '0s' : $format; - - return $i->format(rtrim($format)); - } - - public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, bool $isNested, int $filter) - { - $location = $timeZone->getLocation(); - $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); - $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; - - $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; - } - - public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, bool $isNested, int $filter) - { - $dates = []; - foreach (clone $p as $i => $d) { - if (self::PERIOD_LIMIT === $i) { - $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); - $dates[] = sprintf('%s more', ($end = $p->getEndDate()) - ? ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) - : $p->recurrences - $i - ); - break; - } - $dates[] = sprintf('%s) %s', $i + 1, self::formatDateTime($d)); - } - - $period = sprintf( - 'every %s, from %s (%s) %s', - self::formatInterval($p->getDateInterval()), - self::formatDateTime($p->getStartDate()), - $p->include_start_date ? 'included' : 'excluded', - ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end) : 'recurring '.$p->recurrences.' time/s' - ); - - $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; - } - - private static function formatDateTime(\DateTimeInterface $d, string $extra = ''): string - { - return $d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra); - } - - private static function formatSeconds(string $s, string $us): string - { - return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); - } -} diff --git a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php deleted file mode 100644 index 129b2cb..0000000 --- a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Doctrine\Common\Proxy\Proxy as CommonProxy; -use Doctrine\ORM\PersistentCollection; -use Doctrine\ORM\Proxy\Proxy as OrmProxy; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Doctrine related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class DoctrineCaster -{ - public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, bool $isNested) - { - foreach (['__cloner__', '__initializer__'] as $k) { - if (\array_key_exists($k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, bool $isNested) - { - foreach (['_entityPersister', '_identifier'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, bool $isNested) - { - foreach (['snapshot', 'association', 'typeClass'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { - $a[$k] = new CutStub($a[$k]); - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DsCaster.php b/vendor/symfony/var-dumper/Caster/DsCaster.php deleted file mode 100644 index b34b670..0000000 --- a/vendor/symfony/var-dumper/Caster/DsCaster.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ds\Collection; -use Ds\Map; -use Ds\Pair; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Ds extension classes to array representation. - * - * @author Jáchym Toušek - * - * @final - */ -class DsCaster -{ - public static function castCollection(Collection $c, array $a, Stub $stub, bool $isNested): array - { - $a[Caster::PREFIX_VIRTUAL.'count'] = $c->count(); - $a[Caster::PREFIX_VIRTUAL.'capacity'] = $c->capacity(); - - if (!$c instanceof Map) { - $a += $c->toArray(); - } - - return $a; - } - - public static function castMap(Map $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c as $k => $v) { - $a[] = new DsPairStub($k, $v); - } - - return $a; - } - - public static function castPair(Pair $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c->toArray() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castPairStub(DsPairStub $c, array $a, Stub $stub, bool $isNested): array - { - if ($isNested) { - $stub->class = Pair::class; - $stub->value = null; - $stub->handle = 0; - - $a = $c->value; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DsPairStub.php b/vendor/symfony/var-dumper/Caster/DsPairStub.php deleted file mode 100644 index a1dcc15..0000000 --- a/vendor/symfony/var-dumper/Caster/DsPairStub.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - */ -class DsPairStub extends Stub -{ - public function __construct($key, $value) - { - $this->value = [ - Caster::PREFIX_VIRTUAL.'key' => $key, - Caster::PREFIX_VIRTUAL.'value' => $value, - ]; - } -} diff --git a/vendor/symfony/var-dumper/Caster/EnumStub.php b/vendor/symfony/var-dumper/Caster/EnumStub.php deleted file mode 100644 index 7a4e98a..0000000 --- a/vendor/symfony/var-dumper/Caster/EnumStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents an enumeration of values. - * - * @author Nicolas Grekas - */ -class EnumStub extends Stub -{ - public $dumpKeys = true; - - public function __construct(array $values, bool $dumpKeys = true) - { - $this->value = $values; - $this->dumpKeys = $dumpKeys; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php deleted file mode 100644 index 7f5cb65..0000000 --- a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +++ /dev/null @@ -1,388 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * Casts common Exception classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ExceptionCaster -{ - public static $srcContext = 1; - public static $traceArgs = true; - public static $errorTypes = [ - \E_DEPRECATED => 'E_DEPRECATED', - \E_USER_DEPRECATED => 'E_USER_DEPRECATED', - \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - \E_ERROR => 'E_ERROR', - \E_WARNING => 'E_WARNING', - \E_PARSE => 'E_PARSE', - \E_NOTICE => 'E_NOTICE', - \E_CORE_ERROR => 'E_CORE_ERROR', - \E_CORE_WARNING => 'E_CORE_WARNING', - \E_COMPILE_ERROR => 'E_COMPILE_ERROR', - \E_COMPILE_WARNING => 'E_COMPILE_WARNING', - \E_USER_ERROR => 'E_USER_ERROR', - \E_USER_WARNING => 'E_USER_WARNING', - \E_USER_NOTICE => 'E_USER_NOTICE', - \E_STRICT => 'E_STRICT', - ]; - - private static $framesCache = []; - - public static function castError(\Error $e, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); - } - - public static function castException(\Exception $e, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); - } - - public static function castErrorException(\ErrorException $e, array $a, Stub $stub, bool $isNested) - { - if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - return $a; - } - - public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, bool $isNested) - { - $trace = Caster::PREFIX_VIRTUAL.'trace'; - $prefix = Caster::PREFIX_PROTECTED; - $xPrefix = "\0Exception\0"; - - if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { - $b = (array) $a[$xPrefix.'previous']; - $class = get_debug_type($a[$xPrefix.'previous']); - self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); - $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); - } - - unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); - - return $a; - } - - public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, bool $isNested) - { - $sPrefix = "\0".SilencedErrorContext::class."\0"; - - if (!isset($a[$s = $sPrefix.'severity'])) { - return $a; - } - - if (isset(self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - $trace = [[ - 'file' => $a[$sPrefix.'file'], - 'line' => $a[$sPrefix.'line'], - ]]; - - if (isset($a[$sPrefix.'trace'])) { - $trace = array_merge($trace, $a[$sPrefix.'trace']); - } - - unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']); - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - - return $a; - } - - public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, bool $isNested) - { - if (!$isNested) { - return $a; - } - $stub->class = ''; - $stub->handle = 0; - $frames = $trace->value; - $prefix = Caster::PREFIX_VIRTUAL; - - $a = []; - $j = \count($frames); - if (0 > $i = $trace->sliceOffset) { - $i = max(0, $j + $i); - } - if (!isset($trace->value[$i])) { - return []; - } - $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; - $frames[] = ['function' => '']; - $collapse = false; - - for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { - $f = $frames[$i]; - $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; - - $frame = new FrameStub( - [ - 'object' => $f['object'] ?? null, - 'class' => $f['class'] ?? null, - 'type' => $f['type'] ?? null, - 'function' => $f['function'] ?? null, - ] + $frames[$i - 1], - false, - true - ); - $f = self::castFrameStub($frame, [], $frame, true); - if (isset($f[$prefix.'src'])) { - foreach ($f[$prefix.'src']->value as $label => $frame) { - if (str_starts_with($label, "\0~collapse=0")) { - if ($collapse) { - $label = substr_replace($label, '1', 11, 1); - } else { - $collapse = true; - } - } - $label = substr_replace($label, "title=Stack level $j.&", 2, 0); - } - $f = $frames[$i - 1]; - if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { - $frame->value['arguments'] = new ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); - } - } elseif ('???' !== $lastCall) { - $label = new ClassStub($lastCall); - if (isset($label->attr['ellipsis'])) { - $label->attr['ellipsis'] += 2; - $label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()'; - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()'; - } - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; - } - $a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame; - - $lastCall = $call; - } - if (null !== $trace->sliceLength) { - $a = \array_slice($a, 0, $trace->sliceLength, true); - } - - return $a; - } - - public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, bool $isNested) - { - if (!$isNested) { - return $a; - } - $f = $frame->value; - $prefix = Caster::PREFIX_VIRTUAL; - - if (isset($f['file'], $f['line'])) { - $cacheKey = $f; - unset($cacheKey['object'], $cacheKey['args']); - $cacheKey[] = self::$srcContext; - $cacheKey = implode('-', $cacheKey); - - if (isset(self::$framesCache[$cacheKey])) { - $a[$prefix.'src'] = self::$framesCache[$cacheKey]; - } else { - if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -\strlen($match[0])); - $f['line'] = (int) $match[1]; - } - $src = $f['line']; - $srcKey = $f['file']; - $ellipsis = new LinkStub($srcKey, 0); - $srcAttr = 'collapse='.(int) $ellipsis->inVendor; - $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; - $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; - - if (is_file($f['file']) && 0 <= self::$srcContext) { - if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { - $template = null; - if (isset($f['object'])) { - $template = $f['object']; - } elseif ((new \ReflectionClass($f['class']))->isInstantiable()) { - $template = unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); - } - if (null !== $template) { - $ellipsis = 0; - $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); - $templateInfo = $template->getDebugInfo(); - if (isset($templateInfo[$f['line']])) { - if (!method_exists($template, 'getSourceContext') || !is_file($templatePath = $template->getSourceContext()->getPath())) { - $templatePath = null; - } - if ($templateSrc) { - $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); - $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; - } - } - } - } - if ($srcKey == $f['file']) { - $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); - $srcKey .= ':'.$f['line']; - if ($ellipsis) { - $ellipsis += 1 + \strlen($f['line']); - } - } - $srcAttr .= sprintf('&separator= &file=%s&line=%d', rawurlencode($f['file']), $f['line']); - } else { - $srcAttr .= '&separator=:'; - } - $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; - self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); - } - } - - unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); - if ($frame->inTraceStub) { - unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); - } - foreach ($a as $k => $v) { - if (!$v) { - unset($a[$k]); - } - } - if ($frame->keepArgs && !empty($f['args'])) { - $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); - } - - return $a; - } - - private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter): array - { - if (isset($a[$xPrefix.'trace'])) { - $trace = $a[$xPrefix.'trace']; - unset($a[$xPrefix.'trace']); // Ensures the trace is always last - } else { - $trace = []; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - } - if (empty($a[$xPrefix.'previous'])) { - unset($a[$xPrefix.'previous']); - } - unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); - - if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) { - $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $a[Caster::PREFIX_PROTECTED.'message']); - } - - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - - return $a; - } - - private static function traceUnshift(array &$trace, ?string $class, string $file, int $line): void - { - if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { - return; - } - array_unshift($trace, [ - 'function' => $class ? 'new '.$class : null, - 'file' => $file, - 'line' => $line, - ]); - } - - private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame): EnumStub - { - $srcLines = explode("\n", $srcLines); - $src = []; - - for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { - $src[] = ($srcLines[$i] ?? '')."\n"; - } - - if ($frame['function'] ?? false) { - $stub = new CutStub(new \stdClass()); - $stub->class = (isset($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function']; - $stub->type = Stub::TYPE_OBJECT; - $stub->attr['cut_hash'] = true; - $stub->attr['file'] = $frame['file']; - $stub->attr['line'] = $frame['line']; - - try { - $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); - $stub->class .= ReflectionCaster::getSignature(ReflectionCaster::castFunctionAbstract($caller, [], $stub, true, Caster::EXCLUDE_VERBOSE)); - - if ($f = $caller->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $caller->getStartLine(); - } - } catch (\ReflectionException $e) { - // ignore fake class/function - } - - $srcLines = ["\0~separator=\0" => $stub]; - } else { - $stub = null; - $srcLines = []; - } - - $ltrim = 0; - do { - $pad = null; - for ($i = $srcContext << 1; $i >= 0; --$i) { - if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { - if (null === $pad) { - $pad = $c; - } - if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { - break; - } - } - } - ++$ltrim; - } while (0 > $i && null !== $pad); - - --$ltrim; - - foreach ($src as $i => $c) { - if ($ltrim) { - $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); - } - $c = substr($c, 0, -1); - if ($i !== $srcContext) { - $c = new ConstStub('default', $c); - } else { - $c = new ConstStub($c, $stub ? 'in '.$stub->class : ''); - if (null !== $file) { - $c->attr['file'] = $file; - $c->attr['line'] = $line; - } - } - $c->attr['lang'] = $lang; - $srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; - } - - return new EnumStub($srcLines); - } -} diff --git a/vendor/symfony/var-dumper/Caster/FiberCaster.php b/vendor/symfony/var-dumper/Caster/FiberCaster.php deleted file mode 100644 index c74a9e5..0000000 --- a/vendor/symfony/var-dumper/Caster/FiberCaster.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Fiber related classes to array representation. - * - * @author Grégoire Pineau - */ -final class FiberCaster -{ - public static function castFiber(\Fiber $fiber, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($fiber->isTerminated()) { - $status = 'terminated'; - } elseif ($fiber->isRunning()) { - $status = 'running'; - } elseif ($fiber->isSuspended()) { - $status = 'suspended'; - } elseif ($fiber->isStarted()) { - $status = 'started'; - } else { - $status = 'not started'; - } - - $a[$prefix.'status'] = $status; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/FrameStub.php b/vendor/symfony/var-dumper/Caster/FrameStub.php deleted file mode 100644 index 8786755..0000000 --- a/vendor/symfony/var-dumper/Caster/FrameStub.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class FrameStub extends EnumStub -{ - public $keepArgs; - public $inTraceStub; - - public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false) - { - $this->value = $frame; - $this->keepArgs = $keepArgs; - $this->inTraceStub = $inTraceStub; - } -} diff --git a/vendor/symfony/var-dumper/Caster/GmpCaster.php b/vendor/symfony/var-dumper/Caster/GmpCaster.php deleted file mode 100644 index b018cc7..0000000 --- a/vendor/symfony/var-dumper/Caster/GmpCaster.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts GMP objects to array representation. - * - * @author Hamza Amrouche - * @author Nicolas Grekas - * - * @final - */ -class GmpCaster -{ - public static function castGmp(\GMP $gmp, array $a, Stub $stub, bool $isNested, int $filter): array - { - $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ImagineCaster.php b/vendor/symfony/var-dumper/Caster/ImagineCaster.php deleted file mode 100644 index d1289da..0000000 --- a/vendor/symfony/var-dumper/Caster/ImagineCaster.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Imagine\Image\ImageInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class ImagineCaster -{ - public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array - { - $imgData = $c->get('png'); - if (\strlen($imgData) > 1 * 1000 * 1000) { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), - ]; - } else { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), - ]; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ImgStub.php b/vendor/symfony/var-dumper/Caster/ImgStub.php deleted file mode 100644 index a16681f..0000000 --- a/vendor/symfony/var-dumper/Caster/ImgStub.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * @author Grégoire Pineau - */ -class ImgStub extends ConstStub -{ - public function __construct(string $data, string $contentType, string $size = '') - { - $this->value = ''; - $this->attr['img-data'] = $data; - $this->attr['img-size'] = $size; - $this->attr['content-type'] = $contentType; - } -} diff --git a/vendor/symfony/var-dumper/Caster/IntlCaster.php b/vendor/symfony/var-dumper/Caster/IntlCaster.php deleted file mode 100644 index 23b9d5d..0000000 --- a/vendor/symfony/var-dumper/Caster/IntlCaster.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * @author Jan Schädlich - * - * @final - */ -class IntlCaster -{ - public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - return self::castError($c, $a); - } - - public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += 3; - - return self::castError($c, $a); - } - - $a += [ - Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( - [ - 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), - 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), - 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), - 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), - 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), - 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), - 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), - 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), - 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), - 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), - 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), - 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), - 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), - 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), - 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), - 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), - 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), - 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), - 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), - 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), - ] - ), - Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( - [ - 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), - 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), - 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), - 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), - 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), - 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), - 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), - 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), - ] - ), - Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( - [ - 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), - 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), - 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), - 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), - 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), - 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), - 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), - 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), - 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), - 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), - 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), - 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), - 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), - 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), - 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), - 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), - 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), - 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), - ] - ), - ]; - - return self::castError($c, $a); - } - - public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), - Caster::PREFIX_VIRTUAL.'id' => $c->getID(), - Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), - ]; - - if ($c->useDaylightTime()) { - $a += [ - Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), - ]; - } - - return self::castError($c, $a); - } - - public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'type' => $c->getType(), - Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), - Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), - Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), - Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), - Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), - Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), - Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), - Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), - Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - private static function castError(object $c, array $a): array - { - if ($errorCode = $c->getErrorCode()) { - $a += [ - Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, - Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), - ]; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/LinkStub.php b/vendor/symfony/var-dumper/Caster/LinkStub.php deleted file mode 100644 index 7e07803..0000000 --- a/vendor/symfony/var-dumper/Caster/LinkStub.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a file or a URL. - * - * @author Nicolas Grekas - */ -class LinkStub extends ConstStub -{ - public $inVendor = false; - - private static $vendorRoots; - private static $composerRoots; - - public function __construct(string $label, int $line = 0, string $href = null) - { - $this->value = $label; - - if (null === $href) { - $href = $label; - } - if (!\is_string($href)) { - return; - } - if (str_starts_with($href, 'file://')) { - if ($href === $label) { - $label = substr($label, 7); - } - $href = substr($href, 7); - } elseif (str_contains($href, '://')) { - $this->attr['href'] = $href; - - return; - } - if (!is_file($href)) { - return; - } - if ($line) { - $this->attr['line'] = $line; - } - if ($label !== $this->attr['file'] = realpath($href) ?: $href) { - return; - } - if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { - $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); - } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { - $this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2))); - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1; - } - } - - private function getComposerRoot(string $file, bool &$inVendor) - { - if (null === self::$vendorRoots) { - self::$vendorRoots = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (is_file($v.'/composer/installed.json')) { - self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; - } - } - } - } - $inVendor = false; - - if (isset(self::$composerRoots[$dir = \dirname($file)])) { - return self::$composerRoots[$dir]; - } - - foreach (self::$vendorRoots as $root) { - if ($inVendor = str_starts_with($file, $root)) { - return $root; - } - } - - $parent = $dir; - while (!@is_file($parent.'/composer.json')) { - if (!@file_exists($parent)) { - // open_basedir restriction in effect - break; - } - if ($parent === \dirname($parent)) { - return self::$composerRoots[$dir] = false; - } - - $parent = \dirname($parent); - } - - return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; - } -} diff --git a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php deleted file mode 100644 index cfef19a..0000000 --- a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Jan Schädlich - * - * @final - */ -class MemcachedCaster -{ - private static $optionConstants; - private static $defaultOptions; - - public static function castMemcached(\Memcached $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), - Caster::PREFIX_VIRTUAL.'options' => new EnumStub( - self::getNonDefaultOptions($c) - ), - ]; - - return $a; - } - - private static function getNonDefaultOptions(\Memcached $c): array - { - self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - $nonDefaultOptions = []; - foreach (self::$optionConstants as $constantKey => $value) { - if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { - $nonDefaultOptions[$constantKey] = $option; - } - } - - return $nonDefaultOptions; - } - - private static function discoverDefaultOptions(): array - { - $defaultMemcached = new \Memcached(); - $defaultMemcached->addServer('127.0.0.1', 11211); - - $defaultOptions = []; - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - foreach (self::$optionConstants as $constantKey => $value) { - $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); - } - - return $defaultOptions; - } - - private static function getOptionConstants(): array - { - $reflectedMemcached = new \ReflectionClass(\Memcached::class); - - $optionConstants = []; - foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { - if (str_starts_with($constantKey, 'OPT_')) { - $optionConstants[$constantKey] = $value; - } - } - - return $optionConstants; - } -} diff --git a/vendor/symfony/var-dumper/Caster/MysqliCaster.php b/vendor/symfony/var-dumper/Caster/MysqliCaster.php deleted file mode 100644 index bfe6f08..0000000 --- a/vendor/symfony/var-dumper/Caster/MysqliCaster.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * - * @internal - */ -final class MysqliCaster -{ - public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($a as $k => $v) { - if (isset($c->$k)) { - $a[$k] = $c->$k; - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/PdoCaster.php b/vendor/symfony/var-dumper/Caster/PdoCaster.php deleted file mode 100644 index 140473b..0000000 --- a/vendor/symfony/var-dumper/Caster/PdoCaster.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts PDO related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class PdoCaster -{ - private const PDO_ATTRIBUTES = [ - 'CASE' => [ - \PDO::CASE_LOWER => 'LOWER', - \PDO::CASE_NATURAL => 'NATURAL', - \PDO::CASE_UPPER => 'UPPER', - ], - 'ERRMODE' => [ - \PDO::ERRMODE_SILENT => 'SILENT', - \PDO::ERRMODE_WARNING => 'WARNING', - \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ], - 'TIMEOUT', - 'PREFETCH', - 'AUTOCOMMIT', - 'PERSISTENT', - 'DRIVER_NAME', - 'SERVER_INFO', - 'ORACLE_NULLS' => [ - \PDO::NULL_NATURAL => 'NATURAL', - \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', - \PDO::NULL_TO_STRING => 'TO_STRING', - ], - 'CLIENT_VERSION', - 'SERVER_VERSION', - 'STATEMENT_CLASS', - 'EMULATE_PREPARES', - 'CONNECTION_STATUS', - 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => [ - \PDO::FETCH_ASSOC => 'ASSOC', - \PDO::FETCH_BOTH => 'BOTH', - \PDO::FETCH_LAZY => 'LAZY', - \PDO::FETCH_NUM => 'NUM', - \PDO::FETCH_OBJ => 'OBJ', - ], - ]; - - public static function castPdo(\PDO $c, array $a, Stub $stub, bool $isNested) - { - $attr = []; - $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); - $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - foreach (self::PDO_ATTRIBUTES as $k => $v) { - if (!isset($k[0])) { - $k = $v; - $v = []; - } - - try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); - if ($v && isset($v[$attr[$k]])) { - $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); - } - } catch (\Exception $e) { - } - } - if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { - if ($attr[$k][1]) { - $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); - } - $attr[$k][0] = new ClassStub($attr[$k][0]); - } - - $prefix = Caster::PREFIX_VIRTUAL; - $a += [ - $prefix.'inTransaction' => method_exists($c, 'inTransaction'), - $prefix.'errorInfo' => $c->errorInfo(), - $prefix.'attributes' => new EnumStub($attr), - ]; - - if ($a[$prefix.'inTransaction']) { - $a[$prefix.'inTransaction'] = $c->inTransaction(); - } else { - unset($a[$prefix.'inTransaction']); - } - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); - - return $a; - } - - public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $a[$prefix.'errorInfo'] = $c->errorInfo(); - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/PgSqlCaster.php b/vendor/symfony/var-dumper/Caster/PgSqlCaster.php deleted file mode 100644 index d8e5b52..0000000 --- a/vendor/symfony/var-dumper/Caster/PgSqlCaster.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts pqsql resources to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class PgSqlCaster -{ - private const PARAM_CODES = [ - 'server_encoding', - 'client_encoding', - 'is_superuser', - 'session_authorization', - 'DateStyle', - 'TimeZone', - 'IntervalStyle', - 'integer_datetimes', - 'application_name', - 'standard_conforming_strings', - ]; - - private const TRANSACTION_STATUS = [ - \PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', - \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', - \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', - \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', - \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', - ]; - - private const RESULT_STATUS = [ - \PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', - \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', - \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', - \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', - \PGSQL_COPY_IN => 'PGSQL_COPY_IN', - \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', - \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', - \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', - ]; - - private const DIAG_CODES = [ - 'severity' => \PGSQL_DIAG_SEVERITY, - 'sqlstate' => \PGSQL_DIAG_SQLSTATE, - 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, - 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, - 'hint' => \PGSQL_DIAG_MESSAGE_HINT, - 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, - 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, - 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, - 'context' => \PGSQL_DIAG_CONTEXT, - 'file' => \PGSQL_DIAG_SOURCE_FILE, - 'line' => \PGSQL_DIAG_SOURCE_LINE, - 'function' => \PGSQL_DIAG_SOURCE_FUNCTION, - ]; - - public static function castLargeObject($lo, array $a, Stub $stub, bool $isNested) - { - $a['seek position'] = pg_lo_tell($lo); - - return $a; - } - - public static function castLink($link, array $a, Stub $stub, bool $isNested) - { - $a['status'] = pg_connection_status($link); - $a['status'] = new ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); - $a['busy'] = pg_connection_busy($link); - - $a['transaction'] = pg_transaction_status($link); - if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { - $a['transaction'] = new ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); - } - - $a['pid'] = pg_get_pid($link); - $a['last error'] = pg_last_error($link); - $a['last notice'] = pg_last_notice($link); - $a['host'] = pg_host($link); - $a['port'] = pg_port($link); - $a['dbname'] = pg_dbname($link); - $a['options'] = pg_options($link); - $a['version'] = pg_version($link); - - foreach (self::PARAM_CODES as $v) { - if (false !== $s = pg_parameter_status($link, $v)) { - $a['param'][$v] = $s; - } - } - - $a['param']['client_encoding'] = pg_client_encoding($link); - $a['param'] = new EnumStub($a['param']); - - return $a; - } - - public static function castResult($result, array $a, Stub $stub, bool $isNested) - { - $a['num rows'] = pg_num_rows($result); - $a['status'] = pg_result_status($result); - if (isset(self::RESULT_STATUS[$a['status']])) { - $a['status'] = new ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); - } - $a['command-completion tag'] = pg_result_status($result, \PGSQL_STATUS_STRING); - - if (-1 === $a['num rows']) { - foreach (self::DIAG_CODES as $k => $v) { - $a['error'][$k] = pg_result_error_field($result, $v); - } - } - - $a['affected rows'] = pg_affected_rows($result); - $a['last OID'] = pg_last_oid($result); - - $fields = pg_num_fields($result); - - for ($i = 0; $i < $fields; ++$i) { - $field = [ - 'name' => pg_field_name($result, $i), - 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), - 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), - 'nullable' => (bool) pg_field_is_null($result, $i), - 'storage' => pg_field_size($result, $i).' bytes', - 'display' => pg_field_prtlen($result, $i).' chars', - ]; - if (' (OID: )' === $field['table']) { - $field['table'] = null; - } - if ('-1 bytes' === $field['storage']) { - $field['storage'] = 'variable size'; - } elseif ('1 bytes' === $field['storage']) { - $field['storage'] = '1 byte'; - } - if ('1 chars' === $field['display']) { - $field['display'] = '1 char'; - } - $a['fields'][] = new EnumStub($field); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php deleted file mode 100644 index e712019..0000000 --- a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas - * - * @final - */ -class ProxyManagerCaster -{ - public static function castProxy(ProxyInterface $c, array $a, Stub $stub, bool $isNested) - { - if ($parent = get_parent_class($c)) { - $stub->class .= ' - '.$parent; - } - $stub->class .= '@proxy'; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php b/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php deleted file mode 100644 index db4bba8..0000000 --- a/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use RdKafka\Conf; -use RdKafka\Exception as RdKafkaException; -use RdKafka\KafkaConsumer; -use RdKafka\Message; -use RdKafka\Metadata\Broker as BrokerMetadata; -use RdKafka\Metadata\Collection as CollectionMetadata; -use RdKafka\Metadata\Partition as PartitionMetadata; -use RdKafka\Metadata\Topic as TopicMetadata; -use RdKafka\Topic; -use RdKafka\TopicConf; -use RdKafka\TopicPartition; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts RdKafka related classes to array representation. - * - * @author Romain Neutron - */ -class RdKafkaCaster -{ - public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - try { - $assignment = $c->getAssignment(); - } catch (RdKafkaException $e) { - $assignment = []; - } - - $a += [ - $prefix.'subscription' => $c->getSubscription(), - $prefix.'assignment' => $assignment, - ]; - - $a += self::extractMetadata($c); - - return $a; - } - - public static function castTopic(Topic $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'name' => $c->getName(), - ]; - - return $a; - } - - public static function castTopicPartition(TopicPartition $c, array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'offset' => $c->getOffset(), - $prefix.'partition' => $c->getPartition(), - $prefix.'topic' => $c->getTopic(), - ]; - - return $a; - } - - public static function castMessage(Message $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'errstr' => $c->errstr(), - ]; - - return $a; - } - - public static function castConf(Conf $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($c->dump() as $key => $value) { - $a[$prefix.$key] = $value; - } - - return $a; - } - - public static function castTopicConf(TopicConf $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($c->dump() as $key => $value) { - $a[$prefix.$key] = $value; - } - - return $a; - } - - public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'out_q_len' => $c->getOutQLen(), - ]; - - $a += self::extractMetadata($c); - - return $a; - } - - public static function castCollectionMetadata(CollectionMetadata $c, array $a, Stub $stub, bool $isNested) - { - $a += iterator_to_array($c); - - return $a; - } - - public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'name' => $c->getTopic(), - $prefix.'partitions' => $c->getPartitions(), - ]; - - return $a; - } - - public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'id' => $c->getId(), - $prefix.'err' => $c->getErr(), - $prefix.'leader' => $c->getLeader(), - ]; - - return $a; - } - - public static function castBrokerMetadata(BrokerMetadata $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'id' => $c->getId(), - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - ]; - - return $a; - } - - private static function extractMetadata($c) - { - $prefix = Caster::PREFIX_VIRTUAL; - - try { - $m = $c->getMetadata(true, null, 500); - } catch (RdKafkaException $e) { - return []; - } - - return [ - $prefix.'orig_broker_id' => $m->getOrigBrokerId(), - $prefix.'orig_broker_name' => $m->getOrigBrokerName(), - $prefix.'brokers' => $m->getBrokers(), - $prefix.'topics' => $m->getTopics(), - ]; - } -} diff --git a/vendor/symfony/var-dumper/Caster/RedisCaster.php b/vendor/symfony/var-dumper/Caster/RedisCaster.php deleted file mode 100644 index 8f97eaa..0000000 --- a/vendor/symfony/var-dumper/Caster/RedisCaster.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Redis class from ext-redis to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class RedisCaster -{ - private const SERIALIZERS = [ - \Redis::SERIALIZER_NONE => 'NONE', - \Redis::SERIALIZER_PHP => 'PHP', - 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY - ]; - - private const MODES = [ - \Redis::ATOMIC => 'ATOMIC', - \Redis::MULTI => 'MULTI', - \Redis::PIPELINE => 'PIPELINE', - ]; - - private const COMPRESSION_MODES = [ - 0 => 'NONE', // Redis::COMPRESSION_NONE - 1 => 'LZF', // Redis::COMPRESSION_LZF - ]; - - private const FAILOVER_OPTIONS = [ - \RedisCluster::FAILOVER_NONE => 'NONE', - \RedisCluster::FAILOVER_ERROR => 'ERROR', - \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', - \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', - ]; - - public static function castRedis(\Redis $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if (!$connected = $c->isConnected()) { - return $a + [ - $prefix.'isConnected' => $connected, - ]; - } - - $mode = $c->getMode(); - - return $a + [ - $prefix.'isConnected' => $connected, - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - $prefix.'auth' => $c->getAuth(), - $prefix.'mode' => isset(self::MODES[$mode]) ? new ConstStub(self::MODES[$mode], $mode) : $mode, - $prefix.'dbNum' => $c->getDbNum(), - $prefix.'timeout' => $c->getTimeout(), - $prefix.'lastError' => $c->getLastError(), - $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - return $a + [ - $prefix.'hosts' => $c->_hosts(), - $prefix.'function' => ClassStub::wrapCallable($c->_function()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); - - $a += [ - $prefix.'_masters' => $c->_masters(), - $prefix.'_redir' => $c->_redir(), - $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c, [ - 'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover, - ]), - ]; - - return $a; - } - - /** - * @param \Redis|\RedisArray|\RedisCluster $redis - */ - private static function getRedisOptions($redis, array $options = []): EnumStub - { - $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); - if (\is_array($serializer)) { - foreach ($serializer as &$v) { - if (isset(self::SERIALIZERS[$v])) { - $v = new ConstStub(self::SERIALIZERS[$v], $v); - } - } - } elseif (isset(self::SERIALIZERS[$serializer])) { - $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer); - } - - $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; - if (\is_array($compression)) { - foreach ($compression as &$v) { - if (isset(self::COMPRESSION_MODES[$v])) { - $v = new ConstStub(self::COMPRESSION_MODES[$v], $v); - } - } - } elseif (isset(self::COMPRESSION_MODES[$compression])) { - $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression); - } - - $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; - if (\is_array($retry)) { - foreach ($retry as &$v) { - $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); - } - } else { - $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); - } - - $options += [ - 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, - 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), - 'COMPRESSION' => $compression, - 'SERIALIZER' => $serializer, - 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), - 'SCAN' => $retry, - ]; - - return new EnumStub($options); - } -} diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php deleted file mode 100644 index 274ee0d..0000000 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ /dev/null @@ -1,442 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Reflector related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ReflectionCaster -{ - public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; - - private const EXTRA_MAP = [ - 'docComment' => 'getDocComment', - 'extension' => 'getExtensionName', - 'isDisabled' => 'isDisabled', - 'isDeprecated' => 'isDeprecated', - 'isInternal' => 'isInternal', - 'isUserDefined' => 'isUserDefined', - 'isGenerator' => 'isGenerator', - 'isVariadic' => 'isVariadic', - ]; - - public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - $c = new \ReflectionFunction($c); - - $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - - if (!str_contains($c->name, '{closure}')) { - $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; - unset($a[$prefix.'class']); - } - unset($a[$prefix.'extra']); - - $stub->class .= self::getSignature($a); - - if ($f = $c->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $c->getStartLine(); - } - - unset($a[$prefix.'parameters']); - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); - - return []; - } - - if ($f) { - $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); - $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - return $a; - } - - public static function unsetClosureFileInfo(\Closure $c, array $a) - { - unset($a[Caster::PREFIX_VIRTUAL.'file'], $a[Caster::PREFIX_VIRTUAL.'line']); - - return $a; - } - - public static function castGenerator(\Generator $c, array $a, Stub $stub, bool $isNested) - { - // Cannot create ReflectionGenerator based on a terminated Generator - try { - $reflectionGenerator = new \ReflectionGenerator($c); - } catch (\Exception $e) { - $a[Caster::PREFIX_VIRTUAL.'closed'] = true; - - return $a; - } - - return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); - } - - public static function castType(\ReflectionType $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c instanceof \ReflectionNamedType || \PHP_VERSION_ID < 80000) { - $a += [ - $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, - $prefix.'allowsNull' => $c->allowsNull(), - $prefix.'isBuiltin' => $c->isBuiltin(), - ]; - } elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - self::addMap($a, $c, [ - 'types' => 'getTypes', - ]); - } else { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - } - - return $a; - } - - public static function castAttribute(\ReflectionAttribute $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'name' => 'getName', - 'arguments' => 'getArguments', - ]); - - return $a; - } - - public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c->getThis()) { - $a[$prefix.'this'] = new CutStub($c->getThis()); - } - $function = $c->getFunction(); - $frame = [ - 'class' => $function->class ?? null, - 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, - 'function' => $function->name, - 'file' => $c->getExecutingFile(), - 'line' => $c->getExecutingLine(), - ]; - if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { - $function = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, [ - 'function' => 'yield', - 'file' => $function->getExecutingFile(), - 'line' => $function->getExecutingLine() - (int) (\PHP_VERSION_ID < 80100), - ]); - $trace[] = $frame; - $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); - } else { - $function = new FrameStub($frame, false, true); - $function = ExceptionCaster::castFrameStub($function, [], $function, true); - $a[$prefix.'executing'] = $function[$prefix.'src']; - } - - $a[Caster::PREFIX_VIRTUAL.'closed'] = false; - - return $a; - } - - public static function castClass(\ReflectionClass $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($n = \Reflection::getModifierNames($c->getModifiers())) { - $a[$prefix.'modifiers'] = implode(' ', $n); - } - - self::addMap($a, $c, [ - 'extends' => 'getParentClass', - 'implements' => 'getInterfaceNames', - 'constants' => 'getReflectionConstants', - ]); - - foreach ($c->getProperties() as $n) { - $a[$prefix.'properties'][$n->name] = $n; - } - - foreach ($c->getMethods() as $n) { - $a[$prefix.'methods'][$n->name] = $n; - } - - self::addAttributes($a, $c, $prefix); - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, bool $isNested, int $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'returnsReference' => 'returnsReference', - 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', - 'this' => 'getClosureThis', - ]); - - if (isset($a[$prefix.'returnType'])) { - $v = $a[$prefix.'returnType']; - $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } - if (isset($a[$prefix.'class'])) { - $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); - } - if (isset($a[$prefix.'this'])) { - $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); - } - - foreach ($c->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isVariadic()) { - $k = '...'.$k; - } - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - $a[$prefix.'parameters'][$k] = $v; - } - if (isset($a[$prefix.'parameters'])) { - $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); - } - - self::addAttributes($a, $c, $prefix); - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) { - foreach ($v as $k => &$v) { - if (\is_object($v)) { - $a[$prefix.'use']['$'.$k] = new CutStub($v); - } else { - $a[$prefix.'use']['$'.$k] = &$v; - } - } - unset($v); - $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castClassConstant(\ReflectionClassConstant $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - $a[Caster::PREFIX_VIRTUAL.'value'] = $c->getValue(); - - self::addAttributes($a, $c); - - return $a; - } - - public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - return $a; - } - - public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'position' => 'getPosition', - 'isVariadic' => 'isVariadic', - 'byReference' => 'isPassedByReference', - 'allowsNull' => 'allowsNull', - ]); - - self::addAttributes($a, $c, $prefix); - - if ($v = $c->getType()) { - $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - } - - if (isset($a[$prefix.'typeHint'])) { - $v = $a[$prefix.'typeHint']; - $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } else { - unset($a[$prefix.'allowsNull']); - } - - if ($c->isOptional()) { - try { - $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if ($c->isDefaultValueConstant()) { - $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); - } - if (null === $v) { - unset($a[$prefix.'allowsNull']); - } - } catch (\ReflectionException $e) { - } - } - - return $a; - } - - public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - self::addAttributes($a, $c); - self::addExtra($a, $c); - - return $a; - } - - public static function castReference(\ReflectionReference $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'id'] = $c->getId(); - - return $a; - } - - public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'dependencies' => 'getDependencies', - 'iniEntries' => 'getIniEntries', - 'isPersistent' => 'isPersistent', - 'isTemporary' => 'isTemporary', - 'constants' => 'getConstants', - 'functions' => 'getFunctions', - 'classes' => 'getClasses', - ]); - - return $a; - } - - public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, bool $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'author' => 'getAuthor', - 'copyright' => 'getCopyright', - 'url' => 'getURL', - ]); - - return $a; - } - - public static function getSignature(array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - $signature = ''; - - if (isset($a[$prefix.'parameters'])) { - foreach ($a[$prefix.'parameters']->value as $k => $param) { - $signature .= ', '; - if ($type = $param->getType()) { - if (!$type instanceof \ReflectionNamedType) { - $signature .= $type.' '; - } else { - if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { - $signature .= '?'; - } - $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; - } - } - $signature .= $k; - - if (!$param->isDefaultValueAvailable()) { - continue; - } - $v = $param->getDefaultValue(); - $signature .= ' = '; - - if ($param->isDefaultValueConstant()) { - $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); - } elseif (null === $v) { - $signature .= 'null'; - } elseif (\is_array($v)) { - $signature .= $v ? '[…'.\count($v).']' : '[]'; - } elseif (\is_string($v)) { - $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; - } elseif (\is_bool($v)) { - $signature .= $v ? 'true' : 'false'; - } elseif (\is_object($v)) { - $signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1); - } else { - $signature .= $v; - } - } - } - $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; - - if (isset($a[$prefix.'returnType'])) { - $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); - } - - return $signature; - } - - private static function addExtra(array &$a, \Reflector $c) - { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; - - if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { - $x['file'] = new LinkStub($m, $c->getStartLine()); - $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - self::addMap($x, $c, self::EXTRA_MAP, ''); - - if ($x) { - $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); - } - } - - private static function addMap(array &$a, object $c, array $map, string $prefix = Caster::PREFIX_VIRTUAL) - { - foreach ($map as $k => $m) { - if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) { - continue; - } - - if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { - $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; - } - } - } - - private static function addAttributes(array &$a, \Reflector $c, string $prefix = Caster::PREFIX_VIRTUAL): void - { - if (\PHP_VERSION_ID >= 80000) { - foreach ($c->getAttributes() as $n) { - $a[$prefix.'attributes'][] = $n; - } - } - } -} diff --git a/vendor/symfony/var-dumper/Caster/ResourceCaster.php b/vendor/symfony/var-dumper/Caster/ResourceCaster.php deleted file mode 100644 index 2c34ca9..0000000 --- a/vendor/symfony/var-dumper/Caster/ResourceCaster.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts common resource types to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class ResourceCaster -{ - /** - * @param \CurlHandle|resource $h - */ - public static function castCurl($h, array $a, Stub $stub, bool $isNested): array - { - return curl_getinfo($h); - } - - public static function castDba($dba, array $a, Stub $stub, bool $isNested) - { - $list = dba_list(); - $a['file'] = $list[(int) $dba]; - - return $a; - } - - public static function castProcess($process, array $a, Stub $stub, bool $isNested) - { - return proc_get_status($process); - } - - public static function castStream($stream, array $a, Stub $stub, bool $isNested) - { - $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); - if ($a['uri'] ?? false) { - $a['uri'] = new LinkStub($a['uri']); - } - - return $a; - } - - public static function castStreamContext($stream, array $a, Stub $stub, bool $isNested) - { - return @stream_context_get_params($stream) ?: $a; - } - - public static function castGd($gd, array $a, Stub $stub, bool $isNested) - { - $a['size'] = imagesx($gd).'x'.imagesy($gd); - $a['trueColor'] = imageistruecolor($gd); - - return $a; - } - - public static function castMysqlLink($h, array $a, Stub $stub, bool $isNested) - { - $a['host'] = mysql_get_host_info($h); - $a['protocol'] = mysql_get_proto_info($h); - $a['server'] = mysql_get_server_info($h); - - return $a; - } - - public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested) - { - $stub->cut = -1; - $info = openssl_x509_parse($h, false); - - $pin = openssl_pkey_get_public($h); - $pin = openssl_pkey_get_details($pin)['key']; - $pin = \array_slice(explode("\n", $pin), 1, -2); - $pin = base64_decode(implode('', $pin)); - $pin = base64_encode(hash('sha256', $pin, true)); - - $a += [ - 'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])), - 'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])), - 'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), - 'fingerprint' => new EnumStub([ - 'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)), - 'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)), - 'sha256' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha256')), 2, ':', true)), - 'pin-sha256' => new ConstStub($pin), - ]), - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/SplCaster.php b/vendor/symfony/var-dumper/Caster/SplCaster.php deleted file mode 100644 index 07f4451..0000000 --- a/vendor/symfony/var-dumper/Caster/SplCaster.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts SPL related classes to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class SplCaster -{ - private const SPL_FILE_OBJECT_FLAGS = [ - \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', - \SplFileObject::READ_AHEAD => 'READ_AHEAD', - \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', - \SplFileObject::READ_CSV => 'READ_CSV', - ]; - - public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, bool $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, bool $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castHeap(\Iterator $c, array $a, Stub $stub, bool $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ]; - - return $a; - } - - public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, bool $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $mode = $c->getIteratorMode(); - $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - - $a += [ - $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), - $prefix.'dllist' => iterator_to_array($c), - ]; - $c->setIteratorMode($mode); - - return $a; - } - - public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, bool $isNested) - { - static $map = [ - 'path' => 'getPath', - 'filename' => 'getFilename', - 'basename' => 'getBasename', - 'pathname' => 'getPathname', - 'extension' => 'getExtension', - 'realPath' => 'getRealPath', - 'aTime' => 'getATime', - 'mTime' => 'getMTime', - 'cTime' => 'getCTime', - 'inode' => 'getInode', - 'size' => 'getSize', - 'perms' => 'getPerms', - 'owner' => 'getOwner', - 'group' => 'getGroup', - 'type' => 'getType', - 'writable' => 'isWritable', - 'readable' => 'isReadable', - 'executable' => 'isExecutable', - 'file' => 'isFile', - 'dir' => 'isDir', - 'link' => 'isLink', - 'linkTarget' => 'getLinkTarget', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - unset($a["\0SplFileInfo\0fileName"]); - unset($a["\0SplFileInfo\0pathName"]); - - if (\PHP_VERSION_ID < 80000) { - if (false === $c->getPathname()) { - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } else { - try { - $c->isReadable(); - } catch (\RuntimeException $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } catch (\Error $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if ($a[$prefix.'realPath'] ?? false) { - $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); - } - - if (isset($a[$prefix.'perms'])) { - $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); - } - - static $mapDate = ['aTime', 'mTime', 'cTime']; - foreach ($mapDate as $key) { - if (isset($a[$prefix.$key])) { - $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); - } - } - - return $a; - } - - public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, bool $isNested) - { - static $map = [ - 'csvControl' => 'getCsvControl', - 'flags' => 'getFlags', - 'maxLineLen' => 'getMaxLineLen', - 'fstat' => 'fstat', - 'eof' => 'eof', - 'key' => 'key', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if (isset($a[$prefix.'flags'])) { - $flagsArray = []; - foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { - if ($a[$prefix.'flags'] & $value) { - $flagsArray[] = $name; - } - } - $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); - } - - if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); - } - - return $a; - } - - public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, bool $isNested) - { - $storage = []; - unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 - unset($a["\0SplObjectStorage\0storage"]); - - $clone = clone $c; - foreach ($clone as $obj) { - $storage[] = [ - 'object' => $obj, - 'info' => $clone->getInfo(), - ]; - } - - $a += [ - Caster::PREFIX_VIRTUAL.'storage' => $storage, - ]; - - return $a; - } - - public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); - - return $a; - } - - public static function castWeakReference(\WeakReference $c, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'object'] = $c->get(); - - return $a; - } - - private static function castSplArray($c, array $a, Stub $stub, bool $isNested): array - { - $prefix = Caster::PREFIX_VIRTUAL; - $flags = $c->getFlags(); - - if (!($flags & \ArrayObject::STD_PROP_LIST)) { - $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); - $c->setFlags($flags); - } - if (\PHP_VERSION_ID < 70400) { - $a[$prefix.'storage'] = $c->getArrayCopy(); - } - $a += [ - $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), - $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - ]; - if ($c instanceof \ArrayObject) { - $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/StubCaster.php b/vendor/symfony/var-dumper/Caster/StubCaster.php deleted file mode 100644 index 32ead7c..0000000 --- a/vendor/symfony/var-dumper/Caster/StubCaster.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts a caster's Stub. - * - * @author Nicolas Grekas - * - * @final - */ -class StubCaster -{ - public static function castStub(Stub $c, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->type = $c->type; - $stub->class = $c->class; - $stub->value = $c->value; - $stub->handle = $c->handle; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - } - - $a = []; - } - - return $a; - } - - public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, bool $isNested) - { - return $isNested ? $c->preservedSubset : $a; - } - - public static function cutInternals($obj, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->cut += \count($a); - - return []; - } - - return $a; - } - - public static function castEnum(EnumStub $c, array $a, Stub $stub, bool $isNested) - { - if ($isNested) { - $stub->class = $c->dumpKeys ? '' : null; - $stub->handle = 0; - $stub->value = null; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - $a = []; - - if ($c->value) { - foreach (array_keys($c->value) as $k) { - $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; - } - // Preserve references with array_combine() - $a = array_combine($keys, $c->value); - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/SymfonyCaster.php b/vendor/symfony/var-dumper/Caster/SymfonyCaster.php deleted file mode 100644 index 08428b9..0000000 --- a/vendor/symfony/var-dumper/Caster/SymfonyCaster.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Uid\Ulid; -use Symfony\Component\Uid\Uuid; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @final - */ -class SymfonyCaster -{ - private const REQUEST_GETTERS = [ - 'pathInfo' => 'getPathInfo', - 'requestUri' => 'getRequestUri', - 'baseUrl' => 'getBaseUrl', - 'basePath' => 'getBasePath', - 'method' => 'getMethod', - 'format' => 'getRequestFormat', - ]; - - public static function castRequest(Request $request, array $a, Stub $stub, bool $isNested) - { - $clone = null; - - foreach (self::REQUEST_GETTERS as $prop => $getter) { - $key = Caster::PREFIX_PROTECTED.$prop; - if (\array_key_exists($key, $a) && null === $a[$key]) { - if (null === $clone) { - $clone = clone $request; - } - $a[Caster::PREFIX_VIRTUAL.$prop] = $clone->{$getter}(); - } - } - - return $a; - } - - public static function castHttpClient($client, array $a, Stub $stub, bool $isNested) - { - $multiKey = sprintf("\0%s\0multi", \get_class($client)); - if (isset($a[$multiKey])) { - $a[$multiKey] = new CutStub($a[$multiKey]); - } - - return $a; - } - - public static function castHttpClientResponse($response, array $a, Stub $stub, bool $isNested) - { - $stub->cut += \count($a); - $a = []; - - foreach ($response->getInfo() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $uuid->toBase58(); - $a[Caster::PREFIX_VIRTUAL.'toBase32'] = $uuid->toBase32(); - - // symfony/uid >= 5.3 - if (method_exists($uuid, 'getDateTime')) { - $a[Caster::PREFIX_VIRTUAL.'time'] = $uuid->getDateTime()->format('Y-m-d H:i:s.u \U\T\C'); - } - - return $a; - } - - public static function castUlid(Ulid $ulid, array $a, Stub $stub, bool $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $ulid->toBase58(); - $a[Caster::PREFIX_VIRTUAL.'toRfc4122'] = $ulid->toRfc4122(); - - // symfony/uid >= 5.3 - if (method_exists($ulid, 'getDateTime')) { - $a[Caster::PREFIX_VIRTUAL.'time'] = $ulid->getDateTime()->format('Y-m-d H:i:s.v \U\T\C'); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/TraceStub.php b/vendor/symfony/var-dumper/Caster/TraceStub.php deleted file mode 100644 index 5eea1c8..0000000 --- a/vendor/symfony/var-dumper/Caster/TraceStub.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas - */ -class TraceStub extends Stub -{ - public $keepArgs; - public $sliceOffset; - public $sliceLength; - public $numberingOffset; - - public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) - { - $this->value = $trace; - $this->keepArgs = $keepArgs; - $this->sliceOffset = $sliceOffset; - $this->sliceLength = $sliceLength; - $this->numberingOffset = $numberingOffset; - } -} diff --git a/vendor/symfony/var-dumper/Caster/UuidCaster.php b/vendor/symfony/var-dumper/Caster/UuidCaster.php deleted file mode 100644 index b102774..0000000 --- a/vendor/symfony/var-dumper/Caster/UuidCaster.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ramsey\Uuid\UuidInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau - */ -final class UuidCaster -{ - public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array - { - $a += [ - Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php b/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php deleted file mode 100644 index 721513c..0000000 --- a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XmlReader class to array representation. - * - * @author Baptiste Clavié - * - * @final - */ -class XmlReaderCaster -{ - private const NODE_TYPES = [ - \XMLReader::NONE => 'NONE', - \XMLReader::ELEMENT => 'ELEMENT', - \XMLReader::ATTRIBUTE => 'ATTRIBUTE', - \XMLReader::TEXT => 'TEXT', - \XMLReader::CDATA => 'CDATA', - \XMLReader::ENTITY_REF => 'ENTITY_REF', - \XMLReader::ENTITY => 'ENTITY', - \XMLReader::PI => 'PI (Processing Instruction)', - \XMLReader::COMMENT => 'COMMENT', - \XMLReader::DOC => 'DOC', - \XMLReader::DOC_TYPE => 'DOC_TYPE', - \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', - \XMLReader::NOTATION => 'NOTATION', - \XMLReader::WHITESPACE => 'WHITESPACE', - \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', - \XMLReader::END_ELEMENT => 'END_ELEMENT', - \XMLReader::END_ENTITY => 'END_ENTITY', - \XMLReader::XML_DECLARATION => 'XML_DECLARATION', - ]; - - public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, bool $isNested) - { - try { - $properties = [ - 'LOADDTD' => @$reader->getParserProperty(\XMLReader::LOADDTD), - 'DEFAULTATTRS' => @$reader->getParserProperty(\XMLReader::DEFAULTATTRS), - 'VALIDATE' => @$reader->getParserProperty(\XMLReader::VALIDATE), - 'SUBST_ENTITIES' => @$reader->getParserProperty(\XMLReader::SUBST_ENTITIES), - ]; - } catch (\Error $e) { - $properties = [ - 'LOADDTD' => false, - 'DEFAULTATTRS' => false, - 'VALIDATE' => false, - 'SUBST_ENTITIES' => false, - ]; - } - - $props = Caster::PREFIX_VIRTUAL.'parserProperties'; - $info = [ - 'localName' => $reader->localName, - 'prefix' => $reader->prefix, - 'nodeType' => new ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), - 'depth' => $reader->depth, - 'isDefault' => $reader->isDefault, - 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, - 'xmlLang' => $reader->xmlLang, - 'attributeCount' => $reader->attributeCount, - 'value' => $reader->value, - 'namespaceURI' => $reader->namespaceURI, - 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, - $props => $properties, - ]; - - if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { - $info[$props] = new EnumStub($info[$props]); - $info[$props]->cut = $count; - } - - $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); - // +2 because hasValue and hasAttributes are always filtered - $stub->cut += $count + 2; - - return $a + $info; - } -} diff --git a/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php b/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php deleted file mode 100644 index ba55fce..0000000 --- a/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XML resources to array representation. - * - * @author Nicolas Grekas - * - * @final - */ -class XmlResourceCaster -{ - private const XML_ERRORS = [ - \XML_ERROR_NONE => 'XML_ERROR_NONE', - \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', - \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', - \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', - \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', - \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', - \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', - \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', - \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', - \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', - \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', - \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', - \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', - \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', - \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', - \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', - \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', - \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', - \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', - \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', - \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', - \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', - ]; - - public static function castXml($h, array $a, Stub $stub, bool $isNested) - { - $a['current_byte_index'] = xml_get_current_byte_index($h); - $a['current_column_number'] = xml_get_current_column_number($h); - $a['current_line_number'] = xml_get_current_line_number($h); - $a['error_code'] = xml_get_error_code($h); - - if (isset(self::XML_ERRORS[$a['error_code']])) { - $a['error_code'] = new ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php deleted file mode 100644 index f74a61d..0000000 --- a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ /dev/null @@ -1,400 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * AbstractCloner implements a generic caster mechanism for objects and resources. - * - * @author Nicolas Grekas - */ -abstract class AbstractCloner implements ClonerInterface -{ - public static $defaultCasters = [ - '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], - - 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], - 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], - - 'Fiber' => ['Symfony\Component\VarDumper\Caster\FiberCaster', 'castFiber'], - - 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], - 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], - 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], - 'ReflectionAttribute' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castAttribute'], - 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], - 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], - 'ReflectionClassConstant' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClassConstant'], - 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], - 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], - 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], - 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], - 'ReflectionReference' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReference'], - 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], - 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], - - 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], - 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], - 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], - 'Doctrine\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], - 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], - 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], - 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], - 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], - 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], - 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], - 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], - 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], - 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], - 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], - 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], - 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], - 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], - 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], - 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], - 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], - - 'XMLReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], - - 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], - 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], - 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], - 'Symfony\Bridge\Monolog\Logger' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\EventDispatcher\EventDispatcherInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\HttpClient\AmpHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\CurlHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\NativeHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\Response\AmpResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\CurlResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\NativeResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], - 'Symfony\Component\Uid\Ulid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUlid'], - 'Symfony\Component\Uid\Uuid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUuid'], - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], - 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], - 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], - 'Symfony\Component\VarDumper\Cloner\AbstractCloner' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\ErrorHandler\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], - - 'Imagine\Image\ImageInterface' => ['Symfony\Component\VarDumper\Caster\ImagineCaster', 'castImage'], - - 'Ramsey\Uuid\UuidInterface' => ['Symfony\Component\VarDumper\Caster\UuidCaster', 'castRamseyUuid'], - - 'ProxyManager\Proxy\ProxyInterface' => ['Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'], - 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\Stub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], - 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], - - 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], - 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], - 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], - 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], - 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], - - 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], - 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], - 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], - 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], - 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], - 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], - 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], - 'WeakReference' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castWeakReference'], - - 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], - 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], - 'RedisCluster' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'], - - 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], - 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], - 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], - 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], - - 'GMP' => ['Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'], - - 'MessageFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'], - 'NumberFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'], - 'IntlTimeZone' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'], - 'IntlCalendar' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'], - 'IntlDateFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'], - - 'Memcached' => ['Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'], - - 'Ds\Collection' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castCollection'], - 'Ds\Map' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castMap'], - 'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'], - 'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'], - - 'mysqli_driver' => ['Symfony\Component\VarDumper\Caster\MysqliCaster', 'castMysqliDriver'], - - 'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - ':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - - ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - - 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - - ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], - ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], - ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], - ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], - ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - - 'OpenSSLCertificate' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - ':OpenSSL X.509' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - - ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], - - 'XmlParser' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - - 'RdKafka' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castRdKafka'], - 'RdKafka\Conf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castConf'], - 'RdKafka\KafkaConsumer' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castKafkaConsumer'], - 'RdKafka\Metadata\Broker' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castBrokerMetadata'], - 'RdKafka\Metadata\Collection' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castCollectionMetadata'], - 'RdKafka\Metadata\Partition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castPartitionMetadata'], - 'RdKafka\Metadata\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicMetadata'], - 'RdKafka\Message' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castMessage'], - 'RdKafka\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopic'], - 'RdKafka\TopicPartition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicPartition'], - 'RdKafka\TopicConf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicConf'], - ]; - - protected $maxItems = 2500; - protected $maxString = -1; - protected $minDepth = 1; - - /** - * @var array> - */ - private $casters = []; - - /** - * @var callable|null - */ - private $prevErrorHandler; - - private $classInfo = []; - private $filter = 0; - - /** - * @param callable[]|null $casters A map of casters - * - * @see addCasters - */ - public function __construct(array $casters = null) - { - if (null === $casters) { - $casters = static::$defaultCasters; - } - $this->addCasters($casters); - } - - /** - * Adds casters for resources and objects. - * - * Maps resources or objects types to a callback. - * Types are in the key, with a callable caster for value. - * Resource types are to be prefixed with a `:`, - * see e.g. static::$defaultCasters. - * - * @param callable[] $casters A map of casters - */ - public function addCasters(array $casters) - { - foreach ($casters as $type => $callback) { - $this->casters[$type][] = $callback; - } - } - - /** - * Sets the maximum number of items to clone past the minimum depth in nested structures. - */ - public function setMaxItems(int $maxItems) - { - $this->maxItems = $maxItems; - } - - /** - * Sets the maximum cloned length for strings. - */ - public function setMaxString(int $maxString) - { - $this->maxString = $maxString; - } - - /** - * Sets the minimum tree depth where we are guaranteed to clone all the items. After this - * depth is reached, only setMaxItems items will be cloned. - */ - public function setMinDepth(int $minDepth) - { - $this->minDepth = $minDepth; - } - - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * @param int $filter A bit field of Caster::EXCLUDE_* constants - * - * @return Data - */ - public function cloneVar($var, int $filter = 0) - { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { - if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { - // Cloner never dies - throw new \ErrorException($msg, 0, $type, $file, $line); - } - - if ($this->prevErrorHandler) { - return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); - } - - return false; - }); - $this->filter = $filter; - - if ($gc = gc_enabled()) { - gc_disable(); - } - try { - return new Data($this->doClone($var)); - } finally { - if ($gc) { - gc_enable(); - } - restore_error_handler(); - $this->prevErrorHandler = null; - } - } - - /** - * Effectively clones the PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return array - */ - abstract protected function doClone($var); - - /** - * Casts an object to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array - */ - protected function castObject(Stub $stub, bool $isNested) - { - $obj = $stub->value; - $class = $stub->class; - - if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : str_contains($class, "@anonymous\0")) { - $stub->class = get_debug_type($obj); - } - if (isset($this->classInfo[$class])) { - [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; - } else { - $i = 2; - $parents = [$class]; - $hasDebugInfo = method_exists($class, '__debugInfo'); - - foreach (class_parents($class) as $p) { - $parents[] = $p; - ++$i; - } - foreach (class_implements($class) as $p) { - $parents[] = $p; - ++$i; - } - $parents[] = '*'; - - $r = new \ReflectionClass($class); - $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [ - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; - } - - $stub->attr += $fileInfo; - $a = Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); - - try { - while ($i--) { - if (!empty($this->casters[$p = $parents[$i]])) { - foreach ($this->casters[$p] as $callback) { - $a = $callback($obj, $a, $stub, $isNested, $this->filter); - } - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } - - /** - * Casts a resource to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array - */ - protected function castResource(Stub $stub, bool $isNested) - { - $a = []; - $res = $stub->value; - $type = $stub->class; - - try { - if (!empty($this->casters[':'.$type])) { - foreach ($this->casters[':'.$type] as $callback) { - $a = $callback($res, $a, $stub, $isNested, $this->filter); - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/ClonerInterface.php b/vendor/symfony/var-dumper/Cloner/ClonerInterface.php deleted file mode 100644 index 90b1495..0000000 --- a/vendor/symfony/var-dumper/Cloner/ClonerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -interface ClonerInterface -{ - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return Data - */ - public function cloneVar($var); -} diff --git a/vendor/symfony/var-dumper/Cloner/Cursor.php b/vendor/symfony/var-dumper/Cloner/Cursor.php deleted file mode 100644 index 1fd796d..0000000 --- a/vendor/symfony/var-dumper/Cloner/Cursor.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the current state of a dumper while dumping. - * - * @author Nicolas Grekas - */ -class Cursor -{ - public const HASH_INDEXED = Stub::ARRAY_INDEXED; - public const HASH_ASSOC = Stub::ARRAY_ASSOC; - public const HASH_OBJECT = Stub::TYPE_OBJECT; - public const HASH_RESOURCE = Stub::TYPE_RESOURCE; - - public $depth = 0; - public $refIndex = 0; - public $softRefTo = 0; - public $softRefCount = 0; - public $softRefHandle = 0; - public $hardRefTo = 0; - public $hardRefCount = 0; - public $hardRefHandle = 0; - public $hashType; - public $hashKey; - public $hashKeyIsBinary; - public $hashIndex = 0; - public $hashLength = 0; - public $hashCut = 0; - public $stop = false; - public $attr = []; - public $skipChildren = false; -} diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php deleted file mode 100644 index ea8f0f3..0000000 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ /dev/null @@ -1,468 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; - -/** - * @author Nicolas Grekas - */ -class Data implements \ArrayAccess, \Countable, \IteratorAggregate -{ - private $data; - private $position = 0; - private $key = 0; - private $maxDepth = 20; - private $maxItemsPerDepth = -1; - private $useRefHandles = -1; - private $context = []; - - /** - * @param array $data An array as returned by ClonerInterface::cloneVar() - */ - public function __construct(array $data) - { - $this->data = $data; - } - - /** - * @return string|null - */ - public function getType() - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!$item instanceof Stub) { - return \gettype($item); - } - if (Stub::TYPE_STRING === $item->type) { - return 'string'; - } - if (Stub::TYPE_ARRAY === $item->type) { - return 'array'; - } - if (Stub::TYPE_OBJECT === $item->type) { - return $item->class; - } - if (Stub::TYPE_RESOURCE === $item->type) { - return $item->class.' resource'; - } - - return null; - } - - /** - * Returns a native representation of the original value. - * - * @param array|bool $recursive Whether values should be resolved recursively or not - * - * @return string|int|float|bool|array|Data[]|null - */ - public function getValue($recursive = false) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub) { - return $item; - } - if (Stub::TYPE_STRING === $item->type) { - return $item->value; - } - - $children = $item->position ? $this->data[$item->position] : []; - - foreach ($children as $k => $v) { - if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { - continue; - } - $children[$k] = clone $this; - $children[$k]->key = $k; - $children[$k]->position = $item->position; - - if ($recursive) { - if (Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof Stub) { - $recursive = (array) $recursive; - if (isset($recursive[$v->position])) { - continue; - } - $recursive[$v->position] = true; - } - $children[$k] = $children[$k]->getValue($recursive); - } - } - - return $children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getValue()); - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (!\is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value))); - } - - yield from $value; - } - - public function __get(string $key) - { - if (null !== $data = $this->seek($key)) { - $item = $this->getStub($data->data[$data->position][$data->key]); - - return $item instanceof Stub || [] === $item ? $data : $item; - } - - return null; - } - - /** - * @return bool - */ - public function __isset(string $key) - { - return null !== $this->seek($key); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->__isset($key); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->__get($key); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return string - */ - public function __toString() - { - $value = $this->getValue(); - - if (!\is_array($value)) { - return (string) $value; - } - - return sprintf('%s (count=%d)', $this->getType(), \count($value)); - } - - /** - * Returns a depth limited clone of $this. - * - * @return static - */ - public function withMaxDepth(int $maxDepth) - { - $data = clone $this; - $data->maxDepth = $maxDepth; - - return $data; - } - - /** - * Limits the number of elements per depth level. - * - * @return static - */ - public function withMaxItemsPerDepth(int $maxItemsPerDepth) - { - $data = clone $this; - $data->maxItemsPerDepth = $maxItemsPerDepth; - - return $data; - } - - /** - * Enables/disables objects' identifiers tracking. - * - * @param bool $useRefHandles False to hide global ref. handles - * - * @return static - */ - public function withRefHandles(bool $useRefHandles) - { - $data = clone $this; - $data->useRefHandles = $useRefHandles ? -1 : 0; - - return $data; - } - - /** - * @return static - */ - public function withContext(array $context) - { - $data = clone $this; - $data->context = $context; - - return $data; - } - - /** - * Seeks to a specific key in nested data structures. - * - * @param string|int $key The key to seek to - * - * @return static|null - */ - public function seek($key) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { - return null; - } - $keys = [$key]; - - switch ($item->type) { - case Stub::TYPE_OBJECT: - $keys[] = Caster::PREFIX_DYNAMIC.$key; - $keys[] = Caster::PREFIX_PROTECTED.$key; - $keys[] = Caster::PREFIX_VIRTUAL.$key; - $keys[] = "\0$item->class\0$key"; - // no break - case Stub::TYPE_ARRAY: - case Stub::TYPE_RESOURCE: - break; - default: - return null; - } - - $data = null; - $children = $this->data[$item->position]; - - foreach ($keys as $key) { - if (isset($children[$key]) || \array_key_exists($key, $children)) { - $data = clone $this; - $data->key = $key; - $data->position = $item->position; - break; - } - } - - return $data; - } - - /** - * Dumps data with a DumperInterface dumper. - */ - public function dump(DumperInterface $dumper) - { - $refs = [0]; - $cursor = new Cursor(); - - if ($cursor->attr = $this->context[SourceContextProvider::class] ?? []) { - $cursor->attr['if_links'] = true; - $cursor->hashType = -1; - $dumper->dumpScalar($cursor, 'default', '^'); - $cursor->attr = ['if_links' => true]; - $dumper->dumpScalar($cursor, 'default', ' '); - $cursor->hashType = 0; - } - - $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); - } - - /** - * Depth-first dumping of items. - * - * @param mixed $item A Stub object or the original value being dumped - */ - private function dumpItem(DumperInterface $dumper, Cursor $cursor, array &$refs, $item) - { - $cursor->refIndex = 0; - $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; - $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; - $firstSeen = true; - - if (!$item instanceof Stub) { - $cursor->attr = []; - $type = \gettype($item); - if ($item && 'array' === $type) { - $item = $this->getStub($item); - } - } elseif (Stub::TYPE_REF === $item->type) { - if ($item->handle) { - if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->hardRefTo = $refs[$r]; - $cursor->hardRefHandle = $this->useRefHandles & $item->handle; - $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; - } - $cursor->attr = $item->attr; - $type = $item->class ?: \gettype($item->value); - $item = $this->getStub($item->value); - } - if ($item instanceof Stub) { - if ($item->refCount) { - if (!isset($refs[$r = $item->handle])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->softRefTo = $refs[$r]; - } - $cursor->softRefHandle = $this->useRefHandles & $item->handle; - $cursor->softRefCount = $item->refCount; - $cursor->attr = $item->attr; - $cut = $item->cut; - - if ($item->position && $firstSeen) { - $children = $this->data[$item->position]; - - if ($cursor->stop) { - if ($cut >= 0) { - $cut += \count($children); - } - $children = []; - } - } else { - $children = []; - } - switch ($item->type) { - case Stub::TYPE_STRING: - $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); - break; - - case Stub::TYPE_ARRAY: - $item = clone $item; - $item->type = $item->class; - $item->class = $item->value; - // no break - case Stub::TYPE_OBJECT: - case Stub::TYPE_RESOURCE: - $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; - $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); - if ($withChildren) { - if ($cursor->skipChildren) { - $withChildren = false; - $cut = -1; - } else { - $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); - } - } elseif ($children && 0 <= $cut) { - $cut += \count($children); - } - $cursor->skipChildren = false; - $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); - break; - - default: - throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); - } - } elseif ('array' === $type) { - $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); - $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); - } elseif ('string' === $type) { - $dumper->dumpString($cursor, $item, false, 0); - } else { - $dumper->dumpScalar($cursor, $type, $item); - } - } - - /** - * Dumps children of hash structures. - * - * @return int The final number of removed items - */ - private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys): int - { - $cursor = clone $parentCursor; - ++$cursor->depth; - $cursor->hashType = $hashType; - $cursor->hashIndex = 0; - $cursor->hashLength = \count($children); - $cursor->hashCut = $hashCut; - foreach ($children as $key => $child) { - $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); - $cursor->hashKey = $dumpKeys ? $key : null; - $this->dumpItem($dumper, $cursor, $refs, $child); - if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { - $parentCursor->stop = true; - - return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; - } - } - - return $hashCut; - } - - private function getStub($item) - { - if (!$item || !\is_array($item)) { - return $item; - } - - $stub = new Stub(); - $stub->type = Stub::TYPE_ARRAY; - foreach ($item as $stub->class => $stub->position) { - } - if (isset($item[0])) { - $stub->cut = $item[0]; - } - $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); - - return $stub; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/DumperInterface.php b/vendor/symfony/var-dumper/Cloner/DumperInterface.php deleted file mode 100644 index 6d60b72..0000000 --- a/vendor/symfony/var-dumper/Cloner/DumperInterface.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * DumperInterface used by Data objects. - * - * @author Nicolas Grekas - */ -interface DumperInterface -{ - /** - * Dumps a scalar value. - * - * @param string $type The PHP type of the value being dumped - * @param string|int|float|bool $value The scalar value being dumped - */ - public function dumpScalar(Cursor $cursor, string $type, $value); - - /** - * Dumps a string. - * - * @param string $str The string being dumped - * @param bool $bin Whether $str is UTF-8 or binary encoded - * @param int $cut The number of characters $str has been cut by - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut); - - /** - * Dumps while entering an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild); - - /** - * Dumps while leaving an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut); -} diff --git a/vendor/symfony/var-dumper/Cloner/Stub.php b/vendor/symfony/var-dumper/Cloner/Stub.php deleted file mode 100644 index 073c56e..0000000 --- a/vendor/symfony/var-dumper/Cloner/Stub.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the main properties of a PHP variable. - * - * @author Nicolas Grekas - */ -class Stub -{ - public const TYPE_REF = 1; - public const TYPE_STRING = 2; - public const TYPE_ARRAY = 3; - public const TYPE_OBJECT = 4; - public const TYPE_RESOURCE = 5; - - public const STRING_BINARY = 1; - public const STRING_UTF8 = 2; - - public const ARRAY_ASSOC = 1; - public const ARRAY_INDEXED = 2; - - public $type = self::TYPE_REF; - public $class = ''; - public $value; - public $cut = 0; - public $handle = 0; - public $refCount = 0; - public $position = 0; - public $attr = []; - - private static $defaultProperties = []; - - /** - * @internal - */ - public function __sleep(): array - { - $properties = []; - - if (!isset(self::$defaultProperties[$c = static::class])) { - self::$defaultProperties[$c] = get_class_vars($c); - - foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { - unset(self::$defaultProperties[$c][$k]); - } - } - - foreach (self::$defaultProperties[$c] as $k => $v) { - if ($this->$k !== $v) { - $properties[] = $k; - } - } - - return $properties; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/VarCloner.php b/vendor/symfony/var-dumper/Cloner/VarCloner.php deleted file mode 100644 index 80c4a2f..0000000 --- a/vendor/symfony/var-dumper/Cloner/VarCloner.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas - */ -class VarCloner extends AbstractCloner -{ - private static $gid; - private static $arrayCache = []; - - /** - * {@inheritdoc} - */ - protected function doClone($var) - { - $len = 1; // Length of $queue - $pos = 0; // Number of cloned items past the minimum depth - $refsCounter = 0; // Hard references counter - $queue = [[$var]]; // This breadth-first queue is the return value - $hardRefs = []; // Map of original zval ids to stub objects - $objRefs = []; // Map of original object handles to their stub object counterpart - $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning - $resRefs = []; // Map of original resource handles to their stub object counterpart - $values = []; // Map of stub objects' ids to original values - $maxItems = $this->maxItems; - $maxString = $this->maxString; - $minDepth = $this->minDepth; - $currentDepth = 0; // Current tree depth - $currentDepthFinalIndex = 0; // Final $queue index for current tree depth - $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references - $a = null; // Array cast for nested structures - $stub = null; // Stub capturing the main properties of an original item value - // or null if the original value is used directly - - if (!$gid = self::$gid) { - $gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable - } - $arrayStub = new Stub(); - $arrayStub->type = Stub::TYPE_ARRAY; - $fromObjCast = false; - - for ($i = 0; $i < $len; ++$i) { - // Detect when we move on to the next tree depth - if ($i > $currentDepthFinalIndex) { - ++$currentDepth; - $currentDepthFinalIndex = $len - 1; - if ($currentDepth >= $minDepth) { - $minimumDepthReached = true; - } - } - - $refs = $vals = $queue[$i]; - foreach ($vals as $k => $v) { - // $v is the original value or a stub object in case of hard references - - if (\PHP_VERSION_ID >= 70400) { - $zvalRef = ($r = \ReflectionReference::fromArrayElement($vals, $k)) ? $r->getId() : null; - } else { - $refs[$k] = $cookie; - $zvalRef = $vals[$k] === $cookie; - } - - if ($zvalRef) { - $vals[$k] = &$stub; // Break hard references to make $queue completely - unset($stub); // independent from the original structure - if (\PHP_VERSION_ID >= 70400 ? null !== $vals[$k] = $hardRefs[$zvalRef] ?? null : $v instanceof Stub && isset($hardRefs[spl_object_id($v)])) { - if (\PHP_VERSION_ID >= 70400) { - $v = $vals[$k]; - } else { - $refs[$k] = $vals[$k] = $v; - } - if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { - ++$v->value->refCount; - } - ++$v->refCount; - continue; - } - $vals[$k] = new Stub(); - $vals[$k]->value = $v; - $vals[$k]->handle = ++$refsCounter; - - if (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef] = $vals[$k]; - } else { - $refs[$k] = $vals[$k]; - $h = spl_object_id($refs[$k]); - $hardRefs[$h] = &$refs[$k]; - $values[$h] = $v; - } - } - // Create $stub when the original value $v cannot be used directly - // If $v is a nested structure, put that structure in array $a - switch (true) { - case null === $v: - case \is_bool($v): - case \is_int($v): - case \is_float($v): - continue 2; - case \is_string($v): - if ('' === $v) { - continue 2; - } - if (!preg_match('//u', $v)) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - if (0 <= $maxString && 0 < $cut = \strlen($v) - $maxString) { - $stub->cut = $cut; - $stub->value = substr($v, 0, -$cut); - } else { - $stub->value = $v; - } - } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_UTF8; - $stub->cut = $cut; - $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); - } else { - continue 2; - } - $a = null; - break; - - case \is_array($v): - if (!$v) { - continue 2; - } - $stub = $arrayStub; - - if (\PHP_VERSION_ID >= 80100) { - $stub->class = array_is_list($v) ? Stub::ARRAY_INDEXED : Stub::ARRAY_ASSOC; - $a = $v; - break; - } - - $stub->class = Stub::ARRAY_INDEXED; - - $j = -1; - foreach ($v as $gk => $gv) { - if ($gk !== ++$j) { - $stub->class = Stub::ARRAY_ASSOC; - $a = $v; - $a[$gid] = true; - break; - } - } - - // Copies of $GLOBALS have very strange behavior, - // let's detect them with some black magic - if (isset($v[$gid])) { - unset($v[$gid]); - $a = []; - foreach ($v as $gk => &$gv) { - if ($v === $gv && (\PHP_VERSION_ID < 70400 || !isset($hardRefs[\ReflectionReference::fromArrayElement($v, $gk)->getId()]))) { - unset($v); - $v = new Stub(); - $v->value = [$v->cut = \count($gv), Stub::TYPE_ARRAY => 0]; - $v->handle = -1; - if (\PHP_VERSION_ID >= 70400) { - $gv = &$a[$gk]; - $hardRefs[\ReflectionReference::fromArrayElement($a, $gk)->getId()] = &$gv; - } else { - $gv = &$hardRefs[spl_object_id($v)]; - } - $gv = $v; - } - - $a[$gk] = &$gv; - } - unset($gv); - } else { - $a = $v; - } - break; - - case \is_object($v): - if (empty($objRefs[$h = spl_object_id($v)])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_OBJECT; - $stub->class = \get_class($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castObject($stub, 0 < $i); - if ($v !== $stub->value) { - if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { - break; - } - $stub->handle = $h = spl_object_id($stub->value); - } - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($objRefs[$h])) { - $objRefs[$h] = $stub; - $objects[] = $v; - } else { - $stub = $objRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - - default: // resource - if (empty($resRefs[$h = (int) $v])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_RESOURCE; - if ('Unknown' === $stub->class = @get_resource_type($v)) { - $stub->class = 'Closed'; - } - $stub->value = $v; - $stub->handle = $h; - $a = $this->castResource($stub, 0 < $i); - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($resRefs[$h])) { - $resRefs[$h] = $stub; - } else { - $stub = $resRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - } - - if ($a) { - if (!$minimumDepthReached || 0 > $maxItems) { - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($pos < $maxItems) { - if ($maxItems < $pos += \count($a)) { - $a = \array_slice($a, 0, $maxItems - $pos, true); - if ($stub->cut >= 0) { - $stub->cut += $pos - $maxItems; - } - } - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($stub->cut >= 0) { - $stub->cut += \count($a); - $stub->position = 0; - } - } - - if ($arrayStub === $stub) { - if ($arrayStub->cut) { - $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; - $arrayStub->cut = 0; - } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { - $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; - } else { - self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; - } - } - - if (!$zvalRef) { - $vals[$k] = $stub; - } elseif (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef]->value = $stub; - } else { - $refs[$k]->value = $stub; - } - } - - if ($fromObjCast) { - $fromObjCast = false; - $refs = $vals; - $vals = []; - $j = -1; - foreach ($queue[$i] as $k => $v) { - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $vals = (object) $vals; - $vals->{$k} = $refs[++$j]; - $vals = (array) $vals; - } else { - $vals[$k] = $refs[++$j]; - } - } - } - - $queue[$i] = $vals; - } - - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } - - return $queue; - } -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php deleted file mode 100644 index 2afaa7b..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * Describe collected data clones for cli output. - * - * @author Maxime Steinhausser - * - * @final - */ -class CliDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $lastIdentifier; - - public function __construct(CliDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - $io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - $this->dumper->setColors($output->isDecorated()); - - $rows = [['date', date('r', (int) $context['timestamp'])]]; - $lastIdentifier = $this->lastIdentifier; - $this->lastIdentifier = $clientId; - - $section = "Received from client #$clientId"; - if (isset($context['request'])) { - $request = $context['request']; - $this->lastIdentifier = $request['identifier']; - $section = sprintf('%s %s', $request['method'], $request['uri']); - if ($controller = $request['controller']) { - $rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")]; - } - } elseif (isset($context['cli'])) { - $this->lastIdentifier = $context['cli']['identifier']; - $section = '$ '.$context['cli']['command_line']; - } - - if ($this->lastIdentifier !== $lastIdentifier) { - $io->section($section); - } - - if (isset($context['source'])) { - $source = $context['source']; - $sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']); - if ($fileLink = $source['file_link'] ?? null) { - $sourceInfo = sprintf('%s', $fileLink, $sourceInfo); - } - $rows[] = ['source', $sourceInfo]; - $file = $source['file_relative'] ?? $source['file']; - $rows[] = ['file', $file]; - } - - $io->table([], $rows); - - $this->dumper->dump($data); - $io->newLine(); - } -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php deleted file mode 100644 index 267d27b..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Maxime Steinhausser - */ -interface DumpDescriptorInterface -{ - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php deleted file mode 100644 index 636b618..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -/** - * Describe collected data clones for html output. - * - * @author Maxime Steinhausser - * - * @final - */ -class HtmlDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $initialized = false; - - public function __construct(HtmlDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - if (!$this->initialized) { - $styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css'); - $scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js'); - $output->writeln(""); - $this->initialized = true; - } - - $title = '-'; - if (isset($context['request'])) { - $request = $context['request']; - $controller = "{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}"; - $title = sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); - $dedupIdentifier = $request['identifier']; - } elseif (isset($context['cli'])) { - $title = '$ '.$context['cli']['command_line']; - $dedupIdentifier = $context['cli']['identifier']; - } else { - $dedupIdentifier = uniqid('', true); - } - - $sourceDescription = ''; - if (isset($context['source'])) { - $source = $context['source']; - $projectDir = $source['project_dir'] ?? null; - $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); - if (isset($source['file_link'])) { - $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); - } - } - - $isoDate = $this->extractDate($context, 'c'); - $tags = array_filter([ - 'controller' => $controller ?? null, - 'project dir' => $projectDir ?? null, - ]); - - $output->writeln(<< -
    -
    -

    $title

    - -
    - {$this->renderTags($tags)} -
    -
    -

    - $sourceDescription -

    - {$this->dumper->dump($data, true)} -
    - -HTML - ); - } - - private function extractDate(array $context, string $format = 'r'): string - { - return date($format, (int) $context['timestamp']); - } - - private function renderTags(array $tags): string - { - if (!$tags) { - return ''; - } - - $renderedTags = ''; - foreach ($tags as $key => $value) { - $renderedTags .= sprintf('
  • %s%s
  • ', $key, $value); - } - - return << -
      - $renderedTags -
    - -HTML; - } -} diff --git a/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/vendor/symfony/var-dumper/Command/ServerDumpCommand.php deleted file mode 100644 index 3a69595..0000000 --- a/vendor/symfony/var-dumper/Command/ServerDumpCommand.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; -use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; -use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\DumpServer; - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - * - * @final - */ -class ServerDumpCommand extends Command -{ - protected static $defaultName = 'server:dump'; - protected static $defaultDescription = 'Start a dump server that collects and displays dumps in a single place'; - - private $server; - - /** @var DumpDescriptorInterface[] */ - private $descriptors; - - public function __construct(DumpServer $server, array $descriptors = []) - { - $this->server = $server; - $this->descriptors = $descriptors + [ - 'cli' => new CliDescriptor(new CliDumper()), - 'html' => new HtmlDescriptor(new HtmlDumper()), - ]; - - parent::__construct(); - } - - protected function configure() - { - $this - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli') - ->setDescription(self::$defaultDescription) - ->setHelp(<<<'EOF' -%command.name% starts a dump server that collects and displays -dumps in a single place for debugging you application: - - php %command.full_name% - -You can consult dumped data in HTML format in your browser by providing the --format=html option -and redirecting the output to a file: - - php %command.full_name% --format="html" > dump.html - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $format = $input->getOption('format'); - - if (!$descriptor = $this->descriptors[$format] ?? null) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); - } - - $errorIo = $io->getErrorStyle(); - $errorIo->title('Symfony Var Dumper Server'); - - $this->server->start(); - - $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); - $errorIo->comment('Quit the server with CONTROL-C.'); - - $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { - $descriptor->describe($io, $data, $context, $clientId); - }); - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues($this->getAvailableFormats()); - } - } - - private function getAvailableFormats(): array - { - return array_keys($this->descriptors); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php deleted file mode 100644 index 3a2884a..0000000 --- a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\DumperInterface; - -/** - * Abstract mechanism for dumping a Data object. - * - * @author Nicolas Grekas - */ -abstract class AbstractDumper implements DataDumperInterface, DumperInterface -{ - public const DUMP_LIGHT_ARRAY = 1; - public const DUMP_STRING_LENGTH = 2; - public const DUMP_COMMA_SEPARATOR = 4; - public const DUMP_TRAILING_COMMA = 8; - - public static $defaultOutput = 'php://output'; - - protected $line = ''; - protected $lineDumper; - protected $outputStream; - protected $decimalPoint; // This is locale dependent - protected $indentPad = ' '; - protected $flags; - - private $charset = ''; - - /** - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string|null $charset The default character encoding to use for non-UTF8 strings - * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - $this->flags = $flags; - $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); - $this->decimalPoint = localeconv(); - $this->decimalPoint = $this->decimalPoint['decimal_point']; - $this->setOutput($output ?: static::$defaultOutput); - if (!$output && \is_string(static::$defaultOutput)) { - static::$defaultOutput = $this->outputStream; - } - } - - /** - * Sets the output destination of the dumps. - * - * @param callable|resource|string $output A line dumper callable, an opened stream or an output path - * - * @return callable|resource|string The previous output destination - */ - public function setOutput($output) - { - $prev = $this->outputStream ?? $this->lineDumper; - - if (\is_callable($output)) { - $this->outputStream = null; - $this->lineDumper = $output; - } else { - if (\is_string($output)) { - $output = fopen($output, 'w'); - } - $this->outputStream = $output; - $this->lineDumper = [$this, 'echoLine']; - } - - return $prev; - } - - /** - * Sets the default character encoding to use for non-UTF8 strings. - * - * @return string The previous charset - */ - public function setCharset(string $charset) - { - $prev = $this->charset; - - $charset = strtoupper($charset); - $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; - - $this->charset = $charset; - - return $prev; - } - - /** - * Sets the indentation pad string. - * - * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level - * - * @return string The previous indent pad - */ - public function setIndentPad(string $pad) - { - $prev = $this->indentPad; - $this->indentPad = $pad; - - return $prev; - } - - /** - * Dumps a Data object. - * - * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump - * - * @return string|null The dump as string when $output is true - */ - public function dump(Data $data, $output = null) - { - $this->decimalPoint = localeconv(); - $this->decimalPoint = $this->decimalPoint['decimal_point']; - - if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { - setlocale(\LC_NUMERIC, 'C'); - } - - if ($returnDump = true === $output) { - $output = fopen('php://memory', 'r+'); - } - if ($output) { - $prevOutput = $this->setOutput($output); - } - try { - $data->dump($this); - $this->dumpLine(-1); - - if ($returnDump) { - $result = stream_get_contents($output, -1, 0); - fclose($output); - - return $result; - } - } finally { - if ($output) { - $this->setOutput($prevOutput); - } - if ($locale) { - setlocale(\LC_NUMERIC, $locale); - } - } - - return null; - } - - /** - * Dumps the current line. - * - * @param int $depth The recursive depth in the dumped structure for the line being dumped, - * or -1 to signal the end-of-dump to the line dumper callable - */ - protected function dumpLine(int $depth) - { - ($this->lineDumper)($this->line, $depth, $this->indentPad); - $this->line = ''; - } - - /** - * Generic line dumper callback. - */ - protected function echoLine(string $line, int $depth, string $indentPad) - { - if (-1 !== $depth) { - fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); - } - } - - /** - * Converts a non-UTF-8 string to UTF-8. - * - * @return string|null - */ - protected function utf8Encode(?string $s) - { - if (null === $s || preg_match('//u', $s)) { - return $s; - } - - if (!\function_exists('iconv')) { - throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { - return $c; - } - if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { - return $c; - } - - return iconv('CP850', 'UTF-8', $s); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/CliDumper.php b/vendor/symfony/var-dumper/Dumper/CliDumper.php deleted file mode 100644 index d5147b0..0000000 --- a/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ /dev/null @@ -1,652 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * CliDumper dumps variables for command line output. - * - * @author Nicolas Grekas - */ -class CliDumper extends AbstractDumper -{ - public static $defaultColors; - public static $defaultOutput = 'php://stdout'; - - protected $colors; - protected $maxStringWidth = 0; - protected $styles = [ - // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '0;38;5;208', - 'num' => '1;38;5;38', - 'const' => '1;38;5;208', - 'str' => '1;38;5;113', - 'note' => '38;5;38', - 'ref' => '38;5;247', - 'public' => '', - 'protected' => '', - 'private' => '', - 'meta' => '38;5;170', - 'key' => '38;5;113', - 'index' => '38;5;38', - ]; - - protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = [ - "\t" => '\t', - "\n" => '\n', - "\v" => '\v', - "\f" => '\f', - "\r" => '\r', - "\033" => '\e', - ]; - - protected $collapseNextHash = false; - protected $expandNextHash = false; - - private $displayOptions = [ - 'fileLinkFormat' => null, - ]; - - private $handlesHrefGracefully; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - parent::__construct($output, $charset, $flags); - - if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { - // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles([ - 'default' => '31', - 'num' => '1;34', - 'const' => '1;31', - 'str' => '1;32', - 'note' => '34', - 'ref' => '1;30', - 'meta' => '35', - 'key' => '32', - 'index' => '34', - ]); - } - - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; - } - - /** - * Enables/disables colored output. - */ - public function setColors(bool $colors) - { - $this->colors = $colors; - } - - /** - * Sets the maximum number of characters per line for dumped strings. - */ - public function setMaxStringWidth(int $maxStringWidth) - { - $this->maxStringWidth = $maxStringWidth; - } - - /** - * Configures styles. - * - * @param array $styles A map of style names to style definitions - */ - public function setStyles(array $styles) - { - $this->styles = $styles + $this->styles; - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * {@inheritdoc} - */ - public function dumpScalar(Cursor $cursor, string $type, $value) - { - $this->dumpKey($cursor); - - $style = 'const'; - $attr = $cursor->attr; - - switch ($type) { - case 'default': - $style = 'default'; - break; - - case 'integer': - $style = 'num'; - - if (isset($this->styles['integer'])) { - $style = 'integer'; - } - - break; - - case 'double': - $style = 'num'; - - if (isset($this->styles['float'])) { - $style = 'float'; - } - - switch (true) { - case \INF === $value: $value = 'INF'; break; - case -\INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (!str_contains($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } - break; - - case 'NULL': - $value = 'null'; - break; - - case 'boolean': - $value = $value ? 'true' : 'false'; - break; - - default: - $attr += ['value' => $this->utf8Encode($value)]; - $value = $this->utf8Encode($type); - break; - } - - $this->line .= $this->style($style, $value, $attr); - - $this->endValue($cursor); - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) - { - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($bin) { - $str = $this->utf8Encode($str); - } - if ('' === $str) { - $this->line .= '""'; - $this->endValue($cursor); - } else { - $attr += [ - 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, - 'binary' => $bin, - ]; - $str = $bin && false !== strpos($str, "\0") ? [$str] : explode("\n", $str); - if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { - unset($str[1]); - $str[0] .= "\n"; - } - $m = \count($str) - 1; - $i = $lineCut = 0; - - if (self::DUMP_STRING_LENGTH & $this->flags) { - $this->line .= '('.$attr['length'].') '; - } - if ($bin) { - $this->line .= 'b'; - } - - if ($m) { - $this->line .= '"""'; - $this->dumpLine($cursor->depth); - } else { - $this->line .= '"'; - } - - foreach ($str as $str) { - if ($i < $m) { - $str .= "\n"; - } - if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { - $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); - $lineCut = $len - $this->maxStringWidth; - } - if ($m && 0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - if ('' !== $str) { - $this->line .= $this->style('str', $str, $attr); - } - if ($i++ == $m) { - if ($m) { - if ('' !== $str) { - $this->dumpLine($cursor->depth); - if (0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - } - $this->line .= '"""'; - } else { - $this->line .= '"'; - } - if ($cut < 0) { - $this->line .= '…'; - $lineCut = 0; - } elseif ($cut) { - $lineCut += $cut; - } - } - if ($lineCut) { - $this->line .= '…'.$lineCut; - $lineCut = 0; - } - - if ($i > $m) { - $this->endValue($cursor); - } else { - $this->dumpLine($cursor->depth); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($this->collapseNextHash) { - $cursor->skipChildren = true; - $this->collapseNextHash = $hasChild = false; - } - - $class = $this->utf8Encode($class); - if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; - } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); - } else { - $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; - } - - if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); - } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); - } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { - $prefix = substr($prefix, 0, -1); - } - - $this->line .= $prefix; - - if ($hasChild) { - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut) - { - if (empty($cursor->attr['cut_hash'])) { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); - } - - $this->endValue($cursor); - } - - /** - * Dumps an ellipsis for cut children. - * - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - protected function dumpEllipsis(Cursor $cursor, bool $hasChild, int $cut) - { - if ($cut) { - $this->line .= ' …'; - if (0 < $cut) { - $this->line .= $cut; - } - if ($hasChild) { - $this->dumpLine($cursor->depth + 1); - } - } - } - - /** - * Dumps a key in a hash structure. - */ - protected function dumpKey(Cursor $cursor) - { - if (null !== $key = $cursor->hashKey) { - if ($cursor->hashKeyIsBinary) { - $key = $this->utf8Encode($key); - } - $attr = ['binary' => $cursor->hashKeyIsBinary]; - $bin = $cursor->hashKeyIsBinary ? 'b' : ''; - $style = 'key'; - switch ($cursor->hashType) { - default: - case Cursor::HASH_INDEXED: - if (self::DUMP_LIGHT_ARRAY & $this->flags) { - break; - } - $style = 'index'; - // no break - case Cursor::HASH_ASSOC: - if (\is_int($key)) { - $this->line .= $this->style($style, $key).' => '; - } else { - $this->line .= $bin.'"'.$this->style($style, $key).'" => '; - } - break; - - case Cursor::HASH_RESOURCE: - $key = "\0~\0".$key; - // no break - case Cursor::HASH_OBJECT: - if (!isset($key[0]) || "\0" !== $key[0]) { - $this->line .= '+'.$bin.$this->style('public', $key).': '; - } elseif (0 < strpos($key, "\0", 1)) { - $key = explode("\0", substr($key, 1), 2); - - switch ($key[0][0]) { - case '+': // User inserted keys - $attr['dynamic'] = true; - $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; - break 2; - case '~': - $style = 'meta'; - if (isset($key[0][1])) { - parse_str(substr($key[0], 1), $attr); - $attr += ['binary' => $cursor->hashKeyIsBinary]; - } - break; - case '*': - $style = 'protected'; - $bin = '#'.$bin; - break; - default: - $attr['class'] = $key[0]; - $style = 'private'; - $bin = '-'.$bin; - break; - } - - if (isset($attr['collapse'])) { - if ($attr['collapse']) { - $this->collapseNextHash = true; - } else { - $this->expandNextHash = true; - } - } - - $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); - } else { - // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; - } - break; - } - - if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; - } - } - } - - /** - * Decorates a value with some style. - * - * @param string $style The type of style being applied - * @param string $value The value being styled - * @param array $attr Optional context information - * - * @return string - */ - protected function style(string $style, string $value, array $attr = []) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { - $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { - $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); - } - if (!empty($attr['ellipsis-tail'])) { - $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); - $value = substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); - } else { - $value = substr($value, -$attr['ellipsis']); - } - - $value = $this->style('default', $prefix).$this->style($style, $value); - - goto href; - } - - $map = static::$controlCharsMap; - $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { - $s = $startCchr; - $c = $c[$i = 0]; - do { - $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); - } while (isset($c[++$i])); - - return $s.$endCchr; - }, $value, -1, $cchrCount); - - if ($this->colors) { - if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, \strlen($startCchr)); - } else { - $value = "\033[{$this->styles[$style]}m".$value; - } - if ($cchrCount && str_ends_with($value, $endCchr)) { - $value = substr($value, 0, -\strlen($endCchr)); - } else { - $value .= "\033[{$this->styles['default']}m"; - } - } - - href: - if ($this->colors && $this->handlesHrefGracefully) { - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - if ('note' === $style) { - $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; - } else { - $attr['href'] = $href; - } - } - if (isset($attr['href'])) { - $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; - } - } elseif ($attr['if_links'] ?? false) { - return ''; - } - - return $value; - } - - /** - * @return bool - */ - protected function supportsColors() - { - if ($this->outputStream !== static::$defaultOutput) { - return $this->hasColorSupport($this->outputStream); - } - if (null !== static::$defaultColors) { - return static::$defaultColors; - } - if (isset($_SERVER['argv'][1])) { - $colors = $_SERVER['argv']; - $i = \count($colors); - while (--$i > 0) { - if (isset($colors[$i][5])) { - switch ($colors[$i]) { - case '--ansi': - case '--color': - case '--color=yes': - case '--color=force': - case '--color=always': - case '--colors=always': - return static::$defaultColors = true; - - case '--no-ansi': - case '--color=no': - case '--color=none': - case '--color=never': - case '--colors=never': - return static::$defaultColors = false; - } - } - } - } - - $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; - - return static::$defaultColors = $this->hasColorSupport($h); - } - - /** - * {@inheritdoc} - */ - protected function dumpLine(int $depth, bool $endOfValue = false) - { - if ($this->colors) { - $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); - } - parent::dumpLine($depth); - } - - protected function endValue(Cursor $cursor) - { - if (-1 === $cursor->hashType) { - return; - } - - if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { - if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { - $this->line .= ','; - } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { - $this->line .= ','; - } - } - - $this->dumpLine($cursor->depth, true); - } - - /** - * Returns true if the stream supports colorization. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @param mixed $stream A CLI output stream - */ - private function hasColorSupport($stream): bool - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - return false; - } - - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return stream_isatty($stream); - } - - /** - * Returns true if the Windows terminal supports true color. - * - * Note that this does not check an output stream, but relies on environment - * variables from known implementations, or a PHP and Windows version that - * supports true color. - */ - private function isWindowsTrueColor(): bool - { - $result = 183 <= getenv('ANSICON_VER') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM'); - - if (!$result) { - $version = sprintf( - '%s.%s.%s', - PHP_WINDOWS_VERSION_MAJOR, - PHP_WINDOWS_VERSION_MINOR, - PHP_WINDOWS_VERSION_BUILD - ); - $result = $version >= '10.0.15063'; - } - - return $result; - } - - private function getSourceLink(string $file, int $line) - { - if ($fmt = $this->displayOptions['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); - } - - return false; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php deleted file mode 100644 index 38f8789..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Tries to provide context on CLI. - * - * @author Maxime Steinhausser - */ -final class CliContextProvider implements ContextProviderInterface -{ - public function getContext(): ?array - { - if ('cli' !== \PHP_SAPI) { - return null; - } - - return [ - 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), - 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), - ]; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php deleted file mode 100644 index 532aa0f..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Interface to provide contextual data about dump data clones sent to a server. - * - * @author Maxime Steinhausser - */ -interface ContextProviderInterface -{ - public function getContext(): ?array; -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php deleted file mode 100644 index 3684a47..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * Tries to provide context from a request. - * - * @author Maxime Steinhausser - */ -final class RequestContextProvider implements ContextProviderInterface -{ - private $requestStack; - private $cloner; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(0); - $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - } - - public function getContext(): ?array - { - if (null === $request = $this->requestStack->getCurrentRequest()) { - return null; - } - - $controller = $request->attributes->get('_controller'); - - return [ - 'uri' => $request->getUri(), - 'method' => $request->getMethod(), - 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, - 'identifier' => spl_object_hash($request), - ]; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php deleted file mode 100644 index 2e2c818..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\VarDumper; -use Twig\Template; - -/** - * Tries to provide context from sources (class name, file, line, code excerpt, ...). - * - * @author Nicolas Grekas - * @author Maxime Steinhausser - */ -final class SourceContextProvider implements ContextProviderInterface -{ - private $limit; - private $charset; - private $projectDir; - private $fileLinkFormatter; - - public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) - { - $this->charset = $charset; - $this->projectDir = $projectDir; - $this->fileLinkFormatter = $fileLinkFormatter; - $this->limit = $limit; - } - - public function getContext(): ?array - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); - - $file = $trace[1]['file']; - $line = $trace[1]['line']; - $name = false; - $fileExcerpt = false; - - for ($i = 2; $i < $this->limit; ++$i) { - if (isset($trace[$i]['class'], $trace[$i]['function']) - && 'dump' === $trace[$i]['function'] - && VarDumper::class === $trace[$i]['class'] - ) { - $file = $trace[$i]['file'] ?? $file; - $line = $trace[$i]['line'] ?? $line; - - while (++$i < $this->limit) { - if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - break; - } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { - $template = $trace[$i]['object']; - $name = $template->getTemplateName(); - $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); - $info = $template->getDebugInfo(); - if (isset($info[$trace[$i - 1]['line']])) { - $line = $info[$trace[$i - 1]['line']]; - $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; - - if ($src) { - $src = explode("\n", $src); - $fileExcerpt = []; - - for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { - $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; - } - - $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; - } - } - break; - } - } - break; - } - } - - if (false === $name) { - $name = str_replace('\\', '/', $file); - $name = substr($name, strrpos($name, '/') + 1); - } - - $context = ['name' => $name, 'file' => $file, 'line' => $line]; - $context['file_excerpt'] = $fileExcerpt; - - if (null !== $this->projectDir) { - $context['project_dir'] = $this->projectDir; - if (str_starts_with($file, $this->projectDir)) { - $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - } - - if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { - $context['file_link'] = $fileLink; - } - - return $context; - } - - private function htmlEncode(string $s): string - { - $html = ''; - - $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($s)); - - return substr(strip_tags($html), 1, -1); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php deleted file mode 100644 index 7638417..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * @author Kévin Thérage - */ -class ContextualizedDumper implements DataDumperInterface -{ - private $wrappedDumper; - private $contextProviders; - - /** - * @param ContextProviderInterface[] $contextProviders - */ - public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) - { - $this->wrappedDumper = $wrappedDumper; - $this->contextProviders = $contextProviders; - } - - public function dump(Data $data) - { - $context = []; - foreach ($this->contextProviders as $contextProvider) { - $context[\get_class($contextProvider)] = $contextProvider->getContext(); - } - - $this->wrappedDumper->dump($data->withContext($context)); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php b/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php deleted file mode 100644 index b173bcc..0000000 --- a/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * DataDumperInterface for dumping Data objects. - * - * @author Nicolas Grekas - */ -interface DataDumperInterface -{ - public function dump(Data $data); -} diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php deleted file mode 100644 index 2a50ca0..0000000 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ /dev/null @@ -1,986 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * HtmlDumper dumps variables as HTML. - * - * @author Nicolas Grekas - */ -class HtmlDumper extends CliDumper -{ - public static $defaultOutput = 'php://output'; - - protected static $themes = [ - 'dark' => [ - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - 'ns' => 'user-select:none;', - ], - 'light' => [ - 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#629755;', - 'note' => 'color:#6897BB', - 'ref' => 'color:#6E6E6E', - 'public' => 'color:#262626', - 'protected' => 'color:#262626', - 'private' => 'color:#262626', - 'meta' => 'color:#B729D9', - 'key' => 'color:#789339', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#CC7832', - 'ns' => 'user-select:none;', - ], - ]; - - protected $dumpHeader; - protected $dumpPrefix = '
    ';
    -    protected $dumpSuffix = '
    '; - protected $dumpId = 'sf-dump'; - protected $colors = true; - protected $headerIsDumped = false; - protected $lastDepth = -1; - protected $styles; - - private $displayOptions = [ - 'maxDepth' => 1, - 'maxStringLength' => 160, - 'fileLinkFormat' => null, - ]; - private $extraDisplayOptions = []; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - AbstractDumper::__construct($output, $charset, $flags); - $this->dumpId = 'sf-dump-'.mt_rand(); - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->styles = static::$themes['dark'] ?? self::$themes['dark']; - } - - /** - * {@inheritdoc} - */ - public function setStyles(array $styles) - { - $this->headerIsDumped = false; - $this->styles = $styles + $this->styles; - } - - public function setTheme(string $themeName) - { - if (!isset(static::$themes[$themeName])) { - throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); - } - - $this->setStyles(static::$themes[$themeName]); - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->headerIsDumped = false; - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * Sets an HTML header that will be dumped once in the output stream. - */ - public function setDumpHeader(?string $header) - { - $this->dumpHeader = $header; - } - - /** - * Sets an HTML prefix and suffix that will encapse every single dump. - */ - public function setDumpBoundaries(string $prefix, string $suffix) - { - $this->dumpPrefix = $prefix; - $this->dumpSuffix = $suffix; - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = []) - { - $this->extraDisplayOptions = $extraDisplayOptions; - $result = parent::dump($data, $output); - $this->dumpId = 'sf-dump-'.mt_rand(); - - return $result; - } - - /** - * Dumps the HTML header. - */ - protected function getDumpHeader() - { - $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; - - if (null !== $this->dumpHeader) { - return $this->dumpHeader; - } - - $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' -'.$this->dumpHeader; - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) - { - if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { - $this->dumpKey($cursor); - $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []); - $this->line .= $cursor->depth >= $this->displayOptions['maxDepth'] ? ' ' : ' '; - $this->endValue($cursor); - $this->line .= $this->indentPad; - $this->line .= sprintf('', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data'])); - $this->endValue($cursor); - } else { - parent::dumpString($cursor, $str, $bin, $cut); - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, int $type, $class, bool $hasChild) - { - if (Cursor::HASH_OBJECT === $type) { - $cursor->attr['depth'] = $cursor->depth; - } - parent::enterHash($cursor, $type, $class, false); - - if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) { - $cursor->skipChildren = false; - $eol = ' class=sf-dump-compact>'; - } else { - $this->expandNextHash = false; - $eol = ' class=sf-dump-expanded>'; - } - - if ($hasChild) { - $this->line .= 'dumpId, $r); - } - $this->line .= $eol; - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, int $type, $class, bool $hasChild, int $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - if ($hasChild) { - $this->line .= ''; - } - parent::leaveHash($cursor, $type, $class, $hasChild, 0); - } - - /** - * {@inheritdoc} - */ - protected function style(string $style, string $value, array $attr = []) - { - if ('' === $value) { - return ''; - } - - $v = esc($value); - - if ('ref' === $style) { - if (empty($attr['count'])) { - return sprintf('%s', $v); - } - $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); - - return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); - } - - if ('const' === $style && isset($attr['value'])) { - $style .= sprintf(' title="%s"', esc(is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); - } elseif ('public' === $style) { - $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); - } elseif ('str' === $style && 1 < $attr['length']) { - $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); - } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && false !== $c = strrpos($value, '\\')) { - $style .= ' title=""'; - $attr += [ - 'ellipsis' => \strlen($value) - $c, - 'ellipsis-type' => 'note', - 'ellipsis-tail' => 1, - ]; - } elseif ('protected' === $style) { - $style .= ' title="Protected property"'; - } elseif ('meta' === $style && isset($attr['title'])) { - $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); - } elseif ('private' === $style) { - $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); - } - $map = static::$controlCharsMap; - - if (isset($attr['ellipsis'])) { - $class = 'sf-dump-ellipsis'; - if (isset($attr['ellipsis-type'])) { - $class = sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); - } - $label = esc(substr($value, -$attr['ellipsis'])); - $style = str_replace(' title="', " title=\"$v\n", $style); - $v = sprintf('%s', $class, substr($v, 0, -\strlen($label))); - - if (!empty($attr['ellipsis-tail'])) { - $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); - $v .= sprintf('%s%s', $class, substr($label, 0, $tail), substr($label, $tail)); - } else { - $v .= $label; - } - } - - $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { - $s = $b = ''; - }, $v).''; - - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - $attr['href'] = $href; - } - if (isset($attr['href'])) { - $target = isset($attr['file']) ? '' : ' target="_blank"'; - $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $target, $v); - } - if (isset($attr['lang'])) { - $v = sprintf('%s', esc($attr['lang']), $v); - } - - return $v; - } - - /** - * {@inheritdoc} - */ - protected function dumpLine(int $depth, bool $endOfValue = false) - { - if (-1 === $this->lastDepth) { - $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; - } - if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) { - $this->line = $this->getDumpHeader().$this->line; - } - - if (-1 === $depth) { - $args = ['"'.$this->dumpId.'"']; - if ($this->extraDisplayOptions) { - $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); - } - // Replace is for BC - $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); - } - $this->lastDepth = $depth; - - $this->line = mb_encode_numericentity($this->line, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8'); - - if (-1 === $depth) { - AbstractDumper::dumpLine(0); - } - AbstractDumper::dumpLine($depth); - } - - private function getSourceLink(string $file, int $line) - { - $options = $this->extraDisplayOptions + $this->displayOptions; - - if ($fmt = $options['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } -} - -function esc(string $str) -{ - return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); -} diff --git a/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/vendor/symfony/var-dumper/Dumper/ServerDumper.php deleted file mode 100644 index 94795bf..0000000 --- a/vendor/symfony/var-dumper/Dumper/ServerDumper.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * ServerDumper forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class ServerDumper implements DataDumperInterface -{ - private $connection; - private $wrappedDumper; - - /** - * @param string $host The server host - * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) - { - $this->connection = new Connection($host, $contextProviders); - $this->wrappedDumper = $wrappedDumper; - } - - public function getContextProviders(): array - { - return $this->connection->getContextProviders(); - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data) - { - if (!$this->connection->write($data) && $this->wrappedDumper) { - $this->wrappedDumper->dump($data); - } - } -} diff --git a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php deleted file mode 100644 index 122f0d3..0000000 --- a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Exception; - -/** - * @author Nicolas Grekas - */ -class ThrowingCasterException extends \Exception -{ - /** - * @param \Throwable $prev The exception thrown from the caster - */ - public function __construct(\Throwable $prev) - { - parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); - } -} diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE deleted file mode 100644 index a843ec1..0000000 --- a/vendor/symfony/var-dumper/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/var-dumper/README.md b/vendor/symfony/var-dumper/README.md deleted file mode 100644 index a0da8c9..0000000 --- a/vendor/symfony/var-dumper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -VarDumper Component -=================== - -The VarDumper component provides mechanisms for walking through any arbitrary -PHP variable. It provides a better `dump()` function that you can use instead -of `var_dump()`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/vendor/symfony/var-dumper/Resources/bin/var-dump-server deleted file mode 100755 index 98c813a..0000000 --- a/vendor/symfony/var-dumper/Resources/bin/var-dump-server +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser - */ - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\VarDumper\Command\ServerDumpCommand; -use Symfony\Component\VarDumper\Server\DumpServer; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.'.PHP_EOL); - exit(1); -} - -$input = new ArgvInput(); -$output = new ConsoleOutput(); -$defaultHost = '127.0.0.1:9912'; -$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, true); -$logger = interface_exists(LoggerInterface::class) ? new ConsoleLogger($output->getErrorOutput()) : null; - -$app = new Application(); - -$app->getDefinition()->addOption( - new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost) -); - -$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger))) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run($input, $output) -; diff --git a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css deleted file mode 100644 index 8f706d6..0000000 --- a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css +++ /dev/null @@ -1,130 +0,0 @@ -body { - display: flex; - flex-direction: column-reverse; - justify-content: flex-end; - max-width: 1140px; - margin: auto; - padding: 15px; - word-wrap: break-word; - background-color: #F9F9F9; - color: #222; - font-family: Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4; -} -p { - margin: 0; -} -a { - color: #218BC3; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -.text-small { - font-size: 12px !important; -} -article { - margin: 5px; - margin-bottom: 10px; -} -article > header > .row { - display: flex; - flex-direction: row; - align-items: baseline; - margin-bottom: 10px; -} -article > header > .row > .col { - flex: 1; - display: flex; - align-items: baseline; -} -article > header > .row > h2 { - font-size: 14px; - color: #222; - font-weight: normal; - font-family: "Lucida Console", monospace, sans-serif; - word-break: break-all; - margin: 20px 5px 0 0; - user-select: all; -} -article > header > .row > h2 > code { - white-space: nowrap; - user-select: none; - color: #cc2255; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - border-radius: 3px; - margin-right: 5px; - padding: 0 3px; -} -article > header > .row > time.col { - flex: 0; - text-align: right; - white-space: nowrap; - color: #999; - font-style: italic; -} -article > header ul.tags { - list-style: none; - padding: 0; - margin: 0; - font-size: 12px; -} -article > header ul.tags > li { - user-select: all; - margin-bottom: 2px; -} -article > header ul.tags > li > span.badge { - display: inline-block; - padding: .25em .4em; - margin-right: 5px; - border-radius: 4px; - background-color: #6c757d3b; - color: #524d4d; - font-size: 12px; - text-align: center; - font-weight: 700; - line-height: 1; - white-space: nowrap; - vertical-align: baseline; - user-select: none; -} -article > section.body { - border: 1px solid #d8d8d8; - background: #FFF; - padding: 10px; - border-radius: 3px; -} -pre.sf-dump { - border-radius: 3px; - margin-bottom: 0; -} -.hidden { - display: none !important; -} -.dumped-tag > .sf-dump { - display: inline-block; - margin: 0; - padding: 1px 5px; - line-height: 1.4; - vertical-align: top; - background-color: transparent; - user-select: auto; -} -.dumped-tag > pre.sf-dump, -.dumped-tag > .sf-dump-default { - color: #CC7832; - background: none; -} -.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } -.dumped-tag > .sf-dump .sf-dump-private, -.dumped-tag > .sf-dump .sf-dump-protected, -.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } -.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } -.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } -.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } -.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } -.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/vendor/symfony/var-dumper/Resources/functions/dump.php b/vendor/symfony/var-dumper/Resources/functions/dump.php deleted file mode 100644 index f26aad5..0000000 --- a/vendor/symfony/var-dumper/Resources/functions/dump.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\VarDumper\VarDumper; - -if (!function_exists('dump')) { - /** - * @author Nicolas Grekas - */ - function dump($var, ...$moreVars) - { - VarDumper::dump($var); - - foreach ($moreVars as $v) { - VarDumper::dump($v); - } - - if (1 < func_num_args()) { - return func_get_args(); - } - - return $var; - } -} - -if (!function_exists('dd')) { - /** - * @return never - */ - function dd(...$vars) - { - if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - - foreach ($vars as $v) { - VarDumper::dump($v); - } - - exit(1); - } -} diff --git a/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js b/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js deleted file mode 100644 index 63101e5..0000000 --- a/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js +++ /dev/null @@ -1,10 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - let prev = null; - Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { - const dedupId = article.dataset.dedupId; - if (dedupId === prev) { - article.getElementsByTagName('header')[0].classList.add('hidden'); - } - prev = dedupId; - }); -}); diff --git a/vendor/symfony/var-dumper/Server/Connection.php b/vendor/symfony/var-dumper/Server/Connection.php deleted file mode 100644 index d0611a1..0000000 --- a/vendor/symfony/var-dumper/Server/Connection.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * Forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser - */ -class Connection -{ - private $host; - private $contextProviders; - - /** - * @var resource|null - */ - private $socket; - - /** - * @param string $host The server host - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, array $contextProviders = []) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->contextProviders = $contextProviders; - } - - public function getContextProviders(): array - { - return $this->contextProviders; - } - - public function write(Data $data): bool - { - $socketIsFresh = !$this->socket; - if (!$this->socket = $this->socket ?: $this->createSocket()) { - return false; - } - - $context = ['timestamp' => microtime(true)]; - foreach ($this->contextProviders as $name => $provider) { - $context[$name] = $provider->getContext(); - } - $context = array_filter($context); - $encodedPayload = base64_encode(serialize([$data, $context]))."\n"; - - set_error_handler([self::class, 'nullErrorHandler']); - try { - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - if (!$socketIsFresh) { - stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); - fclose($this->socket); - $this->socket = $this->createSocket(); - } - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - } finally { - restore_error_handler(); - } - - return false; - } - - private static function nullErrorHandler(int $t, string $m) - { - // no-op - } - - private function createSocket() - { - set_error_handler([self::class, 'nullErrorHandler']); - try { - return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); - } finally { - restore_error_handler(); - } - } -} diff --git a/vendor/symfony/var-dumper/Server/DumpServer.php b/vendor/symfony/var-dumper/Server/DumpServer.php deleted file mode 100644 index f9735db..0000000 --- a/vendor/symfony/var-dumper/Server/DumpServer.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Psr\Log\LoggerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * A server collecting Data clones sent by a ServerDumper. - * - * @author Maxime Steinhausser - * - * @final - */ -class DumpServer -{ - private $host; - private $logger; - - /** - * @var resource|null - */ - private $socket; - - public function __construct(string $host, LoggerInterface $logger = null) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->logger = $logger; - } - - public function start(): void - { - if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) { - throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno); - } - } - - public function listen(callable $callback): void - { - if (null === $this->socket) { - $this->start(); - } - - foreach ($this->getMessages() as $clientId => $message) { - if ($this->logger) { - $this->logger->info('Received a payload from client {clientId}', ['clientId' => $clientId]); - } - - $payload = @unserialize(base64_decode($message), ['allowed_classes' => [Data::class, Stub::class]]); - - // Impossible to decode the message, give up. - if (false === $payload) { - if ($this->logger) { - $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); - } - - continue; - } - - if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { - if ($this->logger) { - $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); - } - - continue; - } - - [$data, $context] = $payload; - - $callback($data, $context, $clientId); - } - } - - public function getHost(): string - { - return $this->host; - } - - private function getMessages(): iterable - { - $sockets = [(int) $this->socket => $this->socket]; - $write = []; - - while (true) { - $read = $sockets; - stream_select($read, $write, $write, null); - - foreach ($read as $stream) { - if ($this->socket === $stream) { - $stream = stream_socket_accept($this->socket); - $sockets[(int) $stream] = $stream; - } elseif (feof($stream)) { - unset($sockets[(int) $stream]); - fclose($stream); - } else { - yield (int) $stream => fgets($stream); - } - } - } - } -} diff --git a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php deleted file mode 100644 index 33d60c0..0000000 --- a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Test; - -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * @author Nicolas Grekas - */ -trait VarDumperTestTrait -{ - /** - * @internal - */ - private $varDumperConfig = [ - 'casters' => [], - 'flags' => null, - ]; - - protected function setUpVarDumper(array $casters, int $flags = null): void - { - $this->varDumperConfig['casters'] = $casters; - $this->varDumperConfig['flags'] = $flags; - } - - /** - * @after - */ - protected function tearDownVarDumper(): void - { - $this->varDumperConfig['casters'] = []; - $this->varDumperConfig['flags'] = null; - } - - public function assertDumpEquals($expected, $data, int $filter = 0, string $message = '') - { - $this->assertSame($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); - } - - public function assertDumpMatchesFormat($expected, $data, int $filter = 0, string $message = '') - { - $this->assertStringMatchesFormat($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); - } - - protected function getDump($data, $key = null, int $filter = 0): ?string - { - if (null === $flags = $this->varDumperConfig['flags']) { - $flags = getenv('DUMP_LIGHT_ARRAY') ? CliDumper::DUMP_LIGHT_ARRAY : 0; - $flags |= getenv('DUMP_STRING_LENGTH') ? CliDumper::DUMP_STRING_LENGTH : 0; - $flags |= getenv('DUMP_COMMA_SEPARATOR') ? CliDumper::DUMP_COMMA_SEPARATOR : 0; - } - - $cloner = new VarCloner(); - $cloner->addCasters($this->varDumperConfig['casters']); - $cloner->setMaxItems(-1); - $dumper = new CliDumper(null, null, $flags); - $dumper->setColors(false); - $data = $cloner->cloneVar($data, $filter)->withRefHandles(false); - if (null !== $key && null === $data = $data->seek($key)) { - return null; - } - - return rtrim($dumper->dump($data, true)); - } - - private function prepareExpectation($expected, int $filter): string - { - if (!\is_string($expected)) { - $expected = $this->getDump($expected, null, $filter); - } - - return rtrim($expected); - } -} diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php deleted file mode 100644 index a1c6317..0000000 --- a/vendor/symfony/var-dumper/VarDumper.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextualizedDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Dumper\ServerDumper; - -// Load the global dump() function -require_once __DIR__.'/Resources/functions/dump.php'; - -/** - * @author Nicolas Grekas - */ -class VarDumper -{ - /** - * @var callable|null - */ - private static $handler; - - public static function dump($var) - { - if (null === self::$handler) { - self::register(); - } - - return (self::$handler)($var); - } - - /** - * @return callable|null - */ - public static function setHandler(callable $callable = null) - { - $prevHandler = self::$handler; - - // Prevent replacing the handler with expected format as soon as the env var was set: - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - return $prevHandler; - } - - self::$handler = $callable; - - return $prevHandler; - } - - private static function register(): void - { - $cloner = new VarCloner(); - $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - - $format = $_SERVER['VAR_DUMPER_FORMAT'] ?? null; - switch (true) { - case 'html' === $format: - $dumper = new HtmlDumper(); - break; - case 'cli' === $format: - $dumper = new CliDumper(); - break; - case 'server' === $format: - case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME): - $host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format; - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); - $dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders()); - break; - default: - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); - } - - if (!$dumper instanceof ServerDumper) { - $dumper = new ContextualizedDumper($dumper, [new SourceContextProvider()]); - } - - self::$handler = function ($var) use ($cloner, $dumper) { - $dumper->dump($cloner->cloneVar($var)); - }; - } - - private static function getDefaultContextProviders(): array - { - $contextProviders = []; - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && (class_exists(Request::class))) { - $requestStack = new RequestStack(); - $requestStack->push(Request::createFromGlobals()); - $contextProviders['request'] = new RequestContextProvider($requestStack); - } - - $fileLinkFormatter = class_exists(FileLinkFormatter::class) ? new FileLinkFormatter(null, $requestStack ?? null) : null; - - return $contextProviders + [ - 'cli' => new CliContextProvider(), - 'source' => new SourceContextProvider(null, null, $fileLinkFormatter), - ]; - } -} diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json deleted file mode 100644 index dc46f58..0000000 --- a/vendor/symfony/var-dumper/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "symfony/var-dumper", - "type": "library", - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "keywords": ["dump", "debug"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "autoload": { - "files": [ "Resources/functions/dump.php" ], - "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "minimum-stability": "dev" -} diff --git a/vendor/symfony/var-exporter/CHANGELOG.md b/vendor/symfony/var-exporter/CHANGELOG.md deleted file mode 100644 index 3406c30..0000000 --- a/vendor/symfony/var-exporter/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -CHANGELOG -========= - -5.1.0 ------ - - * added argument `array &$foundClasses` to `VarExporter::export()` to ease with preloading exported values - -4.2.0 ------ - - * added the component diff --git a/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php b/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php deleted file mode 100644 index 4cebe44..0000000 --- a/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class ClassNotFoundException extends \Exception implements ExceptionInterface -{ - public function __construct(string $class, \Throwable $previous = null) - { - parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous); - } -} diff --git a/vendor/symfony/var-exporter/Exception/ExceptionInterface.php b/vendor/symfony/var-exporter/Exception/ExceptionInterface.php deleted file mode 100644 index adfaed4..0000000 --- a/vendor/symfony/var-exporter/Exception/ExceptionInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php deleted file mode 100644 index 771ee61..0000000 --- a/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class NotInstantiableTypeException extends \Exception implements ExceptionInterface -{ - public function __construct(string $type, \Throwable $previous = null) - { - parent::__construct(sprintf('Type "%s" is not instantiable.', $type), 0, $previous); - } -} diff --git a/vendor/symfony/var-exporter/Instantiator.php b/vendor/symfony/var-exporter/Instantiator.php deleted file mode 100644 index 9e33ea7..0000000 --- a/vendor/symfony/var-exporter/Instantiator.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; - -/** - * A utility class to create objects without calling their constructor. - * - * @author Nicolas Grekas - */ -final class Instantiator -{ - /** - * Creates an object and sets its properties without calling its constructor nor any other methods. - * - * For example: - * - * // creates an empty instance of Foo - * Instantiator::instantiate(Foo::class); - * - * // creates a Foo instance and sets one of its properties - * Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]); - * - * // creates a Foo instance and sets a private property defined on its parent Bar class - * Instantiator::instantiate(Foo::class, [], [ - * Bar::class => ['privateBarProperty' => $propertyValue], - * ]); - * - * Instances of ArrayObject, ArrayIterator and SplObjectHash can be created - * by using the special "\0" property name to define their internal value: - * - * // creates an SplObjectHash where $info1 is attached to $obj1, etc. - * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]); - * - * // creates an ArrayObject populated with $inputArray - * Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray]]); - * - * @param string $class The class of the instance to create - * @param array $properties The properties to set on the instance - * @param array $privateProperties The private properties to set on the instance, - * keyed by their declaring class - * - * @throws ExceptionInterface When the instance cannot be created - */ - public static function instantiate(string $class, array $properties = [], array $privateProperties = []): object - { - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - - if (Registry::$cloneable[$class]) { - $wrappedInstance = [clone Registry::$prototypes[$class]]; - } elseif (Registry::$instantiableWithoutConstructor[$class]) { - $wrappedInstance = [$reflector->newInstanceWithoutConstructor()]; - } elseif (null === Registry::$prototypes[$class]) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->implementsInterface('Serializable') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize'))) { - $wrappedInstance = [unserialize('C:'.\strlen($class).':"'.$class.'":0:{}')]; - } else { - $wrappedInstance = [unserialize('O:'.\strlen($class).':"'.$class.'":0:{}')]; - } - - if ($properties) { - $privateProperties[$class] = isset($privateProperties[$class]) ? $properties + $privateProperties[$class] : $properties; - } - - foreach ($privateProperties as $class => $properties) { - if (!$properties) { - continue; - } - foreach ($properties as $name => $value) { - // because they're also used for "unserialization", hydrators - // deal with array of instances, so we need to wrap values - $properties[$name] = [$value]; - } - (Hydrator::$hydrators[$class] ?? Hydrator::getHydrator($class))($properties, $wrappedInstance); - } - - return $wrappedInstance[0]; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Exporter.php b/vendor/symfony/var-exporter/Internal/Exporter.php deleted file mode 100644 index 9c04160..0000000 --- a/vendor/symfony/var-exporter/Internal/Exporter.php +++ /dev/null @@ -1,410 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Exporter -{ - /** - * Prepares an array of values for VarExporter. - * - * For performance this method is public and has no type-hints. - * - * @param array &$values - * @param \SplObjectStorage $objectsPool - * @param array &$refsPool - * @param int &$objectsCount - * @param bool &$valuesAreStatic - * - * @throws NotInstantiableTypeException When a value cannot be serialized - */ - public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic): array - { - $refs = $values; - foreach ($values as $k => $value) { - if (\is_resource($value)) { - throw new NotInstantiableTypeException(get_resource_type($value).' resource'); - } - $refs[$k] = $objectsPool; - - if ($isRef = !$valueIsStatic = $values[$k] !== $objectsPool) { - $values[$k] = &$value; // Break hard references to make $values completely - unset($value); // independent from the original structure - $refs[$k] = $value = $values[$k]; - if ($value instanceof Reference && 0 > $value->id) { - $valuesAreStatic = false; - ++$value->count; - continue; - } - $refsPool[] = [&$refs[$k], $value, &$value]; - $refs[$k] = $values[$k] = new Reference(-\count($refsPool), $value); - } - - if (\is_array($value)) { - if ($value) { - $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - } - goto handle_value; - } elseif (!\is_object($value) || $value instanceof \UnitEnum) { - goto handle_value; - } - - $valueIsStatic = false; - if (isset($objectsPool[$value])) { - ++$objectsCount; - $value = new Reference($objectsPool[$value][0]); - goto handle_value; - } - - $class = \get_class($value); - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - - if ($reflector->hasMethod('__serialize')) { - if (!$reflector->getMethod('__serialize')->isPublic()) { - throw new \Error(sprintf('Call to %s method "%s::__serialize()".', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); - } - - if (!\is_array($properties = $value->__serialize())) { - throw new \TypeError($class.'::__serialize() must return an array'); - } - - goto prepare_value; - } - - $properties = []; - $sleep = null; - $proto = Registry::$prototypes[$class]; - - if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) { - // ArrayIterator and ArrayObject need special care because their "flags" - // option changes the behavior of the (array) casting operator. - [$arrayValue, $properties] = self::getArrayObjectProperties($value, $proto); - - // populates Registry::$prototypes[$class] with a new instance - Registry::getClassReflector($class, Registry::$instantiableWithoutConstructor[$class], Registry::$cloneable[$class]); - } elseif ($value instanceof \SplObjectStorage && Registry::$cloneable[$class] && null !== $proto) { - // By implementing Serializable, SplObjectStorage breaks - // internal references; let's deal with it on our own. - foreach (clone $value as $v) { - $properties[] = $v; - $properties[] = $value[$v]; - } - $properties = ['SplObjectStorage' => ["\0" => $properties]]; - $arrayValue = (array) $value; - } elseif ($value instanceof \Serializable - || $value instanceof \__PHP_Incomplete_Class - || $value instanceof \DatePeriod - || (\PHP_VERSION_ID >= 80200 && ( - $value instanceof \DateTimeInterface - || $value instanceof \DateTimeZone - || $value instanceof \DateInterval - )) - ) { - ++$objectsCount; - $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0]; - $value = new Reference($id); - goto handle_value; - } else { - if (method_exists($class, '__sleep')) { - if (!\is_array($sleep = $value->__sleep())) { - trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE); - $value = null; - goto handle_value; - } - $sleep = array_flip($sleep); - } - - $arrayValue = (array) $value; - } - - $proto = (array) $proto; - - foreach ($arrayValue as $name => $v) { - $i = 0; - $n = (string) $name; - if ('' === $n || "\0" !== $n[0]) { - $c = \PHP_VERSION_ID >= 80100 && $reflector->hasProperty($n) && ($p = $reflector->getProperty($n))->isReadOnly() ? $p->class : 'stdClass'; - } elseif ('*' === $n[1]) { - $n = substr($n, 3); - $c = $reflector->getProperty($n)->class; - if ('Error' === $c) { - $c = 'TypeError'; - } elseif ('Exception' === $c) { - $c = 'ErrorException'; - } - } else { - $i = strpos($n, "\0", 2); - $c = substr($n, 1, $i - 1); - $n = substr($n, 1 + $i); - } - if (null !== $sleep) { - if (!isset($sleep[$n]) || ($i && $c !== $class)) { - continue; - } - $sleep[$n] = false; - } - if (!\array_key_exists($name, $proto) || $proto[$name] !== $v || "\x00Error\x00trace" === $name || "\x00Exception\x00trace" === $name) { - $properties[$c][$n] = $v; - } - } - if ($sleep) { - foreach ($sleep as $n => $v) { - if (false !== $v) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), \E_USER_NOTICE); - } - } - } - - prepare_value: - $objectsPool[$value] = [$id = \count($objectsPool)]; - $properties = self::prepare($properties, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - ++$objectsCount; - $objectsPool[$value] = [$id, $class, $properties, method_exists($class, '__unserialize') ? -$objectsCount : (method_exists($class, '__wakeup') ? $objectsCount : 0)]; - - $value = new Reference($id); - - handle_value: - if ($isRef) { - unset($value); // Break the hard reference created above - } elseif (!$valueIsStatic) { - $values[$k] = $value; - } - $valuesAreStatic = $valueIsStatic && $valuesAreStatic; - } - - return $values; - } - - public static function export($value, string $indent = '') - { - switch (true) { - case \is_int($value) || \is_float($value) || $value instanceof \UnitEnum: return var_export($value, true); - case [] === $value: return '[]'; - case false === $value: return 'false'; - case true === $value: return 'true'; - case null === $value: return 'null'; - case '' === $value: return "''"; - } - - if ($value instanceof Reference) { - if (0 <= $value->id) { - return '$o['.$value->id.']'; - } - if (!$value->count) { - return self::export($value->value, $indent); - } - $value = -$value->id; - - return '&$r['.$value.']'; - } - $subIndent = $indent.' '; - - if (\is_string($value)) { - $code = sprintf("'%s'", addcslashes($value, "'\\")); - - $code = preg_replace_callback("/((?:[\\0\\r\\n]|\u{202A}|\u{202B}|\u{202D}|\u{202E}|\u{2066}|\u{2067}|\u{2068}|\u{202C}|\u{2069})++)(.)/", function ($m) use ($subIndent) { - $m[1] = sprintf('\'."%s".\'', str_replace( - ["\0", "\r", "\n", "\u{202A}", "\u{202B}", "\u{202D}", "\u{202E}", "\u{2066}", "\u{2067}", "\u{2068}", "\u{202C}", "\u{2069}", '\n\\'], - ['\0', '\r', '\n', '\u{202A}', '\u{202B}', '\u{202D}', '\u{202E}', '\u{2066}', '\u{2067}', '\u{2068}', '\u{202C}', '\u{2069}', '\n"'."\n".$subIndent.'."\\'], - $m[1] - )); - - if ("'" === $m[2]) { - return substr($m[1], 0, -2); - } - - if ('n".\'' === substr($m[1], -4)) { - return substr_replace($m[1], "\n".$subIndent.".'".$m[2], -2); - } - - return $m[1].$m[2]; - }, $code, -1, $count); - - if ($count && str_starts_with($code, "''.")) { - $code = substr($code, 3); - } - - return $code; - } - - if (\is_array($value)) { - $j = -1; - $code = ''; - foreach ($value as $k => $v) { - $code .= $subIndent; - if (!\is_int($k) || 1 !== $k - $j) { - $code .= self::export($k, $subIndent).' => '; - } - if (\is_int($k) && $k > $j) { - $j = $k; - } - $code .= self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Values) { - $code = $subIndent."\$r = [],\n"; - foreach ($value->values as $k => $v) { - $code .= $subIndent.'$r['.$k.'] = '.self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Registry) { - return self::exportRegistry($value, $indent, $subIndent); - } - - if ($value instanceof Hydrator) { - return self::exportHydrator($value, $indent, $subIndent); - } - - throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', get_debug_type($value))); - } - - private static function exportRegistry(Registry $value, string $indent, string $subIndent): string - { - $code = ''; - $serializables = []; - $seen = []; - $prototypesAccess = 0; - $factoriesAccess = 0; - $r = '\\'.Registry::class; - $j = -1; - - foreach ($value->classes as $k => $class) { - if (':' === ($class[1] ?? null)) { - $serializables[$k] = $class; - continue; - } - if (!Registry::$instantiableWithoutConstructor[$class]) { - if (is_subclass_of($class, 'Serializable') && !method_exists($class, '__unserialize')) { - $serializables[$k] = 'C:'.\strlen($class).':"'.$class.'":0:{}'; - } else { - $serializables[$k] = 'O:'.\strlen($class).':"'.$class.'":0:{}'; - } - if (is_subclass_of($class, 'Throwable')) { - $eol = is_subclass_of($class, 'Error') ? "\0Error\0" : "\0Exception\0"; - $serializables[$k] = substr_replace($serializables[$k], '1:{s:'.(5 + \strlen($eol)).':"'.$eol.'trace";a:0:{}}', -4); - } - continue; - } - $code .= $subIndent.(1 !== $k - $j ? $k.' => ' : ''); - $j = $k; - $eol = ",\n"; - $c = '['.self::export($class).']'; - - if ($seen[$class] ?? false) { - if (Registry::$cloneable[$class]) { - ++$prototypesAccess; - $code .= 'clone $p'.$c; - } else { - ++$factoriesAccess; - $code .= '$f'.$c.'()'; - } - } else { - $seen[$class] = true; - if (Registry::$cloneable[$class]) { - $code .= 'clone ('.($prototypesAccess++ ? '$p' : '($p = &'.$r.'::$prototypes)').$c.' ?? '.$r.'::p'; - } else { - $code .= '('.($factoriesAccess++ ? '$f' : '($f = &'.$r.'::$factories)').$c.' ?? '.$r.'::f'; - $eol = '()'.$eol; - } - $code .= '('.substr($c, 1, -1).'))'; - } - $code .= $eol; - } - - if (1 === $prototypesAccess) { - $code = str_replace('($p = &'.$r.'::$prototypes)', $r.'::$prototypes', $code); - } - if (1 === $factoriesAccess) { - $code = str_replace('($f = &'.$r.'::$factories)', $r.'::$factories', $code); - } - if ('' !== $code) { - $code = "\n".$code.$indent; - } - - if ($serializables) { - $code = $r.'::unserialize(['.$code.'], '.self::export($serializables, $indent).')'; - } else { - $code = '['.$code.']'; - } - - return '$o = '.$code; - } - - private static function exportHydrator(Hydrator $value, string $indent, string $subIndent): string - { - $code = ''; - foreach ($value->properties as $class => $properties) { - $code .= $subIndent.' '.self::export($class).' => '.self::export($properties, $subIndent.' ').",\n"; - } - - $code = [ - self::export($value->registry, $subIndent), - self::export($value->values, $subIndent), - '' !== $code ? "[\n".$code.$subIndent.']' : '[]', - self::export($value->value, $subIndent), - self::export($value->wakeups, $subIndent), - ]; - - return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; - } - - /** - * @param \ArrayIterator|\ArrayObject $value - * @param \ArrayIterator|\ArrayObject $proto - */ - private static function getArrayObjectProperties($value, $proto): array - { - $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject'; - $reflector = Registry::$reflectors[$reflector] ?? Registry::getClassReflector($reflector); - - $properties = [ - $arrayValue = (array) $value, - $reflector->getMethod('getFlags')->invoke($value), - $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator', - ]; - - $reflector = $reflector->getMethod('setFlags'); - $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST); - - if ($properties[1] & \ArrayObject::STD_PROP_LIST) { - $reflector->invoke($value, 0); - $properties[0] = (array) $value; - } else { - $reflector->invoke($value, \ArrayObject::STD_PROP_LIST); - $arrayValue = (array) $value; - } - $reflector->invoke($value, $properties[1]); - - if ([[], 0, 'ArrayIterator'] === $properties) { - $properties = []; - } else { - if ('ArrayIterator' === $properties[2]) { - unset($properties[2]); - } - $properties = [$reflector->class => ["\0" => $properties]]; - } - - return [$arrayValue, $properties]; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Hydrator.php b/vendor/symfony/var-exporter/Internal/Hydrator.php deleted file mode 100644 index 5ed6bdc..0000000 --- a/vendor/symfony/var-exporter/Internal/Hydrator.php +++ /dev/null @@ -1,152 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Hydrator -{ - public static $hydrators = []; - - public $registry; - public $values; - public $properties; - public $value; - public $wakeups; - - public function __construct(?Registry $registry, ?Values $values, array $properties, $value, array $wakeups) - { - $this->registry = $registry; - $this->values = $values; - $this->properties = $properties; - $this->value = $value; - $this->wakeups = $wakeups; - } - - public static function hydrate($objects, $values, $properties, $value, $wakeups) - { - foreach ($properties as $class => $vars) { - (self::$hydrators[$class] ?? self::getHydrator($class))($vars, $objects); - } - foreach ($wakeups as $k => $v) { - if (\is_array($v)) { - $objects[-$k]->__unserialize($v); - } else { - $objects[$v]->__wakeup(); - } - } - - return $value; - } - - public static function getHydrator($class) - { - switch ($class) { - case 'stdClass': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - - case 'ErrorException': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \ErrorException { - }); - - case 'TypeError': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \Error { - }); - - case 'SplObjectStorage': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - if ("\0" === $name) { - foreach ($values as $i => $v) { - for ($j = 0; $j < \count($v); ++$j) { - $objects[$i]->attach($v[$j], $v[++$j]); - } - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } - - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $classReflector = new \ReflectionClass($class); - - switch ($class) { - case 'ArrayIterator': - case 'ArrayObject': - $constructor = \Closure::fromCallable([$classReflector->getConstructor(), 'invokeArgs']); - - return self::$hydrators[$class] = static function ($properties, $objects) use ($constructor) { - foreach ($properties as $name => $values) { - if ("\0" !== $name) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - } - foreach ($properties["\0"] ?? [] as $i => $v) { - $constructor($objects[$i], $v); - } - }; - } - - if (!$classReflector->isInternal()) { - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, $class); - } - - if ($classReflector->name !== $class) { - return self::$hydrators[$classReflector->name] ?? self::getHydrator($classReflector->name); - } - - $propertySetters = []; - foreach ($classReflector->getProperties() as $propertyReflector) { - if (!$propertyReflector->isStatic()) { - $propertyReflector->setAccessible(true); - $propertySetters[$propertyReflector->name] = \Closure::fromCallable([$propertyReflector, 'setValue']); - } - } - - if (!$propertySetters) { - return self::$hydrators[$class] = self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'); - } - - return self::$hydrators[$class] = static function ($properties, $objects) use ($propertySetters) { - foreach ($properties as $name => $values) { - if ($setValue = $propertySetters[$name] ?? null) { - foreach ($values as $i => $v) { - $setValue($objects[$i], $v); - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Reference.php b/vendor/symfony/var-exporter/Internal/Reference.php deleted file mode 100644 index e371c07..0000000 --- a/vendor/symfony/var-exporter/Internal/Reference.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Reference -{ - public $id; - public $value; - public $count = 0; - - public function __construct(int $id, $value = null) - { - $this->id = $id; - $this->value = $value; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Registry.php b/vendor/symfony/var-exporter/Internal/Registry.php deleted file mode 100644 index 24b77b9..0000000 --- a/vendor/symfony/var-exporter/Internal/Registry.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Registry -{ - public static $reflectors = []; - public static $prototypes = []; - public static $factories = []; - public static $cloneable = []; - public static $instantiableWithoutConstructor = []; - - public $classes = []; - - public function __construct(array $classes) - { - $this->classes = $classes; - } - - public static function unserialize($objects, $serializables) - { - $unserializeCallback = ini_set('unserialize_callback_func', __CLASS__.'::getClassReflector'); - - try { - foreach ($serializables as $k => $v) { - $objects[$k] = unserialize($v); - } - } finally { - ini_set('unserialize_callback_func', $unserializeCallback); - } - - return $objects; - } - - public static function p($class) - { - self::getClassReflector($class, true, true); - - return self::$prototypes[$class]; - } - - public static function f($class) - { - $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false); - - return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']); - } - - public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null) - { - if (!($isClass = class_exists($class)) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $reflector = new \ReflectionClass($class); - - if ($instantiableWithoutConstructor) { - $proto = $reflector->newInstanceWithoutConstructor(); - } elseif (!$isClass || $reflector->isAbstract()) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->name !== $class) { - $reflector = self::$reflectors[$name = $reflector->name] ?? self::getClassReflector($name, false, $cloneable); - self::$cloneable[$class] = self::$cloneable[$name]; - self::$instantiableWithoutConstructor[$class] = self::$instantiableWithoutConstructor[$name]; - self::$prototypes[$class] = self::$prototypes[$name]; - - return self::$reflectors[$class] = $reflector; - } else { - try { - $proto = $reflector->newInstanceWithoutConstructor(); - $instantiableWithoutConstructor = true; - } catch (\ReflectionException $e) { - $proto = $reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize') ? 'C:' : 'O:'; - if ('C:' === $proto && !$reflector->getMethod('unserialize')->isInternal()) { - $proto = null; - } else { - try { - $proto = @unserialize($proto.\strlen($class).':"'.$class.'":0:{}'); - } catch (\Exception $e) { - if (__FILE__ !== $e->getFile()) { - throw $e; - } - throw new NotInstantiableTypeException($class, $e); - } - if (false === $proto) { - throw new NotInstantiableTypeException($class); - } - } - } - if (null !== $proto && !$proto instanceof \Throwable && !$proto instanceof \Serializable && !method_exists($class, '__sleep') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__serialize'))) { - try { - serialize($proto); - } catch (\Exception $e) { - throw new NotInstantiableTypeException($class, $e); - } - } - } - - if (null === $cloneable) { - if (($proto instanceof \Reflector || $proto instanceof \ReflectionGenerator || $proto instanceof \ReflectionType || $proto instanceof \IteratorIterator || $proto instanceof \RecursiveIteratorIterator) && (!$proto instanceof \Serializable && !method_exists($proto, '__wakeup') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize')))) { - throw new NotInstantiableTypeException($class); - } - - $cloneable = $reflector->isCloneable() && !$reflector->hasMethod('__clone'); - } - - self::$cloneable[$class] = $cloneable; - self::$instantiableWithoutConstructor[$class] = $instantiableWithoutConstructor; - self::$prototypes[$class] = $proto; - - if ($proto instanceof \Throwable) { - static $setTrace; - - if (null === $setTrace) { - $setTrace = [ - new \ReflectionProperty(\Error::class, 'trace'), - new \ReflectionProperty(\Exception::class, 'trace'), - ]; - $setTrace[0]->setAccessible(true); - $setTrace[1]->setAccessible(true); - $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']); - $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']); - } - - $setTrace[$proto instanceof \Exception]($proto, []); - } - - return self::$reflectors[$class] = $reflector; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Values.php b/vendor/symfony/var-exporter/Internal/Values.php deleted file mode 100644 index 21ae04e..0000000 --- a/vendor/symfony/var-exporter/Internal/Values.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class Values -{ - public $values; - - public function __construct(array $values) - { - $this->values = $values; - } -} diff --git a/vendor/symfony/var-exporter/LICENSE b/vendor/symfony/var-exporter/LICENSE deleted file mode 100644 index 74cdc2d..0000000 --- a/vendor/symfony/var-exporter/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/var-exporter/README.md b/vendor/symfony/var-exporter/README.md deleted file mode 100644 index a34e4c2..0000000 --- a/vendor/symfony/var-exporter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -VarExporter Component -===================== - -The VarExporter component allows exporting any serializable PHP data structure to -plain PHP code. While doing so, it preserves all the semantics associated with -the serialization mechanism of PHP (`__wakeup`, `__sleep`, `Serializable`, -`__serialize`, `__unserialize`). - -It also provides an instantiator that allows creating and populating objects -without calling their constructor nor any other methods. - -The reason to use this component *vs* `serialize()` or -[igbinary](https://github.com/igbinary/igbinary) is performance: thanks to -OPcache, the resulting code is significantly faster and more memory efficient -than using `unserialize()` or `igbinary_unserialize()`. - -Unlike `var_export()`, this works on any serializable PHP value. - -It also provides a few improvements over `var_export()`/`serialize()`: - - * the output is PSR-2 compatible; - * the output can be re-indented without messing up with `\r` or `\n` in the data - * missing classes throw a `ClassNotFoundException` instead of being unserialized to - `PHP_Incomplete_Class` objects; - * references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` - instances are preserved; - * `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes - throw an exception when being serialized (their unserialized version is broken - anyway, see https://bugs.php.net/76737). - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_exporter.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/var-exporter/VarExporter.php b/vendor/symfony/var-exporter/VarExporter.php deleted file mode 100644 index 003388e..0000000 --- a/vendor/symfony/var-exporter/VarExporter.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Internal\Exporter; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; -use Symfony\Component\VarExporter\Internal\Values; - -/** - * Exports serializable PHP values to PHP code. - * - * VarExporter allows serializing PHP data structures to plain PHP code (like var_export()) - * while preserving all the semantics associated with serialize() (unlike var_export()). - * - * By leveraging OPcache, the generated PHP code is faster than doing the same with unserialize(). - * - * @author Nicolas Grekas - */ -final class VarExporter -{ - /** - * Exports a serializable PHP value to PHP code. - * - * @param mixed $value The value to export - * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise - * @param bool &$classes Classes found in the value are added to this list as both keys and values - * - * @throws ExceptionInterface When the provided value cannot be serialized - */ - public static function export($value, bool &$isStaticValue = null, array &$foundClasses = []): string - { - $isStaticValue = true; - - if (!\is_object($value) && !(\is_array($value) && $value) && !\is_resource($value) || $value instanceof \UnitEnum) { - return Exporter::export($value); - } - - $objectsPool = new \SplObjectStorage(); - $refsPool = []; - $objectsCount = 0; - - try { - $value = Exporter::prepare([$value], $objectsPool, $refsPool, $objectsCount, $isStaticValue)[0]; - } finally { - $references = []; - foreach ($refsPool as $i => $v) { - if ($v[0]->count) { - $references[1 + $i] = $v[2]; - } - $v[0] = $v[1]; - } - } - - if ($isStaticValue) { - return Exporter::export($value); - } - - $classes = []; - $values = []; - $states = []; - foreach ($objectsPool as $i => $v) { - [, $class, $values[], $wakeup] = $objectsPool[$v]; - $foundClasses[$class] = $classes[] = $class; - - if (0 < $wakeup) { - $states[$wakeup] = $i; - } elseif (0 > $wakeup) { - $states[-$wakeup] = [$i, array_pop($values)]; - $values[] = []; - } - } - ksort($states); - - $wakeups = [null]; - foreach ($states as $k => $v) { - if (\is_array($v)) { - $wakeups[-$v[0]] = $v[1]; - } else { - $wakeups[] = $v; - } - } - - if (null === $wakeups[0]) { - unset($wakeups[0]); - } - - $properties = []; - foreach ($values as $i => $vars) { - foreach ($vars as $class => $values) { - foreach ($values as $name => $v) { - $properties[$class][$name][$i] = $v; - } - } - } - - if ($classes || $references) { - $value = new Hydrator(new Registry($classes), $references ? new Values($references) : null, $properties, $value, $wakeups); - } else { - $isStaticValue = true; - } - - return Exporter::export($value); - } -} diff --git a/vendor/symfony/var-exporter/composer.json b/vendor/symfony/var-exporter/composer.json deleted file mode 100644 index 29d4901..0000000 --- a/vendor/symfony/var-exporter/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "symfony/var-exporter", - "type": "library", - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\VarExporter\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/web-profiler-bundle/CHANGELOG.md b/vendor/symfony/web-profiler-bundle/CHANGELOG.md deleted file mode 100644 index f0974a6..0000000 --- a/vendor/symfony/web-profiler-bundle/CHANGELOG.md +++ /dev/null @@ -1,95 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add a "preview" tab in mailer profiler for HTML email - -5.2.0 ------ - - * added session usage - -5.0.0 ------ - - * removed the `ExceptionController`, use `ExceptionPanelController` instead - * removed the `TemplateManager::templateExists()` method - -4.4.0 ------ - - * added support for the Mailer component - * added support for the HttpClient component - * added button to clear the ajax request tab - * deprecated the `ExceptionController::templateExists()` method - * deprecated the `TemplateManager::templateExists()` method - * deprecated the `ExceptionController` in favor of `ExceptionPanelController` - * marked all classes of the WebProfilerBundle as internal - * added a section with the stamps of a message after it is dispatched in the Messenger panel - -4.3.0 ------ - - * Replaced the canvas performance graph renderer with an SVG renderer - -4.1.0 ------ - - * added information about orphaned events - * made the toolbar auto-update with info from ajax reponses when they set the - `Symfony-Debug-Toolbar-Replace header` to `1` - -4.0.0 ------ - - * removed the `WebProfilerExtension::dumpValue()` method - * removed the `getTemplates()` method of the `TemplateManager` class in favor of the ``getNames()`` method - * removed the `web_profiler.position` config option and the - `web_profiler.debug_toolbar.position` container parameter - -3.4.0 ------ - - * Deprecated the `web_profiler.position` config option (in 4.0 version the toolbar - will always be displayed at the bottom) and the `web_profiler.debug_toolbar.position` - container parameter. - -3.1.0 ------ - - * added information about redirected and forwarded requests to the profiler - -3.0.0 ------ - - * removed profiler:import and profiler:export commands - -2.8.0 ------ - - * deprecated profiler:import and profiler:export commands - -2.7.0 ------ - - * [BC BREAK] if you are using a DB to store profiles, the table must be dropped - * added the HTTP status code to profiles - -2.3.0 ------ - - * draw retina canvas if devicePixelRatio is bigger than 1 - -2.1.0 ------ - - * deprecated the verbose setting (not relevant anymore) - * [BC BREAK] You must clear old profiles after upgrading to 2.1 (don't forget - to remove the table if you are using a DB) - * added support for the request method - * added a routing panel - * added a timeline panel - * The toolbar position can now be configured via the `position` option (can - be `top` or `bottom`) diff --git a/vendor/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php b/vendor/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php deleted file mode 100644 index 4941208..0000000 --- a/vendor/symfony/web-profiler-bundle/Controller/ExceptionPanelController.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; - -/** - * Renders the exception panel. - * - * @author Yonel Ceruto - * - * @internal - */ -class ExceptionPanelController -{ - private $errorRenderer; - private $profiler; - - public function __construct(HtmlErrorRenderer $errorRenderer, Profiler $profiler = null) - { - $this->errorRenderer = $errorRenderer; - $this->profiler = $profiler; - } - - /** - * Renders the exception panel stacktrace for the given token. - */ - public function body(string $token): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $exception = $this->profiler->loadProfile($token) - ->getCollector('exception') - ->getException() - ; - - return new Response($this->errorRenderer->getBody($exception), 200, ['Content-Type' => 'text/html']); - } - - /** - * Renders the exception panel stylesheet. - */ - public function stylesheet(): Response - { - return new Response($this->errorRenderer->getStylesheet(), 200, ['Content-Type' => 'text/css']); - } -} diff --git a/vendor/symfony/web-profiler-bundle/Controller/ProfilerController.php b/vendor/symfony/web-profiler-bundle/Controller/ProfilerController.php deleted file mode 100644 index 2ad7df3..0000000 --- a/vendor/symfony/web-profiler-bundle/Controller/ProfilerController.php +++ /dev/null @@ -1,391 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Bundle\FullStack; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; -use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; -use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Environment; - -/** - * @author Fabien Potencier - * - * @internal - */ -class ProfilerController -{ - private $templateManager; - private $generator; - private $profiler; - private $twig; - private $templates; - private $cspHandler; - private $baseDir; - - public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, Environment $twig, array $templates, ContentSecurityPolicyHandler $cspHandler = null, string $baseDir = null) - { - $this->generator = $generator; - $this->profiler = $profiler; - $this->twig = $twig; - $this->templates = $templates; - $this->cspHandler = $cspHandler; - $this->baseDir = $baseDir; - } - - /** - * Redirects to the last profiles. - * - * @throws NotFoundHttpException - */ - public function homeAction(): RedirectResponse - { - $this->denyAccessIfProfilerDisabled(); - - return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10]), 302, ['Content-Type' => 'text/html']); - } - - /** - * Renders a profiler panel for the given token. - * - * @throws NotFoundHttpException - */ - public function panelAction(Request $request, string $token): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - $panel = $request->query->get('panel'); - $page = $request->query->get('page', 'home'); - - if ('latest' === $token && $latest = current($this->profiler->find(null, null, 1, null, null, null))) { - $token = $latest['token']; - } - - if (!$profile = $this->profiler->loadProfile($token)) { - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/info.html.twig', ['about' => 'no_token', 'token' => $token, 'request' => $request]); - } - - if (null === $panel) { - $panel = 'request'; - - foreach ($profile->getCollectors() as $collector) { - if ($collector instanceof ExceptionDataCollector && $collector->hasException()) { - $panel = $collector->getName(); - - break; - } - - if ($collector instanceof DumpDataCollector && $collector->getDumpsCount() > 0) { - $panel = $collector->getName(); - } - } - } - - if (!$profile->hasCollector($panel)) { - throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token)); - } - - return $this->renderWithCspNonces($request, $this->getTemplateManager()->getName($profile, $panel), [ - 'token' => $token, - 'profile' => $profile, - 'collector' => $profile->getCollector($panel), - 'panel' => $panel, - 'page' => $page, - 'request' => $request, - 'templates' => $this->getTemplateManager()->getNames($profile), - 'is_ajax' => $request->isXmlHttpRequest(), - 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler - ]); - } - - /** - * Renders the Web Debug Toolbar. - * - * @throws NotFoundHttpException - */ - public function toolbarAction(Request $request, string $token = null): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { - // keep current flashes for one more request if using AutoExpireFlashBag - $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); - } - - if ('empty' === $token || null === $token) { - return new Response('', 200, ['Content-Type' => 'text/html']); - } - - $this->profiler->disable(); - - if (!$profile = $this->profiler->loadProfile($token)) { - return new Response('', 404, ['Content-Type' => 'text/html']); - } - - $url = null; - try { - $url = $this->generator->generate('_profiler', ['token' => $token], UrlGeneratorInterface::ABSOLUTE_URL); - } catch (\Exception $e) { - // the profiler is not enabled - } - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/toolbar.html.twig', [ - 'full_stack' => class_exists(FullStack::class), - 'request' => $request, - 'profile' => $profile, - 'templates' => $this->getTemplateManager()->getNames($profile), - 'profiler_url' => $url, - 'token' => $token, - 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar - ]); - } - - /** - * Renders the profiler search bar. - * - * @throws NotFoundHttpException - */ - public function searchBarAction(Request $request): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - if (!$request->hasSession()) { - $ip = - $method = - $statusCode = - $url = - $start = - $end = - $limit = - $token = null; - } else { - $session = $request->getSession(); - - $ip = $request->query->get('ip', $session->get('_profiler_search_ip')); - $method = $request->query->get('method', $session->get('_profiler_search_method')); - $statusCode = $request->query->get('status_code', $session->get('_profiler_search_status_code')); - $url = $request->query->get('url', $session->get('_profiler_search_url')); - $start = $request->query->get('start', $session->get('_profiler_search_start')); - $end = $request->query->get('end', $session->get('_profiler_search_end')); - $limit = $request->query->get('limit', $session->get('_profiler_search_limit')); - $token = $request->query->get('token', $session->get('_profiler_search_token')); - } - - return new Response( - $this->twig->render('@WebProfiler/Profiler/search.html.twig', [ - 'token' => $token, - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - 'request' => $request, - ]), - 200, - ['Content-Type' => 'text/html'] - ); - } - - /** - * Renders the search results. - * - * @throws NotFoundHttpException - */ - public function searchResultsAction(Request $request, string $token): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - $profile = $this->profiler->loadProfile($token); - - $ip = $request->query->get('ip'); - $method = $request->query->get('method'); - $statusCode = $request->query->get('status_code'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/results.html.twig', [ - 'request' => $request, - 'token' => $token, - 'profile' => $profile, - 'tokens' => $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode), - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - 'panel' => null, - ]); - } - - /** - * Narrows the search bar. - * - * @throws NotFoundHttpException - */ - public function searchAction(Request $request): Response - { - $this->denyAccessIfProfilerDisabled(); - - $ip = $request->query->get('ip'); - $method = $request->query->get('method'); - $statusCode = $request->query->get('status_code'); - $url = $request->query->get('url'); - $start = $request->query->get('start', null); - $end = $request->query->get('end', null); - $limit = $request->query->get('limit'); - $token = $request->query->get('token'); - - if ($request->hasSession()) { - $session = $request->getSession(); - - $session->set('_profiler_search_ip', $ip); - $session->set('_profiler_search_method', $method); - $session->set('_profiler_search_status_code', $statusCode); - $session->set('_profiler_search_url', $url); - $session->set('_profiler_search_start', $start); - $session->set('_profiler_search_end', $end); - $session->set('_profiler_search_limit', $limit); - $session->set('_profiler_search_token', $token); - } - - if (!empty($token)) { - return new RedirectResponse($this->generator->generate('_profiler', ['token' => $token]), 302, ['Content-Type' => 'text/html']); - } - - $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode); - - return new RedirectResponse($this->generator->generate('_profiler_search_results', [ - 'token' => $tokens ? $tokens[0]['token'] : 'empty', - 'ip' => $ip, - 'method' => $method, - 'status_code' => $statusCode, - 'url' => $url, - 'start' => $start, - 'end' => $end, - 'limit' => $limit, - ]), 302, ['Content-Type' => 'text/html']); - } - - /** - * Displays the PHP info. - * - * @throws NotFoundHttpException - */ - public function phpinfoAction(): Response - { - $this->denyAccessIfProfilerDisabled(); - - if (null !== $this->cspHandler) { - $this->cspHandler->disableCsp(); - } - - ob_start(); - phpinfo(); - $phpinfo = ob_get_clean(); - - return new Response($phpinfo, 200, ['Content-Type' => 'text/html']); - } - - /** - * Displays the source of a file. - * - * @throws NotFoundHttpException - */ - public function openAction(Request $request): Response - { - if (null === $this->baseDir) { - throw new NotFoundHttpException('The base dir should be set.'); - } - - if ($this->profiler) { - $this->profiler->disable(); - } - - $file = $request->query->get('file'); - $line = $request->query->get('line'); - - $filename = $this->baseDir.\DIRECTORY_SEPARATOR.$file; - - if (preg_match("'(^|[/\\\\])\.'", $file) || !is_readable($filename)) { - throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file)); - } - - return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/open.html.twig', [ - 'filename' => $filename, - 'file' => $file, - 'line' => $line, - ]); - } - - /** - * Gets the Template Manager. - */ - protected function getTemplateManager(): TemplateManager - { - if (null === $this->templateManager) { - $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); - } - - return $this->templateManager; - } - - private function denyAccessIfProfilerDisabled() - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $this->profiler->disable(); - } - - private function renderWithCspNonces(Request $request, string $template, array $variables, int $code = 200, array $headers = ['Content-Type' => 'text/html']): Response - { - $response = new Response('', $code, $headers); - - $nonces = $this->cspHandler ? $this->cspHandler->getNonces($request, $response) : []; - - $variables['csp_script_nonce'] = $nonces['csp_script_nonce'] ?? null; - $variables['csp_style_nonce'] = $nonces['csp_style_nonce'] ?? null; - - $response->setContent($this->twig->render($template, $variables)); - - return $response; - } -} diff --git a/vendor/symfony/web-profiler-bundle/Controller/RouterController.php b/vendor/symfony/web-profiler-bundle/Controller/RouterController.php deleted file mode 100644 index 50560e0..0000000 --- a/vendor/symfony/web-profiler-bundle/Controller/RouterController.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Controller; - -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouterInterface; -use Twig\Environment; - -/** - * @author Fabien Potencier - * - * @internal - */ -class RouterController -{ - private $profiler; - private $twig; - private $matcher; - private $routes; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private $expressionLanguageProviders = []; - - public function __construct(Profiler $profiler = null, Environment $twig, UrlMatcherInterface $matcher = null, RouteCollection $routes = null, iterable $expressionLanguageProviders = []) - { - $this->profiler = $profiler; - $this->twig = $twig; - $this->matcher = $matcher; - $this->routes = (null === $routes && $matcher instanceof RouterInterface) ? $matcher->getRouteCollection() : $routes; - $this->expressionLanguageProviders = $expressionLanguageProviders; - } - - /** - * Renders the profiler panel for the given token. - * - * @throws NotFoundHttpException - */ - public function panelAction(string $token): Response - { - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $this->profiler->disable(); - - if (null === $this->matcher || null === $this->routes) { - return new Response('The Router is not enabled.', 200, ['Content-Type' => 'text/html']); - } - - $profile = $this->profiler->loadProfile($token); - - /** @var RequestDataCollector $request */ - $request = $profile->getCollector('request'); - - return new Response($this->twig->render('@WebProfiler/Router/panel.html.twig', [ - 'request' => $request, - 'router' => $profile->getCollector('router'), - 'traces' => $this->getTraces($request, $profile->getMethod()), - ]), 200, ['Content-Type' => 'text/html']); - } - - /** - * Returns the routing traces associated to the given request. - */ - private function getTraces(RequestDataCollector $request, string $method): array - { - $traceRequest = Request::create( - $request->getPathInfo(), - $request->getRequestServer(true)->get('REQUEST_METHOD'), - \in_array($request->getMethod(), ['DELETE', 'PATCH', 'POST', 'PUT'], true) ? $request->getRequestRequest()->all() : $request->getRequestQuery()->all(), - $request->getRequestCookies(true)->all(), - [], - $request->getRequestServer(true)->all() - ); - - $context = $this->matcher->getContext(); - $context->setMethod($method); - $matcher = new TraceableUrlMatcher($this->routes, $context); - foreach ($this->expressionLanguageProviders as $provider) { - $matcher->addExpressionLanguageProvider($provider); - } - - return $matcher->getTracesForRequest($traceRequest); - } -} diff --git a/vendor/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php b/vendor/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php deleted file mode 100644 index ce24136..0000000 --- a/vendor/symfony/web-profiler-bundle/Csp/ContentSecurityPolicyHandler.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Csp; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Handles Content-Security-Policy HTTP header for the WebProfiler Bundle. - * - * @author Romain Neutron - * - * @internal - */ -class ContentSecurityPolicyHandler -{ - private $nonceGenerator; - private $cspDisabled = false; - - public function __construct(NonceGenerator $nonceGenerator) - { - $this->nonceGenerator = $nonceGenerator; - } - - /** - * Returns an array of nonces to be used in Twig templates and Content-Security-Policy headers. - * - * Nonce can be provided by; - * - The request - In case HTML content is fetched via AJAX and inserted in DOM, it must use the same nonce as origin - * - The response - A call to getNonces() has already been done previously. Same nonce are returned - * - They are otherwise randomly generated - */ - public function getNonces(Request $request, Response $response): array - { - if ($request->headers->has('X-SymfonyProfiler-Script-Nonce') && $request->headers->has('X-SymfonyProfiler-Style-Nonce')) { - return [ - 'csp_script_nonce' => $request->headers->get('X-SymfonyProfiler-Script-Nonce'), - 'csp_style_nonce' => $request->headers->get('X-SymfonyProfiler-Style-Nonce'), - ]; - } - - if ($response->headers->has('X-SymfonyProfiler-Script-Nonce') && $response->headers->has('X-SymfonyProfiler-Style-Nonce')) { - return [ - 'csp_script_nonce' => $response->headers->get('X-SymfonyProfiler-Script-Nonce'), - 'csp_style_nonce' => $response->headers->get('X-SymfonyProfiler-Style-Nonce'), - ]; - } - - $nonces = [ - 'csp_script_nonce' => $this->generateNonce(), - 'csp_style_nonce' => $this->generateNonce(), - ]; - - $response->headers->set('X-SymfonyProfiler-Script-Nonce', $nonces['csp_script_nonce']); - $response->headers->set('X-SymfonyProfiler-Style-Nonce', $nonces['csp_style_nonce']); - - return $nonces; - } - - /** - * Disables Content-Security-Policy. - * - * All related headers will be removed. - */ - public function disableCsp() - { - $this->cspDisabled = true; - } - - /** - * Cleanup temporary headers and updates Content-Security-Policy headers. - * - * @return array Nonces used by the bundle in Content-Security-Policy header - */ - public function updateResponseHeaders(Request $request, Response $response): array - { - if ($this->cspDisabled) { - $this->removeCspHeaders($response); - - return []; - } - - $nonces = $this->getNonces($request, $response); - $this->cleanHeaders($response); - $this->updateCspHeaders($response, $nonces); - - return $nonces; - } - - private function cleanHeaders(Response $response) - { - $response->headers->remove('X-SymfonyProfiler-Script-Nonce'); - $response->headers->remove('X-SymfonyProfiler-Style-Nonce'); - } - - private function removeCspHeaders(Response $response) - { - $response->headers->remove('X-Content-Security-Policy'); - $response->headers->remove('Content-Security-Policy'); - $response->headers->remove('Content-Security-Policy-Report-Only'); - } - - /** - * Updates Content-Security-Policy headers in a response. - */ - private function updateCspHeaders(Response $response, array $nonces = []): array - { - $nonces = array_replace([ - 'csp_script_nonce' => $this->generateNonce(), - 'csp_style_nonce' => $this->generateNonce(), - ], $nonces); - - $ruleIsSet = false; - - $headers = $this->getCspHeaders($response); - - $types = [ - 'script-src' => 'csp_script_nonce', - 'script-src-elem' => 'csp_script_nonce', - 'style-src' => 'csp_style_nonce', - 'style-src-elem' => 'csp_style_nonce', - ]; - - foreach ($headers as $header => $directives) { - foreach ($types as $type => $tokenName) { - if ($this->authorizesInline($directives, $type)) { - continue; - } - if (!isset($headers[$header][$type])) { - if (null === $fallback = $this->getDirectiveFallback($directives, $type)) { - continue; - } - - if (['\'none\''] === $fallback) { - // Fallback came from "default-src: 'none'" - // 'none' is invalid if it's not the only expression in the source list, so we leave it out - $fallback = []; - } - - $headers[$header][$type] = $fallback; - } - $ruleIsSet = true; - if (!\in_array('\'unsafe-inline\'', $headers[$header][$type], true)) { - $headers[$header][$type][] = '\'unsafe-inline\''; - } - $headers[$header][$type][] = sprintf('\'nonce-%s\'', $nonces[$tokenName]); - } - } - - if (!$ruleIsSet) { - return $nonces; - } - - foreach ($headers as $header => $directives) { - $response->headers->set($header, $this->generateCspHeader($directives)); - } - - return $nonces; - } - - /** - * Generates a valid Content-Security-Policy nonce. - */ - private function generateNonce(): string - { - return $this->nonceGenerator->generate(); - } - - /** - * Converts a directive set array into Content-Security-Policy header. - */ - private function generateCspHeader(array $directives): string - { - return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { - return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); - }, ''); - } - - /** - * Converts a Content-Security-Policy header value into a directive set array. - */ - private function parseDirectives(string $header): array - { - $directives = []; - - foreach (explode(';', $header) as $directive) { - $parts = explode(' ', trim($directive)); - if (\count($parts) < 1) { - continue; - } - $name = array_shift($parts); - $directives[$name] = $parts; - } - - return $directives; - } - - /** - * Detects if the 'unsafe-inline' is prevented for a directive within the directive set. - */ - private function authorizesInline(array $directivesSet, string $type): bool - { - if (isset($directivesSet[$type])) { - $directives = $directivesSet[$type]; - } elseif (null === $directives = $this->getDirectiveFallback($directivesSet, $type)) { - return false; - } - - return \in_array('\'unsafe-inline\'', $directives, true) && !$this->hasHashOrNonce($directives); - } - - private function hasHashOrNonce(array $directives): bool - { - foreach ($directives as $directive) { - if (!str_ends_with($directive, '\'')) { - continue; - } - if ('\'nonce-' === substr($directive, 0, 7)) { - return true; - } - if (\in_array(substr($directive, 0, 8), ['\'sha256-', '\'sha384-', '\'sha512-'], true)) { - return true; - } - } - - return false; - } - - private function getDirectiveFallback(array $directiveSet, string $type) - { - if (\in_array($type, ['script-src-elem', 'style-src-elem'], true) || !isset($directiveSet['default-src'])) { - // Let the browser fallback on it's own - return null; - } - - return $directiveSet['default-src']; - } - - /** - * Retrieves the Content-Security-Policy headers (either X-Content-Security-Policy or Content-Security-Policy) from - * a response. - */ - private function getCspHeaders(Response $response): array - { - $headers = []; - - if ($response->headers->has('Content-Security-Policy')) { - $headers['Content-Security-Policy'] = $this->parseDirectives($response->headers->get('Content-Security-Policy')); - } - - if ($response->headers->has('Content-Security-Policy-Report-Only')) { - $headers['Content-Security-Policy-Report-Only'] = $this->parseDirectives($response->headers->get('Content-Security-Policy-Report-Only')); - } - - if ($response->headers->has('X-Content-Security-Policy')) { - $headers['X-Content-Security-Policy'] = $this->parseDirectives($response->headers->get('X-Content-Security-Policy')); - } - - return $headers; - } -} diff --git a/vendor/symfony/web-profiler-bundle/Csp/NonceGenerator.php b/vendor/symfony/web-profiler-bundle/Csp/NonceGenerator.php deleted file mode 100644 index 19af849..0000000 --- a/vendor/symfony/web-profiler-bundle/Csp/NonceGenerator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Csp; - -/** - * Generates Content-Security-Policy nonce. - * - * @author Romain Neutron - * - * @internal - */ -class NonceGenerator -{ - public function generate(): string - { - return bin2hex(random_bytes(16)); - } -} diff --git a/vendor/symfony/web-profiler-bundle/DependencyInjection/Configuration.php b/vendor/symfony/web-profiler-bundle/DependencyInjection/Configuration.php deleted file mode 100644 index 041c335..0000000 --- a/vendor/symfony/web-profiler-bundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; - -/** - * This class contains the configuration information for the bundle. - * - * This information is solely responsible for how the different configuration - * sections are normalized, and merged. - * - * @author Fabien Potencier - */ -class Configuration implements ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - * - * @return TreeBuilder - */ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder('web_profiler'); - - $treeBuilder->getRootNode() - ->children() - ->booleanNode('toolbar')->defaultFalse()->end() - ->booleanNode('intercept_redirects')->defaultFalse()->end() - ->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?)\.php/)?_wdt')->end() - ->end() - ; - - return $treeBuilder; - } -} diff --git a/vendor/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php b/vendor/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php deleted file mode 100644 index 0bb949c..0000000 --- a/vendor/symfony/web-profiler-bundle/DependencyInjection/WebProfilerExtension.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; - -use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\Extension; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Reference; - -/** - * WebProfilerExtension. - * - * Usage: - * - * - * - * @author Fabien Potencier - */ -class WebProfilerExtension extends Extension -{ - /** - * Loads the web profiler configuration. - * - * @param array $configs An array of configuration settings - */ - public function load(array $configs, ContainerBuilder $container) - { - $configuration = $this->getConfiguration($configs, $container); - $config = $this->processConfiguration($configuration, $configs); - - $loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('profiler.php'); - - if ($config['toolbar'] || $config['intercept_redirects']) { - $loader->load('toolbar.php'); - $container->getDefinition('web_profiler.debug_toolbar')->replaceArgument(4, $config['excluded_ajax_paths']); - $container->setParameter('web_profiler.debug_toolbar.intercept_redirects', $config['intercept_redirects']); - $container->setParameter('web_profiler.debug_toolbar.mode', $config['toolbar'] ? WebDebugToolbarListener::ENABLED : WebDebugToolbarListener::DISABLED); - } - - $container->getDefinition('debug.file_link_formatter') - ->replaceArgument(3, new ServiceClosureArgument(new Reference('debug.file_link_formatter.url_format'))); - } - - /** - * {@inheritdoc} - */ - public function getXsdValidationBasePath() - { - return __DIR__.'/../Resources/config/schema'; - } - - public function getNamespace() - { - return 'http://symfony.com/schema/dic/webprofiler'; - } -} diff --git a/vendor/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php b/vendor/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php deleted file mode 100644 index b2e7db2..0000000 --- a/vendor/symfony/web-profiler-bundle/EventListener/WebDebugToolbarListener.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\EventListener; - -use Symfony\Bundle\FullStack; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; -use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; -use Symfony\Component\HttpKernel\Event\ResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Twig\Environment; - -/** - * WebDebugToolbarListener injects the Web Debug Toolbar. - * - * The onKernelResponse method must be connected to the kernel.response event. - * - * The WDT is only injected on well-formed HTML (with a proper tag). - * This means that the WDT is never included in sub-requests or ESI requests. - * - * @author Fabien Potencier - * - * @final - */ -class WebDebugToolbarListener implements EventSubscriberInterface -{ - public const DISABLED = 1; - public const ENABLED = 2; - - protected $twig; - protected $urlGenerator; - protected $interceptRedirects; - protected $mode; - protected $excludedAjaxPaths; - private $cspHandler; - private $dumpDataCollector; - - public function __construct(Environment $twig, bool $interceptRedirects = false, int $mode = self::ENABLED, UrlGeneratorInterface $urlGenerator = null, string $excludedAjaxPaths = '^/bundles|^/_wdt', ContentSecurityPolicyHandler $cspHandler = null, DumpDataCollector $dumpDataCollector = null) - { - $this->twig = $twig; - $this->urlGenerator = $urlGenerator; - $this->interceptRedirects = $interceptRedirects; - $this->mode = $mode; - $this->excludedAjaxPaths = $excludedAjaxPaths; - $this->cspHandler = $cspHandler; - $this->dumpDataCollector = $dumpDataCollector; - } - - public function isEnabled(): bool - { - return self::DISABLED !== $this->mode; - } - - public function setMode(int $mode): void - { - if (self::DISABLED !== $mode && self::ENABLED !== $mode) { - throw new \InvalidArgumentException(sprintf('Invalid value provided for mode, use one of "%s::DISABLED" or "%s::ENABLED".', self::class, self::class)); - } - - $this->mode = $mode; - } - - public function onKernelResponse(ResponseEvent $event) - { - $response = $event->getResponse(); - $request = $event->getRequest(); - - if ($response->headers->has('X-Debug-Token') && null !== $this->urlGenerator) { - try { - $response->headers->set( - 'X-Debug-Token-Link', - $this->urlGenerator->generate('_profiler', ['token' => $response->headers->get('X-Debug-Token')], UrlGeneratorInterface::ABSOLUTE_URL) - ); - } catch (\Exception $e) { - $response->headers->set('X-Debug-Error', \get_class($e).': '.preg_replace('/\s+/', ' ', $e->getMessage())); - } - } - - if (!$event->isMainRequest()) { - return; - } - - $nonces = []; - if ($this->cspHandler) { - if ($this->dumpDataCollector && $this->dumpDataCollector->getDumpsCount() > 0) { - $this->cspHandler->disableCsp(); - } - - $nonces = $this->cspHandler->updateResponseHeaders($request, $response); - } - - // do not capture redirects or modify XML HTTP Requests - if ($request->isXmlHttpRequest()) { - return; - } - - if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects && 'html' === $request->getRequestFormat()) { - if ($request->hasSession() && ($session = $request->getSession())->isStarted() && $session->getFlashBag() instanceof AutoExpireFlashBag) { - // keep current flashes for one more request if using AutoExpireFlashBag - $session->getFlashBag()->setAll($session->getFlashBag()->peekAll()); - } - - $response->setContent($this->twig->render('@WebProfiler/Profiler/toolbar_redirect.html.twig', ['location' => $response->headers->get('Location')])); - $response->setStatusCode(200); - $response->headers->remove('Location'); - } - - if (self::DISABLED === $this->mode - || !$response->headers->has('X-Debug-Token') - || $response->isRedirection() - || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type'), 'html')) - || 'html' !== $request->getRequestFormat() - || false !== stripos($response->headers->get('Content-Disposition', ''), 'attachment;') - ) { - return; - } - - $this->injectToolbar($response, $request, $nonces); - } - - /** - * Injects the web debug toolbar into the given Response. - */ - protected function injectToolbar(Response $response, Request $request, array $nonces) - { - $content = $response->getContent(); - $pos = strripos($content, ''); - - if (false !== $pos) { - $toolbar = "\n".str_replace("\n", '', $this->twig->render( - '@WebProfiler/Profiler/toolbar_js.html.twig', - [ - 'full_stack' => class_exists(FullStack::class), - 'excluded_ajax_paths' => $this->excludedAjaxPaths, - 'token' => $response->headers->get('X-Debug-Token'), - 'request' => $request, - 'csp_script_nonce' => $nonces['csp_script_nonce'] ?? null, - 'csp_style_nonce' => $nonces['csp_style_nonce'] ?? null, - ] - ))."\n"; - $content = substr($content, 0, $pos).$toolbar.substr($content, $pos); - $response->setContent($content); - } - } - - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::RESPONSE => ['onKernelResponse', -128], - ]; - } -} diff --git a/vendor/symfony/web-profiler-bundle/LICENSE b/vendor/symfony/web-profiler-bundle/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/web-profiler-bundle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/web-profiler-bundle/Profiler/TemplateManager.php b/vendor/symfony/web-profiler-bundle/Profiler/TemplateManager.php deleted file mode 100644 index f962e69..0000000 --- a/vendor/symfony/web-profiler-bundle/Profiler/TemplateManager.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Profiler; - -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Profiler\Profile; -use Symfony\Component\HttpKernel\Profiler\Profiler; -use Twig\Environment; - -/** - * @author Fabien Potencier - * @author Artur Wielogórski - * - * @internal - */ -class TemplateManager -{ - protected $twig; - protected $templates; - protected $profiler; - - public function __construct(Profiler $profiler, Environment $twig, array $templates) - { - $this->profiler = $profiler; - $this->twig = $twig; - $this->templates = $templates; - } - - /** - * Gets the template name for a given panel. - * - * @return mixed - * - * @throws NotFoundHttpException - */ - public function getName(Profile $profile, string $panel) - { - $templates = $this->getNames($profile); - - if (!isset($templates[$panel])) { - throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel)); - } - - return $templates[$panel]; - } - - /** - * Gets template names of templates that are present in the viewed profile. - * - * @throws \UnexpectedValueException - */ - public function getNames(Profile $profile): array - { - $loader = $this->twig->getLoader(); - $templates = []; - - foreach ($this->templates as $arguments) { - if (null === $arguments) { - continue; - } - - [$name, $template] = $arguments; - - if (!$this->profiler->has($name) || !$profile->hasCollector($name)) { - continue; - } - - if (str_ends_with($template, '.html.twig')) { - $template = substr($template, 0, -10); - } - - if (!$loader->exists($template.'.html.twig')) { - throw new \UnexpectedValueException(sprintf('The profiler template "%s.html.twig" for data collector "%s" does not exist.', $template, $name)); - } - - $templates[$name] = $template.'.html.twig'; - } - - return $templates; - } -} diff --git a/vendor/symfony/web-profiler-bundle/README.md b/vendor/symfony/web-profiler-bundle/README.md deleted file mode 100644 index e3c1400..0000000 --- a/vendor/symfony/web-profiler-bundle/README.md +++ /dev/null @@ -1,16 +0,0 @@ -WebProfilerBundle -================= - -WebProfilerBundle provides a **development tool** that gives detailed -information about the execution of any request. - -**Never** enable it on production servers as it will lead to major security -vulnerabilities in your project. - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt b/vendor/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt deleted file mode 100644 index 2e20272..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/ICONS_LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -Icons License -============= - -Icons created by Sensio (http://www.sensio.com/) are shared under a Creative -Commons Attribution license (http://creativecommons.org/licenses/by-sa/3.0/). \ No newline at end of file diff --git a/vendor/symfony/web-profiler-bundle/Resources/config/profiler.php b/vendor/symfony/web-profiler-bundle/Resources/config/profiler.php deleted file mode 100644 index 85c64f2..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/config/profiler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\WebProfilerBundle\Controller\ExceptionPanelController; -use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController; -use Symfony\Bundle\WebProfilerBundle\Controller\RouterController; -use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler; -use Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator; -use Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension; -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -return static function (ContainerConfigurator $container) { - $container->services() - - ->set('web_profiler.controller.profiler', ProfilerController::class) - ->public() - ->args([ - service('router')->nullOnInvalid(), - service('profiler')->nullOnInvalid(), - service('twig'), - param('data_collector.templates'), - service('web_profiler.csp.handler'), - param('kernel.project_dir'), - ]) - - ->set('web_profiler.controller.router', RouterController::class) - ->public() - ->args([ - service('profiler')->nullOnInvalid(), - service('twig'), - service('router')->nullOnInvalid(), - null, - tagged_iterator('routing.expression_language_provider'), - ]) - - ->set('web_profiler.controller.exception_panel', ExceptionPanelController::class) - ->public() - ->args([ - service('error_handler.error_renderer.html'), - service('profiler')->nullOnInvalid(), - ]) - - ->set('web_profiler.csp.handler', ContentSecurityPolicyHandler::class) - ->args([ - inline_service(NonceGenerator::class), - ]) - - ->set('twig.extension.webprofiler', WebProfilerExtension::class) - ->args([ - inline_service(HtmlDumper::class) - ->args([null, param('kernel.charset'), HtmlDumper::DUMP_LIGHT_ARRAY]) - ->call('setDisplayOptions', [['maxStringLength' => 4096, 'fileLinkFormat' => service('debug.file_link_formatter')]]), - ]) - ->tag('twig.extension') - - ->set('debug.file_link_formatter', FileLinkFormatter::class) - ->args([ - param('debug.file_link_format'), - service('request_stack')->ignoreOnInvalid(), - param('kernel.project_dir'), - '/_profiler/open?file=%%f&line=%%l#line%%l', - ]) - - ->set('debug.file_link_formatter.url_format', 'string') - ->factory([FileLinkFormatter::class, 'generateUrlFormat']) - ->args([ - service('router'), - '_profiler_open_file', - '?file=%%f&line=%%l#line%%l', - ]) - ; -}; diff --git a/vendor/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml b/vendor/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml deleted file mode 100644 index f20cba0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/config/routing/profiler.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - web_profiler.controller.profiler::homeAction - - - - web_profiler.controller.profiler::searchAction - - - - web_profiler.controller.profiler::searchBarAction - - - - web_profiler.controller.profiler::phpinfoAction - - - - web_profiler.controller.profiler::searchResultsAction - - - - web_profiler.controller.profiler::openAction - - - - web_profiler.controller.profiler::panelAction - - - - web_profiler.controller.router::panelAction - - - - web_profiler.controller.exception_panel::body - - - - web_profiler.controller.exception_panel::stylesheet - - - diff --git a/vendor/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml b/vendor/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml deleted file mode 100644 index 0f7e960..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/config/routing/wdt.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - web_profiler.controller.profiler::toolbarAction - - diff --git a/vendor/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd b/vendor/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd deleted file mode 100644 index e22105a..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/config/schema/webprofiler-1.0.xsd +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/vendor/symfony/web-profiler-bundle/Resources/config/toolbar.php b/vendor/symfony/web-profiler-bundle/Resources/config/toolbar.php deleted file mode 100644 index 473b363..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/config/toolbar.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener; - -return static function (ContainerConfigurator $container) { - $container->services() - - ->set('web_profiler.debug_toolbar', WebDebugToolbarListener::class) - ->args([ - service('twig'), - param('web_profiler.debug_toolbar.intercept_redirects'), - param('web_profiler.debug_toolbar.mode'), - service('router')->ignoreOnInvalid(), - abstract_arg('paths that should be excluded from the AJAX requests shown in the toolbar'), - service('web_profiler.csp.handler'), - service('data_collector.dump')->ignoreOnInvalid(), - ]) - ->tag('kernel.event_subscriber') - ; -}; diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig deleted file mode 100644 index e4e7d64..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/ajax.html.twig +++ /dev/null @@ -1,35 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set icon %} - {{ include('@WebProfiler/Icon/ajax.svg') }} - 0 - {% endset %} - - {% set text %} -
    - - - (Clear) - -
    -
    - - - - - - - - - - - - - -
    #ProfileMethodTypeStatusURLTime
    -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig deleted file mode 100644 index 0c406e9..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/cache.html.twig +++ /dev/null @@ -1,153 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.totals.calls > 0 %} - {% set icon %} - {{ include('@WebProfiler/Icon/cache.svg') }} - {{ collector.totals.calls }} - - in - {{ '%0.2f'|format(collector.totals.time * 1000) }} - ms - - {% endset %} - {% set text %} -
    - Cache Calls - {{ collector.totals.calls }} -
    -
    - Total time - {{ '%0.2f'|format(collector.totals.time * 1000) }} ms -
    -
    - Cache hits - {{ collector.totals.hits }} / {{ collector.totals.reads }}{% if collector.totals.hit_read_ratio is not null %} ({{ collector.totals.hit_read_ratio }}%){% endif %} -
    -
    - Cache writes - {{ collector.totals.writes }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - - {{ include('@WebProfiler/Icon/cache.svg') }} - - Cache - -{% endblock %} - -{% block panel %} -

    Cache

    - - {% if collector.totals.calls == 0 %} -
    -

    No cache calls were made.

    -
    - {% else %} -
    -
    - {{ collector.totals.calls }} - Total calls -
    -
    - {{ '%0.2f'|format(collector.totals.time * 1000) }} ms - Total time -
    -
    -
    - {{ collector.totals.reads }} - Total reads -
    -
    - {{ collector.totals.writes }} - Total writes -
    -
    - {{ collector.totals.deletes }} - Total deletes -
    -
    -
    - {{ collector.totals.hits }} - Total hits -
    -
    - {{ collector.totals.misses }} - Total misses -
    -
    - - {{ collector.totals.hit_read_ratio ?? 0 }} % - - Hits/reads -
    -
    - -

    Pools

    -
    - {% for name, calls in collector.calls %} -
    -

    {{ name }} {{ collector.statistics[name].calls }}

    - -
    - {% if calls|length == 0 %} -
    -

    No calls were made for {{ name }} pool.

    -
    - {% else %} -

    Metrics

    -
    - {% for key, value in collector.statistics[name] %} -
    - - {% if key == 'time' %} - {{ '%0.2f'|format(1000 * value) }} ms - {% elseif key == 'hit_read_ratio' %} - {{ value ?? 0 }} % - {% else %} - {{ value }} - {% endif %} - - {{ key == 'hit_read_ratio' ? 'Hits/reads' : key|capitalize }} -
    - {% if key == 'time' or key == 'deletes' %} -
    - {% endif %} - {% endfor %} -
    - -

    Calls

    - - - - - - - - - - - {% for call in calls %} - - - - - - - {% endfor %} - -
    #TimeCallHit
    {{ loop.index }}{{ '%0.2f'|format((call.end - call.start) * 1000) }} ms{{ call.name }}(){{ profiler_dump(call.value.result, maxDepth=2) }}
    - {% endif %} -
    -
    - {% endfor %} -
    - {% endif %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig deleted file mode 100644 index 6dfd27b..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/config.html.twig +++ /dev/null @@ -1,226 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if 'unknown' == collector.symfonyState %} - {% set block_status = '' %} - {% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %} - {% elseif 'eol' == collector.symfonyState %} - {% set block_status = 'red' %} - {% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %} - {% elseif 'eom' == collector.symfonyState %} - {% set block_status = 'yellow' %} - {% set symfony_version_status = 'This Symfony version will only receive security fixes.' %} - {% elseif 'dev' == collector.symfonyState %} - {% set block_status = 'yellow' %} - {% set symfony_version_status = 'This Symfony version is still in the development phase.' %} - {% else %} - {% set block_status = '' %} - {% set symfony_version_status = '' %} - {% endif %} - - {% set icon %} - - {{ include('@WebProfiler/Icon/symfony.svg') }} - - {{ collector.symfonyState is defined ? collector.symfonyversion : 'n/a' }} - {% endset %} - - {% set text %} -
    -
    - Profiler token - - {% if profiler_url %} - {{ collector.token }} - {% else %} - {{ collector.token }} - {% endif %} - -
    - - {% if 'n/a' is not same as(collector.env) %} -
    - Environment - {{ collector.env }} -
    - {% endif %} - - {% if 'n/a' is not same as(collector.debug) %} -
    - Debug - {{ collector.debug ? 'enabled' : 'disabled' }} -
    - {% endif %} -
    - -
    -
    - PHP version - - {{ collector.phpversion }} -   View phpinfo() - -
    - -
    - PHP Extensions - xdebug {{ collector.hasxdebug ? '✓' : '✗' }} - APCu {{ collector.hasapcu ? '✓' : '✗' }} - OPcache {{ collector.haszendopcache ? '✓' : '✗' }} -
    - -
    - PHP SAPI - {{ collector.sapiName }} -
    -
    - -
    - {% if collector.symfonyversion is defined %} - - - {% endif %} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status, additional_classes: 'sf-toolbar-block-right', block_attrs: 'title="' ~ symfony_version_status ~ '"' }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/config.svg') }} - Configuration - -{% endblock %} - -{% block panel %} -

    Symfony Configuration

    - -
    -
    - {{ collector.symfonyversion }} - Symfony version -
    - - {% if 'n/a' is not same as(collector.env) %} -
    - {{ collector.env }} - Environment -
    - {% endif %} - - {% if 'n/a' is not same as(collector.debug) %} -
    - {{ collector.debug ? 'enabled' : 'disabled' }} - Debug -
    - {% endif %} -
    - - {% set symfony_status = { dev: 'Unstable Version', stable: 'Stable Version', eom: 'Maintenance Ended', eol: 'Version Expired' } %} - {% set symfony_status_class = { dev: 'warning', stable: 'success', eom: 'warning', eol: 'error' } %} - - - - - - - - - - - - - - - - - -
    Symfony StatusBugs {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed untilSecurity issues {{ collector.symfonystate == 'eol' ? 'were' : 'are' }} fixed until
    - {{ symfony_status[collector.symfonystate]|upper }} - {% if collector.symfonylts %} -   Long-Term Support - {% endif %} - {{ collector.symfonyeom }}{{ collector.symfonyeol }} - View roadmap -
    - -

    PHP Configuration

    - -
    -
    - {{ collector.phpversion }}{% if collector.phpversionextra %} {{ collector.phpversionextra }}{% endif %} - PHP version -
    - -
    - {{ collector.phparchitecture }} bits - Architecture -
    - -
    - {{ collector.phpintllocale }} - Intl locale -
    - -
    - {{ collector.phptimezone }} - Timezone -
    -
    - -
    -
    - {{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} - OPcache -
    - -
    - {{ include('@WebProfiler/Icon/' ~ (collector.hasapcu ? 'yes' : 'no-gray') ~ '.svg') }} - APCu -
    - -
    - {{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no-gray') ~ '.svg') }} - Xdebug -
    -
    - -

    - View full PHP configuration -

    - - {% if collector.bundles %} -

    Enabled Bundles ({{ collector.bundles|length }})

    - - - - - - - - - {% for name in collector.bundles|keys|sort %} - - - - - {% endfor %} - -
    NameClass
    {{ name }}{{ profiler_dump(collector.bundles[name]) }}
    - {% endif %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig deleted file mode 100644 index c0be48a..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/events.html.twig +++ /dev/null @@ -1,119 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/event.svg') }} - Events - -{% endblock %} - -{% block panel %} -

    Event Dispatcher

    - - {% if collector.calledlisteners is empty %} -
    -

    No events have been recorded. Check that debugging is enabled in the kernel.

    -
    - {% else %} -
    -
    -

    Called Listeners {{ collector.calledlisteners|length }}

    - -
    - {{ helper.render_table(collector.calledlisteners) }} -
    -
    - -
    -

    Not Called Listeners {{ collector.notcalledlisteners|length }}

    -
    - {% if collector.notcalledlisteners is empty %} -
    -

    - There are no uncalled listeners. -

    -

    - All listeners were called for this request or an error occurred - when trying to collect uncalled listeners (in which case check the - logs to get more information). -

    -
    - {% else %} - {{ helper.render_table(collector.notcalledlisteners) }} - {% endif %} -
    -
    - -
    -

    Orphaned Events {{ collector.orphanedEvents|length }}

    -
    - {% if collector.orphanedEvents is empty %} -
    -

    - There are no orphaned events. -

    -

    - All dispatched events were handled or an error occurred - when trying to collect orphaned events (in which case check the - logs to get more information). -

    -
    - {% else %} - - - - - - - - {% for event in collector.orphanedEvents %} - - - - {% endfor %} - -
    Event
    {{ event }}
    - {% endif %} -
    -
    -
    - {% endif %} -{% endblock %} - -{% macro render_table(listeners) %} - - - - - - - - - {% set previous_event = (listeners|first).event %} - {% for listener in listeners %} - {% if loop.first or listener.event != previous_event %} - {% if not loop.first %} - - {% endif %} - - - - - - - {% set previous_event = listener.event %} - {% endif %} - - - - - - - {% if loop.last %} - - {% endif %} - {% endfor %} -
    PriorityListener
    {{ listener.event }}
    {{ listener.priority|default('-') }}{{ profiler_dump(listener.stub) }}
    -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig deleted file mode 100644 index aad7625..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.css.twig +++ /dev/null @@ -1,32 +0,0 @@ -.container { - max-width: none; - margin: 0; - padding: 0; -} -.container .container { - padding: 0; -} - -.exception-summary { - background: var(--base-0); - border: var(--border); - box-shadow: 0 0 1px rgba(128, 128, 128, .2); - margin: 1em 0; - padding: 10px; -} -.exception-summary.exception-without-message { - display: none; -} - -.exception-message { - color: var(--color-error); -} - -.exception-metadata, -.exception-illustration { - display: none; -} - -.exception-message-wrapper .container { - min-height: unset; -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig deleted file mode 100644 index 1fe0f5d..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/exception.html.twig +++ /dev/null @@ -1,37 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block head %} - {% if collector.hasexception %} - - {% endif %} - {{ parent() }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/exception.svg') }} - Exception - {% if collector.hasexception %} - - 1 - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Exceptions

    - - {% if not collector.hasexception %} -
    -

    No exception was thrown and caught during the request.

    -
    - {% else %} -
    - {{ render(controller('web_profiler.controller.exception_panel::body', { token: token })) }} -
    - {% endif %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig deleted file mode 100644 index db97100..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/form.html.twig +++ /dev/null @@ -1,730 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% from _self import form_tree_entry, form_tree_details %} - -{% block toolbar %} - {% if collector.data.nb_errors > 0 or collector.data.forms|length %} - {% set status_color = collector.data.nb_errors ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/form.svg') }} - - {{ collector.data.nb_errors ?: collector.data.forms|length }} - - {% endset %} - - {% set text %} -
    - Number of forms - {{ collector.data.forms|length }} -
    -
    - Number of errors - {{ collector.data.nb_errors }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/form.svg') }} - Forms - {% if collector.data.nb_errors > 0 %} - - {{ collector.data.nb_errors }} - - {% endif %} - -{% endblock %} - -{% block head %} - {{ parent() }} - - -{% endblock %} - -{% block panel %} -

    Forms

    - - {% if collector.data.forms|length %} -
    -
      - {% for formName, formData in collector.data.forms %} - {{ form_tree_entry(formName, formData, true) }} - {% endfor %} -
    -
    - -
    - {% for formName, formData in collector.data.forms %} - {{ form_tree_details(formName, formData, collector.data.forms_by_hash, loop.first) }} - {% endfor %} -
    - {% else %} -
    -

    No forms were submitted for this request.

    -
    - {% endif %} - - -{% endblock %} - -{% macro form_tree_entry(name, data, is_root) %} - {% import _self as tree %} - {% set has_error = data.errors is defined and data.errors|length > 0 %} -
  • -
    - {% if has_error %} -
    {{ data.errors|length }}
    - {% endif %} - - {% if data.children is not empty %} - - {% else %} -
    - {% endif %} - - - {{ name|default('(no name)') }} - -
    - - {% if data.children is not empty %} -
      - {% for childName, childData in data.children %} - {{ tree.form_tree_entry(childName, childData, false) }} - {% endfor %} -
    - {% endif %} -
  • -{% endmacro %} - -{% macro form_tree_details(name, data, forms_by_hash, show) %} - {% import _self as tree %} -
    -

    {{ name|default('(no name)') }}

    - {% if data.type_class is defined %} -

    {{ profiler_dump(data.type_class) }}

    - {% endif %} - - {% if data.errors is defined and data.errors|length > 0 %} -
    -

    - - Errors - -

    - - - - - - - - - - - {% for error in data.errors %} - - - - - - {% endfor %} - -
    MessageOriginCause
    {{ error.message }} - {% if error.origin is empty %} - This form. - {% elseif forms_by_hash[error.origin] is not defined %} - Unknown. - {% else %} - {{ forms_by_hash[error.origin].name }} - {% endif %} - - {% if error.trace %} - Caused by: - {% for stacked in error.trace %} - {{ profiler_dump(stacked) }} - {% endfor %} - {% else %} - Unknown. - {% endif %} -
    -
    - {% endif %} - - {% if data.default_data is defined %} -

    - - Default Data - -

    - -
    - - - - - - - - - - - - - - - - - - - - - -
    PropertyValue
    Model Format - {% if data.default_data.model is defined %} - {{ profiler_dump(data.default_data.seek('model')) }} - {% else %} - same as normalized format - {% endif %} -
    Normalized Format{{ profiler_dump(data.default_data.seek('norm')) }}
    View Format - {% if data.default_data.view is defined %} - {{ profiler_dump(data.default_data.seek('view')) }} - {% else %} - same as normalized format - {% endif %} -
    -
    - {% endif %} - - {% if data.submitted_data is defined %} -

    - - Submitted Data - -

    - -
    - {% if data.submitted_data.norm is defined %} - - - - - - - - - - - - - - - - - - - - - -
    PropertyValue
    View Format - {% if data.submitted_data.view is defined %} - {{ profiler_dump(data.submitted_data.seek('view')) }} - {% else %} - same as normalized format - {% endif %} -
    Normalized Format{{ profiler_dump(data.submitted_data.seek('norm')) }}
    Model Format - {% if data.submitted_data.model is defined %} - {{ profiler_dump(data.submitted_data.seek('model')) }} - {% else %} - same as normalized format - {% endif %} -
    - {% else %} -
    -

    This form was not submitted.

    -
    - {% endif %} -
    - {% endif %} - - {% if data.passed_options is defined %} -

    - - Passed Options - -

    - -
    - {% if data.passed_options|length %} - - - - - - - - - - {% for option, value in data.passed_options %} - - - - - - {% endfor %} - -
    OptionPassed ValueResolved Value
    {{ option }}{{ profiler_dump(value) }} - {# values can be stubs #} - {% set option_value = value.value|default(value) %} - {% set resolved_option_value = data.resolved_options[option].value|default(data.resolved_options[option]) %} - {% if resolved_option_value == option_value %} - same as passed value - {% else %} - {{ profiler_dump(data.resolved_options.seek(option)) }} - {% endif %} -
    - {% else %} -
    -

    No options were passed when constructing this form.

    -
    - {% endif %} -
    - {% endif %} - - {% if data.resolved_options is defined %} -

    - - Resolved Options - -

    - - - {% endif %} - - {% if data.view_vars is defined %} -

    - - View Variables - -

    - - - {% endif %} -
    - - {% for childName, childData in data.children %} - {{ tree.form_tree_details(childName, childData, forms_by_hash) }} - {% endfor %} -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig deleted file mode 100644 index 8496ef1..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig +++ /dev/null @@ -1,131 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.requestCount %} - {% set icon %} - {{ include('@WebProfiler/Icon/http-client.svg') }} - {% set status_color = '' %} - {{ collector.requestCount }} - {% endset %} - - {% set text %} -
    - Total requests - {{ collector.requestCount }} -
    -
    - HTTP errors - {{ collector.errorCount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/http-client.svg') }} - HTTP Client - {% if collector.requestCount %} - - {{ collector.requestCount }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    HTTP Client

    - {% if collector.requestCount == 0 %} -
    -

    No HTTP requests were made.

    -
    - {% else %} -
    -
    - {{ collector.requestCount }} - Total requests -
    -
    - {{ collector.errorCount }} - HTTP errors -
    -
    -

    Clients

    -
    - {% for name, client in collector.clients %} -
    -

    {{ name }} {{ client.traces|length }}

    -
    - {% if client.traces|length == 0 %} -
    -

    No requests were made with the "{{ name }}" service.

    -
    - {% else %} -

    Requests

    - {% for trace in client.traces %} - {% set profiler_token = '' %} - {% set profiler_link = '' %} - {% if trace.info.response_headers is defined %} - {% for header in trace.info.response_headers %} - {% if header matches '/^x-debug-token: .*$/i' %} - {% set profiler_token = (header.getValue | slice('x-debug-token: ' | length)) %} - {% endif %} - {% if header matches '/^x-debug-token-link: .*$/i' %} - {% set profiler_link = (header.getValue | slice('x-debug-token-link: ' | length)) %} - {% endif %} - {% endfor %} - {% endif %} - - - - - - {% if profiler_token and profiler_link %} - - {% endif %} - - - - - - - {% if profiler_token and profiler_link %} - - {% endif %} - - -
    - {{ trace.method }} - - {{ trace.url }} - {% if trace.options is not empty %} - {{ profiler_dump(trace.options, maxDepth=1) }} - {% endif %} - - Profile -
    - {% if trace.http_code >= 500 %} - {% set responseStatus = 'error' %} - {% elseif trace.http_code >= 400 %} - {% set responseStatus = 'warning' %} - {% else %} - {% set responseStatus = 'success' %} - {% endif %} - - {{ trace.http_code }} - - - {{ profiler_dump(trace.info, maxDepth=1) }} - - {{ profiler_token }} -
    - {% endfor %} - {% endif %} -
    -
    - {% endfor %} - {% endif %} -
    -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig deleted file mode 100644 index df2679d..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/logger.html.twig +++ /dev/null @@ -1,274 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} - {% set icon %} - {% set status_color = collector.counterrors ? 'red' : collector.countwarnings ? 'yellow' : 'none' %} - {{ include('@WebProfiler/Icon/logger.svg') }} - {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} - {% endset %} - - {% set text %} -
    - Errors - {{ collector.counterrors|default(0) }} -
    - -
    - Warnings - {{ collector.countwarnings|default(0) }} -
    - -
    - Deprecations - {{ collector.countdeprecations|default(0) }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/logger.svg') }} - Logs - {% if collector.counterrors or collector.countdeprecations or collector.countwarnings %} - - {{ collector.counterrors ?: (collector.countdeprecations + collector.countwarnings) }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Log Messages

    - - {% if collector.processedLogs is empty %} -
    -

    No log messages available.

    -
    - {% else %} - {% set has_error_logs = collector.processedLogs|column('type')|filter(type => 'error' == type)|length > 0 %} - {% set has_deprecation_logs = collector.processedLogs|column('type')|filter(type => 'deprecation' == type)|length > 0 %} - - {% set filters = collector.filters %} -
    -
    -
      -
    • - - -
    • - -
    • - - -
    • - -
    • - - -
    • -
    -
    - -
    - - {{ include('@WebProfiler/Icon/filter.svg') }} - Level ({{ filters.priority|length - 1 }}) - - -
    -
    - - -
    - - {% for label, value in filters.priority %} -
    - - -
    - {% endfor %} -
    -
    - -
    - - {{ include('@WebProfiler/Icon/filter.svg') }} - Channel ({{ filters.channel|length - 1 }}) - - -
    -
    - - -
    - - {% for value in filters.channel %} -
    - - -
    - {% endfor %} -
    -
    -
    - - - - - - - - - - - - - - {% for log in collector.processedLogs %} - {% set css_class = 'error' == log.type ? 'error' - : (log.priorityName == 'WARNING' or 'deprecation' == log.type) ? 'warning' - : 'silenced' == log.type ? 'silenced' - %} - - - - - - {% endfor %} - -
    TimeMessage
    - - - {% if log.type in ['error', 'deprecation', 'silenced'] or 'WARNING' == log.priorityName %} - - {% if 'error' == log.type or 'WARNING' == log.priorityName %} - {{ log.priorityName|lower }} - {% else %} - {{ log.type|lower }} - {% endif %} - - {% else %} - - {{ log.priorityName|lower }} - - {% endif %} - - {{ helper.render_log_message('debug', loop.index, log) }} -
    - -
    -

    There are no log messages.

    -
    - - - {% endif %} - - {% set compilerLogTotal = 0 %} - {% for logs in collector.compilerLogs %} - {% set compilerLogTotal = compilerLogTotal + logs|length %} - {% endfor %} - -
    - -

    Container Compilation Logs ({{ compilerLogTotal }})

    -

    Log messages generated during the compilation of the service container.

    -
    - - {% if collector.compilerLogs is empty %} -
    -

    There are no compiler log messages.

    -
    - {% else %} - - - - - - - - - - {% for class, logs in collector.compilerLogs %} - - - - - {% endfor %} - -
    MessagesClass
    {{ logs|length }} - {% set context_id = 'context-compiler-' ~ loop.index %} - - - -
    -
      - {% for log in logs %} -
    • {{ profiler_dump_log(log.message) }}
    • - {% endfor %} -
    -
    -
    - {% endif %} -
    -{% endblock %} - -{% macro render_log_message(category, log_index, log) %} - {% set has_context = log.context is defined and log.context is not empty %} - {% set has_trace = log.context.exception.trace is defined %} - - {% if not has_context %} - {{ profiler_dump_log(log.message) }} - {% else %} - {{ profiler_dump_log(log.message, log.context) }} - {% endif %} - - -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig deleted file mode 100644 index dab2e9c..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/mailer.html.twig +++ /dev/null @@ -1,217 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set events = collector.events %} - - {% if events.messages|length %} - {% set icon %} - {% include('@WebProfiler/Icon/mailer.svg') %} - {{ events.messages|length }} - {% endset %} - - {% set text %} -
    - Queued messages - {{ events.events|filter(e => e.isQueued())|length }} -
    -
    - Sent messages - {{ events.events|filter(e => not e.isQueued())|length }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} - {% endif %} -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block menu %} - {% set events = collector.events %} - - - {{ include('@WebProfiler/Icon/mailer.svg') }} - - E-mails - {% if events.messages|length > 0 %} - - {{ events.messages|length }} - - {% endif %} - -{% endblock %} - -{% block panel %} - {% set events = collector.events %} - -

    Emails

    - - {% if not events.messages|length %} -
    -

    No emails were sent.

    -
    - {% endif %} - -
    -
    - {{ events.events|filter(e => e.isQueued())|length }} - Queued -
    - -
    - {{ events.events|filter(e => not e.isQueued())|length }} - Sent -
    -
    - - {% for transport in events.transports %} -
    -
    - {% for event in events.events(transport) %} - {% set message = event.message %} -
    -

    Email {{ event.isQueued() ? 'queued' : 'sent via ' ~ transport }}

    -
    -
    - {% if message.headers is not defined %} - {# RawMessage instance #} -
    -
    {{ message.toString() }}
    -
    - {% else %} - {# Message instance #} -
    -
    -
    -

    Headers

    -
    - Subject -

    {{ message.headers.get('subject').bodyAsString() ?? '(empty)' }}

    -
    -
    - From -
    {{ (message.headers.get('from').bodyAsString() ?? '(empty)')|replace({'From:': ''}) }}
    - - To -
    {{ (message.headers.get('to').bodyAsString() ?? '(empty)')|replace({'To:': ''}) }}
    -
    -
    - Headers -
    {% for header in message.headers.all|filter(header => (header.name ?? '') not in ['Subject', 'From', 'To']) %}
    -                                                                {{- header.toString }}
    -                                                            {%~ endfor %}
    -
    -
    -
    -
    - {% if message.htmlBody is defined %} - {# Email instance #} - {% set htmlBody = message.htmlBody() %} - {% if htmlBody is not null %} -
    -

    HTML Preview

    -
    -
    -                                                                
    -                                                            
    -
    -
    -
    -

    HTML Content

    -
    -
    -                                                                {%- if message.htmlCharset() %}
    -                                                                    {{- htmlBody|convert_encoding('UTF-8', message.htmlCharset()) }}
    -                                                                {%- else %}
    -                                                                    {{- htmlBody }}
    -                                                                {%- endif -%}
    -                                                            
    -
    -
    - {% endif %} - {% set textBody = message.textBody() %} - {% if textBody is not null %} -
    -

    Text Content

    -
    -
    -                                                                {%- if message.textCharset() %}
    -                                                                    {{- textBody|convert_encoding('UTF-8', message.textCharset()) }}
    -                                                                {%- else %}
    -                                                                    {{- textBody }}
    -                                                                {%- endif -%}
    -                                                            
    -
    -
    - {% endif %} - {% for attachment in message.attachments %} -
    -

    Attachment #{{ loop.index }}

    -
    -
    {{ attachment.toString() }}
    -
    -
    - {% endfor %} - {% endif %} -
    -

    Parts Hierarchy

    -
    -
    {{ message.body().asDebugString() }}
    -
    -
    -
    -

    Raw

    -
    -
    {{ message.toString() }}
    -
    -
    -
    -
    - {% endif %} -
    -
    -
    - {% endfor %} -
    -
    - {% endfor %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig deleted file mode 100644 index 1336a57..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig +++ /dev/null @@ -1,24 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set icon %} - {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' %} - {{ include('@WebProfiler/Icon/memory.svg') }} - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} - MiB - {% endset %} - - {% set text %} -
    - Peak memory usage - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MiB -
    - -
    - PHP memory limit - {{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MiB'|format(collector.memoryLimit / 1024 / 1024) }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, name: 'time', status: status_color }) }} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig deleted file mode 100644 index b48aaa8..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/messenger.html.twig +++ /dev/null @@ -1,201 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.messages|length > 0 %} - {% set status_color = collector.exceptionsCount ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/messenger.svg') }} - {{ collector.messages|length }} - {% endset %} - - {% set text %} - {% for bus in collector.buses %} - {% set exceptionsCount = collector.exceptionsCount(bus) %} -
    - {{ bus }} - - {{ collector.messages(bus)|length }} - -
    - {% endfor %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: 'messenger', status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/messenger.svg') }} - Messages - {% if collector.exceptionsCount > 0 %} - - {{ collector.exceptionsCount }} - - {% endif %} - -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block panel %} - {% import _self as helper %} - -

    Messages

    - - {% if collector.messages is empty %} -
    -

    No messages have been collected.

    -
    - {% else %} -
    -
    - {% set messages = collector.messages %} - {% set exceptionsCount = collector.exceptionsCount %} -

    All{{ messages|length }}

    - -
    -

    Ordered list of dispatched messages across all your buses

    - {{ helper.render_bus_messages(messages, true) }} -
    -
    - - {% for bus in collector.buses %} -
    - {% set messages = collector.messages(bus) %} - {% set exceptionsCount = collector.exceptionsCount(bus) %} -

    {{ bus }}{{ messages|length }}

    - -
    -

    Ordered list of messages dispatched on the {{ bus }} bus

    - {{ helper.render_bus_messages(messages) }} -
    -
    - {% endfor %} -
    - {% endif %} - -{% endblock %} - -{% macro render_bus_messages(messages, showBus = false) %} - {% set discr = random() %} - {% for dispatchCall in messages %} - - - - - - - - - - - {% if showBus %} - - - - - {% endif %} - - - - - - - - - {% if dispatchCall.stamps_after_dispatch is defined %} - - - - - {% endif %} - {% if dispatchCall.exception is defined %} - - - - - {% endif %} - -
    - {{ profiler_dump(dispatchCall.message.type) }} - {% if showBus %} - {{ dispatchCall.bus }} - {% endif %} - {% if dispatchCall.exception is defined %} - exception - {% endif %} - - {{ include('@WebProfiler/images/icon-minus-square.svg') }} - {{ include('@WebProfiler/images/icon-plus-square.svg') }} - -
    - - - -
    Bus{{ dispatchCall.bus }}
    Message{{ profiler_dump(dispatchCall.message.value, maxDepth=2) }}
    Envelope stamps when dispatching - {% for item in dispatchCall.stamps %} - {{ profiler_dump(item) }} - {% else %} - No items - {% endfor %} -
    Envelope stamps after dispatch - {% for item in dispatchCall.stamps_after_dispatch %} - {{ profiler_dump(item) }} - {% else %} - No items - {% endfor %} -
    Exception - {{ profiler_dump(dispatchCall.exception.value, maxDepth=1) }} -
    - {% endfor %} -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig deleted file mode 100644 index dd17fab..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/notifier.html.twig +++ /dev/null @@ -1,168 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set events = collector.events %} - - {% if events.messages|length %} - {% set icon %} - {% include('@WebProfiler/Icon/notifier.svg') %} - {{ events.messages|length }} - {% endset %} - - {% set text %} -
    - Sent notifications - {{ events.messages|length }} -
    - - {% for transport in events.transports %} -
    - {{ transport }} - {{ events.messages(transport)|length }} -
    - {% endfor %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} - {% endif %} -{% endblock %} - -{% block head %} - {{ parent() }} - -{% endblock %} - -{% block menu %} - {% set events = collector.events %} - - - {{ include('@WebProfiler/Icon/notifier.svg') }} - - Notifications - {% if events.messages|length > 0 %} - - {{ events.messages|length }} - - {% endif %} - -{% endblock %} - -{% block panel %} - {% set events = collector.events %} - -

    Notifications

    - - {% if not events.messages|length %} -
    -

    No notifications were sent.

    -
    - {% endif %} - -
    - {% for transport in events.transports %} -
    - {{ events.messages(transport)|length }} - {{ transport }} -
    - {% endfor %} -
    - - {% for transport in events.transports %} -

    {{ transport }}

    - -
    -
    - {% for event in events.events(transport) %} - {% set message = event.message %} -
    -

    Message #{{ loop.index }} ({{ event.isQueued() ? 'queued' : 'sent' }})

    -
    -
    -
    - Subject -

    {{ message.getSubject() ?? '(empty)' }}

    -
    - {% if message.getNotification is defined %} -
    -
    -
    - Content -
    {{ message.getNotification().getContent() ?? '(empty)' }}
    - Importance -
    {{ message.getNotification().getImportance() }}
    -
    -
    -
    - {% endif %} -
    -
    - {% if message.getNotification is defined %} -
    -

    Notification

    - {% set notification = event.message.getNotification() %} -
    -
    -                                                            {{- 'Subject: ' ~ notification.getSubject() }}
    - {{- 'Content: ' ~ notification.getContent() }}
    - {{- 'Importance: ' ~ notification.getImportance() }}
    - {{- 'Emoji: ' ~ (notification.getEmoji() is empty ? '(empty)' : notification.getEmoji()) }}
    - {{- 'Exception: ' ~ notification.getException() ?? '(empty)' }}
    - {{- 'ExceptionAsString: ' ~ (notification.getExceptionAsString() is empty ? '(empty)' : notification.getExceptionAsString()) }} -
    -
    -
    - {% endif %} -
    -

    Message Options

    -
    -
    -                                                            {%- if message.getOptions() is null %}
    -                                                                {{- '(empty)' }}
    -                                                            {%- else %}
    -                                                                {{- message.getOptions()|json_encode(constant('JSON_PRETTY_PRINT')) }}
    -                                                            {%- endif %}
    -                                                        
    -
    -
    -
    -
    -
    -
    -
    - {% endfor %} -
    -
    - {% endfor %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig deleted file mode 100644 index 18311c1..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/request.html.twig +++ /dev/null @@ -1,392 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% import _self as helper %} - {% set request_handler %} - {{ helper.set_handler(collector.controller) }} - {% endset %} - - {% if collector.redirect %} - {% set redirect_handler %} - {{ helper.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} - {% endset %} - {% endif %} - - {% if collector.forwardtoken %} - {% set forward_profile = profile.childByToken(collector.forwardtoken) %} - {% set forward_handler %} - {{ helper.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} - {% endset %} - {% endif %} - - {% set request_status_code_color = (collector.statuscode >= 400) ? 'red' : (collector.statuscode >= 300) ? 'yellow' : 'green' %} - - {% set icon %} - {{ collector.statuscode }} - {% if collector.route %} - {% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %} - {% if collector.forwardtoken %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %} - {{ 'GET' != collector.method ? collector.method }} @ - {{ collector.route }} - {% endif %} - {% endset %} - - {% set text %} -
    -
    - HTTP status - {{ collector.statuscode }} {{ collector.statustext }} -
    - - {% if 'GET' != collector.method -%} -
    - Method - {{ collector.method }} -
    - {%- endif %} - -
    - Controller - {{ request_handler }} -
    - -
    - Route name - {{ collector.route|default('n/a') }} -
    - -
    - Has session - {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %} -
    - -
    - Stateless Check - {% if collector.statelesscheck %}yes{% else %}no{% endif %} -
    -
    - - {% if redirect_handler is defined -%} -
    -
    - - {{ collector.redirect.status_code }} - Redirect from - - - {{ redirect_handler }} - ({{ collector.redirect.token }}) - -
    -
    - {% endif %} - - {% if forward_handler is defined %} -
    -
    - Forwarded to - - {{ forward_handler }} - ({{ collector.forwardtoken }}) - -
    -
    - {% endif %} - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/request.svg') }} - Request / Response - -{% endblock %} - -{% block panel %} - {% import _self as helper %} - -

    - {{ helper.set_handler(collector.controller) }} -

    - -
    -
    -

    Request

    - -
    -

    GET Parameters

    - - {% if collector.requestquery.all is empty %} -
    -

    No GET parameters

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    POST Parameters

    - - {% if collector.requestrequest.all is empty %} -
    -

    No POST parameters

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    Uploaded Files

    - - {% if collector.requestfiles is empty %} -
    -

    No files were uploaded

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestfiles, maxDepth: 1 }, with_context = false) }} - {% endif %} - -

    Request Attributes

    - - {% if collector.requestattributes.all is empty %} -
    -

    No attributes

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestattributes }, with_context = false) }} - {% endif %} - -

    Request Headers

    - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} - -

    Request Content

    - - {% if collector.content == false %} -
    -

    Request content not available (it was retrieved as a resource).

    -
    - {% elseif collector.content %} -
    - {% set prettyJson = collector.isJsonRequest ? collector.prettyJson : null %} - {% if prettyJson is not null %} -
    -

    Pretty

    -
    -
    -
    {{ prettyJson }}
    -
    -
    -
    - {% endif %} - -
    -

    Raw

    -
    -
    -
    {{ collector.content }}
    -
    -
    -
    -
    - {% else %} -
    -

    No content

    -
    - {% endif %} -
    -
    - -
    -

    Response

    - -
    -

    Response Headers

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responseheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }} -
    -
    - -
    -

    Cookies

    - -
    -

    Request Cookies

    - - {% if collector.requestcookies.all is empty %} -
    -

    No request cookies

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestcookies }, with_context = false) }} - {% endif %} - -

    Response Cookies

    - - {% if collector.responsecookies.all is empty %} -
    -

    No response cookies

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responsecookies }, with_context = true) }} - {% endif %} -
    -
    - - - -
    -

    Flashes

    - -
    -

    Flashes

    - - {% if collector.flashes is empty %} -
    -

    No flash messages were created.

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.flashes }, with_context = false) }} - {% endif %} -
    -
    - -
    -

    Server Parameters

    -
    -

    Server Parameters

    -

    Defined in .env

    - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }} - -

    Defined as regular env variables

    - {% set requestserver = [] %} - {% for key, value in collector.requestserver|filter((_, key) => key not in collector.dotenvvars.keys) %} - {% set requestserver = requestserver|merge({(key): value}) %} - {% endfor %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }} -
    -
    - - {% if profile.parent %} -
    -

    Parent Request

    - -
    -

    - Return to parent request - (token = {{ profile.parent.token }}) -

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: profile.parent.getcollector('request').requestattributes }, with_context = false) }} -
    -
    - {% endif %} - - {% if profile.children|length %} -
    -

    Sub Requests {{ profile.children|length }}

    - -
    - {% for child in profile.children %} -

    - {{ helper.set_handler(child.getcollector('request').controller) }} - (token = {{ child.token }}) -

    - - {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: child.getcollector('request').requestattributes }, with_context = false) }} - {% endfor %} -
    -
    - {% endif %} -
    -{% endblock %} - -{% macro set_handler(controller, route, method) %} - {% if controller.class is defined -%} - {%- if method|default(false) %}{{ method }}{% endif -%} - {%- set link = controller.file|file_link(controller.line) %} - {%- if link %}{% else %}{% endif %} - - {%- if route|default(false) -%} - @{{ route }} - {%- else -%} - {{- controller.class|abbr_class|striptags -}} - {{- controller.method ? ' :: ' ~ controller.method -}} - {%- endif -%} - - {%- if link %}{% else %}
    {% endif %} - {%- else -%} - {{ route|default(controller) }} - {%- endif %} -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig deleted file mode 100644 index a1449c2..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/router.html.twig +++ /dev/null @@ -1,14 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %}{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/router.svg') }} - Routing - -{% endblock %} - -{% block panel %} - {{ render(controller('web_profiler.controller.router::panelAction', { token: token })) }} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig deleted file mode 100644 index b64b6ff..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.css.twig +++ /dev/null @@ -1,64 +0,0 @@ -/* Legend */ - -.sf-profiler-timeline .legends .timeline-category { - border: none; - background: none; - border-left: 1em solid transparent; - line-height: 1em; - margin: 0 1em 0 0; - padding: 0 0.5em; - display: none; - opacity: 0.5; -} - -.sf-profiler-timeline .legends .timeline-category.active { - opacity: 1; -} - -.sf-profiler-timeline .legends .timeline-category.present { - display: inline-block; -} - -.timeline-graph { - margin: 1em 0; - width: 100%; - background-color: var(--table-background); - border: 1px solid var(--table-border); -} - -/* Typography */ - -.timeline-graph .timeline-label { - font-family: var(--font-sans-serif); - font-size: 12px; - line-height: 12px; - font-weight: normal; - fill: var(--color-text); -} - -.timeline-graph .timeline-label .timeline-sublabel { - margin-left: 1em; - fill: var(--color-muted); -} - -.timeline-graph .timeline-subrequest, -.timeline-graph .timeline-border { - fill: none; - stroke: var(--table-border); - stroke-width: 1px; -} - -.timeline-graph .timeline-subrequest { - fill: url(#subrequest); - fill-opacity: 0.5; -} - -.timeline-subrequest-pattern { - fill: var(--table-border); -} - -/* Timeline periods */ - -.timeline-graph .timeline-period { - stroke-width: 0; -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig deleted file mode 100644 index 0ed3ddc..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig +++ /dev/null @@ -1,214 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% set has_time_events = collector.events|length > 0 %} - {% set total_time = has_time_events ? '%.0f'|format(collector.duration) : 'n/a' %} - {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %} - {% set status_color = has_time_events and collector.duration > 1000 ? 'yellow' %} - - {% set icon %} - {{ include('@WebProfiler/Icon/time.svg') }} - {{ total_time }} - ms - {% endset %} - - {% set text %} -
    - Total time - {{ total_time }} ms -
    -
    - Initialization time - {{ initialization_time }} ms -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/time.svg') }} - Performance - -{% endblock %} - -{% block panel %} - {% set has_time_events = collector.events|length > 0 %} -

    Performance metrics

    - -
    -
    - {{ '%.0f'|format(collector.duration) }} ms - Total execution time -
    - -
    - {{ '%.0f'|format(collector.inittime) }} ms - Symfony initialization -
    - - {% if profile.collectors.memory %} -
    - {{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} MiB - Peak memory usage -
    - {% endif %} - - {% if profile.children|length > 0 %} -
    - -
    - {{ profile.children|length }} - Sub-Request{{ profile.children|length > 1 ? 's' }} -
    - - {% if has_time_events %} - {% set subrequests_time = 0 %} - {% for child in profile.children %} - {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %} - {% endfor %} - {% else %} - {% set subrequests_time = 'n/a' %} - {% endif %} - -
    - {{ subrequests_time }} ms - Sub-Request{{ profile.children|length > 1 ? 's' }} time -
    - {% endif %} -
    - -

    Execution timeline

    - - {% if not collector.isStopwatchInstalled() %} -
    -

    The Stopwatch component is not installed. If you want to see timing events, run: composer require symfony/stopwatch.

    -
    - {% elseif collector.events is empty %} -
    -

    No timing events have been recorded. Check that symfony/stopwatch is installed and debugging enabled in the kernel.

    -
    - {% else %} - {{ block('panelContent') }} - {% endif %} -{% endblock %} - -{% block panelContent %} -
    - - - ms - (timeline only displays events with a duration longer than this threshold) -
    - - {% if profile.parent %} -

    - Sub-Request {{ profiler_dump(profile.getcollector('request').requestattributes.get('_controller')) }} - - {{ collector.events.__section__.duration }} ms - Return to parent request - -

    - {% elseif profile.children|length > 0 %} -

    - Main Request {{ collector.events.__section__.duration }} ms -

    - {% endif %} - - {{ helper.display_timeline(token, collector.events, collector.events.__section__.origin) }} - - {% if profile.children|length %} -

    Note: sections with a striped background correspond to sub-requests.

    - -

    Sub-requests ({{ profile.children|length }})

    - - {% for child in profile.children %} - {% set events = child.getcollector('time').events %} -

    - {{ child.getcollector('request').identifier }} - {{ events.__section__.duration }} ms -

    - - {{ helper.display_timeline(child.token, events, collector.events.__section__.origin) }} - {% endfor %} - {% endif %} - - - - - - - - - - -{% endblock %} - -{% macro dump_request_data(token, events, origin) %} -{% autoescape 'js' %} -{% from _self import dump_events %} -{ - id: "{{ token }}", - left: {{ "%F"|format(events.__section__.origin - origin) }}, - end: "{{ '%F'|format(events.__section__.endtime) }}", - events: [ {{ dump_events(events) }} ], -} -{% endautoescape %} -{% endmacro %} - -{% macro dump_events(events) %} -{% autoescape 'js' %} -{% for name, event in events %} -{% if '__section__' != name %} -{ - name: "{{ name }}", - category: "{{ event.category }}", - origin: {{ "%F"|format(event.origin) }}, - starttime: {{ "%F"|format(event.starttime) }}, - endtime: {{ "%F"|format(event.endtime) }}, - duration: {{ "%F"|format(event.duration) }}, - memory: {{ "%.1F"|format(event.memory / 1024 / 1024) }}, - elements: {}, - periods: [ - {%- for period in event.periods -%} - { - start: {{ "%F"|format(period.starttime) }}, - end: {{ "%F"|format(period.endtime) }}, - duration: {{ "%F"|format(period.duration) }}, - elements: {} - }, - {%- endfor -%} - ], -}, -{% endif %} -{% endfor %} -{% endautoescape %} -{% endmacro %} - -{% macro display_timeline(token, events, origin) %} -{% import _self as helper %} -
    -
    - - -
    -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.js b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.js deleted file mode 100644 index 156c934..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.js +++ /dev/null @@ -1,457 +0,0 @@ -'use strict'; - -class TimelineEngine { - /** - * @param {Theme} theme - * @param {Renderer} renderer - * @param {Legend} legend - * @param {Element} threshold - * @param {Object} request - * @param {Number} eventHeight - * @param {Number} horizontalMargin - */ - constructor(theme, renderer, legend, threshold, request, eventHeight = 36, horizontalMargin = 10) { - this.theme = theme; - this.renderer = renderer; - this.legend = legend; - this.threshold = threshold; - this.request = request; - this.scale = renderer.width / request.end; - this.eventHeight = eventHeight; - this.horizontalMargin = horizontalMargin; - this.labelY = Math.round(this.eventHeight * 0.48); - this.periodY = Math.round(this.eventHeight * 0.66); - this.FqcnMatcher = /\\([^\\]+)$/i; - this.origin = null; - - this.createEventElements = this.createEventElements.bind(this); - this.createBackground = this.createBackground.bind(this); - this.createPeriod = this.createPeriod.bind(this); - this.render = this.render.bind(this); - this.renderEvent = this.renderEvent.bind(this); - this.renderPeriod = this.renderPeriod.bind(this); - this.onResize = this.onResize.bind(this); - this.isActive = this.isActive.bind(this); - - this.threshold.addEventListener('change', this.render); - this.legend.addEventListener('change', this.render); - - window.addEventListener('resize', this.onResize); - - this.createElements(); - this.render(); - } - - onResize() { - this.renderer.measure(); - this.setScale(this.renderer.width / this.request.end); - } - - setScale(scale) { - if (scale !== this.scale) { - this.scale = scale; - this.render(); - } - } - - createElements() { - this.origin = this.renderer.setFullVerticalLine(this.createBorder(), 0); - this.renderer.add(this.origin); - - this.request.events - .filter(event => event.category === 'section') - .map(this.createBackground) - .forEach(this.renderer.add); - - this.request.events - .map(this.createEventElements) - .forEach(this.renderer.add); - } - - createBackground(event) { - const subrequest = event.name === '__section__.child'; - const background = this.renderer.create('rect', subrequest ? 'timeline-subrequest' : 'timeline-border'); - - event.elements = Object.assign(event.elements || {}, { background }); - - return background; - } - - createEventElements(event) { - const { name, category, duration, memory, periods } = event; - const border = this.renderer.setFullHorizontalLine(this.createBorder(), 0); - const lines = periods.map(period => this.createPeriod(period, category)); - const label = this.createLabel(this.getShortName(name), duration, memory, periods[0]); - const title = this.renderer.createTitle(name); - const group = this.renderer.group([title, border, label].concat(lines), this.theme.getCategoryColor(event.category)); - - event.elements = Object.assign(event.elements || {}, { group, label, border }); - - this.legend.add(event.category) - - return group; - } - - createLabel(name, duration, memory, period) { - const label = this.renderer.createText(name, period.start * this.scale, this.labelY, 'timeline-label'); - const sublabel = this.renderer.createTspan(` ${duration} ms / ${memory} MiB`, 'timeline-sublabel'); - - label.appendChild(sublabel); - - return label; - } - - createPeriod(period, category) { - const timeline = this.renderer.createPath(null, 'timeline-period', this.theme.getCategoryColor(category)); - - period.draw = category === 'section' ? this.renderer.setSectionLine : this.renderer.setPeriodLine; - period.elements = Object.assign(period.elements || {}, { timeline }); - - return timeline; - } - - createBorder() { - return this.renderer.createPath(null, 'timeline-border'); - } - - isActive(event) { - const { duration, category } = event; - - return duration >= this.threshold.value && this.legend.isActive(category); - } - - render() { - const events = this.request.events.filter(this.isActive); - const width = this.renderer.width + this.horizontalMargin * 2; - const height = this.eventHeight * events.length; - - // Set view box - this.renderer.setViewBox(-this.horizontalMargin, 0, width, height); - - // Show 0ms origin - this.renderer.setFullVerticalLine(this.origin, 0); - - // Render all events - this.request.events.forEach(event => this.renderEvent(event, events.indexOf(event))); - } - - renderEvent(event, index) { - const { name, category, duration, memory, periods, elements } = event; - const { group, label, border, background } = elements; - const visible = index >= 0; - - group.setAttribute('visibility', visible ? 'visible' : 'hidden'); - - if (background) { - background.setAttribute('visibility', visible ? 'visible' : 'hidden'); - - if (visible) { - const [min, max] = this.getEventLimits(event); - - this.renderer.setFullRectangle(background, min * this.scale, max * this.scale); - } - } - - if (visible) { - // Position the group - group.setAttribute('transform', `translate(0, ${index * this.eventHeight})`); - - // Update top border - this.renderer.setFullHorizontalLine(border, 0); - - // render label and ensure it doesn't escape the viewport - this.renderLabel(label, event); - - // Update periods - periods.forEach(this.renderPeriod); - } - } - - renderLabel(label, event) { - const width = this.getLabelWidth(label); - const [min, max] = this.getEventLimits(event); - const alignLeft = (min * this.scale) + width <= this.renderer.width; - - label.setAttribute('x', (alignLeft ? min : max) * this.scale); - label.setAttribute('text-anchor', alignLeft ? 'start' : 'end'); - } - - renderPeriod(period) { - const { elements, start, duration } = period; - - period.draw(elements.timeline, start * this.scale, this.periodY, Math.max(duration * this.scale, 1)); - } - - getLabelWidth(label) { - if (typeof label.width === 'undefined') { - label.width = label.getBBox().width; - } - - return label.width; - } - - getEventLimits(event) { - if (typeof event.limits === 'undefined') { - const { periods } = event; - - event.limits = [ - periods[0].start, - periods[periods.length - 1].end - ]; - } - - return event.limits; - } - - getShortName(name) { - const matches = this.FqcnMatcher.exec(name); - - if (matches) { - return matches[1]; - } - - return name; - } -} - -class Legend { - constructor(element, theme) { - this.element = element; - this.theme = theme; - - this.toggle = this.toggle.bind(this); - this.createCategory = this.createCategory.bind(this); - - this.categories = []; - this.theme.getDefaultCategories().forEach(this.createCategory); - } - - add(category) { - this.get(category).classList.add('present'); - } - - createCategory(category) { - const element = document.createElement('button'); - element.className = `timeline-category active`; - element.style.borderColor = this.theme.getCategoryColor(category); - element.innerText = category; - element.value = category; - element.type = 'button'; - element.addEventListener('click', this.toggle); - - this.element.appendChild(element); - - this.categories.push(element); - - return element; - } - - toggle(event) { - event.target.classList.toggle('active'); - - this.emit('change'); - } - - isActive(category) { - return this.get(category).classList.contains('active'); - } - - get(category) { - return this.categories.find(element => element.value === category) || this.createCategory(category); - } - - emit(name) { - this.element.dispatchEvent(new Event(name)); - } - - addEventListener(name, callback) { - this.element.addEventListener(name, callback); - } - - removeEventListener(name, callback) { - this.element.removeEventListener(name, callback); - } -} - -class SvgRenderer { - /** - * @param {SVGElement} element - */ - constructor(element) { - this.ns = 'http://www.w3.org/2000/svg'; - this.width = null; - this.viewBox = {}; - this.element = element; - - this.add = this.add.bind(this); - - this.setViewBox(0, 0, 0, 0); - this.measure(); - } - - setViewBox(x, y, width, height) { - this.viewBox = { x, y, width, height }; - this.element.setAttribute('viewBox', `${x} ${y} ${width} ${height}`); - } - - measure() { - this.width = this.element.getBoundingClientRect().width; - } - - add(element) { - this.element.appendChild(element); - } - - group(elements, className) { - const group = this.create('g', className); - - elements.forEach(element => group.appendChild(element)); - - return group; - } - - setHorizontalLine(element, x, y, width) { - element.setAttribute('d', `M${x},${y} h${width}`); - - return element; - } - - setVerticalLine(element, x, y, height) { - element.setAttribute('d', `M${x},${y} v${height}`); - - return element; - } - - setFullHorizontalLine(element, y) { - return this.setHorizontalLine(element, this.viewBox.x, y, this.viewBox.width); - } - - setFullVerticalLine(element, x) { - return this.setVerticalLine(element, x, this.viewBox.y, this.viewBox.height); - } - - setFullRectangle(element, min, max) { - element.setAttribute('x', min); - element.setAttribute('y', this.viewBox.y); - element.setAttribute('width', max - min); - element.setAttribute('height', this.viewBox.height); - } - - setSectionLine(element, x, y, width, height = 4, markerSize = 6) { - const totalHeight = height + markerSize; - const maxMarkerWidth = Math.min(markerSize, width / 2); - const widthWithoutMarker = Math.max(0, width - (maxMarkerWidth * 2)); - - element.setAttribute('d', `M${x},${y + totalHeight} v${-totalHeight} h${width} v${totalHeight} l${-maxMarkerWidth} ${-markerSize} h${-widthWithoutMarker} Z`); - } - - setPeriodLine(element, x, y, width, height = 4, markerWidth = 2, markerHeight = 4) { - const totalHeight = height + markerHeight; - const maxMarkerWidth = Math.min(markerWidth, width); - - element.setAttribute('d', `M${x + maxMarkerWidth},${y + totalHeight} h${-maxMarkerWidth} v${-totalHeight} h${width} v${height} h${maxMarkerWidth-width}Z`); - } - - createText(content, x, y, className) { - const element = this.create('text', className); - - element.setAttribute('x', x); - element.setAttribute('y', y); - element.textContent = content; - - return element; - } - - createTspan(content, className) { - const element = this.create('tspan', className); - - element.textContent = content; - - return element; - } - - createTitle(content) { - const element = this.create('title'); - - element.textContent = content; - - return element; - } - - createPath(path = null, className = null, color = null) { - const element = this.create('path', className); - - if (path) { - element.setAttribute('d', path); - } - - if (color) { - element.setAttribute('fill', color); - } - - return element; - } - - create(name, className = null) { - const element = document.createElementNS(this.ns, name); - - if (className) { - element.setAttribute('class', className); - } - - return element; - } -} - -class Theme { - constructor(element) { - this.reservedCategoryColors = { - 'default': '#777', - 'section': '#999', - 'event_listener': '#00b8f5', - 'template': '#66cc00', - 'doctrine': '#ff6633', - 'messenger_middleware': '#bdb81e', - 'controller.argument_value_resolver': '#8c5de6', - 'http_client': '#ffa333', - }; - - this.customCategoryColors = [ - '#dbab09', // dark yellow - '#ea4aaa', // pink - '#964b00', // brown - '#22863a', // dark green - '#0366d6', // dark blue - '#17a2b8', // teal - ]; - - this.getCategoryColor = this.getCategoryColor.bind(this); - this.getDefaultCategories = this.getDefaultCategories.bind(this); - } - - getDefaultCategories() { - return Object.keys(this.reservedCategoryColors); - } - - getCategoryColor(category) { - return this.reservedCategoryColors[category] || this.getRandomColor(category); - } - - getRandomColor(category) { - // instead of pure randomness, colors are assigned deterministically based on the - // category name, to ensure that each custom category always displays the same color - return this.customCategoryColors[this.hash(category) % this.customCategoryColors.length]; - } - - // copied from https://github.com/darkskyapp/string-hash - hash(string) { - var hash = 5381; - var i = string.length; - - while(i) { - hash = (hash * 33) ^ string.charCodeAt(--i); - } - - return hash >>> 0; - } -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig deleted file mode 100644 index a8a5c27..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/translation.html.twig +++ /dev/null @@ -1,210 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% import _self as helper %} - -{% block toolbar %} - {% if collector.messages|length %} - {% set icon %} - {{ include('@WebProfiler/Icon/translation.svg') }} - {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' %} - {% set error_count = collector.countMissings + collector.countFallbacks %} - {{ error_count ?: collector.countDefines }} - {% endset %} - - {% set text %} -
    - Default locale - - {{ collector.locale|default('-') }} - -
    -
    - Missing messages - - {{ collector.countMissings }} - -
    - -
    - Fallback messages - - {{ collector.countFallbacks }} - -
    - -
    - Defined messages - {{ collector.countDefines }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/translation.svg') }} - Translation - {% if collector.countMissings or collector.countFallbacks %} - {% set error_count = collector.countMissings + collector.countFallbacks %} - - {{ error_count }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Translation

    - -
    -
    - {{ collector.locale|default('-') }} - Default locale -
    -
    - {{ collector.fallbackLocales|join(', ')|default('-') }} - Fallback locale{{ collector.fallbackLocales|length != 1 ? 's' }} -
    -
    - -

    Messages

    - - {% if collector.messages is empty %} -
    -

    No translations have been called.

    -
    - {% else %} - {% block messages %} - - {# sort translation messages in groups #} - {% set messages_defined, messages_missing, messages_fallback = [], [], [] %} - {% for message in collector.messages %} - {% if message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED') %} - {% set messages_defined = messages_defined|merge([message]) %} - {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING') %} - {% set messages_missing = messages_missing|merge([message]) %} - {% elseif message.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %} - {% set messages_fallback = messages_fallback|merge([message]) %} - {% endif %} - {% endfor %} - -
    -
    -

    Defined {{ collector.countDefines }}

    - -
    -

    - These messages are correctly translated into the given locale. -

    - - {% if messages_defined is empty %} -
    -

    None of the used translation messages are defined for the given locale.

    -
    - {% else %} - {% block defined_messages %} - {{ helper.render_table(messages_defined) }} - {% endblock %} - {% endif %} -
    -
    - -
    -

    Fallback {{ collector.countFallbacks }}

    - -
    -

    - These messages are not available for the given locale - but Symfony found them in the fallback locale catalog. -

    - - {% if messages_fallback is empty %} -
    -

    No fallback translation messages were used.

    -
    - {% else %} - {% block fallback_messages %} - {{ helper.render_table(messages_fallback, true) }} - {% endblock %} - {% endif %} -
    -
    - -
    -

    Missing {{ collector.countMissings }}

    - -
    -

    - These messages are not available for the given locale and cannot - be found in the fallback locales. Add them to the translation - catalogue to avoid Symfony outputting untranslated contents. -

    - - {% if messages_missing is empty %} -
    -

    There are no messages of this category.

    -
    - {% else %} - {% block missing_messages %} - {{ helper.render_table(messages_missing) }} - {% endblock %} - {% endif %} -
    -
    -
    - - - - {% endblock messages %} - {% endif %} - -{% endblock %} - -{% macro render_table(messages, is_fallback) %} - - - - - {% if is_fallback %} - - {% endif %} - - - - - - - - {% for message in messages %} - - - {% if is_fallback %} - - {% endif %} - - - - - - {% endfor %} - -
    LocaleFallback localeDomainTimes usedMessage IDMessage Preview
    {{ message.locale }}{{ message.fallbackLocale|default('-') }}{{ message.domain }}{{ message.count }} - {{ message.id }} - - {% if message.transChoiceNumber is not null %} - (pluralization is used) - {% endif %} - - {% if message.parameters|length > 0 %} - - - - {% endif %} - {{ message.translation }}
    -{% endmacro %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig deleted file mode 100644 index be84c19..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/twig.html.twig +++ /dev/null @@ -1,115 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} - {% set icon %} - {{ include('@WebProfiler/Icon/twig.svg') }} - {{ time }} - ms - {% endset %} - - {% set text %} -
    - Render Time - {{ time }} ms -
    -
    - Template Calls - {{ collector.templatecount }} -
    -
    - Block Calls - {{ collector.blockcount }} -
    -
    - Macro Calls - {{ collector.macrocount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/twig.svg') }} - Twig - -{% endblock %} - -{% block panel %} - {% if collector.templatecount == 0 %} -

    Twig

    - -
    -

    No Twig templates were rendered for this request.

    -
    - {% else %} -

    Twig Metrics

    - -
    -
    - {{ '%0.0f'|format(collector.time) }} ms - Render time -
    - -
    - {{ collector.templatecount }} - Template calls -
    - -
    - {{ collector.blockcount }} - Block calls -
    - -
    - {{ collector.macrocount }} - Macro calls -
    -
    - -

    - Render time includes sub-requests rendering time (if any). -

    - -

    Rendered Templates

    - - - - - - - - - - {% for template, count in collector.templates %} - - {%- set file = collector.templatePaths[template]|default(false) -%} - {%- set link = file ? file|file_link(1) : false -%} - - - - {% endfor %} - -
    Template Name & PathRender Count
    - {{ include('@WebProfiler/Icon/twig.svg') }} - {% if link %} - {{ template }} - - {% else %} - {{ template }} - {% endif %} - {{ count }}
    - -

    Rendering Call Graph

    - -
    - {{ collector.htmlcallgraph }} -
    - {% endif %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig deleted file mode 100644 index f3b7b76..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Collector/validator.html.twig +++ /dev/null @@ -1,103 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% block toolbar %} - {% if collector.violationsCount > 0 or collector.calls|length %} - {% set status_color = collector.violationsCount ? 'red' %} - {% set icon %} - {{ include('@WebProfiler/Icon/validator.svg') }} - - {{ collector.violationsCount ?: collector.calls|length }} - - {% endset %} - - {% set text %} -
    - Validator calls - {{ collector.calls|length }} -
    -
    - Number of violations - {{ collector.violationsCount }} -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} - {% endif %} -{% endblock %} - -{% block menu %} - - {{ include('@WebProfiler/Icon/validator.svg') }} - Validator - {% if collector.violationsCount > 0 %} - - {{ collector.violationsCount }} - - {% endif %} - -{% endblock %} - -{% block panel %} -

    Validator calls

    - - {% for call in collector.calls %} -
    - - - - - - - {% if call.violations|length %} - - - - - - - - - - {% for violation in call.violations %} - - - - - - - {% endfor %} -
    PathMessageInvalid valueViolation
    {{ violation.propertyPath }}{{ violation.message }}{{ profiler_dump(violation.seek('invalidValue')) }}{{ profiler_dump(violation) }}
    - {% else %} - No violations - {% endif %} -
    - {% else %} -
    -

    No calls to the validator were collected during this request.

    -
    - {% endfor %} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg deleted file mode 100644 index 4019e32..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/ajax.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg deleted file mode 100644 index 7981989..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/cache.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/close.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/close.svg deleted file mode 100644 index 6038d73..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/close.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/config.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/config.svg deleted file mode 100644 index ba51407..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/config.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/event.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/event.svg deleted file mode 100644 index 76eaa32..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/event.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg deleted file mode 100644 index 0e4df2b..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/exception.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg deleted file mode 100644 index 8800f1c..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/filter.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/form.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/form.svg deleted file mode 100644 index e130796..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/form.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg deleted file mode 100644 index 28a960a..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/forward.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg deleted file mode 100644 index e6b1fb2..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/http-client.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg deleted file mode 100644 index ae8c5aa..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/logger.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg deleted file mode 100644 index ed649d0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/mailer.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg deleted file mode 100644 index deb047f..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/memory.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg deleted file mode 100644 index afccc7f..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/menu.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg deleted file mode 100644 index 3af5178..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/messenger.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg deleted file mode 100644 index ea00891..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no-gray.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no.svg deleted file mode 100644 index 5ffc020..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/no.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg deleted file mode 100644 index 0648f12..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/notifier.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg deleted file mode 100644 index 8c329d0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/redirect.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/request.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/request.svg deleted file mode 100644 index 67d6c64..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/request.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/router.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/router.svg deleted file mode 100644 index e16c617..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/router.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/search.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/search.svg deleted file mode 100644 index cae0a67..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/search.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg deleted file mode 100644 index c3beff6..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/symfony.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/time.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/time.svg deleted file mode 100644 index d49851d..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/time.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg deleted file mode 100644 index 735bb92..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/translation.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg deleted file mode 100644 index 4a6ef7a..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/twig.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg deleted file mode 100644 index 6a81d92..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/validator.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg b/vendor/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg deleted file mode 100644 index dbbff93..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Icon/yes.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig deleted file mode 100644 index 3e2f6f0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/ajax_layout.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% block panel '' %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig deleted file mode 100644 index 4df5ccf..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/bag.html.twig +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - {% for key in bag.keys|sort %} - - - - - {% else %} - - - - {% endfor %} - -
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(bag.get(key), maxDepth=maxDepth|default(0)) }}
    (no data)
    diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig deleted file mode 100644 index 1a74431..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base.html.twig +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - {% block title %}Symfony Profiler{% endblock %} - - - {% block head %} - - {{ include('@WebProfiler/Profiler/profiler.css.twig') }} - - {% endblock %} - - - - if (null === localStorage.getItem('symfony/profiler/theme') || 'theme-auto' === localStorage.getItem('symfony/profiler/theme')) { - document.body.classList.add((matchMedia('(prefers-color-scheme: dark)').matches ? 'theme-dark' : 'theme-light')); - // needed to respond dynamically to OS changes without having to refresh the page - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => { - document.body.classList.remove('theme-light', 'theme-dark'); - document.body.classList.add(e.matches ? 'theme-dark' : 'theme-light'); - }); - } else { - document.body.classList.add(localStorage.getItem('symfony/profiler/theme')); - } - - document.body.classList.add(localStorage.getItem('symfony/profiler/width') || 'width-normal'); - - - {% block body '' %} - - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig deleted file mode 100644 index af36bc0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/base_js.html.twig +++ /dev/null @@ -1,874 +0,0 @@ -{# This file is partially duplicated in src/Symfony/Component/ErrorHandler/Resources/assets/js/exception.js. - If you make any change in this file, verify the same change is needed in the other file. #} -/* 0) { - addClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - } else if (successStreak < 4) { - addClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); - removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - } else { - removeClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); - removeClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); - } - }; - - var startAjaxRequest = function(index) { - var tbody = document.querySelector('.sf-toolbar-ajax-request-list'); - if (!tbody) { - return; - } - - var nbOfAjaxRequest = tbody.rows.length; - if (nbOfAjaxRequest >= 100) { - tbody.deleteRow(0); - } - - var request = requestStack[index]; - pendingRequests++; - var row = document.createElement('tr'); - request.DOMNode = row; - - var requestNumberCell = document.createElement('td'); - requestNumberCell.textContent = index + 1; - row.appendChild(requestNumberCell); - - var profilerCell = document.createElement('td'); - profilerCell.textContent = 'n/a'; - row.appendChild(profilerCell); - - var methodCell = document.createElement('td'); - methodCell.textContent = request.method; - row.appendChild(methodCell); - - var typeCell = document.createElement('td'); - typeCell.textContent = request.type; - row.appendChild(typeCell); - - var statusCodeCell = document.createElement('td'); - var statusCode = document.createElement('span'); - statusCode.textContent = 'n/a'; - statusCodeCell.appendChild(statusCode); - row.appendChild(statusCodeCell); - - var pathCell = document.createElement('td'); - pathCell.className = 'sf-ajax-request-url'; - if ('GET' === request.method) { - var pathLink = document.createElement('a'); - pathLink.setAttribute('href', request.url); - pathLink.textContent = request.url; - pathCell.appendChild(pathLink); - } else { - pathCell.textContent = request.url; - } - pathCell.setAttribute('title', request.url); - row.appendChild(pathCell); - - var durationCell = document.createElement('td'); - durationCell.className = 'sf-ajax-request-duration'; - durationCell.textContent = 'n/a'; - row.appendChild(durationCell); - - request.liveDurationHandle = setInterval(function() { - durationCell.textContent = (new Date() - request.start) + ' ms'; - }, 100); - - row.className = 'sf-ajax-request sf-ajax-request-loading'; - tbody.insertBefore(row, null); - - var toolbarInfo = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info'); - toolbarInfo.scrollTop = toolbarInfo.scrollHeight; - - renderAjaxRequests(); - }; - - var finishAjaxRequest = function(index) { - var request = requestStack[index]; - clearInterval(request.liveDurationHandle); - - if (!request.DOMNode) { - return; - } - - if (request.toolbarReplace && !request.toolbarReplaceFinished && request.profile) { - /* Flag as complete because finishAjaxRequest can be called multiple times. */ - request.toolbarReplaceFinished = true; - /* Search up through the DOM to find the toolbar's container ID. */ - for (var elem = request.DOMNode; elem && elem !== document; elem = elem.parentNode) { - if (elem.id.match(/^sfwdt/)) { - Sfjs.loadToolbar(elem.id.replace(/^sfwdt/, ''), request.profile); - break; - } - } - } - - pendingRequests--; - var row = request.DOMNode; - /* Unpack the children from the row */ - var profilerCell = row.children[1]; - var methodCell = row.children[2]; - var statusCodeCell = row.children[4]; - var statusCodeElem = statusCodeCell.children[0]; - var durationCell = row.children[6]; - - if (request.error) { - row.className = 'sf-ajax-request sf-ajax-request-error'; - methodCell.className = 'sf-ajax-request-error'; - successStreak = 0; - } else { - row.className = 'sf-ajax-request sf-ajax-request-ok'; - successStreak++; - } - - if (request.statusCode) { - if (request.statusCode < 300) { - statusCodeElem.setAttribute('class', 'sf-toolbar-status'); - } else if (request.statusCode < 400) { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-yellow'); - } else { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red'); - } - statusCodeElem.textContent = request.statusCode; - } else { - statusCodeElem.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red'); - } - - if (request.duration) { - durationCell.textContent = request.duration + ' ms'; - } - - if (request.profilerUrl) { - profilerCell.textContent = ''; - var profilerLink = document.createElement('a'); - profilerLink.setAttribute('href', request.profilerUrl); - profilerLink.textContent = request.profile; - profilerCell.appendChild(profilerLink); - } - - renderAjaxRequests(); - }; - - {% if excluded_ajax_paths is defined %} - if (window.fetch && window.fetch.polyfill === undefined) { - var oldFetch = window.fetch; - window.fetch = function () { - var promise = oldFetch.apply(this, arguments); - var url = arguments[0]; - var params = arguments[1]; - var paramType = Object.prototype.toString.call(arguments[0]); - if (paramType === '[object Request]') { - url = arguments[0].url; - params = { - method: arguments[0].method, - credentials: arguments[0].credentials, - headers: arguments[0].headers, - mode: arguments[0].mode, - redirect: arguments[0].redirect - }; - } else { - url = String(url); - } - if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { - var method = 'GET'; - if (params && params.method !== undefined) { - method = params.method; - } - - var stackElement = { - error: false, - url: url, - method: method, - type: 'fetch', - start: new Date() - }; - - var idx = requestStack.push(stackElement) - 1; - promise.then(function (r) { - stackElement.duration = new Date() - stackElement.start; - stackElement.error = r.status < 200 || r.status >= 400; - stackElement.statusCode = r.status; - stackElement.profile = r.headers.get('x-debug-token'); - stackElement.profilerUrl = r.headers.get('x-debug-token-link'); - stackElement.toolbarReplaceFinished = false; - stackElement.toolbarReplace = '1' === r.headers.get('Symfony-Debug-Toolbar-Replace'); - finishAjaxRequest(idx); - }, function (e){ - stackElement.error = true; - finishAjaxRequest(idx); - }); - startAjaxRequest(idx); - } - - return promise; - }; - } - if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) { - var proxied = XMLHttpRequest.prototype.open; - - XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { - var self = this; - - /* prevent logging AJAX calls to static and inline files, like templates */ - var path = url; - if (url.slice(0, 1) === '/') { - if (0 === url.indexOf('{{ request.basePath|e('js') }}')) { - path = url.slice({{ request.basePath|length }}); - } - } - else if (0 === url.indexOf('{{ (request.schemeAndHttpHost ~ request.basePath)|e('js') }}')) { - path = url.slice({{ (request.schemeAndHttpHost ~ request.basePath)|length }}); - } - - if (!path.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { - var stackElement = { - error: false, - url: url, - method: method, - type: 'xhr', - start: new Date() - }; - - var idx = requestStack.push(stackElement) - 1; - - this.addEventListener('readystatechange', function() { - if (self.readyState == 4) { - stackElement.duration = new Date() - stackElement.start; - stackElement.error = self.status < 200 || self.status >= 400; - stackElement.statusCode = self.status; - extractHeaders(self, stackElement); - - finishAjaxRequest(idx); - } - }, false); - - startAjaxRequest(idx); - } - - proxied.apply(this, Array.prototype.slice.call(arguments)); - }; - } - {% endif %} - - return { - hasClass: hasClass, - - removeClass: removeClass, - - addClass: addClass, - - toggleClass: toggleClass, - - getPreference: getPreference, - - setPreference: setPreference, - - addEventListener: addEventListener, - - request: request, - - renderAjaxRequests: renderAjaxRequests, - - getSfwdt: function(token) { - if (!this.sfwdt) { - this.sfwdt = document.getElementById('sfwdt' + token); - } - - return this.sfwdt; - }, - - load: function(selector, url, onSuccess, onError, options) { - var el = document.getElementById(selector); - - if (el && el.getAttribute('data-sfurl') !== url) { - request( - url, - function(xhr) { - el.innerHTML = xhr.responseText; - el.setAttribute('data-sfurl', url); - removeClass(el, 'loading'); - var pending = pendingRequests; - for (var i = 0; i < requestStack.length; i++) { - startAjaxRequest(i); - if (requestStack[i].duration) { - finishAjaxRequest(i); - } - } - /* Revert the pending state in case there was a start called without a finish above. */ - pendingRequests = pending; - (onSuccess || noop)(xhr, el); - }, - function(xhr) { (onError || noop)(xhr, el); }, - '', - options - ); - } - - return this; - }, - - showToolbar: function(token) { - var sfwdt = this.getSfwdt(token); - removeClass(sfwdt, 'sf-display-none'); - - if (getPreference('toolbar/displayState') == 'none') { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'none'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'none'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'block'; - } else { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'block'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'block'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'none'; - } - }, - - hideToolbar: function(token) { - var sfwdt = this.getSfwdt(token); - addClass(sfwdt, 'sf-display-none'); - }, - - initToolbar: function(token) { - this.showToolbar(token); - - var hideButton = document.getElementById('sfToolbarHideButton-' + token); - var hideButtonSvg = hideButton.querySelector('svg'); - hideButtonSvg.setAttribute('aria-hidden', 'true'); - hideButtonSvg.setAttribute('focusable', 'false'); - addEventListener(hideButton, 'click', function (event) { - event.preventDefault(); - - var p = this.parentNode; - p.style.display = 'none'; - (p.previousElementSibling || p.previousSibling).style.display = 'none'; - document.getElementById('sfMiniToolbar-' + token).style.display = 'block'; - setPreference('toolbar/displayState', 'none'); - }); - - var showButton = document.getElementById('sfToolbarMiniToggler-' + token); - var showButtonSvg = showButton.querySelector('svg'); - showButtonSvg.setAttribute('aria-hidden', 'true'); - showButtonSvg.setAttribute('focusable', 'false'); - addEventListener(showButton, 'click', function (event) { - event.preventDefault(); - - var elem = this.parentNode; - if (elem.style.display == 'none') { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'none'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'none'; - elem.style.display = 'block'; - } else { - document.getElementById('sfToolbarMainContent-' + token).style.display = 'block'; - document.getElementById('sfToolbarClearer-' + token).style.display = 'block'; - elem.style.display = 'none' - } - - setPreference('toolbar/displayState', 'block'); - }); - }, - - loadToolbar: function(token, newToken) { - var that = this; - var triesCounter = document.getElementById('sfLoadCounter-' + token); - - var options = { - retry: true, - onSend: function (count) { - if (count === 3) { - that.initToolbar(token); - } - - if (triesCounter) { - triesCounter.textContent = count; - } - }, - }; - - var cancelButton = document.getElementById('sfLoadCancel-' + token); - if (cancelButton) { - addEventListener(cancelButton, 'click', function (event) { - event.preventDefault(); - - options.stop = true; - that.hideToolbar(token); - }); - } - - newToken = (newToken || token); - - this.load( - 'sfwdt' + token, - '{{ url("_wdt", { "token": "xxxxxx" })|escape('js') }}'.replace(/xxxxxx/, newToken), - function(xhr, el) { - /* Do nothing in the edge case where the toolbar has already been replaced with a new one */ - if (!document.getElementById('sfToolbarMainContent-' + newToken)) { - return; - } - - /* Evaluate in global scope scripts embedded inside the toolbar */ - var i, scripts = [].slice.call(el.querySelectorAll('script')); - for (i = 0; i < scripts.length; ++i) { - eval.call({}, scripts[i].firstChild.nodeValue); - } - - el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none'; - - if (el.style.display == 'none') { - return; - } - - that.initToolbar(newToken); - - /* Handle toolbar-info position */ - var toolbarBlocks = [].slice.call(el.querySelectorAll('.sf-toolbar-block')); - for (i = 0; i < toolbarBlocks.length; ++i) { - toolbarBlocks[i].onmouseover = function () { - var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0]; - var pageWidth = document.body.clientWidth; - var elementWidth = toolbarInfo.offsetWidth; - var leftValue = (elementWidth + this.offsetLeft) - pageWidth; - var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth; - - /* Reset right and left value, useful on window resize */ - toolbarInfo.style.right = ''; - toolbarInfo.style.left = ''; - - if (elementWidth > pageWidth) { - toolbarInfo.style.left = 0; - } - else if (leftValue > 0 && rightValue > 0) { - toolbarInfo.style.right = (rightValue * -1) + 'px'; - } else if (leftValue < 0) { - toolbarInfo.style.left = 0; - } else { - toolbarInfo.style.right = '0px'; - } - }; - } - - renderAjaxRequests(); - addEventListener(document.querySelector('.sf-toolbar-ajax-clear'), 'click', function() { - requestStack = []; - renderAjaxRequests(); - successStreak = 4; - document.querySelector('.sf-toolbar-ajax-request-list').innerHTML = ''; - }); - addEventListener(document.querySelector('.sf-toolbar-block-ajax'), 'mouseenter', function (event) { - var elem = document.querySelector('.sf-toolbar-block-ajax .sf-toolbar-info'); - elem.scrollTop = elem.scrollHeight; - }); - addEventListener(document.querySelector('.sf-toolbar-block-ajax > .sf-toolbar-icon'), 'click', function (event) { - event.preventDefault(); - - toggleClass(this.parentNode, 'hover'); - }); - - var dumpInfo = document.querySelector('.sf-toolbar-block-dump .sf-toolbar-info'); - if (null !== dumpInfo) { - addEventListener(dumpInfo, 'sfbeforedumpcollapse', function () { - dumpInfo.style.minHeight = dumpInfo.getBoundingClientRect().height+'px'; - }); - addEventListener(dumpInfo, 'mouseleave', function () { - dumpInfo.style.minHeight = ''; - }); - } - }, - function(xhr) { - if (xhr.status !== 0 && !options.stop) { - var sfwdt = that.getSfwdt(token); - sfwdt.innerHTML = '\ -
    \ -
    \ - An error occurred while loading the web debug toolbar. Open the web profiler.\ -
    \ - '; - sfwdt.setAttribute('class', 'sf-toolbar sf-error-toolbar'); - } - }, - options - ); - - return this; - }, - - toggle: function(selector, elOn, elOff) { - var tmp = elOn.style.display, - el = document.getElementById(selector); - - elOn.style.display = elOff.style.display; - elOff.style.display = tmp; - - if (el) { - el.style.display = 'none' === tmp ? 'none' : 'block'; - } - - return this; - }, - - createTabs: function() { - var tabGroups = document.querySelectorAll('.sf-tabs:not([data-processed=true])'); - - /* create the tab navigation for each group of tabs */ - for (var i = 0; i < tabGroups.length; i++) { - var tabs = tabGroups[i].querySelectorAll(':scope > .tab'); - var tabNavigation = document.createElement('ul'); - tabNavigation.className = 'tab-navigation'; - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('li'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); - } - - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope > .tab-navigation li'); - - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - document.getElementById(tabId).className = 'block'; - } else { - document.getElementById(tabId).className = 'hidden'; - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '
  • ' element */ - while (activeTab.tagName.toLowerCase() !== 'li') { - activeTab = activeTab.parentNode; - } - - /* get the full list of tabs through the parent of the active tab element */ - var tabNavigation = activeTab.parentNode.children; - for (var k = 0; k < tabNavigation.length; k++) { - var tabId = tabNavigation[k].getAttribute('data-tab-id'); - document.getElementById(tabId).className = 'hidden'; - removeClass(tabNavigation[k], 'active'); - } - - addClass(activeTab, 'active'); - var activeTabId = activeTab.getAttribute('data-tab-id'); - document.getElementById(activeTabId).className = 'block'; - }); - } - - tabGroups[i].setAttribute('data-processed', 'true'); - } - }, - - createToggles: function() { - var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])'); - - for (var i = 0; i < toggles.length; i++) { - var elementSelector = toggles[i].getAttribute('data-toggle-selector'); - var element = document.querySelector(elementSelector); - - addClass(element, 'sf-toggle-content'); - - if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { - addClass(toggles[i], 'sf-toggle-on'); - addClass(element, 'sf-toggle-visible'); - } else { - addClass(toggles[i], 'sf-toggle-off'); - addClass(element, 'sf-toggle-hidden'); - } - - addEventListener(toggles[i], 'click', function(e) { - e.preventDefault(); - - if ('' !== window.getSelection().toString()) { - /* Don't do anything on text selection */ - return; - } - - var toggle = e.target || e.srcElement; - - /* needed because when the toggle contains HTML contents, user can click */ - /* on any of those elements instead of their parent '.sf-toggle' element */ - while (!hasClass(toggle, 'sf-toggle')) { - toggle = toggle.parentNode; - } - - var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); - - toggleClass(toggle, 'sf-toggle-on'); - toggleClass(toggle, 'sf-toggle-off'); - toggleClass(element, 'sf-toggle-hidden'); - toggleClass(element, 'sf-toggle-visible'); - - /* the toggle doesn't change its contents when clicking on it */ - if (!toggle.hasAttribute('data-toggle-alt-content')) { - return; - } - - if (!toggle.hasAttribute('data-toggle-original-content')) { - toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); - } - - var currentContent = toggle.innerHTML; - var originalContent = toggle.getAttribute('data-toggle-original-content'); - var altContent = toggle.getAttribute('data-toggle-alt-content'); - toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; - }); - - /* Prevents from disallowing clicks on links inside toggles */ - var toggleLinks = toggles[i].querySelectorAll('a'); - for (var j = 0; j < toggleLinks.length; j++) { - addEventListener(toggleLinks[j], 'click', function(e) { - e.stopPropagation(); - }); - } - - /* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */ - var copyToClipboardElements = toggles[i].querySelectorAll('span[data-clipboard-text]'); - for (var k = 0; k < copyToClipboardElements.length; k++) { - addEventListener(copyToClipboardElements[k], 'click', function(e) { - e.stopPropagation(); - }); - } - - toggles[i].setAttribute('data-processed', 'true'); - } - }, - - initializeLogsTable: function() { - Sfjs.updateLogsTable(); - - document.querySelectorAll('.log-filter input').forEach((input) => { - input.addEventListener('change', () => { Sfjs.updateLogsTable(); }); - }); - - document.querySelectorAll('.filter-select-all-or-none button').forEach((link) => { - link.addEventListener('click', () => { - const selectAll = link.classList.contains('select-all'); - link.closest('.log-filter-content').querySelectorAll('input').forEach((input) => { - input.checked = selectAll; - }); - - Sfjs.updateLogsTable(); - }); - }); - - document.body.addEventListener('click', (event) => { - document.querySelectorAll('details.log-filter').forEach((filterElement) => { - if (!filterElement.contains(event.target) && filterElement.open) { - filterElement.open = false; - } - }); - }); - }, - - updateLogsTable: function() { - const selectedType = document.querySelector('#log-filter-type input:checked').value; - const priorities = document.querySelectorAll('#log-filter-priority input'); - const allPriorities = Array.from(priorities).map((input) => input.value); - const selectedPriorities = Array.from(priorities).filter((input) => input.checked).map((input) => input.value); - const channels = document.querySelectorAll('#log-filter-channel input'); - const selectedChannels = Array.from(channels).filter((input) => input.checked).map((input) => input.value); - - const logs = document.querySelector('table.logs'); - if (null === logs) { - return; - } - - /* hide rows that don't match the current filters */ - let numVisibleRows = 0; - logs.querySelectorAll('tbody tr').forEach((row) => { - if ('all' !== selectedType && selectedType !== row.getAttribute('data-type')) { - row.style.display = 'none'; - return; - } - - const priority = row.getAttribute('data-priority'); - if (false === selectedPriorities.includes(priority) && true === allPriorities.includes(priority)) { - row.style.display = 'none'; - return; - } - - if ('' !== row.getAttribute('data-channel') && false === selectedChannels.includes(row.getAttribute('data-channel'))) { - row.style.display = 'none'; - return; - } - - row.style.display = 'table-row'; - numVisibleRows++; - }); - - document.querySelector('table.logs').style.display = 0 === numVisibleRows ? 'none' : 'table'; - document.querySelector('.no-logs-message').style.display = 0 === numVisibleRows ? 'block' : 'none'; - - /* update the selected totals of all filters */ - document.querySelector('#log-filter-priority .filter-active-num').innerText = (priorities.length === selectedPriorities.length) ? 'All' : selectedPriorities.length; - document.querySelector('#log-filter-channel .filter-active-num').innerText = (channels.length === selectedChannels.length) ? 'All' : selectedChannels.length; - - /* update the currently selected "log type" tab */ - document.querySelectorAll('#log-filter-type li').forEach((tab) => tab.classList.remove('active')); - document.querySelector(`#log-filter-type input[value="${selectedType}"]`).parentElement.classList.add('active'); - }, - }; - })(); - - Sfjs.addEventListener(document, 'DOMContentLoaded', function() { - Sfjs.createTabs(); - Sfjs.createToggles(); - }); -} -/*]]>*/ diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig deleted file mode 100644 index 6f1763d..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/cancel.html.twig +++ /dev/null @@ -1,25 +0,0 @@ -{% block toolbar %} - {% set icon %} - {{ include('@WebProfiler/Icon/symfony.svg') }} - - - Loading… - - {% endset %} - - {% set text %} -
    - Loading the web debug toolbar… -
    -
    - Attempt # -
    -
    - - - -
    - {% endset %} - - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig deleted file mode 100644 index d04cf37..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/header.html.twig +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig deleted file mode 100644 index 4340439..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/info.html.twig +++ /dev/null @@ -1,22 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% set messages = { - 'no_token' : { - status: 'error', - title: (token|default('') == 'latest') ? 'There are no profiles' : 'Token not found', - message: (token|default('') == 'latest') ? 'No profiles found.' : 'Token "' ~ token|default('') ~ '" not found.' - } -} %} - -{% block summary %} -
    -
    -

    {{ messages[about].status|title }}

    -
    -
    -{% endblock %} - -{% block panel %} -

    {{ messages[about].title }}

    -

    {{ messages[about].message }}

    -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig deleted file mode 100644 index 379653c..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/layout.html.twig +++ /dev/null @@ -1,153 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block body %} - {{ include('@WebProfiler/Profiler/header.html.twig', with_context = false) }} - -
    - {% block summary %} - {% if profile is defined %} - {% set request_collector = profile.collectors.request|default(false) %} - {% set status_code = request_collector ? request_collector.statuscode|default(0) : 0 %} - {% set css_class = status_code > 399 ? 'status-error' : status_code > 299 ? 'status-warning' : 'status-success' %} - -
    -
    -

    - {% if profile.method|upper in ['GET', 'HEAD'] %} - {{ profile.url }} - {% else %} - {{ profile.url }} - {% set referer = request_collector ? request_collector.requestheaders.get('referer') : null %} - {% if referer %} - Return to referer URL - {% endif %} - {% endif %} -

    - - {% if request_collector and request_collector.redirect -%} - {%- set redirect = request_collector.redirect -%} - {%- set controller = redirect.controller -%} - {%- set redirect_route = '@' ~ redirect.route %} - - {%- endif %} - - {% if request_collector and request_collector.forwardtoken -%} - {% set forward_profile = profile.childByToken(request_collector.forwardtoken) %} - {% set controller = forward_profile ? forward_profile.collector('request').controller : 'n/a' %} - - {%- endif %} - - -
    -
    - {% endif %} - {% endblock %} -
    - -
    -
    - - -
    -
    - {{ include('@WebProfiler/Profiler/base_js.html.twig') }} - {% block panel '' %} -
    -
    -
    -
    - -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig deleted file mode 100644 index 747d73f..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.css.twig +++ /dev/null @@ -1,79 +0,0 @@ -{# Mixins - ========================================================================= #} -{% set mixins = { - 'break_long_words': '-ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto;', - 'monospace_font': 'font-family: monospace; font-size: 13px; font-size-adjust: 0.5;', - 'sans_serif_font': 'font-family: Helvetica, Arial, sans-serif;', - 'subtle_border_and_shadow': 'background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);' -} %} - -{# Normalization - (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) - ========================================================================= #} -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} - -{# Basic styles - ========================================================================= #} -html, body { - height: 100%; - width: 100%; -} -body { - background-color: #F9F9F9; - color: #aaa; - display: flex; - flex-direction: column; - {{ mixins.sans_serif_font|raw }} - font-size: 14px; - line-height: 1.4; -} -.header { - background-color: #222; - position: fixed; - top: 0; - display: flex; - width: 100%; -} -.header h1 { - color: #FFF; - font-weight: normal; - font-size: 21px; - margin: 0; - padding: 10px 10px 8px; - word-break: break-all; -} - -a.doc { - color: #FFF; - text-decoration: none; - margin: auto; - margin-right: 10px; -} - -a.doc:hover { - text-decoration: underline; -} - -.empty { - padding: 10px; - color: #555; -} - -.source { - margin-top: 41px; -} - -.source li code { - color: #555; -} - -.source li.selected { - background: rgba(255, 255, 153, 0.5); -} - -.anchor { - position: relative; - display: inline-block; - top: -7em; - visibility: hidden; -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig deleted file mode 100644 index ba94bc0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/open.html.twig +++ /dev/null @@ -1,22 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block head %} - -{% endblock %} - -{% block body %} - {% set source = filename|file_excerpt(line, -1) %} -
    -

    {{ file }}{% if 0 < line %} line {{ line }}{% endif %}

    - Open in your IDE? -
    -
    - {% if source is null %} -

    The file is not readable.

    - {% else %} - {{ source|raw }} - {% endif %} -
    -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig deleted file mode 100644 index 67e38ab..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/profiler.css.twig +++ /dev/null @@ -1,1477 +0,0 @@ -{# This file is partially duplicated in TwigBundle/Resources/views/exceotion.css.twig. - If you make any change in this file, verify the same change is needed in the other file. #} -{# Normalization - (normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css) - ========================================================================= #} -*{-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0} - -:root { - --font-sans-serif: Helvetica, Arial, sans-serif; - --page-background: #f9f9f9; - --color-text: #222; - --color-muted: #999; - --color-link: #218BC3; - /* when updating any of these colors, do the same in toolbar.css.twig */ - --color-success: #4f805d; - --color-warning: #a46a1f; - --color-error: #b0413e; - --badge-background: #f5f5f5; - --badge-color: #666; - --badge-warning-background: #FEF3C7; - --badge-warning-color: #B45309; - --badge-danger-background: #FEE2E2; - --badge-danger-color: #B91C1C; - --tab-background: #fff; - --tab-color: #444; - --tab-active-background: #666; - --tab-active-color: #fafafa; - --tab-disabled-background: #f5f5f5; - --tab-disabled-color: #999; - --log-filter-button-background: #fff; - --log-filter-button-border: #999; - --log-filter-button-color: #555; - --log-filter-active-num-color: #2563EB; - --log-timestamp-color: #555; - --metric-value-background: #fff; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #e0e0e0; - --metric-label-color: inherit; - --trace-selected-background: #F7E5A1; - --table-border: #e0e0e0; - --table-background: #fff; - --table-header: #e0e0e0; - --info-background: #ddf; - --tree-active-background: #F7E5A1; - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(128, 128, 128, .2); - --border: 1px solid #e0e0e0; - --background-error: var(--color-error); - --highlight-comment: #969896; - --highlight-default: #222222; - --highlight-keyword: #a71d5d; - --highlight-string: #183691; - --base-0: #fff; - --base-1: #f5f5f5; - --base-2: #e0e0e0; - --base-3: #ccc; - --base-4: #666; - --base-5: #444; - --base-6: #222; - --card-label-background: #eee; - --card-label-color: var(--base-6); -} - -.theme-dark { - --page-background: #36393e; - --color-text: #e0e0e0; - --color-muted: #777; - --color-link: #93C5FD; - --color-error: #d43934; - --badge-background: #555; - --badge-color: #ddd; - --badge-warning-background: #B45309; - --badge-warning-color: #FEF3C7; - --badge-danger-background: #B91C1C; - --badge-danger-color: #FEE2E2; - --tab-background: #555; - --tab-color: #ccc; - --tab-active-background: #888; - --tab-active-color: #fafafa; - --tab-disabled-background: var(--page-background); - --tab-disabled-color: #777; - --log-filter-button-background: #555; - --log-filter-button-border: #999; - --log-filter-button-color: #ccc; - --log-filter-active-num-color: #93C5FD; - --log-timestamp-color: #ccc; - --metric-value-background: #555; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #777; - --metric-label-color: #e0e0e0; - --trace-selected-background: #71663acc; - --table-border: #444; - --table-background: #333; - --table-header: #555; - --info-background: rgba(79, 148, 195, 0.5); - --tree-active-background: var(--metric-label-background); - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(32, 32, 32, .2); - --border: 1px solid #666; - --background-error: #b0413e; - --highlight-comment: #dedede; - --highlight-default: var(--base-6); - --highlight-keyword: #ff413c; - --highlight-string: #70a6fd; - --base-0: #2e3136; - --base-1: #444; - --base-2: #666; - --base-3: #666; - --base-4: #666; - --base-5: #e0e0e0; - --base-6: #f5f5f5; - --card-label-background: var(--tab-active-background); - --card-label-color: var(--tab-active-color); -} - -{# Basic styles - ========================================================================= #} -html, body { - height: 100%; - width: 100%; -} -body { - background-color: var(--page-background); - color: var(--base-6); - display: flex; - flex-direction: column; - font-family: var(--font-sans-serif); - font-size: 14px; - line-height: 1.4; -} - -h2, h3, h4 { - font-weight: 500; - margin: 1.5em 0 .5em; -} -h2 + h3, -h3 + h4 { - margin-top: 1em; -} -h2 { - font-size: 24px; -} -h3 { - font-size: 21px; -} -h4 { - font-size: 18px; -} -h2 span, h3 span, h4 span, -h2 small, h3 small, h4 small { - color: var(--color-muted); -} - -li { - margin-bottom: 10px; -} - -p { - font-size: 16px; - margin-bottom: 1em; -} - -a { - color: var(--color-link); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.link-inverse { - text-decoration: underline; -} -a.link-inverse:hover { - text-decoration: none; -} -a:active, -a:hover { - outline: 0; -} -h2 a, -h3 a, -h4 a { - text-decoration: underline; -} -h2 a:hover, -h3 a:hover, -h4 a:hover { - text-decoration: none; -} - -abbr { - border-bottom: 1px dotted var(--base-5); - cursor: help; -} - -code, pre { - font-family: monospace; - font-size: 13px; -} - -{# Buttons (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -button { - font-family: var(--font-sans-serif); -} -.btn { - background: #777; - border-radius: 2px; - border: 0; - color: #f5f5f5; - display: inline-block; - padding: .5em .75em; -} -.btn:hover { - cursor: pointer; - opacity: 0.8; - text-decoration: none; -} -.btn-sm { - font-size: 12px; -} -.btn-sm svg { - height: 16px; - width: 16px; - vertical-align: middle; -} -.btn-link { - border-color: transparent; - color: var(--color-link); - text-decoration: none; - background-color: transparent; - outline: none; - border: 0; - padding: 0; - cursor: pointer; -} -.btn-link:hover { - text-decoration: underline; -} -{# Tables - ------------------------------------------------------------------------- #} -table, tr, th, td { - background: var(--table-background); - border-collapse: collapse; - line-height: 1.5; - vertical-align: top; -} -table { - background: var(--base-0); - border: var(--border); - box-shadow: var(--shadow); - margin: 1em 0; - width: 100%; -} - -table th, table td { - padding: 8px 10px; -} - -table th { - font-weight: bold; - text-align: left; -} -table thead th { - background-color: var(--table-header); -} -table thead th.key { - width: 19%; -} -table thead.small th { - font-size: 12px; - padding: 4px 10px; -} - -table tbody th, -table tbody td { - border: 1px solid var(--base-2); - border-width: 1px 0; - font-family: monospace; - font-size: 13px; -} - -table tbody div { - margin: .25em 0; -} -table tbody ul { - margin: 0; - padding: 0 0 0 1em; -} - -table thead th.num-col, -table tbody td.num-col { - text-align: center; -} - -{# Utility classes - ========================================================================= #} -.block { - display: block; -} -.full-width { - width: 100%; -} -.hidden { - display: none; -} -.nowrap { - white-space: pre; -} -.prewrap { - white-space: pre-wrap; -} -.newline { - display: block; -} -.break-long-words { - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} -.text-small { - font-size: 12px !important; -} -.text-muted { - color: var(--color-muted); -} -.text-danger { - color: var(--color-error); -} -.text-bold { - font-weight: bold; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.font-normal { - font-family: var(--font-sans-serif); - font-size: 14px; -} -.help { - color: var(--color-muted); - font-size: 14px; - margin-bottom: .5em; -} -.empty { - border: 4px dashed var(--base-2); - color: var(--color-muted); - margin: 1em 0; - padding: .5em 2em; -} - -.label { - background-color: var(--base-4); - color: #FAFAFA; - display: inline-block; - font-size: 12px; - font-weight: bold; - padding: 3px 7px; - white-space: nowrap; -} -.label.same-width { - min-width: 70px; - text-align: center; -} -.label.status-success { background: var(--color-success); color: #FFF; } -.label.status-warning { background: var(--color-warning); color: #FFF; } -.label.status-error { background: var(--background-error); color: #FFF; } - -{# Metrics - ------------------------------------------------------------------------- #} -.metrics { - margin: 1em 0 0; - overflow: auto; -} -.metrics .metric { - float: left; - margin: 0 1em 1em 0; -} - -.metric { - background: var(--metric-value-background); - border: 1px solid var(--table-border); - box-shadow: var(--shadow); - color: var(--metric-value-color); - min-width: 100px; - min-height: 70px; -} -.metric .value { - display: block; - font-size: 28px; - padding: 8px 15px 4px; - text-align: center; -} -.metric .value svg { - margin: 5px 0 -5px; -} -.metric .unit { - color: var(--metric-unit-color); - font-size: 18px; - margin-left: -4px; -} -.metric .label { - background: var(--metric-label-background); - color: var(--metric-label-color); - display: block; - font-size: 12px; - padding: 5px; - text-align: center; -} - -.metrics-horizontal .metric { - min-height: 0; - min-width: 0; -} -.metrics-horizontal .metric .value, -.metrics-horizontal .metric .label { - display: inline; - padding: 2px 6px; -} -.metrics-horizontal .metric .label { - display: inline-block; - padding: 6px; -} -.metrics-horizontal .metric .value { - font-size: 16px; -} -.metrics-horizontal .metric .value svg { - max-height: 14px; - line-height: 10px; - margin: 0; - padding-left: 4px; - vertical-align: middle; -} - -.metric-divider { - float: left; - margin: 0 1em; - min-height: 1px; {# required to apply 'margin' to an empty 'div' #} -} - -{# Cards - ------------------------------------------------------------------------- #} -.card { - background: var(--base-0); - border: var(--border); - box-shadow: var(--shadow); - margin: 1em 0; - padding: 10px; -} -.card-block + .card-block { - border-top: 1px solid var(--base-2); - padding-top: 10px; -} -.card *:first-child, -.card-block *:first-child { - margin-top: 0; -} -.card .label { - background-color: var(--card-label-background); - color: var(--card-label-color); -} - -{# Status - ------------------------------------------------------------------------- #} -.status-success { - background: rgba(94, 151, 110, 0.3); -} -.status-warning { - background: rgba(240, 181, 24, 0.3); -} -.status-error { - background: rgba(176, 65, 62, 0.2); -} -.status-success td, -.status-warning td, -.status-error td { - background: transparent; -} -tr.status-error td, -tr.status-warning td { - border-bottom: 1px solid var(--base-2); - border-top: 1px solid var(--base-2); -} - -.status-warning .colored { - color: var(--color-warning); -} -.status-error .colored { - color: var(--color-error); -} - -{# Syntax highlighting - ========================================================================= #} -.highlight pre { - margin: 0; - white-space: pre-wrap; -} - -.highlight .keyword { color: #8959A8; font-weight: bold; } -.highlight .word { color: var(--color-text); } -.highlight .variable { color: #916319; } -.highlight .symbol { color: var(--color-text); } -.highlight .comment { color: #999999; } -.highlight .backtick { color: #718C00; } -.highlight .string { color: #718C00; } -.highlight .number { color: #F5871F; font-weight: bold; } -.highlight .error { color: #C82829; } - -{# Icons - ========================================================================= #} -.sf-icon { - vertical-align: middle; - background-repeat: no-repeat; - background-size: contain; - width: 16px; - height: 16px; - display: inline-block; -} -.sf-icon svg { - width: 16px; - height: 16px; -} -.sf-icon.sf-medium, -.sf-icon.sf-medium svg { - width: 24px; - height: 24px; -} -.sf-icon.sf-large, -.sf-icon.sf-large svg { - width: 32px; - height: 32px; -} - - -{# Layout - ========================================================================= #} -.container { - max-width: 1300px; - padding-right: 15px; -} -#header { - flex: 0 0 auto; -} -#header .container { - display: flex; - flex-direction: row; - justify-content: space-between; -} -#summary { - flex: 0 0 auto; -} -#content { - height: 100%; -} -#main { - display: flex; - flex-direction: row; - min-height: 100%; -} -#sidebar { - flex: 0 0 220px; -} -#collector-wrapper { - flex: 0 1 100%; - min-width: 0; -} -#collector-content { - margin: 0 0 30px 0; - padding: 14px 0 14px 20px; -} - -#main h2:first-of-type { - margin-top: 0; -} - -{# Header (the colors of this element don't change based on the selected theme) - ========================================================================= #} -#header { - background-color: #222; - overflow: hidden; -} -#header h1 { - color: #fff; - flex: 1; - font-weight: normal; - font-size: 21px; - margin: 0; - padding: 10px 10px 8px; -} -#header h1 span { - color: #ccc; -} -#header h1 svg { - height: 40px; - width: 40px; - margin-top: -4px; - vertical-align: middle; -} -#header h1 svg path, -#header h1 svg .sf-svg-path { - fill: #fff; -} -#header .search { - padding-top: 11px; -} -#header .search input { - border: 1px solid #ddd; - margin-right: 4px; - padding: 7px 8px; - width: 200px; -} - -{# Summary - ========================================================================= #} -#summary .status { - background: var(--base-2); - border: solid rgba(0, 0, 0, 0.1); - border-width: 2px 0; - padding: 10px; -} -#summary h2, -#summary h2 a { - color: var(--base-6); - font-size: 21px; - margin: 0; - text-decoration: none; - vertical-align: middle; -} -#summary h2 a:hover { - text-decoration: underline; -} -#summary h2 a.referer { - margin-left: .5em; - font-size: 75%; - color: rgba(255, 255, 255, 0.5); -} -#summary h2 a.referer:before { - content: '\1F503\00a0'; -} - -#summary .status-success { background: var(--color-success); } -#summary .status-warning { background: var(--color-warning); } -#summary .status-error { background: var(--background-error); } - -#summary .status-success h2, -#summary .status-success a, -#summary .status-warning h2, -#summary .status-warning a, -#summary .status-error h2, -#summary .status-error a { - color: #FFF; -} - -#summary dl.metadata, -#summary dl.metadata a { - margin: 5px 0 0; - color: rgba(255, 255, 255, 0.75); -} -#summary dl.metadata dt, -#summary dl.metadata dd { - display: inline-block; - font-size: 13px; -} -#summary dl.metadata dt { - font-weight: bold; -} -#summary dl.metadata dt:after { - content: ':'; -} -#summary dl.metadata dd { - margin: 0 1.5em 0 0; -} - -#summary dl.metadata .label { - background: rgba(255, 255, 255, 0.2); -} - -{# Sidebar - ========================================================================= #} -#sidebar { - background: #444; - color: #ccc; - padding-bottom: 30px; - position: relative; - width: 220px; - z-index: 9999; -} -#sidebar .module { - padding: 10px; - width: 220px; -} - -{# Sidebar Shortcuts - ------------------------------------------------------------------------- #} -#sidebar #sidebar-shortcuts { - background: #333; - width: 220px; -} -#sidebar #sidebar-shortcuts .shortcuts { - position: relative; - padding: 16px 10px; -} -#sidebar-shortcuts .icon { - display: block; - float: left; - width: 50px; - margin: 2px 0 0 -10px; - text-align: center; -} -#sidebar #sidebar-shortcuts .btn { - color: #f5f5f5; -} -#sidebar #sidebar-shortcuts .btn + .btn { - margin-left: 5px; -} -#sidebar #sidebar-shortcuts .btn { - padding: .5em; -} - -{# Sidebar Search (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -#sidebar-search .form-group:first-of-type { - padding-top: 20px; -} -#sidebar-search .form-group { - clear: both; - overflow: hidden; - padding-bottom: 10px; -} -#sidebar-search .form-group label { - float: left; - font-size: 13px; - line-height: 24px; - width: 60px; -} -#sidebar-search .form-group input, -#sidebar-search .form-group select { - float: left; - font-size: 13px; - padding: 3px 6px; -} -#sidebar-search .form-group input { - background: #ccc; - border: 1px solid var(--color-muted); - color: #222; - width: 120px; -} -#sidebar-search .form-group select { - color: #222; -} -#sidebar-search .form-group .btn { - float: right; - margin-right: 10px; -} - -{# Sidebar Menu (the colors of this element don't change based on the selected theme) - ------------------------------------------------------------------------- #} -#menu-profiler { - margin: 0; - padding: 0; - list-style-type: none; -} -#menu-profiler li { - position: relative; - margin-bottom: 0; -} -#menu-profiler li a { - border: solid transparent; - border-width: 2px 0; - color: var(--base-3); - display: block; -} -#menu-profiler li a:hover { - text-decoration: none; -} -#menu-profiler li a .label { - background: transparent; - color: #EEE; - display: block; - padding: 8px 10px 8px 50px; - overflow: hidden; - white-space: nowrap; -} -#menu-profiler li a .label .icon { - display: block; - position: absolute; - left: 0; - top: 8px; - width: 50px; - text-align: center; -} -#menu-profiler .label .icon img, -#menu-profiler .label .icon svg { - height: 24px; - max-width: 24px; -} -#menu-profiler li a .label .icon svg path, -#menu-profiler li a .label .icon svg .sf-svg-path { - fill: #DDD; -} -#menu-profiler li a .label strong { - font-size: 16px; - font-weight: normal; -} -#menu-profiler li a .label.disabled { - opacity: .25; -} -#menu-profiler li a:hover .label.disabled, -#menu-profiler li.selected a .label.disabled { - opacity: 1; -} - -#menu-profiler li.selected a, -#menu-profiler:hover li.selected a:hover, -#menu-profiler li a:hover { - background: #666; - border: solid #555; - border-width: 2px 0; -} -#menu-profiler li.selected a .label, -#menu-profiler li a:hover .label { - color: #FFF; -} -#menu-profiler li.selected a .icon svg path, -#menu-profiler li.selected a .icon svg .sf-svg-path, -#menu-profiler li a:hover .icon svg path, -#menu-profiler li a:hover .icon svg .sf-svg-path { - fill: #fff; -} - -#menu-profiler li a .count { - background-color: #666; - color: #fff; - display: inline-block; - font-weight: bold; - min-width: 10px; - padding: 2px 6px; - position: absolute; - right: 10px; - text-align: center; - vertical-align: baseline; - white-space: nowrap; -} -#menu-profiler li a span.count span { - font-size: 12px; - -} -#menu-profiler li a span.count span + span::before { - content: " / "; - color: #AAA; -} - -#menu-profiler .label-status-warning .count { - background: var(--color-warning); -} -#menu-profiler .label-status-error .count { - background: var(--background-error); -} - -{# Timeline panel - ========================================================================= #} -#timeline-control { - background: var(--table-background); - box-shadow: var(--shadow); - margin: 1em 0; - padding: 10px; -} -#timeline-control label { - font-weight: bold; - margin-right: 1em; -} -#timeline-control input { - background: var(--metric-value-background); - border: 1px solid var(--table-border); - font-size: 16px; - padding: 4px; - text-align: right; - width: 5em; -} -#timeline-control .help { - margin-left: 1em; -} - -.sf-profiler-timeline .legends { - font-size: 12px; - line-height: 1.5em; -} -.sf-profiler-timeline + p.help { - margin-top: 0; -} - -{# Tabbed navigation - ========================================================================= #} -.tab-navigation { - margin: 0 0 1em 0; - padding: 0; -} -.tab-navigation li { - background: var(--tab-background); - border: 1px solid var(--table-border); - color: var(--tab-color); - cursor: pointer; - display: inline-block; - font-size: 16px; - margin: 0 0 0 -1px; - padding: .5em .75em; - z-index: 1; -} -.tab-navigation li .badge { - background-color: var(--base-1); - color: var(--base-4); - display: inline-block; - font-size: 14px; - font-weight: bold; - margin-left: 8px; - min-width: 10px; - padding: 1px 6px; - text-align: center; - white-space: nowrap; -} -.tab-navigation li.disabled { - background: var(--tab-disabled-background); - color: var(--tab-disabled-color); -} -.tab-navigation li.active { - background: var(--tab-active-background); - color: var(--tab-active-color); - z-index: 1100; -} -.tab-navigation li.active .badge { - background-color: var(--base-5); - color: var(--base-2); -} -.tab-content > *:first-child { - margin-top: 0; -} -.tab-navigation li .badge.status-warning { background: var(--color-warning); color: #FFF; } -.tab-navigation li .badge.status-error { background: var(--background-error); color: #FFF; } - -.sf-tabs .tab:not(:first-child) { display: none; } - -{# Toggles - ========================================================================= #} -.sf-toggle-content { - -moz-transition: display .25s ease; - -webkit-transition: display .25s ease; - transition: display .25s ease; -} -.sf-toggle-content.sf-toggle-hidden { - display: none; -} -.sf-toggle-content.sf-toggle-visible { - display: block; -} - -{# Filters - ========================================================================= #} -[data-filters] { position: relative; } -[data-filtered] { cursor: pointer; } -[data-filtered]:after { content: '\00a0\25BE'; } -[data-filtered]:hover .filter-list li { display: inline-flex; } -[class*="filter-hidden-"] { display: none; } -.filter-list { position: absolute; border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; } -.filter-list :after { content: ''; } -.filter-list li { - background: var(--tab-disabled-background); - border-bottom: var(--border); - color: var(--tab-disabled-color); - display: none; - list-style: none; - margin: 0; - padding: 5px 10px; - text-align: left; - font-weight: normal; -} -.filter-list li.active { - background: var(--tab-background); - color: var(--tab-color); -} -.filter-list li.last-active { - background: var(--tab-active-background); - color: var(--tab-active-color); -} - -.filter-list-level li { cursor: s-resize; } -.filter-list-level li.active { cursor: n-resize; } -.filter-list-level li.last-active { cursor: default; } -.filter-list-level li.last-active:before { content: '\2714\00a0'; } -.filter-list-choice li:before { content: '\2714\00a0'; color: transparent; } -.filter-list-choice li.active:before { color: unset; } - -{# Twig panel - ========================================================================= #} -#twig-dump pre { - font-size: 12px; - line-height: 1.7; - background-color: var(--base-0); - border: var(--border); - padding: 15px; - box-shadow: 0 0 1px rgba(128, 128, 128, .2); -} -#twig-dump span { - border-radius: 2px; - padding: 1px 2px; -} -#twig-dump .status-error { background: transparent; color: var(--color-error); } -#twig-dump .status-warning { background: rgba(240, 181, 24, 0.3); } -#twig-dump .status-success { background: rgba(100, 189, 99, 0.2); } -#twig-dump .status-info { background: var(--info-background); } - -#twig-table tbody td { - vertical-align: middle; -} -#twig-table tbody td > a { - margin-left: -5px; -} -#twig-table tbody td div { - margin: 0; -} - -.icon-twig { - vertical-align: text-bottom; -} -.icon-twig svg path { - fill: #7eea12; -} - -{# Logger panel - ========================================================================= #} -.badge { - background: var(--badge-background); - border-radius: 4px; - color: var(--badge-color); - font-size: 12px; - font-weight: bold; - padding: 1px 4px; -} -.badge-warning { - background: var(--badge-warning-background); - color: var(--badge-warning-color); -} - -.log-filters { - display: flex; -} -.log-filters .log-filter { - position: relative; -} -.log-filters .log-filter + .log-filter { - margin-left: 15px; -} -.log-filters .log-filter summary { - align-items: center; - background: var(--log-filter-button-background); - border-radius: 2px; - border: 1px solid var(--log-filter-button-border); - color: var(--log-filter-button-color); - cursor: pointer; - display: flex; - padding: 5px 8px; -} -.log-filters .log-filter summary .icon { - height: 18px; - width: 18px; - margin: 0 7px 0 0; -} -.log-filters .log-filter summary svg { - height: 18px; - width: 18px; - opacity: 0.7; -} -.log-filters .log-filter summary .filter-active-num { - color: var(--log-filter-active-num-color); - font-weight: bold; - padding: 0 1px; -} -.log-filter .tab-navigation { - margin-bottom: 0; -} -.log-filter .tab-navigation li:first-child { - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -.log-filter .tab-navigation li:last-child { - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -.log-filter .tab-navigation li { - border-color: var(--log-filter-button-border); - padding: 0; -} -.log-filter .tab-navigation li + li { - margin-left: -5px; -} -.log-filter .tab-navigation li .badge { - font-size: 13px; - padding: 0 6px; -} -.log-filter .tab-navigation li input { - display: none; -} -.log-filter .tab-navigation li label { - align-items: center; - cursor: pointer; - padding: 5px 10px; - display: inline-flex; - font-size: 14px; -} - -.log-filters .log-filter .log-filter-content { - background: var(--base-0); - border: 1px solid var(--table-border); - border-radius: 2px; - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - padding: 15px; - position: absolute; - left: 0; - top: 36px; - max-width: 400px; - min-width: 200px; - z-index: 9999; -} -.log-filters .log-filter .log-filter-content .log-filter-option { - align-items: center; - display: flex; -} -.log-filter .filter-select-all-or-none { - margin-bottom: 10px; -} -.log-filter .filter-select-all-or-none button + button { - margin-left: 15px; -} -.log-filters .log-filter .log-filter-content .log-filter-option + .log-filter-option { - margin: 7px 0 0; -} -.log-filters .log-filter .log-filter-content .log-filter-option label { - cursor: pointer; - flex: 1; - padding-left: 10px; -} - -table.logs .metadata { - display: block; - font-size: 12px; -} -.theme-dark tr.status-error td, -.theme-dark tr.status-warning td { border-bottom: unset; border-top: unset; } - -table.logs .log-timestamp { - color: var(--log-timestamp-color); -} -table.logs .log-metadata { - margin: 8px 0 0; -} -table.logs .log-metadata > span { - display: inline-block; -} -table.logs .log-metadata > span + span { - margin-left: 10px; -} -table.logs .log-metadata .log-channel { - color: var(--base-1); - font-size: 13px; - font-weight: bold; -} -table.logs .log-metadata .log-num-occurrences { - color: var(--color-muted); - font-size: 13px; -} -.log-type-badge { - display: inline-block; - font-family: var(--font-sans-serif); - margin-top: 5px; -} -.log-type-badge.badge-deprecation { - background: var(--badge-warning-background); - color: var(--badge-warning-color); -} -.log-type-badge.badge-error { - background: var(--badge-danger-background); - color: var(--badge-danger-color); -} -.log-type-badge.badge-silenced { - background: #EDE9FE; - color: #6D28D9; -} -.theme-dark .log-type-badge.badge-silenced { - background: #5B21B6; - color: #EDE9FE; -} - -tr.log-status-warning { - border-left: 4px solid #F59E0B; -} -tr.log-status-error { - border-left: 4px solid #EF4444; -} -tr.log-status-silenced { - border-left: 4px solid #A78BFA; -} - -.container-compilation-logs { - background: var(--table-background); - border: 1px solid var(--base-2); - margin-top: 30px; - padding: 15px; -} -.container-compilation-logs summary { - cursor: pointer; -} -.container-compilation-logs summary h4 { - margin: 0 0 5px; -} -.container-compilation-logs summary p { - margin: 0; -} - -{# Doctrine panel - ========================================================================= #} -.sql-runnable { - background: var(--base-1); - margin: .5em 0; - padding: 1em; -} -.sql-explain { - overflow-x: auto; - max-width: 920px; -} -.sql-explain table td, .sql-explain table tr { - word-break: normal; -} -.queries-table pre { - margin: 0; - white-space: pre-wrap; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} - -{# Security panel - ========================================================================= #} -#collector-content .decision-log .voter_result td { - border-top-width: 1px; - border-bottom-width: 0; - padding-bottom: 0; -} - -#collector-content .decision-log .voter_details td { - border-top-width: 0; - border-bottom-width: 1px; - padding-bottom: 0; -} - -#collector-content .decision-log .voter_details table { - border: 0; - margin: 0; - box-shadow: unset; -} - -#collector-content .decision-log .voter_details table td { - border: 0; - padding: 0 0 8px 0; -} - -{# Validator panel - ========================================================================= #} - -#collector-content .sf-validator { - margin-bottom: 2em; -} - -#collector-content .sf-validator .sf-validator-context, -#collector-content .sf-validator .trace { - border: var(--border); - background: var(--base-0); - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} -#collector-content .sf-validator .trace { - font-size: 12px; -} -#collector-content .sf-validator .trace li { - margin-bottom: 0; - padding: 0; -} -#collector-content .sf-validator .trace li.selected { - background: rgba(255, 255, 153, 0.5); -} - -{# Messenger panel - ========================================================================= #} - -#collector-content .message-bus .trace { - border: 1px solid #DDD; - background: #FFF; - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} -#collector-content .message-bus .trace { - font-size: 12px; -} -#collector-content .message-bus .trace li { - margin-bottom: 0; - padding: 0; -} -#collector-content .message-bus .trace li.selected { - background: rgba(255, 255, 153, 0.5); -} - -{# Dump panel - ========================================================================= #} -pre.sf-dump, pre.sf-dump .sf-dump-default { - z-index: 1000 !important; -} - -#collector-content .sf-dump { - margin-bottom: 2em; -} -#collector-content pre.sf-dump, -#collector-content .sf-dump code, -#collector-content .sf-dump samp { - font-family: monospace; - font-size: 13px; -} -#collector-content .sf-dump a { - cursor: pointer; -} -#collector-content .sf-dump pre.sf-dump, -#collector-content .sf-dump .trace { - border: var(--border); - padding: 10px; - margin: 0.5em 0; - overflow: auto; -} - -#collector-content pre.sf-dump, -#collector-content .sf-dump-default { - background: none; -} -#collector-content .sf-dump-ellipsis { max-width: 100em; } - -#collector-content .sf-dump { - margin: 0; - padding: 0; - line-height: 1.4; -} - -#collector-content .dump-inline .sf-dump { - display: inline; - white-space: normal; - font-size: inherit; - line-height: inherit; -} -#collector-content .dump-inline .sf-dump:after { - display: none; -} - -#collector-content .sf-dump .trace { - font-size: 12px; -} -#collector-content .sf-dump .trace li { - margin-bottom: 0; - padding: 0; -} - -{# Search Results page - ========================================================================= #} -#search-results td { - font-family: var(--font-sans-serif); - vertical-align: middle; -} - -#search-results .sf-search { - visibility: hidden; - margin-left: 2px; -} -#search-results tr:hover .sf-search { - visibility: visible; -} - -{# Small screens - ========================================================================= #} - -.visible-small { - display: none; -} -.hidden-small { - display: inherit; -} - -@media (max-width: 768px) { - #sidebar { - flex-basis: 50px; - overflow-x: hidden; - transition: flex-basis 200ms ease-out; - } - #sidebar:hover, #sidebar.expanded { - flex-basis: 220px; - } - - #sidebar-search { - display: none; - } - #sidebar:hover #sidebar-search.sf-toggle-visible, #sidebar.expanded #sidebar-search.sf-toggle-visible { - display: block; - } - - #sidebar .module { - display: none; - } - #sidebar:hover .module, #sidebar.expanded .module { - display: block; - } - - #sidebar:not(:hover):not(.expanded) .label .count { - border-radius: 50%; - border: 1px solid #eee; - height: 8px; - min-width: 0; - padding: 0; - right: 4px; - text-indent: -9999px; - top: 50%; - width: 8px; - } - - .visible-small { - display: inherit; - } - .hidden-small { - display: none; - } - - .btn-sm svg { - margin-left: 2px; - } -} - -{# Config Options - ========================================================================= #} -body.width-full .container { - max-width: 100%; -} - -body.theme-light #collector-content .sf-dump pre.sf-dump, -body.theme-light #collector-content .sf-dump .trace { - background: #FFF; -} -body.theme-light #collector-content pre.sf-dump, -body.theme-light #collector-content .sf-dump-default { - color: #CC7832; -} -body.theme-light #collector-content .sf-dump-str { color: #629755; } -body.theme-light #collector-content .sf-dump-private, -body.theme-light #collector-content .sf-dump-protected, -body.theme-light #collector-content .sf-dump-public { color: #262626; } -body.theme-light #collector-content .sf-dump-note { color: #6897BB; } -body.theme-light #collector-content .sf-dump-key { color: #789339; } -body.theme-light #collector-content .sf-dump-ref { color: #6E6E6E; } -body.theme-light #collector-content .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -body.theme-light #collector-content .sf-dump-ellipsis-path { max-width: 5em; } -body.theme-light #collector-content .sf-dump .trace li.selected { - background: rgba(255, 255, 153, 0.5); -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig deleted file mode 100644 index 7ddbf9c..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/results.html.twig +++ /dev/null @@ -1,67 +0,0 @@ -{% extends '@WebProfiler/Profiler/layout.html.twig' %} - -{% macro profile_search_filter(request, result, property) %} - {%- if request.hasSession -%} - {{ include('@WebProfiler/Icon/search.svg') }} - {%- endif -%} -{% endmacro %} - -{% import _self as helper %} - -{% block summary %} -
    -
    -

    Profile Search

    -
    -
    -{% endblock %} - -{% block panel %} -

    {{ tokens ? tokens|length : 'No' }} results found

    - - {% if tokens %} - - - - - - - - - - - - - {% for result in tokens %} - {% set css_class = result.status_code|default(0) > 399 ? 'status-error' : result.status_code|default(0) > 299 ? 'status-warning' : 'status-success' %} - - - - - - - - - - {% endfor %} - -
    StatusIPMethodURLTimeToken
    - {{ result.status_code|default('n/a') }} - - {{ result.ip }} {{ helper.profile_search_filter(request, result, 'ip') }} - - {{ result.method }} {{ helper.profile_search_filter(request, result, 'method') }} - - {{ result.url }} - {{ helper.profile_search_filter(request, result, 'url') }} - - {{ result.time|date('d-M-Y') }} - {{ result.time|date('H:i:s') }} - {{ result.token }}
    - {% else %} -
    -

    The query returned no result.

    -
    - {% endif %} - -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig deleted file mode 100644 index 7494b4e..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/search.html.twig +++ /dev/null @@ -1,56 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig deleted file mode 100644 index 4b23946..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/settings.html.twig +++ /dev/null @@ -1,193 +0,0 @@ - - -Settings - - - - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig deleted file mode 100644 index cb9986b..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/table.html.twig +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - {% for key in data|keys|sort %} - - - - - {% endfor %} - -
    {{ labels is defined ? labels[0] : 'Key' }}{{ labels is defined ? labels[1] : 'Value' }}
    {{ key }}{{ profiler_dump(data[key]) }}
    diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig deleted file mode 100644 index 920e41e..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.css.twig +++ /dev/null @@ -1,562 +0,0 @@ -{# when updating any of these colors, do the same in profiler.css.twig #} -{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %} - -.sf-minitoolbar { - background-color: #222; - border-top-left-radius: 4px; - bottom: 0; - box-sizing: border-box; - display: none; - height: 36px; - padding: 6px; - position: fixed; - right: 0; - z-index: 99999; -} - -.sf-minitoolbar button { - background-color: transparent; - padding: 0; - border: none; -} -.sf-minitoolbar svg, -.sf-minitoolbar img { - max-height: 24px; - max-width: 24px; - display: inline; -} - -.sf-toolbar-clearer { - clear: both; - height: 36px; -} - -.sf-display-none { - display: none; -} - -.sf-toolbarreset * { - box-sizing: content-box; - vertical-align: baseline; - letter-spacing: normal; - width: auto; -} - -.sf-toolbarreset { - background-color: #222; - bottom: 0; - box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - color: #EEE; - font: 11px Arial, sans-serif; - left: 0; - margin: 0; - padding: 0 36px 0 0; - position: fixed; - right: 0; - text-align: left; - text-transform: none; - z-index: 99999; - direction: ltr; - - /* neutralize the aliasing defined by external CSS styles */ - -webkit-font-smoothing: subpixel-antialiased; - -moz-osx-font-smoothing: auto; -} -.sf-toolbarreset abbr { - border: dashed #777; - border-width: 0 0 1px; -} -.sf-toolbarreset svg, -.sf-toolbarreset img { - height: 20px; - width: 20px; - display: inline-block; -} - -.sf-toolbarreset .sf-cancel-button { - color: #444; -} - -.sf-toolbarreset .hide-button { - background: #444; - display: block; - position: absolute; - top: 0; - right: 0; - width: 36px; - height: 36px; - cursor: pointer; - text-align: center; - border: none; - margin: 0; - padding: 0; -} -.sf-toolbarreset .hide-button svg { - max-height: 18px; - margin-top: 1px; -} - -.sf-toolbar-block { - cursor: default; - display: block; - float: left; - height: 36px; - margin-right: 0; - white-space: nowrap; - max-width: 15%; -} -.sf-toolbar-block > a, -.sf-toolbar-block > a:hover { - display: block; - text-decoration: none; - background-color: transparent; - color: inherit; -} - -.sf-toolbar-block span { - display: inline-block; -} -.sf-toolbar-block .sf-toolbar-value { - color: #F5F5F5; - font-size: 13px; - line-height: 36px; - padding: 0; -} -.sf-toolbar-block .sf-toolbar-label, -.sf-toolbar-block .sf-toolbar-class-separator { - color: #AAA; - font-size: 12px; -} - -.sf-toolbar-block .sf-toolbar-info { - border-collapse: collapse; - display: table; - z-index: 100000; -} -.sf-toolbar-block hr { - border-top: 1px solid #777; - margin: 4px 0; - padding-top: 4px; -} -.sf-toolbar-block .sf-toolbar-info-piece { - /* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */ - border-bottom: solid transparent 3px; - display: table-row; -} -.sf-toolbar-block .sf-toolbar-info-piece-additional, -.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - display: none; -} -.sf-toolbar-block .sf-toolbar-info-group { - margin-bottom: 4px; - padding-bottom: 2px; - border-bottom: 1px solid #333333; -} -.sf-toolbar-block .sf-toolbar-info-group:last-child { - margin-bottom: 0; - padding-bottom: 0; - border-bottom: none; -} - -.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { - padding: 2px 5px; - margin-bottom: 0; -} -.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status { - margin-left: 4px; -} - -.sf-toolbar-block .sf-toolbar-info-piece:last-child { - margin-bottom: 0; -} - -div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece a { - color: #99CDD8; - text-decoration: underline; -} -div.sf-toolbar .sf-toolbar-block a:hover { - text-decoration: none; -} - -.sf-toolbar-block .sf-toolbar-info-piece b { - color: #AAA; - display: table-cell; - font-size: 11px; - padding: 4px 8px 4px 0; -} -.sf-toolbar-block:not(.sf-toolbar-block-dump) .sf-toolbar-info-piece span { - color: #F5F5F5; -} -.sf-toolbar-block .sf-toolbar-info-piece span { - font-size: 12px; -} - -.sf-toolbar-block .sf-toolbar-info { - background-color: #444; - bottom: 36px; - color: #F5F5F5; - display: none; - padding: 9px 0; - position: absolute; -} - -.sf-toolbar-block .sf-toolbar-info:empty { - visibility: hidden; -} - -.sf-toolbar-block .sf-toolbar-status { - display: inline-block; - color: #FFF; - background-color: #666; - padding: 3px 6px; - margin-bottom: 2px; - vertical-align: middle; - min-width: 15px; - min-height: 13px; - text-align: center; -} - -.sf-toolbar-block .sf-toolbar-status-green { - background-color: {{ colors.success|raw }}; -} -.sf-toolbar-block .sf-toolbar-status-red { - background-color: {{ colors.error|raw }}; -} -.sf-toolbar-block .sf-toolbar-status-yellow { - background-color: {{ colors.warning|raw }}; -} - -.sf-toolbar-block.sf-toolbar-status-green { - background-color: {{ colors.success|raw }}; - color: #FFF; -} -.sf-toolbar-block.sf-toolbar-status-red { - background-color: {{ colors.error|raw }}; - color: #FFF; -} -.sf-toolbar-block.sf-toolbar-status-yellow { - background-color: {{ colors.warning|raw }}; - color: #FFF; -} - -.sf-toolbar-block-request .sf-toolbar-status { - color: #FFF; - display: inline-block; - font-size: 14px; - height: 36px; - line-height: 36px; - padding: 0 10px; -} -.sf-toolbar-block-request .sf-toolbar-info-piece a { - background-color: transparent; - text-decoration: none; -} -.sf-toolbar-block-request .sf-toolbar-info-piece a:hover { - text-decoration: underline; -} -.sf-toolbar-block-request .sf-toolbar-redirection-status { - font-weight: normal; - padding: 2px 4px; - line-height: 18px; -} -.sf-toolbar-block-request .sf-toolbar-info-piece span.sf-toolbar-redirection-method { - font-size: 12px; - height: 17px; - line-height: 17px; - margin-right: 5px; -} - -.sf-toolbar-block-ajax .sf-toolbar-icon { - cursor: pointer; -} - -.sf-toolbar-status-green .sf-toolbar-label, -.sf-toolbar-status-yellow .sf-toolbar-label, -.sf-toolbar-status-red .sf-toolbar-label { - color: #FFF; -} -.sf-toolbar-status-green svg path, -.sf-toolbar-status-green svg .sf-svg-path, -.sf-toolbar-status-red svg path, -.sf-toolbar-status-red svg .sf-svg-path, -.sf-toolbar-status-yellow svg path, -.sf-toolbar-status-yellow svg .sf-svg-path { - fill: #FFF; -} -.sf-toolbar-block-config svg path, -.sf-toolbar-block-config svg .sf-svg-path { - fill: #FFF; -} - -.sf-toolbar-block .sf-toolbar-icon { - display: block; - height: 36px; - padding: 0 7px; - overflow: hidden; - text-overflow: ellipsis; -} -.sf-toolbar-block-request .sf-toolbar-icon { - padding-left: 0; - padding-right: 0; -} - -.sf-toolbar-block .sf-toolbar-icon img, -.sf-toolbar-block .sf-toolbar-icon svg { - border-width: 0; - position: relative; - top: 8px; - vertical-align: baseline; -} - -.sf-toolbar-block .sf-toolbar-icon img + span, -.sf-toolbar-block .sf-toolbar-icon svg + span { - margin-left: 4px; -} -.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value { - margin-left: 4px; -} - -.sf-toolbar-block:hover, -.sf-toolbar-block.hover { - position: relative; -} -.sf-toolbar-block:hover .sf-toolbar-icon, -.sf-toolbar-block.hover .sf-toolbar-icon { - background-color: #444; - position: relative; - z-index: 10002; -} -.sf-toolbar-block-ajax.hover .sf-toolbar-info { - z-index: 10001; -} -.sf-toolbar-block:hover .sf-toolbar-info, -.sf-toolbar-block.hover .sf-toolbar-info { - display: block; - padding: 10px; - max-width: 480px; - max-height: 480px; - word-wrap: break-word; - overflow: hidden; - overflow-y: auto; -} -.sf-toolbar-info-piece b.sf-toolbar-ajax-info { - color: #F5F5F5; -} -.sf-toolbar-ajax-requests { - table-layout: auto; - width: 100%; -} -.sf-toolbar-ajax-requests td { - background-color: #444; - border-bottom: 1px solid #777; - color: #F5F5F5; - font-size: 12px; - padding: 4px; -} -.sf-toolbar-ajax-requests tr:last-child td { - border-bottom: 0; -} -.sf-toolbar-ajax-requests th { - background-color: #222; - border-bottom: 0; - color: #AAA; - font-size: 11px; - padding: 4px; -} -.sf-ajax-request-url { - max-width: 250px; - line-height: 9px; - overflow: hidden; - text-overflow: ellipsis; -} -.sf-toolbar-ajax-requests .sf-ajax-request-url a { - text-decoration: none; -} -.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover { - text-decoration: underline; -} -.sf-ajax-request-duration { - text-align: right; -} -.sf-ajax-request-loading { - animation: sf-blink .5s ease-in-out infinite; -} -@keyframes sf-blink { - 0% { background: #222; } - 50% { background: #444; } - 100% { background: #222; } -} - -.sf-toolbar-block.sf-toolbar-block-dump .sf-toolbar-info { - max-width: none; - width: 100%; - position: fixed; - box-sizing: border-box; - left: 0; -} - -.sf-toolbar-block-dump pre.sf-dump { - background-color: #222; - border-color: #777; - border-radius: 0; - margin: 6px 0 12px 0; -} -.sf-toolbar-block-dump pre.sf-dump:last-child { - margin-bottom: 0; -} -.sf-toolbar-block-dump pre.sf-dump .sf-dump-search-wrapper { - margin-bottom: 5px; -} -.sf-toolbar-block-dump pre.sf-dump span.sf-dump-search-count { - color: #333; - font-size: 12px; -} -.sf-toolbar-block-dump .sf-toolbar-info-piece { - display: block; -} -.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line { - color: #AAA; - margin-left: 4px; -} -.sf-toolbar-block-dump .sf-toolbar-info img { - display: none; -} - -/* Responsive Design */ -.sf-toolbar-icon .sf-toolbar-label, -.sf-toolbar-icon .sf-toolbar-value { - display: none; -} -.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label { - display: inline-block; -} - -/* Legacy Design - these styles are maintained to make old panels look - a bit better on the new toolbar */ -.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - color: #AAA; - font-size: 12px; -} -.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail, -.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail, -.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail { - color: #FFF; -} - -@media (min-width: 768px) { - - .sf-toolbar-icon .sf-toolbar-label, - .sf-toolbar-icon .sf-toolbar-value { - display: inline; - } - - .sf-toolbar-block .sf-toolbar-icon img, - .sf-toolbar-block .sf-toolbar-icon svg { - top: 6px; - } - .sf-toolbar-block-time .sf-toolbar-icon svg, - .sf-toolbar-block-memory .sf-toolbar-icon svg { - display: none; - } - .sf-toolbar-block-time .sf-toolbar-icon svg + span, - .sf-toolbar-block-memory .sf-toolbar-icon svg + span { - margin-left: 0; - } - - .sf-toolbar-block .sf-toolbar-icon { - padding: 0 10px; - } - .sf-toolbar-block-time .sf-toolbar-icon { - padding-right: 5px; - } - .sf-toolbar-block-memory .sf-toolbar-icon { - padding-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-icon { - padding-left: 0; - padding-right: 0; - } - .sf-toolbar-block-request .sf-toolbar-label { - margin-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-status + svg { - margin-left: 5px; - } - .sf-toolbar-block-request .sf-toolbar-icon svg + .sf-toolbar-label { - margin-left: 0; - } - .sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value { - margin-right: 10px; - } - - .sf-toolbar-block-request:hover .sf-toolbar-info { - max-width: none; - } - - .sf-toolbar-block .sf-toolbar-info-piece b { - font-size: 12px; - } - .sf-toolbar-block .sf-toolbar-info-piece span { - font-size: 13px; - } - - .sf-toolbar-block-right { - float: right; - margin-left: 0; - margin-right: 0; - } -} - -@media (min-width: 1024px) { - .sf-toolbar-block .sf-toolbar-info-piece-additional, - .sf-toolbar-block .sf-toolbar-info-piece-additional-detail { - display: inline; - } - - .sf-toolbar-block .sf-toolbar-info-piece-additional:empty, - .sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty { - display: none; - } -} - -/***** Error Toolbar *****/ -.sf-error-toolbar .sf-toolbarreset { - background: #222; - color: #f5f5f5; - font: 13px/36px Arial, sans-serif; - height: 36px; - padding: 0 15px; - text-align: left; -} - -.sf-error-toolbar .sf-toolbarreset svg { - height: auto; -} - -.sf-error-toolbar .sf-toolbarreset a { - color: #99cdd8; - margin-left: 5px; - text-decoration: underline; -} - -.sf-error-toolbar .sf-toolbarreset a:hover { - text-decoration: none; -} - -.sf-error-toolbar .sf-toolbarreset .sf-toolbar-icon { - float: left; - padding: 5px 0; - margin-right: 10px; -} - -.sf-full-stack { - left: 0px; - font-size: 12px; -} - -/***** Media query print: Do not print the Toolbar. *****/ -@media print { - .sf-toolbar { - display: none !important; - } -} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig deleted file mode 100644 index 236fc70..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar.html.twig +++ /dev/null @@ -1,46 +0,0 @@ - -
    - -
    -
    - -
    - {% for name, template in templates %} - {% if block('toolbar', template) is defined %} - {% with { - collector: profile ? profile.getcollector(name) : null, - profiler_url: profiler_url, - token: token ?? (profile ? profile.token : null), - name: name, - profiler_markup_version: profiler_markup_version, - csp_script_nonce: csp_script_nonce, - csp_style_nonce: csp_style_nonce - } %} - {{ block('toolbar', template) }} - {% endwith %} - {% endif %} - {% endfor %} - {% if full_stack %} -
    -
    - Using symfony/symfony is NOT supported -
    -
    -

    This project is using Symfony via the "symfony/symfony" package.

    -

    This is NOT supported anymore since Symfony 4.0.

    -

    Even if it seems to work well, it has some important limitations with no workarounds.

    -

    Using this package also makes your project slower.

    - - Please, stop using this package and replace it with individual packages instead. -
    -
    -
    - {% endif %} - - -
    - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig deleted file mode 100644 index d81e877..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_item.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -
    - {% if link is not defined or link %}{% endif %} -
    {{ icon|default('') }}
    - {% if link|default(false) %}
    {% endif %} -
    {{ text|default('') }}
    -
    diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig deleted file mode 100644 index 352fbb0..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_js.html.twig +++ /dev/null @@ -1,21 +0,0 @@ -
    - {% include('@WebProfiler/Profiler/toolbar.html.twig') with { - templates: { - 'request': '@WebProfiler/Profiler/cancel.html.twig' - }, - profile: null, - profiler_url: url('_profiler', {token: token}), - profiler_markup_version: 2, - } %} -
    - -{{ include('@WebProfiler/Profiler/base_js.html.twig') }} - - - {{ include('@WebProfiler/Profiler/toolbar.css.twig') }} - -/**/ diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig deleted file mode 100644 index 18d43b2..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Profiler/toolbar_redirect.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% extends '@WebProfiler/Profiler/base.html.twig' %} - -{% block title 'Redirection Intercepted' %} - -{% block body %} -
    -
    -

    This request redirects to {{ location }}.

    - -

    - - The redirect was intercepted by the web debug toolbar to help debugging. - For more information, see the "intercept-redirects" option of the Profiler. - -

    -
    -
    -{% endblock %} diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig b/vendor/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig deleted file mode 100644 index 41636d1..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/Router/panel.html.twig +++ /dev/null @@ -1,71 +0,0 @@ -

    Routing

    - -
    -
    - {{ request.route ?: '(none)' }} - Matched route -
    -
    - -{% if request.route %} -

    Route Parameters

    - - {% if request.routeParams is empty %} -
    -

    No parameters.

    -
    - {% else %} - {{ include('@WebProfiler/Profiler/table.html.twig', { data: request.routeParams, labels: ['Name', 'Value'] }, with_context = false) }} - {% endif %} -{% endif %} - -{% if router.redirect %} -

    Route Redirection

    - -

    This page redirects to:

    -
    - {{ router.targetUrl }} - {% if router.targetRoute %}(route: "{{ router.targetRoute }}"){% endif %} -
    -{% endif %} - -

    Route Matching Logs

    - -
    - Path to match: {{ request.pathinfo }} -
    - - - - - - - - - - - - {% for trace in traces %} - - - - - - - {% endfor %} - -
    #Route namePathLog
    {{ loop.index }}{{ trace.name }}{{ trace.path }} - {% if trace.level == 1 %} - Path almost matches, but - {{ trace.log }} - {% elseif trace.level == 2 %} - {{ trace.log }} - {% else %} - Path does not match - {% endif %} -
    - -

    - Note: These matching logs are based on the current router configuration, - which might differ from the configuration used when profiling this request. -

    diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg b/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg deleted file mode 100644 index 471c274..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-minus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg b/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg deleted file mode 100644 index 2f5c3b3..0000000 --- a/vendor/symfony/web-profiler-bundle/Resources/views/images/icon-plus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php b/vendor/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php deleted file mode 100644 index 8a8721a..0000000 --- a/vendor/symfony/web-profiler-bundle/Twig/WebProfilerExtension.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Twig; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Twig\Environment; -use Twig\Extension\ProfilerExtension; -use Twig\Profiler\Profile; -use Twig\TwigFunction; - -/** - * Twig extension for the profiler. - * - * @author Fabien Potencier - * - * @internal - */ -class WebProfilerExtension extends ProfilerExtension -{ - /** - * @var HtmlDumper - */ - private $dumper; - - /** - * @var resource - */ - private $output; - - /** - * @var int - */ - private $stackLevel = 0; - - public function __construct(HtmlDumper $dumper = null) - { - $this->dumper = $dumper ?? new HtmlDumper(); - $this->dumper->setOutput($this->output = fopen('php://memory', 'r+')); - } - - public function enter(Profile $profile): void - { - ++$this->stackLevel; - } - - public function leave(Profile $profile): void - { - if (0 === --$this->stackLevel) { - $this->dumper->setOutput($this->output = fopen('php://memory', 'r+')); - } - } - - /** - * {@inheritdoc} - */ - public function getFunctions(): array - { - return [ - new TwigFunction('profiler_dump', [$this, 'dumpData'], ['is_safe' => ['html'], 'needs_environment' => true]), - new TwigFunction('profiler_dump_log', [$this, 'dumpLog'], ['is_safe' => ['html'], 'needs_environment' => true]), - ]; - } - - public function dumpData(Environment $env, Data $data, int $maxDepth = 0) - { - $this->dumper->setCharset($env->getCharset()); - $this->dumper->dump($data, null, [ - 'maxDepth' => $maxDepth, - ]); - - $dump = stream_get_contents($this->output, -1, 0); - rewind($this->output); - ftruncate($this->output, 0); - - return str_replace("\n$1"', $message); - - if (null === $context || !str_contains($message, '{')) { - return ''.$message.''; - } - - $replacements = []; - foreach ($context as $k => $v) { - $k = '{'.twig_escape_filter($env, $k).'}'; - $replacements['"'.$k.'"'] = $replacements['"'.$k.'"'] = $replacements[$k] = $this->dumpData($env, $v); - } - - return ''.strtr($message, $replacements).''; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'profiler'; - } -} diff --git a/vendor/symfony/web-profiler-bundle/WebProfilerBundle.php b/vendor/symfony/web-profiler-bundle/WebProfilerBundle.php deleted file mode 100644 index 7fcc4ec..0000000 --- a/vendor/symfony/web-profiler-bundle/WebProfilerBundle.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * @author Fabien Potencier - */ -class WebProfilerBundle extends Bundle -{ - public function boot() - { - if ('prod' === $this->container->getParameter('kernel.environment')) { - @trigger_error('Using WebProfilerBundle in production is not supported and puts your project at risk, disable it.', \E_USER_WARNING); - } - } -} diff --git a/vendor/symfony/web-profiler-bundle/composer.json b/vendor/symfony/web-profiler-bundle/composer.json deleted file mode 100644 index 3f67bb6..0000000 --- a/vendor/symfony/web-profiler-bundle/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "symfony/web-profiler-bundle", - "type": "symfony-bundle", - "description": "Provides a development tool that gives detailed information about the execution of any request", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^5.3|^6.0", - "symfony/http-kernel": "^5.3|^6.0", - "symfony/polyfill-php80": "^1.16", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "require-dev": { - "symfony/browser-kit": "^4.4|^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "conflict": { - "symfony/form": "<4.4", - "symfony/mailer": "<5.4", - "symfony/messenger": "<4.4", - "symfony/dependency-injection": "<5.2" - }, - "autoload": { - "psr-4": { "Symfony\\Bundle\\WebProfilerBundle\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/yaml/CHANGELOG.md b/vendor/symfony/yaml/CHANGELOG.md deleted file mode 100644 index b9561b2..0000000 --- a/vendor/symfony/yaml/CHANGELOG.md +++ /dev/null @@ -1,237 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Add new `lint:yaml dirname --exclude=/dirname/foo.yaml --exclude=/dirname/bar.yaml` - option to exclude one or more specific files from multiple file list - * Allow negatable for the parse tags option with `--no-parse-tags` - -5.3 ---- - - * Added `github` format support & autodetection to render errors as annotations - when running the YAML linter command in a Github Action environment. - -5.1.0 ------ - - * Added support for parsing numbers prefixed with `0o` as octal numbers. - * Deprecated support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with `0o` - so that they are parsed as octal numbers. - - Before: - - ```yaml - Yaml::parse('072'); - ``` - - After: - - ```yaml - Yaml::parse('0o72'); - ``` - - * Added `yaml-lint` binary. - * Deprecated using the `!php/object` and `!php/const` tags without a value. - -5.0.0 ------ - - * Removed support for mappings inside multi-line strings. - * removed support for implicit STDIN usage in the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit. - -4.4.0 ------ - - * Added support for parsing the inline notation spanning multiple lines. - * Added support to dump `null` as `~` by using the `Yaml::DUMP_NULL_AS_TILDE` flag. - * deprecated accepting STDIN implicitly when using the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit. - -4.3.0 ------ - - * Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0. - -4.2.0 ------ - - * added support for multiple files or directories in `LintCommand` - -4.0.0 ------ - - * The behavior of the non-specific tag `!` is changed and now forces - non-evaluating your values. - * complex mappings will throw a `ParseException` - * support for the comma as a group separator for floats has been dropped, use - the underscore instead - * support for the `!!php/object` tag has been dropped, use the `!php/object` - tag instead - * duplicate mapping keys throw a `ParseException` - * non-string mapping keys throw a `ParseException`, use the `Yaml::PARSE_KEYS_AS_STRINGS` - flag to cast them to strings - * `%` at the beginning of an unquoted string throw a `ParseException` - * mappings with a colon (`:`) that is not followed by a whitespace throw a - `ParseException` - * the `Dumper::setIndentation()` method has been removed - * being able to pass boolean options to the `Yaml::parse()`, `Yaml::dump()`, - `Parser::parse()`, and `Dumper::dump()` methods to configure the behavior of - the parser and dumper is no longer supported, pass bitmask flags instead - * the constructor arguments of the `Parser` class have been removed - * the `Inline` class is internal and no longer part of the BC promise - * removed support for the `!str` tag, use the `!!str` tag instead - * added support for tagged scalars. - - ```yml - Yaml::parse('!foo bar', Yaml::PARSE_CUSTOM_TAGS); - // returns TaggedValue('foo', 'bar'); - ``` - -3.4.0 ------ - - * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method - - * the `Dumper`, `Parser`, and `Yaml` classes are marked as final - - * Deprecated the `!php/object:` tag which will be replaced by the - `!php/object` tag (without the colon) in 4.0. - - * Deprecated the `!php/const:` tag which will be replaced by the - `!php/const` tag (without the colon) in 4.0. - - * Support for the `!str` tag is deprecated, use the `!!str` tag instead. - - * Deprecated using the non-specific tag `!` as its behavior will change in 4.0. - It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead. - -3.3.0 ------ - - * Starting an unquoted string with a question mark followed by a space is - deprecated and will throw a `ParseException` in Symfony 4.0. - - * Deprecated support for implicitly parsing non-string mapping keys as strings. - Mapping keys that are no strings will lead to a `ParseException` in Symfony - 4.0. Use quotes to opt-in for keys to be parsed as strings. - - Before: - - ```php - $yaml = << new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE | Yaml::DUMP_OBJECT); - ``` - -3.0.0 ------ - - * Yaml::parse() now throws an exception when a blackslash is not escaped - in double-quoted strings - -2.8.0 ------ - - * Deprecated usage of a colon in an unquoted mapping value - * Deprecated usage of @, \`, | and > at the beginning of an unquoted string - * When surrounding strings with double-quotes, you must now escape `\` characters. Not - escaping those characters (when surrounded by double-quotes) is deprecated. - - Before: - - ```yml - class: "Foo\Var" - ``` - - After: - - ```yml - class: "Foo\\Var" - ``` - -2.1.0 ------ - - * Yaml::parse() does not evaluate loaded files as PHP files by default - anymore (call Yaml::enablePhpParsing() to get back the old behavior) diff --git a/vendor/symfony/yaml/Command/LintCommand.php b/vendor/symfony/yaml/Command/LintCommand.php deleted file mode 100644 index 3ebd570..0000000 --- a/vendor/symfony/yaml/Command/LintCommand.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Command; - -use Symfony\Component\Console\CI\GithubActionReporter; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Yaml; - -/** - * Validates YAML files syntax and outputs encountered errors. - * - * @author Grégoire Pineau - * @author Robin Chalas - */ -class LintCommand extends Command -{ - protected static $defaultName = 'lint:yaml'; - protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors'; - - private $parser; - private $format; - private $displayCorrectFiles; - private $directoryIteratorProvider; - private $isReadableProvider; - - public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null) - { - parent::__construct($name); - - $this->directoryIteratorProvider = $directoryIteratorProvider; - $this->isReadableProvider = $isReadableProvider; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') - ->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude') - ->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null) - ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT -the first encountered syntax error. - -You can validates YAML contents passed from STDIN: - - cat filename | php %command.full_name% - - -You can also validate the syntax of a file: - - php %command.full_name% filename - -Or of a whole directory: - - php %command.full_name% dirname - php %command.full_name% dirname --format=json - -You can also exclude one or more specific files: - - php %command.full_name% dirname --exclude="dirname/foo.yaml" --exclude="dirname/bar.yaml" - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = (array) $input->getArgument('filename'); - $excludes = $input->getOption('exclude'); - $this->format = $input->getOption('format'); - $flags = $input->getOption('parse-tags'); - - if ('github' === $this->format && !class_exists(GithubActionReporter::class)) { - throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.'); - } - - if (null === $this->format) { - // Autodetect format according to CI environment - $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; - } - - $flags = $flags ? Yaml::PARSE_CUSTOM_TAGS : 0; - - $this->displayCorrectFiles = $output->isVerbose(); - - if (['-'] === $filenames) { - return $this->display($io, [$this->validate(file_get_contents('php://stdin'), $flags)]); - } - - if (!$filenames) { - throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); - } - - $filesInfo = []; - foreach ($filenames as $filename) { - if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - foreach ($this->getFiles($filename) as $file) { - if (!\in_array($file->getPathname(), $excludes, true)) { - $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); - } - } - } - - return $this->display($io, $filesInfo); - } - - private function validate(string $content, int $flags, string $file = null) - { - $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { - if (\E_USER_DEPRECATED === $level) { - throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1); - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }); - - try { - $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); - } catch (ParseException $e) { - return ['file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()]; - } finally { - restore_error_handler(); - } - - return ['file' => $file, 'valid' => true]; - } - - private function display(SymfonyStyle $io, array $files): int - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($io, $files); - case 'json': - return $this->displayJson($io, $files); - case 'github': - return $this->displayTxt($io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); - } - } - - private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false): int - { - $countFiles = \count($filesInfo); - $erroredFiles = 0; - $suggestTagOption = false; - - if ($errorAsGithubAnnotations) { - $githubReporter = new GithubActionReporter($io); - } - - foreach ($filesInfo as $info) { - if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$erroredFiles; - $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - $io->text(sprintf(' >> %s', $info['message'])); - - if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) { - $suggestTagOption = true; - } - - if ($errorAsGithubAnnotations) { - $githubReporter->error($info['message'], $info['file'] ?? 'php://stdin', $info['line']); - } - } - } - - if (0 === $erroredFiles) { - $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); - } else { - $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.%s', $countFiles - $erroredFiles, $erroredFiles, $suggestTagOption ? ' Use the --parse-tags option if you want parse custom tags.' : '')); - } - - return min($erroredFiles, 1); - } - - private function displayJson(SymfonyStyle $io, array $filesInfo): int - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - if (!$v['valid']) { - ++$errors; - } - - if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) { - $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.'; - } - }); - - $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function getFiles(string $fileOrDirectory): iterable - { - if (is_file($fileOrDirectory)) { - yield new \SplFileInfo($fileOrDirectory); - - return; - } - - foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), ['yml', 'yaml'])) { - continue; - } - - yield $file; - } - } - - private function getParser(): Parser - { - if (!$this->parser) { - $this->parser = new Parser(); - } - - return $this->parser; - } - - private function getDirectoryIterator(string $directory): iterable - { - $default = function ($directory) { - return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - }; - - if (null !== $this->directoryIteratorProvider) { - return ($this->directoryIteratorProvider)($directory, $default); - } - - return $default($directory); - } - - private function isReadable(string $fileOrDirectory): bool - { - $default = function ($fileOrDirectory) { - return is_readable($fileOrDirectory); - }; - - if (null !== $this->isReadableProvider) { - return ($this->isReadableProvider)($fileOrDirectory, $default); - } - - return $default($fileOrDirectory); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); - } - } -} diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php deleted file mode 100644 index db3e346..0000000 --- a/vendor/symfony/yaml/Dumper.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Dumper dumps PHP variables to YAML strings. - * - * @author Fabien Potencier - * - * @final - */ -class Dumper -{ - /** - * The amount of spaces to use for indentation of nested nodes. - * - * @var int - */ - protected $indentation; - - public function __construct(int $indentation = 4) - { - if ($indentation < 1) { - throw new \InvalidArgumentException('The indentation must be greater than zero.'); - } - - $this->indentation = $indentation; - } - - /** - * Dumps a PHP value to YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The level of indentation (used internally) - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - */ - public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string - { - $output = ''; - $prefix = $indent ? str_repeat(' ', $indent) : ''; - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $input); - } - - if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) { - $output .= $prefix.Inline::dump($input, $flags); - } else { - $dumpAsMap = Inline::isHash($input); - - foreach ($input as $key => $value) { - if ('' !== $output && "\n" !== $output[-1]) { - $output .= "\n"; - } - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : ''; - - if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { - $blockChompingIndicator = '+'; - } elseif ("\n" === $value[-1]) { - $blockChompingIndicator = ''; - } else { - $blockChompingIndicator = '-'; - } - - $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator); - - foreach (explode("\n", $value) as $row) { - if ('' === $row) { - $output .= "\n"; - } else { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - } - - continue; - } - - if ($value instanceof TaggedValue) { - $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag()); - - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { - // If the first line starts with a space character, the spec requires a blockIndicationIndicator - // http://www.yaml.org/spec/1.2/spec.html#id2793979 - $blockIndentationIndicator = (' ' === substr($value->getValue(), 0, 1)) ? (string) $this->indentation : ''; - $output .= sprintf(' |%s', $blockIndentationIndicator); - - foreach (explode("\n", $value->getValue()) as $row) { - $output .= sprintf("\n%s%s%s", $prefix, str_repeat(' ', $this->indentation), $row); - } - - continue; - } - - if ($inline - 1 <= 0 || null === $value->getValue() || is_scalar($value->getValue())) { - $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n"; - } else { - $output .= "\n"; - $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags); - } - - continue; - } - - $dumpObjectAsInlineMap = true; - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $value); - } - - $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value); - - $output .= sprintf('%s%s%s%s', - $prefix, - $dumpAsMap ? Inline::dump($key, $flags).':' : '-', - $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags) - ).($willBeInlined ? "\n" : ''); - } - } - - return $output; - } -} diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php deleted file mode 100644 index e8090d8..0000000 --- a/vendor/symfony/yaml/Escaper.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -/** - * Escaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Escaper -{ - // Characters that would cause a dumped string to require double quoting. - public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - - // Mapping arrays for escaping a double quoted string. The backslash is - // first to ensure proper escaping because str_replace operates iteratively - // on the input arrays. This ordering of the characters avoids the use of strtr, - // which performs more slowly. - private const ESCAPEES = ['\\', '\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\x7f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9", - ]; - private const ESCAPED = ['\\\\', '\\"', '\\\\', '\\"', - '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', - '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', - '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', - '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', - '\\x7f', - '\\N', '\\_', '\\L', '\\P', - ]; - - /** - * Determines if a PHP value would require double quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresDoubleQuoting(string $value): bool - { - return 0 < preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); - } - - /** - * Escapes and surrounds a PHP value with double quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithDoubleQuotes(string $value): string - { - return sprintf('"%s"', str_replace(self::ESCAPEES, self::ESCAPED, $value)); - } - - /** - * Determines if a PHP value would require single quoting in YAML. - * - * @param string $value A PHP value - */ - public static function requiresSingleQuoting(string $value): bool - { - // Determines if a PHP value is entirely composed of a value that would - // require single quoting in YAML. - if (\in_array(strtolower($value), ['null', '~', 'true', 'false', 'y', 'n', 'yes', 'no', 'on', 'off'])) { - return true; - } - - // Determines if the PHP value contains any single characters that would - // cause it to require single quoting in YAML. - return 0 < preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu', $value); - } - - /** - * Escapes and surrounds a PHP value with single quotes. - * - * @param string $value A PHP value - */ - public static function escapeWithSingleQuotes(string $value): string - { - return sprintf("'%s'", str_replace('\'', '\'\'', $value)); - } -} diff --git a/vendor/symfony/yaml/Exception/DumpException.php b/vendor/symfony/yaml/Exception/DumpException.php deleted file mode 100644 index cce972f..0000000 --- a/vendor/symfony/yaml/Exception/DumpException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during dumping. - * - * @author Fabien Potencier - */ -class DumpException extends RuntimeException -{ -} diff --git a/vendor/symfony/yaml/Exception/ExceptionInterface.php b/vendor/symfony/yaml/Exception/ExceptionInterface.php deleted file mode 100644 index 9091316..0000000 --- a/vendor/symfony/yaml/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/yaml/Exception/ParseException.php b/vendor/symfony/yaml/Exception/ParseException.php deleted file mode 100644 index 8748d2b..0000000 --- a/vendor/symfony/yaml/Exception/ParseException.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - */ -class ParseException extends RuntimeException -{ - private $parsedFile; - private $parsedLine; - private $snippet; - private $rawMessage; - - /** - * @param string $message The error message - * @param int $parsedLine The line where the error occurred - * @param string|null $snippet The snippet of code near the problem - * @param string|null $parsedFile The file name where the error occurred - */ - public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null) - { - $this->parsedFile = $parsedFile; - $this->parsedLine = $parsedLine; - $this->snippet = $snippet; - $this->rawMessage = $message; - - $this->updateRepr(); - - parent::__construct($this->message, 0, $previous); - } - - /** - * Gets the snippet of code near the error. - * - * @return string - */ - public function getSnippet() - { - return $this->snippet; - } - - /** - * Sets the snippet of code near the error. - */ - public function setSnippet(string $snippet) - { - $this->snippet = $snippet; - - $this->updateRepr(); - } - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string - */ - public function getParsedFile() - { - return $this->parsedFile; - } - - /** - * Sets the filename where the error occurred. - */ - public function setParsedFile(string $parsedFile) - { - $this->parsedFile = $parsedFile; - - $this->updateRepr(); - } - - /** - * Gets the line where the error occurred. - * - * @return int - */ - public function getParsedLine() - { - return $this->parsedLine; - } - - /** - * Sets the line where the error occurred. - */ - public function setParsedLine(int $parsedLine) - { - $this->parsedLine = $parsedLine; - - $this->updateRepr(); - } - - private function updateRepr() - { - $this->message = $this->rawMessage; - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - if (null !== $this->parsedFile) { - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE)); - } - - if ($this->parsedLine >= 0) { - $this->message .= sprintf(' at line %d', $this->parsedLine); - } - - if ($this->snippet) { - $this->message .= sprintf(' (near "%s")', $this->snippet); - } - - if ($dot) { - $this->message .= '.'; - } - } -} diff --git a/vendor/symfony/yaml/Exception/RuntimeException.php b/vendor/symfony/yaml/Exception/RuntimeException.php deleted file mode 100644 index 3f36b73..0000000 --- a/vendor/symfony/yaml/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Exception; - -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Romain Neutron - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php deleted file mode 100644 index 3d64b1a..0000000 --- a/vendor/symfony/yaml/Inline.php +++ /dev/null @@ -1,812 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\DumpException; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Inline implements a YAML parser/dumper for the YAML inline syntax. - * - * @author Fabien Potencier - * - * @internal - */ -class Inline -{ - public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - - public static $parsedLineNumber = -1; - public static $parsedFilename; - - private static $exceptionOnInvalidType = false; - private static $objectSupport = false; - private static $objectForMap = false; - private static $constantSupport = false; - - public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null) - { - self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); - self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); - self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); - self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); - self::$parsedFilename = $parsedFilename; - - if (null !== $parsedLineNumber) { - self::$parsedLineNumber = $parsedLineNumber; - } - } - - /** - * Converts a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * @param array $references Mapping of variable names to values - * - * @return mixed - * - * @throws ParseException - */ - public static function parse(string $value = null, int $flags = 0, array &$references = []) - { - self::initialize($flags); - - $value = trim($value); - - if ('' === $value) { - return ''; - } - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - - try { - $i = 0; - $tag = self::parseTag($value, $i, $flags); - switch ($value[$i]) { - case '[': - $result = self::parseSequence($value, $flags, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $flags, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, $flags, null, $i, null === $tag, $references); - } - - // some comments are allowed at the end - if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (null !== $tag && '' !== $tag) { - return new TaggedValue($tag, $result); - } - - return $result; - } finally { - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); - } - } - } - - /** - * Dumps a given PHP variable to a YAML string. - * - * @param mixed $value The PHP variable to convert - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - * - * @throws DumpException When trying to dump PHP resource - */ - public static function dump($value, int $flags = 0): string - { - switch (true) { - case \is_resource($value): - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); - } - - return self::dumpNull($flags); - case $value instanceof \DateTimeInterface: - return $value->format('c'); - case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', \get_class($value), $value->name); - case \is_object($value): - if ($value instanceof TaggedValue) { - return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); - } - - if (Yaml::DUMP_OBJECT & $flags) { - return '!php/object '.self::dump(serialize($value)); - } - - if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { - $output = []; - - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { - throw new DumpException('Object support when dumping a YAML file has been disabled.'); - } - - return self::dumpNull($flags); - case \is_array($value): - return self::dumpArray($value, $flags); - case null === $value: - return self::dumpNull($flags); - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case \is_int($value): - return $value; - case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"): - $locale = setlocale(\LC_NUMERIC, 0); - if (false !== $locale) { - setlocale(\LC_NUMERIC, 'C'); - } - if (\is_float($value)) { - $repr = (string) $value; - if (is_infinite($value)) { - $repr = str_ireplace('INF', '.Inf', $repr); - } elseif (floor($value) == $value && $repr == $value) { - // Preserve float data type since storing a whole number will result in integer value. - if (false === strpos($repr, 'E')) { - $repr = $repr.'.0'; - } - } - } else { - $repr = \is_string($value) ? "'$value'" : (string) $value; - } - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - - return $repr; - case '' == $value: - return "''"; - case self::isBinaryString($value): - return '!!binary '.base64_encode($value); - case Escaper::requiresDoubleQuoting($value): - return Escaper::escapeWithDoubleQuotes($value); - case Escaper::requiresSingleQuoting($value): - case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value): - case Parser::preg_match(self::getHexRegex(), $value): - case Parser::preg_match(self::getTimestampRegex(), $value): - return Escaper::escapeWithSingleQuotes($value); - default: - return $value; - } - } - - /** - * Check if given array is hash or just normal indexed array. - * - * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check - */ - public static function isHash($value): bool - { - if ($value instanceof \stdClass || $value instanceof \ArrayObject) { - return true; - } - - $expectedKey = 0; - - foreach ($value as $key => $val) { - if ($key !== $expectedKey++) { - return true; - } - } - - return false; - } - - /** - * Dumps a PHP array to a YAML string. - * - * @param array $value The PHP array to dump - * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string - */ - private static function dumpArray(array $value, int $flags): string - { - // array - if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) { - $output = []; - foreach ($value as $val) { - $output[] = self::dump($val, $flags); - } - - return sprintf('[%s]', implode(', ', $output)); - } - - // hash - $output = []; - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); - } - - private static function dumpNull(int $flags): string - { - if (Yaml::DUMP_NULL_AS_TILDE & $flags) { - return '~'; - } - - return 'null'; - } - - /** - * Parses a YAML scalar. - * - * @return mixed - * - * @throws ParseException When malformed inline YAML string is parsed - */ - public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null) - { - if (\in_array($scalar[$i], ['"', "'"], true)) { - // quoted scalar - $isQuoted = true; - $output = self::parseQuotedScalar($scalar, $i); - - if (null !== $delimiters) { - $tmp = ltrim(substr($scalar, $i), " \n"); - if ('' === $tmp) { - throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (!\in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - } - } else { - // "normal" string - $isQuoted = false; - - if (!$delimiters) { - $output = substr($scalar, $i); - $i += \strlen($output); - - // remove comments - if (Parser::preg_match('/[ \t]+#/', $output, $match, \PREG_OFFSET_CAPTURE)) { - $output = substr($output, 0, $match[0][1]); - } - } elseif (Parser::preg_match('/^(.*?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { - $output = $match[1]; - $i += \strlen($output); - $output = trim($output); - } else { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) - if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0] || '%' === $output[0])) { - throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); - } - - if ($evaluate) { - $output = self::evaluateScalar($output, $flags, $references, $isQuoted); - } - } - - return $output; - } - - /** - * Parses a YAML quoted scalar. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseQuotedScalar(string $scalar, int &$i = 0): string - { - if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - $output = substr($match[0], 1, -1); - - $unescaper = new Unescaper(); - if ('"' == $scalar[$i]) { - $output = $unescaper->unescapeDoubleQuotedString($output); - } else { - $output = $unescaper->unescapeSingleQuotedString($output); - } - - $i += \strlen($match[0]); - - return $output; - } - - /** - * Parses a YAML sequence. - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array - { - $output = []; - $len = \strlen($sequence); - ++$i; - - // [foo, bar, ...] - while ($i < $len) { - if (']' === $sequence[$i]) { - return $output; - } - if (',' === $sequence[$i] || ' ' === $sequence[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($sequence, $i, $flags); - switch ($sequence[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($sequence, $flags, $i, $references); - break; - case '{': - // nested mapping - $value = self::parseMapping($sequence, $flags, $i, $references); - break; - default: - $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references, $isQuoted); - - // the value can be an array if a reference has been resolved to an array var - if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { - // embedded mapping? - try { - $pos = 0; - $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); - } catch (\InvalidArgumentException $e) { - // no, it's not - } - } - - if (!$isQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - --$i; - } - - if (null !== $tag && '' !== $tag) { - $value = new TaggedValue($tag, $value); - } - - $output[] = $value; - - ++$i; - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Parses a YAML mapping. - * - * @return array|\stdClass - * - * @throws ParseException When malformed inline YAML string is parsed - */ - private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []) - { - $output = []; - $len = \strlen($mapping); - ++$i; - $allowOverwrite = false; - - // {foo: bar, bar:foo, ...} - while ($i < $len) { - switch ($mapping[$i]) { - case ' ': - case ',': - case "\n": - ++$i; - continue 2; - case '}': - if (self::$objectForMap) { - return (object) $output; - } - - return $output; - } - - // key - $offsetBeforeKeyParsing = $i; - $isKeyQuoted = \in_array($mapping[$i], ['"', "'"], true); - $key = self::parseScalar($mapping, $flags, [':', ' '], $i, false); - - if ($offsetBeforeKeyParsing === $i) { - throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping); - } - - if ('!php/const' === $key) { - $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false); - $key = self::evaluateScalar($key, $flags); - } - - if (false === $i = strpos($mapping, ':', $i)) { - break; - } - - if (!$isKeyQuoted) { - $evaluatedKey = self::evaluateScalar($key, $flags, $references); - - if ('' !== $key && $evaluatedKey !== $key && !\is_string($evaluatedKey) && !\is_int($evaluatedKey)) { - throw new ParseException('Implicit casting of incompatible mapping keys to strings is not supported. Quote your evaluable mapping keys instead.', self::$parsedLineNumber + 1, $mapping); - } - } - - if (!$isKeyQuoted && (!isset($mapping[$i + 1]) || !\in_array($mapping[$i + 1], [' ', ',', '[', ']', '{', '}', "\n"], true))) { - throw new ParseException('Colons must be followed by a space or an indication character (i.e. " ", ",", "[", "]", "{", "}").', self::$parsedLineNumber + 1, $mapping); - } - - if ('<<' === $key) { - $allowOverwrite = true; - } - - while ($i < $len) { - if (':' === $mapping[$i] || ' ' === $mapping[$i] || "\n" === $mapping[$i]) { - ++$i; - - continue; - } - - $tag = self::parseTag($mapping, $i, $flags); - switch ($mapping[$i]) { - case '[': - // nested sequence - $value = self::parseSequence($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - foreach ($value as $parsedValue) { - $output += $parsedValue; - } - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - case '{': - // nested mapping - $value = self::parseMapping($mapping, $flags, $i, $references); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - break; - default: - $value = self::parseScalar($mapping, $flags, [',', '}', "\n"], $i, null === $tag, $references, $isValueQuoted); - // Spec: Keys MUST be unique; first one wins. - // Parser cannot abort this mapping earlier, since lines - // are processed sequentially. - // But overwriting is allowed when a merge node is used in current block. - if ('<<' === $key) { - $output += $value; - } elseif ($allowOverwrite || !isset($output[$key])) { - if (!$isValueQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { - $references[$matches['ref']] = $matches['value']; - $value = $matches['value']; - } - - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } elseif (isset($output[$key])) { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), self::$parsedLineNumber + 1, $mapping); - } - --$i; - } - ++$i; - - continue 2; - } - } - - throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename); - } - - /** - * Evaluates scalars and replaces magic values. - * - * @return mixed - * - * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved - */ - private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null) - { - $isQuotedString = false; - $scalar = trim($scalar); - - if (0 === strpos($scalar, '*')) { - if (false !== $pos = strpos($scalar, '#')) { - $value = substr($scalar, 1, $pos - 2); - } else { - $value = substr($scalar, 1); - } - - // an unquoted * - if (false === $value || '' === $value) { - throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (!\array_key_exists($value, $references)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - return $references[$value]; - } - - $scalarLower = strtolower($scalar); - - switch (true) { - case 'null' === $scalarLower: - case '' === $scalar: - case '~' === $scalar: - return null; - case 'true' === $scalarLower: - return true; - case 'false' === $scalarLower: - return false; - case '!' === $scalar[0]: - switch (true) { - case 0 === strpos($scalar, '!!str '): - $s = (string) substr($scalar, 6); - - if (\in_array($s[0] ?? '', ['"', "'"], true)) { - $isQuotedString = true; - $s = self::parseQuotedScalar($s); - } - - return $s; - case 0 === strpos($scalar, '! '): - return substr($scalar, 2); - case 0 === strpos($scalar, '!php/object'): - if (self::$objectSupport) { - if (!isset($scalar[12])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/object tag without a value is deprecated.'); - - return false; - } - - return unserialize(self::parseScalar(substr($scalar, 12))); - } - - if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!php/const'): - if (self::$constantSupport) { - if (!isset($scalar[11])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/const tag without a value is deprecated.'); - - return ''; - } - - $i = 0; - if (\defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) { - return \constant($const); - } - - throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - if (self::$exceptionOnInvalidType) { - throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return null; - case 0 === strpos($scalar, '!!float '): - return (float) substr($scalar, 8); - case 0 === strpos($scalar, '!!binary '): - return self::evaluateBinaryScalar(substr($scalar, 9)); - } - - throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename); - case preg_match('/^(?:\+|-)?0o(?P[0-7_]++)$/', $scalar, $matches): - $value = str_replace('_', '', $matches['value']); - - if ('-' === $scalar[0]) { - return -octdec($value); - } - - return octdec($value); - // Optimize for returning strings. - case \in_array($scalar[0], ['+', '-', '.'], true) || is_numeric($scalar[0]): - if (Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar)) { - $scalar = str_replace('_', '', $scalar); - } - - switch (true) { - case ctype_digit($scalar): - if (preg_match('/^0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '0o'.substr($scalar, 1)); - - return octdec($scalar); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): - if (preg_match('/^-0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '-0o'.substr($scalar, 2)); - - return -octdec(substr($scalar, 1)); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; - case is_numeric($scalar): - case Parser::preg_match(self::getHexRegex(), $scalar): - $scalar = str_replace('_', '', $scalar); - - return '0x' === $scalar[0].$scalar[1] ? hexdec($scalar) : (float) $scalar; - case '.inf' === $scalarLower: - case '.nan' === $scalarLower: - return -log(0); - case '-.inf' === $scalarLower: - return log(0); - case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): - return (float) str_replace('_', '', $scalar); - case Parser::preg_match(self::getTimestampRegex(), $scalar): - // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. - $time = new \DateTime($scalar, new \DateTimeZone('UTC')); - - if (Yaml::PARSE_DATETIME & $flags) { - return $time; - } - - try { - if (false !== $scalar = $time->getTimestamp()) { - return $scalar; - } - } catch (\ValueError $e) { - // no-op - } - - return $time->format('U'); - } - } - - return (string) $scalar; - } - - private static function parseTag(string $value, int &$i, int $flags): ?string - { - if ('!' !== $value[$i]) { - return null; - } - - $tagLength = strcspn($value, " \t\n[]{},", $i + 1); - $tag = substr($value, $i + 1, $tagLength); - - $nextOffset = $i + $tagLength + 1; - $nextOffset += strspn($value, ' ', $nextOffset); - - if ('' === $tag && (!isset($value[$nextOffset]) || \in_array($value[$nextOffset], [']', '}', ','], true))) { - throw new ParseException('Using the unquoted scalar value "!" is not supported. You must quote it.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - // Is followed by a scalar and is a built-in tag - if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) { - // Manage in {@link self::evaluateScalar()} - return null; - } - - $i = $nextOffset; - - // Built-in tags - if ('' !== $tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' !== $tag && !isset($value[$i])) { - throw new ParseException(sprintf('Missing value for tag "%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if ('' === $tag || Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - public static function evaluateBinaryScalar(string $scalar): string - { - $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); - - if (0 !== (\strlen($parsedBinaryData) % 4)) { - throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', \strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { - throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); - } - - return base64_decode($parsedBinaryData, true); - } - - private static function isBinaryString(string $value): bool - { - return !preg_match('//u', $value) || preg_match('/[^\x00\x07-\x0d\x1B\x20-\xff]/', $value); - } - - /** - * Gets a regex that matches a YAML date. - * - * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 - */ - private static function getTimestampRegex(): string - { - return <<[0-9][0-9][0-9][0-9]) - -(?P[0-9][0-9]?) - -(?P[0-9][0-9]?) - (?:(?:[Tt]|[ \t]+) - (?P[0-9][0-9]?) - :(?P[0-9][0-9]) - :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? - (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) - (?::(?P[0-9][0-9]))?))?)? - $~x -EOF; - } - - /** - * Gets a regex that matches a YAML number in hexadecimal notation. - */ - private static function getHexRegex(): string - { - return '~^0x[0-9a-f_]++$~i'; - } -} diff --git a/vendor/symfony/yaml/LICENSE b/vendor/symfony/yaml/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/yaml/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php deleted file mode 100644 index 2701a44..0000000 --- a/vendor/symfony/yaml/Parser.php +++ /dev/null @@ -1,1305 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Tag\TaggedValue; - -/** - * Parser parses YAML strings to convert them to PHP arrays. - * - * @author Fabien Potencier - * - * @final - */ -class Parser -{ - public const TAG_PATTERN = '(?P![\w!.\/:-]+)'; - public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - public const REFERENCE_PATTERN = '#^&(?P[^ ]++) *+(?P.*)#u'; - - private $filename; - private $offset = 0; - private $numberOfParsedLines = 0; - private $totalNumberOfLines; - private $lines = []; - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = []; - private $skippedLineNumbers = []; - private $locallySkippedLineNumbers = []; - private $refsBeingParsed = []; - - /** - * Parses a YAML file into a PHP value. - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public function parseFile(string $filename, int $flags = 0) - { - if (!is_file($filename)) { - throw new ParseException(sprintf('File "%s" does not exist.', $filename)); - } - - if (!is_readable($filename)) { - throw new ParseException(sprintf('File "%s" cannot be read.', $filename)); - } - - $this->filename = $filename; - - try { - return $this->parse(file_get_contents($filename), $flags); - } finally { - $this->filename = null; - } - } - - /** - * Parses a YAML string to a PHP value. - * - * @param string $value A YAML string - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the YAML is not valid - */ - public function parse(string $value, int $flags = 0) - { - if (false === preg_match('//u', $value)) { - throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); - } - - $this->refs = []; - - $mbEncoding = null; - - if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('UTF-8'); - } - - try { - $data = $this->doParse($value, $flags); - } finally { - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - $this->refsBeingParsed = []; - $this->offset = 0; - $this->lines = []; - $this->currentLine = ''; - $this->numberOfParsedLines = 0; - $this->refs = []; - $this->skippedLineNumbers = []; - $this->locallySkippedLineNumbers = []; - $this->totalNumberOfLines = null; - } - - return $data; - } - - private function doParse(string $value, int $flags) - { - $this->currentLineNb = -1; - $this->currentLine = ''; - $value = $this->cleanup($value); - $this->lines = explode("\n", $value); - $this->numberOfParsedLines = \count($this->lines); - $this->locallySkippedLineNumbers = []; - - if (null === $this->totalNumberOfLines) { - $this->totalNumberOfLines = $this->numberOfParsedLines; - } - - if (!$this->moveToNextLine()) { - return null; - } - - $data = []; - $context = null; - $allowOverwrite = false; - - while ($this->isCurrentLineEmpty()) { - if (!$this->moveToNextLine()) { - return null; - } - } - - // Resolves the tag and returns if end of the document - if (null !== ($tag = $this->getLineTag($this->currentLine, $flags, false)) && !$this->moveToNextLine()) { - return new TaggedValue($tag, ''); - } - - do { - if ($this->isCurrentLineEmpty()) { - continue; - } - - // tab? - if ("\t" === $this->currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename); - - $isRef = $mergeNode = false; - if ('-' === $this->currentLine[0] && self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { - if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - $context = 'sequence'; - - if (isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // array - if (isset($values['value']) && 0 === strpos(ltrim($values['value'], ' '), '-')) { - // Inline first child - $currentLineNumber = $this->getRealCurrentLineNb(); - - $sequenceIndentation = \strlen($values['leadspaces']) + 1; - $sequenceYaml = substr($this->currentLine, $sequenceIndentation); - $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true); - - $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags); - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { - $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags); - } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) { - $data[] = new TaggedValue( - $subTag, - $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $flags) - ); - } else { - if ( - isset($values['leadspaces']) - && ( - '!' === $values['value'][0] - || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches) - ) - ) { - // this is a compact notation element, add to next block and parse - $block = $values['value']; - if ($this->isNextLineIndented()) { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); - } - - $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $flags); - } else { - $data[] = $this->parseValue($values['value'], $flags, $context); - } - } - if ($isRef) { - $this->refs[$isRef] = end($data); - array_pop($this->refsBeingParsed); - } - } elseif ( - self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) - ) { - if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - $context = 'mapping'; - - try { - $key = Inline::parseScalar($values['key']); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - if (!\is_string($key) && !\is_int($key)) { - throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // Convert float keys to strings, to avoid being converted to integers by PHP - if (\is_float($key)) { - $key = (string) $key; - } - - if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { - $mergeNode = true; - $allowOverwrite = true; - if (isset($values['value'][0]) && '*' === $values['value'][0]) { - $refName = substr(rtrim($values['value']), 1); - if (!\array_key_exists($refName, $this->refs)) { - if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$refName])), $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $refValue = $this->refs[$refName]; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) { - $refValue = (array) $refValue; - } - - if (!\is_array($refValue)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - $data += $refValue; // array union - } else { - if (isset($values['value']) && '' !== $values['value']) { - $value = $values['value']; - } else { - $value = $this->getNextEmbedBlock(); - } - $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) { - $parsed = (array) $parsed; - } - - if (!\is_array($parsed)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (isset($parsed[0])) { - // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes - // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier - // in the sequence override keys specified in later mapping nodes. - foreach ($parsed as $parsedItem) { - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) { - $parsedItem = (array) $parsedItem; - } - - if (!\is_array($parsedItem)) { - throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename); - } - - $data += $parsedItem; // array union - } - } else { - // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the - // current mapping, unless the key already exists in it. - $data += $parsed; // array union - } - } - } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) { - $isRef = $matches['ref']; - $this->refsBeingParsed[] = $isRef; - $values['value'] = $matches['value']; - } - - $subTag = null; - if ($mergeNode) { - // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { - // hash - // if next line is less indented or equal, then it means that the current value is null - if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, ''); - } else { - $data[$key] = null; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } else { - // remember the parsed line number here in case we need it to provide some contexts in error messages below - $realCurrentLineNbKey = $this->getRealCurrentLineNb(); - $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); - if ('<<' === $key) { - $this->refs[$refMatches['ref']] = $value; - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) { - $value = (array) $value; - } - - $data += $value; - } elseif ($allowOverwrite || !isset($data[$key])) { - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if (null !== $subTag) { - $data[$key] = new TaggedValue($subTag, $value); - } else { - $data[$key] = $value; - } - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine); - } - } - } else { - $value = $this->parseValue(rtrim($values['value']), $flags, $context); - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { - $data[$key] = $value; - } else { - throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - } - if ($isRef) { - $this->refs[$isRef] = $data[$key]; - array_pop($this->refsBeingParsed); - } - } elseif ('"' === $this->currentLine[0] || "'" === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - return Inline::parse($this->lexInlineQuotedString(), $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('{' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedMapping = Inline::parse($this->lexInlineMapping(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedMapping; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } elseif ('[' === $this->currentLine[0]) { - if (null !== $context) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - try { - $parsedSequence = Inline::parse($this->lexInlineSequence(), $flags, $this->refs); - - while ($this->moveToNextLine()) { - if (!$this->isCurrentLineEmpty()) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return $parsedSequence; - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } else { - // multiple documents are not supported - if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) { - throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); - } - - // 1-liner optionally followed by newline(s) - if (\is_string($value) && $this->lines[0] === trim($value)) { - try { - $value = Inline::parse($this->lines[0], $flags, $this->refs); - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - - return $value; - } - - // try to parse the value as a multi-line string as a last resort - if (0 === $this->currentLineNb) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - $value = ''; - - foreach ($this->lines as $line) { - $trimmedLine = trim($line); - if ('#' === ($trimmedLine[0] ?? '')) { - continue; - } - // If the indentation is not consistent at offset 0, it is to be considered as a ParseError - if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if (false !== strpos($line, ': ')) { - throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - - if ('' === $trimmedLine) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - if ('' !== $trimmedLine && '\\' === substr($line, -1)) { - $value .= ltrim(substr($line, 0, -1)); - } elseif ('' !== $trimmedLine) { - $value .= $trimmedLine; - } - - if ('' === $trimmedLine) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === substr($line, -1)) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - } - - try { - return Inline::parse(trim($value)); - } catch (ParseException $e) { - // fall-through to the ParseException thrown below - } - } - - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } while ($this->moveToNextLine()); - - if (null !== $tag) { - $data = new TaggedValue($tag, $data); - } - - if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && 'mapping' === $context && !\is_object($data)) { - $object = new \stdClass(); - - foreach ($data as $key => $value) { - $object->$key = $value; - } - - $data = $object; - } - - return empty($data) ? null : $data; - } - - private function parseBlock(int $offset, string $yaml, int $flags) - { - $skippedLineNumbers = $this->skippedLineNumbers; - - foreach ($this->locallySkippedLineNumbers as $lineNumber) { - if ($lineNumber < $offset) { - continue; - } - - $skippedLineNumbers[] = $lineNumber; - } - - $parser = new self(); - $parser->offset = $offset; - $parser->totalNumberOfLines = $this->totalNumberOfLines; - $parser->skippedLineNumbers = $skippedLineNumbers; - $parser->refs = &$this->refs; - $parser->refsBeingParsed = $this->refsBeingParsed; - - return $parser->doParse($yaml, $flags); - } - - /** - * Returns the current line number (takes the offset into account). - * - * @internal - */ - public function getRealCurrentLineNb(): int - { - $realCurrentLineNumber = $this->currentLineNb + $this->offset; - - foreach ($this->skippedLineNumbers as $skippedLineNumber) { - if ($skippedLineNumber > $realCurrentLineNumber) { - break; - } - - ++$realCurrentLineNumber; - } - - return $realCurrentLineNumber; - } - - /** - * Returns the current line indentation. - */ - private function getCurrentLineIndentation(): int - { - if (' ' !== ($this->currentLine[0] ?? '')) { - return 0; - } - - return \strlen($this->currentLine) - \strlen(ltrim($this->currentLine, ' ')); - } - - /** - * Returns the next embed block of YAML. - * - * @param int|null $indentation The indent level at which the block is to be read, or null for default - * @param bool $inSequence True if the enclosing data structure is a sequence - * - * @throws ParseException When indentation problem are detected - */ - private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string - { - $oldLineIndentation = $this->getCurrentLineIndentation(); - - if (!$this->moveToNextLine()) { - return ''; - } - - if (null === $indentation) { - $newIndent = null; - $movements = 0; - - do { - $EOF = false; - - // empty and comment-like lines do not influence the indentation depth - if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } else { - $newIndent = $this->getCurrentLineIndentation(); - } - } while (!$EOF && null === $newIndent); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); - - if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } else { - $newIndent = $indentation; - } - - $data = []; - - if ($this->getCurrentLineIndentation() >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent ?? 0); - } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } else { - $this->moveToPreviousLine(); - - return ''; - } - - if ($inSequence && $oldLineIndentation === $newIndent && isset($data[0][0]) && '-' === $data[0][0]) { - // the previous line contained a dash but no item content, this line is a sequence item with the same indentation - // and therefore no nested list or mapping - $this->moveToPreviousLine(); - - return ''; - } - - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - - while ($this->moveToNextLine()) { - if ($isItComment && !$isItUnindentedCollection) { - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - $isItComment = $this->isCurrentLineComment(); - } - - $indent = $this->getCurrentLineIndentation(); - - if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { - $this->moveToPreviousLine(); - break; - } - - if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); - continue; - } - - if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); - } elseif ($this->isCurrentLineComment()) { - $data[] = $this->currentLine; - } elseif (0 == $indent) { - $this->moveToPreviousLine(); - - break; - } else { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); - } - } - - return implode("\n", $data); - } - - private function hasMoreLines(): bool - { - return (\count($this->lines) - 1) > $this->currentLineNb; - } - - /** - * Moves the parser to the next line. - */ - private function moveToNextLine(): bool - { - if ($this->currentLineNb >= $this->numberOfParsedLines - 1) { - return false; - } - - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; - } - - /** - * Moves the parser to the previous line. - */ - private function moveToPreviousLine(): bool - { - if ($this->currentLineNb < 1) { - return false; - } - - $this->currentLine = $this->lines[--$this->currentLineNb]; - - return true; - } - - /** - * Parses a YAML value. - * - * @param string $value A YAML value - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * @param string $context The parser context (either sequence or mapping) - * - * @return mixed - * - * @throws ParseException When reference does not exist - */ - private function parseValue(string $value, int $flags, string $context) - { - if (0 === strpos($value, '*')) { - if (false !== $pos = strpos($value, '#')) { - $value = substr($value, 1, $pos - 2); - } else { - $value = substr($value, 1); - } - - if (!\array_key_exists($value, $this->refs)) { - if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { - throw new ParseException(sprintf('Circular reference [%s] detected for reference "%s".', implode(', ', array_merge(\array_slice($this->refsBeingParsed, $pos), [$value])), $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); - } - - return $this->refs[$value]; - } - - if (\in_array($value[0], ['!', '|', '>'], true) && self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { - $modifiers = $matches['modifiers'] ?? ''; - - $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); - - if ('' !== $matches['tag'] && '!' !== $matches['tag']) { - if ('!!binary' === $matches['tag']) { - return Inline::evaluateBinaryScalar($data); - } - - return new TaggedValue(substr($matches['tag'], 1), $data); - } - - return $data; - } - - try { - if ('' !== $value && '{' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs); - } elseif ('' !== $value && '[' === $value[0]) { - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - - return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs); - } - - switch ($value[0] ?? '') { - case '"': - case "'": - $cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value)); - $parsedValue = Inline::parse($this->lexInlineQuotedString($cursor), $flags, $this->refs); - - if (isset($this->currentLine[$cursor]) && preg_replace('/\s*(#.*)?$/A', '', substr($this->currentLine, $cursor))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($this->currentLine, $cursor))); - } - - return $parsedValue; - default: - $lines = []; - - while ($this->moveToNextLine()) { - // unquoted strings end before the first unindented line - if (0 === $this->getCurrentLineIndentation()) { - $this->moveToPreviousLine(); - - break; - } - - $lines[] = trim($this->currentLine); - } - - for ($i = 0, $linesCount = \count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) { - if ('' === $lines[$i]) { - $value .= "\n"; - $previousLineBlank = true; - } elseif ($previousLineBlank) { - $value .= $lines[$i]; - $previousLineBlank = false; - } else { - $value .= ' '.$lines[$i]; - $previousLineBlank = false; - } - } - - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); - - $parsedValue = Inline::parse($value, $flags, $this->refs); - - if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { - throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - return $parsedValue; - } - } catch (ParseException $e) { - $e->setParsedLine($this->getRealCurrentLineNb() + 1); - $e->setSnippet($this->currentLine); - - throw $e; - } - } - - /** - * Parses a block scalar. - * - * @param string $style The style indicator that was used to begin this block scalar (| or >) - * @param string $chomping The chomping indicator that was used to begin this block scalar (+ or -) - * @param int $indentation The indentation indicator that was used to begin this block scalar - */ - private function parseBlockScalar(string $style, string $chomping = '', int $indentation = 0): string - { - $notEOF = $this->moveToNextLine(); - if (!$notEOF) { - return ''; - } - - $isCurrentLineBlank = $this->isCurrentLineBlank(); - $blockLines = []; - - // leading blank lines are consumed before determining indentation - while ($notEOF && $isCurrentLineBlank) { - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $blockLines[] = ''; - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - - // determine indentation if not specified - if (0 === $indentation) { - $currentLineLength = \strlen($this->currentLine); - - for ($i = 0; $i < $currentLineLength && ' ' === $this->currentLine[$i]; ++$i) { - ++$indentation; - } - } - - if ($indentation > 0) { - $pattern = sprintf('/^ {%d}(.*)$/', $indentation); - - while ( - $notEOF && ( - $isCurrentLineBlank || - self::preg_match($pattern, $this->currentLine, $matches) - ) - ) { - if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) { - $blockLines[] = substr($this->currentLine, $indentation); - } elseif ($isCurrentLineBlank) { - $blockLines[] = ''; - } else { - $blockLines[] = $matches[1]; - } - - // newline only if not EOF - if ($notEOF = $this->moveToNextLine()) { - $isCurrentLineBlank = $this->isCurrentLineBlank(); - } - } - } elseif ($notEOF) { - $blockLines[] = ''; - } - - if ($notEOF) { - $blockLines[] = ''; - $this->moveToPreviousLine(); - } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { - $blockLines[] = ''; - } - - // folded style - if ('>' === $style) { - $text = ''; - $previousLineIndented = false; - $previousLineBlank = false; - - for ($i = 0, $blockLinesCount = \count($blockLines); $i < $blockLinesCount; ++$i) { - if ('' === $blockLines[$i]) { - $text .= "\n"; - $previousLineIndented = false; - $previousLineBlank = true; - } elseif (' ' === $blockLines[$i][0]) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = true; - $previousLineBlank = false; - } elseif ($previousLineIndented) { - $text .= "\n".$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } elseif ($previousLineBlank || 0 === $i) { - $text .= $blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } else { - $text .= ' '.$blockLines[$i]; - $previousLineIndented = false; - $previousLineBlank = false; - } - } - } else { - $text = implode("\n", $blockLines); - } - - // deal with trailing newlines - if ('' === $chomping) { - $text = preg_replace('/\n+$/', "\n", $text); - } elseif ('-' === $chomping) { - $text = preg_replace('/\n+$/', '', $text); - } - - return $text; - } - - /** - * Returns true if the next line is indented. - */ - private function isNextLineIndented(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() > $currentIndentation; - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the current line is blank or if it is a comment line. - */ - private function isCurrentLineEmpty(): bool - { - return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); - } - - /** - * Returns true if the current line is blank. - */ - private function isCurrentLineBlank(): bool - { - return '' === $this->currentLine || '' === trim($this->currentLine, ' '); - } - - /** - * Returns true if the current line is a comment line. - */ - private function isCurrentLineComment(): bool - { - //checking explicitly the first char of the trim is faster than loops or strpos - $ltrimmedLine = '' !== $this->currentLine && ' ' === $this->currentLine[0] ? ltrim($this->currentLine, ' ') : $this->currentLine; - - return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; - } - - private function isCurrentLineLastLineInDocument(): bool - { - return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); - } - - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - */ - private function cleanup(string $value): string - { - $value = str_replace(["\r\n", "\r"], "\n", $value); - - // strip YAML header - $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#u', '', $value, -1, $count); - $this->offset += $count; - - // remove leading comments - $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - } - - // remove start of the document marker (---) - $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); - if (1 === $count) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - - // remove end of the document marker (...) - $value = preg_replace('#\.\.\.\s*$#', '', $value); - } - - return $value; - } - - /** - * Returns true if the next line starts unindented collection. - */ - private function isNextLineUnIndentedCollection(): bool - { - $currentIndentation = $this->getCurrentLineIndentation(); - $movements = 0; - - do { - $EOF = !$this->moveToNextLine(); - - if (!$EOF) { - ++$movements; - } - } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - - if ($EOF) { - return false; - } - - $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - - for ($i = 0; $i < $movements; ++$i) { - $this->moveToPreviousLine(); - } - - return $ret; - } - - /** - * Returns true if the string is un-indented collection item. - */ - private function isStringUnIndentedCollectionItem(): bool - { - return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); - } - - /** - * A local wrapper for "preg_match" which will throw a ParseException if there - * is an internal error in the PCRE engine. - * - * This avoids us needing to check for "false" every time PCRE is used - * in the YAML engine - * - * @throws ParseException on a PCRE internal error - * - * @see preg_last_error() - * - * @internal - */ - public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int - { - if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error.'; - break; - case \PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached.'; - break; - case \PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached.'; - break; - case \PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data.'; - break; - case \PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; - break; - default: - $error = 'Error.'; - } - - throw new ParseException($error); - } - - return $ret; - } - - /** - * Trim the tag on top of the value. - * - * Prevent values such as "!foo {quz: bar}" to be considered as - * a mapping block. - */ - private function trimTag(string $value): string - { - if ('!' === $value[0]) { - return ltrim(substr($value, 1, strcspn($value, " \r\n", 1)), ' '); - } - - return $value; - } - - private function getLineTag(string $value, int $flags, bool $nextLineCheck = true): ?string - { - if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) { - return null; - } - - if ($nextLineCheck && !$this->isNextLineIndented()) { - return null; - } - - $tag = substr($matches['tag'], 1); - - // Built-in tags - if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - if (Yaml::PARSE_CUSTOM_TAGS & $flags) { - return $tag; - } - - throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); - } - - private function lexInlineQuotedString(int &$cursor = 0): string - { - $quotation = $this->currentLine[$cursor]; - $value = $quotation; - ++$cursor; - - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - $lineNumber = 0; - - do { - if (++$lineNumber > 1) { - $cursor += strspn($this->currentLine, ' ', $cursor); - } - - if ($this->isCurrentLineBlank()) { - $value .= "\n"; - } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { - $value .= ' '; - } - - for (; \strlen($this->currentLine) > $cursor; ++$cursor) { - switch ($this->currentLine[$cursor]) { - case '\\': - if ("'" === $quotation) { - $value .= '\\'; - } elseif (isset($this->currentLine[++$cursor])) { - $value .= '\\'.$this->currentLine[$cursor]; - } - - break; - case $quotation: - ++$cursor; - - if ("'" === $quotation && isset($this->currentLine[$cursor]) && "'" === $this->currentLine[$cursor]) { - $value .= "''"; - break; - } - - return $value.$quotation; - default: - $value .= $this->currentLine[$cursor]; - } - } - - if ($this->isCurrentLineBlank()) { - $previousLineWasNewline = true; - $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === $this->currentLine[-1]) { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = true; - } else { - $previousLineWasNewline = false; - $previousLineWasTerminatedWithBackslash = false; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function lexUnquotedString(int &$cursor): string - { - $offset = $cursor; - $cursor += strcspn($this->currentLine, '[]{},: ', $cursor); - - if ($cursor === $offset) { - throw new ParseException('Malformed unquoted YAML string.'); - } - - return substr($this->currentLine, $offset, $cursor - $offset); - } - - private function lexInlineMapping(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, '}'); - } - - private function lexInlineSequence(int &$cursor = 0): string - { - return $this->lexInlineStructure($cursor, ']'); - } - - private function lexInlineStructure(int &$cursor, string $closingTag): string - { - $value = $this->currentLine[$cursor]; - ++$cursor; - - do { - $this->consumeWhitespaces($cursor); - - while (isset($this->currentLine[$cursor])) { - switch ($this->currentLine[$cursor]) { - case '"': - case "'": - $value .= $this->lexInlineQuotedString($cursor); - break; - case ':': - case ',': - $value .= $this->currentLine[$cursor]; - ++$cursor; - break; - case '{': - $value .= $this->lexInlineMapping($cursor); - break; - case '[': - $value .= $this->lexInlineSequence($cursor); - break; - case $closingTag: - $value .= $this->currentLine[$cursor]; - ++$cursor; - - return $value; - case '#': - break 2; - default: - $value .= $this->lexUnquotedString($cursor); - } - - if ($this->consumeWhitespaces($cursor)) { - $value .= ' '; - } - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - throw new ParseException('Malformed inline YAML string.'); - } - - private function consumeWhitespaces(int &$cursor): bool - { - $whitespacesConsumed = 0; - - do { - $whitespaceOnlyTokenLength = strspn($this->currentLine, ' ', $cursor); - $whitespacesConsumed += $whitespaceOnlyTokenLength; - $cursor += $whitespaceOnlyTokenLength; - - if (isset($this->currentLine[$cursor])) { - return 0 < $whitespacesConsumed; - } - - if ($this->hasMoreLines()) { - $cursor = 0; - } - } while ($this->moveToNextLine()); - - return 0 < $whitespacesConsumed; - } -} diff --git a/vendor/symfony/yaml/README.md b/vendor/symfony/yaml/README.md deleted file mode 100644 index ac25024..0000000 --- a/vendor/symfony/yaml/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Yaml Component -============== - -The Yaml component loads and dumps YAML files. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/yaml.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/yaml/Resources/bin/yaml-lint b/vendor/symfony/yaml/Resources/bin/yaml-lint deleted file mode 100755 index 0ad73d7..0000000 --- a/vendor/symfony/yaml/Resources/bin/yaml-lint +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Runs the Yaml lint command. - * - * @author Jan Schädlich - */ - -use Symfony\Component\Console\Application; -use Symfony\Component\Yaml\Command\LintCommand; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL); - exit(1); -} - -(new Application())->add($command = new LintCommand()) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run() -; diff --git a/vendor/symfony/yaml/Tag/TaggedValue.php b/vendor/symfony/yaml/Tag/TaggedValue.php deleted file mode 100644 index 4ea3406..0000000 --- a/vendor/symfony/yaml/Tag/TaggedValue.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml\Tag; - -/** - * @author Nicolas Grekas - * @author Guilhem N. - */ -final class TaggedValue -{ - private $tag; - private $value; - - public function __construct(string $tag, $value) - { - $this->tag = $tag; - $this->value = $value; - } - - public function getTag(): string - { - return $this->tag; - } - - public function getValue() - { - return $this->value; - } -} diff --git a/vendor/symfony/yaml/Unescaper.php b/vendor/symfony/yaml/Unescaper.php deleted file mode 100644 index d1ef041..0000000 --- a/vendor/symfony/yaml/Unescaper.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Unescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - * - * @internal - */ -class Unescaper -{ - /** - * Regex fragment that matches an escaped character in a double quoted string. - */ - public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; - - /** - * Unescapes a single quoted string. - * - * @param string $value A single quoted string - */ - public function unescapeSingleQuotedString(string $value): string - { - return str_replace('\'\'', '\'', $value); - } - - /** - * Unescapes a double quoted string. - * - * @param string $value A double quoted string - */ - public function unescapeDoubleQuotedString(string $value): string - { - $callback = function ($match) { - return $this->unescapeCharacter($match[0]); - }; - - // evaluate the string - return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); - } - - /** - * Unescapes a character that was found in a double-quoted string. - * - * @param string $value An escaped character - */ - private function unescapeCharacter(string $value): string - { - switch ($value[1]) { - case '0': - return "\x0"; - case 'a': - return "\x7"; - case 'b': - return "\x8"; - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return "\xB"; - case 'f': - return "\xC"; - case 'r': - return "\r"; - case 'e': - return "\x1B"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\xC2\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\xC2\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\xE2\x80\xA8"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\xE2\x80\xA9"; - case 'x': - return self::utf8chr(hexdec(substr($value, 2, 2))); - case 'u': - return self::utf8chr(hexdec(substr($value, 2, 4))); - case 'U': - return self::utf8chr(hexdec(substr($value, 2, 8))); - default: - throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); - } - } - - /** - * Get the UTF-8 character for the given code point. - */ - private static function utf8chr(int $c): string - { - if (0x80 > $c %= 0x200000) { - return \chr($c); - } - if (0x800 > $c) { - return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); - } - if (0x10000 > $c) { - return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } - - return \chr(0xF0 | $c >> 18).\chr(0x80 | $c >> 12 & 0x3F).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); - } -} diff --git a/vendor/symfony/yaml/Yaml.php b/vendor/symfony/yaml/Yaml.php deleted file mode 100644 index ea13045..0000000 --- a/vendor/symfony/yaml/Yaml.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Yaml; - -use Symfony\Component\Yaml\Exception\ParseException; - -/** - * Yaml offers convenience methods to load and dump YAML. - * - * @author Fabien Potencier - * - * @final - */ -class Yaml -{ - public const DUMP_OBJECT = 1; - public const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; - public const PARSE_OBJECT = 4; - public const PARSE_OBJECT_FOR_MAP = 8; - public const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; - public const PARSE_DATETIME = 32; - public const DUMP_OBJECT_AS_MAP = 64; - public const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; - public const PARSE_CONSTANT = 256; - public const PARSE_CUSTOM_TAGS = 512; - public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; - public const DUMP_NULL_AS_TILDE = 2048; - - /** - * Parses a YAML file into a PHP value. - * - * Usage: - * - * $array = Yaml::parseFile('config.yml'); - * print_r($array); - * - * @param string $filename The path to the YAML file to be parsed - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the file could not be read or the YAML is not valid - */ - public static function parseFile(string $filename, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parseFile($filename, $flags); - } - - /** - * Parses YAML into a PHP value. - * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * - * - * @param string $input A string containing YAML - * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior - * - * @return mixed - * - * @throws ParseException If the YAML is not valid - */ - public static function parse(string $input, int $flags = 0) - { - $yaml = new Parser(); - - return $yaml->parse($input, $flags); - } - - /** - * Dumps a PHP value to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param mixed $input The PHP value - * @param int $inline The level where you switch to inline YAML - * @param int $indent The amount of spaces to use for indentation of nested nodes - * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string - */ - public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string - { - $yaml = new Dumper($indent); - - return $yaml->dump($input, $inline, 0, $flags); - } -} diff --git a/vendor/symfony/yaml/composer.json b/vendor/symfony/yaml/composer.json deleted file mode 100644 index 7fa6e2c..0000000 --- a/vendor/symfony/yaml/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/yaml", - "type": "library", - "description": "Loads and dumps YAML files", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Yaml\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "minimum-stability": "dev" -} diff --git a/vendor/twig/twig/.editorconfig b/vendor/twig/twig/.editorconfig deleted file mode 100644 index 270f1d1..0000000 --- a/vendor/twig/twig/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -; top-most EditorConfig file -root = true - -; Unix-style newlines -[*] -end_of_line = LF - -[*.php] -indent_style = space -indent_size = 4 - -[*.test] -indent_style = space -indent_size = 4 - -[*.rst] -indent_style = space -indent_size = 4 diff --git a/vendor/twig/twig/.gitattributes b/vendor/twig/twig/.gitattributes deleted file mode 100644 index 1ce832b..0000000 --- a/vendor/twig/twig/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -/doc/** export-ignore -/extra/** export-ignore -/tests export-ignore -/phpunit.xml.dist export-ignore diff --git a/vendor/twig/twig/.github/workflows/ci.yml b/vendor/twig/twig/.github/workflows/ci.yml deleted file mode 100644 index 140483c..0000000 --- a/vendor/twig/twig/.github/workflows/ci.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: "CI" - -on: - pull_request: - push: - branches: - - '3.x' - -env: - SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 - -jobs: - tests: - name: "PHP ${{ matrix.php-version }}" - - runs-on: 'ubuntu-latest' - - continue-on-error: ${{ matrix.experimental }} - - strategy: - matrix: - php-version: - - '7.2.5' - - '7.3' - - '7.4' - - '8.0' - - '8.1' - composer-options: [''] - experimental: [false] - - steps: - - name: "Checkout code" - uses: actions/checkout@v2.3.3 - - - name: "Install PHP with extensions" - uses: shivammathur/setup-php@2.7.0 - with: - coverage: "none" - php-version: ${{ matrix.php-version }} - ini-values: memory_limit=-1 - tools: composer:v2 - - - name: "Add PHPUnit matcher" - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: "Set composer cache directory" - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: "Cache composer" - uses: actions/cache@v2.1.2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} - restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- - - - run: composer install ${{ matrix.composer-options }} - - - name: "Install PHPUnit" - run: vendor/bin/simple-phpunit install - - - name: "PHPUnit version" - run: vendor/bin/simple-phpunit --version - - - name: "Run tests" - run: vendor/bin/simple-phpunit - - extension-tests: - needs: - - 'tests' - - name: "${{ matrix.extension }} with PHP ${{ matrix.php-version }}" - - runs-on: 'ubuntu-latest' - - continue-on-error: true - - strategy: - matrix: - php-version: - - '7.2.5' - - '7.3' - - '7.4' - - '8.0' - - '8.1' - extension: - - 'extra/cache-extra' - - 'extra/cssinliner-extra' - - 'extra/html-extra' - - 'extra/inky-extra' - - 'extra/intl-extra' - - 'extra/markdown-extra' - - 'extra/string-extra' - - 'extra/twig-extra-bundle' - composer-options: [''] - experimental: [false] - - steps: - - name: "Checkout code" - uses: actions/checkout@v2.3.3 - - - name: "Install PHP with extensions" - uses: shivammathur/setup-php@2.7.0 - with: - coverage: "none" - php-version: ${{ matrix.php-version }} - ini-values: memory_limit=-1 - tools: composer:v2 - - - name: "Add PHPUnit matcher" - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: "Set composer cache directory" - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: "Cache composer" - uses: actions/cache@v2.1.2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.extension }}-${{ hashFiles('composer.json') }} - restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.extension }}- - - - run: composer install - - - name: "Install PHPUnit" - run: vendor/bin/simple-phpunit install - - - name: "PHPUnit version" - run: vendor/bin/simple-phpunit --version - - - if: matrix.extension == 'extra/markdown-extra' && matrix.php-version == '8.0' - working-directory: ${{ matrix.extension}} - run: composer config platform.php 7.4.99 - - - name: "Composer install" - working-directory: ${{ matrix.extension}} - run: composer install - - - name: "Run tests" - working-directory: ${{ matrix.extension}} - run: ../../vendor/bin/simple-phpunit -# -# Drupal does not support Twig 3 now! -# -# integration-tests: -# needs: -# - 'tests' -# -# name: "Integration tests with PHP ${{ matrix.php-version }}" -# -# runs-on: 'ubuntu-20.04' -# -# continue-on-error: true -# -# strategy: -# matrix: -# php-version: -# - '7.3' -# -# steps: -# - name: "Checkout code" -# uses: actions/checkout@v2.3.3 -# -# - name: "Install PHP with extensions" -# uses: shivammathur/setup-php@2.7.0 -# with: -# coverage: "none" -# extensions: "gd, pdo_sqlite" -# php-version: ${{ matrix.php-version }} -# ini-values: memory_limit=-1 -# tools: composer:v2 -# -# - run: bash ./tests/drupal_test.sh -# shell: "bash" diff --git a/vendor/twig/twig/.github/workflows/documentation.yml b/vendor/twig/twig/.github/workflows/documentation.yml deleted file mode 100644 index 0b3ca71..0000000 --- a/vendor/twig/twig/.github/workflows/documentation.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "Documentation" - -on: - pull_request: - push: - branches: - - '3.x' - -jobs: - build: - name: "Build" - - runs-on: ubuntu-latest - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Set up Python 3.7" - uses: actions/setup-python@v1 - with: - python-version: '3.7' # Semantic version range syntax or exact version of a Python version - - - name: "Display Python version" - run: python -c "import sys; print(sys.version)" - - - name: "Install Sphinx dependencies" - run: sudo apt-get install python-dev build-essential - - - name: "Cache pip" - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: "Install Sphinx + requirements via pip" - working-directory: "doc" - run: pip install -r _build/.requirements.txt - - - name: "Build documentation" - working-directory: "doc" - run: make -C _build SPHINXOPTS="-nqW -j auto" html - - doctor-rst: - name: "DOCtor-RST" - - runs-on: ubuntu-latest - - steps: - - name: "Checkout code" - uses: actions/checkout@v2 - - - name: "Run DOCtor-RST" - uses: docker://oskarstark/doctor-rst - with: - args: --short - env: - DOCS_DIR: 'doc/' diff --git a/vendor/twig/twig/.gitignore b/vendor/twig/twig/.gitignore deleted file mode 100644 index cd52aea..0000000 --- a/vendor/twig/twig/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/composer.lock -/phpunit.xml -/vendor -.phpunit.result.cache diff --git a/vendor/twig/twig/.php-cs-fixer.dist.php b/vendor/twig/twig/.php-cs-fixer.dist.php deleted file mode 100644 index b07ac7f..0000000 --- a/vendor/twig/twig/.php-cs-fixer.dist.php +++ /dev/null @@ -1,20 +0,0 @@ -setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHPUnit75Migration:risky' => true, - 'php_unit_dedicate_assert' => ['target' => '5.6'], - 'array_syntax' => ['syntax' => 'short'], - 'php_unit_fqcn_annotation' => true, - 'no_unreachable_default_argument_value' => false, - 'braces' => ['allow_single_line_closure' => true], - 'heredoc_to_nowdoc' => false, - 'ordered_imports' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], - ]) - ->setRiskyAllowed(true) - ->setFinder((new PhpCsFixer\Finder())->in(__DIR__)) -; diff --git a/vendor/twig/twig/CHANGELOG b/vendor/twig/twig/CHANGELOG deleted file mode 100644 index d276df8..0000000 --- a/vendor/twig/twig/CHANGELOG +++ /dev/null @@ -1,132 +0,0 @@ -# 3.3.10 (2022-04-06) - - * Enable bytecode invalidation when auto_reload is enabled - -# 3.3.9 (2022-03-25) - - * Fix custom escapers when using multiple Twig environments - * Add support for "constant('class', object)" - * Do not reuse internally generated variable names during parsing - -# 3.3.8 (2022-02-04) - - * Fix a security issue when in a sandbox: the `sort` filter must require a Closure for the `arrow` parameter - * Fix deprecation notice on `round` - * Fix call to deprecated `convertToHtml` method - -# 3.3.7 (2022-01-03) - -* Allow more null support when Twig expects a string (for better 8.1 support) -* Only use Commonmark extensions if markdown enabled - -# 3.3.6 (2022-01-03) - -* Only use Commonmark extensions if markdown enabled - -# 3.3.5 (2022-01-03) - -* Allow CommonMark extensions to easily be added -* Allow null when Twig expects a string (for better 8.1 support) -* Make some performance optimizations -* Allow Symfony translation contract v3+ - -# 3.3.4 (2021-11-25) - - * Bump minimum supported Symfony component versions - * Fix a deprecated message - -# 3.3.3 (2021-09-17) - - * Allow Symfony 6 - * Improve compatibility with PHP 8.1 - * Explicitly specify the encoding for mb_ord in JS escaper - -# 3.3.2 (2021-05-16) - - * Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)" - -# 3.3.1 (2021-05-12) - - * Fix PHP 8.1 compatibility - * Throw a proper exception when a template name is an absolute path (as it has never been supported) - -# 3.3.0 (2021-02-08) - - * Fix macro calls in a "cache" tag - * Add the slug filter - * Allow extra bundle to be compatible with Twig 2 - -# 3.2.1 (2021-01-05) - - * Fix extra bundle compat with older versions of Symfony - -# 3.2.0 (2021-01-05) - - * Add the Cache extension in the "extra" repositories: "cache" tag - * Add "registerUndefinedTokenParserCallback" - * Mark built-in node visitors as @internal - * Fix "odd" not working for negative numbers - -# 3.1.1 (2020-10-27) - - * Fix "include(template_from_string())" - -# 3.1.0 (2020-10-21) - - * Fix sandbox support when using "include(template_from_string())" - * Make round brackets optional for one argument tests like "same as" or "divisible by" - * Add support for ES2015 style object initialisation shortcut { a } is the same as { 'a': a } - -# 3.0.5 (2020-08-05) - - * Fix twig_compare w.r.t. whitespace trimming - * Fix sandbox not disabled if syntax error occurs within {% sandbox %} tag - * Fix a regression when not using a space before an operator - * Restrict callables to closures in filters - * Allow trailing commas in argument lists (in calls as well as definitions) - -# 3.0.4 (2020-07-05) - - * Fix comparison operators - * Fix options not taken into account when using "Michelf\MarkdownExtra" - * Fix "Twig\Extra\Intl\IntlExtension::getCountryName()" to accept "null" as a first argument - * Throw exception in case non-Traversable data is passed to "filter" - * Fix context optimization on PHP 7.4 - * Fix PHP 8 compatibility - * Fix ambiguous syntax parsing - -# 3.0.3 (2020-02-11) - - * Add a check to ensure that iconv() is defined - -# 3.0.2 (2020-02-11) - - * Avoid exceptions when an intl resource is not found - * Fix implementation of case-insensitivity for method names - -# 3.0.1 (2019-12-28) - - * fixed Symfony 5.0 support for the HTML extra extension - -# 3.0.0 (2019-11-15) - - * fixed number formatter in Intl extra extension when using a formatter prototype - -# 3.0.0-BETA1 (2019-11-11) - - * removed the "if" condition support on the "for" tag - * made the in, <, >, <=, >=, ==, and != operators more strict when comparing strings and integers/floats - * removed the "filter" tag - * added type hints everywhere - * changed Environment::resolveTemplate() to always return a TemplateWrapper instance - * removed Template::__toString() - * removed Parser::isReservedMacroName() - * removed SanboxedPrintNode - * removed Node::setTemplateName() - * made classes maked as "@final" final - * removed InitRuntimeInterface, ExistsLoaderInterface, and SourceContextLoaderInterface - * removed the "spaceless" tag - * removed Twig\Environment::getBaseTemplateClass() and Twig\Environment::setBaseTemplateClass() - * removed the "base_template_class" option on Twig\Environment - * bumped minimum PHP version to 7.2 - * removed PSR-0 classes diff --git a/vendor/twig/twig/LICENSE b/vendor/twig/twig/LICENSE deleted file mode 100644 index 8711927..0000000 --- a/vendor/twig/twig/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009-2022 by the Twig Team. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Twig nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/twig/twig/README.rst b/vendor/twig/twig/README.rst deleted file mode 100644 index fbe7e9a..0000000 --- a/vendor/twig/twig/README.rst +++ /dev/null @@ -1,23 +0,0 @@ -Twig, the flexible, fast, and secure template language for PHP -============================================================== - -Twig is a template language for PHP. - -Twig uses a syntax similar to the Django and Jinja template languages which -inspired the Twig runtime environment. - -Sponsors --------- - -.. raw:: html - - - Blackfire.io - - -More Information ----------------- - -Read the `documentation`_ for more information. - -.. _documentation: https://twig.symfony.com/documentation diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json deleted file mode 100644 index 91ff912..0000000 --- a/vendor/twig/twig/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "twig/twig", - "type": "library", - "description": "Twig, the flexible, fast, and secure template language for PHP", - "keywords": ["templating"], - "homepage": "https://twig.symfony.com", - "license": "BSD-3-Clause", - "minimum-stability": "dev", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0", - "psr/container": "^1.0" - }, - "autoload": { - "psr-4" : { - "Twig\\" : "src/" - } - }, - "autoload-dev": { - "psr-4" : { - "Twig\\Tests\\" : "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - } -} diff --git a/vendor/twig/twig/src/Cache/CacheInterface.php b/vendor/twig/twig/src/Cache/CacheInterface.php deleted file mode 100644 index 6e8c409..0000000 --- a/vendor/twig/twig/src/Cache/CacheInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface CacheInterface -{ - /** - * Generates a cache key for the given template class name. - */ - public function generateKey(string $name, string $className): string; - - /** - * Writes the compiled template to cache. - * - * @param string $content The template representation as a PHP class - */ - public function write(string $key, string $content): void; - - /** - * Loads a template from the cache. - */ - public function load(string $key): void; - - /** - * Returns the modification timestamp of a key. - */ - public function getTimestamp(string $key): int; -} diff --git a/vendor/twig/twig/src/Cache/FilesystemCache.php b/vendor/twig/twig/src/Cache/FilesystemCache.php deleted file mode 100644 index e075563..0000000 --- a/vendor/twig/twig/src/Cache/FilesystemCache.php +++ /dev/null @@ -1,87 +0,0 @@ - - */ -class FilesystemCache implements CacheInterface -{ - public const FORCE_BYTECODE_INVALIDATION = 1; - - private $directory; - private $options; - - public function __construct(string $directory, int $options = 0) - { - $this->directory = rtrim($directory, '\/').'/'; - $this->options = $options; - } - - public function generateKey(string $name, string $className): string - { - $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $className); - - return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; - } - - public function load(string $key): void - { - if (is_file($key)) { - @include_once $key; - } - } - - public function write(string $key, string $content): void - { - $dir = \dirname($key); - if (!is_dir($dir)) { - if (false === @mkdir($dir, 0777, true)) { - clearstatcache(true, $dir); - if (!is_dir($dir)) { - throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); - } - } - } elseif (!is_writable($dir)) { - throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); - } - - $tmpFile = tempnam($dir, basename($key)); - if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { - @chmod($key, 0666 & ~umask()); - - if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { - // Compile cached file into bytecode cache - if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) { - @opcache_invalidate($key, true); - } elseif (\function_exists('apc_compile_file')) { - apc_compile_file($key); - } - } - - return; - } - - throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key)); - } - - public function getTimestamp(string $key): int - { - if (!is_file($key)) { - return 0; - } - - return (int) @filemtime($key); - } -} diff --git a/vendor/twig/twig/src/Cache/NullCache.php b/vendor/twig/twig/src/Cache/NullCache.php deleted file mode 100644 index 8d20d59..0000000 --- a/vendor/twig/twig/src/Cache/NullCache.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -final class NullCache implements CacheInterface -{ - public function generateKey(string $name, string $className): string - { - return ''; - } - - public function write(string $key, string $content): void - { - } - - public function load(string $key): void - { - } - - public function getTimestamp(string $key): int - { - return 0; - } -} diff --git a/vendor/twig/twig/src/Compiler.php b/vendor/twig/twig/src/Compiler.php deleted file mode 100644 index 95e1f18..0000000 --- a/vendor/twig/twig/src/Compiler.php +++ /dev/null @@ -1,214 +0,0 @@ - - */ -class Compiler -{ - private $lastLine; - private $source; - private $indentation; - private $env; - private $debugInfo = []; - private $sourceOffset; - private $sourceLine; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - public function getEnvironment(): Environment - { - return $this->env; - } - - public function getSource(): string - { - return $this->source; - } - - /** - * @return $this - */ - public function compile(Node $node, int $indentation = 0) - { - $this->lastLine = null; - $this->source = ''; - $this->debugInfo = []; - $this->sourceOffset = 0; - // source code starts at 1 (as we then increment it when we encounter new lines) - $this->sourceLine = 1; - $this->indentation = $indentation; - $this->varNameSalt = 0; - - $node->compile($this); - - return $this; - } - - /** - * @return $this - */ - public function subcompile(Node $node, bool $raw = true) - { - if (false === $raw) { - $this->source .= str_repeat(' ', $this->indentation * 4); - } - - $node->compile($this); - - return $this; - } - - /** - * Adds a raw string to the compiled code. - * - * @return $this - */ - public function raw(string $string) - { - $this->source .= $string; - - return $this; - } - - /** - * Writes a string to the compiled code by adding indentation. - * - * @return $this - */ - public function write(...$strings) - { - foreach ($strings as $string) { - $this->source .= str_repeat(' ', $this->indentation * 4).$string; - } - - return $this; - } - - /** - * Adds a quoted string to the compiled code. - * - * @return $this - */ - public function string(string $value) - { - $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\")); - - return $this; - } - - /** - * Returns a PHP representation of a given value. - * - * @return $this - */ - public function repr($value) - { - if (\is_int($value) || \is_float($value)) { - if (false !== $locale = setlocale(\LC_NUMERIC, '0')) { - setlocale(\LC_NUMERIC, 'C'); - } - - $this->raw(var_export($value, true)); - - if (false !== $locale) { - setlocale(\LC_NUMERIC, $locale); - } - } elseif (null === $value) { - $this->raw('null'); - } elseif (\is_bool($value)) { - $this->raw($value ? 'true' : 'false'); - } elseif (\is_array($value)) { - $this->raw('array('); - $first = true; - foreach ($value as $key => $v) { - if (!$first) { - $this->raw(', '); - } - $first = false; - $this->repr($key); - $this->raw(' => '); - $this->repr($v); - } - $this->raw(')'); - } else { - $this->string($value); - } - - return $this; - } - - /** - * @return $this - */ - public function addDebugInfo(Node $node) - { - if ($node->getTemplateLine() != $this->lastLine) { - $this->write(sprintf("// line %d\n", $node->getTemplateLine())); - - $this->sourceLine += substr_count($this->source, "\n", $this->sourceOffset); - $this->sourceOffset = \strlen($this->source); - $this->debugInfo[$this->sourceLine] = $node->getTemplateLine(); - - $this->lastLine = $node->getTemplateLine(); - } - - return $this; - } - - public function getDebugInfo(): array - { - ksort($this->debugInfo); - - return $this->debugInfo; - } - - /** - * @return $this - */ - public function indent(int $step = 1) - { - $this->indentation += $step; - - return $this; - } - - /** - * @return $this - * - * @throws \LogicException When trying to outdent too much so the indentation would become negative - */ - public function outdent(int $step = 1) - { - // can't outdent by more steps than the current indentation level - if ($this->indentation < $step) { - throw new \LogicException('Unable to call outdent() as the indentation would become negative.'); - } - - $this->indentation -= $step; - - return $this; - } - - public function getVarName(): string - { - return sprintf('__internal_compile_%d', $this->varNameSalt++); - } -} diff --git a/vendor/twig/twig/src/Environment.php b/vendor/twig/twig/src/Environment.php deleted file mode 100644 index 4ff095c..0000000 --- a/vendor/twig/twig/src/Environment.php +++ /dev/null @@ -1,832 +0,0 @@ - - */ -class Environment -{ - public const VERSION = '3.3.10'; - public const VERSION_ID = 30310; - public const MAJOR_VERSION = 3; - public const MINOR_VERSION = 3; - public const RELEASE_VERSION = 10; - public const EXTRA_VERSION = ''; - - private $charset; - private $loader; - private $debug; - private $autoReload; - private $cache; - private $lexer; - private $parser; - private $compiler; - private $globals = []; - private $resolvedGlobals; - private $loadedTemplates; - private $strictVariables; - private $templateClassPrefix = '__TwigTemplate_'; - private $originalCache; - private $extensionSet; - private $runtimeLoaders = []; - private $runtimes = []; - private $optionsHash; - - /** - * Constructor. - * - * Available options: - * - * * debug: When set to true, it automatically set "auto_reload" to true as - * well (default to false). - * - * * charset: The charset used by the templates (default to UTF-8). - * - * * cache: An absolute path where to store the compiled templates, - * a \Twig\Cache\CacheInterface implementation, - * or false to disable compilation cache (default). - * - * * auto_reload: Whether to reload the template if the original source changed. - * If you don't provide the auto_reload option, it will be - * determined automatically based on the debug value. - * - * * strict_variables: Whether to ignore invalid variables in templates - * (default to false). - * - * * autoescape: Whether to enable auto-escaping (default to html): - * * false: disable auto-escaping - * * html, js: set the autoescaping to one of the supported strategies - * * name: set the autoescaping strategy based on the template name extension - * * PHP callback: a PHP callback that returns an escaping strategy based on the template "name" - * - * * optimizations: A flag that indicates which optimizations to apply - * (default to -1 which means that all optimizations are enabled; - * set it to 0 to disable). - */ - public function __construct(LoaderInterface $loader, $options = []) - { - $this->setLoader($loader); - - $options = array_merge([ - 'debug' => false, - 'charset' => 'UTF-8', - 'strict_variables' => false, - 'autoescape' => 'html', - 'cache' => false, - 'auto_reload' => null, - 'optimizations' => -1, - ], $options); - - $this->debug = (bool) $options['debug']; - $this->setCharset($options['charset'] ?? 'UTF-8'); - $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload']; - $this->strictVariables = (bool) $options['strict_variables']; - $this->setCache($options['cache']); - $this->extensionSet = new ExtensionSet(); - - $this->addExtension(new CoreExtension()); - $this->addExtension(new EscaperExtension($options['autoescape'])); - $this->addExtension(new OptimizerExtension($options['optimizations'])); - } - - /** - * Enables debugging mode. - */ - public function enableDebug() - { - $this->debug = true; - $this->updateOptionsHash(); - } - - /** - * Disables debugging mode. - */ - public function disableDebug() - { - $this->debug = false; - $this->updateOptionsHash(); - } - - /** - * Checks if debug mode is enabled. - * - * @return bool true if debug mode is enabled, false otherwise - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Enables the auto_reload option. - */ - public function enableAutoReload() - { - $this->autoReload = true; - } - - /** - * Disables the auto_reload option. - */ - public function disableAutoReload() - { - $this->autoReload = false; - } - - /** - * Checks if the auto_reload option is enabled. - * - * @return bool true if auto_reload is enabled, false otherwise - */ - public function isAutoReload() - { - return $this->autoReload; - } - - /** - * Enables the strict_variables option. - */ - public function enableStrictVariables() - { - $this->strictVariables = true; - $this->updateOptionsHash(); - } - - /** - * Disables the strict_variables option. - */ - public function disableStrictVariables() - { - $this->strictVariables = false; - $this->updateOptionsHash(); - } - - /** - * Checks if the strict_variables option is enabled. - * - * @return bool true if strict_variables is enabled, false otherwise - */ - public function isStrictVariables() - { - return $this->strictVariables; - } - - /** - * Gets the current cache implementation. - * - * @param bool $original Whether to return the original cache option or the real cache instance - * - * @return CacheInterface|string|false A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function getCache($original = true) - { - return $original ? $this->originalCache : $this->cache; - } - - /** - * Sets the current cache implementation. - * - * @param CacheInterface|string|false $cache A Twig\Cache\CacheInterface implementation, - * an absolute path to the compiled templates, - * or false to disable cache - */ - public function setCache($cache) - { - if (\is_string($cache)) { - $this->originalCache = $cache; - $this->cache = new FilesystemCache($cache, $this->autoReload ? FilesystemCache::FORCE_BYTECODE_INVALIDATION : 0); - } elseif (false === $cache) { - $this->originalCache = $cache; - $this->cache = new NullCache(); - } elseif ($cache instanceof CacheInterface) { - $this->originalCache = $this->cache = $cache; - } else { - throw new \LogicException('Cache can only be a string, false, or a \Twig\Cache\CacheInterface implementation.'); - } - } - - /** - * Gets the template class associated with the given string. - * - * The generated template class is based on the following parameters: - * - * * The cache key for the given template; - * * The currently enabled extensions; - * * Whether the Twig C extension is available or not; - * * PHP version; - * * Twig version; - * * Options with what environment was created. - * - * @param string $name The name for which to calculate the template class name - * @param int|null $index The index if it is an embedded template - * - * @internal - */ - public function getTemplateClass(string $name, int $index = null): string - { - $key = $this->getLoader()->getCacheKey($name).$this->optionsHash; - - return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index); - } - - /** - * Renders a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function render($name, array $context = []): string - { - return $this->load($name)->render($context); - } - - /** - * Displays a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - * @throws RuntimeError When an error occurred during rendering - */ - public function display($name, array $context = []): void - { - $this->load($name)->display($context); - } - - /** - * Loads a template. - * - * @param string|TemplateWrapper $name The template name - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - */ - public function load($name): TemplateWrapper - { - if ($name instanceof TemplateWrapper) { - return $name; - } - - return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name)); - } - - /** - * Loads a template internal representation. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The template name - * @param int $index The index if it is an embedded template - * - * @throws LoaderError When the template cannot be found - * @throws RuntimeError When a previously generated cache is corrupted - * @throws SyntaxError When an error occurred during compilation - * - * @internal - */ - public function loadTemplate(string $cls, string $name, int $index = null): Template - { - $mainCls = $cls; - if (null !== $index) { - $cls .= '___'.$index; - } - - if (isset($this->loadedTemplates[$cls])) { - return $this->loadedTemplates[$cls]; - } - - if (!class_exists($cls, false)) { - $key = $this->cache->generateKey($name, $mainCls); - - if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) { - $this->cache->load($key); - } - - $source = null; - if (!class_exists($cls, false)) { - $source = $this->getLoader()->getSourceContext($name); - $content = $this->compileSource($source); - $this->cache->write($key, $content); - $this->cache->load($key); - - if (!class_exists($mainCls, false)) { - /* Last line of defense if either $this->bcWriteCacheFile was used, - * $this->cache is implemented as a no-op or we have a race condition - * where the cache was cleared between the above calls to write to and load from - * the cache. - */ - eval('?>'.$content); - } - - if (!class_exists($cls, false)) { - throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source); - } - } - } - - $this->extensionSet->initRuntime(); - - return $this->loadedTemplates[$cls] = new $cls($this); - } - - /** - * Creates a template from source. - * - * This method should not be used as a generic way to load templates. - * - * @param string $template The template source - * @param string $name An optional name of the template to be used in error messages - * - * @throws LoaderError When the template cannot be found - * @throws SyntaxError When an error occurred during compilation - */ - public function createTemplate(string $template, string $name = null): TemplateWrapper - { - $hash = hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $template, false); - if (null !== $name) { - $name = sprintf('%s (string template %s)', $name, $hash); - } else { - $name = sprintf('__string_template__%s', $hash); - } - - $loader = new ChainLoader([ - new ArrayLoader([$name => $template]), - $current = $this->getLoader(), - ]); - - $this->setLoader($loader); - try { - return new TemplateWrapper($this, $this->loadTemplate($this->getTemplateClass($name), $name)); - } finally { - $this->setLoader($current); - } - } - - /** - * Returns true if the template is still fresh. - * - * Besides checking the loader for freshness information, - * this method also checks if the enabled extensions have - * not changed. - * - * @param int $time The last modification time of the cached template - */ - public function isTemplateFresh(string $name, int $time): bool - { - return $this->extensionSet->getLastModified() <= $time && $this->getLoader()->isFresh($name, $time); - } - - /** - * Tries to load a template consecutively from an array. - * - * Similar to load() but it also accepts instances of \Twig\Template and - * \Twig\TemplateWrapper, and an array of templates where each is tried to be loaded. - * - * @param string|TemplateWrapper|array $names A template or an array of templates to try consecutively - * - * @throws LoaderError When none of the templates can be found - * @throws SyntaxError When an error occurred during compilation - */ - public function resolveTemplate($names): TemplateWrapper - { - if (!\is_array($names)) { - return $this->load($names); - } - - $count = \count($names); - foreach ($names as $name) { - if ($name instanceof Template) { - return $name; - } - if ($name instanceof TemplateWrapper) { - return $name; - } - - if (1 !== $count && !$this->getLoader()->exists($name)) { - continue; - } - - return $this->load($name); - } - - throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names))); - } - - public function setLexer(Lexer $lexer) - { - $this->lexer = $lexer; - } - - /** - * @throws SyntaxError When the code is syntactically wrong - */ - public function tokenize(Source $source): TokenStream - { - if (null === $this->lexer) { - $this->lexer = new Lexer($this); - } - - return $this->lexer->tokenize($source); - } - - public function setParser(Parser $parser) - { - $this->parser = $parser; - } - - /** - * Converts a token stream to a node tree. - * - * @throws SyntaxError When the token stream is syntactically or semantically wrong - */ - public function parse(TokenStream $stream): ModuleNode - { - if (null === $this->parser) { - $this->parser = new Parser($this); - } - - return $this->parser->parse($stream); - } - - public function setCompiler(Compiler $compiler) - { - $this->compiler = $compiler; - } - - /** - * Compiles a node and returns the PHP code. - */ - public function compile(Node $node): string - { - if (null === $this->compiler) { - $this->compiler = new Compiler($this); - } - - return $this->compiler->compile($node)->getSource(); - } - - /** - * Compiles a template source code. - * - * @throws SyntaxError When there was an error during tokenizing, parsing or compiling - */ - public function compileSource(Source $source): string - { - try { - return $this->compile($this->parse($this->tokenize($source))); - } catch (Error $e) { - $e->setSourceContext($source); - throw $e; - } catch (\Exception $e) { - throw new SyntaxError(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e); - } - } - - public function setLoader(LoaderInterface $loader) - { - $this->loader = $loader; - } - - public function getLoader(): LoaderInterface - { - return $this->loader; - } - - public function setCharset(string $charset) - { - if ('UTF8' === $charset = null === $charset ? null : strtoupper($charset)) { - // iconv on Windows requires "UTF-8" instead of "UTF8" - $charset = 'UTF-8'; - } - - $this->charset = $charset; - } - - public function getCharset(): string - { - return $this->charset; - } - - public function hasExtension(string $class): bool - { - return $this->extensionSet->hasExtension($class); - } - - public function addRuntimeLoader(RuntimeLoaderInterface $loader) - { - $this->runtimeLoaders[] = $loader; - } - - /** - * @template TExtension of ExtensionInterface - * - * @param class-string $class - * - * @return TExtension - */ - public function getExtension(string $class): ExtensionInterface - { - return $this->extensionSet->getExtension($class); - } - - /** - * Returns the runtime implementation of a Twig element (filter/function/tag/test). - * - * @template TRuntime of object - * - * @param class-string $class A runtime class name - * - * @return TRuntime The runtime implementation - * - * @throws RuntimeError When the template cannot be found - */ - public function getRuntime(string $class) - { - if (isset($this->runtimes[$class])) { - return $this->runtimes[$class]; - } - - foreach ($this->runtimeLoaders as $loader) { - if (null !== $runtime = $loader->load($class)) { - return $this->runtimes[$class] = $runtime; - } - } - - throw new RuntimeError(sprintf('Unable to load the "%s" runtime.', $class)); - } - - public function addExtension(ExtensionInterface $extension) - { - $this->extensionSet->addExtension($extension); - $this->updateOptionsHash(); - } - - /** - * @param ExtensionInterface[] $extensions An array of extensions - */ - public function setExtensions(array $extensions) - { - $this->extensionSet->setExtensions($extensions); - $this->updateOptionsHash(); - } - - /** - * @return ExtensionInterface[] An array of extensions (keys are for internal usage only and should not be relied on) - */ - public function getExtensions(): array - { - return $this->extensionSet->getExtensions(); - } - - public function addTokenParser(TokenParserInterface $parser) - { - $this->extensionSet->addTokenParser($parser); - } - - /** - * @return TokenParserInterface[] - * - * @internal - */ - public function getTokenParsers(): array - { - return $this->extensionSet->getTokenParsers(); - } - - /** - * @internal - */ - public function getTokenParser(string $name): ?TokenParserInterface - { - return $this->extensionSet->getTokenParser($name); - } - - public function registerUndefinedTokenParserCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedTokenParserCallback($callable); - } - - public function addNodeVisitor(NodeVisitorInterface $visitor) - { - $this->extensionSet->addNodeVisitor($visitor); - } - - /** - * @return NodeVisitorInterface[] - * - * @internal - */ - public function getNodeVisitors(): array - { - return $this->extensionSet->getNodeVisitors(); - } - - public function addFilter(TwigFilter $filter) - { - $this->extensionSet->addFilter($filter); - } - - /** - * @internal - */ - public function getFilter(string $name): ?TwigFilter - { - return $this->extensionSet->getFilter($name); - } - - public function registerUndefinedFilterCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedFilterCallback($callable); - } - - /** - * Gets the registered Filters. - * - * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback. - * - * @return TwigFilter[] - * - * @see registerUndefinedFilterCallback - * - * @internal - */ - public function getFilters(): array - { - return $this->extensionSet->getFilters(); - } - - public function addTest(TwigTest $test) - { - $this->extensionSet->addTest($test); - } - - /** - * @return TwigTest[] - * - * @internal - */ - public function getTests(): array - { - return $this->extensionSet->getTests(); - } - - /** - * @internal - */ - public function getTest(string $name): ?TwigTest - { - return $this->extensionSet->getTest($name); - } - - public function addFunction(TwigFunction $function) - { - $this->extensionSet->addFunction($function); - } - - /** - * @internal - */ - public function getFunction(string $name): ?TwigFunction - { - return $this->extensionSet->getFunction($name); - } - - public function registerUndefinedFunctionCallback(callable $callable): void - { - $this->extensionSet->registerUndefinedFunctionCallback($callable); - } - - /** - * Gets registered functions. - * - * Be warned that this method cannot return functions defined with registerUndefinedFunctionCallback. - * - * @return TwigFunction[] - * - * @see registerUndefinedFunctionCallback - * - * @internal - */ - public function getFunctions(): array - { - return $this->extensionSet->getFunctions(); - } - - /** - * Registers a Global. - * - * New globals can be added before compiling or rendering a template; - * but after, you can only update existing globals. - * - * @param mixed $value The global value - */ - public function addGlobal(string $name, $value) - { - if ($this->extensionSet->isInitialized() && !\array_key_exists($name, $this->getGlobals())) { - throw new \LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); - } - - if (null !== $this->resolvedGlobals) { - $this->resolvedGlobals[$name] = $value; - } else { - $this->globals[$name] = $value; - } - } - - /** - * @internal - */ - public function getGlobals(): array - { - if ($this->extensionSet->isInitialized()) { - if (null === $this->resolvedGlobals) { - $this->resolvedGlobals = array_merge($this->extensionSet->getGlobals(), $this->globals); - } - - return $this->resolvedGlobals; - } - - return array_merge($this->extensionSet->getGlobals(), $this->globals); - } - - public function mergeGlobals(array $context): array - { - // we don't use array_merge as the context being generally - // bigger than globals, this code is faster. - foreach ($this->getGlobals() as $key => $value) { - if (!\array_key_exists($key, $context)) { - $context[$key] = $value; - } - } - - return $context; - } - - /** - * @internal - */ - public function getUnaryOperators(): array - { - return $this->extensionSet->getUnaryOperators(); - } - - /** - * @internal - */ - public function getBinaryOperators(): array - { - return $this->extensionSet->getBinaryOperators(); - } - - private function updateOptionsHash(): void - { - $this->optionsHash = implode(':', [ - $this->extensionSet->getSignature(), - \PHP_MAJOR_VERSION, - \PHP_MINOR_VERSION, - self::VERSION, - (int) $this->debug, - (int) $this->strictVariables, - ]); - } -} diff --git a/vendor/twig/twig/src/Error/Error.php b/vendor/twig/twig/src/Error/Error.php deleted file mode 100644 index a68be65..0000000 --- a/vendor/twig/twig/src/Error/Error.php +++ /dev/null @@ -1,227 +0,0 @@ - - */ -class Error extends \Exception -{ - private $lineno; - private $name; - private $rawMessage; - private $sourcePath; - private $sourceCode; - - /** - * Constructor. - * - * By default, automatic guessing is enabled. - * - * @param string $message The error message - * @param int $lineno The template line where the error occurred - * @param Source|null $source The source context where the error occurred - */ - public function __construct(string $message, int $lineno = -1, Source $source = null, \Exception $previous = null) - { - parent::__construct('', 0, $previous); - - if (null === $source) { - $name = null; - } else { - $name = $source->getName(); - $this->sourceCode = $source->getCode(); - $this->sourcePath = $source->getPath(); - } - - $this->lineno = $lineno; - $this->name = $name; - $this->rawMessage = $message; - $this->updateRepr(); - } - - public function getRawMessage(): string - { - return $this->rawMessage; - } - - public function getTemplateLine(): int - { - return $this->lineno; - } - - public function setTemplateLine(int $lineno): void - { - $this->lineno = $lineno; - - $this->updateRepr(); - } - - public function getSourceContext(): ?Source - { - return $this->name ? new Source($this->sourceCode, $this->name, $this->sourcePath) : null; - } - - public function setSourceContext(Source $source = null): void - { - if (null === $source) { - $this->sourceCode = $this->name = $this->sourcePath = null; - } else { - $this->sourceCode = $source->getCode(); - $this->name = $source->getName(); - $this->sourcePath = $source->getPath(); - } - - $this->updateRepr(); - } - - public function guess(): void - { - $this->guessTemplateInfo(); - $this->updateRepr(); - } - - public function appendMessage($rawMessage): void - { - $this->rawMessage .= $rawMessage; - $this->updateRepr(); - } - - private function updateRepr(): void - { - $this->message = $this->rawMessage; - - if ($this->sourcePath && $this->lineno > 0) { - $this->file = $this->sourcePath; - $this->line = $this->lineno; - - return; - } - - $dot = false; - if ('.' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $dot = true; - } - - $questionMark = false; - if ('?' === substr($this->message, -1)) { - $this->message = substr($this->message, 0, -1); - $questionMark = true; - } - - if ($this->name) { - if (\is_string($this->name) || (\is_object($this->name) && method_exists($this->name, '__toString'))) { - $name = sprintf('"%s"', $this->name); - } else { - $name = json_encode($this->name); - } - $this->message .= sprintf(' in %s', $name); - } - - if ($this->lineno && $this->lineno >= 0) { - $this->message .= sprintf(' at line %d', $this->lineno); - } - - if ($dot) { - $this->message .= '.'; - } - - if ($questionMark) { - $this->message .= '?'; - } - } - - private function guessTemplateInfo(): void - { - $template = null; - $templateClass = null; - - $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT); - foreach ($backtrace as $trace) { - if (isset($trace['object']) && $trace['object'] instanceof Template) { - $currentClass = \get_class($trace['object']); - $isEmbedContainer = null === $templateClass ? false : 0 === strpos($templateClass, $currentClass); - if (null === $this->name || ($this->name == $trace['object']->getTemplateName() && !$isEmbedContainer)) { - $template = $trace['object']; - $templateClass = \get_class($trace['object']); - } - } - } - - // update template name - if (null !== $template && null === $this->name) { - $this->name = $template->getTemplateName(); - } - - // update template path if any - if (null !== $template && null === $this->sourcePath) { - $src = $template->getSourceContext(); - $this->sourceCode = $src->getCode(); - $this->sourcePath = $src->getPath(); - } - - if (null === $template || $this->lineno > -1) { - return; - } - - $r = new \ReflectionObject($template); - $file = $r->getFileName(); - - $exceptions = [$e = $this]; - while ($e = $e->getPrevious()) { - $exceptions[] = $e; - } - - while ($e = array_pop($exceptions)) { - $traces = $e->getTrace(); - array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]); - - while ($trace = array_shift($traces)) { - if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { - continue; - } - - foreach ($template->getDebugInfo() as $codeLine => $templateLine) { - if ($codeLine <= $trace['line']) { - // update template line - $this->lineno = $templateLine; - - return; - } - } - } - } - } -} diff --git a/vendor/twig/twig/src/Error/LoaderError.php b/vendor/twig/twig/src/Error/LoaderError.php deleted file mode 100644 index 7c8c23c..0000000 --- a/vendor/twig/twig/src/Error/LoaderError.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class LoaderError extends Error -{ -} diff --git a/vendor/twig/twig/src/Error/RuntimeError.php b/vendor/twig/twig/src/Error/RuntimeError.php deleted file mode 100644 index f6b8476..0000000 --- a/vendor/twig/twig/src/Error/RuntimeError.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -class RuntimeError extends Error -{ -} diff --git a/vendor/twig/twig/src/Error/SyntaxError.php b/vendor/twig/twig/src/Error/SyntaxError.php deleted file mode 100644 index 726b330..0000000 --- a/vendor/twig/twig/src/Error/SyntaxError.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class SyntaxError extends Error -{ - /** - * Tweaks the error message to include suggestions. - * - * @param string $name The original name of the item that does not exist - * @param array $items An array of possible items - */ - public function addSuggestions(string $name, array $items): void - { - $alternatives = []; - foreach ($items as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { - $alternatives[$item] = $lev; - } - } - - if (!$alternatives) { - return; - } - - asort($alternatives); - - $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives)))); - } -} diff --git a/vendor/twig/twig/src/ExpressionParser.php b/vendor/twig/twig/src/ExpressionParser.php deleted file mode 100644 index 70b6eb0..0000000 --- a/vendor/twig/twig/src/ExpressionParser.php +++ /dev/null @@ -1,825 +0,0 @@ - - * - * @internal - */ -class ExpressionParser -{ - public const OPERATOR_LEFT = 1; - public const OPERATOR_RIGHT = 2; - - private $parser; - private $env; - private $unaryOperators; - private $binaryOperators; - - public function __construct(Parser $parser, Environment $env) - { - $this->parser = $parser; - $this->env = $env; - $this->unaryOperators = $env->getUnaryOperators(); - $this->binaryOperators = $env->getBinaryOperators(); - } - - public function parseExpression($precedence = 0, $allowArrow = false) - { - if ($allowArrow && $arrow = $this->parseArrow()) { - return $arrow; - } - - $expr = $this->getPrimary(); - $token = $this->parser->getCurrentToken(); - while ($this->isBinary($token) && $this->binaryOperators[$token->getValue()]['precedence'] >= $precedence) { - $op = $this->binaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - - if ('is not' === $token->getValue()) { - $expr = $this->parseNotTestExpression($expr); - } elseif ('is' === $token->getValue()) { - $expr = $this->parseTestExpression($expr); - } elseif (isset($op['callable'])) { - $expr = $op['callable']($this->parser, $expr); - } else { - $expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']); - $class = $op['class']; - $expr = new $class($expr, $expr1, $token->getLine()); - } - - $token = $this->parser->getCurrentToken(); - } - - if (0 === $precedence) { - return $this->parseConditionalExpression($expr); - } - - return $expr; - } - - /** - * @return ArrowFunctionExpression|null - */ - private function parseArrow() - { - $stream = $this->parser->getStream(); - - // short array syntax (one argument, no parentheses)? - if ($stream->look(1)->test(/* Token::ARROW_TYPE */ 12)) { - $line = $stream->getCurrent()->getLine(); - $token = $stream->expect(/* Token::NAME_TYPE */ 5); - $names = [new AssignNameExpression($token->getValue(), $token->getLine())]; - $stream->expect(/* Token::ARROW_TYPE */ 12); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - // first, determine if we are parsing an arrow function by finding => (long form) - $i = 0; - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - return null; - } - ++$i; - while (true) { - // variable name - ++$i; - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - ++$i; - } - if (!$stream->look($i)->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - return null; - } - ++$i; - if (!$stream->look($i)->test(/* Token::ARROW_TYPE */ 12)) { - return null; - } - - // yes, let's parse it properly - $token = $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '('); - $line = $token->getLine(); - - $names = []; - while (true) { - $token = $stream->expect(/* Token::NAME_TYPE */ 5); - $names[] = new AssignNameExpression($token->getValue(), $token->getLine()); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')'); - $stream->expect(/* Token::ARROW_TYPE */ 12); - - return new ArrowFunctionExpression($this->parseExpression(0), new Node($names), $line); - } - - private function getPrimary(): AbstractExpression - { - $token = $this->parser->getCurrentToken(); - - if ($this->isUnary($token)) { - $operator = $this->unaryOperators[$token->getValue()]; - $this->parser->getStream()->next(); - $expr = $this->parseExpression($operator['precedence']); - $class = $operator['class']; - - return $this->parsePostfixExpression(new $class($expr, $token->getLine())); - } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $this->parser->getStream()->next(); - $expr = $this->parseExpression(); - $this->parser->getStream()->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'An opened parenthesis is not properly closed'); - - return $this->parsePostfixExpression($expr); - } - - return $this->parsePrimaryExpression(); - } - - private function parseConditionalExpression($expr): AbstractExpression - { - while ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, '?')) { - if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $expr2 = $this->parseExpression(); - if ($this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $expr3 = $this->parseExpression(); - } else { - $expr3 = new ConstantExpression('', $this->parser->getCurrentToken()->getLine()); - } - } else { - $expr2 = $expr; - $expr3 = $this->parseExpression(); - } - - $expr = new ConditionalExpression($expr, $expr2, $expr3, $this->parser->getCurrentToken()->getLine()); - } - - return $expr; - } - - private function isUnary(Token $token): bool - { - return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->unaryOperators[$token->getValue()]); - } - - private function isBinary(Token $token): bool - { - return $token->test(/* Token::OPERATOR_TYPE */ 8) && isset($this->binaryOperators[$token->getValue()]); - } - - public function parsePrimaryExpression() - { - $token = $this->parser->getCurrentToken(); - switch ($token->getType()) { - case /* Token::NAME_TYPE */ 5: - $this->parser->getStream()->next(); - switch ($token->getValue()) { - case 'true': - case 'TRUE': - $node = new ConstantExpression(true, $token->getLine()); - break; - - case 'false': - case 'FALSE': - $node = new ConstantExpression(false, $token->getLine()); - break; - - case 'none': - case 'NONE': - case 'null': - case 'NULL': - $node = new ConstantExpression(null, $token->getLine()); - break; - - default: - if ('(' === $this->parser->getCurrentToken()->getValue()) { - $node = $this->getFunctionNode($token->getValue(), $token->getLine()); - } else { - $node = new NameExpression($token->getValue(), $token->getLine()); - } - } - break; - - case /* Token::NUMBER_TYPE */ 6: - $this->parser->getStream()->next(); - $node = new ConstantExpression($token->getValue(), $token->getLine()); - break; - - case /* Token::STRING_TYPE */ 7: - case /* Token::INTERPOLATION_START_TYPE */ 10: - $node = $this->parseStringExpression(); - break; - - case /* Token::OPERATOR_TYPE */ 8: - if (preg_match(Lexer::REGEX_NAME, $token->getValue(), $matches) && $matches[0] == $token->getValue()) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - $node = new NameExpression($token->getValue(), $token->getLine()); - break; - } - - if (isset($this->unaryOperators[$token->getValue()])) { - $class = $this->unaryOperators[$token->getValue()]['class']; - if (!\in_array($class, [NegUnary::class, PosUnary::class])) { - throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - - $this->parser->getStream()->next(); - $expr = $this->parsePrimaryExpression(); - - $node = new $class($expr, $token->getLine()); - break; - } - - // no break - default: - if ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '[')) { - $node = $this->parseArrayExpression(); - } elseif ($token->test(/* Token::PUNCTUATION_TYPE */ 9, '{')) { - $node = $this->parseHashExpression(); - } elseif ($token->test(/* Token::OPERATOR_TYPE */ 8, '=') && ('==' === $this->parser->getStream()->look(-1)->getValue() || '!=' === $this->parser->getStream()->look(-1)->getValue())) { - throw new SyntaxError(sprintf('Unexpected operator of value "%s". Did you try to use "===" or "!==" for strict comparison? Use "is same as(value)" instead.', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } else { - throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); - } - } - - return $this->parsePostfixExpression($node); - } - - public function parseStringExpression() - { - $stream = $this->parser->getStream(); - - $nodes = []; - // a string cannot be followed by another string in a single expression - $nextCanBeString = true; - while (true) { - if ($nextCanBeString && $token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) { - $nodes[] = new ConstantExpression($token->getValue(), $token->getLine()); - $nextCanBeString = false; - } elseif ($stream->nextIf(/* Token::INTERPOLATION_START_TYPE */ 10)) { - $nodes[] = $this->parseExpression(); - $stream->expect(/* Token::INTERPOLATION_END_TYPE */ 11); - $nextCanBeString = true; - } else { - break; - } - } - - $expr = array_shift($nodes); - foreach ($nodes as $node) { - $expr = new ConcatBinary($expr, $node, $node->getTemplateLine()); - } - - return $expr; - } - - public function parseArrayExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '[', 'An array element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - if (!$first) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'An array element must be followed by a comma'); - - // trailing ,? - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - break; - } - } - $first = false; - - $node->addElement($this->parseExpression()); - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']', 'An opened array is not properly closed'); - - return $node; - } - - public function parseHashExpression() - { - $stream = $this->parser->getStream(); - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '{', 'A hash element was expected'); - - $node = new ArrayExpression([], $stream->getCurrent()->getLine()); - $first = true; - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) { - if (!$first) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'A hash value must be followed by a comma'); - - // trailing ,? - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '}')) { - break; - } - } - $first = false; - - // a hash key can be: - // - // * a number -- 12 - // * a string -- 'a' - // * a name, which is equivalent to a string -- a - // * an expression, which must be enclosed in parentheses -- (1 + 2) - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - - // {a} is a shortcut for {a:a} - if ($stream->test(Token::PUNCTUATION_TYPE, [',', '}'])) { - $value = new NameExpression($key->getAttribute('value'), $key->getTemplateLine()); - $node->addElement($value, $key); - continue; - } - } elseif (($token = $stream->nextIf(/* Token::STRING_TYPE */ 7)) || $token = $stream->nextIf(/* Token::NUMBER_TYPE */ 6)) { - $key = new ConstantExpression($token->getValue(), $token->getLine()); - } elseif ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $key = $this->parseExpression(); - } else { - $current = $stream->getCurrent(); - - throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $stream->getSourceContext()); - } - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ':', 'A hash key must be followed by a colon (:)'); - $value = $this->parseExpression(); - - $node->addElement($value, $key); - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '}', 'An opened hash is not properly closed'); - - return $node; - } - - public function parsePostfixExpression($node) - { - while (true) { - $token = $this->parser->getCurrentToken(); - if (/* Token::PUNCTUATION_TYPE */ 9 == $token->getType()) { - if ('.' == $token->getValue() || '[' == $token->getValue()) { - $node = $this->parseSubscriptExpression($node); - } elseif ('|' == $token->getValue()) { - $node = $this->parseFilterExpression($node); - } else { - break; - } - } else { - break; - } - } - - return $node; - } - - public function getFunctionNode($name, $line) - { - switch ($name) { - case 'parent': - $this->parseArguments(); - if (!\count($this->parser->getBlockStack())) { - throw new SyntaxError('Calling "parent" outside a block is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - if (!$this->parser->getParent() && !$this->parser->hasTraits()) { - throw new SyntaxError('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getStream()->getSourceContext()); - } - - return new ParentExpression($this->parser->peekBlockStack(), $line); - case 'block': - $args = $this->parseArguments(); - if (\count($args) < 1) { - throw new SyntaxError('The "block" function takes one argument (the block name).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new BlockReferenceExpression($args->getNode(0), \count($args) > 1 ? $args->getNode(1) : null, $line); - case 'attribute': - $args = $this->parseArguments(); - if (\count($args) < 2) { - throw new SyntaxError('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getStream()->getSourceContext()); - } - - return new GetAttrExpression($args->getNode(0), $args->getNode(1), \count($args) > 2 ? $args->getNode(2) : null, Template::ANY_CALL, $line); - default: - if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { - $arguments = new ArrayExpression([], $line); - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - - $node = new MethodCallExpression($alias['node'], $alias['name'], $arguments, $line); - $node->setAttribute('safe', true); - - return $node; - } - - $args = $this->parseArguments(true); - $class = $this->getFunctionNodeClass($name, $line); - - return new $class($name, $args, $line); - } - } - - public function parseSubscriptExpression($node) - { - $stream = $this->parser->getStream(); - $token = $stream->next(); - $lineno = $token->getLine(); - $arguments = new ArrayExpression([], $lineno); - $type = Template::ANY_CALL; - if ('.' == $token->getValue()) { - $token = $stream->next(); - if ( - /* Token::NAME_TYPE */ 5 == $token->getType() - || - /* Token::NUMBER_TYPE */ 6 == $token->getType() - || - (/* Token::OPERATOR_TYPE */ 8 == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue())) - ) { - $arg = new ConstantExpression($token->getValue(), $lineno); - - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $type = Template::METHOD_CALL; - foreach ($this->parseArguments() as $n) { - $arguments->addElement($n); - } - } - } else { - throw new SyntaxError(sprintf('Expected name or number, got value "%s" of type %s.', $token->getValue(), Token::typeToEnglish($token->getType())), $lineno, $stream->getSourceContext()); - } - - if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) { - if (!$arg instanceof ConstantExpression) { - throw new SyntaxError(sprintf('Dynamic macro names are not supported (called on "%s").', $node->getAttribute('name')), $token->getLine(), $stream->getSourceContext()); - } - - $name = $arg->getAttribute('value'); - - $node = new MethodCallExpression($node, 'macro_'.$name, $arguments, $lineno); - $node->setAttribute('safe', true); - - return $node; - } - } else { - $type = Template::ARRAY_CALL; - - // slice? - $slice = false; - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $slice = true; - $arg = new ConstantExpression(0, $token->getLine()); - } else { - $arg = $this->parseExpression(); - } - - if ($stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ':')) { - $slice = true; - } - - if ($slice) { - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ']')) { - $length = new ConstantExpression(null, $token->getLine()); - } else { - $length = $this->parseExpression(); - } - - $class = $this->getFilterNodeClass('slice', $token->getLine()); - $arguments = new Node([$arg, $length]); - $filter = new $class($node, new ConstantExpression('slice', $token->getLine()), $arguments, $token->getLine()); - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']'); - - return $filter; - } - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ']'); - } - - return new GetAttrExpression($node, $arg, $arguments, $type, $lineno); - } - - public function parseFilterExpression($node) - { - $this->parser->getStream()->next(); - - return $this->parseFilterExpressionRaw($node); - } - - public function parseFilterExpressionRaw($node, $tag = null) - { - while (true) { - $token = $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5); - - $name = new ConstantExpression($token->getValue(), $token->getLine()); - if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $arguments = new Node(); - } else { - $arguments = $this->parseArguments(true, false, true); - } - - $class = $this->getFilterNodeClass($name->getAttribute('value'), $token->getLine()); - - $node = new $class($node, $name, $arguments, $token->getLine(), $tag); - - if (!$this->parser->getStream()->test(/* Token::PUNCTUATION_TYPE */ 9, '|')) { - break; - } - - $this->parser->getStream()->next(); - } - - return $node; - } - - /** - * Parses arguments. - * - * @param bool $namedArguments Whether to allow named arguments or not - * @param bool $definition Whether we are parsing arguments for a function definition - * - * @return Node - * - * @throws SyntaxError - */ - public function parseArguments($namedArguments = false, $definition = false, $allowArrow = false) - { - $args = []; - $stream = $this->parser->getStream(); - - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, '(', 'A list of arguments must begin with an opening parenthesis'); - while (!$stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - if (!empty($args)) { - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ',', 'Arguments must be separated by a comma'); - - // if the comma above was a trailing comma, early exit the argument parse loop - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, ')')) { - break; - } - } - - if ($definition) { - $token = $stream->expect(/* Token::NAME_TYPE */ 5, null, 'An argument must be a name'); - $value = new NameExpression($token->getValue(), $this->parser->getCurrentToken()->getLine()); - } else { - $value = $this->parseExpression(0, $allowArrow); - } - - $name = null; - if ($namedArguments && $token = $stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) { - if (!$value instanceof NameExpression) { - throw new SyntaxError(sprintf('A parameter name must be a string, "%s" given.', \get_class($value)), $token->getLine(), $stream->getSourceContext()); - } - $name = $value->getAttribute('name'); - - if ($definition) { - $value = $this->parsePrimaryExpression(); - - if (!$this->checkConstantExpression($value)) { - throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, or an array).', $token->getLine(), $stream->getSourceContext()); - } - } else { - $value = $this->parseExpression(0, $allowArrow); - } - } - - if ($definition) { - if (null === $name) { - $name = $value->getAttribute('name'); - $value = new ConstantExpression(null, $this->parser->getCurrentToken()->getLine()); - } - $args[$name] = $value; - } else { - if (null === $name) { - $args[] = $value; - } else { - $args[$name] = $value; - } - } - } - $stream->expect(/* Token::PUNCTUATION_TYPE */ 9, ')', 'A list of arguments must be closed by a parenthesis'); - - return new Node($args); - } - - public function parseAssignmentExpression() - { - $stream = $this->parser->getStream(); - $targets = []; - while (true) { - $token = $this->parser->getCurrentToken(); - if ($stream->test(/* Token::OPERATOR_TYPE */ 8) && preg_match(Lexer::REGEX_NAME, $token->getValue())) { - // in this context, string operators are variable names - $this->parser->getStream()->next(); - } else { - $stream->expect(/* Token::NAME_TYPE */ 5, null, 'Only variables can be assigned to'); - } - $value = $token->getValue(); - if (\in_array(strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), ['true', 'false', 'none', 'null'])) { - throw new SyntaxError(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); - } - $targets[] = new AssignNameExpression($value, $token->getLine()); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - - return new Node($targets); - } - - public function parseMultitargetExpression() - { - $targets = []; - while (true) { - $targets[] = $this->parseExpression(); - if (!$this->parser->getStream()->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } - - return new Node($targets); - } - - private function parseNotTestExpression(Node $node): NotUnary - { - return new NotUnary($this->parseTestExpression($node), $this->parser->getCurrentToken()->getLine()); - } - - private function parseTestExpression(Node $node): TestExpression - { - $stream = $this->parser->getStream(); - list($name, $test) = $this->getTest($node->getTemplateLine()); - - $class = $this->getTestNodeClass($test); - $arguments = null; - if ($stream->test(/* Token::PUNCTUATION_TYPE */ 9, '(')) { - $arguments = $this->parseArguments(true); - } elseif ($test->hasOneMandatoryArgument()) { - $arguments = new Node([0 => $this->parsePrimaryExpression()]); - } - - if ('defined' === $name && $node instanceof NameExpression && null !== $alias = $this->parser->getImportedSymbol('function', $node->getAttribute('name'))) { - $node = new MethodCallExpression($alias['node'], $alias['name'], new ArrayExpression([], $node->getTemplateLine()), $node->getTemplateLine()); - $node->setAttribute('safe', true); - } - - return new $class($node, $name, $arguments, $this->parser->getCurrentToken()->getLine()); - } - - private function getTest(int $line): array - { - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - if ($test = $this->env->getTest($name)) { - return [$name, $test]; - } - - if ($stream->test(/* Token::NAME_TYPE */ 5)) { - // try 2-words tests - $name = $name.' '.$this->parser->getCurrentToken()->getValue(); - - if ($test = $this->env->getTest($name)) { - $stream->next(); - - return [$name, $test]; - } - } - - $e = new SyntaxError(sprintf('Unknown "%s" test.', $name), $line, $stream->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getTests())); - - throw $e; - } - - private function getTestNodeClass(TwigTest $test): string - { - if ($test->isDeprecated()) { - $stream = $this->parser->getStream(); - $message = sprintf('Twig Test "%s" is deprecated', $test->getName()); - - if ($test->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $test->getDeprecatedVersion()); - } - if ($test->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $test->getAlternative()); - } - $src = $stream->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $stream->getCurrent()->getLine()); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $test->getNodeClass(); - } - - private function getFunctionNodeClass(string $name, int $line): string - { - if (!$function = $this->env->getFunction($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFunctions())); - - throw $e; - } - - if ($function->isDeprecated()) { - $message = sprintf('Twig Function "%s" is deprecated', $function->getName()); - if ($function->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $function->getDeprecatedVersion()); - } - if ($function->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $function->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $function->getNodeClass(); - } - - private function getFilterNodeClass(string $name, int $line): string - { - if (!$filter = $this->env->getFilter($name)) { - $e = new SyntaxError(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getStream()->getSourceContext()); - $e->addSuggestions($name, array_keys($this->env->getFilters())); - - throw $e; - } - - if ($filter->isDeprecated()) { - $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName()); - if ($filter->getDeprecatedVersion()) { - $message .= sprintf(' since version %s', $filter->getDeprecatedVersion()); - } - if ($filter->getAlternative()) { - $message .= sprintf('. Use "%s" instead', $filter->getAlternative()); - } - $src = $this->parser->getStream()->getSourceContext(); - $message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line); - - @trigger_error($message, \E_USER_DEPRECATED); - } - - return $filter->getNodeClass(); - } - - // checks that the node only contains "constant" elements - private function checkConstantExpression(Node $node): bool - { - if (!($node instanceof ConstantExpression || $node instanceof ArrayExpression - || $node instanceof NegUnary || $node instanceof PosUnary - )) { - return false; - } - - foreach ($node as $n) { - if (!$this->checkConstantExpression($n)) { - return false; - } - } - - return true; - } -} diff --git a/vendor/twig/twig/src/Extension/AbstractExtension.php b/vendor/twig/twig/src/Extension/AbstractExtension.php deleted file mode 100644 index 422925f..0000000 --- a/vendor/twig/twig/src/Extension/AbstractExtension.php +++ /dev/null @@ -1,45 +0,0 @@ -dateFormats[0] = $format; - } - - if (null !== $dateIntervalFormat) { - $this->dateFormats[1] = $dateIntervalFormat; - } - } - - /** - * Gets the default format to be used by the date filter. - * - * @return array The default date format string and the default date interval format string - */ - public function getDateFormat() - { - return $this->dateFormats; - } - - /** - * Sets the default timezone to be used by the date filter. - * - * @param \DateTimeZone|string $timezone The default timezone string or a \DateTimeZone object - */ - public function setTimezone($timezone) - { - $this->timezone = $timezone instanceof \DateTimeZone ? $timezone : new \DateTimeZone($timezone); - } - - /** - * Gets the default timezone to be used by the date filter. - * - * @return \DateTimeZone The default timezone currently in use - */ - public function getTimezone() - { - if (null === $this->timezone) { - $this->timezone = new \DateTimeZone(date_default_timezone_get()); - } - - return $this->timezone; - } - - /** - * Sets the default format to be used by the number_format filter. - * - * @param int $decimal the number of decimal places to use - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - */ - public function setNumberFormat($decimal, $decimalPoint, $thousandSep) - { - $this->numberFormat = [$decimal, $decimalPoint, $thousandSep]; - } - - /** - * Get the default format used by the number_format filter. - * - * @return array The arguments for number_format() - */ - public function getNumberFormat() - { - return $this->numberFormat; - } - - public function getTokenParsers(): array - { - return [ - new ApplyTokenParser(), - new ForTokenParser(), - new IfTokenParser(), - new ExtendsTokenParser(), - new IncludeTokenParser(), - new BlockTokenParser(), - new UseTokenParser(), - new MacroTokenParser(), - new ImportTokenParser(), - new FromTokenParser(), - new SetTokenParser(), - new FlushTokenParser(), - new DoTokenParser(), - new EmbedTokenParser(), - new WithTokenParser(), - new DeprecatedTokenParser(), - ]; - } - - public function getFilters(): array - { - return [ - // formatting filters - new TwigFilter('date', 'twig_date_format_filter', ['needs_environment' => true]), - new TwigFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]), - new TwigFilter('format', 'twig_sprintf'), - new TwigFilter('replace', 'twig_replace_filter'), - new TwigFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]), - new TwigFilter('abs', 'abs'), - new TwigFilter('round', 'twig_round'), - - // encoding - new TwigFilter('url_encode', 'twig_urlencode_filter'), - new TwigFilter('json_encode', 'json_encode'), - new TwigFilter('convert_encoding', 'twig_convert_encoding'), - - // string filters - new TwigFilter('title', 'twig_title_string_filter', ['needs_environment' => true]), - new TwigFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]), - new TwigFilter('upper', 'twig_upper_filter', ['needs_environment' => true]), - new TwigFilter('lower', 'twig_lower_filter', ['needs_environment' => true]), - new TwigFilter('striptags', 'twig_striptags'), - new TwigFilter('trim', 'twig_trim_filter'), - new TwigFilter('nl2br', 'twig_nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]), - new TwigFilter('spaceless', 'twig_spaceless', ['is_safe' => ['html']]), - - // array helpers - new TwigFilter('join', 'twig_join_filter'), - new TwigFilter('split', 'twig_split_filter', ['needs_environment' => true]), - new TwigFilter('sort', 'twig_sort_filter', ['needs_environment' => true]), - new TwigFilter('merge', 'twig_array_merge'), - new TwigFilter('batch', 'twig_array_batch'), - new TwigFilter('column', 'twig_array_column'), - new TwigFilter('filter', 'twig_array_filter', ['needs_environment' => true]), - new TwigFilter('map', 'twig_array_map', ['needs_environment' => true]), - new TwigFilter('reduce', 'twig_array_reduce', ['needs_environment' => true]), - - // string/array filters - new TwigFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]), - new TwigFilter('length', 'twig_length_filter', ['needs_environment' => true]), - new TwigFilter('slice', 'twig_slice', ['needs_environment' => true]), - new TwigFilter('first', 'twig_first', ['needs_environment' => true]), - new TwigFilter('last', 'twig_last', ['needs_environment' => true]), - - // iteration and runtime - new TwigFilter('default', '_twig_default_filter', ['node_class' => DefaultFilter::class]), - new TwigFilter('keys', 'twig_get_array_keys_filter'), - ]; - } - - public function getFunctions(): array - { - return [ - new TwigFunction('max', 'max'), - new TwigFunction('min', 'min'), - new TwigFunction('range', 'range'), - new TwigFunction('constant', 'twig_constant'), - new TwigFunction('cycle', 'twig_cycle'), - new TwigFunction('random', 'twig_random', ['needs_environment' => true]), - new TwigFunction('date', 'twig_date_converter', ['needs_environment' => true]), - new TwigFunction('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]), - new TwigFunction('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]), - ]; - } - - public function getTests(): array - { - return [ - new TwigTest('even', null, ['node_class' => EvenTest::class]), - new TwigTest('odd', null, ['node_class' => OddTest::class]), - new TwigTest('defined', null, ['node_class' => DefinedTest::class]), - new TwigTest('same as', null, ['node_class' => SameasTest::class, 'one_mandatory_argument' => true]), - new TwigTest('none', null, ['node_class' => NullTest::class]), - new TwigTest('null', null, ['node_class' => NullTest::class]), - new TwigTest('divisible by', null, ['node_class' => DivisiblebyTest::class, 'one_mandatory_argument' => true]), - new TwigTest('constant', null, ['node_class' => ConstantTest::class]), - new TwigTest('empty', 'twig_test_empty'), - new TwigTest('iterable', 'twig_test_iterable'), - ]; - } - - public function getNodeVisitors(): array - { - return [new MacroAutoImportNodeVisitor()]; - } - - public function getOperators(): array - { - return [ - [ - 'not' => ['precedence' => 50, 'class' => NotUnary::class], - '-' => ['precedence' => 500, 'class' => NegUnary::class], - '+' => ['precedence' => 500, 'class' => PosUnary::class], - ], - [ - 'or' => ['precedence' => 10, 'class' => OrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'and' => ['precedence' => 15, 'class' => AndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-or' => ['precedence' => 16, 'class' => BitwiseOrBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-xor' => ['precedence' => 17, 'class' => BitwiseXorBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'b-and' => ['precedence' => 18, 'class' => BitwiseAndBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '==' => ['precedence' => 20, 'class' => EqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '!=' => ['precedence' => 20, 'class' => NotEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<=>' => ['precedence' => 20, 'class' => SpaceshipBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<' => ['precedence' => 20, 'class' => LessBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>' => ['precedence' => 20, 'class' => GreaterBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '>=' => ['precedence' => 20, 'class' => GreaterEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '<=' => ['precedence' => 20, 'class' => LessEqualBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'not in' => ['precedence' => 20, 'class' => NotInBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'in' => ['precedence' => 20, 'class' => InBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'matches' => ['precedence' => 20, 'class' => MatchesBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'starts with' => ['precedence' => 20, 'class' => StartsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'ends with' => ['precedence' => 20, 'class' => EndsWithBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '..' => ['precedence' => 25, 'class' => RangeBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '+' => ['precedence' => 30, 'class' => AddBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '-' => ['precedence' => 30, 'class' => SubBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '~' => ['precedence' => 40, 'class' => ConcatBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '*' => ['precedence' => 60, 'class' => MulBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '/' => ['precedence' => 60, 'class' => DivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '//' => ['precedence' => 60, 'class' => FloorDivBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '%' => ['precedence' => 60, 'class' => ModBinary::class, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - 'is not' => ['precedence' => 100, 'associativity' => ExpressionParser::OPERATOR_LEFT], - '**' => ['precedence' => 200, 'class' => PowerBinary::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT], - '??' => ['precedence' => 300, 'class' => NullCoalesceExpression::class, 'associativity' => ExpressionParser::OPERATOR_RIGHT], - ], - ]; - } -} -} - -namespace { - use Twig\Environment; - use Twig\Error\LoaderError; - use Twig\Error\RuntimeError; - use Twig\Extension\CoreExtension; - use Twig\Extension\SandboxExtension; - use Twig\Markup; - use Twig\Source; - use Twig\Template; - use Twig\TemplateWrapper; - -/** - * Cycles over a value. - * - * @param \ArrayAccess|array $values - * @param int $position The cycle position - * - * @return string The next value in the cycle - */ -function twig_cycle($values, $position) -{ - if (!\is_array($values) && !$values instanceof \ArrayAccess) { - return $values; - } - - return $values[$position % \count($values)]; -} - -/** - * Returns a random value depending on the supplied parameter type: - * - a random item from a \Traversable or array - * - a random character from a string - * - a random integer between 0 and the integer parameter. - * - * @param \Traversable|array|int|float|string $values The values to pick a random item from - * @param int|null $max Maximum value used when $values is an int - * - * @throws RuntimeError when $values is an empty array (does not apply to an empty string which is returned as is) - * - * @return mixed A random value from the given sequence - */ -function twig_random(Environment $env, $values = null, $max = null) -{ - if (null === $values) { - return null === $max ? mt_rand() : mt_rand(0, (int) $max); - } - - if (\is_int($values) || \is_float($values)) { - if (null === $max) { - if ($values < 0) { - $max = 0; - $min = $values; - } else { - $max = $values; - $min = 0; - } - } else { - $min = $values; - $max = $max; - } - - return mt_rand((int) $min, (int) $max); - } - - if (\is_string($values)) { - if ('' === $values) { - return ''; - } - - $charset = $env->getCharset(); - - if ('UTF-8' !== $charset) { - $values = twig_convert_encoding($values, 'UTF-8', $charset); - } - - // unicode version of str_split() - // split at all positions, but not after the start and not before the end - $values = preg_split('/(? $value) { - $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8'); - } - } - } - - if (!twig_test_iterable($values)) { - return $values; - } - - $values = twig_to_array($values); - - if (0 === \count($values)) { - throw new RuntimeError('The random function cannot pick from an empty array.'); - } - - return $values[array_rand($values, 1)]; -} - -/** - * Converts a date to the given format. - * - * {{ post.published_at|date("m/d/Y") }} - * - * @param \DateTimeInterface|\DateInterval|string $date A date - * @param string|null $format The target format, null to use the default - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return string The formatted date - */ -function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null) -{ - if (null === $format) { - $formats = $env->getExtension(CoreExtension::class)->getDateFormat(); - $format = $date instanceof \DateInterval ? $formats[1] : $formats[0]; - } - - if ($date instanceof \DateInterval) { - return $date->format($format); - } - - return twig_date_converter($env, $date, $timezone)->format($format); -} - -/** - * Returns a new date object modified. - * - * {{ post.published_at|date_modify("-1day")|date("m/d/Y") }} - * - * @param \DateTimeInterface|string $date A date - * @param string $modifier A modifier string - * - * @return \DateTimeInterface - */ -function twig_date_modify_filter(Environment $env, $date, $modifier) -{ - $date = twig_date_converter($env, $date, false); - - return $date->modify($modifier); -} - -/** - * Returns a formatted string. - * - * @param string|null $format - * @param ...$values - * - * @return string - */ -function twig_sprintf($format, ...$values) -{ - return sprintf($format ?? '', ...$values); -} - -/** - * Converts an input to a \DateTime instance. - * - * {% if date(user.created_at) < date('+2days') %} - * {# do something #} - * {% endif %} - * - * @param \DateTimeInterface|string|null $date A date or null to use the current time - * @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged - * - * @return \DateTimeInterface - */ -function twig_date_converter(Environment $env, $date = null, $timezone = null) -{ - // determine the timezone - if (false !== $timezone) { - if (null === $timezone) { - $timezone = $env->getExtension(CoreExtension::class)->getTimezone(); - } elseif (!$timezone instanceof \DateTimeZone) { - $timezone = new \DateTimeZone($timezone); - } - } - - // immutable dates - if ($date instanceof \DateTimeImmutable) { - return false !== $timezone ? $date->setTimezone($timezone) : $date; - } - - if ($date instanceof \DateTimeInterface) { - $date = clone $date; - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; - } - - if (null === $date || 'now' === $date) { - if (null === $date) { - $date = 'now'; - } - - return new \DateTime($date, false !== $timezone ? $timezone : $env->getExtension(CoreExtension::class)->getTimezone()); - } - - $asString = (string) $date; - if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) { - $date = new \DateTime('@'.$date); - } else { - $date = new \DateTime($date, $env->getExtension(CoreExtension::class)->getTimezone()); - } - - if (false !== $timezone) { - $date->setTimezone($timezone); - } - - return $date; -} - -/** - * Replaces strings within a string. - * - * @param string|null $str String to replace in - * @param array|\Traversable $from Replace values - * - * @return string - */ -function twig_replace_filter($str, $from) -{ - if (!twig_test_iterable($from)) { - throw new RuntimeError(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".', \is_object($from) ? \get_class($from) : \gettype($from))); - } - - return strtr($str ?? '', twig_to_array($from)); -} - -/** - * Rounds a number. - * - * @param int|float|string|null $value The value to round - * @param int|float $precision The rounding precision - * @param string $method The method to use for rounding - * - * @return int|float The rounded number - */ -function twig_round($value, $precision = 0, $method = 'common') -{ - $value = (float) $value; - - if ('common' === $method) { - return round($value, $precision); - } - - if ('ceil' !== $method && 'floor' !== $method) { - throw new RuntimeError('The round filter only supports the "common", "ceil", and "floor" methods.'); - } - - return $method($value * 10 ** $precision) / 10 ** $precision; -} - -/** - * Number format filter. - * - * All of the formatting options can be left null, in that case the defaults will - * be used. Supplying any of the parameters will override the defaults set in the - * environment object. - * - * @param mixed $number A float/int/string of the number to format - * @param int $decimal the number of decimal points to display - * @param string $decimalPoint the character(s) to use for the decimal point - * @param string $thousandSep the character(s) to use for the thousands separator - * - * @return string The formatted number - */ -function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null) -{ - $defaults = $env->getExtension(CoreExtension::class)->getNumberFormat(); - if (null === $decimal) { - $decimal = $defaults[0]; - } - - if (null === $decimalPoint) { - $decimalPoint = $defaults[1]; - } - - if (null === $thousandSep) { - $thousandSep = $defaults[2]; - } - - return number_format((float) $number, $decimal, $decimalPoint, $thousandSep); -} - -/** - * URL encodes (RFC 3986) a string as a path segment or an array as a query string. - * - * @param string|array|null $url A URL or an array of query parameters - * - * @return string The URL encoded value - */ -function twig_urlencode_filter($url) -{ - if (\is_array($url)) { - return http_build_query($url, '', '&', \PHP_QUERY_RFC3986); - } - - return rawurlencode($url ?? ''); -} - -/** - * Merges an array with another one. - * - * {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %} - * - * {% set items = items|merge({ 'peugeot': 'car' }) %} - * - * {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #} - * - * @param array|\Traversable $arr1 An array - * @param array|\Traversable $arr2 An array - * - * @return array The merged array - */ -function twig_array_merge($arr1, $arr2) -{ - if (!twig_test_iterable($arr1)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($arr1))); - } - - if (!twig_test_iterable($arr2)) { - throw new RuntimeError(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as second argument.', \gettype($arr2))); - } - - return array_merge(twig_to_array($arr1), twig_to_array($arr2)); -} - -/** - * Slices a variable. - * - * @param mixed $item A variable - * @param int $start Start of the slice - * @param int $length Size of the slice - * @param bool $preserveKeys Whether to preserve key or not (when the input is an array) - * - * @return mixed The sliced variable - */ -function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - while ($item instanceof \IteratorAggregate) { - $item = $item->getIterator(); - } - - if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) { - try { - return iterator_to_array(new \LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys); - } catch (\OutOfBoundsException $e) { - return []; - } - } - - $item = iterator_to_array($item, $preserveKeys); - } - - if (\is_array($item)) { - return \array_slice($item, $start, $length, $preserveKeys); - } - - return (string) mb_substr((string) $item, $start, $length, $env->getCharset()); -} - -/** - * Returns the first element of the item. - * - * @param mixed $item A variable - * - * @return mixed The first element of the item - */ -function twig_first(Environment $env, $item) -{ - $elements = twig_slice($env, $item, 0, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Returns the last element of the item. - * - * @param mixed $item A variable - * - * @return mixed The last element of the item - */ -function twig_last(Environment $env, $item) -{ - $elements = twig_slice($env, $item, -1, 1, false); - - return \is_string($elements) ? $elements : current($elements); -} - -/** - * Joins the values to a string. - * - * The separators between elements are empty strings per default, you can define them with the optional parameters. - * - * {{ [1, 2, 3]|join(', ', ' and ') }} - * {# returns 1, 2 and 3 #} - * - * {{ [1, 2, 3]|join('|') }} - * {# returns 1|2|3 #} - * - * {{ [1, 2, 3]|join }} - * {# returns 123 #} - * - * @param array $value An array - * @param string $glue The separator - * @param string|null $and The separator for the last pair - * - * @return string The concatenated string - */ -function twig_join_filter($value, $glue = '', $and = null) -{ - if (!twig_test_iterable($value)) { - $value = (array) $value; - } - - $value = twig_to_array($value, false); - - if (0 === \count($value)) { - return ''; - } - - if (null === $and || $and === $glue) { - return implode($glue, $value); - } - - if (1 === \count($value)) { - return $value[0]; - } - - return implode($glue, \array_slice($value, 0, -1)).$and.$value[\count($value) - 1]; -} - -/** - * Splits the string into an array. - * - * {{ "one,two,three"|split(',') }} - * {# returns [one, two, three] #} - * - * {{ "one,two,three,four,five"|split(',', 3) }} - * {# returns [one, two, "three,four,five"] #} - * - * {{ "123"|split('') }} - * {# returns [1, 2, 3] #} - * - * {{ "aabbcc"|split('', 2) }} - * {# returns [aa, bb, cc] #} - * - * @param string|null $value A string - * @param string $delimiter The delimiter - * @param int $limit The limit - * - * @return array The split string as an array - */ -function twig_split_filter(Environment $env, $value, $delimiter, $limit = null) -{ - $value = $value ?? ''; - - if (\strlen($delimiter) > 0) { - return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit); - } - - if ($limit <= 1) { - return preg_split('/(?getCharset()); - if ($length < $limit) { - return [$value]; - } - - $r = []; - for ($i = 0; $i < $length; $i += $limit) { - $r[] = mb_substr($value, $i, $limit, $env->getCharset()); - } - - return $r; -} - -// The '_default' filter is used internally to avoid using the ternary operator -// which costs a lot for big contexts (before PHP 5.4). So, on average, -// a function call is cheaper. -/** - * @internal - */ -function _twig_default_filter($value, $default = '') -{ - if (twig_test_empty($value)) { - return $default; - } - - return $value; -} - -/** - * Returns the keys for the given array. - * - * It is useful when you want to iterate over the keys of an array: - * - * {% for key in array|keys %} - * {# ... #} - * {% endfor %} - * - * @param array $array An array - * - * @return array The keys - */ -function twig_get_array_keys_filter($array) -{ - if ($array instanceof \Traversable) { - while ($array instanceof \IteratorAggregate) { - $array = $array->getIterator(); - } - - $keys = []; - if ($array instanceof \Iterator) { - $array->rewind(); - while ($array->valid()) { - $keys[] = $array->key(); - $array->next(); - } - - return $keys; - } - - foreach ($array as $key => $item) { - $keys[] = $key; - } - - return $keys; - } - - if (!\is_array($array)) { - return []; - } - - return array_keys($array); -} - -/** - * Reverses a variable. - * - * @param array|\Traversable|string|null $item An array, a \Traversable instance, or a string - * @param bool $preserveKeys Whether to preserve key or not - * - * @return mixed The reversed input - */ -function twig_reverse_filter(Environment $env, $item, $preserveKeys = false) -{ - if ($item instanceof \Traversable) { - return array_reverse(iterator_to_array($item), $preserveKeys); - } - - if (\is_array($item)) { - return array_reverse($item, $preserveKeys); - } - - $string = (string) $item; - - $charset = $env->getCharset(); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - preg_match_all('/./us', $string, $matches); - - $string = implode('', array_reverse($matches[0])); - - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, $charset, 'UTF-8'); - } - - return $string; -} - -/** - * Sorts an array. - * - * @param array|\Traversable $array - * - * @return array - */ -function twig_sort_filter(Environment $env, $array, $arrow = null) -{ - if ($array instanceof \Traversable) { - $array = iterator_to_array($array); - } elseif (!\is_array($array)) { - throw new RuntimeError(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', \gettype($array))); - } - - if (null !== $arrow) { - twig_check_arrow_in_sandbox($env, $arrow, 'sort', 'filter'); - - uasort($array, $arrow); - } else { - asort($array); - } - - return $array; -} - -/** - * @internal - */ -function twig_in_filter($value, $compare) -{ - if ($value instanceof Markup) { - $value = (string) $value; - } - if ($compare instanceof Markup) { - $compare = (string) $compare; - } - - if (\is_string($compare)) { - if (\is_string($value) || \is_int($value) || \is_float($value)) { - return '' === $value || false !== strpos($compare, (string) $value); - } - - return false; - } - - if (!is_iterable($compare)) { - return false; - } - - if (\is_object($value) || \is_resource($value)) { - if (!\is_array($compare)) { - foreach ($compare as $item) { - if ($item === $value) { - return true; - } - } - - return false; - } - - return \in_array($value, $compare, true); - } - - foreach ($compare as $item) { - if (0 === twig_compare($value, $item)) { - return true; - } - } - - return false; -} - -/** - * Compares two values using a more strict version of the PHP non-strict comparison operator. - * - * @see https://wiki.php.net/rfc/string_to_number_comparison - * @see https://wiki.php.net/rfc/trailing_whitespace_numerics - * - * @internal - */ -function twig_compare($a, $b) -{ - // int <=> string - if (\is_int($a) && \is_string($b)) { - $bTrim = trim($b, " \t\n\r\v\f"); - if (!is_numeric($bTrim)) { - return (string) $a <=> $b; - } - if ((int) $bTrim == $bTrim) { - return $a <=> (int) $bTrim; - } else { - return (float) $a <=> (float) $bTrim; - } - } - if (\is_string($a) && \is_int($b)) { - $aTrim = trim($a, " \t\n\r\v\f"); - if (!is_numeric($aTrim)) { - return $a <=> (string) $b; - } - if ((int) $aTrim == $aTrim) { - return (int) $aTrim <=> $b; - } else { - return (float) $aTrim <=> (float) $b; - } - } - - // float <=> string - if (\is_float($a) && \is_string($b)) { - if (is_nan($a)) { - return 1; - } - $bTrim = trim($b, " \t\n\r\v\f"); - if (!is_numeric($bTrim)) { - return (string) $a <=> $b; - } - - return $a <=> (float) $bTrim; - } - if (\is_string($a) && \is_float($b)) { - if (is_nan($b)) { - return 1; - } - $aTrim = trim($a, " \t\n\r\v\f"); - if (!is_numeric($aTrim)) { - return $a <=> (string) $b; - } - - return (float) $aTrim <=> $b; - } - - // fallback to <=> - return $a <=> $b; -} - -/** - * Returns a trimmed string. - * - * @param string|null $string - * @param string|null $characterMask - * @param string $side - * - * @return string - * - * @throws RuntimeError When an invalid trimming side is used (not a string or not 'left', 'right', or 'both') - */ -function twig_trim_filter($string, $characterMask = null, $side = 'both') -{ - if (null === $characterMask) { - $characterMask = " \t\n\r\0\x0B"; - } - - switch ($side) { - case 'both': - return trim($string ?? '', $characterMask); - case 'left': - return ltrim($string ?? '', $characterMask); - case 'right': - return rtrim($string ?? '', $characterMask); - default: - throw new RuntimeError('Trimming side must be "left", "right" or "both".'); - } -} - -/** - * Inserts HTML line breaks before all newlines in a string. - * - * @param string|null $string - * - * @return string - */ -function twig_nl2br($string) -{ - return nl2br($string ?? ''); -} - -/** - * Removes whitespaces between HTML tags. - * - * @param string|null $string - * - * @return string - */ -function twig_spaceless($content) -{ - return trim(preg_replace('/>\s+<', $content ?? '')); -} - -/** - * @param string|null $string - * @param string $to - * @param string $from - * - * @return string - */ -function twig_convert_encoding($string, $to, $from) -{ - if (!\function_exists('iconv')) { - throw new RuntimeError('Unable to convert encoding: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - return iconv($from, $to, $string ?? ''); -} - -/** - * Returns the length of a variable. - * - * @param mixed $thing A variable - * - * @return int The length of the value - */ -function twig_length_filter(Environment $env, $thing) -{ - if (null === $thing) { - return 0; - } - - if (is_scalar($thing)) { - return mb_strlen($thing, $env->getCharset()); - } - - if ($thing instanceof \Countable || \is_array($thing) || $thing instanceof \SimpleXMLElement) { - return \count($thing); - } - - if ($thing instanceof \Traversable) { - return iterator_count($thing); - } - - if (method_exists($thing, '__toString') && !$thing instanceof \Countable) { - return mb_strlen((string) $thing, $env->getCharset()); - } - - return 1; -} - -/** - * Converts a string to uppercase. - * - * @param string|null $string A string - * - * @return string The uppercased string - */ -function twig_upper_filter(Environment $env, $string) -{ - return mb_strtoupper($string ?? '', $env->getCharset()); -} - -/** - * Converts a string to lowercase. - * - * @param string|null $string A string - * - * @return string The lowercased string - */ -function twig_lower_filter(Environment $env, $string) -{ - return mb_strtolower($string ?? '', $env->getCharset()); -} - -/** - * Strips HTML and PHP tags from a string. - * - * @param string|null $string - * @param string[]|string|null $string - * - * @return string - */ -function twig_striptags($string, $allowable_tags = null) -{ - return strip_tags($string ?? '', $allowable_tags); -} - -/** - * Returns a titlecased string. - * - * @param string|null $string A string - * - * @return string The titlecased string - */ -function twig_title_string_filter(Environment $env, $string) -{ - if (null !== $charset = $env->getCharset()) { - return mb_convert_case($string ?? '', \MB_CASE_TITLE, $charset); - } - - return ucwords(strtolower($string ?? '')); -} - -/** - * Returns a capitalized string. - * - * @param string|null $string A string - * - * @return string The capitalized string - */ -function twig_capitalize_string_filter(Environment $env, $string) -{ - $charset = $env->getCharset(); - - return mb_strtoupper(mb_substr($string ?? '', 0, 1, $charset), $charset).mb_strtolower(mb_substr($string ?? '', 1, null, $charset), $charset); -} - -/** - * @internal - */ -function twig_call_macro(Template $template, string $method, array $args, int $lineno, array $context, Source $source) -{ - if (!method_exists($template, $method)) { - $parent = $template; - while ($parent = $parent->getParent($context)) { - if (method_exists($parent, $method)) { - return $parent->$method(...$args); - } - } - - throw new RuntimeError(sprintf('Macro "%s" is not defined in template "%s".', substr($method, \strlen('macro_')), $template->getTemplateName()), $lineno, $source); - } - - return $template->$method(...$args); -} - -/** - * @internal - */ -function twig_ensure_traversable($seq) -{ - if ($seq instanceof \Traversable || \is_array($seq)) { - return $seq; - } - - return []; -} - -/** - * @internal - */ -function twig_to_array($seq, $preserveKeys = true) -{ - if ($seq instanceof \Traversable) { - return iterator_to_array($seq, $preserveKeys); - } - - if (!\is_array($seq)) { - return $seq; - } - - return $preserveKeys ? $seq : array_values($seq); -} - -/** - * Checks if a variable is empty. - * - * {# evaluates to true if the foo variable is null, false, or the empty string #} - * {% if foo is empty %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is empty, false otherwise - */ -function twig_test_empty($value) -{ - if ($value instanceof \Countable) { - return 0 === \count($value); - } - - if ($value instanceof \Traversable) { - return !iterator_count($value); - } - - if (\is_object($value) && method_exists($value, '__toString')) { - return '' === (string) $value; - } - - return '' === $value || false === $value || null === $value || [] === $value; -} - -/** - * Checks if a variable is traversable. - * - * {# evaluates to true if the foo variable is an array or a traversable object #} - * {% if foo is iterable %} - * {# ... #} - * {% endif %} - * - * @param mixed $value A variable - * - * @return bool true if the value is traversable - */ -function twig_test_iterable($value) -{ - return $value instanceof \Traversable || \is_array($value); -} - -/** - * Renders a template. - * - * @param array $context - * @param string|array $template The template to render or an array of templates to try consecutively - * @param array $variables The variables to pass to the template - * @param bool $withContext - * @param bool $ignoreMissing Whether to ignore missing templates or not - * @param bool $sandboxed Whether to sandbox the template or not - * - * @return string The rendered template - */ -function twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) -{ - $alreadySandboxed = false; - $sandbox = null; - if ($withContext) { - $variables = array_merge($context, $variables); - } - - if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) { - $sandbox = $env->getExtension(SandboxExtension::class); - if (!$alreadySandboxed = $sandbox->isSandboxed()) { - $sandbox->enableSandbox(); - } - - foreach ((\is_array($template) ? $template : [$template]) as $name) { - // if a Template instance is passed, it might have been instantiated outside of a sandbox, check security - if ($name instanceof TemplateWrapper || $name instanceof Template) { - $name->unwrap()->checkSecurity(); - } - } - } - - try { - $loaded = null; - try { - $loaded = $env->resolveTemplate($template); - } catch (LoaderError $e) { - if (!$ignoreMissing) { - throw $e; - } - } - - return $loaded ? $loaded->render($variables) : ''; - } finally { - if ($isSandboxed && !$alreadySandboxed) { - $sandbox->disableSandbox(); - } - } -} - -/** - * Returns a template content without rendering it. - * - * @param string $name The template name - * @param bool $ignoreMissing Whether to ignore missing templates or not - * - * @return string The template source - */ -function twig_source(Environment $env, $name, $ignoreMissing = false) -{ - $loader = $env->getLoader(); - try { - return $loader->getSourceContext($name)->getCode(); - } catch (LoaderError $e) { - if (!$ignoreMissing) { - throw $e; - } - } -} - -/** - * Provides the ability to get constants from instances as well as class/global constants. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return string - */ -function twig_constant($constant, $object = null) -{ - if (null !== $object) { - if ('class' === $constant) { - return \get_class($object); - } - - $constant = \get_class($object).'::'.$constant; - } - - return \constant($constant); -} - -/** - * Checks if a constant exists. - * - * @param string $constant The name of the constant - * @param object|null $object The object to get the constant from - * - * @return bool - */ -function twig_constant_is_defined($constant, $object = null) -{ - if (null !== $object) { - if ('class' === $constant) { - return true; - } - - $constant = \get_class($object).'::'.$constant; - } - - return \defined($constant); -} - -/** - * Batches item. - * - * @param array $items An array of items - * @param int $size The size of the batch - * @param mixed $fill A value used to fill missing items - * - * @return array - */ -function twig_array_batch($items, $size, $fill = null, $preserveKeys = true) -{ - if (!twig_test_iterable($items)) { - throw new RuntimeError(sprintf('The "batch" filter expects an array or "Traversable", got "%s".', \is_object($items) ? \get_class($items) : \gettype($items))); - } - - $size = ceil($size); - - $result = array_chunk(twig_to_array($items, $preserveKeys), $size, $preserveKeys); - - if (null !== $fill && $result) { - $last = \count($result) - 1; - if ($fillCount = $size - \count($result[$last])) { - for ($i = 0; $i < $fillCount; ++$i) { - $result[$last][] = $fill; - } - } - } - - return $result; -} - -/** - * Returns the attribute value for a given array/object. - * - * @param mixed $object The object or array from where to get the item - * @param mixed $item The item to get from the array or object - * @param array $arguments An array of arguments to pass if the item is an object method - * @param string $type The type of attribute (@see \Twig\Template constants) - * @param bool $isDefinedTest Whether this is only a defined check - * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not - * @param int $lineno The template line where the attribute was called - * - * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true - * - * @throws RuntimeError if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false - * - * @internal - */ -function twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = /* Template::ANY_CALL */ 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1) -{ - // array - if (/* Template::METHOD_CALL */ 'method' !== $type) { - $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item; - - if (((\is_array($object) || $object instanceof \ArrayObject) && (isset($object[$arrayItem]) || \array_key_exists($arrayItem, (array) $object))) - || ($object instanceof ArrayAccess && isset($object[$arrayItem])) - ) { - if ($isDefinedTest) { - return true; - } - - return $object[$arrayItem]; - } - - if (/* Template::ARRAY_CALL */ 'array' === $type || !\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - if ($object instanceof ArrayAccess) { - $message = sprintf('Key "%s" in object with ArrayAccess of class "%s" does not exist.', $arrayItem, \get_class($object)); - } elseif (\is_object($object)) { - $message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object)); - } elseif (\is_array($object)) { - if (empty($object)) { - $message = sprintf('Key "%s" does not exist as the array is empty.', $arrayItem); - } else { - $message = sprintf('Key "%s" for array with keys "%s" does not exist.', $arrayItem, implode(', ', array_keys($object))); - } - } elseif (/* Template::ARRAY_CALL */ 'array' === $type) { - if (null === $object) { - $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - } elseif (null === $object) { - $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item); - } else { - $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, $lineno, $source); - } - } - - if (!\is_object($object)) { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - if (null === $object) { - $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item); - } elseif (\is_array($object)) { - $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item); - } else { - $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object), $object); - } - - throw new RuntimeError($message, $lineno, $source); - } - - if ($object instanceof Template) { - throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.', $lineno, $source); - } - - // object property - if (/* Template::METHOD_CALL */ 'method' !== $type) { - if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) { - if ($isDefinedTest) { - return true; - } - - if ($sandboxed) { - $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source); - } - - return $object->$item; - } - } - - static $cache = []; - - $class = \get_class($object); - - // object method - // precedence: getXxx() > isXxx() > hasXxx() - if (!isset($cache[$class])) { - $methods = get_class_methods($object); - sort($methods); - $lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, $methods); - $classCache = []; - foreach ($methods as $i => $method) { - $classCache[$method] = $method; - $classCache[$lcName = $lcMethods[$i]] = $method; - - if ('g' === $lcName[0] && 0 === strpos($lcName, 'get')) { - $name = substr($method, 3); - $lcName = substr($lcName, 3); - } elseif ('i' === $lcName[0] && 0 === strpos($lcName, 'is')) { - $name = substr($method, 2); - $lcName = substr($lcName, 2); - } elseif ('h' === $lcName[0] && 0 === strpos($lcName, 'has')) { - $name = substr($method, 3); - $lcName = substr($lcName, 3); - if (\in_array('is'.$lcName, $lcMethods)) { - continue; - } - } else { - continue; - } - - // skip get() and is() methods (in which case, $name is empty) - if ($name) { - if (!isset($classCache[$name])) { - $classCache[$name] = $method; - } - - if (!isset($classCache[$lcName])) { - $classCache[$lcName] = $method; - } - } - } - $cache[$class] = $classCache; - } - - $call = false; - if (isset($cache[$class][$item])) { - $method = $cache[$class][$item]; - } elseif (isset($cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')])) { - $method = $cache[$class][$lcItem]; - } elseif (isset($cache[$class]['__call'])) { - $method = $item; - $call = true; - } else { - if ($isDefinedTest) { - return false; - } - - if ($ignoreStrictCheck || !$env->isStrictVariables()) { - return; - } - - throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source); - } - - if ($isDefinedTest) { - return true; - } - - if ($sandboxed) { - $env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source); - } - - // Some objects throw exceptions when they have __call, and the method we try - // to call is not supported. If ignoreStrictCheck is true, we should return null. - try { - $ret = $object->$method(...$arguments); - } catch (\BadMethodCallException $e) { - if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) { - return; - } - throw $e; - } - - return $ret; -} - -/** - * Returns the values from a single column in the input array. - * - *
    - *  {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
    - *
    - *  {% set fruits = items|column('fruit') %}
    - *
    - *  {# fruits now contains ['apple', 'orange'] #}
    - * 
    - * - * @param array|Traversable $array An array - * @param mixed $name The column name - * @param mixed $index The column to use as the index/keys for the returned array - * - * @return array The array of values - */ -function twig_array_column($array, $name, $index = null): array -{ - if ($array instanceof Traversable) { - $array = iterator_to_array($array); - } elseif (!\is_array($array)) { - throw new RuntimeError(sprintf('The column filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array))); - } - - return array_column($array, $name, $index); -} - -function twig_array_filter(Environment $env, $array, $arrow) -{ - if (!twig_test_iterable($array)) { - throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array))); - } - - twig_check_arrow_in_sandbox($env, $arrow, 'filter', 'filter'); - - if (\is_array($array)) { - return array_filter($array, $arrow, \ARRAY_FILTER_USE_BOTH); - } - - // the IteratorIterator wrapping is needed as some internal PHP classes are \Traversable but do not implement \Iterator - return new \CallbackFilterIterator(new \IteratorIterator($array), $arrow); -} - -function twig_array_map(Environment $env, $array, $arrow) -{ - twig_check_arrow_in_sandbox($env, $arrow, 'map', 'filter'); - - $r = []; - foreach ($array as $k => $v) { - $r[$k] = $arrow($v, $k); - } - - return $r; -} - -function twig_array_reduce(Environment $env, $array, $arrow, $initial = null) -{ - twig_check_arrow_in_sandbox($env, $arrow, 'reduce', 'filter'); - - if (!\is_array($array)) { - if (!$array instanceof \Traversable) { - throw new RuntimeError(sprintf('The "reduce" filter only works with arrays or "Traversable", got "%s" as first argument.', \gettype($array))); - } - - $array = iterator_to_array($array); - } - - return array_reduce($array, $arrow, $initial); -} - -function twig_check_arrow_in_sandbox(Environment $env, $arrow, $thing, $type) -{ - if (!$arrow instanceof Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->isSandboxed()) { - throw new RuntimeError(sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type)); - } -} -} diff --git a/vendor/twig/twig/src/Extension/DebugExtension.php b/vendor/twig/twig/src/Extension/DebugExtension.php deleted file mode 100644 index bfb23d7..0000000 --- a/vendor/twig/twig/src/Extension/DebugExtension.php +++ /dev/null @@ -1,64 +0,0 @@ - $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]), - ]; - } -} -} - -namespace { -use Twig\Environment; -use Twig\Template; -use Twig\TemplateWrapper; - -function twig_var_dump(Environment $env, $context, ...$vars) -{ - if (!$env->isDebug()) { - return; - } - - ob_start(); - - if (!$vars) { - $vars = []; - foreach ($context as $key => $value) { - if (!$value instanceof Template && !$value instanceof TemplateWrapper) { - $vars[$key] = $value; - } - } - - var_dump($vars); - } else { - var_dump(...$vars); - } - - return ob_get_clean(); -} -} diff --git a/vendor/twig/twig/src/Extension/EscaperExtension.php b/vendor/twig/twig/src/Extension/EscaperExtension.php deleted file mode 100644 index 9d2251d..0000000 --- a/vendor/twig/twig/src/Extension/EscaperExtension.php +++ /dev/null @@ -1,416 +0,0 @@ -setDefaultStrategy($defaultStrategy); - } - - public function getTokenParsers(): array - { - return [new AutoEscapeTokenParser()]; - } - - public function getNodeVisitors(): array - { - return [new EscaperNodeVisitor()]; - } - - public function getFilters(): array - { - return [ - new TwigFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - new TwigFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), - new TwigFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]), - ]; - } - - /** - * Sets the default strategy to use when not defined by the user. - * - * The strategy can be a valid PHP callback that takes the template - * name as an argument and returns the strategy to use. - * - * @param string|false|callable $defaultStrategy An escaping strategy - */ - public function setDefaultStrategy($defaultStrategy): void - { - if ('name' === $defaultStrategy) { - $defaultStrategy = [FileExtensionEscapingStrategy::class, 'guess']; - } - - $this->defaultStrategy = $defaultStrategy; - } - - /** - * Gets the default strategy to use when not defined by the user. - * - * @param string $name The template name - * - * @return string|false The default strategy to use for the template - */ - public function getDefaultStrategy(string $name) - { - // disable string callables to avoid calling a function named html or js, - // or any other upcoming escaping strategy - if (!\is_string($this->defaultStrategy) && false !== $this->defaultStrategy) { - return \call_user_func($this->defaultStrategy, $name); - } - - return $this->defaultStrategy; - } - - /** - * Defines a new escaper to be used via the escape filter. - * - * @param string $strategy The strategy name that should be used as a strategy in the escape call - * @param callable $callable A valid PHP callable - */ - public function setEscaper($strategy, callable $callable) - { - $this->escapers[$strategy] = $callable; - } - - /** - * Gets all defined escapers. - * - * @return callable[] An array of escapers - */ - public function getEscapers() - { - return $this->escapers; - } - - public function setSafeClasses(array $safeClasses = []) - { - $this->safeClasses = []; - $this->safeLookup = []; - foreach ($safeClasses as $class => $strategies) { - $this->addSafeClass($class, $strategies); - } - } - - public function addSafeClass(string $class, array $strategies) - { - $class = ltrim($class, '\\'); - if (!isset($this->safeClasses[$class])) { - $this->safeClasses[$class] = []; - } - $this->safeClasses[$class] = array_merge($this->safeClasses[$class], $strategies); - - foreach ($strategies as $strategy) { - $this->safeLookup[$strategy][$class] = true; - } - } -} -} - -namespace { -use Twig\Environment; -use Twig\Error\RuntimeError; -use Twig\Extension\EscaperExtension; -use Twig\Markup; -use Twig\Node\Expression\ConstantExpression; -use Twig\Node\Node; - -/** - * Marks a variable as being safe. - * - * @param string $string A PHP variable - */ -function twig_raw_filter($string) -{ - return $string; -} - -/** - * Escapes a string. - * - * @param mixed $string The value to be escaped - * @param string $strategy The escaping strategy - * @param string $charset The charset - * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false) - * - * @return string - */ -function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) -{ - if ($autoescape && $string instanceof Markup) { - return $string; - } - - if (!\is_string($string)) { - if (\is_object($string) && method_exists($string, '__toString')) { - if ($autoescape) { - $c = \get_class($string); - $ext = $env->getExtension(EscaperExtension::class); - if (!isset($ext->safeClasses[$c])) { - $ext->safeClasses[$c] = []; - foreach (class_parents($string) + class_implements($string) as $class) { - if (isset($ext->safeClasses[$class])) { - $ext->safeClasses[$c] = array_unique(array_merge($ext->safeClasses[$c], $ext->safeClasses[$class])); - foreach ($ext->safeClasses[$class] as $s) { - $ext->safeLookup[$s][$c] = true; - } - } - } - } - if (isset($ext->safeLookup[$strategy][$c]) || isset($ext->safeLookup['all'][$c])) { - return (string) $string; - } - } - - $string = (string) $string; - } elseif (\in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) { - return $string; - } - } - - if ('' === $string) { - return ''; - } - - if (null === $charset) { - $charset = $env->getCharset(); - } - - switch ($strategy) { - case 'html': - // see https://www.php.net/htmlspecialchars - - // Using a static variable to avoid initializing the array - // each time the function is called. Moving the declaration on the - // top of the function slow downs other escaping strategies. - static $htmlspecialcharsCharsets = [ - 'ISO-8859-1' => true, 'ISO8859-1' => true, - 'ISO-8859-15' => true, 'ISO8859-15' => true, - 'utf-8' => true, 'UTF-8' => true, - 'CP866' => true, 'IBM866' => true, '866' => true, - 'CP1251' => true, 'WINDOWS-1251' => true, 'WIN-1251' => true, - '1251' => true, - 'CP1252' => true, 'WINDOWS-1252' => true, '1252' => true, - 'KOI8-R' => true, 'KOI8-RU' => true, 'KOI8R' => true, - 'BIG5' => true, '950' => true, - 'GB2312' => true, '936' => true, - 'BIG5-HKSCS' => true, - 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, - 'EUC-JP' => true, 'EUCJP' => true, - 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, - ]; - - if (isset($htmlspecialcharsCharsets[$charset])) { - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - if (isset($htmlspecialcharsCharsets[strtoupper($charset)])) { - // cache the lowercase variant for future iterations - $htmlspecialcharsCharsets[$charset] = true; - - return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset); - } - - $string = twig_convert_encoding($string, 'UTF-8', $charset); - $string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8'); - - return iconv('UTF-8', $charset, $string); - - case 'js': - // escape all non-alphanumeric characters - // into their \x or \uHHHH representations - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', function ($matches) { - $char = $matches[0]; - - /* - * A few characters have short escape sequences in JSON and JavaScript. - * Escape sequences supported only by JavaScript, not JSON, are omitted. - * \" is also supported but omitted, because the resulting string is not HTML safe. - */ - static $shortMap = [ - '\\' => '\\\\', - '/' => '\\/', - "\x08" => '\b', - "\x0C" => '\f', - "\x0A" => '\n', - "\x0D" => '\r', - "\x09" => '\t', - ]; - - if (isset($shortMap[$char])) { - return $shortMap[$char]; - } - - $codepoint = mb_ord($char, 'UTF-8'); - if (0x10000 > $codepoint) { - return sprintf('\u%04X', $codepoint); - } - - // Split characters outside the BMP into surrogate pairs - // https://tools.ietf.org/html/rfc2781.html#section-2.1 - $u = $codepoint - 0x10000; - $high = 0xD800 | ($u >> 10); - $low = 0xDC00 | ($u & 0x3FF); - - return sprintf('\u%04X\u%04X', $high, $low); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'css': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', function ($matches) { - $char = $matches[0]; - - return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : mb_ord($char, 'UTF-8')); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'html_attr': - if ('UTF-8' !== $charset) { - $string = twig_convert_encoding($string, 'UTF-8', $charset); - } - - if (!preg_match('//u', $string)) { - throw new RuntimeError('The string to escape is not a valid UTF-8 string.'); - } - - $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', function ($matches) { - /** - * This function is adapted from code coming from Zend Framework. - * - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) - * @license https://framework.zend.com/license/new-bsd New BSD License - */ - $chr = $matches[0]; - $ord = \ord($chr); - - /* - * The following replaces characters undefined in HTML with the - * hex entity for the Unicode replacement character. - */ - if (($ord <= 0x1f && "\t" != $chr && "\n" != $chr && "\r" != $chr) || ($ord >= 0x7f && $ord <= 0x9f)) { - return '�'; - } - - /* - * Check if the current character to escape has a name entity we should - * replace it with while grabbing the hex value of the character. - */ - if (1 === \strlen($chr)) { - /* - * While HTML supports far more named entities, the lowest common denominator - * has become HTML5's XML Serialisation which is restricted to the those named - * entities that XML supports. Using HTML entities would result in this error: - * XML Parsing Error: undefined entity - */ - static $entityMap = [ - 34 => '"', /* quotation mark */ - 38 => '&', /* ampersand */ - 60 => '<', /* less-than sign */ - 62 => '>', /* greater-than sign */ - ]; - - if (isset($entityMap[$ord])) { - return $entityMap[$ord]; - } - - return sprintf('&#x%02X;', $ord); - } - - /* - * Per OWASP recommendations, we'll use hex entities for any other - * characters where a named entity does not exist. - */ - return sprintf('&#x%04X;', mb_ord($chr, 'UTF-8')); - }, $string); - - if ('UTF-8' !== $charset) { - $string = iconv('UTF-8', $charset, $string); - } - - return $string; - - case 'url': - return rawurlencode($string); - - default: - $escapers = $env->getExtension(EscaperExtension::class)->getEscapers(); - if (array_key_exists($strategy, $escapers)) { - return $escapers[$strategy]($env, $string, $charset); - } - - $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers))); - - throw new RuntimeError(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); - } -} - -/** - * @internal - */ -function twig_escape_filter_is_safe(Node $filterArgs) -{ - foreach ($filterArgs as $arg) { - if ($arg instanceof ConstantExpression) { - return [$arg->getAttribute('value')]; - } - - return []; - } - - return ['html']; -} -} diff --git a/vendor/twig/twig/src/Extension/ExtensionInterface.php b/vendor/twig/twig/src/Extension/ExtensionInterface.php deleted file mode 100644 index 75fa237..0000000 --- a/vendor/twig/twig/src/Extension/ExtensionInterface.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -interface ExtensionInterface -{ - /** - * Returns the token parser instances to add to the existing list. - * - * @return TokenParserInterface[] - */ - public function getTokenParsers(); - - /** - * Returns the node visitor instances to add to the existing list. - * - * @return NodeVisitorInterface[] - */ - public function getNodeVisitors(); - - /** - * Returns a list of filters to add to the existing list. - * - * @return TwigFilter[] - */ - public function getFilters(); - - /** - * Returns a list of tests to add to the existing list. - * - * @return TwigTest[] - */ - public function getTests(); - - /** - * Returns a list of functions to add to the existing list. - * - * @return TwigFunction[] - */ - public function getFunctions(); - - /** - * Returns a list of operators to add to the existing list. - * - * @return array First array of unary operators, second array of binary operators - */ - public function getOperators(); -} diff --git a/vendor/twig/twig/src/Extension/GlobalsInterface.php b/vendor/twig/twig/src/Extension/GlobalsInterface.php deleted file mode 100644 index ec0c682..0000000 --- a/vendor/twig/twig/src/Extension/GlobalsInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ -interface GlobalsInterface -{ - public function getGlobals(): array; -} diff --git a/vendor/twig/twig/src/Extension/OptimizerExtension.php b/vendor/twig/twig/src/Extension/OptimizerExtension.php deleted file mode 100644 index 965bfdb..0000000 --- a/vendor/twig/twig/src/Extension/OptimizerExtension.php +++ /dev/null @@ -1,29 +0,0 @@ -optimizers = $optimizers; - } - - public function getNodeVisitors(): array - { - return [new OptimizerNodeVisitor($this->optimizers)]; - } -} diff --git a/vendor/twig/twig/src/Extension/ProfilerExtension.php b/vendor/twig/twig/src/Extension/ProfilerExtension.php deleted file mode 100644 index 43e4a44..0000000 --- a/vendor/twig/twig/src/Extension/ProfilerExtension.php +++ /dev/null @@ -1,52 +0,0 @@ -actives[] = $profile; - } - - /** - * @return void - */ - public function enter(Profile $profile) - { - $this->actives[0]->addProfile($profile); - array_unshift($this->actives, $profile); - } - - /** - * @return void - */ - public function leave(Profile $profile) - { - $profile->leave(); - array_shift($this->actives); - - if (1 === \count($this->actives)) { - $this->actives[0]->leave(); - } - } - - public function getNodeVisitors(): array - { - return [new ProfilerNodeVisitor(static::class)]; - } -} diff --git a/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php b/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php deleted file mode 100644 index 63bc3b1..0000000 --- a/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ -interface RuntimeExtensionInterface -{ -} diff --git a/vendor/twig/twig/src/Extension/SandboxExtension.php b/vendor/twig/twig/src/Extension/SandboxExtension.php deleted file mode 100644 index c861159..0000000 --- a/vendor/twig/twig/src/Extension/SandboxExtension.php +++ /dev/null @@ -1,123 +0,0 @@ -policy = $policy; - $this->sandboxedGlobally = $sandboxed; - } - - public function getTokenParsers(): array - { - return [new SandboxTokenParser()]; - } - - public function getNodeVisitors(): array - { - return [new SandboxNodeVisitor()]; - } - - public function enableSandbox(): void - { - $this->sandboxed = true; - } - - public function disableSandbox(): void - { - $this->sandboxed = false; - } - - public function isSandboxed(): bool - { - return $this->sandboxedGlobally || $this->sandboxed; - } - - public function isSandboxedGlobally(): bool - { - return $this->sandboxedGlobally; - } - - public function setSecurityPolicy(SecurityPolicyInterface $policy) - { - $this->policy = $policy; - } - - public function getSecurityPolicy(): SecurityPolicyInterface - { - return $this->policy; - } - - public function checkSecurity($tags, $filters, $functions): void - { - if ($this->isSandboxed()) { - $this->policy->checkSecurity($tags, $filters, $functions); - } - } - - public function checkMethodAllowed($obj, $method, int $lineno = -1, Source $source = null): void - { - if ($this->isSandboxed()) { - try { - $this->policy->checkMethodAllowed($obj, $method); - } catch (SecurityNotAllowedMethodError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - } - - public function checkPropertyAllowed($obj, $property, int $lineno = -1, Source $source = null): void - { - if ($this->isSandboxed()) { - try { - $this->policy->checkPropertyAllowed($obj, $property); - } catch (SecurityNotAllowedPropertyError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - } - - public function ensureToStringAllowed($obj, int $lineno = -1, Source $source = null) - { - if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) { - try { - $this->policy->checkMethodAllowed($obj, '__toString'); - } catch (SecurityNotAllowedMethodError $e) { - $e->setSourceContext($source); - $e->setTemplateLine($lineno); - - throw $e; - } - } - - return $obj; - } -} diff --git a/vendor/twig/twig/src/Extension/StagingExtension.php b/vendor/twig/twig/src/Extension/StagingExtension.php deleted file mode 100644 index 0ea47f9..0000000 --- a/vendor/twig/twig/src/Extension/StagingExtension.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * @internal - */ -final class StagingExtension extends AbstractExtension -{ - private $functions = []; - private $filters = []; - private $visitors = []; - private $tokenParsers = []; - private $tests = []; - - public function addFunction(TwigFunction $function): void - { - if (isset($this->functions[$function->getName()])) { - throw new \LogicException(sprintf('Function "%s" is already registered.', $function->getName())); - } - - $this->functions[$function->getName()] = $function; - } - - public function getFunctions(): array - { - return $this->functions; - } - - public function addFilter(TwigFilter $filter): void - { - if (isset($this->filters[$filter->getName()])) { - throw new \LogicException(sprintf('Filter "%s" is already registered.', $filter->getName())); - } - - $this->filters[$filter->getName()] = $filter; - } - - public function getFilters(): array - { - return $this->filters; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor): void - { - $this->visitors[] = $visitor; - } - - public function getNodeVisitors(): array - { - return $this->visitors; - } - - public function addTokenParser(TokenParserInterface $parser): void - { - if (isset($this->tokenParsers[$parser->getTag()])) { - throw new \LogicException(sprintf('Tag "%s" is already registered.', $parser->getTag())); - } - - $this->tokenParsers[$parser->getTag()] = $parser; - } - - public function getTokenParsers(): array - { - return $this->tokenParsers; - } - - public function addTest(TwigTest $test): void - { - if (isset($this->tests[$test->getName()])) { - throw new \LogicException(sprintf('Test "%s" is already registered.', $test->getName())); - } - - $this->tests[$test->getName()] = $test; - } - - public function getTests(): array - { - return $this->tests; - } -} diff --git a/vendor/twig/twig/src/Extension/StringLoaderExtension.php b/vendor/twig/twig/src/Extension/StringLoaderExtension.php deleted file mode 100644 index 7b45147..0000000 --- a/vendor/twig/twig/src/Extension/StringLoaderExtension.php +++ /dev/null @@ -1,42 +0,0 @@ - true]), - ]; - } -} -} - -namespace { -use Twig\Environment; -use Twig\TemplateWrapper; - -/** - * Loads a template from a string. - * - * {{ include(template_from_string("Hello {{ name }}")) }} - * - * @param string $template A template as a string or object implementing __toString() - * @param string $name An optional name of the template to be used in error messages - */ -function twig_template_from_string(Environment $env, $template, string $name = null): TemplateWrapper -{ - return $env->createTemplate((string) $template, $name); -} -} diff --git a/vendor/twig/twig/src/ExtensionSet.php b/vendor/twig/twig/src/ExtensionSet.php deleted file mode 100644 index 36e5bbc..0000000 --- a/vendor/twig/twig/src/ExtensionSet.php +++ /dev/null @@ -1,463 +0,0 @@ - - * - * @internal - */ -final class ExtensionSet -{ - private $extensions; - private $initialized = false; - private $runtimeInitialized = false; - private $staging; - private $parsers; - private $visitors; - private $filters; - private $tests; - private $functions; - private $unaryOperators; - private $binaryOperators; - private $globals; - private $functionCallbacks = []; - private $filterCallbacks = []; - private $parserCallbacks = []; - private $lastModified = 0; - - public function __construct() - { - $this->staging = new StagingExtension(); - } - - public function initRuntime() - { - $this->runtimeInitialized = true; - } - - public function hasExtension(string $class): bool - { - return isset($this->extensions[ltrim($class, '\\')]); - } - - public function getExtension(string $class): ExtensionInterface - { - $class = ltrim($class, '\\'); - - if (!isset($this->extensions[$class])) { - throw new RuntimeError(sprintf('The "%s" extension is not enabled.', $class)); - } - - return $this->extensions[$class]; - } - - /** - * @param ExtensionInterface[] $extensions - */ - public function setExtensions(array $extensions): void - { - foreach ($extensions as $extension) { - $this->addExtension($extension); - } - } - - /** - * @return ExtensionInterface[] - */ - public function getExtensions(): array - { - return $this->extensions; - } - - public function getSignature(): string - { - return json_encode(array_keys($this->extensions)); - } - - public function isInitialized(): bool - { - return $this->initialized || $this->runtimeInitialized; - } - - public function getLastModified(): int - { - if (0 !== $this->lastModified) { - return $this->lastModified; - } - - foreach ($this->extensions as $extension) { - $r = new \ReflectionObject($extension); - if (is_file($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModified) { - $this->lastModified = $extensionTime; - } - } - - return $this->lastModified; - } - - public function addExtension(ExtensionInterface $extension): void - { - $class = \get_class($extension); - - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $class)); - } - - if (isset($this->extensions[$class])) { - throw new \LogicException(sprintf('Unable to register extension "%s" as it is already registered.', $class)); - } - - $this->extensions[$class] = $extension; - } - - public function addFunction(TwigFunction $function): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add function "%s" as extensions have already been initialized.', $function->getName())); - } - - $this->staging->addFunction($function); - } - - /** - * @return TwigFunction[] - */ - public function getFunctions(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->functions; - } - - public function getFunction(string $name): ?TwigFunction - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->functions[$name])) { - return $this->functions[$name]; - } - - foreach ($this->functions as $pattern => $function) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $function->setArguments($matches); - - return $function; - } - } - - foreach ($this->functionCallbacks as $callback) { - if (false !== $function = $callback($name)) { - return $function; - } - } - - return null; - } - - public function registerUndefinedFunctionCallback(callable $callable): void - { - $this->functionCallbacks[] = $callable; - } - - public function addFilter(TwigFilter $filter): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add filter "%s" as extensions have already been initialized.', $filter->getName())); - } - - $this->staging->addFilter($filter); - } - - /** - * @return TwigFilter[] - */ - public function getFilters(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->filters; - } - - public function getFilter(string $name): ?TwigFilter - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->filters[$name])) { - return $this->filters[$name]; - } - - foreach ($this->filters as $pattern => $filter) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count && preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $filter->setArguments($matches); - - return $filter; - } - } - - foreach ($this->filterCallbacks as $callback) { - if (false !== $filter = $callback($name)) { - return $filter; - } - } - - return null; - } - - public function registerUndefinedFilterCallback(callable $callable): void - { - $this->filterCallbacks[] = $callable; - } - - public function addNodeVisitor(NodeVisitorInterface $visitor): void - { - if ($this->initialized) { - throw new \LogicException('Unable to add a node visitor as extensions have already been initialized.'); - } - - $this->staging->addNodeVisitor($visitor); - } - - /** - * @return NodeVisitorInterface[] - */ - public function getNodeVisitors(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->visitors; - } - - public function addTokenParser(TokenParserInterface $parser): void - { - if ($this->initialized) { - throw new \LogicException('Unable to add a token parser as extensions have already been initialized.'); - } - - $this->staging->addTokenParser($parser); - } - - /** - * @return TokenParserInterface[] - */ - public function getTokenParsers(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->parsers; - } - - public function getTokenParser(string $name): ?TokenParserInterface - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->parsers[$name])) { - return $this->parsers[$name]; - } - - foreach ($this->parserCallbacks as $callback) { - if (false !== $parser = $callback($name)) { - return $parser; - } - } - - return null; - } - - public function registerUndefinedTokenParserCallback(callable $callable): void - { - $this->parserCallbacks[] = $callable; - } - - public function getGlobals(): array - { - if (null !== $this->globals) { - return $this->globals; - } - - $globals = []; - foreach ($this->extensions as $extension) { - if (!$extension instanceof GlobalsInterface) { - continue; - } - - $extGlobals = $extension->getGlobals(); - if (!\is_array($extGlobals)) { - throw new \UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', \get_class($extension))); - } - - $globals = array_merge($globals, $extGlobals); - } - - if ($this->initialized) { - $this->globals = $globals; - } - - return $globals; - } - - public function addTest(TwigTest $test): void - { - if ($this->initialized) { - throw new \LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName())); - } - - $this->staging->addTest($test); - } - - /** - * @return TwigTest[] - */ - public function getTests(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->tests; - } - - public function getTest(string $name): ?TwigTest - { - if (!$this->initialized) { - $this->initExtensions(); - } - - if (isset($this->tests[$name])) { - return $this->tests[$name]; - } - - foreach ($this->tests as $pattern => $test) { - $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); - - if ($count) { - if (preg_match('#^'.$pattern.'$#', $name, $matches)) { - array_shift($matches); - $test->setArguments($matches); - - return $test; - } - } - } - - return null; - } - - public function getUnaryOperators(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->unaryOperators; - } - - public function getBinaryOperators(): array - { - if (!$this->initialized) { - $this->initExtensions(); - } - - return $this->binaryOperators; - } - - private function initExtensions(): void - { - $this->parsers = []; - $this->filters = []; - $this->functions = []; - $this->tests = []; - $this->visitors = []; - $this->unaryOperators = []; - $this->binaryOperators = []; - - foreach ($this->extensions as $extension) { - $this->initExtension($extension); - } - $this->initExtension($this->staging); - // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception - $this->initialized = true; - } - - private function initExtension(ExtensionInterface $extension): void - { - // filters - foreach ($extension->getFilters() as $filter) { - $this->filters[$filter->getName()] = $filter; - } - - // functions - foreach ($extension->getFunctions() as $function) { - $this->functions[$function->getName()] = $function; - } - - // tests - foreach ($extension->getTests() as $test) { - $this->tests[$test->getName()] = $test; - } - - // token parsers - foreach ($extension->getTokenParsers() as $parser) { - if (!$parser instanceof TokenParserInterface) { - throw new \LogicException('getTokenParsers() must return an array of \Twig\TokenParser\TokenParserInterface.'); - } - - $this->parsers[$parser->getTag()] = $parser; - } - - // node visitors - foreach ($extension->getNodeVisitors() as $visitor) { - $this->visitors[] = $visitor; - } - - // operators - if ($operators = $extension->getOperators()) { - if (!\is_array($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', \get_class($extension), \is_object($operators) ? \get_class($operators) : \gettype($operators).(\is_resource($operators) ? '' : '#'.$operators))); - } - - if (2 !== \count($operators)) { - throw new \InvalidArgumentException(sprintf('"%s::getOperators()" must return an array of 2 elements, got %d.', \get_class($extension), \count($operators))); - } - - $this->unaryOperators = array_merge($this->unaryOperators, $operators[0]); - $this->binaryOperators = array_merge($this->binaryOperators, $operators[1]); - } - } -} diff --git a/vendor/twig/twig/src/FileExtensionEscapingStrategy.php b/vendor/twig/twig/src/FileExtensionEscapingStrategy.php deleted file mode 100644 index 65198bb..0000000 --- a/vendor/twig/twig/src/FileExtensionEscapingStrategy.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class FileExtensionEscapingStrategy -{ - /** - * Guesses the best autoescaping strategy based on the file name. - * - * @param string $name The template name - * - * @return string|false The escaping strategy name to use or false to disable - */ - public static function guess(string $name) - { - if (\in_array(substr($name, -1), ['/', '\\'])) { - return 'html'; // return html for directories - } - - if ('.twig' === substr($name, -5)) { - $name = substr($name, 0, -5); - } - - $extension = pathinfo($name, \PATHINFO_EXTENSION); - - switch ($extension) { - case 'js': - return 'js'; - - case 'css': - return 'css'; - - case 'txt': - return false; - - default: - return 'html'; - } - } -} diff --git a/vendor/twig/twig/src/Lexer.php b/vendor/twig/twig/src/Lexer.php deleted file mode 100644 index 9ff028c..0000000 --- a/vendor/twig/twig/src/Lexer.php +++ /dev/null @@ -1,501 +0,0 @@ - - */ -class Lexer -{ - private $tokens; - private $code; - private $cursor; - private $lineno; - private $end; - private $state; - private $states; - private $brackets; - private $env; - private $source; - private $options; - private $regexes; - private $position; - private $positions; - private $currentVarBlockLine; - - public const STATE_DATA = 0; - public const STATE_BLOCK = 1; - public const STATE_VAR = 2; - public const STATE_STRING = 3; - public const STATE_INTERPOLATION = 4; - - public const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A'; - public const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?([Ee][\+\-][0-9]+)?/A'; - public const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As'; - public const REGEX_DQ_STRING_DELIM = '/"/A'; - public const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; - public const PUNCTUATION = '()[]{}?:.,|'; - - public function __construct(Environment $env, array $options = []) - { - $this->env = $env; - - $this->options = array_merge([ - 'tag_comment' => ['{#', '#}'], - 'tag_block' => ['{%', '%}'], - 'tag_variable' => ['{{', '}}'], - 'whitespace_trim' => '-', - 'whitespace_line_trim' => '~', - 'whitespace_line_chars' => ' \t\0\x0B', - 'interpolation' => ['#{', '}'], - ], $options); - - // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default - $this->regexes = [ - // }} - 'lex_var' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '#').'\s*'. // -}}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_variable'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~}}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_variable'][1], '#'). // }} - ') - }Ax', - - // %} - 'lex_block' => '{ - \s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*\n?'. // -%}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#').'\n?'. // %}\n? - ') - }Ax', - - // {% endverbatim %} - 'lex_raw_data' => '{'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '('. - $this->options['whitespace_trim']. // - - '|'. - $this->options['whitespace_line_trim']. // ~ - ')?\s*endverbatim\s*'. - '(?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%} - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }sx', - - 'operator' => $this->getOperatorRegex(), - - // #} - 'lex_comment' => '{ - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n? - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~#}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_comment'][1], '#').'\n?'. // #}\n? - ') - }sx', - - // verbatim %} - 'lex_block_raw' => '{ - \s*verbatim\s* - (?:'. - preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '#').'\s*'. // -%}\s* - '|'. - preg_quote($this->options['whitespace_line_trim'].$this->options['tag_block'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~%}[ \t\0\x0B]* - '|'. - preg_quote($this->options['tag_block'][1], '#'). // %} - ') - }Asx', - - 'lex_block_line' => '{\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '#').'}As', - - // {{ or {% or {# - 'lex_tokens_start' => '{ - ('. - preg_quote($this->options['tag_variable'][0], '#'). // {{ - '|'. - preg_quote($this->options['tag_block'][0], '#'). // {% - '|'. - preg_quote($this->options['tag_comment'][0], '#'). // {# - ')('. - preg_quote($this->options['whitespace_trim'], '#'). // - - '|'. - preg_quote($this->options['whitespace_line_trim'], '#'). // ~ - ')? - }sx', - 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A', - 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A', - ]; - } - - public function tokenize(Source $source): TokenStream - { - $this->source = $source; - $this->code = str_replace(["\r\n", "\r"], "\n", $source->getCode()); - $this->cursor = 0; - $this->lineno = 1; - $this->end = \strlen($this->code); - $this->tokens = []; - $this->state = self::STATE_DATA; - $this->states = []; - $this->brackets = []; - $this->position = -1; - - // find all token starts in one go - preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, \PREG_OFFSET_CAPTURE); - $this->positions = $matches; - - while ($this->cursor < $this->end) { - // dispatch to the lexing functions depending - // on the current state - switch ($this->state) { - case self::STATE_DATA: - $this->lexData(); - break; - - case self::STATE_BLOCK: - $this->lexBlock(); - break; - - case self::STATE_VAR: - $this->lexVar(); - break; - - case self::STATE_STRING: - $this->lexString(); - break; - - case self::STATE_INTERPOLATION: - $this->lexInterpolation(); - break; - } - } - - $this->pushToken(/* Token::EOF_TYPE */ -1); - - if (!empty($this->brackets)) { - list($expect, $lineno) = array_pop($this->brackets); - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - return new TokenStream($this->tokens, $this->source); - } - - private function lexData(): void - { - // if no matches are left we return the rest of the template as simple text token - if ($this->position == \count($this->positions[0]) - 1) { - $this->pushToken(/* Token::TEXT_TYPE */ 0, substr($this->code, $this->cursor)); - $this->cursor = $this->end; - - return; - } - - // Find the first token after the current cursor - $position = $this->positions[0][++$this->position]; - while ($position[1] < $this->cursor) { - if ($this->position == \count($this->positions[0]) - 1) { - return; - } - $position = $this->positions[0][++$this->position]; - } - - // push the template text first - $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor); - - // trim? - if (isset($this->positions[2][$this->position][0])) { - if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - $this->pushToken(/* Token::TEXT_TYPE */ 0, $text); - $this->moveCursor($textContent.$position[0]); - - switch ($this->positions[1][$this->position][0]) { - case $this->options['tag_comment'][0]: - $this->lexComment(); - break; - - case $this->options['tag_block'][0]: - // raw data? - if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lexRawData(); - // {% line \d+ %} - } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - $this->lineno = (int) $match[1]; - } else { - $this->pushToken(/* Token::BLOCK_START_TYPE */ 1); - $this->pushState(self::STATE_BLOCK); - $this->currentVarBlockLine = $this->lineno; - } - break; - - case $this->options['tag_variable'][0]: - $this->pushToken(/* Token::VAR_START_TYPE */ 2); - $this->pushState(self::STATE_VAR); - $this->currentVarBlockLine = $this->lineno; - break; - } - } - - private function lexBlock(): void - { - if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::BLOCK_END_TYPE */ 3); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function lexVar(): void - { - if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::VAR_END_TYPE */ 4); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function lexExpression(): void - { - // whitespace - if (preg_match('/\s+/A', $this->code, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - - if ($this->cursor >= $this->end) { - throw new SyntaxError(sprintf('Unclosed "%s".', self::STATE_BLOCK === $this->state ? 'block' : 'variable'), $this->currentVarBlockLine, $this->source); - } - } - - // arrow function - if ('=' === $this->code[$this->cursor] && '>' === $this->code[$this->cursor + 1]) { - $this->pushToken(Token::ARROW_TYPE, '=>'); - $this->moveCursor('=>'); - } - // operators - elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::OPERATOR_TYPE */ 8, preg_replace('/\s+/', ' ', $match[0])); - $this->moveCursor($match[0]); - } - // names - elseif (preg_match(self::REGEX_NAME, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::NAME_TYPE */ 5, $match[0]); - $this->moveCursor($match[0]); - } - // numbers - elseif (preg_match(self::REGEX_NUMBER, $this->code, $match, 0, $this->cursor)) { - $number = (float) $match[0]; // floats - if (ctype_digit($match[0]) && $number <= \PHP_INT_MAX) { - $number = (int) $match[0]; // integers lower than the maximum - } - $this->pushToken(/* Token::NUMBER_TYPE */ 6, $number); - $this->moveCursor($match[0]); - } - // punctuation - elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { - // opening bracket - if (false !== strpos('([{', $this->code[$this->cursor])) { - $this->brackets[] = [$this->code[$this->cursor], $this->lineno]; - } - // closing bracket - elseif (false !== strpos(')]}', $this->code[$this->cursor])) { - if (empty($this->brackets)) { - throw new SyntaxError(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - - list($expect, $lineno) = array_pop($this->brackets); - if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - } - - $this->pushToken(/* Token::PUNCTUATION_TYPE */ 9, $this->code[$this->cursor]); - ++$this->cursor; - } - // strings - elseif (preg_match(self::REGEX_STRING, $this->code, $match, 0, $this->cursor)) { - $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes(substr($match[0], 1, -1))); - $this->moveCursor($match[0]); - } - // opening double quoted string - elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = ['"', $this->lineno]; - $this->pushState(self::STATE_STRING); - $this->moveCursor($match[0]); - } - // unlexable - else { - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - private function lexRawData(): void - { - if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError('Unexpected end of file: Unclosed "verbatim" block.', $this->lineno, $this->source); - } - - $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor); - $this->moveCursor($text.$match[0][0]); - - // trim? - if (isset($match[1][0])) { - if ($this->options['whitespace_trim'] === $match[1][0]) { - // whitespace_trim detected ({%-, {{- or {#-) - $text = rtrim($text); - } else { - // whitespace_line_trim detected ({%~, {{~ or {#~) - // don't trim \r and \n - $text = rtrim($text, " \t\0\x0B"); - } - } - - $this->pushToken(/* Token::TEXT_TYPE */ 0, $text); - } - - private function lexComment(): void - { - if (!preg_match($this->regexes['lex_comment'], $this->code, $match, \PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new SyntaxError('Unclosed comment.', $this->lineno, $this->source); - } - - $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]); - } - - private function lexString(): void - { - if (preg_match($this->regexes['interpolation_start'], $this->code, $match, 0, $this->cursor)) { - $this->brackets[] = [$this->options['interpolation'][0], $this->lineno]; - $this->pushToken(/* Token::INTERPOLATION_START_TYPE */ 10); - $this->moveCursor($match[0]); - $this->pushState(self::STATE_INTERPOLATION); - } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, 0, $this->cursor) && \strlen($match[0]) > 0) { - $this->pushToken(/* Token::STRING_TYPE */ 7, stripcslashes($match[0])); - $this->moveCursor($match[0]); - } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, 0, $this->cursor)) { - list($expect, $lineno) = array_pop($this->brackets); - if ('"' != $this->code[$this->cursor]) { - throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $lineno, $this->source); - } - - $this->popState(); - ++$this->cursor; - } else { - // unlexable - throw new SyntaxError(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source); - } - } - - private function lexInterpolation(): void - { - $bracket = end($this->brackets); - if ($this->options['interpolation'][0] === $bracket[0] && preg_match($this->regexes['interpolation_end'], $this->code, $match, 0, $this->cursor)) { - array_pop($this->brackets); - $this->pushToken(/* Token::INTERPOLATION_END_TYPE */ 11); - $this->moveCursor($match[0]); - $this->popState(); - } else { - $this->lexExpression(); - } - } - - private function pushToken($type, $value = ''): void - { - // do not push empty text tokens - if (/* Token::TEXT_TYPE */ 0 === $type && '' === $value) { - return; - } - - $this->tokens[] = new Token($type, $value, $this->lineno); - } - - private function moveCursor($text): void - { - $this->cursor += \strlen($text); - $this->lineno += substr_count($text, "\n"); - } - - private function getOperatorRegex(): string - { - $operators = array_merge( - ['='], - array_keys($this->env->getUnaryOperators()), - array_keys($this->env->getBinaryOperators()) - ); - - $operators = array_combine($operators, array_map('strlen', $operators)); - arsort($operators); - - $regex = []; - foreach ($operators as $operator => $length) { - // an operator that ends with a character must be followed by - // a whitespace, a parenthesis, an opening map [ or sequence { - $r = preg_quote($operator, '/'); - if (ctype_alpha($operator[$length - 1])) { - $r .= '(?=[\s()\[{])'; - } - - // an operator that begins with a character must not have a dot or pipe before - if (ctype_alpha($operator[0])) { - $r = '(?states[] = $this->state; - $this->state = $state; - } - - private function popState(): void - { - if (0 === \count($this->states)) { - throw new \LogicException('Cannot pop state without a previous state.'); - } - - $this->state = array_pop($this->states); - } -} diff --git a/vendor/twig/twig/src/Loader/ArrayLoader.php b/vendor/twig/twig/src/Loader/ArrayLoader.php deleted file mode 100644 index 5d726c3..0000000 --- a/vendor/twig/twig/src/Loader/ArrayLoader.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -final class ArrayLoader implements LoaderInterface -{ - private $templates = []; - - /** - * @param array $templates An array of templates (keys are the names, and values are the source code) - */ - public function __construct(array $templates = []) - { - $this->templates = $templates; - } - - public function setTemplate(string $name, string $template): void - { - $this->templates[$name] = $template; - } - - public function getSourceContext(string $name): Source - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return new Source($this->templates[$name], $name); - } - - public function exists(string $name): bool - { - return isset($this->templates[$name]); - } - - public function getCacheKey(string $name): string - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return $name.':'.$this->templates[$name]; - } - - public function isFresh(string $name, int $time): bool - { - if (!isset($this->templates[$name])) { - throw new LoaderError(sprintf('Template "%s" is not defined.', $name)); - } - - return true; - } -} diff --git a/vendor/twig/twig/src/Loader/ChainLoader.php b/vendor/twig/twig/src/Loader/ChainLoader.php deleted file mode 100644 index fbf4f3a..0000000 --- a/vendor/twig/twig/src/Loader/ChainLoader.php +++ /dev/null @@ -1,119 +0,0 @@ - - */ -final class ChainLoader implements LoaderInterface -{ - private $hasSourceCache = []; - private $loaders = []; - - /** - * @param LoaderInterface[] $loaders - */ - public function __construct(array $loaders = []) - { - foreach ($loaders as $loader) { - $this->addLoader($loader); - } - } - - public function addLoader(LoaderInterface $loader): void - { - $this->loaders[] = $loader; - $this->hasSourceCache = []; - } - - /** - * @return LoaderInterface[] - */ - public function getLoaders(): array - { - return $this->loaders; - } - - public function getSourceContext(string $name): Source - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->getSourceContext($name); - } catch (LoaderError $e) { - $exceptions[] = $e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function exists(string $name): bool - { - if (isset($this->hasSourceCache[$name])) { - return $this->hasSourceCache[$name]; - } - - foreach ($this->loaders as $loader) { - if ($loader->exists($name)) { - return $this->hasSourceCache[$name] = true; - } - } - - return $this->hasSourceCache[$name] = false; - } - - public function getCacheKey(string $name): string - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->getCacheKey($name); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } - - public function isFresh(string $name, int $time): bool - { - $exceptions = []; - foreach ($this->loaders as $loader) { - if (!$loader->exists($name)) { - continue; - } - - try { - return $loader->isFresh($name, $time); - } catch (LoaderError $e) { - $exceptions[] = \get_class($loader).': '.$e->getMessage(); - } - } - - throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : '')); - } -} diff --git a/vendor/twig/twig/src/Loader/FilesystemLoader.php b/vendor/twig/twig/src/Loader/FilesystemLoader.php deleted file mode 100644 index 859a898..0000000 --- a/vendor/twig/twig/src/Loader/FilesystemLoader.php +++ /dev/null @@ -1,283 +0,0 @@ - - */ -class FilesystemLoader implements LoaderInterface -{ - /** Identifier of the main namespace. */ - public const MAIN_NAMESPACE = '__main__'; - - protected $paths = []; - protected $cache = []; - protected $errorCache = []; - - private $rootPath; - - /** - * @param string|array $paths A path or an array of paths where to look for templates - * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) - */ - public function __construct($paths = [], string $rootPath = null) - { - $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR; - if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) { - $this->rootPath = $realPath.\DIRECTORY_SEPARATOR; - } - - if ($paths) { - $this->setPaths($paths); - } - } - - /** - * Returns the paths to the templates. - */ - public function getPaths(string $namespace = self::MAIN_NAMESPACE): array - { - return $this->paths[$namespace] ?? []; - } - - /** - * Returns the path namespaces. - * - * The main namespace is always defined. - */ - public function getNamespaces(): array - { - return array_keys($this->paths); - } - - /** - * @param string|array $paths A path or an array of paths where to look for templates - */ - public function setPaths($paths, string $namespace = self::MAIN_NAMESPACE): void - { - if (!\is_array($paths)) { - $paths = [$paths]; - } - - $this->paths[$namespace] = []; - foreach ($paths as $path) { - $this->addPath($path, $namespace); - } - } - - /** - * @throws LoaderError - */ - public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE): void - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $this->paths[$namespace][] = rtrim($path, '/\\'); - } - - /** - * @throws LoaderError - */ - public function prependPath(string $path, string $namespace = self::MAIN_NAMESPACE): void - { - // invalidate the cache - $this->cache = $this->errorCache = []; - - $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; - if (!is_dir($checkPath)) { - throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); - } - - $path = rtrim($path, '/\\'); - - if (!isset($this->paths[$namespace])) { - $this->paths[$namespace][] = $path; - } else { - array_unshift($this->paths[$namespace], $path); - } - } - - public function getSourceContext(string $name): Source - { - if (null === $path = $this->findTemplate($name)) { - return new Source('', $name, ''); - } - - return new Source(file_get_contents($path), $name, $path); - } - - public function getCacheKey(string $name): string - { - if (null === $path = $this->findTemplate($name)) { - return ''; - } - $len = \strlen($this->rootPath); - if (0 === strncmp($this->rootPath, $path, $len)) { - return substr($path, $len); - } - - return $path; - } - - /** - * @return bool - */ - public function exists(string $name) - { - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return true; - } - - return null !== $this->findTemplate($name, false); - } - - public function isFresh(string $name, int $time): bool - { - // false support to be removed in 3.0 - if (null === $path = $this->findTemplate($name)) { - return false; - } - - return filemtime($path) < $time; - } - - /** - * @return string|null - */ - protected function findTemplate(string $name, bool $throw = true) - { - $name = $this->normalizeName($name); - - if (isset($this->cache[$name])) { - return $this->cache[$name]; - } - - if (isset($this->errorCache[$name])) { - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - try { - $this->validateName($name); - - list($namespace, $shortname) = $this->parseName($name); - } catch (LoaderError $e) { - if (!$throw) { - return null; - } - - throw $e; - } - - if (!isset($this->paths[$namespace])) { - $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); - - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - foreach ($this->paths[$namespace] as $path) { - if (!$this->isAbsolutePath($path)) { - $path = $this->rootPath.$path; - } - - if (is_file($path.'/'.$shortname)) { - if (false !== $realpath = realpath($path.'/'.$shortname)) { - return $this->cache[$name] = $realpath; - } - - return $this->cache[$name] = $path.'/'.$shortname; - } - } - - $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])); - - if (!$throw) { - return null; - } - - throw new LoaderError($this->errorCache[$name]); - } - - private function normalizeName(string $name): string - { - return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name)); - } - - private function parseName(string $name, string $default = self::MAIN_NAMESPACE): array - { - if (isset($name[0]) && '@' == $name[0]) { - if (false === $pos = strpos($name, '/')) { - throw new LoaderError(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); - } - - $namespace = substr($name, 1, $pos - 1); - $shortname = substr($name, $pos + 1); - - return [$namespace, $shortname]; - } - - return [$default, $name]; - } - - private function validateName(string $name): void - { - if (false !== strpos($name, "\0")) { - throw new LoaderError('A template name cannot contain NUL bytes.'); - } - - $name = ltrim($name, '/'); - $parts = explode('/', $name); - $level = 0; - foreach ($parts as $part) { - if ('..' === $part) { - --$level; - } elseif ('.' !== $part) { - ++$level; - } - - if ($level < 0) { - throw new LoaderError(sprintf('Looks like you try to load a template outside configured directories (%s).', $name)); - } - } - } - - private function isAbsolutePath(string $file): bool - { - return strspn($file, '/\\', 0, 1) - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && strspn($file, '/\\', 2, 1) - ) - || null !== parse_url($file, \PHP_URL_SCHEME) - ; - } -} diff --git a/vendor/twig/twig/src/Loader/LoaderInterface.php b/vendor/twig/twig/src/Loader/LoaderInterface.php deleted file mode 100644 index fec7e85..0000000 --- a/vendor/twig/twig/src/Loader/LoaderInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -interface LoaderInterface -{ - /** - * Returns the source context for a given template logical name. - * - * @throws LoaderError When $name is not found - */ - public function getSourceContext(string $name): Source; - - /** - * Gets the cache key to use for the cache for a given template name. - * - * @throws LoaderError When $name is not found - */ - public function getCacheKey(string $name): string; - - /** - * @param int $time Timestamp of the last modification time of the cached template - * - * @throws LoaderError When $name is not found - */ - public function isFresh(string $name, int $time): bool; - - /** - * @return bool - */ - public function exists(string $name); -} diff --git a/vendor/twig/twig/src/Markup.php b/vendor/twig/twig/src/Markup.php deleted file mode 100644 index 1788acc..0000000 --- a/vendor/twig/twig/src/Markup.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class Markup implements \Countable, \JsonSerializable -{ - private $content; - private $charset; - - public function __construct($content, $charset) - { - $this->content = (string) $content; - $this->charset = $charset; - } - - public function __toString() - { - return $this->content; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return mb_strlen($this->content, $this->charset); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->content; - } -} diff --git a/vendor/twig/twig/src/Node/AutoEscapeNode.php b/vendor/twig/twig/src/Node/AutoEscapeNode.php deleted file mode 100644 index cd97041..0000000 --- a/vendor/twig/twig/src/Node/AutoEscapeNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class AutoEscapeNode extends Node -{ - public function __construct($value, Node $body, int $lineno, string $tag = 'autoescape') - { - parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('body')); - } -} diff --git a/vendor/twig/twig/src/Node/BlockNode.php b/vendor/twig/twig/src/Node/BlockNode.php deleted file mode 100644 index 0632ba7..0000000 --- a/vendor/twig/twig/src/Node/BlockNode.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class BlockNode extends Node -{ - public function __construct(string $name, Node $body, int $lineno, string $tag = null) - { - parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ; - - $compiler - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/BlockReferenceNode.php b/vendor/twig/twig/src/Node/BlockReferenceNode.php deleted file mode 100644 index cc8af5b..0000000 --- a/vendor/twig/twig/src/Node/BlockReferenceNode.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class BlockReferenceNode extends Node implements NodeOutputInterface -{ - public function __construct(string $name, int $lineno, string $tag = null) - { - parent::__construct([], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name'))) - ; - } -} diff --git a/vendor/twig/twig/src/Node/BodyNode.php b/vendor/twig/twig/src/Node/BodyNode.php deleted file mode 100644 index 041cbf6..0000000 --- a/vendor/twig/twig/src/Node/BodyNode.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class BodyNode extends Node -{ -} diff --git a/vendor/twig/twig/src/Node/CheckSecurityCallNode.php b/vendor/twig/twig/src/Node/CheckSecurityCallNode.php deleted file mode 100644 index a78a38d..0000000 --- a/vendor/twig/twig/src/Node/CheckSecurityCallNode.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class CheckSecurityCallNode extends Node -{ - public function compile(Compiler $compiler) - { - $compiler - ->write("\$this->sandbox = \$this->env->getExtension('\Twig\Extension\SandboxExtension');\n") - ->write("\$this->checkSecurity();\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/CheckSecurityNode.php b/vendor/twig/twig/src/Node/CheckSecurityNode.php deleted file mode 100644 index 4727327..0000000 --- a/vendor/twig/twig/src/Node/CheckSecurityNode.php +++ /dev/null @@ -1,88 +0,0 @@ - - */ -class CheckSecurityNode extends Node -{ - private $usedFilters; - private $usedTags; - private $usedFunctions; - - public function __construct(array $usedFilters, array $usedTags, array $usedFunctions) - { - $this->usedFilters = $usedFilters; - $this->usedTags = $usedTags; - $this->usedFunctions = $usedFunctions; - - parent::__construct(); - } - - public function compile(Compiler $compiler): void - { - $tags = $filters = $functions = []; - foreach (['tags', 'filters', 'functions'] as $type) { - foreach ($this->{'used'.ucfirst($type)} as $name => $node) { - if ($node instanceof Node) { - ${$type}[$name] = $node->getTemplateLine(); - } else { - ${$type}[$node] = null; - } - } - } - - $compiler - ->write("\n") - ->write("public function checkSecurity()\n") - ->write("{\n") - ->indent() - ->write('static $tags = ')->repr(array_filter($tags))->raw(";\n") - ->write('static $filters = ')->repr(array_filter($filters))->raw(";\n") - ->write('static $functions = ')->repr(array_filter($functions))->raw(";\n\n") - ->write("try {\n") - ->indent() - ->write("\$this->sandbox->checkSecurity(\n") - ->indent() - ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n") - ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n") - ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n") - ->outdent() - ->write(");\n") - ->outdent() - ->write("} catch (SecurityError \$e) {\n") - ->indent() - ->write("\$e->setSourceContext(\$this->source);\n\n") - ->write("if (\$e instanceof SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n") - ->outdent() - ->write("} elseif (\$e instanceof SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n") - ->indent() - ->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n") - ->outdent() - ->write("}\n\n") - ->write("throw \$e;\n") - ->outdent() - ->write("}\n\n") - ->outdent() - ->write("}\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/CheckToStringNode.php b/vendor/twig/twig/src/Node/CheckToStringNode.php deleted file mode 100644 index c7a9d69..0000000 --- a/vendor/twig/twig/src/Node/CheckToStringNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class CheckToStringNode extends AbstractExpression -{ - public function __construct(AbstractExpression $expr) - { - parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag()); - } - - public function compile(Compiler $compiler): void - { - $expr = $this->getNode('expr'); - $compiler - ->raw('$this->sandbox->ensureToStringAllowed(') - ->subcompile($expr) - ->raw(', ') - ->repr($expr->getTemplateLine()) - ->raw(', $this->source)') - ; - } -} diff --git a/vendor/twig/twig/src/Node/DeprecatedNode.php b/vendor/twig/twig/src/Node/DeprecatedNode.php deleted file mode 100644 index 5ff4430..0000000 --- a/vendor/twig/twig/src/Node/DeprecatedNode.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class DeprecatedNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $expr = $this->getNode('expr'); - - if ($expr instanceof ConstantExpression) { - $compiler->write('@trigger_error(') - ->subcompile($expr); - } else { - $varName = $compiler->getVarName(); - $compiler->write(sprintf('$%s = ', $varName)) - ->subcompile($expr) - ->raw(";\n") - ->write(sprintf('@trigger_error($%s', $varName)); - } - - $compiler - ->raw('.') - ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine())) - ->raw(", E_USER_DEPRECATED);\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/DoNode.php b/vendor/twig/twig/src/Node/DoNode.php deleted file mode 100644 index f7783d1..0000000 --- a/vendor/twig/twig/src/Node/DoNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class DoNode extends Node -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/EmbedNode.php b/vendor/twig/twig/src/Node/EmbedNode.php deleted file mode 100644 index 903c3f6..0000000 --- a/vendor/twig/twig/src/Node/EmbedNode.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class EmbedNode extends IncludeNode -{ - // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module) - public function __construct(string $name, int $index, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null) - { - parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag); - - $this->setAttribute('name', $name); - $this->setAttribute('index', $index); - } - - protected function addGetTemplate(Compiler $compiler): void - { - $compiler - ->write('$this->loadTemplate(') - ->string($this->getAttribute('name')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(', ') - ->string($this->getAttribute('index')) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/AbstractExpression.php b/vendor/twig/twig/src/Node/Expression/AbstractExpression.php deleted file mode 100644 index 42da055..0000000 --- a/vendor/twig/twig/src/Node/Expression/AbstractExpression.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -abstract class AbstractExpression extends Node -{ -} diff --git a/vendor/twig/twig/src/Node/Expression/ArrayExpression.php b/vendor/twig/twig/src/Node/Expression/ArrayExpression.php deleted file mode 100644 index 0e25fe4..0000000 --- a/vendor/twig/twig/src/Node/Expression/ArrayExpression.php +++ /dev/null @@ -1,85 +0,0 @@ -index = -1; - foreach ($this->getKeyValuePairs() as $pair) { - if ($pair['key'] instanceof ConstantExpression && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) { - $this->index = $pair['key']->getAttribute('value'); - } - } - } - - public function getKeyValuePairs(): array - { - $pairs = []; - foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = [ - 'key' => $pair[0], - 'value' => $pair[1], - ]; - } - - return $pairs; - } - - public function hasElement(AbstractExpression $key): bool - { - foreach ($this->getKeyValuePairs() as $pair) { - // we compare the string representation of the keys - // to avoid comparing the line numbers which are not relevant here. - if ((string) $key === (string) $pair['key']) { - return true; - } - } - - return false; - } - - public function addElement(AbstractExpression $value, AbstractExpression $key = null): void - { - if (null === $key) { - $key = new ConstantExpression(++$this->index, $value->getTemplateLine()); - } - - array_push($this->nodes, $key, $value); - } - - public function compile(Compiler $compiler): void - { - $compiler->raw('['); - $first = true; - foreach ($this->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler - ->subcompile($pair['key']) - ->raw(' => ') - ->subcompile($pair['value']) - ; - } - $compiler->raw(']'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php b/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php deleted file mode 100644 index eaad03c..0000000 --- a/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class ArrowFunctionExpression extends AbstractExpression -{ - public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null) - { - parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->raw('function (') - ; - foreach ($this->getNode('names') as $i => $name) { - if ($i) { - $compiler->raw(', '); - } - - $compiler - ->raw('$__') - ->raw($name->getAttribute('name')) - ->raw('__') - ; - } - $compiler - ->raw(') use ($context, $macros) { ') - ; - foreach ($this->getNode('names') as $name) { - $compiler - ->raw('$context["') - ->raw($name->getAttribute('name')) - ->raw('"] = $__') - ->raw($name->getAttribute('name')) - ->raw('__; ') - ; - } - $compiler - ->raw('return ') - ->subcompile($this->getNode('expr')) - ->raw('; }') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php b/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php deleted file mode 100644 index 7dd1bc4..0000000 --- a/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php +++ /dev/null @@ -1,27 +0,0 @@ -raw('$context[') - ->string($this->getAttribute('name')) - ->raw(']') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php deleted file mode 100644 index c424e5c..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +++ /dev/null @@ -1,42 +0,0 @@ - $left, 'right' => $right], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('left')) - ->raw(' ') - ; - $this->operator($compiler); - $compiler - ->raw(' ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - abstract public function operator(Compiler $compiler): Compiler; -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php deleted file mode 100644 index ee4307e..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('+'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php deleted file mode 100644 index 5f2380d..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('&&'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php deleted file mode 100644 index db7d6d6..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('&'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php deleted file mode 100644 index ce803dd..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('|'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php deleted file mode 100644 index 5c29785..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('^'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php deleted file mode 100644 index f825ab8..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('.'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php deleted file mode 100644 index e3817d1..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('/'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php deleted file mode 100644 index c3516b8..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right)) - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php deleted file mode 100644 index 6b48549..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('=='); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php deleted file mode 100644 index d7e7980..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php +++ /dev/null @@ -1,29 +0,0 @@ -raw('(int) floor('); - parent::compile($compiler); - $compiler->raw(')'); - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('/'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php deleted file mode 100644 index e1dd067..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(1 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('>'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php deleted file mode 100644 index df9bfcf..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 <= twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('>='); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php deleted file mode 100644 index 6dbfa97..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('in'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php deleted file mode 100644 index 598e629..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(-1 === twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('<'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php deleted file mode 100644 index e3c4af5..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 >= twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('<='); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php deleted file mode 100644 index bc97292..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('preg_match(') - ->subcompile($this->getNode('right')) - ->raw(', ') - ->subcompile($this->getNode('left')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php deleted file mode 100644 index 271b45c..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('%'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php deleted file mode 100644 index 6d4c1e0..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('*'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php deleted file mode 100644 index db47a28..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php +++ /dev/null @@ -1,39 +0,0 @@ -= 80000) { - parent::compile($compiler); - - return; - } - - $compiler - ->raw('(0 !== twig_compare(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw('))') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('!='); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php deleted file mode 100644 index fcba6cc..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('!twig_in_filter(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('not in'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php deleted file mode 100644 index 21f87c9..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('||'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php deleted file mode 100644 index c9f4c66..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php +++ /dev/null @@ -1,22 +0,0 @@ -raw('**'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php deleted file mode 100644 index 55982c8..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php +++ /dev/null @@ -1,33 +0,0 @@ -raw('range(') - ->subcompile($this->getNode('left')) - ->raw(', ') - ->subcompile($this->getNode('right')) - ->raw(')') - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw('..'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php deleted file mode 100644 index ae5a4a4..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php +++ /dev/null @@ -1,22 +0,0 @@ -raw('<=>'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php deleted file mode 100644 index d0df1c4..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php +++ /dev/null @@ -1,35 +0,0 @@ -getVarName(); - $right = $compiler->getVarName(); - $compiler - ->raw(sprintf('(is_string($%s = ', $left)) - ->subcompile($this->getNode('left')) - ->raw(sprintf(') && is_string($%s = ', $right)) - ->subcompile($this->getNode('right')) - ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right)) - ; - } - - public function operator(Compiler $compiler): Compiler - { - return $compiler->raw(''); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php b/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php deleted file mode 100644 index eeb87fa..0000000 --- a/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('-'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php b/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php deleted file mode 100644 index b1e2a8f..0000000 --- a/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php +++ /dev/null @@ -1,86 +0,0 @@ - - */ -class BlockReferenceExpression extends AbstractExpression -{ - public function __construct(Node $name, ?Node $template, int $lineno, string $tag = null) - { - $nodes = ['name' => $name]; - if (null !== $template) { - $nodes['template'] = $template; - } - - parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('is_defined_test')) { - $this->compileTemplateCall($compiler, 'hasBlock'); - } else { - if ($this->getAttribute('output')) { - $compiler->addDebugInfo($this); - - $this - ->compileTemplateCall($compiler, 'displayBlock') - ->raw(";\n"); - } else { - $this->compileTemplateCall($compiler, 'renderBlock'); - } - } - } - - private function compileTemplateCall(Compiler $compiler, string $method): Compiler - { - if (!$this->hasNode('template')) { - $compiler->write('$this'); - } else { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('template')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - $compiler->raw(sprintf('->%s', $method)); - - return $this->compileBlockArguments($compiler); - } - - private function compileBlockArguments(Compiler $compiler): Compiler - { - $compiler - ->raw('(') - ->subcompile($this->getNode('name')) - ->raw(', $context'); - - if (!$this->hasNode('template')) { - $compiler->raw(', $blocks'); - } - - return $compiler->raw(')'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/CallExpression.php b/vendor/twig/twig/src/Node/Expression/CallExpression.php deleted file mode 100644 index fdf92a8..0000000 --- a/vendor/twig/twig/src/Node/Expression/CallExpression.php +++ /dev/null @@ -1,320 +0,0 @@ -getAttribute('callable'); - - $closingParenthesis = false; - $isArray = false; - if (\is_string($callable) && false === strpos($callable, '::')) { - $compiler->raw($callable); - } else { - list($r, $callable) = $this->reflectCallable($callable); - if ($r instanceof \ReflectionMethod && \is_string($callable[0])) { - if ($r->isStatic()) { - $compiler->raw(sprintf('%s::%s', $callable[0], $callable[1])); - } else { - $compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1])); - } - } elseif ($r instanceof \ReflectionMethod && $callable[0] instanceof ExtensionInterface) { - $class = \get_class($callable[0]); - if (!$compiler->getEnvironment()->hasExtension($class)) { - // Compile a non-optimized call to trigger a \Twig\Error\RuntimeError, which cannot be a compile-time error - $compiler->raw(sprintf('$this->env->getExtension(\'%s\')', $class)); - } else { - $compiler->raw(sprintf('$this->extensions[\'%s\']', ltrim($class, '\\'))); - } - - $compiler->raw(sprintf('->%s', $callable[1])); - } else { - $closingParenthesis = true; - $isArray = true; - $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), ', ucfirst($this->getAttribute('type')), $this->getAttribute('name'))); - } - } - - $this->compileArguments($compiler, $isArray); - - if ($closingParenthesis) { - $compiler->raw(')'); - } - } - - protected function compileArguments(Compiler $compiler, $isArray = false): void - { - $compiler->raw($isArray ? '[' : '('); - - $first = true; - - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - $compiler->raw('$this->env'); - $first = false; - } - - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->raw('$context'); - $first = false; - } - - if ($this->hasAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->string($argument); - $first = false; - } - } - - if ($this->hasNode('node')) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($this->getNode('node')); - $first = false; - } - - if ($this->hasNode('arguments')) { - $callable = $this->getAttribute('callable'); - $arguments = $this->getArguments($callable, $this->getNode('arguments')); - foreach ($arguments as $node) { - if (!$first) { - $compiler->raw(', '); - } - $compiler->subcompile($node); - $first = false; - } - } - - $compiler->raw($isArray ? ']' : ')'); - } - - protected function getArguments($callable, $arguments) - { - $callType = $this->getAttribute('type'); - $callName = $this->getAttribute('name'); - - $parameters = []; - $named = false; - foreach ($arguments as $name => $node) { - if (!\is_int($name)) { - $named = true; - $name = $this->normalizeName($name); - } elseif ($named) { - throw new SyntaxError(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - $parameters[$name] = $node; - } - - $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic'); - if (!$named && !$isVariadic) { - return $parameters; - } - - if (!$callable) { - if ($named) { - $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName); - } else { - $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName); - } - - throw new \LogicException($message); - } - - list($callableParameters, $isPhpVariadic) = $this->getCallableParameters($callable, $isVariadic); - $arguments = []; - $names = []; - $missingArguments = []; - $optionalArguments = []; - $pos = 0; - foreach ($callableParameters as $callableParameter) { - $name = $this->normalizeName($callableParameter->name); - if (\PHP_VERSION_ID >= 80000 && 'range' === $callable) { - if ('start' === $name) { - $name = 'low'; - } elseif ('end' === $name) { - $name = 'high'; - } - } - - $names[] = $name; - - if (\array_key_exists($name, $parameters)) { - if (\array_key_exists($pos, $parameters)) { - throw new SyntaxError(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - - if (\count($missingArguments)) { - throw new SyntaxError(sprintf( - 'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".', - $name, $callType, $callName, implode(', ', $names), \count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments) - ), $this->getTemplateLine(), $this->getSourceContext()); - } - - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$name]; - unset($parameters[$name]); - $optionalArguments = []; - } elseif (\array_key_exists($pos, $parameters)) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $parameters[$pos]; - unset($parameters[$pos]); - $optionalArguments = []; - ++$pos; - } elseif ($callableParameter->isDefaultValueAvailable()) { - $optionalArguments[] = new ConstantExpression($callableParameter->getDefaultValue(), -1); - } elseif ($callableParameter->isOptional()) { - if (empty($parameters)) { - break; - } else { - $missingArguments[] = $name; - } - } else { - throw new SyntaxError(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName), $this->getTemplateLine(), $this->getSourceContext()); - } - } - - if ($isVariadic) { - $arbitraryArguments = $isPhpVariadic ? new VariadicExpression([], -1) : new ArrayExpression([], -1); - foreach ($parameters as $key => $value) { - if (\is_int($key)) { - $arbitraryArguments->addElement($value); - } else { - $arbitraryArguments->addElement($value, new ConstantExpression($key, -1)); - } - unset($parameters[$key]); - } - - if ($arbitraryArguments->count()) { - $arguments = array_merge($arguments, $optionalArguments); - $arguments[] = $arbitraryArguments; - } - } - - if (!empty($parameters)) { - $unknownParameter = null; - foreach ($parameters as $parameter) { - if ($parameter instanceof Node) { - $unknownParameter = $parameter; - break; - } - } - - throw new SyntaxError( - sprintf( - 'Unknown argument%s "%s" for %s "%s(%s)".', - \count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names) - ), - $unknownParameter ? $unknownParameter->getTemplateLine() : $this->getTemplateLine(), - $unknownParameter ? $unknownParameter->getSourceContext() : $this->getSourceContext() - ); - } - - return $arguments; - } - - protected function normalizeName(string $name): string - { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name)); - } - - private function getCallableParameters($callable, bool $isVariadic): array - { - list($r) = $this->reflectCallable($callable); - if (null === $r) { - return [[], false]; - } - - $parameters = $r->getParameters(); - if ($this->hasNode('node')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - array_shift($parameters); - } - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - array_shift($parameters); - } - if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - array_shift($parameters); - } - } - $isPhpVariadic = false; - if ($isVariadic) { - $argument = end($parameters); - $isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName(); - if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) { - array_pop($parameters); - } elseif ($argument && $argument->isVariadic()) { - array_pop($parameters); - $isPhpVariadic = true; - } else { - $callableName = $r->name; - if ($r instanceof \ReflectionMethod) { - $callableName = $r->getDeclaringClass()->name.'::'.$callableName; - } - - throw new \LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); - } - } - - return [$parameters, $isPhpVariadic]; - } - - private function reflectCallable($callable) - { - if (null !== $this->reflector) { - return $this->reflector; - } - - if (\is_array($callable)) { - if (!method_exists($callable[0], $callable[1])) { - // __call() - return [null, []]; - } - $r = new \ReflectionMethod($callable[0], $callable[1]); - } elseif (\is_object($callable) && !$callable instanceof \Closure) { - $r = new \ReflectionObject($callable); - $r = $r->getMethod('__invoke'); - $callable = [$callable, '__invoke']; - } elseif (\is_string($callable) && false !== $pos = strpos($callable, '::')) { - $class = substr($callable, 0, $pos); - $method = substr($callable, $pos + 2); - if (!method_exists($class, $method)) { - // __staticCall() - return [null, []]; - } - $r = new \ReflectionMethod($callable); - $callable = [$class, $method]; - } else { - $r = new \ReflectionFunction($callable); - } - - return $this->reflector = [$r, $callable]; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php b/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php deleted file mode 100644 index 2c7bd0a..0000000 --- a/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php +++ /dev/null @@ -1,36 +0,0 @@ - $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('((') - ->subcompile($this->getNode('expr1')) - ->raw(') ? (') - ->subcompile($this->getNode('expr2')) - ->raw(') : (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/ConstantExpression.php b/vendor/twig/twig/src/Node/Expression/ConstantExpression.php deleted file mode 100644 index 7ddbcc6..0000000 --- a/vendor/twig/twig/src/Node/Expression/ConstantExpression.php +++ /dev/null @@ -1,28 +0,0 @@ - $value], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler->repr($this->getAttribute('value')); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php b/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php deleted file mode 100644 index 6a572d4..0000000 --- a/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class DefaultFilter extends FilterExpression -{ - public function __construct(Node $node, ConstantExpression $filterName, Node $arguments, int $lineno, string $tag = null) - { - $default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine()); - - if ('default' === $filterName->getAttribute('value') && ($node instanceof NameExpression || $node instanceof GetAttrExpression)) { - $test = new DefinedTest(clone $node, 'defined', new Node(), $node->getTemplateLine()); - $false = \count($arguments) ? $arguments->getNode(0) : new ConstantExpression('', $node->getTemplateLine()); - - $node = new ConditionalExpression($test, $default, $false, $node->getTemplateLine()); - } else { - $node = $default; - } - - parent::__construct($node, $filterName, $arguments, $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('node')); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/FilterExpression.php b/vendor/twig/twig/src/Node/Expression/FilterExpression.php deleted file mode 100644 index 0fc1588..0000000 --- a/vendor/twig/twig/src/Node/Expression/FilterExpression.php +++ /dev/null @@ -1,40 +0,0 @@ - $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getNode('filter')->getAttribute('value'); - $filter = $compiler->getEnvironment()->getFilter($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'filter'); - $this->setAttribute('needs_environment', $filter->needsEnvironment()); - $this->setAttribute('needs_context', $filter->needsContext()); - $this->setAttribute('arguments', $filter->getArguments()); - $this->setAttribute('callable', $filter->getCallable()); - $this->setAttribute('is_variadic', $filter->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/FunctionExpression.php b/vendor/twig/twig/src/Node/Expression/FunctionExpression.php deleted file mode 100644 index 7126977..0000000 --- a/vendor/twig/twig/src/Node/Expression/FunctionExpression.php +++ /dev/null @@ -1,43 +0,0 @@ - $arguments], ['name' => $name, 'is_defined_test' => false], $lineno); - } - - public function compile(Compiler $compiler) - { - $name = $this->getAttribute('name'); - $function = $compiler->getEnvironment()->getFunction($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'function'); - $this->setAttribute('needs_environment', $function->needsEnvironment()); - $this->setAttribute('needs_context', $function->needsContext()); - $this->setAttribute('arguments', $function->getArguments()); - $callable = $function->getCallable(); - if ('constant' === $name && $this->getAttribute('is_defined_test')) { - $callable = 'twig_constant_is_defined'; - } - $this->setAttribute('callable', $callable); - $this->setAttribute('is_variadic', $function->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php b/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php deleted file mode 100644 index e6a75ce..0000000 --- a/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php +++ /dev/null @@ -1,87 +0,0 @@ - $node, 'attribute' => $attribute]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'optimizable' => true], $lineno); - } - - public function compile(Compiler $compiler): void - { - $env = $compiler->getEnvironment(); - - // optimize array calls - if ( - $this->getAttribute('optimizable') - && (!$env->isStrictVariables() || $this->getAttribute('ignore_strict_check')) - && !$this->getAttribute('is_defined_test') - && Template::ARRAY_CALL === $this->getAttribute('type') - ) { - $var = '$'.$compiler->getVarName(); - $compiler - ->raw('(('.$var.' = ') - ->subcompile($this->getNode('node')) - ->raw(') && is_array(') - ->raw($var) - ->raw(') || ') - ->raw($var) - ->raw(' instanceof ArrayAccess ? (') - ->raw($var) - ->raw('[') - ->subcompile($this->getNode('attribute')) - ->raw('] ?? null) : null)') - ; - - return; - } - - $compiler->raw('twig_get_attribute($this->env, $this->source, '); - - if ($this->getAttribute('ignore_strict_check')) { - $this->getNode('node')->setAttribute('ignore_strict_check', true); - } - - $compiler - ->subcompile($this->getNode('node')) - ->raw(', ') - ->subcompile($this->getNode('attribute')) - ; - - if ($this->hasNode('arguments')) { - $compiler->raw(', ')->subcompile($this->getNode('arguments')); - } else { - $compiler->raw(', []'); - } - - $compiler->raw(', ') - ->repr($this->getAttribute('type')) - ->raw(', ')->repr($this->getAttribute('is_defined_test')) - ->raw(', ')->repr($this->getAttribute('ignore_strict_check')) - ->raw(', ')->repr($env->hasExtension(SandboxExtension::class)) - ->raw(', ')->repr($this->getNode('node')->getTemplateLine()) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/InlinePrint.php b/vendor/twig/twig/src/Node/Expression/InlinePrint.php deleted file mode 100644 index 1ad4751..0000000 --- a/vendor/twig/twig/src/Node/Expression/InlinePrint.php +++ /dev/null @@ -1,35 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('print (') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php b/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php deleted file mode 100644 index d5ec0b6..0000000 --- a/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php +++ /dev/null @@ -1,62 +0,0 @@ - $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false, 'is_defined_test' => false], $lineno); - - if ($node instanceof NameExpression) { - $node->setAttribute('always_defined', true); - } - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('is_defined_test')) { - $compiler - ->raw('method_exists($macros[') - ->repr($this->getNode('node')->getAttribute('name')) - ->raw('], ') - ->repr($this->getAttribute('method')) - ->raw(')') - ; - - return; - } - - $compiler - ->raw('twig_call_macro($macros[') - ->repr($this->getNode('node')->getAttribute('name')) - ->raw('], ') - ->repr($this->getAttribute('method')) - ->raw(', [') - ; - $first = true; - foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) { - if (!$first) { - $compiler->raw(', '); - } - $first = false; - - $compiler->subcompile($pair['value']); - } - $compiler - ->raw('], ') - ->repr($this->getTemplateLine()) - ->raw(', $context, $this->getSourceContext())'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/NameExpression.php b/vendor/twig/twig/src/Node/Expression/NameExpression.php deleted file mode 100644 index c3563f0..0000000 --- a/vendor/twig/twig/src/Node/Expression/NameExpression.php +++ /dev/null @@ -1,97 +0,0 @@ - '$this->getTemplateName()', - '_context' => '$context', - '_charset' => '$this->env->getCharset()', - ]; - - public function __construct(string $name, int $lineno) - { - parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getAttribute('name'); - - $compiler->addDebugInfo($this); - - if ($this->getAttribute('is_defined_test')) { - if ($this->isSpecial()) { - $compiler->repr(true); - } elseif (\PHP_VERSION_ID >= 70400) { - $compiler - ->raw('array_key_exists(') - ->string($name) - ->raw(', $context)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) || array_key_exists(') - ->string($name) - ->raw(', $context))') - ; - } - } elseif ($this->isSpecial()) { - $compiler->raw($this->specialVars[$name]); - } elseif ($this->getAttribute('always_defined')) { - $compiler - ->raw('$context[') - ->string($name) - ->raw(']') - ; - } else { - if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { - $compiler - ->raw('($context[') - ->string($name) - ->raw('] ?? null)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) || array_key_exists(') - ->string($name) - ->raw(', $context) ? $context[') - ->string($name) - ->raw('] : (function () { throw new RuntimeError(\'Variable ') - ->string($name) - ->raw(' does not exist.\', ') - ->repr($this->lineno) - ->raw(', $this->source); })()') - ->raw(')') - ; - } - } - } - - public function isSpecial() - { - return isset($this->specialVars[$this->getAttribute('name')]); - } - - public function isSimple() - { - return !$this->isSpecial() && !$this->getAttribute('is_defined_test'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php b/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php deleted file mode 100644 index a72bc4f..0000000 --- a/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php +++ /dev/null @@ -1,60 +0,0 @@ -getTemplateLine()); - // for "block()", we don't need the null test as the return value is always a string - if (!$left instanceof BlockReferenceExpression) { - $test = new AndBinary( - $test, - new NotUnary(new NullTest($left, 'null', new Node(), $left->getTemplateLine()), $left->getTemplateLine()), - $left->getTemplateLine() - ); - } - - parent::__construct($test, $left, $right, $lineno); - } - - public function compile(Compiler $compiler): void - { - /* - * This optimizes only one case. PHP 7 also supports more complex expressions - * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works, - * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced - * cases might be implemented as an optimizer node visitor, but has not been done - * as benefits are probably not worth the added complexity. - */ - if ($this->getNode('expr2') instanceof NameExpression) { - $this->getNode('expr2')->setAttribute('always_defined', true); - $compiler - ->raw('((') - ->subcompile($this->getNode('expr2')) - ->raw(') ?? (') - ->subcompile($this->getNode('expr3')) - ->raw('))') - ; - } else { - parent::compile($compiler); - } - } -} diff --git a/vendor/twig/twig/src/Node/Expression/ParentExpression.php b/vendor/twig/twig/src/Node/Expression/ParentExpression.php deleted file mode 100644 index 2549197..0000000 --- a/vendor/twig/twig/src/Node/Expression/ParentExpression.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class ParentExpression extends AbstractExpression -{ - public function __construct(string $name, int $lineno, string $tag = null) - { - parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('output')) { - $compiler - ->addDebugInfo($this) - ->write('$this->displayParentBlock(') - ->string($this->getAttribute('name')) - ->raw(", \$context, \$blocks);\n") - ; - } else { - $compiler - ->raw('$this->renderParentBlock(') - ->string($this->getAttribute('name')) - ->raw(', $context, $blocks)') - ; - } - } -} diff --git a/vendor/twig/twig/src/Node/Expression/TempNameExpression.php b/vendor/twig/twig/src/Node/Expression/TempNameExpression.php deleted file mode 100644 index 004c704..0000000 --- a/vendor/twig/twig/src/Node/Expression/TempNameExpression.php +++ /dev/null @@ -1,31 +0,0 @@ - $name], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->raw('$_') - ->raw($this->getAttribute('name')) - ->raw('_') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php b/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php deleted file mode 100644 index 57e9319..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class ConstantTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === constant(') - ; - - if ($this->getNode('arguments')->hasNode(1)) { - $compiler - ->raw('get_class(') - ->subcompile($this->getNode('arguments')->getNode(1)) - ->raw(')."::".') - ; - } - - $compiler - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw('))') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php b/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php deleted file mode 100644 index 3953bbb..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class DefinedTest extends TestExpression -{ - public function __construct(Node $node, string $name, ?Node $arguments, int $lineno) - { - if ($node instanceof NameExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof GetAttrExpression) { - $node->setAttribute('is_defined_test', true); - $this->changeIgnoreStrictCheck($node); - } elseif ($node instanceof BlockReferenceExpression) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) { - $node->setAttribute('is_defined_test', true); - } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) { - $node = new ConstantExpression(true, $node->getTemplateLine()); - } elseif ($node instanceof MethodCallExpression) { - $node->setAttribute('is_defined_test', true); - } else { - throw new SyntaxError('The "defined" test only works with simple variables.', $lineno); - } - - parent::__construct($node, $name, $arguments, $lineno); - } - - private function changeIgnoreStrictCheck(GetAttrExpression $node) - { - $node->setAttribute('optimizable', false); - $node->setAttribute('ignore_strict_check', true); - - if ($node->getNode('node') instanceof GetAttrExpression) { - $this->changeIgnoreStrictCheck($node->getNode('node')); - } - } - - public function compile(Compiler $compiler): void - { - $compiler->subcompile($this->getNode('node')); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php b/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php deleted file mode 100644 index 4cb3ee0..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class DivisiblebyTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(0 == ') - ->subcompile($this->getNode('node')) - ->raw(' % ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php b/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php deleted file mode 100644 index a0e3ed6..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class EvenTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 == 0') - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/NullTest.php b/vendor/twig/twig/src/Node/Expression/Test/NullTest.php deleted file mode 100644 index 45b54ae..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/NullTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class NullTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(null === ') - ->subcompile($this->getNode('node')) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/OddTest.php b/vendor/twig/twig/src/Node/Expression/Test/OddTest.php deleted file mode 100644 index d56c711..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/OddTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class OddTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' % 2 != 0') - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php b/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php deleted file mode 100644 index c96d2bc..0000000 --- a/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class SameasTest extends TestExpression -{ - public function compile(Compiler $compiler): void - { - $compiler - ->raw('(') - ->subcompile($this->getNode('node')) - ->raw(' === ') - ->subcompile($this->getNode('arguments')->getNode(0)) - ->raw(')') - ; - } -} diff --git a/vendor/twig/twig/src/Node/Expression/TestExpression.php b/vendor/twig/twig/src/Node/Expression/TestExpression.php deleted file mode 100644 index e518bd8..0000000 --- a/vendor/twig/twig/src/Node/Expression/TestExpression.php +++ /dev/null @@ -1,42 +0,0 @@ - $node]; - if (null !== $arguments) { - $nodes['arguments'] = $arguments; - } - - parent::__construct($nodes, ['name' => $name], $lineno); - } - - public function compile(Compiler $compiler): void - { - $name = $this->getAttribute('name'); - $test = $compiler->getEnvironment()->getTest($name); - - $this->setAttribute('name', $name); - $this->setAttribute('type', 'test'); - $this->setAttribute('arguments', $test->getArguments()); - $this->setAttribute('callable', $test->getCallable()); - $this->setAttribute('is_variadic', $test->isVariadic()); - - $this->compileCallable($compiler); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php b/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php deleted file mode 100644 index e31e3f8..0000000 --- a/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +++ /dev/null @@ -1,34 +0,0 @@ - $node], [], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler->raw(' '); - $this->operator($compiler); - $compiler->subcompile($this->getNode('node')); - } - - abstract public function operator(Compiler $compiler): Compiler; -} diff --git a/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php b/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php deleted file mode 100644 index dc2f235..0000000 --- a/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('-'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php b/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php deleted file mode 100644 index 55c11ba..0000000 --- a/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('!'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php b/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php deleted file mode 100644 index 4b0a062..0000000 --- a/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php +++ /dev/null @@ -1,23 +0,0 @@ -raw('+'); - } -} diff --git a/vendor/twig/twig/src/Node/Expression/VariadicExpression.php b/vendor/twig/twig/src/Node/Expression/VariadicExpression.php deleted file mode 100644 index a1bdb48..0000000 --- a/vendor/twig/twig/src/Node/Expression/VariadicExpression.php +++ /dev/null @@ -1,24 +0,0 @@ -raw('...'); - - parent::compile($compiler); - } -} diff --git a/vendor/twig/twig/src/Node/FlushNode.php b/vendor/twig/twig/src/Node/FlushNode.php deleted file mode 100644 index fa50a88..0000000 --- a/vendor/twig/twig/src/Node/FlushNode.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class FlushNode extends Node -{ - public function __construct(int $lineno, string $tag) - { - parent::__construct([], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("flush();\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/ForLoopNode.php b/vendor/twig/twig/src/Node/ForLoopNode.php deleted file mode 100644 index d5ce845..0000000 --- a/vendor/twig/twig/src/Node/ForLoopNode.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class ForLoopNode extends Node -{ - public function __construct(int $lineno, string $tag = null) - { - parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - if ($this->getAttribute('else')) { - $compiler->write("\$context['_iterated'] = true;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("++\$context['loop']['index0'];\n") - ->write("++\$context['loop']['index'];\n") - ->write("\$context['loop']['first'] = false;\n") - ->write("if (isset(\$context['loop']['length'])) {\n") - ->indent() - ->write("--\$context['loop']['revindex0'];\n") - ->write("--\$context['loop']['revindex'];\n") - ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n") - ->outdent() - ->write("}\n") - ; - } - } -} diff --git a/vendor/twig/twig/src/Node/ForNode.php b/vendor/twig/twig/src/Node/ForNode.php deleted file mode 100644 index 04addfb..0000000 --- a/vendor/twig/twig/src/Node/ForNode.php +++ /dev/null @@ -1,107 +0,0 @@ - - */ -class ForNode extends Node -{ - private $loop; - - public function __construct(AssignNameExpression $keyTarget, AssignNameExpression $valueTarget, AbstractExpression $seq, ?Node $ifexpr, Node $body, ?Node $else, int $lineno, string $tag = null) - { - $body = new Node([$body, $this->loop = new ForLoopNode($lineno, $tag)]); - - $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, ['with_loop' => true], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("\$context['_parent'] = \$context;\n") - ->write("\$context['_seq'] = twig_ensure_traversable(") - ->subcompile($this->getNode('seq')) - ->raw(");\n") - ; - - if ($this->hasNode('else')) { - $compiler->write("\$context['_iterated'] = false;\n"); - } - - if ($this->getAttribute('with_loop')) { - $compiler - ->write("\$context['loop'] = [\n") - ->write(" 'parent' => \$context['_parent'],\n") - ->write(" 'index0' => 0,\n") - ->write(" 'index' => 1,\n") - ->write(" 'first' => true,\n") - ->write("];\n") - ->write("if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof \Countable)) {\n") - ->indent() - ->write("\$length = count(\$context['_seq']);\n") - ->write("\$context['loop']['revindex0'] = \$length - 1;\n") - ->write("\$context['loop']['revindex'] = \$length;\n") - ->write("\$context['loop']['length'] = \$length;\n") - ->write("\$context['loop']['last'] = 1 === \$length;\n") - ->outdent() - ->write("}\n") - ; - } - - $this->loop->setAttribute('else', $this->hasNode('else')); - $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop')); - - $compiler - ->write("foreach (\$context['_seq'] as ") - ->subcompile($this->getNode('key_target')) - ->raw(' => ') - ->subcompile($this->getNode('value_target')) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("}\n") - ; - - if ($this->hasNode('else')) { - $compiler - ->write("if (!\$context['_iterated']) {\n") - ->indent() - ->subcompile($this->getNode('else')) - ->outdent() - ->write("}\n") - ; - } - - $compiler->write("\$_parent = \$context['_parent'];\n"); - - // remove some "private" loop variables (needed for nested loops) - $compiler->write('unset($context[\'_seq\'], $context[\'_iterated\'], $context[\''.$this->getNode('key_target')->getAttribute('name').'\'], $context[\''.$this->getNode('value_target')->getAttribute('name').'\'], $context[\'_parent\'], $context[\'loop\']);'."\n"); - - // keep the values set in the inner context for variables defined in the outer context - $compiler->write("\$context = array_intersect_key(\$context, \$_parent) + \$_parent;\n"); - } -} diff --git a/vendor/twig/twig/src/Node/IfNode.php b/vendor/twig/twig/src/Node/IfNode.php deleted file mode 100644 index 5fa2008..0000000 --- a/vendor/twig/twig/src/Node/IfNode.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -class IfNode extends Node -{ - public function __construct(Node $tests, ?Node $else, int $lineno, string $tag = null) - { - $nodes = ['tests' => $tests]; - if (null !== $else) { - $nodes['else'] = $else; - } - - parent::__construct($nodes, [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - for ($i = 0, $count = \count($this->getNode('tests')); $i < $count; $i += 2) { - if ($i > 0) { - $compiler - ->outdent() - ->write('} elseif (') - ; - } else { - $compiler - ->write('if (') - ; - } - - $compiler - ->subcompile($this->getNode('tests')->getNode($i)) - ->raw(") {\n") - ->indent() - ->subcompile($this->getNode('tests')->getNode($i + 1)) - ; - } - - if ($this->hasNode('else')) { - $compiler - ->outdent() - ->write("} else {\n") - ->indent() - ->subcompile($this->getNode('else')) - ; - } - - $compiler - ->outdent() - ->write("}\n"); - } -} diff --git a/vendor/twig/twig/src/Node/ImportNode.php b/vendor/twig/twig/src/Node/ImportNode.php deleted file mode 100644 index 5378d79..0000000 --- a/vendor/twig/twig/src/Node/ImportNode.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -class ImportNode extends Node -{ - public function __construct(AbstractExpression $expr, AbstractExpression $var, int $lineno, string $tag = null, bool $global = true) - { - parent::__construct(['expr' => $expr, 'var' => $var], ['global' => $global], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('$macros[') - ->repr($this->getNode('var')->getAttribute('name')) - ->raw('] = ') - ; - - if ($this->getAttribute('global')) { - $compiler - ->raw('$this->macros[') - ->repr($this->getNode('var')->getAttribute('name')) - ->raw('] = ') - ; - } - - if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) { - $compiler->raw('$this'); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')->unwrap()') - ; - } - - $compiler->raw(";\n"); - } -} diff --git a/vendor/twig/twig/src/Node/IncludeNode.php b/vendor/twig/twig/src/Node/IncludeNode.php deleted file mode 100644 index d540d6b..0000000 --- a/vendor/twig/twig/src/Node/IncludeNode.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ -class IncludeNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null) - { - $nodes = ['expr' => $expr]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => $only, 'ignore_missing' => $ignoreMissing], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - if ($this->getAttribute('ignore_missing')) { - $template = $compiler->getVarName(); - - $compiler - ->write(sprintf("$%s = null;\n", $template)) - ->write("try {\n") - ->indent() - ->write(sprintf('$%s = ', $template)) - ; - - $this->addGetTemplate($compiler); - - $compiler - ->raw(";\n") - ->outdent() - ->write("} catch (LoaderError \$e) {\n") - ->indent() - ->write("// ignore missing template\n") - ->outdent() - ->write("}\n") - ->write(sprintf("if ($%s) {\n", $template)) - ->indent() - ->write(sprintf('$%s->display(', $template)) - ; - $this->addTemplateArguments($compiler); - $compiler - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } else { - $this->addGetTemplate($compiler); - $compiler->raw('->display('); - $this->addTemplateArguments($compiler); - $compiler->raw(");\n"); - } - } - - protected function addGetTemplate(Compiler $compiler) - { - $compiler - ->write('$this->loadTemplate(') - ->subcompile($this->getNode('expr')) - ->raw(', ') - ->repr($this->getTemplateName()) - ->raw(', ') - ->repr($this->getTemplateLine()) - ->raw(')') - ; - } - - protected function addTemplateArguments(Compiler $compiler) - { - if (!$this->hasNode('variables')) { - $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]'); - } elseif (false === $this->getAttribute('only')) { - $compiler - ->raw('twig_array_merge($context, ') - ->subcompile($this->getNode('variables')) - ->raw(')') - ; - } else { - $compiler->raw('twig_to_array('); - $compiler->subcompile($this->getNode('variables')); - $compiler->raw(')'); - } - } -} diff --git a/vendor/twig/twig/src/Node/MacroNode.php b/vendor/twig/twig/src/Node/MacroNode.php deleted file mode 100644 index 7f1b24d..0000000 --- a/vendor/twig/twig/src/Node/MacroNode.php +++ /dev/null @@ -1,113 +0,0 @@ - - */ -class MacroNode extends Node -{ - public const VARARGS_NAME = 'varargs'; - - public function __construct(string $name, Node $body, Node $arguments, int $lineno, string $tag = null) - { - foreach ($arguments as $argumentName => $argument) { - if (self::VARARGS_NAME === $argumentName) { - throw new SyntaxError(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getTemplateLine(), $argument->getSourceContext()); - } - } - - parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write(sprintf('public function macro_%s(', $this->getAttribute('name'))) - ; - - $count = \count($this->getNode('arguments')); - $pos = 0; - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->raw('$__'.$name.'__ = ') - ->subcompile($default) - ; - - if (++$pos < $count) { - $compiler->raw(', '); - } - } - - if ($count) { - $compiler->raw(', '); - } - - $compiler - ->raw('...$__varargs__') - ->raw(")\n") - ->write("{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ->write("\$context = \$this->env->mergeGlobals([\n") - ->indent() - ; - - foreach ($this->getNode('arguments') as $name => $default) { - $compiler - ->write('') - ->string($name) - ->raw(' => $__'.$name.'__') - ->raw(",\n") - ; - } - - $compiler - ->write('') - ->string(self::VARARGS_NAME) - ->raw(' => ') - ; - - $compiler - ->raw("\$__varargs__,\n") - ->outdent() - ->write("]);\n\n") - ->write("\$blocks = [];\n\n") - ; - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->raw("\n") - ->write("return ('' === \$tmp = ob_get_contents()) ? '' : new Markup(\$tmp, \$this->env->getCharset());\n") - ->outdent() - ->write("} finally {\n") - ->indent() - ->write("ob_end_clean();\n") - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/ModuleNode.php b/vendor/twig/twig/src/Node/ModuleNode.php deleted file mode 100644 index e972b6b..0000000 --- a/vendor/twig/twig/src/Node/ModuleNode.php +++ /dev/null @@ -1,464 +0,0 @@ - - */ -final class ModuleNode extends Node -{ - public function __construct(Node $body, ?AbstractExpression $parent, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source) - { - $nodes = [ - 'body' => $body, - 'blocks' => $blocks, - 'macros' => $macros, - 'traits' => $traits, - 'display_start' => new Node(), - 'display_end' => new Node(), - 'constructor_start' => new Node(), - 'constructor_end' => new Node(), - 'class_end' => new Node(), - ]; - if (null !== $parent) { - $nodes['parent'] = $parent; - } - - // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct($nodes, [ - 'index' => null, - 'embedded_templates' => $embeddedTemplates, - ], 1); - - // populate the template name of all node children - $this->setSourceContext($source); - } - - public function setIndex($index) - { - $this->setAttribute('index', $index); - } - - public function compile(Compiler $compiler): void - { - $this->compileTemplate($compiler); - - foreach ($this->getAttribute('embedded_templates') as $template) { - $compiler->subcompile($template); - } - } - - protected function compileTemplate(Compiler $compiler) - { - if (!$this->getAttribute('index')) { - $compiler->write('compileClassHeader($compiler); - - $this->compileConstructor($compiler); - - $this->compileGetParent($compiler); - - $this->compileDisplay($compiler); - - $compiler->subcompile($this->getNode('blocks')); - - $this->compileMacros($compiler); - - $this->compileGetTemplateName($compiler); - - $this->compileIsTraitable($compiler); - - $this->compileDebugInfo($compiler); - - $this->compileGetSourceContext($compiler); - - $this->compileClassFooter($compiler); - } - - protected function compileGetParent(Compiler $compiler) - { - if (!$this->hasNode('parent')) { - return; - } - $parent = $this->getNode('parent'); - - $compiler - ->write("protected function doGetParent(array \$context)\n", "{\n") - ->indent() - ->addDebugInfo($parent) - ->write('return ') - ; - - if ($parent instanceof ConstantExpression) { - $compiler->subcompile($parent); - } else { - $compiler - ->raw('$this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(')') - ; - } - - $compiler - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassHeader(Compiler $compiler) - { - $compiler - ->write("\n\n") - ; - if (!$this->getAttribute('index')) { - $compiler - ->write("use Twig\Environment;\n") - ->write("use Twig\Error\LoaderError;\n") - ->write("use Twig\Error\RuntimeError;\n") - ->write("use Twig\Extension\SandboxExtension;\n") - ->write("use Twig\Markup;\n") - ->write("use Twig\Sandbox\SecurityError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedTagError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFilterError;\n") - ->write("use Twig\Sandbox\SecurityNotAllowedFunctionError;\n") - ->write("use Twig\Source;\n") - ->write("use Twig\Template;\n\n") - ; - } - $compiler - // if the template name contains */, add a blank to avoid a PHP parse error - ->write('/* '.str_replace('*/', '* /', $this->getSourceContext()->getName())." */\n") - ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getSourceContext()->getName(), $this->getAttribute('index'))) - ->raw(" extends Template\n") - ->write("{\n") - ->indent() - ->write("private \$source;\n") - ->write("private \$macros = [];\n\n") - ; - } - - protected function compileConstructor(Compiler $compiler) - { - $compiler - ->write("public function __construct(Environment \$env)\n", "{\n") - ->indent() - ->subcompile($this->getNode('constructor_start')) - ->write("parent::__construct(\$env);\n\n") - ->write("\$this->source = \$this->getSourceContext();\n\n") - ; - - // parent - if (!$this->hasNode('parent')) { - $compiler->write("\$this->parent = false;\n\n"); - } - - $countTraits = \count($this->getNode('traits')); - if ($countTraits) { - // traits - foreach ($this->getNode('traits') as $i => $trait) { - $node = $trait->getNode('template'); - - $compiler - ->addDebugInfo($node) - ->write(sprintf('$_trait_%s = $this->loadTemplate(', $i)) - ->subcompile($node) - ->raw(', ') - ->repr($node->getTemplateName()) - ->raw(', ') - ->repr($node->getTemplateLine()) - ->raw(");\n") - ->write(sprintf("if (!\$_trait_%s->isTraitable()) {\n", $i)) - ->indent() - ->write("throw new RuntimeError('Template \"'.") - ->subcompile($trait->getNode('template')) - ->raw(".'\" cannot be used as a trait.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->source);\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$_trait_%s_blocks = \$_trait_%s->getBlocks();\n\n", $i, $i)) - ; - - foreach ($trait->getNode('targets') as $key => $value) { - $compiler - ->write(sprintf('if (!isset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("])) {\n") - ->indent() - ->write("throw new RuntimeError('Block ") - ->string($key) - ->raw(' is not defined in trait ') - ->subcompile($trait->getNode('template')) - ->raw(".', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->source);\n") - ->outdent() - ->write("}\n\n") - - ->write(sprintf('$_trait_%s_blocks[', $i)) - ->subcompile($value) - ->raw(sprintf('] = $_trait_%s_blocks[', $i)) - ->string($key) - ->raw(sprintf(']; unset($_trait_%s_blocks[', $i)) - ->string($key) - ->raw("]);\n\n") - ; - } - } - - if ($countTraits > 1) { - $compiler - ->write("\$this->traits = array_merge(\n") - ->indent() - ; - - for ($i = 0; $i < $countTraits; ++$i) { - $compiler - ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i)) - ; - } - - $compiler - ->outdent() - ->write(");\n\n") - ; - } else { - $compiler - ->write("\$this->traits = \$_trait_0_blocks;\n\n") - ; - } - - $compiler - ->write("\$this->blocks = array_merge(\n") - ->indent() - ->write("\$this->traits,\n") - ->write("[\n") - ; - } else { - $compiler - ->write("\$this->blocks = [\n") - ; - } - - // blocks - $compiler - ->indent() - ; - - foreach ($this->getNode('blocks') as $name => $node) { - $compiler - ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name)) - ; - } - - if ($countTraits) { - $compiler - ->outdent() - ->write("]\n") - ->outdent() - ->write(");\n") - ; - } else { - $compiler - ->outdent() - ->write("];\n") - ; - } - - $compiler - ->subcompile($this->getNode('constructor_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDisplay(Compiler $compiler) - { - $compiler - ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n") - ->indent() - ->write("\$macros = \$this->macros;\n") - ->subcompile($this->getNode('display_start')) - ->subcompile($this->getNode('body')) - ; - - if ($this->hasNode('parent')) { - $parent = $this->getNode('parent'); - - $compiler->addDebugInfo($parent); - if ($parent instanceof ConstantExpression) { - $compiler - ->write('$this->parent = $this->loadTemplate(') - ->subcompile($parent) - ->raw(', ') - ->repr($this->getSourceContext()->getName()) - ->raw(', ') - ->repr($parent->getTemplateLine()) - ->raw(");\n") - ; - $compiler->write('$this->parent'); - } else { - $compiler->write('$this->getParent($context)'); - } - $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n"); - } - - $compiler - ->subcompile($this->getNode('display_end')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileClassFooter(Compiler $compiler) - { - $compiler - ->subcompile($this->getNode('class_end')) - ->outdent() - ->write("}\n") - ; - } - - protected function compileMacros(Compiler $compiler) - { - $compiler->subcompile($this->getNode('macros')); - } - - protected function compileGetTemplateName(Compiler $compiler) - { - $compiler - ->write("public function getTemplateName()\n", "{\n") - ->indent() - ->write('return ') - ->repr($this->getSourceContext()->getName()) - ->raw(";\n") - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileIsTraitable(Compiler $compiler) - { - // A template can be used as a trait if: - // * it has no parent - // * it has no macros - // * it has no body - // - // Put another way, a template can be used as a trait if it - // only contains blocks and use statements. - $traitable = !$this->hasNode('parent') && 0 === \count($this->getNode('macros')); - if ($traitable) { - if ($this->getNode('body') instanceof BodyNode) { - $nodes = $this->getNode('body')->getNode(0); - } else { - $nodes = $this->getNode('body'); - } - - if (!\count($nodes)) { - $nodes = new Node([$nodes]); - } - - foreach ($nodes as $node) { - if (!\count($node)) { - continue; - } - - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if ($node instanceof BlockReferenceNode) { - continue; - } - - $traitable = false; - break; - } - } - - if ($traitable) { - return; - } - - $compiler - ->write("public function isTraitable()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", $traitable ? 'true' : 'false')) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileDebugInfo(Compiler $compiler) - { - $compiler - ->write("public function getDebugInfo()\n", "{\n") - ->indent() - ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true)))) - ->outdent() - ->write("}\n\n") - ; - } - - protected function compileGetSourceContext(Compiler $compiler) - { - $compiler - ->write("public function getSourceContext()\n", "{\n") - ->indent() - ->write('return new Source(') - ->string($compiler->getEnvironment()->isDebug() ? $this->getSourceContext()->getCode() : '') - ->raw(', ') - ->string($this->getSourceContext()->getName()) - ->raw(', ') - ->string($this->getSourceContext()->getPath()) - ->raw(");\n") - ->outdent() - ->write("}\n") - ; - } - - protected function compileLoadTemplate(Compiler $compiler, $node, $var) - { - if ($node instanceof ConstantExpression) { - $compiler - ->write(sprintf('%s = $this->loadTemplate(', $var)) - ->subcompile($node) - ->raw(', ') - ->repr($node->getTemplateName()) - ->raw(', ') - ->repr($node->getTemplateLine()) - ->raw(");\n") - ; - } else { - throw new \LogicException('Trait templates can only be constant nodes.'); - } - } -} diff --git a/vendor/twig/twig/src/Node/Node.php b/vendor/twig/twig/src/Node/Node.php deleted file mode 100644 index c0558b9..0000000 --- a/vendor/twig/twig/src/Node/Node.php +++ /dev/null @@ -1,179 +0,0 @@ - - */ -class Node implements \Countable, \IteratorAggregate -{ - protected $nodes; - protected $attributes; - protected $lineno; - protected $tag; - - private $name; - private $sourceContext; - - /** - * @param array $nodes An array of named nodes - * @param array $attributes An array of attributes (should not be nodes) - * @param int $lineno The line number - * @param string $tag The tag name associated with the Node - */ - public function __construct(array $nodes = [], array $attributes = [], int $lineno = 0, string $tag = null) - { - foreach ($nodes as $name => $node) { - if (!$node instanceof self) { - throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, static::class)); - } - } - $this->nodes = $nodes; - $this->attributes = $attributes; - $this->lineno = $lineno; - $this->tag = $tag; - } - - public function __toString() - { - $attributes = []; - foreach ($this->attributes as $name => $value) { - $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); - } - - $repr = [static::class.'('.implode(', ', $attributes)]; - - if (\count($this->nodes)) { - foreach ($this->nodes as $name => $node) { - $len = \strlen($name) + 4; - $noderepr = []; - foreach (explode("\n", (string) $node) as $line) { - $noderepr[] = str_repeat(' ', $len).$line; - } - - $repr[] = sprintf(' %s: %s', $name, ltrim(implode("\n", $noderepr))); - } - - $repr[] = ')'; - } else { - $repr[0] .= ')'; - } - - return implode("\n", $repr); - } - - /** - * @return void - */ - public function compile(Compiler $compiler) - { - foreach ($this->nodes as $node) { - $node->compile($compiler); - } - } - - public function getTemplateLine(): int - { - return $this->lineno; - } - - public function getNodeTag(): ?string - { - return $this->tag; - } - - public function hasAttribute(string $name): bool - { - return \array_key_exists($name, $this->attributes); - } - - public function getAttribute(string $name) - { - if (!\array_key_exists($name, $this->attributes)) { - throw new \LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->attributes[$name]; - } - - public function setAttribute(string $name, $value): void - { - $this->attributes[$name] = $value; - } - - public function removeAttribute(string $name): void - { - unset($this->attributes[$name]); - } - - public function hasNode(string $name): bool - { - return isset($this->nodes[$name]); - } - - public function getNode(string $name): self - { - if (!isset($this->nodes[$name])) { - throw new \LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, static::class)); - } - - return $this->nodes[$name]; - } - - public function setNode(string $name, self $node): void - { - $this->nodes[$name] = $node; - } - - public function removeNode(string $name): void - { - unset($this->nodes[$name]); - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->nodes); - } - - public function getIterator(): \Traversable - { - return new \ArrayIterator($this->nodes); - } - - public function getTemplateName(): ?string - { - return $this->sourceContext ? $this->sourceContext->getName() : null; - } - - public function setSourceContext(Source $source): void - { - $this->sourceContext = $source; - foreach ($this->nodes as $node) { - $node->setSourceContext($source); - } - } - - public function getSourceContext(): ?Source - { - return $this->sourceContext; - } -} diff --git a/vendor/twig/twig/src/Node/NodeCaptureInterface.php b/vendor/twig/twig/src/Node/NodeCaptureInterface.php deleted file mode 100644 index 9fb6a0c..0000000 --- a/vendor/twig/twig/src/Node/NodeCaptureInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface NodeCaptureInterface -{ -} diff --git a/vendor/twig/twig/src/Node/NodeOutputInterface.php b/vendor/twig/twig/src/Node/NodeOutputInterface.php deleted file mode 100644 index 5e35b40..0000000 --- a/vendor/twig/twig/src/Node/NodeOutputInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface NodeOutputInterface -{ -} diff --git a/vendor/twig/twig/src/Node/PrintNode.php b/vendor/twig/twig/src/Node/PrintNode.php deleted file mode 100644 index 60386d2..0000000 --- a/vendor/twig/twig/src/Node/PrintNode.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class PrintNode extends Node implements NodeOutputInterface -{ - public function __construct(AbstractExpression $expr, int $lineno, string $tag = null) - { - parent::__construct(['expr' => $expr], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->subcompile($this->getNode('expr')) - ->raw(";\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/SandboxNode.php b/vendor/twig/twig/src/Node/SandboxNode.php deleted file mode 100644 index 4d5666b..0000000 --- a/vendor/twig/twig/src/Node/SandboxNode.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ -class SandboxNode extends Node -{ - public function __construct(Node $body, int $lineno, string $tag = null) - { - parent::__construct(['body' => $body], [], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n") - ->indent() - ->write("\$this->sandbox->enableSandbox();\n") - ->outdent() - ->write("}\n") - ->write("try {\n") - ->indent() - ->subcompile($this->getNode('body')) - ->outdent() - ->write("} finally {\n") - ->indent() - ->write("if (!\$alreadySandboxed) {\n") - ->indent() - ->write("\$this->sandbox->disableSandbox();\n") - ->outdent() - ->write("}\n") - ->outdent() - ->write("}\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/SetNode.php b/vendor/twig/twig/src/Node/SetNode.php deleted file mode 100644 index 96b6bd8..0000000 --- a/vendor/twig/twig/src/Node/SetNode.php +++ /dev/null @@ -1,105 +0,0 @@ - - */ -class SetNode extends Node implements NodeCaptureInterface -{ - public function __construct(bool $capture, Node $names, Node $values, int $lineno, string $tag = null) - { - parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag); - - /* - * Optimizes the node when capture is used for a large block of text. - * - * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Twig\Markup("foo"); - */ - if ($this->getAttribute('capture')) { - $this->setAttribute('safe', true); - - $values = $this->getNode('values'); - if ($values instanceof TextNode) { - $this->setNode('values', new ConstantExpression($values->getAttribute('data'), $values->getTemplateLine())); - $this->setAttribute('capture', false); - } - } - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('list('); - foreach ($this->getNode('names') as $idx => $node) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($node); - } - $compiler->raw(')'); - } else { - if ($this->getAttribute('capture')) { - if ($compiler->getEnvironment()->isDebug()) { - $compiler->write("ob_start();\n"); - } else { - $compiler->write("ob_start(function () { return ''; });\n"); - } - $compiler - ->subcompile($this->getNode('values')) - ; - } - - $compiler->subcompile($this->getNode('names'), false); - - if ($this->getAttribute('capture')) { - $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset())"); - } - } - - if (!$this->getAttribute('capture')) { - $compiler->raw(' = '); - - if (\count($this->getNode('names')) > 1) { - $compiler->write('['); - foreach ($this->getNode('values') as $idx => $value) { - if ($idx) { - $compiler->raw(', '); - } - - $compiler->subcompile($value); - } - $compiler->raw(']'); - } else { - if ($this->getAttribute('safe')) { - $compiler - ->raw("('' === \$tmp = ") - ->subcompile($this->getNode('values')) - ->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())") - ; - } else { - $compiler->subcompile($this->getNode('values')); - } - } - } - - $compiler->raw(";\n"); - } -} diff --git a/vendor/twig/twig/src/Node/TextNode.php b/vendor/twig/twig/src/Node/TextNode.php deleted file mode 100644 index d74ebe6..0000000 --- a/vendor/twig/twig/src/Node/TextNode.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class TextNode extends Node implements NodeOutputInterface -{ - public function __construct(string $data, int $lineno) - { - parent::__construct([], ['data' => $data], $lineno); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->addDebugInfo($this) - ->write('echo ') - ->string($this->getAttribute('data')) - ->raw(";\n") - ; - } -} diff --git a/vendor/twig/twig/src/Node/WithNode.php b/vendor/twig/twig/src/Node/WithNode.php deleted file mode 100644 index 56a3344..0000000 --- a/vendor/twig/twig/src/Node/WithNode.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -class WithNode extends Node -{ - public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, string $tag = null) - { - $nodes = ['body' => $body]; - if (null !== $variables) { - $nodes['variables'] = $variables; - } - - parent::__construct($nodes, ['only' => $only], $lineno, $tag); - } - - public function compile(Compiler $compiler): void - { - $compiler->addDebugInfo($this); - - $parentContextName = $compiler->getVarName(); - - $compiler->write(sprintf("\$%s = \$context;\n", $parentContextName)); - - if ($this->hasNode('variables')) { - $node = $this->getNode('variables'); - $varsName = $compiler->getVarName(); - $compiler - ->write(sprintf('$%s = ', $varsName)) - ->subcompile($node) - ->raw(";\n") - ->write(sprintf("if (!twig_test_iterable(\$%s)) {\n", $varsName)) - ->indent() - ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ") - ->repr($node->getTemplateLine()) - ->raw(", \$this->getSourceContext());\n") - ->outdent() - ->write("}\n") - ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName)) - ; - - if ($this->getAttribute('only')) { - $compiler->write("\$context = [];\n"); - } - - $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName)); - } - - $compiler - ->subcompile($this->getNode('body')) - ->write(sprintf("\$context = \$%s;\n", $parentContextName)) - ; - } -} diff --git a/vendor/twig/twig/src/NodeTraverser.php b/vendor/twig/twig/src/NodeTraverser.php deleted file mode 100644 index 47a2d5c..0000000 --- a/vendor/twig/twig/src/NodeTraverser.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -final class NodeTraverser -{ - private $env; - private $visitors = []; - - /** - * @param NodeVisitorInterface[] $visitors - */ - public function __construct(Environment $env, array $visitors = []) - { - $this->env = $env; - foreach ($visitors as $visitor) { - $this->addVisitor($visitor); - } - } - - public function addVisitor(NodeVisitorInterface $visitor): void - { - $this->visitors[$visitor->getPriority()][] = $visitor; - } - - /** - * Traverses a node and calls the registered visitors. - */ - public function traverse(Node $node): Node - { - ksort($this->visitors); - foreach ($this->visitors as $visitors) { - foreach ($visitors as $visitor) { - $node = $this->traverseForVisitor($visitor, $node); - } - } - - return $node; - } - - private function traverseForVisitor(NodeVisitorInterface $visitor, Node $node): ?Node - { - $node = $visitor->enterNode($node, $this->env); - - foreach ($node as $k => $n) { - if (null !== $m = $this->traverseForVisitor($visitor, $n)) { - if ($m !== $n) { - $node->setNode($k, $m); - } - } else { - $node->removeNode($k); - } - } - - return $visitor->leaveNode($node, $this->env); - } -} diff --git a/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php deleted file mode 100644 index d7036ae..0000000 --- a/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -abstract class AbstractNodeVisitor implements NodeVisitorInterface -{ - final public function enterNode(Node $node, Environment $env): Node - { - return $this->doEnterNode($node, $env); - } - - final public function leaveNode(Node $node, Environment $env): ?Node - { - return $this->doLeaveNode($node, $env); - } - - /** - * Called before child nodes are visited. - * - * @return Node The modified node - */ - abstract protected function doEnterNode(Node $node, Environment $env); - - /** - * Called after child nodes are visited. - * - * @return Node|null The modified node or null if the node must be removed - */ - abstract protected function doLeaveNode(Node $node, Environment $env); -} diff --git a/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php deleted file mode 100644 index fe56ea3..0000000 --- a/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * @internal - */ -final class EscaperNodeVisitor implements NodeVisitorInterface -{ - private $statusStack = []; - private $blocks = []; - private $safeAnalysis; - private $traverser; - private $defaultStrategy = false; - private $safeVars = []; - - public function __construct() - { - $this->safeAnalysis = new SafeAnalysisNodeVisitor(); - } - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - if ($env->hasExtension(EscaperExtension::class) && $defaultStrategy = $env->getExtension(EscaperExtension::class)->getDefaultStrategy($node->getTemplateName())) { - $this->defaultStrategy = $defaultStrategy; - } - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof AutoEscapeNode) { - $this->statusStack[] = $node->getAttribute('value'); - } elseif ($node instanceof BlockNode) { - $this->statusStack[] = isset($this->blocks[$node->getAttribute('name')]) ? $this->blocks[$node->getAttribute('name')] : $this->needEscaping($env); - } elseif ($node instanceof ImportNode) { - $this->safeVars[] = $node->getNode('var')->getAttribute('name'); - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $this->defaultStrategy = false; - $this->safeVars = []; - $this->blocks = []; - } elseif ($node instanceof FilterExpression) { - return $this->preEscapeFilterNode($node, $env); - } elseif ($node instanceof PrintNode && false !== $type = $this->needEscaping($env)) { - $expression = $node->getNode('expr'); - if ($expression instanceof ConditionalExpression && $this->shouldUnwrapConditional($expression, $env, $type)) { - return new DoNode($this->unwrapConditional($expression, $env, $type), $expression->getTemplateLine()); - } - - return $this->escapePrintNode($node, $env, $type); - } - - if ($node instanceof AutoEscapeNode || $node instanceof BlockNode) { - array_pop($this->statusStack); - } elseif ($node instanceof BlockReferenceNode) { - $this->blocks[$node->getAttribute('name')] = $this->needEscaping($env); - } - - return $node; - } - - private function shouldUnwrapConditional(ConditionalExpression $expression, Environment $env, string $type): bool - { - $expr2Safe = $this->isSafeFor($type, $expression->getNode('expr2'), $env); - $expr3Safe = $this->isSafeFor($type, $expression->getNode('expr3'), $env); - - return $expr2Safe !== $expr3Safe; - } - - private function unwrapConditional(ConditionalExpression $expression, Environment $env, string $type): ConditionalExpression - { - // convert "echo a ? b : c" to "a ? echo b : echo c" recursively - $expr2 = $expression->getNode('expr2'); - if ($expr2 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr2, $env, $type)) { - $expr2 = $this->unwrapConditional($expr2, $env, $type); - } else { - $expr2 = $this->escapeInlinePrintNode(new InlinePrint($expr2, $expr2->getTemplateLine()), $env, $type); - } - $expr3 = $expression->getNode('expr3'); - if ($expr3 instanceof ConditionalExpression && $this->shouldUnwrapConditional($expr3, $env, $type)) { - $expr3 = $this->unwrapConditional($expr3, $env, $type); - } else { - $expr3 = $this->escapeInlinePrintNode(new InlinePrint($expr3, $expr3->getTemplateLine()), $env, $type); - } - - return new ConditionalExpression($expression->getNode('expr1'), $expr2, $expr3, $expression->getTemplateLine()); - } - - private function escapeInlinePrintNode(InlinePrint $node, Environment $env, string $type): Node - { - $expression = $node->getNode('node'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - private function escapePrintNode(PrintNode $node, Environment $env, string $type): Node - { - if (false === $type) { - return $node; - } - - $expression = $node->getNode('expr'); - - if ($this->isSafeFor($type, $expression, $env)) { - return $node; - } - - $class = \get_class($node); - - return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); - } - - private function preEscapeFilterNode(FilterExpression $filter, Environment $env): FilterExpression - { - $name = $filter->getNode('filter')->getAttribute('value'); - - $type = $env->getFilter($name)->getPreEscape(); - if (null === $type) { - return $filter; - } - - $node = $filter->getNode('node'); - if ($this->isSafeFor($type, $node, $env)) { - return $filter; - } - - $filter->setNode('node', $this->getEscaperFilter($type, $node)); - - return $filter; - } - - private function isSafeFor(string $type, Node $expression, Environment $env): bool - { - $safe = $this->safeAnalysis->getSafe($expression); - - if (null === $safe) { - if (null === $this->traverser) { - $this->traverser = new NodeTraverser($env, [$this->safeAnalysis]); - } - - $this->safeAnalysis->setSafeVars($this->safeVars); - - $this->traverser->traverse($expression); - $safe = $this->safeAnalysis->getSafe($expression); - } - - return \in_array($type, $safe) || \in_array('all', $safe); - } - - private function needEscaping(Environment $env) - { - if (\count($this->statusStack)) { - return $this->statusStack[\count($this->statusStack) - 1]; - } - - return $this->defaultStrategy ? $this->defaultStrategy : false; - } - - private function getEscaperFilter(string $type, Node $node): FilterExpression - { - $line = $node->getTemplateLine(); - $name = new ConstantExpression('escape', $line); - $args = new Node([new ConstantExpression($type, $line), new ConstantExpression(null, $line), new ConstantExpression(true, $line)]); - - return new FilterExpression($node, $name, $args, $line); - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php deleted file mode 100644 index af477e6..0000000 --- a/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * @internal - */ -final class MacroAutoImportNodeVisitor implements NodeVisitorInterface -{ - private $inAModule = false; - private $hasMacroCalls = false; - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = true; - $this->hasMacroCalls = false; - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = false; - if ($this->hasMacroCalls) { - $node->getNode('constructor_end')->setNode('_auto_macro_import', new ImportNode(new NameExpression('_self', 0), new AssignNameExpression('_self', 0), 0, 'import', true)); - } - } elseif ($this->inAModule) { - if ( - $node instanceof GetAttrExpression && - $node->getNode('node') instanceof NameExpression && - '_self' === $node->getNode('node')->getAttribute('name') && - $node->getNode('attribute') instanceof ConstantExpression - ) { - $this->hasMacroCalls = true; - - $name = $node->getNode('attribute')->getAttribute('value'); - $node = new MethodCallExpression($node->getNode('node'), 'macro_'.$name, $node->getNode('arguments'), $node->getTemplateLine()); - $node->setAttribute('safe', true); - } - } - - return $node; - } - - public function getPriority(): int - { - // we must be ran before auto-escaping - return -10; - } -} diff --git a/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php b/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php deleted file mode 100644 index 59e836d..0000000 --- a/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface NodeVisitorInterface -{ - /** - * Called before child nodes are visited. - * - * @return Node The modified node - */ - public function enterNode(Node $node, Environment $env): Node; - - /** - * Called after child nodes are visited. - * - * @return Node|null The modified node or null if the node must be removed - */ - public function leaveNode(Node $node, Environment $env): ?Node; - - /** - * Returns the priority for this visitor. - * - * Priority should be between -10 and 10 (0 is the default). - * - * @return int The priority level - */ - public function getPriority(); -} diff --git a/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php deleted file mode 100644 index 7ac75e4..0000000 --- a/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * @internal - */ -final class OptimizerNodeVisitor implements NodeVisitorInterface -{ - public const OPTIMIZE_ALL = -1; - public const OPTIMIZE_NONE = 0; - public const OPTIMIZE_FOR = 2; - public const OPTIMIZE_RAW_FILTER = 4; - - private $loops = []; - private $loopsTargets = []; - private $optimizers; - - /** - * @param int $optimizers The optimizer mode - */ - public function __construct(int $optimizers = -1) - { - if ($optimizers > (self::OPTIMIZE_FOR | self::OPTIMIZE_RAW_FILTER)) { - throw new \InvalidArgumentException(sprintf('Optimizer mode "%s" is not valid.', $optimizers)); - } - - $this->optimizers = $optimizers; - } - - public function enterNode(Node $node, Environment $env): Node - { - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->enterOptimizeFor($node, $env); - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) { - $this->leaveOptimizeFor($node, $env); - } - - if (self::OPTIMIZE_RAW_FILTER === (self::OPTIMIZE_RAW_FILTER & $this->optimizers)) { - $node = $this->optimizeRawFilter($node, $env); - } - - $node = $this->optimizePrintNode($node, $env); - - return $node; - } - - /** - * Optimizes print nodes. - * - * It replaces: - * - * * "echo $this->render(Parent)Block()" with "$this->display(Parent)Block()" - */ - private function optimizePrintNode(Node $node, Environment $env): Node - { - if (!$node instanceof PrintNode) { - return $node; - } - - $exprNode = $node->getNode('expr'); - if ( - $exprNode instanceof BlockReferenceExpression || - $exprNode instanceof ParentExpression - ) { - $exprNode->setAttribute('output', true); - - return $exprNode; - } - - return $node; - } - - /** - * Removes "raw" filters. - */ - private function optimizeRawFilter(Node $node, Environment $env): Node - { - if ($node instanceof FilterExpression && 'raw' == $node->getNode('filter')->getAttribute('value')) { - return $node->getNode('node'); - } - - return $node; - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - private function enterOptimizeFor(Node $node, Environment $env): void - { - if ($node instanceof ForNode) { - // disable the loop variable by default - $node->setAttribute('with_loop', false); - array_unshift($this->loops, $node); - array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name')); - array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name')); - } elseif (!$this->loops) { - // we are outside a loop - return; - } - - // when do we need to add the loop variable back? - - // the loop variable is referenced for the current loop - elseif ($node instanceof NameExpression && 'loop' === $node->getAttribute('name')) { - $node->setAttribute('always_defined', true); - $this->addLoopToCurrent(); - } - - // optimize access to loop targets - elseif ($node instanceof NameExpression && \in_array($node->getAttribute('name'), $this->loopsTargets)) { - $node->setAttribute('always_defined', true); - } - - // block reference - elseif ($node instanceof BlockReferenceNode || $node instanceof BlockReferenceExpression) { - $this->addLoopToCurrent(); - } - - // include without the only attribute - elseif ($node instanceof IncludeNode && !$node->getAttribute('only')) { - $this->addLoopToAll(); - } - - // include function without the with_context=false parameter - elseif ($node instanceof FunctionExpression - && 'include' === $node->getAttribute('name') - && (!$node->getNode('arguments')->hasNode('with_context') - || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value') - ) - ) { - $this->addLoopToAll(); - } - - // the loop variable is referenced via an attribute - elseif ($node instanceof GetAttrExpression - && (!$node->getNode('attribute') instanceof ConstantExpression - || 'parent' === $node->getNode('attribute')->getAttribute('value') - ) - && (true === $this->loops[0]->getAttribute('with_loop') - || ($node->getNode('node') instanceof NameExpression - && 'loop' === $node->getNode('node')->getAttribute('name') - ) - ) - ) { - $this->addLoopToAll(); - } - } - - /** - * Optimizes "for" tag by removing the "loop" variable creation whenever possible. - */ - private function leaveOptimizeFor(Node $node, Environment $env): void - { - if ($node instanceof ForNode) { - array_shift($this->loops); - array_shift($this->loopsTargets); - array_shift($this->loopsTargets); - } - } - - private function addLoopToCurrent(): void - { - $this->loops[0]->setAttribute('with_loop', true); - } - - private function addLoopToAll(): void - { - foreach ($this->loops as $loop) { - $loop->setAttribute('with_loop', true); - } - } - - public function getPriority(): int - { - return 255; - } -} diff --git a/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php deleted file mode 100644 index 90d6f2e..0000000 --- a/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +++ /dev/null @@ -1,160 +0,0 @@ -safeVars = $safeVars; - } - - public function getSafe(Node $node) - { - $hash = spl_object_hash($node); - if (!isset($this->data[$hash])) { - return; - } - - foreach ($this->data[$hash] as $bucket) { - if ($bucket['key'] !== $node) { - continue; - } - - if (\in_array('html_attr', $bucket['value'])) { - $bucket['value'][] = 'html'; - } - - return $bucket['value']; - } - } - - private function setSafe(Node $node, array $safe): void - { - $hash = spl_object_hash($node); - if (isset($this->data[$hash])) { - foreach ($this->data[$hash] as &$bucket) { - if ($bucket['key'] === $node) { - $bucket['value'] = $safe; - - return; - } - } - } - $this->data[$hash][] = [ - 'key' => $node, - 'value' => $safe, - ]; - } - - public function enterNode(Node $node, Environment $env): Node - { - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ConstantExpression) { - // constants are marked safe for all - $this->setSafe($node, ['all']); - } elseif ($node instanceof BlockReferenceExpression) { - // blocks are safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ParentExpression) { - // parent block is safe by definition - $this->setSafe($node, ['all']); - } elseif ($node instanceof ConditionalExpression) { - // intersect safeness of both operands - $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); - $this->setSafe($node, $safe); - } elseif ($node instanceof FilterExpression) { - // filter expression is safe when the filter is safe - $name = $node->getNode('filter')->getAttribute('value'); - $args = $node->getNode('arguments'); - if ($filter = $env->getFilter($name)) { - $safe = $filter->getSafe($args); - if (null === $safe) { - $safe = $this->intersectSafe($this->getSafe($node->getNode('node')), $filter->getPreservesSafety()); - } - $this->setSafe($node, $safe); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof FunctionExpression) { - // function expression is safe when the function is safe - $name = $node->getAttribute('name'); - $args = $node->getNode('arguments'); - if ($function = $env->getFunction($name)) { - $this->setSafe($node, $function->getSafe($args)); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof MethodCallExpression) { - if ($node->getAttribute('safe')) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } elseif ($node instanceof GetAttrExpression && $node->getNode('node') instanceof NameExpression) { - $name = $node->getNode('node')->getAttribute('name'); - if (\in_array($name, $this->safeVars)) { - $this->setSafe($node, ['all']); - } else { - $this->setSafe($node, []); - } - } else { - $this->setSafe($node, []); - } - - return $node; - } - - private function intersectSafe(array $a = null, array $b = null): array - { - if (null === $a || null === $b) { - return []; - } - - if (\in_array('all', $a)) { - return $b; - } - - if (\in_array('all', $b)) { - return $a; - } - - return array_intersect($a, $b); - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php b/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php deleted file mode 100644 index 1446cee..0000000 --- a/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * @internal - */ -final class SandboxNodeVisitor implements NodeVisitorInterface -{ - private $inAModule = false; - private $tags; - private $filters; - private $functions; - private $needsToStringWrap = false; - - public function enterNode(Node $node, Environment $env): Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = true; - $this->tags = []; - $this->filters = []; - $this->functions = []; - - return $node; - } elseif ($this->inAModule) { - // look for tags - if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) { - $this->tags[$node->getNodeTag()] = $node; - } - - // look for filters - if ($node instanceof FilterExpression && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) { - $this->filters[$node->getNode('filter')->getAttribute('value')] = $node; - } - - // look for functions - if ($node instanceof FunctionExpression && !isset($this->functions[$node->getAttribute('name')])) { - $this->functions[$node->getAttribute('name')] = $node; - } - - // the .. operator is equivalent to the range() function - if ($node instanceof RangeBinary && !isset($this->functions['range'])) { - $this->functions['range'] = $node; - } - - if ($node instanceof PrintNode) { - $this->needsToStringWrap = true; - $this->wrapNode($node, 'expr'); - } - - if ($node instanceof SetNode && !$node->getAttribute('capture')) { - $this->needsToStringWrap = true; - } - - // wrap outer nodes that can implicitly call __toString() - if ($this->needsToStringWrap) { - if ($node instanceof ConcatBinary) { - $this->wrapNode($node, 'left'); - $this->wrapNode($node, 'right'); - } - if ($node instanceof FilterExpression) { - $this->wrapNode($node, 'node'); - $this->wrapArrayNode($node, 'arguments'); - } - if ($node instanceof FunctionExpression) { - $this->wrapArrayNode($node, 'arguments'); - } - } - } - - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $this->inAModule = false; - - $node->setNode('constructor_end', new Node([new CheckSecurityCallNode(), $node->getNode('constructor_end')])); - $node->setNode('class_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('class_end')])); - } elseif ($this->inAModule) { - if ($node instanceof PrintNode || $node instanceof SetNode) { - $this->needsToStringWrap = false; - } - } - - return $node; - } - - private function wrapNode(Node $node, string $name): void - { - $expr = $node->getNode($name); - if ($expr instanceof NameExpression || $expr instanceof GetAttrExpression) { - $node->setNode($name, new CheckToStringNode($expr)); - } - } - - private function wrapArrayNode(Node $node, string $name): void - { - $args = $node->getNode($name); - foreach ($args as $name => $_) { - $this->wrapNode($args, $name); - } - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/vendor/twig/twig/src/Parser.php b/vendor/twig/twig/src/Parser.php deleted file mode 100644 index 4428208..0000000 --- a/vendor/twig/twig/src/Parser.php +++ /dev/null @@ -1,348 +0,0 @@ - - */ -class Parser -{ - private $stack = []; - private $stream; - private $parent; - private $visitors; - private $expressionParser; - private $blocks; - private $blockStack; - private $macros; - private $env; - private $importedSymbols; - private $traits; - private $embeddedTemplates = []; - private $varNameSalt = 0; - - public function __construct(Environment $env) - { - $this->env = $env; - } - - public function getVarName(): string - { - return sprintf('__internal_parse_%d', $this->varNameSalt++); - } - - public function parse(TokenStream $stream, $test = null, bool $dropNeedle = false): ModuleNode - { - $vars = get_object_vars($this); - unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames'], $vars['varNameSalt']); - $this->stack[] = $vars; - - // node visitors - if (null === $this->visitors) { - $this->visitors = $this->env->getNodeVisitors(); - } - - if (null === $this->expressionParser) { - $this->expressionParser = new ExpressionParser($this, $this->env); - } - - $this->stream = $stream; - $this->parent = null; - $this->blocks = []; - $this->macros = []; - $this->traits = []; - $this->blockStack = []; - $this->importedSymbols = [[]]; - $this->embeddedTemplates = []; - - try { - $body = $this->subparse($test, $dropNeedle); - - if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) { - $body = new Node(); - } - } catch (SyntaxError $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->stream->getSourceContext()); - } - - if (!$e->getTemplateLine()) { - $e->setTemplateLine($this->stream->getCurrent()->getLine()); - } - - throw $e; - } - - $node = new ModuleNode(new BodyNode([$body]), $this->parent, new Node($this->blocks), new Node($this->macros), new Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); - - $traverser = new NodeTraverser($this->env, $this->visitors); - - $node = $traverser->traverse($node); - - // restore previous stack so previous parse() call can resume working - foreach (array_pop($this->stack) as $key => $val) { - $this->$key = $val; - } - - return $node; - } - - public function subparse($test, bool $dropNeedle = false): Node - { - $lineno = $this->getCurrentToken()->getLine(); - $rv = []; - while (!$this->stream->isEOF()) { - switch ($this->getCurrentToken()->getType()) { - case /* Token::TEXT_TYPE */ 0: - $token = $this->stream->next(); - $rv[] = new TextNode($token->getValue(), $token->getLine()); - break; - - case /* Token::VAR_START_TYPE */ 2: - $token = $this->stream->next(); - $expr = $this->expressionParser->parseExpression(); - $this->stream->expect(/* Token::VAR_END_TYPE */ 4); - $rv[] = new PrintNode($expr, $token->getLine()); - break; - - case /* Token::BLOCK_START_TYPE */ 1: - $this->stream->next(); - $token = $this->getCurrentToken(); - - if (/* Token::NAME_TYPE */ 5 !== $token->getType()) { - throw new SyntaxError('A block must start with a tag name.', $token->getLine(), $this->stream->getSourceContext()); - } - - if (null !== $test && $test($token)) { - if ($dropNeedle) { - $this->stream->next(); - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - if (!$subparser = $this->env->getTokenParser($token->getValue())) { - if (null !== $test) { - $e = new SyntaxError(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - - if (\is_array($test) && isset($test[0]) && $test[0] instanceof TokenParserInterface) { - $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno)); - } - } else { - $e = new SyntaxError(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->stream->getSourceContext()); - $e->addSuggestions($token->getValue(), array_keys($this->env->getTokenParsers())); - } - - throw $e; - } - - $this->stream->next(); - - $subparser->setParser($this); - $node = $subparser->parse($token); - if (null !== $node) { - $rv[] = $node; - } - break; - - default: - throw new SyntaxError('Lexer or parser ended up in unsupported state.', $this->getCurrentToken()->getLine(), $this->stream->getSourceContext()); - } - } - - if (1 === \count($rv)) { - return $rv[0]; - } - - return new Node($rv, [], $lineno); - } - - public function getBlockStack(): array - { - return $this->blockStack; - } - - public function peekBlockStack() - { - return $this->blockStack[\count($this->blockStack) - 1] ?? null; - } - - public function popBlockStack(): void - { - array_pop($this->blockStack); - } - - public function pushBlockStack($name): void - { - $this->blockStack[] = $name; - } - - public function hasBlock(string $name): bool - { - return isset($this->blocks[$name]); - } - - public function getBlock(string $name): Node - { - return $this->blocks[$name]; - } - - public function setBlock(string $name, BlockNode $value): void - { - $this->blocks[$name] = new BodyNode([$value], [], $value->getTemplateLine()); - } - - public function hasMacro(string $name): bool - { - return isset($this->macros[$name]); - } - - public function setMacro(string $name, MacroNode $node): void - { - $this->macros[$name] = $node; - } - - public function addTrait($trait): void - { - $this->traits[] = $trait; - } - - public function hasTraits(): bool - { - return \count($this->traits) > 0; - } - - public function embedTemplate(ModuleNode $template) - { - $template->setIndex(mt_rand()); - - $this->embeddedTemplates[] = $template; - } - - public function addImportedSymbol(string $type, string $alias, string $name = null, AbstractExpression $node = null): void - { - $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node]; - } - - public function getImportedSymbol(string $type, string $alias) - { - // if the symbol does not exist in the current scope (0), try in the main/global scope (last index) - return $this->importedSymbols[0][$type][$alias] ?? ($this->importedSymbols[\count($this->importedSymbols) - 1][$type][$alias] ?? null); - } - - public function isMainScope(): bool - { - return 1 === \count($this->importedSymbols); - } - - public function pushLocalScope(): void - { - array_unshift($this->importedSymbols, []); - } - - public function popLocalScope(): void - { - array_shift($this->importedSymbols); - } - - public function getExpressionParser(): ExpressionParser - { - return $this->expressionParser; - } - - public function getParent(): ?Node - { - return $this->parent; - } - - public function setParent(?Node $parent): void - { - $this->parent = $parent; - } - - public function getStream(): TokenStream - { - return $this->stream; - } - - public function getCurrentToken(): Token - { - return $this->stream->getCurrent(); - } - - private function filterBodyNodes(Node $node, bool $nested = false): ?Node - { - // check that the body does not contain non-empty output nodes - if ( - ($node instanceof TextNode && !ctype_space($node->getAttribute('data'))) - || - (!$node instanceof TextNode && !$node instanceof BlockReferenceNode && $node instanceof NodeOutputInterface) - ) { - if (false !== strpos((string) $node, \chr(0xEF).\chr(0xBB).\chr(0xBF))) { - $t = substr($node->getAttribute('data'), 3); - if ('' === $t || ctype_space($t)) { - // bypass empty nodes starting with a BOM - return null; - } - } - - throw new SyntaxError('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - // bypass nodes that "capture" the output - if ($node instanceof NodeCaptureInterface) { - // a "block" tag in such a node will serve as a block definition AND be displayed in place as well - return $node; - } - - // "block" tags that are not captured (see above) are only used for defining - // the content of the block. In such a case, nesting it does not work as - // expected as the definition is not part of the default template code flow. - if ($nested && $node instanceof BlockReferenceNode) { - throw new SyntaxError('A block definition cannot be nested under non-capturing nodes.', $node->getTemplateLine(), $this->stream->getSourceContext()); - } - - if ($node instanceof NodeOutputInterface) { - return null; - } - - // here, $nested means "being at the root level of a child template" - // we need to discard the wrapping "Node" for the "body" node - $nested = $nested || Node::class !== \get_class($node); - foreach ($node as $k => $n) { - if (null !== $n && null === $this->filterBodyNodes($n, $nested)) { - $node->removeNode($k); - } - } - - return $node; - } -} diff --git a/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php b/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php deleted file mode 100644 index 4da43e4..0000000 --- a/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -abstract class BaseDumper -{ - private $root; - - public function dump(Profile $profile): string - { - return $this->dumpProfile($profile); - } - - abstract protected function formatTemplate(Profile $profile, $prefix): string; - - abstract protected function formatNonTemplate(Profile $profile, $prefix): string; - - abstract protected function formatTime(Profile $profile, $percent): string; - - private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string - { - if ($profile->isRoot()) { - $this->root = $profile->getDuration(); - $start = $profile->getName(); - } else { - if ($profile->isTemplate()) { - $start = $this->formatTemplate($profile, $prefix); - } else { - $start = $this->formatNonTemplate($profile, $prefix); - } - $prefix .= $sibling ? '│ ' : ' '; - } - - $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0; - - if ($profile->getDuration() * 1000 < 1) { - $str = $start."\n"; - } else { - $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent)); - } - - $nCount = \count($profile->getProfiles()); - foreach ($profile as $i => $p) { - $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount); - } - - return $str; - } -} diff --git a/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php b/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php deleted file mode 100644 index 03abe0f..0000000 --- a/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -final class BlackfireDumper -{ - public function dump(Profile $profile): string - { - $data = []; - $this->dumpProfile('main()', $profile, $data); - $this->dumpChildren('main()', $profile, $data); - - $start = sprintf('%f', microtime(true)); - $str = << $values) { - $str .= "$name//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n"; - } - - return $str; - } - - private function dumpChildren(string $parent, Profile $profile, &$data) - { - foreach ($profile as $p) { - if ($p->isTemplate()) { - $name = $p->getTemplate(); - } else { - $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName()); - } - $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data); - $this->dumpChildren($name, $p, $data); - } - } - - private function dumpProfile(string $edge, Profile $profile, &$data) - { - if (isset($data[$edge])) { - ++$data[$edge]['ct']; - $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); - $data[$edge]['mu'] += $profile->getMemoryUsage(); - $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); - } else { - $data[$edge] = [ - 'ct' => 1, - 'wt' => floor($profile->getDuration() * 1000000), - 'mu' => $profile->getMemoryUsage(), - 'pmu' => $profile->getPeakMemoryUsage(), - ]; - } - } -} diff --git a/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php b/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php deleted file mode 100644 index 1f2433b..0000000 --- a/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class HtmlDumper extends BaseDumper -{ - private static $colors = [ - 'block' => '#dfd', - 'macro' => '#ddf', - 'template' => '#ffd', - 'big' => '#d44', - ]; - - public function dump(Profile $profile): string - { - return '
    '.parent::dump($profile).'
    '; - } - - protected function formatTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent): string - { - return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent); - } -} diff --git a/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php b/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php deleted file mode 100644 index 31561c4..0000000 --- a/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -final class TextDumper extends BaseDumper -{ - protected function formatTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s', $prefix, $profile->getTemplate()); - } - - protected function formatNonTemplate(Profile $profile, $prefix): string - { - return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName()); - } - - protected function formatTime(Profile $profile, $percent): string - { - return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent); - } -} diff --git a/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php b/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php deleted file mode 100644 index 1494baf..0000000 --- a/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class EnterProfileNode extends Node -{ - public function __construct(string $extensionName, string $type, string $name, string $varName) - { - parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name'))) - ->repr($this->getAttribute('extension_name')) - ->raw("];\n") - ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ->repr($this->getAttribute('type')) - ->raw(', ') - ->repr($this->getAttribute('name')) - ->raw("));\n\n") - ; - } -} diff --git a/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php b/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php deleted file mode 100644 index 94cebba..0000000 --- a/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class LeaveProfileNode extends Node -{ - public function __construct(string $varName) - { - parent::__construct([], ['var_name' => $varName]); - } - - public function compile(Compiler $compiler): void - { - $compiler - ->write("\n") - ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof')) - ; - } -} diff --git a/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php b/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php deleted file mode 100644 index 91abee8..0000000 --- a/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -final class ProfilerNodeVisitor implements NodeVisitorInterface -{ - private $extensionName; - private $varName; - - public function __construct(string $extensionName) - { - $this->extensionName = $extensionName; - $this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName)); - } - - public function enterNode(Node $node, Environment $env): Node - { - return $node; - } - - public function leaveNode(Node $node, Environment $env): ?Node - { - if ($node instanceof ModuleNode) { - $node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $this->varName), $node->getNode('display_start')])); - $node->setNode('display_end', new Node([new LeaveProfileNode($this->varName), $node->getNode('display_end')])); - } elseif ($node instanceof BlockNode) { - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $this->varName), - $node->getNode('body'), - new LeaveProfileNode($this->varName), - ])); - } elseif ($node instanceof MacroNode) { - $node->setNode('body', new BodyNode([ - new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $this->varName), - $node->getNode('body'), - new LeaveProfileNode($this->varName), - ])); - } - - return $node; - } - - public function getPriority(): int - { - return 0; - } -} diff --git a/vendor/twig/twig/src/Profiler/Profile.php b/vendor/twig/twig/src/Profiler/Profile.php deleted file mode 100644 index 252ca9b..0000000 --- a/vendor/twig/twig/src/Profiler/Profile.php +++ /dev/null @@ -1,181 +0,0 @@ - - */ -final class Profile implements \IteratorAggregate, \Serializable -{ - public const ROOT = 'ROOT'; - public const BLOCK = 'block'; - public const TEMPLATE = 'template'; - public const MACRO = 'macro'; - - private $template; - private $name; - private $type; - private $starts = []; - private $ends = []; - private $profiles = []; - - public function __construct(string $template = 'main', string $type = self::ROOT, string $name = 'main') - { - $this->template = $template; - $this->type = $type; - $this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name; - $this->enter(); - } - - public function getTemplate(): string - { - return $this->template; - } - - public function getType(): string - { - return $this->type; - } - - public function getName(): string - { - return $this->name; - } - - public function isRoot(): bool - { - return self::ROOT === $this->type; - } - - public function isTemplate(): bool - { - return self::TEMPLATE === $this->type; - } - - public function isBlock(): bool - { - return self::BLOCK === $this->type; - } - - public function isMacro(): bool - { - return self::MACRO === $this->type; - } - - /** - * @return Profile[] - */ - public function getProfiles(): array - { - return $this->profiles; - } - - public function addProfile(self $profile): void - { - $this->profiles[] = $profile; - } - - /** - * Returns the duration in microseconds. - */ - public function getDuration(): float - { - if ($this->isRoot() && $this->profiles) { - // for the root node with children, duration is the sum of all child durations - $duration = 0; - foreach ($this->profiles as $profile) { - $duration += $profile->getDuration(); - } - - return $duration; - } - - return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0; - } - - /** - * Returns the memory usage in bytes. - */ - public function getMemoryUsage(): int - { - return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0; - } - - /** - * Returns the peak memory usage in bytes. - */ - public function getPeakMemoryUsage(): int - { - return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0; - } - - /** - * Starts the profiling. - */ - public function enter(): void - { - $this->starts = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - /** - * Stops the profiling. - */ - public function leave(): void - { - $this->ends = [ - 'wt' => microtime(true), - 'mu' => memory_get_usage(), - 'pmu' => memory_get_peak_usage(), - ]; - } - - public function reset(): void - { - $this->starts = $this->ends = $this->profiles = []; - $this->enter(); - } - - public function getIterator(): \Traversable - { - return new \ArrayIterator($this->profiles); - } - - public function serialize(): string - { - return serialize($this->__serialize()); - } - - public function unserialize($data): void - { - $this->__unserialize(unserialize($data)); - } - - /** - * @internal - */ - public function __serialize(): array - { - return [$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]; - } - - /** - * @internal - */ - public function __unserialize(array $data): void - { - list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = $data; - } -} diff --git a/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php b/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php deleted file mode 100644 index b360d7b..0000000 --- a/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @author Robin Chalas - */ -class ContainerRuntimeLoader implements RuntimeLoaderInterface -{ - private $container; - - public function __construct(ContainerInterface $container) - { - $this->container = $container; - } - - public function load(string $class) - { - return $this->container->has($class) ? $this->container->get($class) : null; - } -} diff --git a/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php b/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php deleted file mode 100644 index 1306483..0000000 --- a/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class FactoryRuntimeLoader implements RuntimeLoaderInterface -{ - private $map; - - /** - * @param array $map An array where keys are class names and values factory callables - */ - public function __construct(array $map = []) - { - $this->map = $map; - } - - public function load(string $class) - { - if (!isset($this->map[$class])) { - return null; - } - - $runtimeFactory = $this->map[$class]; - - return $runtimeFactory(); - } -} diff --git a/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php b/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php deleted file mode 100644 index 9e5b204..0000000 --- a/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -interface RuntimeLoaderInterface -{ - /** - * Creates the runtime implementation of a Twig element (filter/function/test). - * - * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class - */ - public function load(string $class); -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityError.php b/vendor/twig/twig/src/Sandbox/SecurityError.php deleted file mode 100644 index 30a404f..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityError.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -class SecurityError extends Error -{ -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php b/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php deleted file mode 100644 index 02d3063..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedFilterError extends SecurityError -{ - private $filterName; - - public function __construct(string $message, string $functionName) - { - parent::__construct($message); - $this->filterName = $functionName; - } - - public function getFilterName(): string - { - return $this->filterName; - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php b/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php deleted file mode 100644 index 4f76dc6..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedFunctionError extends SecurityError -{ - private $functionName; - - public function __construct(string $message, string $functionName) - { - parent::__construct($message); - $this->functionName = $functionName; - } - - public function getFunctionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php b/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php deleted file mode 100644 index 8df9d0b..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class SecurityNotAllowedMethodError extends SecurityError -{ - private $className; - private $methodName; - - public function __construct(string $message, string $className, string $methodName) - { - parent::__construct($message); - $this->className = $className; - $this->methodName = $methodName; - } - - public function getClassName(): string - { - return $this->className; - } - - public function getMethodName() - { - return $this->methodName; - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php b/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php deleted file mode 100644 index 42ec4f3..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class SecurityNotAllowedPropertyError extends SecurityError -{ - private $className; - private $propertyName; - - public function __construct(string $message, string $className, string $propertyName) - { - parent::__construct($message); - $this->className = $className; - $this->propertyName = $propertyName; - } - - public function getClassName(): string - { - return $this->className; - } - - public function getPropertyName() - { - return $this->propertyName; - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php b/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php deleted file mode 100644 index 4522150..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -final class SecurityNotAllowedTagError extends SecurityError -{ - private $tagName; - - public function __construct(string $message, string $tagName) - { - parent::__construct($message); - $this->tagName = $tagName; - } - - public function getTagName(): string - { - return $this->tagName; - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityPolicy.php b/vendor/twig/twig/src/Sandbox/SecurityPolicy.php deleted file mode 100644 index 2fc0d01..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityPolicy.php +++ /dev/null @@ -1,126 +0,0 @@ - - */ -final class SecurityPolicy implements SecurityPolicyInterface -{ - private $allowedTags; - private $allowedFilters; - private $allowedMethods; - private $allowedProperties; - private $allowedFunctions; - - public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = []) - { - $this->allowedTags = $allowedTags; - $this->allowedFilters = $allowedFilters; - $this->setAllowedMethods($allowedMethods); - $this->allowedProperties = $allowedProperties; - $this->allowedFunctions = $allowedFunctions; - } - - public function setAllowedTags(array $tags): void - { - $this->allowedTags = $tags; - } - - public function setAllowedFilters(array $filters): void - { - $this->allowedFilters = $filters; - } - - public function setAllowedMethods(array $methods): void - { - $this->allowedMethods = []; - foreach ($methods as $class => $m) { - $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]); - } - } - - public function setAllowedProperties(array $properties): void - { - $this->allowedProperties = $properties; - } - - public function setAllowedFunctions(array $functions): void - { - $this->allowedFunctions = $functions; - } - - public function checkSecurity($tags, $filters, $functions): void - { - foreach ($tags as $tag) { - if (!\in_array($tag, $this->allowedTags)) { - throw new SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag); - } - } - - foreach ($filters as $filter) { - if (!\in_array($filter, $this->allowedFilters)) { - throw new SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter); - } - } - - foreach ($functions as $function) { - if (!\in_array($function, $this->allowedFunctions)) { - throw new SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function); - } - } - } - - public function checkMethodAllowed($obj, $method): void - { - if ($obj instanceof Template || $obj instanceof Markup) { - return; - } - - $allowed = false; - $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - foreach ($this->allowedMethods as $class => $methods) { - if ($obj instanceof $class) { - $allowed = \in_array($method, $methods); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method); - } - } - - public function checkPropertyAllowed($obj, $property): void - { - $allowed = false; - foreach ($this->allowedProperties as $class => $properties) { - if ($obj instanceof $class) { - $allowed = \in_array($property, \is_array($properties) ? $properties : [$properties]); - - break; - } - } - - if (!$allowed) { - $class = \get_class($obj); - throw new SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property); - } - } -} diff --git a/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php b/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php deleted file mode 100644 index 36471c5..0000000 --- a/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -interface SecurityPolicyInterface -{ - /** - * @param string[] $tags - * @param string[] $filters - * @param string[] $functions - * - * @throws SecurityError - */ - public function checkSecurity($tags, $filters, $functions): void; - - /** - * @param object $obj - * @param string $method - * - * @throws SecurityNotAllowedMethodError - */ - public function checkMethodAllowed($obj, $method): void; - - /** - * @param object $obj - * @param string $property - * - * @throws SecurityNotAllowedPropertyError - */ - public function checkPropertyAllowed($obj, $property): void; -} diff --git a/vendor/twig/twig/src/Source.php b/vendor/twig/twig/src/Source.php deleted file mode 100644 index 3cb0240..0000000 --- a/vendor/twig/twig/src/Source.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -final class Source -{ - private $code; - private $name; - private $path; - - /** - * @param string $code The template source code - * @param string $name The template logical name - * @param string $path The filesystem path of the template if any - */ - public function __construct(string $code, string $name, string $path = '') - { - $this->code = $code; - $this->name = $name; - $this->path = $path; - } - - public function getCode(): string - { - return $this->code; - } - - public function getName(): string - { - return $this->name; - } - - public function getPath(): string - { - return $this->path; - } -} diff --git a/vendor/twig/twig/src/Template.php b/vendor/twig/twig/src/Template.php deleted file mode 100644 index e04bd04..0000000 --- a/vendor/twig/twig/src/Template.php +++ /dev/null @@ -1,422 +0,0 @@ -load() - * instead, which returns an instance of \Twig\TemplateWrapper. - * - * @author Fabien Potencier - * - * @internal - */ -abstract class Template -{ - public const ANY_CALL = 'any'; - public const ARRAY_CALL = 'array'; - public const METHOD_CALL = 'method'; - - protected $parent; - protected $parents = []; - protected $env; - protected $blocks = []; - protected $traits = []; - protected $extensions = []; - protected $sandbox; - - public function __construct(Environment $env) - { - $this->env = $env; - $this->extensions = $env->getExtensions(); - } - - /** - * Returns the template name. - * - * @return string The template name - */ - abstract public function getTemplateName(); - - /** - * Returns debug information about the template. - * - * @return array Debug information - */ - abstract public function getDebugInfo(); - - /** - * Returns information about the original template source code. - * - * @return Source - */ - abstract public function getSourceContext(); - - /** - * Returns the parent template. - * - * This method is for internal use only and should never be called - * directly. - * - * @return Template|TemplateWrapper|false The parent template or false if there is no parent - */ - public function getParent(array $context) - { - if (null !== $this->parent) { - return $this->parent; - } - - try { - $parent = $this->doGetParent($context); - - if (false === $parent) { - return false; - } - - if ($parent instanceof self || $parent instanceof TemplateWrapper) { - return $this->parents[$parent->getSourceContext()->getName()] = $parent; - } - - if (!isset($this->parents[$parent])) { - $this->parents[$parent] = $this->loadTemplate($parent); - } - } catch (LoaderError $e) { - $e->setSourceContext(null); - $e->guess(); - - throw $e; - } - - return $this->parents[$parent]; - } - - protected function doGetParent(array $context) - { - return false; - } - - public function isTraitable() - { - return true; - } - - /** - * Displays a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - */ - public function displayParentBlock($name, array $context, array $blocks = []) - { - if (isset($this->traits[$name])) { - $this->traits[$name][0]->displayBlock($name, $context, $blocks, false); - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, $blocks, false); - } else { - throw new RuntimeError(sprintf('The template has no parent and no traits defining the "%s" block.', $name), -1, $this->getSourceContext()); - } - } - - /** - * Displays a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to display - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - */ - public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null) - { - if ($useBlocks && isset($blocks[$name])) { - $template = $blocks[$name][0]; - $block = $blocks[$name][1]; - } elseif (isset($this->blocks[$name])) { - $template = $this->blocks[$name][0]; - $block = $this->blocks[$name][1]; - } else { - $template = null; - $block = null; - } - - // avoid RCEs when sandbox is enabled - if (null !== $template && !$template instanceof self) { - throw new \LogicException('A block must be a method on a \Twig\Template instance.'); - } - - if (null !== $template) { - try { - $template->$block($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($template->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } elseif (false !== $parent = $this->getParent($context)) { - $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this); - } elseif (isset($blocks[$name])) { - throw new RuntimeError(sprintf('Block "%s" should not call parent() in "%s" as the block does not exist in the parent template "%s".', $name, $blocks[$name][0]->getTemplateName(), $this->getTemplateName()), -1, $blocks[$name][0]->getSourceContext()); - } else { - throw new RuntimeError(sprintf('Block "%s" on template "%s" does not exist.', $name, $this->getTemplateName()), -1, ($templateContext ?? $this)->getSourceContext()); - } - } - - /** - * Renders a parent block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render from the parent - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return string The rendered block - */ - public function renderParentBlock($name, array $context, array $blocks = []) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayParentBlock($name, $context, $blocks); - - return ob_get_clean(); - } - - /** - * Renders a block. - * - * This method is for internal use only and should never be called - * directly. - * - * @param string $name The block name to render - * @param array $context The context - * @param array $blocks The current set of blocks - * @param bool $useBlocks Whether to use the current set of blocks - * - * @return string The rendered block - */ - public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true) - { - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - $this->displayBlock($name, $context, $blocks, $useBlocks); - - return ob_get_clean(); - } - - /** - * Returns whether a block exists or not in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param string $name The block name - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return bool true if the block exists, false otherwise - */ - public function hasBlock($name, array $context, array $blocks = []) - { - if (isset($blocks[$name])) { - return $blocks[$name][0] instanceof self; - } - - if (isset($this->blocks[$name])) { - return true; - } - - if (false !== $parent = $this->getParent($context)) { - return $parent->hasBlock($name, $context); - } - - return false; - } - - /** - * Returns all block names in the current context of the template. - * - * This method checks blocks defined in the current template - * or defined in "used" traits or defined in parent templates. - * - * @param array $context The context - * @param array $blocks The current set of blocks - * - * @return array An array of block names - */ - public function getBlockNames(array $context, array $blocks = []) - { - $names = array_merge(array_keys($blocks), array_keys($this->blocks)); - - if (false !== $parent = $this->getParent($context)) { - $names = array_merge($names, $parent->getBlockNames($context)); - } - - return array_unique($names); - } - - /** - * @return Template|TemplateWrapper - */ - protected function loadTemplate($template, $templateName = null, $line = null, $index = null) - { - try { - if (\is_array($template)) { - return $this->env->resolveTemplate($template); - } - - if ($template instanceof self || $template instanceof TemplateWrapper) { - return $template; - } - - if ($template === $this->getTemplateName()) { - $class = static::class; - if (false !== $pos = strrpos($class, '___', -1)) { - $class = substr($class, 0, $pos); - } - } else { - $class = $this->env->getTemplateClass($template); - } - - return $this->env->loadTemplate($class, $template, $index); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($templateName ? new Source('', $templateName) : $this->getSourceContext()); - } - - if ($e->getTemplateLine() > 0) { - throw $e; - } - - if (!$line) { - $e->guess(); - } else { - $e->setTemplateLine($line); - } - - throw $e; - } - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this; - } - - /** - * Returns all blocks. - * - * This method is for internal use only and should never be called - * directly. - * - * @return array An array of blocks - */ - public function getBlocks() - { - return $this->blocks; - } - - public function display(array $context, array $blocks = []) - { - $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); - } - - public function render(array $context) - { - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->display($context); - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - protected function displayWithErrorHandling(array $context, array $blocks = []) - { - try { - $this->doDisplay($context, $blocks); - } catch (Error $e) { - if (!$e->getSourceContext()) { - $e->setSourceContext($this->getSourceContext()); - } - - // this is mostly useful for \Twig\Error\LoaderError exceptions - // see \Twig\Error\LoaderError - if (-1 === $e->getTemplateLine()) { - $e->guess(); - } - - throw $e; - } catch (\Exception $e) { - $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e); - $e->guess(); - - throw $e; - } - } - - /** - * Auto-generated method to display the template with the given context. - * - * @param array $context An array of parameters to pass to the template - * @param array $blocks An array of blocks to pass to the template - */ - abstract protected function doDisplay(array $context, array $blocks = []); -} diff --git a/vendor/twig/twig/src/TemplateWrapper.php b/vendor/twig/twig/src/TemplateWrapper.php deleted file mode 100644 index c9c6b07..0000000 --- a/vendor/twig/twig/src/TemplateWrapper.php +++ /dev/null @@ -1,109 +0,0 @@ - - */ -final class TemplateWrapper -{ - private $env; - private $template; - - /** - * This method is for internal use only and should never be called - * directly (use Twig\Environment::load() instead). - * - * @internal - */ - public function __construct(Environment $env, Template $template) - { - $this->env = $env; - $this->template = $template; - } - - public function render(array $context = []): string - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - return $this->template->render($context, \func_get_args()[1] ?? []); - } - - public function display(array $context = []) - { - // using func_get_args() allows to not expose the blocks argument - // as it should only be used by internal code - $this->template->display($context, \func_get_args()[1] ?? []); - } - - public function hasBlock(string $name, array $context = []): bool - { - return $this->template->hasBlock($name, $context); - } - - /** - * @return string[] An array of defined template block names - */ - public function getBlockNames(array $context = []): array - { - return $this->template->getBlockNames($context); - } - - public function renderBlock(string $name, array $context = []): string - { - $context = $this->env->mergeGlobals($context); - $level = ob_get_level(); - if ($this->env->isDebug()) { - ob_start(); - } else { - ob_start(function () { return ''; }); - } - try { - $this->template->displayBlock($name, $context); - } catch (\Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - - return ob_get_clean(); - } - - public function displayBlock(string $name, array $context = []) - { - $this->template->displayBlock($name, $this->env->mergeGlobals($context)); - } - - public function getSourceContext(): Source - { - return $this->template->getSourceContext(); - } - - public function getTemplateName(): string - { - return $this->template->getTemplateName(); - } - - /** - * @internal - * - * @return Template - */ - public function unwrap() - { - return $this->template; - } -} diff --git a/vendor/twig/twig/src/Test/IntegrationTestCase.php b/vendor/twig/twig/src/Test/IntegrationTestCase.php deleted file mode 100644 index 307302b..0000000 --- a/vendor/twig/twig/src/Test/IntegrationTestCase.php +++ /dev/null @@ -1,265 +0,0 @@ - - * @author Karma Dordrak - */ -abstract class IntegrationTestCase extends TestCase -{ - /** - * @return string - */ - abstract protected function getFixturesDir(); - - /** - * @return RuntimeLoaderInterface[] - */ - protected function getRuntimeLoaders() - { - return []; - } - - /** - * @return ExtensionInterface[] - */ - protected function getExtensions() - { - return []; - } - - /** - * @return TwigFilter[] - */ - protected function getTwigFilters() - { - return []; - } - - /** - * @return TwigFunction[] - */ - protected function getTwigFunctions() - { - return []; - } - - /** - * @return TwigTest[] - */ - protected function getTwigTests() - { - return []; - } - - /** - * @dataProvider getTests - */ - public function testIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '') - { - $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation); - } - - /** - * @dataProvider getLegacyTests - * @group legacy - */ - public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '') - { - $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation); - } - - public function getTests($name, $legacyTests = false) - { - $fixturesDir = realpath($this->getFixturesDir()); - $tests = []; - - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if (!preg_match('/\.test$/', $file)) { - continue; - } - - if ($legacyTests xor false !== strpos($file->getRealpath(), '.legacy.test')) { - continue; - } - - $test = file_get_contents($file->getRealpath()); - - if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) { - $message = $match[1]; - $condition = $match[2]; - $deprecation = $match[3]; - $templates = self::parseTemplates($match[4]); - $exception = $match[6]; - $outputs = [[null, $match[5], null, '']]; - } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*(?:--DEPRECATION--\s*(.*?))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) { - $message = $match[1]; - $condition = $match[2]; - $deprecation = $match[3]; - $templates = self::parseTemplates($match[4]); - $exception = false; - preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, \PREG_SET_ORDER); - } else { - throw new \InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file))); - } - - $tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs, $deprecation]; - } - - if ($legacyTests && empty($tests)) { - // add a dummy test to avoid a PHPUnit message - return [['not', '-', '', [], '', []]]; - } - - return $tests; - } - - public function getLegacyTests() - { - return $this->getTests('testLegacyIntegration', true); - } - - protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '') - { - if (!$outputs) { - $this->markTestSkipped('no tests to run'); - } - - if ($condition) { - eval('$ret = '.$condition.';'); - if (!$ret) { - $this->markTestSkipped($condition); - } - } - - $loader = new ArrayLoader($templates); - - foreach ($outputs as $i => $match) { - $config = array_merge([ - 'cache' => false, - 'strict_variables' => true, - ], $match[2] ? eval($match[2].';') : []); - $twig = new Environment($loader, $config); - $twig->addGlobal('global', 'global'); - foreach ($this->getRuntimeLoaders() as $runtimeLoader) { - $twig->addRuntimeLoader($runtimeLoader); - } - - foreach ($this->getExtensions() as $extension) { - $twig->addExtension($extension); - } - - foreach ($this->getTwigFilters() as $filter) { - $twig->addFilter($filter); - } - - foreach ($this->getTwigTests() as $test) { - $twig->addTest($test); - } - - foreach ($this->getTwigFunctions() as $function) { - $twig->addFunction($function); - } - - // avoid using the same PHP class name for different cases - $p = new \ReflectionProperty($twig, 'templateClassPrefix'); - $p->setAccessible(true); - $p->setValue($twig, '__TwigTemplate_'.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', uniqid(mt_rand(), true), false).'_'); - - $deprecations = []; - try { - $prevHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$prevHandler) { - if (\E_USER_DEPRECATED === $type) { - $deprecations[] = $msg; - - return true; - } - - return $prevHandler ? $prevHandler($type, $msg, $file, $line, $context) : false; - }); - - $template = $twig->load('index.twig'); - } catch (\Exception $e) { - if (false !== $exception) { - $message = $e->getMessage(); - $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $message))); - $last = substr($message, \strlen($message) - 1); - $this->assertTrue('.' === $last || '?' === $last, 'Exception message must end with a dot or a question mark.'); - - return; - } - - throw new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e); - } finally { - restore_error_handler(); - } - - $this->assertSame($deprecation, implode("\n", $deprecations)); - - try { - $output = trim($template->render(eval($match[1].';')), "\n "); - } catch (\Exception $e) { - if (false !== $exception) { - $this->assertSame(trim($exception), trim(sprintf('%s: %s', \get_class($e), $e->getMessage()))); - - return; - } - - $e = new Error(sprintf('%s: %s', \get_class($e), $e->getMessage()), -1, null, $e); - - $output = trim(sprintf('%s: %s', \get_class($e), $e->getMessage())); - } - - if (false !== $exception) { - list($class) = explode(':', $exception); - $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception'; - $this->assertThat(null, new $constraintClass($class)); - } - - $expected = trim($match[3], "\n "); - - if ($expected !== $output) { - printf("Compiled templates that failed on case %d:\n", $i + 1); - - foreach (array_keys($templates) as $name) { - echo "Template: $name\n"; - echo $twig->compile($twig->parse($twig->tokenize($twig->getLoader()->getSourceContext($name)))); - } - } - $this->assertEquals($expected, $output, $message.' (in '.$file.')'); - } - } - - protected static function parseTemplates($test) - { - $templates = []; - preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, \PREG_SET_ORDER); - foreach ($matches as $match) { - $templates[($match[1] ?: 'index.twig')] = $match[2]; - } - - return $templates; - } -} diff --git a/vendor/twig/twig/src/Test/NodeTestCase.php b/vendor/twig/twig/src/Test/NodeTestCase.php deleted file mode 100644 index 3b8b2c8..0000000 --- a/vendor/twig/twig/src/Test/NodeTestCase.php +++ /dev/null @@ -1,65 +0,0 @@ -assertNodeCompilation($source, $node, $environment, $isPattern); - } - - public function assertNodeCompilation($source, Node $node, Environment $environment = null, $isPattern = false) - { - $compiler = $this->getCompiler($environment); - $compiler->compile($node); - - if ($isPattern) { - $this->assertStringMatchesFormat($source, trim($compiler->getSource())); - } else { - $this->assertEquals($source, trim($compiler->getSource())); - } - } - - protected function getCompiler(Environment $environment = null) - { - return new Compiler(null === $environment ? $this->getEnvironment() : $environment); - } - - protected function getEnvironment() - { - return new Environment(new ArrayLoader([])); - } - - protected function getVariableGetter($name, $line = false) - { - $line = $line > 0 ? "// line $line\n" : ''; - - return sprintf('%s($context["%s"] ?? null)', $line, $name); - } - - protected function getAttributeGetter() - { - return 'twig_get_attribute($this->env, $this->source, '; - } -} diff --git a/vendor/twig/twig/src/Token.php b/vendor/twig/twig/src/Token.php deleted file mode 100644 index 53a6caf..0000000 --- a/vendor/twig/twig/src/Token.php +++ /dev/null @@ -1,178 +0,0 @@ - - */ -final class Token -{ - private $value; - private $type; - private $lineno; - - public const EOF_TYPE = -1; - public const TEXT_TYPE = 0; - public const BLOCK_START_TYPE = 1; - public const VAR_START_TYPE = 2; - public const BLOCK_END_TYPE = 3; - public const VAR_END_TYPE = 4; - public const NAME_TYPE = 5; - public const NUMBER_TYPE = 6; - public const STRING_TYPE = 7; - public const OPERATOR_TYPE = 8; - public const PUNCTUATION_TYPE = 9; - public const INTERPOLATION_START_TYPE = 10; - public const INTERPOLATION_END_TYPE = 11; - public const ARROW_TYPE = 12; - - public function __construct(int $type, $value, int $lineno) - { - $this->type = $type; - $this->value = $value; - $this->lineno = $lineno; - } - - public function __toString() - { - return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value); - } - - /** - * Tests the current token for a type and/or a value. - * - * Parameters may be: - * * just type - * * type and value (or array of possible values) - * * just value (or array of possible values) (NAME_TYPE is used as type) - * - * @param array|string|int $type The type to test - * @param array|string|null $values The token value - */ - public function test($type, $values = null): bool - { - if (null === $values && !\is_int($type)) { - $values = $type; - $type = self::NAME_TYPE; - } - - return ($this->type === $type) && ( - null === $values || - (\is_array($values) && \in_array($this->value, $values)) || - $this->value == $values - ); - } - - public function getLine(): int - { - return $this->lineno; - } - - public function getType(): int - { - return $this->type; - } - - public function getValue() - { - return $this->value; - } - - public static function typeToString(int $type, bool $short = false): string - { - switch ($type) { - case self::EOF_TYPE: - $name = 'EOF_TYPE'; - break; - case self::TEXT_TYPE: - $name = 'TEXT_TYPE'; - break; - case self::BLOCK_START_TYPE: - $name = 'BLOCK_START_TYPE'; - break; - case self::VAR_START_TYPE: - $name = 'VAR_START_TYPE'; - break; - case self::BLOCK_END_TYPE: - $name = 'BLOCK_END_TYPE'; - break; - case self::VAR_END_TYPE: - $name = 'VAR_END_TYPE'; - break; - case self::NAME_TYPE: - $name = 'NAME_TYPE'; - break; - case self::NUMBER_TYPE: - $name = 'NUMBER_TYPE'; - break; - case self::STRING_TYPE: - $name = 'STRING_TYPE'; - break; - case self::OPERATOR_TYPE: - $name = 'OPERATOR_TYPE'; - break; - case self::PUNCTUATION_TYPE: - $name = 'PUNCTUATION_TYPE'; - break; - case self::INTERPOLATION_START_TYPE: - $name = 'INTERPOLATION_START_TYPE'; - break; - case self::INTERPOLATION_END_TYPE: - $name = 'INTERPOLATION_END_TYPE'; - break; - case self::ARROW_TYPE: - $name = 'ARROW_TYPE'; - break; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - - return $short ? $name : 'Twig\Token::'.$name; - } - - public static function typeToEnglish(int $type): string - { - switch ($type) { - case self::EOF_TYPE: - return 'end of template'; - case self::TEXT_TYPE: - return 'text'; - case self::BLOCK_START_TYPE: - return 'begin of statement block'; - case self::VAR_START_TYPE: - return 'begin of print statement'; - case self::BLOCK_END_TYPE: - return 'end of statement block'; - case self::VAR_END_TYPE: - return 'end of print statement'; - case self::NAME_TYPE: - return 'name'; - case self::NUMBER_TYPE: - return 'number'; - case self::STRING_TYPE: - return 'string'; - case self::OPERATOR_TYPE: - return 'operator'; - case self::PUNCTUATION_TYPE: - return 'punctuation'; - case self::INTERPOLATION_START_TYPE: - return 'begin of string interpolation'; - case self::INTERPOLATION_END_TYPE: - return 'end of string interpolation'; - case self::ARROW_TYPE: - return 'arrow function'; - default: - throw new \LogicException(sprintf('Token of type "%s" does not exist.', $type)); - } - } -} diff --git a/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php b/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php deleted file mode 100644 index 720ea67..0000000 --- a/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -abstract class AbstractTokenParser implements TokenParserInterface -{ - /** - * @var Parser - */ - protected $parser; - - public function setParser(Parser $parser): void - { - $this->parser = $parser; - } -} diff --git a/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php b/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php deleted file mode 100644 index 4dbf304..0000000 --- a/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php +++ /dev/null @@ -1,60 +0,0 @@ -getLine(); - $name = $this->parser->getVarName(); - - $ref = new TempNameExpression($name, $lineno); - $ref->setAttribute('always_defined', true); - - $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideApplyEnd'], true); - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new Node([ - new SetNode(true, $ref, $body, $lineno, $this->getTag()), - new PrintNode($filter, $lineno, $this->getTag()), - ]); - } - - public function decideApplyEnd(Token $token): bool - { - return $token->test('endapply'); - } - - public function getTag(): string - { - return 'apply'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php b/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php deleted file mode 100644 index b674bea..0000000 --- a/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +++ /dev/null @@ -1,58 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - - if ($stream->test(/* Token::BLOCK_END_TYPE */ 3)) { - $value = 'html'; - } else { - $expr = $this->parser->getExpressionParser()->parseExpression(); - if (!$expr instanceof ConstantExpression) { - throw new SyntaxError('An escaping strategy must be a string or false.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $value = $expr->getAttribute('value'); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new AutoEscapeNode($value, $body, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endautoescape'); - } - - public function getTag(): string - { - return 'autoescape'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/BlockTokenParser.php b/vendor/twig/twig/src/TokenParser/BlockTokenParser.php deleted file mode 100644 index 5878131..0000000 --- a/vendor/twig/twig/src/TokenParser/BlockTokenParser.php +++ /dev/null @@ -1,78 +0,0 @@ - - * {% block title %}{% endblock %} - My Webpage - * {% endblock %} - * - * @internal - */ -final class BlockTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - if ($this->parser->hasBlock($name)) { - throw new SyntaxError(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - $this->parser->setBlock($name, $block = new BlockNode($name, new Node([]), $lineno)); - $this->parser->pushLocalScope(); - $this->parser->pushBlockStack($name); - - if ($stream->nextIf(/* Token::BLOCK_END_TYPE */ 3)) { - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - } else { - $body = new Node([ - new PrintNode($this->parser->getExpressionParser()->parseExpression(), $lineno), - ]); - } - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $block->setNode('body', $body); - $this->parser->popBlockStack(); - $this->parser->popLocalScope(); - - return new BlockReferenceNode($name, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endblock'); - } - - public function getTag(): string - { - return 'block'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php b/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php deleted file mode 100644 index 31416c7..0000000 --- a/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * @internal - */ -final class DeprecatedTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $expr = $this->parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); - - return new DeprecatedNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'deprecated'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/DoTokenParser.php b/vendor/twig/twig/src/TokenParser/DoTokenParser.php deleted file mode 100644 index 32c8f12..0000000 --- a/vendor/twig/twig/src/TokenParser/DoTokenParser.php +++ /dev/null @@ -1,38 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new DoNode($expr, $token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'do'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php b/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php deleted file mode 100644 index 64b4f29..0000000 --- a/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -parser->getStream(); - - $parent = $this->parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - $parentToken = $fakeParentToken = new Token(/* Token::STRING_TYPE */ 7, '__parent__', $token->getLine()); - if ($parent instanceof ConstantExpression) { - $parentToken = new Token(/* Token::STRING_TYPE */ 7, $parent->getAttribute('value'), $token->getLine()); - } elseif ($parent instanceof NameExpression) { - $parentToken = new Token(/* Token::NAME_TYPE */ 5, $parent->getAttribute('name'), $token->getLine()); - } - - // inject a fake parent to make the parent() function work - $stream->injectTokens([ - new Token(/* Token::BLOCK_START_TYPE */ 1, '', $token->getLine()), - new Token(/* Token::NAME_TYPE */ 5, 'extends', $token->getLine()), - $parentToken, - new Token(/* Token::BLOCK_END_TYPE */ 3, '', $token->getLine()), - ]); - - $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true); - - // override the parent with the correct one - if ($fakeParentToken === $parentToken) { - $module->setNode('parent', $parent); - } - - $this->parser->embedTemplate($module); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endembed'); - } - - public function getTag(): string - { - return 'embed'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php b/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php deleted file mode 100644 index 0ca46dd..0000000 --- a/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php +++ /dev/null @@ -1,52 +0,0 @@ -parser->getStream(); - - if ($this->parser->peekBlockStack()) { - throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext()); - } elseif (!$this->parser->isMainScope()) { - throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext()); - } - - if (null !== $this->parser->getParent()) { - throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext()); - } - $this->parser->setParent($this->parser->getExpressionParser()->parseExpression()); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new Node(); - } - - public function getTag(): string - { - return 'extends'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/FlushTokenParser.php b/vendor/twig/twig/src/TokenParser/FlushTokenParser.php deleted file mode 100644 index 02c74aa..0000000 --- a/vendor/twig/twig/src/TokenParser/FlushTokenParser.php +++ /dev/null @@ -1,38 +0,0 @@ -parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new FlushNode($token->getLine(), $this->getTag()); - } - - public function getTag(): string - { - return 'flush'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/ForTokenParser.php b/vendor/twig/twig/src/TokenParser/ForTokenParser.php deleted file mode 100644 index bac8ba2..0000000 --- a/vendor/twig/twig/src/TokenParser/ForTokenParser.php +++ /dev/null @@ -1,78 +0,0 @@ - - * {% for user in users %} - *
  • {{ user.username|e }}
  • - * {% endfor %} - * - * - * @internal - */ -final class ForTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $targets = $this->parser->getExpressionParser()->parseAssignmentExpression(); - $stream->expect(/* Token::OPERATOR_TYPE */ 8, 'in'); - $seq = $this->parser->getExpressionParser()->parseExpression(); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideForFork']); - if ('else' == $stream->next()->getValue()) { - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse([$this, 'decideForEnd'], true); - } else { - $else = null; - } - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - if (\count($targets) > 1) { - $keyTarget = $targets->getNode(0); - $keyTarget = new AssignNameExpression($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine()); - $valueTarget = $targets->getNode(1); - } else { - $keyTarget = new AssignNameExpression('_key', $lineno); - $valueTarget = $targets->getNode(0); - } - $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine()); - - return new ForNode($keyTarget, $valueTarget, $seq, null, $body, $else, $lineno, $this->getTag()); - } - - public function decideForFork(Token $token): bool - { - return $token->test(['else', 'endfor']); - } - - public function decideForEnd(Token $token): bool - { - return $token->test('endfor'); - } - - public function getTag(): string - { - return 'for'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/FromTokenParser.php b/vendor/twig/twig/src/TokenParser/FromTokenParser.php deleted file mode 100644 index 35098c2..0000000 --- a/vendor/twig/twig/src/TokenParser/FromTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(/* Token::NAME_TYPE */ 5, 'import'); - - $targets = []; - do { - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - } - - $targets[$name] = $alias; - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } while (true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $var = new AssignNameExpression($this->parser->getVarName(), $token->getLine()); - $node = new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope()); - - foreach ($targets as $name => $alias) { - $this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $var); - } - - return $node; - } - - public function getTag(): string - { - return 'from'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/IfTokenParser.php b/vendor/twig/twig/src/TokenParser/IfTokenParser.php deleted file mode 100644 index c0fe6df..0000000 --- a/vendor/twig/twig/src/TokenParser/IfTokenParser.php +++ /dev/null @@ -1,89 +0,0 @@ - - * {% for user in users %} - *
  • {{ user.username|e }}
  • - * {% endfor %} - * - * {% endif %} - * - * @internal - */ -final class IfTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests = [$expr, $body]; - $else = null; - - $end = false; - while (!$end) { - switch ($stream->next()->getValue()) { - case 'else': - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $else = $this->parser->subparse([$this, 'decideIfEnd']); - break; - - case 'elseif': - $expr = $this->parser->getExpressionParser()->parseExpression(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideIfFork']); - $tests[] = $expr; - $tests[] = $body; - break; - - case 'endif': - $end = true; - break; - - default: - throw new SyntaxError(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new IfNode(new Node($tests), $else, $lineno, $this->getTag()); - } - - public function decideIfFork(Token $token): bool - { - return $token->test(['elseif', 'else', 'endif']); - } - - public function decideIfEnd(Token $token): bool - { - return $token->test(['endif']); - } - - public function getTag(): string - { - return 'if'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/ImportTokenParser.php b/vendor/twig/twig/src/TokenParser/ImportTokenParser.php deleted file mode 100644 index 44cb4da..0000000 --- a/vendor/twig/twig/src/TokenParser/ImportTokenParser.php +++ /dev/null @@ -1,44 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5, 'as'); - $var = new AssignNameExpression($this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5)->getValue(), $token->getLine()); - $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->addImportedSymbol('template', $var->getAttribute('name')); - - return new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope()); - } - - public function getTag(): string - { - return 'import'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php b/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php deleted file mode 100644 index 28beb8a..0000000 --- a/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php +++ /dev/null @@ -1,69 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - - list($variables, $only, $ignoreMissing) = $this->parseArguments(); - - return new IncludeNode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); - } - - protected function parseArguments() - { - $stream = $this->parser->getStream(); - - $ignoreMissing = false; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'ignore')) { - $stream->expect(/* Token::NAME_TYPE */ 5, 'missing'); - - $ignoreMissing = true; - } - - $variables = null; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'with')) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - } - - $only = false; - if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'only')) { - $only = true; - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return [$variables, $only, $ignoreMissing]; - } - - public function getTag(): string - { - return 'include'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/MacroTokenParser.php b/vendor/twig/twig/src/TokenParser/MacroTokenParser.php deleted file mode 100644 index f584927..0000000 --- a/vendor/twig/twig/src/TokenParser/MacroTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ - - * {% endmacro %} - * - * @internal - */ -final class MacroTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $arguments = $this->parser->getExpressionParser()->parseArguments(true, true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $this->parser->pushLocalScope(); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) { - $value = $token->getValue(); - - if ($value != $name) { - throw new SyntaxError(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } - $this->parser->popLocalScope(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag())); - - return new Node(); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endmacro'); - } - - public function getTag(): string - { - return 'macro'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php b/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php deleted file mode 100644 index c919556..0000000 --- a/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php +++ /dev/null @@ -1,66 +0,0 @@ -parser->getStream(); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - // in a sandbox tag, only include tags are allowed - if (!$body instanceof IncludeNode) { - foreach ($body as $node) { - if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) { - continue; - } - - if (!$node instanceof IncludeNode) { - throw new SyntaxError('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext()); - } - } - } - - return new SandboxNode($body, $token->getLine(), $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endsandbox'); - } - - public function getTag(): string - { - return 'sandbox'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/SetTokenParser.php b/vendor/twig/twig/src/TokenParser/SetTokenParser.php deleted file mode 100644 index 2fbdfe0..0000000 --- a/vendor/twig/twig/src/TokenParser/SetTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -getLine(); - $stream = $this->parser->getStream(); - $names = $this->parser->getExpressionParser()->parseAssignmentExpression(); - - $capture = false; - if ($stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) { - $values = $this->parser->getExpressionParser()->parseMultitargetExpression(); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - if (\count($names) !== \count($values)) { - throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - } else { - $capture = true; - - if (\count($names) > 1) { - throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $values = $this->parser->subparse([$this, 'decideBlockEnd'], true); - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - } - - return new SetNode($capture, $names, $values, $lineno, $this->getTag()); - } - - public function decideBlockEnd(Token $token): bool - { - return $token->test('endset'); - } - - public function getTag(): string - { - return 'set'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/TokenParserInterface.php b/vendor/twig/twig/src/TokenParser/TokenParserInterface.php deleted file mode 100644 index bb8db3e..0000000 --- a/vendor/twig/twig/src/TokenParser/TokenParserInterface.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -interface TokenParserInterface -{ - /** - * Sets the parser associated with this token parser. - */ - public function setParser(Parser $parser): void; - - /** - * Parses a token and returns a node. - * - * @return Node - * - * @throws SyntaxError - */ - public function parse(Token $token); - - /** - * Gets the tag name associated with this token parser. - * - * @return string - */ - public function getTag(); -} diff --git a/vendor/twig/twig/src/TokenParser/UseTokenParser.php b/vendor/twig/twig/src/TokenParser/UseTokenParser.php deleted file mode 100644 index d0a2de4..0000000 --- a/vendor/twig/twig/src/TokenParser/UseTokenParser.php +++ /dev/null @@ -1,73 +0,0 @@ -parser->getExpressionParser()->parseExpression(); - $stream = $this->parser->getStream(); - - if (!$template instanceof ConstantExpression) { - throw new SyntaxError('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); - } - - $targets = []; - if ($stream->nextIf('with')) { - do { - $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - - $alias = $name; - if ($stream->nextIf('as')) { - $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue(); - } - - $targets[$name] = new ConstantExpression($alias, -1); - - if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) { - break; - } - } while (true); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)])); - - return new Node(); - } - - public function getTag(): string - { - return 'use'; - } -} diff --git a/vendor/twig/twig/src/TokenParser/WithTokenParser.php b/vendor/twig/twig/src/TokenParser/WithTokenParser.php deleted file mode 100644 index 7d8cbe2..0000000 --- a/vendor/twig/twig/src/TokenParser/WithTokenParser.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * @internal - */ -final class WithTokenParser extends AbstractTokenParser -{ - public function parse(Token $token): Node - { - $stream = $this->parser->getStream(); - - $variables = null; - $only = false; - if (!$stream->test(/* Token::BLOCK_END_TYPE */ 3)) { - $variables = $this->parser->getExpressionParser()->parseExpression(); - $only = (bool) $stream->nextIf(/* Token::NAME_TYPE */ 5, 'only'); - } - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - $body = $this->parser->subparse([$this, 'decideWithEnd'], true); - - $stream->expect(/* Token::BLOCK_END_TYPE */ 3); - - return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag()); - } - - public function decideWithEnd(Token $token): bool - { - return $token->test('endwith'); - } - - public function getTag(): string - { - return 'with'; - } -} diff --git a/vendor/twig/twig/src/TokenStream.php b/vendor/twig/twig/src/TokenStream.php deleted file mode 100644 index 1eac11a..0000000 --- a/vendor/twig/twig/src/TokenStream.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ -final class TokenStream -{ - private $tokens; - private $current = 0; - private $source; - - public function __construct(array $tokens, Source $source = null) - { - $this->tokens = $tokens; - $this->source = $source ?: new Source('', ''); - } - - public function __toString() - { - return implode("\n", $this->tokens); - } - - public function injectTokens(array $tokens) - { - $this->tokens = array_merge(\array_slice($this->tokens, 0, $this->current), $tokens, \array_slice($this->tokens, $this->current)); - } - - /** - * Sets the pointer to the next token and returns the old one. - */ - public function next(): Token - { - if (!isset($this->tokens[++$this->current])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current - 1]; - } - - /** - * Tests a token, sets the pointer to the next one and returns it or throws a syntax error. - * - * @return Token|null The next token if the condition is true, null otherwise - */ - public function nextIf($primary, $secondary = null) - { - if ($this->tokens[$this->current]->test($primary, $secondary)) { - return $this->next(); - } - } - - /** - * Tests a token and returns it or throws a syntax error. - */ - public function expect($type, $value = null, string $message = null): Token - { - $token = $this->tokens[$this->current]; - if (!$token->test($type, $value)) { - $line = $token->getLine(); - throw new SyntaxError(sprintf('%sUnexpected token "%s"%s ("%s" expected%s).', - $message ? $message.'. ' : '', - Token::typeToEnglish($token->getType()), - $token->getValue() ? sprintf(' of value "%s"', $token->getValue()) : '', - Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''), - $line, - $this->source - ); - } - $this->next(); - - return $token; - } - - /** - * Looks at the next token. - */ - public function look(int $number = 1): Token - { - if (!isset($this->tokens[$this->current + $number])) { - throw new SyntaxError('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->source); - } - - return $this->tokens[$this->current + $number]; - } - - /** - * Tests the current token. - */ - public function test($primary, $secondary = null): bool - { - return $this->tokens[$this->current]->test($primary, $secondary); - } - - /** - * Checks if end of stream was reached. - */ - public function isEOF(): bool - { - return /* Token::EOF_TYPE */ -1 === $this->tokens[$this->current]->getType(); - } - - public function getCurrent(): Token - { - return $this->tokens[$this->current]; - } - - /** - * Gets the source associated with this stream. - * - * @internal - */ - public function getSourceContext(): Source - { - return $this->source; - } -} diff --git a/vendor/twig/twig/src/TwigFilter.php b/vendor/twig/twig/src/TwigFilter.php deleted file mode 100644 index 94e5f9b..0000000 --- a/vendor/twig/twig/src/TwigFilter.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#filters - */ -final class TwigFilter -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'pre_escape' => null, - 'preserves_safety' => null, - 'node_class' => FilterExpression::class, - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this filter. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function needsEnvironment(): bool - { - return $this->options['needs_environment']; - } - - public function needsContext(): bool - { - return $this->options['needs_context']; - } - - public function getSafe(Node $filterArgs): ?array - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return $this->options['is_safe_callback']($filterArgs); - } - - return null; - } - - public function getPreservesSafety(): ?array - { - return $this->options['preserves_safety']; - } - - public function getPreEscape(): ?string - { - return $this->options['pre_escape']; - } - - public function isVariadic(): bool - { - return $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } -} diff --git a/vendor/twig/twig/src/TwigFunction.php b/vendor/twig/twig/src/TwigFunction.php deleted file mode 100644 index 494d45b..0000000 --- a/vendor/twig/twig/src/TwigFunction.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#functions - */ -final class TwigFunction -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the function. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'needs_environment' => false, - 'needs_context' => false, - 'is_variadic' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'node_class' => FunctionExpression::class, - 'deprecated' => false, - 'alternative' => null, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this function. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function needsEnvironment(): bool - { - return $this->options['needs_environment']; - } - - public function needsContext(): bool - { - return $this->options['needs_context']; - } - - public function getSafe(Node $functionArgs): ?array - { - if (null !== $this->options['is_safe']) { - return $this->options['is_safe']; - } - - if (null !== $this->options['is_safe_callback']) { - return $this->options['is_safe_callback']($functionArgs); - } - - return []; - } - - public function isVariadic(): bool - { - return (bool) $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } -} diff --git a/vendor/twig/twig/src/TwigTest.php b/vendor/twig/twig/src/TwigTest.php deleted file mode 100644 index 4c18632..0000000 --- a/vendor/twig/twig/src/TwigTest.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * @see https://twig.symfony.com/doc/templates.html#test-operator - */ -final class TwigTest -{ - private $name; - private $callable; - private $options; - private $arguments = []; - - /** - * @param callable|null $callable A callable implementing the test. If null, you need to overwrite the "node_class" option to customize compilation. - */ - public function __construct(string $name, $callable = null, array $options = []) - { - $this->name = $name; - $this->callable = $callable; - $this->options = array_merge([ - 'is_variadic' => false, - 'node_class' => TestExpression::class, - 'deprecated' => false, - 'alternative' => null, - 'one_mandatory_argument' => false, - ], $options); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Returns the callable to execute for this test. - * - * @return callable|null - */ - public function getCallable() - { - return $this->callable; - } - - public function getNodeClass(): string - { - return $this->options['node_class']; - } - - public function setArguments(array $arguments): void - { - $this->arguments = $arguments; - } - - public function getArguments(): array - { - return $this->arguments; - } - - public function isVariadic(): bool - { - return (bool) $this->options['is_variadic']; - } - - public function isDeprecated(): bool - { - return (bool) $this->options['deprecated']; - } - - public function getDeprecatedVersion(): string - { - return \is_bool($this->options['deprecated']) ? '' : $this->options['deprecated']; - } - - public function getAlternative(): ?string - { - return $this->options['alternative']; - } - - public function hasOneMandatoryArgument(): bool - { - return (bool) $this->options['one_mandatory_argument']; - } -} diff --git a/vendor/twig/twig/src/Util/DeprecationCollector.php b/vendor/twig/twig/src/Util/DeprecationCollector.php deleted file mode 100644 index 378b666..0000000 --- a/vendor/twig/twig/src/Util/DeprecationCollector.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -final class DeprecationCollector -{ - private $twig; - - public function __construct(Environment $twig) - { - $this->twig = $twig; - } - - /** - * Returns deprecations for templates contained in a directory. - * - * @param string $dir A directory where templates are stored - * @param string $ext Limit the loaded templates by extension - * - * @return array An array of deprecations - */ - public function collectDir(string $dir, string $ext = '.twig'): array - { - $iterator = new \RegexIterator( - new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY - ), '{'.preg_quote($ext).'$}' - ); - - return $this->collect(new TemplateDirIterator($iterator)); - } - - /** - * Returns deprecations for passed templates. - * - * @param \Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template) - * - * @return array An array of deprecations - */ - public function collect(\Traversable $iterator): array - { - $deprecations = []; - set_error_handler(function ($type, $msg) use (&$deprecations) { - if (\E_USER_DEPRECATED === $type) { - $deprecations[] = $msg; - } - }); - - foreach ($iterator as $name => $contents) { - try { - $this->twig->parse($this->twig->tokenize(new Source($contents, $name))); - } catch (SyntaxError $e) { - // ignore templates containing syntax errors - } - } - - restore_error_handler(); - - return $deprecations; - } -} diff --git a/vendor/twig/twig/src/Util/TemplateDirIterator.php b/vendor/twig/twig/src/Util/TemplateDirIterator.php deleted file mode 100644 index 3bef14b..0000000 --- a/vendor/twig/twig/src/Util/TemplateDirIterator.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class TemplateDirIterator extends \IteratorIterator -{ - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function current() - { - return file_get_contents(parent::current()); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function key() - { - return (string) parent::key(); - } -}